From 8c2e8d02edc622cd8a409307cf06a3ef31b3d3ad Mon Sep 17 00:00:00 2001 From: lisonge Date: Tue, 23 Jan 2024 10:22:35 +0000 Subject: [PATCH] deploy: 68841035cc7163bb6b67d05cd528fcbb55a03efe --- 404.html | 8 ++--- ...e_type_script_setup_true_lang-UPLSJ4Hw.js} | 4 +-- ...pe_script_setup_true_lang-UPLSJ4Hw.js.map} | 2 +- ...age-XI-cAKHm.js => DevicePage-FYbQq6N3.js} | 4 +-- ...AKHm.js.map => DevicePage-FYbQq6N3.js.map} | 2 +- ...ePage-wbzSXwwc.js => HomePage-91EmzLXR.js} | 4 +-- ...zSXwwc.js.map => HomePage-91EmzLXR.js.map} | 2 +- ...age-wX1w62Qh.js => ImportPage-Fae4iEVk.js} | 4 +-- ...62Qh.js.map => ImportPage-Fae4iEVk.js.map} | 2 +- ...e-CmKtZTGi.js => SnapshotPage-owac59Kk.js} | 6 ++-- ...Gi.js.map => SnapshotPage-owac59Kk.js.map} | 2 +- ...4Page-b8tPorP5.js => _404Page-v_OEFicH.js} | 4 +-- ...tPorP5.js.map => _404Page-v_OEFicH.js.map} | 2 +- ...{import-sCnXcRHq.js => import-kVHJH7rF.js} | 4 +-- ...sCnXcRHq.js.map => import-kVHJH7rF.js.map} | 2 +- .../{index-AzMi55Pv.js => index-Lw3EAuUv.js} | 4 +-- ...-AzMi55Pv.js.map => index-Lw3EAuUv.js.map} | 2 +- .../{index-KbMk1nPu.js => index-O1rtA3Eg.js} | 8 ++--- ...-KbMk1nPu.js.map => index-O1rtA3Eg.js.map} | 2 +- ....min-Er0t4O-W.js => jszip.min-jR1TOKSo.js} | 4 +-- ...t4O-W.js.map => jszip.min-jR1TOKSo.js.map} | 2 +- assets/{node-nnk68Gjj.js => node-_ec_Pp3m.js} | 36 +++++++++---------- ...e-nnk68Gjj.js.map => node-_ec_Pp3m.js.map} | 2 +- ...torage-I0hkGMKT.js => storage-HvXPlwOB.js} | 4 +-- ...0hkGMKT.js.map => storage-HvXPlwOB.js.map} | 2 +- .../{table-kebVkreH.js => table-Ycm662oI.js} | 4 +-- ...-kebVkreH.js.map => table-Ycm662oI.js.map} | 2 +- index.html | 8 ++--- 28 files changed, 66 insertions(+), 66 deletions(-) rename assets/{ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js => ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js} (98%) rename assets/{ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js.map => ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js.map} (99%) rename assets/{DevicePage-XI-cAKHm.js => DevicePage-FYbQq6N3.js} (95%) rename assets/{DevicePage-XI-cAKHm.js.map => DevicePage-FYbQq6N3.js.map} (99%) rename assets/{HomePage-wbzSXwwc.js => HomePage-91EmzLXR.js} (93%) rename assets/{HomePage-wbzSXwwc.js.map => HomePage-91EmzLXR.js.map} (99%) rename assets/{ImportPage-wX1w62Qh.js => ImportPage-Fae4iEVk.js} (80%) rename assets/{ImportPage-wX1w62Qh.js.map => ImportPage-Fae4iEVk.js.map} (98%) rename assets/{SnapshotPage-CmKtZTGi.js => SnapshotPage-owac59Kk.js} (99%) rename assets/{SnapshotPage-CmKtZTGi.js.map => SnapshotPage-owac59Kk.js.map} (72%) rename assets/{_404Page-b8tPorP5.js => _404Page-v_OEFicH.js} (81%) rename assets/{_404Page-b8tPorP5.js.map => _404Page-v_OEFicH.js.map} (90%) rename assets/{import-sCnXcRHq.js => import-kVHJH7rF.js} (97%) rename assets/{import-sCnXcRHq.js.map => import-kVHJH7rF.js.map} (99%) rename assets/{index-AzMi55Pv.js => index-Lw3EAuUv.js} (99%) rename assets/{index-AzMi55Pv.js.map => index-Lw3EAuUv.js.map} (99%) rename assets/{index-KbMk1nPu.js => index-O1rtA3Eg.js} (99%) rename assets/{index-KbMk1nPu.js.map => index-O1rtA3Eg.js.map} (99%) rename assets/{jszip.min-Er0t4O-W.js => jszip.min-jR1TOKSo.js} (99%) rename assets/{jszip.min-Er0t4O-W.js.map => jszip.min-jR1TOKSo.js.map} (99%) rename assets/{node-nnk68Gjj.js => node-_ec_Pp3m.js} (79%) rename assets/{node-nnk68Gjj.js.map => node-_ec_Pp3m.js.map} (67%) rename assets/{storage-I0hkGMKT.js => storage-HvXPlwOB.js} (99%) rename assets/{storage-I0hkGMKT.js.map => storage-HvXPlwOB.js.map} (99%) rename assets/{table-kebVkreH.js => table-Ycm662oI.js} (99%) rename assets/{table-kebVkreH.js.map => table-Ycm662oI.js.map} (99%) diff --git a/404.html b/404.html index 3cf01a7..919bbb0 100644 --- a/404.html +++ b/404.html @@ -1,15 +1,15 @@ - + - + GKD - - + + diff --git a/assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js b/assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js similarity index 98% rename from assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js rename to assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js index 66d78e2..b2cb14b 100644 --- a/assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js +++ b/assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js @@ -1,4 +1,4 @@ -import{d as et,m as X,k as _,o as G,p as ne,h as ce,b as V,e as q,u as tt,q as Ie,n as He,a as I,g as N}from"./storage-I0hkGMKT.js";import{N as at,u as W,d as $,b as je,c as ie}from"./node-nnk68Gjj.js";import{b as x,as as rt,d as nt,i as it,c as ot,o as R,ak as T,g,f as st,u as v,k as E,n as Z,l as C,h as k}from"./index-KbMk1nPu.js";import{J as ue}from"./jszip.min-Er0t4O-W.js";const Ce=({title:a="批量分享链接",content:e=""})=>{et.success({title:a,style:{width:"800px"},content(){return x(at,{type:"textarea",autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;",class:"gkd_code"},value:e},null)},positiveText:"复制",onPositiveClick(){return navigator.clipboard.writeText(e).then(()=>{X.success("复制成功")}).catch(()=>{X.success("复制失败")}),!1}})};var Ne={exports:{}};(function(a,e){(function(t,r){r()})(_,function(){function t(n,o){return typeof o>"u"?o={autoBom:!1}:typeof o!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}function r(n,o,p){var f=new XMLHttpRequest;f.open("GET",n),f.responseType="blob",f.onload=function(){c(f.response,o,p)},f.onerror=function(){console.error("could not download file")},f.send()}function i(n){var o=new XMLHttpRequest;o.open("HEAD",n,!1);try{o.send()}catch{}return 200<=o.status&&299>=o.status}function s(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}var u=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof _=="object"&&_.global===_?_:void 0,h=u.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=u.saveAs||(typeof window!="object"||window!==u?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(n,o,p){var f=u.URL||u.webkitURL,d=document.createElement("a");o=o||n.name||"download",d.download=o,d.rel="noopener",typeof n=="string"?(d.href=n,d.origin===location.origin?s(d):i(d.href)?r(n,o,p):s(d,d.target="_blank")):(d.href=f.createObjectURL(n),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){s(d)},0))}:"msSaveOrOpenBlob"in navigator?function(n,o,p){if(o=o||n.name||"download",typeof n!="string")navigator.msSaveOrOpenBlob(t(n,p),o);else if(i(n))r(n,o,p);else{var f=document.createElement("a");f.href=n,f.target="_blank",setTimeout(function(){s(f)})}}:function(n,o,p,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof n=="string")return r(n,o,p);var d=n.type==="application/octet-stream",l=/constructor/i.test(u.HTMLElement)||u.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||d&&l||h)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var B=m.result;B=w?B:B.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=B:location=B,f=null},m.readAsDataURL(n)}else{var A=u.URL||u.webkitURL,L=A.createObjectURL(n);f?f.location=L:location.href=L,f=null,setTimeout(function(){A.revokeObjectURL(L)},4e4)}});u.saveAs=c.saveAs=c,a.exports=c})})(Ne);var Q=Ne.exports;const We="https://github.com/gkd-kit/inspect/issues/new",lt="661952005",oe={origin:"https://github.com",referer:We},ct=async()=>{var i;const a='[data-upload-policy-url="/upload/policies/assets"] input.js-data-upload-policy-url-csrf',e=await G(We);return(i=new DOMParser().parseFromString(await e.text(),"text/html").querySelector(a))==null?void 0:i.getAttribute("value")},$e=async(a,e,t)=>ut(a,e,t),ut=async(a,e,t)=>{const r=await ct();if(!r)throw rt.githubErrorDlgVisible=!0,new Error("failed get csrfToken");const i=await G("https://github.com/upload/policies/assets",{method:"POST",body:ne({authenticity_token:r,content_type:t,name:e,size:a.byteLength,repository_id:lt}),headers:oe}).then(h=>{if(!h.ok)throw new Error("failed upload policies assets");return h.json()});if(!(await G(i.upload_url,{method:"POST",body:ne(i.form,{file:new File([a],e,{type:t})}),headers:oe})).ok)throw new Error("upload s3 failed");if((await G(new URL(i.asset_upload_url,"https://github.com/").href,{method:"PUT",body:ne({authenticity_token:i.asset_upload_authenticity_token}),headers:{...oe,Accept:"application/json"}})).status!=200)throw new Error("failed check authenticity upload");return i.asset};/*! +import{d as et,m as X,k as _,o as G,p as ne,h as ce,b as V,e as q,u as tt,q as Ie,n as He,a as I,g as N}from"./storage-HvXPlwOB.js";import{N as at,u as W,d as $,b as je,c as ie}from"./node-_ec_Pp3m.js";import{b as x,as as rt,d as nt,i as it,c as ot,o as R,ak as T,g,f as st,u as v,k as E,n as Z,l as C,h as k}from"./index-O1rtA3Eg.js";import{J as ue}from"./jszip.min-jR1TOKSo.js";const Ce=({title:a="批量分享链接",content:e=""})=>{et.success({title:a,style:{width:"800px"},content(){return x(at,{type:"textarea",autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;",class:"gkd_code"},value:e},null)},positiveText:"复制",onPositiveClick(){return navigator.clipboard.writeText(e).then(()=>{X.success("复制成功")}).catch(()=>{X.success("复制失败")}),!1}})};var Ne={exports:{}};(function(a,e){(function(t,r){r()})(_,function(){function t(n,o){return typeof o>"u"?o={autoBom:!1}:typeof o!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["\uFEFF",n],{type:n.type}):n}function r(n,o,p){var f=new XMLHttpRequest;f.open("GET",n),f.responseType="blob",f.onload=function(){c(f.response,o,p)},f.onerror=function(){console.error("could not download file")},f.send()}function i(n){var o=new XMLHttpRequest;o.open("HEAD",n,!1);try{o.send()}catch{}return 200<=o.status&&299>=o.status}function s(n){try{n.dispatchEvent(new MouseEvent("click"))}catch{var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}var u=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof _=="object"&&_.global===_?_:void 0,h=u.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=u.saveAs||(typeof window!="object"||window!==u?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(n,o,p){var f=u.URL||u.webkitURL,d=document.createElement("a");o=o||n.name||"download",d.download=o,d.rel="noopener",typeof n=="string"?(d.href=n,d.origin===location.origin?s(d):i(d.href)?r(n,o,p):s(d,d.target="_blank")):(d.href=f.createObjectURL(n),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){s(d)},0))}:"msSaveOrOpenBlob"in navigator?function(n,o,p){if(o=o||n.name||"download",typeof n!="string")navigator.msSaveOrOpenBlob(t(n,p),o);else if(i(n))r(n,o,p);else{var f=document.createElement("a");f.href=n,f.target="_blank",setTimeout(function(){s(f)})}}:function(n,o,p,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof n=="string")return r(n,o,p);var d=n.type==="application/octet-stream",l=/constructor/i.test(u.HTMLElement)||u.safari,w=/CriOS\/[\d]+/.test(navigator.userAgent);if((w||d&&l||h)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var B=m.result;B=w?B:B.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=B:location=B,f=null},m.readAsDataURL(n)}else{var A=u.URL||u.webkitURL,L=A.createObjectURL(n);f?f.location=L:location.href=L,f=null,setTimeout(function(){A.revokeObjectURL(L)},4e4)}});u.saveAs=c.saveAs=c,a.exports=c})})(Ne);var Q=Ne.exports;const We="https://github.com/gkd-kit/inspect/issues/new",lt="661952005",oe={origin:"https://github.com",referer:We},ct=async()=>{var i;const a='[data-upload-policy-url="/upload/policies/assets"] input.js-data-upload-policy-url-csrf',e=await G(We);return(i=new DOMParser().parseFromString(await e.text(),"text/html").querySelector(a))==null?void 0:i.getAttribute("value")},$e=async(a,e,t)=>ut(a,e,t),ut=async(a,e,t)=>{const r=await ct();if(!r)throw rt.githubErrorDlgVisible=!0,new Error("failed get csrfToken");const i=await G("https://github.com/upload/policies/assets",{method:"POST",body:ne({authenticity_token:r,content_type:t,name:e,size:a.byteLength,repository_id:lt}),headers:oe}).then(h=>{if(!h.ok)throw new Error("failed upload policies assets");return h.json()});if(!(await G(i.upload_url,{method:"POST",body:ne(i.form,{file:new File([a],e,{type:t})}),headers:oe})).ok)throw new Error("upload s3 failed");if((await G(new URL(i.asset_upload_url,"https://github.com/").href,{method:"PUT",body:ne({authenticity_token:i.asset_upload_authenticity_token}),headers:{...oe,Accept:"application/json"}})).status!=200)throw new Error("failed check authenticity upload");return i.asset};/*! * Compressor.js v1.2.1 * https://fengyuanchen.github.io/compressorjs * @@ -7,4 +7,4 @@ import{d as et,m as X,k as _,o as G,p as ne,h as ce,b as V,e as q,u as tt,q as I * * Date: 2023-02-28T14:09:41.732Z */function De(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(a,i).enumerable})),t.push.apply(t,r)}return t}function J(a){for(var e=1;e"u"||function(e){var t=e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype,r=e.Blob&&function(){try{return!!new Blob}catch{return!1}}(),i=r&&e.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),s=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,u=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,h=(r||s)&&e.atob&&e.ArrayBuffer&&e.Uint8Array&&function(c){var n,o,p,f,d,l,w,m,A;if(n=c.match(u),!n)throw new Error("invalid data URI");for(o=n[2]?n[1]:"text/plain"+(n[3]||";charset=US-ASCII"),p=!!n[4],f=c.slice(n[0].length),p?d=atob(f):d=decodeURIComponent(f),l=new ArrayBuffer(d.length),w=new Uint8Array(l),m=0;m"u"?!1:e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]"},Me={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},mt=typeof window<"u"&&typeof window.document<"u",U=mt?window:{},K=function(e){return e>0&&e<1/0},gt=Array.prototype.slice;function fe(a){return Array.from?Array.from(a):gt.call(a)}var wt=/^image\/.+$/;function le(a){return wt.test(a)}function yt(a){var e=le(a)?a.substr(6):"";return e==="jpeg"&&(e="jpg"),".".concat(e)}var Ge=String.fromCharCode;function bt(a,e,t){var r="",i;for(t+=e,i=e;i0;)t.push(Ge.apply(null,fe(i.subarray(0,r)))),i=i.subarray(r);return"data:".concat(e,";base64,").concat(xt(t.join("")))}function kt(a){var e=new DataView(a),t;try{var r,i,s;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var u=e.byteLength,h=2;h+1=8&&(s=n+p)}}}if(s){var f=e.getUint16(s,r),d,l;for(l=0;l1&&arguments[1]!==void 0?arguments[1]:1e11;return Et.test(a)?Math.round(a*e)/e:a}function H(a){var e=a.aspectRatio,t=a.height,r=a.width,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",s=K(r),u=K(t);if(s&&u){var h=t*e;(i==="contain"||i==="none")&&h>r||i==="cover"&&h1&&Y(d,Bt(l))),c&&(t.exif=At(f)),h||c?!S||l>1?d.url=ze(f,s):d.url=S.createObjectURL(r):d.url=f,t.load(d)},n.onabort=function(){t.fail(new Error("Aborted to read the image with FileReader."))},n.onerror=function(){t.fail(new Error("Failed to read the image with FileReader."))},n.onloadend=function(){t.reader=null},h||c?n.readAsArrayBuffer(r):n.readAsDataURL(r)}}},{key:"load",value:function(t){var r=this,i=this.file,s=this.image;s.onload=function(){r.draw(J(J({},t),{},{naturalWidth:s.naturalWidth,naturalHeight:s.naturalHeight}))},s.onabort=function(){r.fail(new Error("Aborted to load the image."))},s.onerror=function(){r.fail(new Error("Failed to load the image."))},U.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(U.navigator.userAgent)&&(s.crossOrigin="anonymous"),s.alt=i.name,s.src=t.url}},{key:"draw",value:function(t){var r=this,i=t.naturalWidth,s=t.naturalHeight,u=t.rotate,h=u===void 0?0:u,c=t.scaleX,n=c===void 0?1:c,o=t.scaleY,p=o===void 0?1:o,f=this.file,d=this.image,l=this.options,w=document.createElement("canvas"),m=w.getContext("2d"),A=Math.abs(h)%180===90,L=(l.resize==="contain"||l.resize==="cover")&&K(l.width)&&K(l.height),B=Math.max(l.maxWidth,0)||1/0,D=Math.max(l.maxHeight,0)||1/0,P=Math.max(l.minWidth,0)||0,F=Math.max(l.minHeight,0)||0,O=i/s,y=l.width,b=l.height;if(A){var de=[D,B];B=de[0],D=de[1];var ve=[F,P];P=ve[0],F=ve[1];var me=[b,y];y=me[0],b=me[1]}L&&(O=y/b);var ge=H({aspectRatio:O,width:B,height:D},"contain");B=ge.width,D=ge.height;var we=H({aspectRatio:O,width:P,height:F},"cover");if(P=we.width,F=we.height,L){var ye=H({aspectRatio:O,width:y,height:b},l.resize);y=ye.width,b=ye.height}else{var be=H({aspectRatio:O,width:y,height:b}),xe=be.width;y=xe===void 0?i:xe;var ke=be.height;b=ke===void 0?s:ke}y=Math.floor(_e(Math.min(Math.max(y,P),B))),b=Math.floor(_e(Math.min(Math.max(b,F),D)));var qe=-y/2,Ye=-b/2,Ke=y,Qe=b,ee=[];if(L){var Be=0,Ee=0,te=i,ae=s,Ae=H({aspectRatio:O,width:i,height:s},{contain:"cover",cover:"contain"}[l.resize]);te=Ae.width,ae=Ae.height,Be=(i-te)/2,Ee=(s-ae)/2,ee.push(Be,Ee,te,ae)}if(ee.push(qe,Ye,Ke,Qe),A){var Re=[b,y];y=Re[0],b=Re[1]}w.width=y,w.height=b,le(l.mimeType)||(l.mimeType=f.type);var Te="transparent";f.size>l.convertSize&&l.convertTypes.indexOf(l.mimeType)>=0&&(l.mimeType="image/jpeg");var Ue=l.mimeType==="image/jpeg";if(Ue&&(Te="#fff"),m.fillStyle=Te,m.fillRect(0,0,y,b),l.beforeDraw&&l.beforeDraw.call(this,m,w),!this.aborted&&(m.save(),m.translate(y/2,b/2),m.rotate(h*Math.PI/180),m.scale(n,p),m.drawImage.apply(m,[d].concat(ee)),m.restore(),l.drew&&l.drew.call(this,m,w),!this.aborted)){var Le=function(M){if(!r.aborted){var Se=function(z){return r.done({naturalWidth:i,naturalHeight:s,result:z})};if(M&&Ue&&l.retainExif&&r.exif&&r.exif.length>0){var Oe=function(z){return Se(Fe(ze(Rt(z,r.exif),l.mimeType)))};if(M.arrayBuffer)M.arrayBuffer().then(Oe).catch(function(){r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var j=new se;r.reader=j,j.onload=function(re){var z=re.target;Oe(z.result)},j.onabort=function(){r.fail(new Error("Aborted to read the compressed image with FileReader."))},j.onerror=function(){r.fail(new Error("Failed to read the compressed image with FileReader."))},j.onloadend=function(){r.reader=null},j.readAsArrayBuffer(M)}}else Se(M)}};w.toBlob?w.toBlob(Le,l.mimeType,l.quality):Le(Fe(w.toDataURL(l.mimeType,l.quality)))}}},{key:"done",value:function(t){var r=t.naturalWidth,i=t.naturalHeight,s=t.result,u=this.file,h=this.image,c=this.options;if(S&&h.src.indexOf("blob:")===0&&S.revokeObjectURL(h.src),s)if(c.strict&&!c.retainExif&&s.size>u.size&&c.mimeType===u.type&&!(c.width>r||c.height>i||c.minWidth>r||c.minHeight>i||c.maxWidth{const e=new ue;return e.file("snapshot.json",JSON.stringify(a)).file("screenshot.png",await He.getItem(a.id)),await e.generateAsync({type:"blob",compression:"STORE"})},Ot=async a=>{const e=`snapshot-${a.id}.zip`;Q.saveAs(await he(a),e)},pe=async a=>{const e=await He.getItem(a.id),t=await new Promise((i,s)=>{new St(new Blob([e],{type:"image/png"}),{quality:.75,convertSize:2e5,success(u){i(u)},error(u){s(u)}})});return new Blob([t],{type:"image/jpeg"})},jt=async a=>{const e=`snapshot-${a.id}.jpg`;Q.saveAs(await pe(a),e)},Wt=async a=>{const e=new ue;for(const r of a)await ce(),e.file(r.id+".jpg",pe(r));const t=await e.generateAsync({type:"blob",compression:"STORE"});Q.saveAs(t,`batch-png-${a.length}.zip`)},$t=async a=>{const e=new ue;for(const r of a)await ce(),e.file(r.id+".zip",await he(r));const t=await e.generateAsync({type:"blob",compression:"STORE"});Q.saveAs(t,`batch-zip-${a.length}.zip`)},Xe=async a=>V[a.id]??$e(await pe(a).then(e=>e.arrayBuffer()),"file.jpg","image/jpeg").then(e=>(V[a.id]=e.href,e.href)),Ve=async a=>q[a.id]??$e(await he(a).then(e=>e.arrayBuffer()),"file.zip","application/x-zip-compressed").then(e=>(q[a.id]=e.href,tt[e.href]=a.id,e.href)),Zt=async a=>{const e=Ie(3);return(await Promise.allSettled(a.map(t=>e(()=>Xe(t))))).reduce((t,r)=>(r.status=="fulfilled"&&t.push(r.value),t),[])},Jt=async a=>{const e=Ie(3);return(await Promise.allSettled(a.map(t=>e(()=>Ve(t))))).reduce((t,r)=>(r.status=="fulfilled"&&t.push(r.value),t),[])},Ct=["href"],Dt=k("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[k("path",{d:"M549.973333 128 633.6 145.066667 474.026667 896 390.4 878.933333 549.973333 128M835.84 512 682.666667 358.826667 682.666667 238.08 956.586667 512 682.666667 785.493333 682.666667 664.746667 835.84 512M67.413333 512 341.333333 238.08 341.333333 358.826667 188.16 512 341.333333 664.746667 341.333333 785.493333 67.413333 512Z"})],-1),Pt=k("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[k("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[k("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),k("path",{d:"M7 11l5 5l5-5"}),k("path",{d:"M12 4v12"})])],-1),Ft=k("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[k("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81c1.66 0 3-1.34 3-3s-1.34-3-3-3s-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65c0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z",fill:"currentColor"})],-1),Mt=k("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[k("g",{fill:"none"},[k("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})])],-1),Gt=nt({__name:"ActionCard",props:{snapshot:{},onDelete:{type:Function,default:()=>()=>{}},showPreview:{type:Boolean,default:!0},showExport:{type:Boolean,default:!0},showDelete:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0}},setup(a){const e=a,t=it(),r=W(async()=>jt(await I.getItem(e.snapshot.id))),i=W(async()=>Ot(await I.getItem(e.snapshot.id))),s=ot(()=>t.resolve({name:"snapshot",params:{snapshotId:e.snapshot.id}}).href),u=W(async()=>{const o=await Xe(await I.getItem(e.snapshot.id));Ce({title:"分享链接",content:N(t,o)})}),h=W(async()=>{const o=await Ve(await I.getItem(e.snapshot.id));Ce({title:"分享链接",content:N(t,o)})}),c=async()=>{await I.removeItem(e.snapshot.id),await ce(500),e.onDelete()},n=async o=>navigator.clipboard.writeText(o).then(()=>{X.success("复制成功")}).catch(()=>{X.success("复制失败")});return(o,p)=>(R(),T(v(ie),null,{default:g(()=>[o.showPreview?(R(),st("a",{key:0,target:"_blank",href:s.value},[x(v(E),{size:"small"},{icon:g(()=>[x(v($),null,{default:g(()=>[Dt]),_:1})]),_:1})],8,Ct)):Z("",!0),o.showExport?(R(),T(v(je),{key:1},{trigger:g(()=>[x(v(E),{size:"small"},{icon:g(()=>[x(v($),null,{default:g(()=>[Pt]),_:1})]),_:1})]),default:g(()=>[x(v(ie),{vertical:""},{default:g(()=>[x(v(E),{onClick:v(i).invoke,loading:v(i).loading},{default:g(()=>[C(" 下载-快照 ")]),_:1},8,["onClick","loading"]),x(v(E),{onClick:v(r).invoke,loading:v(r).loading},{default:g(()=>[C(" 下载-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1})):Z("",!0),o.showShare?(R(),T(v(je),{key:2},{trigger:g(()=>[x(v(E),{size:"small"},{icon:g(()=>[x(v($),null,{default:g(()=>[Ft]),_:1})]),_:1})]),default:g(()=>[x(v(ie),{vertical:""},{default:g(()=>[v(q)[o.snapshot.id]?(R(),T(v(E),{key:0,onClick:p[0]||(p[0]=f=>n(v(N)(o.$router,v(q)[o.snapshot.id])))},{default:g(()=>[C(" 复制链接-快照 ")]),_:1})):(R(),T(v(E),{key:1,onClick:v(h).invoke,loading:v(h).loading},{default:g(()=>[C(" 生成链接-快照 ")]),_:1},8,["onClick","loading"])),v(V)[o.snapshot.id]?(R(),T(v(E),{key:2,onClick:p[1]||(p[1]=f=>n(v(N)(o.$router,v(V)[o.snapshot.id])))},{default:g(()=>[C(" 复制链接-图片 ")]),_:1})):(R(),T(v(E),{key:3,onClick:v(u).invoke,loading:v(u).loading},{default:g(()=>[C(" 生成链接-图片 ")]),_:1},8,["onClick","loading"]))]),_:1})]),_:1})):Z("",!0),o.showDelete?(R(),T(v(E),{key:3,size:"small",onClick:c},{icon:g(()=>[x(v($),null,{default:g(()=>[Mt]),_:1})]),_:1})):Z("",!0)]),_:1}))}});export{Gt as _,$t as a,Wt as b,Zt as c,Jt as d,Xe as e,Ve as f,Ce as s}; -//# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js.map +//# sourceMappingURL=ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js.map diff --git a/assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js.map b/assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js.map similarity index 99% rename from assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js.map rename to assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js.map index ad29a51..4e766a3 100644 --- a/assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js.map +++ b/assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js.map @@ -1 +1 @@ -{"version":3,"file":"ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js","sources":["../../src/utils/dialog.tsx","../../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js","../../src/utils/github.ts","../../node_modules/.pnpm/compressorjs@1.2.1/node_modules/compressorjs/dist/compressor.esm.js","../../src/utils/export.ts","../../src/components/ActionCard.vue"],"sourcesContent":["import { NInput } from 'naive-ui';\nimport { dialog, message } from './discrete';\n\nexport const showTextDLg = ({ title = `批量分享链接`, content = '' }) => {\n dialog.success({\n title,\n style: {\n width: `800px`,\n },\n content() {\n return (\n \n );\n },\n positiveText: `复制`,\n onPositiveClick() {\n navigator.clipboard\n .writeText(content)\n .then(() => {\n message.success(`复制成功`);\n })\n .catch(() => {\n message.success(`复制失败`);\n });\n return false;\n },\n });\n};\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map","import { enhanceFetch } from './fetch';\nimport { obj2form } from './others';\nimport store from './store';\n\nconst authenticityTokenPageUrl = `https://github.com/gkd-kit/inspect/issues/new`;\nconst repository_id = `661952005`;\nconst commonHeaders = {\n origin: `https://github.com`,\n referer: authenticityTokenPageUrl,\n};\n\nconst getCsrfToken = async () => {\n const csrfSelector = `[data-upload-policy-url=\"/upload/policies/assets\"] input.js-data-upload-policy-url-csrf`;\n const resp = await enhanceFetch(authenticityTokenPageUrl);\n const responseDoc = new DOMParser().parseFromString(\n await resp.text(),\n 'text/html',\n );\n const csrfToken = responseDoc\n .querySelector(csrfSelector)\n ?.getAttribute(`value`);\n return csrfToken;\n};\n\ntype S3Form = {\n key: string;\n acl: string;\n policy: string;\n 'X-Amz-Algorithm': string;\n 'X-Amz-Credential': string;\n 'X-Amz-Date': string;\n 'X-Amz-Signature': string;\n 'Content-Type': string;\n 'Cache-Control': string;\n 'x-amz-meta-Surrogate-Control': string;\n};\nexport type GithubPoliciesAsset = {\n id: number;\n name: string;\n size: number;\n content_type: string;\n original_name: string;\n href: string;\n};\n\ntype UploadPoliciesAssetsRsonpse = {\n upload_url: string;\n header: object;\n asset: GithubPoliciesAsset;\n form: S3Form;\n same_origin: boolean;\n asset_upload_url: string;\n upload_authenticity_token: string;\n asset_upload_authenticity_token: string;\n};\n\nexport const uploadPoliciesAssets = async (\n bf: ArrayBuffer,\n name: string,\n content_type: string,\n): Promise => {\n return uploadPoliciesAssetsByExtension(bf, name, content_type);\n};\n\nexport const uploadPoliciesAssetsByExtension = async (\n bf: ArrayBuffer,\n name: string,\n content_type: string,\n) => {\n const authenticity_token = await getCsrfToken();\n if (!authenticity_token) {\n store.githubErrorDlgVisible = true;\n throw new Error(`failed get csrfToken`);\n }\n\n const policiesResp: UploadPoliciesAssetsRsonpse = await enhanceFetch(\n `https://github.com/upload/policies/assets`,\n {\n method: `POST`,\n body: obj2form({\n authenticity_token,\n content_type,\n name,\n size: bf.byteLength,\n repository_id,\n }),\n headers: commonHeaders,\n },\n ).then((r) => {\n if (!r.ok) {\n throw new Error(`failed upload policies assets`);\n }\n return r.json();\n });\n\n // violentmonkey success\n // tampermonkey failed https://github.com/Tampermonkey/tampermonkey/issues/1783\n // use fetch is also work, but console.error cors and can not get response\n const s3Resp = await enhanceFetch(policiesResp.upload_url, {\n method: `POST`,\n body: obj2form(policiesResp.form, {\n file: new File([bf], name, { type: content_type }),\n }),\n headers: commonHeaders,\n });\n if (!s3Resp.ok) {\n throw new Error(`upload s3 failed`);\n }\n\n const assetsResp = await enhanceFetch(\n new URL(policiesResp.asset_upload_url, `https://github.com/`).href,\n {\n method: `PUT`,\n body: obj2form({\n authenticity_token: policiesResp.asset_upload_authenticity_token,\n }),\n headers: {\n ...commonHeaders,\n // api must add `Accept` request headers\n Accept: `application/json`,\n },\n },\n );\n\n if (assetsResp.status != 200) {\n throw new Error(`failed check authenticity upload`);\n }\n\n return policiesResp.asset;\n};\n","/*!\n * Compressor.js v1.2.1\n * https://fengyuanchen.github.io/compressorjs\n *\n * Copyright 2018-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2023-02-28T14:09:41.732Z\n */\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar canvasToBlob = {exports: {}};\n\n/*\n * JavaScript Canvas to Blob\n * https://github.com/blueimp/JavaScript-Canvas-to-Blob\n *\n * Copyright 2012, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on stackoverflow user Stoive's code snippet:\n * http://stackoverflow.com/q/4998908\n */\n(function (module) {\n if (typeof window === 'undefined') {\n return;\n }\n (function (window) {\n\n var CanvasPrototype = window.HTMLCanvasElement && window.HTMLCanvasElement.prototype;\n var hasBlobConstructor = window.Blob && function () {\n try {\n return Boolean(new Blob());\n } catch (e) {\n return false;\n }\n }();\n var hasArrayBufferViewSupport = hasBlobConstructor && window.Uint8Array && function () {\n try {\n return new Blob([new Uint8Array(100)]).size === 100;\n } catch (e) {\n return false;\n }\n }();\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n var dataURIPattern = /^data:((.*?)(;charset=.*?)?)(;base64)?,/;\n var dataURLtoBlob = (hasBlobConstructor || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array && function (dataURI) {\n var matches, mediaType, isBase64, dataString, byteString, arrayBuffer, intArray, i, bb;\n // Parse the dataURI components as per RFC 2397\n matches = dataURI.match(dataURIPattern);\n if (!matches) {\n throw new Error('invalid data URI');\n }\n // Default to text/plain;charset=US-ASCII\n mediaType = matches[2] ? matches[1] : 'text/plain' + (matches[3] || ';charset=US-ASCII');\n isBase64 = !!matches[4];\n dataString = dataURI.slice(matches[0].length);\n if (isBase64) {\n // Convert base64 to raw binary data held in a string:\n byteString = atob(dataString);\n } else {\n // Convert base64/URLEncoded data component to raw binary:\n byteString = decodeURIComponent(dataString);\n }\n // Write the bytes of the string to an ArrayBuffer:\n arrayBuffer = new ArrayBuffer(byteString.length);\n intArray = new Uint8Array(arrayBuffer);\n for (i = 0; i < byteString.length; i += 1) {\n intArray[i] = byteString.charCodeAt(i);\n }\n // Write the ArrayBuffer (or ArrayBufferView) to a blob:\n if (hasBlobConstructor) {\n return new Blob([hasArrayBufferViewSupport ? intArray : arrayBuffer], {\n type: mediaType\n });\n }\n bb = new BlobBuilder();\n bb.append(arrayBuffer);\n return bb.getBlob(mediaType);\n };\n if (window.HTMLCanvasElement && !CanvasPrototype.toBlob) {\n if (CanvasPrototype.mozGetAsFile) {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n if (quality && CanvasPrototype.toDataURL && dataURLtoBlob) {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n } else {\n callback(self.mozGetAsFile('blob', type));\n }\n });\n };\n } else if (CanvasPrototype.toDataURL && dataURLtoBlob) {\n if (CanvasPrototype.msToBlob) {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n if ((type && type !== 'image/png' || quality) && CanvasPrototype.toDataURL && dataURLtoBlob) {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n } else {\n callback(self.msToBlob(type));\n }\n });\n };\n } else {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n });\n };\n }\n }\n }\n if (module.exports) {\n module.exports = dataURLtoBlob;\n } else {\n window.dataURLtoBlob = dataURLtoBlob;\n }\n })(window);\n})(canvasToBlob);\nvar toBlob = canvasToBlob.exports;\n\nvar isBlob = function isBlob(value) {\n if (typeof Blob === 'undefined') {\n return false;\n }\n return value instanceof Blob || Object.prototype.toString.call(value) === '[object Blob]';\n};\n\nvar DEFAULTS = {\n /**\n * Indicates if output the original image instead of the compressed one\n * when the size of the compressed image is greater than the original one's\n * @type {boolean}\n */\n strict: true,\n /**\n * Indicates if read the image's Exif Orientation information,\n * and then rotate or flip the image automatically.\n * @type {boolean}\n */\n checkOrientation: true,\n /**\n * Indicates if retain the image's Exif information after compressed.\n * @type {boolean}\n */\n retainExif: false,\n /**\n * The max width of the output image.\n * @type {number}\n */\n maxWidth: Infinity,\n /**\n * The max height of the output image.\n * @type {number}\n */\n maxHeight: Infinity,\n /**\n * The min width of the output image.\n * @type {number}\n */\n minWidth: 0,\n /**\n * The min height of the output image.\n * @type {number}\n */\n minHeight: 0,\n /**\n * The width of the output image.\n * If not specified, the natural width of the source image will be used.\n * @type {number}\n */\n width: undefined,\n /**\n * The height of the output image.\n * If not specified, the natural height of the source image will be used.\n * @type {number}\n */\n height: undefined,\n /**\n * Sets how the size of the image should be resized to the container\n * specified by the `width` and `height` options.\n * @type {string}\n */\n resize: 'none',\n /**\n * The quality of the output image.\n * It must be a number between `0` and `1`,\n * and only available for `image/jpeg` and `image/webp` images.\n * Check out {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob canvas.toBlob}.\n * @type {number}\n */\n quality: 0.8,\n /**\n * The mime type of the output image.\n * By default, the original mime type of the source image file will be used.\n * @type {string}\n */\n mimeType: 'auto',\n /**\n * Files whose file type is included in this list,\n * and whose file size exceeds the `convertSize` value will be converted to JPEGs.\n * @type {string|Array}\n */\n convertTypes: ['image/png'],\n /**\n * PNG files over this size (5 MB by default) will be converted to JPEGs.\n * To disable this, just set the value to `Infinity`.\n * @type {number}\n */\n convertSize: 5000000,\n /**\n * The hook function to execute before draw the image into the canvas for compression.\n * @type {Function}\n * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n * @param {HTMLCanvasElement} canvas - The canvas for compression.\n * @example\n * function (context, canvas) {\n * context.fillStyle = '#fff';\n * }\n */\n beforeDraw: null,\n /**\n * The hook function to execute after drew the image into the canvas for compression.\n * @type {Function}\n * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n * @param {HTMLCanvasElement} canvas - The canvas for compression.\n * @example\n * function (context, canvas) {\n * context.filter = 'grayscale(100%)';\n * }\n */\n drew: null,\n /**\n * The hook function to execute when success to compress the image.\n * @type {Function}\n * @param {File} file - The compressed image File object.\n * @example\n * function (file) {\n * console.log(file);\n * }\n */\n success: null,\n /**\n * The hook function to execute when fail to compress the image.\n * @type {Function}\n * @param {Error} err - An Error object.\n * @example\n * function (err) {\n * console.log(err.message);\n * }\n */\n error: null\n};\n\nvar IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nvar WINDOW = IS_BROWSER ? window : {};\n\n/**\n * Check if the given value is a positive number.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a positive number, else `false`.\n */\nvar isPositiveNumber = function isPositiveNumber(value) {\n return value > 0 && value < Infinity;\n};\nvar slice = Array.prototype.slice;\n\n/**\n * Convert array-like or iterable object to an array.\n * @param {*} value - The value to convert.\n * @returns {Array} Returns a new array.\n */\nfunction toArray(value) {\n return Array.from ? Array.from(value) : slice.call(value);\n}\nvar REGEXP_IMAGE_TYPE = /^image\\/.+$/;\n\n/**\n * Check if the given value is a mime type of image.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given is a mime type of image, else `false`.\n */\nfunction isImageType(value) {\n return REGEXP_IMAGE_TYPE.test(value);\n}\n\n/**\n * Convert image type to extension.\n * @param {string} value - The image type to convert.\n * @returns {boolean} Returns the image extension.\n */\nfunction imageTypeToExtension(value) {\n var extension = isImageType(value) ? value.substr(6) : '';\n if (extension === 'jpeg') {\n extension = 'jpg';\n }\n return \".\".concat(extension);\n}\nvar fromCharCode = String.fromCharCode;\n\n/**\n * Get string from char code in data view.\n * @param {DataView} dataView - The data view for read.\n * @param {number} start - The start index.\n * @param {number} length - The read length.\n * @returns {string} The read result.\n */\nfunction getStringFromCharCode(dataView, start, length) {\n var str = '';\n var i;\n length += start;\n for (i = start; i < length; i += 1) {\n str += fromCharCode(dataView.getUint8(i));\n }\n return str;\n}\nvar btoa = WINDOW.btoa;\n\n/**\n * Transform array buffer to Data URL.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {string} mimeType - The mime type of the Data URL.\n * @returns {string} The result Data URL.\n */\nfunction arrayBufferToDataURL(arrayBuffer, mimeType) {\n var chunks = [];\n var chunkSize = 8192;\n var uint8 = new Uint8Array(arrayBuffer);\n while (uint8.length > 0) {\n // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9\n // eslint-disable-next-line prefer-spread\n chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))));\n uint8 = uint8.subarray(chunkSize);\n }\n return \"data:\".concat(mimeType, \";base64,\").concat(btoa(chunks.join('')));\n}\n\n/**\n * Get orientation value from given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {number} The read orientation value.\n */\nfunction resetAndGetOrientation(arrayBuffer) {\n var dataView = new DataView(arrayBuffer);\n var orientation;\n\n // Ignores range error when the image does not have correct Exif information\n try {\n var littleEndian;\n var app1Start;\n var ifdStart;\n\n // Only handle JPEG image (start by 0xFFD8)\n if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n var length = dataView.byteLength;\n var offset = 2;\n while (offset + 1 < length) {\n if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n app1Start = offset;\n break;\n }\n offset += 1;\n }\n }\n if (app1Start) {\n var exifIDCode = app1Start + 4;\n var tiffOffset = app1Start + 10;\n if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n var endianness = dataView.getUint16(tiffOffset);\n littleEndian = endianness === 0x4949;\n if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n if (firstIFDOffset >= 0x00000008) {\n ifdStart = tiffOffset + firstIFDOffset;\n }\n }\n }\n }\n }\n if (ifdStart) {\n var _length = dataView.getUint16(ifdStart, littleEndian);\n var _offset;\n var i;\n for (i = 0; i < _length; i += 1) {\n _offset = ifdStart + i * 12 + 2;\n if (dataView.getUint16(_offset, littleEndian) === 0x0112 /* Orientation */) {\n // 8 is the offset of the current tag's value\n _offset += 8;\n\n // Get the original orientation value\n orientation = dataView.getUint16(_offset, littleEndian);\n\n // Override the orientation with its default value\n dataView.setUint16(_offset, 1, littleEndian);\n break;\n }\n }\n }\n } catch (e) {\n orientation = 1;\n }\n return orientation;\n}\n\n/**\n * Parse Exif Orientation value.\n * @param {number} orientation - The orientation to parse.\n * @returns {Object} The parsed result.\n */\nfunction parseOrientation(orientation) {\n var rotate = 0;\n var scaleX = 1;\n var scaleY = 1;\n switch (orientation) {\n // Flip horizontal\n case 2:\n scaleX = -1;\n break;\n\n // Rotate left 180°\n case 3:\n rotate = -180;\n break;\n\n // Flip vertical\n case 4:\n scaleY = -1;\n break;\n\n // Flip vertical and rotate right 90°\n case 5:\n rotate = 90;\n scaleY = -1;\n break;\n\n // Rotate right 90°\n case 6:\n rotate = 90;\n break;\n\n // Flip horizontal and rotate right 90°\n case 7:\n rotate = 90;\n scaleX = -1;\n break;\n\n // Rotate left 90°\n case 8:\n rotate = -90;\n break;\n }\n return {\n rotate: rotate,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\nvar REGEXP_DECIMALS = /\\.\\d*(?:0|9){12}\\d*$/;\n\n/**\n * Normalize decimal number.\n * Check out {@link https://0.30000000000000004.com/}\n * @param {number} value - The value to normalize.\n * @param {number} [times=100000000000] - The times for normalizing.\n * @returns {number} Returns the normalized number.\n */\nfunction normalizeDecimalNumber(value) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000;\n return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value;\n}\n\n/**\n * Get the max sizes in a rectangle under the given aspect ratio.\n * @param {Object} data - The original sizes.\n * @param {string} [type='contain'] - The adjust type.\n * @returns {Object} The result sizes.\n */\nfunction getAdjustedSizes(_ref) {\n var aspectRatio = _ref.aspectRatio,\n height = _ref.height,\n width = _ref.width;\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none';\n var isValidWidth = isPositiveNumber(width);\n var isValidHeight = isPositiveNumber(height);\n if (isValidWidth && isValidHeight) {\n var adjustedWidth = height * aspectRatio;\n if ((type === 'contain' || type === 'none') && adjustedWidth > width || type === 'cover' && adjustedWidth < width) {\n height = width / aspectRatio;\n } else {\n width = height * aspectRatio;\n }\n } else if (isValidWidth) {\n height = width / aspectRatio;\n } else if (isValidHeight) {\n width = height * aspectRatio;\n }\n return {\n width: width,\n height: height\n };\n}\n\n/**\n * Get Exif information from the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {Array} The read Exif information.\n */\nfunction getExif(arrayBuffer) {\n var array = toArray(new Uint8Array(arrayBuffer));\n var length = array.length;\n var segments = [];\n var start = 0;\n while (start + 3 < length) {\n var value = array[start];\n var next = array[start + 1];\n\n // SOS (Start of Scan)\n if (value === 0xFF && next === 0xDA) {\n break;\n }\n\n // SOI (Start of Image)\n if (value === 0xFF && next === 0xD8) {\n start += 2;\n } else {\n var offset = array[start + 2] * 256 + array[start + 3];\n var end = start + offset + 2;\n var segment = array.slice(start, end);\n segments.push(segment);\n start = end;\n }\n }\n return segments.reduce(function (exifArray, current) {\n if (current[0] === 0xFF && current[1] === 0xE1) {\n return exifArray.concat(current);\n }\n return exifArray;\n }, []);\n}\n\n/**\n * Insert Exif information into the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {Array} exifArray - The Exif information to insert.\n * @returns {ArrayBuffer} The transformed array buffer.\n */\nfunction insertExif(arrayBuffer, exifArray) {\n var array = toArray(new Uint8Array(arrayBuffer));\n if (array[2] !== 0xFF || array[3] !== 0xE0) {\n return arrayBuffer;\n }\n var app0Length = array[4] * 256 + array[5];\n var newArrayBuffer = [0xFF, 0xD8].concat(exifArray, array.slice(4 + app0Length));\n return new Uint8Array(newArrayBuffer);\n}\n\nvar ArrayBuffer$1 = WINDOW.ArrayBuffer,\n FileReader = WINDOW.FileReader;\nvar URL = WINDOW.URL || WINDOW.webkitURL;\nvar REGEXP_EXTENSION = /\\.\\w+$/;\nvar AnotherCompressor = WINDOW.Compressor;\n\n/**\n * Creates a new image compressor.\n * @class\n */\nvar Compressor = /*#__PURE__*/function () {\n /**\n * The constructor of Compressor.\n * @param {File|Blob} file - The target image file for compressing.\n * @param {Object} [options] - The options for compressing.\n */\n function Compressor(file, options) {\n _classCallCheck(this, Compressor);\n this.file = file;\n this.exif = [];\n this.image = new Image();\n this.options = _objectSpread2(_objectSpread2({}, DEFAULTS), options);\n this.aborted = false;\n this.result = null;\n this.init();\n }\n _createClass(Compressor, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n var file = this.file,\n options = this.options;\n if (!isBlob(file)) {\n this.fail(new Error('The first argument must be a File or Blob object.'));\n return;\n }\n var mimeType = file.type;\n if (!isImageType(mimeType)) {\n this.fail(new Error('The first argument must be an image File or Blob object.'));\n return;\n }\n if (!URL || !FileReader) {\n this.fail(new Error('The current browser does not support image compression.'));\n return;\n }\n if (!ArrayBuffer$1) {\n options.checkOrientation = false;\n options.retainExif = false;\n }\n var isJPEGImage = mimeType === 'image/jpeg';\n var checkOrientation = isJPEGImage && options.checkOrientation;\n var retainExif = isJPEGImage && options.retainExif;\n if (URL && !checkOrientation && !retainExif) {\n this.load({\n url: URL.createObjectURL(file)\n });\n } else {\n var reader = new FileReader();\n this.reader = reader;\n reader.onload = function (_ref) {\n var target = _ref.target;\n var result = target.result;\n var data = {};\n var orientation = 1;\n if (checkOrientation) {\n // Reset the orientation value to its default value 1\n // as some iOS browsers will render image with its orientation\n orientation = resetAndGetOrientation(result);\n if (orientation > 1) {\n _extends(data, parseOrientation(orientation));\n }\n }\n if (retainExif) {\n _this.exif = getExif(result);\n }\n if (checkOrientation || retainExif) {\n if (!URL\n\n // Generate a new URL with the default orientation value 1.\n || orientation > 1) {\n data.url = arrayBufferToDataURL(result, mimeType);\n } else {\n data.url = URL.createObjectURL(file);\n }\n } else {\n data.url = result;\n }\n _this.load(data);\n };\n reader.onabort = function () {\n _this.fail(new Error('Aborted to read the image with FileReader.'));\n };\n reader.onerror = function () {\n _this.fail(new Error('Failed to read the image with FileReader.'));\n };\n reader.onloadend = function () {\n _this.reader = null;\n };\n if (checkOrientation || retainExif) {\n reader.readAsArrayBuffer(file);\n } else {\n reader.readAsDataURL(file);\n }\n }\n }\n }, {\n key: \"load\",\n value: function load(data) {\n var _this2 = this;\n var file = this.file,\n image = this.image;\n image.onload = function () {\n _this2.draw(_objectSpread2(_objectSpread2({}, data), {}, {\n naturalWidth: image.naturalWidth,\n naturalHeight: image.naturalHeight\n }));\n };\n image.onabort = function () {\n _this2.fail(new Error('Aborted to load the image.'));\n };\n image.onerror = function () {\n _this2.fail(new Error('Failed to load the image.'));\n };\n\n // Match all browsers that use WebKit as the layout engine in iOS devices,\n // such as Safari for iOS, Chrome for iOS, and in-app browsers.\n if (WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent)) {\n // Fix the `The operation is insecure` error (#57)\n image.crossOrigin = 'anonymous';\n }\n image.alt = file.name;\n image.src = data.url;\n }\n }, {\n key: \"draw\",\n value: function draw(_ref2) {\n var _this3 = this;\n var naturalWidth = _ref2.naturalWidth,\n naturalHeight = _ref2.naturalHeight,\n _ref2$rotate = _ref2.rotate,\n rotate = _ref2$rotate === void 0 ? 0 : _ref2$rotate,\n _ref2$scaleX = _ref2.scaleX,\n scaleX = _ref2$scaleX === void 0 ? 1 : _ref2$scaleX,\n _ref2$scaleY = _ref2.scaleY,\n scaleY = _ref2$scaleY === void 0 ? 1 : _ref2$scaleY;\n var file = this.file,\n image = this.image,\n options = this.options;\n var canvas = document.createElement('canvas');\n var context = canvas.getContext('2d');\n var is90DegreesRotated = Math.abs(rotate) % 180 === 90;\n var resizable = (options.resize === 'contain' || options.resize === 'cover') && isPositiveNumber(options.width) && isPositiveNumber(options.height);\n var maxWidth = Math.max(options.maxWidth, 0) || Infinity;\n var maxHeight = Math.max(options.maxHeight, 0) || Infinity;\n var minWidth = Math.max(options.minWidth, 0) || 0;\n var minHeight = Math.max(options.minHeight, 0) || 0;\n var aspectRatio = naturalWidth / naturalHeight;\n var width = options.width,\n height = options.height;\n if (is90DegreesRotated) {\n var _ref3 = [maxHeight, maxWidth];\n maxWidth = _ref3[0];\n maxHeight = _ref3[1];\n var _ref4 = [minHeight, minWidth];\n minWidth = _ref4[0];\n minHeight = _ref4[1];\n var _ref5 = [height, width];\n width = _ref5[0];\n height = _ref5[1];\n }\n if (resizable) {\n aspectRatio = width / height;\n }\n var _getAdjustedSizes = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: maxWidth,\n height: maxHeight\n }, 'contain');\n maxWidth = _getAdjustedSizes.width;\n maxHeight = _getAdjustedSizes.height;\n var _getAdjustedSizes2 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: minWidth,\n height: minHeight\n }, 'cover');\n minWidth = _getAdjustedSizes2.width;\n minHeight = _getAdjustedSizes2.height;\n if (resizable) {\n var _getAdjustedSizes3 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: width,\n height: height\n }, options.resize);\n width = _getAdjustedSizes3.width;\n height = _getAdjustedSizes3.height;\n } else {\n var _getAdjustedSizes4 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: width,\n height: height\n });\n var _getAdjustedSizes4$wi = _getAdjustedSizes4.width;\n width = _getAdjustedSizes4$wi === void 0 ? naturalWidth : _getAdjustedSizes4$wi;\n var _getAdjustedSizes4$he = _getAdjustedSizes4.height;\n height = _getAdjustedSizes4$he === void 0 ? naturalHeight : _getAdjustedSizes4$he;\n }\n width = Math.floor(normalizeDecimalNumber(Math.min(Math.max(width, minWidth), maxWidth)));\n height = Math.floor(normalizeDecimalNumber(Math.min(Math.max(height, minHeight), maxHeight)));\n var destX = -width / 2;\n var destY = -height / 2;\n var destWidth = width;\n var destHeight = height;\n var params = [];\n if (resizable) {\n var srcX = 0;\n var srcY = 0;\n var srcWidth = naturalWidth;\n var srcHeight = naturalHeight;\n var _getAdjustedSizes5 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: naturalWidth,\n height: naturalHeight\n }, {\n contain: 'cover',\n cover: 'contain'\n }[options.resize]);\n srcWidth = _getAdjustedSizes5.width;\n srcHeight = _getAdjustedSizes5.height;\n srcX = (naturalWidth - srcWidth) / 2;\n srcY = (naturalHeight - srcHeight) / 2;\n params.push(srcX, srcY, srcWidth, srcHeight);\n }\n params.push(destX, destY, destWidth, destHeight);\n if (is90DegreesRotated) {\n var _ref6 = [height, width];\n width = _ref6[0];\n height = _ref6[1];\n }\n canvas.width = width;\n canvas.height = height;\n if (!isImageType(options.mimeType)) {\n options.mimeType = file.type;\n }\n var fillStyle = 'transparent';\n\n // Converts PNG files over the `convertSize` to JPEGs.\n if (file.size > options.convertSize && options.convertTypes.indexOf(options.mimeType) >= 0) {\n options.mimeType = 'image/jpeg';\n }\n var isJPEGImage = options.mimeType === 'image/jpeg';\n if (isJPEGImage) {\n fillStyle = '#fff';\n }\n\n // Override the default fill color (#000, black)\n context.fillStyle = fillStyle;\n context.fillRect(0, 0, width, height);\n if (options.beforeDraw) {\n options.beforeDraw.call(this, context, canvas);\n }\n if (this.aborted) {\n return;\n }\n context.save();\n context.translate(width / 2, height / 2);\n context.rotate(rotate * Math.PI / 180);\n context.scale(scaleX, scaleY);\n context.drawImage.apply(context, [image].concat(params));\n context.restore();\n if (options.drew) {\n options.drew.call(this, context, canvas);\n }\n if (this.aborted) {\n return;\n }\n var callback = function callback(blob) {\n if (!_this3.aborted) {\n var done = function done(result) {\n return _this3.done({\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n result: result\n });\n };\n if (blob && isJPEGImage && options.retainExif && _this3.exif && _this3.exif.length > 0) {\n var next = function next(arrayBuffer) {\n return done(toBlob(arrayBufferToDataURL(insertExif(arrayBuffer, _this3.exif), options.mimeType)));\n };\n if (blob.arrayBuffer) {\n blob.arrayBuffer().then(next).catch(function () {\n _this3.fail(new Error('Failed to read the compressed image with Blob.arrayBuffer().'));\n });\n } else {\n var reader = new FileReader();\n _this3.reader = reader;\n reader.onload = function (_ref7) {\n var target = _ref7.target;\n next(target.result);\n };\n reader.onabort = function () {\n _this3.fail(new Error('Aborted to read the compressed image with FileReader.'));\n };\n reader.onerror = function () {\n _this3.fail(new Error('Failed to read the compressed image with FileReader.'));\n };\n reader.onloadend = function () {\n _this3.reader = null;\n };\n reader.readAsArrayBuffer(blob);\n }\n } else {\n done(blob);\n }\n }\n };\n if (canvas.toBlob) {\n canvas.toBlob(callback, options.mimeType, options.quality);\n } else {\n callback(toBlob(canvas.toDataURL(options.mimeType, options.quality)));\n }\n }\n }, {\n key: \"done\",\n value: function done(_ref8) {\n var naturalWidth = _ref8.naturalWidth,\n naturalHeight = _ref8.naturalHeight,\n result = _ref8.result;\n var file = this.file,\n image = this.image,\n options = this.options;\n if (URL && image.src.indexOf('blob:') === 0) {\n URL.revokeObjectURL(image.src);\n }\n if (result) {\n // Returns original file if the result is greater than it and without size related options\n if (options.strict && !options.retainExif && result.size > file.size && options.mimeType === file.type && !(options.width > naturalWidth || options.height > naturalHeight || options.minWidth > naturalWidth || options.minHeight > naturalHeight || options.maxWidth < naturalWidth || options.maxHeight < naturalHeight)) {\n result = file;\n } else {\n var date = new Date();\n result.lastModified = date.getTime();\n result.lastModifiedDate = date;\n result.name = file.name;\n\n // Convert the extension to match its type\n if (result.name && result.type !== file.type) {\n result.name = result.name.replace(REGEXP_EXTENSION, imageTypeToExtension(result.type));\n }\n }\n } else {\n // Returns original file if the result is null in some cases.\n result = file;\n }\n this.result = result;\n if (options.success) {\n options.success.call(this, result);\n }\n }\n }, {\n key: \"fail\",\n value: function fail(err) {\n var options = this.options;\n if (options.error) {\n options.error.call(this, err);\n } else {\n throw err;\n }\n }\n }, {\n key: \"abort\",\n value: function abort() {\n if (!this.aborted) {\n this.aborted = true;\n if (this.reader) {\n this.reader.abort();\n } else if (!this.image.complete) {\n this.image.onload = null;\n this.image.onabort();\n } else {\n this.fail(new Error('The compression process has been aborted.'));\n }\n }\n }\n\n /**\n * Get the no conflict compressor class.\n * @returns {Compressor} The compressor class.\n */\n }], [{\n key: \"noConflict\",\n value: function noConflict() {\n window.Compressor = AnotherCompressor;\n return Compressor;\n }\n\n /**\n * Change the default options.\n * @param {Object} options - The new default options.\n */\n }, {\n key: \"setDefaults\",\n value: function setDefaults(options) {\n _extends(DEFAULTS, options);\n }\n }]);\n return Compressor;\n}();\n\nexport { Compressor as default };\n","import { saveAs } from 'file-saver';\nimport JSZip from 'jszip';\nimport pLimit from 'p-limit';\nimport { uploadPoliciesAssets } from './github';\nimport { delay } from './others';\nimport {\n githubJpgStorage,\n githubZipStorage,\n screenshotStorage,\n urlStorage,\n} from './storage';\nimport Compressor from 'compressorjs';\nimport type { Snapshot } from './types';\n\nexport const snapshotAsZip = async (snapshot: Snapshot) => {\n const zip = new JSZip();\n zip\n .file(`snapshot.json`, JSON.stringify(snapshot))\n .file(`screenshot.png`, (await screenshotStorage.getItem(snapshot.id))!);\n const content = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n return content;\n};\n\nexport const exportSnapshotAsZip = async (snapshot: Snapshot) => {\n const fileName = `snapshot-${snapshot.id}.zip`;\n saveAs(await snapshotAsZip(snapshot), fileName);\n};\n\nexport const snapshotAsJpg = async (snapshot: Snapshot) => {\n const imgBf = (await screenshotStorage.getItem(snapshot.id))!;\n const jpgBlob = await new Promise((res, rej) => {\n new Compressor(new Blob([imgBf], { type: 'image/png' }), {\n quality: 0.75,\n convertSize: 200_000,\n success(file) {\n res(file);\n },\n error(error) {\n rej(error);\n },\n });\n });\n const content = new Blob([jpgBlob], { type: 'image/jpeg' });\n return content;\n};\n\nexport const exportSnapshotAsJpg = async (snapshot: Snapshot) => {\n const fileName = `snapshot-${snapshot.id}.jpg`;\n saveAs(await snapshotAsJpg(snapshot), fileName);\n};\n\nexport const batchJpgDownloadZip = async (snapshots: Snapshot[]) => {\n const zip = new JSZip();\n for (const snapshot of snapshots) {\n await delay();\n zip.file(snapshot.id + `.jpg`, snapshotAsJpg(snapshot));\n }\n const batchZipFile = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n saveAs(batchZipFile, `batch-png-${snapshots.length}.zip`);\n};\n\nexport const batchZipDownloadZip = async (snapshots: Snapshot[]) => {\n const zip = new JSZip();\n for (const snapshot of snapshots) {\n await delay();\n zip.file(snapshot.id + `.zip`, await snapshotAsZip(snapshot));\n }\n const batchZipFile = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n saveAs(batchZipFile, `batch-zip-${snapshots.length}.zip`);\n};\n\nexport const exportSnapshotAsJpgUrl = async (snapshot: Snapshot) => {\n return (\n githubJpgStorage[snapshot.id] ??\n uploadPoliciesAssets(\n await snapshotAsJpg(snapshot).then((r) => r.arrayBuffer()),\n 'file.jpg',\n 'image/jpeg',\n ).then((r) => {\n // urlStorage[r.href] = snapshot.id;\n githubJpgStorage[snapshot.id] = r.href;\n return r.href;\n })\n );\n};\n\nexport const exportSnapshotAsZipUrl = async (snapshot: Snapshot) => {\n return (\n githubZipStorage[snapshot.id] ??\n uploadPoliciesAssets(\n await snapshotAsZip(snapshot).then((r) => r.arrayBuffer()),\n 'file.zip',\n 'application/x-zip-compressed',\n ).then((r) => {\n githubZipStorage[snapshot.id] = r.href;\n urlStorage[r.href] = snapshot.id;\n return r.href;\n })\n );\n};\n\nexport const batchCreateJpgUrl = async (snapshots: Snapshot[]) => {\n const limit = pLimit(3);\n return (\n await Promise.allSettled(\n snapshots.map((s) => limit(() => exportSnapshotAsJpgUrl(s))),\n )\n ).reduce((p, c) => {\n if (c.status == 'fulfilled') {\n p.push(c.value);\n }\n return p;\n }, []);\n};\nexport const batchCreateZipUrl = async (snapshots: Snapshot[]) => {\n const limit = pLimit(3);\n return (\n await Promise.allSettled(\n snapshots.map((s) => limit(() => exportSnapshotAsZipUrl(s))),\n )\n ).reduce((p, c) => {\n if (c.status == 'fulfilled') {\n p.push(c.value);\n }\n return p;\n }, []);\n};\n","\n\n"],"names":["showTextDLg","title","content","dialog","success","style","width","_createVNode","NInput","minRows","maxRows","class","positiveText","onPositiveClick","navigator","clipboard","writeText","then","message","catch","a","b","this","c","d","g","e","f","global","h","i","j","k","l","m","module","authenticityTokenPageUrl","repository_id","commonHeaders","getCsrfToken","csrfSelector","resp","enhanceFetch","_a","uploadPoliciesAssets","bf","name","content_type","uploadPoliciesAssetsByExtension","authenticity_token","store","policiesResp","obj2form","r","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","source","key","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","obj","value","_extends","_toPrimitive","input","hint","prim","res","arg","canvasToBlob","window","CanvasPrototype","hasBlobConstructor","hasArrayBufferViewSupport","BlobBuilder","dataURIPattern","dataURLtoBlob","dataURI","matches","mediaType","isBase64","dataString","byteString","arrayBuffer","intArray","bb","callback","type","quality","self","toBlob","isBlob","DEFAULTS","IS_BROWSER","WINDOW","isPositiveNumber","slice","toArray","REGEXP_IMAGE_TYPE","isImageType","imageTypeToExtension","extension","fromCharCode","getStringFromCharCode","dataView","start","length","str","btoa","arrayBufferToDataURL","mimeType","chunks","chunkSize","uint8","resetAndGetOrientation","orientation","littleEndian","app1Start","ifdStart","offset","exifIDCode","tiffOffset","endianness","firstIFDOffset","_length","_offset","parseOrientation","rotate","scaleX","scaleY","REGEXP_DECIMALS","normalizeDecimalNumber","times","getAdjustedSizes","_ref","aspectRatio","height","isValidWidth","isValidHeight","adjustedWidth","getExif","array","segments","next","end","segment","exifArray","current","insertExif","app0Length","newArrayBuffer","ArrayBuffer$1","FileReader","URL","REGEXP_EXTENSION","AnotherCompressor","Compressor","file","options","_this","isJPEGImage","checkOrientation","retainExif","reader","result","data","_this2","image","_ref2","_this3","naturalWidth","naturalHeight","_ref2$rotate","_ref2$scaleX","_ref2$scaleY","canvas","context","is90DegreesRotated","resizable","maxWidth","maxHeight","minWidth","minHeight","_ref3","_ref4","_ref5","_getAdjustedSizes","_getAdjustedSizes2","_getAdjustedSizes3","_getAdjustedSizes4","_getAdjustedSizes4$wi","_getAdjustedSizes4$he","destX","destY","destWidth","destHeight","params","srcX","srcY","srcWidth","srcHeight","_getAdjustedSizes5","_ref6","fillStyle","blob","done","_ref7","_ref8","date","err","snapshotAsZip","snapshot","zip","JSZip","screenshotStorage","exportSnapshotAsZip","fileName","saveAs","snapshotAsJpg","imgBf","jpgBlob","rej","error","exportSnapshotAsJpg","batchJpgDownloadZip","snapshots","delay","batchZipFile","batchZipDownloadZip","exportSnapshotAsJpgUrl","githubJpgStorage","exportSnapshotAsZipUrl","githubZipStorage","urlStorage","batchCreateJpgUrl","limit","pLimit","s","p","batchCreateZipUrl","__props","router","useRouter","exportJpg","useTask","snapshotStorage","getItem","id","exportZip","previewUrl","computed","resolve","snapshotId","href","exportJpgUrl","pngUrl","githubUrlToSelfUrl","exportZipUrl","zipUrl","deleteSnapshot","removeItem","onDelete","copy"],"mappings":"4XAGO,MAAMA,GAAcA,CAAC,CAAEC,MAAAA,EAAS,SAASC,QAAAA,EAAU,EAAG,IAAM,CACjEC,GAAOC,QAAQ,CACbH,MAAAA,EACAI,MAAO,CACLC,MAAQ,OACT,EACDJ,SAAU,CACR,OAAAK,EAAAC,GAAA,CAAA,KAAA,WAAA,SAGc,CACRC,QAAS,EACTC,QAAS,EACV,EAAA,WACW,CACVL,MAAQ,uBACRM,MAAQ,UACT,EAAA,MACMT,CAAO,EAAA,IAAA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,CAAM,CAC5C,CAAC,CACH,CAAC,EAEKE,EAAeb,EAAQ,SAAY,CACvC,MAAMc,EAAS,MAAM3B,GAClB,MAAMc,EAAgBC,QAAQhM,EAAM6J,SAASoC,EAAE,CAClD,EACAtQ,GAAY,CACVC,MAAQ,OACRC,QAAS6Q,EAAmBf,EAAQiB,CAAM,CAC5C,CAAC,CACH,CAAC,EAEKC,EAAiB,SAAY,CACjC,MAAMd,EAAgBe,WAAW9M,EAAM6J,SAASoC,EAAE,EAClD,MAAMrB,GAAM,GAAG,EACf5K,EAAM+M,SAAQ,GAGVC,EAAO,MAAOnR,GACXY,UAAUC,UACdC,UAAUd,CAAO,EACjBe,KAAK,IAAM,CACVC,EAAQd,QAAS,MAAK,CACxB,CAAC,EACAe,MAAM,IAAM,CACXD,EAAQd,QAAS,MAAK,CACxB,CAAC","x_google_ignoreList":[1,3]} \ No newline at end of file +{"version":3,"file":"ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js","sources":["../../src/utils/dialog.tsx","../../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js","../../src/utils/github.ts","../../node_modules/.pnpm/compressorjs@1.2.1/node_modules/compressorjs/dist/compressor.esm.js","../../src/utils/export.ts","../../src/components/ActionCard.vue"],"sourcesContent":["import { NInput } from 'naive-ui';\nimport { dialog, message } from './discrete';\n\nexport const showTextDLg = ({ title = `批量分享链接`, content = '' }) => {\n dialog.success({\n title,\n style: {\n width: `800px`,\n },\n content() {\n return (\n \n );\n },\n positiveText: `复制`,\n onPositiveClick() {\n navigator.clipboard\n .writeText(content)\n .then(() => {\n message.success(`复制成功`);\n })\n .catch(() => {\n message.success(`复制失败`);\n });\n return false;\n },\n });\n};\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map","import { enhanceFetch } from './fetch';\nimport { obj2form } from './others';\nimport store from './store';\n\nconst authenticityTokenPageUrl = `https://github.com/gkd-kit/inspect/issues/new`;\nconst repository_id = `661952005`;\nconst commonHeaders = {\n origin: `https://github.com`,\n referer: authenticityTokenPageUrl,\n};\n\nconst getCsrfToken = async () => {\n const csrfSelector = `[data-upload-policy-url=\"/upload/policies/assets\"] input.js-data-upload-policy-url-csrf`;\n const resp = await enhanceFetch(authenticityTokenPageUrl);\n const responseDoc = new DOMParser().parseFromString(\n await resp.text(),\n 'text/html',\n );\n const csrfToken = responseDoc\n .querySelector(csrfSelector)\n ?.getAttribute(`value`);\n return csrfToken;\n};\n\ntype S3Form = {\n key: string;\n acl: string;\n policy: string;\n 'X-Amz-Algorithm': string;\n 'X-Amz-Credential': string;\n 'X-Amz-Date': string;\n 'X-Amz-Signature': string;\n 'Content-Type': string;\n 'Cache-Control': string;\n 'x-amz-meta-Surrogate-Control': string;\n};\nexport type GithubPoliciesAsset = {\n id: number;\n name: string;\n size: number;\n content_type: string;\n original_name: string;\n href: string;\n};\n\ntype UploadPoliciesAssetsRsonpse = {\n upload_url: string;\n header: object;\n asset: GithubPoliciesAsset;\n form: S3Form;\n same_origin: boolean;\n asset_upload_url: string;\n upload_authenticity_token: string;\n asset_upload_authenticity_token: string;\n};\n\nexport const uploadPoliciesAssets = async (\n bf: ArrayBuffer,\n name: string,\n content_type: string,\n): Promise => {\n return uploadPoliciesAssetsByExtension(bf, name, content_type);\n};\n\nexport const uploadPoliciesAssetsByExtension = async (\n bf: ArrayBuffer,\n name: string,\n content_type: string,\n) => {\n const authenticity_token = await getCsrfToken();\n if (!authenticity_token) {\n store.githubErrorDlgVisible = true;\n throw new Error(`failed get csrfToken`);\n }\n\n const policiesResp: UploadPoliciesAssetsRsonpse = await enhanceFetch(\n `https://github.com/upload/policies/assets`,\n {\n method: `POST`,\n body: obj2form({\n authenticity_token,\n content_type,\n name,\n size: bf.byteLength,\n repository_id,\n }),\n headers: commonHeaders,\n },\n ).then((r) => {\n if (!r.ok) {\n throw new Error(`failed upload policies assets`);\n }\n return r.json();\n });\n\n // violentmonkey success\n // tampermonkey failed https://github.com/Tampermonkey/tampermonkey/issues/1783\n // use fetch is also work, but console.error cors and can not get response\n const s3Resp = await enhanceFetch(policiesResp.upload_url, {\n method: `POST`,\n body: obj2form(policiesResp.form, {\n file: new File([bf], name, { type: content_type }),\n }),\n headers: commonHeaders,\n });\n if (!s3Resp.ok) {\n throw new Error(`upload s3 failed`);\n }\n\n const assetsResp = await enhanceFetch(\n new URL(policiesResp.asset_upload_url, `https://github.com/`).href,\n {\n method: `PUT`,\n body: obj2form({\n authenticity_token: policiesResp.asset_upload_authenticity_token,\n }),\n headers: {\n ...commonHeaders,\n // api must add `Accept` request headers\n Accept: `application/json`,\n },\n },\n );\n\n if (assetsResp.status != 200) {\n throw new Error(`failed check authenticity upload`);\n }\n\n return policiesResp.asset;\n};\n","/*!\n * Compressor.js v1.2.1\n * https://fengyuanchen.github.io/compressorjs\n *\n * Copyright 2018-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2023-02-28T14:09:41.732Z\n */\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar canvasToBlob = {exports: {}};\n\n/*\n * JavaScript Canvas to Blob\n * https://github.com/blueimp/JavaScript-Canvas-to-Blob\n *\n * Copyright 2012, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on stackoverflow user Stoive's code snippet:\n * http://stackoverflow.com/q/4998908\n */\n(function (module) {\n if (typeof window === 'undefined') {\n return;\n }\n (function (window) {\n\n var CanvasPrototype = window.HTMLCanvasElement && window.HTMLCanvasElement.prototype;\n var hasBlobConstructor = window.Blob && function () {\n try {\n return Boolean(new Blob());\n } catch (e) {\n return false;\n }\n }();\n var hasArrayBufferViewSupport = hasBlobConstructor && window.Uint8Array && function () {\n try {\n return new Blob([new Uint8Array(100)]).size === 100;\n } catch (e) {\n return false;\n }\n }();\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n var dataURIPattern = /^data:((.*?)(;charset=.*?)?)(;base64)?,/;\n var dataURLtoBlob = (hasBlobConstructor || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array && function (dataURI) {\n var matches, mediaType, isBase64, dataString, byteString, arrayBuffer, intArray, i, bb;\n // Parse the dataURI components as per RFC 2397\n matches = dataURI.match(dataURIPattern);\n if (!matches) {\n throw new Error('invalid data URI');\n }\n // Default to text/plain;charset=US-ASCII\n mediaType = matches[2] ? matches[1] : 'text/plain' + (matches[3] || ';charset=US-ASCII');\n isBase64 = !!matches[4];\n dataString = dataURI.slice(matches[0].length);\n if (isBase64) {\n // Convert base64 to raw binary data held in a string:\n byteString = atob(dataString);\n } else {\n // Convert base64/URLEncoded data component to raw binary:\n byteString = decodeURIComponent(dataString);\n }\n // Write the bytes of the string to an ArrayBuffer:\n arrayBuffer = new ArrayBuffer(byteString.length);\n intArray = new Uint8Array(arrayBuffer);\n for (i = 0; i < byteString.length; i += 1) {\n intArray[i] = byteString.charCodeAt(i);\n }\n // Write the ArrayBuffer (or ArrayBufferView) to a blob:\n if (hasBlobConstructor) {\n return new Blob([hasArrayBufferViewSupport ? intArray : arrayBuffer], {\n type: mediaType\n });\n }\n bb = new BlobBuilder();\n bb.append(arrayBuffer);\n return bb.getBlob(mediaType);\n };\n if (window.HTMLCanvasElement && !CanvasPrototype.toBlob) {\n if (CanvasPrototype.mozGetAsFile) {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n if (quality && CanvasPrototype.toDataURL && dataURLtoBlob) {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n } else {\n callback(self.mozGetAsFile('blob', type));\n }\n });\n };\n } else if (CanvasPrototype.toDataURL && dataURLtoBlob) {\n if (CanvasPrototype.msToBlob) {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n if ((type && type !== 'image/png' || quality) && CanvasPrototype.toDataURL && dataURLtoBlob) {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n } else {\n callback(self.msToBlob(type));\n }\n });\n };\n } else {\n CanvasPrototype.toBlob = function (callback, type, quality) {\n var self = this;\n setTimeout(function () {\n callback(dataURLtoBlob(self.toDataURL(type, quality)));\n });\n };\n }\n }\n }\n if (module.exports) {\n module.exports = dataURLtoBlob;\n } else {\n window.dataURLtoBlob = dataURLtoBlob;\n }\n })(window);\n})(canvasToBlob);\nvar toBlob = canvasToBlob.exports;\n\nvar isBlob = function isBlob(value) {\n if (typeof Blob === 'undefined') {\n return false;\n }\n return value instanceof Blob || Object.prototype.toString.call(value) === '[object Blob]';\n};\n\nvar DEFAULTS = {\n /**\n * Indicates if output the original image instead of the compressed one\n * when the size of the compressed image is greater than the original one's\n * @type {boolean}\n */\n strict: true,\n /**\n * Indicates if read the image's Exif Orientation information,\n * and then rotate or flip the image automatically.\n * @type {boolean}\n */\n checkOrientation: true,\n /**\n * Indicates if retain the image's Exif information after compressed.\n * @type {boolean}\n */\n retainExif: false,\n /**\n * The max width of the output image.\n * @type {number}\n */\n maxWidth: Infinity,\n /**\n * The max height of the output image.\n * @type {number}\n */\n maxHeight: Infinity,\n /**\n * The min width of the output image.\n * @type {number}\n */\n minWidth: 0,\n /**\n * The min height of the output image.\n * @type {number}\n */\n minHeight: 0,\n /**\n * The width of the output image.\n * If not specified, the natural width of the source image will be used.\n * @type {number}\n */\n width: undefined,\n /**\n * The height of the output image.\n * If not specified, the natural height of the source image will be used.\n * @type {number}\n */\n height: undefined,\n /**\n * Sets how the size of the image should be resized to the container\n * specified by the `width` and `height` options.\n * @type {string}\n */\n resize: 'none',\n /**\n * The quality of the output image.\n * It must be a number between `0` and `1`,\n * and only available for `image/jpeg` and `image/webp` images.\n * Check out {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob canvas.toBlob}.\n * @type {number}\n */\n quality: 0.8,\n /**\n * The mime type of the output image.\n * By default, the original mime type of the source image file will be used.\n * @type {string}\n */\n mimeType: 'auto',\n /**\n * Files whose file type is included in this list,\n * and whose file size exceeds the `convertSize` value will be converted to JPEGs.\n * @type {string|Array}\n */\n convertTypes: ['image/png'],\n /**\n * PNG files over this size (5 MB by default) will be converted to JPEGs.\n * To disable this, just set the value to `Infinity`.\n * @type {number}\n */\n convertSize: 5000000,\n /**\n * The hook function to execute before draw the image into the canvas for compression.\n * @type {Function}\n * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n * @param {HTMLCanvasElement} canvas - The canvas for compression.\n * @example\n * function (context, canvas) {\n * context.fillStyle = '#fff';\n * }\n */\n beforeDraw: null,\n /**\n * The hook function to execute after drew the image into the canvas for compression.\n * @type {Function}\n * @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.\n * @param {HTMLCanvasElement} canvas - The canvas for compression.\n * @example\n * function (context, canvas) {\n * context.filter = 'grayscale(100%)';\n * }\n */\n drew: null,\n /**\n * The hook function to execute when success to compress the image.\n * @type {Function}\n * @param {File} file - The compressed image File object.\n * @example\n * function (file) {\n * console.log(file);\n * }\n */\n success: null,\n /**\n * The hook function to execute when fail to compress the image.\n * @type {Function}\n * @param {Error} err - An Error object.\n * @example\n * function (err) {\n * console.log(err.message);\n * }\n */\n error: null\n};\n\nvar IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nvar WINDOW = IS_BROWSER ? window : {};\n\n/**\n * Check if the given value is a positive number.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given value is a positive number, else `false`.\n */\nvar isPositiveNumber = function isPositiveNumber(value) {\n return value > 0 && value < Infinity;\n};\nvar slice = Array.prototype.slice;\n\n/**\n * Convert array-like or iterable object to an array.\n * @param {*} value - The value to convert.\n * @returns {Array} Returns a new array.\n */\nfunction toArray(value) {\n return Array.from ? Array.from(value) : slice.call(value);\n}\nvar REGEXP_IMAGE_TYPE = /^image\\/.+$/;\n\n/**\n * Check if the given value is a mime type of image.\n * @param {*} value - The value to check.\n * @returns {boolean} Returns `true` if the given is a mime type of image, else `false`.\n */\nfunction isImageType(value) {\n return REGEXP_IMAGE_TYPE.test(value);\n}\n\n/**\n * Convert image type to extension.\n * @param {string} value - The image type to convert.\n * @returns {boolean} Returns the image extension.\n */\nfunction imageTypeToExtension(value) {\n var extension = isImageType(value) ? value.substr(6) : '';\n if (extension === 'jpeg') {\n extension = 'jpg';\n }\n return \".\".concat(extension);\n}\nvar fromCharCode = String.fromCharCode;\n\n/**\n * Get string from char code in data view.\n * @param {DataView} dataView - The data view for read.\n * @param {number} start - The start index.\n * @param {number} length - The read length.\n * @returns {string} The read result.\n */\nfunction getStringFromCharCode(dataView, start, length) {\n var str = '';\n var i;\n length += start;\n for (i = start; i < length; i += 1) {\n str += fromCharCode(dataView.getUint8(i));\n }\n return str;\n}\nvar btoa = WINDOW.btoa;\n\n/**\n * Transform array buffer to Data URL.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {string} mimeType - The mime type of the Data URL.\n * @returns {string} The result Data URL.\n */\nfunction arrayBufferToDataURL(arrayBuffer, mimeType) {\n var chunks = [];\n var chunkSize = 8192;\n var uint8 = new Uint8Array(arrayBuffer);\n while (uint8.length > 0) {\n // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9\n // eslint-disable-next-line prefer-spread\n chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))));\n uint8 = uint8.subarray(chunkSize);\n }\n return \"data:\".concat(mimeType, \";base64,\").concat(btoa(chunks.join('')));\n}\n\n/**\n * Get orientation value from given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {number} The read orientation value.\n */\nfunction resetAndGetOrientation(arrayBuffer) {\n var dataView = new DataView(arrayBuffer);\n var orientation;\n\n // Ignores range error when the image does not have correct Exif information\n try {\n var littleEndian;\n var app1Start;\n var ifdStart;\n\n // Only handle JPEG image (start by 0xFFD8)\n if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n var length = dataView.byteLength;\n var offset = 2;\n while (offset + 1 < length) {\n if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n app1Start = offset;\n break;\n }\n offset += 1;\n }\n }\n if (app1Start) {\n var exifIDCode = app1Start + 4;\n var tiffOffset = app1Start + 10;\n if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n var endianness = dataView.getUint16(tiffOffset);\n littleEndian = endianness === 0x4949;\n if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n if (firstIFDOffset >= 0x00000008) {\n ifdStart = tiffOffset + firstIFDOffset;\n }\n }\n }\n }\n }\n if (ifdStart) {\n var _length = dataView.getUint16(ifdStart, littleEndian);\n var _offset;\n var i;\n for (i = 0; i < _length; i += 1) {\n _offset = ifdStart + i * 12 + 2;\n if (dataView.getUint16(_offset, littleEndian) === 0x0112 /* Orientation */) {\n // 8 is the offset of the current tag's value\n _offset += 8;\n\n // Get the original orientation value\n orientation = dataView.getUint16(_offset, littleEndian);\n\n // Override the orientation with its default value\n dataView.setUint16(_offset, 1, littleEndian);\n break;\n }\n }\n }\n } catch (e) {\n orientation = 1;\n }\n return orientation;\n}\n\n/**\n * Parse Exif Orientation value.\n * @param {number} orientation - The orientation to parse.\n * @returns {Object} The parsed result.\n */\nfunction parseOrientation(orientation) {\n var rotate = 0;\n var scaleX = 1;\n var scaleY = 1;\n switch (orientation) {\n // Flip horizontal\n case 2:\n scaleX = -1;\n break;\n\n // Rotate left 180°\n case 3:\n rotate = -180;\n break;\n\n // Flip vertical\n case 4:\n scaleY = -1;\n break;\n\n // Flip vertical and rotate right 90°\n case 5:\n rotate = 90;\n scaleY = -1;\n break;\n\n // Rotate right 90°\n case 6:\n rotate = 90;\n break;\n\n // Flip horizontal and rotate right 90°\n case 7:\n rotate = 90;\n scaleX = -1;\n break;\n\n // Rotate left 90°\n case 8:\n rotate = -90;\n break;\n }\n return {\n rotate: rotate,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\nvar REGEXP_DECIMALS = /\\.\\d*(?:0|9){12}\\d*$/;\n\n/**\n * Normalize decimal number.\n * Check out {@link https://0.30000000000000004.com/}\n * @param {number} value - The value to normalize.\n * @param {number} [times=100000000000] - The times for normalizing.\n * @returns {number} Returns the normalized number.\n */\nfunction normalizeDecimalNumber(value) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000;\n return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value;\n}\n\n/**\n * Get the max sizes in a rectangle under the given aspect ratio.\n * @param {Object} data - The original sizes.\n * @param {string} [type='contain'] - The adjust type.\n * @returns {Object} The result sizes.\n */\nfunction getAdjustedSizes(_ref) {\n var aspectRatio = _ref.aspectRatio,\n height = _ref.height,\n width = _ref.width;\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none';\n var isValidWidth = isPositiveNumber(width);\n var isValidHeight = isPositiveNumber(height);\n if (isValidWidth && isValidHeight) {\n var adjustedWidth = height * aspectRatio;\n if ((type === 'contain' || type === 'none') && adjustedWidth > width || type === 'cover' && adjustedWidth < width) {\n height = width / aspectRatio;\n } else {\n width = height * aspectRatio;\n }\n } else if (isValidWidth) {\n height = width / aspectRatio;\n } else if (isValidHeight) {\n width = height * aspectRatio;\n }\n return {\n width: width,\n height: height\n };\n}\n\n/**\n * Get Exif information from the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n * @returns {Array} The read Exif information.\n */\nfunction getExif(arrayBuffer) {\n var array = toArray(new Uint8Array(arrayBuffer));\n var length = array.length;\n var segments = [];\n var start = 0;\n while (start + 3 < length) {\n var value = array[start];\n var next = array[start + 1];\n\n // SOS (Start of Scan)\n if (value === 0xFF && next === 0xDA) {\n break;\n }\n\n // SOI (Start of Image)\n if (value === 0xFF && next === 0xD8) {\n start += 2;\n } else {\n var offset = array[start + 2] * 256 + array[start + 3];\n var end = start + offset + 2;\n var segment = array.slice(start, end);\n segments.push(segment);\n start = end;\n }\n }\n return segments.reduce(function (exifArray, current) {\n if (current[0] === 0xFF && current[1] === 0xE1) {\n return exifArray.concat(current);\n }\n return exifArray;\n }, []);\n}\n\n/**\n * Insert Exif information into the given array buffer.\n * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n * @param {Array} exifArray - The Exif information to insert.\n * @returns {ArrayBuffer} The transformed array buffer.\n */\nfunction insertExif(arrayBuffer, exifArray) {\n var array = toArray(new Uint8Array(arrayBuffer));\n if (array[2] !== 0xFF || array[3] !== 0xE0) {\n return arrayBuffer;\n }\n var app0Length = array[4] * 256 + array[5];\n var newArrayBuffer = [0xFF, 0xD8].concat(exifArray, array.slice(4 + app0Length));\n return new Uint8Array(newArrayBuffer);\n}\n\nvar ArrayBuffer$1 = WINDOW.ArrayBuffer,\n FileReader = WINDOW.FileReader;\nvar URL = WINDOW.URL || WINDOW.webkitURL;\nvar REGEXP_EXTENSION = /\\.\\w+$/;\nvar AnotherCompressor = WINDOW.Compressor;\n\n/**\n * Creates a new image compressor.\n * @class\n */\nvar Compressor = /*#__PURE__*/function () {\n /**\n * The constructor of Compressor.\n * @param {File|Blob} file - The target image file for compressing.\n * @param {Object} [options] - The options for compressing.\n */\n function Compressor(file, options) {\n _classCallCheck(this, Compressor);\n this.file = file;\n this.exif = [];\n this.image = new Image();\n this.options = _objectSpread2(_objectSpread2({}, DEFAULTS), options);\n this.aborted = false;\n this.result = null;\n this.init();\n }\n _createClass(Compressor, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n var file = this.file,\n options = this.options;\n if (!isBlob(file)) {\n this.fail(new Error('The first argument must be a File or Blob object.'));\n return;\n }\n var mimeType = file.type;\n if (!isImageType(mimeType)) {\n this.fail(new Error('The first argument must be an image File or Blob object.'));\n return;\n }\n if (!URL || !FileReader) {\n this.fail(new Error('The current browser does not support image compression.'));\n return;\n }\n if (!ArrayBuffer$1) {\n options.checkOrientation = false;\n options.retainExif = false;\n }\n var isJPEGImage = mimeType === 'image/jpeg';\n var checkOrientation = isJPEGImage && options.checkOrientation;\n var retainExif = isJPEGImage && options.retainExif;\n if (URL && !checkOrientation && !retainExif) {\n this.load({\n url: URL.createObjectURL(file)\n });\n } else {\n var reader = new FileReader();\n this.reader = reader;\n reader.onload = function (_ref) {\n var target = _ref.target;\n var result = target.result;\n var data = {};\n var orientation = 1;\n if (checkOrientation) {\n // Reset the orientation value to its default value 1\n // as some iOS browsers will render image with its orientation\n orientation = resetAndGetOrientation(result);\n if (orientation > 1) {\n _extends(data, parseOrientation(orientation));\n }\n }\n if (retainExif) {\n _this.exif = getExif(result);\n }\n if (checkOrientation || retainExif) {\n if (!URL\n\n // Generate a new URL with the default orientation value 1.\n || orientation > 1) {\n data.url = arrayBufferToDataURL(result, mimeType);\n } else {\n data.url = URL.createObjectURL(file);\n }\n } else {\n data.url = result;\n }\n _this.load(data);\n };\n reader.onabort = function () {\n _this.fail(new Error('Aborted to read the image with FileReader.'));\n };\n reader.onerror = function () {\n _this.fail(new Error('Failed to read the image with FileReader.'));\n };\n reader.onloadend = function () {\n _this.reader = null;\n };\n if (checkOrientation || retainExif) {\n reader.readAsArrayBuffer(file);\n } else {\n reader.readAsDataURL(file);\n }\n }\n }\n }, {\n key: \"load\",\n value: function load(data) {\n var _this2 = this;\n var file = this.file,\n image = this.image;\n image.onload = function () {\n _this2.draw(_objectSpread2(_objectSpread2({}, data), {}, {\n naturalWidth: image.naturalWidth,\n naturalHeight: image.naturalHeight\n }));\n };\n image.onabort = function () {\n _this2.fail(new Error('Aborted to load the image.'));\n };\n image.onerror = function () {\n _this2.fail(new Error('Failed to load the image.'));\n };\n\n // Match all browsers that use WebKit as the layout engine in iOS devices,\n // such as Safari for iOS, Chrome for iOS, and in-app browsers.\n if (WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent)) {\n // Fix the `The operation is insecure` error (#57)\n image.crossOrigin = 'anonymous';\n }\n image.alt = file.name;\n image.src = data.url;\n }\n }, {\n key: \"draw\",\n value: function draw(_ref2) {\n var _this3 = this;\n var naturalWidth = _ref2.naturalWidth,\n naturalHeight = _ref2.naturalHeight,\n _ref2$rotate = _ref2.rotate,\n rotate = _ref2$rotate === void 0 ? 0 : _ref2$rotate,\n _ref2$scaleX = _ref2.scaleX,\n scaleX = _ref2$scaleX === void 0 ? 1 : _ref2$scaleX,\n _ref2$scaleY = _ref2.scaleY,\n scaleY = _ref2$scaleY === void 0 ? 1 : _ref2$scaleY;\n var file = this.file,\n image = this.image,\n options = this.options;\n var canvas = document.createElement('canvas');\n var context = canvas.getContext('2d');\n var is90DegreesRotated = Math.abs(rotate) % 180 === 90;\n var resizable = (options.resize === 'contain' || options.resize === 'cover') && isPositiveNumber(options.width) && isPositiveNumber(options.height);\n var maxWidth = Math.max(options.maxWidth, 0) || Infinity;\n var maxHeight = Math.max(options.maxHeight, 0) || Infinity;\n var minWidth = Math.max(options.minWidth, 0) || 0;\n var minHeight = Math.max(options.minHeight, 0) || 0;\n var aspectRatio = naturalWidth / naturalHeight;\n var width = options.width,\n height = options.height;\n if (is90DegreesRotated) {\n var _ref3 = [maxHeight, maxWidth];\n maxWidth = _ref3[0];\n maxHeight = _ref3[1];\n var _ref4 = [minHeight, minWidth];\n minWidth = _ref4[0];\n minHeight = _ref4[1];\n var _ref5 = [height, width];\n width = _ref5[0];\n height = _ref5[1];\n }\n if (resizable) {\n aspectRatio = width / height;\n }\n var _getAdjustedSizes = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: maxWidth,\n height: maxHeight\n }, 'contain');\n maxWidth = _getAdjustedSizes.width;\n maxHeight = _getAdjustedSizes.height;\n var _getAdjustedSizes2 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: minWidth,\n height: minHeight\n }, 'cover');\n minWidth = _getAdjustedSizes2.width;\n minHeight = _getAdjustedSizes2.height;\n if (resizable) {\n var _getAdjustedSizes3 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: width,\n height: height\n }, options.resize);\n width = _getAdjustedSizes3.width;\n height = _getAdjustedSizes3.height;\n } else {\n var _getAdjustedSizes4 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: width,\n height: height\n });\n var _getAdjustedSizes4$wi = _getAdjustedSizes4.width;\n width = _getAdjustedSizes4$wi === void 0 ? naturalWidth : _getAdjustedSizes4$wi;\n var _getAdjustedSizes4$he = _getAdjustedSizes4.height;\n height = _getAdjustedSizes4$he === void 0 ? naturalHeight : _getAdjustedSizes4$he;\n }\n width = Math.floor(normalizeDecimalNumber(Math.min(Math.max(width, minWidth), maxWidth)));\n height = Math.floor(normalizeDecimalNumber(Math.min(Math.max(height, minHeight), maxHeight)));\n var destX = -width / 2;\n var destY = -height / 2;\n var destWidth = width;\n var destHeight = height;\n var params = [];\n if (resizable) {\n var srcX = 0;\n var srcY = 0;\n var srcWidth = naturalWidth;\n var srcHeight = naturalHeight;\n var _getAdjustedSizes5 = getAdjustedSizes({\n aspectRatio: aspectRatio,\n width: naturalWidth,\n height: naturalHeight\n }, {\n contain: 'cover',\n cover: 'contain'\n }[options.resize]);\n srcWidth = _getAdjustedSizes5.width;\n srcHeight = _getAdjustedSizes5.height;\n srcX = (naturalWidth - srcWidth) / 2;\n srcY = (naturalHeight - srcHeight) / 2;\n params.push(srcX, srcY, srcWidth, srcHeight);\n }\n params.push(destX, destY, destWidth, destHeight);\n if (is90DegreesRotated) {\n var _ref6 = [height, width];\n width = _ref6[0];\n height = _ref6[1];\n }\n canvas.width = width;\n canvas.height = height;\n if (!isImageType(options.mimeType)) {\n options.mimeType = file.type;\n }\n var fillStyle = 'transparent';\n\n // Converts PNG files over the `convertSize` to JPEGs.\n if (file.size > options.convertSize && options.convertTypes.indexOf(options.mimeType) >= 0) {\n options.mimeType = 'image/jpeg';\n }\n var isJPEGImage = options.mimeType === 'image/jpeg';\n if (isJPEGImage) {\n fillStyle = '#fff';\n }\n\n // Override the default fill color (#000, black)\n context.fillStyle = fillStyle;\n context.fillRect(0, 0, width, height);\n if (options.beforeDraw) {\n options.beforeDraw.call(this, context, canvas);\n }\n if (this.aborted) {\n return;\n }\n context.save();\n context.translate(width / 2, height / 2);\n context.rotate(rotate * Math.PI / 180);\n context.scale(scaleX, scaleY);\n context.drawImage.apply(context, [image].concat(params));\n context.restore();\n if (options.drew) {\n options.drew.call(this, context, canvas);\n }\n if (this.aborted) {\n return;\n }\n var callback = function callback(blob) {\n if (!_this3.aborted) {\n var done = function done(result) {\n return _this3.done({\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight,\n result: result\n });\n };\n if (blob && isJPEGImage && options.retainExif && _this3.exif && _this3.exif.length > 0) {\n var next = function next(arrayBuffer) {\n return done(toBlob(arrayBufferToDataURL(insertExif(arrayBuffer, _this3.exif), options.mimeType)));\n };\n if (blob.arrayBuffer) {\n blob.arrayBuffer().then(next).catch(function () {\n _this3.fail(new Error('Failed to read the compressed image with Blob.arrayBuffer().'));\n });\n } else {\n var reader = new FileReader();\n _this3.reader = reader;\n reader.onload = function (_ref7) {\n var target = _ref7.target;\n next(target.result);\n };\n reader.onabort = function () {\n _this3.fail(new Error('Aborted to read the compressed image with FileReader.'));\n };\n reader.onerror = function () {\n _this3.fail(new Error('Failed to read the compressed image with FileReader.'));\n };\n reader.onloadend = function () {\n _this3.reader = null;\n };\n reader.readAsArrayBuffer(blob);\n }\n } else {\n done(blob);\n }\n }\n };\n if (canvas.toBlob) {\n canvas.toBlob(callback, options.mimeType, options.quality);\n } else {\n callback(toBlob(canvas.toDataURL(options.mimeType, options.quality)));\n }\n }\n }, {\n key: \"done\",\n value: function done(_ref8) {\n var naturalWidth = _ref8.naturalWidth,\n naturalHeight = _ref8.naturalHeight,\n result = _ref8.result;\n var file = this.file,\n image = this.image,\n options = this.options;\n if (URL && image.src.indexOf('blob:') === 0) {\n URL.revokeObjectURL(image.src);\n }\n if (result) {\n // Returns original file if the result is greater than it and without size related options\n if (options.strict && !options.retainExif && result.size > file.size && options.mimeType === file.type && !(options.width > naturalWidth || options.height > naturalHeight || options.minWidth > naturalWidth || options.minHeight > naturalHeight || options.maxWidth < naturalWidth || options.maxHeight < naturalHeight)) {\n result = file;\n } else {\n var date = new Date();\n result.lastModified = date.getTime();\n result.lastModifiedDate = date;\n result.name = file.name;\n\n // Convert the extension to match its type\n if (result.name && result.type !== file.type) {\n result.name = result.name.replace(REGEXP_EXTENSION, imageTypeToExtension(result.type));\n }\n }\n } else {\n // Returns original file if the result is null in some cases.\n result = file;\n }\n this.result = result;\n if (options.success) {\n options.success.call(this, result);\n }\n }\n }, {\n key: \"fail\",\n value: function fail(err) {\n var options = this.options;\n if (options.error) {\n options.error.call(this, err);\n } else {\n throw err;\n }\n }\n }, {\n key: \"abort\",\n value: function abort() {\n if (!this.aborted) {\n this.aborted = true;\n if (this.reader) {\n this.reader.abort();\n } else if (!this.image.complete) {\n this.image.onload = null;\n this.image.onabort();\n } else {\n this.fail(new Error('The compression process has been aborted.'));\n }\n }\n }\n\n /**\n * Get the no conflict compressor class.\n * @returns {Compressor} The compressor class.\n */\n }], [{\n key: \"noConflict\",\n value: function noConflict() {\n window.Compressor = AnotherCompressor;\n return Compressor;\n }\n\n /**\n * Change the default options.\n * @param {Object} options - The new default options.\n */\n }, {\n key: \"setDefaults\",\n value: function setDefaults(options) {\n _extends(DEFAULTS, options);\n }\n }]);\n return Compressor;\n}();\n\nexport { Compressor as default };\n","import { saveAs } from 'file-saver';\nimport JSZip from 'jszip';\nimport pLimit from 'p-limit';\nimport { uploadPoliciesAssets } from './github';\nimport { delay } from './others';\nimport {\n githubJpgStorage,\n githubZipStorage,\n screenshotStorage,\n urlStorage,\n} from './storage';\nimport Compressor from 'compressorjs';\nimport type { Snapshot } from './types';\n\nexport const snapshotAsZip = async (snapshot: Snapshot) => {\n const zip = new JSZip();\n zip\n .file(`snapshot.json`, JSON.stringify(snapshot))\n .file(`screenshot.png`, (await screenshotStorage.getItem(snapshot.id))!);\n const content = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n return content;\n};\n\nexport const exportSnapshotAsZip = async (snapshot: Snapshot) => {\n const fileName = `snapshot-${snapshot.id}.zip`;\n saveAs(await snapshotAsZip(snapshot), fileName);\n};\n\nexport const snapshotAsJpg = async (snapshot: Snapshot) => {\n const imgBf = (await screenshotStorage.getItem(snapshot.id))!;\n const jpgBlob = await new Promise((res, rej) => {\n new Compressor(new Blob([imgBf], { type: 'image/png' }), {\n quality: 0.75,\n convertSize: 200_000,\n success(file) {\n res(file);\n },\n error(error) {\n rej(error);\n },\n });\n });\n const content = new Blob([jpgBlob], { type: 'image/jpeg' });\n return content;\n};\n\nexport const exportSnapshotAsJpg = async (snapshot: Snapshot) => {\n const fileName = `snapshot-${snapshot.id}.jpg`;\n saveAs(await snapshotAsJpg(snapshot), fileName);\n};\n\nexport const batchJpgDownloadZip = async (snapshots: Snapshot[]) => {\n const zip = new JSZip();\n for (const snapshot of snapshots) {\n await delay();\n zip.file(snapshot.id + `.jpg`, snapshotAsJpg(snapshot));\n }\n const batchZipFile = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n saveAs(batchZipFile, `batch-png-${snapshots.length}.zip`);\n};\n\nexport const batchZipDownloadZip = async (snapshots: Snapshot[]) => {\n const zip = new JSZip();\n for (const snapshot of snapshots) {\n await delay();\n zip.file(snapshot.id + `.zip`, await snapshotAsZip(snapshot));\n }\n const batchZipFile = await zip.generateAsync({\n type: 'blob',\n compression: `STORE`,\n });\n saveAs(batchZipFile, `batch-zip-${snapshots.length}.zip`);\n};\n\nexport const exportSnapshotAsJpgUrl = async (snapshot: Snapshot) => {\n return (\n githubJpgStorage[snapshot.id] ??\n uploadPoliciesAssets(\n await snapshotAsJpg(snapshot).then((r) => r.arrayBuffer()),\n 'file.jpg',\n 'image/jpeg',\n ).then((r) => {\n // urlStorage[r.href] = snapshot.id;\n githubJpgStorage[snapshot.id] = r.href;\n return r.href;\n })\n );\n};\n\nexport const exportSnapshotAsZipUrl = async (snapshot: Snapshot) => {\n return (\n githubZipStorage[snapshot.id] ??\n uploadPoliciesAssets(\n await snapshotAsZip(snapshot).then((r) => r.arrayBuffer()),\n 'file.zip',\n 'application/x-zip-compressed',\n ).then((r) => {\n githubZipStorage[snapshot.id] = r.href;\n urlStorage[r.href] = snapshot.id;\n return r.href;\n })\n );\n};\n\nexport const batchCreateJpgUrl = async (snapshots: Snapshot[]) => {\n const limit = pLimit(3);\n return (\n await Promise.allSettled(\n snapshots.map((s) => limit(() => exportSnapshotAsJpgUrl(s))),\n )\n ).reduce((p, c) => {\n if (c.status == 'fulfilled') {\n p.push(c.value);\n }\n return p;\n }, []);\n};\nexport const batchCreateZipUrl = async (snapshots: Snapshot[]) => {\n const limit = pLimit(3);\n return (\n await Promise.allSettled(\n snapshots.map((s) => limit(() => exportSnapshotAsZipUrl(s))),\n )\n ).reduce((p, c) => {\n if (c.status == 'fulfilled') {\n p.push(c.value);\n }\n return p;\n }, []);\n};\n","\n\n"],"names":["showTextDLg","title","content","dialog","success","style","width","_createVNode","NInput","minRows","maxRows","class","positiveText","onPositiveClick","navigator","clipboard","writeText","then","message","catch","a","b","this","c","d","g","e","f","global","h","i","j","k","l","m","module","authenticityTokenPageUrl","repository_id","commonHeaders","getCsrfToken","csrfSelector","resp","enhanceFetch","_a","uploadPoliciesAssets","bf","name","content_type","uploadPoliciesAssetsByExtension","authenticity_token","store","policiesResp","obj2form","r","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread2","target","source","key","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","obj","value","_extends","_toPrimitive","input","hint","prim","res","arg","canvasToBlob","window","CanvasPrototype","hasBlobConstructor","hasArrayBufferViewSupport","BlobBuilder","dataURIPattern","dataURLtoBlob","dataURI","matches","mediaType","isBase64","dataString","byteString","arrayBuffer","intArray","bb","callback","type","quality","self","toBlob","isBlob","DEFAULTS","IS_BROWSER","WINDOW","isPositiveNumber","slice","toArray","REGEXP_IMAGE_TYPE","isImageType","imageTypeToExtension","extension","fromCharCode","getStringFromCharCode","dataView","start","length","str","btoa","arrayBufferToDataURL","mimeType","chunks","chunkSize","uint8","resetAndGetOrientation","orientation","littleEndian","app1Start","ifdStart","offset","exifIDCode","tiffOffset","endianness","firstIFDOffset","_length","_offset","parseOrientation","rotate","scaleX","scaleY","REGEXP_DECIMALS","normalizeDecimalNumber","times","getAdjustedSizes","_ref","aspectRatio","height","isValidWidth","isValidHeight","adjustedWidth","getExif","array","segments","next","end","segment","exifArray","current","insertExif","app0Length","newArrayBuffer","ArrayBuffer$1","FileReader","URL","REGEXP_EXTENSION","AnotherCompressor","Compressor","file","options","_this","isJPEGImage","checkOrientation","retainExif","reader","result","data","_this2","image","_ref2","_this3","naturalWidth","naturalHeight","_ref2$rotate","_ref2$scaleX","_ref2$scaleY","canvas","context","is90DegreesRotated","resizable","maxWidth","maxHeight","minWidth","minHeight","_ref3","_ref4","_ref5","_getAdjustedSizes","_getAdjustedSizes2","_getAdjustedSizes3","_getAdjustedSizes4","_getAdjustedSizes4$wi","_getAdjustedSizes4$he","destX","destY","destWidth","destHeight","params","srcX","srcY","srcWidth","srcHeight","_getAdjustedSizes5","_ref6","fillStyle","blob","done","_ref7","_ref8","date","err","snapshotAsZip","snapshot","zip","JSZip","screenshotStorage","exportSnapshotAsZip","fileName","saveAs","snapshotAsJpg","imgBf","jpgBlob","rej","error","exportSnapshotAsJpg","batchJpgDownloadZip","snapshots","delay","batchZipFile","batchZipDownloadZip","exportSnapshotAsJpgUrl","githubJpgStorage","exportSnapshotAsZipUrl","githubZipStorage","urlStorage","batchCreateJpgUrl","limit","pLimit","s","p","batchCreateZipUrl","__props","router","useRouter","exportJpg","useTask","snapshotStorage","getItem","id","exportZip","previewUrl","computed","resolve","snapshotId","href","exportJpgUrl","pngUrl","githubUrlToSelfUrl","exportZipUrl","zipUrl","deleteSnapshot","removeItem","onDelete","copy"],"mappings":"4XAGO,MAAMA,GAAcA,CAAC,CAAEC,MAAAA,EAAS,SAASC,QAAAA,EAAU,EAAG,IAAM,CACjEC,GAAOC,QAAQ,CACbH,MAAAA,EACAI,MAAO,CACLC,MAAQ,OACT,EACDJ,SAAU,CACR,OAAAK,EAAAC,GAAA,CAAA,KAAA,WAAA,SAGc,CACRC,QAAS,EACTC,QAAS,EACV,EAAA,WACW,CACVL,MAAQ,uBACRM,MAAQ,UACT,EAAA,MACMT,CAAO,EAAA,IAAA,CAGnB,EACDU,aAAe,KACfC,iBAAkB,CAChBC,iBAAUC,UACPC,UAAUd,CAAO,EACjBe,KAAK,IAAM,CACVC,EAAQd,QAAS,MAAK,CACxB,CAAC,EACAe,MAAM,IAAM,CACXD,EAAQd,QAAS,M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MAAQ,OACRC,QAAS6Q,EAAmBf,EAAQiB,CAAM,CAC5C,CAAC,CACH,CAAC,EAEKC,EAAiB,SAAY,CACjC,MAAMd,EAAgBe,WAAW9M,EAAM6J,SAASoC,EAAE,EAClD,MAAMrB,GAAM,GAAG,EACf5K,EAAM+M,SAAQ,GAGVC,EAAO,MAAOnR,GACXY,UAAUC,UACdC,UAAUd,CAAO,EACjBe,KAAK,IAAM,CACVC,EAAQd,QAAS,MAAK,CACxB,CAAC,EACAe,MAAM,IAAM,CACXD,EAAQd,QAAS,MAAK,CACxB,CAAC","x_google_ignoreList":[1,3]} \ No newline at end of file diff --git a/assets/DevicePage-XI-cAKHm.js b/assets/DevicePage-FYbQq6N3.js similarity index 95% rename from assets/DevicePage-XI-cAKHm.js rename to assets/DevicePage-FYbQq6N3.js index 7f53b2f..4e4c16e 100644 --- a/assets/DevicePage-XI-cAKHm.js +++ b/assets/DevicePage-FYbQq6N3.js @@ -1,4 +1,4 @@ -import{s as y,d as ne,aa as ie,t as le,w as re,a as $,e as K,f as J,b as n,g as l,u as t,h as f,F as W,i as ce,k as w,l as k,at as ue,o as H,N as G,au as pe,j as de,m as he,n as ve}from"./index-KbMk1nPu.js";import{o as fe,m as v,h as me,a as A,n as _,q as ge}from"./storage-I0hkGMKT.js";import{u as we,b as ke,a as X,l as Q,c as ye,d as Se}from"./index-AzMi55Pv.js";import{u as be,a as xe,N as Ce}from"./table-kebVkreH.js";import{u as N,y as _e,c as O,N as F,i as Ne,d as Pe,a as Re}from"./node-nnk68Gjj.js";const Ie=M=>{const S=y(M),b=async(o,h={})=>{var R;if(!S.value)throw new Error("origin must exist");const x=new URL("/api/"+o,S.value);Object.entries(h.query||{}).forEach(([m,I])=>{I!==void 0&&x.searchParams.set(m,String(I))});const c=await fe(x,h.init).catch(m=>{throw v.error("网络错误:/"+o),m});if(!c.ok)throw v.error("接口错误:/"+o+":"+c.status),c;if((R=c.headers.get("Content-Type"))!=null&&R.includes("application/json")){const m=await c.clone().json();if(m.__error)throw v.error(m.message),c}return c},i=async(...o)=>await(await b(...o)).json(),P=async(...o)=>await(await b(...o)).blob(),d=async(...o)=>await(await b(...o)).arrayBuffer();return{origin:S,api:{device:async()=>i("device"),snapshot:async o=>i("snapshot",{query:o}),screenshot:async o=>d("screenshot",{query:o}),captureSnapshot:async()=>i("captureSnapshot"),snapshots:async()=>i("snapshots"),subsApps:async()=>i("subsApps"),updateSubsApps:async o=>P("updateSubsApps",{init:{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}}),execSelector:async o=>i("execSelector",{init:{method:"POST",body:JSON.stringify({...o,value:o.selector}),headers:{"Content-Type":"application/json"}}})}}},Ve=f("div",{"h-15px":""},null,-1),Ae=f("a",{href:"https://github.com/gkd-kit/subscription/blob/main/src/types.ts",target:"_blank",rel:"noopener noreferrer"}," 查找说明 ",-1),ze=f("div",{"h-10px":""},null,-1),Be={flex:"","gap-10px":"","flex-items-center":""},Ue=f("a",{href:"https://github.com/gkd-kit/subscription/blob/main/src/types.ts",target:"_blank",rel:"noopener noreferrer"}," 操作说明 ",-1),Te={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},Le=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M16.612 2.214a1.01 1.01 0 0 0-1.242 0L1 13.419l1.243 1.572L4 13.621V26a2.004 2.004 0 0 0 2 2h20a2.004 2.004 0 0 0 2-2V13.63L29.757 15L31 13.428zM18 26h-4v-8h4zm2 0v-8a2.002 2.002 0 0 0-2-2h-4a2.002 2.002 0 0 0-2 2v8H6V12.062l10-7.79l10 7.8V26z",fill:"currentColor"})],-1),je={class:"h-full",flex:"","flex-items-center":""},Ee=ne({__name:"DevicePage",setup(M){const S=ce(),b=we("新设备"),{api:i,origin:P}=Ie(),d=ke("device_link",""),g=y(),o=N(async()=>{d.value&&(P.value=X(()=>new URL(d.value.trim()),()=>"非法设备地址").origin,d.value=P.value,g.value=await i.device())});ie(async()=>{await me(500),le(d.value)&&o.invoke()});const h=y([]);re(async()=>{if(!g.value)return;b.value="已连接 "+g.value.manufacturer;const e=await i.snapshots();e.sort((u,a)=>a.id-u.id),h.value=e;const s=await i.subsApps();V.value=Q.stringify(s||[],function(u,a){if(a!==null)return a},2)});const x=N(async()=>{const e=await i.captureSnapshot(),s=await i.screenshot({id:e.id});await A.setItem(e.id,e),await _.setItem(e.id,s),v.success("保存快照成功");const u=await i.snapshots();u.sort((a,j)=>j.id-a.id),h.value=u}),c=N(async()=>{const e=(await i.snapshots()).map(p=>p.id),s=new Set((await _.keys()).map(p=>parseInt(p))),u=e.filter(p=>!s.has(p));if(u.length==0){v.success("没有新记录可导入");return}let a=0;const j=ge(3);await Promise.all(u.map(p=>j(async()=>{const[E,oe]=await Promise.all([i.snapshot({id:p}),i.screenshot({id:p})]);E.nodes&&(await Promise.all([A.setItem(p,E),_.setItem(p,oe)]),a++)}))),v.success(`导入${a}条新记录`)}),{activityIdCol:R,appIdCol:m,appNameCol:I,ctimeCol:z,appVersionCodeCol:Y,appVersionNameCol:Z,reseColWidth:ee}=be(),te=e=>{e.columnKey==z.key&&(z.sortOrder=e.order)},q=_e(async e=>{if(await A.hasItem(e.id)||await A.setItem(e.id,await i.snapshot({id:e.id})),!await _.hasItem(e.id)){const s=await i.screenshot({id:e.id});await _.setItem(e.id,s)}window.open(S.resolve({name:"snapshot",params:{snapshotId:e.id}}).href)},e=>e.id),se=[z,I,m,Y,Z,R,{key:"actions",title:"Action",fixed:"right",width:"120px",render(e){return n(O,{size:"small"},{default:()=>[n(w,{size:"small",loading:q.loading[e.id],onClick:()=>q.invoke(e)},{default:()=>[k("查看")]})]})}}],C=$({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:e=>{C.page=e},onUpdatePageSize:e=>{C.pageSize=e,C.page=1}});K(C,ee);const B=y(!1),V=y(""),U=N(async()=>{const e=X(()=>Q.parse(V.value.trim()||"[]"));await i.updateSubsApps([].concat(e)),v.success("修改成功")}),T=y(!1),D=["click","clickNode","clickCenter","back","longClick","longClickNode","longClickCenter"].map(e=>({value:e,label:e})),r=$({selector:"",selectorValid:!1,action:D[0].value,quickFind:!1}),ae=ye(()=>{r.selectorValid=Se(r.selector)},500);K(()=>r.selector.trim(),ae);const L=N(async()=>{const e=await i.execSelector({...r});if(e.message){v.success("点击成功:"+e.message);return}e.action&&v.success((e.result?"点击成功:":"点击失败")+e.action)});return(e,s)=>{const u=ue("RouterLink");return H(),J(W,null,[n(t(G),{show:B.value,"onUpdate:show":s[1]||(s[1]=a=>B.value=a),preset:"dialog",style:{width:"800px"},title:"修改内存订阅","positive-text":"确认",positiveButtonProps:{loading:t(U).loading,onClick(){t(U).invoke()}}},{default:l(()=>[n(t(F),{value:V.value,"onUpdate:value":s[0]||(s[0]=a=>V.value=a),disabled:t(U).loading,type:"textarea",class:"gkd_code",autosize:{minRows:10,maxRows:25},placeholder:`请输入订阅文本 +import{s as y,d as ne,aa as ie,t as le,w as re,a as $,e as K,f as J,b as n,g as l,u as t,h as f,F as W,i as ce,k as w,l as k,at as ue,o as H,N as G,au as pe,j as de,m as he,n as ve}from"./index-O1rtA3Eg.js";import{o as fe,m as v,h as me,a as A,n as _,q as ge}from"./storage-HvXPlwOB.js";import{u as we,b as ke,a as X,l as Q,c as ye,d as Se}from"./index-Lw3EAuUv.js";import{u as be,a as xe,N as Ce}from"./table-Ycm662oI.js";import{u as N,y as _e,c as O,N as F,i as Ne,d as Pe,a as Re}from"./node-_ec_Pp3m.js";const Ie=M=>{const S=y(M),b=async(o,h={})=>{var R;if(!S.value)throw new Error("origin must exist");const x=new URL("/api/"+o,S.value);Object.entries(h.query||{}).forEach(([m,I])=>{I!==void 0&&x.searchParams.set(m,String(I))});const c=await fe(x,h.init).catch(m=>{throw v.error("网络错误:/"+o),m});if(!c.ok)throw v.error("接口错误:/"+o+":"+c.status),c;if((R=c.headers.get("Content-Type"))!=null&&R.includes("application/json")){const m=await c.clone().json();if(m.__error)throw v.error(m.message),c}return c},i=async(...o)=>await(await b(...o)).json(),P=async(...o)=>await(await b(...o)).blob(),d=async(...o)=>await(await b(...o)).arrayBuffer();return{origin:S,api:{device:async()=>i("device"),snapshot:async o=>i("snapshot",{query:o}),screenshot:async o=>d("screenshot",{query:o}),captureSnapshot:async()=>i("captureSnapshot"),snapshots:async()=>i("snapshots"),subsApps:async()=>i("subsApps"),updateSubsApps:async o=>P("updateSubsApps",{init:{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}}),execSelector:async o=>i("execSelector",{init:{method:"POST",body:JSON.stringify({...o,value:o.selector}),headers:{"Content-Type":"application/json"}}})}}},Ve=f("div",{"h-15px":""},null,-1),Ae=f("a",{href:"https://github.com/gkd-kit/subscription/blob/main/src/types.ts",target:"_blank",rel:"noopener noreferrer"}," 查找说明 ",-1),ze=f("div",{"h-10px":""},null,-1),Be={flex:"","gap-10px":"","flex-items-center":""},Ue=f("a",{href:"https://github.com/gkd-kit/subscription/blob/main/src/types.ts",target:"_blank",rel:"noopener noreferrer"}," 操作说明 ",-1),Te={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},Le=f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[f("path",{d:"M16.612 2.214a1.01 1.01 0 0 0-1.242 0L1 13.419l1.243 1.572L4 13.621V26a2.004 2.004 0 0 0 2 2h20a2.004 2.004 0 0 0 2-2V13.63L29.757 15L31 13.428zM18 26h-4v-8h4zm2 0v-8a2.002 2.002 0 0 0-2-2h-4a2.002 2.002 0 0 0-2 2v8H6V12.062l10-7.79l10 7.8V26z",fill:"currentColor"})],-1),je={class:"h-full",flex:"","flex-items-center":""},Ee=ne({__name:"DevicePage",setup(M){const S=ce(),b=we("新设备"),{api:i,origin:P}=Ie(),d=ke("device_link",""),g=y(),o=N(async()=>{d.value&&(P.value=X(()=>new URL(d.value.trim()),()=>"非法设备地址").origin,d.value=P.value,g.value=await i.device())});ie(async()=>{await me(500),le(d.value)&&o.invoke()});const h=y([]);re(async()=>{if(!g.value)return;b.value="已连接 "+g.value.manufacturer;const e=await i.snapshots();e.sort((u,a)=>a.id-u.id),h.value=e;const s=await i.subsApps();V.value=Q.stringify(s||[],function(u,a){if(a!==null)return a},2)});const x=N(async()=>{const e=await i.captureSnapshot(),s=await i.screenshot({id:e.id});await A.setItem(e.id,e),await _.setItem(e.id,s),v.success("保存快照成功");const u=await i.snapshots();u.sort((a,j)=>j.id-a.id),h.value=u}),c=N(async()=>{const e=(await i.snapshots()).map(p=>p.id),s=new Set((await _.keys()).map(p=>parseInt(p))),u=e.filter(p=>!s.has(p));if(u.length==0){v.success("没有新记录可导入");return}let a=0;const j=ge(3);await Promise.all(u.map(p=>j(async()=>{const[E,oe]=await Promise.all([i.snapshot({id:p}),i.screenshot({id:p})]);E.nodes&&(await Promise.all([A.setItem(p,E),_.setItem(p,oe)]),a++)}))),v.success(`导入${a}条新记录`)}),{activityIdCol:R,appIdCol:m,appNameCol:I,ctimeCol:z,appVersionCodeCol:Y,appVersionNameCol:Z,reseColWidth:ee}=be(),te=e=>{e.columnKey==z.key&&(z.sortOrder=e.order)},q=_e(async e=>{if(await A.hasItem(e.id)||await A.setItem(e.id,await i.snapshot({id:e.id})),!await _.hasItem(e.id)){const s=await i.screenshot({id:e.id});await _.setItem(e.id,s)}window.open(S.resolve({name:"snapshot",params:{snapshotId:e.id}}).href)},e=>e.id),se=[z,I,m,Y,Z,R,{key:"actions",title:"Action",fixed:"right",width:"120px",render(e){return n(O,{size:"small"},{default:()=>[n(w,{size:"small",loading:q.loading[e.id],onClick:()=>q.invoke(e)},{default:()=>[k("查看")]})]})}}],C=$({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:e=>{C.page=e},onUpdatePageSize:e=>{C.pageSize=e,C.page=1}});K(C,ee);const B=y(!1),V=y(""),U=N(async()=>{const e=X(()=>Q.parse(V.value.trim()||"[]"));await i.updateSubsApps([].concat(e)),v.success("修改成功")}),T=y(!1),D=["click","clickNode","clickCenter","back","longClick","longClickNode","longClickCenter"].map(e=>({value:e,label:e})),r=$({selector:"",selectorValid:!1,action:D[0].value,quickFind:!1}),ae=ye(()=>{r.selectorValid=Se(r.selector)},500);K(()=>r.selector.trim(),ae);const L=N(async()=>{const e=await i.execSelector({...r});if(e.message){v.success("点击成功:"+e.message);return}e.action&&v.success((e.result?"点击成功:":"点击失败")+e.action)});return(e,s)=>{const u=ue("RouterLink");return H(),J(W,null,[n(t(G),{show:B.value,"onUpdate:show":s[1]||(s[1]=a=>B.value=a),preset:"dialog",style:{width:"800px"},title:"修改内存订阅","positive-text":"确认",positiveButtonProps:{loading:t(U).loading,onClick(){t(U).invoke()}}},{default:l(()=>[n(t(F),{value:V.value,"onUpdate:value":s[0]||(s[0]=a=>V.value=a),disabled:t(U).loading,type:"textarea",class:"gkd_code",autosize:{minRows:10,maxRows:25},placeholder:`请输入订阅文本 订阅支持JSON5 根节点可以是APP规则对象也可以是APP规则对象数组`},null,8,["value","disabled"])]),_:1},8,["show","positiveButtonProps"]),n(t(G),{show:T.value,"onUpdate:show":s[5]||(s[5]=a=>T.value=a),preset:"dialog",style:{width:"800px"},title:"执行选择器","positive-text":"确认",positiveButtonProps:{loading:t(L).loading,disabled:!t(r).selectorValid,onClick(){t(L).invoke()}}},{default:l(()=>[n(t(F),{value:t(r).selector,"onUpdate:value":s[2]||(s[2]=a=>t(r).selector=a),disabled:t(L).loading,type:"textarea",class:"gkd_code",autosize:{minRows:4,maxRows:10},placeholder:"请输入合法的选择器"},null,8,["value","disabled"]),Ve,n(t(O),null,{default:l(()=>[n(t(Ne),{checked:t(r).quickFind,"onUpdate:checked":s[3]||(s[3]=a=>t(r).quickFind=a)},{default:l(()=>[k(" 快速查找 ")]),_:1},8,["checked"]),Ae]),_:1}),ze,f("div",Be,[n(t(xe),{value:t(r).action,"onUpdate:value":s[4]||(s[4]=a=>t(r).action=a),options:t(D),class:"w-150px"},null,8,["value","options"]),Ue])]),_:1},8,["show","positiveButtonProps"]),f("div",Te,[n(t(O),null,{default:l(()=>[n(u,{to:"/"},{default:l(()=>[n(t(w),null,{icon:l(()=>[n(t(Pe),null,{default:l(()=>[Le]),_:1})]),_:1})]),_:1}),n(t(Re),null,{default:l(()=>[n(t(F),{value:t(d),"onUpdate:value":s[6]||(s[6]=a=>pe(d)?d.value=a:null),placeholder:"请输入设备地址",style:{minWidth:"250px"},onKeyup:de(t(o).invoke,["enter"])},null,8,["value","onKeyup"]),n(t(w),{onClick:t(o).invoke,loading:t(o).loading},{default:l(()=>[k(" 刷新连接 ")]),_:1},8,["onClick","loading"])]),_:1}),g.value?(H(),J(W,{key:0},[f("div",je,he(`已连接 ${g.value.manufacturer} Android ${g.value.release}`),1),n(t(w),{onClick:t(x).invoke,loading:t(x).loading},{default:l(()=>[k(" 快照 ")]),_:1},8,["onClick","loading"]),n(t(w),{onClick:t(c).invoke,loading:t(c).loading},{default:l(()=>[k(" 下载设备所有快照 ")]),_:1},8,["onClick","loading"]),n(t(w),{onClick:s[7]||(s[7]=a=>B.value=!0)},{default:l(()=>[k(" 修改内存订阅 ")]),_:1}),n(t(w),{onClick:s[8]||(s[8]=a=>T.value=!0)},{default:l(()=>[k(" 执行选择器 ")]),_:1})],64)):ve("",!0)]),_:1}),n(t(Ce),{striped:"",flexHeight:"",data:h.value,columns:se,pagination:t(C),"onUpdate:sorter":te,size:"small",class:"flex-1",scrollX:1200},null,8,["data","pagination"])])],64)}}});export{Ee as default}; -//# sourceMappingURL=DevicePage-XI-cAKHm.js.map +//# sourceMappingURL=DevicePage-FYbQq6N3.js.map diff --git a/assets/DevicePage-XI-cAKHm.js.map b/assets/DevicePage-FYbQq6N3.js.map similarity index 99% rename from assets/DevicePage-XI-cAKHm.js.map rename to assets/DevicePage-FYbQq6N3.js.map index 44338d2..2f99ce3 100644 --- a/assets/DevicePage-XI-cAKHm.js.map +++ b/assets/DevicePage-FYbQq6N3.js.map @@ -1 +1 @@ -{"version":3,"file":"DevicePage-XI-cAKHm.js","sources":["../../src/utils/api.ts","../../src/views/DevicePage.vue"],"sourcesContent":["import { shallowRef } from 'vue';\nimport { message } from './discrete';\nimport { enhanceFetch } from './fetch';\nimport type { Device, RpcError, Snapshot } from './types';\n\ntype RpcOptions = {\n query?: Record;\n init?: RequestInit;\n};\n\nexport const useDeviceApi = (initOrigin?: string) => {\n const origin = shallowRef(initOrigin);\n const rpc = async (rpcName: string, options: RpcOptions = {}) => {\n if (!origin.value) {\n throw new Error(`origin must exist`);\n }\n const u = new URL(`/api/` + rpcName, origin.value);\n Object.entries(options.query || {}).forEach(([key, value]) => {\n if (value === undefined) return;\n u.searchParams.set(key, String(value));\n });\n const response = await enhanceFetch(u, options.init).catch((e) => {\n message.error(`网络错误:/` + rpcName);\n throw e;\n });\n if (!response.ok) {\n message.error(`接口错误:/` + rpcName + `:` + response.status);\n throw response;\n }\n if (response.headers.get(`Content-Type`)?.includes(`application/json`)) {\n const error = (await response.clone().json()) as RpcError;\n if (error.__error) {\n message.error(error.message);\n throw response;\n }\n }\n return response;\n };\n const jsonRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return (await response.json()) as T;\n };\n const blobRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return await response.blob();\n };\n const arrayBufferRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return await response.arrayBuffer();\n };\n const api = {\n device: async () => jsonRpc(`device`),\n snapshot: async (query?: { id?: string | number }) => {\n return jsonRpc(`snapshot`, { query });\n },\n screenshot: async (query: { id: string | number }) => {\n return arrayBufferRpc(`screenshot`, { query });\n },\n captureSnapshot: async () => {\n return jsonRpc(`captureSnapshot`);\n },\n snapshots: async () => {\n return jsonRpc(`snapshots`);\n },\n subsApps: async () => {\n return jsonRpc(`subsApps`);\n },\n updateSubsApps: async (data: unknown[]) => {\n return blobRpc(`updateSubsApps`, {\n init: {\n method: 'POST',\n body: JSON.stringify(data),\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n });\n },\n execSelector: async (data: {\n selector: string;\n action?: string;\n quickFind?: boolean;\n }) => {\n return jsonRpc<{ message: string; action: string; result: boolean }>(\n `execSelector`,\n {\n init: {\n method: 'POST',\n // value 是旧版本的选择器\n body: JSON.stringify({ ...data, value: data.selector }),\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n },\n );\n },\n };\n return { origin, api };\n};\n","\n\n"],"names":["useDeviceApi","initOrigin","origin","shallowRef","rpc","rpcName","options","u","key","value","response","enhanceFetch","e","message","_a","error","jsonRpc","args","blobRpc","arrayBufferRpc","query","data","router","useRouter","title","useTitle","api","link","useStorage","device","connect","useTask","errorWrap","URL","trim","onMounted","delay","toValidURL","invoke","snapshots","watchEffect","manufacturer","result","sort","a","b","id","subsApps","subsText","JSON5","stringify","captureSnapshot","snapshot","screenshot","snapshotStorage","setItem","screenshotStorage","success","downloadAllSnapshot","snapshotIds","map","s","existSnapshotIds","Set","keys","parseInt","unimportSnapshotIds","filter","k","has","length","r","limit","pLimit","Promise","all","snapshotId","newSnapshot","newScreenshot","nodes","activityIdCol","appIdCol","appNameCol","ctimeCol","appVersionCodeCol","appVersionNameCol","reseColWidth","useSnapshotColumns","handleSorterChange","sorter","columnKey","sortOrder","order","previewSnapshot","useBatchTask","row","hasItem","bf","window","open","resolve","name","params","href","columns","fixed","width","render","_createVNode2","NSpace","default","NButton","loading","onClick","_createTextVNode2","pagination","shallowReactive","page","pageSize","showSizePicker","pageSizes","onChange","onUpdatePageSize","watch","showSubsModel","updateSubs","appsSubs","parse","updateSubsApps","concat","showSelectorModel","actionOptions","label","clickAction","selector","selectorValid","action","quickFind","checkSelectorValid","useDebounceFn","checkSelector","execSelector"],"mappings":"4fAUa,MAAAA,GAAgBC,GAAwB,CAC7C,MAAAC,EAASC,EAAWF,CAAU,EAC9BG,EAAM,MAAOC,EAAiBC,EAAsB,CAAA,IAAO,OAC3D,GAAA,CAACJ,EAAO,MACJ,MAAA,IAAI,M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6N3.js","sources":["../../src/utils/api.ts","../../src/views/DevicePage.vue"],"sourcesContent":["import { shallowRef } from 'vue';\nimport { message } from './discrete';\nimport { enhanceFetch } from './fetch';\nimport type { Device, RpcError, Snapshot } from './types';\n\ntype RpcOptions = {\n query?: Record;\n init?: RequestInit;\n};\n\nexport const useDeviceApi = (initOrigin?: string) => {\n const origin = shallowRef(initOrigin);\n const rpc = async (rpcName: string, options: RpcOptions = {}) => {\n if (!origin.value) {\n throw new Error(`origin must exist`);\n }\n const u = new URL(`/api/` + rpcName, origin.value);\n Object.entries(options.query || {}).forEach(([key, value]) => {\n if (value === undefined) return;\n u.searchParams.set(key, String(value));\n });\n const response = await enhanceFetch(u, options.init).catch((e) => {\n message.error(`网络错误:/` + rpcName);\n throw e;\n });\n if (!response.ok) {\n message.error(`接口错误:/` + rpcName + `:` + response.status);\n throw response;\n }\n if (response.headers.get(`Content-Type`)?.includes(`application/json`)) {\n const error = (await response.clone().json()) as RpcError;\n if (error.__error) {\n message.error(error.message);\n throw response;\n }\n }\n return response;\n };\n const jsonRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return (await response.json()) as T;\n };\n const blobRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return await response.blob();\n };\n const arrayBufferRpc = async (...args: Parameters) => {\n const response = await rpc(...args);\n return await response.arrayBuffer();\n };\n const api = {\n device: async () => jsonRpc(`device`),\n snapshot: async (query?: { id?: string | number }) => {\n return jsonRpc(`snapshot`, { query });\n },\n screenshot: async (query: { id: string | number }) => {\n return arrayBufferRpc(`screenshot`, { query });\n },\n captureSnapshot: async () => {\n return jsonRpc(`captureSnapshot`);\n },\n snapshots: async () => {\n return jsonRpc(`snapshots`);\n },\n subsApps: async () => {\n return jsonRpc(`subsApps`);\n },\n updateSubsApps: async (data: unknown[]) => {\n return blobRpc(`updateSubsApps`, {\n init: {\n method: 'POST',\n body: JSON.stringify(data),\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n });\n },\n execSelector: async (data: {\n selector: string;\n action?: string;\n quickFind?: boolean;\n }) => {\n return jsonRpc<{ message: string; action: string; result: boolean }>(\n `execSelector`,\n {\n init: {\n method: 'POST',\n // value 是旧版本的选择器\n body: JSON.stringify({ ...data, value: data.selector }),\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n },\n );\n },\n };\n return { origin, api };\n};\n","\n\n"],"names":["useDeviceApi","initOrigin","origin","shallowRef","rpc","rpcName","options","u","key","value","response","enhanceFetch","e","message","_a","error","jsonRpc","args","blobRpc","arrayBufferRpc","query","data","router","useRouter","title","useTitle","api","link","useStorage","device","connect","useTask","errorWrap","URL","trim","onMounted","delay","toValidURL","invoke","snapshots","watchEffect","manufacturer","result","sort","a","b","id","subsApps","subsText","JSON5","stringify","captureSnapshot","snapshot","screenshot","snapshotStorage","setItem","screenshotStorage","success","downloadAllSnapshot","snapshotIds","map","s","existSnapshotIds","Set","keys","parseInt","unimportSnapshotIds","filter","k","has","length","r","limit","pLimit","Promise","all","snapshotId","newSnapshot","newScreenshot","nodes","activityIdCol","appIdCol","appNameCol","ctimeCol","appVersionCodeCol","appVersionNameCol","reseColWidth","useSnapshotColumns","handleSorterChange","sorter","columnKey","sortOrder","order","previewSnapshot","useBatchTask","row","hasItem","bf","window","open","resolve","name","params","href","columns","fixed","width","render","_createVNode2","NSpace","default","NButton","loading","onClick","_createTextVNode2","pagination","shallowReactive","page","pageSize","showSizePicker","pageSizes","onChange","onUpdatePageSize","watch","showSubsModel","updateSubs","appsSubs","parse","updateSubsApps","concat","showSelectorModel","actionOptions","label","clickAction","selector","selectorValid","action","quickFind","checkSelectorValid","useDebounceFn","checkSelector","execSelector"],"mappings":"4fAUa,MAAAA,GAAgBC,GAAwB,CAC7C,MAAAC,EAASC,EAAWF,CAAU,EAC9BG,EAAM,MAAOC,EAAiBC,EAAsB,CAAA,IAAO,OAC3D,GAAA,CAACJ,EAAO,MACJ,MAAA,IAAI,MAAM,mBAAmB,EAErC,MAAMK,EAAI,IAAI,IAAI,QAAU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AWJ,GAAiB,CAC1BF,EAAWE,KAAOA,CACnB,EACDK,iBAAmBJ,GAAqB,CACtCH,EAAWG,SAAWA,EACtBH,EAAWE,KAAO,CACpB,CACF,CAAC,EACDM,EAAMR,EAAY7B,EAAY,EAE9B,MAAMsC,EAAgBzH,EAAW,EAAK,EAChC6C,EAAW7C,EAAY,EAAC,EACxB0H,EAAa9F,EAAQ,SAAY,CACrC,MAAM+F,EAAW9F,EAAU,IAAMiB,EAAM8E,MAAM/E,EAASvC,MAAMyB,KAAM,GAAK,IAAG,CAAC,EAC3E,MAAMR,EAAIsG,eAAe,CAAA,EAAGC,OAAOH,CAAQ,CAAC,EAC5CjH,EAAQ4C,QAAS,MAAK,CACxB,CAAC,EAEKyE,EAAoB/H,EAAW,EAAK,EAEpCgI,EAAgB,CACpB,QACA,YACA,cACA,OACA,YACA,gBACA,iBAAiB,EACjBvE,IAAKC,IAAO,CAAEpD,MAAOoD,EAAGuE,MAAOvE,CAAG,EAAC,EAC/BwE,EAAcjB,EAAgB,CAClCkB,SAAW,GACXC,cAAe,GACfC,OAAQL,EAAc,CAAC,EAAE1H,MACzBgI,UAAW,EACb,CAAC,EACKC,GAAqBC,GAAc,IAAM,CAC7CN,EAAYE,cAAgBK,GAAcP,EAAYC,QAAQ,CAC/D,EAAE,GAAG,EACNX,EAAM,IAAMU,EAAYC,SAASpG,KAAM,EAAEwG,EAAkB,EAC3D,MAAMG,EAAe9G,EAAQ,SAAY,CACvC,MAAMW,EAAS,MAAMhB,EAAImH,aAAa,CAAE,GAAGR,CAAY,CAAC,EACxD,GAAI3F,EAAO7B,QAAS,CAClBA,EAAQ4C,QAAS,QAASf,EAAO7B,OAAO,EACxC,MACF,CACI6B,EAAO8F,QACT3H,EAAQ4C,SAASf,EAAOA,OAAU,QAAU,QAASA,EAAO8F,MAAM,CAEtE,CAAC;;"} \ No newline at end of file diff --git a/assets/HomePage-wbzSXwwc.js b/assets/HomePage-91EmzLXR.js similarity index 93% rename from assets/HomePage-wbzSXwwc.js rename to assets/HomePage-91EmzLXR.js index b07c73a..699e1a6 100644 --- a/assets/HomePage-wbzSXwwc.js +++ b/assets/HomePage-91EmzLXR.js @@ -1,4 +1,4 @@ -import{d as W,s as k,a as O,c as X,w as S,r as Y,b as l,e as ee,f as T,g as o,u as e,h as s,F as Q,i as te,t as ae,o as B,N as le,j as oe,k as i,l as c,m as ne,n as ie,R as se}from"./index-KbMk1nPu.js";import{_ as ce,b as re,a as ue,c as de,s as Z,d as pe}from"./ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js";import{s as ge,d as ve,a as L,g as q}from"./storage-I0hkGMKT.js";import{i as we,a as fe}from"./import-sCnXcRHq.js";import{u as me,N as he,r as ke}from"./table-kebVkreH.js";import{u as d,N as E,a as Ce,b,c as v,d as U}from"./node-nnk68Gjj.js";import"./jszip.min-Er0t4O-W.js";const _e={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},ye={flex:""},xe={"h-full":"",flex:"","flex-items-center":""},ze=s("div",{"flex-1":""},null,-1),Ne={href:"https://github.com/gkd-kit/inspect",target:"_blank",rel:"noopener noreferrer"},Se=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 496 512"},[s("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z",fill:"currentColor"})],-1),be=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"}),s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"})],-1),Ue=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},[s("path",{d:"M270.1 741.7c0 23.4 19.1 42.5 42.6 42.5h48.7v120.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V784.1h85v120.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V784.1h48.7c23.5 0 42.6-19.1 42.6-42.5V346.4h-486v395.3zm357.1-600.1l44.9-65c2.6-3.8 2-8.9-1.5-11.4c-3.5-2.4-8.5-1.2-11.1 2.6l-46.6 67.6c-30.7-12.1-64.9-18.8-100.8-18.8c-35.9 0-70.1 6.7-100.8 18.8l-46.6-67.5c-2.6-3.8-7.6-5.1-11.1-2.6c-3.5 2.4-4.1 7.4-1.5 11.4l44.9 65c-71.4 33.2-121.4 96.1-127.8 169.6h486c-6.6-73.6-56.7-136.5-128-169.7zM409.5 244.1a26.9 26.9 0 1 1 26.9-26.9a26.97 26.97 0 0 1-26.9 26.9zm208.4 0a26.9 26.9 0 1 1 26.9-26.9a26.97 26.97 0 0 1-26.9 26.9zm223.4 100.7c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V400.1c.1-30.6-24.3-55.3-54.6-55.3zm-658.6 0c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V400.1c0-30.6-24.5-55.3-54.6-55.3z",fill:"currentColor"})],-1),Te=W({__name:"HomePage",setup(Ie){const I=te(),C=k([]),p=async()=>{C.value=(await ge.getAllItems()).reverse(),r.value=[]};p();const u=O({query:"",actualQuery:"",updateQuery:()=>{u.actualQuery=u.query.trim(),r.value=[]}}),w=X(()=>{const a=u.actualQuery;return a?C.value.filter(t=>(t.appName||"").includes(a)||(t.appId||"").includes(a)||(t.activityId||"").includes(a)):C.value}),P=d(async()=>{await we(),await p()}),{activityIdCol:_,appIdCol:F,appNameCol:y,ctimeCol:R,mtimeCol:x,deviceCol:z,appVersionCodeCol:J,appVersionNameCol:$,reseColWidth:H}=me();S(()=>{const a=w.value.reduce((t,n)=>(t.add(ke(n)),t),new Set);if(a.size<=1){z.filterOptions=void 0;return}z.filterOptions=[...a.values()].map(t=>({value:t,label:t}))}),S(()=>{const a=w.value.reduce((t,n)=>(t.add(n.appName),t),new Set);if(a.size<=1){y.filterOptions=void 0;return}y.filterOptions=[...a.values()].map(t=>({value:t,label:t}))}),S(()=>{const a=w.value.reduce((t,n)=>(t.add(n.activityId),t),new Set);if(a.size<=1){_.filterOptions=void 0;return}_.filterOptions=[...a.values()].map(t=>({value:t,label:t}))});const j=Y([{type:"selection"},R,x,z,y,F,J,$,_,{key:"actions",title:"操作",fixed:"right",width:"255px",render(a){return l(ce,{snapshot:a,onDelete:p},null)}}]),g=O({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:a=>{g.page=a},onUpdatePageSize:a=>{g.pageSize=a,g.page=1}});ee(g,H);const A=a=>{[R,x].forEach(t=>{a.columnKey!=t.key?t.sortOrder=void 0:t.sortOrder=a.order})};x.sortOrder="descend";const N=k(!1),f=k(""),m=d(async()=>{const a=f.value.trim().split(` +import{d as W,s as k,a as O,c as X,w as S,r as Y,b as l,e as ee,f as T,g as o,u as e,h as s,F as Q,i as te,t as ae,o as B,N as le,j as oe,k as i,l as c,m as ne,n as ie,R as se}from"./index-O1rtA3Eg.js";import{_ as ce,b as re,a as ue,c as de,s as Z,d as pe}from"./ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js";import{s as ge,d as ve,a as L,g as q}from"./storage-HvXPlwOB.js";import{i as we,a as fe}from"./import-kVHJH7rF.js";import{u as me,N as he,r as ke}from"./table-Ycm662oI.js";import{u as d,N as E,a as Ce,b,c as v,d as U}from"./node-_ec_Pp3m.js";import"./jszip.min-jR1TOKSo.js";const _e={flex:"","flex-col":"","p-10px":"","gap-10px":"","h-full":""},ye={flex:""},xe={"h-full":"",flex:"","flex-items-center":""},ze=s("div",{"flex-1":""},null,-1),Ne={href:"https://github.com/gkd-kit/inspect",target:"_blank",rel:"noopener noreferrer"},Se=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 496 512"},[s("path",{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9c1.6 2.3 4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2z",fill:"currentColor"})],-1),be=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"}),s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"})],-1),Ue=s("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},[s("path",{d:"M270.1 741.7c0 23.4 19.1 42.5 42.6 42.5h48.7v120.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V784.1h85v120.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V784.1h48.7c23.5 0 42.6-19.1 42.6-42.5V346.4h-486v395.3zm357.1-600.1l44.9-65c2.6-3.8 2-8.9-1.5-11.4c-3.5-2.4-8.5-1.2-11.1 2.6l-46.6 67.6c-30.7-12.1-64.9-18.8-100.8-18.8c-35.9 0-70.1 6.7-100.8 18.8l-46.6-67.5c-2.6-3.8-7.6-5.1-11.1-2.6c-3.5 2.4-4.1 7.4-1.5 11.4l44.9 65c-71.4 33.2-121.4 96.1-127.8 169.6h486c-6.6-73.6-56.7-136.5-128-169.7zM409.5 244.1a26.9 26.9 0 1 1 26.9-26.9a26.97 26.97 0 0 1-26.9 26.9zm208.4 0a26.9 26.9 0 1 1 26.9-26.9a26.97 26.97 0 0 1-26.9 26.9zm223.4 100.7c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V400.1c.1-30.6-24.3-55.3-54.6-55.3zm-658.6 0c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4c30.2 0 54.6-24.8 54.6-55.4V400.1c0-30.6-24.5-55.3-54.6-55.3z",fill:"currentColor"})],-1),Te=W({__name:"HomePage",setup(Ie){const I=te(),C=k([]),p=async()=>{C.value=(await ge.getAllItems()).reverse(),r.value=[]};p();const u=O({query:"",actualQuery:"",updateQuery:()=>{u.actualQuery=u.query.trim(),r.value=[]}}),w=X(()=>{const a=u.actualQuery;return a?C.value.filter(t=>(t.appName||"").includes(a)||(t.appId||"").includes(a)||(t.activityId||"").includes(a)):C.value}),P=d(async()=>{await we(),await p()}),{activityIdCol:_,appIdCol:F,appNameCol:y,ctimeCol:R,mtimeCol:x,deviceCol:z,appVersionCodeCol:J,appVersionNameCol:$,reseColWidth:H}=me();S(()=>{const a=w.value.reduce((t,n)=>(t.add(ke(n)),t),new Set);if(a.size<=1){z.filterOptions=void 0;return}z.filterOptions=[...a.values()].map(t=>({value:t,label:t}))}),S(()=>{const a=w.value.reduce((t,n)=>(t.add(n.appName),t),new Set);if(a.size<=1){y.filterOptions=void 0;return}y.filterOptions=[...a.values()].map(t=>({value:t,label:t}))}),S(()=>{const a=w.value.reduce((t,n)=>(t.add(n.activityId),t),new Set);if(a.size<=1){_.filterOptions=void 0;return}_.filterOptions=[...a.values()].map(t=>({value:t,label:t}))});const j=Y([{type:"selection"},R,x,z,y,F,J,$,_,{key:"actions",title:"操作",fixed:"right",width:"255px",render(a){return l(ce,{snapshot:a,onDelete:p},null)}}]),g=O({page:1,pageSize:50,showSizePicker:!0,pageSizes:[50,100],onChange:a=>{g.page=a},onUpdatePageSize:a=>{g.pageSize=a,g.page=1}});ee(g,H);const A=a=>{[R,x].forEach(t=>{a.columnKey!=t.key?t.sortOrder=void 0:t.sortOrder=a.order})};x.sortOrder="descend";const N=k(!1),f=k(""),m=d(async()=>{const a=f.value.trim().split(` `).map(t=>t.trim()).filter(t=>ae(t));a.length!=0&&(await fe(a),await p(),f.value="")}),r=k([]),h=()=>Promise.all(r.value.map(a=>L.getItem(a))),G=d(async()=>{await new Promise((a,t)=>{ve.warning({title:"删除",content:`是否批量删除 ${r.value.length} 个快照`,negativeText:"取消",positiveText:"确认",onClose:t,onEsc:t,onMaskClick:t,onNegativeClick:t,onPositiveClick:a})}),await Promise.all(r.value.map(a=>L.removeItem(a))),await p()}),V=d(async()=>{await re(await h())}),D=d(async()=>{await ue(await h())}),K=d(async()=>{const a=await de(await h());Z({content:a.map(t=>q(I,t)).join(` `)+` `})}),M=d(async()=>{const a=await pe(await h());Z({content:a.map(t=>q(I,t)).join(` @@ -7,4 +7,4 @@ import{d as W,s as k,a as O,c as X,w as S,r as Y,b as l,e as ee,f as T,g as o,u 每行一个 空白行自动忽略 非法链接行自动忽略`,autosize:{minRows:8,maxRows:16},inputProps:{style:"white-space: nowrap;"}},null,8,["value"])]),_:1},8,["show","onPositiveClick","loading"]),s("div",_e,[s("div",ye,[l(e(v),null,{default:o(()=>[l(e(Ce),null,{default:o(()=>[l(e(E),{placeholder:"请输入关键字搜索",clearable:"",value:e(u).query,"onUpdate:value":t[2]||(t[2]=n=>e(u).query=n),onKeyup:oe(e(u).updateQuery,["enter"]),onChange:e(u).updateQuery},null,8,["value","onKeyup","onChange"]),l(e(i),{onClick:e(u).updateQuery},{default:o(()=>[c(" 搜索 ")]),_:1},8,["onClick"])]),_:1}),r.value.length?(B(),T(Q,{key:0},[l(e(b),null,{trigger:o(()=>[l(e(i),null,{default:o(()=>[c(" 批量下载 ")]),_:1})]),default:o(()=>[l(e(v),{vertical:""},{default:o(()=>[l(e(i),{onClick:e(D).invoke,loading:e(D).loading},{default:o(()=>[c(" 批量下载-快照 ")]),_:1},8,["onClick","loading"]),l(e(i),{onClick:e(V).invoke,loading:e(V).loading},{default:o(()=>[c(" 批量下载-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),l(e(b),null,{trigger:o(()=>[l(e(i),null,{default:o(()=>[c(" 批量分享 ")]),_:1})]),default:o(()=>[l(e(v),{vertical:""},{default:o(()=>[l(e(i),{onClick:e(M).invoke,loading:e(M).loading},{default:o(()=>[c(" 批量生成链接-快照 ")]),_:1},8,["onClick","loading"]),l(e(i),{onClick:e(K).invoke,loading:e(K).loading},{default:o(()=>[c(" 批量生成链接-图片 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1}),l(e(i),{onClick:e(G).invoke},{default:o(()=>[c(" 批量删除 ")]),_:1},8,["onClick"]),s("div",xe,ne(`已选中 ${r.value.length} 个快照`),1)],64)):ie("",!0)]),_:1}),ze,l(e(v),null,{default:o(()=>[s("a",Ne,[l(e(i),null,{icon:o(()=>[l(e(U),null,{default:o(()=>[Se]),_:1})]),_:1})]),l(e(b),null,{trigger:o(()=>[l(e(i),null,{icon:o(()=>[l(e(U),null,{default:o(()=>[be]),_:1})]),_:1})]),default:o(()=>[l(e(v),{vertical:""},{default:o(()=>[l(e(i),{onClick:e(P).invoke,loading:e(P).loading},{default:o(()=>[c(" 导入本地文件 ")]),_:1},8,["onClick","loading"]),l(e(i),{onClick:t[3]||(t[3]=n=>N.value=!0),loading:e(m).loading},{default:o(()=>[c(" 导入网络文件 ")]),_:1},8,["loading"])]),_:1})]),_:1}),l(e(se),{to:"/device"},{default:o(()=>[l(e(i),null,{icon:o(()=>[l(e(U),null,{default:o(()=>[Ue]),_:1})]),_:1})]),_:1})]),_:1})]),l(e(he),{striped:"",data:w.value,columns:j,scrollX:1800,pagination:e(g),checkedRowKeys:r.value,"onUpdate:checkedRowKeys":t[4]||(t[4]=n=>r.value=n),rowKey:n=>n.id,"onUpdate:sorter":A,size:"small",class:"flex-1",flexHeight:""},null,8,["data","columns","pagination","checkedRowKeys","rowKey"])])],64))}});export{Te as default}; -//# sourceMappingURL=HomePage-wbzSXwwc.js.map +//# sourceMappingURL=HomePage-91EmzLXR.js.map diff --git a/assets/HomePage-wbzSXwwc.js.map b/assets/HomePage-91EmzLXR.js.map similarity index 99% rename from assets/HomePage-wbzSXwwc.js.map rename to assets/HomePage-91EmzLXR.js.map index b0f233f..c637450 100644 --- a/assets/HomePage-wbzSXwwc.js.map +++ b/assets/HomePage-91EmzLXR.js.map @@ -1 +1 @@ -{"version":3,"file":"HomePage-wbzSXwwc.js","sources":["../../src/views/HomePage.vue"],"sourcesContent":["\n\n"],"names":["router","useRouter","snapshots","shallowRef","updateSnapshots","value","shallowSnapshotStorage","getAllItems","reverse","checkedRowKeys","filterOption","shallowReactive","query","actualQuery","updateQuery","trim","filterSnapshots","computed","filter","s","appName","includes","appId","activityId","importLoacl","useTask","importFromLocal","activityIdCol","appIdCol","appNameCol","ctimeCol","mtimeCol","deviceCol","appVersionCodeCol","appVersionNameCol","reseColWidth","useSnapshotColumns","watchEffect","set","reduce","p","c","add","renderDveice","Set","size","filterOptions","undefined","values","map","label","columns","reactive","type","key","title","fixed","width","render","row","_createVNode2","ActionCard","pagination","page","pageSize","showSizePicker","pageSizes","onChange","onUpdatePageSize","watch","handleSorterChange","sorter","forEach","columnKey","sortOrder","order","showModal","text","importNetwork","urls","split","u","toValidURL","length","importFromNetwork","checkedSnapshots","Promise","all","id","snapshotStorage","getItem","batchDelete","res","rej","dialog","warning","content","negativeText","positiveText","onClose","onEsc","onMaskClick","onNegativeClick","onPositiveClick","k","removeItem","batchDownloadJpg","batchJpgDownloadZip","batchDownloadZip","batchZipDownloadZip","batchShareJpgUrl","pngUrls","batchCreateJpgUrl","showTextDLg","githubUrlToSelfUrl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,GAAkB,MAAM3B,EAAkB,CAAA,EAChE4B,EAAY,CACVjB,QACEe,EAAQ9D,IAAK9B,GAAM+F,EAAmBlH,EAAQmB,CAAC,CAAC,EAAEgG,KAAM;AAAA,CAAG,EAAK;AAAA,CACpE,CAAC,CACH,CAAC,EACKC,EAAmB3F,EAAQ,SAAY,CAC3C,MAAM4F,EAAU,MAAMC,GAAkB,MAAMjC,EAAkB,CAAA,EAChE4B,EAAY,CACVjB,QACEqB,EAAQpE,IAAK9B,GAAM+F,EAAmBlH,EAAQmB,CAAC,CAAC,EAAEgG,KAAM;AAAA,CAAG,EAAK;AAAA,CACpE,CAAC,CACH,CAAC;;;"} \ No newline at end of file +{"version":3,"file":"HomePage-91EmzLXR.js","sources":["../../src/views/HomePage.vue"],"sourcesContent":["\n\n"],"names":["router","useRouter","snapshots","shallowRef","updateSnapshots","value","shallowSnapshotStorage","getAllItems","reverse","checkedRowKeys","filterOption","shallowReactive","query","actualQuery","updateQuery","trim","filterSnapshots","computed","filter","s","appName","includes","appId","activityId","importLoacl","useTask","importFromLocal","activityIdCol","appIdCol","appNameCol","ctimeCol","mtimeCol","deviceCol","appVersionCodeCol","appVersionNameCol","reseColWidth","useSnapshotColumns","watchEffect","set","reduce","p","c","add","renderDveice","Set","size","filterOptions","undefined","values","map","label","columns","reactive","type","key","title","fixed","width","render","row","_createVNode2","ActionCard","pagination","page","pageSize","showSizePicker","pageSizes","onChange","onUpdatePageSize","watch","handleSorterChange","sorter","forEach","columnKey","sortOrder","order","showModal","text","importNetwork","urls","split","u","toValidURL","length","importFromNetwork","checkedSnapshots","Promise","all","id","snapshotStorage","getItem","batchDelete","res","rej","dialog","warning","content","negativeText","positiveText","onClose","onEsc","onMaskClick","onNegativeClick","onPositiveClick","k","removeItem","batchDownloadJpg","batchJpgDownloadZip","batchDownloadZip","batchZipDownloadZip","batchShareJpgUrl","pngUrls","batchCreateJpgUrl","showTextDLg","githubUrlToSelfUrl","join","batchShareZipUrl","zipUrls","batchCreateZ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EAChE4B,EAAY,CACVjB,QACEe,EAAQ9D,IAAK9B,GAAM+F,EAAmBlH,EAAQmB,CAAC,CAAC,EAAEgG,KAAM;AAAA,CAAG,EAAK;AAAA,CACpE,CAAC,CACH,CAAC,EACKC,EAAmB3F,EAAQ,SAAY,CAC3C,MAAM4F,EAAU,MAAMC,GAAkB,MAAMjC,EAAkB,CAAA,EAChE4B,EAAY,CACVjB,QACEqB,EAAQpE,IAAK9B,GAAM+F,EAAmBlH,EAAQmB,CAAC,CAAC,EAAEgG,KAAM;AAAA,CAAG,EAAK;AAAA,CACpE,CAAC,CACH,CAAC;;;"} \ No newline at end of file diff --git a/assets/ImportPage-wX1w62Qh.js b/assets/ImportPage-Fae4iEVk.js similarity index 80% rename from assets/ImportPage-wX1w62Qh.js rename to assets/ImportPage-Fae4iEVk.js index e8f3e2a..073e8ac 100644 --- a/assets/ImportPage-wX1w62Qh.js +++ b/assets/ImportPage-Fae4iEVk.js @@ -1,2 +1,2 @@ -import{d as m,s as c,aa as h,t as f,f as d,P as g,Q as v,h as w,m as _,ar as x,i as R,o as S}from"./index-KbMk1nPu.js";import{m as b,h as i,u as l,a as y,r as n,t as I,e as U,v as B,b as k}from"./storage-I0hkGMKT.js";import{a as D}from"./import-sCnXcRHq.js";import"./jszip.min-Er0t4O-W.js";const L={class:"h-[calc(100%-10px)]",flex:"","gap-5px":"","p-5px":"","flex-col":"","flex-items-center":""},C=m({__name:"ImportPage",setup(N){const u=x(),r=R(),a=String(u.query.url||""),p=c(!0),o=c("加载中...");return h(async()=>{if(!f(a)){b.error("非法URL参数"),await i(1e3),r.replace({path:"/"});return}await i(1e3);const s=l[a];if(s)if(await y.getItem(s)){r.replace({name:"snapshot",params:{snapshotId:s}});return}else delete l[a];n.start();try{const[t]=await D(a)??[];if(t.status=="fulfilled"){n.finish();const e=t.value;e!=null&&e.id?(l[a]=e.id,a.match(I)?U[e.id]=a:a.match(B)&&(k[e.id]=a),p.value=!1,await i(500),r.replace({name:"snapshot",params:{snapshotId:e.id}})):o.value="获取资源失败"}else throw t.reason}catch{n.error(),o.value="加载资源失败"}}),(s,t)=>(S(),d("div",L,[g(w("div",{"mt-40px":""},_(o.value),513),[[v,p.value]])]))}});export{C as default}; -//# sourceMappingURL=ImportPage-wX1w62Qh.js.map +import{d as m,s as c,aa as h,t as f,f as d,P as g,Q as v,h as w,m as _,ar as x,i as R,o as S}from"./index-O1rtA3Eg.js";import{m as b,h as i,u as l,a as y,r as n,t as I,e as U,v as B,b as k}from"./storage-HvXPlwOB.js";import{a as D}from"./import-kVHJH7rF.js";import"./jszip.min-jR1TOKSo.js";const L={class:"h-[calc(100%-10px)]",flex:"","gap-5px":"","p-5px":"","flex-col":"","flex-items-center":""},C=m({__name:"ImportPage",setup(N){const u=x(),r=R(),a=String(u.query.url||""),p=c(!0),o=c("加载中...");return h(async()=>{if(!f(a)){b.error("非法URL参数"),await i(1e3),r.replace({path:"/"});return}await i(1e3);const s=l[a];if(s)if(await y.getItem(s)){r.replace({name:"snapshot",params:{snapshotId:s}});return}else delete l[a];n.start();try{const[t]=await D(a)??[];if(t.status=="fulfilled"){n.finish();const e=t.value;e!=null&&e.id?(l[a]=e.id,a.match(I)?U[e.id]=a:a.match(B)&&(k[e.id]=a),p.value=!1,await i(500),r.replace({name:"snapshot",params:{snapshotId:e.id}})):o.value="获取资源失败"}else throw t.reason}catch{n.error(),o.value="加载资源失败"}}),(s,t)=>(S(),d("div",L,[g(w("div",{"mt-40px":""},_(o.value),513),[[v,p.value]])]))}});export{C as default}; +//# sourceMappingURL=ImportPage-Fae4iEVk.js.map diff --git a/assets/ImportPage-wX1w62Qh.js.map b/assets/ImportPage-Fae4iEVk.js.map similarity index 98% rename from assets/ImportPage-wX1w62Qh.js.map rename to assets/ImportPage-Fae4iEVk.js.map index decf68e..893a1ae 100644 --- a/assets/ImportPage-wX1w62Qh.js.map +++ b/assets/ImportPage-Fae4iEVk.js.map @@ -1 +1 @@ -{"version":3,"file":"ImportPage-wX1w62Qh.js","sources":["../../src/views/ImportPage.vue"],"sourcesContent":["\n\n"],"names":["route","useRoute","router","useRouter","importUrl","String","query","url","loading","shallowRef","tip","onMounted","toValidURL","message","error","delay","replace","path","snapshotId","urlStorage","snapshotStorage","getItem","name","params","loadingBar","start","result","importFromNetwork","status","finish","snapshot","value","id","match","githubZipUrlReg","githubZipStorage","githubImageUrlReg","githubJpgStorage","reason"],"mappings":"+aAYA,MAAMA,EAAQC,IACRC,EAASC,IAETC,EAAYC,OAAOL,EAAMM,MAAMC,KAAQ,EAAC,EAExCC,EAAUC,EAAW,EAAI,EACzBC,EAAMD,EAAY,QAAO,EAE/BE,OAAAA,EAAU,SAAY,CACpB,GAAI,CAACC,EAAWR,CAAS,EAAG,CAC1BS,EAAQC,MAAO,SAAQ,EACvB,MAAMC,EAAM,GAAI,EAChBb,EAAOc,QAAQ,CACbC,KAAO,GACT,CAAC,EACD,MACF,CACA,MAAMF,EAAM,GAAI,EAChB,MAAMG,EAAaC,EAAWf,CAAS,EACvC,GAAIc,EAEF,GADiB,MAAME,EAAgBC,QAAQH,CAAU,EAC3C,CACZhB,EAAOc,QAAQ,CACbM,KAAM,WACNC,OAAQ,CAAEL,WAAAA,CAAW,CACvB,CAAC,EACD,MACF,MACE,OAAOC,EAAWf,CAAS,EAG/BoB,EAAWC,MAAK,EAChB,GAAI,CACF,KAAM,CAACC,CAAM,EAAK,MAAMC,EAAkBvB,CAAS,GAAM,GAEzD,GAAIsB,EAAOE,QAAU,YAAa,CAChCJ,EAAWK,OAAM,EACjB,MAAMC,EAAWJ,EAAOK,MACpBD,GAAAA,MAAAA,EAAUE,IACZb,EAAWf,CAAS,EAAI0B,EAASE,GAC7B5B,EAAU6B,MAAMC,CAAe,EACjCC,EAAiBL,EAASE,EAAE,EAAI5B,EACvBA,EAAU6B,MAAMG,CAAiB,IAC1CC,EAAiBP,EAASE,EAAE,EAAI5B,GAElCI,EAAQuB,MAAQ,GAChB,MAAMhB,EAAM,GAAG,EACfb,EAAOc,QAAQ,CACbM,KAAM,WACNC,OAAQ,CAAEL,WAAYY,EAASE,EAAG,CACpC,CAAC,GAEDtB,EAAIqB,MAAS,QAEjB,KACE,OAAML,EAAOY,MAEjB,MAAQ,CACNd,EAAWV,MAAK,EAChBJ,EAAIqB,MAAS,QACf,CACF,CAAC"} \ No newline at end of file +{"version":3,"file":"ImportPage-Fae4iEVk.js","sources":["../../src/views/ImportPage.vue"],"sourcesContent":["\n\n"],"names":["route","useRoute","router","useRouter","importUrl","String","query","url","loading","shallowRef","tip","onMounted","toValidURL","message","error","delay","replace","path","snapshotId","urlStorage","snapshotStorage","getItem","name","params","loadingBar","start","result","importFromNetwork","status","finish","snapshot","value","id","match","githubZipUrlReg","githubZipStorage","githubImageUrlReg","githubJpgStorage","reason"],"mappings":"+aAYA,MAAMA,EAAQC,IACRC,EAASC,IAETC,EAAYC,OAAOL,EAAMM,MAAMC,KAAQ,EAAC,EAExCC,EAAUC,EAAW,EAAI,EACzBC,EAAMD,EAAY,QAAO,EAE/BE,OAAAA,EAAU,SAAY,CACpB,GAAI,CAACC,EAAWR,CAAS,EAAG,CAC1BS,EAAQC,MAAO,SAAQ,EACvB,MAAMC,EAAM,GAAI,EAChBb,EAAOc,QAAQ,CACbC,KAAO,GACT,CAAC,EACD,MACF,CACA,MAAMF,EAAM,GAAI,EAChB,MAAMG,EAAaC,EAAWf,CAAS,EACvC,GAAIc,EAEF,GADiB,MAAME,EAAgBC,QAAQH,CAAU,EAC3C,CACZhB,EAAOc,QAAQ,CACbM,KAAM,WACNC,OAAQ,CAAEL,WAAAA,CAAW,CACvB,CAAC,EACD,MACF,MACE,OAAOC,EAAWf,CAAS,EAG/BoB,EAAWC,MAAK,EAChB,GAAI,CACF,KAAM,CAACC,CAAM,EAAK,MAAMC,EAAkBvB,CAAS,GAAM,GAEzD,GAAIsB,EAAOE,QAAU,YAAa,CAChCJ,EAAWK,OAAM,EACjB,MAAMC,EAAWJ,EAAOK,MACpBD,GAAAA,MAAAA,EAAUE,IACZb,EAAWf,CAAS,EAAI0B,EAASE,GAC7B5B,EAAU6B,MAAMC,CAAe,EACjCC,EAAiBL,EAASE,EAAE,EAAI5B,EACvBA,EAAU6B,MAAMG,CAAiB,IAC1CC,EAAiBP,EAASE,EAAE,EAAI5B,GAElCI,EAAQuB,MAAQ,GAChB,MAAMhB,EAAM,GAAG,EACfb,EAAOc,QAAQ,CACbM,KAAM,WACNC,OAAQ,CAAEL,WAAYY,EAASE,EAAG,CACpC,CAAC,GAEDtB,EAAIqB,MAAS,QAEjB,KACE,OAAML,EAAOY,MAEjB,MAAQ,CACNd,EAAWV,MAAK,EAChBJ,EAAIqB,MAAS,QACf,CACF,CAAC"} \ No newline at end of file diff --git a/assets/SnapshotPage-CmKtZTGi.js b/assets/SnapshotPage-owac59Kk.js similarity index 99% rename from assets/SnapshotPage-CmKtZTGi.js rename to assets/SnapshotPage-owac59Kk.js index 8ed16c6..e8e4459 100644 --- a/assets/SnapshotPage-CmKtZTGi.js +++ b/assets/SnapshotPage-owac59Kk.js @@ -1,4 +1,4 @@ -import{_ as z5,e as G5,f as $5}from"./ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js";import{f as Sy,c as Js,m as ca,b as U5,g as ME,e as yA,h as My,i as to,j as ro,k as _e,a as CE,l as j5,n as W5}from"./storage-I0hkGMKT.js";import{_ as vv,d as Vr,p as Ot,q as ur,v as Ba,x as er,y as dr,z as $r,A as Nc,B as X5,C as d1,D as Y5,E as Pc,G as h1,H as Tn,c as Dr,I as Xl,J as v1,K as p1,L as Gn,M as V5,O as kr,P as mA,Q as bA,S as xA,T as H5,U as ti,V as wu,W as K5,X as AE,Y as wA,Z as q5,$ as yo,a0 as Z5,a1 as Q5,a2 as J5,a3 as eB,a4 as tB,a5 as s0,a6 as rB,a7 as nB,a8 as u0,a9 as iB,aa as aB,ab as oB,ac as EA,ad as sB,w as fs,e as vl,ae as l0,af as TE,ag as gf,ah as IE,ai as Pf,a as _A,s as On,aj as pv,ak as ii,h as Ar,al as SA,am as Cy,an as uB,ao as lB,o as Lr,g as Lt,b as Vt,u as vt,f as bi,ap as $h,F as Hf,m as Hn,n as Ra,l as xn,i as MA,j as fB,k as Yu,aq as OE,ar as cB,N as dB}from"./index-KbMk1nPu.js";import{e as Rf,h as gv,C as hB,f as vB,g as pB,i as gB,V as yB,j as mB,k as LE,l as bB,m as kE,n as xB,d as pl,o as eu,p as wB,c as DE,q as NE,r as EB,N as _B,a as SB,s as Uh,t as MB,v as PE,w as RE,x as CB}from"./node-nnk68Gjj.js";import{e as BE,p as AB,a as TB,l as IB,u as OB}from"./index-AzMi55Pv.js";import"./jszip.min-Er0t4O-W.js";function LB(r,t){for(var e=0;en[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const g1=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return wa},get Circle(){return hV},get Ellipse(){return vV},get Image(){return pV},get Line(){return gV},get Marker(){return mV},get Path(){return vb},get Polygon(){return MV},get Polyline(){return CV},get Rect(){return IV},get Text(){return OV}},Symbol.toStringTag,{value:"Module"})),y1=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return na},get Circle(){return NV},get Dom(){return PV},get Ellipse(){return RV},get Image(){return BV},get Line(){return FV},get Marker(){return zV},get Path(){return GV},get Polygon(){return $V},get Polyline(){return UV},get Rect(){return WV},get Text(){return HV}},Symbol.toStringTag,{value:"Module"}));function CA(r){return typeof r=="string"?`s-${r}`:`n-${r}`}function Ay(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);en[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const g1=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return wa},get Circle(){return hV},get Ellipse(){return vV},get Image(){return pV},get Line(){return gV},get Marker(){return mV},get Path(){return vb},get Polygon(){return MV},get Polyline(){return CV},get Rect(){return IV},get Text(){return OV}},Symbol.toStringTag,{value:"Module"})),y1=Object.freeze(Object.defineProperty({__proto__:null,get Base(){return na},get Circle(){return NV},get Dom(){return PV},get Ellipse(){return RV},get Image(){return BV},get Line(){return FV},get Marker(){return zV},get Path(){return GV},get Polygon(){return $V},get Polyline(){return UV},get Rect(){return WV},get Text(){return HV}},Symbol.toStringTag,{value:"Module"}));function CA(r){return typeof r=="string"?`s-${r}`:`n-${r}`}function Ay(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e `).concat(d,` - `)}},t.prototype.init=function(){var e=this;if(!e.destroyed){var n=e.get("graph"),i=n.getContainer(),a=e.get("container"),o=this.get("containerCfg");o?(a=this.createContainer(),i.appendChild(a)):a=i,this.set("container",a);var s=i.getBoundingClientRect(),u=new Io({container:i,width:s.right-s.left,height:s.bottom-s.top});tr(u.get("el"),{position:"absolute",top:0,left:0,pointerEvents:"none"}),window.addEventListener("resize",Fc(function(){return e.resizeCanvas(e)},100));var l=u.addGroup({id:"annotation-link-group"});e.set("linkGroup",l),e.set("canvas",u),e.get("getTitle")||e.set("getTitle",function(c){var d,h=((d=c==null?void 0:c.getModel)===null||d===void 0?void 0:d.call(c))||{},v=h.label,p=h.id;return v||p||"-"}),e.get("getContent")||e.set("getContent",function(c){var d,h;if(!c)return"-";var v=((d=c.getModel)===null||d===void 0?void 0:d.call(c))||{},p=v.label,g=v.id,y=(h=c.getType)===null||h===void 0?void 0:h.call(c),m=y?"".concat(y,": "):"";return"".concat(m).concat(p||g||"")});var f=e.get("defaultData");f&&this.readData(f)}},t.prototype.createContainer=function(){var e=this;if(!this.destroyed){var n=this.get("containerCfg"),i=this.get("graph"),a=i.getContainer(),o=a.getBoundingClientRect(),s=o.left,u=o.right,l=o.top,f=o.bottom,c=f-l,d=u-s,h=n.position,v=h===void 0?"top":h,p=n.offsetX,g=p===void 0?0:p,y=n.offsetY,m=y===void 0?0:y,b=KC(n,["position","offsetX","offsetY"]),x=n.height,w=x===void 0?"fit-content":x,E=n.width,_=E===void 0?i.getWidth():E;w==="100%"&&(w=c),_==="100%"&&(_=d);var M="unset",C="unset",S={};switch(v){case"right":M="".concat(c,"px"),S={top:0,right:0},S.right+=s+g,S.top+=l+m;break;case"bottom":C="".concat(d,"px"),S={bottom:0,left:0},S.left+=s+g,S.bottom+=l+m;break;case"top":C="".concat(d,"px");case"left":M="".concat(c,"px");default:S={top:0,left:0},S.left+=s+g,S.top+=l+m;break}Object.keys(S).forEach(function(T){S[T]="".concat(S[T],"px")});var A=Ur("
"));return tr(A,Hi(Hi({position:"absolute",display:v==="top"||v==="bottom"?"inline-flex":"unset",width:mt(_)?"".concat(_,"px"):_,height:mt(w)?"".concat(w,"px"):w,maxHeight:M,maxWidth:C,overflow:"scroll"},S),b)),a.appendChild(A),A.addEventListener("scroll",function(T){e.updateLinks()}),A}},t.prototype.resizeCanvas=function(e){clearTimeout(e.resizeTimer),e.resizeTimer=setTimeout(function(){if(!(!e||e.destroyed)){var n=e.get("container").getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top;e.get("canvas").changeSize(i,a),e.updateOutsideCards(e)}},250)},t.prototype.updateOutsideCards=function(e){var n=e||this,i=n.get("cardInfoMap")||{},a=n.get("graph"),o=a.getPointByCanvas(0,0),s=a.getPointByCanvas(a.getWidth(),a.getHeight()),u=a.getClientByPoint(o.x,o.y),l=u.x,f=u.y,c=a.getClientByPoint(s.x,s.y),d=c.x,h=c.y;Object.values(i).forEach(function(v){var p=v.card;if(p){var g=p.style,y=Vs(g.left),m=Vs(g.top),b=p.getBoundingClientRect(),x=b.width,w=b.height,E=y,_=m;y+x>d-l&&(E=d-l-x),y<0&&(E=0),m+w>h-f&&(_=h-f-w),m<0&&(_=0),tr(p,{left:"".concat(E,"px"),top:"".concat(_,"px")})}}),n.updateLinks()},t.prototype.showAnnotation=function(e){if(!this.destroyed){var n=e.item;this.toggleAnnotation(n)}},t.prototype.hideCards=function(){var e=this;if(!e.destroyed){var n=e.get("cardInfoMap")||{};Object.keys(n).forEach(function(i){e.hideCard(i)})}},t.prototype.toggleAnnotation=function(e,n){var i,a;n===void 0&&(n={});var o=this;if(!o.destroyed){var s=o.get("cardInfoMap")||{},u=o.get("graph"),l=o.get("container"),f=o.get("containerCfg"),c=Object.assign({},o.get("cardCfg")||{},n),d=c.minHeight,h=c.minWidth,v=c.width,p=c.height,g=c.collapsed,y=g===void 0?!1:g,m=c.x,b=c.y,x=c.title,w=c.content,E=c.maxTitleLength,_=c.defaultBegin,M=KC(c,["minHeight","minWidth","width","height","collapsed","x","y","title","content","maxTitleLength","defaultBegin"]),C=o.get("linkGroup"),S=this.get("rows")||[[]],A=(i=e.isCanvas)===null||i===void 0?void 0:i.call(e),T=A?qC:e.getID(),I=s[T]||{},k=I.card,P=I.link,N=I.x,z=I.y,W=I.title,D=I.content,R=this.get("getTitle"),H=this.get("getContent"),ee=this.get("getContentPlaceholder")||function(){return""},Y=this.get("getTitlePlaceHolder")||function(){return""},X=ee(e),fe=Y(e),we=Ur(this.getDOMContent(Hi({itemId:T,collapsed:y,title:((a=W||x||(R==null?void 0:R(e)))===null||a===void 0?void 0:a.substr(0,E))||fe,content:D||w||(H==null?void 0:H(e))||X},M))),Ae=mt(d)?"".concat(d,"px"):d;tr(we,{minHeight:y?"unset":Ae,minWidth:mt(h)?"".concat(h,"px"):h,height:p,width:v});var Ke=!!k;Ke?(P==null||P.remove(!0),l.replaceChild(we,k)):l.appendChild(we);var ot;if(!f){if(ot=l.getBoundingClientRect()||{},m!==void 0&&b!==void 0)N=m,z=b;else if(!Ke&&!A){var nt=ot.top,Ct=_||{},Et=Ct.left,fr=Ct.right,Gt=fr===void 0?16:fr,jt=Ct.top,Sr=jt===void 0?8:jt,rr=Ct.bottom,Rt=Gt,sr=Sr;isNaN(Et)||(Rt=l.scrollWidth-Et),isNaN(rr)||(sr=l.scrollHeight-rr);var Hr=mt(h)?h:100;N=l.scrollWidth-we.scrollWidth-(S.length-1)*Hr-Rt;var et=S[S.length-1],ie=(et[et.length-1]||{}).bbox;z=(ie==null?void 0:ie.bottom)-nt||sr}tr(we,{position:"absolute",left:"".concat(N,"px"),top:"".concat(z,"px"),cusor:f?"unset":"move"})}this.bindListener(we,T);var L=we.getBoundingClientRect();if(!A){var Se=Ey(e,L,u,this.get("canvas")),Pe=this.get("linkStyle");P=C.addShape("path",{attrs:Hi({lineWidth:1,lineDash:[5,5],stroke:"#ccc",path:Se},Pe)})}if(s[T]=Hi(Hi({},s[T]||{}),{id:T,collapsed:y,card:we,link:P,x:N,y:z,cardBBox:L,content:D||w,title:W||x,contentPlaceholder:X,titlePlaceholder:fe,isCanvas:A}),o.set("cardInfoMap",s),f)this.updateCardPositionsInConatainer(),this.updateLinks();else{var me=!isNaN(m)&&!isNaN(b);if(!Ke&&!A&&!me){var je=ot.bottom,Xe=je===void 0?0:je,nt=ot.top;S[S.length-1].push({id:T,bbox:L}),L.top>Xe-nt-L.height-16&&S.push([]),this.set("rows",S)}}this.updateCardSize(T);var qe=this.get("onAnnotationChange");qe==null||qe(s[T],Ke?"update":"create")}},t.prototype.updateCardPositionsInConatainer=function(){if(!this.destroyed){var e=this.get("cardInfoMap");if(e){var n=this.get("container"),i=this.get("containerCfg").position,a=n.getBoundingClientRect().width,o=getComputedStyle(n),s=Vs(o.paddingLeft)+Vs(o.paddingRight);a-=s,Object.values(e).forEach(function(u){var l=u.card,f=l.getBoundingClientRect().width;switch(i){case"right":tr(l,{marginLeft:a?"".concat(a-f,"px"):"0px"});break;case"top":case"bottom":tr(l,{marginLeft:"8px"})}})}}},t.prototype.handleExpandCollapseCard=function(e){if(!this.destroyed){var n=this.get("graph"),i=this.get("cardInfoMap");if(i){var a=i[e].collapsed,o=n.findById(e);if(o){var s=this.get("cardCfg").collapseType;s==="hide"&&!a?this.hideCard(e):this.toggleAnnotation(o,{collapsed:!a}),i[e]=Hi(Hi({},i[e]),{collapsed:!a})}}}},t.prototype.hideCard=function(e){if(!this.destroyed){var n=this.get("cardInfoMap");if(!(!n||!n[e])){var i=n[e],a=i.card,o=i.link;tr(a,{display:"none"}),o==null||o.hide();var s=this.get("onAnnotationChange");s(n[e],"hide")}}},t.prototype.removeCard=function(e){if(!this.destroyed){var n=this.get("cardInfoMap");if(n){var i=n[e],a=i.card,o=i.link,s=this.get("container");s.removeChild(a),o==null||o.remove(!0),delete n[e];var u=this.get("onAnnotationChange");u(i,"remove")}}},t.prototype.bindListener=function(e,n){var i=this;if(!this.destroyed){e.addEventListener("mousemove",function(u){var l;if(u.target.className==="g6-annotation-collapse"?l="collapse":u.target.className==="g6-annotation-expand"?l="expand":u.target.className==="g6-annotation-close"&&(l="close"),l){var f=i.get("cardCfg").onMouseEnterIcon,c=f===void 0?function(){}:f;c(u,n,l)}}),e.addEventListener("mouseout",function(u){var l;if(u.target.className==="g6-annotation-collapse"?l="collapse":u.target.className==="g6-annotation-expand"?l="expand":u.target.className==="g6-annotation-close"&&(l="close"),l){var f=i.get("cardCfg").onMouseLeaveIcon,c=f===void 0?function(){}:f;c(u,n,l)}}),e.addEventListener("mouseenter",function(u){var l=i.get("cardInfoMap");if(l){var f=i.get("graph"),c=f.findById(n);if(c){var d=i.get("itemHighlightState");f.setItemState(c,d,!0)}var h=l[n].link;if(h){var v=i.get("linkHighlightStyle")||{};h.attr(v)}}}),e.addEventListener("mouseleave",function(u){var l=i.get("cardInfoMap");if(l){var f=i.get("graph"),c=f.findById(n);if(c){var d=i.get("itemHighlightState");f.setItemState(c,d,!1)}var h=l[n].link;if(h){var v=i.get("linkHighlightStyle")||{};Object.keys(v).forEach(function(g){h.attr(g,void 0),h.attr(g,void 0)});var p=i.get("linkStyle");h.attr(p)}}}),e.addEventListener("click",function(u){var l=(i.get("cardCfg")||{}).onClickIcon;if(u.target.className==="g6-annotation-collapse"||u.target.className==="g6-annotation-expand"){var f=i.get("cardCfg").collapseType;f==="hide"?i.hideCard(n):i.handleExpandCollapseCard(n),l==null||l(u,n,u.target.className==="g6-annotation-collapse"?"collapse":"expand")}else if(u.target.className==="g6-annotation-close"){var c=i.get("cardCfg").closeType;c==="remove"?i.removeCard(n):i.hideCard(n),l==null||l(u,n,"close")}});var a=this.get("editable");a&&e.addEventListener("dblclick",function(u){var l=i.get("cardInfoMap"),f=(i.get("cardCfg")||{}).maxTitleLength,c=f===void 0?20:f;if(l){var d=u.target,h=d.className;if(!(h!=="g6-annotation-title"&&h!=="g6-annotation-content")){var v=h==="g6-annotation-title"?d.getBoundingClientRect():d.parentNode.getBoundingClientRect(),p=v.width,g=v.height,y=getComputedStyle(d),m=h==="g6-annotation-title"?"input":"textarea",b=Ur("<".concat(m,' class="').concat(h,'-input" type="textarea" style="width:').concat(p,"px; height: ").concat(g,'px; min-width: 16px;"/>')),x=Ur('
'));x.appendChild(b),d.parentNode.replaceChild(x,d);var w=l[n],E=w.contentPlaceholder,_=w.titlePlaceholder,M=w.content,C=w.title,S=M;h==="g6-annotation-title"?(b.name="title",b.maxLength=c,S=C):b.name="content",S?(b.innerHTML=d.innerHTML,b.value=d.innerHTML):b.placeholder=h==="g6-annotation-title"?_:E,b.focus(),b.addEventListener("blur",function(A){b.value&&(d.innerHTML=b.value,w[b.name||"title"]=b.value),x.parentNode.replaceChild(d,x),i.updateCardSize(n);var T=i.get("onAnnotationChange");T==null||T(w,"update")})}}});var o=["g6-annotation-title","g6-annotation-content","g6-annotation-title-input","g6-annotation-content-input"];e.draggable=!0,e.addEventListener("dragstart",function(u){var l=u.target.className;if(!o.includes(l)){var f=e.style;i.set("dragging",{card:e,x:u.clientX,y:u.clientY,left:Vs(f.left),top:Vs(f.top)})}}),e.addEventListener("drag",function(u){u.preventDefault();var l=i.get("cardInfoMap");if(l){var f=u.clientX,c=u.clientY,d=i.get("dragging");if(!(isNaN(f)||isNaN(c)||!d)){var h=d.x,v=d.y,p=d.left,g=d.top,y=d.card,m=f-h,b=c-v;p+=m,g+=b;var x=i.get("graph"),w=x.getPointByCanvas(0,0),E=x.getPointByCanvas(x.getWidth(),x.getHeight()),_=x.getClientByPoint(w.x,w.y),M=_.x,C=_.y,S=x.getClientByPoint(E.x,E.y),A=S.x,T=S.y,I=y.getBoundingClientRect(),k=I.right-I.left,P=I.bottom-I.top;(p>A-M-k&&m>0||p<0&&m<0)&&(p-=m),(g>T-C-P&&b>0||g<0&&b<0)&&(g-=b),tr(y,{left:"".concat(p,"px"),top:"".concat(g,"px"),visibility:"hidden"}),h=f,v=c;var N=(l[n]||{}).link;if(N){var z=x.findById(n);N.attr("path",Ey(z,I,x,i.get("canvas")))}i.set("dragging",{x:h,y:v,left:p,top:g,card:y})}}});var s=function(l){var f=i.get("cardInfoMap");if(f){var c=i.get("dragging");if(c){var d=c.left,h=c.top,v=c.card;f[n].x=d,f[n].y=h,tr(v,{visibility:"visible"}),i.set("dragging",!1);var p=i.get("rows");p==null||p.forEach(function(y){for(var m=y.length-1;m>=0;m--)y[m].id===n&&y.splice(m,1)});var g=i.get("onAnnotationChange");g==null||g(f[n],"update")}}};e.addEventListener("dragend",s)}},t.prototype.updateCardSize=function(e){var n=this.get("cardInfoMap");if(n){var i=n[e].card,a=i.getBoundingClientRect().width,o=i.getElementsByClassName("g6-annotation-title")[0];if(o){var s=getComputedStyle(o),u=Vs(s.marginLeft),l=o.getBoundingClientRect().width;tr(o,{marginRight:"".concat(a-u-24-16-l,"px")})}}},t.prototype.updateLink=function(e){var n=e.item;if(n){var i=this.get("cardInfoMap");if(i){var a=this.get("canvas"),o=this.get("graph"),s=n.getID(),u=i[s]||{},l=u.link,f=u.card;if(l){var c=Ey(n,f.getBoundingClientRect(),o,a);l.attr("path",c)}}}},t.prototype.updateLinks=function(){var e=this;if(!this.destroyed){var n=this.get("cardInfoMap");if(n){var i=this.get("graph");Object.values(n).forEach(function(a){var o=a.id,s=i.findById(o);e.updateLink({item:s})})}}},t.prototype.onGraphDataChange=function(){var e=this,n=this.get("cardInfoMap");if(n){var i=this.get("graph");Object.values(n).forEach(function(a){var o=a.id,s=a.card,u=a.isCanvas;if(!(!s||u||s.style.display==="none")){var l=i.findById(o);l&&l.isVisible()?e.toggleAnnotation(l):e.hideCard(o)}})}},t.prototype.onGraphItemVisibilityChange=function(e){var n=e.item,i=e.visible;if(!(!n||n.destroyed)){var a=this.get("cardInfoMap");if(a){var o=n.getID();a[o]&&(i||this.hideCard(o))}}},t.prototype.saveData=function(e){e===void 0&&(e=!1);var n=this.get("cardInfoMap");if(n){var i=this.get("graph"),a=this.get("getTitle"),o=this.get("getContent"),s=[];return Object.values(n).forEach(function(u){var l=u.title,f=u.content,c=u.x,d=u.y,h=u.id,v=u.collapsed,p=u.card;if(!(p&&p.style.display==="none"&&!e)){var g=i.findById(h)||i.get("canvas");s.push({id:h,x:c,y:d,collapsed:v,title:l||(a==null?void 0:a(g)),content:f||(o==null?void 0:o(g)),visible:p&&p.style.display!=="none"})}}),s}},t.prototype.readData=function(e){var n=this,i=this.get("graph");e.forEach(function(a){var o=a.id,s=a.x,u=a.y,l=a.title,f=a.content,c=a.collapsed,d=a.visible,h=i.findById(o);if(!h&&o===qC&&(h=i.get("canvas")),!h){var v=n.get("cardInfoMap")||{};v[o]=a,n.set("cardInfoMap",v);return}n.toggleAnnotation(h,{x:s,y:u,title:l,content:f,collapsed:c}),d||n.hideCard(o)})},t.prototype.clear=function(){var e=this.get("cardInfoMap");if(e){var n=this.get("container");Object.values(e).forEach(function(i){var a=i.card,o=i.link;n.removeChild(a),o==null||o.remove(!0)}),this.set("cardInfoMap",{})}},t.prototype.destroy=function(){var e;this.clear(),(e=this.get("canvas"))===null||e===void 0||e.destroy();var n=this.get("graph");!n||n.destroyed||(this.get("containerCfg")&&n.getContainer().removeChild(this.get("container")),this.destroyed=!0)},t}(Mi);const _ge=Ege;var Sge=function(t,e){var n,i,a=1/0;Object.keys(t).forEach(function(u){var l=t[u];Object.keys(e).forEach(function(f){var c=e[f],d=l.x-c.x,h=l.y-c.y,v=d*d+h*h;a>v&&(a=v,n=l,i=c)})});var o=20,s=Kn.getControlPoint(n,i,.5,o);return[["M",n.x,n.y],["Q",s.x,s.y,i.x,i.y]]},Ey=function(t,e,n,i){var a,o,s=t.getType();if(s==="edge")o=[t.getKeyShape().getPoint(.5)];else{var u=(a=t.getKeyShape)===null||a===void 0?void 0:a.call(t).getBBox(),l=u.minX,f=u.minY,c=u.maxX,d=u.maxY,h=t.getModel(),v=h.x,p=h.y;l+=v,f+=p,c+=v,d+=p,o={left:{x:l,y:(f+d)/2},right:{x:c,y:(f+d)/2},top:{x:(l+c)/2,y:f},bottom:{x:(l+c)/2,y:d}}}Object.keys(o).forEach(function(C){var S=o[C],A=S.x,T=S.y,I=n.getClientByPoint(A,T);o[C]=i.getPointByClient(I.x,I.y)});var g=e.top,y=g===void 0?0:g,m=e.left,b=m===void 0?0:m,x=e.right,w=x===void 0?0:x,E=e.bottom,_=E===void 0?0:E,M={left:i.getPointByClient(b,(y+_)/2),right:i.getPointByClient(w,(y+_)/2),top:i.getPointByClient((b+w)/2,y),bottom:i.getPointByClient((b+w)/2,_)};return Sge(o,M)},Vs=function(t){return Number(t.replace(/\s+|px/gi,""))||0},Li={PluginBase:Mi,Menu:Hhe,Grid:Uhe,Minimap:tve,Bundling:ave,ToolBar:dve,Tooltip:pve,Fisheye:uve,TimeBar:rge,ImageMinimap:sge,EdgeFilterLens:cge,SnapLine:gge,Legend:xge,Annotation:_ge};Bo("circle",{options:{size:it.defaultNode.size,style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"circle",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=Pr({},i,t.icon),s="".concat(this.type,"-keyShape"),u=e.addShape("circle",{attrs:a,className:s,name:s,draggable:!0});e.shapeMap[s]=u;var l=o.width,f=o.height,c=o.show,d=o.text;if(c){var h="".concat(this.type,"-icon");d?e.shapeMap[h]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},o),className:h,name:h,draggable:!0}):e.shapeMap[h]=e.addShape("image",{attrs:F({x:-l/2,y:-f/2},o),className:h,name:h,draggable:!0})}return this.drawLinkPoints(t,e),u},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints;if(n){var i=n||{},a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0]/2;if(o){var v="link-point-left";e.shapeMap[v]=e.addShape("circle",{attrs:F(F({},c),{x:-h,y:0,r:l/2||f||5}),className:v,name:v,isAnchorPoint:!0})}if(s){var p="link-point-right";e.shapeMap[p]=e.addShape("circle",{attrs:F(F({},c),{x:h,y:0,r:l/2||f||5}),className:p,name:p,isAnchorPoint:!0})}if(a){var g="link-point-top";e.shapeMap[g]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-h,r:l/2||f||5}),className:g,name:g,isAnchorPoint:!0})}if(u){var y="link-point-bottom";e.shapeMap[y]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:h,r:l/2||f||5}),className:y,name:y,isAnchorPoint:!0})}}},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Pr({},e,n),a=this.getSize(t),o=a[0]/2,s=F({x:0,y:0,r:o},i);return s},update:function(t,e,n){var i=e.getContainer(),a=this.getSize(t),o=F({},t.style);t.style.stroke===void 0&&t.color&&(o.stroke=t.color),t.style.r===void 0&&!isNaN(a[0])&&(o.r=a[0]/2),this.updateShape(t,e,o,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("rect",{options:{size:[100,30],style:{radius:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},anchorPoints:[[0,.5],[1,.5]],stateStyles:F({},it.nodeStateStyles)},shapeType:"rect",labelPosition:"center",drawShape:function(t,e){var n=this.getShapeStyle(t),i=e.addShape("rect",{attrs:n,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});return e.shapeMap["".concat(this.type,"-keyShape")]=i,this.drawLinkPoints(t,e),i},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=i.width||a[0],s=i.height||a[1],u=F({x:-o/2,y:-s/2,width:o,height:s},i);return u},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getSize(t),s=e.get("keyShape");t.size||(o[0]=s.attr("width")||a.width,o[1]=s.attr("height")||a.height);var u={stroke:t.color,x:-o[0]/2,y:-o[1]/2,width:o[0],height:o[1]},l=Mt({},a,s.attr(),u);l=Mt(l,t.style),this.updateShape(t,e,l,!1,n),this.updateLinkPoints(t,i)}},"single-node");Bo("ellipse",{options:{size:[80,40],style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"ellipse",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("ellipse",{attrs:a,className:"ellipse-keyShape",name:"ellipse-keyShape",draggable:!0});e.shapeMap["ellipse-keyShape"]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0]/2,v=d[1]/2;o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=a[0]/2,s=a[1]/2,u=F({x:0,y:0,rx:o,ry:s},i);return u},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getSize(t),s={stroke:t.color,rx:o[0]/2,ry:o[1]/2},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("diamond",{options:{size:[80,80],style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"diamond",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("path",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getPath:function(t){var e=this.getSize(t),n=e[0],i=e[1],a=[["M",0,-i/2],["L",n/2,0],["L",0,i/2],["L",-n/2,0],["Z"]];return a},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("triangle",{options:{size:40,direction:"up",style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize},offset:15},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20,offset:6},stateStyles:F({},it.nodeStateStyles)},shapeType:"triangle",labelPosition:"bottom",drawShape:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.icon,a=i===void 0?{}:i,o=n.direction,s=this.getShapeStyle(t),u=t.direction||o,l=e.addShape("path",{attrs:s,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=l;var f=a.width,c=a.height,d=a.show,h=a.offset,v=a.text;if(d)if(v)e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},a),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0});else{var p=-f/2,g=-c/2;(u==="up"||u==="down")&&(g+=h),(u==="left"||u==="right")&&(p+=h),e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:p,y:g},a),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})}return this.drawLinkPoints(t,e),l},drawLinkPoints:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.linkPoints,a=i===void 0?{}:i,o=n.direction,s=t.direction||o,u=a.top,l=a.left,f=a.right,c=a.bottom,d=a.size,h=a.r,v=Ln(a,["top","left","right","bottom","size","r"]),p=this.getSize(t),g=p[0];if(l){var y=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?y=[-b,m]:s==="down"?y=[-b,-m]:s==="left"&&(y=[-b,b-m]),y&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},v),{x:y[0],y:y[1],r:d/2||h||5}),className:"link-point-left",name:"link-point-left"}))}if(f){var x=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?x=[b,m]:s==="down"?x=[b,-m]:s==="right"&&(x=[b,b-m]),x&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},v),{x:x[0],y:x[1],r:d/2||h||5}),className:"link-point-right",name:"link-point-right"}))}if(u){var w=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?w=[b-m,-m]:s==="left"?w=[b,-m]:s==="right"&&(w=[-b,-m]),w&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},v),{x:w[0],y:w[1],r:d/2||h||5}),className:"link-point-top",name:"link-point-top"}))}if(c){var E=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="down"?E=[-b+m,m]:s==="left"?E=[b,m]:s==="right"&&(E=[-b,m]),E&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},v),{x:E[0],y:E[1],r:d/2||h||5}),className:"link-point-bottom",name:"link-point-bottom"}))}},getPath:function(t){var e=(this.mergeStyle||this.getOptions(t)).direction,n=t.direction||e,i=this.getSize(t),a=i[0],o=a*Math.sin(1/3*Math.PI),s=a*Math.sin(1/3*Math.PI),u=[["M",-s,o],["L",0,-o],["L",s,o],["Z"]];return n==="down"?u=[["M",-s,-o],["L",s,-o],["L",0,o],["Z"]]:n==="left"?u=[["M",-s,s-o],["L",s,-s],["L",s,s],["Z"]]:n==="right"&&(u=[["M",s,s-o],["L",-s,s],["L",-s,-s],["Z"]]),u},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)},updateLinkPoints:function(t,e){var n=this.getOptions({}),i=n.linkPoints,a=n.direction,o=t.direction||a,s=e.shapeMap["link-point-left"]||e.find(function(N){return N.get("className")==="link-point-left"}),u=e.shapeMap["link-point-right"]||e.find(function(N){return N.get("className")==="link-point-right"}),l=e.shapeMap["link-point-top"]||e.find(function(N){return N.get("className")==="link-point-top"}),f=e.shapeMap["link-point-bottom"]||e.find(function(N){return N.get("className")==="link-point-bottom"}),c=i,d=s||u||l||f;d&&(c=d.attr());var h=Mt({},c,t.linkPoints),v=h.fill,p=h.stroke,g=h.lineWidth,y=h.size/2;y||(y=h.r);var m=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,bottom:void 0},b=m.left,x=m.right,w=m.top,E=m.bottom,_=this.getSize(t),M=_[0],C={r:y,fill:v,stroke:p,lineWidth:g},S=null,A=M*Math.sin(1/3*Math.PI),T=M*Math.sin(1/3*Math.PI);o==="up"?S=[-T,A]:o==="down"?S=[-T,-A]:o==="left"&&(S=[-T,T-A]),S&&(s?!b&&b!==void 0?(s.remove(),delete e.shapeMap["link-point-left"]):s.attr(F(F({},C),{x:S[0],y:S[1]})):b&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},C),{x:S[0],y:S[1]}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})));var I=null;o==="up"?I=[T,A]:o==="down"?I=[T,-A]:o==="right"&&(I=[T,T-A]),I&&(u?!x&&x!==void 0?(u.remove(),delete e.shapeMap["link-point-right"]):u.attr(F(F({},C),{x:I[0],y:I[1]})):x&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},C),{x:I[0],y:I[1]}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})));var k=null;o==="up"?k=[T-A,-A]:o==="left"?k=[T,-A]:o==="right"&&(k=[-T,-A]),k&&(l?!w&&w!==void 0?(l.remove(),delete e.shapeMap["link-point-top"]):l.attr(F(F({},C),{x:k[0],y:k[1]})):w&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},C),{x:k[0],y:k[1]}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})));var P=null;o==="down"?P=[-T+A,A]:o==="left"?P=[T,A]:o==="right"&&(P=[-T,A]),P&&(f?!E&&E!==void 0?(f.remove(),delete e.shapeMap["link-point-bottom"]):f.attr(F(F({},C),{x:P[0],y:P[1]})):E&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},C),{x:P[0],y:P[1]}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0})))}},"single-node");Bo("modelRect",{options:{size:[185,70],style:{radius:5,stroke:"#69c0ff",fill:"#ffffff",lineWidth:it.defaultNode.style.lineWidth,fillOpacity:1},labelCfg:{style:{fill:"#595959",fontSize:14,fontFamily:it.windowFontFamily},offset:30},descriptionCfg:{style:{fontSize:12,fill:"#bfbfbf",fontFamily:it.windowFontFamily},paddingTop:0},preRect:{show:!0,width:4,fill:"#40a9ff",radius:2},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:10,lineWidth:1,fill:"#72CC4A",stroke:"#72CC4A"},logoIcon:{show:!0,x:0,y:0,img:"https://gw.alipayobjects.com/zos/basement_prod/4f81893c-1806-4de4-aff3-9a6b266bc8a2.svg",width:16,height:16,offset:0},stateIcon:{show:!0,x:0,y:0,img:"https://gw.alipayobjects.com/zos/basement_prod/300a2523-67e0-4cbf-9d4a-67c077b40395.svg",width:16,height:16,offset:-5},anchorPoints:[[0,.5],[1,.5]]},shapeType:"modelRect",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).preRect,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=this.getSize(t),s=o[0],u=o[1],l=e.addShape("rect",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=l;var f=i.show,c=Ln(i,["show"]);return f&&(e.shapeMap["pre-rect"]=e.addShape("rect",{attrs:F({x:-s/2,y:-u/2,height:u},c),className:"pre-rect",name:"pre-rect",draggable:!0})),this.drawLogoIcon(t,e),this.drawStateIcon(t,e),this.drawLinkPoints(t,e),l},drawLogoIcon:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).logoIcon,i=n===void 0?{}:n,a=this.getSize(t),o=a[0];if(i.show){var s=i.width,u=i.height,l=i.x,f=i.y,c=i.offset,d=i.text,h=Ln(i,["width","height","x","y","offset","text"]);d?e.shapeMap["rect-logo-icon"]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},h),className:"rect-logo-icon",name:"rect-logo-icon",draggable:!0}):e.shapeMap["rect-logo-icon"]=e.addShape("image",{attrs:F(F({},h),{x:l||-o/2+s+c,y:f||-u/2,width:s,height:u}),className:"rect-logo-icon",name:"rect-logo-icon",draggable:!0})}},drawStateIcon:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).stateIcon,i=n===void 0?{}:n,a=this.getSize(t),o=a[0];if(i.show){var s=i.width,u=i.height,l=i.x,f=i.y,c=i.offset,d=i.text,h=Ln(i,["width","height","x","y","offset","text"]);d?e.shapeMap["rect-state-icon"]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},h),className:"rect-state-icon",name:"rect-state-icon",draggable:!0}):e.shapeMap["rect-state-icon"]=e.addShape("image",{attrs:F(F({},h),{x:l||o/2-s+c,y:f||-u/2,width:s,height:u}),className:"rect-state-icon",name:"rect-state-icon",draggable:!0})}},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},drawLabel:function(t,e){var n=this.getOptions(t),i=n.labelCfg,a=i===void 0?{}:i,o=n.logoIcon,s=o===void 0?{}:o,u=n.descriptionCfg,l=u===void 0?{}:u,f=this.getSize(t),c=f[0],d=null,h=s.show,v=s.width,p=-c/2+a.offset;h&&(p=-c/2+v+a.offset);var g=a.style,y=l.style,m=l.paddingTop;return Fe(t.description)?(d=e.addShape("text",{attrs:F(F({},g),{x:p,y:-5,text:t.label}),className:"text-shape",name:"text-shape",draggable:!0,labelRelated:!0}),e.shapeMap["text-shape"]=d,e.shapeMap["rect-description"]=e.addShape("text",{attrs:F(F({},y),{x:p,y:17+(m||0),text:t.description}),className:"rect-description",name:"rect-description",draggable:!0,labelRelated:!0})):(d=e.addShape("text",{attrs:F(F({},g),{x:p,y:7,text:t.label}),className:"text-shape",name:"text-shape",draggable:!0,labelRelated:!0}),e.shapeMap["text-shape"]=d),d},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=i.width||a[0],s=i.height||a[1],u=F({x:-o/2,y:-s/2,width:o,height:s},i);return u},update:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.style,a=i===void 0?{}:i,o=n.labelCfg,s=o===void 0?{}:o,u=n.descriptionCfg,l=u===void 0?{}:u,f=this.getSize(t),c=f[0],d=f[1],h=e.get("keyShape");h.attr(F(F({},a),{x:-c/2,y:-d/2,width:c,height:d}));var v=e.getContainer(),p=v.shapeMap["rect-logo-icon"]||v.find(function(we){return we.get("className")==="rect-logo-icon"}),g=p?p.attr():{},y=Mt({},g,t.logoIcon),m=y.width;m===void 0&&(m=this.options.logoIcon.width);var b=t.logoIcon?t.logoIcon.show:void 0,x=s.offset,w=-c/2+m+x;!b&&b!==void 0&&(w=-c/2+x);var E=v.shapeMap["node-label"]||v.find(function(we){return we.get("className")==="node-label"}),_=v.shapeMap["rect-description"]||v.find(function(we){return we.get("className")==="rect-description"});if(t.label)if(!E)v.shapeMap["node-label"]=v.addShape("text",{attrs:F(F({},s.style),{x:w,y:t.description?-5:7,text:t.label}),className:"node-label",name:"node-label",draggable:!0,labelRelated:!0});else{var M=t.labelCfg?t.labelCfg.style:{},C=Mt({},E.attr(),M);t.label&&(C.text=t.label),C.x=w,Fe(t.description)&&(C.y=-5),_&&(_.resetMatrix(),_.attr({x:w})),E.resetMatrix(),E.attr(C)}if(Fe(t.description)){var S=l.paddingTop;if(!_)v.shapeMap["rect-description"]=v.addShape("text",{attrs:F(F({},l.style),{x:w,y:17+(S||0),text:t.description}),className:"rect-description",name:"rect-description",draggable:!0,labelRelated:!0});else{var M=t.descriptionCfg?t.descriptionCfg.style:{},A=Mt({},_.attr(),M);Fe(t.description)&&(A.text=t.description),A.x=w,_.resetMatrix(),_.attr(F(F({},A),{y:17+(S||0)}))}}var T=v.shapeMap["pre-rect"]||v.find(function(we){return we.get("className")==="pre-rect"});if(T&&!T.destroyed){var I=Mt({},T.attr(),t.preRect);T.attr(F(F({},I),{x:-c/2,y:-d/2,height:d}))}if(p&&!p.destroyed)if(!b&&b!==void 0)p.remove(),delete v.shapeMap["pre-rect"];else{var k=y.width,P=y.height,N=y.x,z=y.y,W=y.offset,D=Ln(y,["width","height","x","y","offset"]);p.attr(F(F({},D),{x:N||-c/2+k+W,y:z||-P/2,width:k,height:P}))}else b&&this.drawLogoIcon(t,v);var R=v.shapeMap["rect-state-icon"]||v.find(function(we){return we.get("className")==="rect-state-icon"}),H=R?R.attr():{},ee=Mt({},H,t.stateIcon);if(R){!ee.show&&ee.show!==void 0&&(R.remove(),delete v.shapeMap["rect-state-icon"]);var Y=ee.width,P=ee.height,N=ee.x,z=ee.y,X=ee.offset,fe=Ln(ee,["width","height","x","y","offset"]);R.attr(F(F({},fe),{x:N||c/2-Y+X,y:z||-P/2,width:Y,height:P}))}else ee.show&&this.drawStateIcon(t,v);this.updateLinkPoints(t,v)},getOptions:function(t,e){return e==="move"?t:Pr({},this.options,this.getCustomConfig(t)||{},t)}},"single-node");Bo("star",{options:{size:60,style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"star",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("path",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.leftBottom,l=i.rightBottom,f=i.size,c=i.r,d=Ln(i,["top","left","right","leftBottom","rightBottom","size","r"]),h=this.getSize(t),v=h[0];if(s){var p=Math.cos(.1*Math.PI)*v,g=Math.sin((18+72*0)/180*Math.PI)*v;e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-right",name:"link-point-right"})}if(a){var p=Math.cos(.5*Math.PI)*v,g=Math.sin((18+72*1)/180*Math.PI)*v;e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-top",name:"link-point-top"})}if(o){var p=Math.cos(.9*Math.PI)*v,g=Math.sin((18+72*2)/180*Math.PI)*v;e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-left",name:"link-point-left"})}if(u){var p=Math.cos(1.3*Math.PI)*v,g=Math.sin((18+72*3)/180*Math.PI)*v;e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-left-bottom",name:"link-point-left-bottom"})}if(l){var p=Math.cos(1.7*Math.PI)*v,g=Math.sin((18+72*4)/180*Math.PI)*v;e.shapeMap["link-point-right-bottom"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-right-bottom",name:"link-point-right-bottom"})}},getPath:function(t){var e=this.getSize(t),n=e[0],i=n*3/8,a=t.innerR||i;return Kn.getStarPath(n,a)},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)},updateLinkPoints:function(t,e){var n=this.getOptions({}).linkPoints,i=e.shapeMap["link-point-left"]||e.find(function(A){return A.get("className")==="link-point-left"}),a=e.shapeMap["link-point-right"]||e.find(function(A){return A.get("className")==="link-point-right"}),o=e.shapeMap["link-point-top"]||e.find(function(A){return A.get("className")==="link-point-top"}),s=e.shapeMap["link-point-left-bottom"]||e.find(function(A){return A.get("className")==="link-point-left-bottom"}),u=e.shapeMap["link-point-left-bottom"]||e.find(function(A){return A.get("className")==="link-point-right-bottom"}),l=n,f=i||a||o||s||u;f&&(l=f.attr());var c=Mt({},l,t.linkPoints),d=c.fill,h=c.stroke,v=c.lineWidth,p=c.size/2;p||(p=c.r);var g=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,leftBottom:void 0,rightBottom:void 0},y=g.left,m=g.right,b=g.top,x=g.leftBottom,w=g.rightBottom,E=this.getSize(t),_=E[0],M={r:p,fill:d,stroke:h,lineWidth:v},C=Math.cos((18+72*0)/180*Math.PI)*_,S=Math.sin((18+72*0)/180*Math.PI)*_;a?!m&&m!==void 0?(a.remove(),delete e.shapeMap["link-point-right"]):a.attr(F(F({},M),{x:C,y:-S})):m&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),C=Math.cos((18+72*1)/180*Math.PI)*_,S=Math.sin((18+72*1)/180*Math.PI)*_,o?!b&&b!==void 0?(o.remove(),delete e.shapeMap["link-point-top"]):o.attr(F(F({},M),{x:C,y:-S})):b&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),C=Math.cos((18+72*2)/180*Math.PI)*_,S=Math.sin((18+72*2)/180*Math.PI)*_,i?!y&&y!==void 0?(i.remove(),delete e.shapeMap["link-point-left"]):i.attr(F(F({},M),{x:C,y:-S})):y&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),C=Math.cos((18+72*3)/180*Math.PI)*_,S=Math.sin((18+72*3)/180*Math.PI)*_,s?!x&&x!==void 0?(s.remove(),delete e.shapeMap["link-point-left-bottom"]):s.attr(F(F({},M),{x:C,y:-S})):x&&(e.shapeMap["link-point-left-bottom"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-left-bottom",name:"link-point-left-bottom",isAnchorPoint:!0})),C=Math.cos((18+72*4)/180*Math.PI)*_,S=Math.sin((18+72*4)/180*Math.PI)*_,u?!w&&w!==void 0?(u.remove(),delete e.shapeMap["link-point-right-bottom"]):u.attr(F(F({},M),{x:C,y:-S})):w&&(e.shapeMap["link-point-right-bottom"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-right-bottom",name:"link-point-right-bottom",isAnchorPoint:!0}))}},"single-node");var ZC=Kn.defaultSubjectColors,uc="fan-shape-";Bo("donut",{options:{size:it.defaultNode.size,style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"circle",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=Pr({},i,t.icon),s=e.addShape("circle",{attrs:a,className:"".concat(this.type,"-keyShape"),draggable:!0,name:"".concat(this.type,"-keyShape")});e.shapeMap["".concat(this.type,"-keyShape")]=s;var u=o.width,l=o.height,f=o.show,c=o.text;return f&&(c?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},o),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-u/2,y:-l/2},o),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),Mge(t,e,s),this.drawLinkPoints(t,e),s},updateShape:function(t,e,n,i,a){var o=e.get("keyShape");o.attr(F({},n)),Cge(t,e,o),this.updateLabel(t,e,a),i&&this.updateIcon(t,e)}},"circle");var Mge=function(t,e,n){var i=t.donutAttrs,a=i===void 0?{}:i,o=t.donutColorMap,s=o===void 0?{}:o,u=Object.keys(a).length;if(a&&u>1){var l=a3(a,s),f=l.configs,c=l.totalValue;if(c){var d=o3(n),h=d.lineWidth,v=d.arcR,p=[v,0],g=0;if(u===1){s1(e,{arcR:v,arcBegin:p,beginAngle:g,config:f[0],fanIndex:0,lineWidth:h,totalValue:c,drawWhole:!0});return}for(var y=0;y.999)p=[n,1e-4],y=1;else{var m=v*Math.PI*2;g=a+m,p=[n*Math.cos(g),-n*Math.sin(g)],y=m>Math.PI?1:0}var b={path:[["M",i[0],i[1]],["A",n,n,0,y,0,p[0],p[1]]],stroke:o.color||(h==null?void 0:h.attr("stroke"))||ZC[s%ZC.length],lineWidth:u};return h?h.attr(b):t.shapeMap["".concat(uc).concat(s)]=t.addShape("path",{attrs:b,name:"".concat(uc).concat(s),draggable:!0}),{beginAngle:g,arcBegin:p,shape:t.shapeMap["".concat(uc).concat(s)],shouldEnd:c||v>.999}},Cge=function(t,e,n){var i=t.donutAttrs,a=t.donutColorMap,o=a===void 0?{}:a,s={},u=e.getContainer();if(i){var l=a3(i,o),f=l.configs,c=l.totalValue;if(c)for(var d=o3(n),h=d.lineWidth,v=d.arcR,p=[v,0],g=0,y=0;y=0;a--){var o=t[a];o.id="".concat(o.x,"|||").concat(o.y),n[o.id]||(n[o.id]=o,e.push(o))}return e},s3=function(t){return Nx(t)},lp=function(t,e){return t.width||t.height?{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}:t},Tge=function(t,e){var n=Math.abs(t.x-e.centerX),i=Math.abs(t.y-e.centerY);return n===0&&i===0?0:n/e.width>i/e.height},u1=function(t,e,n){var i=Tge(e,t);if(i===0){var a=t.centerX,o=t.centerY;return n.ye.x?a=t.maxX:n.xt.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},QC=function(t,e){var n=Math.min(t.minX,e.minX),i=Math.min(t.minY,e.minY),a=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{centerX:(n+a)/2,centerY:(i+o)/2,minX:n,minY:i,maxX:a,maxY:o,height:o-i,width:a-n}},l1=function(t){return[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}]},Rh=function(t,e){var n=t.x,i=t.y;return ne.maxX||ie.maxY},Ige=function(t,e){return et.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},Oge=function(t,e){return et.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},Lge=function(t,e){return Ige(t,e.x).concat(Oge(t,e.y))},Dc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},kge=function(t,e){var n=-2,i=0;return e.forEach(function(a){a&&(t.x===a.x&&(i+=n),t.y===a.y&&(i+=n))}),i},JC=function(t,e,n,i,a){return Dc(t,e)+Dc(t,n)+kge(t,[e,n,i,a])},Dge=function r(t,e,n,i,a){a===void 0&&(a=0),t.unshift(e[i]),n[i]&&n[i]!==i&&a<=100&&r(t,e,n,n[i],a+1)},Bh=function(t,e,n,i){var a=n.x-t.x,o=n.y-t.y,s=i.x-t.x,u=i.y-t.y,l=n.x-e.x,f=n.y-e.y,c=i.x-e.x,d=i.y-e.y,h=a*u-o*s,v=l*d-f*c,p=a*f-o*l,g=s*d-u*c;return h*v<=0&&p*g<=0},f1=function(t,e,n){if(n.width||n.height){var i=l1(n),a=i[0],o=i[1],s=i[2],u=i[3];return Bh(t,e,a,o)||Bh(t,e,a,u)||Bh(t,e,o,s)||Bh(t,e,s,u)}return!1},Nge=function(t,e,n,i){var a=[];return t.forEach(function(o){if(o!==e&&(o.x===e.x||o.y===e.y)){if(f1(o,e,n)||f1(o,e,i))return;a.push(o)}}),Nx(a)},Pge=function(t,e,n,i,a,o,s){var u,l=[],f=(u={},u[e.id]=e,u),c={},d={},h={};d[e.id]=0,h[e.id]=JC(e,n,e);var v=new l3;v.add({id:e.id,value:h[e.id]});var p={};t.forEach(function(w){p[w.id]=w});for(var g;Object.keys(f).length;){var y=v.minId(!1);if(y)g=f[y];else break;if(g===n){var m=[];return Dge(m,p,c,n.id),m}delete f[g.id],v.remove(g.id),l.push(g);var b=Nge(t,g,i,a),x=function(E){E.forEach(function(_){if(l.indexOf(_)===-1){var M=_.id;f[M]||(f[M]=_);var C=h[g.id]+Dc(g,_);if(d[M]&&C>=d[M]){v.add({id:M,value:h[M]});return}c[M]=g.id,d[M]=C,h[M]=d[M]+JC(_,n,e,o,s),v.add({id:M,value:h[M]})}})};x(b)}return[e,n]},Rge=function(t,e,n){return!(t.x===e.x&&e.x===n.x||t.y===e.y&&e.y===n.y)},Bge=function(t,e,n,i){var a=Dc(t,e),o=Dc(n,e);a=0;o--){var s=t[o];if(s.x===n.x?i.push(s):(i=[s],n.x=s.x),s.y===n.y?a.push(s):(a=[s],n.y=s.y),i.length>2){var u=t.indexOf(i[1]);u>-1&&t.splice(u,1);continue}if(a.length>2){var u=t.indexOf(a[1]);u>-1&&t.splice(u,1)}}return t},l3=function(){function r(){this.arr=[],this.map={},this.arr=[],this.map={}}return r.prototype._innerAdd=function(t,e){for(var n=[0,e-1];n[1]-n[0]>1;){var i=Math.floor((n[0]+n[1])/2);if(this.arr[i].value>t.value)n[1]=i;else if(this.arr[i].value=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t},r.prototype._findFirstId=function(){for(;this.arr.length;){var t=this.arr.shift();if(this.map[t.id])return t.id}},r.prototype.minId=function(t){return t?this._clearAndGetMinId():this._findFirstId()},r}(),zge=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Gge=function(t,e,n,i,a){return s3(u3(t,e,n,i,a.offset))},$ge={offset:20,maxAllowedDirectionChange:Math.PI/2,maximumLoops:2e3,gridSize:10,directions:[{stepX:1,stepY:0},{stepX:-1,stepY:0},{stepX:0,stepY:1},{stepX:0,stepY:-1}],get penalties(){return{0:0,45:this.gridSize/2,90:this.gridSize/2}},distFunc:zge,fallbackRoute:Gge},ko=function(t,e){var n=Math.round(Math.abs(t/e)),i=t<0?-1:1;return n<0?0:i*n},Uge=function(t,e,n){var i={};return t.forEach(function(a){if(a)for(var o=lp(a.getBBox(),n),s=ko(o.minX,e);s<=ko(o.maxX,e);s+=1)for(var u=ko(o.minY,e);u<=ko(o.maxY,e);u+=1)i["".concat(s,"|||").concat(u)]=!0}),i},_y=function(t,e){var n=e.x-t.x,i=e.y-t.y;return n||i?Math.atan2(i,n):0},tA=function(t,e){var n=Math.abs(t-e);return n>Math.PI?2*Math.PI-n:n},rA=function(t,e,n){for(var i=1/0,a=0,o=e.length;al.minX&&e.xl.minY&&e.y0&&E>0;){var P=b.minId((E+1)%30===0);if(P)_=v[P];else break;if(k["".concat(_.x,"|||").concat(_.y)])return jge(_,g,f,e,t,c,u);delete v[_.id],b.remove(_.id),p[_.id]=!0;for(var x=0;xo.maxAllowedDirectionChange)&&!l[N])){v[N]||(v[N]=C);var z=s[T];S=o.distFunc(_,C)+(isNaN(z)?u:z),A=y[_.id]+S;var W=y[N];W&&A>=W||(g[N]=_,y[N]=A,m[N]=A+rA(C,h,o.distFunc),b.add({id:N,value:m[N]}))}}E-=1}return o.fallbackRoute(t,e,n,i,o)};CL("polyline",{options:{color:it.defaultEdge.color,size:it.defaultEdge.size,style:{radius:0,offset:15,x:0,y:0,stroke:it.defaultEdge.style.stroke,lineAppendWidth:it.defaultEdge.style.lineAppendWidth},labelCfg:{style:{fill:it.edgeLabel.style.fill,fontSize:it.edgeLabel.style.fontSize,fontFamily:it.windowFontFamily}},routeCfg:{obstacles:[],maxAllowedDirectionChange:Math.PI,maximumLoops:500,gridSize:10},stateStyles:F({},it.edgeStateStyles)},shapeType:"polyline",labelPosition:"center",drawShape:function(t,e){var n=this.getShapeStyle(t);n.radius===0&&delete n.radius;var i=e.addShape("path",{className:"edge-shape",name:"edge-shape",attrs:n});return e.shapeMap["edge-shape"]=i,i},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},i=Mt({},e,n,t.style);t=this.getPathPoints(t),this.radius=i.radius,this.offset=i.offset;var a=t.startPoint,o=t.endPoint,s=this.getControlPoints(t),u=[a];s&&(u=u.concat(s)),u.push(o);var l=t.sourceNode,f=t.targetNode,c=i.radius,d=this.options.routeCfg,h=Mt({},d,t.routeCfg);h.offset=i.offset;var v=this.getPath(u,l,f,c,h,!s);(wt(v)&&v.length<=1||Fe(v)&&v.indexOf("L")===-1)&&(v="M0 0, L0 0"),(isNaN(a.x)||isNaN(a.y)||isNaN(o.x)||isNaN(o.y))&&(v="M0 0, L0 0");var p=Mt({},it.defaultEdge.style,i,{lineWidth:t.size,path:v});return p},updateShapeStyle:function(t,e){var n=e.getContainer();if(e.isVisible()){var i={stroke:t.color},a=n.shapeMap["edge-shape"]||n.find(function(x){return x.get("className")==="edge-shape"})||e.getKeyShape(),o=t.size;t=this.getPathPoints(t);var s=t.startPoint,u=t.endPoint,l=this.getControlPoints(t),f=[s];l&&(f=f.concat(l)),f.push(u);var c=a.attr(),d=Mt({},i,c,t.style),h=t.sourceNode,v=t.targetNode,p=d.radius,g=this.options.routeCfg,y=Mt({},g,t.routeCfg);y.offset=d.offset;var m=this.getPath(f,h,v,p,y,!l);(wt(m)&&m.length<=1||Fe(m)&&m.indexOf("L")===-1)&&(m="M0 0, L0 0"),(isNaN(s.x)||isNaN(s.y)||isNaN(u.x)||isNaN(u.y))&&(m="M0 0, L0 0"),c.endArrow&&d.endArrow===!1&&(t.style.endArrow={path:""}),c.startArrow&&d.startArrow===!1&&(t.style.startArrow={path:""});var b=Mt(i,a.attr(),{lineWidth:o,path:m},t.style);a&&a.attr(b)}},getPath:function(t,e,n,i,a,o){var s=a.offset,u=a.obstacles,l=a.simple;if(!s||t.length>2||o===!1){if(i)return eA(t,i);var f=[];return xe(t,function(v,p){p===0?f.push(["M",v.x,v.y]):f.push(["L",v.x,v.y])}),f}l!==!1&&!(u!=null&&u.length)&&(l=!0);var c=l?u3(t[t.length-1],t[0],n,e,s):Wge(t[0],t[t.length-1],e,n,a);if(!c||!c.length)return"M0 0, L0 0";if(i){var d=eA(c,i);return d}c=Fge(c);var h=Kn.pointsToPolygon(c);return h}},"single-edge");var iA=jo.cloneEvent,aA=jo.isNaN,oA=Math.abs,Xge=10,Yge=["shift","ctrl","alt","control"];const Vge={getDefaultCfg:function(){return{direction:"both",enableOptimize:!1,scalableRange:0,allowDragOnItem:!1}},getEvents:function(){return{mousedown:"onMouseDown",drag:"onDragMove",dragend:"onMouseUp","canvas:click":"onMouseUp",keyup:"onKeyUp",focus:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onMouseUp"}},updateViewport:function(t){var e=this.origin,n=+t.clientX,i=+t.clientY;if(!(aA(n)||aA(i))){var a=n-e.x,o=i-e.y;this.get("direction")==="x"?o=0:this.get("direction")==="y"&&(a=0),this.origin={x:n,y:i};var s=this.graph.get("width"),u=this.graph.get("height"),l=this.graph.get("canvas").getCanvasBBox(),f=this.scalableRange,c=this.scalableRange;f<1&&f>-1&&(f=s*f,c=u*c),(l.minX<=s+f&&l.minX+a>s+f||l.maxX+f>=0&&l.maxX+f+a<0)&&(a=0),(l.minY<=u+c&&l.minY+o>u+c||l.maxY+c>=0&&l.maxY+c+o<0)&&(o=0),this.graph.translate(a,o)}},onTouchStart:function(t){var e=this,n=t.originalEvent.touches,i=n[0],a=n[1];i&&a||(t.preventDefault(),this.mousedown=!0,e.onDragStart(t))},onMouseDown:function(t){this.mousedown=!0},onDragMove:function(t){this.mousedown&&(this.dragstart?this.onDrag(t):(this.dragstart=!0,this.onDragStart(t)))},onDragStart:function(t){var e=this,n=t.originalEvent;if(!(n&&t.name!=="touchstart"&&n.button!==0)&&!(t.name!=="touchstart"&&typeof window<"u"&&window.event&&!window.event.buttons&&!window.event.button)&&this.shouldBegin(t,this)&&!e.keydown&&this.allowDrag(t)){if(e.origin={x:t.clientX,y:t.clientY},e.dragging=!1,this.enableOptimize){for(var i=this.graph,a=i.getEdges(),o=0,s=a.length;ou)for(var h=i.getNodes(),v=0,p=h.length;v-1?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){this.keydown=!1,this.origin=null,this.dragging=!1,this.dragbegin=!1},allowDrag:function(t){var e,n,i=t.target,a=i&&i.isCanvas&&i.isCanvas();if(Bc(this.allowDragOnItem)&&!this.allowDragOnItem&&!a)return!1;if(Wn(this.allowDragOnItem)){var o=this.allowDragOnItem,s=o.node,u=o.edge,l=o.combo,f=(n=(e=t.item)===null||e===void 0?void 0:e.getType)===null||n===void 0?void 0:n.call(e);if(!s&&f==="node"||!u&&f==="edge"||!l&&f==="combo")return!1}return!0}},Hge={getDefaultCfg:function(){return{updateEdge:!0,delegateStyle:{},enableDelegate:!1,onlyChangeComboSize:!1,comboActiveState:"",selectedState:"selected",enableOptimize:!1,enableDebounce:!1,enableStack:!0}},getEvents:function(){return{"node:mousedown":"onMouseDown",drag:"onDragMove",dragend:"onDragEnd","combo:dragenter":"onDragEnter","combo:dragleave":"onDragLeave","combo:drop":"onDropCombo","node:drop":"onDropNode","canvas:drop":"onDropCanvas",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onDragEnd",afterchangedata:"onDragEnd"}},validationCombo:function(t){if(!this.origin||!t||t.destroyed)return!1;var e=t.getType();return e==="combo"},onTouchStart:function(t){if(t.item){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}this.mousedown={item:t.item,target:t.target,origin:{x:t.x,y:t.y}},this.dragstart=!0,e.onDragStart(t)}},onTouchMove:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a){e.onDragEnd(t);return}t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.onDrag(t)},onMouseDown:function(t){this.mousedown={item:t.item,target:t.target,origin:{x:t.x,y:t.y}},typeof window<"u"&&!this.windowEventBinded&&(this.windowEventBinded=!0,document.body.addEventListener("contextmenu",this.onDragEnd.bind(this)),document.body.addEventListener("mouseup",this.onDragEnd.bind(this)))},onDragMove:function(t){var e,n;if(((n=(e=t.item)===null||e===void 0?void 0:e.getType)===null||n===void 0?void 0:n.call(e))!=="node"){this.onDragEnd();return}this.mousedown&&(this.dragstart?this.onDrag(F(F({},t),this.mousedown)):(this.dragstart=!0,this.onDragStart(t)))},onDragStart:function(t){var e=this;if(this.currentShouldEnd=!0,!!this.shouldBegin(F(F({},t),this.mousedown),this)){var n=this.mousedown,i=n.item,a=n.target;if(!(!i||i.destroyed||i.hasLocked())){var o=i.getContainer();if(o.set("capture",!1),this.cachedCaptureItems||(this.cachedCaptureItems=[]),this.cachedCaptureItems.push(i),a){var s=a.get("isAnchorPoint");if(s)return}var u=this.graph;this.targets=[],this.targetCombo=null;var l=u.findAllByState("node",this.selectedState),f=i.get("id"),c=l.filter(function(h){var v=h.get("id");return f===v});if(c.length===0?this.targets.push(i):l.length>1?l.forEach(function(h){var v=h.hasLocked();v||e.targets.push(h)}):this.targets.push(i),this.graph.get("enabledStack")&&this.enableStack){var d=[];this.targets.forEach(function(h){var v=h.getModel(),p=v.x,g=v.y,y=v.id;d.push({x:p,y:g,id:y})}),this.set("beforeDragNodes",d)}this.hidenEdge={},this.get("updateEdge")&&this.enableOptimize&&!this.enableDelegate&&this.targets.forEach(function(h){var v=h.getEdges();v.forEach(function(p){p.isVisible()&&(e.hidenEdge[p.getID()]=!0,p.hide())})}),this.origin=this.mousedown.origin,this.point={},this.originPoint={}}}},onDrag:function(t){var e=this;if(!(!this.mousedown||!this.origin)&&this.shouldUpdate(t,this))if(this.get("enableDelegate"))this.updateDelegate(t);else if(this.enableDebounce)this.debounceUpdate({targets:this.targets,graph:this.graph,point:this.point,origin:this.origin,evt:t,updateEdge:this.get("updateEdge"),onlyChangeComboSize:this.onlyChangeComboSize,updateParentCombos:this.updateParentCombos});else{var n={};this.targets.map(function(i){e.update(i,t);var a=i.getModel().comboId;a&&(n[a]=e.graph.findById(a))}),this.onlyChangeComboSize&&this.updateParentCombos()}},onDragEnd:function(t){var e=this,n;if(this.mousedown=!1,this.dragstart=!1,typeof window<"u"&&this.windowEventBinded&&(this.windowEventBinded=!1,document.body.removeEventListener("contextmenu",this.onDragEnd.bind(this)),document.body.removeEventListener("mouseup",this.onDragEnd.bind(this))),!!this.origin){(n=this.cachedCaptureItems)===null||n===void 0||n.forEach(function(o){var s=o.getContainer();s.set("capture",!0)}),this.cachedCaptureItems=[],this.delegateRect&&(this.delegateRect.remove(),this.delegateRect=null),this.get("updateEdge")&&this.enableOptimize&&!this.enableDelegate&&this.targets.forEach(function(o){var s=o.getEdges();s.forEach(function(u){e.hidenEdge[u.getID()]&&u.show(),u.refresh()})}),this.hidenEdge={};var i=this.graph;if(i.get("enabledStack")&&this.enableStack){var a={before:{nodes:[],edges:[],combos:[]},after:{nodes:[],edges:[],combos:[]}};this.get("beforeDragNodes").forEach(function(o){a.before.nodes.push(o)}),this.targets.forEach(function(o){var s=o.getModel(),u=s.x,l=s.y,f=s.id;a.after.nodes.push({x:u,y:l,id:f})}),i.pushStack("update",ar(a))}i.emit("dragnodeend",{items:this.targets,targetItem:null}),this.point={},this.origin=null,this.originPoint={},this.targets.length=0,this.targetCombo=null}},onDropCombo:function(t){var e=t.item;if(this.currentShouldEnd=this.shouldEnd(t,e,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.currentShouldEnd||!this.validationCombo(e))){var n=this.graph;if(this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1),this.targetCombo=e,this.onlyChangeComboSize)n.updateCombos();else{var i=e.getModel();this.targets.map(function(a){var o=a.getModel();o.comboId!==i.id&&n.updateComboTree(a,i.id)}),n.updateCombo(e)}n.emit("dragnodeend",{items:this.targets,targetItem:this.targetCombo})}},onDropCanvas:function(t){var e=this.graph;this.currentShouldEnd=this.shouldEnd(t,void 0,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.targets||this.targets.length===0||!this.currentShouldEnd)&&(this.onlyChangeComboSize?this.updateParentCombos():this.targets.map(function(n){var i=n.getModel();i.comboId&&e.updateComboTree(n)}))},onDropNode:function(t){if(!(!this.targets||this.targets.length===0)){var e=this,n=t.item,i=e.graph,a=n.getModel().comboId,o=a?i.findById(a):void 0;if(this.currentShouldEnd=this.shouldEnd(t,o,this),this.updatePositions(t,!this.currentShouldEnd),!!this.currentShouldEnd){if(this.onlyChangeComboSize)this.updateParentCombos();else if(a){var s=i.findById(a);e.comboActiveState&&i.setItemState(s,e.comboActiveState,!1),this.targets.map(function(u){var l=u.getModel();a!==l.comboId&&i.updateComboTree(u,a)}),i.updateCombo(s)}else this.targets.map(function(u){var l=u.getModel();l.comboId&&i.updateComboTree(u)});i.emit("dragnodeend",{items:this.targets,targetItem:n})}}},onDragEnter:function(t){var e=t.item;if(this.validationCombo(e)){var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!0)}},onDragLeave:function(t){var e=t.item;if(this.validationCombo(e)){var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1)}},updatePositions:function(t,e){var n=this;!this.targets||this.targets.length===0||(this.get("enableDelegate")?this.enableDebounce?this.debounceUpdate({targets:this.targets,graph:this.graph,point:this.point,origin:this.origin,evt:t,updateEdge:this.get("updateEdge"),onlyChangeComboSize:this.onlyChangeComboSize,updateParentCombos:this.updateParentCombos}):e||this.targets.map(function(i){return n.update(i,t)}):this.targets.map(function(i){return n.update(i,t,e)}))},update:function(t,e,n){var i=this.origin,a=t.get("model"),o=t.get("id");this.point[o]||(this.point[o]={x:a.x||0,y:a.y||0});var s=e.x-i.x+this.point[o].x,u=e.y-i.y+this.point[o].y;n&&(s+=i.x-e.x,u+=i.y-e.y);var l={x:s,y:u};this.get("updateEdge")?this.graph.updateItem(t,l,!1):t.updatePosition(l)},debounceUpdate:Fc(function(r){var t=r.targets,e=r.graph,n=r.point,i=r.origin,a=r.evt,o=r.updateEdge,s=r.onlyChangeComboSize,u=r.updateParentCombos;t.map(function(l){var f=l.get("model"),c=l.get("id");n[c]||(n[c]={x:f.x||0,y:f.y||0});var d=a.x-i.x+n[c].x,h=a.y-i.y+n[c].y,v={x:d,y:h};o?e.updateItem(l,v,!1):l.updatePosition(v)}),s&&u(e,t)},50,!0),updateDelegate:function(t){var e=this.graph;if(this.delegateRect){var d=t.x-this.origin.x+this.originPoint.minX,h=t.y-this.origin.y+this.originPoint.minY;this.delegateRect.attr({x:d,y:h})}else{var n=e.get("group"),i=Pr({},su.delegateStyle,this.delegateStyle),a=this.calculationGroupPosition(t),o=a.x,s=a.y,u=a.width,l=a.height,f=a.minX,c=a.minY;this.originPoint={x:o,y:s,width:u,height:l,minX:f,minY:c},this.delegateRect=n.addShape("rect",{attrs:F({width:u,height:l,x:o,y:s},i),name:"rect-delegate-shape"}),this.delegate=this.delegateRect,this.delegateRect.set("capture",!1)}},calculationGroupPosition:function(t){var e=this.targets;e.length===0&&e.push(t.item);for(var n=1/0,i=-1/0,a=1/0,o=-1/0,s=0;si&&(i=d),h>o&&(o=h)}var v=Math.floor(n),p=Math.floor(a),g=Math.ceil(i)-Math.floor(n),y=Math.ceil(o)-Math.floor(a);return{x:v,y:p,width:g,height:y,minX:n,minY:a}},updateParentCombos:function(t,e){var n=t||this.graph,i=e||this.targets,a={};i==null||i.forEach(function(o){var s=o.getModel().comboId;s&&(a[s]=n.findById(s))}),Object.values(a).forEach(function(o){o&&n.updateCombo(o)})}};var Fh=null;const Kge={getDefaultCfg:function(){return{trigger:"mouseenter",activeState:"active",inactiveState:"inactive",resetSelected:!1,shouldClearStatusOnSecond:!1,shouldUpdate:function(){return!0}}},getEvents:function(){return this.get("trigger")==="mouseenter"?{"node:mouseenter":"setAllItemStates","combo:mouseenter":"setAllItemStates","node:mouseleave":"clearActiveState","combo:mouseleave":"clearActiveState"}:{"node:click":"setAllItemStates","combo:click":"setAllItemStates","canvas:click":"clearActiveState","node:touchstart":"setOnTouchStart","combo:touchstart":"setOnTouchStart","canvas:touchstart":"clearOnTouchStart"}},setOnTouchStart:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.setAllItemStates(t)},clearOnTouchStart:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.clearActiveState(t)},setAllItemStates:function(t){clearTimeout(this.timer),this.throttleSetAllItemStates(t,this)},clearActiveState:function(t){var e=this,n=this.shouldClearStatusOnSecond;n&&(Fh=null),this.timer=setTimeout(function(){e.throttleClearActiveState(t,e)},50)},throttleSetAllItemStates:fc(function(r,t){var e=r.item,n=t.graph;if(!(!n||n.destroyed)&&(t.item=e,!!t.shouldUpdate(r.item,{event:r,action:"activate"},t))){var i=t.shouldClearStatusOnSecond,a=e.getModel().id;if(Fh===a&&i){t.throttleClearActiveState(r,t),Fh=null;return}for(var o=t.activeState,s=t.inactiveState,u=n.getNodes(),l=n.getCombos(),f=n.getEdges(),c=n.get("vedges"),d=u.length,h=l.length,v=f.length,p=c.length,g=t.inactiveItems||{},y=t.activeItems||{},m=0;m-1||(this.trigger=lA,console.warn("Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),this.trigger==="drag"?{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates"}:{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates",keyup:"onKeyUp",keydown:"onKeyDown"}},onMouseDown:function(t){var e=t.item,n=this.brush,i=this.selectOnCombo,a=(e==null?void 0:e.getType())==="combo";a&&!i||!a&&e||this.trigger!=="drag"&&!this.keydown||(this.selectedNodes&&this.selectedNodes.length!==0&&this.clearStates(),n||(n=this.createBrush()),this.originPoint={x:t.canvasX,y:t.canvasY},n.attr({width:0,height:0}),n.show(),this.dragging=!0)},onMouseMove:function(t){this.dragging&&(this.trigger!=="drag"&&!this.keydown||this.updateBrush(t))},onMouseUp:function(t){this.graph,!(!this.brush&&!this.dragging)&&(this.trigger!=="drag"&&!this.keydown||(this.brush.remove(!0),this.brush=null,this.getSelectedNodes(t),this.dragging=!1))},clearStates:function(){var t=this,e=t.graph,n=t.selectedState,i=e.findAllByState("node",n),a=e.findAllByState("edge",n),o=e.findAllByState("combo",n);i.forEach(function(s){return e.setItemState(s,n,!1)}),a.forEach(function(s){return e.setItemState(s,n,!1)}),o.forEach(function(s){return e.setItemState(s,n,!1)}),this.selectedNodes=[],this.selectedEdges=[],this.selectedCombos=[],this.onDeselect&&this.onDeselect(this.selectedNodes,this.selectedEdges,this.selectedCombos),e.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[],combos:[]},select:!1})},isBBoxCenterInRect:function(t,e,n,i,a){var o=t.getBBox();return o.centerX>=e&&o.centerX<=n&&o.centerY>=i&&o.centerY<=a},getSelectedNodes:function(t){var e=this,n=this,i=n.graph,a=n.originPoint,o=n.shouldUpdate,s=n.isBBoxCenterInRect,u=this.selectedState,l={x:t.x,y:t.y},f=i.getPointByCanvas(a.x,a.y),c=zh(l.x,f.x),d=sA(l.x,f.x),h=zh(l.y,f.y),v=sA(l.y,f.y),p=[],g=[];i.getNodes().forEach(function(b){if(b.isVisible()&&s(b,c,d,h,v)&&o(b,"select",e)){p.push(b);var x=b.getModel();g.push(x.id),i.setItemState(b,u,!0)}});var y=[];this.includeEdges&&p.forEach(function(b){var x=b.getOutEdges();x.forEach(function(w){if(w.isVisible()){var E=w.getModel(),_=E.source,M=E.target;g.includes(_)&&g.includes(M)&&o(w,"select",e)&&(y.push(w),i.setItemState(w,e.selectedState,!0))}})});var m=[];this.includeCombos&&i.getCombos().forEach(function(b){if(b.isVisible()&&s(b,c,d,h,v)&&o(b,"select",e)){m.push(b);var x=b.getModel();g.push(x.id),i.setItemState(b,u,!0)}}),this.selectedEdges=y,this.selectedNodes=p,this.selectedCombos=m,this.onSelect&&this.onSelect(p,y,m),i.emit("nodeselectchange",{selectedItems:{nodes:p,edges:y,combos:m},select:!0})},createBrush:function(){var t=this,e=t.graph.get("canvas").addShape("rect",{attrs:t.brushStyle,capture:!1,name:"brush-shape"});return this.brush=e,this.delegate=e,e},updateBrush:function(t){var e=this.originPoint;this.brush.attr({width:uA(t.canvasX-e.x),height:uA(t.canvasY-e.y),x:zh(t.canvasX,e.x),y:zh(t.canvasY,e.y)})},onKeyDown:function(t){var e=t.key;if(e){var n=this.trigger.toLowerCase(),i=e.toLowerCase();i===n||i==="control"&&n==="ctrl"||i==="ctrl"&&n==="control"?this.keydown=!0:this.keydown=!1}},onKeyUp:function(){this.brush&&(this.brush.remove(!0),this.brush=null,this.dragging=!1),this.keydown=!1}};var fA="shift",Qge=["shift","ctrl","alt","control"];const Jge={getDefaultCfg:function(){return{multiple:!0,trigger:fA,selectedState:"selected",selectNode:!0,selectEdge:!1,selectCombo:!0}},getEvents:function(){var t=this;return Qge.indexOf(t.trigger.toLowerCase())>-1||(t.trigger=fA,console.warn("Behavior click-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),t.multiple?{"node:click":"onClick","combo:click":"onClick","edge:click":"onClick","canvas:click":"onCanvasClick",keyup:"onKeyUp",keydown:"onKeyDown"}:{"node:click":"onClick","combo:click":"onClick","edge:click":"onClick","canvas:click":"onCanvasClick"}},onClick:function(t){var e=this,n=t.item;if(!(!n||n.destroyed)){var i=n.getType(),a=e.graph,o=e.keydown,s=e.multiple,u=e.shouldUpdate,l=e.shouldBegin;if(l(t,e)){if(!o||!s){var f=a.findAllByState("node",e.selectedState).concat(a.findAllByState("edge",e.selectedState)).concat(a.findAllByState("combo",e.selectedState));xe(f,function(p){p!==n&&a.setItemState(p,e.selectedState,!1)})}var c=function(){switch(i){case"node":return e.selectNode;case"edge":return e.selectEdge;case"combo":return e.selectCombo;default:return!1}}();if(!c){var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{selectedItems:{nodes:d,edges:h,combos:v},select:!1});return}if(n.hasState(e.selectedState)){u(t,e)&&a.setItemState(n,e.selectedState,!1);var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:d,edges:h,combos:v},select:!1})}else{u(t,e)&&a.setItemState(n,e.selectedState,!0);var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:d,edges:h,combos:v},select:!0})}}}},onCanvasClick:function(t){var e=this,n=this,i=n.graph,a=n.shouldBegin;if(a(t,this)){var o=i.findAllByState("node",this.selectedState);xe(o,function(l){i.setItemState(l,e.selectedState,!1)});var s=i.findAllByState("edge",this.selectedState);xe(s,function(l){i.setItemState(l,e.selectedState,!1)});var u=i.findAllByState("combo",this.selectedState);xe(u,function(l){i.setItemState(l,e.selectedState,!1)}),i.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[],combos:[]},select:!1})}},onKeyDown:function(t){var e=this,n=t.key;n&&(n.toLowerCase()===this.trigger.toLowerCase()||n.toLowerCase()==="control"?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){var t=this;t.keydown=!1}};var e0e=ra,Gh=.05;const t0e={getDefaultCfg:function(){return this.isFireFox=LP()==="firefox",{sensitivity:2,minZoom:void 0,maxZoom:void 0,enableOptimize:!1,optimizeZoom:.1,fixSelectedItems:{fixAll:!1,fixLineWidth:!1,fixLabel:!1,fixState:"selected"},animate:!1,animateCfg:{duration:500}}},getEvents:function(){var t=this.fixSelectedItems;return t.fixState||(t.fixState="selected"),t.fixAll&&(t.fixLineWidth=!0,t.fixLabel=!0),{wheel:"onWheel",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd"}},onTouchStart:function(t){var e=t.originalEvent.touches,n=e[0],i=e[1];t.preventDefault(),i&&(this.shouldBegin&&!this.shouldBegin(t,this)||(this.startPoint={pageX:n.pageX,pageY:n.pageY},this.moveable=!0,i&&(this.endPoint={pageX:i.pageX,pageY:i.pageY}),this.originScale=this.graph.getZoom()||this.currentScale||1))},onTouchMove:function(t){if(this.moveable){t.preventDefault();var e=t.originalEvent.touches,n=e[0],i=e[1];if(i){this.endPoint||(this.endPoint={pageX:i.pageX,pageY:i.pageY});var a=function(p,g){return Math.hypot(g.x-p.x,g.y-p.y)},o=a({x:n.pageX,y:n.pageY},{x:i.pageX,y:i.pageY})/a({x:this.startPoint.pageX,y:this.startPoint.pageY},{x:this.endPoint.pageX,y:this.endPoint.pageY}),s=this.originScale*o;this.currentScale=s;var u=this.get("minZoom")||this.graph.get("minZoom"),l=this.get("maxZoom")||this.graph.get("maxZoom");if(!(s>l||s0||t.wheelDelta<0?f=1-Gh*u:f=1/(1-Gh*u):t.wheelDelta<0?f=1-Gh*u:f=1/(1-Gh*u),c=l*f;var d=this.get("minZoom")||i.get("minZoom"),h=this.get("maxZoom")||i.get("maxZoom");c>h?c=h:ci/2?f-=d.width:f+=this.offset,c>a/2?c-=d.height:c+=this.offset;var h="".concat(f,"px"),v="".concat(c,"px");tr(this.container,{left:h,top:v,visibility:"visible"})},createTooltip:function(t){var e=t.get("el");e.style.position="relative";var n=Ur('
'));return e.parentNode.appendChild(n),tr(n,{position:"absolute",visibility:"visible"}),this.width=t.get("width"),this.height=t.get("height"),this.container=n,this.graph.get("tooltips").push(n),n}},r0e=F({getDefaultCfg:function(){return{item:"node",offset:12,formatText:function(e){return e.label}}},getEvents:function(){return{"node:mouseenter":"onMouseEnter","node:mouseleave":"onMouseLeave","node:mousemove":"onMouseMove",afterremoveitem:"onMouseLeave"}}},f3),n0e=F({getDefaultCfg:function(){return{item:"edge",offset:12,formatText:function(e){return"source: ".concat(e.source," target: ").concat(e.target)}}},getEvents:function(){return{"edge:mouseenter":"onMouseEnter","edge:mouseleave":"onMouseLeave","edge:mousemove":"onMouseMove",afterremoveitem:"onMouseLeave"}}},f3);var cA="click",i0e=["click","dblclick"];const a0e={getDefaultCfg:function(){return{trigger:cA,onChange:function(){}}},getEvents:function(){var t,e;return i0e.includes(this.trigger)?e=this.trigger:(e=cA,console.warn("Behavior collapse-expand 的 trigger 参数不合法,请输入 'click' 或 'dblclick'")),t={},t["node:".concat(e)]="onNodeClick",t.touchstart="onNodeClick",t},onNodeClick:function(t){var e=this;if(this.trigger==="click"){if(this.timer){clearTimeout(this.timer),this.timer=0;return}this.timer=setTimeout(function(){e.toggle(t),clearTimeout(e.timer),e.timer=0},200)}else this.toggle(t)},toggle:function(t){var e=t.item;if(e){var n=this.graph.findDataById(e.get("id"));if(n){var i=n.children;if(!(!i||i.length===0)){var a=!n.collapsed;this.shouldBegin(t,a,this)&&(n.collapsed=a,e.getModel().collapsed=a,this.graph.emit("itemcollapsed",{item:t.item,collapsed:a}),this.shouldUpdate(t,a,this)&&(this.onChange(e,a,this),this.graph.layout()))}}}}};var o0e=jo.calculationItemsBBox,s0e=function r(t,e){if(e(t)!==!1&&t){var n=t.get("combos");if(n.length===0)return!1;xe(n,function(i){r(i,e)})}};const u0e={getDefaultCfg:function(){return{enableDelegate:!1,delegateStyle:{},onlyChangeComboSize:!1,activeState:"",selectedState:"selected",enableStack:!0}},getEvents:function(){return{"combo:mousedown":"onMouseDown","combo:dragstart":"onDragStart","combo:drag":"onDrag","combo:dragend":"onDragEnd","combo:drop":"onDrop","node:drop":"onNodeDrop","combo:dragenter":"onDragEnter","combo:dragleave":"onDragLeave"}},validationCombo:function(t){var e=t.item;if(!e||e.destroyed||!this.shouldUpdate(t,this))return!1;var n=e.getType();return n==="combo"},onMouseDown:function(t){this.origin={x:t.x,y:t.y}},onDragStart:function(t){var e=this,n=this.graph,i=t.item;if(this.currentShouldEnd=!0,!!this.validationCombo(t)){this.targets=[];var a=n.findAllByState("combo",this.selectedState),o=i.get("id"),s=a.filter(function(l){var f=l.get("id");return o===f});s.length===0?this.targets.push(i):this.targets=a;var u=[];this.targets.forEach(function(l){var f=l.getModel(),c=f.x,d=f.y,h=f.id;u.push({x:c,y:d,id:h})}),this.set("beforeDragItems",u),this.activeState&&this.targets.map(function(l){var f=l.getModel();if(f.parentId){var c=n.findById(f.parentId);c&&n.setItemState(c,e.activeState,!0)}}),this.point={},this.originPoint={},this.currentItemChildCombos=[],s0e(i,function(l){if(l.destroyed)return!1;var f=l.getModel();return e.currentItemChildCombos.push(f.id),!0})}},onDrag:function(t){var e=this;if(this.origin&&this.validationCombo(t))if(this.enableDelegate)this.updateDelegate(t);else{if(this.activeState){var n=this.graph,i=t.item,a=i.getModel(),o=n.getCombos(),s=i.getBBox(),u=s.centerX,l=s.centerY,f=s.width,c=o.filter(function(d){var h=d.getModel();return a.parentId,h.id!==a.id&&!e.currentItemChildCombos.includes(h.id)});c.map(function(d){var h=d.getBBox(),v=h.centerX,p=h.centerY,g=h.width,y=u-v,m=l-p,b=2*Math.sqrt(y*y+m*m);f+g-b>.8*f?n.setItemState(d,e.activeState,!0):n.setItemState(d,e.activeState,!1)})}xe(this.targets,function(d){e.updateCombo(d,t)}),this.onlyChangeComboSize&&this.updateParentCombos()}},updatePositions:function(t,e){var n=this;(this.enableDelegate||e)&&xe(this.targets,function(i){n.updateCombo(i,t,e)})},onDrop:function(t){var e=this,n=t.item;if(this.currentShouldEnd=this.shouldEnd(t,n,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.currentShouldEnd||!n||!this.targets||n.destroyed)){var i=this.graph,a=n.getModel();this.targets.map(function(o){var s=o.getModel();s.parentId!==a.id?(e.activeState&&i.setItemState(n,e.activeState,!1),e.onlyChangeComboSize?i.updateCombo(o):i.updateComboTree(o,a.id,!1)):i.updateCombo(n)}),this.end(n,t),this.endComparison=!0}},onNodeDrop:function(t){var e=this;if(!(!this.targets||this.targets.length===0)){var n=this.graph,i=t.item,a=i.getModel().comboId,o=a?n.findById(a):void 0;if(this.currentShouldEnd=this.shouldEnd(t,o,this),this.updatePositions(t,!this.currentShouldEnd),!!this.currentShouldEnd){var s;if(a){if(this.activeState){var u=n.findById(a);n.setItemState(u,this.activeState,!1)}this.targets.map(function(l){e.onlyChangeComboSize?n.updateCombo(l):a!==l.getID()&&(s=n.findById(a),a!==l.getModel().parentId&&n.updateComboTree(l,a,!1))})}else this.targets.map(function(l){if(e.onlyChangeComboSize)n.updateCombo(l);else{var f=l.getModel();f.comboId&&n.updateComboTree(l,void 0,!1)}});this.endComparison=!0,this.end(s,t)}}},onDragEnter:function(t){if(this.origin&&this.validationCombo(t)){var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!0)}},onDragLeave:function(t){if(this.origin&&this.validationCombo(t)){var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!1)}},onDragEnd:function(t){if(!(!this.targets||this.targets.length===0)){var e=t.item;this.currentShouldEnd&&this.updatePositions(t);var n=this.getParentCombo(e.getModel().parentId),i=this.graph;n&&this.activeState&&i.setItemState(n,this.activeState,!1),this.end(void 0,t)}},end:function(t,e){var n=this;if(this.origin){var i=this.graph;if(this.delegateShape){var a=i.get("delegateGroup");a.clear(),this.delegateShape=null}if(t&&this.activeState&&i.setItemState(t,this.activeState,!1),!t){var o=i.get("enabledStack")&&this.enableStack,s={before:{nodes:[],edges:[],combos:[].concat(this.get("beforeDragItems"))},after:{nodes:[],edges:[],combos:[]}};this.targets.map(function(u){if(!n.onlyChangeComboSize)i.updateComboTree(u,void 0,o);else{i.updateCombo(u);var l=u.getModel(),f=l.x,c=l.y,d=l.id;s.after.combos.push({x:f,y:c,id:d}),i.pushStack("update",s)}})}this.point=[],this.origin=null,this.originPoint=null,this.targets.length=0}},traverse:function(t,e,n){var i=this;if(n===void 0&&(n={}),e(t,n)!==!1&&t){var a=t.get("combos");xe(a,function(s){i.traverse(s,e,n)});var o=t.get("nodes");xe(o,function(s){i.traverse(s,e,n)})}},updateCombo:function(t,e,n){this.updateSingleItem(t,e,n);var i={};this.traverse(t,function(a,o){return a.destroyed?!1:(a.getEdges().forEach(function(s){return o[s.getID()]=s}),!0)},i),Object.values(i).forEach(function(a){return a.refresh()})},updateSingleItem:function(t,e,n){var i=this.origin,a=this.graph,o=t.getModel(),s=t.get("id");this.point[s]||(this.point[s]={x:o.x,y:o.y});var u=e.x-i.x+this.point[s].x,l=e.y-i.y+this.point[s].y;n&&(u+=i.x-e.x,l+=i.y-e.y),a.updateItem(t,{x:u,y:l},!1)},getParentCombo:function(t){var e=this.graph;if(t){var n=e.findById(t);if(n)return n}},updateDelegate:function(t){var e=this.graph;if(this.delegateShape){var d=t.x-this.origin.x+this.originPoint.minX,h=t.y-this.origin.y+this.originPoint.minY;this.delegateShape.attr({x:d,y:h})}else{var n=e.get("delegateGroup"),i=null;this.targets.length>1?i=o0e(this.targets):i=this.targets[0].getBBox();var a=i.x,o=i.y,s=i.width,u=i.height,l=i.minX,f=i.minY;this.originPoint={x:a,y:o,width:s,height:u,minX:l,minY:f};var c=F(F({},su.delegateStyle),this.delegateStyle);this.delegateShape=n.addShape("rect",{attrs:F({width:i.width,height:i.height,x:i.x,y:i.y},c),name:"combo-delegate-shape"}),this.delegateShape.set("capture",!1),this.delegate=this.delegateShape}},updateParentCombos:function(){var t=this,e=t.graph,n=t.targets,i={};n==null||n.forEach(function(a){var o=a.getModel().parentId;o&&(i[o]=e.findById(o))}),Object.values(i).forEach(function(a){a&&e.updateCombo(a)})}};var dA="dblclick",l0e=["click","dblclick"];const f0e={getDefaultCfg:function(){return{trigger:dA,relayout:!0}},getEvents:function(){var t,e;return l0e.includes(this.trigger)?e=this.trigger:(e=dA,console.warn("Behavior collapse-expand-group 的 trigger 参数不合法,请输入 'click' 或 'dblclick'")),t={},t["combo:".concat(e)]="onComboClick",t},onComboClick:function(t){var e=t.item,n=this,i=n.graph,a=n.relayout;if(!(!e||e.destroyed||e.getType()!=="combo")){var o=e.getModel(),s=o.id;s&&(i.collapseExpandCombo(s),a&&i.get("layout")?i.layout():i.refreshPositions())}}};var c0e=jo.isPolygonsIntersect,d0e=jo.pathToPoints,hA="shift",h0e=["drag","shift","ctrl","alt","control"],v0e=function(t,e){var n,i=t.getKeyShape();if(t.get("type")==="path")n=d0e(i.attr("path"));else{var a=i.getCanvasBBox();n=[[a.minX,a.minY],[a.maxX,a.minY],[a.maxX,a.maxY],[a.minX,a.maxY]]}return c0e(e,n)};const p0e={getDefaultCfg:function(){return{delegateStyle:{fill:"#EEF6FF",fillOpacity:.4,stroke:"#DDEEFE",lineWidth:1},onSelect:function(){},onDeselect:function(){},shouldDeselect:void 0,selectedState:"selected",trigger:hA,includeEdges:!0,selectedEdges:[],selectedNodes:[]}},getEvents:function(){return h0e.indexOf(this.trigger.toLowerCase())>-1||(this.trigger=hA,console.warn("Behavior lasso-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),this.trigger==="drag"?{dragstart:"onDragStart",drag:"onDragMove",dragend:"onDragEnd","canvas:click":"clearStates"}:{dragstart:"onDragStart",drag:"onDragMove",dragend:"onDragEnd",keyup:"onKeyUp",keydown:"onKeyDown","canvas:click":"clearStates"}},onDragStart:function(t){var e=this.lasso,n=t.item;n||this.trigger!=="drag"&&!this.keydown||(this.selectedNodes&&this.selectedNodes.length!==0&&this.clearStates("dragstart"),e||(e=this.createLasso()),this.dragging=!0,this.originPoint={x:t.x,y:t.y},this.points.push(this.originPoint),e.show())},onDragMove:function(t){this.dragging&&(this.trigger!=="drag"&&!this.keydown||(this.points.push({x:t.x,y:t.y}),this.updateLasso(t)))},onDragEnd:function(t){!this.lasso&&!this.dragging||this.trigger!=="drag"&&!this.keydown||(this.points.push(this.originPoint),this.getSelectedItems(),this.lasso.remove(!0),this.lasso=null,this.points=[],this.dragging=!1)},getLassoPath:function(){var t=this.points,e=[];return t.length&&(t.forEach(function(n,i){i===0?e.push(["M",n.x,n.y]):e.push(["L",n.x,n.y])}),e.push(["L",t[0].x,t[0].y])),e},clearStates:function(t){t===void 0&&(t="canvas:click");var e=this,n=e.graph,i=e.selectedState,a=e.shouldDeselect,o=n.findAllByState("node",i),s=n.findAllByState("edge",i);(!a||a({action:t,nodes:o,edges:s}))&&(o.forEach(function(u){return n.setItemState(u,i,!1)}),s.forEach(function(u){return n.setItemState(u,i,!1)})),this.onDeselect&&this.onDeselect(this.selectedNodes,this.selectedEdges),this.selectedNodes=[],this.selectedEdges=[],n.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[]},select:!1})},getSelectedItems:function(){var t=this,e=this,n=e.graph,i=e.shouldUpdate,a=this.points.map(function(f){return[n.getCanvasByPoint(f.x,f.y).x,n.getCanvasByPoint(f.x,f.y).y]}),o=this.selectedState,s=[],u=[];n.getNodes().forEach(function(f){if(f.isVisible()&&v0e(f,a)&&i(f,"select",t)){s.push(f);var c=f.getModel();u.push(c.id),n.setItemState(f,o,!0)}});var l=[];this.includeEdges&&s.forEach(function(f){var c=f.getOutEdges();c.forEach(function(d){if(d.isVisible()){var h=d.getModel(),v=h.source,p=h.target;u.includes(v)&&u.includes(p)&&i(d,"select",t)&&(l.push(d),n.setItemState(d,t.selectedState,!0))}})}),this.selectedEdges=l,this.selectedNodes=s,this.onSelect&&this.onSelect(s,l),n.emit("nodeselectchange",{selectedItems:{nodes:s,edges:l},select:!0})},createLasso:function(){var t=this,e=t.graph.get("delegateGroup").addShape("path",{attrs:F({path:[]},t.delegateStyle),capture:!1,name:"lasso-shape"});return this.lasso=e,this.delegate=e,this.points=[],e},updateLasso:function(t){var e=this;this.lasso.attr({path:e.getLassoPath()})},onKeyDown:function(t){var e=t.key;e&&(e.toLowerCase()===this.trigger.toLowerCase()?this.keydown=!0:this.keydown=!1)},onKeyUp:function(){this.lasso&&(this.lasso.remove(!0),this.lasso=null,this.points=[],this.dragging=!1),this.keydown=!1}};var vA="click",g0e=["click","drag"],pA=void 0,y0e=["shift","ctrl","control","alt","meta",void 0];const m0e={getDefaultCfg:function(){return{trigger:vA,key:pA,edgeConfig:{},getEdgeConfig:void 0}},getEvents:function(){var t=this;g0e.indexOf(t.trigger.toLowerCase())>-1||(t.trigger=vA,console.warn("Behavior create-edge 的 trigger 参数不合法,请输入 'click','drag'")),t.key&&y0e.indexOf(t.key.toLowerCase())===-1&&(t.trigger=pA,console.warn("Behavior create-edge 的 key 参数不合法,请输入 'shift','ctrl','alt','control',或 undefined"));var e;return t.trigger==="drag"?e={"node:dragstart":"onClick","combo:dragstart":"onClick",drag:"updateEndPoint","node:drop":"onClick","combo:drop":"onClick",dragend:"onDragEnd"}:t.trigger==="click"&&(e={"node:click":"onClick",mousemove:"updateEndPoint","edge:click":"cancelCreating","canvas:click":"cancelCreating","combo:click":"onClick"}),t.key&&(e.keydown="onKeyDown",e.keyup="onKeyUp"),e},onDragEnd:function(t){var e=this;if(!(e.key&&!e.keydown)){var n=t.item;(!n||n.getID()===e.source||n.getType()!=="node")&&e.cancelCreating({item:e.edge,x:t.x,y:t.y})}},onClick:function(t){var e=this;if(!(e.key&&!e.keydown)){var n=t.item,i=e.graph,a=n.getModel(),o=e.getEdgeConfig;if(e.addingEdge&&e.edge){if(!e.shouldEnd(t,e))return;var s=void 0;o&&Yr(o)?s=o({source:e.source,target:a.id},e):s=e.edgeConfig;var u=F({target:a.id},s);if(e.source===a.id&&(u.type="loop"),i.emit("beforecreateedge",{}),i.updateItem(e.edge,u,!1),i.get("enabledStack")){var l=F(F({},e.edge.getModel()),{itemType:"edge"}),f={};f.edges=[l],i.pushStack("add",{before:{},after:f})}i.emit("aftercreateedge",{edge:e.edge}),e.edge.getKeyShape().set("capture",!0),e.edge=null,e.addingEdge=!1}else{if(!e.shouldBegin(t,e))return;var s=void 0;o&&Yr(o)?s=o({source:a.id,target:a.id},e):s=e.edgeConfig,e.edge=i.addItem("edge",F({source:a.id,target:a.id},s),!1),e.source=a.id,e.addingEdge=!0,e.edge.getKeyShape().set("capture",!1)}}},updateEndPoint:function(t){var e=this;if(!(e.key&&!e.keydown)){e.edge&&e.edge.destroyed&&e.cancelCreating({item:e.edge});var n={x:t.x,y:t.y};if(!e.graph.findById(e.source)){e.addingEdge=!1;return}e.addingEdge&&e.edge&&e.graph.updateItem(e.edge,{target:n},!1)}},cancelCreating:function(t){var e,n,i=this;if(!(i.key&&!i.keydown)){var a=i.graph,o=t.item;if(i.addingEdge&&(i.edge===o||!((n=(e=t.target)===null||e===void 0?void 0:e.isCanvas)===null||n===void 0)&&n.call(e))){i.edge&&!i.edge.destroyed&&a.removeItem(i.edge,!1),i.edge=null,i.addingEdge=!1;return}}},onKeyDown:function(t){var e=this,n=t.key;n&&(n.toLowerCase()===e.key.toLowerCase()?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){var t=this;t.addingEdge&&t.edge&&(t.graph.removeItem(t.edge,!1),t.addingEdge=!1,t.edge=null),this.keydown=!1}};var gA="ctrl",b0e=["shift","ctrl","alt","control"],x0e="1";const w0e={getDefaultCfg:function(){return{trigger:gA,combinedKey:x0e,functionName:"fitView",functionParams:[]}},getEvents:function(){return b0e.indexOf(this.trigger.toLowerCase())>-1||(this.trigger=gA,console.warn("Behavior shortcuts-fit-view 的 trigger 参数 '".concat(this.trigger,"' 不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'"))),this.combinedKey===this.trigger&&(this.combinedKey=void 0),{keyup:"onKeyUp",keydown:"onKeyDown"}},onKeyDown:function(t){var e=t.key;if(e){var n=this.trigger.toLowerCase(),i=e.toLowerCase();this.triggerKeydown||(i===n||i==="control"&&n==="ctrl"||i==="ctrl"&&n==="control"?this.triggerKeydown=!0:this.triggerKeydown=!1);var a=this.graph;if(!a[this.functionName])return console.warn("Behavior shortcuts-fit-view 的 functionName 参数 '".concat(this.functionName,"' 不合法,它不是 Graph 的一个函数名")),{};if(this.triggerKeydown&&!this.combinedKey){this.functionParams&&this.functionParams.length?a[this.functionName].apply(a,this.functionParams):a[this.functionName]();return}var o=this.combinedKey.toLowerCase();this.triggerKeydown&&(i===o||i==="control"&&o==="ctrl"||i==="ctrl"&&o==="control")&&(this.functionParams&&this.functionParams.length?a[this.functionName].apply(a,this.functionParams):a[this.functionName]())}},onKeyUp:function(){this.brush&&(this.brush.remove(!0),this.brush=null,this.dragging=!1),this.triggerKeydown=!1}};var E0e=["shift","ctrl","alt","control","meta"];const _0e={getDefaultCfg:function(){return{direction:"both",enableOptimize:!1,zoomKey:"ctrl",scalableRange:0,allowDragOnItem:!0}},getEvents:function(){return(!this.zoomKey||E0e.indexOf(this.zoomKey)===-1)&&(this.zoomKey="ctrl"),{wheel:"onWheel"}},onWheel:function(t){var e=this;if(this.allowDrag(t)){var n=this.graph,i=Array.isArray(this.zoomKey)?[].concat(this.zoomKey):[this.zoomKey];i.includes("control")&&i.push("ctrl");var a=i.some(function(R){return t["".concat(R,"Key")]});if(a){var o=n.get("canvas"),s=o.getPointByClient(t.clientX,t.clientY),u=n.getZoom();t.wheelDelta>0?u=u+u*.05:u=u-u*.05,n.zoomTo(u,{x:s.x,y:s.y})}else{var l=t.deltaX||t.movementX,f=t.deltaY||t.movementY;!f&&navigator.userAgent.indexOf("Firefox")>-1&&(f=-t.wheelDelta*125/3);var c=this.graph.get("width"),d=this.graph.get("height"),h=this.graph.get("canvas").getCanvasBBox(),v=this.scalableRange,p=this.scalableRange;v<1&&v>-1&&(v=c*v,p=d*p);var g=h.minX,y=h.maxX,m=h.minY,b=h.maxY;l>0?y<-v?l=0:y-l<-v&&(l=y+v):l<0&&(g>c+v?l=0:g-l>c+v&&(l=g-(c+v))),f>0?b<-p?f=0:b-f<-p&&(f=b+p):f<0&&(m>d+p?f=0:m-f>d+p&&(f=m-(d+p))),this.get("direction")==="x"?f=0:this.get("direction")==="y"&&(l=0),n.translate(-l,-f)}t.preventDefault();var x=this.get("enableOptimize");if(x){var w=this.get("optimizeZoom"),E=this.get("optimized"),_=n.getNodes(),M=n.getEdges(),C=_.length,S=M.length;if(!E){for(var A=0;A{var c;const o=t.track.nodes,s=(c=t.track.nodes[t.track.selector.trackIndex])==null?void 0:c.id,u=(()=>{const d=o.reduce((h,v)=>v.idh!==d&&h.pid==d.pid)?d.parent:d})(),l=new Set;l.add(u),o.forEach(d=>{l.add(d);let h=d;for(;h&&h!==u;)l.add(h),h=h.parent;if(d!==u&&d.parent){const v=d.parent.children.indexOf(d);v!=0&&d.parent.children.forEach((p,g)=>{Math.abs(g-v)<=1&&l.add(p)})}});const f=Array.from(l).map(d=>({_node:d,children:[],id:d.id.toString(),label:RE(d),tracked:s===d.id}));return f.sort((d,h)=>d._node.id-h._node.id),f.forEach(d=>{const h=f.find(v=>v.id===d._node.pid.toString());h&&h.children.push(d)}),f.forEach(d=>{if(d.children.length{for(;h.length>0;)h.pop()},p=()=>{if(h.length==0)return;const g=h[0].parent.children,y=h[0];if(g.length>1&&g.indexOf(y)==1&&g.indexOf(h.at(-1))==g.length-1){v();return}d.children.push({_node:y,children:[],id:y.id.toString(),label:h.length==1?RE(y):`[${g.indexOf(y)} ... ${g.indexOf(h.at(-1))}]`,tracked:s===y.id}),v()};d._node.children.forEach(g=>{d.children.find(y=>y.id===g.id.toString())?p():h.push(g)}),h.length>0&&p(),d.children.sort((g,y)=>d._node.children.indexOf(g._node)-d._node.children.indexOf(y._node))}}),f}),n=On();let i;fs(()=>{if(!n.value)return;i==null||i.destroy();const o=n.value.scrollWidth,s=n.value.scrollHeight||o;i=new fg.TreeGraph({container:n.value,width:o,height:s,modes:{default:["drag-canvas","zoom-canvas"]},layout:{type:"indented",indent:25,getHeight(){return 10}}}),i.node(c=>({type:"file-node"})),i.edge(c=>{if(c.id&&c.id.startsWith("-")){const d=Number.parseInt(c.source)>Number.parseInt(c.target)?-1:1,h=String(c.connect),v=Number(c.count);let p=40;if(h.startsWith("<<")){let y=t.track.nodes.find(b=>b.id.toString()==c.source).parent,m=1;for(;y&&y.id.toString()!=c.target;)y=y.parent,m++;m>1&&(p+=m*20)}return v>1&&(p+=(v-1)*20),p*=d,{type:"quadratic",color:"#ff00ff80",curveOffset:p,style:{startArrow:!0},label:h,labelCfg:{style:{fill:"#f00",fontSize:12,background:{fill:"#ffffff",stroke:"#f0f",lineWidth:1,padding:[2,1,0,1],radius:2}}}}}return{type:"step-line"}}),i.data({...e.value[0]}),i.render();const u=Array.from(t.track.nodes).reverse(),l=t.track.selector.connectKeys,f={};u.forEach((c,d)=>{const h=u[d+1];if(h&&i){const v=h.id>c.id?`-${c.id}:${h.id}`:`-${h.id}:${c.id}`;f[v]=(f[v]||0)+1;const p=`${v}/${f[v]}`,g=l[l.length-d-1],y={"+":()=>h.parent.children.slice(0,h.parent.children.indexOf(h)).reverse().indexOf(c),"-":()=>h.parent.children.slice(h.parent.children.indexOf(h)+1).indexOf(c),">":()=>{let m=0,b=h.parent;for(;b;){if(b===c)return m;b=b.parent,m++}return m},"<":()=>h.children.indexOf(c),"<<":()=>{let m=0;const b=Array.from(h.children).reverse();for(;b.length>0;){const x=b.pop();if(x===c)return m;b.push(...Array.from(x.children).reverse()),m++}return m}}[g]()+1;i.addItem("edge",{source:c.id.toString(),target:h.id.toString(),id:p,connect:y>1?g+y:g,count:f[v]},!1)}}),i.fitView(30)}),pv(()=>{i==null||i.destroy()});const a=()=>{!i||i.get("destroyed")||!n.value||!n.value||!n.value.scrollWidth||!n.value.scrollHeight||i.changeSize(n.value.scrollWidth,n.value.scrollHeight)};return window.addEventListener("resize",a),pv(()=>{window.removeEventListener("resize",a)}),(o,s)=>(Lr(),bi("div",{ref_key:"container",ref:n},null,512))}}),D0e={"h-full":"",flex:"","gap-5px":"","p-5px":"","box-border":""},N0e=Ar("svg",{viewBox:"0 0 24 24"},[Ar("path",{fill:"currentColor",d:"M5 21V8.825Q4.125 8.5 3.563 7.738T3 6q0-1.25.875-2.125T6 3q1.25 0 2.125.875T9 6q0 .975-.562 1.738T7 8.825V19h4V3h8v12.175q.875.325 1.438 1.088T21 18q0 1.25-.875 2.125T18 21q-1.25 0-2.125-.875T15 18q0-.975.563-1.75T17 15.175V5h-4v16zM6 7q.425 0 .713-.288T7 6q0-.425-.288-.712T6 5q-.425 0-.712.288T5 6q0 .425.288.713T6 7m12 12q.425 0 .713-.288T19 18q0-.425-.288-.712T18 17q-.425 0-.712.288T17 18q0 .425.288.713T18 19m0-1"})],-1),P0e={key:0,class:"gkd_code"},R0e=Ar("div",null,"*为简化视图已隐藏部分节点",-1),j0e=Vr({__name:"SnapshotPage",setup(r){const t=cB(),e=MA(),n=OB(),i=Dr(()=>String(t.params.snapshotId||"")),a=Dr(()=>{const v=Number(t.query.showSize||"");return!Number.isSafeInteger(v)||v<=0?2e3:v}),o=On(""),s=On();fs(async()=>{const v=await CE.getItem(i.value);if(!v){ca.error("快照数据缺失");return}j5()&&setTimeout(async()=>{G5(v),yA[v.id]||$5(await CE.getItem(i.value))},1e3),v.nodes.length>a.value&&(ca.warning(`当前展示节点数量为${a.value} +
`)}},t.prototype.init=function(){var e=this;if(!e.destroyed){var n=e.get("graph"),i=n.getContainer(),a=e.get("container"),o=this.get("containerCfg");o?(a=this.createContainer(),i.appendChild(a)):a=i,this.set("container",a);var s=i.getBoundingClientRect(),u=new Io({container:i,width:s.right-s.left,height:s.bottom-s.top});tr(u.get("el"),{position:"absolute",top:0,left:0,pointerEvents:"none"}),window.addEventListener("resize",Fc(function(){return e.resizeCanvas(e)},100));var l=u.addGroup({id:"annotation-link-group"});e.set("linkGroup",l),e.set("canvas",u),e.get("getTitle")||e.set("getTitle",function(c){var d,h=((d=c==null?void 0:c.getModel)===null||d===void 0?void 0:d.call(c))||{},v=h.label,p=h.id;return v||p||"-"}),e.get("getContent")||e.set("getContent",function(c){var d,h;if(!c)return"-";var v=((d=c.getModel)===null||d===void 0?void 0:d.call(c))||{},p=v.label,g=v.id,y=(h=c.getType)===null||h===void 0?void 0:h.call(c),m=y?"".concat(y,": "):"";return"".concat(m).concat(p||g||"")});var f=e.get("defaultData");f&&this.readData(f)}},t.prototype.createContainer=function(){var e=this;if(!this.destroyed){var n=this.get("containerCfg"),i=this.get("graph"),a=i.getContainer(),o=a.getBoundingClientRect(),s=o.left,u=o.right,l=o.top,f=o.bottom,c=f-l,d=u-s,h=n.position,v=h===void 0?"top":h,p=n.offsetX,g=p===void 0?0:p,y=n.offsetY,m=y===void 0?0:y,b=KC(n,["position","offsetX","offsetY"]),x=n.height,w=x===void 0?"fit-content":x,E=n.width,_=E===void 0?i.getWidth():E;w==="100%"&&(w=c),_==="100%"&&(_=d);var M="unset",C="unset",S={};switch(v){case"right":M="".concat(c,"px"),S={top:0,right:0},S.right+=s+g,S.top+=l+m;break;case"bottom":C="".concat(d,"px"),S={bottom:0,left:0},S.left+=s+g,S.bottom+=l+m;break;case"top":C="".concat(d,"px");case"left":M="".concat(c,"px");default:S={top:0,left:0},S.left+=s+g,S.top+=l+m;break}Object.keys(S).forEach(function(T){S[T]="".concat(S[T],"px")});var A=Ur("
"));return tr(A,Hi(Hi({position:"absolute",display:v==="top"||v==="bottom"?"inline-flex":"unset",width:mt(_)?"".concat(_,"px"):_,height:mt(w)?"".concat(w,"px"):w,maxHeight:M,maxWidth:C,overflow:"scroll"},S),b)),a.appendChild(A),A.addEventListener("scroll",function(T){e.updateLinks()}),A}},t.prototype.resizeCanvas=function(e){clearTimeout(e.resizeTimer),e.resizeTimer=setTimeout(function(){if(!(!e||e.destroyed)){var n=e.get("container").getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top;e.get("canvas").changeSize(i,a),e.updateOutsideCards(e)}},250)},t.prototype.updateOutsideCards=function(e){var n=e||this,i=n.get("cardInfoMap")||{},a=n.get("graph"),o=a.getPointByCanvas(0,0),s=a.getPointByCanvas(a.getWidth(),a.getHeight()),u=a.getClientByPoint(o.x,o.y),l=u.x,f=u.y,c=a.getClientByPoint(s.x,s.y),d=c.x,h=c.y;Object.values(i).forEach(function(v){var p=v.card;if(p){var g=p.style,y=Vs(g.left),m=Vs(g.top),b=p.getBoundingClientRect(),x=b.width,w=b.height,E=y,_=m;y+x>d-l&&(E=d-l-x),y<0&&(E=0),m+w>h-f&&(_=h-f-w),m<0&&(_=0),tr(p,{left:"".concat(E,"px"),top:"".concat(_,"px")})}}),n.updateLinks()},t.prototype.showAnnotation=function(e){if(!this.destroyed){var n=e.item;this.toggleAnnotation(n)}},t.prototype.hideCards=function(){var e=this;if(!e.destroyed){var n=e.get("cardInfoMap")||{};Object.keys(n).forEach(function(i){e.hideCard(i)})}},t.prototype.toggleAnnotation=function(e,n){var i,a;n===void 0&&(n={});var o=this;if(!o.destroyed){var s=o.get("cardInfoMap")||{},u=o.get("graph"),l=o.get("container"),f=o.get("containerCfg"),c=Object.assign({},o.get("cardCfg")||{},n),d=c.minHeight,h=c.minWidth,v=c.width,p=c.height,g=c.collapsed,y=g===void 0?!1:g,m=c.x,b=c.y,x=c.title,w=c.content,E=c.maxTitleLength,_=c.defaultBegin,M=KC(c,["minHeight","minWidth","width","height","collapsed","x","y","title","content","maxTitleLength","defaultBegin"]),C=o.get("linkGroup"),S=this.get("rows")||[[]],A=(i=e.isCanvas)===null||i===void 0?void 0:i.call(e),T=A?qC:e.getID(),I=s[T]||{},k=I.card,P=I.link,N=I.x,z=I.y,W=I.title,D=I.content,R=this.get("getTitle"),H=this.get("getContent"),ee=this.get("getContentPlaceholder")||function(){return""},Y=this.get("getTitlePlaceHolder")||function(){return""},X=ee(e),fe=Y(e),we=Ur(this.getDOMContent(Hi({itemId:T,collapsed:y,title:((a=W||x||(R==null?void 0:R(e)))===null||a===void 0?void 0:a.substr(0,E))||fe,content:D||w||(H==null?void 0:H(e))||X},M))),Ae=mt(d)?"".concat(d,"px"):d;tr(we,{minHeight:y?"unset":Ae,minWidth:mt(h)?"".concat(h,"px"):h,height:p,width:v});var Ke=!!k;Ke?(P==null||P.remove(!0),l.replaceChild(we,k)):l.appendChild(we);var ot;if(!f){if(ot=l.getBoundingClientRect()||{},m!==void 0&&b!==void 0)N=m,z=b;else if(!Ke&&!A){var nt=ot.top,Ct=_||{},Et=Ct.left,fr=Ct.right,Gt=fr===void 0?16:fr,jt=Ct.top,Sr=jt===void 0?8:jt,rr=Ct.bottom,Rt=Gt,sr=Sr;isNaN(Et)||(Rt=l.scrollWidth-Et),isNaN(rr)||(sr=l.scrollHeight-rr);var Hr=mt(h)?h:100;N=l.scrollWidth-we.scrollWidth-(S.length-1)*Hr-Rt;var et=S[S.length-1],ie=(et[et.length-1]||{}).bbox;z=(ie==null?void 0:ie.bottom)-nt||sr}tr(we,{position:"absolute",left:"".concat(N,"px"),top:"".concat(z,"px"),cusor:f?"unset":"move"})}this.bindListener(we,T);var L=we.getBoundingClientRect();if(!A){var Se=Ey(e,L,u,this.get("canvas")),Pe=this.get("linkStyle");P=C.addShape("path",{attrs:Hi({lineWidth:1,lineDash:[5,5],stroke:"#ccc",path:Se},Pe)})}if(s[T]=Hi(Hi({},s[T]||{}),{id:T,collapsed:y,card:we,link:P,x:N,y:z,cardBBox:L,content:D||w,title:W||x,contentPlaceholder:X,titlePlaceholder:fe,isCanvas:A}),o.set("cardInfoMap",s),f)this.updateCardPositionsInConatainer(),this.updateLinks();else{var me=!isNaN(m)&&!isNaN(b);if(!Ke&&!A&&!me){var je=ot.bottom,Xe=je===void 0?0:je,nt=ot.top;S[S.length-1].push({id:T,bbox:L}),L.top>Xe-nt-L.height-16&&S.push([]),this.set("rows",S)}}this.updateCardSize(T);var qe=this.get("onAnnotationChange");qe==null||qe(s[T],Ke?"update":"create")}},t.prototype.updateCardPositionsInConatainer=function(){if(!this.destroyed){var e=this.get("cardInfoMap");if(e){var n=this.get("container"),i=this.get("containerCfg").position,a=n.getBoundingClientRect().width,o=getComputedStyle(n),s=Vs(o.paddingLeft)+Vs(o.paddingRight);a-=s,Object.values(e).forEach(function(u){var l=u.card,f=l.getBoundingClientRect().width;switch(i){case"right":tr(l,{marginLeft:a?"".concat(a-f,"px"):"0px"});break;case"top":case"bottom":tr(l,{marginLeft:"8px"})}})}}},t.prototype.handleExpandCollapseCard=function(e){if(!this.destroyed){var n=this.get("graph"),i=this.get("cardInfoMap");if(i){var a=i[e].collapsed,o=n.findById(e);if(o){var s=this.get("cardCfg").collapseType;s==="hide"&&!a?this.hideCard(e):this.toggleAnnotation(o,{collapsed:!a}),i[e]=Hi(Hi({},i[e]),{collapsed:!a})}}}},t.prototype.hideCard=function(e){if(!this.destroyed){var n=this.get("cardInfoMap");if(!(!n||!n[e])){var i=n[e],a=i.card,o=i.link;tr(a,{display:"none"}),o==null||o.hide();var s=this.get("onAnnotationChange");s(n[e],"hide")}}},t.prototype.removeCard=function(e){if(!this.destroyed){var n=this.get("cardInfoMap");if(n){var i=n[e],a=i.card,o=i.link,s=this.get("container");s.removeChild(a),o==null||o.remove(!0),delete n[e];var u=this.get("onAnnotationChange");u(i,"remove")}}},t.prototype.bindListener=function(e,n){var i=this;if(!this.destroyed){e.addEventListener("mousemove",function(u){var l;if(u.target.className==="g6-annotation-collapse"?l="collapse":u.target.className==="g6-annotation-expand"?l="expand":u.target.className==="g6-annotation-close"&&(l="close"),l){var f=i.get("cardCfg").onMouseEnterIcon,c=f===void 0?function(){}:f;c(u,n,l)}}),e.addEventListener("mouseout",function(u){var l;if(u.target.className==="g6-annotation-collapse"?l="collapse":u.target.className==="g6-annotation-expand"?l="expand":u.target.className==="g6-annotation-close"&&(l="close"),l){var f=i.get("cardCfg").onMouseLeaveIcon,c=f===void 0?function(){}:f;c(u,n,l)}}),e.addEventListener("mouseenter",function(u){var l=i.get("cardInfoMap");if(l){var f=i.get("graph"),c=f.findById(n);if(c){var d=i.get("itemHighlightState");f.setItemState(c,d,!0)}var h=l[n].link;if(h){var v=i.get("linkHighlightStyle")||{};h.attr(v)}}}),e.addEventListener("mouseleave",function(u){var l=i.get("cardInfoMap");if(l){var f=i.get("graph"),c=f.findById(n);if(c){var d=i.get("itemHighlightState");f.setItemState(c,d,!1)}var h=l[n].link;if(h){var v=i.get("linkHighlightStyle")||{};Object.keys(v).forEach(function(g){h.attr(g,void 0),h.attr(g,void 0)});var p=i.get("linkStyle");h.attr(p)}}}),e.addEventListener("click",function(u){var l=(i.get("cardCfg")||{}).onClickIcon;if(u.target.className==="g6-annotation-collapse"||u.target.className==="g6-annotation-expand"){var f=i.get("cardCfg").collapseType;f==="hide"?i.hideCard(n):i.handleExpandCollapseCard(n),l==null||l(u,n,u.target.className==="g6-annotation-collapse"?"collapse":"expand")}else if(u.target.className==="g6-annotation-close"){var c=i.get("cardCfg").closeType;c==="remove"?i.removeCard(n):i.hideCard(n),l==null||l(u,n,"close")}});var a=this.get("editable");a&&e.addEventListener("dblclick",function(u){var l=i.get("cardInfoMap"),f=(i.get("cardCfg")||{}).maxTitleLength,c=f===void 0?20:f;if(l){var d=u.target,h=d.className;if(!(h!=="g6-annotation-title"&&h!=="g6-annotation-content")){var v=h==="g6-annotation-title"?d.getBoundingClientRect():d.parentNode.getBoundingClientRect(),p=v.width,g=v.height,y=getComputedStyle(d),m=h==="g6-annotation-title"?"input":"textarea",b=Ur("<".concat(m,' class="').concat(h,'-input" type="textarea" style="width:').concat(p,"px; height: ").concat(g,'px; min-width: 16px;"/>')),x=Ur('
'));x.appendChild(b),d.parentNode.replaceChild(x,d);var w=l[n],E=w.contentPlaceholder,_=w.titlePlaceholder,M=w.content,C=w.title,S=M;h==="g6-annotation-title"?(b.name="title",b.maxLength=c,S=C):b.name="content",S?(b.innerHTML=d.innerHTML,b.value=d.innerHTML):b.placeholder=h==="g6-annotation-title"?_:E,b.focus(),b.addEventListener("blur",function(A){b.value&&(d.innerHTML=b.value,w[b.name||"title"]=b.value),x.parentNode.replaceChild(d,x),i.updateCardSize(n);var T=i.get("onAnnotationChange");T==null||T(w,"update")})}}});var o=["g6-annotation-title","g6-annotation-content","g6-annotation-title-input","g6-annotation-content-input"];e.draggable=!0,e.addEventListener("dragstart",function(u){var l=u.target.className;if(!o.includes(l)){var f=e.style;i.set("dragging",{card:e,x:u.clientX,y:u.clientY,left:Vs(f.left),top:Vs(f.top)})}}),e.addEventListener("drag",function(u){u.preventDefault();var l=i.get("cardInfoMap");if(l){var f=u.clientX,c=u.clientY,d=i.get("dragging");if(!(isNaN(f)||isNaN(c)||!d)){var h=d.x,v=d.y,p=d.left,g=d.top,y=d.card,m=f-h,b=c-v;p+=m,g+=b;var x=i.get("graph"),w=x.getPointByCanvas(0,0),E=x.getPointByCanvas(x.getWidth(),x.getHeight()),_=x.getClientByPoint(w.x,w.y),M=_.x,C=_.y,S=x.getClientByPoint(E.x,E.y),A=S.x,T=S.y,I=y.getBoundingClientRect(),k=I.right-I.left,P=I.bottom-I.top;(p>A-M-k&&m>0||p<0&&m<0)&&(p-=m),(g>T-C-P&&b>0||g<0&&b<0)&&(g-=b),tr(y,{left:"".concat(p,"px"),top:"".concat(g,"px"),visibility:"hidden"}),h=f,v=c;var N=(l[n]||{}).link;if(N){var z=x.findById(n);N.attr("path",Ey(z,I,x,i.get("canvas")))}i.set("dragging",{x:h,y:v,left:p,top:g,card:y})}}});var s=function(l){var f=i.get("cardInfoMap");if(f){var c=i.get("dragging");if(c){var d=c.left,h=c.top,v=c.card;f[n].x=d,f[n].y=h,tr(v,{visibility:"visible"}),i.set("dragging",!1);var p=i.get("rows");p==null||p.forEach(function(y){for(var m=y.length-1;m>=0;m--)y[m].id===n&&y.splice(m,1)});var g=i.get("onAnnotationChange");g==null||g(f[n],"update")}}};e.addEventListener("dragend",s)}},t.prototype.updateCardSize=function(e){var n=this.get("cardInfoMap");if(n){var i=n[e].card,a=i.getBoundingClientRect().width,o=i.getElementsByClassName("g6-annotation-title")[0];if(o){var s=getComputedStyle(o),u=Vs(s.marginLeft),l=o.getBoundingClientRect().width;tr(o,{marginRight:"".concat(a-u-24-16-l,"px")})}}},t.prototype.updateLink=function(e){var n=e.item;if(n){var i=this.get("cardInfoMap");if(i){var a=this.get("canvas"),o=this.get("graph"),s=n.getID(),u=i[s]||{},l=u.link,f=u.card;if(l){var c=Ey(n,f.getBoundingClientRect(),o,a);l.attr("path",c)}}}},t.prototype.updateLinks=function(){var e=this;if(!this.destroyed){var n=this.get("cardInfoMap");if(n){var i=this.get("graph");Object.values(n).forEach(function(a){var o=a.id,s=i.findById(o);e.updateLink({item:s})})}}},t.prototype.onGraphDataChange=function(){var e=this,n=this.get("cardInfoMap");if(n){var i=this.get("graph");Object.values(n).forEach(function(a){var o=a.id,s=a.card,u=a.isCanvas;if(!(!s||u||s.style.display==="none")){var l=i.findById(o);l&&l.isVisible()?e.toggleAnnotation(l):e.hideCard(o)}})}},t.prototype.onGraphItemVisibilityChange=function(e){var n=e.item,i=e.visible;if(!(!n||n.destroyed)){var a=this.get("cardInfoMap");if(a){var o=n.getID();a[o]&&(i||this.hideCard(o))}}},t.prototype.saveData=function(e){e===void 0&&(e=!1);var n=this.get("cardInfoMap");if(n){var i=this.get("graph"),a=this.get("getTitle"),o=this.get("getContent"),s=[];return Object.values(n).forEach(function(u){var l=u.title,f=u.content,c=u.x,d=u.y,h=u.id,v=u.collapsed,p=u.card;if(!(p&&p.style.display==="none"&&!e)){var g=i.findById(h)||i.get("canvas");s.push({id:h,x:c,y:d,collapsed:v,title:l||(a==null?void 0:a(g)),content:f||(o==null?void 0:o(g)),visible:p&&p.style.display!=="none"})}}),s}},t.prototype.readData=function(e){var n=this,i=this.get("graph");e.forEach(function(a){var o=a.id,s=a.x,u=a.y,l=a.title,f=a.content,c=a.collapsed,d=a.visible,h=i.findById(o);if(!h&&o===qC&&(h=i.get("canvas")),!h){var v=n.get("cardInfoMap")||{};v[o]=a,n.set("cardInfoMap",v);return}n.toggleAnnotation(h,{x:s,y:u,title:l,content:f,collapsed:c}),d||n.hideCard(o)})},t.prototype.clear=function(){var e=this.get("cardInfoMap");if(e){var n=this.get("container");Object.values(e).forEach(function(i){var a=i.card,o=i.link;n.removeChild(a),o==null||o.remove(!0)}),this.set("cardInfoMap",{})}},t.prototype.destroy=function(){var e;this.clear(),(e=this.get("canvas"))===null||e===void 0||e.destroy();var n=this.get("graph");!n||n.destroyed||(this.get("containerCfg")&&n.getContainer().removeChild(this.get("container")),this.destroyed=!0)},t}(Mi);const _ge=Ege;var Sge=function(t,e){var n,i,a=1/0;Object.keys(t).forEach(function(u){var l=t[u];Object.keys(e).forEach(function(f){var c=e[f],d=l.x-c.x,h=l.y-c.y,v=d*d+h*h;a>v&&(a=v,n=l,i=c)})});var o=20,s=Kn.getControlPoint(n,i,.5,o);return[["M",n.x,n.y],["Q",s.x,s.y,i.x,i.y]]},Ey=function(t,e,n,i){var a,o,s=t.getType();if(s==="edge")o=[t.getKeyShape().getPoint(.5)];else{var u=(a=t.getKeyShape)===null||a===void 0?void 0:a.call(t).getBBox(),l=u.minX,f=u.minY,c=u.maxX,d=u.maxY,h=t.getModel(),v=h.x,p=h.y;l+=v,f+=p,c+=v,d+=p,o={left:{x:l,y:(f+d)/2},right:{x:c,y:(f+d)/2},top:{x:(l+c)/2,y:f},bottom:{x:(l+c)/2,y:d}}}Object.keys(o).forEach(function(C){var S=o[C],A=S.x,T=S.y,I=n.getClientByPoint(A,T);o[C]=i.getPointByClient(I.x,I.y)});var g=e.top,y=g===void 0?0:g,m=e.left,b=m===void 0?0:m,x=e.right,w=x===void 0?0:x,E=e.bottom,_=E===void 0?0:E,M={left:i.getPointByClient(b,(y+_)/2),right:i.getPointByClient(w,(y+_)/2),top:i.getPointByClient((b+w)/2,y),bottom:i.getPointByClient((b+w)/2,_)};return Sge(o,M)},Vs=function(t){return Number(t.replace(/\s+|px/gi,""))||0},Li={PluginBase:Mi,Menu:Hhe,Grid:Uhe,Minimap:tve,Bundling:ave,ToolBar:dve,Tooltip:pve,Fisheye:uve,TimeBar:rge,ImageMinimap:sge,EdgeFilterLens:cge,SnapLine:gge,Legend:xge,Annotation:_ge};Bo("circle",{options:{size:it.defaultNode.size,style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"circle",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=Pr({},i,t.icon),s="".concat(this.type,"-keyShape"),u=e.addShape("circle",{attrs:a,className:s,name:s,draggable:!0});e.shapeMap[s]=u;var l=o.width,f=o.height,c=o.show,d=o.text;if(c){var h="".concat(this.type,"-icon");d?e.shapeMap[h]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},o),className:h,name:h,draggable:!0}):e.shapeMap[h]=e.addShape("image",{attrs:F({x:-l/2,y:-f/2},o),className:h,name:h,draggable:!0})}return this.drawLinkPoints(t,e),u},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints;if(n){var i=n||{},a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0]/2;if(o){var v="link-point-left";e.shapeMap[v]=e.addShape("circle",{attrs:F(F({},c),{x:-h,y:0,r:l/2||f||5}),className:v,name:v,isAnchorPoint:!0})}if(s){var p="link-point-right";e.shapeMap[p]=e.addShape("circle",{attrs:F(F({},c),{x:h,y:0,r:l/2||f||5}),className:p,name:p,isAnchorPoint:!0})}if(a){var g="link-point-top";e.shapeMap[g]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-h,r:l/2||f||5}),className:g,name:g,isAnchorPoint:!0})}if(u){var y="link-point-bottom";e.shapeMap[y]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:h,r:l/2||f||5}),className:y,name:y,isAnchorPoint:!0})}}},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Pr({},e,n),a=this.getSize(t),o=a[0]/2,s=F({x:0,y:0,r:o},i);return s},update:function(t,e,n){var i=e.getContainer(),a=this.getSize(t),o=F({},t.style);t.style.stroke===void 0&&t.color&&(o.stroke=t.color),t.style.r===void 0&&!isNaN(a[0])&&(o.r=a[0]/2),this.updateShape(t,e,o,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("rect",{options:{size:[100,30],style:{radius:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},anchorPoints:[[0,.5],[1,.5]],stateStyles:F({},it.nodeStateStyles)},shapeType:"rect",labelPosition:"center",drawShape:function(t,e){var n=this.getShapeStyle(t),i=e.addShape("rect",{attrs:n,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});return e.shapeMap["".concat(this.type,"-keyShape")]=i,this.drawLinkPoints(t,e),i},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=i.width||a[0],s=i.height||a[1],u=F({x:-o/2,y:-s/2,width:o,height:s},i);return u},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getSize(t),s=e.get("keyShape");t.size||(o[0]=s.attr("width")||a.width,o[1]=s.attr("height")||a.height);var u={stroke:t.color,x:-o[0]/2,y:-o[1]/2,width:o[0],height:o[1]},l=Mt({},a,s.attr(),u);l=Mt(l,t.style),this.updateShape(t,e,l,!1,n),this.updateLinkPoints(t,i)}},"single-node");Bo("ellipse",{options:{size:[80,40],style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"ellipse",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("ellipse",{attrs:a,className:"ellipse-keyShape",name:"ellipse-keyShape",draggable:!0});e.shapeMap["ellipse-keyShape"]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0]/2,v=d[1]/2;o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=a[0]/2,s=a[1]/2,u=F({x:0,y:0,rx:o,ry:s},i);return u},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getSize(t),s={stroke:t.color,rx:o[0]/2,ry:o[1]/2},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("diamond",{options:{size:[80,80],style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"diamond",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("path",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},getPath:function(t){var e=this.getSize(t),n=e[0],i=e[1],a=[["M",0,-i/2],["L",n/2,0],["L",0,i/2],["L",-n/2,0],["Z"]];return a},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)}},"single-node");Bo("triangle",{options:{size:40,direction:"up",style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize},offset:15},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20,offset:6},stateStyles:F({},it.nodeStateStyles)},shapeType:"triangle",labelPosition:"bottom",drawShape:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.icon,a=i===void 0?{}:i,o=n.direction,s=this.getShapeStyle(t),u=t.direction||o,l=e.addShape("path",{attrs:s,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=l;var f=a.width,c=a.height,d=a.show,h=a.offset,v=a.text;if(d)if(v)e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},a),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0});else{var p=-f/2,g=-c/2;(u==="up"||u==="down")&&(g+=h),(u==="left"||u==="right")&&(p+=h),e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:p,y:g},a),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})}return this.drawLinkPoints(t,e),l},drawLinkPoints:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.linkPoints,a=i===void 0?{}:i,o=n.direction,s=t.direction||o,u=a.top,l=a.left,f=a.right,c=a.bottom,d=a.size,h=a.r,v=Ln(a,["top","left","right","bottom","size","r"]),p=this.getSize(t),g=p[0];if(l){var y=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?y=[-b,m]:s==="down"?y=[-b,-m]:s==="left"&&(y=[-b,b-m]),y&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},v),{x:y[0],y:y[1],r:d/2||h||5}),className:"link-point-left",name:"link-point-left"}))}if(f){var x=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?x=[b,m]:s==="down"?x=[b,-m]:s==="right"&&(x=[b,b-m]),x&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},v),{x:x[0],y:x[1],r:d/2||h||5}),className:"link-point-right",name:"link-point-right"}))}if(u){var w=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="up"?w=[b-m,-m]:s==="left"?w=[b,-m]:s==="right"&&(w=[-b,-m]),w&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},v),{x:w[0],y:w[1],r:d/2||h||5}),className:"link-point-top",name:"link-point-top"}))}if(c){var E=null,m=g*Math.sin(1/3*Math.PI),b=g*Math.sin(1/3*Math.PI);s==="down"?E=[-b+m,m]:s==="left"?E=[b,m]:s==="right"&&(E=[-b,m]),E&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},v),{x:E[0],y:E[1],r:d/2||h||5}),className:"link-point-bottom",name:"link-point-bottom"}))}},getPath:function(t){var e=(this.mergeStyle||this.getOptions(t)).direction,n=t.direction||e,i=this.getSize(t),a=i[0],o=a*Math.sin(1/3*Math.PI),s=a*Math.sin(1/3*Math.PI),u=[["M",-s,o],["L",0,-o],["L",s,o],["Z"]];return n==="down"?u=[["M",-s,-o],["L",s,-o],["L",0,o],["Z"]]:n==="left"?u=[["M",-s,s-o],["L",s,-s],["L",s,s],["Z"]]:n==="right"&&(u=[["M",s,s-o],["L",-s,s],["L",-s,-s],["Z"]]),u},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)},updateLinkPoints:function(t,e){var n=this.getOptions({}),i=n.linkPoints,a=n.direction,o=t.direction||a,s=e.shapeMap["link-point-left"]||e.find(function(N){return N.get("className")==="link-point-left"}),u=e.shapeMap["link-point-right"]||e.find(function(N){return N.get("className")==="link-point-right"}),l=e.shapeMap["link-point-top"]||e.find(function(N){return N.get("className")==="link-point-top"}),f=e.shapeMap["link-point-bottom"]||e.find(function(N){return N.get("className")==="link-point-bottom"}),c=i,d=s||u||l||f;d&&(c=d.attr());var h=Mt({},c,t.linkPoints),v=h.fill,p=h.stroke,g=h.lineWidth,y=h.size/2;y||(y=h.r);var m=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,bottom:void 0},b=m.left,x=m.right,w=m.top,E=m.bottom,_=this.getSize(t),M=_[0],C={r:y,fill:v,stroke:p,lineWidth:g},S=null,A=M*Math.sin(1/3*Math.PI),T=M*Math.sin(1/3*Math.PI);o==="up"?S=[-T,A]:o==="down"?S=[-T,-A]:o==="left"&&(S=[-T,T-A]),S&&(s?!b&&b!==void 0?(s.remove(),delete e.shapeMap["link-point-left"]):s.attr(F(F({},C),{x:S[0],y:S[1]})):b&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},C),{x:S[0],y:S[1]}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})));var I=null;o==="up"?I=[T,A]:o==="down"?I=[T,-A]:o==="right"&&(I=[T,T-A]),I&&(u?!x&&x!==void 0?(u.remove(),delete e.shapeMap["link-point-right"]):u.attr(F(F({},C),{x:I[0],y:I[1]})):x&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},C),{x:I[0],y:I[1]}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})));var k=null;o==="up"?k=[T-A,-A]:o==="left"?k=[T,-A]:o==="right"&&(k=[-T,-A]),k&&(l?!w&&w!==void 0?(l.remove(),delete e.shapeMap["link-point-top"]):l.attr(F(F({},C),{x:k[0],y:k[1]})):w&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},C),{x:k[0],y:k[1]}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})));var P=null;o==="down"?P=[-T+A,A]:o==="left"?P=[T,A]:o==="right"&&(P=[-T,A]),P&&(f?!E&&E!==void 0?(f.remove(),delete e.shapeMap["link-point-bottom"]):f.attr(F(F({},C),{x:P[0],y:P[1]})):E&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},C),{x:P[0],y:P[1]}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0})))}},"single-node");Bo("modelRect",{options:{size:[185,70],style:{radius:5,stroke:"#69c0ff",fill:"#ffffff",lineWidth:it.defaultNode.style.lineWidth,fillOpacity:1},labelCfg:{style:{fill:"#595959",fontSize:14,fontFamily:it.windowFontFamily},offset:30},descriptionCfg:{style:{fontSize:12,fill:"#bfbfbf",fontFamily:it.windowFontFamily},paddingTop:0},preRect:{show:!0,width:4,fill:"#40a9ff",radius:2},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:10,lineWidth:1,fill:"#72CC4A",stroke:"#72CC4A"},logoIcon:{show:!0,x:0,y:0,img:"https://gw.alipayobjects.com/zos/basement_prod/4f81893c-1806-4de4-aff3-9a6b266bc8a2.svg",width:16,height:16,offset:0},stateIcon:{show:!0,x:0,y:0,img:"https://gw.alipayobjects.com/zos/basement_prod/300a2523-67e0-4cbf-9d4a-67c077b40395.svg",width:16,height:16,offset:-5},anchorPoints:[[0,.5],[1,.5]]},shapeType:"modelRect",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).preRect,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=this.getSize(t),s=o[0],u=o[1],l=e.addShape("rect",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=l;var f=i.show,c=Ln(i,["show"]);return f&&(e.shapeMap["pre-rect"]=e.addShape("rect",{attrs:F({x:-s/2,y:-u/2,height:u},c),className:"pre-rect",name:"pre-rect",draggable:!0})),this.drawLogoIcon(t,e),this.drawStateIcon(t,e),this.drawLinkPoints(t,e),l},drawLogoIcon:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).logoIcon,i=n===void 0?{}:n,a=this.getSize(t),o=a[0];if(i.show){var s=i.width,u=i.height,l=i.x,f=i.y,c=i.offset,d=i.text,h=Ln(i,["width","height","x","y","offset","text"]);d?e.shapeMap["rect-logo-icon"]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},h),className:"rect-logo-icon",name:"rect-logo-icon",draggable:!0}):e.shapeMap["rect-logo-icon"]=e.addShape("image",{attrs:F(F({},h),{x:l||-o/2+s+c,y:f||-u/2,width:s,height:u}),className:"rect-logo-icon",name:"rect-logo-icon",draggable:!0})}},drawStateIcon:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).stateIcon,i=n===void 0?{}:n,a=this.getSize(t),o=a[0];if(i.show){var s=i.width,u=i.height,l=i.x,f=i.y,c=i.offset,d=i.text,h=Ln(i,["width","height","x","y","offset","text"]);d?e.shapeMap["rect-state-icon"]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},h),className:"rect-state-icon",name:"rect-state-icon",draggable:!0}):e.shapeMap["rect-state-icon"]=e.addShape("image",{attrs:F(F({},h),{x:l||o/2-s+c,y:f||-u/2,width:s,height:u}),className:"rect-state-icon",name:"rect-state-icon",draggable:!0})}},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.bottom,l=i.size,f=i.r,c=Ln(i,["top","left","right","bottom","size","r"]),d=this.getSize(t),h=d[0],v=d[1];o&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},c),{x:-h/2,y:0,r:l/2||f||5}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),s&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},c),{x:h/2,y:0,r:l/2||f||5}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),a&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:-v/2,r:l/2||f||5}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),u&&(e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},c),{x:0,y:v/2,r:l/2||f||5}),className:"link-point-bottom",name:"link-point-bottom",isAnchorPoint:!0}))},drawLabel:function(t,e){var n=this.getOptions(t),i=n.labelCfg,a=i===void 0?{}:i,o=n.logoIcon,s=o===void 0?{}:o,u=n.descriptionCfg,l=u===void 0?{}:u,f=this.getSize(t),c=f[0],d=null,h=s.show,v=s.width,p=-c/2+a.offset;h&&(p=-c/2+v+a.offset);var g=a.style,y=l.style,m=l.paddingTop;return Fe(t.description)?(d=e.addShape("text",{attrs:F(F({},g),{x:p,y:-5,text:t.label}),className:"text-shape",name:"text-shape",draggable:!0,labelRelated:!0}),e.shapeMap["text-shape"]=d,e.shapeMap["rect-description"]=e.addShape("text",{attrs:F(F({},y),{x:p,y:17+(m||0),text:t.description}),className:"rect-description",name:"rect-description",draggable:!0,labelRelated:!0})):(d=e.addShape("text",{attrs:F(F({},g),{x:p,y:7,text:t.label}),className:"text-shape",name:"text-shape",draggable:!0,labelRelated:!0}),e.shapeMap["text-shape"]=d),d},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getSize(t),o=i.width||a[0],s=i.height||a[1],u=F({x:-o/2,y:-s/2,width:o,height:s},i);return u},update:function(t,e){var n=this.mergeStyle||this.getOptions(t),i=n.style,a=i===void 0?{}:i,o=n.labelCfg,s=o===void 0?{}:o,u=n.descriptionCfg,l=u===void 0?{}:u,f=this.getSize(t),c=f[0],d=f[1],h=e.get("keyShape");h.attr(F(F({},a),{x:-c/2,y:-d/2,width:c,height:d}));var v=e.getContainer(),p=v.shapeMap["rect-logo-icon"]||v.find(function(we){return we.get("className")==="rect-logo-icon"}),g=p?p.attr():{},y=Mt({},g,t.logoIcon),m=y.width;m===void 0&&(m=this.options.logoIcon.width);var b=t.logoIcon?t.logoIcon.show:void 0,x=s.offset,w=-c/2+m+x;!b&&b!==void 0&&(w=-c/2+x);var E=v.shapeMap["node-label"]||v.find(function(we){return we.get("className")==="node-label"}),_=v.shapeMap["rect-description"]||v.find(function(we){return we.get("className")==="rect-description"});if(t.label)if(!E)v.shapeMap["node-label"]=v.addShape("text",{attrs:F(F({},s.style),{x:w,y:t.description?-5:7,text:t.label}),className:"node-label",name:"node-label",draggable:!0,labelRelated:!0});else{var M=t.labelCfg?t.labelCfg.style:{},C=Mt({},E.attr(),M);t.label&&(C.text=t.label),C.x=w,Fe(t.description)&&(C.y=-5),_&&(_.resetMatrix(),_.attr({x:w})),E.resetMatrix(),E.attr(C)}if(Fe(t.description)){var S=l.paddingTop;if(!_)v.shapeMap["rect-description"]=v.addShape("text",{attrs:F(F({},l.style),{x:w,y:17+(S||0),text:t.description}),className:"rect-description",name:"rect-description",draggable:!0,labelRelated:!0});else{var M=t.descriptionCfg?t.descriptionCfg.style:{},A=Mt({},_.attr(),M);Fe(t.description)&&(A.text=t.description),A.x=w,_.resetMatrix(),_.attr(F(F({},A),{y:17+(S||0)}))}}var T=v.shapeMap["pre-rect"]||v.find(function(we){return we.get("className")==="pre-rect"});if(T&&!T.destroyed){var I=Mt({},T.attr(),t.preRect);T.attr(F(F({},I),{x:-c/2,y:-d/2,height:d}))}if(p&&!p.destroyed)if(!b&&b!==void 0)p.remove(),delete v.shapeMap["pre-rect"];else{var k=y.width,P=y.height,N=y.x,z=y.y,W=y.offset,D=Ln(y,["width","height","x","y","offset"]);p.attr(F(F({},D),{x:N||-c/2+k+W,y:z||-P/2,width:k,height:P}))}else b&&this.drawLogoIcon(t,v);var R=v.shapeMap["rect-state-icon"]||v.find(function(we){return we.get("className")==="rect-state-icon"}),H=R?R.attr():{},ee=Mt({},H,t.stateIcon);if(R){!ee.show&&ee.show!==void 0&&(R.remove(),delete v.shapeMap["rect-state-icon"]);var Y=ee.width,P=ee.height,N=ee.x,z=ee.y,X=ee.offset,fe=Ln(ee,["width","height","x","y","offset"]);R.attr(F(F({},fe),{x:N||c/2-Y+X,y:z||-P/2,width:Y,height:P}))}else ee.show&&this.drawStateIcon(t,v);this.updateLinkPoints(t,v)},getOptions:function(t,e){return e==="move"?t:Pr({},this.options,this.getCustomConfig(t)||{},t)}},"single-node");Bo("star",{options:{size:60,style:{stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"star",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=e.addShape("path",{attrs:a,className:"".concat(this.type,"-keyShape"),name:"".concat(this.type,"-keyShape"),draggable:!0});e.shapeMap["".concat(this.type,"-keyShape")]=o;var s=i.width,u=i.height,l=i.show,f=i.text;return l&&(f?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-s/2,y:-u/2},i),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),this.drawLinkPoints(t,e),o},drawLinkPoints:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).linkPoints,i=n===void 0?{}:n,a=i.top,o=i.left,s=i.right,u=i.leftBottom,l=i.rightBottom,f=i.size,c=i.r,d=Ln(i,["top","left","right","leftBottom","rightBottom","size","r"]),h=this.getSize(t),v=h[0];if(s){var p=Math.cos(.1*Math.PI)*v,g=Math.sin((18+72*0)/180*Math.PI)*v;e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-right",name:"link-point-right"})}if(a){var p=Math.cos(.5*Math.PI)*v,g=Math.sin((18+72*1)/180*Math.PI)*v;e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-top",name:"link-point-top"})}if(o){var p=Math.cos(.9*Math.PI)*v,g=Math.sin((18+72*2)/180*Math.PI)*v;e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-left",name:"link-point-left"})}if(u){var p=Math.cos(1.3*Math.PI)*v,g=Math.sin((18+72*3)/180*Math.PI)*v;e.shapeMap["link-point-bottom"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-left-bottom",name:"link-point-left-bottom"})}if(l){var p=Math.cos(1.7*Math.PI)*v,g=Math.sin((18+72*4)/180*Math.PI)*v;e.shapeMap["link-point-right-bottom"]=e.addShape("circle",{attrs:F(F({},d),{x:p,y:-g,r:f/2||c||5}),className:"link-point-right-bottom",name:"link-point-right-bottom"})}},getPath:function(t){var e=this.getSize(t),n=e[0],i=n*3/8,a=t.innerR||i;return Kn.getStarPath(n,a)},getShapeStyle:function(t){var e=(this.mergeStyle||this.getOptions(t)).style,n={stroke:t.color},i=Mt({},e,n),a=this.getPath(t),o=F({path:a},i);return o},update:function(t,e,n){var i=e.getContainer(),a=this.getOptions({}).style,o=this.getPath(t),s={stroke:t.color,path:o},u=e.get("keyShape"),l=Mt({},a,u.attr(),s);l=Mt(l,t.style),this.updateShape(t,e,l,!0,n),this.updateLinkPoints(t,i)},updateLinkPoints:function(t,e){var n=this.getOptions({}).linkPoints,i=e.shapeMap["link-point-left"]||e.find(function(A){return A.get("className")==="link-point-left"}),a=e.shapeMap["link-point-right"]||e.find(function(A){return A.get("className")==="link-point-right"}),o=e.shapeMap["link-point-top"]||e.find(function(A){return A.get("className")==="link-point-top"}),s=e.shapeMap["link-point-left-bottom"]||e.find(function(A){return A.get("className")==="link-point-left-bottom"}),u=e.shapeMap["link-point-left-bottom"]||e.find(function(A){return A.get("className")==="link-point-right-bottom"}),l=n,f=i||a||o||s||u;f&&(l=f.attr());var c=Mt({},l,t.linkPoints),d=c.fill,h=c.stroke,v=c.lineWidth,p=c.size/2;p||(p=c.r);var g=t.linkPoints?t.linkPoints:{left:void 0,right:void 0,top:void 0,leftBottom:void 0,rightBottom:void 0},y=g.left,m=g.right,b=g.top,x=g.leftBottom,w=g.rightBottom,E=this.getSize(t),_=E[0],M={r:p,fill:d,stroke:h,lineWidth:v},C=Math.cos((18+72*0)/180*Math.PI)*_,S=Math.sin((18+72*0)/180*Math.PI)*_;a?!m&&m!==void 0?(a.remove(),delete e.shapeMap["link-point-right"]):a.attr(F(F({},M),{x:C,y:-S})):m&&(e.shapeMap["link-point-right"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-right",name:"link-point-right",isAnchorPoint:!0})),C=Math.cos((18+72*1)/180*Math.PI)*_,S=Math.sin((18+72*1)/180*Math.PI)*_,o?!b&&b!==void 0?(o.remove(),delete e.shapeMap["link-point-top"]):o.attr(F(F({},M),{x:C,y:-S})):b&&(e.shapeMap["link-point-top"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-top",name:"link-point-top",isAnchorPoint:!0})),C=Math.cos((18+72*2)/180*Math.PI)*_,S=Math.sin((18+72*2)/180*Math.PI)*_,i?!y&&y!==void 0?(i.remove(),delete e.shapeMap["link-point-left"]):i.attr(F(F({},M),{x:C,y:-S})):y&&(e.shapeMap["link-point-left"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-left",name:"link-point-left",isAnchorPoint:!0})),C=Math.cos((18+72*3)/180*Math.PI)*_,S=Math.sin((18+72*3)/180*Math.PI)*_,s?!x&&x!==void 0?(s.remove(),delete e.shapeMap["link-point-left-bottom"]):s.attr(F(F({},M),{x:C,y:-S})):x&&(e.shapeMap["link-point-left-bottom"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-left-bottom",name:"link-point-left-bottom",isAnchorPoint:!0})),C=Math.cos((18+72*4)/180*Math.PI)*_,S=Math.sin((18+72*4)/180*Math.PI)*_,u?!w&&w!==void 0?(u.remove(),delete e.shapeMap["link-point-right-bottom"]):u.attr(F(F({},M),{x:C,y:-S})):w&&(e.shapeMap["link-point-right-bottom"]=e.addShape("circle",{attrs:F(F({},M),{x:C,y:-S}),className:"link-point-right-bottom",name:"link-point-right-bottom",isAnchorPoint:!0}))}},"single-node");var ZC=Kn.defaultSubjectColors,uc="fan-shape-";Bo("donut",{options:{size:it.defaultNode.size,style:{x:0,y:0,stroke:it.defaultNode.style.stroke,fill:it.defaultNode.style.fill,lineWidth:it.defaultNode.style.lineWidth},labelCfg:{style:{fill:it.nodeLabel.style.fill,fontSize:it.nodeLabel.style.fontSize,fontFamily:it.windowFontFamily}},linkPoints:{top:!1,right:!1,bottom:!1,left:!1,size:it.defaultNode.linkPoints.size,lineWidth:it.defaultNode.linkPoints.lineWidth,fill:it.defaultNode.linkPoints.fill,stroke:it.defaultNode.linkPoints.stroke},icon:{show:!1,img:"https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg",width:20,height:20},stateStyles:F({},it.nodeStateStyles)},shapeType:"circle",labelPosition:"center",drawShape:function(t,e){var n=(this.mergeStyle||this.getOptions(t)).icon,i=n===void 0?{}:n,a=this.getShapeStyle(t),o=Pr({},i,t.icon),s=e.addShape("circle",{attrs:a,className:"".concat(this.type,"-keyShape"),draggable:!0,name:"".concat(this.type,"-keyShape")});e.shapeMap["".concat(this.type,"-keyShape")]=s;var u=o.width,l=o.height,f=o.show,c=o.text;return f&&(c?e.shapeMap["".concat(this.type,"-icon")]=e.addShape("text",{attrs:F({x:0,y:0,fontSize:12,fill:"#000",stroke:"#000",textBaseline:"middle",textAlign:"center"},o),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0}):e.shapeMap["".concat(this.type,"-icon")]=e.addShape("image",{attrs:F({x:-u/2,y:-l/2},o),className:"".concat(this.type,"-icon"),name:"".concat(this.type,"-icon"),draggable:!0})),Mge(t,e,s),this.drawLinkPoints(t,e),s},updateShape:function(t,e,n,i,a){var o=e.get("keyShape");o.attr(F({},n)),Cge(t,e,o),this.updateLabel(t,e,a),i&&this.updateIcon(t,e)}},"circle");var Mge=function(t,e,n){var i=t.donutAttrs,a=i===void 0?{}:i,o=t.donutColorMap,s=o===void 0?{}:o,u=Object.keys(a).length;if(a&&u>1){var l=a3(a,s),f=l.configs,c=l.totalValue;if(c){var d=o3(n),h=d.lineWidth,v=d.arcR,p=[v,0],g=0;if(u===1){s1(e,{arcR:v,arcBegin:p,beginAngle:g,config:f[0],fanIndex:0,lineWidth:h,totalValue:c,drawWhole:!0});return}for(var y=0;y.999)p=[n,1e-4],y=1;else{var m=v*Math.PI*2;g=a+m,p=[n*Math.cos(g),-n*Math.sin(g)],y=m>Math.PI?1:0}var b={path:[["M",i[0],i[1]],["A",n,n,0,y,0,p[0],p[1]]],stroke:o.color||(h==null?void 0:h.attr("stroke"))||ZC[s%ZC.length],lineWidth:u};return h?h.attr(b):t.shapeMap["".concat(uc).concat(s)]=t.addShape("path",{attrs:b,name:"".concat(uc).concat(s),draggable:!0}),{beginAngle:g,arcBegin:p,shape:t.shapeMap["".concat(uc).concat(s)],shouldEnd:c||v>.999}},Cge=function(t,e,n){var i=t.donutAttrs,a=t.donutColorMap,o=a===void 0?{}:a,s={},u=e.getContainer();if(i){var l=a3(i,o),f=l.configs,c=l.totalValue;if(c)for(var d=o3(n),h=d.lineWidth,v=d.arcR,p=[v,0],g=0,y=0;y=0;a--){var o=t[a];o.id="".concat(o.x,"|||").concat(o.y),n[o.id]||(n[o.id]=o,e.push(o))}return e},s3=function(t){return Nx(t)},lp=function(t,e){return t.width||t.height?{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}:t},Tge=function(t,e){var n=Math.abs(t.x-e.centerX),i=Math.abs(t.y-e.centerY);return n===0&&i===0?0:n/e.width>i/e.height},u1=function(t,e,n){var i=Tge(e,t);if(i===0){var a=t.centerX,o=t.centerY;return n.ye.x?a=t.maxX:n.xt.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},QC=function(t,e){var n=Math.min(t.minX,e.minX),i=Math.min(t.minY,e.minY),a=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{centerX:(n+a)/2,centerY:(i+o)/2,minX:n,minY:i,maxX:a,maxY:o,height:o-i,width:a-n}},l1=function(t){return[{x:t.minX,y:t.minY},{x:t.maxX,y:t.minY},{x:t.maxX,y:t.maxY},{x:t.minX,y:t.maxY}]},Rh=function(t,e){var n=t.x,i=t.y;return ne.maxX||ie.maxY},Ige=function(t,e){return et.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},Oge=function(t,e){return et.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},Lge=function(t,e){return Ige(t,e.x).concat(Oge(t,e.y))},Dc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},kge=function(t,e){var n=-2,i=0;return e.forEach(function(a){a&&(t.x===a.x&&(i+=n),t.y===a.y&&(i+=n))}),i},JC=function(t,e,n,i,a){return Dc(t,e)+Dc(t,n)+kge(t,[e,n,i,a])},Dge=function r(t,e,n,i,a){a===void 0&&(a=0),t.unshift(e[i]),n[i]&&n[i]!==i&&a<=100&&r(t,e,n,n[i],a+1)},Bh=function(t,e,n,i){var a=n.x-t.x,o=n.y-t.y,s=i.x-t.x,u=i.y-t.y,l=n.x-e.x,f=n.y-e.y,c=i.x-e.x,d=i.y-e.y,h=a*u-o*s,v=l*d-f*c,p=a*f-o*l,g=s*d-u*c;return h*v<=0&&p*g<=0},f1=function(t,e,n){if(n.width||n.height){var i=l1(n),a=i[0],o=i[1],s=i[2],u=i[3];return Bh(t,e,a,o)||Bh(t,e,a,u)||Bh(t,e,o,s)||Bh(t,e,s,u)}return!1},Nge=function(t,e,n,i){var a=[];return t.forEach(function(o){if(o!==e&&(o.x===e.x||o.y===e.y)){if(f1(o,e,n)||f1(o,e,i))return;a.push(o)}}),Nx(a)},Pge=function(t,e,n,i,a,o,s){var u,l=[],f=(u={},u[e.id]=e,u),c={},d={},h={};d[e.id]=0,h[e.id]=JC(e,n,e);var v=new l3;v.add({id:e.id,value:h[e.id]});var p={};t.forEach(function(w){p[w.id]=w});for(var g;Object.keys(f).length;){var y=v.minId(!1);if(y)g=f[y];else break;if(g===n){var m=[];return Dge(m,p,c,n.id),m}delete f[g.id],v.remove(g.id),l.push(g);var b=Nge(t,g,i,a),x=function(E){E.forEach(function(_){if(l.indexOf(_)===-1){var M=_.id;f[M]||(f[M]=_);var C=h[g.id]+Dc(g,_);if(d[M]&&C>=d[M]){v.add({id:M,value:h[M]});return}c[M]=g.id,d[M]=C,h[M]=d[M]+JC(_,n,e,o,s),v.add({id:M,value:h[M]})}})};x(b)}return[e,n]},Rge=function(t,e,n){return!(t.x===e.x&&e.x===n.x||t.y===e.y&&e.y===n.y)},Bge=function(t,e,n,i){var a=Dc(t,e),o=Dc(n,e);a=0;o--){var s=t[o];if(s.x===n.x?i.push(s):(i=[s],n.x=s.x),s.y===n.y?a.push(s):(a=[s],n.y=s.y),i.length>2){var u=t.indexOf(i[1]);u>-1&&t.splice(u,1);continue}if(a.length>2){var u=t.indexOf(a[1]);u>-1&&t.splice(u,1)}}return t},l3=function(){function r(){this.arr=[],this.map={},this.arr=[],this.map={}}return r.prototype._innerAdd=function(t,e){for(var n=[0,e-1];n[1]-n[0]>1;){var i=Math.floor((n[0]+n[1])/2);if(this.arr[i].value>t.value)n[1]=i;else if(this.arr[i].value=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t},r.prototype._findFirstId=function(){for(;this.arr.length;){var t=this.arr.shift();if(this.map[t.id])return t.id}},r.prototype.minId=function(t){return t?this._clearAndGetMinId():this._findFirstId()},r}(),zge=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Gge=function(t,e,n,i,a){return s3(u3(t,e,n,i,a.offset))},$ge={offset:20,maxAllowedDirectionChange:Math.PI/2,maximumLoops:2e3,gridSize:10,directions:[{stepX:1,stepY:0},{stepX:-1,stepY:0},{stepX:0,stepY:1},{stepX:0,stepY:-1}],get penalties(){return{0:0,45:this.gridSize/2,90:this.gridSize/2}},distFunc:zge,fallbackRoute:Gge},ko=function(t,e){var n=Math.round(Math.abs(t/e)),i=t<0?-1:1;return n<0?0:i*n},Uge=function(t,e,n){var i={};return t.forEach(function(a){if(a)for(var o=lp(a.getBBox(),n),s=ko(o.minX,e);s<=ko(o.maxX,e);s+=1)for(var u=ko(o.minY,e);u<=ko(o.maxY,e);u+=1)i["".concat(s,"|||").concat(u)]=!0}),i},_y=function(t,e){var n=e.x-t.x,i=e.y-t.y;return n||i?Math.atan2(i,n):0},tA=function(t,e){var n=Math.abs(t-e);return n>Math.PI?2*Math.PI-n:n},rA=function(t,e,n){for(var i=1/0,a=0,o=e.length;al.minX&&e.xl.minY&&e.y0&&E>0;){var P=b.minId((E+1)%30===0);if(P)_=v[P];else break;if(k["".concat(_.x,"|||").concat(_.y)])return jge(_,g,f,e,t,c,u);delete v[_.id],b.remove(_.id),p[_.id]=!0;for(var x=0;xo.maxAllowedDirectionChange)&&!l[N])){v[N]||(v[N]=C);var z=s[T];S=o.distFunc(_,C)+(isNaN(z)?u:z),A=y[_.id]+S;var W=y[N];W&&A>=W||(g[N]=_,y[N]=A,m[N]=A+rA(C,h,o.distFunc),b.add({id:N,value:m[N]}))}}E-=1}return o.fallbackRoute(t,e,n,i,o)};CL("polyline",{options:{color:it.defaultEdge.color,size:it.defaultEdge.size,style:{radius:0,offset:15,x:0,y:0,stroke:it.defaultEdge.style.stroke,lineAppendWidth:it.defaultEdge.style.lineAppendWidth},labelCfg:{style:{fill:it.edgeLabel.style.fill,fontSize:it.edgeLabel.style.fontSize,fontFamily:it.windowFontFamily}},routeCfg:{obstacles:[],maxAllowedDirectionChange:Math.PI,maximumLoops:500,gridSize:10},stateStyles:F({},it.edgeStateStyles)},shapeType:"polyline",labelPosition:"center",drawShape:function(t,e){var n=this.getShapeStyle(t);n.radius===0&&delete n.radius;var i=e.addShape("path",{className:"edge-shape",name:"edge-shape",attrs:n});return e.shapeMap["edge-shape"]=i,i},getShapeStyle:function(t){var e=this.options.style,n={stroke:t.color},i=Mt({},e,n,t.style);t=this.getPathPoints(t),this.radius=i.radius,this.offset=i.offset;var a=t.startPoint,o=t.endPoint,s=this.getControlPoints(t),u=[a];s&&(u=u.concat(s)),u.push(o);var l=t.sourceNode,f=t.targetNode,c=i.radius,d=this.options.routeCfg,h=Mt({},d,t.routeCfg);h.offset=i.offset;var v=this.getPath(u,l,f,c,h,!s);(wt(v)&&v.length<=1||Fe(v)&&v.indexOf("L")===-1)&&(v="M0 0, L0 0"),(isNaN(a.x)||isNaN(a.y)||isNaN(o.x)||isNaN(o.y))&&(v="M0 0, L0 0");var p=Mt({},it.defaultEdge.style,i,{lineWidth:t.size,path:v});return p},updateShapeStyle:function(t,e){var n=e.getContainer();if(e.isVisible()){var i={stroke:t.color},a=n.shapeMap["edge-shape"]||n.find(function(x){return x.get("className")==="edge-shape"})||e.getKeyShape(),o=t.size;t=this.getPathPoints(t);var s=t.startPoint,u=t.endPoint,l=this.getControlPoints(t),f=[s];l&&(f=f.concat(l)),f.push(u);var c=a.attr(),d=Mt({},i,c,t.style),h=t.sourceNode,v=t.targetNode,p=d.radius,g=this.options.routeCfg,y=Mt({},g,t.routeCfg);y.offset=d.offset;var m=this.getPath(f,h,v,p,y,!l);(wt(m)&&m.length<=1||Fe(m)&&m.indexOf("L")===-1)&&(m="M0 0, L0 0"),(isNaN(s.x)||isNaN(s.y)||isNaN(u.x)||isNaN(u.y))&&(m="M0 0, L0 0"),c.endArrow&&d.endArrow===!1&&(t.style.endArrow={path:""}),c.startArrow&&d.startArrow===!1&&(t.style.startArrow={path:""});var b=Mt(i,a.attr(),{lineWidth:o,path:m},t.style);a&&a.attr(b)}},getPath:function(t,e,n,i,a,o){var s=a.offset,u=a.obstacles,l=a.simple;if(!s||t.length>2||o===!1){if(i)return eA(t,i);var f=[];return xe(t,function(v,p){p===0?f.push(["M",v.x,v.y]):f.push(["L",v.x,v.y])}),f}l!==!1&&!(u!=null&&u.length)&&(l=!0);var c=l?u3(t[t.length-1],t[0],n,e,s):Wge(t[0],t[t.length-1],e,n,a);if(!c||!c.length)return"M0 0, L0 0";if(i){var d=eA(c,i);return d}c=Fge(c);var h=Kn.pointsToPolygon(c);return h}},"single-edge");var iA=jo.cloneEvent,aA=jo.isNaN,oA=Math.abs,Xge=10,Yge=["shift","ctrl","alt","control"];const Vge={getDefaultCfg:function(){return{direction:"both",enableOptimize:!1,scalableRange:0,allowDragOnItem:!1}},getEvents:function(){return{mousedown:"onMouseDown",drag:"onDragMove",dragend:"onMouseUp","canvas:click":"onMouseUp",keyup:"onKeyUp",focus:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onMouseUp"}},updateViewport:function(t){var e=this.origin,n=+t.clientX,i=+t.clientY;if(!(aA(n)||aA(i))){var a=n-e.x,o=i-e.y;this.get("direction")==="x"?o=0:this.get("direction")==="y"&&(a=0),this.origin={x:n,y:i};var s=this.graph.get("width"),u=this.graph.get("height"),l=this.graph.get("canvas").getCanvasBBox(),f=this.scalableRange,c=this.scalableRange;f<1&&f>-1&&(f=s*f,c=u*c),(l.minX<=s+f&&l.minX+a>s+f||l.maxX+f>=0&&l.maxX+f+a<0)&&(a=0),(l.minY<=u+c&&l.minY+o>u+c||l.maxY+c>=0&&l.maxY+c+o<0)&&(o=0),this.graph.translate(a,o)}},onTouchStart:function(t){var e=this,n=t.originalEvent.touches,i=n[0],a=n[1];i&&a||(t.preventDefault(),this.mousedown=!0,e.onDragStart(t))},onMouseDown:function(t){this.mousedown=!0},onDragMove:function(t){this.mousedown&&(this.dragstart?this.onDrag(t):(this.dragstart=!0,this.onDragStart(t)))},onDragStart:function(t){var e=this,n=t.originalEvent;if(!(n&&t.name!=="touchstart"&&n.button!==0)&&!(t.name!=="touchstart"&&typeof window<"u"&&window.event&&!window.event.buttons&&!window.event.button)&&this.shouldBegin(t,this)&&!e.keydown&&this.allowDrag(t)){if(e.origin={x:t.clientX,y:t.clientY},e.dragging=!1,this.enableOptimize){for(var i=this.graph,a=i.getEdges(),o=0,s=a.length;ou)for(var h=i.getNodes(),v=0,p=h.length;v-1?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){this.keydown=!1,this.origin=null,this.dragging=!1,this.dragbegin=!1},allowDrag:function(t){var e,n,i=t.target,a=i&&i.isCanvas&&i.isCanvas();if(Bc(this.allowDragOnItem)&&!this.allowDragOnItem&&!a)return!1;if(Wn(this.allowDragOnItem)){var o=this.allowDragOnItem,s=o.node,u=o.edge,l=o.combo,f=(n=(e=t.item)===null||e===void 0?void 0:e.getType)===null||n===void 0?void 0:n.call(e);if(!s&&f==="node"||!u&&f==="edge"||!l&&f==="combo")return!1}return!0}},Hge={getDefaultCfg:function(){return{updateEdge:!0,delegateStyle:{},enableDelegate:!1,onlyChangeComboSize:!1,comboActiveState:"",selectedState:"selected",enableOptimize:!1,enableDebounce:!1,enableStack:!0}},getEvents:function(){return{"node:mousedown":"onMouseDown",drag:"onDragMove",dragend:"onDragEnd","combo:dragenter":"onDragEnter","combo:dragleave":"onDragLeave","combo:drop":"onDropCombo","node:drop":"onDropNode","canvas:drop":"onDropCanvas",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onDragEnd",afterchangedata:"onDragEnd"}},validationCombo:function(t){if(!this.origin||!t||t.destroyed)return!1;var e=t.getType();return e==="combo"},onTouchStart:function(t){if(t.item){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}this.mousedown={item:t.item,target:t.target,origin:{x:t.x,y:t.y}},this.dragstart=!0,e.onDragStart(t)}},onTouchMove:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a){e.onDragEnd(t);return}t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.onDrag(t)},onMouseDown:function(t){this.mousedown={item:t.item,target:t.target,origin:{x:t.x,y:t.y}},typeof window<"u"&&!this.windowEventBinded&&(this.windowEventBinded=!0,document.body.addEventListener("contextmenu",this.onDragEnd.bind(this)),document.body.addEventListener("mouseup",this.onDragEnd.bind(this)))},onDragMove:function(t){var e,n;if(((n=(e=t.item)===null||e===void 0?void 0:e.getType)===null||n===void 0?void 0:n.call(e))!=="node"){this.onDragEnd();return}this.mousedown&&(this.dragstart?this.onDrag(F(F({},t),this.mousedown)):(this.dragstart=!0,this.onDragStart(t)))},onDragStart:function(t){var e=this;if(this.currentShouldEnd=!0,!!this.shouldBegin(F(F({},t),this.mousedown),this)){var n=this.mousedown,i=n.item,a=n.target;if(!(!i||i.destroyed||i.hasLocked())){var o=i.getContainer();if(o.set("capture",!1),this.cachedCaptureItems||(this.cachedCaptureItems=[]),this.cachedCaptureItems.push(i),a){var s=a.get("isAnchorPoint");if(s)return}var u=this.graph;this.targets=[],this.targetCombo=null;var l=u.findAllByState("node",this.selectedState),f=i.get("id"),c=l.filter(function(h){var v=h.get("id");return f===v});if(c.length===0?this.targets.push(i):l.length>1?l.forEach(function(h){var v=h.hasLocked();v||e.targets.push(h)}):this.targets.push(i),this.graph.get("enabledStack")&&this.enableStack){var d=[];this.targets.forEach(function(h){var v=h.getModel(),p=v.x,g=v.y,y=v.id;d.push({x:p,y:g,id:y})}),this.set("beforeDragNodes",d)}this.hidenEdge={},this.get("updateEdge")&&this.enableOptimize&&!this.enableDelegate&&this.targets.forEach(function(h){var v=h.getEdges();v.forEach(function(p){p.isVisible()&&(e.hidenEdge[p.getID()]=!0,p.hide())})}),this.origin=this.mousedown.origin,this.point={},this.originPoint={}}}},onDrag:function(t){var e=this;if(!(!this.mousedown||!this.origin)&&this.shouldUpdate(t,this))if(this.get("enableDelegate"))this.updateDelegate(t);else if(this.enableDebounce)this.debounceUpdate({targets:this.targets,graph:this.graph,point:this.point,origin:this.origin,evt:t,updateEdge:this.get("updateEdge"),onlyChangeComboSize:this.onlyChangeComboSize,updateParentCombos:this.updateParentCombos});else{var n={};this.targets.map(function(i){e.update(i,t);var a=i.getModel().comboId;a&&(n[a]=e.graph.findById(a))}),this.onlyChangeComboSize&&this.updateParentCombos()}},onDragEnd:function(t){var e=this,n;if(this.mousedown=!1,this.dragstart=!1,typeof window<"u"&&this.windowEventBinded&&(this.windowEventBinded=!1,document.body.removeEventListener("contextmenu",this.onDragEnd.bind(this)),document.body.removeEventListener("mouseup",this.onDragEnd.bind(this))),!!this.origin){(n=this.cachedCaptureItems)===null||n===void 0||n.forEach(function(o){var s=o.getContainer();s.set("capture",!0)}),this.cachedCaptureItems=[],this.delegateRect&&(this.delegateRect.remove(),this.delegateRect=null),this.get("updateEdge")&&this.enableOptimize&&!this.enableDelegate&&this.targets.forEach(function(o){var s=o.getEdges();s.forEach(function(u){e.hidenEdge[u.getID()]&&u.show(),u.refresh()})}),this.hidenEdge={};var i=this.graph;if(i.get("enabledStack")&&this.enableStack){var a={before:{nodes:[],edges:[],combos:[]},after:{nodes:[],edges:[],combos:[]}};this.get("beforeDragNodes").forEach(function(o){a.before.nodes.push(o)}),this.targets.forEach(function(o){var s=o.getModel(),u=s.x,l=s.y,f=s.id;a.after.nodes.push({x:u,y:l,id:f})}),i.pushStack("update",ar(a))}i.emit("dragnodeend",{items:this.targets,targetItem:null}),this.point={},this.origin=null,this.originPoint={},this.targets.length=0,this.targetCombo=null}},onDropCombo:function(t){var e=t.item;if(this.currentShouldEnd=this.shouldEnd(t,e,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.currentShouldEnd||!this.validationCombo(e))){var n=this.graph;if(this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1),this.targetCombo=e,this.onlyChangeComboSize)n.updateCombos();else{var i=e.getModel();this.targets.map(function(a){var o=a.getModel();o.comboId!==i.id&&n.updateComboTree(a,i.id)}),n.updateCombo(e)}n.emit("dragnodeend",{items:this.targets,targetItem:this.targetCombo})}},onDropCanvas:function(t){var e=this.graph;this.currentShouldEnd=this.shouldEnd(t,void 0,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.targets||this.targets.length===0||!this.currentShouldEnd)&&(this.onlyChangeComboSize?this.updateParentCombos():this.targets.map(function(n){var i=n.getModel();i.comboId&&e.updateComboTree(n)}))},onDropNode:function(t){if(!(!this.targets||this.targets.length===0)){var e=this,n=t.item,i=e.graph,a=n.getModel().comboId,o=a?i.findById(a):void 0;if(this.currentShouldEnd=this.shouldEnd(t,o,this),this.updatePositions(t,!this.currentShouldEnd),!!this.currentShouldEnd){if(this.onlyChangeComboSize)this.updateParentCombos();else if(a){var s=i.findById(a);e.comboActiveState&&i.setItemState(s,e.comboActiveState,!1),this.targets.map(function(u){var l=u.getModel();a!==l.comboId&&i.updateComboTree(u,a)}),i.updateCombo(s)}else this.targets.map(function(u){var l=u.getModel();l.comboId&&i.updateComboTree(u)});i.emit("dragnodeend",{items:this.targets,targetItem:n})}}},onDragEnter:function(t){var e=t.item;if(this.validationCombo(e)){var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!0)}},onDragLeave:function(t){var e=t.item;if(this.validationCombo(e)){var n=this.graph;this.comboActiveState&&n.setItemState(e,this.comboActiveState,!1)}},updatePositions:function(t,e){var n=this;!this.targets||this.targets.length===0||(this.get("enableDelegate")?this.enableDebounce?this.debounceUpdate({targets:this.targets,graph:this.graph,point:this.point,origin:this.origin,evt:t,updateEdge:this.get("updateEdge"),onlyChangeComboSize:this.onlyChangeComboSize,updateParentCombos:this.updateParentCombos}):e||this.targets.map(function(i){return n.update(i,t)}):this.targets.map(function(i){return n.update(i,t,e)}))},update:function(t,e,n){var i=this.origin,a=t.get("model"),o=t.get("id");this.point[o]||(this.point[o]={x:a.x||0,y:a.y||0});var s=e.x-i.x+this.point[o].x,u=e.y-i.y+this.point[o].y;n&&(s+=i.x-e.x,u+=i.y-e.y);var l={x:s,y:u};this.get("updateEdge")?this.graph.updateItem(t,l,!1):t.updatePosition(l)},debounceUpdate:Fc(function(r){var t=r.targets,e=r.graph,n=r.point,i=r.origin,a=r.evt,o=r.updateEdge,s=r.onlyChangeComboSize,u=r.updateParentCombos;t.map(function(l){var f=l.get("model"),c=l.get("id");n[c]||(n[c]={x:f.x||0,y:f.y||0});var d=a.x-i.x+n[c].x,h=a.y-i.y+n[c].y,v={x:d,y:h};o?e.updateItem(l,v,!1):l.updatePosition(v)}),s&&u(e,t)},50,!0),updateDelegate:function(t){var e=this.graph;if(this.delegateRect){var d=t.x-this.origin.x+this.originPoint.minX,h=t.y-this.origin.y+this.originPoint.minY;this.delegateRect.attr({x:d,y:h})}else{var n=e.get("group"),i=Pr({},su.delegateStyle,this.delegateStyle),a=this.calculationGroupPosition(t),o=a.x,s=a.y,u=a.width,l=a.height,f=a.minX,c=a.minY;this.originPoint={x:o,y:s,width:u,height:l,minX:f,minY:c},this.delegateRect=n.addShape("rect",{attrs:F({width:u,height:l,x:o,y:s},i),name:"rect-delegate-shape"}),this.delegate=this.delegateRect,this.delegateRect.set("capture",!1)}},calculationGroupPosition:function(t){var e=this.targets;e.length===0&&e.push(t.item);for(var n=1/0,i=-1/0,a=1/0,o=-1/0,s=0;si&&(i=d),h>o&&(o=h)}var v=Math.floor(n),p=Math.floor(a),g=Math.ceil(i)-Math.floor(n),y=Math.ceil(o)-Math.floor(a);return{x:v,y:p,width:g,height:y,minX:n,minY:a}},updateParentCombos:function(t,e){var n=t||this.graph,i=e||this.targets,a={};i==null||i.forEach(function(o){var s=o.getModel().comboId;s&&(a[s]=n.findById(s))}),Object.values(a).forEach(function(o){o&&n.updateCombo(o)})}};var Fh=null;const Kge={getDefaultCfg:function(){return{trigger:"mouseenter",activeState:"active",inactiveState:"inactive",resetSelected:!1,shouldClearStatusOnSecond:!1,shouldUpdate:function(){return!0}}},getEvents:function(){return this.get("trigger")==="mouseenter"?{"node:mouseenter":"setAllItemStates","combo:mouseenter":"setAllItemStates","node:mouseleave":"clearActiveState","combo:mouseleave":"clearActiveState"}:{"node:click":"setAllItemStates","combo:click":"setAllItemStates","canvas:click":"clearActiveState","node:touchstart":"setOnTouchStart","combo:touchstart":"setOnTouchStart","canvas:touchstart":"clearOnTouchStart"}},setOnTouchStart:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.setAllItemStates(t)},clearOnTouchStart:function(t){var e=this;try{var n=t.originalEvent.touches,i=n[0],a=n[1];if(i&&a)return;t.preventDefault()}catch{console.warn("Touch original event not exist!")}e.clearActiveState(t)},setAllItemStates:function(t){clearTimeout(this.timer),this.throttleSetAllItemStates(t,this)},clearActiveState:function(t){var e=this,n=this.shouldClearStatusOnSecond;n&&(Fh=null),this.timer=setTimeout(function(){e.throttleClearActiveState(t,e)},50)},throttleSetAllItemStates:fc(function(r,t){var e=r.item,n=t.graph;if(!(!n||n.destroyed)&&(t.item=e,!!t.shouldUpdate(r.item,{event:r,action:"activate"},t))){var i=t.shouldClearStatusOnSecond,a=e.getModel().id;if(Fh===a&&i){t.throttleClearActiveState(r,t),Fh=null;return}for(var o=t.activeState,s=t.inactiveState,u=n.getNodes(),l=n.getCombos(),f=n.getEdges(),c=n.get("vedges"),d=u.length,h=l.length,v=f.length,p=c.length,g=t.inactiveItems||{},y=t.activeItems||{},m=0;m-1||(this.trigger=lA,console.warn("Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),this.trigger==="drag"?{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates"}:{dragstart:"onMouseDown",drag:"onMouseMove",dragend:"onMouseUp","canvas:click":"clearStates",keyup:"onKeyUp",keydown:"onKeyDown"}},onMouseDown:function(t){var e=t.item,n=this.brush,i=this.selectOnCombo,a=(e==null?void 0:e.getType())==="combo";a&&!i||!a&&e||this.trigger!=="drag"&&!this.keydown||(this.selectedNodes&&this.selectedNodes.length!==0&&this.clearStates(),n||(n=this.createBrush()),this.originPoint={x:t.canvasX,y:t.canvasY},n.attr({width:0,height:0}),n.show(),this.dragging=!0)},onMouseMove:function(t){this.dragging&&(this.trigger!=="drag"&&!this.keydown||this.updateBrush(t))},onMouseUp:function(t){this.graph,!(!this.brush&&!this.dragging)&&(this.trigger!=="drag"&&!this.keydown||(this.brush.remove(!0),this.brush=null,this.getSelectedNodes(t),this.dragging=!1))},clearStates:function(){var t=this,e=t.graph,n=t.selectedState,i=e.findAllByState("node",n),a=e.findAllByState("edge",n),o=e.findAllByState("combo",n);i.forEach(function(s){return e.setItemState(s,n,!1)}),a.forEach(function(s){return e.setItemState(s,n,!1)}),o.forEach(function(s){return e.setItemState(s,n,!1)}),this.selectedNodes=[],this.selectedEdges=[],this.selectedCombos=[],this.onDeselect&&this.onDeselect(this.selectedNodes,this.selectedEdges,this.selectedCombos),e.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[],combos:[]},select:!1})},isBBoxCenterInRect:function(t,e,n,i,a){var o=t.getBBox();return o.centerX>=e&&o.centerX<=n&&o.centerY>=i&&o.centerY<=a},getSelectedNodes:function(t){var e=this,n=this,i=n.graph,a=n.originPoint,o=n.shouldUpdate,s=n.isBBoxCenterInRect,u=this.selectedState,l={x:t.x,y:t.y},f=i.getPointByCanvas(a.x,a.y),c=zh(l.x,f.x),d=sA(l.x,f.x),h=zh(l.y,f.y),v=sA(l.y,f.y),p=[],g=[];i.getNodes().forEach(function(b){if(b.isVisible()&&s(b,c,d,h,v)&&o(b,"select",e)){p.push(b);var x=b.getModel();g.push(x.id),i.setItemState(b,u,!0)}});var y=[];this.includeEdges&&p.forEach(function(b){var x=b.getOutEdges();x.forEach(function(w){if(w.isVisible()){var E=w.getModel(),_=E.source,M=E.target;g.includes(_)&&g.includes(M)&&o(w,"select",e)&&(y.push(w),i.setItemState(w,e.selectedState,!0))}})});var m=[];this.includeCombos&&i.getCombos().forEach(function(b){if(b.isVisible()&&s(b,c,d,h,v)&&o(b,"select",e)){m.push(b);var x=b.getModel();g.push(x.id),i.setItemState(b,u,!0)}}),this.selectedEdges=y,this.selectedNodes=p,this.selectedCombos=m,this.onSelect&&this.onSelect(p,y,m),i.emit("nodeselectchange",{selectedItems:{nodes:p,edges:y,combos:m},select:!0})},createBrush:function(){var t=this,e=t.graph.get("canvas").addShape("rect",{attrs:t.brushStyle,capture:!1,name:"brush-shape"});return this.brush=e,this.delegate=e,e},updateBrush:function(t){var e=this.originPoint;this.brush.attr({width:uA(t.canvasX-e.x),height:uA(t.canvasY-e.y),x:zh(t.canvasX,e.x),y:zh(t.canvasY,e.y)})},onKeyDown:function(t){var e=t.key;if(e){var n=this.trigger.toLowerCase(),i=e.toLowerCase();i===n||i==="control"&&n==="ctrl"||i==="ctrl"&&n==="control"?this.keydown=!0:this.keydown=!1}},onKeyUp:function(){this.brush&&(this.brush.remove(!0),this.brush=null,this.dragging=!1),this.keydown=!1}};var fA="shift",Qge=["shift","ctrl","alt","control"];const Jge={getDefaultCfg:function(){return{multiple:!0,trigger:fA,selectedState:"selected",selectNode:!0,selectEdge:!1,selectCombo:!0}},getEvents:function(){var t=this;return Qge.indexOf(t.trigger.toLowerCase())>-1||(t.trigger=fA,console.warn("Behavior click-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),t.multiple?{"node:click":"onClick","combo:click":"onClick","edge:click":"onClick","canvas:click":"onCanvasClick",keyup:"onKeyUp",keydown:"onKeyDown"}:{"node:click":"onClick","combo:click":"onClick","edge:click":"onClick","canvas:click":"onCanvasClick"}},onClick:function(t){var e=this,n=t.item;if(!(!n||n.destroyed)){var i=n.getType(),a=e.graph,o=e.keydown,s=e.multiple,u=e.shouldUpdate,l=e.shouldBegin;if(l(t,e)){if(!o||!s){var f=a.findAllByState("node",e.selectedState).concat(a.findAllByState("edge",e.selectedState)).concat(a.findAllByState("combo",e.selectedState));xe(f,function(p){p!==n&&a.setItemState(p,e.selectedState,!1)})}var c=function(){switch(i){case"node":return e.selectNode;case"edge":return e.selectEdge;case"combo":return e.selectCombo;default:return!1}}();if(!c){var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{selectedItems:{nodes:d,edges:h,combos:v},select:!1});return}if(n.hasState(e.selectedState)){u(t,e)&&a.setItemState(n,e.selectedState,!1);var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:d,edges:h,combos:v},select:!1})}else{u(t,e)&&a.setItemState(n,e.selectedState,!0);var d=a.findAllByState("node",e.selectedState),h=a.findAllByState("edge",e.selectedState),v=a.findAllByState("combo",e.selectedState);a.emit("nodeselectchange",{target:n,selectedItems:{nodes:d,edges:h,combos:v},select:!0})}}}},onCanvasClick:function(t){var e=this,n=this,i=n.graph,a=n.shouldBegin;if(a(t,this)){var o=i.findAllByState("node",this.selectedState);xe(o,function(l){i.setItemState(l,e.selectedState,!1)});var s=i.findAllByState("edge",this.selectedState);xe(s,function(l){i.setItemState(l,e.selectedState,!1)});var u=i.findAllByState("combo",this.selectedState);xe(u,function(l){i.setItemState(l,e.selectedState,!1)}),i.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[],combos:[]},select:!1})}},onKeyDown:function(t){var e=this,n=t.key;n&&(n.toLowerCase()===this.trigger.toLowerCase()||n.toLowerCase()==="control"?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){var t=this;t.keydown=!1}};var e0e=ra,Gh=.05;const t0e={getDefaultCfg:function(){return this.isFireFox=LP()==="firefox",{sensitivity:2,minZoom:void 0,maxZoom:void 0,enableOptimize:!1,optimizeZoom:.1,fixSelectedItems:{fixAll:!1,fixLineWidth:!1,fixLabel:!1,fixState:"selected"},animate:!1,animateCfg:{duration:500}}},getEvents:function(){var t=this.fixSelectedItems;return t.fixState||(t.fixState="selected"),t.fixAll&&(t.fixLineWidth=!0,t.fixLabel=!0),{wheel:"onWheel",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd"}},onTouchStart:function(t){var e=t.originalEvent.touches,n=e[0],i=e[1];t.preventDefault(),i&&(this.shouldBegin&&!this.shouldBegin(t,this)||(this.startPoint={pageX:n.pageX,pageY:n.pageY},this.moveable=!0,i&&(this.endPoint={pageX:i.pageX,pageY:i.pageY}),this.originScale=this.graph.getZoom()||this.currentScale||1))},onTouchMove:function(t){if(this.moveable){t.preventDefault();var e=t.originalEvent.touches,n=e[0],i=e[1];if(i){this.endPoint||(this.endPoint={pageX:i.pageX,pageY:i.pageY});var a=function(p,g){return Math.hypot(g.x-p.x,g.y-p.y)},o=a({x:n.pageX,y:n.pageY},{x:i.pageX,y:i.pageY})/a({x:this.startPoint.pageX,y:this.startPoint.pageY},{x:this.endPoint.pageX,y:this.endPoint.pageY}),s=this.originScale*o;this.currentScale=s;var u=this.get("minZoom")||this.graph.get("minZoom"),l=this.get("maxZoom")||this.graph.get("maxZoom");if(!(s>l||s0||t.wheelDelta<0?f=1-Gh*u:f=1/(1-Gh*u):t.wheelDelta<0?f=1-Gh*u:f=1/(1-Gh*u),c=l*f;var d=this.get("minZoom")||i.get("minZoom"),h=this.get("maxZoom")||i.get("maxZoom");c>h?c=h:ci/2?f-=d.width:f+=this.offset,c>a/2?c-=d.height:c+=this.offset;var h="".concat(f,"px"),v="".concat(c,"px");tr(this.container,{left:h,top:v,visibility:"visible"})},createTooltip:function(t){var e=t.get("el");e.style.position="relative";var n=Ur('
'));return e.parentNode.appendChild(n),tr(n,{position:"absolute",visibility:"visible"}),this.width=t.get("width"),this.height=t.get("height"),this.container=n,this.graph.get("tooltips").push(n),n}},r0e=F({getDefaultCfg:function(){return{item:"node",offset:12,formatText:function(e){return e.label}}},getEvents:function(){return{"node:mouseenter":"onMouseEnter","node:mouseleave":"onMouseLeave","node:mousemove":"onMouseMove",afterremoveitem:"onMouseLeave"}}},f3),n0e=F({getDefaultCfg:function(){return{item:"edge",offset:12,formatText:function(e){return"source: ".concat(e.source," target: ").concat(e.target)}}},getEvents:function(){return{"edge:mouseenter":"onMouseEnter","edge:mouseleave":"onMouseLeave","edge:mousemove":"onMouseMove",afterremoveitem:"onMouseLeave"}}},f3);var cA="click",i0e=["click","dblclick"];const a0e={getDefaultCfg:function(){return{trigger:cA,onChange:function(){}}},getEvents:function(){var t,e;return i0e.includes(this.trigger)?e=this.trigger:(e=cA,console.warn("Behavior collapse-expand 的 trigger 参数不合法,请输入 'click' 或 'dblclick'")),t={},t["node:".concat(e)]="onNodeClick",t.touchstart="onNodeClick",t},onNodeClick:function(t){var e=this;if(this.trigger==="click"){if(this.timer){clearTimeout(this.timer),this.timer=0;return}this.timer=setTimeout(function(){e.toggle(t),clearTimeout(e.timer),e.timer=0},200)}else this.toggle(t)},toggle:function(t){var e=t.item;if(e){var n=this.graph.findDataById(e.get("id"));if(n){var i=n.children;if(!(!i||i.length===0)){var a=!n.collapsed;this.shouldBegin(t,a,this)&&(n.collapsed=a,e.getModel().collapsed=a,this.graph.emit("itemcollapsed",{item:t.item,collapsed:a}),this.shouldUpdate(t,a,this)&&(this.onChange(e,a,this),this.graph.layout()))}}}}};var o0e=jo.calculationItemsBBox,s0e=function r(t,e){if(e(t)!==!1&&t){var n=t.get("combos");if(n.length===0)return!1;xe(n,function(i){r(i,e)})}};const u0e={getDefaultCfg:function(){return{enableDelegate:!1,delegateStyle:{},onlyChangeComboSize:!1,activeState:"",selectedState:"selected",enableStack:!0}},getEvents:function(){return{"combo:mousedown":"onMouseDown","combo:dragstart":"onDragStart","combo:drag":"onDrag","combo:dragend":"onDragEnd","combo:drop":"onDrop","node:drop":"onNodeDrop","combo:dragenter":"onDragEnter","combo:dragleave":"onDragLeave"}},validationCombo:function(t){var e=t.item;if(!e||e.destroyed||!this.shouldUpdate(t,this))return!1;var n=e.getType();return n==="combo"},onMouseDown:function(t){this.origin={x:t.x,y:t.y}},onDragStart:function(t){var e=this,n=this.graph,i=t.item;if(this.currentShouldEnd=!0,!!this.validationCombo(t)){this.targets=[];var a=n.findAllByState("combo",this.selectedState),o=i.get("id"),s=a.filter(function(l){var f=l.get("id");return o===f});s.length===0?this.targets.push(i):this.targets=a;var u=[];this.targets.forEach(function(l){var f=l.getModel(),c=f.x,d=f.y,h=f.id;u.push({x:c,y:d,id:h})}),this.set("beforeDragItems",u),this.activeState&&this.targets.map(function(l){var f=l.getModel();if(f.parentId){var c=n.findById(f.parentId);c&&n.setItemState(c,e.activeState,!0)}}),this.point={},this.originPoint={},this.currentItemChildCombos=[],s0e(i,function(l){if(l.destroyed)return!1;var f=l.getModel();return e.currentItemChildCombos.push(f.id),!0})}},onDrag:function(t){var e=this;if(this.origin&&this.validationCombo(t))if(this.enableDelegate)this.updateDelegate(t);else{if(this.activeState){var n=this.graph,i=t.item,a=i.getModel(),o=n.getCombos(),s=i.getBBox(),u=s.centerX,l=s.centerY,f=s.width,c=o.filter(function(d){var h=d.getModel();return a.parentId,h.id!==a.id&&!e.currentItemChildCombos.includes(h.id)});c.map(function(d){var h=d.getBBox(),v=h.centerX,p=h.centerY,g=h.width,y=u-v,m=l-p,b=2*Math.sqrt(y*y+m*m);f+g-b>.8*f?n.setItemState(d,e.activeState,!0):n.setItemState(d,e.activeState,!1)})}xe(this.targets,function(d){e.updateCombo(d,t)}),this.onlyChangeComboSize&&this.updateParentCombos()}},updatePositions:function(t,e){var n=this;(this.enableDelegate||e)&&xe(this.targets,function(i){n.updateCombo(i,t,e)})},onDrop:function(t){var e=this,n=t.item;if(this.currentShouldEnd=this.shouldEnd(t,n,this),this.updatePositions(t,!this.currentShouldEnd),!(!this.currentShouldEnd||!n||!this.targets||n.destroyed)){var i=this.graph,a=n.getModel();this.targets.map(function(o){var s=o.getModel();s.parentId!==a.id?(e.activeState&&i.setItemState(n,e.activeState,!1),e.onlyChangeComboSize?i.updateCombo(o):i.updateComboTree(o,a.id,!1)):i.updateCombo(n)}),this.end(n,t),this.endComparison=!0}},onNodeDrop:function(t){var e=this;if(!(!this.targets||this.targets.length===0)){var n=this.graph,i=t.item,a=i.getModel().comboId,o=a?n.findById(a):void 0;if(this.currentShouldEnd=this.shouldEnd(t,o,this),this.updatePositions(t,!this.currentShouldEnd),!!this.currentShouldEnd){var s;if(a){if(this.activeState){var u=n.findById(a);n.setItemState(u,this.activeState,!1)}this.targets.map(function(l){e.onlyChangeComboSize?n.updateCombo(l):a!==l.getID()&&(s=n.findById(a),a!==l.getModel().parentId&&n.updateComboTree(l,a,!1))})}else this.targets.map(function(l){if(e.onlyChangeComboSize)n.updateCombo(l);else{var f=l.getModel();f.comboId&&n.updateComboTree(l,void 0,!1)}});this.endComparison=!0,this.end(s,t)}}},onDragEnter:function(t){if(this.origin&&this.validationCombo(t)){var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!0)}},onDragLeave:function(t){if(this.origin&&this.validationCombo(t)){var e=t.item,n=this.graph;this.activeState&&n.setItemState(e,this.activeState,!1)}},onDragEnd:function(t){if(!(!this.targets||this.targets.length===0)){var e=t.item;this.currentShouldEnd&&this.updatePositions(t);var n=this.getParentCombo(e.getModel().parentId),i=this.graph;n&&this.activeState&&i.setItemState(n,this.activeState,!1),this.end(void 0,t)}},end:function(t,e){var n=this;if(this.origin){var i=this.graph;if(this.delegateShape){var a=i.get("delegateGroup");a.clear(),this.delegateShape=null}if(t&&this.activeState&&i.setItemState(t,this.activeState,!1),!t){var o=i.get("enabledStack")&&this.enableStack,s={before:{nodes:[],edges:[],combos:[].concat(this.get("beforeDragItems"))},after:{nodes:[],edges:[],combos:[]}};this.targets.map(function(u){if(!n.onlyChangeComboSize)i.updateComboTree(u,void 0,o);else{i.updateCombo(u);var l=u.getModel(),f=l.x,c=l.y,d=l.id;s.after.combos.push({x:f,y:c,id:d}),i.pushStack("update",s)}})}this.point=[],this.origin=null,this.originPoint=null,this.targets.length=0}},traverse:function(t,e,n){var i=this;if(n===void 0&&(n={}),e(t,n)!==!1&&t){var a=t.get("combos");xe(a,function(s){i.traverse(s,e,n)});var o=t.get("nodes");xe(o,function(s){i.traverse(s,e,n)})}},updateCombo:function(t,e,n){this.updateSingleItem(t,e,n);var i={};this.traverse(t,function(a,o){return a.destroyed?!1:(a.getEdges().forEach(function(s){return o[s.getID()]=s}),!0)},i),Object.values(i).forEach(function(a){return a.refresh()})},updateSingleItem:function(t,e,n){var i=this.origin,a=this.graph,o=t.getModel(),s=t.get("id");this.point[s]||(this.point[s]={x:o.x,y:o.y});var u=e.x-i.x+this.point[s].x,l=e.y-i.y+this.point[s].y;n&&(u+=i.x-e.x,l+=i.y-e.y),a.updateItem(t,{x:u,y:l},!1)},getParentCombo:function(t){var e=this.graph;if(t){var n=e.findById(t);if(n)return n}},updateDelegate:function(t){var e=this.graph;if(this.delegateShape){var d=t.x-this.origin.x+this.originPoint.minX,h=t.y-this.origin.y+this.originPoint.minY;this.delegateShape.attr({x:d,y:h})}else{var n=e.get("delegateGroup"),i=null;this.targets.length>1?i=o0e(this.targets):i=this.targets[0].getBBox();var a=i.x,o=i.y,s=i.width,u=i.height,l=i.minX,f=i.minY;this.originPoint={x:a,y:o,width:s,height:u,minX:l,minY:f};var c=F(F({},su.delegateStyle),this.delegateStyle);this.delegateShape=n.addShape("rect",{attrs:F({width:i.width,height:i.height,x:i.x,y:i.y},c),name:"combo-delegate-shape"}),this.delegateShape.set("capture",!1),this.delegate=this.delegateShape}},updateParentCombos:function(){var t=this,e=t.graph,n=t.targets,i={};n==null||n.forEach(function(a){var o=a.getModel().parentId;o&&(i[o]=e.findById(o))}),Object.values(i).forEach(function(a){a&&e.updateCombo(a)})}};var dA="dblclick",l0e=["click","dblclick"];const f0e={getDefaultCfg:function(){return{trigger:dA,relayout:!0}},getEvents:function(){var t,e;return l0e.includes(this.trigger)?e=this.trigger:(e=dA,console.warn("Behavior collapse-expand-group 的 trigger 参数不合法,请输入 'click' 或 'dblclick'")),t={},t["combo:".concat(e)]="onComboClick",t},onComboClick:function(t){var e=t.item,n=this,i=n.graph,a=n.relayout;if(!(!e||e.destroyed||e.getType()!=="combo")){var o=e.getModel(),s=o.id;s&&(i.collapseExpandCombo(s),a&&i.get("layout")?i.layout():i.refreshPositions())}}};var c0e=jo.isPolygonsIntersect,d0e=jo.pathToPoints,hA="shift",h0e=["drag","shift","ctrl","alt","control"],v0e=function(t,e){var n,i=t.getKeyShape();if(t.get("type")==="path")n=d0e(i.attr("path"));else{var a=i.getCanvasBBox();n=[[a.minX,a.minY],[a.maxX,a.minY],[a.maxX,a.maxY],[a.minX,a.maxY]]}return c0e(e,n)};const p0e={getDefaultCfg:function(){return{delegateStyle:{fill:"#EEF6FF",fillOpacity:.4,stroke:"#DDEEFE",lineWidth:1},onSelect:function(){},onDeselect:function(){},shouldDeselect:void 0,selectedState:"selected",trigger:hA,includeEdges:!0,selectedEdges:[],selectedNodes:[]}},getEvents:function(){return h0e.indexOf(this.trigger.toLowerCase())>-1||(this.trigger=hA,console.warn("Behavior lasso-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'")),this.trigger==="drag"?{dragstart:"onDragStart",drag:"onDragMove",dragend:"onDragEnd","canvas:click":"clearStates"}:{dragstart:"onDragStart",drag:"onDragMove",dragend:"onDragEnd",keyup:"onKeyUp",keydown:"onKeyDown","canvas:click":"clearStates"}},onDragStart:function(t){var e=this.lasso,n=t.item;n||this.trigger!=="drag"&&!this.keydown||(this.selectedNodes&&this.selectedNodes.length!==0&&this.clearStates("dragstart"),e||(e=this.createLasso()),this.dragging=!0,this.originPoint={x:t.x,y:t.y},this.points.push(this.originPoint),e.show())},onDragMove:function(t){this.dragging&&(this.trigger!=="drag"&&!this.keydown||(this.points.push({x:t.x,y:t.y}),this.updateLasso(t)))},onDragEnd:function(t){!this.lasso&&!this.dragging||this.trigger!=="drag"&&!this.keydown||(this.points.push(this.originPoint),this.getSelectedItems(),this.lasso.remove(!0),this.lasso=null,this.points=[],this.dragging=!1)},getLassoPath:function(){var t=this.points,e=[];return t.length&&(t.forEach(function(n,i){i===0?e.push(["M",n.x,n.y]):e.push(["L",n.x,n.y])}),e.push(["L",t[0].x,t[0].y])),e},clearStates:function(t){t===void 0&&(t="canvas:click");var e=this,n=e.graph,i=e.selectedState,a=e.shouldDeselect,o=n.findAllByState("node",i),s=n.findAllByState("edge",i);(!a||a({action:t,nodes:o,edges:s}))&&(o.forEach(function(u){return n.setItemState(u,i,!1)}),s.forEach(function(u){return n.setItemState(u,i,!1)})),this.onDeselect&&this.onDeselect(this.selectedNodes,this.selectedEdges),this.selectedNodes=[],this.selectedEdges=[],n.emit("nodeselectchange",{selectedItems:{nodes:[],edges:[]},select:!1})},getSelectedItems:function(){var t=this,e=this,n=e.graph,i=e.shouldUpdate,a=this.points.map(function(f){return[n.getCanvasByPoint(f.x,f.y).x,n.getCanvasByPoint(f.x,f.y).y]}),o=this.selectedState,s=[],u=[];n.getNodes().forEach(function(f){if(f.isVisible()&&v0e(f,a)&&i(f,"select",t)){s.push(f);var c=f.getModel();u.push(c.id),n.setItemState(f,o,!0)}});var l=[];this.includeEdges&&s.forEach(function(f){var c=f.getOutEdges();c.forEach(function(d){if(d.isVisible()){var h=d.getModel(),v=h.source,p=h.target;u.includes(v)&&u.includes(p)&&i(d,"select",t)&&(l.push(d),n.setItemState(d,t.selectedState,!0))}})}),this.selectedEdges=l,this.selectedNodes=s,this.onSelect&&this.onSelect(s,l),n.emit("nodeselectchange",{selectedItems:{nodes:s,edges:l},select:!0})},createLasso:function(){var t=this,e=t.graph.get("delegateGroup").addShape("path",{attrs:F({path:[]},t.delegateStyle),capture:!1,name:"lasso-shape"});return this.lasso=e,this.delegate=e,this.points=[],e},updateLasso:function(t){var e=this;this.lasso.attr({path:e.getLassoPath()})},onKeyDown:function(t){var e=t.key;e&&(e.toLowerCase()===this.trigger.toLowerCase()?this.keydown=!0:this.keydown=!1)},onKeyUp:function(){this.lasso&&(this.lasso.remove(!0),this.lasso=null,this.points=[],this.dragging=!1),this.keydown=!1}};var vA="click",g0e=["click","drag"],pA=void 0,y0e=["shift","ctrl","control","alt","meta",void 0];const m0e={getDefaultCfg:function(){return{trigger:vA,key:pA,edgeConfig:{},getEdgeConfig:void 0}},getEvents:function(){var t=this;g0e.indexOf(t.trigger.toLowerCase())>-1||(t.trigger=vA,console.warn("Behavior create-edge 的 trigger 参数不合法,请输入 'click','drag'")),t.key&&y0e.indexOf(t.key.toLowerCase())===-1&&(t.trigger=pA,console.warn("Behavior create-edge 的 key 参数不合法,请输入 'shift','ctrl','alt','control',或 undefined"));var e;return t.trigger==="drag"?e={"node:dragstart":"onClick","combo:dragstart":"onClick",drag:"updateEndPoint","node:drop":"onClick","combo:drop":"onClick",dragend:"onDragEnd"}:t.trigger==="click"&&(e={"node:click":"onClick",mousemove:"updateEndPoint","edge:click":"cancelCreating","canvas:click":"cancelCreating","combo:click":"onClick"}),t.key&&(e.keydown="onKeyDown",e.keyup="onKeyUp"),e},onDragEnd:function(t){var e=this;if(!(e.key&&!e.keydown)){var n=t.item;(!n||n.getID()===e.source||n.getType()!=="node")&&e.cancelCreating({item:e.edge,x:t.x,y:t.y})}},onClick:function(t){var e=this;if(!(e.key&&!e.keydown)){var n=t.item,i=e.graph,a=n.getModel(),o=e.getEdgeConfig;if(e.addingEdge&&e.edge){if(!e.shouldEnd(t,e))return;var s=void 0;o&&Yr(o)?s=o({source:e.source,target:a.id},e):s=e.edgeConfig;var u=F({target:a.id},s);if(e.source===a.id&&(u.type="loop"),i.emit("beforecreateedge",{}),i.updateItem(e.edge,u,!1),i.get("enabledStack")){var l=F(F({},e.edge.getModel()),{itemType:"edge"}),f={};f.edges=[l],i.pushStack("add",{before:{},after:f})}i.emit("aftercreateedge",{edge:e.edge}),e.edge.getKeyShape().set("capture",!0),e.edge=null,e.addingEdge=!1}else{if(!e.shouldBegin(t,e))return;var s=void 0;o&&Yr(o)?s=o({source:a.id,target:a.id},e):s=e.edgeConfig,e.edge=i.addItem("edge",F({source:a.id,target:a.id},s),!1),e.source=a.id,e.addingEdge=!0,e.edge.getKeyShape().set("capture",!1)}}},updateEndPoint:function(t){var e=this;if(!(e.key&&!e.keydown)){e.edge&&e.edge.destroyed&&e.cancelCreating({item:e.edge});var n={x:t.x,y:t.y};if(!e.graph.findById(e.source)){e.addingEdge=!1;return}e.addingEdge&&e.edge&&e.graph.updateItem(e.edge,{target:n},!1)}},cancelCreating:function(t){var e,n,i=this;if(!(i.key&&!i.keydown)){var a=i.graph,o=t.item;if(i.addingEdge&&(i.edge===o||!((n=(e=t.target)===null||e===void 0?void 0:e.isCanvas)===null||n===void 0)&&n.call(e))){i.edge&&!i.edge.destroyed&&a.removeItem(i.edge,!1),i.edge=null,i.addingEdge=!1;return}}},onKeyDown:function(t){var e=this,n=t.key;n&&(n.toLowerCase()===e.key.toLowerCase()?e.keydown=!0:e.keydown=!1)},onKeyUp:function(){var t=this;t.addingEdge&&t.edge&&(t.graph.removeItem(t.edge,!1),t.addingEdge=!1,t.edge=null),this.keydown=!1}};var gA="ctrl",b0e=["shift","ctrl","alt","control"],x0e="1";const w0e={getDefaultCfg:function(){return{trigger:gA,combinedKey:x0e,functionName:"fitView",functionParams:[]}},getEvents:function(){return b0e.indexOf(this.trigger.toLowerCase())>-1||(this.trigger=gA,console.warn("Behavior shortcuts-fit-view 的 trigger 参数 '".concat(this.trigger,"' 不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'"))),this.combinedKey===this.trigger&&(this.combinedKey=void 0),{keyup:"onKeyUp",keydown:"onKeyDown"}},onKeyDown:function(t){var e=t.key;if(e){var n=this.trigger.toLowerCase(),i=e.toLowerCase();this.triggerKeydown||(i===n||i==="control"&&n==="ctrl"||i==="ctrl"&&n==="control"?this.triggerKeydown=!0:this.triggerKeydown=!1);var a=this.graph;if(!a[this.functionName])return console.warn("Behavior shortcuts-fit-view 的 functionName 参数 '".concat(this.functionName,"' 不合法,它不是 Graph 的一个函数名")),{};if(this.triggerKeydown&&!this.combinedKey){this.functionParams&&this.functionParams.length?a[this.functionName].apply(a,this.functionParams):a[this.functionName]();return}var o=this.combinedKey.toLowerCase();this.triggerKeydown&&(i===o||i==="control"&&o==="ctrl"||i==="ctrl"&&o==="control")&&(this.functionParams&&this.functionParams.length?a[this.functionName].apply(a,this.functionParams):a[this.functionName]())}},onKeyUp:function(){this.brush&&(this.brush.remove(!0),this.brush=null,this.dragging=!1),this.triggerKeydown=!1}};var E0e=["shift","ctrl","alt","control","meta"];const _0e={getDefaultCfg:function(){return{direction:"both",enableOptimize:!1,zoomKey:"ctrl",scalableRange:0,allowDragOnItem:!0}},getEvents:function(){return(!this.zoomKey||E0e.indexOf(this.zoomKey)===-1)&&(this.zoomKey="ctrl"),{wheel:"onWheel"}},onWheel:function(t){var e=this;if(this.allowDrag(t)){var n=this.graph,i=Array.isArray(this.zoomKey)?[].concat(this.zoomKey):[this.zoomKey];i.includes("control")&&i.push("ctrl");var a=i.some(function(R){return t["".concat(R,"Key")]});if(a){var o=n.get("canvas"),s=o.getPointByClient(t.clientX,t.clientY),u=n.getZoom();t.wheelDelta>0?u=u+u*.05:u=u-u*.05,n.zoomTo(u,{x:s.x,y:s.y})}else{var l=t.deltaX||t.movementX,f=t.deltaY||t.movementY;!f&&navigator.userAgent.indexOf("Firefox")>-1&&(f=-t.wheelDelta*125/3);var c=this.graph.get("width"),d=this.graph.get("height"),h=this.graph.get("canvas").getCanvasBBox(),v=this.scalableRange,p=this.scalableRange;v<1&&v>-1&&(v=c*v,p=d*p);var g=h.minX,y=h.maxX,m=h.minY,b=h.maxY;l>0?y<-v?l=0:y-l<-v&&(l=y+v):l<0&&(g>c+v?l=0:g-l>c+v&&(l=g-(c+v))),f>0?b<-p?f=0:b-f<-p&&(f=b+p):f<0&&(m>d+p?f=0:m-f>d+p&&(f=m-(d+p))),this.get("direction")==="x"?f=0:this.get("direction")==="y"&&(l=0),n.translate(-l,-f)}t.preventDefault();var x=this.get("enableOptimize");if(x){var w=this.get("optimizeZoom"),E=this.get("optimized"),_=n.getNodes(),M=n.getEdges(),C=_.length,S=M.length;if(!E){for(var A=0;A{var c;const o=t.track.nodes,s=(c=t.track.nodes[t.track.selector.trackIndex])==null?void 0:c.id,u=(()=>{const d=o.reduce((h,v)=>v.idh!==d&&h.pid==d.pid)?d.parent:d})(),l=new Set;l.add(u),o.forEach(d=>{l.add(d);let h=d;for(;h&&h!==u;)l.add(h),h=h.parent});const f=Array.from(l).map(d=>({_node:d,children:[],id:d.id.toString(),label:RE(d),tracked:s===d.id}));return f.sort((d,h)=>d._node.id-h._node.id),f.forEach(d=>{const h=f.find(v=>v.id===d._node.pid.toString());h&&h.children.push(d)}),f.forEach(d=>{if(d.children.length{for(;h.length>0;)h.pop()},p=()=>{if(h.length==0)return;const g=h[0].parent.children,y=h[0];if(g.length>1&&g.indexOf(y)==1&&g.indexOf(h.at(-1))==g.length-1){v();return}d.children.push({_node:y,children:[],id:y.id.toString(),label:h.length==1?RE(y):`[${g.indexOf(y)} ... ${g.indexOf(h.at(-1))}]`,tracked:s===y.id}),v()};d._node.children.forEach(g=>{d.children.find(y=>y.id===g.id.toString())?p():h.push(g)}),h.length>0&&p(),d.children.sort((g,y)=>d._node.children.indexOf(g._node)-d._node.children.indexOf(y._node))}}),f}),n=On();let i;fs(()=>{if(!n.value)return;i==null||i.destroy();const o=n.value.scrollWidth,s=n.value.scrollHeight||o;i=new fg.TreeGraph({container:n.value,width:o,height:s,modes:{default:["drag-canvas","zoom-canvas"]},layout:{type:"indented",indent:25,getHeight(){return 10}}}),i.node(c=>({type:"file-node"})),i.edge(c=>{if(c.id&&c.id.startsWith("-")){const d=Number.parseInt(c.source)>Number.parseInt(c.target)?-1:1,h=String(c.connect),v=Number(c.count);let p=40;if(h.startsWith("<<")){let y=t.track.nodes.find(b=>b.id.toString()==c.source).parent,m=1;for(;y&&y.id.toString()!=c.target;)y=y.parent,m++;m>1&&(p+=m*20)}return v>1&&(p+=(v-1)*20),p*=d,{type:"quadratic",color:"#ff00ff80",curveOffset:p,style:{startArrow:!0},label:h,labelCfg:{style:{fill:"#f00",fontSize:12,background:{fill:"#ffffff",stroke:"#f0f",lineWidth:1,padding:[2,1,0,1],radius:2}}}}}return{type:"step-line"}}),i.data({...e.value[0]}),i.render();const u=Array.from(t.track.nodes).reverse(),l=t.track.selector.connectKeys,f={};u.forEach((c,d)=>{const h=u[d+1];if(h&&i){const v=h.id>c.id?`-${c.id}:${h.id}`:`-${h.id}:${c.id}`;f[v]=(f[v]||0)+1;const p=`${v}/${f[v]}`,g=l[l.length-d-1],y={"+":()=>h.parent.children.slice(0,h.parent.children.indexOf(h)).reverse().indexOf(c),"-":()=>h.parent.children.slice(h.parent.children.indexOf(h)+1).indexOf(c),">":()=>{let m=0,b=h.parent;for(;b;){if(b===c)return m;b=b.parent,m++}return m},"<":()=>h.children.indexOf(c),"<<":()=>{let m=0;const b=Array.from(h.children).reverse();for(;b.length>0;){const x=b.pop();if(x===c)return m;b.push(...Array.from(x.children).reverse()),m++}return m}}[g]()+1;i.addItem("edge",{source:c.id.toString(),target:h.id.toString(),id:p,connect:y>1?g+y:g,count:f[v]},!1)}}),i.fitView(30)}),pv(()=>{i==null||i.destroy()});const a=()=>{!i||i.get("destroyed")||!n.value||!n.value||!n.value.scrollWidth||!n.value.scrollHeight||i.changeSize(n.value.scrollWidth,n.value.scrollHeight)};return window.addEventListener("resize",a),pv(()=>{window.removeEventListener("resize",a)}),(o,s)=>(Lr(),bi("div",{ref_key:"container",ref:n},null,512))}}),D0e={"h-full":"",flex:"","gap-5px":"","p-5px":"","box-border":""},N0e=Ar("svg",{viewBox:"0 0 24 24"},[Ar("path",{fill:"currentColor",d:"M5 21V8.825Q4.125 8.5 3.563 7.738T3 6q0-1.25.875-2.125T6 3q1.25 0 2.125.875T9 6q0 .975-.562 1.738T7 8.825V19h4V3h8v12.175q.875.325 1.438 1.088T21 18q0 1.25-.875 2.125T18 21q-1.25 0-2.125-.875T15 18q0-.975.563-1.75T17 15.175V5h-4v16zM6 7q.425 0 .713-.288T7 6q0-.425-.288-.712T6 5q-.425 0-.712.288T5 6q0 .425.288.713T6 7m12 12q.425 0 .713-.288T19 18q0-.425-.288-.712T18 17q-.425 0-.712.288T17 18q0 .425.288.713T18 19m0-1"})],-1),P0e={key:0,class:"gkd_code"},R0e=Ar("div",null,"*为简化视图已隐藏部分节点",-1),j0e=Vr({__name:"SnapshotPage",setup(r){const t=cB(),e=MA(),n=OB(),i=Dr(()=>String(t.params.snapshotId||"")),a=Dr(()=>{const v=Number(t.query.showSize||"");return!Number.isSafeInteger(v)||v<=0?2e3:v}),o=On(""),s=On();fs(async()=>{const v=await CE.getItem(i.value);if(!v){ca.error("快照数据缺失");return}j5()&&setTimeout(async()=>{G5(v),yA[v.id]||$5(await CE.getItem(i.value))},1e3),v.nodes.length>a.value&&(ca.warning(`当前展示节点数量为${a.value} 之后的${v.nodes.length-a.value}个节点将被丢弃 使用showSize查询参数可以修改展示数量`),v.nodes=v.nodes.slice(0,a.value));const p=await W5.getItem(i.value);if(!p){ca.create("截屏数据缺失");return}o.value=URL.createObjectURL(new Blob([p],{type:"image/png"})),s.value=v,u.value=CB(v.nodes),n.value="快照-"+v.appName||v.appId,await My(500),l.value||(l.value=u.value)});const u=On(),l=On(),f=On(0),c=async()=>{ca.success("删除成功,即将回到首页"),await My(2e3),e.replace({path:"/"})},d=On(),h=On(!1);return fs(()=>{d.value&&(h.value=!0)}),(v,p)=>(Lr(),bi("div",D0e,[o.value&&s.value?(Lr(),ii($4,{key:0,url:o.value,snapshot:s.value,rootNode:u.value,focusNode:l.value,onUpdateFocusNode:p[0]||(p[0]=g=>{l.value=g,f.value++})},null,8,["url","snapshot","rootNode","focusNode"])):Ra("",!0),s.value&&u.value?(Lr(),ii(eF,{key:1,rootNode:u.value,snapshot:s.value,focusNode:l.value,onUpdateFocusNode:p[1]||(p[1]=g=>l.value=g),focusCount:f.value,class:"flex-1"},{default:Lt(()=>[s.value?(Lr(),ii(z5,{key:0,snapshot:s.value,onDelete:c,showPreview:!1},null,8,["snapshot"])):Ra("",!0)]),_:1},8,["rootNode","snapshot","focusNode","focusCount"])):Ra("",!0),l.value?(Lr(),ii(L4,{key:2,focusNode:l.value},null,8,["focusNode"])):Ra("",!0),u.value&&s.value?(Lr(),ii(Q4,{key:3,snapshot:s.value,rootNode:u.value,onUpdateFocusNode:p[2]||(p[2]=g=>{l.value=g,f.value++}),onUpdateTrack:p[3]||(p[3]=g=>d.value=g)},null,8,["snapshot","rootNode"])):Ra("",!0),Vt(vt(dB),{show:h.value,"onUpdate:show":p[4]||(p[4]=g=>h.value=g),preset:"dialog",title:"选择器路径视图",style:{width:"max(600px, 80vh)"},onAfterLeave:p[5]||(p[5]=g=>d.value=void 0)},{icon:Lt(()=>[Vt(vt(pl),null,{default:Lt(()=>[N0e]),_:1})]),default:Lt(()=>[d.value?(Lr(),bi("div",P0e,Hn(d.value.selector.toString()),1)):Ra("",!0),d.value?(Lr(),ii(k0e,{key:1,track:d.value},null,8,["track"])):Ra("",!0),R0e]),_:1},8,["show"])]))}});export{j0e as default}; -//# sourceMappingURL=SnapshotPage-CmKtZTGi.js.map +//# sourceMappingURL=SnapshotPage-owac59Kk.js.map diff --git a/assets/SnapshotPage-CmKtZTGi.js.map b/assets/SnapshotPage-owac59Kk.js.map similarity index 72% rename from assets/SnapshotPage-CmKtZTGi.js.map rename to assets/SnapshotPage-owac59Kk.js.map index 9b3304d..1d88175 100644 --- a/assets/SnapshotPage-CmKtZTGi.js.map +++ b/assets/SnapshotPage-owac59Kk.js.map @@ -1 +1 @@ -{"version":3,"file":"SnapshotPage-CmKtZTGi.js","sources":["../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/create-data-key.mjs","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/ChevronLeft.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Switcher.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button-group/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button-group/src/ButtonGroup.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/Collapse.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/CollapseItemContent.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/CollapseItem.mjs","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/styles/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Table.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Th.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Tr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Td.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Thead.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Tbody.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree-select/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeSwitcher.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeCheckbox.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeContent.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/dnd.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/utils.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNode.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/keyboard.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/MotionWrapper.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/Tree.mjs","../../src/components/DraggableCard.vue","../../src/components/AttrCard.vue","../../src/components/ScreenshotCard.vue","../../src/components/SearchCard.vue","../../src/components/WindowCard.vue","../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-array-like.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/contains.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/filter.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/difference.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-type.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-function.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-nil.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-array.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-object.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/each.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/keys.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-match.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-object-like.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-plain-object.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/find.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/find-index.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/first-value.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/flatten.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/flatten-deep.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/max.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/min.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-range.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pull.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pull-at.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/reduce.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/remove.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-string.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/sort-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/uniq.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/union.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/values-of-key.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/head.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/last.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/starts-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/ends-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/every.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/some.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group-to-map.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-wrap-behavior.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/wrap-behavior.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/number2color.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/parse-radius.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clamp.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/fixed-base.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-number.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-decimal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-even.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-integer.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-negative.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-number-equal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-odd.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-positive.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/max-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/min-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/mod.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-degree.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-integer.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-radian.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/has.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/values.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/has-value.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-string.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/lower-case.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/lower-first.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/substitute.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/upper-case.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/upper-first.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-type.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-arguments.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-boolean.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-date.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-error.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-finite.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-null.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-prototype.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-reg-exp.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-undefined.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-element.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/request-animation-frame.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clear-animation-frame.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/mix.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/augment.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clone.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/debounce.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/memoize.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/deep-mix.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/extend.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/index-of.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-empty.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-equal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-equal-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/map.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/map-values.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/set.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pick.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/omit.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/throttle.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-array.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/unique-id.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/noop.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/identity.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/size.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/measure-text-width.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-ellipsis-text.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/cache.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/behavior/behaviorOption.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/behavior/behavior.js","../../node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/common.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat2.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat2d.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat3.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat4.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec3.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec4.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/quat.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/quat2.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec2.js","../../node_modules/.pnpm/@antv+matrix-util@3.1.0-beta.3/node_modules/@antv/matrix-util/esm/ext.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/adjacent-matrix.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/linked-list.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/queue.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/util.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/bfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/connected-component.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/degree.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/dfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/detect-cycle.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/dijkstra.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/find-path.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/floydWarshall.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/label-propagation.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/vector.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/node-properties.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/types.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/data-preprocessing.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/i-louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/k-core.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/k-means.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/cosine-similarity.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/nodes-cosine-similarity.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/union-find.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/binary-heap.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/mts.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/pageRank.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gSpan/struct.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gSpan/gSpan.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gaddi.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/stack.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/math.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/global.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/letterAspectRatio.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/graphic.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/validation.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/mode.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/path.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/event/graph-event.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/util.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/base.js","../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/matrix.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/element.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/container.js","../../node_modules/.pnpm/d3-timer@1.0.10/node_modules/d3-timer/src/timer.js","../../node_modules/.pnpm/d3-color@1.4.1/node_modules/d3-color/src/define.js","../../node_modules/.pnpm/d3-color@1.4.1/node_modules/d3-color/src/color.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/linear.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/quad.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/cubic.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/poly.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/sin.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/math.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/exp.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/circle.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/bounce.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/back.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/elastic.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/animate/register.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/color.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/animate/timeline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/event/event-contoller.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/canvas.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/group.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/shape.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/register.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/rect.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/circle.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/util.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/line.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/bezier.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/quadratic.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/cubic.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/ellipse.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/arc.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/segments.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/polyline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/util.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/polyline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/polygon.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/offscreen.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/text.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/text.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/parse-path.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/catmull-rom-2-bezier.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/parse-path-string.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/path-2-absolute.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/get-arc-params.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/path-2-segments.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/path.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/line.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/ellipse.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/interface/behavior.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/base.js","../../node_modules/.pnpm/@antv+matrix-util@3.1.0-beta.3/node_modules/@antv/matrix-util/lib/ext.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/view.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/xml.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/shape.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/item.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/edge.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/node.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/combo.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/item.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/state.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/path.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/hull/convexHull.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/hull/bubbleset.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/hull.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/graph.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/shapeBase.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/node.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/edge.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combo.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combos/circle.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combos/rect.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/simple-circle.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/simple-rect.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/image.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/arrow.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/marker.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/color.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/layout.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/layout.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/event.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/index.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/constant.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/adjacent-matrix.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/linked-list.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/queue.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/util.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/bfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/connected-component.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/degree.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/dfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/detect-cycle.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/dijkstra.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/find-path.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/floydWarshall.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/label-propagation.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/vector.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/constants/time.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/node-properties.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/types.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/data-preprocessing.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/union-find.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/binary-heap.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/mts.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/pageRank.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gSpan/struct.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gSpan/gSpan.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gaddi.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/algorithm.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/index.worker.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/createWorker.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/index.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/asyncIndex.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/util.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/parse.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/arc-params.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/arrow.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/draw.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/group.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/base.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/circle.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/ellipse.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/image.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/line.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/line.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/marker.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-path/point-in-path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-path/polygon.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/arc.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/polyline.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/polygon.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/polyline.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/rect.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/rect-radius.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/rect.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/text.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/hit.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/canvas.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/constant.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/dom.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/svg.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/draw.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/group.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/base.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/circle.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/dom.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/ellipse.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/image.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/line.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/marker/symbols.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/marker/index.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/path.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/polygon.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/polyline.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/format.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/rect.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/text.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/gradient.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/shadow.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/arrow.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/clip.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/pattern.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/index.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/canvas.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/add-event-listener.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/create-dom.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/modify-css.js","../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js","../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js","../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js","../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js","../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js","../../node_modules/.pnpm/color@3.2.1/node_modules/color/index.js","../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js","../../node_modules/.pnpm/@ant-design+colors@4.0.5/node_modules/@ant-design/colors/dist/index.esm.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/color.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/global.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/image.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/controller/event.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/base.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/string.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/array.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/number.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/object.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/math.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/function.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/registy/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/grid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/random.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gForce.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/add.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/cover.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/data.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/extent.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/quad.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/find.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/remove.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/root.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/size.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/visit.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/visitAfter.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/x.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/y.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/quadtree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force2/ForceNBody.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force2/index.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/center.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/constant.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/jiggle.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/collide.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/link.js","../../node_modules/.pnpm/d3-dispatch@2.0.0/node_modules/d3-dispatch/src/dispatch.js","../../node_modules/.pnpm/d3-timer@2.0.0/node_modules/d3-timer/src/timer.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/lcg.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/simulation.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/manyBody.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/radial.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/x.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/y.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/force-in-a-box.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/constants.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/force.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/circular.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/data/list.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/enum.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/util.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/toJSON.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/event.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/PriorityQueue/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/prim.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/components.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dfs.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dijkstra.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dijkstra-all.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/tarjan.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/find-cycles.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/topsort.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/is-acyclic.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/postorder.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/preorder.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/floyd-warshall.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/comparision/contain.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/essence/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/comparision/complement.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/generate/compelement.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/greedy-fas.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/acyclic.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/util.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/normalize.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/util.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/feasible-tree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/network-simplex.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/parent-dummy-chains.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/nesting-graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/add-border-segments.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/coordinate-system.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/rgb2arr.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/arr2rgb.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-array-like.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/contains.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/filter.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/difference.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-function.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-nil.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-type.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-object.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/each.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/keys.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-match.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-object-like.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-plain-object.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/find.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/find-index.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/first-value.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/flatten.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/flatten-deep.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/max.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/min.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-range.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pull.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pull-at.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/reduce.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/remove.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/sort-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/uniq.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/union.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/values-of-key.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/head.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/last.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/starts-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/ends-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/every.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/some.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group-to-map.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-wrap-behavior.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/wrap-behavior.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/number2color.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/parse-radius.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clamp.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/fixed-base.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-number.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-decimal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-even.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-integer.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-negative.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-number-equal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-odd.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-positive.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/max-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/min-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/mod.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-degree.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-integer.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-radian.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/has.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/values.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/has-value.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/lower-case.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/lower-first.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/substitute.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/upper-case.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/upper-first.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-type.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-arguments.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-boolean.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-date.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-error.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-finite.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-null.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-prototype.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-reg-exp.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-undefined.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-element.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/request-animation-frame.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clear-animation-frame.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/mix.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/augment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clone.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/debounce.js","../../node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/memoize.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/deep-mix.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/extend.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/index-of.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-empty.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-equal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-equal-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/map.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/map-values.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/set.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pick.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/omit.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/throttle.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/unique-id.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/noop.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/identity.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/size.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/cache.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/torgb.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/gradient.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/tocssgradient.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/transform.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/direction.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/angle-to.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/vertical.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/round-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/params-parser.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/fix-arc.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/params-count.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-path-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-absolute-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-normalized-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/finalize-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-flag.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-digit-start.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-param.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-space.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/skip-spaces.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-path-command.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-arc-command.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/path-parser.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/parse-path-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-absolute.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/normalize-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/normalize-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-curve-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/rotate-vector.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/arc-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/quad-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/mid-point.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/line-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/segment-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/clone-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/reverse-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/distance-square-root.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-line-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-arc-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-cubic-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-quad-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/path-length-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-bbox.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-total-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-bbox-total-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-rotated-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-area.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-draw-direction.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-point-at-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-properties-at-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-properties-at-point.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-point-in-stroke.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/equalize-segments.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/math/is-point-in-polygon.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/math/is-polygons-intersect.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/dom/create-dom.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/dom/modify-css.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/init-order.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/cross-count.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/build-layer-graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/add-subgraph-constraints.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/barycenter.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/resolve-conflicts.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/sort.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/sort-subgraph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/position/bk.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/position/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/init-data-order.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/layout.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre.js","../../node_modules/.pnpm/dagre-compound@0.0.11_dagre@0.8.5/node_modules/dagre-compound/dist/dagre-compound.es5.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagreCompound.js","../../node_modules/.pnpm/is-any-array@2.0.1/node_modules/is-any-array/lib-esm/index.js","../../node_modules/.pnpm/ml-array-max@1.2.4/node_modules/ml-array-max/lib-es6/index.js","../../node_modules/.pnpm/ml-array-min@1.2.3/node_modules/ml-array-min/lib-es6/index.js","../../node_modules/.pnpm/ml-array-rescale@1.3.7/node_modules/ml-array-rescale/lib-es6/index.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/inspect.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/mathOperations.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/util.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/stat.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/matrix.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/base.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/column.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/columnSelection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/flipColumn.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/flipRow.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/row.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/rowSelection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/selection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/sub.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/transpose.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/WrapperMatrix1D.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/WrapperMatrix2D.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/wrap.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/lu.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/util.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/qr.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/svd.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/decompositions.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/determinant.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/linearDependencies.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/pseudoInverse.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/covariance.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/correlation.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/evd.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/cholesky.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/nipals.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/mds.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/radialNonoverlapForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/radial.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/concentric.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/mds.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/fruchterman.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/regenerator/index.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/Entity.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/components/renderer/gl.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/services/config/ConfigService.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/index.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/utils/canvas.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/Kernel.js","../../node_modules/.pnpm/regl@1.7.0/node_modules/regl/dist/regl.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglAttribute.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/constants.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglBuffer.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglComputeModel.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglElements.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglFramebuffer.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/utils/uniform.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglModel.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglTexture2D.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/index.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/World.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/gpu.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/fruchtermanShader.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/fruchterman.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/gForceShader.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/gForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/comboForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/comboCombined.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/body.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/quad.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/quadTree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/grid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/forceGrid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/mysqlWorkbench.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/core.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/layout.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/types.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/index.js","../../node_modules/.pnpm/@antv+hierarchy@0.6.11/node_modules/@antv/hierarchy/build/hierarchy.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/gpu.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/browser.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/tree-layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/work.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/layoutConst.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/controller/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/graph.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/deepClone.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/tree-graph.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/base.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/grid/index.js","../../node_modules/.pnpm/insert-css@2.0.0/node_modules/insert-css/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/menu/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/minimap/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/bundling/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/fisheye/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/toolBar/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/tooltip/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/constant.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeBarTooltip.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeButton.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/controllerBtn.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeBarSlice.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/register.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/base.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/category/base.js","../../node_modules/.pnpm/fecha@4.2.3/node_modules/fecha/lib/fecha.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/bisector.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/category/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/base.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/math.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/log.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/pow.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/quantize.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/quantile.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/factory.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/identity/index.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/cat.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/d3-linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/interval.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/strict-limit.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/d3-linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/pretty-number.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/extended.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/log.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/pretty.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/pow.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/quantile.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/r-prettry.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time-cat.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time-pretty.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/index.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/path.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/trend.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/handler.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/trendTimeBar.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/imageMinimap/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/edgeFilterLens/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/snapline/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/legend/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/annotation/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/index.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/circle.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/rect.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/ellipse.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/diamond.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/triangle.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/modelRect.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/star.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/donut.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/polyline-util.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/router.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/polyline.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-node.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/activate-relations.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/brush-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/click-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/zoom-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/tooltip-base.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/tooltip.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/edge-tooltip.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/collapse-expand.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-combo.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/collapse-expand-combo.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/lasso-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/create-edge.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/shortcuts-call.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/scroll-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/index.js","../../node_modules/.pnpm/@antv+g6@4.8.24/node_modules/@antv/g6/es/index.js","../../src/utils/g6.ts","../../src/components/TrackGraph.vue","../../src/views/SnapshotPage.vue"],"sourcesContent":["export function createDataKey(key) {\n return typeof key === 'string' ? `s-${key}` : `n-${key}`;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import { h, defineComponent } from 'vue';\nexport default defineComponent({\n name: 'ChevronLeft',\n render() {\n return h(\"svg\", {\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, h(\"path\", {\n d: \"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z\",\n fill: \"currentColor\"\n }));\n }\n});","import { h, defineComponent } from 'vue';\nexport default defineComponent({\n name: 'Switcher',\n render() {\n return h(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n }, h(\"path\", {\n d: \"M12 8l10 8l-10 8z\"\n }));\n }\n});","import { c, cB, cM, cE, cNotM } from \"../../../_utils/cssr/index.mjs\";\nexport const zero = '0!important';\nexport const n1 = '-1px!important';\nfunction createLeftBorderStyle(type) {\n return cM(type + '-type', [c('& +', [cB('button', {}, [cM(type + '-type', [cE('border', {\n borderLeftWidth: zero\n }), cE('state-border', {\n left: n1\n })])])])]);\n}\nfunction createTopBorderStyle(type) {\n return cM(type + '-type', [c('& +', [cB('button', [cM(type + '-type', [cE('border', {\n borderTopWidth: zero\n }), cE('state-border', {\n top: n1\n })])])])]);\n}\nexport default cB('button-group', `\n flex-wrap: nowrap;\n display: inline-flex;\n position: relative;\n`, [cNotM('vertical', {\n flexDirection: 'row'\n}, [cNotM('rtl', [cB('button', [c('&:first-child:not(:last-child)', `\n margin-right: ${zero};\n border-top-right-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-left: ${zero};\n border-top-left-radius: ${zero};\n border-bottom-left-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin-left: ${zero};\n margin-right: ${zero};\n border-radius: ${zero};\n `), createLeftBorderStyle('default'), cM('ghost', [createLeftBorderStyle('primary'), createLeftBorderStyle('info'), createLeftBorderStyle('success'), createLeftBorderStyle('warning'), createLeftBorderStyle('error')])])])]), cM('vertical', {\n flexDirection: 'column'\n}, [cB('button', [c('&:first-child:not(:last-child)', `\n margin-bottom: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-bottom-left-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-top: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-top-left-radius: ${zero};\n border-top-right-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin: ${zero};\n border-radius: ${zero};\n `), createTopBorderStyle('default'), cM('ghost', [createTopBorderStyle('primary'), createTopBorderStyle('info'), createTopBorderStyle('success'), createTopBorderStyle('warning'), createTopBorderStyle('error')])])])]);","import { h, defineComponent, provide } from 'vue';\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { useConfig, useStyle } from \"../../_mixins/index.mjs\";\nimport { buttonGroupInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const buttonGroupProps = {\n size: {\n type: String,\n default: undefined\n },\n vertical: Boolean\n};\nexport default defineComponent({\n name: 'ButtonGroup',\n props: buttonGroupProps,\n setup(props) {\n const {\n mergedClsPrefixRef,\n mergedRtlRef\n } = useConfig(props);\n useStyle('-button-group', style, mergedClsPrefixRef);\n provide(buttonGroupInjectionKey, props);\n const rtlEnabledRef = useRtl('ButtonGroup', mergedRtlRef, mergedClsPrefixRef);\n return {\n rtlEnabled: rtlEnabledRef,\n mergedClsPrefix: mergedClsPrefixRef\n };\n },\n render() {\n const {\n mergedClsPrefix\n } = this;\n return h(\"div\", {\n class: [`${mergedClsPrefix}-button-group`, this.rtlEnabled && `${mergedClsPrefix}-button-group--rtl`, this.vertical && `${mergedClsPrefix}-button-group--vertical`],\n role: \"group\"\n }, this.$slots);\n }\n});","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport const self = vars => {\n const {\n fontWeight,\n textColor1,\n textColor2,\n textColorDisabled,\n dividerColor,\n fontSize\n } = vars;\n return {\n titleFontSize: fontSize,\n titleFontWeight: fontWeight,\n dividerColor,\n titleTextColor: textColor1,\n titleTextColorDisabled: textColorDisabled,\n fontSize,\n textColor: textColor2,\n arrowColor: textColor2,\n arrowColorDisabled: textColorDisabled,\n itemMargin: '16px 0 0 0',\n titlePadding: '16px 0 0 0'\n };\n};\nconst collapseLight = {\n name: 'Collapse',\n common: commonLight,\n self\n};\nexport default collapseLight;","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nimport { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\n// vars:\n// --n-font-size\n// --n-bezier\n// --n-text-color\n// --n-divider-color\n// --n-title-padding\n// --n-title-font-size\n// --n-title-text-color\n// --n-title-font-weight\n// --n-arrow-color\n// --n-arrow-color-disabled\n// --n-title-text-color-disabled\n// --n-item-margin\nexport default cB('collapse', 'width: 100%;', [cB('collapse-item', `\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n margin: var(--n-item-margin);\n `, [cM('disabled', [cE('header', 'cursor: not-allowed;', [cE('header-main', `\n color: var(--n-title-text-color-disabled);\n `), cB('collapse-item-arrow', `\n color: var(--n-arrow-color-disabled);\n `)])]), cB('collapse-item', 'margin-left: 32px;'), c('&:first-child', 'margin-top: 0;'), c('&:first-child >', [cE('header', 'padding-top: 0;')]), cM('left-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-right: 4px;')])]), cM('right-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-left: 4px;')])]), cE('content-wrapper', [cE('content-inner', 'padding-top: 16px;'), fadeInHeightExpandTransition({\n duration: '0.15s'\n})]), cM('active', [cE('header', [cM('active', [cB('collapse-item-arrow', 'transform: rotate(90deg);')])])]), c('&:not(:first-child)', 'border-top: 1px solid var(--n-divider-color);'), cNotM('disabled', [cM('trigger-area-main', [cE('header', [cE('header-main', 'cursor: pointer;'), cB('collapse-item-arrow', 'cursor: default;')])]), cM('trigger-area-arrow', [cE('header', [cB('collapse-item-arrow', 'cursor: pointer;')])]), cM('trigger-area-extra', [cE('header', [cE('header-extra', 'cursor: pointer;')])])]), cE('header', `\n font-size: var(--n-title-font-size);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n transition: color .3s var(--n-bezier);\n position: relative;\n padding: var(--n-title-padding);\n color: var(--n-title-text-color);\n `, [cE('header-main', `\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n color: var(--n-title-text-color);\n `), cE('header-extra', `\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n `), cB('collapse-item-arrow', `\n display: flex;\n transition:\n transform .15s var(--n-bezier),\n color .3s var(--n-bezier);\n font-size: 18px;\n color: var(--n-arrow-color);\n `)])])]);","import { computed, h, defineComponent, provide, ref } from 'vue';\nimport { useMergedState } from 'vooks';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, createInjectionKey, warn } from \"../../_utils/index.mjs\";\nimport { collapseLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nexport const collapseProps = Object.assign(Object.assign({}, useTheme.props), {\n defaultExpandedNames: {\n type: [Array, String],\n default: null\n },\n expandedNames: [Array, String],\n arrowPlacement: {\n type: String,\n default: 'left'\n },\n accordion: {\n type: Boolean,\n default: false\n },\n displayDirective: {\n type: String,\n default: 'if'\n },\n triggerAreas: {\n type: Array,\n default: () => ['main', 'extra', 'arrow']\n },\n onItemHeaderClick: [Function, Array],\n 'onUpdate:expandedNames': [Function, Array],\n onUpdateExpandedNames: [Function, Array],\n // deprecated\n onExpandedNamesChange: {\n type: [Function, Array],\n validator: () => {\n if (process.env.NODE_ENV !== 'production') {\n warn('collapse', '`on-expanded-names-change` is deprecated, please use `on-update:expanded-names` instead.');\n }\n return true;\n },\n default: undefined\n }\n});\nexport const collapseInjectionKey = createInjectionKey('n-collapse');\nexport default defineComponent({\n name: 'Collapse',\n props: collapseProps,\n setup(props, {\n slots\n }) {\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const uncontrolledExpandedNamesRef = ref(props.defaultExpandedNames);\n const controlledExpandedNamesRef = computed(() => props.expandedNames);\n const mergedExpandedNamesRef = useMergedState(controlledExpandedNamesRef, uncontrolledExpandedNamesRef);\n const themeRef = useTheme('Collapse', '-collapse', style, collapseLight, props, mergedClsPrefixRef);\n function doUpdateExpandedNames(names) {\n const {\n 'onUpdate:expandedNames': _onUpdateExpandedNames,\n onUpdateExpandedNames,\n onExpandedNamesChange\n } = props;\n if (onUpdateExpandedNames) {\n call(onUpdateExpandedNames, names);\n }\n if (_onUpdateExpandedNames) {\n call(_onUpdateExpandedNames, names);\n }\n if (onExpandedNamesChange) {\n call(onExpandedNamesChange, names);\n }\n uncontrolledExpandedNamesRef.value = names;\n }\n function doItemHeaderClick(info) {\n const {\n onItemHeaderClick\n } = props;\n if (onItemHeaderClick) {\n call(onItemHeaderClick, info);\n }\n }\n function toggleItem(collapse, name, event) {\n const {\n accordion\n } = props;\n const {\n value: expandedNames\n } = mergedExpandedNamesRef;\n if (accordion) {\n if (collapse) {\n doUpdateExpandedNames([name]);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n } else {\n doUpdateExpandedNames([]);\n doItemHeaderClick({\n name,\n expanded: false,\n event\n });\n }\n } else {\n if (!Array.isArray(expandedNames)) {\n doUpdateExpandedNames([name]);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n } else {\n const activeNames = expandedNames.slice();\n const index = activeNames.findIndex(activeName => name === activeName);\n if (~index) {\n activeNames.splice(index, 1);\n doUpdateExpandedNames(activeNames);\n doItemHeaderClick({\n name,\n expanded: false,\n event\n });\n } else {\n activeNames.push(name);\n doUpdateExpandedNames(activeNames);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n }\n }\n }\n }\n provide(collapseInjectionKey, {\n props,\n mergedClsPrefixRef,\n expandedNamesRef: mergedExpandedNamesRef,\n slots,\n toggleItem\n });\n const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);\n const cssVarsRef = computed(() => {\n const {\n common: {\n cubicBezierEaseInOut\n },\n self: {\n titleFontWeight,\n dividerColor,\n titlePadding,\n titleTextColor,\n titleTextColorDisabled,\n textColor,\n arrowColor,\n fontSize,\n titleFontSize,\n arrowColorDisabled,\n itemMargin\n }\n } = themeRef.value;\n return {\n '--n-font-size': fontSize,\n '--n-bezier': cubicBezierEaseInOut,\n '--n-text-color': textColor,\n '--n-divider-color': dividerColor,\n '--n-title-padding': titlePadding,\n '--n-title-font-size': titleFontSize,\n '--n-title-text-color': titleTextColor,\n '--n-title-text-color-disabled': titleTextColorDisabled,\n '--n-title-font-weight': titleFontWeight,\n '--n-arrow-color': arrowColor,\n '--n-arrow-color-disabled': arrowColorDisabled,\n '--n-item-margin': itemMargin\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('collapse', undefined, cssVarsRef, props) : undefined;\n return {\n rtlEnabled: rtlEnabledRef,\n mergedTheme: themeRef,\n mergedClsPrefix: mergedClsPrefixRef,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n };\n },\n render() {\n var _a;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return h(\"div\", {\n class: [`${this.mergedClsPrefix}-collapse`, this.rtlEnabled && `${this.mergedClsPrefix}-collapse--rtl`, this.themeClass],\n style: this.cssVars\n }, this.$slots);\n }\n});","import { h, withDirectives, vShow, defineComponent, toRef } from 'vue';\nimport { useFalseUntilTruthy } from 'vooks';\nimport { NFadeInExpandTransition } from \"../../_internal/index.mjs\";\nexport default defineComponent({\n name: 'CollapseItemContent',\n props: {\n displayDirective: {\n type: String,\n required: true\n },\n show: Boolean,\n clsPrefix: {\n type: String,\n required: true\n }\n },\n setup(props) {\n const onceTrueRef = useFalseUntilTruthy(toRef(props, 'show'));\n return {\n onceTrue: onceTrueRef\n };\n },\n render() {\n return h(NFadeInExpandTransition, null, {\n default: () => {\n const {\n show,\n displayDirective,\n onceTrue,\n clsPrefix\n } = this;\n const useVShow = displayDirective === 'show' && onceTrue;\n const contentNode = h(\"div\", {\n class: `${clsPrefix}-collapse-item__content-wrapper`\n }, h(\"div\", {\n class: `${clsPrefix}-collapse-item__content-inner`\n }, this.$slots));\n return useVShow ? withDirectives(contentNode, [[vShow, show]]) : show ? contentNode : null;\n }\n });\n }\n});","import { h, defineComponent, inject, computed, toRef } from 'vue';\nimport { createId, happensIn } from 'seemly';\nimport { useMemo } from 'vooks';\nimport { ChevronRightIcon as ArrowRightIcon, ChevronLeftIcon as ArrowLeftIcon } from \"../../_internal/icons/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { useConfig } from \"../../_mixins/index.mjs\";\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { throwError, resolveSlotWithProps, resolveWrappedSlotWithProps } from \"../../_utils/index.mjs\";\nimport { collapseInjectionKey } from \"./Collapse.mjs\";\nimport NCollapseItemContent from \"./CollapseItemContent.mjs\";\nexport const collapseItemProps = {\n title: String,\n name: [String, Number],\n disabled: Boolean,\n displayDirective: String\n};\nexport default defineComponent({\n name: 'CollapseItem',\n props: collapseItemProps,\n setup(props) {\n const {\n mergedRtlRef\n } = useConfig(props);\n const randomName = createId();\n const mergedNameRef = useMemo(() => {\n var _a;\n return (_a = props.name) !== null && _a !== void 0 ? _a : randomName;\n });\n const NCollapse = inject(collapseInjectionKey);\n if (!NCollapse) {\n throwError('collapse-item', '`n-collapse-item` must be placed inside `n-collapse`.');\n }\n const {\n expandedNamesRef,\n props: collapseProps,\n mergedClsPrefixRef,\n slots: collapseSlots\n } = NCollapse;\n const collapsedRef = computed(() => {\n const {\n value: expandedNames\n } = expandedNamesRef;\n if (Array.isArray(expandedNames)) {\n const {\n value: name\n } = mergedNameRef;\n return !~expandedNames.findIndex(expandedName => expandedName === name);\n } else if (expandedNames) {\n const {\n value: name\n } = mergedNameRef;\n return name !== expandedNames;\n }\n return true;\n });\n const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);\n return {\n rtlEnabled: rtlEnabledRef,\n collapseSlots,\n randomName,\n mergedClsPrefix: mergedClsPrefixRef,\n collapsed: collapsedRef,\n triggerAreas: toRef(collapseProps, 'triggerAreas'),\n mergedDisplayDirective: computed(() => {\n const {\n displayDirective\n } = props;\n if (displayDirective) {\n return displayDirective;\n } else {\n return collapseProps.displayDirective;\n }\n }),\n arrowPlacement: computed(() => {\n return collapseProps.arrowPlacement;\n }),\n handleClick(e) {\n let happensInArea = 'main';\n if (happensIn(e, 'arrow')) happensInArea = 'arrow';\n if (happensIn(e, 'extra')) happensInArea = 'extra';\n if (!collapseProps.triggerAreas.includes(happensInArea)) {\n return;\n }\n if (NCollapse && !props.disabled) {\n NCollapse.toggleItem(collapsedRef.value, mergedNameRef.value, e);\n }\n }\n };\n },\n render() {\n const {\n collapseSlots,\n $slots,\n arrowPlacement,\n collapsed,\n mergedDisplayDirective,\n mergedClsPrefix,\n disabled,\n triggerAreas\n } = this;\n const headerNode = resolveSlotWithProps($slots.header, {\n collapsed\n }, () => [this.title]);\n const headerExtraSlot = $slots['header-extra'] || collapseSlots['header-extra'];\n const arrowSlot = $slots.arrow || collapseSlots.arrow;\n return h(\"div\", {\n class: [`${mergedClsPrefix}-collapse-item`, `${mergedClsPrefix}-collapse-item--${arrowPlacement}-arrow-placement`, disabled && `${mergedClsPrefix}-collapse-item--disabled`, !collapsed && `${mergedClsPrefix}-collapse-item--active`, triggerAreas.map(area => {\n return `${mergedClsPrefix}-collapse-item--trigger-area-${area}`;\n })]\n }, h(\"div\", {\n class: [`${mergedClsPrefix}-collapse-item__header`, !collapsed && `${mergedClsPrefix}-collapse-item__header--active`]\n }, h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item__header-main`,\n onClick: this.handleClick\n }, arrowPlacement === 'right' && headerNode, h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item-arrow`,\n key: this.rtlEnabled ? 0 : 1,\n \"data-arrow\": true\n }, resolveSlotWithProps(arrowSlot, {\n collapsed\n }, () => {\n var _a;\n return [h(NBaseIcon, {\n clsPrefix: mergedClsPrefix\n }, {\n default: (_a = collapseSlots.expandIcon) !== null && _a !== void 0 ? _a : () => this.rtlEnabled ? h(ArrowLeftIcon, null) : h(ArrowRightIcon, null)\n })];\n })), arrowPlacement === 'left' && headerNode), resolveWrappedSlotWithProps(headerExtraSlot, {\n collapsed\n }, children => h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item__header-extra`,\n onClick: this.handleClick,\n \"data-extra\": true\n }, children))), h(NCollapseItemContent, {\n clsPrefix: mergedClsPrefix,\n displayDirective: mergedDisplayDirective,\n show: !collapsed\n }, $slots));\n }\n});","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default {\n thPaddingSmall: '6px',\n thPaddingMedium: '12px',\n thPaddingLarge: '12px',\n tdPaddingSmall: '6px',\n tdPaddingMedium: '12px',\n tdPaddingLarge: '12px'\n};","import { composite } from 'seemly';\nimport sizeVariables from \"./_common.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport const self = vars => {\n const {\n dividerColor,\n cardColor,\n modalColor,\n popoverColor,\n tableHeaderColor,\n tableColorStriped,\n textColor1,\n textColor2,\n borderRadius,\n fontWeightStrong,\n lineHeight,\n fontSizeSmall,\n fontSizeMedium,\n fontSizeLarge\n } = vars;\n return Object.assign(Object.assign({}, sizeVariables), {\n fontSizeSmall,\n fontSizeMedium,\n fontSizeLarge,\n lineHeight,\n borderRadius,\n borderColor: composite(cardColor, dividerColor),\n borderColorModal: composite(modalColor, dividerColor),\n borderColorPopover: composite(popoverColor, dividerColor),\n tdColor: cardColor,\n tdColorModal: modalColor,\n tdColorPopover: popoverColor,\n tdColorStriped: composite(cardColor, tableColorStriped),\n tdColorStripedModal: composite(modalColor, tableColorStriped),\n tdColorStripedPopover: composite(popoverColor, tableColorStriped),\n thColor: composite(cardColor, tableHeaderColor),\n thColorModal: composite(modalColor, tableHeaderColor),\n thColorPopover: composite(popoverColor, tableHeaderColor),\n thTextColor: textColor1,\n tdTextColor: textColor2,\n thFontWeight: fontWeightStrong\n });\n};\nconst tableLight = {\n name: 'Table',\n common: commonLight,\n self\n};\nexport default tableLight;","import { changeColor } from 'seemly';\nimport { checkboxLight } from \"../../checkbox/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nimport { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nexport const self = vars => {\n const {\n borderRadiusSmall,\n dividerColor,\n hoverColor,\n pressedColor,\n primaryColor,\n textColor3,\n textColor2,\n textColorDisabled,\n fontSize\n } = vars;\n return {\n fontSize,\n lineHeight: '1.5',\n nodeHeight: '30px',\n nodeWrapperPadding: '3px 0',\n nodeBorderRadius: borderRadiusSmall,\n nodeColorHover: hoverColor,\n nodeColorPressed: pressedColor,\n nodeColorActive: changeColor(primaryColor, {\n alpha: 0.1\n }),\n arrowColor: textColor3,\n nodeTextColor: textColor2,\n nodeTextColorDisabled: textColorDisabled,\n loadingColor: primaryColor,\n dropMarkColor: primaryColor,\n lineColor: dividerColor\n };\n};\nconst treeLight = createTheme({\n name: 'Tree',\n common: commonLight,\n peers: {\n Checkbox: checkboxLight,\n Scrollbar: scrollbarLight,\n Empty: emptyLight\n },\n self\n});\nexport default treeLight;","import { c, cB, cM, cNotM, insideModal, insidePopover } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-td-color\n// --n-td-color-modal\n// --n-td-color-popover\n// --n-td-text-color\n// --n-border-color\n// --n-border-color-modal\n// --n-border-color-popover\n// --n-border-radius\n// --n-font-size\n// --n-th-color\n// --n-th-color-modal\n// --n-th-color-popover\n// --n-th-font-weight\n// --n-th-text-color\n// --n-line-height\n// --n-td-padding\n// --n-th-padding\nexport default c([cB('table', `\n font-size: var(--n-font-size);\n font-variant-numeric: tabular-nums;\n line-height: var(--n-line-height);\n width: 100%;\n border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;\n text-align: left;\n border-collapse: separate;\n border-spacing: 0;\n overflow: hidden;\n background-color: var(--n-td-color);\n border-color: var(--n-merged-border-color);\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n --n-merged-border-color: var(--n-border-color);\n `, [c('th', `\n white-space: nowrap;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n text-align: inherit;\n padding: var(--n-th-padding);\n vertical-align: inherit;\n text-transform: none;\n border: 0px solid var(--n-merged-border-color);\n font-weight: var(--n-th-font-weight);\n color: var(--n-th-text-color);\n background-color: var(--n-th-color);\n border-bottom: 1px solid var(--n-merged-border-color);\n border-right: 1px solid var(--n-merged-border-color);\n `, [c('&:last-child', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), c('td', `\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n padding: var(--n-td-padding);\n color: var(--n-td-text-color);\n background-color: var(--n-td-color);\n border: 0px solid var(--n-merged-border-color);\n border-right: 1px solid var(--n-merged-border-color);\n border-bottom: 1px solid var(--n-merged-border-color);\n `, [c('&:last-child', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), cM('bordered', `\n border: 1px solid var(--n-merged-border-color);\n border-radius: var(--n-border-radius);\n `, [c('tr', [c('&:last-child', [c('td', `\n border-bottom: 0 solid var(--n-merged-border-color);\n `)])])]), cM('single-line', [c('th', `\n border-right: 0px solid var(--n-merged-border-color);\n `), c('td', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), cM('single-column', [c('tr', [c('&:not(:last-child)', [c('td', `\n border-bottom: 0px solid var(--n-merged-border-color);\n `)])])]), cM('striped', [c('tr:nth-of-type(even)', [c('td', 'background-color: var(--n-td-color-striped)')])]), cNotM('bottom-bordered', [c('tr', [c('&:last-child', [c('td', `\n border-bottom: 0px solid var(--n-merged-border-color);\n `)])])])]), insideModal(cB('table', `\n background-color: var(--n-td-color-modal);\n --n-merged-border-color: var(--n-border-color-modal);\n `, [c('th', `\n background-color: var(--n-th-color-modal);\n `), c('td', `\n background-color: var(--n-td-color-modal);\n `)])), insidePopover(cB('table', `\n background-color: var(--n-td-color-popover);\n --n-merged-border-color: var(--n-border-color-popover);\n `, [c('th', `\n background-color: var(--n-th-color-popover);\n `), c('td', `\n background-color: var(--n-td-color-popover);\n `)]))]);","import { defineComponent, computed, h } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { createKey } from \"../../_utils/index.mjs\";\nimport { tableLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const tableProps = Object.assign(Object.assign({}, useTheme.props), {\n bordered: {\n type: Boolean,\n default: true\n },\n bottomBordered: {\n type: Boolean,\n default: true\n },\n singleLine: {\n type: Boolean,\n default: true\n },\n striped: Boolean,\n singleColumn: Boolean,\n size: {\n type: String,\n default: 'medium'\n }\n});\nexport default defineComponent({\n name: 'Table',\n props: tableProps,\n setup(props) {\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const themeRef = useTheme('Table', '-table', style, tableLight, props, mergedClsPrefixRef);\n const rtlEnabledRef = useRtl('Table', mergedRtlRef, mergedClsPrefixRef);\n const cssVarsRef = computed(() => {\n const {\n size\n } = props;\n const {\n self: {\n borderColor,\n tdColor,\n tdColorModal,\n tdColorPopover,\n thColor,\n thColorModal,\n thColorPopover,\n thTextColor,\n tdTextColor,\n borderRadius,\n thFontWeight,\n lineHeight,\n borderColorModal,\n borderColorPopover,\n tdColorStriped,\n tdColorStripedModal,\n tdColorStripedPopover,\n [createKey('fontSize', size)]: fontSize,\n [createKey('tdPadding', size)]: tdPadding,\n [createKey('thPadding', size)]: thPadding\n },\n common: {\n cubicBezierEaseInOut\n }\n } = themeRef.value;\n return {\n '--n-bezier': cubicBezierEaseInOut,\n '--n-td-color': tdColor,\n '--n-td-color-modal': tdColorModal,\n '--n-td-color-popover': tdColorPopover,\n '--n-td-text-color': tdTextColor,\n '--n-border-color': borderColor,\n '--n-border-color-modal': borderColorModal,\n '--n-border-color-popover': borderColorPopover,\n '--n-border-radius': borderRadius,\n '--n-font-size': fontSize,\n '--n-th-color': thColor,\n '--n-th-color-modal': thColorModal,\n '--n-th-color-popover': thColorPopover,\n '--n-th-font-weight': thFontWeight,\n '--n-th-text-color': thTextColor,\n '--n-line-height': lineHeight,\n '--n-td-padding': tdPadding,\n '--n-th-padding': thPadding,\n '--n-td-color-striped': tdColorStriped,\n '--n-td-color-striped-modal': tdColorStripedModal,\n '--n-td-color-striped-popover': tdColorStripedPopover\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('table', computed(() => {\n return props.size[0];\n }), cssVarsRef, props) : undefined;\n return {\n rtlEnabled: rtlEnabledRef,\n mergedClsPrefix: mergedClsPrefixRef,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n };\n },\n render() {\n var _a;\n const {\n mergedClsPrefix\n } = this;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return h(\"table\", {\n class: [`${mergedClsPrefix}-table`, this.themeClass, {\n [`${mergedClsPrefix}-table--rtl`]: this.rtlEnabled,\n [`${mergedClsPrefix}-table--bottom-bordered`]: this.bottomBordered,\n [`${mergedClsPrefix}-table--bordered`]: this.bordered,\n [`${mergedClsPrefix}-table--single-line`]: this.singleLine,\n [`${mergedClsPrefix}-table--single-column`]: this.singleColumn,\n [`${mergedClsPrefix}-table--striped`]: this.striped\n }],\n style: this.cssVars\n }, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Th',\n render() {\n return h(\"th\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Tr',\n render() {\n return h(\"tr\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Td',\n render() {\n return h(\"td\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Thead',\n render() {\n return h(\"thead\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Tbody',\n render() {\n return h(\"tbody\", null, this.$slots);\n }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const treeSelectInjectionKey = createInjectionKey('n-tree-select');","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const treeInjectionKey = createInjectionKey('n-tree');","import { h, defineComponent, inject } from 'vue';\nimport { SwitcherIcon } from \"../../_internal/icons/index.mjs\";\nimport { NIconSwitchTransition, NBaseLoading, NBaseIcon } from \"../../_internal/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'NTreeSwitcher',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n indent: {\n type: Number,\n required: true\n },\n expanded: Boolean,\n selected: Boolean,\n hide: Boolean,\n loading: Boolean,\n onClick: Function,\n tmNode: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const {\n renderSwitcherIconRef\n } = inject(treeInjectionKey, null);\n return () => {\n const {\n clsPrefix,\n expanded,\n hide,\n indent,\n onClick\n } = props;\n return h(\"span\", {\n \"data-switcher\": true,\n class: [`${clsPrefix}-tree-node-switcher`, expanded && `${clsPrefix}-tree-node-switcher--expanded`, hide && `${clsPrefix}-tree-node-switcher--hide`],\n style: {\n width: `${indent}px`\n },\n onClick: onClick\n }, h(\"div\", {\n class: `${clsPrefix}-tree-node-switcher__icon`\n }, h(NIconSwitchTransition, null, {\n default: () => {\n if (props.loading) {\n return h(NBaseLoading, {\n clsPrefix: clsPrefix,\n key: \"loading\",\n radius: 85,\n strokeWidth: 20\n });\n }\n const {\n value: renderSwitcherIcon\n } = renderSwitcherIconRef;\n return renderSwitcherIcon ? renderSwitcherIcon({\n expanded: props.expanded,\n selected: props.selected,\n option: props.tmNode.rawNode\n }) : h(NBaseIcon, {\n clsPrefix: clsPrefix,\n key: \"switcher\"\n }, {\n default: () => h(SwitcherIcon, null)\n });\n }\n })));\n };\n }\n});","import { h, defineComponent, inject } from 'vue';\nimport { NCheckbox } from \"../../checkbox/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'NTreeNodeCheckbox',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n indent: {\n type: Number,\n required: true\n },\n right: Boolean,\n focusable: Boolean,\n disabled: Boolean,\n checked: Boolean,\n indeterminate: Boolean,\n onCheck: Function\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const NTree = inject(treeInjectionKey);\n function doCheck(value) {\n const {\n onCheck\n } = props;\n if (onCheck) {\n onCheck(value);\n }\n }\n function handleUpdateValue(value) {\n doCheck(value);\n }\n return {\n handleUpdateValue,\n mergedTheme: NTree.mergedThemeRef\n };\n },\n render() {\n const {\n clsPrefix,\n mergedTheme,\n checked,\n indeterminate,\n disabled,\n focusable,\n indent,\n handleUpdateValue\n } = this;\n return h(\"span\", {\n class: [`${clsPrefix}-tree-node-checkbox`, this.right && `${clsPrefix}-tree-node-checkbox--right`],\n style: {\n width: `${indent}px`\n },\n \"data-checkbox\": true\n }, h(NCheckbox, {\n focusable: focusable,\n disabled: disabled,\n theme: mergedTheme.peers.Checkbox,\n themeOverrides: mergedTheme.peerOverrides.Checkbox,\n checked: checked,\n indeterminate: indeterminate,\n onUpdateChecked: handleUpdateValue\n }));\n }\n});","import { h, defineComponent, ref, inject } from 'vue';\nimport { render } from \"../../_utils/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'TreeNodeContent',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n disabled: Boolean,\n checked: Boolean,\n selected: Boolean,\n onClick: Function,\n onDragstart: Function,\n tmNode: {\n type: Object,\n required: true\n },\n nodeProps: Object\n },\n setup(props) {\n const {\n renderLabelRef,\n renderPrefixRef,\n renderSuffixRef,\n labelFieldRef\n } =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n inject(treeInjectionKey);\n const selfRef = ref(null);\n function doClick(e) {\n const {\n onClick\n } = props;\n if (onClick) onClick(e);\n }\n function handleClick(e) {\n doClick(e);\n }\n return {\n selfRef,\n renderLabel: renderLabelRef,\n renderPrefix: renderPrefixRef,\n renderSuffix: renderSuffixRef,\n labelField: labelFieldRef,\n handleClick\n };\n },\n render() {\n const {\n clsPrefix,\n labelField,\n nodeProps,\n checked = false,\n selected = false,\n renderLabel,\n renderPrefix,\n renderSuffix,\n handleClick,\n onDragstart,\n tmNode: {\n rawNode,\n rawNode: {\n prefix,\n suffix,\n [labelField]: label\n }\n }\n } = this;\n return h(\"span\", Object.assign({}, nodeProps, {\n ref: \"selfRef\",\n class: [`${clsPrefix}-tree-node-content`, nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps.class],\n onClick: handleClick,\n draggable: onDragstart === undefined ? undefined : true,\n onDragstart: onDragstart\n }), renderPrefix || prefix ? h(\"div\", {\n class: `${clsPrefix}-tree-node-content__prefix`\n }, renderPrefix ? renderPrefix({\n option: rawNode,\n selected,\n checked\n }) : render(prefix)) : null, h(\"div\", {\n class: `${clsPrefix}-tree-node-content__text`\n }, renderLabel ? renderLabel({\n option: rawNode,\n selected,\n checked\n }) : render(label)), renderSuffix || suffix ? h(\"div\", {\n class: `${clsPrefix}-tree-node-content__suffix`\n }, renderSuffix ? renderSuffix({\n option: rawNode,\n selected,\n checked\n }) : render(suffix)) : null);\n }\n});","import { h } from 'vue';\nexport function renderDropMark({\n position,\n offsetLevel,\n indent,\n el\n}) {\n const style = {\n position: 'absolute',\n boxSizing: 'border-box',\n right: 0\n };\n if (position === 'inside') {\n style.left = 0;\n style.top = 0;\n style.bottom = 0;\n style.borderRadius = 'inherit';\n style.boxShadow = 'inset 0 0 0 2px var(--n-drop-mark-color)';\n } else {\n const cssPosition = position === 'before' ? 'top' : 'bottom';\n style[cssPosition] = 0;\n // The left prop should be modified when tree's style is changed\n // Maybe it is possible to use content left\n style.left = `${el.offsetLeft + 6 - offsetLevel * indent}px`;\n style.height = '2px';\n style.backgroundColor = 'var(--n-drop-mark-color)';\n style.transformOrigin = cssPosition;\n style.borderRadius = '1px';\n style.transform = position === 'before' ? 'translateY(-4px)' : 'translateY(4px)';\n }\n return h(\"div\", {\n style: style\n });\n}\nexport function defaultAllowDrop({\n dropPosition,\n node\n}) {\n if (node.isLeaf === false) return true;\n if (node.children) {\n return true;\n }\n return dropPosition !== 'inside';\n}","import { computed } from 'vue';\nimport { isBrowser } from \"../../_utils/index.mjs\";\nimport { happensIn } from 'seemly';\nexport function useMergedCheckStrategy(props) {\n return computed(() => props.leafOnly ? 'child' : props.checkStrategy);\n}\nexport function isNodeDisabled(node, disabledField) {\n return !!node.rawNode[disabledField];\n}\nfunction traverse(nodes, childrenField, callback, callbackAfter) {\n nodes === null || nodes === void 0 ? void 0 : nodes.forEach(node => {\n callback(node);\n traverse(node[childrenField], childrenField, callback, callbackAfter);\n callbackAfter(node);\n });\n}\nexport function keysWithFilter(nodes, pattern, keyField, childrenField, filter) {\n const keys = new Set();\n const highlightKeySet = new Set();\n const path = [];\n traverse(nodes, childrenField, node => {\n path.push(node);\n if (filter(pattern, node)) {\n highlightKeySet.add(node[keyField]);\n for (let i = path.length - 2; i >= 0; --i) {\n if (!keys.has(path[i][keyField])) {\n keys.add(path[i][keyField]);\n } else {\n return;\n }\n }\n }\n }, () => {\n path.pop();\n });\n return {\n expandedKeys: Array.from(keys),\n highlightKeySet\n };\n}\nconst emptyImage = null;\nif (isBrowser && Image) {\n const emptyImage = new Image();\n emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n}\nexport { emptyImage };\nexport function filterTree(tree, filter, pattern, keyField, childrenField) {\n const visitedTailKeys = new Set();\n const visitedNonTailKeys = new Set();\n const highlightKeySet = new Set();\n const expandedKeys = [];\n const filteredTree = [];\n const path = [];\n function visit(t) {\n t.forEach(n => {\n path.push(n);\n if (filter(pattern, n)) {\n visitedTailKeys.add(n[keyField]);\n highlightKeySet.add(n[keyField]);\n for (let i = path.length - 2; i >= 0; --i) {\n const key = path[i][keyField];\n if (!visitedNonTailKeys.has(key)) {\n visitedNonTailKeys.add(key);\n if (visitedTailKeys.has(key)) {\n visitedTailKeys.delete(key);\n }\n } else {\n break;\n }\n }\n }\n const children = n[childrenField];\n if (children) {\n visit(children);\n }\n path.pop();\n });\n }\n visit(tree);\n function build(t, sibs) {\n t.forEach(n => {\n const key = n[keyField];\n const isVisitedTail = visitedTailKeys.has(key);\n const isVisitedNonTail = visitedNonTailKeys.has(key);\n if (!isVisitedTail && !isVisitedNonTail) return;\n const children = n[childrenField];\n if (children) {\n if (isVisitedTail) {\n // If it is visited path tail, use origin node\n sibs.push(n);\n } else {\n // It it is not visited path tail, use cloned node\n expandedKeys.push(key);\n const clonedNode = Object.assign(Object.assign({}, n), {\n [childrenField]: []\n });\n sibs.push(clonedNode);\n build(children, clonedNode[childrenField]);\n }\n } else {\n sibs.push(n);\n }\n });\n }\n build(tree, filteredTree);\n return {\n filteredTree,\n highlightKeySet,\n expandedKeys\n };\n}\nexport function treeGetClickTarget(e) {\n if (happensIn(e, 'checkbox')) {\n return 'checkbox';\n } else if (happensIn(e, 'switcher')) {\n return 'switcher';\n } else {\n return 'node';\n }\n}","import { h, inject, computed, defineComponent, ref, onMounted } from 'vue';\nimport { useMemo } from 'vooks';\nimport { happensIn, repeat } from 'seemly';\nimport { createDataKey } from \"../../_utils/index.mjs\";\nimport NTreeNodeSwitcher from \"./TreeNodeSwitcher.mjs\";\nimport NTreeNodeCheckbox from \"./TreeNodeCheckbox.mjs\";\nimport NTreeNodeContent from \"./TreeNodeContent.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nimport { renderDropMark } from \"./dnd.mjs\";\nimport { isNodeDisabled } from \"./utils.mjs\";\nconst TreeNode = defineComponent({\n name: 'TreeNode',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n tmNode: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const NTree = inject(treeInjectionKey);\n const {\n droppingNodeParentRef,\n droppingMouseNodeRef,\n draggingNodeRef,\n droppingPositionRef,\n droppingOffsetLevelRef,\n nodePropsRef,\n indentRef,\n blockLineRef,\n checkboxPlacementRef,\n checkOnClickRef,\n disabledFieldRef,\n showLineRef,\n renderSwitcherIconRef,\n overrideDefaultNodeClickBehaviorRef\n } = NTree;\n const checkboxDisabledRef = useMemo(() => !!props.tmNode.rawNode.checkboxDisabled);\n const nodeIsDisabledRef = useMemo(() => {\n return isNodeDisabled(props.tmNode, disabledFieldRef.value);\n });\n const disabledRef = useMemo(() => NTree.disabledRef.value || nodeIsDisabledRef.value);\n const resolvedNodePropsRef = computed(() => {\n const {\n value: nodeProps\n } = nodePropsRef;\n if (!nodeProps) return undefined;\n return nodeProps({\n option: props.tmNode.rawNode\n });\n });\n // used for drag and drop\n const contentInstRef = ref(null);\n // must be non-reactive\n const contentElRef = {\n value: null\n };\n onMounted(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n contentElRef.value = contentInstRef.value.$el;\n });\n function handleSwitcherClick() {\n const callback = () => {\n const {\n tmNode\n } = props;\n if (!tmNode.isLeaf && !tmNode.shallowLoaded) {\n if (!NTree.loadingKeysRef.value.has(tmNode.key)) {\n NTree.loadingKeysRef.value.add(tmNode.key);\n } else {\n return;\n }\n const {\n onLoadRef: {\n value: onLoad\n }\n } = NTree;\n if (onLoad) {\n void onLoad(tmNode.rawNode).then(value => {\n if (value !== false) {\n NTree.handleSwitcherClick(tmNode);\n }\n }).finally(() => {\n NTree.loadingKeysRef.value.delete(tmNode.key);\n });\n }\n } else {\n NTree.handleSwitcherClick(tmNode);\n }\n };\n if (renderSwitcherIconRef.value) {\n // if renderSwitcherIcon is set, icon dom may be altered before event\n // bubbles to parent dom, so that target check fails. Call it in next\n // event loop so that event bubble phase is finishes.\n setTimeout(callback, 0);\n } else {\n callback();\n }\n }\n const selectableRef = useMemo(() => !nodeIsDisabledRef.value && NTree.selectableRef.value && (NTree.internalTreeSelect ? NTree.mergedCheckStrategyRef.value !== 'child' || NTree.multipleRef.value && NTree.cascadeRef.value || props.tmNode.isLeaf : true));\n const checkableRef = useMemo(() => NTree.checkableRef.value && (NTree.cascadeRef.value || NTree.mergedCheckStrategyRef.value !== 'child' || props.tmNode.isLeaf));\n const checkedRef = useMemo(() => NTree.displayedCheckedKeysRef.value.includes(props.tmNode.key));\n const mergedCheckOnClickRef = useMemo(() => {\n const {\n value: checkable\n } = checkableRef;\n if (!checkable) return false;\n const {\n value: checkOnClick\n } = checkOnClickRef;\n const {\n tmNode\n } = props;\n if (typeof checkOnClick === 'boolean') {\n return !tmNode.disabled && checkOnClick;\n }\n return checkOnClick(props.tmNode.rawNode);\n });\n function _handleClick(e) {\n const {\n value: expandOnClick\n } = NTree.expandOnClickRef;\n const {\n value: selectable\n } = selectableRef;\n const {\n value: mergedCheckOnClick\n } = mergedCheckOnClickRef;\n if (!selectable && !expandOnClick && !mergedCheckOnClick) return;\n if (happensIn(e, 'checkbox') || happensIn(e, 'switcher')) return;\n const {\n tmNode\n } = props;\n if (selectable) {\n NTree.handleSelect(tmNode);\n }\n if (expandOnClick && !tmNode.isLeaf) {\n handleSwitcherClick();\n }\n if (mergedCheckOnClick) {\n handleCheck(!checkedRef.value);\n }\n }\n function handleNodeClick(e) {\n var _a, _b;\n if (!disabledRef.value) {\n const overrideDefaultNodeClickBehavior = overrideDefaultNodeClickBehaviorRef.value;\n let shouldOverride = false;\n if (overrideDefaultNodeClickBehavior) {\n switch (overrideDefaultNodeClickBehavior({\n option: props.tmNode.rawNode\n })) {\n case 'toggleCheck':\n shouldOverride = true;\n handleCheck(!checkedRef.value);\n break;\n case 'toggleSelect':\n shouldOverride = true;\n NTree.handleSelect(props.tmNode);\n break;\n case 'toggleExpand':\n shouldOverride = true;\n handleSwitcherClick();\n shouldOverride = true;\n break;\n case 'none':\n shouldOverride = true;\n shouldOverride = true;\n return;\n case 'default':\n default:\n break;\n }\n }\n if (!shouldOverride) {\n _handleClick(e);\n }\n }\n (_b = (_a = resolvedNodePropsRef.value) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }\n function handleContentClick(e) {\n if (blockLineRef.value) return;\n handleNodeClick(e);\n }\n function handleLineClick(e) {\n if (!blockLineRef.value) return;\n handleNodeClick(e);\n }\n function handleCheck(checked) {\n NTree.handleCheck(props.tmNode, checked);\n }\n // Dnd\n function handleDragStart(e) {\n NTree.handleDragStart({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragEnter(e) {\n if (e.currentTarget !== e.target) {\n return;\n }\n NTree.handleDragEnter({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragOver(e) {\n e.preventDefault(); // if not prevent, drop event won't be fired...\n NTree.handleDragOver({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragEnd(e) {\n NTree.handleDragEnd({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragLeave(e) {\n if (e.currentTarget !== e.target) {\n return;\n }\n NTree.handleDragLeave({\n event: e,\n node: props.tmNode\n });\n }\n function handleDrop(e) {\n e.preventDefault();\n if (droppingPositionRef.value !== null) {\n NTree.handleDrop({\n event: e,\n node: props.tmNode,\n dropPosition: droppingPositionRef.value\n });\n }\n }\n const indentNodes = computed(() => {\n const {\n clsPrefix\n } = props;\n const {\n value: indent\n } = indentRef;\n if (showLineRef.value) {\n const indentNodes = [];\n let cursor = props.tmNode.parent;\n while (cursor) {\n if (cursor.isLastChild) {\n indentNodes.push(h(\"div\", {\n class: `${clsPrefix}-tree-node-indent`\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n } else {\n indentNodes.push(h(\"div\", {\n class: [`${clsPrefix}-tree-node-indent`, `${clsPrefix}-tree-node-indent--show-line`]\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n }\n cursor = cursor.parent;\n }\n return indentNodes.reverse();\n } else {\n return repeat(props.tmNode.level, h(\"div\", {\n class: `${props.clsPrefix}-tree-node-indent`\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n }\n });\n return {\n showDropMark: useMemo(() => {\n const {\n value: draggingNode\n } = draggingNodeRef;\n if (!draggingNode) return;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (!droppingPosition) return;\n const {\n value: droppingMouseNode\n } = droppingMouseNodeRef;\n if (!droppingMouseNode) {\n return;\n }\n const {\n tmNode\n } = props;\n if (tmNode.key === droppingMouseNode.key) return true;\n return false;\n }),\n showDropMarkAsParent: useMemo(() => {\n const {\n value: droppingNodeParent\n } = droppingNodeParentRef;\n if (!droppingNodeParent) return false;\n const {\n tmNode\n } = props;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (droppingPosition === 'before' || droppingPosition === 'after') {\n return droppingNodeParent.key === tmNode.key;\n }\n return false;\n }),\n pending: useMemo(() => NTree.pendingNodeKeyRef.value === props.tmNode.key),\n loading: useMemo(() => NTree.loadingKeysRef.value.has(props.tmNode.key)),\n highlight: useMemo(() => {\n var _a;\n return (_a = NTree.highlightKeySetRef.value) === null || _a === void 0 ? void 0 : _a.has(props.tmNode.key);\n }),\n checked: checkedRef,\n indeterminate: useMemo(() => NTree.displayedIndeterminateKeysRef.value.includes(props.tmNode.key)),\n selected: useMemo(() => NTree.mergedSelectedKeysRef.value.includes(props.tmNode.key)),\n expanded: useMemo(() => NTree.mergedExpandedKeysRef.value.includes(props.tmNode.key)),\n disabled: disabledRef,\n checkable: checkableRef,\n mergedCheckOnClick: mergedCheckOnClickRef,\n checkboxDisabled: checkboxDisabledRef,\n selectable: selectableRef,\n expandOnClick: NTree.expandOnClickRef,\n internalScrollable: NTree.internalScrollableRef,\n draggable: NTree.draggableRef,\n blockLine: blockLineRef,\n nodeProps: resolvedNodePropsRef,\n checkboxFocusable: NTree.internalCheckboxFocusableRef,\n droppingPosition: droppingPositionRef,\n droppingOffsetLevel: droppingOffsetLevelRef,\n indent: indentRef,\n checkboxPlacement: checkboxPlacementRef,\n showLine: showLineRef,\n contentInstRef,\n contentElRef,\n indentNodes,\n handleCheck,\n handleDrop,\n handleDragStart,\n handleDragEnter,\n handleDragOver,\n handleDragEnd,\n handleDragLeave,\n handleLineClick,\n handleContentClick,\n handleSwitcherClick\n };\n },\n render() {\n const {\n tmNode,\n clsPrefix,\n checkable,\n expandOnClick,\n selectable,\n selected,\n checked,\n highlight,\n draggable,\n blockLine,\n indent,\n indentNodes,\n disabled,\n pending,\n internalScrollable,\n nodeProps,\n checkboxPlacement\n } = this;\n // drag start not inside\n // it need to be append to node itself, not wrapper\n const dragEventHandlers = draggable && !disabled ? {\n onDragenter: this.handleDragEnter,\n onDragleave: this.handleDragLeave,\n onDragend: this.handleDragEnd,\n onDrop: this.handleDrop,\n onDragover: this.handleDragOver\n } : undefined;\n // In non virtual mode, there's no evidence that which element should be\n // scrolled to, so we need data-key to query the target element.\n const dataKey = internalScrollable ? createDataKey(tmNode.key) : undefined;\n const checkboxOnRight = checkboxPlacement === 'right';\n const checkboxNode = checkable ? h(NTreeNodeCheckbox, {\n indent: indent,\n right: checkboxOnRight,\n focusable: this.checkboxFocusable,\n disabled: disabled || this.checkboxDisabled,\n clsPrefix: clsPrefix,\n checked: this.checked,\n indeterminate: this.indeterminate,\n onCheck: this.handleCheck\n }) : null;\n return h(\"div\", Object.assign({\n class: `${clsPrefix}-tree-node-wrapper`\n }, dragEventHandlers), h(\"div\", Object.assign({}, blockLine ? nodeProps : undefined, {\n class: [`${clsPrefix}-tree-node`, {\n [`${clsPrefix}-tree-node--selected`]: selected,\n [`${clsPrefix}-tree-node--checkable`]: checkable,\n [`${clsPrefix}-tree-node--highlight`]: highlight,\n [`${clsPrefix}-tree-node--pending`]: pending,\n [`${clsPrefix}-tree-node--disabled`]: disabled,\n [`${clsPrefix}-tree-node--selectable`]: selectable,\n [`${clsPrefix}-tree-node--clickable`]: selectable || expandOnClick || this.mergedCheckOnClick\n }, nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps.class],\n \"data-key\": dataKey,\n draggable: draggable && blockLine,\n onClick: this.handleLineClick,\n onDragstart: draggable && blockLine && !disabled ? this.handleDragStart : undefined\n }), indentNodes, tmNode.isLeaf && this.showLine ? h(\"div\", {\n class: [`${clsPrefix}-tree-node-indent`, `${clsPrefix}-tree-node-indent--show-line`, tmNode.isLeaf && `${clsPrefix}-tree-node-indent--is-leaf`, tmNode.isLastChild && `${clsPrefix}-tree-node-indent--last-child`]\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })) : h(NTreeNodeSwitcher, {\n clsPrefix: clsPrefix,\n expanded: this.expanded,\n selected: selected,\n loading: this.loading,\n hide: tmNode.isLeaf,\n tmNode: this.tmNode,\n indent: indent,\n onClick: this.handleSwitcherClick\n }), !checkboxOnRight ? checkboxNode : null, h(NTreeNodeContent, {\n ref: \"contentInstRef\",\n clsPrefix: clsPrefix,\n checked: checked,\n selected: selected,\n onClick: this.handleContentClick,\n nodeProps: blockLine ? undefined : nodeProps,\n onDragstart: draggable && !blockLine && !disabled ? this.handleDragStart : undefined,\n tmNode: tmNode\n }), draggable ? this.showDropMark ? renderDropMark({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n el: this.contentElRef.value,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n position: this.droppingPosition,\n offsetLevel: this.droppingOffsetLevel,\n indent\n }) : this.showDropMarkAsParent ? renderDropMark({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n el: this.contentElRef.value,\n position: 'inside',\n offsetLevel: this.droppingOffsetLevel,\n indent\n }) : null : null, checkboxOnRight ? checkboxNode : null));\n }\n});\nexport default TreeNode;","import { inject, ref } from 'vue';\nimport { treeSelectInjectionKey } from \"../../tree-select/src/interface.mjs\";\nexport function useKeyboard({\n props,\n fNodesRef,\n mergedExpandedKeysRef,\n mergedSelectedKeysRef,\n mergedCheckedKeysRef,\n handleCheck,\n handleSelect,\n handleSwitcherClick\n}) {\n const {\n value: mergedSelectedKeys\n } = mergedSelectedKeysRef;\n // If it's used in tree-select, make it take over pending state\n const treeSelectInjection = inject(treeSelectInjectionKey, null);\n const pendingNodeKeyRef = treeSelectInjection ? treeSelectInjection.pendingNodeKeyRef : ref(mergedSelectedKeys.length ? mergedSelectedKeys[mergedSelectedKeys.length - 1] : null);\n function handleKeydown(e) {\n var _a;\n if (!props.keyboard) return {\n enterBehavior: null\n };\n const {\n value: pendingNodeKey\n } = pendingNodeKeyRef;\n let enterBehavior = null;\n if (pendingNodeKey === null) {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n }\n if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(e.key)) {\n if (pendingNodeKey === null) {\n const {\n value: fNodes\n } = fNodesRef;\n let fIndex = 0;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n }\n }\n } else {\n const {\n value: fNodes\n } = fNodesRef;\n let fIndex = fNodes.findIndex(tmNode => tmNode.key === pendingNodeKey);\n if (!~fIndex) return {\n enterBehavior: null\n };\n if (e.key === 'Enter') {\n const tmNode = fNodes[fIndex];\n enterBehavior = ((_a = props.overrideDefaultNodeClickBehavior) === null || _a === void 0 ? void 0 : _a.call(props, {\n option: tmNode.rawNode\n })) || null;\n switch (enterBehavior) {\n case 'toggleCheck':\n handleCheck(tmNode, !mergedCheckedKeysRef.value.includes(tmNode.key));\n break;\n case 'toggleSelect':\n handleSelect(tmNode);\n break;\n case 'toggleExpand':\n handleSwitcherClick(tmNode);\n break;\n case 'none':\n break;\n case 'default':\n default:\n enterBehavior = 'default';\n handleSelect(tmNode);\n }\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n fIndex += 1;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n fIndex -= 1;\n while (fIndex >= 0) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex -= 1;\n }\n } else if (e.key === 'ArrowLeft') {\n const pendingNode = fNodes[fIndex];\n if (pendingNode.isLeaf || !mergedExpandedKeysRef.value.includes(pendingNodeKey)) {\n const parentTmNode = pendingNode.getParent();\n if (parentTmNode) {\n pendingNodeKeyRef.value = parentTmNode.key;\n }\n } else {\n handleSwitcherClick(pendingNode);\n }\n } else if (e.key === 'ArrowRight') {\n const pendingNode = fNodes[fIndex];\n if (pendingNode.isLeaf) return {\n enterBehavior: null\n };\n if (!mergedExpandedKeysRef.value.includes(pendingNodeKey)) {\n handleSwitcherClick(pendingNode);\n } else {\n // Tha same as ArrowDown\n fIndex += 1;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n }\n }\n }\n return {\n enterBehavior\n };\n }\n return {\n pendingNodeKeyRef,\n handleKeydown\n };\n}","import { h, defineComponent } from 'vue';\nimport { pxfy } from 'seemly';\nimport FadeInExpandTransition from \"../../_internal/fade-in-expand-transition/index.mjs\";\nimport TreeNode from \"./TreeNode.mjs\";\nexport default defineComponent({\n name: 'TreeMotionWrapper',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n height: Number,\n nodes: {\n type: Array,\n required: true\n },\n mode: {\n type: String,\n required: true\n },\n onAfterEnter: {\n type: Function,\n required: true\n }\n },\n render() {\n const {\n clsPrefix\n } = this;\n return h(FadeInExpandTransition, {\n onAfterEnter: this.onAfterEnter,\n appear: true,\n reverse: this.mode === 'collapse'\n }, {\n default: () => h(\"div\", {\n class: [`${clsPrefix}-tree-motion-wrapper`, `${clsPrefix}-tree-motion-wrapper--${this.mode}`],\n style: {\n height: pxfy(this.height)\n }\n }, this.nodes.map(node => h(TreeNode, {\n clsPrefix: clsPrefix,\n tmNode: node\n })))\n });\n }\n});","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nimport { iconSwitchTransition } from \"../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\nconst iconSwitchTransitionNode = iconSwitchTransition();\n// vars:\n// --n-arrow-color\n// --n-bezier\n// --n-font-size\n// --n-node-border-radius\n// --n-node-color-active\n// --n-node-color-hover\n// --n-node-color-pressed\n// --n-node-text-color\n// --n-node-text-color-disabled\n// --n-node-wrapper-padding\n// --n-line-offset-top\n// --n-line-offset-bottom\n// --n-node-content-height\n// --n-line-height\n// --n-line-color\nexport default cB('tree', `\n font-size: var(--n-font-size);\n outline: none;\n`, [c('ul, li', `\n margin: 0;\n padding: 0;\n list-style: none;\n `), c('>', [cB('tree-node', [c('&:first-child', 'margin-top: 0;')])]), cB('tree-motion-wrapper', [cM('expand', [fadeInHeightExpandTransition({\n duration: '0.2s'\n})]), cM('collapse', [fadeInHeightExpandTransition({\n duration: '0.2s',\n reverse: true\n})])]), cB('tree-node-wrapper', `\n box-sizing: border-box;\n padding: var(--n-node-wrapper-padding);\n `), cB('tree-node', `\n transform: translate3d(0,0,0);\n position: relative;\n display: flex;\n border-radius: var(--n-node-border-radius);\n transition: background-color .3s var(--n-bezier);\n `, [cM('highlight', [cB('tree-node-content', [cE('text', 'border-bottom-color: var(--n-node-text-color-disabled);')])]), cM('disabled', [cB('tree-node-content', `\n color: var(--n-node-text-color-disabled);\n cursor: not-allowed;\n `)]), cNotM('disabled', [cM('clickable', [cB('tree-node-content', `\n cursor: pointer;\n `)])])]), cM('block-node', [cB('tree-node-content', `\n flex: 1;\n min-width: 0;\n `)]), cNotM('block-line', [cB('tree-node', [cNotM('disabled', [cB('tree-node-content', [c('&:hover', 'background: var(--n-node-color-hover);')]), cM('selectable', [cB('tree-node-content', [c('&:active', 'background: var(--n-node-color-pressed);')])]), cM('pending', [cB('tree-node-content', `\n background: var(--n-node-color-hover);\n `)]), cM('selected', [cB('tree-node-content', 'background: var(--n-node-color-active);')])]), cM('selected', [cB('tree-node-content', 'background: var(--n-node-color-active);')])])]), cM('block-line', [cB('tree-node', [cNotM('disabled', [c('&:hover', 'background: var(--n-node-color-hover);'), cM('pending', `\n background: var(--n-node-color-hover);\n `), cM('selectable', [cNotM('selected', [c('&:active', 'background: var(--n-node-color-pressed);')])]), cM('selected', 'background: var(--n-node-color-active);')]), cM('selected', 'background: var(--n-node-color-active);'), cM('disabled', `\n cursor: not-allowed;\n `)])]), cB('tree-node-indent', `\n flex-grow: 0;\n flex-shrink: 0;\n `, [cM('show-line', 'position: relative', [c('&::before', `\n position: absolute;\n left: 50%;\n border-left: 1px solid var(--n-line-color);\n transition: border-color .3s var(--n-bezier);\n transform: translate(-50%);\n content: \"\";\n top: var(--n-line-offset-top);\n bottom: var(--n-line-offset-bottom);\n `), cM('last-child', [c('&::before', `\n bottom: 50%;\n `)]), cM('is-leaf', [c('&::after', `\n position: absolute;\n content: \"\";\n left: calc(50% + 0.5px);\n right: 0;\n bottom: 50%;\n transition: border-color .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-line-color);\n `)])]), cNotM('show-line', 'height: 0;')]), cB('tree-node-switcher', `\n cursor: pointer;\n display: inline-flex;\n flex-shrink: 0;\n height: var(--n-node-content-height);\n align-items: center;\n justify-content: center;\n transition: transform .15s var(--n-bezier);\n vertical-align: bottom;\n `, [cE('icon', `\n position: relative;\n height: 14px;\n width: 14px;\n display: flex;\n color: var(--n-arrow-color);\n transition: color .3s var(--n-bezier);\n font-size: 14px;\n `, [cB('icon', [iconSwitchTransitionNode]), cB('base-loading', `\n color: var(--n-loading-color);\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n `, [iconSwitchTransitionNode]), cB('base-icon', [iconSwitchTransitionNode])]), cM('hide', 'visibility: hidden;'), cM('expanded', 'transform: rotate(90deg);')]), cB('tree-node-checkbox', `\n display: inline-flex;\n height: var(--n-node-content-height);\n vertical-align: bottom;\n align-items: center;\n justify-content: center;\n `), cB('tree-node-content', `\n user-select: none;\n position: relative;\n display: inline-flex;\n align-items: center;\n min-height: var(--n-node-content-height);\n box-sizing: border-box;\n line-height: var(--n-line-height);\n vertical-align: bottom;\n padding: 0 6px 0 4px;\n cursor: default;\n border-radius: var(--n-node-border-radius);\n color: var(--n-node-text-color);\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [c('&:last-child', 'margin-bottom: 0;'), cE('prefix', `\n display: inline-flex;\n margin-right: 8px;\n `), cE('text', `\n border-bottom: 1px solid #0000;\n transition: border-color .3s var(--n-bezier);\n flex-grow: 1;\n max-width: 100%;\n `), cE('suffix', `\n display: inline-flex;\n `)]), cE('empty', 'margin: auto;')]);","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { h, ref, toRef, computed, defineComponent, provide, watch, nextTick, watchEffect, inject } from 'vue';\nimport { createTreeMate, flatten, createIndexGetter } from 'treemate';\nimport { useMergedState } from 'vooks';\nimport { VVirtualList } from 'vueuc';\nimport { depx, getPadding, pxfy } from 'seemly';\nimport { treeSelectInjectionKey } from \"../../tree-select/src/interface.mjs\";\nimport { useConfig, useTheme, useThemeClass, useRtl } from \"../../_mixins/index.mjs\";\nimport { call, createDataKey, resolveSlot, warn, warnOnce } from \"../../_utils/index.mjs\";\nimport { NxScrollbar } from \"../../_internal/index.mjs\";\nimport { treeLight } from \"../styles/index.mjs\";\nimport { NEmpty } from \"../../empty/index.mjs\";\nimport NTreeNode from \"./TreeNode.mjs\";\nimport { keysWithFilter, emptyImage, filterTree, isNodeDisabled, useMergedCheckStrategy } from \"./utils.mjs\";\nimport { useKeyboard } from \"./keyboard.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nimport MotionWrapper from \"./MotionWrapper.mjs\";\nimport { defaultAllowDrop } from \"./dnd.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport function createTreeMateOptions(keyField, childrenField, disabledField, getChildren) {\n const settledGetChildren = getChildren || (node => {\n return node[childrenField];\n });\n return {\n getIsGroup() {\n return false;\n },\n getKey(node) {\n return node[keyField];\n },\n getChildren: settledGetChildren,\n getDisabled(node) {\n return !!(node[disabledField] || node.checkboxDisabled);\n }\n };\n}\nexport const treeSharedProps = {\n allowCheckingNotLoaded: Boolean,\n filter: Function,\n defaultExpandAll: Boolean,\n expandedKeys: Array,\n keyField: {\n type: String,\n default: 'key'\n },\n labelField: {\n type: String,\n default: 'label'\n },\n childrenField: {\n type: String,\n default: 'children'\n },\n disabledField: {\n type: String,\n default: 'disabled'\n },\n defaultExpandedKeys: {\n type: Array,\n default: () => []\n },\n indeterminateKeys: Array,\n renderSwitcherIcon: Function,\n onUpdateIndeterminateKeys: [Function, Array],\n 'onUpdate:indeterminateKeys': [Function, Array],\n onUpdateExpandedKeys: [Function, Array],\n 'onUpdate:expandedKeys': [Function, Array],\n overrideDefaultNodeClickBehavior: Function\n};\nexport const treeProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), {\n accordion: Boolean,\n showIrrelevantNodes: {\n type: Boolean,\n default: true\n },\n data: {\n type: Array,\n default: () => []\n },\n expandOnDragenter: {\n type: Boolean,\n default: true\n },\n expandOnClick: Boolean,\n checkOnClick: {\n type: [Boolean, Function],\n default: false\n },\n cancelable: {\n type: Boolean,\n default: true\n },\n checkable: Boolean,\n draggable: Boolean,\n blockNode: Boolean,\n blockLine: Boolean,\n showLine: Boolean,\n disabled: Boolean,\n checkedKeys: Array,\n defaultCheckedKeys: {\n type: Array,\n default: () => []\n },\n selectedKeys: Array,\n defaultSelectedKeys: {\n type: Array,\n default: () => []\n },\n multiple: Boolean,\n pattern: {\n type: String,\n default: ''\n },\n onLoad: Function,\n cascade: Boolean,\n selectable: {\n type: Boolean,\n default: true\n },\n scrollbarProps: Object,\n indent: {\n type: Number,\n default: 24\n },\n allowDrop: {\n type: Function,\n default: defaultAllowDrop\n },\n animated: {\n type: Boolean,\n default: true\n },\n checkboxPlacement: {\n type: String,\n default: 'left'\n },\n virtualScroll: Boolean,\n watchProps: Array,\n renderLabel: Function,\n renderPrefix: Function,\n renderSuffix: Function,\n nodeProps: Function,\n keyboard: {\n type: Boolean,\n default: true\n },\n getChildren: Function,\n onDragenter: [Function, Array],\n onDragleave: [Function, Array],\n onDragend: [Function, Array],\n onDragstart: [Function, Array],\n onDragover: [Function, Array],\n onDrop: [Function, Array],\n onUpdateCheckedKeys: [Function, Array],\n 'onUpdate:checkedKeys': [Function, Array],\n onUpdateSelectedKeys: [Function, Array],\n 'onUpdate:selectedKeys': [Function, Array]\n}), treeSharedProps), {\n // internal props for tree-select\n internalTreeSelect: Boolean,\n internalScrollable: Boolean,\n internalScrollablePadding: String,\n // use it to display\n internalRenderEmpty: Function,\n internalHighlightKeySet: Object,\n internalUnifySelectCheck: Boolean,\n internalCheckboxFocusable: {\n type: Boolean,\n default: true\n },\n internalFocusable: {\n // Make tree-select take over keyboard operations\n type: Boolean,\n default: true\n },\n checkStrategy: {\n type: String,\n default: 'all'\n },\n /**\n * @deprecated\n */\n leafOnly: Boolean\n});\nexport default defineComponent({\n name: 'Tree',\n props: treeProps,\n setup(props) {\n if (process.env.NODE_ENV !== 'production') {\n watchEffect(() => {\n if (props.leafOnly) {\n warnOnce('tree', '`leaf-only` is deprecated, please use `check-strategy=\"child\"` instead');\n }\n });\n }\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const rtlEnabledRef = useRtl('Tree', mergedRtlRef, mergedClsPrefixRef);\n const themeRef = useTheme('Tree', '-tree', style, treeLight, props, mergedClsPrefixRef);\n const selfElRef = ref(null);\n const scrollbarInstRef = ref(null);\n const virtualListInstRef = ref(null);\n function getScrollContainer() {\n var _a;\n return (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.listElRef;\n }\n function getScrollContent() {\n var _a;\n return (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.itemsElRef;\n }\n const mergedFilterRef = computed(() => {\n const {\n filter\n } = props;\n if (filter) return filter;\n const {\n labelField\n } = props;\n return (pattern, node) => {\n if (!pattern.length) return true;\n const label = node[labelField];\n if (typeof label === 'string') {\n return label.toLowerCase().includes(pattern.toLowerCase());\n }\n return false;\n };\n });\n const filteredTreeInfoRef = computed(() => {\n const {\n pattern\n } = props;\n if (!pattern) {\n return {\n filteredTree: props.data,\n highlightKeySet: null,\n expandedKeys: undefined\n };\n }\n if (!pattern.length || !mergedFilterRef.value) {\n return {\n filteredTree: props.data,\n highlightKeySet: null,\n expandedKeys: undefined\n };\n }\n return filterTree(props.data, mergedFilterRef.value, pattern, props.keyField, props.childrenField);\n });\n // We don't expect data source to change so we just determine it once\n const displayTreeMateRef = computed(() => createTreeMate(props.showIrrelevantNodes ? props.data : filteredTreeInfoRef.value.filteredTree, createTreeMateOptions(props.keyField, props.childrenField, props.disabledField, props.getChildren)));\n const treeSelectInjection = inject(treeSelectInjectionKey, null);\n const dataTreeMateRef = props.internalTreeSelect ? treeSelectInjection.dataTreeMate : displayTreeMateRef;\n const {\n watchProps\n } = props;\n const uncontrolledCheckedKeysRef = ref([]);\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultCheckedKeys')) {\n watchEffect(() => {\n uncontrolledCheckedKeysRef.value = props.defaultCheckedKeys;\n });\n } else {\n uncontrolledCheckedKeysRef.value = props.defaultCheckedKeys;\n }\n const controlledCheckedKeysRef = toRef(props, 'checkedKeys');\n const mergedCheckedKeysRef = useMergedState(controlledCheckedKeysRef, uncontrolledCheckedKeysRef);\n const checkedStatusRef = computed(() => {\n const value = dataTreeMateRef.value.getCheckedKeys(mergedCheckedKeysRef.value, {\n cascade: props.cascade,\n allowNotLoaded: props.allowCheckingNotLoaded\n });\n return value;\n });\n const mergedCheckStrategyRef = useMergedCheckStrategy(props);\n const displayedCheckedKeysRef = computed(() => {\n return checkedStatusRef.value.checkedKeys;\n });\n const displayedIndeterminateKeysRef = computed(() => {\n const {\n indeterminateKeys\n } = props;\n if (indeterminateKeys !== undefined) return indeterminateKeys;\n return checkedStatusRef.value.indeterminateKeys;\n });\n const uncontrolledSelectedKeysRef = ref([]);\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultSelectedKeys')) {\n watchEffect(() => {\n uncontrolledSelectedKeysRef.value = props.defaultSelectedKeys;\n });\n } else {\n uncontrolledSelectedKeysRef.value = props.defaultSelectedKeys;\n }\n const controlledSelectedKeysRef = toRef(props, 'selectedKeys');\n const mergedSelectedKeysRef = useMergedState(controlledSelectedKeysRef, uncontrolledSelectedKeysRef);\n const uncontrolledExpandedKeysRef = ref([]);\n const initUncontrolledExpandedKeys = keys => {\n uncontrolledExpandedKeysRef.value = props.defaultExpandAll ? dataTreeMateRef.value.getNonLeafKeys() : keys === undefined ? props.defaultExpandedKeys : keys;\n };\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {\n // if watching defaultExpandedKeys, we use access props.defaultExpandedKeys inside initiator\n watchEffect(() => {\n initUncontrolledExpandedKeys(undefined);\n });\n } else {\n // We by default watchEffect since if defaultExpandAll is true, we should remain tree expand if data changes\n watchEffect(() => {\n initUncontrolledExpandedKeys(props.defaultExpandedKeys);\n });\n }\n const controlledExpandedKeysRef = toRef(props, 'expandedKeys');\n const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);\n const fNodesRef = computed(() => displayTreeMateRef.value.getFlattenedNodes(mergedExpandedKeysRef.value));\n const {\n pendingNodeKeyRef,\n handleKeydown\n } = useKeyboard({\n props,\n mergedCheckedKeysRef,\n mergedSelectedKeysRef,\n fNodesRef,\n mergedExpandedKeysRef,\n handleCheck,\n handleSelect,\n handleSwitcherClick\n });\n let expandTimerId = null;\n let nodeKeyToBeExpanded = null;\n const uncontrolledHighlightKeySetRef = ref(new Set());\n const controlledHighlightKeySetRef = computed(() => {\n return props.internalHighlightKeySet || filteredTreeInfoRef.value.highlightKeySet;\n });\n const mergedHighlightKeySetRef = useMergedState(controlledHighlightKeySetRef, uncontrolledHighlightKeySetRef);\n const loadingKeysRef = ref(new Set());\n const expandedNonLoadingKeysRef = computed(() => {\n return mergedExpandedKeysRef.value.filter(key => !loadingKeysRef.value.has(key));\n });\n let dragStartX = 0;\n const draggingNodeRef = ref(null);\n const droppingNodeRef = ref(null);\n const droppingMouseNodeRef = ref(null);\n const droppingPositionRef = ref(null);\n const droppingOffsetLevelRef = ref(0);\n const droppingNodeParentRef = computed(() => {\n const {\n value: droppingNode\n } = droppingNodeRef;\n if (!droppingNode) return null;\n // May avoid overlap between line mark of first child & rect mark of parent\n // if (droppingNode.isFirstChild && droppingPositionRef.value === 'before') {\n // return null\n // }\n return droppingNode.parent;\n });\n // shallow watch data\n let isDataReset = false;\n watch(toRef(props, 'data'), () => {\n isDataReset = true;\n void nextTick(() => {\n isDataReset = false;\n });\n loadingKeysRef.value.clear();\n pendingNodeKeyRef.value = null;\n resetDndState();\n }, {\n deep: false\n });\n let expandAnimationDisabled = false;\n const disableExpandAnimationForOneTick = () => {\n expandAnimationDisabled = true;\n void nextTick(() => {\n expandAnimationDisabled = false;\n });\n };\n let memoizedExpandedKeys;\n watch(toRef(props, 'pattern'), (value, oldValue) => {\n if (props.showIrrelevantNodes) {\n memoizedExpandedKeys = undefined;\n if (value) {\n const {\n expandedKeys: expandedKeysAfterChange,\n highlightKeySet\n } = keysWithFilter(props.data, props.pattern, props.keyField, props.childrenField, mergedFilterRef.value);\n uncontrolledHighlightKeySetRef.value = highlightKeySet;\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(expandedKeysAfterChange, getOptionsByKeys(expandedKeysAfterChange), {\n node: null,\n action: 'filter'\n });\n } else {\n uncontrolledHighlightKeySetRef.value = new Set();\n }\n } else {\n if (!value.length) {\n if (memoizedExpandedKeys !== undefined) {\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(memoizedExpandedKeys, getOptionsByKeys(memoizedExpandedKeys), {\n node: null,\n action: 'filter'\n });\n }\n } else {\n if (!oldValue.length) {\n memoizedExpandedKeys = mergedExpandedKeysRef.value;\n }\n const {\n expandedKeys\n } = filteredTreeInfoRef.value;\n if (expandedKeys !== undefined) {\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(expandedKeys, getOptionsByKeys(expandedKeys), {\n node: null,\n action: 'filter'\n });\n }\n }\n }\n });\n function triggerLoading(node) {\n return __awaiter(this, void 0, void 0, function* () {\n const {\n onLoad\n } = props;\n if (!onLoad) {\n if (process.env.NODE_ENV !== 'production') {\n warn('tree', 'There is unloaded node in data but props.onLoad is not specified.');\n }\n yield Promise.resolve();\n return;\n }\n const {\n value: loadingKeys\n } = loadingKeysRef;\n if (!loadingKeys.has(node.key)) {\n loadingKeys.add(node.key);\n try {\n const loadResult = yield onLoad(node.rawNode);\n if (loadResult === false) {\n resetDragExpandState();\n }\n } catch (loadError) {\n console.error(loadError);\n resetDragExpandState();\n }\n loadingKeys.delete(node.key);\n }\n });\n }\n watchEffect(() => {\n var _a;\n const {\n value: displayTreeMate\n } = displayTreeMateRef;\n if (!displayTreeMate) return;\n const {\n getNode\n } = displayTreeMate;\n (_a = mergedExpandedKeysRef.value) === null || _a === void 0 ? void 0 : _a.forEach(key => {\n const node = getNode(key);\n if (node && !node.shallowLoaded) {\n void triggerLoading(node);\n }\n });\n });\n // animation in progress\n const aipRef = ref(false);\n // animation flattened nodes\n const afNodesRef = ref([]);\n // Note: Since the virtual list depends on min height, if there's a node\n // whose height starts from 0, the virtual list will have a wrong height\n // during animation. This will seldom cause wired scrollbar status. It is\n // fixable and need some changes in vueuc, I've no time so I just leave it\n // here. Maybe the bug won't be fixed during the life time of the project.\n watch(expandedNonLoadingKeysRef, (value, prevValue) => {\n if (!props.animated || expandAnimationDisabled) {\n void nextTick(syncScrollbar);\n return;\n }\n if (isDataReset) {\n return;\n }\n const nodeHeight = depx(themeRef.value.self.nodeHeight);\n const prevVSet = new Set(prevValue);\n let addedKey = null;\n let removedKey = null;\n for (const expandedKey of value) {\n if (!prevVSet.has(expandedKey)) {\n if (addedKey !== null) return; // multi expand, not triggered by click\n addedKey = expandedKey;\n }\n }\n const currentVSet = new Set(value);\n for (const expandedKey of prevValue) {\n if (!currentVSet.has(expandedKey)) {\n if (removedKey !== null) return; // multi collapse, not triggered by click\n removedKey = expandedKey;\n }\n }\n if (addedKey === null && removedKey === null) {\n // 1. multi action, not triggered by click\n // 2. no action, don't know what happened\n return;\n }\n const {\n virtualScroll\n } = props;\n const viewportHeight = (virtualScroll ? virtualListInstRef.value.listElRef : selfElRef.value).offsetHeight;\n const viewportItemCount = Math.ceil(viewportHeight / nodeHeight) + 1;\n // play add animation\n let baseExpandedKeys;\n if (addedKey !== null) {\n baseExpandedKeys = prevValue;\n }\n if (removedKey !== null) {\n if (baseExpandedKeys === undefined) {\n baseExpandedKeys = value;\n } else {\n baseExpandedKeys = baseExpandedKeys.filter(key => key !== removedKey);\n }\n }\n aipRef.value = true;\n afNodesRef.value = displayTreeMateRef.value.getFlattenedNodes(baseExpandedKeys);\n if (addedKey !== null) {\n const expandedNodeIndex = afNodesRef.value.findIndex(node => node.key === addedKey);\n if (~expandedNodeIndex) {\n const children =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n afNodesRef.value[expandedNodeIndex].children;\n // sometimes user will pass leaf keys in\n if (children) {\n const expandedChildren = flatten(children, value);\n afNodesRef.value.splice(expandedNodeIndex + 1, 0, {\n __motion: true,\n mode: 'expand',\n height: virtualScroll ? expandedChildren.length * nodeHeight : undefined,\n nodes: virtualScroll ? expandedChildren.slice(0, viewportItemCount) : expandedChildren\n });\n }\n }\n }\n if (removedKey !== null) {\n const collapsedNodeIndex = afNodesRef.value.findIndex(node => node.key === removedKey);\n if (~collapsedNodeIndex) {\n const collapsedNodeChildren = afNodesRef.value[collapsedNodeIndex].children;\n // Sometime the whole tree is change, remove a key doesn't mean it is collapsed,\n // but maybe children removed\n if (!collapsedNodeChildren) return;\n // play remove animation\n aipRef.value = true;\n const collapsedChildren = flatten(collapsedNodeChildren, value);\n afNodesRef.value.splice(collapsedNodeIndex + 1, 0, {\n __motion: true,\n mode: 'collapse',\n height: virtualScroll ? collapsedChildren.length * nodeHeight : undefined,\n nodes: virtualScroll ? collapsedChildren.slice(0, viewportItemCount) : collapsedChildren\n });\n }\n }\n });\n const getFIndexRef = computed(() => {\n return createIndexGetter(fNodesRef.value);\n });\n const mergedFNodesRef = computed(() => {\n if (aipRef.value) return afNodesRef.value;else return fNodesRef.value;\n });\n function syncScrollbar() {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if (scrollbarInst) scrollbarInst.sync();\n }\n function handleAfterEnter() {\n aipRef.value = false;\n if (props.virtualScroll) {\n // If virtual scroll, we won't listen to resize during animation, so\n // resize callback of virtual list won't be called and as a result\n // scrollbar won't sync. We need to sync scrollbar manually.\n void nextTick(syncScrollbar);\n }\n }\n function getOptionsByKeys(keys) {\n const {\n getNode\n } = dataTreeMateRef.value;\n return keys.map(key => {\n var _a;\n return ((_a = getNode(key)) === null || _a === void 0 ? void 0 : _a.rawNode) || null;\n });\n }\n function doUpdateExpandedKeys(value, option, meta) {\n const {\n 'onUpdate:expandedKeys': _onUpdateExpandedKeys,\n onUpdateExpandedKeys\n } = props;\n uncontrolledExpandedKeysRef.value = value;\n if (_onUpdateExpandedKeys) {\n call(_onUpdateExpandedKeys, value, option, meta);\n }\n if (onUpdateExpandedKeys) {\n call(onUpdateExpandedKeys, value, option, meta);\n }\n }\n function doUpdateCheckedKeys(value, option, meta) {\n const {\n 'onUpdate:checkedKeys': _onUpdateCheckedKeys,\n onUpdateCheckedKeys\n } = props;\n uncontrolledCheckedKeysRef.value = value;\n if (onUpdateCheckedKeys) {\n call(onUpdateCheckedKeys, value, option, meta);\n }\n if (_onUpdateCheckedKeys) {\n call(_onUpdateCheckedKeys, value, option, meta);\n }\n }\n function doUpdateIndeterminateKeys(value, option) {\n const {\n 'onUpdate:indeterminateKeys': _onUpdateIndeterminateKeys,\n onUpdateIndeterminateKeys\n } = props;\n if (_onUpdateIndeterminateKeys) {\n call(_onUpdateIndeterminateKeys, value, option);\n }\n if (onUpdateIndeterminateKeys) {\n call(onUpdateIndeterminateKeys, value, option);\n }\n }\n function doUpdateSelectedKeys(value, option, meta) {\n const {\n 'onUpdate:selectedKeys': _onUpdateSelectedKeys,\n onUpdateSelectedKeys\n } = props;\n uncontrolledSelectedKeysRef.value = value;\n if (onUpdateSelectedKeys) {\n call(onUpdateSelectedKeys, value, option, meta);\n }\n if (_onUpdateSelectedKeys) {\n call(_onUpdateSelectedKeys, value, option, meta);\n }\n }\n // Drag & Drop\n function doDragEnter(info) {\n const {\n onDragenter\n } = props;\n if (onDragenter) call(onDragenter, info);\n }\n function doDragLeave(info) {\n const {\n onDragleave\n } = props;\n if (onDragleave) call(onDragleave, info);\n }\n function doDragEnd(info) {\n const {\n onDragend\n } = props;\n if (onDragend) call(onDragend, info);\n }\n function doDragStart(info) {\n const {\n onDragstart\n } = props;\n if (onDragstart) call(onDragstart, info);\n }\n function doDragOver(info) {\n const {\n onDragover\n } = props;\n if (onDragover) call(onDragover, info);\n }\n function doDrop(info) {\n const {\n onDrop\n } = props;\n if (onDrop) call(onDrop, info);\n }\n function resetDndState() {\n resetDragState();\n resetDropState();\n }\n function resetDragState() {\n draggingNodeRef.value = null;\n }\n function resetDropState() {\n droppingOffsetLevelRef.value = 0;\n droppingNodeRef.value = null;\n droppingMouseNodeRef.value = null;\n droppingPositionRef.value = null;\n resetDragExpandState();\n }\n function resetDragExpandState() {\n if (expandTimerId) {\n window.clearTimeout(expandTimerId);\n expandTimerId = null;\n }\n nodeKeyToBeExpanded = null;\n }\n function handleCheck(node, checked) {\n // We don't guard for leaf only since we have done it in view layer\n if (props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n if (props.internalUnifySelectCheck && !props.multiple) {\n handleSelect(node);\n return;\n }\n const checkedAction = checked ? 'check' : 'uncheck';\n const {\n checkedKeys,\n indeterminateKeys\n } = dataTreeMateRef.value[checkedAction](node.key, displayedCheckedKeysRef.value, {\n cascade: props.cascade,\n checkStrategy: mergedCheckStrategyRef.value,\n allowNotLoaded: props.allowCheckingNotLoaded\n });\n doUpdateCheckedKeys(checkedKeys, getOptionsByKeys(checkedKeys), {\n node: node.rawNode,\n action: checkedAction\n });\n doUpdateIndeterminateKeys(indeterminateKeys, getOptionsByKeys(indeterminateKeys));\n }\n function toggleExpand(node) {\n if (props.disabled) return;\n const {\n key\n } = node;\n const {\n value: mergedExpandedKeys\n } = mergedExpandedKeysRef;\n const index = mergedExpandedKeys.findIndex(expandNodeId => expandNodeId === key);\n if (~index) {\n const expandedKeysAfterChange = Array.from(mergedExpandedKeys);\n expandedKeysAfterChange.splice(index, 1);\n doUpdateExpandedKeys(expandedKeysAfterChange, getOptionsByKeys(expandedKeysAfterChange), {\n node: node.rawNode,\n action: 'collapse'\n });\n } else {\n const nodeToBeExpanded = displayTreeMateRef.value.getNode(key);\n if (!nodeToBeExpanded || nodeToBeExpanded.isLeaf) {\n return;\n }\n let nextKeys;\n if (props.accordion) {\n const siblingKeySet = new Set(node.siblings.map(({\n key\n }) => key));\n nextKeys = mergedExpandedKeys.filter(expandedKey => {\n return !siblingKeySet.has(expandedKey);\n });\n nextKeys.push(key);\n } else {\n nextKeys = mergedExpandedKeys.concat(key);\n }\n doUpdateExpandedKeys(nextKeys, getOptionsByKeys(nextKeys), {\n node: node.rawNode,\n action: 'expand'\n });\n }\n }\n function handleSwitcherClick(node) {\n if (props.disabled || aipRef.value) return;\n toggleExpand(node);\n }\n function handleSelect(node) {\n if (props.disabled || !props.selectable) {\n return;\n }\n pendingNodeKeyRef.value = node.key;\n if (props.internalUnifySelectCheck) {\n const {\n value: {\n checkedKeys,\n indeterminateKeys\n }\n } = checkedStatusRef;\n if (props.multiple) {\n handleCheck(node, !(checkedKeys.includes(node.key) || indeterminateKeys.includes(node.key)));\n } else {\n doUpdateCheckedKeys([node.key], getOptionsByKeys([node.key]), {\n node: node.rawNode,\n action: 'check'\n });\n }\n }\n if (props.multiple) {\n const selectedKeys = Array.from(mergedSelectedKeysRef.value);\n const index = selectedKeys.findIndex(key => key === node.key);\n if (~index) {\n if (props.cancelable) {\n selectedKeys.splice(index, 1);\n }\n } else if (!~index) {\n selectedKeys.push(node.key);\n }\n doUpdateSelectedKeys(selectedKeys, getOptionsByKeys(selectedKeys), {\n node: node.rawNode,\n action: ~index ? 'unselect' : 'select'\n });\n } else {\n const selectedKeys = mergedSelectedKeysRef.value;\n if (selectedKeys.includes(node.key)) {\n if (props.cancelable) {\n doUpdateSelectedKeys([], [], {\n node: node.rawNode,\n action: 'unselect'\n });\n }\n } else {\n doUpdateSelectedKeys([node.key], getOptionsByKeys([node.key]), {\n node: node.rawNode,\n action: 'select'\n });\n }\n }\n }\n function expandDragEnterNode(node) {\n if (expandTimerId) {\n window.clearTimeout(expandTimerId);\n expandTimerId = null;\n }\n // Don't expand leaf node.\n if (node.isLeaf) return;\n nodeKeyToBeExpanded = node.key;\n const expand = () => {\n if (nodeKeyToBeExpanded !== node.key) return;\n const {\n value: droppingMouseNode\n } = droppingMouseNodeRef;\n if (droppingMouseNode && droppingMouseNode.key === node.key && !mergedExpandedKeysRef.value.includes(node.key)) {\n const nextKeys = mergedExpandedKeysRef.value.concat(node.key);\n doUpdateExpandedKeys(nextKeys, getOptionsByKeys(nextKeys), {\n node: node.rawNode,\n action: 'expand'\n });\n }\n expandTimerId = null;\n nodeKeyToBeExpanded = null;\n };\n if (!node.shallowLoaded) {\n expandTimerId = window.setTimeout(() => {\n void triggerLoading(node).then(() => {\n expand();\n });\n }, 1000);\n } else {\n expandTimerId = window.setTimeout(() => {\n expand();\n }, 1000);\n }\n }\n // Dnd\n function handleDragEnter({\n event,\n node\n }) {\n // node should be a tmNode\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n handleDragOver({\n event,\n node\n }, false);\n doDragEnter({\n event,\n node: node.rawNode\n });\n }\n function handleDragLeave({\n event,\n node\n }) {\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n doDragLeave({\n event,\n node: node.rawNode\n });\n }\n function handleDragLeaveTree(e) {\n if (e.target !== e.currentTarget) return;\n resetDropState();\n }\n // Dragend is ok, we don't need to add global listener to reset drag status\n function handleDragEnd({\n event,\n node\n }) {\n resetDndState();\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n doDragEnd({\n event,\n node: node.rawNode\n });\n }\n function handleDragStart({\n event,\n node\n }) {\n var _a;\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n // Most of time, the image will block user's view\n emptyImage && ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.setDragImage(emptyImage, 0, 0));\n dragStartX = event.clientX;\n draggingNodeRef.value = node;\n doDragStart({\n event,\n node: node.rawNode\n });\n }\n function handleDragOver({\n event,\n node\n }, emit = true) {\n var _a;\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n const {\n value: draggingNode\n } = draggingNodeRef;\n if (!draggingNode) return;\n const {\n allowDrop,\n indent\n } = props;\n if (emit) doDragOver({\n event,\n node: node.rawNode\n });\n // Update dropping node\n const el = event.currentTarget;\n const {\n height: elOffsetHeight,\n top: elClientTop\n } = el.getBoundingClientRect();\n const eventOffsetY = event.clientY - elClientTop;\n let mousePosition;\n const allowDropInside = allowDrop({\n node: node.rawNode,\n dropPosition: 'inside',\n phase: 'drag'\n });\n if (allowDropInside) {\n if (eventOffsetY <= 8) {\n mousePosition = 'before';\n } else if (eventOffsetY >= elOffsetHeight - 8) {\n mousePosition = 'after';\n } else {\n mousePosition = 'inside';\n }\n } else {\n if (eventOffsetY <= elOffsetHeight / 2) {\n mousePosition = 'before';\n } else {\n mousePosition = 'after';\n }\n }\n const {\n value: getFindex\n } = getFIndexRef;\n /** determine the drop position and drop node */\n /** the dropping node needn't to be the mouse hovering node! */\n /**\n * if there is something i've learned from implementing a complex\n * drag & drop. that is never write unit test before you really figure\n * out what behavior is exactly you want.\n */\n let finalDropNode;\n let finalDropPosition;\n const hoverNodeFIndex = getFindex(node.key);\n if (hoverNodeFIndex === null) {\n resetDropState();\n return;\n }\n let mouseAtExpandedNonLeafNode = false;\n if (mousePosition === 'inside') {\n finalDropNode = node;\n finalDropPosition = 'inside';\n } else {\n if (mousePosition === 'before') {\n if (node.isFirstChild) {\n finalDropNode = node;\n finalDropPosition = 'before';\n } else {\n finalDropNode = fNodesRef.value[hoverNodeFIndex - 1];\n finalDropPosition = 'after';\n }\n } else {\n finalDropNode = node;\n finalDropPosition = 'after';\n }\n }\n // If the node is non-leaf and it is expanded, we don't allow it to\n // drop after it and change it to drop before its next view sibling\n if (!finalDropNode.isLeaf && mergedExpandedKeysRef.value.includes(finalDropNode.key)) {\n mouseAtExpandedNonLeafNode = true;\n if (finalDropPosition === 'after') {\n finalDropNode = fNodesRef.value[hoverNodeFIndex + 1];\n if (!finalDropNode) {\n // maybe there is no next view sibling when non-leaf node has no\n // children and it is the last node in the tree\n finalDropNode = node;\n finalDropPosition = 'inside';\n } else {\n finalDropPosition = 'before';\n }\n }\n }\n const droppingMouseNode = finalDropNode;\n droppingMouseNodeRef.value = droppingMouseNode;\n // This is a speacial case, user is dragging a last child itself, so we\n // only view it as they are trying to drop after it.\n // There are some relevant codes in bailout 1's child branch.\n // Also, the expand bailout should have a high priority. If it's non-leaf\n // node and expanded, keep its origin drop position\n if (!mouseAtExpandedNonLeafNode && draggingNode.isLastChild && draggingNode.key === finalDropNode.key) {\n finalDropPosition = 'after';\n }\n if (finalDropPosition === 'after') {\n let offset = dragStartX - event.clientX; // drag left => > 0\n let offsetLevel = 0;\n while (offset >= indent / 2 &&\n // divide by 2 to make it easier to trigger\n finalDropNode.parent !== null && finalDropNode.isLastChild && offsetLevel < 1) {\n offset -= indent;\n offsetLevel += 1;\n finalDropNode = finalDropNode.parent;\n }\n droppingOffsetLevelRef.value = offsetLevel;\n } else {\n droppingOffsetLevelRef.value = 0;\n }\n // Bailout 1\n // Drag self into self\n // Drag it into direct parent\n if (draggingNode.contains(finalDropNode) || finalDropPosition === 'inside' && ((_a = draggingNode.parent) === null || _a === void 0 ? void 0 : _a.key) === finalDropNode.key) {\n if (draggingNode.key === droppingMouseNode.key && draggingNode.key === finalDropNode.key) {\n // This is special case that we want ui to show a mark to guide user\n // to start dragging. Nor they will think nothing happens.\n // However this is an invalid drop, we need to guard it inside\n // handleDrop\n } else {\n resetDropState();\n return;\n }\n }\n // Bailout 3\n if (!allowDrop({\n node: finalDropNode.rawNode,\n dropPosition: finalDropPosition,\n phase: 'drag'\n })) {\n resetDropState();\n return;\n }\n if (draggingNode.key === finalDropNode.key) {\n // don't expand when drag on itself\n resetDragExpandState();\n } else {\n if (nodeKeyToBeExpanded !== finalDropNode.key) {\n if (finalDropPosition === 'inside') {\n if (props.expandOnDragenter) {\n expandDragEnterNode(finalDropNode);\n // Bailout 4\n // not try to loading\n if (!finalDropNode.shallowLoaded && nodeKeyToBeExpanded !== finalDropNode.key) {\n resetDndState();\n return;\n }\n } else {\n // Bailout 5\n // never expands on drag\n if (!finalDropNode.shallowLoaded) {\n resetDndState();\n return;\n }\n }\n } else {\n resetDragExpandState();\n }\n } else {\n if (finalDropPosition !== 'inside') {\n resetDragExpandState();\n }\n }\n }\n droppingPositionRef.value = finalDropPosition;\n droppingNodeRef.value = finalDropNode;\n }\n function handleDrop({\n event,\n node,\n dropPosition\n }) {\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n const {\n value: draggingNode\n } = draggingNodeRef;\n const {\n value: droppingNode\n } = droppingNodeRef;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (!draggingNode || !droppingNode || !droppingPosition) {\n return;\n }\n // Bailout 1\n if (!props.allowDrop({\n node: droppingNode.rawNode,\n dropPosition: droppingPosition,\n phase: 'drag'\n })) {\n return;\n }\n // Bailout 2\n // This is a special case to guard since we want ui to show the status\n // but not to emit a event\n if (draggingNode.key === droppingNode.key) {\n return;\n }\n // Bailout 3\n // insert before its next node\n // insert after its prev node\n if (droppingPosition === 'before') {\n const nextNode = draggingNode.getNext({\n includeDisabled: true\n });\n if (nextNode) {\n if (nextNode.key === droppingNode.key) {\n resetDropState();\n return;\n }\n }\n }\n if (droppingPosition === 'after') {\n const prevNode = draggingNode.getPrev({\n includeDisabled: true\n });\n if (prevNode) {\n if (prevNode.key === droppingNode.key) {\n resetDropState();\n return;\n }\n }\n }\n doDrop({\n event,\n node: droppingNode.rawNode,\n dragNode: draggingNode.rawNode,\n dropPosition\n });\n resetDndState();\n }\n function handleScroll() {\n syncScrollbar();\n }\n function handleResize() {\n syncScrollbar();\n }\n function handleFocusout(e) {\n var _a;\n if (props.virtualScroll || props.internalScrollable) {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if ((_a = scrollbarInst === null || scrollbarInst === void 0 ? void 0 : scrollbarInst.containerRef) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) {\n return;\n }\n pendingNodeKeyRef.value = null;\n } else {\n const {\n value: selfEl\n } = selfElRef;\n if (selfEl === null || selfEl === void 0 ? void 0 : selfEl.contains(e.relatedTarget)) return;\n pendingNodeKeyRef.value = null;\n }\n }\n watch(pendingNodeKeyRef, value => {\n var _a, _b;\n if (value === null) return;\n if (props.virtualScroll) {\n (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo({\n key: value\n });\n } else if (props.internalScrollable) {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if (scrollbarInst === null) return;\n const targetEl = (_b = scrollbarInst.contentRef) === null || _b === void 0 ? void 0 : _b.querySelector(`[data-key=\"${createDataKey(value)}\"]`);\n if (!targetEl) return;\n scrollbarInst.scrollTo({\n el: targetEl\n });\n }\n });\n provide(treeInjectionKey, {\n loadingKeysRef,\n highlightKeySetRef: mergedHighlightKeySetRef,\n displayedCheckedKeysRef,\n displayedIndeterminateKeysRef,\n mergedSelectedKeysRef,\n mergedExpandedKeysRef,\n mergedThemeRef: themeRef,\n mergedCheckStrategyRef,\n nodePropsRef: toRef(props, 'nodeProps'),\n disabledRef: toRef(props, 'disabled'),\n checkableRef: toRef(props, 'checkable'),\n selectableRef: toRef(props, 'selectable'),\n expandOnClickRef: toRef(props, 'expandOnClick'),\n onLoadRef: toRef(props, 'onLoad'),\n draggableRef: toRef(props, 'draggable'),\n blockLineRef: toRef(props, 'blockLine'),\n indentRef: toRef(props, 'indent'),\n cascadeRef: toRef(props, 'cascade'),\n checkOnClickRef: toRef(props, 'checkOnClick'),\n checkboxPlacementRef: props.checkboxPlacement,\n droppingMouseNodeRef,\n droppingNodeParentRef,\n draggingNodeRef,\n droppingPositionRef,\n droppingOffsetLevelRef,\n fNodesRef,\n pendingNodeKeyRef,\n showLineRef: toRef(props, 'showLine'),\n disabledFieldRef: toRef(props, 'disabledField'),\n internalScrollableRef: toRef(props, 'internalScrollable'),\n internalCheckboxFocusableRef: toRef(props, 'internalCheckboxFocusable'),\n internalTreeSelect: props.internalTreeSelect,\n renderLabelRef: toRef(props, 'renderLabel'),\n renderPrefixRef: toRef(props, 'renderPrefix'),\n renderSuffixRef: toRef(props, 'renderSuffix'),\n renderSwitcherIconRef: toRef(props, 'renderSwitcherIcon'),\n labelFieldRef: toRef(props, 'labelField'),\n multipleRef: toRef(props, 'multiple'),\n overrideDefaultNodeClickBehaviorRef: toRef(props, 'overrideDefaultNodeClickBehavior'),\n handleSwitcherClick,\n handleDragEnd,\n handleDragEnter,\n handleDragLeave,\n handleDragStart,\n handleDrop,\n handleDragOver,\n handleSelect,\n handleCheck\n });\n function scrollTo(options, y) {\n var _a, _b;\n if (typeof options === 'number') {\n (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(options, y || 0);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n (_b = virtualListInstRef.value) === null || _b === void 0 ? void 0 : _b.scrollTo(options);\n }\n }\n const exposedMethods = {\n handleKeydown,\n scrollTo,\n getCheckedData: () => {\n if (!props.checkable) return {\n keys: [],\n options: []\n };\n const {\n checkedKeys\n } = checkedStatusRef.value;\n return {\n keys: checkedKeys,\n options: getOptionsByKeys(checkedKeys)\n };\n },\n getIndeterminateData: () => {\n if (!props.checkable) return {\n keys: [],\n options: []\n };\n const {\n indeterminateKeys\n } = checkedStatusRef.value;\n return {\n keys: indeterminateKeys,\n options: getOptionsByKeys(indeterminateKeys)\n };\n }\n };\n const cssVarsRef = computed(() => {\n const {\n common: {\n cubicBezierEaseInOut\n },\n self: {\n fontSize,\n nodeBorderRadius,\n nodeColorHover,\n nodeColorPressed,\n nodeColorActive,\n arrowColor,\n loadingColor,\n nodeTextColor,\n nodeTextColorDisabled,\n dropMarkColor,\n nodeWrapperPadding,\n nodeHeight,\n lineHeight,\n lineColor\n }\n } = themeRef.value;\n const lineOffsetTop = getPadding(nodeWrapperPadding, 'top');\n const lineOffsetBottom = getPadding(nodeWrapperPadding, 'bottom');\n const nodeContentHeight = pxfy(depx(nodeHeight) - depx(lineOffsetTop) - depx(lineOffsetBottom));\n return {\n '--n-arrow-color': arrowColor,\n '--n-loading-color': loadingColor,\n '--n-bezier': cubicBezierEaseInOut,\n '--n-font-size': fontSize,\n '--n-node-border-radius': nodeBorderRadius,\n '--n-node-color-active': nodeColorActive,\n '--n-node-color-hover': nodeColorHover,\n '--n-node-color-pressed': nodeColorPressed,\n '--n-node-text-color': nodeTextColor,\n '--n-node-text-color-disabled': nodeTextColorDisabled,\n '--n-drop-mark-color': dropMarkColor,\n '--n-node-wrapper-padding': nodeWrapperPadding,\n '--n-line-offset-top': `-${lineOffsetTop}`,\n '--n-line-offset-bottom': `-${lineOffsetBottom}`,\n '--n-node-content-height': nodeContentHeight,\n '--n-line-height': lineHeight,\n '--n-line-color': lineColor\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('tree', undefined, cssVarsRef, props) : undefined;\n return Object.assign(Object.assign({}, exposedMethods), {\n mergedClsPrefix: mergedClsPrefixRef,\n mergedTheme: themeRef,\n rtlEnabled: rtlEnabledRef,\n fNodes: mergedFNodesRef,\n aip: aipRef,\n selfElRef,\n virtualListInstRef,\n scrollbarInstRef,\n handleFocusout,\n handleDragLeaveTree,\n handleScroll,\n getScrollContainer,\n getScrollContent,\n handleAfterEnter,\n handleResize,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n });\n },\n render() {\n var _a;\n const {\n fNodes,\n internalRenderEmpty\n } = this;\n if (!fNodes.length && internalRenderEmpty) {\n return internalRenderEmpty();\n }\n const {\n mergedClsPrefix,\n blockNode,\n blockLine,\n draggable,\n disabled,\n internalFocusable,\n checkable,\n handleKeydown,\n rtlEnabled,\n handleFocusout,\n scrollbarProps\n } = this;\n const mergedFocusable = internalFocusable && !disabled;\n const tabindex = mergedFocusable ? '0' : undefined;\n const treeClass = [`${mergedClsPrefix}-tree`, rtlEnabled && `${mergedClsPrefix}-tree--rtl`, checkable && `${mergedClsPrefix}-tree--checkable`, (blockLine || blockNode) && `${mergedClsPrefix}-tree--block-node`, blockLine && `${mergedClsPrefix}-tree--block-line`];\n const createNode = tmNode => {\n return '__motion' in tmNode ? h(MotionWrapper, {\n height: tmNode.height,\n nodes: tmNode.nodes,\n clsPrefix: mergedClsPrefix,\n mode: tmNode.mode,\n onAfterEnter: this.handleAfterEnter\n }) : h(NTreeNode, {\n key: tmNode.key,\n tmNode: tmNode,\n clsPrefix: mergedClsPrefix\n });\n };\n if (this.virtualScroll) {\n const {\n mergedTheme,\n internalScrollablePadding\n } = this;\n const padding = getPadding(internalScrollablePadding || '0');\n return h(NxScrollbar, Object.assign({}, scrollbarProps, {\n ref: \"scrollbarInstRef\",\n onDragleave: draggable ? this.handleDragLeaveTree : undefined,\n container: this.getScrollContainer,\n content: this.getScrollContent,\n class: treeClass,\n theme: mergedTheme.peers.Scrollbar,\n themeOverrides: mergedTheme.peerOverrides.Scrollbar,\n tabindex: tabindex,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined\n }), {\n default: () => {\n var _a;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return !fNodes.length ? resolveSlot(this.$slots.empty, () => [h(NEmpty, {\n class: `${mergedClsPrefix}-tree__empty`,\n theme: this.mergedTheme.peers.Empty,\n themeOverrides: this.mergedTheme.peerOverrides.Empty\n })]) : h(VVirtualList, {\n ref: \"virtualListInstRef\",\n items: this.fNodes,\n itemSize: depx(mergedTheme.self.nodeHeight),\n ignoreItemResize: this.aip,\n paddingTop: padding.top,\n paddingBottom: padding.bottom,\n class: this.themeClass,\n style: [this.cssVars, {\n paddingLeft: padding.left,\n paddingRight: padding.right\n }],\n onScroll: this.handleScroll,\n onResize: this.handleResize,\n showScrollbar: false,\n itemResizable: true\n }, {\n default: ({\n item\n }) => createNode(item)\n });\n }\n });\n }\n const {\n internalScrollable\n } = this;\n treeClass.push(this.themeClass);\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n if (internalScrollable) {\n return h(NxScrollbar, Object.assign({}, scrollbarProps, {\n class: treeClass,\n tabindex: tabindex,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined,\n style: this.cssVars,\n contentStyle: {\n padding: this.internalScrollablePadding\n }\n }), {\n default: () => h(\"div\", {\n onDragleave: draggable ? this.handleDragLeaveTree : undefined,\n ref: \"selfElRef\"\n }, this.fNodes.map(createNode))\n });\n } else {\n return h(\"div\", {\n class: treeClass,\n tabindex: tabindex,\n ref: \"selfElRef\",\n style: this.cssVars,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined,\n onDragleave: draggable ? this.handleDragLeaveTree : undefined\n }, !fNodes.length ? resolveSlot(this.$slots.empty, () => [h(NEmpty, {\n class: `${mergedClsPrefix}-tree__empty`,\n theme: this.mergedTheme.peers.Empty,\n themeOverrides: this.mergedTheme.peerOverrides.Empty\n })]) : fNodes.map(createNode));\n }\n }\n});","\n\n","\n\n\n","\n\n\n","\n\n \n \n \n \n
\n \n\n","\n\n\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","var isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\nexport default isArrayLike;\n//# sourceMappingURL=is-array-like.js.map","import isArrayLike from './is-array-like';\nvar contains = function (arr, value) {\n if (!isArrayLike(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\nexport default contains;\n//# sourceMappingURL=contains.js.map","import isArrayLike from './is-array-like';\nvar filter = function (arr, func) {\n if (!isArrayLike(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\nexport default filter;\n//# sourceMappingURL=filter.js.map","import filter from './filter';\nimport contains from './contains';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) { values = []; }\n return filter(arr, function (value) { return !contains(values, value); });\n};\nexport default difference;\n//# sourceMappingURL=difference.js.map","var toString = {}.toString;\nvar isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };\nexport default isType;\n//# sourceMappingURL=is-type.js.map","/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\nimport isType from './is-type';\nexport default (function (value) {\n return isType(value, 'Function');\n});\n//# sourceMappingURL=is-function.js.map","// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\nexport default isNil;\n//# sourceMappingURL=is-nil.js.map","import isType from './is-type';\nexport default (function (value) {\n return Array.isArray ?\n Array.isArray(value) :\n isType(value, 'Array');\n});\n//# sourceMappingURL=is-array.js.map","export default (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return value !== null && type === 'object' || type === 'function';\n});\n//# sourceMappingURL=is-object.js.map","import isArray from './is-array';\nimport isObject from './is-object';\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (isArray(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n }\n else if (isObject(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\nexport default each;\n//# sourceMappingURL=each.js.map","import each from './each';\nimport isFunction from './is-function';\nvar keys = Object.keys ? function (obj) { return Object.keys(obj); } : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\nexport default keys;\n//# sourceMappingURL=keys.js.map","import isNil from './is-nil';\nimport keys from './keys';\nfunction isMatch(obj, attrs) {\n var _keys = keys(attrs);\n var length = _keys.length;\n if (isNil(obj))\n return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\nexport default isMatch;\n//# sourceMappingURL=is-match.js.map","var isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\nexport default isObjectLike;\n//# sourceMappingURL=is-object-like.js.map","import isObjectLike from './is-object-like';\nimport isType from './is-type';\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\nexport default isPlainObject;\n//# sourceMappingURL=is-plain-object.js.map","import isFunction from './is-function';\nimport isMatch from './is-match';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nfunction find(arr, predicate) {\n if (!isArray(arr))\n return null;\n var _predicate;\n if (isFunction(predicate)) {\n _predicate = predicate;\n }\n if (isPlainObject(predicate)) {\n _predicate = function (a) { return isMatch(a, predicate); };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\nexport default find;\n//# sourceMappingURL=find.js.map","function findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\nexport default findIndex;\n//# sourceMappingURL=find-index.js.map","import isNil from './is-nil';\nimport isArray from './is-array';\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n if (isArray(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n }\n else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\nexport default firstValue;\n//# sourceMappingURL=first-value.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!isArray(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\nexport default flatten;\n//# sourceMappingURL=flatten.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) { result = []; }\n if (!isArray(arr)) {\n result.push(arr);\n }\n else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\nexport default flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=max.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=min.js.map","import isArray from './is-array';\nimport { default as getMax } from './max';\nimport { default as getMin } from './min';\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) { return !isNaN(v); });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0,\n };\n }\n if (isArray(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = getMax(filterValues);\n var min = getMin(filterValues);\n return {\n min: min,\n max: max,\n };\n};\nexport default getRange;\n//# sourceMappingURL=get-range.js.map","var arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\nexport default pull;\n//# sourceMappingURL=pull.js.map","import isArrayLike from './is-array-like';\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!isArrayLike(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\nexport default pullAt;\n//# sourceMappingURL=pull-at.js.map","import each from './each';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar reduce = function (arr, fn, init) {\n if (!isArray(arr) && !isPlainObject(arr)) {\n return arr;\n }\n var result = init;\n each(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\nexport default reduce;\n//# sourceMappingURL=reduce.js.map","import isArrayLike from './is-array-like';\nimport pullAt from './pull-at';\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!isArrayLike(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n pullAt(arr, indexes);\n return result;\n};\nexport default remove;\n//# sourceMappingURL=remove.js.map","import isType from './is-type';\nexport default (function (str) {\n return isType(str, 'String');\n});\n//# sourceMappingURL=is-string.js.map","import isArray from './is-array';\nimport isString from './is-string';\nimport isFunction from './is-function';\nfunction sortBy(arr, key) {\n var comparer;\n if (isFunction(key)) {\n comparer = function (a, b) { return key(a) - key(b); };\n }\n else {\n var keys_1 = [];\n if (isString(key)) {\n keys_1.push(key);\n }\n else if (isArray(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\nexport default sortBy;\n//# sourceMappingURL=sort-by.js.map","export default function uniq(arr, cache) {\n if (cache === void 0) { cache = new Map(); }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n//# sourceMappingURL=uniq.js.map","import uniq from './uniq';\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return uniq([].concat.apply([], sources));\n};\nexport default union;\n//# sourceMappingURL=union.js.map","import isArray from './is-array';\nimport isNil from './is-nil';\nexport default (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n // flatten\n if (!isArray(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n//# sourceMappingURL=values-of-key.js.map","import isArrayLike from './is-array-like';\nexport default function head(o) {\n if (isArrayLike(o)) {\n return o[0];\n }\n return undefined;\n}\n//# sourceMappingURL=head.js.map","import isArrayLike from './is-array-like';\nexport default function last(o) {\n if (isArrayLike(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n//# sourceMappingURL=last.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction startsWith(arr, e) {\n return (isArray(arr) || isString(arr)) ? arr[0] === e : false;\n}\nexport default startsWith;\n//# sourceMappingURL=starts-with.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction endsWith(arr, e) {\n return (isArray(arr) || isString(arr)) ? arr[arr.length - 1] === e : false;\n}\nexport default endsWith;\n//# sourceMappingURL=ends-with.js.map","/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i))\n return false;\n }\n return true;\n};\nexport default every;\n//# sourceMappingURL=every.js.map","/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i))\n return true;\n }\n return false;\n};\nexport default some;\n//# sourceMappingURL=some.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !isArray(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = isFunction(condition) ? condition : function (item) { return item[condition]; };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n }\n else {\n result[key] = [item];\n }\n }\n return result;\n}\nexport default groupBy;\n//# sourceMappingURL=group-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nimport groupBy from './group-by';\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nexport default function groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data,\n };\n }\n if (!isFunction(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = isArray(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return groupBy(data, condition);\n}\n//# sourceMappingURL=group-to-map.js.map","import groupToMap from './group-to-map';\nexport default (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = groupToMap(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n//# sourceMappingURL=group.js.map","/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\nexport default getWrapBehavior;\n//# sourceMappingURL=get-wrap-behavior.js.map","/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\nexport default wrapBehavior;\n//# sourceMappingURL=wrap-behavior.js.map","var numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\nexport default numberToColor;\n//# sourceMappingURL=number2color.js.map","import isArray from './is-array';\nfunction parseRadius(radius) {\n var r1 = 0, r2 = 0, r3 = 0, r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n}\nexport default parseRadius;\n//# sourceMappingURL=parse-radius.js.map","var clamp = function (a, min, max) {\n if (a < min) {\n return min;\n }\n else if (a > max) {\n return max;\n }\n return a;\n};\nexport default clamp;\n//# sourceMappingURL=clamp.js.map","var fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\nexport default fixedBase;\n//# sourceMappingURL=fixed-base.js.map","/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\nimport isType from './is-type';\nvar isNumber = function (value) {\n return isType(value, 'Number');\n};\nexport default isNumber;\n//# sourceMappingURL=is-number.js.map","import isNumber from './is-number';\nvar isDecimal = function (num) {\n return isNumber(num) && num % 1 !== 0;\n};\nexport default isDecimal;\n//# sourceMappingURL=is-decimal.js.map","import isNumber from './is-number';\nvar isEven = function (num) {\n return isNumber(num) && num % 2 === 0;\n};\nexport default isEven;\n//# sourceMappingURL=is-even.js.map","import isNumber from './is-number';\nvar isInteger = Number.isInteger ? Number.isInteger : function (num) {\n return isNumber(num) && num % 1 === 0;\n};\nexport default isInteger;\n//# sourceMappingURL=is-integer.js.map","import isNumber from './is-number';\nvar isNegative = function (num) {\n return isNumber(num) && num < 0;\n};\nexport default isNegative;\n//# sourceMappingURL=is-negative.js.map","var PRECISION = 0.00001; // numbers less than this is considered as 0\nexport default function isNumberEqual(a, b, precision) {\n if (precision === void 0) { precision = PRECISION; }\n return Math.abs((a - b)) < precision;\n}\n;\n//# sourceMappingURL=is-number-equal.js.map","import isNumber from './is-number';\nvar isOdd = function (num) {\n return isNumber(num) && num % 2 !== 0;\n};\nexport default isOdd;\n//# sourceMappingURL=is-odd.js.map","import isNumber from './is-number';\nvar isPositive = function (num) {\n return isNumber(num) && num > 0;\n};\nexport default isPositive;\n//# sourceMappingURL=is-positive.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n//# sourceMappingURL=max-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n//# sourceMappingURL=min-by.js.map","var mod = function (n, m) {\n return ((n % m) + m) % m;\n};\nexport default mod;\n//# sourceMappingURL=mod.js.map","var DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\nexport default toDegree;\n//# sourceMappingURL=to-degree.js.map","export default parseInt;\n//# sourceMappingURL=to-integer.js.map","var RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\nexport default toRadian;\n//# sourceMappingURL=to-radian.js.map","export default (function (obj, key) { return obj.hasOwnProperty(key); });\n//# sourceMappingURL=has.js.map","import each from './each';\nimport isFunction from './is-function';\n// @ts-ignore\nvar values = Object.values ? function (obj) { return Object.values(obj); } : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\nexport default values;\n//# sourceMappingURL=values.js.map","import contains from './contains';\nimport values from './values';\nexport default (function (obj, value) { return contains(values(obj), value); });\n//# sourceMappingURL=has-value.js.map","import isNil from './is-nil';\nexport default (function (value) {\n if (isNil(value))\n return '';\n return value.toString();\n});\n//# sourceMappingURL=to-string.js.map","import toString from './to-string';\nvar lowerCase = function (str) {\n return toString(str).toLowerCase();\n};\nexport default lowerCase;\n//# sourceMappingURL=lower-case.js.map","import toString from './to-string';\nvar lowerFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\nexport default lowerFirst;\n//# sourceMappingURL=lower-first.js.map","function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return (o[name] === undefined) ? '' : o[name];\n });\n}\nexport default substitute;\n//# sourceMappingURL=substitute.js.map","import toString from './to-string';\nvar upperCase = function (str) {\n return toString(str).toUpperCase();\n};\nexport default upperCase;\n//# sourceMappingURL=upper-case.js.map","import toString from './to-string';\nvar upperFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\nexport default upperFirst;\n//# sourceMappingURL=upper-first.js.map","var toString = {}.toString;\nvar getType = function (value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/]$/, '');\n};\nexport default getType;\n//# sourceMappingURL=get-type.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isArguments = function (value) {\n return isType(value, 'Arguments');\n};\nexport default isArguments;\n//# sourceMappingURL=is-arguments.js.map","/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isBoolean = function (value) {\n return isType(value, 'Boolean');\n};\nexport default isBoolean;\n//# sourceMappingURL=is-boolean.js.map","import isType from './is-type';\nvar isDate = function (value) {\n return isType(value, 'Date');\n};\nexport default isDate;\n//# sourceMappingURL=is-date.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isError = function (value) {\n return isType(value, 'Error');\n};\nexport default isError;\n//# sourceMappingURL=is-error.js.map","/**\n * 判断是否为有限数\n * @return {Boolean}\n */\nimport isNumber from './is-number';\nexport default function (value) {\n return isNumber(value) && isFinite(value);\n}\n//# sourceMappingURL=is-finite.js.map","var isNull = function (value) {\n return value === null;\n};\nexport default isNull;\n//# sourceMappingURL=is-null.js.map","var objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\nexport default isPrototype;\n//# sourceMappingURL=is-prototype.js.map","import isType from './is-type';\nvar isRegExp = function (str) {\n return isType(str, 'RegExp');\n};\nexport default isRegExp;\n//# sourceMappingURL=is-reg-exp.js.map","var isUndefined = function (value) {\n return value === undefined;\n};\nexport default isUndefined;\n//# sourceMappingURL=is-undefined.js.map","/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof HTMLDocument;\n};\nexport default isElement;\n//# sourceMappingURL=is-element.js.map","export default function requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame ||\n function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n;\n//# sourceMappingURL=request-animation-frame.js.map","export default function cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame ||\n clearTimeout;\n method(handler);\n}\n;\n//# sourceMappingURL=clear-animation-frame.js.map","// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nexport default function mix(dist, src1, src2, src3) {\n if (src1)\n _mix(dist, src1);\n if (src2)\n _mix(dist, src2);\n if (src3)\n _mix(dist, src3);\n return dist;\n}\n//# sourceMappingURL=mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (isFunction(obj)) {\n obj = obj.prototype;\n }\n mix(c.prototype, obj);\n }\n};\nexport default augment;\n//# sourceMappingURL=augment.js.map","import isArray from './is-array';\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (isArray(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n }\n else {\n rst[i] = obj[i];\n }\n }\n }\n else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n }\n else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\nexport default clone;\n//# sourceMappingURL=clone.js.map","function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\nexport default debounce;\n//# sourceMappingURL=debounce.js.map","import isFunction from './is-function';\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n */\nexport default (function (f, resolver) {\n if (!isFunction(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = new Map();\n return memoized;\n});\n//# sourceMappingURL=memoize.js.map","import isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar MAX_MIX_LEVEL = 5;\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n if (value !== null && isPlainObject(value)) {\n if (!isPlainObject(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n }\n else {\n dist[key] = src[key];\n }\n }\n else if (isArray(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n }\n else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\nexport default deepMix;\n//# sourceMappingURL=deep-mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!isFunction(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () { };\n }\n var create = Object.create ?\n function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } :\n function (proto, c) {\n function Tmp() { }\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = mix(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n mix(superObj, overrides);\n mix(subclass, staticOverrides);\n return subclass;\n};\nexport default extend;\n//# sourceMappingURL=extend.js.map","import isArrayLike from './is-array-like';\nvar indexOf = function (arr, obj) {\n if (!isArrayLike(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\nexport default indexOf;\n//# sourceMappingURL=index-of.js.map","import isNil from './is-nil';\nimport isArrayLike from './is-array-like';\nimport getType from './get-type';\nimport isPrototype from './is-prototype';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n var type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\nexport default isEmpty;\n//# sourceMappingURL=is-empty.js.map","import isObjectLike from './is-object-like';\nimport isArrayLike from './is-array-like';\nimport isString from './is-string';\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (isString(value) || isString(other)) {\n return false;\n }\n if (isArrayLike(value) || isArrayLike(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (isObjectLike(value) || isObjectLike(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\nexport default isEqual;\n//# sourceMappingURL=is-equal.js.map","import isFunction from './is-function';\nimport isEqual from './is-equal';\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\nexport default (function (value, other, fn) {\n if (!isFunction(fn)) {\n return isEqual(value, other);\n }\n return !!fn(value, other);\n});\n//# sourceMappingURL=is-equal-with.js.map","import isArrayLike from './is-array-like';\nvar map = function (arr, func) {\n if (!isArrayLike(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\nexport default map;\n//# sourceMappingURL=map.js.map","import isNil from './is-nil';\nimport isObject from './is-object';\nvar identity = function (v) { return v; };\nexport default (function (object, func) {\n if (func === void 0) { func = identity; }\n var r = {};\n if (isObject(object) && !isNil(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n//# sourceMappingURL=map-values.js.map","import isString from './is-string';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\nexport default (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = isString(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return (obj === undefined || p < keyArr.length) ? defaultValue : obj;\n});\n//# sourceMappingURL=get.js.map","import isObject from './is-object';\nimport isString from './is-string';\nimport isNumber from './is-number';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\nexport default (function (obj, path, value) {\n var o = obj;\n var keyArr = isString(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!isObject(o[key])) {\n o[key] = isNumber(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n }\n else {\n o[key] = value;\n }\n });\n return obj;\n});\n//# sourceMappingURL=set.js.map","import each from './each';\nimport isPlainObject from './is-plain-object';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport default (function (object, keys) {\n if (object === null || !isPlainObject(object)) {\n return {};\n }\n var result = {};\n each(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n//# sourceMappingURL=pick.js.map","import reduce from './reduce';\nexport default (function (obj, keys) {\n return reduce(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n//# sourceMappingURL=omit.js.map","export default (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options)\n options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false)\n previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n//# sourceMappingURL=throttle.js.map","import isArrayLike from './is-array-like';\nexport default (function (value) {\n return isArrayLike(value) ? Array.prototype.slice.call(value) : [];\n});\n//# sourceMappingURL=to-array.js.map","var map = {};\nexport default (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n }\n else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n//# sourceMappingURL=unique-id.js.map","export default (function () { });\n//# sourceMappingURL=noop.js.map","export default (function (v) { return v; });\n//# sourceMappingURL=identity.js.map","import isNil from './is-nil';\nimport isArraylike from './is-array-like';\nexport default function size(o) {\n if (isNil(o)) {\n return 0;\n }\n if (isArraylike(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n//# sourceMappingURL=size.js.map","import { __spreadArrays } from \"tslib\";\nimport values from './values';\nimport memoize from './memoize';\nimport isString from './is-string';\nvar ctx;\n/**\n * 计算文本的宽度\n */\nexport default memoize(function (text, font) {\n if (font === void 0) { font = {}; }\n var fontSize = font.fontSize, fontFamily = font.fontFamily, fontWeight = font.fontWeight, fontStyle = font.fontStyle, fontVariant = font.fontVariant;\n if (!ctx) {\n ctx = document.createElement('canvas').getContext('2d');\n }\n ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ');\n return ctx.measureText(isString(text) ? text : '').width;\n}, function (text, font) {\n if (font === void 0) { font = {}; }\n return __spreadArrays([text], values(font)).join('');\n});\n//# sourceMappingURL=measure-text-width.js.map","import isString from './is-string';\nimport toString from './to-string';\nimport { default as measureTextWidth } from './measure-text-width';\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth 最大宽度\n * @param font 字体\n * @param str 要替换的文本\n */\nexport default (function (text, maxWidth, font, str) {\n if (str === void 0) { str = '...'; }\n var STEP = 16; // 每次 16,调参工程师\n var PLACEHOLDER_WIDTH = measureTextWidth(str, font);\n var leftText = !isString(text) ? toString(text) : text;\n var leftWidth = maxWidth;\n var r = []; // 最终的分段字符串\n var currentText;\n var currentWidth;\n if (measureTextWidth(text, font) <= maxWidth) {\n return text;\n }\n // 首先通过 step 计算,找出最大的未超出长度的\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n break;\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n if (!leftText) {\n return r.join('');\n }\n }\n return \"\" + r.join('') + str;\n});\n//# sourceMappingURL=get-ellipsis-text.js.map","/**\n * k-v 存储\n */\nvar default_1 = /** @class */ (function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}());\nexport default default_1;\n//# sourceMappingURL=cache.js.map","import { each } from '@antv/util';\n// 自定义 Behavior 时候共有的方法\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {};\n },\n /**\n * register event handler, behavior will auto bind events\n * for example:\n * return {\n * click: 'onClick'\n * }\n */\n getEvents: function getEvents() {\n return {};\n },\n updateCfg: function updateCfg(cfg) {\n Object.assign(this, cfg);\n return true;\n },\n shouldBegin: function shouldBegin() {\n return true;\n },\n shouldUpdate: function shouldUpdate() {\n return true;\n },\n shouldEnd: function shouldEnd() {\n return true;\n },\n /**\n * auto bind events when register behavior\n * @param graph Graph instance\n */\n bind: function bind(graph) {\n var _this = this;\n var events = this.events;\n this.graph = graph;\n if (this.type === 'drag-canvas' || this.type === 'brush-select' || this.type === 'lasso-select') {\n graph.get('canvas').set('draggable', true);\n }\n each(events, function (handler, event) {\n graph.on(event, handler);\n });\n // To avoid the tabs switching makes the keydown related behaviors disable\n document.addEventListener('visibilitychange', function () {\n _this.keydown = false;\n });\n },\n unbind: function unbind(graph) {\n var events = this.events;\n var draggable = graph.get('canvas').get('draggable');\n if (this.type === 'drag-canvas' || this.type === 'brush-select' || this.type === 'lasso-select') {\n graph.get('canvas').set('draggable', false);\n }\n each(events, function (handler, event) {\n graph.off(event, handler);\n });\n graph.get('canvas').set('draggable', draggable);\n },\n get: function get(val) {\n return this[val];\n },\n set: function set(key, val) {\n this[key] = val;\n return this;\n }\n};","import { clone, each, wrapBehavior } from '@antv/util';\nimport behaviorOption from './behaviorOption';\nvar Behavior = /** @class */function () {\n function Behavior() {}\n /**\n * 自定义 Behavior\n * @param type Behavior 名称\n * @param behavior Behavior 定义的方法集合\n */\n Behavior.registerBehavior = function (type, behavior) {\n if (!behavior) {\n throw new Error(\"please specify handler for this behavior: \".concat(type));\n }\n var prototype = clone(behaviorOption);\n Object.assign(prototype, behavior);\n // eslint-disable-next-line func-names\n var base = function base(cfg) {\n var _this = this;\n Object.assign(this, this.getDefaultCfg(), cfg);\n var events = this.getEvents();\n this.events = null;\n var eventsToBind = {};\n if (events) {\n each(events, function (handle, event) {\n eventsToBind[event] = wrapBehavior(_this, handle);\n });\n this.events = eventsToBind;\n }\n };\n base.prototype = prototype;\n Behavior.types[type] = base;\n };\n Behavior.hasBehavior = function (type) {\n return !!Behavior.types[type];\n };\n Behavior.getBehavior = function (type) {\n return Behavior.types[type];\n };\n // 所有自定义的 Behavior 的实例\n Behavior.types = {};\n return Behavior;\n}();\nexport default Behavior;","var WILDCARD = '*';\n/* event-emitter */\nvar EventEmitter = /** @class */ (function () {\n function EventEmitter() {\n this._events = {};\n }\n /**\n * 监听一个事件\n * @param evt\n * @param callback\n * @param once\n */\n EventEmitter.prototype.on = function (evt, callback, once) {\n if (!this._events[evt]) {\n this._events[evt] = [];\n }\n this._events[evt].push({\n callback: callback,\n once: !!once,\n });\n return this;\n };\n /**\n * 监听一个事件一次\n * @param evt\n * @param callback\n */\n EventEmitter.prototype.once = function (evt, callback) {\n return this.on(evt, callback, true);\n };\n /**\n * 触发一个事件\n * @param evt\n * @param args\n */\n EventEmitter.prototype.emit = function (evt) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var events = this._events[evt] || [];\n var wildcardEvents = this._events[WILDCARD] || [];\n // 实际的处理 emit 方法\n var doEmit = function (es) {\n var length = es.length;\n for (var i = 0; i < length; i++) {\n if (!es[i]) {\n continue;\n }\n var _a = es[i], callback = _a.callback, once = _a.once;\n if (once) {\n es.splice(i, 1);\n if (es.length === 0) {\n delete _this._events[evt];\n }\n length--;\n i--;\n }\n callback.apply(_this, args);\n }\n };\n doEmit(events);\n doEmit(wildcardEvents);\n };\n /**\n * 取消监听一个事件,或者一个channel\n * @param evt\n * @param callback\n */\n EventEmitter.prototype.off = function (evt, callback) {\n if (!evt) {\n // evt 为空全部清除\n this._events = {};\n }\n else {\n if (!callback) {\n // evt 存在,callback 为空,清除事件所有方法\n delete this._events[evt];\n }\n else {\n // evt 存在,callback 存在,清除匹配的\n var events = this._events[evt] || [];\n var length_1 = events.length;\n for (var i = 0; i < length_1; i++) {\n if (events[i].callback === callback) {\n events.splice(i, 1);\n length_1--;\n i--;\n }\n }\n if (events.length === 0) {\n delete this._events[evt];\n }\n }\n }\n return this;\n };\n /* 当前所有的事件 */\n EventEmitter.prototype.getEvents = function () {\n return this._events;\n };\n return EventEmitter;\n}());\nexport default EventEmitter;\n//# sourceMappingURL=index.js.map","/**\n * Common utilities\n * @module glMatrix\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\n * 2x2 Matrix\n * @module mat2\n */\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\n\nexport function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\n\nexport function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n\n return out;\n}\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3]; // Calculate the determinant\n\n var det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\n/**\n * Calculates the determinant of a mat2\n *\n * @param {ReadonlyMat2} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2\n *\n * @param {ReadonlyMat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n}\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {ReadonlyMat2} L the lower triangular matrix\n * @param {ReadonlyMat2} D the diagonal matrix\n * @param {ReadonlyMat2} U the upper triangular matrix\n * @param {ReadonlyMat2} a the input matrix to factorize\n */\n\nexport function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n}\n/**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat2.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 2x3 Matrix\n * @module mat2d\n * @description\n * A mat2d contains six elements defined as:\n *
\n * [a, b,\n *  c, d,\n *  tx, ty]\n * 
\n * This is a short form for the 3x3 matrix:\n *
\n * [a, b, 0,\n *  c, d, 0,\n *  tx, ty, 1]\n * 
\n * The last column is ignored so the array is shorter and operations are faster.\n */\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Create a new mat2d with the given values\n *\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} A new mat2d\n */\n\nexport function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Set the components of a mat2d to the given values\n *\n * @param {mat2d} out the receiving matrix\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} out\n */\n\nexport function set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nexport function invert(out, a) {\n var aa = a[0],\n ab = a[1],\n ac = a[2],\n ad = a[3];\n var atx = a[4],\n aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n}\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\n\nexport function translate(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.rotate(dest, dest, rad);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.scale(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2d} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.translate(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat2d} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2d\n *\n * @param {ReadonlyMat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\n * Adds two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2d} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n}\n/**\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2d} out the receiving vector\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2d} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat2d.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 3x3 Matrix\n * @module mat3\n */\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {ReadonlyMat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\n\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\n\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\n * Calculates the determinant of a mat3\n *\n * @param {ReadonlyMat3} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to translate\n * @param {ReadonlyVec2} v vector to translate by\n * @returns {mat3} out\n */\n\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat3} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat3} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to copy\n * @returns {mat3} out\n **/\n\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\n\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\n\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat3\n *\n * @param {ReadonlyMat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat3.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\n * @module mat4\n */\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\n * Calculates the determinant of a mat4\n *\n * @param {ReadonlyMat4} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {mat4} out\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Scaling vector\n * @returns {mat4} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nexport function perspectiveNO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\n * Alias for {@link mat4.perspectiveNO}\n * @function\n */\n\nexport var perspective = perspectiveNO;\n/**\n * Generates a perspective projection matrix suitable for WebGPU with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nexport function perspectiveZO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = far * nf;\n out[14] = far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -near;\n }\n\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function orthoNO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Alias for {@link mat4.orthoNO}\n * @function\n */\n\nexport var ortho = orthoNO;\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function orthoZO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = near * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat4\n *\n * @param {ReadonlyMat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat4.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 3 Dimensional Vector\n * @module vec3\n */\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {ReadonlyVec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Calculates the length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the source vector\n * @returns {vec3} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to ceil\n * @returns {vec3} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to floor\n * @returns {vec3} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to round\n * @returns {vec3} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Calculates the squared length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to negate\n * @returns {vec3} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to invert\n * @returns {vec3} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to normalize\n * @returns {vec3} out\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec3} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec3} out\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Get the angle between two 3D vectors\n * @param {ReadonlyVec3} a The first operand\n * @param {ReadonlyVec3} b The second operand\n * @returns {Number} The angle in radians\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec3.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\n * 4 Dimensional Vector\n * @module vec4\n */\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {ReadonlyVec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the source vector\n * @returns {vec4} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to ceil\n * @returns {vec4} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to floor\n * @returns {vec4} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\n * Math.round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to round\n * @returns {vec4} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Calculates the length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to negate\n * @returns {vec4} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to invert\n * @returns {vec4} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to normalize\n * @returns {vec4} out\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {ReadonlyVec4} result the receiving vector\n * @param {ReadonlyVec4} U the first vector\n * @param {ReadonlyVec4} V the second vector\n * @param {ReadonlyVec4} W the third vector\n * @returns {vec4} result\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec4} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec4} out\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec4.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n/**\n * Quaternion\n * @module quat\n */\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyVec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\n\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {ReadonlyQuat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\n\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\n * Gets the angular distance between two unit quaternions\n *\n * @param {ReadonlyQuat} a Origin unit quaternion\n * @param {ReadonlyQuat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\n\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n */\n\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate W component of\n * @returns {quat} out\n */\n\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\n\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate inverse of\n * @returns {quat} out\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate conjugate of\n * @returns {quat} out\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyMat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\n\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\n * Creates a quaternion from the given euler angle x, y, z.\n *\n * @param {quat} out the receiving quaternion\n * @param {x} Angle to rotate around X axis in degrees.\n * @param {y} Angle to rotate around Y axis in degrees.\n * @param {z} Angle to rotate around Z axis in degrees.\n * @returns {quat} out\n * @function\n */\n\nexport function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\n * Returns a string representation of a quatenion\n *\n * @param {ReadonlyQuat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\n\nexport var clone = vec4.clone;\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\n\nexport var fromValues = vec4.fromValues;\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the source quaternion\n * @returns {quat} out\n * @function\n */\n\nexport var copy = vec4.copy;\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\n\nexport var set = vec4.set;\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n * @function\n */\n\nexport var add = vec4.add;\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {ReadonlyQuat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\n\nexport var scale = vec4.scale;\n/**\n * Calculates the dot product of two quat's\n *\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nexport var dot = vec4.dot;\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\n\nexport var lerp = vec4.lerp;\n/**\n * Calculates the length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport var length = vec4.length;\n/**\n * Alias for {@link quat.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Calculates the squared length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nexport var squaredLength = vec4.squaredLength;\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\n\nexport var normalize = vec4.normalize;\n/**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat} a The first quaternion.\n * @param {ReadonlyQuat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport var exactEquals = vec4.exactEquals;\n/**\n * Returns whether or not the quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat} a The first vector.\n * @param {ReadonlyQuat} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport var equals = vec4.equals;\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {ReadonlyVec3} a the initial vector\n * @param {ReadonlyVec3} b the destination vector\n * @returns {quat} out\n */\n\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {ReadonlyQuat} c the third operand\n * @param {ReadonlyQuat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {ReadonlyVec3} view the vector representing the viewing direction\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\n\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as quat from \"./quat.js\";\nimport * as mat4 from \"./mat4.js\";\n/**\n * Dual Quaternion
\n * Format: [real, dual]
\n * Quaternion format: XYZW
\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
\n * @module quat2\n */\n\n/**\n * Creates a new identity dual quat\n *\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\n */\n\nexport function create() {\n var dq = new glMatrix.ARRAY_TYPE(8);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n\n dq[3] = 1;\n return dq;\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat2} a dual quaternion to clone\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function clone(a) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n}\n/**\n * Creates a new dual quat initialized with the given values\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n}\n/**\n * Creates a new dual quat from the given values (quat and translation)\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component (translation)\n * @param {Number} y2 Y component (translation)\n * @param {Number} z2 Z component (translation)\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5,\n ay = y2 * 0.5,\n az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n}\n/**\n * Creates a dual quat from a quaternion and a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q a normalized quaternion\n * @param {ReadonlyVec3} t tranlation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5,\n ay = t[1] * 0.5,\n az = t[2] * 0.5,\n bx = q[0],\n by = q[1],\n bz = q[2],\n bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Creates a dual quat from a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyVec3} t translation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a dual quat from a quaternion\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q the quaternion\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a new dual quat from a matrix (4x4)\n *\n * @param {quat2} out the dual quaternion\n * @param {ReadonlyMat4} a the matrix\n * @returns {quat2} dual quat receiving operation result\n * @function\n */\n\nexport function fromMat4(out, a) {\n //TODO Optimize this\n var outer = quat.create();\n mat4.getRotation(outer, a);\n var t = new glMatrix.ARRAY_TYPE(3);\n mat4.getTranslation(t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n}\n/**\n * Copy the values from one dual quat to another\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the source dual quaternion\n * @returns {quat2} out\n * @function\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Set a dual quat to the identity dual quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @returns {quat2} out\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Set the components of a dual quat to the given values\n *\n * @param {quat2} out the receiving quaternion\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} out\n * @function\n */\n\nexport function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n}\n/**\n * Gets the real part of a dual quat\n * @param {quat} out real part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} real part\n */\n\nexport var getReal = quat.copy;\n/**\n * Gets the dual part of a dual quat\n * @param {quat} out dual part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} dual part\n */\n\nexport function getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n}\n/**\n * Set the real component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the real part\n * @returns {quat2} out\n * @function\n */\n\nexport var setReal = quat.copy;\n/**\n * Set the dual component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the dual part\n * @returns {quat2} out\n * @function\n */\n\nexport function setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n}\n/**\n * Gets the translation of a normalized dual quat\n * @param {vec3} out translation\n * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed\n * @return {vec3} translation\n */\n\nexport function getTranslation(out, a) {\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n}\n/**\n * Translates a dual quat by the given vector\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {quat2} out\n */\n\nexport function translate(out, a, v) {\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3],\n bx1 = v[0] * 0.5,\n by1 = v[1] * 0.5,\n bz1 = v[2] * 0.5,\n ax2 = a[4],\n ay2 = a[5],\n az2 = a[6],\n aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n}\n/**\n * Rotates a dual quat around the X axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateX(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Y axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateY(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Z axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateZ(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (a * q)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @returns {quat2} out\n */\n\nexport function rotateByQuatAppend(out, a, q) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (q * a)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @returns {quat2} out\n */\n\nexport function rotateByQuatPrepend(out, q, a) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n bx = a[0],\n by = a[1],\n bz = a[2],\n bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n}\n/**\n * Rotates a dual quat around a given axis. Does the normalisation automatically\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @param {Number} rad how far the rotation should be\n * @returns {quat2} out\n */\n\nexport function rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < glMatrix.EPSILON) {\n return copy(out, a);\n }\n\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Adds two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n * @function\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n}\n/**\n * Multiplies two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n */\n\nexport function multiply(out, a, b) {\n var ax0 = a[0],\n ay0 = a[1],\n az0 = a[2],\n aw0 = a[3],\n bx1 = b[4],\n by1 = b[5],\n bz1 = b[6],\n bw1 = b[7],\n ax1 = a[4],\n ay1 = a[5],\n az1 = a[6],\n aw1 = a[7],\n bx0 = b[0],\n by0 = b[1],\n bz0 = b[2],\n bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n}\n/**\n * Alias for {@link quat2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Scales a dual quat by a scalar number\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the dual quat to scale\n * @param {Number} b amount to scale the dual quat by\n * @returns {quat2} out\n * @function\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n}\n/**\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\n *\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nexport var dot = quat.dot;\n/**\n * Performs a linear interpolation between two dual quats's\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat2} out\n */\n\nexport function lerp(out, a, b, t) {\n var mt = 1 - t;\n if (dot(a, b) < 0) t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n}\n/**\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quat to calculate inverse of\n * @returns {quat2} out\n */\n\nexport function invert(out, a) {\n var sqlen = squaredLength(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n}\n/**\n * Calculates the conjugate of a dual quat\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat2} a quat to calculate conjugate of\n * @returns {quat2} out\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Calculates the length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate length of\n * @returns {Number} length of a\n * @function\n */\n\nexport var length = quat.length;\n/**\n * Alias for {@link quat2.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Calculates the squared length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nexport var squaredLength = quat.squaredLength;\n/**\n * Alias for {@link quat2.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Normalize a dual quat\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quaternion to normalize\n * @returns {quat2} out\n * @function\n */\n\nexport function normalize(out, a) {\n var magnitude = squaredLength(a);\n\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n\n return out;\n}\n/**\n * Returns a string representation of a dual quatenion\n *\n * @param {ReadonlyQuat2} a dual quaternion to represent as a string\n * @returns {String} string representation of the dual quat\n */\n\nexport function str(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n}\n/**\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat2} a the first dual quaternion.\n * @param {ReadonlyQuat2} b the second dual quaternion.\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n}\n/**\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat2} a the first dual quat.\n * @param {ReadonlyQuat2} b the second dual quat.\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n}","import * as glMatrix from \"./common.js\";\n/**\n * 2 Dimensional Vector\n * @module vec2\n */\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {ReadonlyVec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the source vector\n * @returns {vec2} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to ceil\n * @returns {vec2} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to floor\n * @returns {vec2} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\n * Math.round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to round\n * @returns {vec2} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\n * Calculates the length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to negate\n * @returns {vec2} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to invert\n * @returns {vec2} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to normalize\n * @returns {vec2} out\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec3} out\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2d} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat3} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {ReadonlyVec2} a The vec2 point to rotate\n * @param {ReadonlyVec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\n * Get the angle between two 2D vectors\n * @param {ReadonlyVec2} a The first operand\n * @param {ReadonlyVec2} b The second operand\n * @returns {Number} The angle in radians\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\n * Alias for {@link vec2.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","/**\n * @description 扩展方法,提供 gl-matrix 为提供的方法\n * */\nimport { mat3, vec2 } from 'gl-matrix';\nexport function leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromTranslation(transMat, v);\n return mat3.multiply(out, transMat, a);\n}\nexport function leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromRotation(rotateMat, rad);\n return mat3.multiply(out, rotateMat, a);\n}\nexport function leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromScaling(scaleMat, v);\n return mat3.multiply(out, scaleMat, a);\n}\nfunction leftMultiply(out, a, a1) {\n return mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nexport function transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\n/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nexport function direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nexport function angleTo(v1, v2, direct) {\n var ang = vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\n/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nexport function vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\n//# sourceMappingURL=ext.js.map","var adjMatrix = function adjMatrix(graphData, directed) {\n var nodes = graphData.nodes,\n edges = graphData.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error(\"invalid nodes data!\");\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (!sIndex && sIndex !== 0 || !tIndex && tIndex !== 0) return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\nexport default adjMatrix;","var defaultComparator = function defaultComparator(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n};\n/**\n * 链表中单个元素节点\n */\nvar LinkedListNode = /** @class */function () {\n function LinkedListNode(value, next) {\n if (next === void 0) {\n next = null;\n }\n this.value = value;\n this.next = next;\n }\n LinkedListNode.prototype.toString = function (callback) {\n return callback ? callback(this.value) : \"\".concat(this.value);\n };\n return LinkedListNode;\n}();\nexport { LinkedListNode };\nvar LinkedList = /** @class */function () {\n function LinkedList(comparator) {\n if (comparator === void 0) {\n comparator = defaultComparator;\n }\n this.head = null;\n this.tail = null;\n this.compare = comparator;\n }\n /**\n * 将指定元素添加到链表头部\n * @param value\n */\n LinkedList.prototype.prepend = function (value) {\n // 在头部添加一个节点\n var newNode = new LinkedListNode(value, this.head);\n this.head = newNode;\n if (!this.tail) {\n this.tail = newNode;\n }\n return this;\n };\n /**\n * 将指定元素添加到链表中\n * @param value\n */\n LinkedList.prototype.append = function (value) {\n var newNode = new LinkedListNode(value);\n // 如果不存在头节点,则将创建的新节点作为头节点\n if (!this.head) {\n this.head = newNode;\n this.tail = newNode;\n return this;\n }\n // 将新节点附加到链表末尾\n this.tail.next = newNode;\n this.tail = newNode;\n return this;\n };\n /**\n * 删除指定元素\n * @param value 要删除的元素\n */\n LinkedList.prototype.delete = function (value) {\n if (!this.head) {\n return null;\n }\n var deleteNode = null;\n // 如果删除的是头部元素,则将next作为头元素\n while (this.head && this.compare(this.head.value, value)) {\n deleteNode = this.head;\n this.head = this.head.next;\n }\n var currentNode = this.head;\n if (currentNode !== null) {\n // 如果删除了节点以后,将next节点前移\n while (currentNode.next) {\n if (this.compare(currentNode.next.value, value)) {\n deleteNode = currentNode.next;\n currentNode.next = currentNode.next.next;\n } else {\n currentNode = currentNode.next;\n }\n }\n }\n // 检查尾部节点是否被删除\n if (this.compare(this.tail.value, value)) {\n this.tail = currentNode;\n }\n return deleteNode;\n };\n /**\n * 查找指定的元素\n * @param param0\n */\n LinkedList.prototype.find = function (_a) {\n var _b = _a.value,\n value = _b === void 0 ? undefined : _b,\n _c = _a.callback,\n callback = _c === void 0 ? undefined : _c;\n if (!this.head) {\n return null;\n }\n var currentNode = this.head;\n while (currentNode) {\n // 如果指定了 callback,则按指定的 callback 查找\n if (callback && callback(currentNode.value)) {\n return currentNode;\n }\n // 如果指定了 value,则按 value 查找\n if (value !== undefined && this.compare(currentNode.value, value)) {\n return currentNode;\n }\n currentNode = currentNode.next;\n }\n return null;\n };\n /**\n * 删除尾部节点\n */\n LinkedList.prototype.deleteTail = function () {\n var deletedTail = this.tail;\n if (this.head === this.tail) {\n // 链表中只有一个元素\n this.head = null;\n this.tail = null;\n return deletedTail;\n }\n var currentNode = this.head;\n while (currentNode.next) {\n if (!currentNode.next.next) {\n currentNode.next = null;\n } else {\n currentNode = currentNode.next;\n }\n }\n this.tail = currentNode;\n return deletedTail;\n };\n /**\n * 删除头部节点\n */\n LinkedList.prototype.deleteHead = function () {\n if (!this.head) {\n return null;\n }\n var deletedHead = this.head;\n if (this.head.next) {\n this.head = this.head.next;\n } else {\n this.head = null;\n this.tail = null;\n }\n return deletedHead;\n };\n /**\n * 将一组元素转成链表中的节点\n * @param values 链表中的元素\n */\n LinkedList.prototype.fromArray = function (values) {\n var _this = this;\n values.forEach(function (value) {\n return _this.append(value);\n });\n return this;\n };\n /**\n * 将链表中的节点转成数组元素\n */\n LinkedList.prototype.toArray = function () {\n var nodes = [];\n var currentNode = this.head;\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n };\n /**\n * 反转链表中的元素节点\n */\n LinkedList.prototype.reverse = function () {\n var currentNode = this.head;\n var prevNode = null;\n var nextNode = null;\n while (currentNode) {\n // 存储下一个元素节点\n nextNode = currentNode.next;\n // 更改当前节点的下一个节点,以便将它连接到上一个节点上\n currentNode.next = prevNode;\n // 将 prevNode 和 currentNode 向前移动一步\n prevNode = currentNode;\n currentNode = nextNode;\n }\n this.tail = this.head;\n this.head = prevNode;\n };\n LinkedList.prototype.toString = function (callback) {\n if (callback === void 0) {\n callback = undefined;\n }\n return this.toArray().map(function (node) {\n return node.toString(callback);\n }).toString();\n };\n return LinkedList;\n}();\nexport default LinkedList;","import LinkedList from './linked-list';\nvar Queue = /** @class */function () {\n function Queue() {\n this.linkedList = new LinkedList();\n }\n /**\n * 队列是否为空\n */\n Queue.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 读取队列头部的元素, 不删除队列中的元素\n */\n Queue.prototype.peek = function () {\n if (!this.linkedList.head) {\n return null;\n }\n return this.linkedList.head.value;\n };\n /**\n * 在队列的尾部新增一个元素\n * @param value\n */\n Queue.prototype.enqueue = function (value) {\n this.linkedList.append(value);\n };\n /**\n * 删除队列中的头部元素,如果队列为空,则返回 null\n */\n Queue.prototype.dequeue = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Queue.prototype.toString = function (callback) {\n return this.linkedList.toString(callback);\n };\n return Queue;\n}();\nexport default Queue;","/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nexport var getNeighbors = function getNeighbors(nodeId, edges, type) {\n if (edges === void 0) {\n edges = [];\n }\n var currentEdges = edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighhborsConverter_1 = function neighhborsConverter_1(edge) {\n return edge.source === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_1).map(function (edge) {\n return edge.target;\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighhborsConverter_2 = function neighhborsConverter_2(edge) {\n return edge.target === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_2).map(function (edge) {\n return edge.source;\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighhborsConverter = function neighhborsConverter(edge) {\n return edge.source === nodeId ? edge.target : edge.source;\n };\n return currentEdges.map(neighhborsConverter);\n};\n/**\n * 获取指定节点的出边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexport var getOutEdgesNodeId = function getOutEdgesNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId;\n });\n};\n/**\n * 获取指定节点的边,包括出边和入边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexport var getEdgesByNodeId = function getEdgesByNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n};\n/**\n * 生成唯一的 ID,规则是序号 + 时间戳\n * @param index 序号\n */\nexport var uniqueId = function uniqueId(index) {\n if (index === void 0) {\n index = 0;\n }\n var random1 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n var random2 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n return \"\".concat(index, \"-\").concat(random1).concat(random2);\n};","import Queue from './structs/queue';\nimport { getNeighbors } from './util';\n/**\n *\n * @param callbacks\n * allowTraversal: 确定 BFS 是否从顶点沿着边遍历到其邻居,默认情况下,同一个节点只能遍历一次\n * enterNode: 当 BFS 访问某个节点时调用\n * leaveNode: 当 BFS 访问访问结束某个节点时调用\n */\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n var id = next;\n if (!seen[id]) {\n seen[id] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * 广度优先遍历图\n * @param graph Graph 图实例\n * @param startNode 开始遍历的节点\n * @param originalCallbacks 回调\n */\nvar breadthFirstSearch = function breadthFirstSearch(graphData, startNodeId, originalCallbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n var callbacks = initCallbacks(originalCallbacks);\n var nodeQueue = new Queue();\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n // 初始化队列元素\n nodeQueue.enqueue(startNodeId);\n var previousNode = '';\n var _loop_1 = function _loop_1() {\n var currentNode = nodeQueue.dequeue();\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n // 将所有邻居添加到队列中以便遍历\n getNeighbors(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n nodeQueue.enqueue(nextNode);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n // 下一次循环之前存储当前顶点\n previousNode = currentNode;\n };\n // 遍历队列中的所有顶点\n while (!nodeQueue.isEmpty()) {\n _loop_1();\n }\n};\nexport default breadthFirstSearch;","import { getNeighbors } from \"./util\";\n/**\n * Generate all connected components for an undirected graph\n * @param graph\n */\nexport var detectConnectedComponents = function detectConnectedComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allComponents = [];\n var visited = {};\n var nodeStack = [];\n var getComponent = function getComponent(node) {\n nodeStack.push(node);\n visited[node.id] = true;\n var neighbors = getNeighbors(node.id, edges);\n var _loop_1 = function _loop_1(i) {\n var neighbor = neighbors[i];\n if (!visited[neighbor]) {\n var targetNode = nodes.filter(function (node) {\n return node.id === neighbor;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n }\n };\n for (var i = 0; i < neighbors.length; ++i) {\n _loop_1(i);\n }\n };\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (!visited[node.id]) {\n // 对于无向图进行dfs遍历,每一次调用后都得到一个连通分量\n getComponent(node);\n var component = [];\n while (nodeStack.length > 0) {\n component.push(nodeStack.pop());\n }\n allComponents.push(component);\n }\n }\n return allComponents;\n};\n/**\n * Tarjan's Algorithm 复杂度 O(|V|+|E|)\n * For directed graph only\n * a directed graph is said to be strongly connected if \"every vertex is reachable from every other vertex\".\n * refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @param graph\n * @return a list of strongly connected components\n */\nexport var detectStrongConnectComponents = function detectStrongConnectComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeStack = [];\n var inStack = {}; // 辅助判断是否已经在stack中,减少查找开销\n var indices = {};\n var lowLink = {};\n var allComponents = [];\n var index = 0;\n var getComponent = function getComponent(node) {\n // Set the depth index for v to the smallest unused index\n indices[node.id] = index;\n lowLink[node.id] = index;\n index += 1;\n nodeStack.push(node);\n inStack[node.id] = true;\n // 考虑每个邻接点\n var neighbors = getNeighbors(node.id, edges, 'target').filter(function (n) {\n return nodes.map(function (node) {\n return node.id;\n }).indexOf(n) > -1;\n });\n var _loop_2 = function _loop_2(i) {\n var targetNodeID = neighbors[i];\n if (!indices[targetNodeID] && indices[targetNodeID] !== 0) {\n var targetNode = nodes.filter(function (node) {\n return node.id === targetNodeID;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n // tree edge\n lowLink[node.id] = Math.min(lowLink[node.id], lowLink[targetNodeID]);\n } else if (inStack[targetNodeID]) {\n // back edge, target node is in the current SCC\n lowLink[node.id] = Math.min(lowLink[node.id], indices[targetNodeID]);\n }\n };\n for (var i = 0; i < neighbors.length; i++) {\n _loop_2(i);\n }\n // If node is a root node, generate an SCC\n if (lowLink[node.id] === indices[node.id]) {\n var component = [];\n while (nodeStack.length > 0) {\n var tmpNode = nodeStack.pop();\n inStack[tmpNode.id] = false;\n component.push(tmpNode);\n if (tmpNode === node) break;\n }\n if (component.length > 0) {\n allComponents.push(component);\n }\n }\n };\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (!indices[node.id] && indices[node.id] !== 0) {\n getComponent(node);\n }\n }\n return allComponents;\n};\nexport default function getConnectedComponents(graphData, directed) {\n if (directed) return detectStrongConnectComponents(graphData);\n return detectConnectedComponents(graphData);\n}","var degree = function degree(graphData) {\n var degrees = {};\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n nodes.forEach(function (node) {\n degrees[node.id] = {\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n });\n edges.forEach(function (edge) {\n degrees[edge.source].degree++;\n degrees[edge.source].outDegree++;\n degrees[edge.target].degree++;\n degrees[edge.target].inDegree++;\n });\n return degrees;\n};\nexport default degree;\n/**\n * 获取指定节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexport var getInDegree = function getInDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].inDegree;\n }\n return 0;\n};\n/**\n * 获取指定节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexport var getOutDegree = function getOutDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].outDegree;\n }\n return 0;\n};","import { getNeighbors } from './util';\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n if (!seen[next]) {\n seen[next] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * @param {Graph} graph\n * @param {GraphNode} currentNode\n * @param {GraphNode} previousNode\n * @param {Callbacks} callbacks\n */\nfunction depthFirstSearchRecursive(graphData, currentNode, previousNode, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n getNeighbors(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n depthFirstSearchRecursive(graphData, nextNode, currentNode, callbacks, directed);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n}\n/**\n * 深度优先遍历图\n * @param data GraphData 图数据\n * @param startNodeId 开始遍历的节点的 ID\n * @param originalCallbacks 回调\n */\nexport default function depthFirstSearch(graphData, startNodeId, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n depthFirstSearchRecursive(graphData, startNodeId, '', initCallbacks(callbacks), directed);\n}","import dfs from './dfs';\nimport getConnectedComponents, { detectStrongConnectComponents } from './connected-component';\nimport { getNeighbors } from './util';\nvar detectDirectedCycle = function detectDirectedCycle(graphData) {\n var cycle = null;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n var dfsParentMap = {};\n // 所有没有被访问的节点集合\n var unvisitedSet = {};\n // 正在被访问的节点集合\n var visitingSet = {};\n // 所有已经被访问过的节点集合\n var visitedSet = {};\n // 初始化 unvisitedSet\n nodes.forEach(function (node) {\n unvisitedSet[node.id] = node;\n });\n var callbacks = {\n enter: function enter(_a) {\n var currentNode = _a.current,\n previousNode = _a.previous;\n if (visitingSet[currentNode]) {\n // 如果当前节点正在访问中,则说明检测到环路了\n cycle = {};\n var currentCycleNode = currentNode;\n var previousCycleNode = previousNode;\n while (previousCycleNode !== currentNode) {\n cycle[currentCycleNode] = previousCycleNode;\n currentCycleNode = previousCycleNode;\n previousCycleNode = dfsParentMap[previousCycleNode];\n }\n cycle[currentCycleNode] = previousCycleNode;\n } else {\n // 如果不存在正在访问集合中,则将其放入正在访问集合,并从未访问集合中删除\n visitingSet[currentNode] = currentNode;\n delete unvisitedSet[currentNode];\n // 更新 DSF parents 列表\n dfsParentMap[currentNode] = previousNode;\n }\n },\n leave: function leave(_a) {\n var currentNode = _a.current;\n // 如果所有的节点的子节点都已经访问过了,则从正在访问集合中删除掉,并将其移入到已访问集合中,\n // 同时也意味着当前节点的所有邻居节点都被访问过了\n visitedSet[currentNode] = currentNode;\n delete visitingSet[currentNode];\n },\n allowTraversal: function allowTraversal(_a) {\n var nextNode = _a.next;\n // 如果检测到环路则需要终止所有进一步的遍历,否则会导致无限循环遍历\n if (cycle) {\n return false;\n }\n // 仅允许遍历没有访问的节点,visitedSet 中的都已经访问过了\n return !visitedSet[nextNode];\n }\n };\n // 开始遍历节点\n while (Object.keys(unvisitedSet).length) {\n // 从第一个节点开始进行 DFS 遍历\n var firsetUnVisitedKey = Object.keys(unvisitedSet)[0];\n dfs(graphData, firsetUnVisitedKey, callbacks);\n }\n return cycle;\n};\n/**\n * 检测无向图中的所有Base cycles\n * refer: https://www.codeproject.com/Articles/1158232/Enumerating-All-Cycles-in-an-Undirected-Graph\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回一组base cycles\n */\nexport var detectAllUndirectedCycle = function detectAllUndirectedCycle(graphData, nodeIds, include) {\n var _a, _b;\n if (include === void 0) {\n include = true;\n }\n var allCycles = [];\n var components = getConnectedComponents(graphData, false);\n // loop through all connected components\n for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {\n var component = components_1[_i];\n if (!component.length) continue;\n var root = component[0];\n var rootId = root.id;\n var stack = [root];\n var parent_1 = (_a = {}, _a[rootId] = root, _a);\n var used = (_b = {}, _b[rootId] = new Set(), _b);\n // walk a spanning tree to find cycles\n while (stack.length > 0) {\n var curNode = stack.pop();\n var curNodeId = curNode.id;\n var neighbors = getNeighbors(curNodeId, graphData.edges);\n var _loop_1 = function _loop_1(i) {\n var _c;\n var neighborId = neighbors[i];\n var neighbor = graphData.nodes.find(function (node) {\n return node.id === neighborId;\n });\n // const neighborId = neighbor.get('id');\n if (neighborId === curNodeId) {\n // 自环\n allCycles.push((_c = {}, _c[neighborId] = curNode, _c));\n } else if (!(neighborId in used)) {\n // visit a new node\n parent_1[neighborId] = curNode;\n stack.push(neighbor);\n used[neighborId] = new Set([curNode]);\n } else if (!used[curNodeId].has(neighbor)) {\n // a cycle found\n var cycleValid = true;\n var cyclePath = [neighbor, curNode];\n var p = parent_1[curNodeId];\n while (used[neighborId].size && !used[neighborId].has(p)) {\n cyclePath.push(p);\n if (p === parent_1[p.id]) break;else p = parent_1[p.id];\n }\n cyclePath.push(p);\n if (nodeIds && include) {\n // 如果有指定包含的节点\n cycleValid = false;\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = true;\n }\n } else if (nodeIds && !include) {\n // 如果有指定不包含的节点\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = false;\n }\n }\n // 把 node list 形式转换为 cycle 的格式\n if (cycleValid) {\n var cycle = {};\n for (var index = 1; index < cyclePath.length; index += 1) {\n cycle[cyclePath[index - 1].id] = cyclePath[index];\n }\n if (cyclePath.length) {\n cycle[cyclePath[cyclePath.length - 1].id] = cyclePath[0];\n }\n allCycles.push(cycle);\n }\n used[neighborId].add(curNode);\n }\n };\n for (var i = 0; i < neighbors.length; i += 1) {\n _loop_1(i);\n }\n }\n }\n return allCycles;\n};\n/**\n * Johnson's algorithm, 时间复杂度 O((V + E)(C + 1))$ and space bounded by O(V + E)\n * refer: https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF\n * refer: https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/cycles.html#simple_cycles\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回所有的 simple cycles\n */\nexport var detectAllDirectedCycle = function detectAllDirectedCycle(graphData, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n var path = []; // stack of nodes in current path\n var blocked = new Set();\n var B = []; // remember portions of the graph that yield no elementary circuit\n var allCycles = [];\n var idx2Node = {};\n var node2Idx = {};\n // 辅助函数: unblock all blocked nodes\n var unblock = function unblock(thisNode) {\n var stack = [thisNode];\n while (stack.length > 0) {\n var node = stack.pop();\n if (blocked.has(node)) {\n blocked.delete(node);\n B[node.id].forEach(function (n) {\n stack.push(n);\n });\n B[node.id].clear();\n }\n }\n };\n var circuit = function circuit(node, start, adjList) {\n var closed = false; // whether a path is closed\n if (nodeIds && include === false && nodeIds.indexOf(node.id) > -1) return closed;\n path.push(node);\n blocked.add(node);\n var neighbors = adjList[node.id];\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (neighbor === start) {\n var cycle = {};\n for (var index = 1; index < path.length; index += 1) {\n cycle[path[index - 1].id] = path[index];\n }\n if (path.length) {\n cycle[path[path.length - 1].id] = path[0];\n }\n allCycles.push(cycle);\n closed = true;\n } else if (!blocked.has(neighbor)) {\n if (circuit(neighbor, start, adjList)) {\n closed = true;\n }\n }\n }\n if (closed) {\n unblock(node);\n } else {\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (!B[neighbor.id].has(node)) {\n B[neighbor.id].add(node);\n }\n }\n }\n path.pop();\n return closed;\n };\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n // Johnson's algorithm 要求给节点赋顺序,先按节点在数组中的顺序\n for (var i = 0; i < nodes.length; i += 1) {\n var node = nodes[i];\n var nodeId = node.id;\n node2Idx[nodeId] = i;\n idx2Node[i] = node;\n }\n // 如果有指定包含的节点,则把指定节点排序在前,以便提早结束搜索\n if (nodeIds && include) {\n var _loop_2 = function _loop_2(i) {\n var nodeId = nodeIds[i];\n node2Idx[nodes[i].id] = node2Idx[nodeId];\n node2Idx[nodeId] = 0;\n idx2Node[0] = nodes.find(function (node) {\n return node.id === nodeId;\n });\n idx2Node[node2Idx[nodes[i].id]] = nodes[i];\n };\n for (var i = 0; i < nodeIds.length; i++) {\n _loop_2(i);\n }\n }\n // 返回 节点顺序 >= nodeOrder 的强连通分量的adjList\n var getMinComponentAdj = function getMinComponentAdj(components) {\n var _a;\n var minCompIdx;\n var minIdx = Infinity;\n // Find least component and the lowest node\n for (var i = 0; i < components.length; i += 1) {\n var comp = components[i];\n for (var j = 0; j < comp.length; j++) {\n var nodeIdx_1 = node2Idx[comp[j].id];\n if (nodeIdx_1 < minIdx) {\n minIdx = nodeIdx_1;\n minCompIdx = i;\n }\n }\n }\n var component = components[minCompIdx];\n var adjList = [];\n for (var i = 0; i < component.length; i += 1) {\n var node = component[i];\n adjList[node.id] = [];\n for (var _i = 0, _b = getNeighbors(node.id, graphData.edges, 'target').filter(function (n) {\n return component.map(function (c) {\n return c.id;\n }).indexOf(n) > -1;\n }); _i < _b.length; _i++) {\n var neighbor = _b[_i];\n // 对自环情况 (点连向自身) 特殊处理:记录自环,但不加入adjList\n if (neighbor === node.id && !(include === false && nodeIds.indexOf(node.id) > -1)) {\n allCycles.push((_a = {}, _a[node.id] = node, _a));\n } else {\n adjList[node.id].push(node2Idx[neighbor]);\n }\n }\n }\n return {\n component: component,\n adjList: adjList,\n minIdx: minIdx\n };\n };\n var nodeIdx = 0;\n while (nodeIdx < nodes.length) {\n var subgraphNodes = nodes.filter(function (n) {\n return node2Idx[n.id] >= nodeIdx;\n });\n var sccs = detectStrongConnectComponents({\n nodes: subgraphNodes,\n edges: graphData.edges\n }).filter(function (component) {\n return component.length > 1;\n });\n if (sccs.length === 0) break;\n var scc = getMinComponentAdj(sccs);\n var minIdx = scc.minIdx,\n adjList = scc.adjList,\n component = scc.component;\n if (component.length > 1) {\n component.forEach(function (node) {\n B[node.id] = new Set();\n });\n var startNode = idx2Node[minIdx];\n // startNode 不在指定要包含的节点中,提前结束搜索\n if (nodeIds && include && nodeIds.indexOf(startNode.id) === -1) return allCycles;\n circuit(startNode, startNode, adjList);\n nodeIdx = minIdx + 1;\n } else {\n break;\n }\n }\n return allCycles;\n};\n/**\n * 查找图中所有满足要求的圈\n * @param graph\n * @param directed 是否为有向图\n * @param nodeIds 节点 ID 的数组,若不指定,则返回图中所有的圈\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: Node}] 包含所有环的数组,每个环用一个Object表示,其中key为节点id,value为该节点在环中指向的下一个节点\n */\nexport var detectAllCycles = function detectAllCycles(graphData, directed, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n if (directed) return detectAllDirectedCycle(graphData, nodeIds, include);\n return detectAllUndirectedCycle(graphData, nodeIds, include);\n};\nexport default detectDirectedCycle;","import { __spreadArray } from \"tslib\";\nimport { isArray } from '@antv/util';\nimport { getOutEdgesNodeId, getEdgesByNodeId } from './util';\nvar minVertex = function minVertex(D, nodes, marks) {\n // 找出最小的点\n var minDis = Infinity;\n var minNode;\n for (var i = 0; i < nodes.length; i++) {\n var nodeId = nodes[i].id;\n if (!marks[nodeId] && D[nodeId] <= minDis) {\n minDis = D[nodeId];\n minNode = nodes[i];\n }\n }\n return minNode;\n};\nvar dijkstra = function dijkstra(graphData, source, directed, weightPropertyName) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeIds = [];\n var marks = {};\n var D = {};\n var prevs = {}; // key: 顶点, value: 顶点的前驱点数组(可能有多条等长的最短路径)\n nodes.forEach(function (node, i) {\n var id = node.id;\n nodeIds.push(id);\n D[id] = Infinity;\n if (id === source) D[id] = 0;\n });\n var nodeNum = nodes.length;\n var _loop_1 = function _loop_1(i) {\n // Process the vertices\n var minNode = minVertex(D, nodes, marks);\n var minNodeId = minNode.id;\n marks[minNodeId] = true;\n if (D[minNodeId] === Infinity) return \"continue\"; // Unreachable vertices cannot be the intermediate point\n var relatedEdges = [];\n if (directed) relatedEdges = getOutEdgesNodeId(minNodeId, edges);else relatedEdges = getEdgesByNodeId(minNodeId, edges);\n relatedEdges.forEach(function (edge) {\n var edgeTarget = edge.target;\n var edgeSource = edge.source;\n var w = edgeTarget === minNodeId ? edgeSource : edgeTarget;\n var weight = weightPropertyName && edge[weightPropertyName] ? edge[weightPropertyName] : 1;\n if (D[w] > D[minNode.id] + weight) {\n D[w] = D[minNode.id] + weight;\n prevs[w] = [minNode.id];\n } else if (D[w] === D[minNode.id] + weight) {\n prevs[w].push(minNode.id);\n }\n });\n };\n for (var i = 0; i < nodeNum; i++) {\n _loop_1(i);\n }\n prevs[source] = [source];\n // 每个节点存可能存在多条最短路径\n var paths = {};\n for (var target in D) {\n if (D[target] !== Infinity) {\n findAllPaths(source, target, prevs, paths);\n }\n }\n // 兼容之前单路径\n var path = {};\n for (var target in paths) {\n path[target] = paths[target][0];\n }\n return {\n length: D,\n path: path,\n allPath: paths\n };\n};\nexport default dijkstra;\nfunction findAllPaths(source, target, prevs, foundPaths) {\n if (source === target) {\n return [source];\n }\n if (foundPaths[target]) {\n return foundPaths[target];\n }\n var paths = [];\n for (var _i = 0, _a = prevs[target]; _i < _a.length; _i++) {\n var prev = _a[_i];\n var prevPaths = findAllPaths(source, prev, prevs, foundPaths);\n if (!prevPaths) return;\n for (var _b = 0, prevPaths_1 = prevPaths; _b < prevPaths_1.length; _b++) {\n var prePath = prevPaths_1[_b];\n if (isArray(prePath)) paths.push(__spreadArray(__spreadArray([], prePath, true), [target], false));else paths.push([prePath, target]);\n }\n }\n foundPaths[target] = paths;\n return foundPaths[target];\n}","import dijkstra from './dijkstra';\nimport { getNeighbors } from './util';\nexport var findShortestPath = function findShortestPath(graphData, start, end, directed, weightPropertyName) {\n var _a = dijkstra(graphData, start, directed, weightPropertyName),\n length = _a.length,\n path = _a.path,\n allPath = _a.allPath;\n return {\n length: length[end],\n path: path[end],\n allPath: allPath[end]\n };\n};\nexport var findAllPath = function findAllPath(graphData, start, end, directed) {\n var _a;\n if (start === end) return [[start]];\n var _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var visited = [start];\n var isVisited = (_a = {}, _a[start] = true, _a);\n var stack = []; // 辅助栈,用于存储访问过的节点的邻居节点\n var allPath = [];\n var neighbors = directed ? getNeighbors(start, edges, 'target') : getNeighbors(start, edges);\n stack.push(neighbors);\n while (visited.length > 0 && stack.length > 0) {\n var children = stack[stack.length - 1];\n if (children.length) {\n var child = children.shift();\n if (child) {\n visited.push(child);\n isVisited[child] = true;\n neighbors = directed ? getNeighbors(child, edges, 'target') : getNeighbors(child, edges);\n stack.push(neighbors.filter(function (neighbor) {\n return !isVisited[neighbor];\n }));\n }\n } else {\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n continue;\n }\n if (visited[visited.length - 1] === end) {\n var path = visited.map(function (node) {\n return node;\n });\n allPath.push(path);\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n }\n }\n return allPath;\n};","import getAdjMatrix from \"./adjacent-matrix\";\nvar floydWarshall = function floydWarshall(graphData, directed) {\n var adjacentMatrix = getAdjMatrix(graphData, directed);\n var dist = [];\n var size = adjacentMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjacentMatrix[i][j] === 0 || !adjacentMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjacentMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nexport default floydWarshall;","import getAdjMatrix from './adjacent-matrix';\nimport { uniqueId } from './util';\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nvar labelPropagation = function labelPropagation(graphData, directed, weightPropertyName, maxIteration) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = uniqueId();\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = getAdjMatrix(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n });\n ks.push(k);\n });\n var iter = 0;\n var _loop_1 = function _loop_1() {\n var changed = false;\n nodes.forEach(function (node) {\n var neighborClusters = {};\n Object.keys(neighbors[node.id]).forEach(function (neighborId) {\n var neighborWeight = neighbors[node.id][neighborId];\n var neighborNode = nodeMap[neighborId].node;\n var neighborClusterId = neighborNode.clusterId;\n if (!neighborClusters[neighborClusterId]) neighborClusters[neighborClusterId] = 0;\n neighborClusters[neighborClusterId] += neighborWeight;\n });\n // find the cluster with max weight\n var maxWeight = -Infinity;\n var bestClusterIds = [];\n Object.keys(neighborClusters).forEach(function (clusterId) {\n if (maxWeight < neighborClusters[clusterId]) {\n maxWeight = neighborClusters[clusterId];\n bestClusterIds = [clusterId];\n } else if (maxWeight === neighborClusters[clusterId]) {\n bestClusterIds.push(clusterId);\n }\n });\n if (bestClusterIds.length === 1 && bestClusterIds[0] === node.clusterId) return;\n var selfClusterIdx = bestClusterIds.indexOf(node.clusterId);\n if (selfClusterIdx >= 0) bestClusterIds.splice(selfClusterIdx, 1);\n if (bestClusterIds && bestClusterIds.length) {\n changed = true;\n // remove from origin cluster\n var selfCluster = clusters[node.clusterId];\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // move the node to the best cluster\n var randomIdx = Math.floor(Math.random() * bestClusterIds.length);\n var bestCluster = clusters[bestClusterIds[randomIdx]];\n bestCluster.nodes.push(node);\n node.clusterId = bestCluster.id;\n }\n });\n if (!changed) return \"break\";\n iter++;\n };\n while (iter < maxIteration) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n // delete the empty clusters\n Object.keys(clusters).forEach(function (clusterId) {\n var cluster = clusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete clusters[clusterId];\n }\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(clusters).forEach(function (clusterId) {\n clustersArray.push(clusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nexport default labelPropagation;","/**\n * 向量运算\n */\nimport { clone } from '@antv/util';\nvar Vector = /** @class */function () {\n function Vector(arr) {\n this.arr = arr;\n }\n Vector.prototype.getArr = function () {\n return this.arr || [];\n };\n Vector.prototype.add = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] + otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.subtract = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] - otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.avg = function (length) {\n var res = [];\n if (length !== 0) {\n for (var index in this.arr) {\n res[index] = this.arr[index] / length;\n }\n }\n return new Vector(res);\n };\n Vector.prototype.negate = function () {\n var res = [];\n for (var index in this.arr) {\n res[index] = -this.arr[index];\n }\n return new Vector(res);\n };\n // 平方欧式距离\n Vector.prototype.squareEuclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return res;\n }\n };\n // 欧式距离\n Vector.prototype.euclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return Math.sqrt(res);\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 归一化处理\n Vector.prototype.normalize = function () {\n var res = [];\n var cloneArr = clone(this.arr);\n cloneArr.sort(function (a, b) {\n return a - b;\n });\n var max = cloneArr[cloneArr.length - 1];\n var min = cloneArr[0];\n for (var index in this.arr) {\n res[index] = (this.arr[index] - min) / (max - min);\n }\n return new Vector(res);\n };\n // 2范数 or 模长\n Vector.prototype.norm2 = function () {\n var _a;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return 0;\n }\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index], 2);\n }\n return Math.sqrt(res);\n };\n // 两个向量的点积\n Vector.prototype.dot = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += this.arr[index] * otherVector.arr[index];\n }\n return res;\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 两个向量比较\n Vector.prototype.equal = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) !== (otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return false;\n }\n for (var index in this.arr) {\n if (this.arr[index] !== otherArr[index]) {\n return false;\n }\n }\n return true;\n };\n return Vector;\n}();\nexport default Vector;","import { secondReg, dateReg } from '../constants/time';\n// 获取所有属性并排序\nexport var getAllSortProperties = function getAllSortProperties(nodes, n) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (n === void 0) {\n n = 100;\n }\n var propertyKeyInfo = {};\n nodes.forEach(function (node) {\n if (!node.properties) {\n return;\n }\n Object.keys(node.properties).forEach(function (propertyKey) {\n // 目前过滤只保留可以转成数值型的或日期型的, todo: 统一转成one-hot特征向量或者embedding\n if (propertyKey === 'id' || !\"\".concat(node.properties[propertyKey]).match(secondReg) && !\"\".concat(node.properties[propertyKey]).match(dateReg) && isNaN(Number(node.properties[propertyKey]))) {\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n delete propertyKeyInfo[propertyKey];\n }\n return;\n }\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n propertyKeyInfo[propertyKey] += 1;\n } else {\n propertyKeyInfo[propertyKey] = 1;\n }\n });\n });\n // 取top50的属性\n var sortKeys = Object.keys(propertyKeyInfo).sort(function (a, b) {\n return propertyKeyInfo[b] - propertyKeyInfo[a];\n });\n return sortKeys.length < n ? sortKeys : sortKeys.slice(0, n);\n};\nvar processProperty = function processProperty(properties, propertyKeys) {\n return propertyKeys.map(function (key) {\n if (properties.hasOwnProperty(key)) {\n // // 可以转成数值的直接转成数值\n // if (!isNaN(Number(properties[key]))) {\n // return Number(properties[key]);\n // }\n // // 时间型的转成时间戳\n // if (properties[key].match(secondReg) || properties[key].match(dateReg)) {\n // // @ts-ignore\n // return Number(Date.parse(new Date(properties[key]))) / 1000;\n // }\n return properties[key];\n }\n return 0;\n });\n};\n// 获取属性特征权重\nexport var getPropertyWeight = function getPropertyWeight(nodes) {\n var propertyKeys = getAllSortProperties(nodes);\n var allPropertiesWeight = [];\n for (var i = 0; i < nodes.length; i++) {\n allPropertiesWeight[i] = processProperty(nodes[i].properties, propertyKeys);\n }\n return allPropertiesWeight;\n};\n// 获取所有节点的属性集合\nexport var getAllProperties = function getAllProperties(nodes, key) {\n if (key === void 0) {\n key = undefined;\n }\n var allProperties = [];\n nodes.forEach(function (node) {\n if (key === undefined) {\n allProperties.push(node);\n }\n if (node[key] !== undefined) {\n allProperties.push(node[key]);\n }\n });\n return allProperties;\n};\nexport default {\n getAllSortProperties: getAllSortProperties,\n getPropertyWeight: getPropertyWeight,\n getAllProperties: getAllProperties\n};","export var DistanceType;\n(function (DistanceType) {\n DistanceType[\"EuclideanDistance\"] = \"euclideanDistance\";\n})(DistanceType || (DistanceType = {}));","import { uniq } from '@antv/util';\nimport { DistanceType } from '../types';\nimport Vector from './vector';\n/**\n * 获取数据中所有的属性及其对应的值\n * @param dataList 数据集\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexport var getAllKeyValueMap = function getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys) {\n var keys = [];\n // 指定了参与计算的keys时,使用指定的keys\n if (involvedKeys === null || involvedKeys === void 0 ? void 0 : involvedKeys.length) {\n keys = involvedKeys;\n } else {\n // 未指定抽取的keys时,提取数据中所有的key\n dataList.forEach(function (data) {\n keys = keys.concat(Object.keys(data));\n });\n keys = uniq(keys);\n }\n // 获取所有值非空的key的value数组\n var allKeyValueMap = {};\n keys.forEach(function (key) {\n var value = [];\n dataList.forEach(function (data) {\n if (data[key] !== undefined && data[key] !== '') {\n value.push(data[key]);\n }\n });\n if (value.length && !(uninvolvedKeys === null || uninvolvedKeys === void 0 ? void 0 : uninvolvedKeys.includes(key))) {\n allKeyValueMap[key] = uniq(value);\n }\n });\n return allKeyValueMap;\n};\n/**\n * one-hot编码:数据特征提取\n * @param dataList 数据集\n * @param involvedKeys 参与计算的的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexport var oneHot = function oneHot(dataList, involvedKeys, uninvolvedKeys) {\n // 获取数据中所有的属性/特征及其对应的值\n var allKeyValueMap = getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys);\n var oneHotCode = [];\n if (!Object.keys(allKeyValueMap).length) {\n return oneHotCode;\n }\n // 获取所有的属性/特征值\n var allValue = Object.values(allKeyValueMap);\n // 是否所有属性/特征的值都是数值型\n var isAllNumber = allValue.every(function (value) {\n return value.every(function (item) {\n return typeof item === 'number';\n });\n });\n // 对数据进行one-hot编码\n dataList.forEach(function (data, index) {\n var code = [];\n Object.keys(allKeyValueMap).forEach(function (key) {\n var keyValue = data[key];\n var allKeyValue = allKeyValueMap[key];\n var valueIndex = allKeyValue.findIndex(function (value) {\n return keyValue === value;\n });\n var subCode = [];\n // 如果属性/特征所有的值都能转成数值型,不满足分箱,则直接用值(todo: 为了收敛更快,需做归一化处理)\n if (isAllNumber) {\n subCode.push(keyValue);\n } else {\n // 进行one-hot编码\n for (var i = 0; i < allKeyValue.length; i++) {\n if (i === valueIndex) {\n subCode.push(1);\n } else {\n subCode.push(0);\n }\n }\n }\n code = code.concat(subCode);\n });\n oneHotCode[index] = code;\n });\n return oneHotCode;\n};\n/**\n * getDistance:获取两个元素之间的距离\n * @param item\n * @param otherItem\n * @param distanceType 距离类型\n * @param graphData 图数据\n */\nexport var getDistance = function getDistance(item, otherItem, distanceType, graphData) {\n if (distanceType === void 0) {\n distanceType = DistanceType.EuclideanDistance;\n }\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = new Vector(item).euclideanDistance(new Vector(otherItem));\n break;\n default:\n break;\n }\n return distance;\n};\nexport default {\n getAllKeyValueMap: getAllKeyValueMap,\n oneHot: oneHot,\n getDistance: getDistance\n};","import { clone } from '@antv/util';\nimport getAdjMatrix from './adjacent-matrix';\nimport Vector from './utils/vector';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot } from './utils/data-preprocessing';\nvar getModularity = function getModularity(nodes, adjMatrix, ks, m) {\n var length = adjMatrix.length;\n var param = 2 * m;\n var modularity = 0;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (clusteri !== clusterj) continue;\n var entry = adjMatrix[i][j] || 0;\n var ki = ks[i] || 0;\n var kj = ks[j] || 0;\n modularity += entry - ki * kj / param;\n }\n }\n modularity *= 1 / param;\n return modularity;\n};\n// 模块惯性度,衡量属性相似度\nvar getInertialModularity = function getInertialModularity(nodes, allPropertiesWeight) {\n if (nodes === void 0) {\n nodes = [];\n }\n var length = nodes.length;\n var totalProperties = new Vector([]);\n for (var i = 0; i < length; i++) {\n totalProperties = totalProperties.add(new Vector(allPropertiesWeight[i]));\n }\n // 均值向量\n var avgProperties = totalProperties.avg(length);\n avgProperties.normalize();\n // 节点集合的方差: 节点v与均值向量的平方欧式距离之和\n var variance = 0;\n for (var i = 0; i < length; i++) {\n var propertiesi = new Vector(allPropertiesWeight[i]);\n var squareEuclideanDistance = propertiesi.squareEuclideanDistance(avgProperties);\n variance += squareEuclideanDistance;\n }\n // 任意两点间的欧式平方距离\n var squareEuclideanDistanceInfo = [];\n nodes.forEach(function () {\n squareEuclideanDistanceInfo.push([]);\n });\n for (var i = 0; i < length; i++) {\n var propertiesi = new Vector(allPropertiesWeight[i]);\n nodes[i]['clusterInertial'] = 0;\n for (var j = 0; j < length; j++) {\n if (i === j) {\n squareEuclideanDistanceInfo[i][j] = 0;\n continue;\n }\n var propertiesj = new Vector(allPropertiesWeight[j]);\n squareEuclideanDistanceInfo[i][j] = propertiesi.squareEuclideanDistance(propertiesj);\n nodes[i]['clusterInertial'] += squareEuclideanDistanceInfo[i][j];\n }\n }\n // 计算模块惯性度\n var inertialModularity = 0;\n var param = 2 * length * variance;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (i === j || clusteri !== clusterj) continue;\n var inertial = nodes[i].clusterInertial * nodes[j].clusterInertial / Math.pow(param, 2) - squareEuclideanDistanceInfo[i][j] / param;\n inertialModularity += inertial;\n }\n }\n return Number(inertialModularity.toFixed(4));\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param inertialModularity 是否使用惯性模块度(即节点属性相似性)\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar louvain = function louvain(graphData, directed, weightPropertyName, threshold, inertialModularity, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (inertialModularity === void 0) {\n inertialModularity = false;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allPropertiesWeight = [];\n if (inertialModularity) {\n nodes.forEach(function (node, index) {\n node.properties = node.properties || {};\n node.originIndex = index;\n });\n var nodeTypeInfo_1 = [];\n if (nodes.every(function (node) {\n return node.hasOwnProperty('nodeType');\n })) {\n nodeTypeInfo_1 = Array.from(new Set(nodes.map(function (node) {\n return node.nodeType;\n })));\n nodes.forEach(function (node) {\n node.properties.nodeType = nodeTypeInfo_1.findIndex(function (nodeType) {\n return nodeType === node.nodeType;\n });\n });\n }\n // 所有节点属性集合\n var properties = getAllProperties(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n }\n var uniqueId = 1;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = String(uniqueId++);\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = getAdjMatrix(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n // the sum of the weights of all edges in the graph\n var m = 0;\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n m += entry;\n });\n ks.push(k);\n });\n m /= 2;\n var totalModularity = Infinity;\n var previousModularity = Infinity;\n var iter = 0;\n var finalNodes = [];\n var finalClusters = {};\n while (true) {\n if (inertialModularity && nodes.every(function (node) {\n return node.hasOwnProperty('properties');\n })) {\n totalModularity = getModularity(nodes, adjMatrix, ks, m) + getInertialModularity(nodes, allPropertiesWeight) * inertialWeight;\n } else {\n totalModularity = getModularity(nodes, adjMatrix, ks, m);\n }\n // 第一次迭代previousModularity直接赋值\n if (iter === 0) {\n previousModularity = totalModularity;\n finalNodes = nodes;\n finalClusters = clusters;\n }\n var increaseWithinThreshold = totalModularity > 0 && totalModularity > previousModularity && totalModularity - previousModularity < threshold;\n // 总模块度增加才更新最优解\n if (totalModularity > previousModularity) {\n finalNodes = nodes.map(function (node) {\n return {\n node: node,\n clusterId: node.clusterId\n };\n });\n finalClusters = clone(clusters);\n previousModularity = totalModularity;\n }\n // whether to terminate the iterations\n if (increaseWithinThreshold || iter > 100) {\n break;\n }\n ;\n iter++;\n // pre compute some values for current clusters\n Object.keys(clusters).forEach(function (clusterId) {\n // sum of weights of edges to nodes in cluster\n var sumTot = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === clusterId && targetClusterId !== clusterId || targetClusterId === clusterId && sourceClusterId !== clusterId) {\n sumTot = sumTot + (edge[weightPropertyName] || 1);\n }\n });\n clusters[clusterId].sumTot = sumTot;\n });\n // move the nodes to increase the delta modularity\n nodes.forEach(function (node, i) {\n var selfCluster = clusters[node.clusterId];\n var bestIncrease = 0;\n var bestCluster;\n var commonParam = ks[i] / (2 * m);\n // sum of weights of edges from node to nodes in cluster\n var kiin = 0;\n var selfClusterNodes = selfCluster.nodes;\n selfClusterNodes.forEach(function (scNode) {\n var scNodeIdx = nodeMap[scNode.id].idx;\n kiin += adjMatrix[i][scNodeIdx] || 0;\n });\n // the modurarity for **removing** the node i from the origin cluster of node i\n var removeModurarity = kiin - selfCluster.sumTot * commonParam;\n // nodes for **removing** node i into this neighbor cluster\n var selfClusterNodesAfterRemove = selfClusterNodes.filter(function (scNode) {\n return scNode.id !== node.id;\n });\n var propertiesWeightRemove = [];\n selfClusterNodesAfterRemove.forEach(function (nodeRemove, index) {\n propertiesWeightRemove[index] = allPropertiesWeight[nodeRemove.originIndex];\n });\n // the inertialModularity for **removing** the node i from the origin cluster of node i\n var removeInertialModularity = getInertialModularity(selfClusterNodesAfterRemove, allPropertiesWeight) * inertialWeight;\n // the neightbors of the node\n var nodeNeighborIds = neighbors[node.id];\n Object.keys(nodeNeighborIds).forEach(function (neighborNodeId) {\n var neighborNode = nodeMap[neighborNodeId].node;\n var neighborClusterId = neighborNode.clusterId;\n // if the node and the neighbor of node are in the same cluster, reutrn\n if (neighborClusterId === node.clusterId) return;\n var neighborCluster = clusters[neighborClusterId];\n var clusterNodes = neighborCluster.nodes;\n // if the cluster is empty, remove the cluster and return\n if (!clusterNodes || !clusterNodes.length) return;\n // sum of weights of edges from node to nodes in cluster\n var neighborClusterKiin = 0;\n clusterNodes.forEach(function (cNode) {\n var cNodeIdx = nodeMap[cNode.id].idx;\n neighborClusterKiin += adjMatrix[i][cNodeIdx] || 0;\n });\n // the modurarity for **adding** node i into this neighbor cluster\n var addModurarity = neighborClusterKiin - neighborCluster.sumTot * commonParam;\n // nodes for **adding** node i into this neighbor cluster\n var clusterNodesAfterAdd = clusterNodes.concat([node]);\n var propertiesWeightAdd = [];\n clusterNodesAfterAdd.forEach(function (nodeAdd, index) {\n propertiesWeightAdd[index] = allPropertiesWeight[nodeAdd.originIndex];\n });\n // the inertialModularity for **adding** node i into this neighbor cluster\n var addInertialModularity = getInertialModularity(clusterNodesAfterAdd, allPropertiesWeight) * inertialWeight;\n // the increase modurarity is the difference between addModurarity and removeModurarity\n var increase = addModurarity - removeModurarity;\n if (inertialModularity) {\n increase = addModurarity + addInertialModularity - (removeModurarity + removeInertialModularity);\n }\n // find the best cluster to move node i into\n if (increase > bestIncrease) {\n bestIncrease = increase;\n bestCluster = neighborCluster;\n }\n });\n // if found a best cluster to move into\n if (bestIncrease > 0) {\n bestCluster.nodes.push(node);\n var previousClusterId_1 = node.clusterId;\n node.clusterId = bestCluster.id;\n // move the node to the best cluster\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n // remove from origin cluster\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // update sumTot for clusters\n // sum of weights of edges to nodes in cluster\n var neighborClusterSumTot_1 = 0;\n var selfClusterSumTot_1 = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === bestCluster.id && targetClusterId !== bestCluster.id || targetClusterId === bestCluster.id && sourceClusterId !== bestCluster.id) {\n neighborClusterSumTot_1 = neighborClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n if (sourceClusterId === previousClusterId_1 && targetClusterId !== previousClusterId_1 || targetClusterId === previousClusterId_1 && sourceClusterId !== previousClusterId_1) {\n selfClusterSumTot_1 = selfClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n });\n // the nodes of the clusters to move into and remove are changed, update their sumTot\n bestCluster.sumTot = neighborClusterSumTot_1;\n selfCluster.sumTot = selfClusterSumTot_1;\n }\n });\n }\n // delete the empty clusters, assign increasing clusterId\n var newClusterIdMap = {};\n var clusterIdx = 0;\n Object.keys(finalClusters).forEach(function (clusterId) {\n var cluster = finalClusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete finalClusters[clusterId];\n return;\n }\n var newId = String(clusterIdx + 1);\n if (newId === clusterId) {\n return;\n }\n cluster.id = newId;\n cluster.nodes = cluster.nodes.map(function (item) {\n return {\n id: item.id,\n clusterId: newId\n };\n });\n finalClusters[newId] = cluster;\n newClusterIdMap[clusterId] = newId;\n delete finalClusters[clusterId];\n clusterIdx++;\n });\n // restore node clusterId\n finalNodes.forEach(function (nodeInfo) {\n var node = nodeInfo.node,\n clusterId = nodeInfo.clusterId;\n if (!node) return;\n node.clusterId = clusterId;\n if (node.clusterId && newClusterIdMap[node.clusterId]) node.clusterId = newClusterIdMap[node.clusterId];\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (!sourceClusterId || !targetClusterId) return;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(finalClusters).forEach(function (clusterId) {\n clustersArray.push(finalClusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nexport default louvain;","import louvain from './louvain';\n/**\n * 社区发现 i-louvain 算法:模块度 + 惯性模块度(即节点属性相似性)\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar iLouvain = function iLouvain(graphData, directed, weightPropertyName, threshold, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n return louvain(graphData, directed, weightPropertyName, threshold, true, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight);\n};\nexport default iLouvain;","import { clone } from '@antv/util';\nimport degree from './degree';\n/**\n * k-core算法 找出符合指定核心度的紧密关联的子图结构\n * @param graphData 图数据\n * @param k 核心度数\n */\nvar kCore = function kCore(graphData, k) {\n var _a;\n if (k === void 0) {\n k = 1;\n }\n var data = clone(graphData);\n var _b = data.nodes,\n nodes = _b === void 0 ? [] : _b;\n var _c = data.edges,\n edges = _c === void 0 ? [] : _c;\n var _loop_1 = function _loop_1() {\n // 获取图中节点的度数\n var degrees = degree({\n nodes: nodes,\n edges: edges\n });\n var nodeIds = Object.keys(degrees);\n // 按照度数进行排序\n nodeIds.sort(function (a, b) {\n var _a, _b;\n return ((_a = degrees[a]) === null || _a === void 0 ? void 0 : _a.degree) - ((_b = degrees[b]) === null || _b === void 0 ? void 0 : _b.degree);\n });\n var minIndexId = nodeIds[0];\n if (!nodes.length || ((_a = degrees[minIndexId]) === null || _a === void 0 ? void 0 : _a.degree) >= k) {\n return \"break\";\n }\n var originIndex = nodes.findIndex(function (node) {\n return node.id === minIndexId;\n });\n // 移除度数小于k的节点\n nodes.splice(originIndex, 1);\n // 移除度数小于k的节点相关的边\n edges = edges.filter(function (edge) {\n return !(edge.source === minIndexId || edge.target === minIndexId);\n });\n };\n while (true) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n return {\n nodes: nodes,\n edges: edges\n };\n};\nexport default kCore;","import { isEqual, uniq } from '@antv/util';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot, getDistance } from './utils/data-preprocessing';\nimport Vector from './utils/vector';\nimport { DistanceType } from './types';\n// 获取质心\nvar getCentroid = function getCentroid(distanceType, allPropertiesWeight, index) {\n var centroid = [];\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n centroid = allPropertiesWeight[index];\n break;\n default:\n centroid = [];\n break;\n }\n return centroid;\n};\n/**\n * k-means算法 根据节点之间的距离将节点聚类为K个簇\n * @param data 图数据\n * @param k 质心(聚类中心)个数\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param distanceType 距离类型 默认节点属性的欧式距离\n */\nvar kMeans = function kMeans(data, k, propertyKey, involvedKeys, uninvolvedKeys, distanceType) {\n if (k === void 0) {\n k = 3;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (distanceType === void 0) {\n distanceType = DistanceType.EuclideanDistance;\n }\n var _a = data.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = data.edges,\n edges = _b === void 0 ? [] : _b;\n var defaultClusterInfo = {\n clusters: [{\n id: \"0\",\n nodes: nodes\n }],\n clusterEdges: []\n };\n // 距离类型为欧式距离且没有属性时,直接return\n if (distanceType === DistanceType.EuclideanDistance && !nodes.every(function (node) {\n return node.hasOwnProperty(propertyKey);\n })) {\n return defaultClusterInfo;\n }\n // 所有节点属性集合\n var properties = [];\n // 所有节点属性one-hot特征向量集合\n var allPropertiesWeight = [];\n if (distanceType === DistanceType.EuclideanDistance) {\n properties = getAllProperties(nodes, propertyKey);\n allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n }\n if (!allPropertiesWeight.length) {\n return defaultClusterInfo;\n }\n var allPropertiesWeightUniq = uniq(allPropertiesWeight.map(function (item) {\n return item.join('');\n }));\n // 当输入节点数量或者属性集合的长度小于k时,k调整为其中最小的值\n var finalK = Math.min(k, nodes.length, allPropertiesWeightUniq.length);\n // 记录节点的原始index,与allPropertiesWeight对应\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].originIndex = i;\n }\n // 初始化质心(聚类中心)\n var centroids = [];\n var centroidIndexList = [];\n var clusters = [];\n for (var i = 0; i < finalK; i++) {\n if (i === 0) {\n // 随机选取质心(聚类中心)\n var randomIndex = Math.floor(Math.random() * nodes.length);\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n centroids[i] = allPropertiesWeight[randomIndex];\n break;\n default:\n centroids[i] = [];\n break;\n }\n centroidIndexList.push(randomIndex);\n clusters[i] = [nodes[randomIndex]];\n nodes[randomIndex].clusterId = String(i);\n } else {\n var maxDistance = -Infinity;\n var maxDistanceNodeIndex = 0;\n var _loop_1 = function _loop_1(m) {\n if (!centroidIndexList.includes(m)) {\n var totalDistance = 0;\n for (var j = 0; j < centroids.length; j++) {\n // 求节点到质心的距离(默认节点属性的欧式距离)\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = getDistance(allPropertiesWeight[nodes[m].originIndex], centroids[j], distanceType);\n break;\n default:\n break;\n }\n totalDistance += distance;\n }\n // 节点到各质心的平均距离(默认欧式距离)\n var avgDistance = totalDistance / centroids.length;\n // 记录到已有质心最远的的距离和节点索引\n if (avgDistance > maxDistance && !centroids.find(function (centroid) {\n return isEqual(centroid, getCentroid(distanceType, allPropertiesWeight, nodes[m].originIndex));\n })) {\n maxDistance = avgDistance;\n maxDistanceNodeIndex = m;\n }\n }\n };\n // 选取与已有质心平均距离最远的点做为新的质心\n for (var m = 0; m < nodes.length; m++) {\n _loop_1(m);\n }\n centroids[i] = getCentroid(distanceType, allPropertiesWeight, maxDistanceNodeIndex);\n centroidIndexList.push(maxDistanceNodeIndex);\n clusters[i] = [nodes[maxDistanceNodeIndex]];\n nodes[maxDistanceNodeIndex].clusterId = String(i);\n }\n }\n var iterations = 0;\n while (true) {\n for (var i = 0; i < nodes.length; i++) {\n var minDistanceIndex = 0;\n var minDistance = Infinity;\n if (!(iterations === 0 && centroidIndexList.includes(i))) {\n for (var j = 0; j < centroids.length; j++) {\n // 求节点到质心的距离(默认节点属性的欧式距离)\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = getDistance(allPropertiesWeight[i], centroids[j], distanceType);\n break;\n default:\n break;\n }\n // 记录节点最近的质心的索引\n if (distance < minDistance) {\n minDistance = distance;\n minDistanceIndex = j;\n }\n }\n // 从原来的类别删除节点\n if (nodes[i].clusterId !== undefined) {\n for (var n = clusters[Number(nodes[i].clusterId)].length - 1; n >= 0; n--) {\n if (clusters[Number(nodes[i].clusterId)][n].id === nodes[i].id) {\n clusters[Number(nodes[i].clusterId)].splice(n, 1);\n }\n }\n }\n // 将节点划分到距离最小的质心(聚类中心)所对应的类中\n nodes[i].clusterId = String(minDistanceIndex);\n clusters[minDistanceIndex].push(nodes[i]);\n }\n }\n // 是否存在质心(聚类中心)移动\n var centroidsEqualAvg = false;\n for (var i = 0; i < clusters.length; i++) {\n var clusterNodes = clusters[i];\n var totalVector = new Vector([]);\n for (var j = 0; j < clusterNodes.length; j++) {\n totalVector = totalVector.add(new Vector(allPropertiesWeight[clusterNodes[j].originIndex]));\n }\n // 计算每个类别的均值向量\n var avgVector = totalVector.avg(clusterNodes.length);\n // 如果均值向量不等于质心向量\n if (!avgVector.equal(new Vector(centroids[i]))) {\n centroidsEqualAvg = true;\n // 移动/更新每个类别的质心(聚类中心)到该均值向量\n centroids[i] = avgVector.getArr();\n }\n }\n iterations++;\n // 如果每个节点都归属了类别,且不存在质心(聚类中心)移动或者迭代次数超过1000,则停止\n if (nodes.every(function (node) {\n return node.clusterId !== undefined;\n }) && centroidsEqualAvg || iterations >= 1000) {\n break;\n }\n }\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var _a, _b;\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = (_a = nodes.find(function (node) {\n return node.id === source;\n })) === null || _a === void 0 ? void 0 : _a.clusterId;\n var targetClusterId = (_b = nodes.find(function (node) {\n return node.id === target;\n })) === null || _b === void 0 ? void 0 : _b.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n return {\n clusters: clusters,\n clusterEdges: clusterEdges\n };\n};\nexport default kMeans;","import Vector from './utils/vector';\n/**\n * cosine-similarity算法 计算余弦相似度\n * @param item 元素\n * @param targetItem 目标元素\n */\nvar cosineSimilarity = function cosineSimilarity(item, targetItem) {\n // 目标元素向量\n var targetItemVector = new Vector(targetItem);\n // 目标元素向量的模长\n var targetNodeNorm2 = targetItemVector.norm2();\n // 元素向量\n var itemVector = new Vector(item);\n // 元素向量的模长\n var itemNorm2 = itemVector.norm2();\n // 计算元素向量和目标元素向量的点积\n var dot = targetItemVector.dot(itemVector);\n var norm2Product = targetNodeNorm2 * itemNorm2;\n // 计算元素向量和目标元素向量的余弦相似度\n var cosineSimilarity = norm2Product ? dot / norm2Product : 0;\n return cosineSimilarity;\n};\nexport default cosineSimilarity;","import { clone } from '@antv/util';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot } from './utils/data-preprocessing';\nimport cosineSimilarity from './cosine-similarity';\n/**\n * nodes-cosine-similarity算法 基于节点属性计算余弦相似度(基于种子节点寻找相似节点)\n * @param nodes 图节点数据\n * @param seedNode 种子节点\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nvar nodesCosineSimilarity = function nodesCosineSimilarity(nodes, seedNode, propertyKey, involvedKeys, uninvolvedKeys) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = [];\n }\n var similarNodes = clone(nodes.filter(function (node) {\n return node.id !== seedNode.id;\n }));\n var seedNodeIndex = nodes.findIndex(function (node) {\n return node.id === seedNode.id;\n });\n // 所有节点属性集合\n var properties = getAllProperties(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n var allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n // 种子节点属性\n var seedNodeProperties = allPropertiesWeight[seedNodeIndex];\n var allCosineSimilarity = [];\n similarNodes.forEach(function (node, index) {\n if (node.id !== seedNode.id) {\n // 节点属性\n var nodeProperties = allPropertiesWeight[index];\n // 计算节点向量和种子节点向量的余弦相似度\n var cosineSimilarityValue = cosineSimilarity(nodeProperties, seedNodeProperties);\n allCosineSimilarity.push(cosineSimilarityValue);\n node.cosineSimilarity = cosineSimilarityValue;\n }\n });\n // 将返回的节点按照余弦相似度大小排序\n similarNodes.sort(function (a, b) {\n return b.cosineSimilarity - a.cosineSimilarity;\n });\n return {\n allCosineSimilarity: allCosineSimilarity,\n similarNodes: similarNodes\n };\n};\nexport default nodesCosineSimilarity;","/**\n * 并查集 Disjoint set to support quick union\n */\nvar UnionFind = /** @class */function () {\n function UnionFind(items) {\n this.count = items.length;\n this.parent = {};\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var i = items_1[_i];\n this.parent[i] = i;\n }\n }\n // find the root of the item\n UnionFind.prototype.find = function (item) {\n while (this.parent[item] !== item) {\n item = this.parent[item];\n }\n return item;\n };\n UnionFind.prototype.union = function (a, b) {\n var rootA = this.find(a);\n var rootB = this.find(b);\n if (rootA === rootB) return;\n // make the element with smaller root the parent\n if (rootA < rootB) {\n if (this.parent[b] !== b) this.union(this.parent[b], a);\n this.parent[b] = this.parent[a];\n } else {\n if (this.parent[a] !== a) this.union(this.parent[a], b);\n this.parent[a] = this.parent[b];\n }\n };\n // whether a and b are connected, i.e. a and b have the same root\n UnionFind.prototype.connected = function (a, b) {\n return this.find(a) === this.find(b);\n };\n return UnionFind;\n}();\nexport default UnionFind;","var defaultCompare = function defaultCompare(a, b) {\n return a - b;\n};\nvar MinBinaryHeap = /** @class */function () {\n function MinBinaryHeap(compareFn) {\n if (compareFn === void 0) {\n compareFn = defaultCompare;\n }\n this.compareFn = compareFn;\n this.list = [];\n }\n MinBinaryHeap.prototype.getLeft = function (index) {\n return 2 * index + 1;\n };\n MinBinaryHeap.prototype.getRight = function (index) {\n return 2 * index + 2;\n };\n MinBinaryHeap.prototype.getParent = function (index) {\n if (index === 0) {\n return null;\n }\n return Math.floor((index - 1) / 2);\n };\n MinBinaryHeap.prototype.isEmpty = function () {\n return this.list.length <= 0;\n };\n MinBinaryHeap.prototype.top = function () {\n return this.isEmpty() ? undefined : this.list[0];\n };\n MinBinaryHeap.prototype.delMin = function () {\n var top = this.top();\n var bottom = this.list.pop();\n if (this.list.length > 0) {\n this.list[0] = bottom;\n this.moveDown(0);\n }\n return top;\n };\n MinBinaryHeap.prototype.insert = function (value) {\n if (value !== null) {\n this.list.push(value);\n var index = this.list.length - 1;\n this.moveUp(index);\n return true;\n }\n return false;\n };\n MinBinaryHeap.prototype.moveUp = function (index) {\n var parent = this.getParent(index);\n while (index && index > 0 && this.compareFn(this.list[parent], this.list[index]) > 0) {\n // swap\n var tmp = this.list[parent];\n this.list[parent] = this.list[index];\n this.list[index] = tmp;\n // [this.list[index], this.list[parent]] = [this.list[parent], this.list[index]]\n index = parent;\n parent = this.getParent(index);\n }\n };\n MinBinaryHeap.prototype.moveDown = function (index) {\n var _a;\n var element = index;\n var left = this.getLeft(index);\n var right = this.getRight(index);\n var size = this.list.length;\n if (left !== null && left < size && this.compareFn(this.list[element], this.list[left]) > 0) {\n element = left;\n } else if (right !== null && right < size && this.compareFn(this.list[element], this.list[right]) > 0) {\n element = right;\n }\n if (index !== element) {\n _a = [this.list[element], this.list[index]], this.list[index] = _a[0], this.list[element] = _a[1];\n this.moveDown(element);\n }\n };\n return MinBinaryHeap;\n}();\nexport default MinBinaryHeap;","import UnionFind from './structs/union-find';\nimport MinBinaryHeap from './structs/binary-heap';\nimport { getEdgesByNodeId } from './util';\n/**\n * Prim algorithm,use priority queue,复杂度 O(E+V*logV), V: 节点数量,E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Prim%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n */\nvar primMST = function primMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 从nodes[0]开始\n var currNode = nodes[0];\n var visited = new Set();\n visited.add(currNode);\n // 用二叉堆维护距已加入节点的其他节点的边的权值\n var compareWeight = function compareWeight(a, b) {\n if (weight) {\n return a.weight - b.weight;\n }\n return 0;\n };\n var edgeQueue = new MinBinaryHeap(compareWeight);\n getEdgesByNodeId(currNode.id, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n while (!edgeQueue.isEmpty()) {\n // 选取与已加入的结点之间边权最小的结点\n var currEdge = edgeQueue.delMin();\n var source = currEdge.source;\n var target = currEdge.target;\n if (visited.has(source) && visited.has(target)) continue;\n selectedEdges.push(currEdge);\n if (!visited.has(source)) {\n visited.add(source);\n getEdgesByNodeId(source, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n if (!visited.has(target)) {\n visited.add(target);\n getEdgesByNodeId(target, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n }\n return selectedEdges;\n};\n/**\n * Kruskal algorithm,复杂度 O(E*logE), E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @return IEdge[] 返回构成MST的边的数组\n */\nvar kruskalMST = function kruskalMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 若指定weight,则将所有的边按权值从小到大排序\n var weightEdges = edges.map(function (edge) {\n return edge;\n });\n if (weight) {\n weightEdges.sort(function (a, b) {\n return a.weight - b.weight;\n });\n }\n var disjointSet = new UnionFind(nodes.map(function (n) {\n return n.id;\n }));\n // 从权值最小的边开始,如果这条边连接的两个节点于图G中不在同一个连通分量中,则添加这条边\n // 直到遍历完所有点或边\n while (weightEdges.length > 0) {\n var curEdge = weightEdges.shift();\n var source = curEdge.source;\n var target = curEdge.target;\n if (!disjointSet.connected(source, target)) {\n selectedEdges.push(curEdge);\n disjointSet.union(source, target);\n }\n }\n return selectedEdges;\n};\n/**\n * 最小生成树\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nvar minimumSpanningTree = function minimumSpanningTree(graphData, weight, algo) {\n var algos = {\n prim: primMST,\n kruskal: kruskalMST\n };\n if (!algo) return kruskalMST(graphData, weight);\n return algos[algo](graphData, weight);\n};\nexport default minimumSpanningTree;","import degree from './degree';\nimport { getNeighbors } from \"./util\";\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nvar pageRank = function pageRank(graphData, epsilon, linkProb) {\n if (typeof epsilon !== 'number') epsilon = 0.000001;\n if (typeof linkProb !== 'number') linkProb = 0.85;\n var distance = 1;\n var leakedRank = 0;\n var maxIterations = 1000;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodesCount = nodes.length;\n var currentRank;\n var curRanks = {};\n var prevRanks = {};\n // Initialize pageranks 初始化\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n curRanks[nodeId] = 1 / nodesCount;\n prevRanks[nodeId] = 1 / nodesCount;\n }\n var nodeDegree = degree(graphData);\n while (maxIterations > 0 && distance > epsilon) {\n leakedRank = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = 0;\n if (nodeDegree[node.id].inDegree === 0) {\n curRanks[nodeId] = 0;\n } else {\n var neighbors = getNeighbors(nodeId, edges, 'source');\n for (var i = 0; i < neighbors.length; ++i) {\n var neighbor = neighbors[i];\n var outDegree = nodeDegree[neighbor].outDegree;\n if (outDegree > 0) currentRank += prevRanks[neighbor] / outDegree;\n }\n curRanks[nodeId] = linkProb * currentRank;\n leakedRank += curRanks[nodeId];\n }\n }\n leakedRank = (1 - leakedRank) / nodesCount;\n distance = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = curRanks[nodeId] + leakedRank;\n distance += Math.abs(currentRank - prevRanks[nodeId]);\n prevRanks[nodeId] = currentRank;\n }\n maxIterations -= 1;\n }\n return prevRanks;\n};\nexport default pageRank;","export var VACANT_EDGE_ID = -1;\nexport var VACANT_NODE_ID = -1;\nexport var VACANT_EDGE_LABEL = \"-1\";\nexport var VACANT_NODE_LABEL = \"-1\";\nexport var VACANT_GRAPH_ID = -1;\nexport var AUTO_EDGE_ID = \"-1\";\nvar Edge = /** @class */function () {\n function Edge(id, from, to, label) {\n if (id === void 0) {\n id = VACANT_EDGE_ID;\n }\n if (from === void 0) {\n from = VACANT_NODE_ID;\n }\n if (to === void 0) {\n to = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_EDGE_LABEL;\n }\n this.id = id;\n this.from = from;\n this.to = to;\n this.label = label;\n }\n return Edge;\n}();\nexport { Edge };\nvar Node = /** @class */function () {\n function Node(id, label) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_NODE_LABEL;\n }\n this.id = id;\n this.label = label;\n this.edges = [];\n this.edgeMap = {};\n }\n Node.prototype.addEdge = function (edge) {\n this.edges.push(edge);\n this.edgeMap[edge.id] = edge;\n };\n return Node;\n}();\nexport { Node };\nvar Graph = /** @class */function () {\n function Graph(id, edgeIdAutoIncrease, directed) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (edgeIdAutoIncrease === void 0) {\n edgeIdAutoIncrease = true;\n }\n if (directed === void 0) {\n directed = false;\n }\n this.id = id;\n this.edgeIdAutoIncrease = edgeIdAutoIncrease;\n this.edges = [];\n this.nodes = [];\n this.nodeMap = {};\n this.edgeMap = {};\n this.nodeLabelMap = {};\n this.edgeLabelMap = {};\n this.counter = 0;\n this.directed = directed;\n }\n Graph.prototype.getNodeNum = function () {\n return this.nodes.length;\n };\n Graph.prototype.addNode = function (id, label) {\n if (this.nodeMap[id]) return;\n var node = new Node(id, label);\n this.nodes.push(node);\n this.nodeMap[id] = node;\n if (!this.nodeLabelMap[label]) this.nodeLabelMap[label] = [];\n this.nodeLabelMap[label].push(id);\n };\n Graph.prototype.addEdge = function (id, from, to, label) {\n if (this.edgeIdAutoIncrease || id === undefined) id = this.counter++;\n if (this.nodeMap[from] && this.nodeMap[to] && this.nodeMap[to].edgeMap[id]) return;\n var edge = new Edge(id, from, to, label);\n this.edges.push(edge);\n this.edgeMap[id] = edge;\n this.nodeMap[from].addEdge(edge);\n if (!this.edgeLabelMap[label]) this.edgeLabelMap[label] = [];\n this.edgeLabelMap[label].push(edge);\n if (!this.directed) {\n var rEdge = new Edge(id, to, from, label);\n this.nodeMap[to].addEdge(rEdge);\n this.edgeLabelMap[label].push(rEdge);\n }\n };\n return Graph;\n}();\nexport { Graph };","import { clone } from \"@antv/util\";\nimport { Graph, VACANT_NODE_LABEL, VACANT_GRAPH_ID, VACANT_EDGE_LABEL } from \"./struct\";\nvar DFSedge = /** @class */function () {\n function DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.fromNode = fromNode;\n this.toNode = toNode;\n this.nodeEdgeNodeLabel = {\n nodeLabel1: fromNodeLabel || VACANT_NODE_LABEL,\n edgeLabel: edgeLabel || VACANT_EDGE_LABEL,\n nodeLabel2: toNodeLabel || VACANT_NODE_LABEL\n };\n }\n DFSedge.prototype.equalTo = function (other) {\n return this.fromNode === other.formNode && this.toNode === other.toNode && this.nodeEdgeNodeLabel === other.nodeEdgeNodeLabel;\n };\n DFSedge.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n return DFSedge;\n}();\n// DFScode 是 DESedge 的数组\nvar DFScode = /** @class */function () {\n function DFScode() {\n this.rmpath = [];\n this.dfsEdgeList = [];\n }\n DFScode.prototype.equalTo = function (other) {\n var aLength = this.dfsEdgeList.length;\n var bLength = other.length;\n if (aLength !== bLength) return false;\n for (var i = 0; i < aLength; i++) {\n if (this.dfsEdgeList[i] !== other[i]) return false;\n }\n return true;\n };\n DFScode.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n /** 增加一条 edge 到 DFScode */\n DFScode.prototype.pushBack = function (fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.dfsEdgeList.push(new DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel));\n return this.dfsEdgeList;\n };\n /** 根据 dfs 构建图 */\n DFScode.prototype.toGraph = function (graphId, directed) {\n if (graphId === void 0) {\n graphId = VACANT_GRAPH_ID;\n }\n if (directed === void 0) {\n directed = false;\n }\n var graph = new Graph(graphId, true, directed);\n this.dfsEdgeList.forEach(function (dfsEdge) {\n var fromNodeId = dfsEdge.fromNode;\n var toNodeId = dfsEdge.toNode;\n var _a = dfsEdge.nodeEdgeNodeLabel,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (nodeLabel1 !== VACANT_NODE_LABEL) graph.addNode(fromNodeId, nodeLabel1);\n if (nodeLabel2 !== VACANT_NODE_LABEL) graph.addNode(toNodeId, nodeLabel2);\n if (nodeLabel1 !== VACANT_NODE_LABEL && nodeLabel2 !== nodeLabel1) graph.addEdge(undefined, fromNodeId, toNodeId, edgeLabel);\n });\n return graph;\n };\n // 建立 rightmost path\n DFScode.prototype.buildRmpath = function () {\n this.rmpath = [];\n var oldFrom = undefined;\n var selfLength = this.dfsEdgeList.length;\n for (var i = selfLength - 1; i >= 0; i--) {\n var dfsEdge = this.dfsEdgeList[i];\n var fromNodeIdx = dfsEdge.fromNode;\n var toNodeIdx = dfsEdge.toNode;\n if (fromNodeIdx < toNodeIdx && (oldFrom === undefined || toNodeIdx === oldFrom)) {\n this.rmpath.push(i);\n oldFrom = fromNodeIdx;\n }\n }\n return this.rmpath;\n };\n DFScode.prototype.getNodeNum = function () {\n var nodeMap = {};\n this.dfsEdgeList.forEach(function (dfsEdge) {\n if (!nodeMap[dfsEdge.fromNode]) nodeMap[dfsEdge.fromNode] = true;\n if (!nodeMap[dfsEdge.toNode]) nodeMap[dfsEdge.toNode] = true;\n });\n return Object.keys(nodeMap).length;\n };\n return DFScode;\n}();\nvar History = /** @class */function () {\n function History(pdfs) {\n this.his = {};\n this.nodesUsed = {};\n this.edgesUsed = {};\n this.edges = [];\n if (!pdfs) return;\n while (pdfs) {\n var e = pdfs.edge;\n this.edges.push(e);\n this.nodesUsed[e.from] = 1;\n this.nodesUsed[e.to] = 1;\n this.edgesUsed[e.id] = 1;\n pdfs = pdfs.preNode;\n }\n // 倒序\n this.edges = this.edges.reverse();\n }\n History.prototype.hasNode = function (node) {\n return this.nodesUsed[node.id] === 1;\n };\n History.prototype.hasEdge = function (edge) {\n return this.edgesUsed[edge.id] === 1;\n };\n return History;\n}();\nvar GSpan = /** @class */function () {\n function GSpan(_a) {\n var graphs = _a.graphs,\n _b = _a.minSupport,\n minSupport = _b === void 0 ? 2 : _b,\n _c = _a.minNodeNum,\n minNodeNum = _c === void 0 ? 1 : _c,\n _d = _a.maxNodeNum,\n maxNodeNum = _d === void 0 ? 4 : _d,\n _e = _a.top,\n top = _e === void 0 ? 10 : _e,\n _f = _a.directed,\n directed = _f === void 0 ? false : _f,\n _g = _a.verbose,\n verbose = _g === void 0 ? false : _g;\n // -------- 第零步,初始化-------\n this.graphs = graphs;\n this.dfsCode = new DFScode();\n this.support = 0;\n this.frequentSize1Subgraphs = [];\n this.frequentSubgraphs = [];\n this.minSupport = minSupport;\n this.top = top;\n this.directed = directed;\n this.counter = 0;\n // TODO? timestamp = {}\n this.maxNodeNum = maxNodeNum;\n this.minNodeNum = minNodeNum;\n this.verbose = verbose;\n if (this.maxNodeNum < this.minNodeNum) this.maxNodeNum = this.minNodeNum;\n this.reportDF = []; // matrix\n }\n // Line 352\n GSpan.prototype.findForwardRootEdges = function (graph, fromNode) {\n var _this = this;\n var result = [];\n var nodeMap = graph.nodeMap;\n fromNode.edges.forEach(function (edge) {\n if (_this.directed || fromNode.label <= nodeMap[edge.to].label) result.push(edge);\n });\n return result;\n };\n GSpan.prototype.findBackwardEdge = function (graph, edge1, edge2, history) {\n if (!this.directed && edge1 === edge2) return null;\n var nodeMap = graph.nodeMap;\n var edge2To = nodeMap[edge2.to];\n var edge2ToEdges = edge2To.edges;\n var edgeLength = edge2ToEdges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edge2ToEdges[i];\n if (history.hasEdge(edge) || edge.to !== edge1.from) continue;\n if (!this.directed) {\n if (edge1.label < edge.label || edge1.label === edge.label && nodeMap[edge1.to].label <= nodeMap[edge2.to].label) {\n return edge;\n }\n } else {\n if (nodeMap[edge1.from].label < nodeMap[edge2.to].label || nodeMap[edge1.from].label === nodeMap[edge2.to].label && edge1.label <= edge.label) {\n return edge;\n }\n }\n }\n return null;\n };\n GSpan.prototype.findForwardPureEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var rightmostEdgeToId = rightmostEdge.to;\n var edges = graph.nodeMap[rightmostEdgeToId].edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var toNode = graph.nodeMap[edge.to];\n if (minNodeLabel <= toNode.label && !history.hasNode(toNode)) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.findForwardRmpathEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var nodeMap = graph.nodeMap;\n var toNodeLabel = nodeMap[rightmostEdge.to].label;\n var fromNode = nodeMap[rightmostEdge.from];\n var edges = fromNode.edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var newToNodeLabel = nodeMap[edge.to].label;\n if (rightmostEdge.to === edge.to || minNodeLabel > newToNodeLabel || history.hasNode(nodeMap[edge.to])) {\n continue;\n }\n if (rightmostEdge.label < edge.label || rightmostEdge.label === edge.label && toNodeLabel <= newToNodeLabel) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.getSupport = function (projected) {\n var graphMap = {};\n projected.forEach(function (pro) {\n if (!graphMap[pro.graphId]) graphMap[pro.graphId] = true;\n });\n return Object.keys(graphMap).length;\n };\n GSpan.prototype.findMinLabel = function (obj) {\n var minLabel = undefined;\n Object.keys(obj).forEach(function (nodeEdgeNodeLabel) {\n var _a = obj[nodeEdgeNodeLabel],\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (!minLabel) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n return;\n }\n if (nodeLabel1 < minLabel.nodeLabel1 || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel < minLabel.edgeLabel || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel === minLabel.edgeLabel && nodeLabel2 < minLabel.nodeLabel2) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n }\n });\n return minLabel;\n };\n GSpan.prototype.isMin = function () {\n var _this = this;\n var dfsCode = this.dfsCode;\n if (this.verbose) console.log(\"isMin checking\", dfsCode);\n if (dfsCode.dfsEdgeList.length === 1) return true;\n var directed = this.directed;\n var graph = dfsCode.toGraph(VACANT_GRAPH_ID, directed);\n var nodeMap = graph.nodeMap;\n var dfsCodeMin = new DFScode();\n var root = {};\n graph.nodes.forEach(function (node) {\n var forwardEdges = _this.findForwardRootEdges(graph, node);\n forwardEdges.forEach(function (edge) {\n var otherNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(otherNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: otherNode.label\n };\n var pdfs = {\n graphId: graph.id,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n // 比较 root 中每一项的 nodeEdgeNodeLabel 大小,按照 nodeLabel1、edgeLabe、nodeLabel2 的顺序比较\n var minLabel = this.findMinLabel(root); // line 419\n if (!minLabel) return;\n dfsCodeMin.dfsEdgeList.push(new DFSedge(0, 1, minLabel.nodeLabel1, minLabel.edgeLabel, minLabel.nodeLabel2));\n // line 423\n var projectIsMin = function projectIsMin(projected) {\n // right most path\n var rmpath = dfsCodeMin.buildRmpath();\n var minNodeLabel = dfsCodeMin.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var maxToC = dfsCodeMin.dfsEdgeList[rmpath[0]].toNode; // node id\n var backwardRoot = {};\n var flag = false,\n newTo = 0;\n var end = directed ? -1 : 0; // 遍历到 1 还是到 0\n var _loop_1 = function _loop_1(i) {\n if (flag) return \"break\";\n // line 435\n projected.forEach(function (p) {\n var history = new History(p);\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n // Line 441\n if (!backwardRoot[backwardEdge.label]) {\n backwardRoot[backwardEdge.label] = {\n projected: [],\n edgeLabel: backwardEdge.label\n };\n }\n backwardRoot[backwardEdge.label].projected.push({\n graphId: graph.id,\n edge: backwardRoot,\n preNode: p\n });\n newTo = dfsCodeMin.dfsEdgeList[rmpath[i]].fromNode;\n flag = true;\n }\n });\n };\n for (var i = rmpath.length - 1; i > end; i--) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\") break;\n }\n if (flag) {\n var minBackwardEdgeLabel = _this.findMinLabel(backwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(maxToC, newTo, VACANT_NODE_LABEL, minBackwardEdgeLabel.edgeLabel, VACANT_NODE_LABEL));\n var idx_1 = dfsCodeMin.dfsEdgeList.length - 1;\n if (_this.dfsCode.dfsEdgeList[idx_1] !== dfsCodeMin.dfsEdgeList[idx_1]) return false;\n return projectIsMin(backwardRoot[minBackwardEdgeLabel.edgeLabel].projected);\n }\n var forwardRoot = {};\n flag = false;\n var newFrom = 0;\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n if (forwardPureEdges.length > 0) {\n flag = true;\n newFrom = maxToC;\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n var pathLength = rmpath.length;\n var _loop_2 = function _loop_2(i) {\n if (flag) return \"break\";\n var value = rmpath[i];\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[value], minNodeLabel, history);\n if (forwardRmpathEdges.length > 0) {\n flag = true;\n newFrom = dfsCodeMin.dfsEdgeList[value].fromNode;\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n };\n for (var i = 0; i < pathLength; i++) {\n var state_2 = _loop_2(i);\n if (state_2 === \"break\") break;\n }\n if (!flag) return true;\n var forwardMinEdgeNodeLabel = _this.findMinLabel(forwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(newFrom, maxToC + 1, VACANT_NODE_LABEL, forwardMinEdgeNodeLabel.edgeLabel, forwardMinEdgeNodeLabel.nodeLabel2));\n var idx = dfsCodeMin.dfsEdgeList.length - 1;\n if (dfsCode.dfsEdgeList[idx] !== dfsCodeMin.dfsEdgeList[idx]) return false;\n return projectIsMin(forwardRoot[\"\".concat(forwardMinEdgeNodeLabel.edgeLabel, \"-\").concat(forwardMinEdgeNodeLabel.nodeLabel2)].projected);\n };\n var key = \"\".concat(minLabel.nodeLabel1, \"-\").concat(minLabel.edgeLabel, \"-\").concat(minLabel.nodeLabel2);\n return projectIsMin(root[key].projected);\n };\n GSpan.prototype.report = function () {\n if (this.dfsCode.getNodeNum() < this.minNodeNum) return;\n this.counter++;\n var graph = this.dfsCode.toGraph(this.counter, this.directed);\n this.frequentSubgraphs.push(clone(graph));\n };\n GSpan.prototype.subGraphMining = function (projected) {\n var _this = this;\n var support = this.getSupport(projected);\n if (support < this.minSupport) return;\n if (!this.isMin()) return;\n this.report();\n var nodeNum = this.dfsCode.getNodeNum();\n var rmpath = this.dfsCode.buildRmpath();\n var maxToC = this.dfsCode.dfsEdgeList[rmpath[0]].toNode;\n var minNodeLabel = this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var forwardRoot = {};\n var backwardRoot = {};\n projected.forEach(function (p) {\n var graph = _this.graphs[p.graphId];\n var nodeMap = graph.nodeMap;\n var history = new History(p);\n // backward Line 526\n for (var i = rmpath.length - 1; i >= 0; i--) {\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(backwardEdge.label);\n if (!backwardRoot[key]) backwardRoot[key] = {\n projected: [],\n toNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: backwardEdge.label\n };\n backwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: backwardEdge,\n preNode: p\n });\n }\n }\n // pure forward\n if (nodeNum >= _this.maxNodeNum) return;\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(maxToC, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: maxToC,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n var _loop_3 = function _loop_3(i) {\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[rmpath[i]], minNodeLabel, history);\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n };\n // rmpath forward\n for (var i = 0; i < rmpath.length; i++) {\n _loop_3(i);\n }\n });\n // backward\n Object.keys(backwardRoot).forEach(function (key) {\n var _a = backwardRoot[key],\n toNodeId = _a.toNodeId,\n edgeLabel = _a.edgeLabel;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(maxToC, toNodeId, \"-1\", edgeLabel, \"-1\"));\n _this.subGraphMining(backwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n // forward\n Object.keys(forwardRoot).forEach(function (key) {\n var _a = forwardRoot[key],\n fromNodeId = _a.fromNodeId,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(fromNodeId, maxToC + 1, VACANT_NODE_LABEL, edgeLabel, nodeLabel2));\n _this.subGraphMining(forwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n GSpan.prototype.generate1EdgeFrequentSubGraphs = function () {\n var graphs = this.graphs;\n var directed = this.directed;\n var minSupport = this.minSupport;\n var frequentSize1Subgraphs = this.frequentSize1Subgraphs;\n var nodeLabelCounter = {},\n nodeEdgeNodeCounter = {};\n // 保存各个图和各自节点的关系 map,key 格式为 graphKey-node类型\n var nodeLableCounted = {};\n // 保存各个图和各自边的关系 map,key 格式为 graphKey-fromNode类型-edge类型-toNode类型\n var nodeEdgeNodeLabelCounted = {};\n Object.keys(graphs).forEach(function (key) {\n // Line 271\n var graph = graphs[key];\n var nodeMap = graph.nodeMap;\n // 遍历节点,记录对应图 与 每个节点的 label 到 nodeLableCounted\n graph.nodes.forEach(function (node, i) {\n // Line 272\n var nodeLabel = node.label;\n var graphNodeKey = \"\".concat(key, \"-\").concat(nodeLabel);\n if (!nodeLableCounted[graphNodeKey]) {\n var counter = nodeLabelCounter[nodeLabel] || 0;\n counter++;\n nodeLabelCounter[nodeLabel] = counter;\n }\n nodeLableCounted[graphNodeKey] = {\n graphKey: key,\n label: nodeLabel\n };\n // 遍历该节点的所有边,记录各个图和各自边的关系到 nodeEdgeNodeLabelCounted. Line 276\n node.edges.forEach(function (edge) {\n var nodeLabel1 = nodeLabel;\n var nodeLabel2 = nodeMap[edge.to].label;\n if (!directed && nodeLabel1 > nodeLabel2) {\n var tmp = nodeLabel2;\n nodeLabel2 = nodeLabel1;\n nodeLabel1 = tmp;\n }\n var edgeLabel = edge.label;\n var graphNodeEdgeNodeKey = \"\".concat(key, \"-\").concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n var nodeEdgeNodeKey = \"\".concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n if (!nodeEdgeNodeCounter[nodeEdgeNodeKey]) {\n var counter = nodeEdgeNodeCounter[nodeEdgeNodeKey] || 0;\n counter++;\n nodeEdgeNodeCounter[nodeEdgeNodeKey] = counter; // Line281\n }\n\n nodeEdgeNodeLabelCounted[graphNodeEdgeNodeKey] = {\n graphId: key,\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n });\n });\n });\n // 计算频繁的节点\n Object.keys(nodeLabelCounter).forEach(function (label) {\n var count = nodeLabelCounter[label];\n if (count < minSupport) return;\n var g = {\n nodes: [],\n edges: []\n };\n g.nodes.push({\n id: \"0\",\n label: label\n });\n frequentSize1Subgraphs.push(g);\n // if (minNodeNum <= 1) reportSize1 TODO\n });\n\n return frequentSize1Subgraphs;\n };\n GSpan.prototype.run = function () {\n var _this = this;\n // -------- 第一步, _generate_1edge_frequent_subgraphs:频繁的单个节点-------\n this.frequentSize1Subgraphs = this.generate1EdgeFrequentSubGraphs();\n if (this.maxNodeNum < 2) return;\n var graphs = this.graphs;\n var directed = this.directed;\n // PDFS 数组的 map Line 304\n var root = {};\n Object.keys(graphs).forEach(function (graphId) {\n var graph = graphs[graphId];\n var nodeMap = graph.nodeMap;\n // Line 306\n graph.nodes.forEach(function (node) {\n var forwardRootEdges = _this.findForwardRootEdges(graph, node);\n // Line 308\n forwardRootEdges.forEach(function (edge) {\n var toNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(toNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: toNode.label\n };\n var pdfs = {\n graphId: graphId,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n });\n // Line 313\n Object.keys(root).forEach(function (nodeEdgeNodeLabel) {\n var _a = root[nodeEdgeNodeLabel],\n projected = _a.projected,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(0, 1, nodeLabel1, edgeLabel, nodeLabel2));\n _this.subGraphMining(projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n return GSpan;\n}();\nvar formatGraphs = function formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp) {\n var result = {};\n Object.keys(graphs).forEach(function (key, i) {\n var graph = graphs[key];\n var fGraph = new Graph(i, true, directed);\n var nodeIdxMap = {};\n graph.nodes.forEach(function (node, j) {\n fGraph.addNode(j, node[nodeLabelProp]);\n nodeIdxMap[node.id] = j;\n });\n graph.edges.forEach(function (edge, k) {\n var sourceIdx = nodeIdxMap[edge.source];\n var targetIdx = nodeIdxMap[edge.target];\n fGraph.addEdge(-1, sourceIdx, targetIdx, edge[edgeLabelProp]);\n });\n if (fGraph && fGraph.getNodeNum()) result[fGraph.id] = fGraph;\n });\n return result;\n};\nvar toGraphDatas = function toGraphDatas(graphs, nodeLabelProp, edgeLabelProp) {\n var result = [];\n graphs.forEach(function (graph) {\n var graphData = {\n nodes: [],\n edges: []\n };\n graph.nodes.forEach(function (node) {\n var _a;\n graphData.nodes.push((_a = {\n id: \"\".concat(node.id)\n }, _a[nodeLabelProp] = node.label, _a));\n });\n graph.edges.forEach(function (edge) {\n var _a;\n graphData.edges.push((_a = {\n source: \"\".concat(edge.from),\n target: \"\".concat(edge.to)\n }, _a[edgeLabelProp] = edge.label, _a));\n });\n result.push(graphData);\n });\n return result;\n};\nvar DEFAULT_LABEL_NAME = \"cluster\";\n/**\n * gSpan 频繁子图计算算法(frequent graph mining)\n * @param params 参数\n */\nvar gSpan = function gSpan(params) {\n // ------- 将图数据 GraphData 的 map 转换为格式 -------\n var graphs = params.graphs,\n _a = params.directed,\n directed = _a === void 0 ? false : _a,\n _b = params.nodeLabelProp,\n nodeLabelProp = _b === void 0 ? DEFAULT_LABEL_NAME : _b,\n _c = params.edgeLabelProp,\n edgeLabelProp = _c === void 0 ? DEFAULT_LABEL_NAME : _c;\n var formattedGraphs = formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp);\n var minSupport = params.minSupport,\n maxNodeNum = params.maxNodeNum,\n minNodeNum = params.minNodeNum,\n verbose = params.verbose,\n top = params.top;\n // ------- 初始化与执行算法 -------\n var algoParams = {\n graphs: formattedGraphs,\n minSupport: minSupport,\n maxNodeNum: maxNodeNum,\n minNodeNum: minNodeNum,\n top: top,\n verbose: verbose,\n directed: directed\n };\n var calculator = new GSpan(algoParams);\n calculator.run();\n var result = toGraphDatas(calculator.frequentSubgraphs, nodeLabelProp, edgeLabelProp);\n return result;\n};\nexport default gSpan;","import { __spreadArray } from \"tslib\";\nimport floydWarshall from './floydWarshall';\nimport gSpan from './gSpan/gSpan';\nimport dijkstra from './dijkstra';\nimport { uniqueId } from './util';\n/**\n * 为 graphData 中每个节点生成邻居单元数组\n * @param graphData\n * @param spm\n * @param nodeLabelProp\n * @param k k-近邻\n */\nvar findKNeighborUnits = function findKNeighborUnits(graphData, spm, nodeLabelProp, k) {\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (k === void 0) {\n k = 2;\n }\n var units = [];\n var nodes = graphData.nodes;\n spm.forEach(function (row, i) {\n units.push(findKNeighborUnit(nodes, row, i, nodeLabelProp, k));\n });\n return units;\n};\nvar findKNeighborUnit = function findKNeighborUnit(nodes, row, i, nodeLabelProp, k) {\n var unitNodeIdxs = [i];\n var neighbors = [];\n var labelCountMap = {};\n row.forEach(function (v, j) {\n if (v <= k && i !== j) {\n unitNodeIdxs.push(j);\n neighbors.push(nodes[j]);\n var label = nodes[j][nodeLabelProp];\n if (!labelCountMap[label]) labelCountMap[label] = {\n count: 1,\n dists: [v]\n };else {\n labelCountMap[label].count++;\n labelCountMap[label].dists.push(v);\n }\n }\n });\n // 将 labelCountMap 中的 dists 按照从小到大排序,方便后面使用\n Object.keys(labelCountMap).forEach(function (label) {\n labelCountMap[label].dists = labelCountMap[label].dists.sort(function (a, b) {\n return a - b;\n });\n });\n return {\n nodeIdx: i,\n nodeId: nodes[i].id,\n nodeIdxs: unitNodeIdxs,\n neighbors: neighbors,\n neighborNum: unitNodeIdxs.length - 1,\n nodeLabelCountMap: labelCountMap\n };\n};\n/**\n * 随机寻找点对,满足距离小于 k\n * @param k 参数 k,表示 k-近邻\n * @param nodeNum 参数 length\n * @param maxNodePairNum 寻找点对的数量不超过 maxNodePairNum\n * @param spm 最短路径矩阵\n */\nvar findNodePairsRandomly = function findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm) {\n // 每个节点需要随机找出的点对数\n var nodePairNumEachNode = Math.ceil(maxNodePairNum / nodeNum);\n var nodePairMap = {};\n var foundNodePairCount = 0;\n // 遍历节点,为每个节点随机找出 nodePairNumEachNode 个点对,满足距离小于 k。找到的点对数量超过 maxNodePairNum 或所有节点遍历结束时终止\n kNeighborUnits.forEach(function (unit, i) {\n // 若未达到 nodePairNumEachNode,或循环次数小于最大循环次数(2 * nodeNum),继续循环\n var nodePairForICount = 0;\n var outerLoopCount = 0;\n var neighbors = unit.nodeIdxs; // the first one is the center node\n var neighborNum = unit.neighborNum - 1;\n while (nodePairForICount < nodePairNumEachNode) {\n // 另一端节点在节点数组中的的 index\n var oidx = neighbors[1 + Math.floor(Math.random() * neighborNum)];\n var innerLoopCount = 0;\n // 若随机得到的另一端 idx 不符合条件,则继续 random。条件是不是同一个节点、这个点对没有被记录过、距离小于 k\n while (nodePairMap[\"\".concat(i, \"-\").concat(oidx)] || nodePairMap[\"\".concat(oidx, \"-\").concat(i)]) {\n oidx = Math.floor(Math.random() * nodeNum);\n innerLoopCount++;\n if (innerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n\n if (innerLoopCount < 2 * nodeNum) {\n // 未达到最大循环次数,说明找到了合适的另一端\n nodePairMap[\"\".concat(i, \"-\").concat(oidx)] = {\n start: i,\n end: oidx,\n distance: spm[i][oidx]\n };\n nodePairForICount++;\n foundNodePairCount++;\n // 如果当前找到的点对数量达到了上限,返回结果\n if (foundNodePairCount >= maxNodePairNum) return nodePairMap;\n }\n outerLoopCount++;\n if (outerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n // 这个节点没有找到足够 nodePairNumEachNode 的点对。更新 nodePairNumEachNode,让后续节点找更多的点对\n if (nodePairForICount < nodePairNumEachNode) {\n var gap = nodePairNumEachNode - nodePairForICount;\n nodePairNumEachNode = (nodePairNumEachNode + gap) / (nodeNum - i - 1);\n }\n });\n return nodePairMap;\n};\n/**\n * 计算所有 nodePairMap 中节点对的相交邻居诱导子图\n * @param nodePairMap 节点对 map,key 为 node1.id-node2.id,value 为 { startNodeIdx, endNodeIdx, distance }\n * @param neighborUnits 每个节点的邻居元数组\n * @param graphData 原图数据\n * @param edgeMap 边的 map,方便检索\n * @param cachedInducedGraphMap 缓存的结果,下次进入该函数将继续更新该缓存,若 key 在缓存中存在则不需要重复计算\n */\nvar getIntersectNeighborInducedGraph = function getIntersectNeighborInducedGraph(nodePairMap, neighborUnits, graphData, cachedInducedGraphMap) {\n var nodes = graphData.nodes;\n if (!cachedInducedGraphMap) cachedInducedGraphMap = {};\n Object.keys(nodePairMap).forEach(function (key) {\n var _a, _b;\n if (cachedInducedGraphMap && cachedInducedGraphMap[key]) return;\n cachedInducedGraphMap[key] = {\n nodes: [],\n edges: []\n };\n var pair = nodePairMap[key];\n var startUnitNodeIds = (_a = neighborUnits[pair.start]) === null || _a === void 0 ? void 0 : _a.nodeIdxs;\n var endUnitNodeIds = (_b = neighborUnits[pair.end]) === null || _b === void 0 ? void 0 : _b.nodeIdxs;\n if (!startUnitNodeIds || !endUnitNodeIds) return; // 不存在邻元,返回空图\n var endSet = new Set(endUnitNodeIds);\n var intersect = startUnitNodeIds.filter(function (x) {\n return endSet.has(x);\n }); // 可能会爆栈(在 1580 + 6 nodes full-connected 时出现)\n if (!intersect || !intersect.length) return; // 没有交集,返回空图\n var intersectIdMap = {};\n var intersectLength = intersect.length;\n for (var i = 0; i < intersectLength; i++) {\n var node = nodes[intersect[i]];\n cachedInducedGraphMap[key].nodes.push(node); // 将交集中的点加入诱导子图\n intersectIdMap[node.id] = true;\n }\n // 遍历所有边数据,如果边的两端都在交集中,将该边加入诱导子图\n graphData.edges.forEach(function (edge) {\n if (intersectIdMap[edge.source] && intersectIdMap[edge.target]) cachedInducedGraphMap[key].edges.push(edge);\n });\n });\n return cachedInducedGraphMap;\n};\n/**\n * 计算 strcutre 在 graph 上的匹配数量\n * @param graph 图数据\n * @param structure 目前支持只有两个节点一条边的最简单结构\n * @param nodeLabelProp 节点类型字段名\n * @param edgeLabelProp 边类型字段名\n */\nvar getMatchedCount = function getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp) {\n var _a, _b;\n var nodeMap = {};\n graph.nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var count = 0;\n if (!((_a = structure === null || structure === void 0 ? void 0 : structure.edges) === null || _a === void 0 ? void 0 : _a.length) || ((_b = structure === null || structure === void 0 ? void 0 : structure.nodes) === null || _b === void 0 ? void 0 : _b.length) < 2) return 0;\n graph.edges.forEach(function (e) {\n var sourceLabel = nodeMap[e.source][nodeLabelProp];\n var targetLabel = nodeMap[e.target][nodeLabelProp];\n var strNodeLabel1 = structure === null || structure === void 0 ? void 0 : structure.nodes[0][nodeLabelProp];\n var strNodeLabel2 = structure === null || structure === void 0 ? void 0 : structure.nodes[1][nodeLabelProp];\n var strEdgeLabel = structure === null || structure === void 0 ? void 0 : structure.edges[0][edgeLabelProp];\n if (e[edgeLabelProp] !== strEdgeLabel) return;\n if (sourceLabel === strNodeLabel1 && targetLabel === strNodeLabel2 || sourceLabel === strNodeLabel2 && targetLabel === strNodeLabel1) {\n count++;\n }\n });\n return count;\n};\n/**\n * structures 中寻找最具有代表性的一个。这个结构是使得 matchedCountMap 的分组方式类内间距最小,类间间距最大\n * @param matchedCountMap 每个 structure 分类后的各图匹配数量,格式 { [strcture.idx]: { [interInducedGraphKey]: count } }\n * @param structureNum strcuture 个数,与 matchedCountMap.length 对应\n * @param structures\n */\nvar findRepresentStructure = function findRepresentStructure(matchedCountMap, structureNum, structures) {\n var maxOffset = Infinity,\n representClusterType = 0;\n var _loop_1 = function _loop_1(i) {\n // 一种分组的 map,key 是 intGraph 的 key,value 是 structures[i] 的匹配个数\n var countMapI = matchedCountMap[i];\n // 按照 value 为该组排序,生成 keys 的数组:\n var sortedGraphKeys = Object.keys(countMapI).sort(function (a, b) {\n return countMapI[a] - countMapI[b];\n });\n // 共 100 个 graphKeys,将 graphKeys 按顺序分为 groupNum 组\n var groupNum = 10;\n var clusters = []; // 总共有 groupNum 个项\n sortedGraphKeys.forEach(function (key, j) {\n if (!clusters[j % groupNum]) clusters[j % groupNum] = {\n graphs: [],\n totalCount: 0,\n aveCount: 0\n };\n clusters[j % groupNum].graphs.push(key);\n clusters[j % groupNum].totalCount += countMapI[key];\n });\n // 计算 cluster 与 cluster 之间的距离 innerDist,每个 cluster 内部的距离 intraDist\n var aveIntraDist = 0; // 该类的类内平均值\n var aveCounts = []; // 类内平均匹配数量,将用于计算类间距离\n clusters.forEach(function (graphsInCluster) {\n // 类内均值\n var aveCount = graphsInCluster.totalCount / graphsInCluster.graphs.length;\n graphsInCluster.aveCount = aveCount;\n aveCounts.push(aveCount);\n // 对于每类,计算类内间距平均值\n var aveIntraPerCluster = 0;\n var graphsNum = graphsInCluster.length;\n graphsInCluster.graphs.forEach(function (graphKey1, j) {\n var graph1Count = countMapI[graphKey1];\n graphsInCluster.graphs.forEach(function (graphKey2, k) {\n if (j === k) return;\n aveIntraPerCluster += Math.abs(graph1Count - countMapI[graphKey2]);\n });\n });\n aveIntraPerCluster /= graphsNum * (graphsNum - 1) / 2;\n aveIntraDist += aveIntraPerCluster;\n });\n aveIntraDist /= clusters.length;\n // 用类内均值计算类间距\n var aveInterDist = 0; // 类间间距平均值\n aveCounts.forEach(function (aveCount1, j) {\n aveCounts.forEach(function (aveCount2, k) {\n if (j === k) return;\n aveInterDist += Math.abs(aveCount1 - aveCount2);\n });\n aveInterDist /= aveCounts.length * (aveCounts.length - 1) / 2;\n });\n // 寻找 (类间间距均值-类内间距均值) 最大的一种分组方式(对应的 structure 就是最终要找的唯一 DS(G))\n var offset = aveInterDist - aveIntraDist;\n if (maxOffset < offset) {\n maxOffset = offset;\n representClusterType = i;\n }\n };\n for (var i = 0; i < structureNum; i++) {\n _loop_1(i);\n }\n return {\n structure: structures[representClusterType],\n structureCountMap: matchedCountMap[representClusterType]\n };\n};\nvar getNodeMaps = function getNodeMaps(nodes, nodeLabelProp) {\n var nodeMap = {},\n nodeLabelMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = {\n idx: i,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var label = node[nodeLabelProp];\n if (!nodeLabelMap[label]) nodeLabelMap[label] = [];\n nodeLabelMap[label].push(node);\n });\n return {\n nodeMap: nodeMap,\n nodeLabelMap: nodeLabelMap\n };\n};\nvar getEdgeMaps = function getEdgeMaps(edges, edgeLabelProp, nodeMap) {\n var edgeMap = {},\n edgeLabelMap = {};\n edges.forEach(function (edge, i) {\n edgeMap[\"\".concat(uniqueId)] = {\n idx: i,\n edge: edge\n };\n var label = edge[edgeLabelProp];\n if (!edgeLabelMap[label]) edgeLabelMap[label] = [];\n edgeLabelMap[label].push(edge);\n var sourceNode = nodeMap[edge.source];\n if (sourceNode) {\n sourceNode.degree++;\n sourceNode.outDegree++;\n }\n var targetNode = nodeMap[edge.target];\n if (targetNode) {\n targetNode.degree++;\n targetNode.inDegree++;\n }\n });\n return {\n edgeMap: edgeMap,\n edgeLabelMap: edgeLabelMap\n };\n};\n/**\n * 输出最短路径的 map,key 为 sourceNode.id-targetNode.id,value 为这两个节点的最短路径长度\n * @param nodes\n * @param spm\n * @param directed\n */\nvar getSpmMap = function getSpmMap(nodes, spm, directed) {\n var length = spm.length;\n var map = {};\n spm.forEach(function (row, i) {\n var start = directed ? 0 : i + 1;\n var iId = nodes[i].id;\n for (var j = start; j < length; j++) {\n if (i === j) continue;\n var jId = nodes[j].id;\n var dist = row[j];\n map[\"\".concat(iId, \"-\").concat(jId)] = dist;\n if (!directed) map[\"\".concat(jId, \"-\").concat(iId)] = dist;\n }\n });\n return map;\n};\n/**\n * 计算一对节点(node1,node2)的 NDS 距离\n * @param graph 原图数据\n * @param node1\n * @param node2\n */\nvar getNDSDist = function getNDSDist(graph, node1, node2, nodeMap, spDist, kNeighborUnits, structure, nodeLabelProp, edgeLabelProp, cachedNDSMap, cachedInterInducedGraph) {\n var _a;\n var key = \"\".concat(node1.id, \"-\").concat(node2.id);\n if (cachedNDSMap && cachedNDSMap[key]) return cachedNDSMap[key];\n var interInducedGraph = cachedInterInducedGraph ? cachedInterInducedGraph[key] : undefined;\n // 若没有缓存相交邻居诱导子图,计算\n if (!interInducedGraph) {\n var pairMap = (_a = {}, _a[key] = {\n start: nodeMap[node1.id].idx,\n end: nodeMap[node2.id].idx,\n distance: spDist\n }, _a);\n cachedInterInducedGraph = getIntersectNeighborInducedGraph(pairMap, kNeighborUnits, graph, cachedInterInducedGraph);\n interInducedGraph = cachedInterInducedGraph[key];\n }\n return getMatchedCount(interInducedGraph, structure, nodeLabelProp, edgeLabelProp);\n};\n/**\n * 计算 pattern 上绩点的度数并存储到 minPatternNodeLabelDegreeMap\n */\nvar stashPatternNodeLabelDegreeMap = function stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap) {\n var _a, _b, _c;\n var minPatternNodeLabelDegree = (_a = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _a === void 0 ? void 0 : _a.degree;\n var minPatternNodeLabelInDegree = (_b = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _b === void 0 ? void 0 : _b.inDegree;\n var minPatternNodeLabelOutDegree = (_c = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _c === void 0 ? void 0 : _c.outDegree;\n if (minPatternNodeLabelDegreeMap[neighborLabel] === undefined) {\n minPatternNodeLabelDegree = Infinity;\n minPatternNodeLabelInDegree = Infinity;\n minPatternNodeLabelOutDegree = Infinity;\n patternNodeLabelMap[neighborLabel].forEach(function (patternNodeWithLabel) {\n var patternNodeDegree = patternNodeMap[patternNodeWithLabel.id].degree;\n if (minPatternNodeLabelDegree > patternNodeDegree) minPatternNodeLabelDegree = patternNodeDegree;\n var patternNodeInDegree = patternNodeMap[patternNodeWithLabel.id].inDegree;\n if (minPatternNodeLabelInDegree > patternNodeInDegree) minPatternNodeLabelInDegree = patternNodeInDegree;\n var patternNodeOutDegree = patternNodeMap[patternNodeWithLabel.id].outDegree;\n if (minPatternNodeLabelOutDegree > patternNodeOutDegree) minPatternNodeLabelOutDegree = patternNodeOutDegree;\n });\n minPatternNodeLabelDegreeMap[neighborLabel] = {\n degree: minPatternNodeLabelDegree,\n inDegree: minPatternNodeLabelInDegree,\n outDegree: minPatternNodeLabelOutDegree\n };\n }\n return {\n minPatternNodeLabelDegree: minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree: minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree: minPatternNodeLabelOutDegree\n };\n};\n/**\n * GADDI 模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nvar GADDI = function GADDI(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n var _a;\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n if (!graphData || !graphData.nodes) return;\n // 分为三步:\n // 0. 预计算:节点/边数,邻接矩阵、最短路径矩阵\n // 1. 处理原图 graphData。再分为 1~5 小步\n // 2. 匹配\n // console.log(\"----- stage-pre: preprocessing -------\");\n // -------- 第零步,预计算:节点/边数,邻接矩阵、最短路径矩阵-------\n var nodeNum = graphData.nodes.length;\n if (!nodeNum) return;\n // console.log(\"----- stage-pre.1: calc shortest path matrix for graph -------\");\n var spm = floydWarshall(graphData, directed);\n // console.log(\n // \"----- stage-pre.2: calc shortest path matrix for pattern -------\"\n // );\n var patternSpm = floydWarshall(pattern, directed);\n // console.log(\n // \"----- stage-pre.3: calc shortest path matrix map for graph -------\"\n // );\n var spmMap = getSpmMap(graphData.nodes, spm, directed);\n // console.log(\n // \"----- stage-pre.4: calc shortest path matrix map for pattern -------\"\n // );\n var patternSpmMap = getSpmMap(pattern.nodes, patternSpm, directed);\n // console.log(\"----- stage-pre.5: establish maps -------\");\n // 节点的 map,以 id 为 id 映射,方便后续快速检索\n var _b = getNodeMaps(graphData.nodes, nodeLabelProp),\n nodeMap = _b.nodeMap,\n nodeLabelMap = _b.nodeLabelMap;\n var _c = getNodeMaps(pattern.nodes, nodeLabelProp),\n patternNodeMap = _c.nodeMap,\n patternNodeLabelMap = _c.nodeLabelMap;\n // 计算节点度数\n getEdgeMaps(graphData.edges, edgeLabelProp, nodeMap);\n var patternEdgeLabelMap = getEdgeMaps(pattern.edges, edgeLabelProp, patternNodeMap).edgeLabelMap;\n // 若未指定 length,自动计算 pattern 半径(最短路径最大值)\n var patternSpmSpread = [];\n patternSpm === null || patternSpm === void 0 ? void 0 : patternSpm.forEach(function (row) {\n patternSpmSpread = patternSpmSpread.concat(row);\n });\n if (!length) length = Math.max.apply(Math, __spreadArray(__spreadArray([], patternSpmSpread, false), [2], false));\n if (!k) k = length;\n // console.log(\"params\", directed, length, k);\n // console.log(\"----- stage-pre.6: calc k neighbor units -------\");\n // 计算每个节点的 k 邻元集合\n var kNeighborUnits = findKNeighborUnits(graphData, spm, nodeLabelProp, k);\n var patternKNeighborUnits = findKNeighborUnits(pattern, patternSpm, nodeLabelProp, k);\n // console.log(\n // \"----- stage0: going to processing graph and find intersect neighbor induced graphs -------\"\n // );\n // console.log(\"----- stage0.1: going to select random node pairs -------\");\n // -------- 第一步,处理原图 graphData-------\n // 1.1. 随机选择最多 100 个点对,满足距离小于 Length 和 k\n // 当 graphData 少于 20 个节点,则不能找出 100 个点对,只找出不多于 n(n-1)/2 个点对\n var maxNodePairNum = Math.min(100, nodeNum * (nodeNum - 1) / 2);\n var nodePairsMap = findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm);\n // console.log(\n // \"----- stage0.2: going to calculate intersect neighbor induced graphs -------\"\n // );\n // 1.2. 生成上面节点对的相应相交邻居诱导子图。格式为 {'beginNodeIdx-endNodeIdx': {nodes: [], edges: []}}\n var intGMap = getIntersectNeighborInducedGraph(nodePairsMap, kNeighborUnits, graphData);\n // 1.3. 使用 gSpan 算法(frequent graph mining)计算 ISIntG 的前 10 个频率最高的子结构(3-4条边)\n var top = 10,\n minSupport = 1,\n minNodeNum = 1,\n maxNodeNum = 4;\n var params = {\n graphs: intGMap,\n nodeLabelProp: nodeLabelProp,\n edgeLabelProp: edgeLabelProp,\n minSupport: minSupport,\n minNodeNum: minNodeNum,\n maxNodeNum: maxNodeNum,\n directed: directed\n };\n // console.log(\n // \"----- stage1: (gSpan) going to find frequent structure dsG -------\"\n // );\n // console.log(\"----- stage1.1: going to run gSpan -------\");\n // 暂时假设生成的 sub structure 都只有一条边\n var freStructures = gSpan(params).slice(0, top);\n // structureNum 可能小于 top\n var structureNum = freStructures.length;\n // 1.4. 计算上述 10 个子结构在 intGMap 中每个诱导子图的匹配个数\n var matchedCountMap = [];\n freStructures.forEach(function (structure, i) {\n matchedCountMap[i] = {};\n Object.keys(intGMap).forEach(function (key) {\n var graph = intGMap[key];\n var subStructureCount = getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp);\n matchedCountMap[i][key] = subStructureCount;\n });\n });\n // console.log(\n // \"----- stage1.1: going to find the most represent strucutre -------\"\n // );\n // 1.5. 对于每个子结构,根据匹配个数为 intGMap 中的诱导子图分组,生成 structureNum 种分组\n // 计算每种分组的类间距和类内间距,找到类间距最大、类内间距最小的一种分组,这种分组对应的子结构被选为唯一代表性子结构 DS(G)\n var _d = findRepresentStructure(matchedCountMap, structureNum, freStructures),\n dsG = _d.structure,\n ndsDist = _d.structureCountMap;\n // -------- 第二步,匹配-------\n // 2.1 找到从 Q 中的一个节点作为起始节点,寻找 G 中的匹配。这个其实节点的标签可以在 G 中找到最多的节点\n var beginPNode = pattern.nodes[0],\n candidates = [],\n label = (_a = pattern.nodes[0]) === null || _a === void 0 ? void 0 : _a[nodeLabelProp],\n maxNodeNumWithSameLabel = -Infinity;\n pattern.nodes.forEach(function (node) {\n var pLabel = node[nodeLabelProp];\n var nodesWithSameLabel = nodeLabelMap[pLabel];\n if ((nodesWithSameLabel === null || nodesWithSameLabel === void 0 ? void 0 : nodesWithSameLabel.length) > maxNodeNumWithSameLabel) {\n maxNodeNumWithSameLabel = nodesWithSameLabel.length;\n candidates = nodesWithSameLabel;\n label = pLabel;\n beginPNode = node;\n }\n });\n // console.log(\"----- stage2: going to find candidates -------\");\n // 全局缓存,避免重复计算\n var minPatternNodeLabelDegreeMap = {}; // key 是 label,value 是该 label 节点的最小度数\n var patternIntGraphMap = {},\n patternNDSDist = {},\n // key 为 node.id-node.id\n patternNDSDistMap = {}; // key 为 node.id-label2,value nds距离值数组(按从大到小排序,无需关心具体对应哪个 node2)\n // 2.2.2 对于 Q 中的另一个标签的 k 个节点,计算它们到 node 的最短路径以及 NDS 距离\n var patternSpDist = {};\n var patternSpDistBack = {};\n Object.keys(patternNodeLabelMap).forEach(function (label2, j) {\n patternSpDist[label2] = [];\n if (directed) {\n patternSpDistBack[label2] = [];\n }\n var maxDist = -Infinity;\n var patternNodesWithLabel2 = patternNodeLabelMap[label2];\n var patternNodePairMap = {};\n patternNodesWithLabel2.forEach(function (nodeWithLabel2) {\n var dist = patternSpmMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)];\n dist && patternSpDist[label2].push(dist);\n if (maxDist < dist) maxDist = dist;\n patternNodePairMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)] = {\n start: 0,\n end: patternNodeMap[nodeWithLabel2.id].idx,\n distance: dist\n };\n if (directed) {\n var distBack = patternSpmMap[\"\".concat(nodeWithLabel2.id, \"-\").concat(beginPNode.id)];\n distBack && patternSpDistBack[label2].push(distBack);\n }\n });\n // spDist[label2] 按照从小到大排序\n patternSpDist[label2] = patternSpDist[label2].sort(function (a, b) {\n return a - b;\n });\n if (directed) patternSpDistBack[label2] = patternSpDistBack[label2].sort(function (a, b) {\n return a - b;\n });\n // 计算 Q 中所有 label2 节点到 beginPNode 的 NDS 距离\n // 所有 label2 节点到 beginPNode 的邻居相交诱导子图:\n // key: node1.id-node2.id\n patternIntGraphMap = getIntersectNeighborInducedGraph(patternNodePairMap, patternKNeighborUnits, pattern, patternIntGraphMap);\n // pattern 中 beginNode 到当前 label2 节点 的 NDS 距离(数组,无需关心具体对应到哪个节点)\n var currentPatternNDSDistArray = [];\n Object.keys(patternNodePairMap).forEach(function (key) {\n if (patternNDSDist[key]) {\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var patternIntGraph = patternIntGraphMap[key];\n patternNDSDist[key] = getMatchedCount(patternIntGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n });\n // 根据值为 currentPatternNDSDist 从大到小排序\n currentPatternNDSDistArray = currentPatternNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n patternNDSDistMap[\"\".concat(beginPNode.id, \"-\").concat(label2)] = currentPatternNDSDistArray;\n if (label2 === label) return;\n var candidatesNum = (candidates === null || candidates === void 0 ? void 0 : candidates.length) || 0;\n var _loop_4 = function _loop_4(m) {\n var cNode = candidates[m];\n // prune1:若 candidates 中节点 cNode 的 kNeighborUnits 中标签为 label2 的节点个数少于 pattern 中 label2 个数,删去它\n var graphNeighborUnit = kNeighborUnits[nodeMap[cNode.id].idx];\n var graphNeighborUnitCountMap = graphNeighborUnit.nodeLabelCountMap[label2];\n var patternLabel2Num = patternNodeLabelMap[label2].length;\n if (!graphNeighborUnitCountMap || graphNeighborUnitCountMap.count < patternLabel2Num) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune2:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点最短路径大于 patternSpDist[label2],删去它\n // (prune2 规则即:candidate 相关的最短路径的最大 spDist[label2].length 个,按照大小顺序依次和 patternSpDist[label2] 中的值比较,只要遇到一个是 G > Q 的,就删去这个 candidate)\n var prune2Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (graphNeighborUnitCountMap.dists[n] > patternSpDist[label2][n]) {\n prune2Invalid = true;\n break;\n }\n }\n if (prune2Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune3:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点 NDS 距离小于 patternNDSDist[beginNode.id-label2],删去它\n // TODO:prune3,currentPatternNDSDistArray 与 currentNDSDist 的比较\n // 计算 G 中所有 label2 节点到 cNode 的 NDS 距离\n // 所有 label2 节点到 cNode 的邻居相交诱导子图:\n var cNodePairMap = {};\n graphNeighborUnit.neighbors.forEach(function (neighborNode) {\n var dist = spmMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)];\n cNodePairMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)] = {\n start: nodeMap[cNode.id].idx,\n end: nodeMap[neighborNode.id].idx,\n distance: dist\n };\n });\n // 更新 intGMap\n intGMap = getIntersectNeighborInducedGraph(cNodePairMap, kNeighborUnits, graphData, intGMap);\n // candidate 到它周围 label2 节点的 NDS 距离, key 是 node.id-node.id\n var currentNDSDistArray = [];\n Object.keys(cNodePairMap).forEach(function (key) {\n if (ndsDist[key]) {\n currentNDSDistArray.push(ndsDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var intGraph = intGMap[key];\n ndsDist[key] = getMatchedCount(intGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentNDSDistArray.push(ndsDist[key]);\n });\n // 根据值为 currentNDSDistArray 从大到小排序\n currentNDSDistArray = currentNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n var prune3Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (currentNDSDistArray[n] < currentPatternNDSDistArray[n]) {\n prune3Invalid = true;\n break;\n }\n }\n if (prune3Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n };\n for (var m = candidatesNum - 1; m >= 0; m--) {\n _loop_4(m);\n }\n });\n var candidateGraphs = [];\n // console.log(\n // \"----- stage3: going to splice neighbors for each candidate graph -------\"\n // );\n // candidates 经过筛选后,以每个 candidate 为中心,生成 Length-neighbor 的邻居诱导子图\n // 并在诱导子图中去除不可能在 Q 上找到匹配的点:在 Q 上不存在的 label,其他 label 到 candidate 的最大最短距离符合 Q、NDS 距离符合 Q\n candidates === null || candidates === void 0 ? void 0 : candidates.forEach(function (candidate) {\n var nodeIdx = nodeMap[candidate.id].idx;\n var lengthNeighborUnit = findKNeighborUnit(graphData.nodes, spm[nodeIdx], nodeIdx, nodeLabelProp, length);\n var neighborNodes = lengthNeighborUnit.neighbors;\n // 删除不可能找到匹配的邻居点\n var neighborNum = neighborNodes.length;\n var unmatched = false;\n for (var i = neighborNum - 1; i >= 0; i--) {\n // 如果通过裁剪,符合条件的节点数量已过少,说明不能匹配这个 candidate 相关的图\n if (neighborNodes.length + 1 < pattern.nodes.length) {\n unmatched = true;\n return;\n }\n var neighborNode = neighborNodes[i];\n var neighborLabel = neighborNode[nodeLabelProp];\n // prune1: 若该邻居点的 label 不存在于 pattern 中,移除这个点\n if (!patternNodeLabelMap[neighborLabel] || !patternNodeLabelMap[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune2: 若该邻居点到 candidate 的最短路径比和它有相同 label 的节点到 beginPNode 的最大最短路径长度长,移除这个点\n // prune2.1: 如果没有这个标签到 beginPNode 的距离记录,说明 pattern 上(可能 beginPNode 是这个 label)没有其他这个 label 的节点\n if (!patternSpDist[neighborLabel] || !patternSpDist[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n var key = \"\".concat(candidate.id, \"-\").concat(neighborNode.id);\n // prune2.2\n var distToCandidate = spmMap[key];\n var idx = patternSpDist[neighborLabel].length - 1;\n var maxDistWithLabelInPattern = patternSpDist[neighborLabel][idx]; // patternSpDist[neighborLabel] 已经按照从小到大排序\n if (distToCandidate > maxDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n if (directed) {\n var keyBack = \"\".concat(neighborNode.id, \"-\").concat(candidate.id);\n var distFromCandidate = spmMap[keyBack];\n idx = patternSpDistBack[neighborLabel].length - 1;\n var maxBackDistWithLabelInPattern = patternSpDistBack[neighborLabel][idx];\n if (distFromCandidate > maxBackDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // prune3: 若该邻居点到 candidate 的 NDS 距离比和它有相同 label 的节点到 beginPNode 的最小 NDS 距离小,移除这个点\n var ndsToCandidate = ndsDist[key] ? ndsDist[key] : getNDSDist(graphData, candidate, neighborNode, nodeMap, distToCandidate, kNeighborUnits, dsG, nodeLabelProp, edgeLabelProp, ndsDist, intGMap);\n var patternKey = \"\".concat(beginPNode.id, \"-\").concat(neighborLabel);\n var minNdsWithLabelInPattern = patternNDSDistMap[patternKey][patternNDSDistMap[patternKey].length - 1]; // patternNDSDist[key] 一定存在\n if (ndsToCandidate < minNdsWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune4: 若该邻居点的度数小于 pattern 同 label 节点最小度数,删去该点\n var _a = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _a.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _a.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _a.minPatternNodeLabelOutDegree;\n if (nodeMap[neighborNode.id].degree < minPatternNodeLabelDegree) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // 节点在个数上符合匹配(不少于 pattern 的节点个数),现在筛选相关边\n if (!unmatched) {\n candidateGraphs.push({\n nodes: [candidate].concat(neighborNodes)\n });\n }\n });\n // console.log(\n // \"----- stage4: going to splice edges and neighbors for each candidate graph -------\"\n // );\n var undirectedLengthsToBeginPNode = dijkstra(pattern, beginPNode.id, false).length;\n var undirectedLengthsToBeginPNodeLabelMap = {};\n if (directed) {\n Object.keys(undirectedLengthsToBeginPNode).forEach(function (nodeId) {\n var nodeLabel = patternNodeMap[nodeId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nodeLabel]) undirectedLengthsToBeginPNodeLabelMap[nodeLabel] = [undirectedLengthsToBeginPNode[nodeId]];else undirectedLengthsToBeginPNodeLabelMap[nodeLabel].push(undirectedLengthsToBeginPNode[nodeId]);\n });\n Object.keys(undirectedLengthsToBeginPNodeLabelMap).forEach(function (pLabel) {\n undirectedLengthsToBeginPNodeLabelMap[pLabel].sort(function (a, b) {\n return a - b;\n });\n });\n } else {\n undirectedLengthsToBeginPNodeLabelMap = patternSpDist;\n }\n // 现在 candidateGraphs 里面只有节点,进行边的筛选\n var candidateGraphNum = candidateGraphs.length;\n var _loop_2 = function _loop_2(i) {\n var candidateGraph = candidateGraphs[i];\n var candidate = candidateGraph.nodes[0];\n var candidateNodeLabelCountMap = {};\n var candidateNodeMap = {};\n candidateGraph.nodes.forEach(function (node, q) {\n candidateNodeMap[node.id] = {\n idx: q,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var cNodeLabel = node[nodeLabelProp];\n if (!candidateNodeLabelCountMap[cNodeLabel]) candidateNodeLabelCountMap[cNodeLabel] = 1;else candidateNodeLabelCountMap[cNodeLabel]++;\n });\n // 根据 candidate 和 neighborNodes 中的节点生成 G 的诱导子图\n // 即,将 graphData 上两端都在 candidateGraph.nodes 中的边放入 candidateEdges\n var candidateEdges = [];\n var edgeLabelCountMap = {};\n graphData.edges.forEach(function (edge) {\n if (candidateNodeMap[edge.source] && candidateNodeMap[edge.target]) {\n candidateEdges.push(edge);\n if (!edgeLabelCountMap[edge[edgeLabelProp]]) edgeLabelCountMap[edge[edgeLabelProp]] = 1;else edgeLabelCountMap[edge[edgeLabelProp]]++;\n candidateNodeMap[edge.source].degree++;\n candidateNodeMap[edge.target].degree++;\n candidateNodeMap[edge.source].outDegree++;\n candidateNodeMap[edge.target].inDegree++;\n }\n });\n // prune:若有一个 edgeLabel 在 candidateGraph 上的个数少于 pattern,去除该图\n var pattenrEdgeLabelNum = Object.keys(patternEdgeLabelMap).length;\n var prunedByEdgeLabel = false;\n for (var e = 0; e < pattenrEdgeLabelNum; e++) {\n var label_1 = Object.keys(patternEdgeLabelMap)[e];\n if (!edgeLabelCountMap[label_1] || edgeLabelCountMap[label_1] < patternEdgeLabelMap[label_1].length) {\n prunedByEdgeLabel = true;\n break;\n }\n }\n if (prunedByEdgeLabel) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // 遍历 candidateEdges,进行边的筛选\n var candidateEdgeNum = candidateEdges.length;\n // prune:若边数过少,去除该图\n if (candidateEdgeNum < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"break\";\n }\n var candidateGraphInvalid = false;\n var _loop_5 = function _loop_5(e) {\n var edge = candidateEdges[e];\n var edgeLabel = edge[edgeLabelProp];\n var patternEdgesWithLabel = patternEdgeLabelMap[edgeLabel];\n // prune 1: 若边的 label 不存在于 pattern 边 label 中,去除该边\n if (!patternEdgesWithLabel || !patternEdgesWithLabel.length) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n // prune 2: 若边的 label +两端 label 的三元组关系不能在 pattern 中找到,去除该边\n var sourceLabel = candidateNodeMap[edge.source].node[nodeLabelProp];\n var targetLabel = candidateNodeMap[edge.target].node[nodeLabelProp];\n var edgeMatched = false;\n patternEdgesWithLabel.forEach(function (patternEdge) {\n var patternSource = patternNodeMap[patternEdge.source].node;\n var patternTarget = patternNodeMap[patternEdge.target].node;\n if (patternSource[nodeLabelProp] === sourceLabel && patternTarget[nodeLabelProp] === targetLabel) edgeMatched = true;\n if (!directed && patternSource[nodeLabelProp] === targetLabel && patternTarget[nodeLabelProp] === sourceLabel) edgeMatched = true;\n });\n if (!edgeMatched) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n };\n for (var e = candidateEdgeNum - 1; e >= 0; e--) {\n var state_2 = _loop_5(e);\n if (state_2 === \"break\") break;\n }\n // prune2: 删除边的过程中,发现边数过少/边 label 数过少时,去除该图\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n candidateGraph.edges = candidateEdges;\n var lengthsToCandidate = dijkstra(candidateGraph, candidateGraph.nodes[0].id, false).length;\n Object.keys(lengthsToCandidate).reverse().forEach(function (targetId) {\n if (targetId === candidateGraph.nodes[0].id || candidateGraphInvalid) return;\n // prune4: 通过上述裁剪,可能导致该邻居子图变为不连通。裁剪掉目前在这个邻居子图中和 candidate(第一个节点)不连通的节点\n if (lengthsToCandidate[targetId] === Infinity) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n return;\n }\n // prune5: 经过边裁剪后,可能又出现了最短路径过长的节点 (比 pattern 中同 label 的节点到 beginNode 最大最短距离远),删去这些节点\n var nLabel = nodeMap[targetId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nLabel] || !undirectedLengthsToBeginPNodeLabelMap[nLabel].length || lengthsToCandidate[targetId] > undirectedLengthsToBeginPNodeLabelMap[nLabel][undirectedLengthsToBeginPNodeLabelMap[nLabel].length - 1]) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n }\n });\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n var degreeChanged = true;\n var loopCount = 0;\n while (degreeChanged && !candidateGraphInvalid) {\n degreeChanged = false;\n // candidate 度数不足,删去该图\n var condition = directed ? candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree || candidateNodeMap[candidate.id].inDegree < patternNodeMap[beginPNode.id].inDegree || candidateNodeMap[candidate.id].outDegree < patternNodeMap[beginPNode.id].outDegree : candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree;\n if (condition) {\n candidateGraphInvalid = true;\n break;\n }\n // candidate label 个数不足,删去该图\n if (candidateNodeLabelCountMap[candidate[nodeLabelProp]] < patternNodeLabelMap[candidate[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n // prune6:去除度数过小的节点\n var currentCandidateNodeNum = candidateGraph.nodes.length;\n for (var o = currentCandidateNodeNum - 1; o >= 0; o--) {\n var cgNode = candidateGraph.nodes[o];\n var nodeDegree = candidateNodeMap[cgNode.id].degree;\n var nodeInDegree = candidateNodeMap[cgNode.id].inDegree;\n var nodeOutDegree = candidateNodeMap[cgNode.id].outDegree;\n var cNodeLabel = cgNode[nodeLabelProp];\n var _e = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, cNodeLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _e.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _e.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _e.minPatternNodeLabelOutDegree;\n var deleteCondition = directed ? nodeDegree < minPatternNodeLabelDegree || nodeInDegree < minPatternNodeLabelInDegree || nodeOutDegree < minPatternNodeLabelOutDegree : nodeDegree < minPatternNodeLabelDegree;\n if (deleteCondition) {\n candidateNodeLabelCountMap[cgNode[nodeLabelProp]]--;\n // 节点 label 个数不足\n if (candidateNodeLabelCountMap[cgNode[nodeLabelProp]] < patternNodeLabelMap[cgNode[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n candidateGraph.nodes.splice(o, 1);\n candidateNodeMap[cgNode.id] = undefined;\n degreeChanged = true;\n }\n }\n if (candidateGraphInvalid || !degreeChanged && loopCount !== 0) break;\n // 经过 prune5 节点裁剪,删去端点已经不在 candidateGraph 中的边\n candidateEdgeNum = candidateEdges.length;\n for (var y = candidateEdgeNum - 1; y >= 0; y--) {\n var cedge = candidateEdges[y];\n if (!candidateNodeMap[cedge.source] || !candidateNodeMap[cedge.target]) {\n candidateEdges.splice(y, 1);\n var edgeLabel = cedge[edgeLabelProp];\n edgeLabelCountMap[edgeLabel]--;\n if (candidateNodeMap[cedge.source]) {\n candidateNodeMap[cedge.source].degree--;\n candidateNodeMap[cedge.source].outDegree--;\n }\n if (candidateNodeMap[cedge.target]) {\n candidateNodeMap[cedge.target].degree--;\n candidateNodeMap[cedge.target].inDegree--;\n }\n // 边 label 数量不足\n if (patternEdgeLabelMap[edgeLabel] && edgeLabelCountMap[edgeLabel] < patternEdgeLabelMap[edgeLabel].length) {\n candidateGraphInvalid = true;\n break;\n }\n degreeChanged = true;\n }\n }\n loopCount++;\n }\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // prune: 若节点/边数过少,节点/边 label 过少,去掉这个图\n if (candidateGraphInvalid || candidateGraph.nodes.length < pattern.nodes.length || candidateEdges.length < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n };\n for (var i = candidateGraphNum - 1; i >= 0; i--) {\n var state_1 = _loop_2(i);\n if (state_1 === \"break\") break;\n }\n // 此时已经生成的多个 candidateGraphs,可能有重复\n // console.log(\n // \"----- stage5: going to splice dulplicated candidate graphs -------\"\n // );\n // 删去 candidateGraphs 中一模一样的子图,通过边的 node-node-edgeLabel 作为 key,这类边个数作为 value,进行匹配\n var currentLength = candidateGraphs.length;\n var _loop_3 = function _loop_3(i) {\n var cg1 = candidateGraphs[i];\n var cg1EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg1.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg1EdgeMap[key]) cg1EdgeMap[key] = 1;else cg1EdgeMap[key]++;\n });\n var _loop_6 = function _loop_6(j) {\n var cg2 = candidateGraphs[j];\n var cg2EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg2.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg2EdgeMap[key]) cg2EdgeMap[key] = 1;else cg2EdgeMap[key]++;\n });\n var same = true;\n if (Object.keys(cg2EdgeMap).length !== Object.keys(cg1EdgeMap).length) {\n same = false;\n } else {\n Object.keys(cg1EdgeMap).forEach(function (key) {\n if (cg2EdgeMap[key] !== cg1EdgeMap[key]) same = false;\n });\n }\n if (same) {\n candidateGraphs.splice(j, 1);\n }\n };\n for (var j = currentLength - 1; j > i; j--) {\n _loop_6(j);\n }\n currentLength = candidateGraphs.length;\n };\n for (var i = 0; i <= currentLength - 1; i++) {\n _loop_3(i);\n }\n return candidateGraphs;\n};\nexport default GADDI;","import LinkedList from './linked-list';\nvar Stack = /** @class */function () {\n function Stack(maxStep) {\n if (maxStep === void 0) {\n maxStep = 10;\n }\n this.linkedList = new LinkedList();\n this.maxStep = maxStep;\n }\n Object.defineProperty(Stack.prototype, \"length\", {\n get: function get() {\n return this.linkedList.toArray().length;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * 判断栈是否为空,如果链表中没有头部元素,则栈为空\n */\n Stack.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 是否到定义的栈的最大长度,如果达到最大长度后,不再允许入栈\n */\n Stack.prototype.isMaxStack = function () {\n return this.toArray().length >= this.maxStep;\n };\n /**\n * 访问顶端元素\n */\n Stack.prototype.peek = function () {\n if (this.isEmpty()) {\n return null;\n }\n // 返回头部元素,不删除元素\n return this.linkedList.head.value;\n };\n Stack.prototype.push = function (value) {\n this.linkedList.prepend(value);\n if (this.length > this.maxStep) {\n this.linkedList.deleteTail();\n }\n };\n Stack.prototype.pop = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Stack.prototype.toArray = function () {\n return this.linkedList.toArray().map(function (node) {\n return node.value;\n });\n };\n Stack.prototype.clear = function () {\n while (!this.isEmpty()) {\n this.pop();\n }\n };\n return Stack;\n}();\nexport default Stack;","import getAdjMatrix from './adjacent-matrix';\nimport breadthFirstSearch from './bfs';\nimport connectedComponent from './connected-component';\nimport getDegree from './degree';\nimport { getInDegree, getOutDegree } from './degree';\nimport detectCycle, { detectAllCycles, detectAllDirectedCycle, detectAllUndirectedCycle } from './detect-cycle';\nimport depthFirstSearch from './dfs';\nimport dijkstra from './dijkstra';\nimport { findAllPath, findShortestPath } from './find-path';\nimport floydWarshall from './floydWarshall';\nimport labelPropagation from './label-propagation';\nimport louvain from './louvain';\nimport iLouvain from './i-louvain';\nimport kCore from './k-core';\nimport kMeans from './k-means';\nimport cosineSimilarity from './cosine-similarity';\nimport nodesCosineSimilarity from './nodes-cosine-similarity';\nimport minimumSpanningTree from './mts';\nimport pageRank from './pageRank';\nimport GADDI from './gaddi';\nimport Stack from './structs/stack';\nimport { getNeighbors } from './util';\nvar detectDirectedCycle = detectCycle;\nexport { getAdjMatrix, breadthFirstSearch, connectedComponent, getDegree, getInDegree, getOutDegree, detectCycle, detectDirectedCycle, detectAllCycles, detectAllDirectedCycle, detectAllUndirectedCycle, depthFirstSearch, dijkstra, findAllPath, findShortestPath, floydWarshall, labelPropagation, louvain, iLouvain, kCore, kMeans, cosineSimilarity, nodesCosineSimilarity, minimumSpanningTree, pageRank, getNeighbors, Stack, GADDI };\nexport default {\n getAdjMatrix: getAdjMatrix,\n breadthFirstSearch: breadthFirstSearch,\n connectedComponent: connectedComponent,\n getDegree: getDegree,\n getInDegree: getInDegree,\n getOutDegree: getOutDegree,\n detectCycle: detectCycle,\n detectDirectedCycle: detectDirectedCycle,\n detectAllCycles: detectAllCycles,\n detectAllDirectedCycle: detectAllDirectedCycle,\n detectAllUndirectedCycle: detectAllUndirectedCycle,\n depthFirstSearch: depthFirstSearch,\n dijkstra: dijkstra,\n findAllPath: findAllPath,\n findShortestPath: findShortestPath,\n floydWarshall: floydWarshall,\n labelPropagation: labelPropagation,\n louvain: louvain,\n iLouvain: iLouvain,\n kCore: kCore,\n kMeans: kMeans,\n cosineSimilarity: cosineSimilarity,\n nodesCosineSimilarity: nodesCosineSimilarity,\n minimumSpanningTree: minimumSpanningTree,\n pageRank: pageRank,\n getNeighbors: getNeighbors,\n Stack: Stack,\n GADDI: GADDI\n};","import { mat3, vec3, ext, vec2 } from '@antv/matrix-util';\nimport { isArray, each } from '@antv/util';\nvar transform = ext.transform;\n/**\n * 对比对象,用于对象数组排序\n * @param {string} attributeName 排序依据的字段名称\n * @param {number} min 最小值\n * @param {number} max 最大值\n * @return {boolean} bool 布尔\n */\nexport var compare = function compare(attributeName) {\n return function (m, n) {\n return m[attributeName] - n[attributeName];\n };\n};\n/**\n * 是否在区间内\n * @param {number} value 值\n * @param {number} min 最小值\n * @param {number} max 最大值\n * @return {boolean} bool 布尔\n */\nvar isBetween = function isBetween(value, min, max) {\n return value >= min && value <= max;\n};\n/**\n * 获取两条线段的交点\n * @param {Point} p0 第一条线段起点\n * @param {Point} p1 第一条线段终点\n * @param {Point} p2 第二条线段起点\n * @param {Point} p3 第二条线段终点\n * @return {Point} 交点\n */\nexport var getLineIntersect = function getLineIntersect(p0, p1, p2, p3) {\n var tolerance = 0.0001;\n var E = {\n x: p2.x - p0.x,\n y: p2.y - p0.y\n };\n var D0 = {\n x: p1.x - p0.x,\n y: p1.y - p0.y\n };\n var D1 = {\n x: p3.x - p2.x,\n y: p3.y - p2.y\n };\n var kross = D0.x * D1.y - D0.y * D1.x;\n var sqrKross = kross * kross;\n var invertKross = 1 / kross;\n var sqrLen0 = D0.x * D0.x + D0.y * D0.y;\n var sqrLen1 = D1.x * D1.x + D1.y * D1.y;\n if (sqrKross > tolerance * sqrLen0 * sqrLen1) {\n var s = (E.x * D1.y - E.y * D1.x) * invertKross;\n var t = (E.x * D0.y - E.y * D0.x) * invertKross;\n if (!isBetween(s, 0, 1) || !isBetween(t, 0, 1)) return null;\n return {\n x: p0.x + s * D0.x,\n y: p0.y + s * D0.y\n };\n }\n return null;\n};\n/**\n * point and rectangular intersection point\n * @param {IRect} rect rect\n * @param {Point} point point\n * @return {PointPoint} rst;\n */\nexport var getRectIntersectByPoint = function getRectIntersectByPoint(rect, point) {\n var x = rect.x,\n y = rect.y,\n width = rect.width,\n height = rect.height;\n var cx = x + width / 2;\n var cy = y + height / 2;\n var points = [];\n var center = {\n x: cx,\n y: cy\n };\n points.push({\n x: x,\n y: y\n });\n points.push({\n x: x + width,\n y: y\n });\n points.push({\n x: x + width,\n y: y + height\n });\n points.push({\n x: x,\n y: y + height\n });\n points.push({\n x: x,\n y: y\n });\n var rst = null;\n for (var i = 1; i < points.length; i++) {\n rst = getLineIntersect(points[i - 1], points[i], center, point);\n if (rst) {\n break;\n }\n }\n return rst;\n};\n/**\n * get point and circle inIntersect\n * @param {ICircle} circle 圆点,x,y,r\n * @param {Point} point 点 x,y\n * @return {Point} applied point\n */\nexport var getCircleIntersectByPoint = function getCircleIntersectByPoint(circle, point) {\n var cx = circle.x,\n cy = circle.y,\n r = circle.r;\n var x = point.x,\n y = point.y;\n var dx = x - cx;\n var dy = y - cy;\n if (dx * dx + dy * dy < r * r) {\n return null;\n }\n var angle = Math.atan(dy / dx);\n return {\n x: cx + Math.abs(r * Math.cos(angle)) * Math.sign(dx),\n y: cy + Math.abs(r * Math.sin(angle)) * Math.sign(dy)\n };\n};\n/**\n * get point and ellipse inIntersect\n * @param {Object} ellipse 椭圆 x,y,rx,ry\n * @param {Object} point 点 x,y\n * @return {object} applied point\n */\nexport var getEllipseIntersectByPoint = function getEllipseIntersectByPoint(ellipse, point) {\n var a = ellipse.rx;\n var b = ellipse.ry;\n var cx = ellipse.x;\n var cy = ellipse.y;\n var dx = point.x - cx;\n var dy = point.y - cy;\n // 直接通过 x,y 求夹角,求出来的范围是 -PI, PI\n var angle = Math.atan2(dy / b, dx / a);\n if (angle < 0) {\n angle += 2 * Math.PI; // 转换到 0,2PI\n }\n\n return {\n x: cx + a * Math.cos(angle),\n y: cy + b * Math.sin(angle)\n };\n};\n/**\n * coordinate matrix transformation\n * @param {number} point coordinate\n * @param {Matrix} matrix matrix\n * @param {number} tag could be 0 or 1\n * @return {Point} transformed point\n */\nexport var applyMatrix = function applyMatrix(point, matrix, tag) {\n if (tag === void 0) {\n tag = 1;\n }\n var vector = [point.x, point.y, tag];\n if (!matrix || isNaN(matrix[0])) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n vec3.transformMat3(vector, vector, matrix);\n return {\n x: vector[0],\n y: vector[1]\n };\n};\n/**\n * coordinate matrix invert transformation\n * @param {number} point coordinate\n * @param {number} matrix matrix\n * @param {number} tag could be 0 or 1\n * @return {object} transformed point\n */\nexport var invertMatrix = function invertMatrix(point, matrix, tag) {\n if (tag === void 0) {\n tag = 1;\n }\n if (!matrix || isNaN(matrix[0])) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var inversedMatrix = mat3.invert([1, 0, 0, 0, 1, 0, 0, 0, 1], matrix);\n if (!inversedMatrix) {\n inversedMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var vector = [point.x, point.y, tag];\n vec3.transformMat3(vector, vector, inversedMatrix);\n return {\n x: vector[0],\n y: vector[1]\n };\n};\n/**\n *\n * @param p1 First coordinate\n * @param p2 second coordinate\n * @param p3 three coordinate\n */\nexport var getCircleCenterByPoints = function getCircleCenterByPoints(p1, p2, p3) {\n var a = p1.x - p2.x;\n var b = p1.y - p2.y;\n var c = p1.x - p3.x;\n var d = p1.y - p3.y;\n var e = (p1.x * p1.x - p2.x * p2.x - p2.y * p2.y + p1.y * p1.y) / 2;\n var f = (p1.x * p1.x - p3.x * p3.x - p3.y * p3.y + p1.y * p1.y) / 2;\n var denominator = b * c - a * d;\n return {\n x: -(d * e - b * f) / denominator,\n y: -(a * f - c * e) / denominator\n };\n};\n/**\n * get distance by two points\n * @param p1 first point\n * @param p2 second point\n */\nexport var distance = function distance(p1, p2) {\n var vx = p1.x - p2.x;\n var vy = p1.y - p2.y;\n return Math.sqrt(vx * vx + vy * vy);\n};\n/**\n * scale matrix\n * @param matrix [ [], [], [] ]\n * @param ratio\n */\nexport var scaleMatrix = function scaleMatrix(matrix, ratio) {\n var result = [];\n matrix.forEach(function (row) {\n var newRow = [];\n row.forEach(function (v) {\n newRow.push(v * ratio);\n });\n result.push(newRow);\n });\n return result;\n};\n/**\n * Floyd Warshall algorithm for shortest path distances matrix\n * @param {array} adjMatrix adjacency matrix\n * @return {array} distances shortest path distances matrix\n */\nexport var floydWarshall = function floydWarshall(adjMatrix) {\n // initialize\n var dist = [];\n var size = adjMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjMatrix[i][j] === 0 || !adjMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\n/**\n * get adjacency matrix\n * @param data graph data\n * @param directed whether it's a directed graph\n */\nexport var getAdjMatrix = function getAdjMatrix(data, directed) {\n var nodes = data.nodes,\n edges = data.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error('invalid nodes data!');\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (e) {\n var source = e.source,\n target = e.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\n/**\n * 平移group\n * @param group Group 实例\n * @param vec 移动向量\n */\nexport var translate = function translate(group, vec) {\n group.translate(vec.x, vec.y);\n};\n/**\n * 移动到指定坐标点\n * @param group Group 实例\n * @param point 移动到的坐标点\n */\nexport var move = function move(group, point, animate, animateCfg) {\n if (animateCfg === void 0) {\n animateCfg = {\n duration: 500\n };\n }\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var bbox = group.getCanvasBBox();\n var vx = point.x - bbox.minX;\n var vy = point.y - bbox.minY;\n if (animate) {\n var dx_1 = vx * matrix[0];\n var dy_1 = vy * matrix[4];\n var lastX_1 = 0;\n var lastY_1 = 0;\n var newX_1 = 0;\n var newY_1 = 0;\n group.animate(function (ratio) {\n newX_1 = dx_1 * ratio;\n newY_1 = dy_1 * ratio;\n matrix = transform(matrix, [['t', newX_1 - lastX_1, newY_1 - lastY_1]]);\n lastX_1 = newX_1;\n lastY_1 = newY_1;\n return {\n matrix: matrix\n };\n }, animateCfg);\n } else {\n var movedMatrix = transform(matrix, [['t', vx, vy]]);\n group.setMatrix(movedMatrix);\n }\n};\n/**\n * 缩放 group\n * @param group Group 实例\n * @param point 在x 和 y 方向上的缩放比例\n */\nexport var scale = function scale(group, ratio) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var scaleXY = ratio;\n if (!isArray(ratio)) {\n scaleXY = [ratio, ratio];\n }\n if (isArray(ratio) && ratio.length === 1) {\n scaleXY = [ratio[0], ratio[0]];\n }\n matrix = transform(matrix, [['s', scaleXY[0], scaleXY[1]]]);\n group.setMatrix(matrix);\n};\n/**\n *\n * @param group Group 实例\n * @param ratio 选择角度\n */\nexport var rotate = function rotate(group, angle) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n matrix = transform(matrix, [['r', angle]]);\n group.setMatrix(matrix);\n};\nexport var getDegree = function getDegree(n, nodeIdxMap, edges) {\n var degrees = [];\n for (var i = 0; i < n; i++) {\n degrees[i] = 0;\n }\n edges.forEach(function (e) {\n if (e.source) {\n degrees[nodeIdxMap[e.source]] += 1;\n }\n if (e.target) {\n degrees[nodeIdxMap[e.target]] += 1;\n }\n });\n return degrees;\n};\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) && Math.min(p1[0], p2[0]) <= q[0] && q[0] <= Math.max(p1[0], p2[0]) && Math.min(p1[1], p2[1]) <= q[1] && q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n/**\n * 判断点P在多边形内-射线法. Borrow from https://github.com/antvis/util/blob/master/packages/path-util/src/point-in-polygon.ts\n * @param points\n * @param x\n * @param y\n */\nexport var isPointInPolygon = function isPointInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n // 判断两个double在eps精度下的大小关系\n var tolerance = 1e-6;\n function dcmp(xValue) {\n if (Math.abs(xValue) < tolerance) {\n return 0;\n }\n return xValue < 0 ? -1 : 1;\n }\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 && dcmp(x - (y - p1[1]) * (p1[0] - p2[0]) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n};\n// 判断两个BBox是否相交\nexport var intersectBBox = function intersectBBox(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n};\nvar lineIntersectPolygon = function lineIntersectPolygon(lines, line) {\n var isIntersect = false;\n each(lines, function (l) {\n if (getLineIntersect(l.from, l.to, line.from, line.to)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n};\n/**\n * 判断两个polygon是否相交。\n * borrow from @antv/path-util\n * @param points1 polygon1的顶点数组\n * @param points2 polygon2的顶点数组\n */\nexport var isPolygonsIntersect = function isPolygonsIntersect(points1, points2) {\n var getBBox = function getBBox(points) {\n var xArr = points.map(function (p) {\n return p[0];\n });\n var yArr = points.map(function (p) {\n return p[1];\n });\n return {\n minX: Math.min.apply(null, xArr),\n maxX: Math.max.apply(null, xArr),\n minY: Math.min.apply(null, yArr),\n maxY: Math.max.apply(null, yArr)\n };\n };\n var parseToLines = function parseToLines(points) {\n var lines = [];\n var count = points.length;\n for (var i = 0; i < count - 1; i++) {\n var point = points[i];\n var next = points[i + 1];\n lines.push({\n from: {\n x: point[0],\n y: point[1]\n },\n to: {\n x: next[0],\n y: next[1]\n }\n });\n }\n if (lines.length > 1) {\n var first = points[0];\n var last = points[count - 1];\n lines.push({\n from: {\n x: last[0],\n y: last[1]\n },\n to: {\n x: first[0],\n y: first[1]\n }\n });\n }\n return lines;\n };\n // 空数组,或者一个点返回 false\n if (points1.length < 2 || points2.length < 2) {\n return false;\n }\n var bbox1 = getBBox(points1);\n var bbox2 = getBBox(points2);\n // 判定包围盒是否相交,比判定点是否在多边形内要快的多,可以筛选掉大多数情况\n if (!intersectBBox(bbox1, bbox2)) {\n return false;\n }\n var isIn = false;\n // 判定点是否在多边形内部,一旦有一个点在另一个多边形内,则返回\n each(points2, function (point) {\n if (isPointInPolygon(points1, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n each(points1, function (point) {\n if (isPointInPolygon(points2, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n var lines1 = parseToLines(points1);\n var lines2 = parseToLines(points2);\n var isIntersect = false;\n each(lines2, function (line) {\n if (lineIntersectPolygon(lines1, line)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n};\nvar Line = /** @class */function () {\n function Line(x1, y1, x2, y2) {\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n }\n Line.prototype.getBBox = function () {\n var minX = Math.min(this.x1, this.x2);\n var minY = Math.min(this.y1, this.y2);\n var maxX = Math.max(this.x1, this.x2);\n var maxY = Math.max(this.y1, this.y2);\n var res = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY\n };\n return res;\n };\n return Line;\n}();\nexport { Line };\nexport var getBBoxBoundLine = function getBBoxBoundLine(bbox, direction) {\n var bounds = {\n top: [bbox.minX, bbox.minY, bbox.maxX, bbox.minY],\n left: [bbox.minX, bbox.minY, bbox.minX, bbox.maxY],\n bottom: [bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY],\n right: [bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY]\n };\n return bounds[direction];\n};\n/**\n * 计算两条线段相交时,相交点对第一条线段上的分割比例\n */\nvar fractionAlongLineA = function fractionAlongLineA(la, lb) {\n var uaT = (lb.x2 - lb.x1) * (la.y1 - lb.y1) - (lb.y2 - lb.y1) * (la.x1 - lb.x1);\n var ubT = (la.x2 - la.x1) * (la.y1 - lb.y1) - (la.y2 - la.y1) * (la.x1 - lb.x1);\n var uB = (lb.y2 - lb.y1) * (la.x2 - la.x1) - (lb.x2 - lb.x1) * (la.y2 - la.y1);\n if (uB) {\n var ua = uaT / uB;\n var ub = ubT / uB;\n if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n return ua;\n }\n }\n return Number.POSITIVE_INFINITY;\n};\nexport var itemIntersectByLine = function itemIntersectByLine(item, line) {\n var directions = ['top', 'left', 'bottom', 'right'];\n var bbox = item.getBBox();\n var countIntersections = 0;\n var intersections = [];\n for (var i = 0; i < 4; i++) {\n var _a = getBBoxBoundLine(bbox, directions[i]),\n x1 = _a[0],\n y1 = _a[1],\n x2 = _a[2],\n y2 = _a[3];\n intersections[i] = getLineIntersect({\n x: line.x1,\n y: line.y1\n }, {\n x: line.x2,\n y: line.y2\n }, {\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n });\n if (intersections[i]) {\n countIntersections += 1;\n }\n }\n return [intersections, countIntersections];\n};\nexport var fractionToLine = function fractionToLine(item, line) {\n var directions = ['top', 'left', 'bottom', 'right'];\n var bbox = item.getBBox();\n var minDistance = Number.POSITIVE_INFINITY;\n var countIntersections = 0;\n for (var i = 0; i < 4; i++) {\n var _a = getBBoxBoundLine(bbox, directions[i]),\n x1 = _a[0],\n y1 = _a[1],\n x2 = _a[2],\n y2 = _a[3];\n var testDistance = fractionAlongLineA(line, new Line(x1, y1, x2, y2));\n testDistance = Math.abs(testDistance - 0.5);\n if (testDistance >= 0 && testDistance <= 1) {\n countIntersections += 1;\n minDistance = testDistance < minDistance ? testDistance : minDistance;\n }\n }\n if (countIntersections === 0) return -1;\n return minDistance;\n};\nexport var getPointsCenter = function getPointsCenter(points) {\n var centerX = 0;\n var centerY = 0;\n if (points.length > 0) {\n for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {\n var point = points_1[_i];\n centerX += point.x;\n centerY += point.y;\n }\n centerX /= points.length;\n centerY /= points.length;\n }\n return {\n x: centerX,\n y: centerY\n };\n};\nexport var squareDist = function squareDist(a, b) {\n return Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2);\n};\nexport var pointLineSquareDist = function pointLineSquareDist(point, line) {\n var x1 = line.x1;\n var y1 = line.y1;\n var x2 = line.x2 - x1;\n var y2 = line.y2 - y1;\n var px = point.x - x1;\n var py = point.y - y1;\n var dotprod = px * x2 + py * y2;\n var projlenSq;\n if (dotprod <= 0) {\n projlenSq = 0;\n } else {\n px = x2 - px;\n py = y2 - py;\n dotprod = px * x2 + py * y2;\n if (dotprod <= 0) {\n projlenSq = 0;\n } else {\n projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);\n }\n }\n var lenSq = px * px + py * py - projlenSq;\n if (lenSq < 0) {\n lenSq = 0;\n }\n return lenSq;\n};\nexport var isPointsOverlap = function isPointsOverlap(p1, p2, e) {\n if (e === void 0) {\n e = 1e-3;\n }\n return Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2) < Math.pow(e, 2);\n};\n/**\n * 点到矩形的距离的平方:矩形内部点视作距离为0,外部的点若投影落在矩形边上则为点到矩形边的最近的垂直距离,否则为点到矩形顶点的距离,\n * @param point IPoint\n * @param rect IRect\n */\nexport var pointRectSquareDist = function pointRectSquareDist(point, rect) {\n var isLeft = point.x < rect.x;\n var isRight = point.x > rect.x + rect.width;\n var isTop = point.y > rect.y + rect.height;\n var isBottom = point.y < rect.y;\n var isPointOutside = isLeft || isRight || isTop || isBottom;\n if (!isPointOutside) {\n return 0;\n }\n if (isTop && !isLeft && !isRight) {\n return Math.pow(rect.y + rect.height - point.y, 2);\n }\n if (isBottom && !isLeft && !isRight) {\n return Math.pow(point.y - rect.y, 2);\n }\n if (isLeft && !isTop && !isBottom) {\n return Math.pow(rect.x - point.x, 2);\n }\n if (isRight && !isTop && !isBottom) {\n return Math.pow(rect.x + rect.width - point.x, 2);\n }\n var dx = Math.min(Math.abs(rect.x - point.x), Math.abs(rect.x + rect.width - point.x));\n var dy = Math.min(Math.abs(rect.y - point.y), Math.abs(rect.y + rect.height - point.y));\n return dx * dx + dy * dy;\n};\n/**\n * point to line distance\n * @param {array} line 线的四个顶点 [x1, y1, x2, y2]\n * @param {object} point 坐标点 {x, y}\n * @return {Number|NaN} distance\n */\nexport var pointLineDistance = function pointLineDistance(line, point) {\n var x1 = line[0],\n y1 = line[1],\n x2 = line[2],\n y2 = line[3];\n var x = point.x,\n y = point.y;\n var d = [x2 - x1, y2 - y1];\n if (vec2.exactEquals(d, [0, 0])) {\n return NaN;\n }\n var u = [-d[1], d[0]];\n // @ts-ignore\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n // @ts-ignore\n return Math.abs(vec2.dot(a, u));\n};\n/**\n * Linearly interpolate between start and end, where alpha is the percent distance along the line.\n * alpha = 0 will be start, and alpha = 1 will be end.\n * @param {number} start\n * @param {number} end\n * @param {number} alpha interpolation factor, typically in the closed interval [0, 1]\n * @returns {number}\n */\nexport var lerp = function lerp(start, end, alpha) {\n return start + (end - start) * alpha;\n};\n/**\n * Linearly interpolate between start and end arrays, where alpha is the percent distance along the line.\n * alpha = 0 will be start, and alpha = 1 will be end.\n * @param {number[]} start\n * @param {number[]} end\n * @param {number} alpha interpolation factor, typically in the closed interval [0, 1]\n * @returns {number[]}\n */\nexport var lerpArray = function lerpArray(start, end, alpha) {\n var len = Math.min(start.length, end.length);\n var out = new Array(len);\n for (var i = 0; i < len; i++) {\n out[i] = lerp(start[i], end[i], alpha);\n }\n return out;\n};","var subjectColor = 'rgb(95, 149, 255)';\nvar backColor = 'rgb(255, 255, 255)';\nvar textColor = 'rgb(0, 0, 0)';\nvar activeFill = 'rgb(247, 250, 255)';\nvar nodeMainFill = 'rgb(239, 244, 255)';\nvar comboFill = 'rgb(253, 253, 253)';\nvar disabledFill = 'rgb(250, 250, 250)';\nvar edgeMainStroke = 'rgb(224, 224, 224)';\nvar edgeInactiveStroke = 'rgb(234, 234, 234)';\nvar edgeDisablesStroke = 'rgb(245, 245, 245)';\nvar inactiveStroke = 'rgb(191, 213, 255)';\nvar highlightStroke = '#4572d9';\nvar highlightFill = 'rgb(223, 234, 255)';\nvar colorSet = {\n // for nodes\n mainStroke: subjectColor,\n mainFill: nodeMainFill,\n activeStroke: subjectColor,\n activeFill: activeFill,\n inactiveStroke: inactiveStroke,\n inactiveFill: activeFill,\n selectedStroke: subjectColor,\n selectedFill: backColor,\n highlightStroke: highlightStroke,\n highlightFill: highlightFill,\n disableStroke: edgeMainStroke,\n disableFill: disabledFill,\n // for edges\n edgeMainStroke: edgeMainStroke,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: edgeInactiveStroke,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: edgeDisablesStroke,\n // for combos\n comboMainStroke: edgeMainStroke,\n comboMainFill: comboFill,\n comboActiveStroke: subjectColor,\n comboActiveFill: activeFill,\n comboInactiveStroke: edgeMainStroke,\n comboInactiveFill: comboFill,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: comboFill,\n comboHighlightStroke: highlightStroke,\n comboHighlightFill: comboFill,\n comboDisableStroke: edgeInactiveStroke,\n comboDisableFill: disabledFill\n};\nexport default {\n version: '0.8.23',\n rootContainerClassName: 'root-container',\n nodeContainerClassName: 'node-container',\n edgeContainerClassName: 'edge-container',\n comboContainerClassName: 'combo-container',\n delegateContainerClassName: 'delegate-container',\n defaultLoopPosition: 'top',\n nodeLabel: {\n style: {\n fill: '#000',\n fontSize: 12,\n textAlign: 'center',\n textBaseline: 'middle'\n },\n offset: 4 // 节点的默认文本不居中时的偏移量\n },\n\n defaultNode: {\n type: 'circle',\n style: {\n lineWidth: 1,\n stroke: colorSet.mainStroke,\n fill: nodeMainFill\n },\n size: 20,\n color: colorSet.mainStroke,\n linkPoints: {\n size: 8,\n lineWidth: 1,\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke\n }\n },\n // 节点应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n nodeStateStyles: {\n active: {\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke,\n lineWidth: 2,\n shadowColor: colorSet.mainStroke,\n shadowBlur: 10\n },\n selected: {\n fill: colorSet.selectedFill,\n stroke: colorSet.selectedStroke,\n lineWidth: 4,\n shadowColor: colorSet.selectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n fill: colorSet.highlightFill,\n stroke: colorSet.highlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n fill: colorSet.inactiveFill,\n stroke: colorSet.inactiveStroke,\n lineWidth: 1\n },\n disable: {\n fill: colorSet.disableFill,\n stroke: colorSet.disableStroke,\n lineWidth: 1\n }\n },\n edgeLabel: {\n style: {\n fill: textColor,\n textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n }\n },\n defaultEdge: {\n type: 'line',\n size: 1,\n style: {\n stroke: colorSet.edgeMainStroke,\n lineAppendWidth: 2\n },\n color: colorSet.edgeMainStroke\n },\n // 边应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n edgeStateStyles: {\n active: {\n stroke: colorSet.edgeActiveStroke,\n lineWidth: 1\n },\n selected: {\n stroke: colorSet.edgeSelectedStroke,\n lineWidth: 2,\n shadowColor: colorSet.edgeSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.edgeHighlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.edgeInactiveStroke,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.edgeDisableStroke,\n lineWidth: 1\n }\n },\n comboLabel: {\n style: {\n fill: textColor,\n // textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n },\n refY: 10,\n refX: 10 // Combo 的默认文本不居中时的偏移量\n },\n\n defaultCombo: {\n type: 'circle',\n style: {\n fill: colorSet.comboMainFill,\n lineWidth: 1,\n stroke: colorSet.comboMainStroke,\n r: 5,\n width: 20,\n height: 10\n },\n size: [20, 5],\n color: colorSet.comboMainStroke,\n padding: [25, 20, 15, 20]\n },\n // combo 应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n comboStateStyles: {\n active: {\n stroke: colorSet.comboActiveStroke,\n lineWidth: 1,\n fill: colorSet.comboActiveFill\n },\n selected: {\n stroke: colorSet.comboSelectedStroke,\n lineWidth: 2,\n fill: colorSet.comboSelectedFill,\n shadowColor: colorSet.comboSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.comboHighlightStroke,\n lineWidth: 2,\n fill: colorSet.comboHighlightFill,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.comboInactiveStroke,\n fill: colorSet.comboInactiveFill,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.comboDisableStroke,\n fill: colorSet.comboDisableFill,\n lineWidth: 1\n }\n },\n delegateStyle: {\n fill: '#F3F9FF',\n fillOpacity: 0.5,\n stroke: '#1890FF',\n strokeOpacity: 0.9,\n lineDash: [5, 5]\n },\n windowFontFamily: typeof window !== 'undefined' && window.getComputedStyle && document.body ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif'\n};","export default {\n ' ': 0.3329986572265625,\n a: 0.5589996337890625,\n A: 0.6569992065429687,\n b: 0.58599853515625,\n B: 0.6769989013671875,\n c: 0.5469985961914062,\n C: 0.7279998779296875,\n d: 0.58599853515625,\n D: 0.705999755859375,\n e: 0.554998779296875,\n E: 0.63699951171875,\n f: 0.37299957275390627,\n F: 0.5769989013671875,\n g: 0.5909988403320312,\n G: 0.7479995727539063,\n h: 0.555999755859375,\n H: 0.7199996948242188,\n i: 0.255999755859375,\n I: 0.23699951171875,\n j: 0.26699981689453123,\n J: 0.5169998168945312,\n k: 0.5289993286132812,\n K: 0.6899993896484375,\n l: 0.23499908447265624,\n L: 0.5879989624023437,\n m: 0.854998779296875,\n M: 0.8819992065429687,\n n: 0.5589996337890625,\n N: 0.7189987182617188,\n o: 0.58599853515625,\n O: 0.7669998168945312,\n p: 0.58599853515625,\n P: 0.6419998168945312,\n q: 0.58599853515625,\n Q: 0.7669998168945312,\n r: 0.3649993896484375,\n R: 0.6759994506835938,\n s: 0.504998779296875,\n S: 0.6319992065429687,\n t: 0.354998779296875,\n T: 0.6189987182617187,\n u: 0.5599990844726562,\n U: 0.7139999389648437,\n v: 0.48199920654296874,\n V: 0.6389999389648438,\n w: 0.754998779296875,\n W: 0.929998779296875,\n x: 0.5089996337890625,\n X: 0.63699951171875,\n y: 0.4959991455078125,\n Y: 0.66199951171875,\n z: 0.48699951171875,\n Z: 0.6239990234375,\n '0': 0.6,\n '1': 0.40099945068359377,\n '2': 0.6,\n '3': 0.6,\n '4': 0.6,\n '5': 0.6,\n '6': 0.6,\n '7': 0.5469985961914062,\n '8': 0.6,\n '9': 0.6,\n '[': 0.3329986572265625,\n ']': 0.3329986572265625,\n ',': 0.26399993896484375,\n '.': 0.26399993896484375,\n ';': 0.26399993896484375,\n ':': 0.26399993896484375,\n '{': 0.3329986572265625,\n '}': 0.3329986572265625,\n '\\\\': 0.5,\n '|': 0.19499969482421875,\n '=': 0.604998779296875,\n '+': 0.604998779296875,\n '-': 0.604998779296875,\n _: 0.5,\n '`': 0.3329986572265625,\n ' ~': 0.8329986572265625,\n '!': 0.3329986572265625,\n '@': 0.8579986572265625,\n '#': 0.6,\n $: 0.6,\n '%': 0.9699996948242188,\n '^': 0.517999267578125,\n '&': 0.7259994506835937,\n '*': 0.505999755859375,\n '(': 0.3329986572265625,\n ')': 0.3329986572265625,\n '<': 0.604998779296875,\n '>': 0.604998779296875,\n '/': 0.5,\n '?': 0.53699951171875\n};","import { __assign } from \"tslib\";\nimport { vec2 } from '@antv/matrix-util';\nimport { clone, isArray, isNumber, isObject, isString } from '@antv/util';\nimport Global from '../global';\nimport letterAspectRatio from './letterAspectRatio';\nimport { applyMatrix } from './math';\nvar PI = Math.PI,\n sin = Math.sin,\n cos = Math.cos;\n// 一共支持8个方向的自环,每个环占的角度是45度,在计算时再二分,为22.5度\nvar SELF_LINK_SIN = sin(PI / 8);\nvar SELF_LINK_COS = cos(PI / 8);\nexport var getBBox = function getBBox(element, group) {\n var bbox = element.getBBox();\n var leftTop = {\n x: bbox.minX,\n y: bbox.minY\n };\n var rightBottom = {\n x: bbox.maxX,\n y: bbox.maxY\n };\n // 根据父元素变换矩阵\n if (group) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n leftTop = applyMatrix(leftTop, matrix);\n rightBottom = applyMatrix(rightBottom, matrix);\n }\n var lx = leftTop.x,\n ly = leftTop.y;\n var rx = rightBottom.x,\n ry = rightBottom.y;\n return {\n x: lx,\n y: ly,\n minX: lx,\n minY: ly,\n maxX: rx,\n maxY: ry,\n width: rx - lx,\n height: ry - ly\n };\n};\n/**\n * get loop edge config\n * @param cfg edge config\n */\nexport var getLoopCfgs = function getLoopCfgs(cfg) {\n var item = cfg.sourceNode || cfg.targetNode;\n var container = item.get('group');\n var containerMatrix = container.getMatrix();\n if (!containerMatrix) containerMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var keyShape = item.getKeyShape();\n var bbox = keyShape.getBBox();\n var loopCfg = cfg.loopCfg || {};\n // 距离keyShape边的最高距离\n var dist = loopCfg.dist || Math.max(bbox.width, bbox.height) * 2;\n // 自环边与keyShape的相对位置关系\n var position = loopCfg.position || Global.defaultLoopPosition;\n // 中心取节点 keyShape bbox 的中心位置 + 节点位置坐标\n var center = [(bbox.minX + bbox.maxX) / 2 + containerMatrix[6], (bbox.minY + bbox.maxY) / 2 + containerMatrix[7]];\n var startPoint = [cfg.startPoint.x, cfg.startPoint.y];\n var endPoint = [cfg.endPoint.x, cfg.endPoint.y];\n var halfOfHeight = bbox.height / 2;\n var halfOfWidth = bbox.width / 2;\n var rstart = halfOfHeight;\n var rend = halfOfHeight;\n var sinDeltaStart = rstart * SELF_LINK_SIN;\n var cosDeltaStart = rstart * SELF_LINK_COS;\n var sinDeltaEnd = rend * SELF_LINK_SIN;\n var cosDeltaEnd = rend * SELF_LINK_COS;\n var shapeType = keyShape.get('type');\n // 美观考虑,pointPadding 默认取宽高中最小的1/4\n var defaultPointPadding = Math.min(halfOfHeight / 2, halfOfWidth / 2);\n var maxPointPadding = Math.min(halfOfHeight, halfOfWidth);\n // 对于非圆形节点设置的连接点与节点中心坐标(`top-right`,`bottom-right`,`top-left`,`bottom-left`较特殊,为四个角坐标)在 x 轴或 y 轴方向的偏移量,默认为  `节点宽高中最小值的1/4`\n var pointPadding = (loopCfg === null || loopCfg === void 0 ? void 0 : loopCfg.pointPadding) ? Math.min(maxPointPadding, loopCfg === null || loopCfg === void 0 ? void 0 : loopCfg.pointPadding) : defaultPointPadding;\n // 如果定义了锚点的,直接用锚点坐标,否则,根据自环的 cfg 计算\n if (startPoint[0] === endPoint[0] && startPoint[1] === endPoint[1]) {\n switch (position) {\n case 'top':\n if (shapeType === 'circle') {\n startPoint = [center[0] - sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] - cosDeltaEnd];\n } else {\n startPoint = [center[0] - pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] + pointPadding, center[1] - halfOfHeight];\n }\n break;\n case 'top-right':\n rstart = halfOfHeight;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + cosDeltaEnd, center[1] - sinDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth - pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] + halfOfWidth, center[1] - halfOfHeight + pointPadding];\n }\n break;\n case 'right':\n rstart = halfOfWidth;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + cosDeltaStart, center[1] - sinDeltaStart];\n endPoint = [center[0] + cosDeltaEnd, center[1] + sinDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth, center[1] - pointPadding];\n endPoint = [center[0] + halfOfWidth, center[1] + pointPadding];\n }\n break;\n case 'bottom-right':\n rstart = halfOfWidth;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + cosDeltaStart, center[1] + sinDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] + cosDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth, center[1] + halfOfHeight - pointPadding];\n endPoint = [center[0] + halfOfWidth - pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'bottom':\n rstart = halfOfHeight;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + sinDeltaStart, center[1] + cosDeltaStart];\n endPoint = [center[0] - sinDeltaEnd, center[1] + cosDeltaEnd];\n } else {\n startPoint = [center[0] - pointPadding, center[1] + halfOfHeight];\n endPoint = [center[0] + pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'bottom-left':\n rstart = halfOfHeight;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - sinDeltaStart, center[1] + cosDeltaStart];\n endPoint = [center[0] - cosDeltaEnd, center[1] + sinDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth, center[1] + halfOfHeight - pointPadding];\n endPoint = [center[0] - halfOfWidth + pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'left':\n rstart = halfOfWidth;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - cosDeltaStart, center[1] + sinDeltaStart];\n endPoint = [center[0] - cosDeltaEnd, center[1] - sinDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth, center[1] - pointPadding];\n endPoint = [center[0] - halfOfWidth, center[1] + pointPadding];\n }\n break;\n case 'top-left':\n rstart = halfOfWidth;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - cosDeltaStart, center[1] - sinDeltaStart];\n endPoint = [center[0] - sinDeltaEnd, center[1] - cosDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth + pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] - halfOfWidth, center[1] - halfOfHeight + pointPadding];\n }\n break;\n default:\n rstart = halfOfWidth;\n rend = halfOfWidth;\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] - cosDeltaEnd];\n }\n // 如果逆时针画,交换起点和终点\n if (loopCfg.clockwise === false) {\n var swap = [startPoint[0], startPoint[1]];\n startPoint = [endPoint[0], endPoint[1]];\n endPoint = [swap[0], swap[1]];\n }\n }\n var startVec = [startPoint[0] - center[0], startPoint[1] - center[1]];\n var scaleRateStart = (rstart + dist) / rstart;\n var scaleRateEnd = (rend + dist) / rend;\n if (loopCfg.clockwise === false) {\n scaleRateStart = (rend + dist) / rend;\n scaleRateEnd = (rstart + dist) / rstart;\n }\n var startExtendVec = vec2.scale([0, 0], startVec, scaleRateStart);\n var controlPoint1 = [center[0] + startExtendVec[0], center[1] + startExtendVec[1]];\n var endVec = [endPoint[0] - center[0], endPoint[1] - center[1]];\n var endExtendVec = vec2.scale([0, 0], endVec, scaleRateEnd);\n var controlPoint2 = [center[0] + endExtendVec[0], center[1] + endExtendVec[1]];\n cfg.startPoint = {\n x: startPoint[0],\n y: startPoint[1]\n };\n cfg.endPoint = {\n x: endPoint[0],\n y: endPoint[1]\n };\n cfg.controlPoints = [{\n x: controlPoint1[0],\n y: controlPoint1[1]\n }, {\n x: controlPoint2[0],\n y: controlPoint2[1]\n }];\n return cfg;\n};\n/**\n * 根据 label 所在线条的位置百分比,计算 label 坐标\n * @param {object} pathShape G 的 path 实例,一般是 Edge 实例的 keyShape\n * @param {number} percent 范围 0 - 1 的线条百分比\n * @param {number} refX x 轴正方向为基准的 label 偏移\n * @param {number} refY y 轴正方向为基准的 label 偏移\n * @param {boolean} rotate 是否根据线条斜率旋转文本\n * @return {object} 文本的 x, y, 文本的旋转角度\n */\nexport var getLabelPosition = function getLabelPosition(pathShape, percent, refX, refY, rotate) {\n var TAN_OFFSET = 0.0001;\n var vector = [];\n var point = pathShape === null || pathShape === void 0 ? void 0 : pathShape.getPoint(percent);\n if (!point) {\n return {\n x: 0,\n y: 0,\n angle: 0\n };\n }\n // 头尾最可能,放在最前面,使用 g path 上封装的方法\n if (percent < TAN_OFFSET) {\n vector = pathShape.getStartTangent().reverse();\n } else if (percent > 1 - TAN_OFFSET) {\n vector = pathShape.getEndTangent();\n } else {\n // 否则取指定位置的点,与少量偏移的点,做微分向量\n var offsetPoint = pathShape === null || pathShape === void 0 ? void 0 : pathShape.getPoint(percent + TAN_OFFSET);\n vector.push([point.x, point.y]);\n vector.push([offsetPoint.x, offsetPoint.y]);\n }\n var rad = Math.atan2(vector[1][1] - vector[0][1], vector[1][0] - vector[0][0]);\n if (rad < 0) {\n rad += PI * 2;\n }\n if (refX) {\n point.x += cos(rad) * refX;\n point.y += sin(rad) * refX;\n }\n if (refY) {\n // 默认方向是 x 轴正方向,法线是 求出角度 - 90°\n var normal = rad - PI / 2;\n // 若法线角度在 y 轴负方向,切到正方向,保证 refY 相对于 y 轴正方向\n if (rad > 1 / 2 * PI && rad < 3 * 1 / 2 * PI) {\n normal -= PI;\n }\n point.x += cos(normal) * refY;\n point.y += sin(normal) * refY;\n }\n var result = {\n x: point.x,\n y: point.y,\n angle: rad\n };\n if (rotate) {\n if (rad > 0.5 * PI && rad < 1.5 * PI) {\n rad -= PI;\n }\n return __assign({\n rotate: rad\n }, result);\n }\n return result;\n};\n/**\n * depth first traverse, from root to leaves, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverse = function traverse(data, parent, index, fn) {\n if (fn(data, parent, index) === false) {\n return false;\n }\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverse(data.children[i], data, i, fn)) return false;\n }\n }\n return true;\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseUp = function traverseUp(data, parent, index, fn) {\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverseUp(data.children[i], data, i, fn)) return;\n }\n }\n if (fn(data, parent, index) === false) {\n return false;\n }\n return true;\n};\n/**\n * depth first traverse, from root to leaves, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nexport var traverseTree = function traverseTree(data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverse(data, null, -1, fn);\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nexport var traverseTreeUp = function traverseTreeUp(data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverseUp(data, null, -1, fn);\n};\n/**\n *\n * @param letter the letter\n * @param fontSize\n * @return the letter's width\n */\nexport var getLetterWidth = function getLetterWidth(letter, fontSize) {\n return fontSize * (letterAspectRatio[letter] || 1);\n};\n/**\n *\n * @param text the text\n * @param fontSize\n * @return the text's size\n */\nexport var getTextSize = function getTextSize(text, fontSize) {\n var width = 0;\n var pattern = new RegExp(\"[\\u4E00-\\u9FA5]+\");\n text.split('').forEach(function (letter) {\n if (pattern.test(letter)) {\n // 中文字符\n width += fontSize;\n } else {\n width += getLetterWidth(letter, fontSize);\n }\n });\n return [width, fontSize];\n};\nexport var truncateLabelByLength = function truncateLabelByLength(text, length) {\n if (typeof length !== 'number' || length <= 0 || length >= text.length) {\n return text;\n }\n return text.substring(0, length) + '...';\n};\n/**\n * construct the trees from combos data\n * @param array the combos array\n * @param nodes the nodes array\n * @return the tree\n */\nexport var plainCombosToTrees = function plainCombosToTrees(array, nodes) {\n var result = [];\n var addedMap = {};\n var modelMap = {};\n array.forEach(function (d) {\n modelMap[d.id] = d;\n });\n array.forEach(function (d, i) {\n var cd = clone(d);\n cd.itemType = 'combo';\n cd.children = undefined;\n if (cd.parentId === cd.id) {\n console.warn(\"The parentId for combo \".concat(cd.id, \" can not be the same as the combo's id\"));\n delete cd.parentId;\n } else if (cd.parentId && !modelMap[cd.parentId]) {\n console.warn(\"The parent combo for combo \".concat(cd.id, \" does not exist!\"));\n delete cd.parentId;\n }\n var mappedObj = addedMap[cd.id];\n if (mappedObj) {\n cd.children = mappedObj.children;\n addedMap[cd.id] = cd;\n mappedObj = cd;\n if (!mappedObj.parentId) {\n result.push(mappedObj);\n return;\n }\n var mappedParent = addedMap[mappedObj.parentId];\n if (mappedParent) {\n if (mappedParent.children) mappedParent.children.push(cd);else mappedParent.children = [cd];\n } else {\n var parent_1 = {\n id: mappedObj.parentId,\n children: [mappedObj]\n };\n addedMap[mappedObj.parentId] = parent_1;\n addedMap[cd.id] = cd;\n }\n return;\n }\n if (isString(d.parentId)) {\n var parent_2 = addedMap[d.parentId];\n if (parent_2) {\n if (parent_2.children) parent_2.children.push(cd);else parent_2.children = [cd];\n addedMap[cd.id] = cd;\n } else {\n var pa = {\n id: d.parentId,\n children: [cd]\n };\n addedMap[pa.id] = pa;\n addedMap[cd.id] = cd;\n }\n } else {\n result.push(cd);\n addedMap[cd.id] = cd;\n }\n });\n // proccess the nodes\n var nodeMap = {};\n (nodes || []).forEach(function (node) {\n nodeMap[node.id] = node;\n var combo = addedMap[node.comboId];\n if (combo) {\n var cnode = {\n id: node.id,\n comboId: node.comboId\n };\n if (combo.children) combo.children.push(cnode);else combo.children = [cnode];\n cnode.itemType = 'node';\n addedMap[node.id] = cnode;\n }\n });\n // assign the depth for each element\n var maxDepth = 0;\n result.forEach(function (tree) {\n tree.depth = maxDepth + 10;\n traverseTree(tree, function (child) {\n var parent;\n var itemType = addedMap[child.id].itemType;\n if (itemType === 'node') {\n parent = addedMap[child.comboId];\n } else {\n parent = addedMap[child.parentId];\n }\n if (parent) {\n if (itemType === 'node') child.depth = maxDepth + 1;else child.depth = maxDepth + 10;\n } else {\n child.depth = maxDepth + 10;\n }\n if (maxDepth < child.depth) maxDepth = child.depth;\n var oriNodeModel = nodeMap[child.id];\n if (oriNodeModel) {\n oriNodeModel.depth = child.depth;\n }\n return true;\n });\n });\n return result;\n};\nexport var reconstructTree = function reconstructTree(trees, subtreeId, newParentId) {\n var _a;\n var brothers = trees;\n var subtree;\n var comboChildsMap = {\n root: {\n children: trees\n }\n };\n var foundSubTree = false;\n var oldParentId = 'root';\n (trees || []).forEach(function (tree) {\n if (foundSubTree) return;\n if (tree.id === subtreeId) {\n subtree = tree;\n if (tree.itemType === 'combo') {\n subtree.parentId = newParentId;\n } else {\n subtree.comboId = newParentId;\n }\n foundSubTree = true;\n return;\n }\n traverseTree(tree, function (child) {\n var _a;\n comboChildsMap[child.id] = {\n children: (child === null || child === void 0 ? void 0 : child.children) || []\n };\n // store the old parent id to delete the subtree from the old parent's children in next recursion\n brothers = (_a = comboChildsMap[child.parentId || child.comboId || 'root']) === null || _a === void 0 ? void 0 : _a.children;\n if (child && (child.removed || subtreeId === child.id) && brothers) {\n oldParentId = child.parentId || child.comboId || 'root';\n subtree = child;\n // re-assign the parentId or comboId for the moved subtree\n if (child.itemType === 'combo') {\n subtree.parentId = newParentId;\n } else {\n subtree.comboId = newParentId;\n }\n foundSubTree = true;\n return false;\n }\n return true;\n });\n });\n brothers = (_a = comboChildsMap[oldParentId]) === null || _a === void 0 ? void 0 : _a.children;\n var index = brothers ? brothers.indexOf(subtree) : -1;\n if (index > -1) brothers.splice(index, 1);\n // 如果遍历完整棵树还没有找到,说明之前就不在树中\n if (!foundSubTree) {\n subtree = {\n id: subtreeId,\n itemType: 'node',\n comboId: newParentId\n };\n comboChildsMap[subtreeId] = {\n children: undefined\n };\n }\n // append to new parent\n if (subtreeId) {\n var found_1 = false;\n // newParentId is undefined means the subtree will have no parent\n if (newParentId) {\n var newParentDepth_1 = 0;\n (trees || []).forEach(function (tree) {\n if (found_1) return; // terminate\n traverseTree(tree, function (child) {\n // append subtree to the new parent ans assign the depth to the subtree\n if (newParentId === child.id) {\n found_1 = true;\n if (child.children) child.children.push(subtree);else child.children = [subtree];\n newParentDepth_1 = child.depth;\n if (subtree.itemType === 'node') subtree.depth = newParentDepth_1 + 2;else subtree.depth = newParentDepth_1 + 1;\n return false; // terminate\n }\n\n return true;\n });\n });\n } else if ((!newParentId || !found_1) && subtree.itemType !== 'node') {\n // if the newParentId is undefined or it is not found in the tree, add the subTree to the root\n trees.push(subtree);\n }\n // update the depth of the subtree and its children from the subtree\n var currentDepth_1 = subtree.depth;\n traverseTree(subtree, function (child) {\n if (child.itemType === 'node') currentDepth_1 += 2;else currentDepth_1 += 1;\n child.depth = currentDepth_1;\n return true;\n });\n }\n return trees;\n};\nexport var getComboBBox = function getComboBBox(children, graph, combo) {\n var comboBBox = {\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity,\n x: undefined,\n y: undefined,\n width: undefined,\n height: undefined,\n centerX: undefined,\n centerY: undefined\n };\n if (!children || children.length === 0) {\n var comboModel = combo === null || combo === void 0 ? void 0 : combo.getModel();\n var _a = comboModel || {},\n x = _a.x,\n y = _a.y,\n fixSize = _a.fixSize,\n collapsed = _a.collapsed,\n fixCollapseSize = _a.fixCollapseSize;\n var useFixSize = collapsed ? fixCollapseSize : fixSize;\n var _b = isArray(useFixSize) ? useFixSize : [useFixSize, useFixSize],\n width = _b[0],\n height = _b[1];\n var halfSize = [width / 2, height / 2];\n return {\n minX: x - halfSize[0],\n minY: y - halfSize[1],\n maxX: x + halfSize[0],\n maxY: y + halfSize[1],\n x: x,\n y: y,\n width: width,\n height: height\n };\n }\n children.forEach(function (child) {\n var childItem = graph.findById(child.id);\n if (!childItem || !childItem.isVisible()) return; // ignore hidden children\n childItem.set('bboxCanvasCache', undefined);\n var childBBox = childItem.getCanvasBBox();\n if (childBBox.x && comboBBox.minX > childBBox.minX) comboBBox.minX = childBBox.minX;\n if (childBBox.y && comboBBox.minY > childBBox.minY) comboBBox.minY = childBBox.minY;\n if (childBBox.x && comboBBox.maxX < childBBox.maxX) comboBBox.maxX = childBBox.maxX;\n if (childBBox.y && comboBBox.maxY < childBBox.maxY) comboBBox.maxY = childBBox.maxY;\n });\n comboBBox.x = (comboBBox.minX + comboBBox.maxX) / 2;\n comboBBox.y = (comboBBox.minY + comboBBox.maxY) / 2;\n comboBBox.width = comboBBox.maxX - comboBBox.minX;\n comboBBox.height = comboBBox.maxY - comboBBox.minY;\n comboBBox.centerX = (comboBBox.minX + comboBBox.maxX) / 2;\n comboBBox.centerY = (comboBBox.minY + comboBBox.maxY) / 2;\n // if it is a circle combo, diagnal length of the children's bbox should be the diameter of the combo's bbox\n if ((combo === null || combo === void 0 ? void 0 : combo.getKeyShape().get('type')) === 'circle') {\n comboBBox.width = Math.hypot(comboBBox.height, comboBBox.width);\n comboBBox.height = comboBBox.width;\n }\n Object.keys(comboBBox).forEach(function (key) {\n if (comboBBox[key] === Infinity || comboBBox[key] === -Infinity) {\n comboBBox[key] = undefined;\n }\n });\n return comboBBox;\n};\nexport var shouldRefreshEdge = function shouldRefreshEdge(cfg) {\n var refreshEdge = isNumber(cfg.x) || isNumber(cfg.y) || cfg.type || cfg.anchorPoints || cfg.size;\n if (cfg.style) refreshEdge = refreshEdge || isNumber(cfg.style.r) || isNumber(cfg.style.width) || isNumber(cfg.style.height) || isNumber(cfg.style.rx) || isNumber(cfg.style.ry);\n return refreshEdge;\n};\nexport var cloneBesidesImg = function cloneBesidesImg(obj) {\n var clonedObj = {};\n Object.keys(obj).forEach(function (key1) {\n var obj2 = obj[key1];\n if (key1 === 'img' && !isString(obj2)) return;\n if (isObject(obj2) && !isArray(obj2)) {\n var clonedObj2_1 = {};\n Object.keys(obj2).forEach(function (key2) {\n var v = obj2[key2];\n if (key2 === 'img' && !isString(v)) return;\n clonedObj2_1[key2] = clone(v);\n });\n clonedObj[key1] = clonedObj2_1;\n } else {\n clonedObj[key1] = clone(obj2);\n }\n });\n return clonedObj;\n};\nexport var getAnimateCfgWithCallback = function getAnimateCfgWithCallback(_a) {\n var animateCfg = _a.animateCfg,\n callback = _a.callback;\n var animateConfig;\n if (!animateCfg) {\n animateConfig = {\n duration: 500,\n callback: callback\n };\n } else {\n animateConfig = clone(animateCfg);\n if (animateCfg.callback) {\n var animateCfgCallback_1 = animateCfg.callback;\n animateConfig.callback = function () {\n callback();\n animateCfgCallback_1();\n };\n } else {\n animateConfig.callback = callback;\n }\n }\n return animateConfig;\n};","import { __spreadArray } from \"tslib\";\nimport { isString } from '@antv/util';\nimport { traverseTree } from './graphic';\n/**\n * 验证关系图或树图数据的合法性,必须符合以下规则才会渲染图:\n * 1. 必须传入数据\n * 2. 节点的 ID 必须为字符串,暂不支持数字类型,如果支持数字类型,会出现类似 123 与 '123' 是否相等的问题\n * 3. 边的 source 和 target 值必须在节点 ID 中存在\n * @param data 关系图或树图数据\n * @return boolean 全部验证通过返回 true,否则返回 false\n */\nexport var dataValidation = function dataValidation(data) {\n // 1. 必须传入数据\n if (!data) {\n console.error('G6 Error Tips: the data must be defined');\n return false;\n }\n // 2. 节点的 ID 必须为字符串或数字类型\n var nodes = data.nodes,\n edges = data.edges,\n _a = data.combos,\n combos = _a === void 0 ? [] : _a;\n if (!nodes && !edges) {\n var validated_1 = true;\n // 不存在 nodes 和 edges,则说明是 TreeGraphData,按 TreeGraphData 规则验证\n traverseTree(data, function (param) {\n if (!isString(param.id)) {\n validated_1 = false;\n return false;\n }\n return true;\n });\n return validated_1;\n }\n var nonNode = (nodes || []).find(function (node) {\n return !isString(node.id);\n });\n if (nonNode) {\n console.warn(\"G6 Warning Tips: missing 'id' property, or %c\".concat(nonNode.id, \"%c is not a string.\"), 'font-size: 20px; color: red;', '');\n return false;\n }\n // 3. 边的 source 和 target 必须存在于节点 或 Combo中\n var nodeIds = (nodes || []).map(function (node) {\n return node.id;\n });\n var comboIds = combos === null || combos === void 0 ? void 0 : combos.map(function (combo) {\n return combo.id;\n });\n var ids = __spreadArray(__spreadArray([], nodeIds, true), comboIds, true);\n var nonEdges = (edges || []).find(function (edge) {\n return !ids.includes(edge.source) || !ids.includes(edge.target);\n });\n if (nonEdges) {\n console.warn(\"G6 Warning Tips: The source %c\".concat(nonEdges.source, \"%c or the target %c\").concat(nonEdges.target, \"%c of the edge do not exist in the nodes or combos.\"), 'font-size: 20px; color: red;', '', 'font-size: 20px; color: red;', '');\n return false;\n }\n return true;\n};\n/**\n * 验证添加节点、边或从combo时的数据\n * @param type 节点、边或从combo\n * @param data 添加的单条数据\n * @return boolean 全部验证通过返回 true,否则返回 false\n */\nexport var singleDataValidation = function singleDataValidation(type, data) {\n if (type === 'node' || type === 'combo') {\n // 必须有 id 字段,且id必须为字符串类型\n if (data.id && !isString(data.id)) {\n console.warn(\"G6 Warning Tips: missing 'id' property, or the 'id' %c\".concat(data.id, \"%c is not a string.\"), 'font-size: 20px; color: red;', '');\n return false;\n }\n } else if (type === 'edge') {\n // 必须有 source 和 target 字段\n if (!data.source || !data.target) {\n console.warn(\"G6 Warning Tips: missing 'source' or 'target' for the edge.\");\n return false;\n }\n }\n return true;\n};","import { each, isArray, isString } from '@antv/util';\nimport Behavior from '../../behavior/behavior';\nvar ModeController = /** @class */function () {\n function ModeController(graph) {\n this.graph = graph;\n this.destroyed = false;\n this.modes = graph.get('modes') || {\n default: []\n };\n this.formatModes();\n this.mode = graph.get('defaultMode') || 'default';\n this.currentBehaves = [];\n this.setMode(this.mode);\n }\n ModeController.prototype.formatModes = function () {\n var modes = this.modes;\n each(modes, function (mode) {\n each(mode, function (behavior, i) {\n if (isString(behavior)) {\n mode[i] = {\n type: behavior\n };\n }\n });\n });\n };\n ModeController.prototype.setBehaviors = function (mode) {\n var graph = this.graph;\n var behaviors = this.modes[mode];\n var behaves = [];\n var behave;\n each(behaviors || [], function (behavior) {\n var BehaviorInstance = Behavior.getBehavior(behavior.type || behavior);\n if (!BehaviorInstance) {\n return;\n }\n behave = new BehaviorInstance(behavior);\n if (behave) {\n behave.bind(graph);\n behaves.push(behave);\n }\n });\n this.currentBehaves = behaves;\n };\n ModeController.mergeBehaviors = function (modeBehaviors, behaviors) {\n each(behaviors, function (behavior) {\n if (modeBehaviors.indexOf(behavior) < 0) {\n if (isString(behavior)) {\n behavior = {\n type: behavior\n };\n }\n modeBehaviors.push(behavior);\n }\n });\n return modeBehaviors;\n };\n ModeController.filterBehaviors = function (modeBehaviors, behaviors) {\n var result = [];\n modeBehaviors.forEach(function (behavior) {\n var type = '';\n if (isString(behavior)) {\n type = behavior;\n } else {\n // eslint-disable-next-line prefer-destructuring\n type = behavior.type;\n }\n if (behaviors.indexOf(type) < 0) {\n result.push(behavior);\n }\n });\n return result;\n };\n ModeController.prototype.setMode = function (mode) {\n var _a = this,\n modes = _a.modes,\n graph = _a.graph;\n var current = mode;\n var behaviors = modes[current];\n if (!behaviors) {\n return;\n }\n graph.emit('beforemodechange', {\n mode: mode\n });\n each(this.currentBehaves, function (behave) {\n if (behave.delegate) behave.delegate.remove();\n behave.unbind(graph);\n });\n this.setBehaviors(current);\n graph.emit('aftermodechange', {\n mode: mode\n });\n this.mode = mode;\n };\n ModeController.prototype.getMode = function () {\n return this.mode;\n };\n /**\n * 动态增加或删除 Behavior\n *\n * @param {ModeType[]} behaviors\n * @param {(ModeType[] | ModeType)} modes\n * @param {boolean} isAdd\n * @returns {Mode}\n * @memberof Mode\n */\n ModeController.prototype.manipulateBehaviors = function (behaviors, modes, isAdd) {\n var _this = this;\n var behaves;\n if (!isArray(behaviors)) {\n behaves = [behaviors];\n } else {\n behaves = behaviors;\n }\n if (isArray(modes)) {\n each(modes, function (mode) {\n if (!_this.modes[mode]) {\n if (isAdd) {\n _this.modes[mode] = behaves;\n }\n } else if (isAdd) {\n _this.modes[mode] = ModeController.mergeBehaviors(_this.modes[mode] || [], behaves);\n } else {\n _this.modes[mode] = ModeController.filterBehaviors(_this.modes[mode] || [], behaves);\n }\n });\n return this;\n }\n var currentMode = modes;\n if (!modes) {\n currentMode = this.mode; // isString(this.mode) ? this.mode : this.mode.type\n }\n\n if (!this.modes[currentMode]) {\n if (isAdd) {\n this.modes[currentMode] = behaves;\n }\n }\n if (isAdd) {\n this.modes[currentMode] = ModeController.mergeBehaviors(this.modes[currentMode] || [], behaves);\n } else {\n this.modes[currentMode] = ModeController.filterBehaviors(this.modes[currentMode] || [], behaves);\n }\n this.formatModes();\n this.setMode(this.mode);\n return this;\n };\n /**\n * 更新行为参数\n * @param {string | ModeOption | ModeType} behavior 需要更新的行为\n * @param {string | string[]} modes 指定的模式中的行为,不指定则为 default\n * @return {Graph} Graph\n */\n ModeController.prototype.updateBehavior = function (behavior, newCfg, mode) {\n if (isString(behavior)) {\n behavior = {\n type: behavior\n };\n }\n var behaviorSet = [];\n if (!mode || mode === this.mode || mode === 'default') {\n behaviorSet = this.currentBehaves;\n if (!behaviorSet || !behaviorSet.length) {\n console.warn('Update behavior failed! There is no behaviors in this mode on the graph.');\n return this;\n }\n var length_1 = behaviorSet.length;\n for (var i = 0; i < length_1; i++) {\n var behave = behaviorSet[i];\n if (behave.type === behavior.type) {\n behave.updateCfg(newCfg);\n return this;\n }\n if (i === length_1 - 1) console.warn('Update behavior failed! There is no such behavior in the mode');\n }\n } else {\n behaviorSet = this.modes[mode];\n if (!behaviorSet || !behaviorSet.length) {\n console.warn('Update behavior failed! There is no behaviors in this mode on the graph.');\n return this;\n }\n var length_2 = behaviorSet.length;\n for (var i = 0; i < length_2; i++) {\n var behave = behaviorSet[i];\n if (behave.type === behavior.type || behave === behavior.type) {\n if (behave === behavior.type) behave = {\n type: behave\n };\n Object.assign(behave, newCfg);\n behaviorSet[i] = behave;\n return this;\n }\n if (i === length_2 - 1) console.warn('Update behavior failed! There is no such behavior in the mode');\n }\n }\n return this;\n };\n ModeController.prototype.destroy = function () {\n this.graph = null;\n this.modes = null;\n this.currentBehaves = null;\n this.destroyed = true;\n };\n return ModeController;\n}();\nexport default ModeController;","import { each, isArray } from '@antv/util';\nvar SPACES = '\\x09\\x0a\\x0b\\x0c\\x0d\\x20\\xa0\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u2028\\u2029';\nvar PATH_COMMAND = new RegExp(\"([a-z])[\" + SPACES + \",]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\" + SPACES + \"]*,?[\" + SPACES + \"]*)+)\", 'ig');\nvar PATH_VALUES = new RegExp(\"(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[\" + SPACES + \"]*,?[\" + SPACES + \"]*\", 'ig');\n// Parse given path string into an array of arrays of path segments\nvar parsePathString = function (pathString) {\n if (!pathString) {\n return null;\n }\n if (isArray(pathString)) {\n return pathString;\n }\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0,\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n if (name === 'r') {\n data.push([b].concat(params));\n }\n else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n return pathString;\n });\n return data;\n};\n// http://schepers.cc/getting-to-the-point\nvar catmullRomToBezier = function (crp, z) {\n var d = [];\n // @ts-ignore\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [\n {\n x: +crp[i - 2],\n y: +crp[i - 1],\n },\n {\n x: +crp[i],\n y: +crp[i + 1],\n },\n {\n x: +crp[i + 2],\n y: +crp[i + 3],\n },\n {\n x: +crp[i + 4],\n y: +crp[i + 5],\n },\n ];\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1],\n };\n }\n else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1],\n };\n }\n else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1],\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3],\n };\n }\n }\n else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n }\n else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1],\n };\n }\n }\n d.push([\n 'C',\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\n (p[1].y + 6 * p[2].y - p[3].y) / 6,\n p[2].x,\n p[2].y,\n ]);\n }\n return d;\n};\nvar ellipsePath = function (x, y, rx, ry, a) {\n var res = [];\n if (a === null && ry === null) {\n ry = rx;\n }\n x = +x;\n y = +y;\n rx = +rx;\n ry = +ry;\n if (a !== null) {\n var rad = Math.PI / 180;\n var x1 = x + rx * Math.cos(-ry * rad);\n var x2 = x + rx * Math.cos(-a * rad);\n var y1 = y + rx * Math.sin(-ry * rad);\n var y2 = y + rx * Math.sin(-a * rad);\n res = [\n ['M', x1, y1],\n ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2],\n ];\n }\n else {\n res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']];\n }\n return res;\n};\nvar pathToAbsolute = function (pathArray) {\n pathArray = parsePathString(pathArray);\n if (!pathArray || !pathArray.length) {\n return [['M', 0, 0]];\n }\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n var crz = pathArray.length === 3 &&\n pathArray[0][0] === 'M' &&\n pathArray[1][0].toUpperCase() === 'R' &&\n pathArray[2][0].toUpperCase() === 'Z';\n for (var r = void 0, pa = void 0, i = start, ii = pathArray.length; i < ii; i++) {\n res.push((r = []));\n pa = pathArray[i];\n pa0 = pa[0];\n if (pa0 !== pa0.toUpperCase()) {\n r[0] = pa0.toUpperCase();\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n case 'V':\n r[1] = +pa[1] + y;\n break;\n case 'H':\n r[1] = +pa[1] + x;\n break;\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n res.pop();\n res = res.concat(catmullRomToBezier(dots, crz));\n break;\n case 'O':\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n break;\n case 'U':\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n break;\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break; // for lint\n default:\n for (var j = 1, jj = pa.length; j < jj; j++) {\n r[j] = +pa[j] + (j % 2 ? x : y);\n }\n }\n }\n else if (pa0 === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRomToBezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n }\n else if (pa0 === 'O') {\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n }\n else if (pa0 === 'U') {\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n }\n else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n pa0 = pa0.toUpperCase();\n if (pa0 !== 'O') {\n switch (r[0]) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n case 'H':\n x = r[1];\n break;\n case 'V':\n y = r[1];\n break;\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break; // for lint\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n }\n return res;\n};\nvar l2c = function (x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n};\nvar q2c = function (x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3;\n var _23 = 2 / 3;\n return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2];\n};\nvar a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n // for more information of where this math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n if (rx === ry) {\n rx += 1;\n }\n var _120 = (Math.PI * 120) / 180;\n var rad = (Math.PI / 180) * (+angle || 0);\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n var rotate = function (x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return {\n x: X,\n y: Y,\n };\n };\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n if (x1 === x2 && y1 === y2) {\n // 若弧的起始点和终点重叠则错开一点\n x2 += 1;\n y2 += 1;\n }\n // const cos = Math.cos(Math.PI / 180 * angle);\n // const sin = Math.sin(Math.PI / 180 * angle);\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (large_arc_flag === sweep_flag ? -1 : 1) *\n Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = (k * rx * y) / ry + (x1 + x2) / 2;\n cy = (k * -ry * x) / rx + (y1 + y2) / 2;\n // @ts-ignore\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n // @ts-ignore\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n f1 < 0 && (f1 = Math.PI * 2 + f1);\n f2 < 0 && (f2 = Math.PI * 2 + f2);\n if (sweep_flag && f1 > f2) {\n f1 = f1 - Math.PI * 2;\n }\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - Math.PI * 2;\n }\n }\n else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n var df = f2 - f1;\n if (Math.abs(df) > _120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\n }\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = (4 / 3) * rx * t;\n var hy = (4 / 3) * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return [m2, m3, m4].concat(res);\n }\n res = [m2, m3, m4].concat(res).join().split(',');\n var newres = [];\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\n }\n return newres;\n};\nvar pathToCurve = function (path, path2) {\n var p = pathToAbsolute(path);\n var p2 = path2 && pathToAbsolute(path2);\n var attrs = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null,\n };\n var attrs2 = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null,\n };\n var pcoms1 = []; // path commands of original path p\n var pcoms2 = []; // path commands of original path p2\n var pfirst = ''; // temporary holder for original path command\n var pcom = ''; // holder for previous path command of original path\n var ii;\n var processPath = function (path, d, pcom) {\n var nx;\n var ny;\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n !(path[0] in\n {\n T: 1,\n Q: 1,\n }) && (d.qx = d.qy = null);\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n // In \"S\" case we have to take into account, if the previous command is C/S.\n nx = d.x * 2 - d.bx; // And reflect the previous\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\n }\n else {\n // or some else or nothing\n nx = d.x;\n ny = d.y;\n }\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n // In \"T\" case we have to take into account, if the previous command is Q/T.\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\n d.qy = d.y * 2 - d.qy; // to case \"S\".\n }\n else {\n // or something else or nothing\n d.qx = d.x;\n d.qy = d.y;\n }\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\n break;\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n default:\n break;\n }\n return path;\n };\n var fixArc = function (pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n while (pi.length) {\n pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved\n p2 && (pcoms2[i] = 'A'); // the same as above\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n pp.splice(i, 1);\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n };\n var fixM = function (path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n };\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n for (var i = 0; i < ii; i++) {\n p[i] && (pfirst = p[i][0]); // save current path command\n if (pfirst !== 'C') {\n // C is not saved yet, because it may be result of conversion\n pcoms1[i] = pfirst; // Save current path command\n i && (pcom = pcoms1[i - 1]); // Get previous path command pcom\n }\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\n if (pcoms1[i] !== 'A' && pfirst === 'C')\n pcoms1[i] = 'C'; // A is the only command\n // which may produce multiple C:s\n // so we have to make sure that C is also C in original path\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n if (p2) {\n // the same procedures is done to p2\n p2[i] && (pfirst = p2[i][0]);\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n i && (pcom = pcoms2[i - 1]);\n }\n p2[i] = processPath(p2[i], attrs2, pcom);\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n fixArc(p2, i);\n }\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i];\n var seg2 = p2 && p2[i];\n var seglen = seg.length;\n var seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n return p2 ? [p, p2] : p;\n};\nvar p2s = /,?([a-z]),?/gi;\nvar parsePathArray = function (path) {\n return path.join(',').replace(p2s, '$1');\n};\nvar base3 = function (t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n};\nvar bezlen = function (x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (z === null) {\n z = 1;\n }\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [\n -0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816,\n ];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n return z2 * sum;\n};\nvar curveDim = function (x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [];\n var bounds = [[], []];\n var a;\n var b;\n var c;\n var t;\n for (var i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n }\n else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (t > 0 && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n var b2ac = b * b - 4 * c * a;\n var sqrtb2ac = Math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n var t1 = (-b + sqrtb2ac) / (2 * a);\n if (t1 > 0 && t1 < 1) {\n tvalues.push(t1);\n }\n var t2 = (-b - sqrtb2ac) / (2 * a);\n if (t2 > 0 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n var j = tvalues.length;\n var jlen = j;\n var mt;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return {\n min: {\n x: Math.min.apply(0, bounds[0]),\n y: Math.min.apply(0, bounds[1]),\n },\n max: {\n x: Math.max.apply(0, bounds[0]),\n y: Math.max.apply(0, bounds[1]),\n },\n };\n};\nvar intersect = function (x1, y1, x2, y2, x3, y3, x4, y4) {\n if (Math.max(x1, x2) < Math.min(x3, x4) ||\n Math.min(x1, x2) > Math.max(x3, x4) ||\n Math.max(y1, y2) < Math.min(y3, y4) ||\n Math.min(y1, y2) > Math.max(y3, y4)) {\n return;\n }\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4);\n var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4);\n var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (!denominator) {\n return;\n }\n var px = nx / denominator;\n var py = ny / denominator;\n var px2 = +px.toFixed(2);\n var py2 = +py.toFixed(2);\n if (px2 < +Math.min(x1, x2).toFixed(2) ||\n px2 > +Math.max(x1, x2).toFixed(2) ||\n px2 < +Math.min(x3, x4).toFixed(2) ||\n px2 > +Math.max(x3, x4).toFixed(2) ||\n py2 < +Math.min(y1, y2).toFixed(2) ||\n py2 > +Math.max(y1, y2).toFixed(2) ||\n py2 < +Math.min(y3, y4).toFixed(2) ||\n py2 > +Math.max(y3, y4).toFixed(2)) {\n return;\n }\n return {\n x: px,\n y: py,\n };\n};\nvar isPointInsideBBox = function (bbox, x, y) {\n return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;\n};\nvar rectPath = function (x, y, w, h, r) {\n if (r) {\n return [\n ['M', +x + +r, y],\n ['l', w - r * 2, 0],\n ['a', r, r, 0, 0, 1, r, r],\n ['l', 0, h - r * 2],\n ['a', r, r, 0, 0, 1, -r, r],\n ['l', r * 2 - w, 0],\n ['a', r, r, 0, 0, 1, -r, -r],\n ['l', 0, r * 2 - h],\n ['a', r, r, 0, 0, 1, r, -r],\n ['z'],\n ];\n }\n var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];\n // @ts-ignore\n res.parsePathArray = parsePathArray;\n return res;\n};\nvar box = function (x, y, width, height) {\n if (x === null) {\n x = y = width = height = 0;\n }\n if (y === null) {\n y = x.y;\n width = x.width;\n height = x.height;\n x = x.x;\n }\n return {\n x: x,\n y: y,\n width: width,\n w: width,\n height: height,\n h: height,\n x2: x + width,\n y2: y + height,\n cx: x + width / 2,\n cy: y + height / 2,\n r1: Math.min(width, height) / 2,\n r2: Math.max(width, height) / 2,\n r0: Math.sqrt(width * width + height * height) / 2,\n path: rectPath(x, y, width, height),\n vb: [x, y, width, height].join(' '),\n };\n};\nvar isBBoxIntersect = function (bbox1, bbox2) {\n bbox1 = box(bbox1);\n bbox2 = box(bbox2);\n return (isPointInsideBBox(bbox2, bbox1.x, bbox1.y) ||\n isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) ||\n isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) ||\n isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) ||\n isPointInsideBBox(bbox1, bbox2.x, bbox2.y) ||\n isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) ||\n isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) ||\n isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) ||\n (((bbox1.x < bbox2.x2 && bbox1.x > bbox2.x) || (bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)) &&\n ((bbox1.y < bbox2.y2 && bbox1.y > bbox2.y) || (bbox2.y < bbox1.y2 && bbox2.y > bbox1.y))));\n};\nvar bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\n if (!isArray(p1x)) {\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\n }\n var bbox = curveDim.apply(null, p1x);\n return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y);\n};\nvar findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t;\n var t13 = Math.pow(t1, 3);\n var t12 = Math.pow(t1, 2);\n var t2 = t * t;\n var t3 = t2 * t;\n var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x;\n var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y;\n var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x);\n var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y);\n var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x);\n var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y);\n var ax = t1 * p1x + t * c1x;\n var ay = t1 * p1y + t * c1y;\n var cx = t1 * c2x + t * p2x;\n var cy = t1 * c2y + t * p2y;\n var alpha = 90 - (Math.atan2(mx - nx, my - ny) * 180) / Math.PI;\n // (mx > nx || my < ny) && (alpha += 180);\n return {\n x: x,\n y: y,\n m: {\n x: mx,\n y: my,\n },\n n: {\n x: nx,\n y: ny,\n },\n start: {\n x: ax,\n y: ay,\n },\n end: {\n x: cx,\n y: cy,\n },\n alpha: alpha,\n };\n};\nvar interHelper = function (bez1, bez2, justCount) {\n var bbox1 = bezierBBox(bez1);\n var bbox2 = bezierBBox(bez2);\n if (!isBBoxIntersect(bbox1, bbox2)) {\n return justCount ? 0 : [];\n }\n var l1 = bezlen.apply(0, bez1);\n var l2 = bezlen.apply(0, bez2);\n var n1 = ~~(l1 / 8);\n var n2 = ~~(l2 / 8);\n var dots1 = [];\n var dots2 = [];\n var xy = {};\n var res = justCount ? 0 : [];\n for (var i = 0; i < n1 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez1.concat(i / n1));\n dots1.push({\n x: d.x,\n y: d.y,\n t: i / n1,\n });\n }\n for (var i = 0; i < n2 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez2.concat(i / n2));\n dots2.push({\n x: d.x,\n y: d.y,\n t: i / n2,\n });\n }\n for (var i = 0; i < n1; i++) {\n for (var j = 0; j < n2; j++) {\n var di = dots1[i];\n var di1 = dots1[i + 1];\n var dj = dots2[j];\n var dj1 = dots2[j + 1];\n var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x';\n var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x';\n var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\n if (is) {\n if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) {\n continue;\n }\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\n var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t);\n var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\n if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) {\n if (justCount) {\n // @ts-ignore\n res += 1;\n }\n else {\n // @ts-ignore\n res.push({\n x: is.x,\n y: is.y,\n t1: t1,\n t2: t2,\n });\n }\n }\n }\n }\n }\n return res;\n};\nvar interPathHelper = function (path1, path2, justCount) {\n path1 = pathToCurve(path1);\n path2 = pathToCurve(path2);\n var x1;\n var y1;\n var x2;\n var y2;\n var x1m;\n var y1m;\n var x2m;\n var y2m;\n var bez1;\n var bez2;\n var res = justCount ? 0 : [];\n for (var i = 0, ii = path1.length; i < ii; i++) {\n var pi = path1[i];\n if (pi[0] === 'M') {\n x1 = x1m = pi[1];\n y1 = y1m = pi[2];\n }\n else {\n if (pi[0] === 'C') {\n bez1 = [x1, y1].concat(pi.slice(1));\n x1 = bez1[6];\n y1 = bez1[7];\n }\n else {\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\n x1 = x1m;\n y1 = y1m;\n }\n for (var j = 0, jj = path2.length; j < jj; j++) {\n var pj = path2[j];\n if (pj[0] === 'M') {\n x2 = x2m = pj[1];\n y2 = y2m = pj[2];\n }\n else {\n if (pj[0] === 'C') {\n bez2 = [x2, y2].concat(pj.slice(1));\n x2 = bez2[6];\n y2 = bez2[7];\n }\n else {\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\n x2 = x2m;\n y2 = y2m;\n }\n var intr = interHelper(bez1, bez2, justCount);\n if (justCount) {\n // @ts-ignore\n res += intr;\n }\n else {\n // @ts-ignore\n for (var k = 0, kk = intr.length; k < kk; k++) {\n intr[k].segment1 = i;\n intr[k].segment2 = j;\n intr[k].bez1 = bez1;\n intr[k].bez2 = bez2;\n }\n // @ts-ignore\n res = res.concat(intr);\n }\n }\n }\n }\n }\n return res;\n};\nvar intersection = function (path1, path2) {\n return interPathHelper(path1, path2);\n};\nfunction decasteljau(points, t) {\n var left = [];\n var right = [];\n function recurse(points, t) {\n if (points.length === 1) {\n left.push(points[0]);\n right.push(points[0]);\n }\n else {\n var middlePoints = [];\n for (var i = 0; i < points.length - 1; i++) {\n if (i === 0) {\n left.push(points[0]);\n }\n if (i === points.length - 2) {\n right.push(points[i + 1]);\n }\n middlePoints[i] = [\n (1 - t) * points[i][0] + t * points[i + 1][0],\n (1 - t) * points[i][1] + t * points[i + 1][1],\n ];\n }\n recurse(middlePoints, t);\n }\n }\n if (points.length) {\n recurse(points, t);\n }\n return { left: left, right: right.reverse() };\n}\nfunction splitCurve(start, end, count) {\n var points = [[start[1], start[2]]];\n count = count || 2;\n var segments = [];\n if (end[0] === 'A') {\n points.push(end[6]);\n points.push(end[7]);\n }\n else if (end[0] === 'C') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n points.push([end[5], end[6]]);\n }\n else if (end[0] === 'S' || end[0] === 'Q') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n }\n else {\n points.push([end[1], end[2]]);\n }\n var leftSegments = points;\n var t = 1 / count;\n for (var i = 0; i < count - 1; i++) {\n var rt = t / (1 - t * i);\n var split = decasteljau(leftSegments, rt);\n segments.push(split.left);\n leftSegments = split.right;\n }\n segments.push(leftSegments);\n var result = segments.map(function (segment) {\n var cmd = [];\n if (segment.length === 4) {\n cmd.push('C');\n cmd = cmd.concat(segment[2]);\n }\n if (segment.length >= 3) {\n if (segment.length === 3) {\n cmd.push('Q');\n }\n cmd = cmd.concat(segment[1]);\n }\n if (segment.length === 2) {\n cmd.push('L');\n }\n cmd = cmd.concat(segment[segment.length - 1]);\n return cmd;\n });\n return result;\n}\nvar splitSegment = function (start, end, count) {\n if (count === 1) {\n return [[].concat(start)];\n }\n var segments = [];\n if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') {\n segments = segments.concat(splitCurve(start, end, count));\n }\n else {\n var temp = [].concat(start);\n if (temp[0] === 'M') {\n temp[0] = 'L';\n }\n for (var i = 0; i <= count - 1; i++) {\n segments.push(temp);\n }\n }\n return segments;\n};\nvar fillPath = function (source, target) {\n if (source.length === 1) {\n return source;\n }\n var sourceLen = source.length - 1;\n var targetLen = target.length - 1;\n var ratio = sourceLen / targetLen;\n var segmentsToFill = [];\n if (source.length === 1 && source[0][0] === 'M') {\n for (var i = 0; i < targetLen - sourceLen; i++) {\n source.push(source[0]);\n }\n return source;\n }\n for (var i = 0; i < targetLen; i++) {\n var index = Math.floor(ratio * i);\n segmentsToFill[index] = (segmentsToFill[index] || 0) + 1;\n }\n var filled = segmentsToFill.reduce(function (filled, count, i) {\n if (i === sourceLen) {\n return filled.concat(source[sourceLen]);\n }\n return filled.concat(splitSegment(source[i], source[i + 1], count));\n }, []);\n filled.unshift(source[0]);\n if (target[targetLen] === 'Z' || target[targetLen] === 'z') {\n filled.push('Z');\n }\n return filled;\n};\nvar isEqual = function (obj1, obj2) {\n if (obj1.length !== obj2.length) {\n return false;\n }\n var result = true;\n each(obj1, function (item, i) {\n if (item !== obj2[i]) {\n result = false;\n return false;\n }\n });\n return result;\n};\nfunction getMinDiff(del, add, modify) {\n var type = null;\n var min = modify;\n if (add < min) {\n min = add;\n type = 'add';\n }\n if (del < min) {\n min = del;\n type = 'del';\n }\n return {\n type: type,\n min: min,\n };\n}\n/*\n * https://en.wikipedia.org/wiki/Levenshtein_distance\n * 计算两条path的编辑距离\n */\nvar levenshteinDistance = function (source, target) {\n var sourceLen = source.length;\n var targetLen = target.length;\n var sourceSegment;\n var targetSegment;\n var temp = 0;\n if (sourceLen === 0 || targetLen === 0) {\n return null;\n }\n var dist = [];\n for (var i = 0; i <= sourceLen; i++) {\n dist[i] = [];\n dist[i][0] = { min: i };\n }\n for (var j = 0; j <= targetLen; j++) {\n dist[0][j] = { min: j };\n }\n for (var i = 1; i <= sourceLen; i++) {\n sourceSegment = source[i - 1];\n for (var j = 1; j <= targetLen; j++) {\n targetSegment = target[j - 1];\n if (isEqual(sourceSegment, targetSegment)) {\n temp = 0;\n }\n else {\n temp = 1;\n }\n var del = dist[i - 1][j].min + 1;\n var add = dist[i][j - 1].min + 1;\n var modify = dist[i - 1][j - 1].min + temp;\n dist[i][j] = getMinDiff(del, add, modify);\n }\n }\n return dist;\n};\nvar fillPathByDiff = function (source, target) {\n var diffMatrix = levenshteinDistance(source, target);\n var sourceLen = source.length;\n var targetLen = target.length;\n var changes = [];\n var index = 1;\n var minPos = 1;\n // 如果source和target不是完全不相等\n if (diffMatrix[sourceLen][targetLen].min !== sourceLen) {\n // 获取从source到target所需改动\n for (var i = 1; i <= sourceLen; i++) {\n var min = diffMatrix[i][i].min;\n minPos = i;\n for (var j = index; j <= targetLen; j++) {\n if (diffMatrix[i][j].min < min) {\n min = diffMatrix[i][j].min;\n minPos = j;\n }\n }\n index = minPos;\n if (diffMatrix[i][index].type) {\n changes.push({ index: i - 1, type: diffMatrix[i][index].type });\n }\n }\n // 对source进行增删path\n for (var i = changes.length - 1; i >= 0; i--) {\n index = changes[i].index;\n if (changes[i].type === 'add') {\n source.splice(index, 0, [].concat(source[index]));\n }\n else {\n source.splice(index, 1);\n }\n }\n }\n // source尾部补齐\n sourceLen = source.length;\n var diff = targetLen - sourceLen;\n if (sourceLen < targetLen) {\n for (var i = 0; i < diff; i++) {\n if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') {\n source.splice(sourceLen - 2, 0, source[sourceLen - 2]);\n }\n else {\n source.push(source[sourceLen - 1]);\n }\n sourceLen += 1;\n }\n }\n return source;\n};\n// 将两个点均分成count个点\nfunction _splitPoints(points, former, count) {\n var result = [].concat(points);\n var index;\n var t = 1 / (count + 1);\n var formerEnd = _getSegmentPoints(former)[0];\n for (var i = 1; i <= count; i++) {\n t *= i;\n index = Math.floor(points.length * t);\n if (index === 0) {\n result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n }\n else {\n result.splice(index, 0, [\n formerEnd[0] * t + points[index][0] * (1 - t),\n formerEnd[1] * t + points[index][1] * (1 - t),\n ]);\n }\n }\n return result;\n}\n/*\n * 抽取pathSegment中的关键点\n * M,L,A,Q,H,V一个端点\n * Q, S抽取一个端点,一个控制点\n * C抽取一个端点,两个控制点\n */\nfunction _getSegmentPoints(segment) {\n var points = [];\n switch (segment[0]) {\n case 'M':\n points.push([segment[1], segment[2]]);\n break;\n case 'L':\n points.push([segment[1], segment[2]]);\n break;\n case 'A':\n points.push([segment[6], segment[7]]);\n break;\n case 'Q':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n case 'T':\n points.push([segment[1], segment[2]]);\n break;\n case 'C':\n points.push([segment[5], segment[6]]);\n points.push([segment[1], segment[2]]);\n points.push([segment[3], segment[4]]);\n break;\n case 'S':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n case 'H':\n points.push([segment[1], segment[1]]);\n break;\n case 'V':\n points.push([segment[1], segment[1]]);\n break;\n default:\n }\n return points;\n}\nvar formatPath = function (fromPath, toPath) {\n if (fromPath.length <= 1) {\n return fromPath;\n }\n var points;\n for (var i = 0; i < toPath.length; i++) {\n if (fromPath[i][0] !== toPath[i][0]) {\n // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造\n points = _getSegmentPoints(fromPath[i]);\n switch (toPath[i][0]) {\n case 'M':\n fromPath[i] = ['M'].concat(points[0]);\n break;\n case 'L':\n fromPath[i] = ['L'].concat(points[0]);\n break;\n case 'A':\n fromPath[i] = [].concat(toPath[i]);\n fromPath[i][6] = points[0][0];\n fromPath[i][7] = points[0][1];\n break;\n case 'Q':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n case 'T':\n fromPath[i] = ['T'].concat(points[0]);\n break;\n case 'C':\n if (points.length < 3) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 2);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['C'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n case 'S':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['S'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n default:\n fromPath[i] = toPath[i];\n }\n }\n }\n return fromPath;\n};\nexport { catmullRomToBezier, fillPath, fillPathByDiff, formatPath, intersection, parsePathArray, parsePathString, pathToAbsolute, pathToCurve, rectPath, };\n//# sourceMappingURL=path.js.map","var GraphEvent = /** @class */ (function () {\n function GraphEvent(type, event) {\n /**\n * 是否允许冒泡\n * @type {boolean}\n */\n this.bubbles = true;\n /**\n * 触发对象\n * @type {object}\n */\n this.target = null;\n /**\n * 监听对象\n * @type {object}\n */\n this.currentTarget = null;\n /**\n * 委托对象\n * @type {object}\n */\n this.delegateTarget = null;\n /**\n * 委托事件监听对象的代理对象,即 ev.delegateObject = ev.currentTarget.get('delegateObject')\n * @type {object}\n */\n this.delegateObject = null;\n /**\n * 是否阻止了原生事件\n * @type {boolean}\n */\n this.defaultPrevented = false;\n /**\n * 是否阻止传播(向上冒泡)\n * @type {boolean}\n */\n this.propagationStopped = false;\n /**\n * 触发事件的图形\n * @type {IShape}\n */\n this.shape = null;\n /**\n * 开始触发事件的图形\n * @type {IShape}\n */\n this.fromShape = null;\n /**\n * 事件结束时的触发图形\n * @type {IShape}\n */\n this.toShape = null;\n // 触发事件的路径\n this.propagationPath = [];\n this.type = type;\n this.name = type;\n this.originalEvent = event;\n this.timeStamp = event.timeStamp;\n }\n /**\n * 阻止浏览器默认的行为\n */\n GraphEvent.prototype.preventDefault = function () {\n this.defaultPrevented = true;\n if (this.originalEvent.preventDefault) {\n this.originalEvent.preventDefault();\n }\n };\n /**\n * 阻止冒泡\n */\n GraphEvent.prototype.stopPropagation = function () {\n this.propagationStopped = true;\n };\n GraphEvent.prototype.toString = function () {\n var type = this.type;\n return \"[Event (type=\" + type + \")]\";\n };\n GraphEvent.prototype.save = function () { };\n GraphEvent.prototype.restore = function () { };\n return GraphEvent;\n}());\nexport default GraphEvent;\n//# sourceMappingURL=graph-event.js.map","export function removeFromArray(arr, obj) {\n var index = arr.indexOf(obj);\n if (index !== -1) {\n arr.splice(index, 1);\n }\n}\nexport var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nexport { isNil, isFunction, isString, isObject, isArray, mix, each, upperFirst } from '@antv/util';\n// 是否元素的父容器\nexport function isParent(container, shape) {\n // 所有 shape 都是 canvas 的子元素\n if (container.isCanvas()) {\n return true;\n }\n var parent = shape.getParent();\n var isParent = false;\n while (parent) {\n if (parent === container) {\n isParent = true;\n break;\n }\n parent = parent.getParent();\n }\n return isParent;\n}\nexport function isAllowCapture(element) {\n // @ts-ignore\n return element.cfg.visible && element.cfg.capture;\n}\n//# sourceMappingURL=util.js.map","import { __extends } from \"tslib\";\nimport EE from '@antv/event-emitter';\nimport { mix } from '../util/util';\nvar Base = /** @class */ (function (_super) {\n __extends(Base, _super);\n function Base(cfg) {\n var _this = _super.call(this) || this;\n /**\n * 是否被销毁\n * @type {boolean}\n */\n _this.destroyed = false;\n var defaultCfg = _this.getDefaultCfg();\n _this.cfg = mix(defaultCfg, cfg);\n return _this;\n }\n /**\n * @protected\n * 默认的配置项\n * @returns {object} 默认的配置项\n */\n Base.prototype.getDefaultCfg = function () {\n return {};\n };\n // 实现接口的方法\n Base.prototype.get = function (name) {\n return this.cfg[name];\n };\n // 实现接口的方法\n Base.prototype.set = function (name, value) {\n this.cfg[name] = value;\n };\n // 实现接口的方法\n Base.prototype.destroy = function () {\n this.cfg = {\n destroyed: true,\n };\n this.off();\n this.destroyed = true;\n };\n return Base;\n}(EE));\nexport default Base;\n//# sourceMappingURL=base.js.map","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/**\n * @fileoverview 矩阵运算,本来是要引入 gl-matrix, 但是考虑到 g-mobile 对大小有限制,同时 g-webgl 使用的 matrix 不一致\n * 所以,这里仅实现 2D 几个运算,上层自己引入 gl-matrix\n * @author dxq613@gmail.com\n */\n/**\n * 3阶矩阵相乘\n * @param {number[]} a 矩阵1\n * @param {number[]} b 矩阵2\n */\nexport function multiplyMatrix(a, b) {\n var out = [];\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\n * 3阶矩阵同2阶向量相乘\n * @param {number[]} m 矩阵\n * @param {number[]} v 二阶向量\n */\nexport function multiplyVec2(m, v) {\n var out = [];\n var x = v[0];\n var y = v[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\n * 矩阵的逆\n * @param {number[]} a 矩阵\n */\nexport function invert(a) {\n var out = [];\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n//# sourceMappingURL=matrix.js.map","import { __extends } from \"tslib\";\nimport { each, isEqual, isFunction, isNumber, isObject, isArray, noop, mix, upperFirst, uniqueId } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport { removeFromArray, isParent } from '../util/util';\nimport { multiplyMatrix, multiplyVec2, invert } from '../util/matrix';\nimport Base from './base';\nvar transform = ext.transform;\nvar MATRIX = 'matrix';\nvar CLONE_CFGS = ['zIndex', 'capture', 'visible', 'type'];\n// 可以在 toAttrs 中设置,但不属于绘图属性的字段\nvar RESERVED_PORPS = ['repeat'];\nvar DELEGATION_SPLIT = ':';\nvar WILDCARD = '*';\n// 需要考虑数组嵌套数组的场景\n// 数组嵌套对象的场景不考虑\nfunction _cloneArrayAttr(arr) {\n var result = [];\n for (var i = 0; i < arr.length; i++) {\n if (isArray(arr[i])) {\n result.push([].concat(arr[i]));\n }\n else {\n result.push(arr[i]);\n }\n }\n return result;\n}\nfunction getFormatFromAttrs(toAttrs, shape) {\n var fromAttrs = {};\n var attrs = shape.attrs;\n for (var k in toAttrs) {\n fromAttrs[k] = attrs[k];\n }\n return fromAttrs;\n}\nfunction getFormatToAttrs(props, shape) {\n var toAttrs = {};\n var attrs = shape.attr();\n each(props, function (v, k) {\n if (RESERVED_PORPS.indexOf(k) === -1 && !isEqual(attrs[k], v)) {\n toAttrs[k] = v;\n }\n });\n return toAttrs;\n}\nfunction checkExistedAttrs(animations, animation) {\n if (animation.onFrame) {\n return animations;\n }\n var startTime = animation.startTime, delay = animation.delay, duration = animation.duration;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n each(animations, function (item) {\n // 后一个动画开始执行的时间 < 前一个动画的结束时间 && 后一个动画的执行时间 > 前一个动画的延迟\n if (startTime + delay < item.startTime + item.delay + item.duration && duration > item.delay) {\n each(animation.toAttrs, function (v, k) {\n if (hasOwnProperty.call(item.toAttrs, k)) {\n delete item.toAttrs[k];\n delete item.fromAttrs[k];\n }\n });\n }\n });\n return animations;\n}\nvar Element = /** @class */ (function (_super) {\n __extends(Element, _super);\n function Element(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @protected\n * 图形属性\n * @type {ShapeAttrs}\n */\n _this.attrs = {};\n var attrs = _this.getDefaultAttrs();\n mix(attrs, cfg.attrs);\n _this.attrs = attrs;\n _this.initAttrs(attrs);\n _this.initAnimate(); // 初始化动画\n return _this;\n }\n // override\n Element.prototype.getDefaultCfg = function () {\n return {\n visible: true,\n capture: true,\n zIndex: 0,\n };\n };\n /**\n * @protected\n * 获取默认的属相\n */\n Element.prototype.getDefaultAttrs = function () {\n return {\n matrix: this.getDefaultMatrix(),\n opacity: 1,\n };\n };\n /**\n * @protected\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Element.prototype.onCanvasChange = function (changeType) { };\n /**\n * @protected\n * 初始化属性,有些属性需要加工\n * @param {object} attrs 属性值\n */\n Element.prototype.initAttrs = function (attrs) { };\n /**\n * @protected\n * 初始化动画\n */\n Element.prototype.initAnimate = function () {\n this.set('animable', true);\n this.set('animating', false);\n };\n Element.prototype.isGroup = function () {\n return false;\n };\n Element.prototype.getParent = function () {\n return this.get('parent');\n };\n Element.prototype.getCanvas = function () {\n return this.get('canvas');\n };\n Element.prototype.attr = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = args[0], value = args[1];\n if (!name)\n return this.attrs;\n if (isObject(name)) {\n for (var k in name) {\n this.setAttr(k, name[k]);\n }\n this.afterAttrsChange(name);\n return this;\n }\n if (args.length === 2) {\n this.setAttr(name, value);\n this.afterAttrsChange((_a = {},\n _a[name] = value,\n _a));\n return this;\n }\n return this.attrs[name];\n };\n // 是否被裁剪,被裁剪则不显示,不参与拾取\n Element.prototype.isClipped = function (refX, refY) {\n var clip = this.getClip();\n return clip && !clip.isHit(refX, refY);\n };\n /**\n * 内部设置属性值的接口\n * @param {string} name 属性名\n * @param {any} value 属性值\n */\n Element.prototype.setAttr = function (name, value) {\n var originValue = this.attrs[name];\n if (originValue !== value) {\n this.attrs[name] = value;\n this.onAttrChange(name, value, originValue);\n }\n };\n /**\n * @protected\n * 属性值发生改变\n * @param {string} name 属性名\n * @param {any} value 属性值\n * @param {any} originValue 属性值\n */\n Element.prototype.onAttrChange = function (name, value, originValue) {\n if (name === 'matrix') {\n this.set('totalMatrix', null);\n }\n };\n /**\n * 属性更改后需要做的事情\n * @protected\n */\n Element.prototype.afterAttrsChange = function (targetAttrs) {\n if (this.cfg.isClipShape) {\n var applyTo = this.cfg.applyTo;\n if (applyTo) {\n applyTo.onCanvasChange('clip');\n }\n }\n else {\n this.onCanvasChange('attr');\n }\n };\n Element.prototype.show = function () {\n // 不是高频操作直接使用 set\n this.set('visible', true);\n this.onCanvasChange('show');\n return this;\n };\n Element.prototype.hide = function () {\n // 不是高频操作直接使用 set\n this.set('visible', false);\n this.onCanvasChange('hide');\n return this;\n };\n Element.prototype.setZIndex = function (zIndex) {\n this.set('zIndex', zIndex);\n var parent = this.getParent();\n if (parent) {\n // 改变 zIndex 不应该立即触发渲染 (调用 onCanvasChange('zIndex')),需要经过 sort 再触发\n parent.sort();\n }\n return this;\n };\n Element.prototype.toFront = function () {\n var parent = this.getParent();\n if (!parent) {\n return;\n }\n var children = parent.getChildren();\n var el = this.get('el');\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.push(this);\n this.onCanvasChange('zIndex');\n };\n Element.prototype.toBack = function () {\n var parent = this.getParent();\n if (!parent) {\n return;\n }\n var children = parent.getChildren();\n var el = this.get('el');\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.unshift(this);\n this.onCanvasChange('zIndex');\n };\n Element.prototype.remove = function (destroy) {\n if (destroy === void 0) { destroy = true; }\n var parent = this.getParent();\n if (parent) {\n removeFromArray(parent.getChildren(), this);\n if (!parent.get('clearing')) {\n // 如果父元素正在清理,当前元素不触发 remove\n this.onCanvasChange('remove');\n }\n }\n else {\n this.onCanvasChange('remove');\n }\n if (destroy) {\n this.destroy();\n }\n };\n Element.prototype.resetMatrix = function () {\n this.attr(MATRIX, this.getDefaultMatrix());\n this.onCanvasChange('matrix');\n };\n Element.prototype.getMatrix = function () {\n return this.attr(MATRIX);\n };\n Element.prototype.setMatrix = function (m) {\n this.attr(MATRIX, m);\n this.onCanvasChange('matrix');\n };\n // 获取总的 matrix\n Element.prototype.getTotalMatrix = function () {\n var totalMatrix = this.cfg.totalMatrix;\n if (!totalMatrix) {\n var currentMatrix = this.attr('matrix');\n var parentMatrix = this.cfg.parentMatrix;\n if (parentMatrix && currentMatrix) {\n totalMatrix = multiplyMatrix(parentMatrix, currentMatrix);\n }\n else {\n totalMatrix = currentMatrix || parentMatrix;\n }\n this.set('totalMatrix', totalMatrix);\n }\n return totalMatrix;\n };\n // 上层分组设置 matrix\n Element.prototype.applyMatrix = function (matrix) {\n var currentMatrix = this.attr('matrix');\n var totalMatrix = null;\n if (matrix && currentMatrix) {\n totalMatrix = multiplyMatrix(matrix, currentMatrix);\n }\n else {\n totalMatrix = currentMatrix || matrix;\n }\n this.set('totalMatrix', totalMatrix);\n this.set('parentMatrix', matrix);\n };\n /**\n * @protected\n * 获取默认的矩阵\n * @returns {number[]|null} 默认的矩阵\n */\n Element.prototype.getDefaultMatrix = function () {\n return null;\n };\n // 将向量应用设置的矩阵\n Element.prototype.applyToMatrix = function (v) {\n var matrix = this.attr('matrix');\n if (matrix) {\n return multiplyVec2(matrix, v);\n }\n return v;\n };\n // 根据设置的矩阵,将向量转换相对于图形/分组的位置\n Element.prototype.invertFromMatrix = function (v) {\n var matrix = this.attr('matrix');\n if (matrix) {\n var invertMatrix = invert(matrix);\n if (invertMatrix) {\n return multiplyVec2(invertMatrix, v);\n }\n }\n return v;\n };\n // 设置 clip\n Element.prototype.setClip = function (clipCfg) {\n var canvas = this.getCanvas();\n // 应该只设置当前元素的 clip,不应该去修改 clip 本身,方便 clip 被复用\n // TODO: setClip 的传参既 shape 配置,也支持 shape 对象\n // const preShape = this.get('clipShape');\n // if (preShape) {\n // // 将之前的 clipShape 销毁\n // preShape.destroy();\n // }\n var clipShape = null;\n // 如果配置项为 null,则不移除 clipShape\n if (clipCfg) {\n var ShapeBase = this.getShapeBase();\n var shapeType = upperFirst(clipCfg.type);\n var Cons = ShapeBase[shapeType];\n if (Cons) {\n clipShape = new Cons({\n type: clipCfg.type,\n isClipShape: true,\n applyTo: this,\n attrs: clipCfg.attrs,\n canvas: canvas,\n });\n }\n }\n this.set('clipShape', clipShape);\n this.onCanvasChange('clip');\n return clipShape;\n };\n Element.prototype.getClip = function () {\n // 高频率调用的地方直接使用 this.cfg.xxx\n var clipShape = this.cfg.clipShape;\n // 未设置时返回 Null,保证一致性\n if (!clipShape) {\n return null;\n }\n return clipShape;\n };\n Element.prototype.clone = function () {\n var _this = this;\n var originAttrs = this.attrs;\n var attrs = {};\n each(originAttrs, function (i, k) {\n if (isArray(originAttrs[k])) {\n attrs[k] = _cloneArrayAttr(originAttrs[k]);\n }\n else {\n attrs[k] = originAttrs[k];\n }\n });\n var cons = this.constructor;\n // @ts-ignore\n var clone = new cons({ attrs: attrs });\n each(CLONE_CFGS, function (cfgName) {\n clone.set(cfgName, _this.get(cfgName));\n });\n return clone;\n };\n Element.prototype.destroy = function () {\n var destroyed = this.destroyed;\n if (destroyed) {\n return;\n }\n this.attrs = {};\n _super.prototype.destroy.call(this);\n // this.onCanvasChange('destroy');\n };\n /**\n * 是否处于动画暂停状态\n * @return {boolean} 是否处于动画暂停状态\n */\n Element.prototype.isAnimatePaused = function () {\n return this.get('_pause').isPaused;\n };\n /**\n * 执行动画,支持多种函数签名\n * 1. animate(toAttrs: ElementAttrs, duration: number, easing?: string, callback?: () => void, delay?: number)\n * 2. animate(onFrame: OnFrame, duration: number, easing?: string, callback?: () => void, delay?: number)\n * 3. animate(toAttrs: ElementAttrs, cfg: AnimateCfg)\n * 4. animate(onFrame: OnFrame, cfg: AnimateCfg)\n * 各个参数的含义为:\n * toAttrs 动画最终状态\n * onFrame 自定义帧动画函数\n * duration 动画执行时间\n * easing 动画缓动效果\n * callback 动画执行后的回调\n * delay 动画延迟时间\n */\n Element.prototype.animate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this.get('timeline') && !this.get('canvas')) {\n return;\n }\n this.set('animating', true);\n var timeline = this.get('timeline');\n if (!timeline) {\n timeline = this.get('canvas').get('timeline');\n this.set('timeline', timeline);\n }\n var animations = this.get('animations') || [];\n // 初始化 tick\n if (!timeline.timer) {\n timeline.initTimer();\n }\n var toAttrs = args[0], duration = args[1], _a = args[2], easing = _a === void 0 ? 'easeLinear' : _a, _b = args[3], callback = _b === void 0 ? noop : _b, _c = args[4], delay = _c === void 0 ? 0 : _c;\n var onFrame;\n var repeat;\n var pauseCallback;\n var resumeCallback;\n var animateCfg;\n // 第二个参数,既可以是动画最终状态 toAttrs,也可以是自定义帧动画函数 onFrame\n if (isFunction(toAttrs)) {\n onFrame = toAttrs;\n toAttrs = {};\n }\n else if (isObject(toAttrs) && toAttrs.onFrame) {\n // 兼容 3.0 中的写法,onFrame 和 repeat 可在 toAttrs 中设置\n onFrame = toAttrs.onFrame;\n repeat = toAttrs.repeat;\n }\n // 第二个参数,既可以是执行时间 duration,也可以是动画参数 animateCfg\n if (isObject(duration)) {\n animateCfg = duration;\n duration = animateCfg.duration;\n easing = animateCfg.easing || 'easeLinear';\n delay = animateCfg.delay || 0;\n // animateCfg 中的设置优先级更高\n repeat = animateCfg.repeat || repeat || false;\n callback = animateCfg.callback || noop;\n pauseCallback = animateCfg.pauseCallback || noop;\n resumeCallback = animateCfg.resumeCallback || noop;\n }\n else {\n // 第四个参数,既可以是回调函数 callback,也可以是延迟时间 delay\n if (isNumber(callback)) {\n delay = callback;\n callback = null;\n }\n // 第三个参数,既可以是缓动参数 easing,也可以是回调函数 callback\n if (isFunction(easing)) {\n callback = easing;\n easing = 'easeLinear';\n }\n else {\n easing = easing || 'easeLinear';\n }\n }\n var formatToAttrs = getFormatToAttrs(toAttrs, this);\n var animation = {\n fromAttrs: getFormatFromAttrs(formatToAttrs, this),\n toAttrs: formatToAttrs,\n duration: duration,\n easing: easing,\n repeat: repeat,\n callback: callback,\n pauseCallback: pauseCallback,\n resumeCallback: resumeCallback,\n delay: delay,\n startTime: timeline.getTime(),\n id: uniqueId(),\n onFrame: onFrame,\n pathFormatted: false,\n };\n // 如果动画元素队列中已经有这个图形了\n if (animations.length > 0) {\n // 先检查是否需要合并属性。若有相同的动画,将该属性从前一个动画中删除,直接用后一个动画中\n animations = checkExistedAttrs(animations, animation);\n }\n else {\n // 否则将图形添加到动画元素队列\n timeline.addAnimator(this);\n }\n animations.push(animation);\n this.set('animations', animations);\n this.set('_pause', { isPaused: false });\n };\n /**\n * 停止动画\n * @param {boolean} toEnd 是否到动画的最终状态\n */\n Element.prototype.stopAnimate = function (toEnd) {\n var _this = this;\n if (toEnd === void 0) { toEnd = true; }\n var animations = this.get('animations');\n each(animations, function (animation) {\n // 将动画执行到最后一帧\n if (toEnd) {\n if (animation.onFrame) {\n _this.attr(animation.onFrame(1));\n }\n else {\n _this.attr(animation.toAttrs);\n }\n }\n if (animation.callback) {\n // 动画停止时的回调\n animation.callback();\n }\n });\n this.set('animating', false);\n this.set('animations', []);\n };\n /**\n * 暂停动画\n */\n Element.prototype.pauseAnimate = function () {\n var timeline = this.get('timeline');\n var animations = this.get('animations');\n var pauseTime = timeline.getTime();\n each(animations, function (animation) {\n animation._paused = true;\n animation._pauseTime = pauseTime;\n if (animation.pauseCallback) {\n // 动画暂停时的回调\n animation.pauseCallback();\n }\n });\n // 记录下是在什么时候暂停的\n this.set('_pause', {\n isPaused: true,\n pauseTime: pauseTime,\n });\n return this;\n };\n /**\n * 恢复动画\n */\n Element.prototype.resumeAnimate = function () {\n var timeline = this.get('timeline');\n var current = timeline.getTime();\n var animations = this.get('animations');\n var pauseTime = this.get('_pause').pauseTime;\n // 之后更新属性需要计算动画已经执行的时长,如果暂停了,就把初始时间调后\n each(animations, function (animation) {\n animation.startTime = animation.startTime + (current - pauseTime);\n animation._paused = false;\n animation._pauseTime = null;\n if (animation.resumeCallback) {\n animation.resumeCallback();\n }\n });\n this.set('_pause', {\n isPaused: false,\n });\n this.set('animations', animations);\n return this;\n };\n /**\n * 触发委托事件\n * @param {string} type 事件类型\n * @param {GraphEvent} eventObj 事件对象\n */\n Element.prototype.emitDelegation = function (type, eventObj) {\n var _this = this;\n var paths = eventObj.propagationPath;\n var events = this.getEvents();\n var relativeShape;\n if (type === 'mouseenter') {\n relativeShape = eventObj.fromShape;\n }\n else if (type === 'mouseleave') {\n relativeShape = eventObj.toShape;\n }\n var _loop_1 = function (i) {\n var element = paths[i];\n // 暂定跟 name 绑定\n var name_1 = element.get('name');\n if (name_1) {\n // 第一个 mouseenter 和 mouseleave 的停止即可,因为后面的都是前面的 Parent\n if (\n // 只有 element 是 Group 或者 Canvas 的时候,才需要判断 isParent\n (element.isGroup() || (element.isCanvas && element.isCanvas())) &&\n relativeShape &&\n isParent(element, relativeShape)) {\n return \"break\";\n }\n if (isArray(name_1)) {\n each(name_1, function (subName) {\n _this.emitDelegateEvent(element, subName, eventObj);\n });\n }\n else {\n this_1.emitDelegateEvent(element, name_1, eventObj);\n }\n }\n };\n var this_1 = this;\n // 至少有一个对象,且第一个对象为 shape\n for (var i = 0; i < paths.length; i++) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\")\n break;\n }\n };\n Element.prototype.emitDelegateEvent = function (element, name, eventObj) {\n var events = this.getEvents();\n // 事件委托的形式 name:type\n var eventName = name + DELEGATION_SPLIT + eventObj.type;\n if (events[eventName] || events[WILDCARD]) {\n // 对于通配符 *,事件名称 = 委托事件名称\n eventObj.name = eventName;\n eventObj.currentTarget = element;\n eventObj.delegateTarget = this;\n // 将委托事件的监听对象 delegateObject 挂载到事件对象上\n eventObj.delegateObject = element.get('delegateObject');\n this.emit(eventName, eventObj);\n }\n };\n /**\n * 移动元素\n * @param {number} translateX 水平移动距离\n * @param {number} translateY 垂直移动距离\n * @return {IElement} 元素\n */\n Element.prototype.translate = function (translateX, translateY) {\n if (translateX === void 0) { translateX = 0; }\n if (translateY === void 0) { translateY = 0; }\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['t', translateX, translateY]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 移动元素到目标位置\n * @param {number} targetX 目标位置的水平坐标\n * @param {number} targetX 目标位置的垂直坐标\n * @return {IElement} 元素\n */\n Element.prototype.move = function (targetX, targetY) {\n var x = this.attr('x') || 0;\n var y = this.attr('y') || 0;\n this.translate(targetX - x, targetY - y);\n return this;\n };\n /**\n * 移动元素到目标位置,等价于 move 方法。由于 moveTo 的语义性更强,因此在文档中推荐使用 moveTo 方法\n * @param {number} targetX 目标位置的 x 轴坐标\n * @param {number} targetY 目标位置的 y 轴坐标\n * @return {IElement} 元素\n */\n Element.prototype.moveTo = function (targetX, targetY) {\n return this.move(targetX, targetY);\n };\n /**\n * 缩放元素\n * @param {number} ratioX 水平缩放比例\n * @param {number} ratioY 垂直缩放比例\n * @return {IElement} 元素\n */\n Element.prototype.scale = function (ratioX, ratioY) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['s', ratioX, ratioY || ratioX]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以画布左上角 (0, 0) 为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotate = function (radian) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['r', radian]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以起始点为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotateAtStart = function (rotate) {\n var _a = this.attr(), x = _a.x, y = _a.y;\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [\n ['t', -x, -y],\n ['r', rotate],\n ['t', x, y],\n ]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以任意点 (x, y) 为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotateAtPoint = function (x, y, rotate) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [\n ['t', -x, -y],\n ['r', rotate],\n ['t', x, y],\n ]);\n this.setMatrix(newMatrix);\n return this;\n };\n return Element;\n}(Base));\nexport default Element;\n//# sourceMappingURL=element.js.map","import { __extends } from \"tslib\";\nimport Element from './element';\nimport { isFunction, isObject, each, removeFromArray, upperFirst, isAllowCapture } from '../util/util';\nvar SHAPE_MAP = {};\nvar INDEX = '_INDEX';\n/**\n * 设置 canvas\n * @param {IElement} element 元素\n * @param {ICanvas} canvas 画布\n */\nfunction setCanvas(element, canvas) {\n element.set('canvas', canvas);\n if (element.isGroup()) {\n var children = element.get('children');\n if (children.length) {\n children.forEach(function (child) {\n setCanvas(child, canvas);\n });\n }\n }\n}\n/**\n * 设置 timeline\n * @param {IElement} element 元素\n * @param {Timeline} timeline 时间轴\n */\nfunction setTimeline(element, timeline) {\n element.set('timeline', timeline);\n if (element.isGroup()) {\n var children = element.get('children');\n if (children.length) {\n children.forEach(function (child) {\n setTimeline(child, timeline);\n });\n }\n }\n}\nfunction contains(container, element) {\n var children = container.getChildren();\n return children.indexOf(element) >= 0;\n}\nfunction removeChild(container, element, destroy) {\n if (destroy === void 0) { destroy = true; }\n // 不再调用 element.remove() 方法,会出现循环调用\n if (destroy) {\n element.destroy();\n }\n else {\n element.set('parent', null);\n element.set('canvas', null);\n }\n removeFromArray(container.getChildren(), element);\n}\nfunction getComparer(compare) {\n return function (left, right) {\n var result = compare(left, right);\n return result === 0 ? left[INDEX] - right[INDEX] : result;\n };\n}\nvar Container = /** @class */ (function (_super) {\n __extends(Container, _super);\n function Container() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Container.prototype.isCanvas = function () {\n return false;\n };\n // 根据子节点确定 BBox\n Container.prototype.getBBox = function () {\n // 所有的值可能在画布的可视区外\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并\n var children = this.getChildren().filter(function (child) {\n return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0));\n });\n if (children.length > 0) {\n each(children, function (child) {\n var _a = child.getBBox(), childMinX = _a.minX, childMaxX = _a.maxX, childMinY = _a.minY, childMaxY = _a.maxY;\n if (childMinX < minX) {\n minX = childMinX;\n }\n if (childMaxX > maxX) {\n maxX = childMaxX;\n }\n if (childMinY < minY) {\n minY = childMinY;\n }\n if (childMaxY > maxY) {\n maxY = childMaxY;\n }\n });\n }\n else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n var box = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n return box;\n };\n // 获取画布的包围盒\n Container.prototype.getCanvasBBox = function () {\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并\n var children = this.getChildren().filter(function (child) {\n return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0));\n });\n if (children.length > 0) {\n each(children, function (child) {\n var _a = child.getCanvasBBox(), childMinX = _a.minX, childMaxX = _a.maxX, childMinY = _a.minY, childMaxY = _a.maxY;\n if (childMinX < minX) {\n minX = childMinX;\n }\n if (childMaxX > maxX) {\n maxX = childMaxX;\n }\n if (childMinY < minY) {\n minY = childMinY;\n }\n if (childMaxY > maxY) {\n maxY = childMaxY;\n }\n });\n }\n else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n var box = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n return box;\n };\n Container.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n cfg['children'] = [];\n return cfg;\n };\n Container.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name === 'matrix') {\n var totalMatrix = this.getTotalMatrix();\n this._applyChildrenMarix(totalMatrix);\n }\n };\n // 不但应用到自己身上还要应用于子元素\n Container.prototype.applyMatrix = function (matrix) {\n var preTotalMatrix = this.getTotalMatrix();\n _super.prototype.applyMatrix.call(this, matrix);\n var totalMatrix = this.getTotalMatrix();\n // totalMatrix 没有发生变化时,这里仅考虑两者都为 null 时\n // 不继续向下传递矩阵\n if (totalMatrix === preTotalMatrix) {\n return;\n }\n this._applyChildrenMarix(totalMatrix);\n };\n // 在子元素上设置矩阵\n Container.prototype._applyChildrenMarix = function (totalMatrix) {\n var children = this.getChildren();\n each(children, function (child) {\n child.applyMatrix(totalMatrix);\n });\n };\n // 兼容老版本的接口\n Container.prototype.addShape = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var type = args[0];\n var cfg = args[1];\n if (isObject(type)) {\n cfg = type;\n }\n else {\n cfg['type'] = type;\n }\n var shapeType = SHAPE_MAP[cfg.type];\n if (!shapeType) {\n shapeType = upperFirst(cfg.type);\n SHAPE_MAP[cfg.type] = shapeType;\n }\n var ShapeBase = this.getShapeBase();\n var shape = new ShapeBase[shapeType](cfg);\n this.add(shape);\n return shape;\n };\n Container.prototype.addGroup = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var groupClass = args[0], cfg = args[1];\n var group;\n if (isFunction(groupClass)) {\n if (cfg) {\n group = new groupClass(cfg);\n }\n else {\n group = new groupClass({\n // canvas,\n parent: this,\n });\n }\n }\n else {\n var tmpCfg = groupClass || {};\n var TmpGroupClass = this.getGroupBase();\n group = new TmpGroupClass(tmpCfg);\n }\n this.add(group);\n return group;\n };\n Container.prototype.getCanvas = function () {\n var canvas;\n if (this.isCanvas()) {\n canvas = this;\n }\n else {\n canvas = this.get('canvas');\n }\n return canvas;\n };\n Container.prototype.getShape = function (x, y, ev) {\n // 如果不支持拾取,则直接返回\n if (!isAllowCapture(this)) {\n return null;\n }\n var children = this.getChildren();\n var shape;\n // 如果容器是 group\n if (!this.isCanvas()) {\n var v = [x, y, 1];\n // 将 x, y 转换成对应于 group 的局部坐标\n v = this.invertFromMatrix(v);\n if (!this.isClipped(v[0], v[1])) {\n shape = this._findShape(children, v[0], v[1], ev);\n }\n }\n else {\n shape = this._findShape(children, x, y, ev);\n }\n return shape;\n };\n Container.prototype._findShape = function (children, x, y, ev) {\n var shape = null;\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i];\n if (isAllowCapture(child)) {\n if (child.isGroup()) {\n shape = child.getShape(x, y, ev);\n }\n else if (child.isHit(x, y)) {\n shape = child;\n }\n }\n if (shape) {\n break;\n }\n }\n return shape;\n };\n Container.prototype.add = function (element) {\n var canvas = this.getCanvas();\n var children = this.getChildren();\n var timeline = this.get('timeline');\n var preParent = element.getParent();\n if (preParent) {\n removeChild(preParent, element, false);\n }\n element.set('parent', this);\n if (canvas) {\n setCanvas(element, canvas);\n }\n if (timeline) {\n setTimeline(element, timeline);\n }\n children.push(element);\n element.onCanvasChange('add');\n this._applyElementMatrix(element);\n };\n // 将当前容器的矩阵应用到子元素\n Container.prototype._applyElementMatrix = function (element) {\n var totalMatrix = this.getTotalMatrix();\n // 添加图形或者分组时,需要把当前图元的矩阵设置进去\n if (totalMatrix) {\n element.applyMatrix(totalMatrix);\n }\n };\n Container.prototype.getChildren = function () {\n return this.get('children');\n };\n Container.prototype.sort = function () {\n var children = this.getChildren();\n // 稳定排序\n each(children, function (child, index) {\n child[INDEX] = index;\n return child;\n });\n children.sort(getComparer(function (obj1, obj2) {\n return obj1.get('zIndex') - obj2.get('zIndex');\n }));\n this.onCanvasChange('sort');\n };\n Container.prototype.clear = function () {\n this.set('clearing', true);\n if (this.destroyed) {\n return;\n }\n var children = this.getChildren();\n for (var i = children.length - 1; i >= 0; i--) {\n children[i].destroy(); // 销毁子元素\n }\n this.set('children', []);\n this.onCanvasChange('clear');\n this.set('clearing', false);\n };\n Container.prototype.destroy = function () {\n if (this.get('destroyed')) {\n return;\n }\n this.clear();\n _super.prototype.destroy.call(this);\n };\n /**\n * 获取第一个子元素\n * @return {IElement} 第一个元素\n */\n Container.prototype.getFirst = function () {\n return this.getChildByIndex(0);\n };\n /**\n * 获取最后一个子元素\n * @return {IElement} 元素\n */\n Container.prototype.getLast = function () {\n var children = this.getChildren();\n return this.getChildByIndex(children.length - 1);\n };\n /**\n * 根据索引获取子元素\n * @return {IElement} 第一个元素\n */\n Container.prototype.getChildByIndex = function (index) {\n var children = this.getChildren();\n return children[index];\n };\n /**\n * 子元素的数量\n * @return {number} 子元素数量\n */\n Container.prototype.getCount = function () {\n var children = this.getChildren();\n return children.length;\n };\n /**\n * 是否包含对应元素\n * @param {IElement} element 元素\n * @return {boolean}\n */\n Container.prototype.contain = function (element) {\n var children = this.getChildren();\n return children.indexOf(element) > -1;\n };\n /**\n * 移除对应子元素\n * @param {IElement} element 子元素\n * @param {boolean} destroy 是否销毁子元素,默认为 true\n */\n Container.prototype.removeChild = function (element, destroy) {\n if (destroy === void 0) { destroy = true; }\n if (this.contain(element)) {\n element.remove(destroy);\n }\n };\n /**\n * 查找所有匹配的元素\n * @param {ElementFilterFn} fn 匹配函数\n * @return {IElement[]} 元素数组\n */\n Container.prototype.findAll = function (fn) {\n var rst = [];\n var children = this.getChildren();\n each(children, function (element) {\n if (fn(element)) {\n rst.push(element);\n }\n if (element.isGroup()) {\n rst = rst.concat(element.findAll(fn));\n }\n });\n return rst;\n };\n /**\n * 查找元素,找到第一个返回\n * @param {ElementFilterFn} fn 匹配函数\n * @return {IElement|null} 元素,可以为空\n */\n Container.prototype.find = function (fn) {\n var rst = null;\n var children = this.getChildren();\n each(children, function (element) {\n if (fn(element)) {\n rst = element;\n }\n else if (element.isGroup()) {\n rst = element.find(fn);\n }\n if (rst) {\n return false;\n }\n });\n return rst;\n };\n /**\n * 根据 ID 查找元素\n * @param {string} id 元素 id\n * @return {IElement|null} 元素\n */\n Container.prototype.findById = function (id) {\n return this.find(function (element) {\n return element.get('id') === id;\n });\n };\n /**\n * 该方法即将废弃,不建议使用\n * 根据 className 查找元素\n * TODO: 该方式定义暂时只给 G6 3.3 以后的版本使用,待 G6 中的 findByClassName 方法移除后,G 也需要同步移除\n * @param {string} className 元素 className\n * @return {IElement | null} 元素\n */\n Container.prototype.findByClassName = function (className) {\n return this.find(function (element) {\n return element.get('className') === className;\n });\n };\n /**\n * 根据 name 查找元素列表\n * @param {string} name 元素名称\n * @return {IElement[]} 元素\n */\n Container.prototype.findAllByName = function (name) {\n return this.findAll(function (element) {\n return element.get('name') === name;\n });\n };\n return Container;\n}(Element));\nexport default Container;\n//# sourceMappingURL=container.js.map","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export function linear(t) {\n return +t;\n}\n","export function quadIn(t) {\n return t * t;\n}\n\nexport function quadOut(t) {\n return t * (2 - t);\n}\n\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n","var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n","import {tpmt} from \"./math.js\";\n\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\n\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\n\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}\n","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n","import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n","import * as d3Ease from 'd3-ease';\nvar EASING_MAP = {};\n/**\n * 根据名称获取对应的动画缓动函数\n * @param type 动画缓动函数名称\n */\nexport function getEasing(type) {\n // 默认从 d3-ease 中获取\n return EASING_MAP[type.toLowerCase()] || d3Ease[type];\n}\n/**\n * 注册动画缓动函数\n * @param type 动画缓动函数名称\n * @param easeFn 动画缓动函数\n */\nexport function registerEasing(type, easeFn) {\n EASING_MAP[type.toLowerCase()] = easeFn;\n}\n//# sourceMappingURL=register.js.map","export var isColorProp = function (prop) { return ['fill', 'stroke', 'fillStyle', 'strokeStyle'].includes(prop); };\nexport var isGradientColor = function (val) { return /^[r,R,L,l]{1}[\\s]*\\(/.test(val); };\n//# sourceMappingURL=color.js.map","import { isEqual, isNumber, isFunction } from '@antv/util';\nimport * as d3Timer from 'd3-timer';\nimport { interpolate, interpolateArray } from 'd3-interpolate'; // 目前整体动画只需要数值和数组的差值计算\nimport { getEasing } from './register';\nimport * as PathUtil from '../util/path';\nimport { isColorProp, isGradientColor } from '../util/color';\nvar IDENTITY_MATRIX = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n/**\n * 使用 ratio 进行插值计算来更新属性\n * @param {IElement} shape 元素\n * @param {Animation} animation 动画\n * @param {number} ratio 比例\n * @return {boolean} 动画是否执行完成\n */\nfunction _update(shape, animation, ratio) {\n var cProps = {}; // 此刻属性\n var fromAttrs = animation.fromAttrs, toAttrs = animation.toAttrs;\n if (shape.destroyed) {\n return;\n }\n var interf; // 差值函数\n for (var k in toAttrs) {\n if (!isEqual(fromAttrs[k], toAttrs[k])) {\n if (k === 'path') {\n var toPath = toAttrs[k];\n var fromPath = fromAttrs[k];\n if (toPath.length > fromPath.length) {\n toPath = PathUtil.parsePathString(toAttrs[k]); // 终点状态\n fromPath = PathUtil.parsePathString(fromAttrs[k]); // 起始状态\n fromPath = PathUtil.fillPathByDiff(fromPath, toPath);\n fromPath = PathUtil.formatPath(fromPath, toPath);\n animation.fromAttrs.path = fromPath;\n animation.toAttrs.path = toPath;\n }\n else if (!animation.pathFormatted) {\n toPath = PathUtil.parsePathString(toAttrs[k]);\n fromPath = PathUtil.parsePathString(fromAttrs[k]);\n fromPath = PathUtil.formatPath(fromPath, toPath);\n animation.fromAttrs.path = fromPath;\n animation.toAttrs.path = toPath;\n animation.pathFormatted = true;\n }\n cProps[k] = [];\n for (var i = 0; i < toPath.length; i++) {\n var toPathPoint = toPath[i];\n var fromPathPoint = fromPath[i];\n var cPathPoint = [];\n for (var j = 0; j < toPathPoint.length; j++) {\n if (isNumber(toPathPoint[j]) && fromPathPoint && isNumber(fromPathPoint[j])) {\n interf = interpolate(fromPathPoint[j], toPathPoint[j]);\n cPathPoint.push(interf(ratio));\n }\n else {\n cPathPoint.push(toPathPoint[j]);\n }\n }\n cProps[k].push(cPathPoint);\n }\n }\n else if (k === 'matrix') {\n /*\n 对矩阵进行插值时,需要保证矩阵不为空,为空则使用单位矩阵\n TODO: 二维和三维场景下单位矩阵不同,之后 WebGL 版需要做进一步处理\n */\n var matrixFn = interpolateArray(fromAttrs[k] || IDENTITY_MATRIX, toAttrs[k] || IDENTITY_MATRIX);\n var currentMatrix = matrixFn(ratio);\n cProps[k] = currentMatrix;\n }\n else if (isColorProp(k) && isGradientColor(toAttrs[k])) {\n cProps[k] = toAttrs[k];\n }\n else if (!isFunction(toAttrs[k])) {\n // 非函数类型的值才能做插值\n interf = interpolate(fromAttrs[k], toAttrs[k]);\n cProps[k] = interf(ratio);\n }\n }\n }\n shape.attr(cProps);\n}\n/**\n * 根据自定义帧动画函数 onFrame 来更新属性\n * @param {IElement} shape 元素\n * @param {Animation} animation 动画\n * @param {number} elapsed 动画执行时间(毫秒)\n * @return {boolean} 动画是否执行完成\n */\nfunction update(shape, animation, elapsed) {\n var startTime = animation.startTime, delay = animation.delay;\n // 如果还没有开始执行或暂停,先不更新\n if (elapsed < startTime + delay || animation._paused) {\n return false;\n }\n var ratio;\n var duration = animation.duration;\n var easing = animation.easing;\n var easeFn = getEasing(easing);\n // 已执行时间\n elapsed = elapsed - startTime - animation.delay;\n if (animation.repeat) {\n // 如果动画重复执行,则 elapsed > duration,计算 ratio 时需取模\n ratio = (elapsed % duration) / duration;\n ratio = easeFn(ratio);\n }\n else {\n ratio = elapsed / duration;\n if (ratio < 1) {\n // 动画未执行完\n ratio = easeFn(ratio);\n }\n else {\n // 动画已执行完\n if (animation.onFrame) {\n shape.attr(animation.onFrame(1));\n }\n else {\n shape.attr(animation.toAttrs);\n }\n return true;\n }\n }\n if (animation.onFrame) {\n var attrs = animation.onFrame(ratio);\n shape.attr(attrs);\n }\n else {\n _update(shape, animation, ratio);\n }\n return false;\n}\nvar Timeline = /** @class */ (function () {\n /**\n * 时间轴构造函数,依赖于画布\n * @param {}\n */\n function Timeline(canvas) {\n /**\n * 执行动画的元素列表\n * @type {IElement[]}\n */\n this.animators = [];\n /**\n * 当前时间\n * @type {number}\n */\n this.current = 0;\n /**\n * 定时器\n * @type {d3Timer.Timer}\n */\n this.timer = null;\n this.canvas = canvas;\n }\n /**\n * 初始化定时器\n */\n Timeline.prototype.initTimer = function () {\n var _this = this;\n var isFinished = false;\n var shape;\n var animations;\n var animation;\n this.timer = d3Timer.timer(function (elapsed) {\n _this.current = elapsed;\n if (_this.animators.length > 0) {\n for (var i = _this.animators.length - 1; i >= 0; i--) {\n shape = _this.animators[i];\n if (shape.destroyed) {\n // 如果已经被销毁,直接移出队列\n _this.removeAnimator(i);\n continue;\n }\n if (!shape.isAnimatePaused()) {\n animations = shape.get('animations');\n for (var j = animations.length - 1; j >= 0; j--) {\n animation = animations[j];\n isFinished = update(shape, animation, elapsed);\n if (isFinished) {\n animations.splice(j, 1);\n isFinished = false;\n if (animation.callback) {\n animation.callback();\n }\n }\n }\n }\n if (animations.length === 0) {\n _this.removeAnimator(i);\n }\n }\n var autoDraw = _this.canvas.get('autoDraw');\n // 非自动渲染模式下,手动调用 canvas.draw() 重新渲染\n if (!autoDraw) {\n _this.canvas.draw();\n }\n }\n });\n };\n /**\n * 增加动画元素\n */\n Timeline.prototype.addAnimator = function (shape) {\n this.animators.push(shape);\n };\n /**\n * 移除动画元素\n */\n Timeline.prototype.removeAnimator = function (index) {\n this.animators.splice(index, 1);\n };\n /**\n * 是否有动画在执行\n */\n Timeline.prototype.isAnimating = function () {\n return !!this.animators.length;\n };\n /**\n * 停止定时器\n */\n Timeline.prototype.stop = function () {\n if (this.timer) {\n this.timer.stop();\n }\n };\n /**\n * 停止时间轴上所有元素的动画,并置空动画元素列表\n * @param {boolean} toEnd 是否到动画的最终状态,用来透传给动画元素的 stopAnimate 方法\n */\n Timeline.prototype.stopAllAnimations = function (toEnd) {\n if (toEnd === void 0) { toEnd = true; }\n this.animators.forEach(function (animator) {\n animator.stopAnimate(toEnd);\n });\n this.animators = [];\n this.canvas.draw();\n };\n /**\n * 获取当前时间\n */\n Timeline.prototype.getTime = function () {\n return this.current;\n };\n return Timeline;\n}());\nexport default Timeline;\n//# sourceMappingURL=timeline.js.map","/**\n * @fileoverview 事件处理器\n * @author dxq613@gmail.com\n */\nimport GraphEvent from './graph-event';\nimport { each, isParent } from '../util/util';\nvar CLICK_OFFSET = 40;\nvar LEFT_BTN_CODE = 0;\nvar DELEGATION_SPLIT = ':';\nvar EVENTS = [\n 'mousedown',\n 'mouseup',\n 'dblclick',\n 'mouseout',\n 'mouseover',\n 'mousemove',\n 'mouseleave',\n 'mouseenter',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'dragenter',\n 'dragover',\n 'dragleave',\n 'drop',\n 'contextmenu',\n 'mousewheel',\n];\n// 是否有委托事件监听\nfunction hasDelegation(events, type) {\n for (var key in events) {\n if (events.hasOwnProperty(key) && key.indexOf(DELEGATION_SPLIT + type) >= 0) {\n return true;\n }\n }\n return false;\n}\n// 触发目标事件,目标只能是 shape 或 canvas\nfunction emitTargetEvent(target, type, eventObj) {\n eventObj.name = type;\n eventObj.target = target;\n eventObj.currentTarget = target;\n eventObj.delegateTarget = target;\n target.emit(type, eventObj);\n}\n// 事件冒泡, enter 和 leave 需要对 fromShape 和 toShape 进行判同\nfunction bubbleEvent(container, type, eventObj) {\n if (eventObj.bubbles) {\n var relativeShape = void 0;\n var isOverEvent = false;\n if (type === 'mouseenter') {\n relativeShape = eventObj.fromShape;\n isOverEvent = true;\n }\n else if (type === 'mouseleave') {\n isOverEvent = true;\n relativeShape = eventObj.toShape;\n }\n // canvas 上的 mouseenter, mouseleave 事件,仅当进入或者移出 canvas 时触发\n if (container.isCanvas() && isOverEvent) {\n return;\n }\n // 如果相关图形同当前图形在同一个容器内,不触发事件\n if (relativeShape && isParent(container, relativeShape)) {\n // 阻止继续向上冒泡\n eventObj.bubbles = false;\n return;\n }\n // 事件名称可能在委托过程中被修改,因此事件冒泡时需要重新设置事件名称\n eventObj.name = type;\n eventObj.currentTarget = container;\n eventObj.delegateTarget = container;\n container.emit(type, eventObj);\n }\n}\nvar EventController = /** @class */ (function () {\n function EventController(cfg) {\n var _this = this;\n // 正在被拖拽的图形\n this.draggingShape = null;\n this.dragging = false;\n // 当前鼠标/touch所在位置的图形\n this.currentShape = null;\n this.mousedownShape = null;\n this.mousedownPoint = null;\n // 统一处理所有的回调\n this._eventCallback = function (ev) {\n var type = ev.type;\n _this._triggerEvent(type, ev);\n };\n // 在 document 处理拖拽到画布外的事件,处理从图形上移除画布未被捕捉的问题\n this._onDocumentMove = function (ev) {\n var canvas = _this.canvas;\n var el = canvas.get('el');\n if (el !== ev.target) {\n // 不在 canvas 上移动\n if (_this.dragging || _this.currentShape) {\n var pointInfo = _this._getPointInfo(ev);\n // 还在拖拽过程中\n if (_this.dragging) {\n _this._emitEvent('drag', ev, pointInfo, _this.draggingShape);\n }\n // 说明从某个图形直接移动到了画布外面,\n // 修复了 mouseleave 的 bug 后不再出现这种情况\n // if (this.currentShape) {\n // this._emitEvent('mouseleave', ev, pointInfo, this.currentShape, this.currentShape, null);\n // this.currentShape = null;\n // }\n }\n }\n };\n // 在 document 上处理拖拽到外面,释放鼠标时触发 dragend\n this._onDocumentMouseUp = function (ev) {\n var canvas = _this.canvas;\n var el = canvas.get('el');\n if (el !== ev.target) {\n // 不在 canvas 上移动\n if (_this.dragging) {\n var pointInfo = _this._getPointInfo(ev);\n if (_this.draggingShape) {\n // 如果存在拖拽的图形,则也触发 drop 事件\n _this._emitEvent('drop', ev, pointInfo, null);\n }\n _this._emitEvent('dragend', ev, pointInfo, _this.draggingShape);\n _this._afterDrag(_this.draggingShape, pointInfo, ev);\n }\n }\n };\n this.canvas = cfg.canvas;\n }\n EventController.prototype.init = function () {\n this._bindEvents();\n };\n // 注册事件\n EventController.prototype._bindEvents = function () {\n var _this = this;\n var el = this.canvas.get('el');\n each(EVENTS, function (eventName) {\n el.addEventListener(eventName, _this._eventCallback);\n });\n if (document) {\n // 处理移动到外面没有触发 shape mouse leave 的事件\n // 处理拖拽到外部的问题\n document.addEventListener('mousemove', this._onDocumentMove);\n // 处理拖拽过程中在外部释放鼠标的问题\n document.addEventListener('mouseup', this._onDocumentMouseUp);\n }\n };\n // 清理事件\n EventController.prototype._clearEvents = function () {\n var _this = this;\n var el = this.canvas.get('el');\n each(EVENTS, function (eventName) {\n el.removeEventListener(eventName, _this._eventCallback);\n });\n if (document) {\n document.removeEventListener('mousemove', this._onDocumentMove);\n document.removeEventListener('mouseup', this._onDocumentMouseUp);\n }\n };\n EventController.prototype._getEventObj = function (type, event, point, target, fromShape, toShape) {\n var eventObj = new GraphEvent(type, event);\n eventObj.fromShape = fromShape;\n eventObj.toShape = toShape;\n eventObj.x = point.x;\n eventObj.y = point.y;\n eventObj.clientX = point.clientX;\n eventObj.clientY = point.clientY;\n eventObj.propagationPath.push(target);\n // 事件的x,y应该是基于画布左上角的,与canvas的matrix无关\n return eventObj;\n };\n // 根据点获取图形,提取成独立方法,便于后续优化\n EventController.prototype._getShape = function (point, ev) {\n return this.canvas.getShape(point.x, point.y, ev);\n };\n // 获取事件的当前点的信息\n EventController.prototype._getPointInfo = function (ev) {\n var canvas = this.canvas;\n var clientPoint = canvas.getClientByEvent(ev);\n var point = canvas.getPointByEvent(ev);\n return {\n x: point.x,\n y: point.y,\n clientX: clientPoint.x,\n clientY: clientPoint.y,\n };\n };\n // 触发事件\n EventController.prototype._triggerEvent = function (type, ev) {\n var pointInfo = this._getPointInfo(ev);\n // 每次都获取图形有一定成本,后期可以考虑进行缓存策略\n var shape = this._getShape(pointInfo, ev);\n var method = this[\"_on\" + type];\n var leaveCanvas = false;\n if (method) {\n method.call(this, pointInfo, shape, ev);\n }\n else {\n var preShape = this.currentShape;\n // 如果进入、移出画布时存在图形,则要分别触发事件\n if (type === 'mouseenter' || type === 'dragenter' || type === 'mouseover') {\n this._emitEvent(type, ev, pointInfo, null, null, shape); // 先进入画布\n if (shape) {\n this._emitEvent(type, ev, pointInfo, shape, null, shape); // 再触发图形的事件\n }\n if (type === 'mouseenter' && this.draggingShape) {\n // 如果正在拖拽图形, 则触发 dragleave\n this._emitEvent('dragenter', ev, pointInfo, null);\n }\n }\n else if (type === 'mouseleave' || type === 'dragleave' || type === 'mouseout') {\n leaveCanvas = true;\n if (preShape) {\n this._emitEvent(type, ev, pointInfo, preShape, preShape, null); // 先触发图形的事件\n }\n this._emitEvent(type, ev, pointInfo, null, preShape, null); // 再触发离开画布事件\n if (type === 'mouseleave' && this.draggingShape) {\n this._emitEvent('dragleave', ev, pointInfo, null);\n }\n }\n else {\n this._emitEvent(type, ev, pointInfo, shape, null, null); // 一般事件中不需要考虑 from, to\n }\n }\n if (!leaveCanvas) {\n this.currentShape = shape;\n }\n // 当鼠标从画布移动到 shape 或者从 preShape 移动到 shape 时,应用 shape 上的鼠标样式\n if (shape && !shape.get('destroyed')) {\n var canvas = this.canvas;\n var el = canvas.get('el');\n el.style.cursor = shape.attr('cursor') || canvas.get('cursor');\n }\n };\n // 记录下点击的位置、图形,便于拖拽事件、click 事件的判定\n EventController.prototype._onmousedown = function (pointInfo, shape, event) {\n // 只有鼠标左键的 mousedown 事件才会设置 mousedownShape 等属性,避免鼠标右键的 mousedown 事件引起其他事件发生\n if (event.button === LEFT_BTN_CODE) {\n this.mousedownShape = shape;\n this.mousedownPoint = pointInfo;\n this.mousedownTimeStamp = event.timeStamp;\n }\n this._emitEvent('mousedown', event, pointInfo, shape, null, null); // mousedown 不考虑fromShape, toShape\n };\n // mouseleave 和 mouseenter 都是成对存在的\n // mouseenter 和 mouseover 同时触发\n EventController.prototype._emitMouseoverEvents = function (event, pointInfo, fromShape, toShape) {\n var el = this.canvas.get('el');\n if (fromShape !== toShape) {\n if (fromShape) {\n this._emitEvent('mouseout', event, pointInfo, fromShape, fromShape, toShape);\n this._emitEvent('mouseleave', event, pointInfo, fromShape, fromShape, toShape);\n // 当鼠标从 fromShape 移动到画布上时,重置鼠标样式\n if (!toShape || toShape.get('destroyed')) {\n el.style.cursor = this.canvas.get('cursor');\n }\n }\n if (toShape) {\n this._emitEvent('mouseover', event, pointInfo, toShape, fromShape, toShape);\n this._emitEvent('mouseenter', event, pointInfo, toShape, fromShape, toShape);\n }\n }\n };\n // dragover 不等同于 mouseover,而等同于 mousemove\n EventController.prototype._emitDragoverEvents = function (event, pointInfo, fromShape, toShape, isCanvasEmit) {\n if (toShape) {\n if (toShape !== fromShape) {\n if (fromShape) {\n this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape);\n }\n this._emitEvent('dragenter', event, pointInfo, toShape, fromShape, toShape);\n }\n if (!isCanvasEmit) {\n this._emitEvent('dragover', event, pointInfo, toShape);\n }\n }\n else if (fromShape) {\n // TODO: 此处判断有问题,当 drag 图形时,也会触发一次 dragleave 事件,因为此时 toShape 为 null,这不是所期望的\n // 经过空白区域\n this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape);\n }\n if (isCanvasEmit) {\n this._emitEvent('dragover', event, pointInfo, toShape);\n }\n };\n // drag 完成后,需要做一些清理工作\n EventController.prototype._afterDrag = function (draggingShape, pointInfo, event) {\n if (draggingShape) {\n draggingShape.set('capture', true); // 恢复可以拾取\n this.draggingShape = null;\n }\n this.dragging = false;\n // drag 完成后,有可能 draggingShape 已经移动到了当前位置,所以不能直接取当前图形\n var shape = this._getShape(pointInfo, event);\n // 拖拽完成后,进行 enter,leave 的判定\n if (shape !== draggingShape) {\n this._emitMouseoverEvents(event, pointInfo, draggingShape, shape);\n }\n this.currentShape = shape; // 更新当前 shape,如果不处理当前图形的 mouseleave 事件可能会出问题\n };\n // 按键抬起时,会终止拖拽、触发点击\n EventController.prototype._onmouseup = function (pointInfo, shape, event) {\n // eevent.button === 0 表示鼠标左键事件,此处加上判断主要是为了避免右键鼠标会触发 mouseup 和 click 事件\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button === LEFT_BTN_CODE) {\n var draggingShape = this.draggingShape;\n if (this.dragging) {\n // 存在可以拖拽的图形,同时拖拽到其他图形上时触发 drag 事件\n if (draggingShape) {\n this._emitEvent('drop', event, pointInfo, shape);\n }\n this._emitEvent('dragend', event, pointInfo, draggingShape);\n this._afterDrag(draggingShape, pointInfo, event);\n }\n else {\n this._emitEvent('mouseup', event, pointInfo, shape); // 先触发 mouseup 再触发 click\n if (shape === this.mousedownShape) {\n this._emitEvent('click', event, pointInfo, shape);\n }\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n }\n };\n // 当触发浏览器的 dragover 事件时,不会再触发 mousemove ,所以这时候的 dragenter, dragleave 事件需要重新处理\n EventController.prototype._ondragover = function (pointInfo, shape, event) {\n event.preventDefault(); // 如果不对 dragover 进行 preventDefault,则不会在 canvas 上触发 drop 事件\n var preShape = this.currentShape;\n this._emitDragoverEvents(event, pointInfo, preShape, shape, true);\n };\n // 大量的图形事件,都通过 mousemove 模拟\n EventController.prototype._onmousemove = function (pointInfo, shape, event) {\n var canvas = this.canvas;\n var preShape = this.currentShape;\n var draggingShape = this.draggingShape;\n // 正在拖拽时\n if (this.dragging) {\n // 正在拖拽中\n if (draggingShape) {\n // 如果拖拽了 shape 会触发 dragenter, dragleave, dragover 和 drag 事件\n this._emitDragoverEvents(event, pointInfo, preShape, shape, false);\n }\n // 如果存在 draggingShape 则会在 draggingShape 上触发 drag 事件,冒泡到 canvas 上\n // 否则在 canvas 上触发 drag 事件\n this._emitEvent('drag', event, pointInfo, draggingShape);\n }\n else {\n var mousedownPoint = this.mousedownPoint;\n if (mousedownPoint) {\n // 当鼠标点击下去,同时移动时,进行 drag 判定\n var mousedownShape = this.mousedownShape;\n var now = event.timeStamp;\n var timeWindow = now - this.mousedownTimeStamp;\n var dx = mousedownPoint.clientX - pointInfo.clientX;\n var dy = mousedownPoint.clientY - pointInfo.clientY;\n var dist = dx * dx + dy * dy;\n if (timeWindow > 120 || dist > CLICK_OFFSET) {\n if (mousedownShape && mousedownShape.get('draggable')) {\n // 设置了 draggable 的 shape 才能触发 drag 相关的事件\n draggingShape = this.mousedownShape; // 拖动鼠标点下时的 shape\n draggingShape.set('capture', false); // 禁止继续拾取,否则无法进行 dragover,dragenter,dragleave,drop的判定\n this.draggingShape = draggingShape;\n this.dragging = true;\n this._emitEvent('dragstart', event, pointInfo, draggingShape);\n // 清理按下鼠标时缓存的值\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n else if (!mousedownShape && canvas.get('draggable')) {\n // 设置了 draggable 的 canvas 才能触发 drag 相关的事件\n this.dragging = true;\n this._emitEvent('dragstart', event, pointInfo, null);\n // 清理按下鼠标时缓存的值\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n else {\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n else {\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n else {\n // 没有按键按下时,则直接触发 mouse over 相关的各种事件\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n // 始终触发移动\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n };\n // 触发事件\n EventController.prototype._emitEvent = function (type, event, pointInfo, shape, fromShape, toShape) {\n var eventObj = this._getEventObj(type, event, pointInfo, shape, fromShape, toShape);\n // 存在 shape 触发,则进行冒泡处理\n if (shape) {\n eventObj.shape = shape;\n // 触发 shape 上的事件\n emitTargetEvent(shape, type, eventObj);\n var parent_1 = shape.getParent();\n // 执行冒泡\n while (parent_1) {\n // 委托事件要先触发\n parent_1.emitDelegation(type, eventObj);\n // 事件冒泡停止,不能妨碍委托事件\n if (!eventObj.propagationStopped) {\n bubbleEvent(parent_1, type, eventObj);\n }\n eventObj.propagationPath.push(parent_1);\n parent_1 = parent_1.getParent();\n }\n }\n else {\n // 如果没有 shape 直接在 canvas 上触发\n var canvas = this.canvas;\n // 直接触发 canvas 上的事件\n emitTargetEvent(canvas, type, eventObj);\n }\n };\n EventController.prototype.destroy = function () {\n // 清理事件\n this._clearEvents();\n // 清理缓存的对象\n this.canvas = null;\n this.currentShape = null;\n this.draggingShape = null;\n this.mousedownPoint = null;\n this.mousedownShape = null;\n this.mousedownTimeStamp = null;\n };\n return EventController;\n}());\nexport default EventController;\n//# sourceMappingURL=event-contoller.js.map","import { __extends } from \"tslib\";\nimport { detect } from 'detect-browser';\nimport Container from './container';\nimport { isBrowser, isNil, isString } from '../util/util';\nimport Timeline from '../animate/timeline';\nimport EventController from '../event/event-contoller';\nvar PX_SUFFIX = 'px';\nvar browser = detect();\nvar isFirefox = browser && browser.name === 'firefox';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas(cfg) {\n var _this = _super.call(this, cfg) || this;\n _this.initContainer();\n _this.initDom();\n _this.initEvents();\n _this.initTimeline();\n return _this;\n }\n Canvas.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // set default cursor style for canvas\n cfg['cursor'] = 'default';\n // CSS transform 目前尚未经过长时间验证,为了避免影响上层业务,默认关闭,上层按需开启\n cfg['supportCSSTransform'] = false;\n return cfg;\n };\n /**\n * @protected\n * 初始化容器\n */\n Canvas.prototype.initContainer = function () {\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n this.set('container', container);\n }\n };\n /**\n * @protected\n * 初始化 DOM\n */\n Canvas.prototype.initDom = function () {\n var el = this.createDom();\n this.set('el', el);\n // 附加到容器\n var container = this.get('container');\n container.appendChild(el);\n // 设置初始宽度\n this.setDOMSize(this.get('width'), this.get('height'));\n };\n /**\n * @protected\n * 初始化绑定的事件\n */\n Canvas.prototype.initEvents = function () {\n var eventController = new EventController({\n canvas: this,\n });\n eventController.init();\n this.set('eventController', eventController);\n };\n /**\n * @protected\n * 初始化时间轴\n */\n Canvas.prototype.initTimeline = function () {\n var timeline = new Timeline(this);\n this.set('timeline', timeline);\n };\n /**\n * @protected\n * 修改画布对应的 DOM 的大小\n * @param {number} width 宽度\n * @param {number} height 高度\n */\n Canvas.prototype.setDOMSize = function (width, height) {\n var el = this.get('el');\n if (isBrowser) {\n el.style.width = width + PX_SUFFIX;\n el.style.height = height + PX_SUFFIX;\n }\n };\n // 实现接口\n Canvas.prototype.changeSize = function (width, height) {\n this.setDOMSize(width, height);\n this.set('width', width);\n this.set('height', height);\n this.onCanvasChange('changeSize');\n };\n /**\n * 获取当前的渲染引擎\n * @return {Renderer} 返回当前的渲染引擎\n */\n Canvas.prototype.getRenderer = function () {\n return this.get('renderer');\n };\n /**\n * 获取画布的 cursor 样式\n * @return {Cursor}\n */\n Canvas.prototype.getCursor = function () {\n return this.get('cursor');\n };\n /**\n * 设置画布的 cursor 样式\n * @param {Cursor} cursor cursor 样式\n */\n Canvas.prototype.setCursor = function (cursor) {\n this.set('cursor', cursor);\n var el = this.get('el');\n if (isBrowser && el) {\n // 直接设置样式,不等待鼠标移动时再设置\n el.style.cursor = cursor;\n }\n };\n // 实现接口\n Canvas.prototype.getPointByEvent = function (ev) {\n var supportCSSTransform = this.get('supportCSSTransform');\n if (supportCSSTransform) {\n // For Firefox <= 38\n if (isFirefox && !isNil(ev.layerX) && ev.layerX !== ev.offsetX) {\n return {\n x: ev.layerX,\n y: ev.layerY,\n };\n }\n if (!isNil(ev.offsetX)) {\n // For IE6+, Firefox >= 39, Chrome, Safari, Opera\n return {\n x: ev.offsetX,\n y: ev.offsetY,\n };\n }\n }\n // should calculate by self for other cases, like Safari in ios\n // TODO: support CSS transform\n var _a = this.getClientByEvent(ev), clientX = _a.x, clientY = _a.y;\n return this.getPointByClient(clientX, clientY);\n };\n // 获取 touch 事件的 clientX 和 clientY 需要单独处理\n Canvas.prototype.getClientByEvent = function (ev) {\n var clientInfo = ev;\n if (ev.touches) {\n if (ev.type === 'touchend') {\n clientInfo = ev.changedTouches[0];\n }\n else {\n clientInfo = ev.touches[0];\n }\n }\n return {\n x: clientInfo.clientX,\n y: clientInfo.clientY,\n };\n };\n // 实现接口\n Canvas.prototype.getPointByClient = function (clientX, clientY) {\n var el = this.get('el');\n var bbox = el.getBoundingClientRect();\n return {\n x: clientX - bbox.left,\n y: clientY - bbox.top,\n };\n };\n // 实现接口\n Canvas.prototype.getClientByPoint = function (x, y) {\n var el = this.get('el');\n var bbox = el.getBoundingClientRect();\n return {\n x: x + bbox.left,\n y: y + bbox.top,\n };\n };\n // 实现接口\n Canvas.prototype.draw = function () { };\n /**\n * @protected\n * 销毁 DOM 容器\n */\n Canvas.prototype.removeDom = function () {\n var el = this.get('el');\n el.parentNode.removeChild(el);\n };\n /**\n * @protected\n * 清理所有的事件\n */\n Canvas.prototype.clearEvents = function () {\n var eventController = this.get('eventController');\n eventController.destroy();\n };\n Canvas.prototype.isCanvas = function () {\n return true;\n };\n Canvas.prototype.getParent = function () {\n return null;\n };\n Canvas.prototype.destroy = function () {\n var timeline = this.get('timeline');\n if (this.get('destroyed')) {\n return;\n }\n this.clear();\n // 同初始化时相反顺序调用\n if (timeline) {\n // 画布销毁时自动停止动画\n timeline.stop();\n }\n this.clearEvents();\n this.removeDom();\n _super.prototype.destroy.call(this);\n };\n return Canvas;\n}(Container));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","import { __extends } from \"tslib\";\nimport Container from './container';\nvar AbstractGroup = /** @class */ (function (_super) {\n __extends(AbstractGroup, _super);\n function AbstractGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractGroup.prototype.isGroup = function () {\n return true;\n };\n AbstractGroup.prototype.isEntityGroup = function () {\n return false;\n };\n AbstractGroup.prototype.clone = function () {\n var clone = _super.prototype.clone.call(this);\n // 获取构造函数\n var children = this.getChildren();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n clone.add(child.clone());\n }\n return clone;\n };\n return AbstractGroup;\n}(Container));\nexport default AbstractGroup;\n//# sourceMappingURL=group.js.map","import { __extends } from \"tslib\";\nimport Element from './element';\nimport { multiplyVec2 } from '../util/matrix';\nvar AbstractShape = /** @class */ (function (_super) {\n __extends(AbstractShape, _super);\n function AbstractShape(cfg) {\n return _super.call(this, cfg) || this;\n }\n // 是否在包围盒内\n AbstractShape.prototype._isInBBox = function (refX, refY) {\n var bbox = this.getBBox();\n return bbox.minX <= refX && bbox.maxX >= refX && bbox.minY <= refY && bbox.maxY >= refY;\n };\n /**\n * 属性更改后需要做的事情\n * @protected\n * @param {ShapeAttrs} targetAttrs 渲染的图像属性\n */\n AbstractShape.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n this.clearCacheBBox();\n };\n // 计算包围盒时,需要缓存,这是一个高频的操作\n AbstractShape.prototype.getBBox = function () {\n var bbox = this.cfg.bbox;\n if (!bbox) {\n bbox = this.calculateBBox();\n this.set('bbox', bbox);\n }\n return bbox;\n };\n // 计算相对于画布的包围盒\n AbstractShape.prototype.getCanvasBBox = function () {\n var canvasBBox = this.cfg.canvasBBox;\n if (!canvasBBox) {\n canvasBBox = this.calculateCanvasBBox();\n this.set('canvasBBox', canvasBBox);\n }\n return canvasBBox;\n };\n AbstractShape.prototype.applyMatrix = function (matrix) {\n _super.prototype.applyMatrix.call(this, matrix);\n // 清理掉缓存的包围盒\n this.set('canvasBBox', null);\n };\n /**\n * 计算相对于画布的包围盒,默认等同于 bbox\n * @return {BBox} 包围盒\n */\n AbstractShape.prototype.calculateCanvasBBox = function () {\n var bbox = this.getBBox();\n var totalMatrix = this.getTotalMatrix();\n var minX = bbox.minX, minY = bbox.minY, maxX = bbox.maxX, maxY = bbox.maxY;\n if (totalMatrix) {\n var topLeft = multiplyVec2(totalMatrix, [bbox.minX, bbox.minY]);\n var topRight = multiplyVec2(totalMatrix, [bbox.maxX, bbox.minY]);\n var bottomLeft = multiplyVec2(totalMatrix, [bbox.minX, bbox.maxY]);\n var bottomRight = multiplyVec2(totalMatrix, [bbox.maxX, bbox.maxY]);\n minX = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);\n maxX = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);\n minY = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);\n maxY = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);\n }\n var attrs = this.attrs;\n // 如果存在 shadow 则计算 shadow\n if (attrs.shadowColor) {\n var _a = attrs.shadowBlur, shadowBlur = _a === void 0 ? 0 : _a, _b = attrs.shadowOffsetX, shadowOffsetX = _b === void 0 ? 0 : _b, _c = attrs.shadowOffsetY, shadowOffsetY = _c === void 0 ? 0 : _c;\n var shadowLeft = minX - shadowBlur + shadowOffsetX;\n var shadowRight = maxX + shadowBlur + shadowOffsetX;\n var shadowTop = minY - shadowBlur + shadowOffsetY;\n var shadowBottom = maxY + shadowBlur + shadowOffsetY;\n minX = Math.min(minX, shadowLeft);\n maxX = Math.max(maxX, shadowRight);\n minY = Math.min(minY, shadowTop);\n maxY = Math.max(maxY, shadowBottom);\n }\n return {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n };\n /**\n * @protected\n * 清理缓存的 bbox\n */\n AbstractShape.prototype.clearCacheBBox = function () {\n this.set('bbox', null);\n this.set('canvasBBox', null);\n };\n // 实现接口\n AbstractShape.prototype.isClipShape = function () {\n return this.get('isClipShape');\n };\n /**\n * @protected\n * 不同的图形自己实现是否在图形内部的逻辑,要判断边和填充区域\n * @param {number} refX 相对于图形的坐标 x\n * @param {number} refY 相对于图形的坐标 Y\n * @return {boolean} 点是否在图形内部\n */\n AbstractShape.prototype.isInShape = function (refX, refY) {\n return false;\n };\n /**\n * 是否仅仅使用 BBox 检测就可以判定拾取到图形\n * 默认是 false,但是有些图形例如 image、marker 等都可直接使用 BBox 的检测而不需要使用图形拾取\n * @return {Boolean} 仅仅使用 BBox 进行拾取\n */\n AbstractShape.prototype.isOnlyHitBox = function () {\n return false;\n };\n // 不同的 Shape 各自实现\n AbstractShape.prototype.isHit = function (x, y) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n var vec = [x, y, 1];\n vec = this.invertFromMatrix(vec);\n var refX = vec[0], refY = vec[1];\n var inBBox = this._isInBBox(refX, refY);\n // 跳过图形的拾取,在某些图形中可以省略一倍的检测成本\n if (this.isOnlyHitBox()) {\n return inBBox;\n }\n // 被裁减掉的和不在包围盒内的不进行计算\n if (inBBox && !this.isClipped(refX, refY)) {\n // 对图形进行拾取判断\n if (this.isInShape(refX, refY)) {\n return true;\n }\n // 对起始箭头进行拾取判断\n if (startArrowShape && startArrowShape.isHit(refX, refY)) {\n return true;\n }\n // 对结束箭头进行拾取判断\n if (endArrowShape && endArrowShape.isHit(refX, refY)) {\n return true;\n }\n }\n return false;\n };\n return AbstractShape;\n}(Element));\nexport default AbstractShape;\n//# sourceMappingURL=shape.js.map","var cache = new Map();\n/**\n * 注册计算包围盒的算法\n * @param type 方法名\n * @param method 方法\n */\nexport function register(type, method) {\n cache.set(type, method);\n}\n/**\n * 获取计算包围盒的算法\n * @param type 方法名\n */\nexport function getMethod(type) {\n return cache.get(type);\n}\n//# sourceMappingURL=register.js.map","export default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, width = attrs.width, height = attrs.height;\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n };\n}\n//# sourceMappingURL=rect.js.map","export default function (shape) {\n var _a = shape.attr(), x = _a.x, y = _a.y, r = _a.r;\n return {\n x: x - r,\n y: y - r,\n width: r * 2,\n height: r * 2,\n };\n}\n//# sourceMappingURL=circle.js.map","import { max, min } from '@antv/util';\n/**\n * 两点之间的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\nexport function distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\nexport function isNumberEqual(v1, v2) {\n return Math.abs(v1 - v2) < 0.001;\n}\nexport function getBBoxByArray(xArr, yArr) {\n var minX = min(xArr);\n var minY = min(yArr);\n var maxX = max(xArr);\n var maxY = max(yArr);\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\nexport function getBBoxRange(x1, y1, x2, y2) {\n return {\n minX: min([x1, x2]),\n maxX: max([x1, x2]),\n minY: min([y1, y2]),\n maxY: max([y1, y2]),\n };\n}\nexport function piMod(angle) {\n return (angle + Math.PI * 2) % (Math.PI * 2);\n}\n//# sourceMappingURL=util.js.map","import { distance, getBBoxByArray } from './util';\nimport * as vec2 from 'gl-matrix/vec2';\nexport default {\n /**\n * 计算线段的包围盒\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {object} 包围盒对象\n */\n box: function (x1, y1, x2, y2) {\n return getBBoxByArray([x1, x2], [y1, y2]);\n },\n /**\n * 线段的长度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\n length: function (x1, y1, x2, y2) {\n return distance(x1, y1, x2, y2);\n },\n /**\n * 根据比例获取点\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} t 指定比例\n * @return {object} 包含 x, y 的点\n */\n pointAt: function (x1, y1, x2, y2, t) {\n return {\n x: (1 - t) * x1 + t * x2,\n y: (1 - t) * y1 + t * y2,\n };\n },\n /**\n * 点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointDistance: function (x1, y1, x2, y2, x, y) {\n // 投影距离 x1, y1 的向量,假设 p, p1, p2 三个点,投影点为 a\n // p1a = p1p.p1p2/|p1p2| * (p1p 的单位向量)\n var cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1);\n if (cross < 0) {\n return distance(x1, y1, x, y);\n }\n var lengthSquare = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);\n if (cross > lengthSquare) {\n return distance(x2, y2, x, y);\n }\n return this.pointToLine(x1, y1, x2, y2, x, y);\n },\n /**\n * 点到直线的距离,而不是点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointToLine: function (x1, y1, x2, y2, x, y) {\n var d = [x2 - x1, y2 - y1];\n // 如果端点相等,则判定点到点的距离\n if (vec2.exactEquals(d, [0, 0])) {\n return Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n }\n var u = [-d[1], d[0]];\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n return Math.abs(vec2.dot(a, u));\n },\n /**\n * 线段的角度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 导数\n */\n tangentAngle: function (x1, y1, x2, y2) {\n return Math.atan2(y2 - y1, x2 - x1);\n },\n};\n//# sourceMappingURL=line.js.map","import { distance } from './util';\nvar EPSILON = 0.0001;\n/**\n * 使用牛顿切割法求最近的点\n * @param {number[]} xArr 点的 x 数组\n * @param {number[]} yArr 点的 y 数组\n * @param {number} x 指定的点 x\n * @param {number} y 指定的点 y\n * @param {Function} tCallback 差值函数\n */\nexport function nearestPoint(xArr, yArr, x, y, tCallback, length) {\n var t;\n var d = Infinity;\n var v0 = [x, y];\n var segNum = 20;\n if (length && length > 200) {\n segNum = length / 10;\n }\n var increaseRate = 1 / segNum;\n var interval = increaseRate / 10;\n for (var i = 0; i <= segNum; i++) {\n var _t = i * increaseRate;\n var v1 = [tCallback.apply(null, xArr.concat([_t])), tCallback.apply(null, yArr.concat([_t]))];\n var d1 = distance(v0[0], v0[1], v1[0], v1[1]);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n // 提前终止\n if (t === 0) {\n return {\n x: xArr[0],\n y: yArr[0],\n };\n }\n if (t === 1) {\n var count = xArr.length;\n return {\n x: xArr[count - 1],\n y: yArr[count - 1],\n };\n }\n d = Infinity;\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n var prev = t - interval;\n var next = t + interval;\n var v1 = [tCallback.apply(null, xArr.concat([prev])), tCallback.apply(null, yArr.concat([prev]))];\n var d1 = distance(v0[0], v0[1], v1[0], v1[1]);\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n }\n else {\n var v2 = [tCallback.apply(null, xArr.concat([next])), tCallback.apply(null, yArr.concat([next]))];\n var d2 = distance(v0[0], v0[1], v2[0], v2[1]);\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n }\n else {\n interval *= 0.5;\n }\n }\n }\n return {\n x: tCallback.apply(null, xArr.concat([t])),\n y: tCallback.apply(null, yArr.concat([t])),\n };\n}\n// 近似求解 https://community.khronos.org/t/3d-cubic-bezier-segment-length/62363/2\nexport function snapLength(xArr, yArr) {\n var totalLength = 0;\n var count = xArr.length;\n for (var i = 0; i < count; i++) {\n var x = xArr[i];\n var y = yArr[i];\n var nextX = xArr[(i + 1) % count];\n var nextY = yArr[(i + 1) % count];\n totalLength += distance(x, y, nextX, nextY);\n }\n return totalLength / 2;\n}\n//# sourceMappingURL=bezier.js.map","import line from './line';\nimport { distance, isNumberEqual, getBBoxByArray, piMod } from './util';\nimport { nearestPoint } from './bezier';\n// 差值公式\nfunction quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * onet * p0 + 2 * t * onet * p1 + t * t * p2;\n}\n// 求极值\nfunction extrema(p0, p1, p2) {\n var a = p0 + p2 - 2 * p1;\n if (isNumberEqual(a, 0)) {\n return [0.5];\n }\n var rst = (p0 - p1) / a;\n if (rst <= 1 && rst >= 0) {\n return [rst];\n }\n return [];\n}\nfunction derivativeAt(p0, p1, p2, t) {\n return 2 * (1 - t) * (p1 - p0) + 2 * t * (p2 - p1);\n}\n// 分割贝塞尔曲线\nfunction divideQuadratic(x1, y1, x2, y2, x3, y3, t) {\n // 划分点\n var xt = quadraticAt(x1, x2, x3, t);\n var yt = quadraticAt(y1, y2, y3, t);\n // 分割的第一条曲线的控制点\n var controlPoint1 = line.pointAt(x1, y1, x2, y2, t);\n // 分割的第二条曲线的控制点\n var controlPoint2 = line.pointAt(x2, y2, x3, y3, t);\n return [\n [x1, y1, controlPoint1.x, controlPoint1.y, xt, yt],\n [xt, yt, controlPoint2.x, controlPoint2.y, x3, y3],\n ];\n}\n// 使用迭代法取贝塞尔曲线的长度\nfunction quadraticLength(x1, y1, x2, y2, x3, y3, iterationCount) {\n if (iterationCount === 0) {\n return (distance(x1, y1, x2, y2) + distance(x2, y2, x3, y3) + distance(x1, y1, x3, y3)) / 2;\n }\n var quadratics = divideQuadratic(x1, y1, x2, y2, x3, y3, 0.5);\n var left = quadratics[0];\n var right = quadratics[1];\n left.push(iterationCount - 1);\n right.push(iterationCount - 1);\n return quadraticLength.apply(null, left) + quadraticLength.apply(null, right);\n}\nexport default {\n box: function (x1, y1, x2, y2, x3, y3) {\n var xExtrema = extrema(x1, x2, x3)[0];\n var yExtrema = extrema(y1, y2, y3)[0];\n // 控制点不加入 box 的计算\n var xArr = [x1, x3];\n var yArr = [y1, y3];\n if (xExtrema !== undefined) {\n xArr.push(quadraticAt(x1, x2, x3, xExtrema));\n }\n if (yExtrema !== undefined) {\n yArr.push(quadraticAt(y1, y2, y3, yExtrema));\n }\n return getBBoxByArray(xArr, yArr);\n },\n length: function (x1, y1, x2, y2, x3, y3) {\n return quadraticLength(x1, y1, x2, y2, x3, y3, 3);\n },\n nearestPoint: function (x1, y1, x2, y2, x3, y3, x0, y0) {\n return nearestPoint([x1, x2, x3], [y1, y2, y3], x0, y0, quadraticAt);\n },\n pointDistance: function (x1, y1, x2, y2, x3, y3, x0, y0) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0);\n return distance(point.x, point.y, x0, y0);\n },\n interpolationAt: quadraticAt,\n pointAt: function (x1, y1, x2, y2, x3, y3, t) {\n return {\n x: quadraticAt(x1, x2, x3, t),\n y: quadraticAt(y1, y2, y3, t),\n };\n },\n divide: function (x1, y1, x2, y2, x3, y3, t) {\n return divideQuadratic(x1, y1, x2, y2, x3, y3, t);\n },\n tangentAngle: function (x1, y1, x2, y2, x3, y3, t) {\n var dx = derivativeAt(x1, x2, x3, t);\n var dy = derivativeAt(y1, y2, y3, t);\n var angle = Math.atan2(dy, dx);\n return piMod(angle);\n },\n};\n//# sourceMappingURL=quadratic.js.map","import { distance, isNumberEqual, getBBoxByArray, piMod } from './util';\nimport line from './line';\nimport { snapLength, nearestPoint } from './bezier';\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍\n return onet * onet * onet * p0 + 3 * p1 * t * onet * onet + 3 * p2 * t * t * onet + p3 * t * t * t;\n}\nfunction derivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (onet * onet * (p1 - p0) + 2 * onet * t * (p2 - p1) + t * t * (p3 - p2));\n}\nfunction extrema(p0, p1, p2, p3) {\n var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n var b = 6 * p0 - 12 * p1 + 6 * p2;\n var c = 3 * p1 - 3 * p0;\n var extremas = [];\n var t1;\n var t2;\n var discSqrt;\n if (isNumberEqual(a, 0)) {\n if (!isNumberEqual(b, 0)) {\n t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n }\n }\n else {\n var disc = b * b - 4 * a * c;\n if (isNumberEqual(disc, 0)) {\n extremas.push(-b / (2 * a));\n }\n else if (disc > 0) {\n discSqrt = Math.sqrt(disc);\n t1 = (-b + discSqrt) / (2 * a);\n t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n if (t2 >= 0 && t2 <= 1) {\n extremas.push(t2);\n }\n }\n }\n return extremas;\n}\n// 分割贝塞尔曲线\nfunction divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n // 划分点\n var xt = cubicAt(x1, x2, x3, x4, t);\n var yt = cubicAt(y1, y2, y3, y4, t);\n // 计算两点之间的差值点\n var c1 = line.pointAt(x1, y1, x2, y2, t);\n var c2 = line.pointAt(x2, y2, x3, y3, t);\n var c3 = line.pointAt(x3, y3, x4, y4, t);\n var c12 = line.pointAt(c1.x, c1.y, c2.x, c2.y, t);\n var c23 = line.pointAt(c2.x, c2.y, c3.x, c3.y, t);\n return [\n [x1, y1, c1.x, c1.y, c12.x, c12.y, xt, yt],\n [xt, yt, c23.x, c23.y, c3.x, c3.y, x4, y4],\n ];\n}\n// 使用迭代法取贝塞尔曲线的长度,二阶和三阶分开写,更清晰和便于调试\nfunction cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) {\n if (iterationCount === 0) {\n return snapLength([x1, x2, x3, x4], [y1, y2, y3, y4]);\n }\n var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5);\n var left = cubics[0];\n var right = cubics[1];\n left.push(iterationCount - 1);\n right.push(iterationCount - 1);\n return cubicLength.apply(null, left) + cubicLength.apply(null, right);\n}\nexport default {\n extrema: extrema,\n box: function (x1, y1, x2, y2, x3, y3, x4, y4) {\n var xArr = [x1, x4];\n var yArr = [y1, y4];\n var xExtrema = extrema(x1, x2, x3, x4);\n var yExtrema = extrema(y1, y2, y3, y4);\n for (var i = 0; i < xExtrema.length; i++) {\n xArr.push(cubicAt(x1, x2, x3, x4, xExtrema[i]));\n }\n for (var i = 0; i < yExtrema.length; i++) {\n yArr.push(cubicAt(y1, y2, y3, y4, yExtrema[i]));\n }\n return getBBoxByArray(xArr, yArr);\n },\n length: function (x1, y1, x2, y2, x3, y3, x4, y4) {\n // 迭代三次,划分成 8 段求长度\n return cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, 3);\n },\n nearestPoint: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n return nearestPoint([x1, x2, x3, x4], [y1, y2, y3, y4], x0, y0, cubicAt, length);\n },\n pointDistance: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length);\n return distance(point.x, point.y, x0, y0);\n },\n interpolationAt: cubicAt,\n pointAt: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return {\n x: cubicAt(x1, x2, x3, x4, t),\n y: cubicAt(y1, y2, y3, y4, t),\n };\n },\n divide: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t);\n },\n tangentAngle: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n var dx = derivativeAt(x1, x2, x3, x4, t);\n var dy = derivativeAt(y1, y2, y3, y4, t);\n return piMod(Math.atan2(dy, dx));\n },\n};\n//# sourceMappingURL=cubic.js.map","/**\n * @fileoverview 椭圆的一些计算,\n * - 周长计算参考:https://www.mathsisfun.com/geometry/ellipse-perimeter.html\n * - 距离计算参考:https://wet-robots.ghost.io/simple-method-for-distance-to-ellipse/\n * @author dxq613@gmail.com\n */\nimport { distance, piMod } from './util';\nfunction copysign(v1, v2) {\n var absv = Math.abs(v1);\n return v2 > 0 ? absv : absv * -1;\n}\nexport default {\n /**\n * 包围盒计算\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {object} 包围盒\n */\n box: function (x, y, rx, ry) {\n return {\n x: x - rx,\n y: y - ry,\n width: rx * 2,\n height: ry * 2,\n };\n },\n /**\n * 计算周长,使用近似法\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {number} 椭圆周长\n */\n length: function (x, y, rx, ry) {\n return Math.PI * (3 * (rx + ry) - Math.sqrt((3 * rx + ry) * (rx + 3 * ry)));\n },\n /**\n * 距离椭圆最近的点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {object} 椭圆上距离指定点最近的点\n */\n nearestPoint: function (x, y, rx, ry, x0, y0) {\n var a = rx;\n var b = ry;\n // 假如椭圆半径为0则返回圆心\n if (a === 0 || b === 0) {\n return {\n x: x,\n y: y,\n };\n }\n // 转换成 0, 0 为中心的椭圆计算\n var relativeX = x0 - x;\n var relativeY = y0 - y;\n var px = Math.abs(relativeX);\n var py = Math.abs(relativeY);\n var squareA = a * a;\n var squareB = b * b;\n // const angle0 = Math.atan2(relativeY, relativeX);\n var t = Math.PI / 4;\n var nearestX; // 椭圆上的任一点\n var nearestY;\n // 迭代 4 次\n for (var i = 0; i < 4; i++) {\n nearestX = a * Math.cos(t);\n nearestY = b * Math.sin(t);\n var ex = ((squareA - squareB) * Math.pow(Math.cos(t), 3)) / a;\n var ey = ((squareB - squareA) * Math.pow(Math.sin(t), 3)) / b;\n var rx1 = nearestX - ex;\n var ry1 = nearestY - ey;\n var qx = px - ex;\n var qy = py - ey;\n var r = Math.hypot(ry1, rx1);\n var q = Math.hypot(qy, qx);\n var delta_c = r * Math.asin((rx1 * qy - ry1 * qx) / (r * q));\n var delta_t = delta_c / Math.sqrt(squareA + squareB - nearestX * nearestX - nearestY * nearestY);\n t += delta_t;\n t = Math.min(Math.PI / 2, Math.max(0, t));\n }\n return {\n x: x + copysign(nearestX, relativeX),\n y: y + copysign(nearestY, relativeY),\n };\n },\n /**\n * 点到椭圆最近的距离\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {number} 点到椭圆的距离\n */\n pointDistance: function (x, y, rx, ry, x0, y0) {\n var nearestPoint = this.nearestPoint(x, y, rx, ry, x0, y0);\n return distance(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n /**\n * 根据比例获取点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例,x轴方向为 0\n * @return {object} 点\n */\n pointAt: function (x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n return {\n x: x + rx * Math.cos(angle),\n y: y + ry * Math.sin(angle),\n };\n },\n /**\n * 根据比例计算切线角度\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例 0 - 1 之间,x轴方向为 0。在 0-1 范围之外是循环还是返回 null,还需要调整\n * @return {number} 角度,在 0 - 2PI 之间\n */\n tangentAngle: function (x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n // 直接使用 x,y 的导数计算, x' = -rx * sin(t); y' = ry * cos(t);\n var tangentAngle = Math.atan2(ry * Math.cos(angle), -rx * Math.sin(angle));\n // 也可以使用指定点的切线方程计算,成本有些高\n // const point = this.pointAt(0, 0, rx, ry, t); // 椭圆的切线同椭圆的中心不相关\n // let tangentAngle = -1 * Math.atan((ry * ry * point.x) / (rx * rx * point.y));\n // if (angle >= 0 && angle <= Math.PI) {\n // tangentAngle += Math.PI;\n // }\n return piMod(tangentAngle);\n },\n};\n//# sourceMappingURL=ellipse.js.map","import { distance, piMod } from './util';\nimport ellipse from './ellipse';\n// 偏导数 x\nfunction derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.cos(xRotation) * Math.sin(angle) - ry * Math.sin(xRotation) * Math.cos(angle);\n}\n// 偏导数 y\nfunction derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.sin(xRotation) * Math.sin(angle) + ry * Math.cos(xRotation) * Math.cos(angle);\n}\n// x 的极值\nfunction xExtrema(rx, ry, xRotation) {\n return Math.atan((-ry / rx) * Math.tan(xRotation));\n}\n// y 的极值\nfunction yExtrema(rx, ry, xRotation) {\n return Math.atan(ry / (rx * Math.tan(xRotation)));\n}\n// 根据角度求 x 坐标\nfunction xAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.cos(xRotation) * Math.cos(angle) - ry * Math.sin(xRotation) * Math.sin(angle) + cx;\n}\n// 根据角度求 y 坐标\nfunction yAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.sin(xRotation) * Math.cos(angle) + ry * Math.cos(xRotation) * Math.sin(angle) + cy;\n}\n// 获取点在椭圆上的角度\nfunction getAngle(rx, ry, x0, y0) {\n var angle = Math.atan2(y0 * rx, x0 * ry);\n // 转换到 0 - 2PI 内\n return (angle + Math.PI * 2) % (Math.PI * 2);\n}\n// 根据角度获取,x,y\nfunction getPoint(rx, ry, angle) {\n return {\n x: rx * Math.cos(angle),\n y: ry * Math.sin(angle),\n };\n}\n// 旋转\nfunction rotate(x, y, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n return [x * cos - y * sin, x * sin + y * cos];\n}\nexport default {\n /**\n * 计算包围盒\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @return {object} 包围盒对象\n */\n box: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) {\n var xDim = xExtrema(rx, ry, xRotation);\n var minX = Infinity;\n var maxX = -Infinity;\n var xs = [startAngle, endAngle];\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var xAngle = xDim + i;\n if (startAngle < endAngle) {\n if (startAngle < xAngle && xAngle < endAngle) {\n xs.push(xAngle);\n }\n }\n else {\n if (endAngle < xAngle && xAngle < startAngle) {\n xs.push(xAngle);\n }\n }\n }\n for (var i = 0; i < xs.length; i++) {\n var x = xAt(cx, cy, rx, ry, xRotation, xs[i]);\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n }\n var yDim = yExtrema(rx, ry, xRotation);\n var minY = Infinity;\n var maxY = -Infinity;\n var ys = [startAngle, endAngle];\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var yAngle = yDim + i;\n if (startAngle < endAngle) {\n if (startAngle < yAngle && yAngle < endAngle) {\n ys.push(yAngle);\n }\n }\n else {\n if (endAngle < yAngle && yAngle < startAngle) {\n ys.push(yAngle);\n }\n }\n }\n for (var i = 0; i < ys.length; i++) {\n var y = yAt(cx, cy, rx, ry, xRotation, ys[i]);\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n },\n /**\n * 获取圆弧的长度,计算圆弧长度时不考虑旋转角度,\n * 仅跟 rx, ry, startAngle, endAngle 相关\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n */\n length: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) { },\n /**\n * 获取指定点到圆弧的最近距离的点\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @param {number} x0 指定点的 x\n * @param {number} y0 指定点的 y\n * @return {object} 到指定点最近距离的点\n */\n nearestPoint: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n // 将最近距离问题转换成到椭圆中心 0,0 没有旋转的椭圆问题\n var relativeVector = rotate(x0 - cx, y0 - cy, -xRotation);\n var x1 = relativeVector[0], y1 = relativeVector[1];\n // 计算点到椭圆的最近的点\n var relativePoint = ellipse.nearestPoint(0, 0, rx, ry, x1, y1);\n // 获取点在椭圆上的角度\n var angle = getAngle(rx, ry, relativePoint.x, relativePoint.y);\n // 点没有在圆弧上\n if (angle < startAngle) {\n // 小于起始圆弧\n relativePoint = getPoint(rx, ry, startAngle);\n }\n else if (angle > endAngle) {\n // 大于结束圆弧\n relativePoint = getPoint(rx, ry, endAngle);\n }\n // 旋转到 xRotation 的角度\n var vector = rotate(relativePoint.x, relativePoint.y, xRotation);\n return {\n x: vector[0] + cx,\n y: vector[1] + cy,\n };\n },\n pointDistance: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n var nearestPoint = this.nearestPoint(cx, cy, rx, ry, x0, y0);\n return distance(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n pointAt: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n return {\n x: xAt(cx, cy, rx, ry, xRotation, angle),\n y: yAt(cx, cy, rx, ry, xRotation, angle),\n };\n },\n tangentAngle: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n var dx = derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n var dy = derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n return piMod(Math.atan2(dy, dx));\n },\n};\n//# sourceMappingURL=arc.js.map","import line from './line';\nimport { distance } from './util';\nfunction analyzePoints(points) {\n // 计算每段的长度和总的长度\n var totalLength = 0;\n var segments = [];\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n var length_1 = distance(from[0], from[1], to[0], to[1]);\n var seg = {\n from: from,\n to: to,\n length: length_1,\n };\n segments.push(seg);\n totalLength += length_1;\n }\n return { segments: segments, totalLength: totalLength };\n}\nexport function lengthOfSegment(points) {\n if (points.length < 2) {\n return 0;\n }\n var totalLength = 0;\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n totalLength += distance(from[0], from[1], to[0], to[1]);\n }\n return totalLength;\n}\n/**\n * 按照比例在数据片段中获取点\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n * @return {object} 点的坐标\n */\nexport function pointAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return null;\n }\n var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength;\n // 多个点有可能重合\n if (totalLength === 0) {\n return {\n x: points[0][0],\n y: points[0][1],\n };\n }\n // 计算比例\n var startRatio = 0;\n var point = null;\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from, to = seg.to;\n var currentRatio = seg.length / totalLength;\n if (t >= startRatio && t <= startRatio + currentRatio) {\n var localRatio = (t - startRatio) / currentRatio;\n point = line.pointAt(from[0], from[1], to[0], to[1], localRatio);\n break;\n }\n startRatio += currentRatio;\n }\n return point;\n}\n/**\n * 按照比例在数据片段中获取切线的角度\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n */\nexport function angleAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return 0;\n }\n var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength;\n // 计算比例\n var startRatio = 0;\n var angle = 0;\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from, to = seg.to;\n var currentRatio = seg.length / totalLength;\n if (t >= startRatio && t <= startRatio + currentRatio) {\n angle = Math.atan2(to[1] - from[1], to[0] - from[0]);\n break;\n }\n startRatio += currentRatio;\n }\n return angle;\n}\nexport function distanceAtSegment(points, x, y) {\n var minDistance = Infinity;\n for (var i = 0; i < points.length - 1; i++) {\n var point = points[i];\n var nextPoint = points[i + 1];\n var distance_1 = line.pointDistance(point[0], point[1], nextPoint[0], nextPoint[1], x, y);\n if (distance_1 < minDistance) {\n minDistance = distance_1;\n }\n }\n return minDistance;\n}\n//# sourceMappingURL=segments.js.map","import { pointAtSegments, angleAtSegments, distanceAtSegment, lengthOfSegment } from './segments';\nimport { getBBoxByArray } from './util';\nexport default {\n /**\n * 计算多折线的包围盒\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 包围盒\n */\n box: function (points) {\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n return getBBoxByArray(xArr, yArr);\n },\n /**\n * 计算多折线的长度\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 多条边的长度\n */\n length: function (points) {\n return lengthOfSegment(points);\n },\n /**\n * 根据比例获取多折线的点\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的点\n */\n pointAt: function (points, t) {\n return pointAtSegments(points, t);\n },\n /**\n * 指定点到多折线的距离\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} x 指定点的 x\n * @param {number} y 指定点的 y\n * @return {number} 点到多折线的距离\n */\n pointDistance: function (points, x, y) {\n return distanceAtSegment(points, x, y);\n },\n /**\n * 根据比例获取多折线的切线角度\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的角度\n */\n tangentAngle: function (points, t) {\n return angleAtSegments(points, t);\n },\n};\n//# sourceMappingURL=polyline.js.map","// 合并包围盒\nexport function mergeBBox(bbox1, bbox2) {\n if (!bbox1 || !bbox2) {\n return bbox1 || bbox2;\n }\n return {\n minX: Math.min(bbox1.minX, bbox2.minX),\n minY: Math.min(bbox1.minY, bbox2.minY),\n maxX: Math.max(bbox1.maxX, bbox2.maxX),\n maxY: Math.max(bbox1.maxY, bbox2.maxY),\n };\n}\n// 合并箭头的包围盒\nexport function mergeArrowBBox(shape, bbox) {\n var startArrowShape = shape.get('startArrowShape');\n var endArrowShape = shape.get('endArrowShape');\n var startArrowBBox = null;\n var endArrowBBox = null;\n if (startArrowShape) {\n startArrowBBox = startArrowShape.getCanvasBBox();\n bbox = mergeBBox(bbox, startArrowBBox);\n }\n if (endArrowShape) {\n endArrowBBox = endArrowShape.getCanvasBBox();\n bbox = mergeBBox(bbox, endArrowBBox);\n }\n return bbox;\n}\n//# sourceMappingURL=util.js.map","import { Util } from '@antv/g-math';\nimport { mergeArrowBBox } from './util';\nexport default function (shape) {\n var attrs = shape.attr();\n var points = attrs.points;\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n var _a = Util.getBBoxByArray(xArr, yArr), x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n var bbox = {\n minX: x,\n minY: y,\n maxX: x + width,\n maxY: y + height,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=polyline.js.map","import { Util } from '@antv/g-math';\nexport default function (shape) {\n var attrs = shape.attr();\n var points = attrs.points;\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n return Util.getBBoxByArray(xArr, yArr);\n}\n//# sourceMappingURL=polygon.js.map","// 全局设置一个唯一离屏的 ctx,用于计算 isPointInPath\nvar offScreenCtx = null;\nexport function getOffScreenContext() {\n if (!offScreenCtx) {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n offScreenCtx = canvas.getContext('2d');\n }\n return offScreenCtx;\n}\n//# sourceMappingURL=offscreen.js.map","import { isNil, each, isString } from './util';\nimport { getOffScreenContext } from './offscreen';\n/**\n * 获取文本的高度\n * @param text 文本\n * @param fontSize 字体大小\n * @param lineHeight 行高,可以为空\n */\nexport function getTextHeight(text, fontSize, lineHeight) {\n var lineCount = 1;\n if (isString(text)) {\n lineCount = text.split('\\n').length;\n }\n if (lineCount > 1) {\n var spaceingY = getLineSpaceing(fontSize, lineHeight);\n return fontSize * lineCount + spaceingY * (lineCount - 1);\n }\n return fontSize;\n}\n/**\n * 获取行间距如果文本多行,需要获取文本间距\n * @param fontSize 字体大小\n * @param lineHeight 行高\n */\nexport function getLineSpaceing(fontSize, lineHeight) {\n return lineHeight ? lineHeight - fontSize : fontSize * 0.14;\n}\n/**\n * 字体宽度\n * @param text 文本\n * @param font 字体\n */\nexport function getTextWidth(text, font) {\n var context = getOffScreenContext(); // 获取离屏的 ctx 进行计算\n var width = 0;\n // null 或者 undefined 时,宽度为 0\n if (isNil(text) || text === '') {\n return width;\n }\n context.save();\n context.font = font;\n if (isString(text) && text.includes('\\n')) {\n var textArr = text.split('\\n');\n each(textArr, function (subText) {\n var measureWidth = context.measureText(subText).width;\n if (width < measureWidth) {\n width = measureWidth;\n }\n });\n }\n else {\n width = context.measureText(text).width;\n }\n context.restore();\n return width;\n}\nexport function assembleFont(attrs) {\n var fontSize = attrs.fontSize, fontFamily = attrs.fontFamily, fontWeight = attrs.fontWeight, fontStyle = attrs.fontStyle, fontVariant = attrs.fontVariant;\n return [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ').trim();\n}\n//# sourceMappingURL=text.js.map","import { getTextWidth, getTextHeight, assembleFont } from '../util/text';\nexport default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, text = attrs.text, fontSize = attrs.fontSize, lineHeight = attrs.lineHeight;\n var font = attrs.font;\n if (!font) {\n // 如果未组装 font\n font = assembleFont(attrs);\n }\n var width = getTextWidth(text, font);\n var bbox;\n if (!width) {\n // 如果width不存在,四点共其实点\n bbox = {\n x: x,\n y: y,\n width: 0,\n height: 0,\n };\n }\n else {\n var textAlign = attrs.textAlign, textBaseline = attrs.textBaseline;\n var height = getTextHeight(text, fontSize, lineHeight); // attrs.height\n // 默认左右对齐:left, 默认上下对齐 bottom\n var point = {\n x: x,\n y: y - height,\n };\n if (textAlign) {\n if (textAlign === 'end' || textAlign === 'right') {\n point.x -= width;\n }\n else if (textAlign === 'center') {\n point.x -= width / 2;\n }\n }\n if (textBaseline) {\n if (textBaseline === 'top') {\n point.y += height;\n }\n else if (textBaseline === 'middle') {\n point.y += height / 2;\n }\n }\n bbox = {\n x: point.x,\n y: point.y,\n width: width,\n height: height,\n };\n }\n return bbox;\n}\n//# sourceMappingURL=text.js.map","import { each, isArray, isString } from '@antv/util';\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig;\nvar regexDot = /[^\\s\\,]+/ig;\nfunction parsePath(p) {\n var path = p || [];\n if (isArray(path)) {\n return path;\n }\n if (isString(path)) {\n path = path.match(regexTags);\n each(path, function (item, index) {\n // @ts-ignore\n item = item.match(regexDot);\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n // @ts-ignore\n item.splice(1, 0, item[0].substr(1));\n // @ts-ignore\n item[0] = tag;\n }\n // @ts-ignore\n each(item, function (sub, i) {\n if (!isNaN(sub)) {\n // @ts-ignore\n item[i] = +sub;\n }\n });\n // @ts-ignore\n path[index] = item;\n });\n return path;\n }\n}\nexport default parsePath;\n//# sourceMappingURL=parse-path.js.map","import { vec2 } from '@antv/matrix-util';\nfunction smoothBezier(points, smooth, isLoop, constraint) {\n var cps = [];\n var hasConstraint = !!constraint;\n var prevPoint;\n var nextPoint;\n var min;\n var max;\n var nextCp0;\n var cp1;\n var cp0;\n if (hasConstraint) {\n min = constraint[0], max = constraint[1];\n for (var i = 0, l = points.length; i < l; i += 1) {\n var point = points[i];\n min = vec2.min([0, 0], min, point);\n max = vec2.max([0, 0], max, point);\n }\n }\n for (var i = 0, len = points.length; i < len; i += 1) {\n var point = points[i];\n if (i === 0 && !isLoop) {\n cp0 = point;\n }\n else if (i === len - 1 && !isLoop) {\n cp1 = point;\n cps.push(cp0);\n cps.push(cp1);\n }\n else {\n var prevIdx = [i ? i - 1 : len - 1, i - 1][isLoop ? 0 : 1];\n prevPoint = points[prevIdx];\n nextPoint = points[isLoop ? (i + 1) % len : i + 1];\n var v = [0, 0];\n v = vec2.sub(v, nextPoint, prevPoint);\n v = vec2.scale(v, v, smooth);\n var d0 = vec2.distance(point, prevPoint);\n var d1 = vec2.distance(point, nextPoint);\n var sum = d0 + d1;\n if (sum !== 0) {\n d0 /= sum;\n d1 /= sum;\n }\n var v1 = vec2.scale([0, 0], v, -d0);\n var v2 = vec2.scale([0, 0], v, d1);\n cp1 = vec2.add([0, 0], point, v1);\n nextCp0 = vec2.add([0, 0], point, v2);\n // 下一个控制点必须在这个点和下一个点之间\n nextCp0 = vec2.min([0, 0], nextCp0, vec2.max([0, 0], nextPoint, point));\n nextCp0 = vec2.max([0, 0], nextCp0, vec2.min([0, 0], nextPoint, point));\n // 重新计算 cp1 的值\n v1 = vec2.sub([0, 0], nextCp0, point);\n v1 = vec2.scale([0, 0], v1, -d0 / d1);\n cp1 = vec2.add([0, 0], point, v1);\n // 上一个控制点必须要在上一个点和这一个点之间\n cp1 = vec2.min([0, 0], cp1, vec2.max([0, 0], prevPoint, point));\n cp1 = vec2.max([0, 0], cp1, vec2.min([0, 0], prevPoint, point));\n // 重新计算 nextCp0 的值\n v2 = vec2.sub([0, 0], point, cp1);\n v2 = vec2.scale([0, 0], v2, d1 / d0);\n nextCp0 = vec2.add([0, 0], point, v2);\n if (hasConstraint) {\n cp1 = vec2.max([0, 0], cp1, min);\n cp1 = vec2.min([0, 0], cp1, max);\n nextCp0 = vec2.max([0, 0], nextCp0, min);\n nextCp0 = vec2.min([0, 0], nextCp0, max);\n }\n cps.push(cp0);\n cps.push(cp1);\n cp0 = nextCp0;\n }\n }\n if (isLoop) {\n cps.push(cps.shift());\n }\n return cps;\n}\n/**\n * create bezier spline from catmull rom spline\n * @param {Array} crp Catmull Rom Points\n * @param {boolean} z Spline is loop\n * @param {Array} constraint Constraint\n */\nfunction catmullRom2Bezier(crp, z, constraint) {\n if (z === void 0) { z = false; }\n if (constraint === void 0) { constraint = [\n [0, 0],\n [1, 1],\n ]; }\n var isLoop = !!z;\n var pointList = [];\n for (var i = 0, l = crp.length; i < l; i += 2) {\n pointList.push([crp[i], crp[i + 1]]);\n }\n var controlPointList = smoothBezier(pointList, 0.4, isLoop, constraint);\n var len = pointList.length;\n var d1 = [];\n var cp1;\n var cp2;\n var p;\n for (var i = 0; i < len - 1; i += 1) {\n cp1 = controlPointList[i * 2];\n cp2 = controlPointList[i * 2 + 1];\n p = pointList[i + 1];\n d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]);\n }\n if (isLoop) {\n cp1 = controlPointList[len];\n cp2 = controlPointList[len + 1];\n p = pointList[0];\n d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]);\n }\n return d1;\n}\nexport default catmullRom2Bezier;\n//# sourceMappingURL=catmull-rom-2-bezier.js.map","import { isArray } from '@antv/util';\nvar SPACES = '\\x09\\x0a\\x0b\\x0c\\x0d\\x20\\xa0\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u2028\\u2029';\nvar PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig');\nvar PATH_VALUES = new RegExp('(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig');\n// Parses given path string into an array of arrays of path segments\nexport default function parsePathString(pathString) {\n if (!pathString) {\n return null;\n }\n if (isArray(pathString)) {\n return pathString;\n }\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0,\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n if (name === 'r') {\n data.push([b].concat(params));\n }\n else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n return '';\n });\n return data;\n}\n//# sourceMappingURL=parse-path-string.js.map","import parsePathString from './parse-path-string';\nvar REGEX_MD = /[a-z]/;\nfunction toSymmetry(p, c) {\n return [\n c[0] + (c[0] - p[0]),\n c[1] + (c[1] - p[1]),\n ];\n}\nexport default function pathToAbsolute(pathString) {\n var pathArray = parsePathString(pathString);\n if (!pathArray || !pathArray.length) {\n return [\n ['M', 0, 0],\n ];\n }\n var needProcess = false; // 如果存在小写的命令或者 V,H,T,S 则需要处理\n for (var i = 0; i < pathArray.length; i++) {\n var cmd = pathArray[i][0];\n // 如果存在相对位置的命令,则中断返回\n if (REGEX_MD.test(cmd) || ['V', 'H', 'T', 'S'].indexOf(cmd) >= 0) {\n needProcess = true;\n break;\n }\n }\n // 如果不存在相对命令,则直接返回\n // 如果在业务上都写绝对路径,这种方式最快,仅做了一次检测\n if (!needProcess) {\n return pathArray;\n }\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n var first = pathArray[0];\n if (first[0] === 'M' || first[0] === 'm') {\n x = +first[1];\n y = +first[2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n for (var i = start, ii = pathArray.length; i < ii; i++) {\n var pa = pathArray[i];\n var preParams = res[i - 1]; // 取前一个已经处理后的节点,否则会出现问题\n var r = [];\n var cmd = pa[0];\n var upCmd = cmd.toUpperCase();\n if (cmd !== upCmd) {\n r[0] = upCmd;\n switch (upCmd) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n case 'V':\n r[1] = +pa[1] + y;\n break;\n case 'H':\n r[1] = +pa[1] + x;\n break;\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n r[1] = mx;\n r[2] = my;\n break; // for lint\n default:\n for (var j = 1, jj = pa.length; j < jj; j++) {\n r[j] = +pa[j] + ((j % 2) ? x : y);\n }\n }\n }\n else { // 如果本来已经大写,则不处理\n r = pathArray[i];\n }\n // 需要在外面统一做,同时处理 V,H,S,T 等特殊指令\n switch (upCmd) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n case 'H':\n x = r[1];\n r = ['L', x, y];\n break;\n case 'V':\n y = r[1];\n r = ['L', x, y];\n break;\n case 'T':\n x = r[1];\n y = r[2];\n // 以 x, y 为中心的,上一个控制点的对称点\n // 需要假设上一个节点的命令为 Q\n var symetricT = toSymmetry([preParams[1], preParams[2]], [preParams[3], preParams[4]]);\n r = ['Q', symetricT[0], symetricT[1], x, y];\n break;\n case 'S':\n x = r[r.length - 2];\n y = r[r.length - 1];\n // 以 x,y 为中心,取上一个控制点,\n // 需要假设上一个线段为 C 或者 S\n var length_1 = preParams.length;\n var symetricS = toSymmetry([preParams[length_1 - 4], preParams[length_1 - 3]], [preParams[length_1 - 2], preParams[length_1 - 1]]);\n r = ['C', symetricS[0], symetricS[1], r[1], r[2], x, y];\n break;\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break; // for lint\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n res.push(r);\n }\n return res;\n}\n//# sourceMappingURL=path-2-absolute.js.map","import { mod, toRadian } from '@antv/util';\n// 向量长度\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n// u.v/|u||v|,计算夹角的余弦值\nfunction vRatio(u, v) {\n // 当存在一个向量的长度为 0 时,夹角也为 0,即夹角的余弦值为 1\n return vMag(u) * vMag(v) ? (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)) : 1;\n}\n// 向量角度\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n/**\n * 判断两个点是否重合,点坐标的格式为 [x, y]\n * @param {Array} point1 第一个点\n * @param {Array} point2 第二个点\n */\nexport function isSamePoint(point1, point2) {\n return point1[0] === point2[0] && point1[1] === point2[1];\n}\n// A 0:rx 1:ry 2:x-axis-rotation 3:large-arc-flag 4:sweep-flag 5: x 6: y\nexport default function getArcParams(startPoint, params) {\n var rx = params[1];\n var ry = params[2];\n var xRotation = mod(toRadian(params[3]), Math.PI * 2);\n var arcFlag = params[4];\n var sweepFlag = params[5];\n // 弧形起点坐标\n var x1 = startPoint[0];\n var y1 = startPoint[1];\n // 弧形终点坐标\n var x2 = params[6];\n var y2 = params[7];\n var xp = (Math.cos(xRotation) * (x1 - x2)) / 2.0 + (Math.sin(xRotation) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(xRotation) * (x1 - x2)) / 2.0 + (Math.cos(xRotation) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = diff ? Math.sqrt((rx * rx * (ry * ry) - diff) / diff) : 1;\n if (arcFlag === sweepFlag) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n // 旋转前的起点坐标,且当长半轴和短半轴的长度为 0 时,坐标按 (0, 0) 处理\n var cxp = ry ? (f * rx * yp) / ry : 0;\n var cyp = rx ? (f * -ry * xp) / rx : 0;\n // 椭圆圆心坐标\n var cx = (x1 + x2) / 2.0 + Math.cos(xRotation) * cxp - Math.sin(xRotation) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(xRotation) * cxp + Math.cos(xRotation) * cyp;\n // 起始点的单位向量\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n // 终止点的单位向量\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n // 计算起始点和圆心的连线,与 x 轴正方向的夹角\n var theta = vAngle([1, 0], u);\n // 计算圆弧起始点和终止点与椭圆圆心连线的夹角\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (sweepFlag === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (sweepFlag === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return {\n cx: cx,\n cy: cy,\n // 弧形的起点和终点相同时,长轴和短轴的长度按 0 处理\n rx: isSamePoint(startPoint, [x2, y2]) ? 0 : rx,\n ry: isSamePoint(startPoint, [x2, y2]) ? 0 : ry,\n startAngle: theta,\n endAngle: theta + dTheta,\n xRotation: xRotation,\n arcFlag: arcFlag,\n sweepFlag: sweepFlag,\n };\n}\n//# sourceMappingURL=get-arc-params.js.map","import getArcParams from './get-arc-params';\nimport { isSamePoint } from './get-arc-params';\nimport parsePath from './parse-path';\n// 点对称\nfunction toSymmetry(point, center) {\n return [center[0] + (center[0] - point[0]), center[1] + (center[1] - point[1])];\n}\nexport default function getSegments(path) {\n path = parsePath(path);\n var segments = [];\n var currentPoint = null; // 当前图形\n var nextParams = null; // 下一节点的 path 参数\n var startMovePoint = null; // 开始 M 的点,可能会有多个\n var lastStartMovePointIndex = 0; // 最近一个开始点 M 的索引\n var count = path.length;\n for (var i = 0; i < count; i++) {\n var params = path[i];\n nextParams = path[i + 1];\n var command = params[0];\n // 数学定义上的参数,便于后面的计算\n var segment = {\n command: command,\n prePoint: currentPoint,\n params: params,\n startTangent: null,\n endTangent: null,\n };\n switch (command) {\n case 'M':\n startMovePoint = [params[1], params[2]];\n lastStartMovePointIndex = i;\n break;\n case 'A':\n var arcParams = getArcParams(currentPoint, params);\n segment['arcParams'] = arcParams;\n break;\n default:\n break;\n }\n if (command === 'Z') {\n // 有了 Z 后,当前节点从开始 M 的点开始\n currentPoint = startMovePoint;\n // 如果当前点的命令为 Z,相当于当前点为最近一个 M 点,则下一个点直接指向最近一个 M 点的下一个点\n nextParams = path[lastStartMovePointIndex + 1];\n }\n else {\n var len = params.length;\n currentPoint = [params[len - 2], params[len - 1]];\n }\n if (nextParams && nextParams[0] === 'Z') {\n // 如果下一个点的命令为 Z,则下一个点直接指向最近一个 M 点\n nextParams = path[lastStartMovePointIndex];\n if (segments[lastStartMovePointIndex]) {\n // 如果下一个点的命令为 Z,则最近一个 M 点的前一个点为当前点\n segments[lastStartMovePointIndex].prePoint = currentPoint;\n }\n }\n segment['currentPoint'] = currentPoint;\n // 如果当前点与最近一个 M 点相同,则最近一个 M 点的前一个点为当前点的前一个点\n if (segments[lastStartMovePointIndex] &&\n isSamePoint(currentPoint, segments[lastStartMovePointIndex].currentPoint)) {\n segments[lastStartMovePointIndex].prePoint = segment.prePoint;\n }\n var nextPoint = nextParams ? [nextParams[nextParams.length - 2], nextParams[nextParams.length - 1]] : null;\n segment['nextPoint'] = nextPoint;\n // Add startTangent and endTangent\n var prePoint = segment.prePoint;\n if (['L', 'H', 'V'].includes(command)) {\n segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]];\n segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]];\n }\n else if (command === 'Q') {\n // 二次贝塞尔曲线只有一个控制点\n var cp = [params[1], params[2]];\n // 二次贝塞尔曲线的终点为 currentPoint\n segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]];\n segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]];\n }\n else if (command === 'T') {\n var preSegment = segments[i - 1];\n var cp = toSymmetry(preSegment.currentPoint, prePoint);\n if (preSegment.command === 'Q') {\n segment.command = 'Q';\n segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]];\n segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]];\n }\n else {\n segment.command = 'TL';\n segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]];\n segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]];\n }\n }\n else if (command === 'C') {\n // 三次贝塞尔曲线有两个控制点\n var cp1 = [params[1], params[2]];\n var cp2 = [params[3], params[4]];\n segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n // horizontal line, eg. ['C', 100, 100, 100, 100, 200, 200]\n if (segment.startTangent[0] === 0 && segment.startTangent[1] === 0) {\n segment.startTangent = [cp1[0] - cp2[0], cp1[1] - cp2[1]];\n }\n if (segment.endTangent[0] === 0 && segment.endTangent[1] === 0) {\n segment.endTangent = [cp2[0] - cp1[0], cp2[1] - cp1[1]];\n }\n }\n else if (command === 'S') {\n var preSegment = segments[i - 1];\n var cp1 = toSymmetry(preSegment.currentPoint, prePoint);\n var cp2 = [params[1], params[2]];\n if (preSegment.command === 'C') {\n segment.command = 'C'; // 将 S 命令变换为 C 命令\n segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n }\n else {\n segment.command = 'SQ'; // 将 S 命令变换为 SQ 命令\n segment.startTangent = [prePoint[0] - cp2[0], prePoint[1] - cp2[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n }\n }\n else if (command === 'A') {\n var d = 0.001;\n var _a = segment['arcParams'] || {}, _b = _a.cx, cx = _b === void 0 ? 0 : _b, _c = _a.cy, cy = _c === void 0 ? 0 : _c, _d = _a.rx, rx = _d === void 0 ? 0 : _d, _e = _a.ry, ry = _e === void 0 ? 0 : _e, _f = _a.sweepFlag, sweepFlag = _f === void 0 ? 0 : _f, _g = _a.startAngle, startAngle = _g === void 0 ? 0 : _g, _h = _a.endAngle, endAngle = _h === void 0 ? 0 : _h;\n if (sweepFlag === 0) {\n d *= -1;\n }\n var dx1 = rx * Math.cos(startAngle - d) + cx;\n var dy1 = ry * Math.sin(startAngle - d) + cy;\n segment.startTangent = [dx1 - startMovePoint[0], dy1 - startMovePoint[1]];\n var dx2 = rx * Math.cos(startAngle + endAngle + d) + cx;\n var dy2 = ry * Math.sin(startAngle + endAngle - d) + cy;\n segment.endTangent = [prePoint[0] - dx2, prePoint[1] - dy2];\n }\n segments.push(segment);\n }\n return segments;\n}\n//# sourceMappingURL=path-2-segments.js.map","import { Quad as QuadUtil, Cubic as CubicUtil, Arc as EllipseArcUtil } from '@antv/g-math';\nimport { path2Segments } from '@antv/path-util';\nimport { isNumberEqual, max, min } from '@antv/util';\nimport { mergeArrowBBox } from './util';\nfunction getPathBox(segments, lineWidth) {\n var xArr = [];\n var yArr = [];\n var segmentsWithAngle = [];\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n var currentPoint = segment.currentPoint, params = segment.params, prePoint = segment.prePoint;\n var box = void 0;\n switch (segment.command) {\n case 'Q':\n box = QuadUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4]);\n break;\n case 'C':\n box = CubicUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], params[5], params[6]);\n break;\n case 'A':\n var arcParams = segment.arcParams;\n box = EllipseArcUtil.box(arcParams.cx, arcParams.cy, arcParams.rx, arcParams.ry, arcParams.xRotation, arcParams.startAngle, arcParams.endAngle);\n break;\n default:\n xArr.push(currentPoint[0]);\n yArr.push(currentPoint[1]);\n break;\n }\n if (box) {\n segment.box = box;\n xArr.push(box.x, box.x + box.width);\n yArr.push(box.y, box.y + box.height);\n }\n if (lineWidth && (segment.command === 'L' || segment.command === 'M') && segment.prePoint && segment.nextPoint) {\n segmentsWithAngle.push(segment);\n }\n }\n // bbox calculation should ignore NaN for path attribute\n // ref: https://github.com/antvis/g/issues/210\n // ref: https://github.com/antvis/G2/issues/3109\n xArr = xArr.filter(function (item) { return !Number.isNaN(item) && item !== Infinity && item !== -Infinity; });\n yArr = yArr.filter(function (item) { return !Number.isNaN(item) && item !== Infinity && item !== -Infinity; });\n var minX = min(xArr);\n var minY = min(yArr);\n var maxX = max(xArr);\n var maxY = max(yArr);\n if (segmentsWithAngle.length === 0) {\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n for (var i = 0; i < segmentsWithAngle.length; i++) {\n var segment = segmentsWithAngle[i];\n var currentPoint = segment.currentPoint;\n var extra = void 0;\n if (currentPoint[0] === minX) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n minX = minX - extra.xExtra;\n }\n else if (currentPoint[0] === maxX) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n maxX = maxX + extra.xExtra;\n }\n if (currentPoint[1] === minY) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n minY = minY - extra.yExtra;\n }\n else if (currentPoint[1] === maxY) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n maxY = maxY + extra.yExtra;\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\nfunction getExtraFromSegmentWithAngle(segment, lineWidth) {\n var prePoint = segment.prePoint, currentPoint = segment.currentPoint, nextPoint = segment.nextPoint;\n var currentAndPre = Math.pow(currentPoint[0] - prePoint[0], 2) + Math.pow(currentPoint[1] - prePoint[1], 2);\n var currentAndNext = Math.pow(currentPoint[0] - nextPoint[0], 2) + Math.pow(currentPoint[1] - nextPoint[1], 2);\n var preAndNext = Math.pow(prePoint[0] - nextPoint[0], 2) + Math.pow(prePoint[1] - nextPoint[1], 2);\n // 以 currentPoint 为顶点的夹角\n var currentAngle = Math.acos((currentAndPre + currentAndNext - preAndNext) / (2 * Math.sqrt(currentAndPre) * Math.sqrt(currentAndNext)));\n // 夹角为空、 0 或 PI 时,不需要计算夹角处的额外宽度\n // 注意: 由于计算精度问题,夹角为 0 的情况计算出来的角度可能是一个很小的值,还需要判断其与 0 是否近似相等\n if (!currentAngle || Math.sin(currentAngle) === 0 || isNumberEqual(currentAngle, 0)) {\n return {\n xExtra: 0,\n yExtra: 0,\n };\n }\n var xAngle = Math.abs(Math.atan2(nextPoint[1] - currentPoint[1], nextPoint[0] - currentPoint[0]));\n var yAngle = Math.abs(Math.atan2(nextPoint[0] - currentPoint[0], nextPoint[1] - currentPoint[1]));\n // 将夹角转为锐角\n xAngle = xAngle > Math.PI / 2 ? Math.PI - xAngle : xAngle;\n yAngle = yAngle > Math.PI / 2 ? Math.PI - yAngle : yAngle;\n // 这里不考虑在水平和垂直方向的投影,直接使用最大差值\n // 由于上层统一加减了二分之一线宽,这里需要进行弥补\n var extra = {\n // 水平方向投影\n xExtra: Math.cos(currentAngle / 2 - xAngle) * ((lineWidth / 2) * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0,\n // 垂直方向投影\n yExtra: Math.cos(yAngle - currentAngle / 2) * ((lineWidth / 2) * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0,\n };\n return extra;\n}\nexport default function (shape) {\n var attrs = shape.attr();\n var path = attrs.path, stroke = attrs.stroke;\n var lineWidth = stroke ? attrs.lineWidth : 0; // 只有有 stroke 时,lineWidth 才生效\n var segments = shape.get('segments') || path2Segments(path);\n var _a = getPathBox(segments, lineWidth), x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n var bbox = {\n minX: x,\n minY: y,\n maxX: x + width,\n maxY: y + height,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=path.js.map","import { mergeArrowBBox } from './util';\nexport default function (shape) {\n var attrs = shape.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2;\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n var bbox = {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=line.js.map","export default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, rx = attrs.rx, ry = attrs.ry;\n return {\n x: x - rx,\n y: y - ry,\n width: rx * 2,\n height: ry * 2,\n };\n}\n//# sourceMappingURL=ellipse.js.map","import { register, getMethod } from './register';\nimport rect from './rect';\nimport circle from './circle';\nimport polyline from './polyline';\nimport polygon from './polygon';\nimport text from './text';\nimport path from './path';\nimport line from './line';\nimport ellipse from './ellipse';\nregister('rect', rect);\nregister('image', rect); // image 使用 rect 的包围盒计算\nregister('circle', circle);\nregister('marker', circle); // marker 使用 circle 的计算方案\nregister('polyline', polyline);\nregister('polygon', polygon);\nregister('text', text);\nregister('path', path);\nregister('line', line);\nregister('ellipse', ellipse);\nexport { getMethod as getBBoxMethod, register as registerBBox };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Event as GraphEvent } from '@antv/g-base';\nvar G6GraphEvent = /** @class */function (_super) {\n __extends(G6GraphEvent, _super);\n function G6GraphEvent(type, event) {\n var _this = _super.call(this, type, event) || this;\n _this.item = event.item;\n _this.canvasX = event.canvasX;\n _this.canvasY = event.canvasY;\n _this.wheelDelta = event.wheelDelta;\n _this.detail = event.detail;\n return _this;\n }\n return G6GraphEvent;\n}(GraphEvent);\nexport { G6GraphEvent };","import { isString, isNumber, isArray } from '@antv/util';\nimport { G6GraphEvent } from '../interface/behavior';\nexport var uniqueId = function uniqueId(type) {\n return \"\".concat(type, \"-\").concat(Math.random()).concat(Date.now());\n};\n/**\n * turn padding into [top, right, bottom, right]\n * @param {Number|Array} padding input padding\n * @return {array} output\n */\nexport var formatPadding = function formatPadding(padding) {\n if (isArray(padding)) {\n switch (padding.length) {\n case 4:\n return padding;\n case 3:\n padding.push(padding[1]);\n return padding;\n case 2:\n return padding.concat(padding);\n case 1:\n return [padding[0], padding[0], padding[0], padding[0]];\n default:\n return [0, 0, 0, 0];\n }\n }\n if (isNumber(padding)) {\n return [padding, padding, padding, padding];\n } else if (isString(padding)) {\n var intPadding = parseInt(padding, 10);\n return [intPadding, intPadding, intPadding, intPadding];\n }\n return [0, 0, 0, 0];\n};\n/**\n * clone event\n * @param e\n */\nexport var cloneEvent = function cloneEvent(e) {\n var event = new G6GraphEvent(e.type, e);\n event.clientX = e.clientX;\n event.clientY = e.clientY;\n event.x = e.x;\n event.y = e.y;\n event.target = e.target;\n event.currentTarget = e.currentTarget;\n event.bubbles = true;\n event.item = e.item;\n return event;\n};\n/**\n * 判断 viewport 是否改变,通过和单位矩阵对比\n * @param matrix Viewport 的 Matrix\n */\nexport var isViewportChanged = function isViewportChanged(matrix) {\n // matrix 为 null, 则说明没有变化\n if (!matrix) {\n return false;\n }\n var MATRIX_LEN = 9;\n var ORIGIN_MATRIX = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0; i < MATRIX_LEN; i++) {\n if (matrix[i] !== ORIGIN_MATRIX[i]) {\n return true;\n }\n }\n return false;\n};\nexport var isNaN = function isNaN(input) {\n return Number.isNaN(Number(input));\n};\n/**\n * 计算一组 Item 的 BBox\n * @param items 选中的一组Item,可以是 node 或 combo\n */\nexport var calculationItemsBBox = function calculationItemsBBox(items) {\n var minx = Infinity;\n var maxx = -Infinity;\n var miny = Infinity;\n var maxy = -Infinity;\n // 获取已节点的所有最大最小x y值\n for (var i = 0; i < items.length; i++) {\n var element = items[i];\n var bbox = element.getBBox();\n var minX = bbox.minX,\n minY = bbox.minY,\n maxX = bbox.maxX,\n maxY = bbox.maxY;\n if (minX < minx) {\n minx = minX;\n }\n if (minY < miny) {\n miny = minY;\n }\n if (maxX > maxx) {\n maxx = maxX;\n }\n if (maxY > maxy) {\n maxy = maxY;\n }\n }\n var x = Math.floor(minx);\n var y = Math.floor(miny);\n var width = Math.ceil(maxx) - Math.floor(minx);\n var height = Math.ceil(maxy) - Math.floor(miny);\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minx,\n minY: miny,\n maxX: maxx,\n maxY: maxy\n };\n};\n/**\n * 若 edges 中存在两端点相同的边,使用 quadratic 边并自动计算 curveOffset 使它们不相互重叠\n * 文档: https://g6.antv.antgroup.com/en/api/Util\n * @param edges 边数据集合\n * @param offsetDiff 相邻两边的 offset 之差\n * @param multiEdgeType\n * @param singleEdgeType\n * @param loopEdgeType\n */\nexport var processParallelEdges = function processParallelEdges(edges, offsetDiff, multiEdgeType, singleEdgeType, loopEdgeType) {\n if (offsetDiff === void 0) {\n offsetDiff = 15;\n }\n if (multiEdgeType === void 0) {\n multiEdgeType = 'quadratic';\n }\n if (singleEdgeType === void 0) {\n singleEdgeType = undefined;\n }\n if (loopEdgeType === void 0) {\n loopEdgeType = undefined;\n }\n var len = edges.length;\n var cod = offsetDiff * 2;\n var loopPosition = ['top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left'];\n var edgeMap = {};\n var tags = [];\n var reverses = {};\n for (var i = 0; i < len; i++) {\n var edge = edges[i];\n var source = edge.source,\n target = edge.target;\n var sourceTarget = \"\".concat(source, \"-\").concat(target);\n if (tags[i]) continue;\n if (!edgeMap[sourceTarget]) {\n edgeMap[sourceTarget] = [];\n }\n tags[i] = true;\n edgeMap[sourceTarget].push(edge);\n for (var j = 0; j < len; j++) {\n if (i === j) continue;\n var sedge = edges[j];\n var src = sedge.source;\n var dst = sedge.target;\n // 两个节点之间共同的边\n // 第一条的source = 第二条的target\n // 第一条的target = 第二条的source\n if (!tags[j]) {\n if (source === dst && target === src) {\n edgeMap[sourceTarget].push(sedge);\n tags[j] = true;\n reverses[\"\".concat(src, \"|\").concat(dst, \"|\").concat(edgeMap[sourceTarget].length - 1)] = true;\n } else if (source === src && target === dst) {\n edgeMap[sourceTarget].push(sedge);\n tags[j] = true;\n }\n }\n }\n }\n for (var key in edgeMap) {\n var arcEdges = edgeMap[key];\n var length_1 = arcEdges.length;\n for (var k = 0; k < length_1; k++) {\n var current = arcEdges[k];\n if (current.source === current.target) {\n if (loopEdgeType) current.type = loopEdgeType;\n // 超过8条自环边,则需要重新处理\n current.loopCfg = {\n position: loopPosition[k % 8],\n dist: Math.floor(k / 8) * 20 + 50\n };\n continue;\n }\n if (length_1 === 1 && singleEdgeType && current.source !== current.target) {\n current.type = singleEdgeType;\n continue;\n }\n current.type = multiEdgeType;\n var sign = (k % 2 === 0 ? 1 : -1) * (reverses[\"\".concat(current.source, \"|\").concat(current.target, \"|\").concat(k)] ? -1 : 1);\n if (length_1 % 2 === 1) {\n current.curveOffset = sign * Math.ceil(k / 2) * cod;\n } else {\n current.curveOffset = sign * (Math.floor(k / 2) * cod + offsetDiff);\n }\n }\n }\n return edges;\n};","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @description 扩展方法,提供 gl-matrix 为提供的方法\n * */\nvar gl_matrix_1 = require(\"gl-matrix\");\nfunction leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromTranslation(transMat, v);\n return gl_matrix_1.mat3.multiply(out, transMat, a);\n}\nexports.leftTranslate = leftTranslate;\nfunction leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromRotation(rotateMat, rad);\n return gl_matrix_1.mat3.multiply(out, rotateMat, a);\n}\nexports.leftRotate = leftRotate;\nfunction leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromScaling(scaleMat, v);\n return gl_matrix_1.mat3.multiply(out, scaleMat, a);\n}\nexports.leftScale = leftScale;\nfunction leftMultiply(out, a, a1) {\n return gl_matrix_1.mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nfunction transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\nexports.transform = transform;\n/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nfunction direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\nexports.direction = direction;\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nfunction angleTo(v1, v2, direct) {\n var ang = gl_matrix_1.vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\nexports.angleTo = angleTo;\n/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nfunction vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\nexports.vertical = vertical;\n//# sourceMappingURL=ext.js.map","import { __assign } from \"tslib\";\nimport { isNumber, isString } from '@antv/util';\nimport { formatPadding, isNaN } from '../../util/base';\nimport { applyMatrix, invertMatrix, lerpArray } from '../../util/math';\nimport { transform } from '@antv/matrix-util/lib/ext';\nimport { getAnimateCfgWithCallback } from '../../util/graphic';\nvar ViewController = /** @class */function () {\n function ViewController(graph) {\n this.destroyed = false;\n this.graph = graph;\n this.destroyed = false;\n }\n // get view center coordinate\n ViewController.prototype.getViewCenter = function () {\n var padding = this.getFormatPadding();\n var graph = this.graph;\n var width = this.graph.get('width');\n var height = graph.get('height');\n return {\n x: (width - padding[1] - padding[3]) / 2 + padding[3],\n y: (height - padding[0] - padding[2]) / 2 + padding[0]\n };\n };\n ViewController.prototype.fitCenter = function (animate, animateCfg) {\n var graph = this.graph;\n var group = graph.get('group');\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n var maxX_1 = -Infinity;\n var maxY_1 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_1 > x) minX_1 = x;\n if (minY_1 > y) minY_1 = y;\n if (maxX_1 < x) maxX_1 = x;\n if (maxY_1 < y) maxY_1 = y;\n });\n var matrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var _a = applyMatrix({\n x: minX_1,\n y: minY_1\n }, matrix),\n transMinX = _a.x,\n transMinY = _a.y;\n var _b = applyMatrix({\n x: maxX_1,\n y: maxY_1\n }, matrix),\n transMaxX = _b.x,\n transMaxY = _b.y;\n bbox = {\n minX: transMinX,\n maxX: transMaxX,\n minY: transMinY,\n maxY: transMaxY,\n width: transMaxX - transMinX,\n height: transMaxY - transMinY,\n x: transMinX,\n y: transMinY\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y, animate, animateCfg);\n };\n ViewController.prototype.animatedFitView = function (group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, zoomToFit) {\n var graph = this.graph;\n animateCfg = animateCfg ? animateCfg : {\n duration: 500,\n easing: 'easeCubic'\n };\n // start from the default matrix\n var matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n // Translate\n var vx = bbox.x + viewCenter.x - groupCenter.x - bbox.minX;\n var vy = bbox.y + viewCenter.y - groupCenter.y - bbox.minY;\n if (isNaN(vx) || isNaN(vy)) return;\n var translatedMatrix = transform(matrix, [['t', vx, vy]]);\n if (!zoomToFit) {\n // If zooming is not needed just animate the current translated matrix and return\n var animationConfig_1 = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n graph.emit('viewportchange', {\n action: 'translate',\n matrix: translatedMatrix\n });\n }\n });\n group.animate(function (ratio) {\n return {\n matrix: lerpArray(startMatrix, translatedMatrix, ratio)\n };\n }, animationConfig_1);\n return;\n }\n // Zoom\n var minZoom = graph.get('minZoom');\n var maxZoom = graph.get('maxZoom');\n var realRatio = ratio;\n if (minZoom && ratio < minZoom) {\n realRatio = minZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph minzoom has been used instead');\n } else if (maxZoom && ratio > maxZoom) {\n realRatio = maxZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph maxzoom has been used instead');\n }\n var zoomedMatrix = transform(translatedMatrix, [['t', -viewCenter.x, -viewCenter.y], ['s', realRatio, realRatio], ['t', viewCenter.x, viewCenter.y]]);\n // Animation\n var animationConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n group.setMatrix(zoomedMatrix);\n graph.emit('viewportchange', {\n action: 'translate',\n matrix: translatedMatrix\n });\n graph.emit('viewportchange', {\n action: 'zoom',\n matrix: zoomedMatrix\n });\n }\n });\n group.stopAnimate();\n group.setMatrix(startMatrix);\n group.animate(function (ratio) {\n return {\n matrix: lerpArray(startMatrix, zoomedMatrix, ratio)\n };\n }, animationConfig);\n };\n // fit view graph\n ViewController.prototype.fitView = function (animate, animateCfg) {\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_2 = Infinity;\n var minY_2 = Infinity;\n var maxX_2 = -Infinity;\n var maxY_2 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_2 > x) minX_2 = x;\n if (minY_2 > y) minY_2 = y;\n if (maxX_2 < x) maxX_2 = x;\n if (maxY_2 < y) maxY_2 = y;\n });\n bbox = {\n minX: minX_2,\n maxX: maxX_2,\n minY: minY_2,\n maxY: maxY_2,\n width: maxX_2 - minX_2,\n height: maxY_2 - minY_2,\n x: minX_2,\n y: minY_2\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var w = (width - padding[1] - padding[3]) / bbox.width;\n var h = (height - padding[0] - padding[2]) / bbox.height;\n var ratio = w;\n if (w > h) {\n ratio = h;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, true);\n } else {\n var dx = viewCenter.x - groupCenter.x;\n var dy = viewCenter.y - groupCenter.y;\n if (isNaN(dx) || isNaN(dy)) return;\n graph.translate(dx, dy);\n if (!graph.zoom(ratio, viewCenter)) {\n console.warn('zoom failed, ratio out of range, ratio: %f', ratio);\n }\n }\n };\n // fit view graph by rule\n ViewController.prototype.fitViewByRules = function (rules, animate, animateCfg) {\n var _a = rules.onlyOutOfViewPort,\n onlyOutOfViewPort = _a === void 0 ? false : _a,\n _b = rules.direction,\n direction = _b === void 0 ? 'both' : _b,\n _c = rules.ratioRule,\n ratioRule = _c === void 0 ? 'min' : _c;\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_3 = Infinity;\n var minY_3 = Infinity;\n var maxX_3 = -Infinity;\n var maxY_3 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_3 > x) minX_3 = x;\n if (minY_3 > y) minY_3 = y;\n if (maxX_3 < x) maxX_3 = x;\n if (maxY_3 < y) maxY_3 = y;\n });\n bbox = {\n minX: minX_3,\n maxX: maxX_3,\n minY: minY_3,\n maxY: maxY_3,\n width: maxX_3 - minX_3,\n height: maxY_3 - minY_3,\n x: minX_3,\n y: minY_3\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var wRatio = (width - padding[1] - padding[3]) / bbox.width;\n var hRatio = (height - padding[0] - padding[2]) / bbox.height;\n var ratio;\n if (direction === 'x') {\n ratio = wRatio;\n } else if (direction === 'y') {\n ratio = hRatio;\n } else {\n // ratioRule\n ratio = ratioRule === 'max' ? Math.max(wRatio, hRatio) : Math.min(wRatio, hRatio);\n }\n // 如果设置了仅对超出视口宽高的场景进行fitview,则没超出的场景zoom取1\n if (onlyOutOfViewPort) {\n ratio = ratio < 1 ? ratio : 1;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, true);\n } else {\n var initZoomRatio = graph.getZoom();\n var endZoom = initZoomRatio * ratio;\n var minZoom = graph.get('minZoom');\n // 如果zoom小于最小zoom, 则以最小zoom为准\n if (endZoom < minZoom) {\n endZoom = minZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph minzoom has been used instead');\n }\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y);\n graph.zoomTo(endZoom, viewCenter);\n }\n };\n ViewController.prototype.getFormatPadding = function () {\n var padding = this.graph.get('fitViewPadding');\n return formatPadding(padding);\n };\n ViewController.prototype.focusPoint = function (point, animate, animateCfg) {\n var _this = this;\n var viewCenter = this.getViewCenter();\n var modelCenter = this.getPointByCanvas(viewCenter.x, viewCenter.y);\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (animate) {\n var dx_1 = (modelCenter.x - point.x) * viewportMatrix[0];\n var dy_1 = (modelCenter.y - point.y) * viewportMatrix[4];\n var lastX_1 = 0;\n var lastY_1 = 0;\n var newX_1 = 0;\n var newY_1 = 0;\n // 动画每次平移一点,直到目标位置\n this.graph.get('canvas').animate(function (ratio) {\n newX_1 = dx_1 * ratio;\n newY_1 = dy_1 * ratio;\n _this.graph.translate(newX_1 - lastX_1, newY_1 - lastY_1);\n lastX_1 = newX_1;\n lastY_1 = newY_1;\n }, __assign({}, animateCfg));\n } else {\n this.graph.translate((modelCenter.x - point.x) * viewportMatrix[0], (modelCenter.y - point.y) * viewportMatrix[4]);\n }\n };\n /**\n * 将 Canvas 坐标转成视口坐标\n * @param canvasX canvas x 坐标\n * @param canvasY canvas y 坐标\n */\n ViewController.prototype.getPointByCanvas = function (canvasX, canvasY) {\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) {\n viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var point = invertMatrix({\n x: canvasX,\n y: canvasY\n }, viewportMatrix);\n return point;\n };\n /**\n * 将页面坐标转成视口坐标\n * @param clientX 页面 x 坐标\n * @param clientY 页面 y 坐标\n */\n ViewController.prototype.getPointByClient = function (clientX, clientY) {\n var canvas = this.graph.get('canvas');\n var canvasPoint = canvas.getPointByClient(clientX, clientY);\n return this.getPointByCanvas(canvasPoint.x, canvasPoint.y);\n };\n /**\n * 将视口坐标转成页面坐标\n * @param x 视口 x 坐标\n * @param y 视口 y 坐标\n */\n ViewController.prototype.getClientByPoint = function (x, y) {\n var canvas = this.graph.get('canvas');\n var canvasPoint = this.getCanvasByPoint(x, y);\n var point = canvas.getClientByPoint(canvasPoint.x, canvasPoint.y);\n return {\n x: point.x,\n y: point.y\n };\n };\n /**\n * 将视口坐标转成 Canvas 坐标\n * @param x 视口 x 坐标\n * @param y 视口 y 坐标\n */\n ViewController.prototype.getCanvasByPoint = function (x, y) {\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) {\n viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n return applyMatrix({\n x: x,\n y: y\n }, viewportMatrix);\n };\n /**\n * 将元素移动到画布中心\n * @param item Item 实例或 id\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n ViewController.prototype.focus = function (item, animate, animateCfg) {\n if (isString(item)) {\n item = this.graph.findById(item);\n }\n if (item) {\n var x = 0,\n y = 0;\n if (item.getType && item.getType() === 'edge') {\n var sourceMatrix = item.getSource().get('group').getMatrix();\n var targetMatrix = item.getTarget().get('group').getMatrix();\n if (sourceMatrix && targetMatrix) {\n x = (sourceMatrix[6] + targetMatrix[6]) / 2;\n y = (sourceMatrix[7] + targetMatrix[7]) / 2;\n } else if (sourceMatrix || targetMatrix) {\n x = sourceMatrix ? sourceMatrix[6] : targetMatrix[6];\n y = sourceMatrix ? sourceMatrix[7] : targetMatrix[7];\n }\n } else {\n var group = item.get('group');\n var matrix = group.getMatrix();\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n x = matrix[6];\n y = matrix[7];\n }\n // 用实际位置而不是model中的x,y,防止由于拖拽等的交互导致model的x,y并不是当前的x,y\n this.focusPoint({\n x: x,\n y: y\n }, animate, animateCfg);\n }\n };\n ViewController.prototype.focusItems = function (items, zoomToFit, animate, animateCfg) {\n if (!items.length) {\n return;\n }\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox = {\n x: 0,\n y: 0,\n minX: Number.MAX_SAFE_INTEGER,\n minY: Number.MAX_SAFE_INTEGER,\n maxX: Number.MIN_SAFE_INTEGER,\n maxY: Number.MIN_SAFE_INTEGER,\n width: 0,\n height: 0\n };\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n var itemBBox = item.getBBox();\n if (itemBBox.minX < bbox.minX) {\n bbox.minX = itemBBox.minX;\n }\n if (itemBBox.minY < bbox.minY) {\n bbox.minY = itemBBox.minY;\n }\n if (itemBBox.maxX > bbox.maxX) {\n bbox.maxX = itemBBox.maxX;\n }\n if (itemBBox.maxY > bbox.maxY) {\n bbox.maxY = itemBBox.maxY;\n }\n }\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var w = (width - padding[1] - padding[3]) / bbox.width;\n var h = (height - padding[0] - padding[2]) / bbox.height;\n var ratio = w;\n if (w > h) {\n ratio = h;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, zoomToFit);\n } else {\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y);\n if (zoomToFit && !graph.zoom(ratio, viewCenter)) {\n console.warn('zoom failed, ratio out of range, ratio: %f', ratio);\n }\n }\n };\n /**\n * 改变 canvas 画布的宽度和高度\n * @param width canvas 宽度\n * @param height canvas 高度\n */\n ViewController.prototype.changeSize = function (width, height) {\n var graph = this.graph;\n if (!isNumber(width) || !isNumber(height)) {\n throw Error('invalid canvas width & height, please make sure width & height type is number');\n }\n graph.set({\n width: width,\n height: height\n });\n var canvas = graph.get('canvas');\n canvas.changeSize(width, height);\n // change the size of grid plugin if it exists on graph\n var plugins = graph.get('plugins');\n plugins.forEach(function (plugin) {\n if (plugin.get('gridContainer')) {\n // 网格定位信息初始化\n plugin.positionInit();\n }\n });\n };\n ViewController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = false;\n };\n return ViewController;\n}();\nexport default ViewController;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * @fileOverview 从xml建立自定义Node,包含update\n * @author xuzhi.mxz@antfin.com\n */\nimport { __assign, __rest } from \"tslib\";\nimport { get } from '@antv/util';\nimport { getTextSize } from '../util/graphic';\n/**\n * 一种更宽松的JSON 解析,如果遇到不符合规范的字段会直接转为字符串\n * @param text json 内容\n */\nfunction looseJSONParse(text) {\n if (typeof text !== 'string') {\n return text;\n }\n var safeParse = function safeParse(str) {\n if (typeof str !== 'string') {\n return str;\n }\n try {\n return JSON.parse(str.trim());\n } catch (e) {\n return str.trim();\n }\n };\n var firstAttempt = safeParse(text);\n if (typeof firstAttempt !== 'string') {\n return firstAttempt;\n }\n var tail = function tail(arr) {\n return arr[arr.length - 1];\n };\n var str = text.trim();\n var objectStack = [];\n var syntaxStack = [];\n var isLastPair = function isLastPair() {\n var syntaxes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n syntaxes[_i] = arguments[_i];\n }\n return syntaxes.some(function (syntax) {\n return tail(syntaxStack) === syntax;\n });\n };\n var getValueStore = function getValueStore() {\n return tail(objectStack);\n };\n var rst = null;\n var i = 0;\n var temp = '';\n while (i < str.length) {\n var nowChar = str[i];\n var isInString = isLastPair('\"', \"'\");\n if (!isInString && !nowChar.trim()) {\n i += 1;\n continue;\n }\n var isLastTranslate = str[i - 1] === '\\\\';\n var isInObject = isLastPair('}');\n var isInArray = isLastPair(']');\n var isWaitingValue = isLastPair(',');\n var tempArr = getValueStore();\n if (isInString) {\n if (tail(syntaxStack) === nowChar && !isLastTranslate) {\n syntaxStack.pop();\n var value = safeParse(temp);\n tempArr.push(value);\n rst = value;\n temp = '';\n } else {\n temp += nowChar;\n }\n } else if (isInArray && nowChar === ',') {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n } else if (isInObject && nowChar === ':') {\n syntaxStack.push(',');\n if (temp) {\n tempArr.push(temp);\n temp = '';\n }\n } else if (isWaitingValue && nowChar === ',') {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n syntaxStack.pop();\n } else if (nowChar === '}' && (isInObject || isWaitingValue)) {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n if (isWaitingValue) {\n syntaxStack.pop();\n }\n var obj = {};\n for (var c = 1; c < tempArr.length; c += 2) {\n obj[tempArr[c - 1]] = tempArr[c];\n }\n objectStack.pop();\n if (objectStack.length) {\n tail(objectStack).push(obj);\n }\n syntaxStack.pop();\n rst = obj;\n } else if (nowChar === ']' && isInArray) {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n objectStack.pop();\n if (objectStack.length) {\n tail(objectStack).push(tempArr);\n }\n syntaxStack.pop();\n rst = tempArr;\n } else if (nowChar === '{') {\n objectStack.push([]);\n syntaxStack.push('}');\n } else if (nowChar === '[') {\n objectStack.push([]);\n syntaxStack.push(']');\n } else if (nowChar === '\"') {\n syntaxStack.push('\"');\n } else if (nowChar === \"'\") {\n syntaxStack.push(\"'\");\n } else {\n temp += nowChar;\n }\n i += 1;\n }\n return rst || temp;\n}\nvar keyConvert = function keyConvert(str) {\n return str.split('-').reduce(function (a, b) {\n return a + b.charAt(0).toUpperCase() + b.slice(1);\n });\n};\n/**\n * 简单的一个{{}}模板渲染,不包含任何复杂语法\n * @param xml\n */\nexport var xmlDataRenderer = function xmlDataRenderer(xml) {\n return function (data) {\n var len = xml.length;\n var arr = [];\n var i = 0;\n var tmp = '';\n while (i < len) {\n if (xml[i] === '{' && xml[i + 1] === '{') {\n arr.push(tmp);\n tmp = '';\n i += 2;\n } else if (xml[i] === '}' && xml[i + 1] === '}') {\n if (arr.length) {\n var last = arr.pop();\n tmp = get(data, tmp, last.endsWith('=') ? \"\\\"{\".concat(tmp, \"}\\\"\") : tmp);\n arr.push(last + tmp);\n }\n i += 2;\n tmp = '';\n } else {\n tmp += xml[i];\n i += 1;\n }\n }\n arr.push(tmp);\n return arr.map(function (e, index) {\n return arr[index - 1] && arr[index - 1].endsWith('=') ? \"\\\"{\".concat(e, \"}\\\"\") : e;\n }).join('');\n };\n};\n/**\n * 解析XML,并转化为相应的JSON结构\n * @param xml xml解析后的节点\n */\nexport function parseXML(xml, cfg) {\n var attrs = {};\n var keys = xml.getAttributeNames && xml.getAttributeNames() || [];\n var children = xml.children && Array.from(xml.children).map(function (e) {\n return parseXML(e, cfg);\n });\n var rst = {};\n var tagName = xml.tagName ? xml.tagName.toLowerCase() : 'group';\n if (tagName === 'text') {\n attrs.text = xml.innerText;\n }\n rst.type = tagName;\n if (tagName === 'img') {\n rst.type = 'image';\n }\n Array.from(keys).forEach(function (k) {\n var key = keyConvert(k);\n var val = xml.getAttribute(k);\n try {\n if (key === 'style' || key === 'attrs') {\n var style = looseJSONParse(val);\n attrs = __assign(__assign({}, attrs), style);\n } else {\n rst[key] = looseJSONParse(val);\n }\n } catch (e) {\n if (key === 'style') {\n throw e;\n }\n rst[key] = val;\n }\n });\n rst.attrs = attrs;\n if (cfg && cfg.style && rst.name && _typeof(cfg.style[rst.name]) === 'object') {\n rst.attrs = __assign(__assign({}, rst.attrs), cfg.style[rst.name]);\n }\n if (cfg && cfg.style && rst.keyshape) {\n rst.attrs = __assign(__assign({}, rst.attrs), cfg.style);\n }\n if (children.length) {\n rst.children = children;\n }\n return rst;\n}\n/**\n * 根据偏移量和内部节点最终的bounding box来得出该shape最终的bbox\n */\nexport function getBBox(node, offset, childrenBBox) {\n var _a = node.attrs,\n attrs = _a === void 0 ? {} : _a;\n var bbox = {\n x: offset.x || 0,\n y: offset.y || 0,\n width: childrenBBox.width || 0,\n height: childrenBBox.height || 0\n };\n var shapeHeight, shapeWidth;\n switch (node.type) {\n case 'maker':\n case 'circle':\n if (attrs.r) {\n shapeWidth = 2 * attrs.r;\n shapeHeight = 2 * attrs.r;\n }\n break;\n case 'text':\n if (attrs.text) {\n shapeWidth = getTextSize(attrs.text, attrs.fontSize || 12)[0];\n shapeHeight = 16;\n bbox.y += shapeHeight;\n bbox.height = shapeHeight;\n bbox.width = shapeWidth;\n node.attrs = __assign({\n fontSize: 12,\n fill: '#000'\n }, attrs);\n }\n break;\n default:\n if (attrs.width) {\n shapeWidth = attrs.width;\n }\n if (attrs.height) {\n shapeHeight = attrs.height;\n }\n }\n if (shapeHeight >= 0) {\n bbox.height = shapeHeight;\n }\n if (shapeWidth >= 0) {\n bbox.width = shapeWidth;\n }\n if (attrs.marginTop) {\n bbox.y += attrs.marginTop;\n }\n if (attrs.marginLeft) {\n bbox.x += attrs.marginLeft;\n }\n return bbox;\n}\n/**\n * 把从xml计算出的结构填上位置信息,补全attrs\n * @param target\n * @param lastOffset\n */\nexport function generateTarget(target, lastOffset) {\n var _a;\n if (lastOffset === void 0) {\n lastOffset = {\n x: 0,\n y: 0\n };\n }\n var defaultBbox = __assign({\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }, lastOffset);\n if ((_a = target.children) === null || _a === void 0 ? void 0 : _a.length) {\n var _b = target.attrs,\n attrs = _b === void 0 ? {} : _b;\n var marginTop = attrs.marginTop;\n var offset = __assign({}, lastOffset);\n if (marginTop) {\n offset.y += marginTop;\n }\n for (var index = 0; index < target.children.length; index++) {\n target.children[index].attrs.key = \"\".concat(attrs.key || 'root', \" -\").concat(index, \" \");\n var node = generateTarget(target.children[index], offset);\n if (node.bbox) {\n var bbox = node.bbox;\n if (node.attrs.next === 'inline') {\n offset.x += node.bbox.width;\n } else {\n offset.y += node.bbox.height;\n }\n if (bbox.width + bbox.x > defaultBbox.width) {\n defaultBbox.width = bbox.width + bbox.x;\n }\n if (bbox.height + bbox.y > defaultBbox.height) {\n defaultBbox.height = bbox.height + bbox.y;\n }\n }\n }\n }\n target.bbox = getBBox(target, lastOffset, defaultBbox);\n target.attrs = __assign(__assign({}, target.attrs), target.bbox);\n return target;\n}\n/**\n * 对比前后两个最终计算出来的node,并对比出最小改动,\n * 动作: 'add' 添加节点 | ’delete‘ 删除节点 | ’change‘ 改变节点attrs | 'restructure' 重构节点\n * @param nowTarget\n * @param formerTarget\n */\nexport function compareTwoTarget(nowTarget, formerTarget) {\n var _a, _b, _c, _d;\n var type = (nowTarget || {}).type;\n var key = ((formerTarget === null || formerTarget === void 0 ? void 0 : formerTarget.attrs) || {}).key;\n if (key && nowTarget) {\n nowTarget.attrs.key = key;\n }\n if (!nowTarget && formerTarget) {\n return {\n action: 'delete',\n val: formerTarget,\n type: type,\n key: key\n };\n }\n if (nowTarget && !formerTarget) {\n return {\n action: 'add',\n val: nowTarget,\n type: type\n };\n }\n if (!nowTarget && !formerTarget) {\n return {\n action: 'same',\n type: type\n };\n }\n var children = [];\n if (((_a = nowTarget.children) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = formerTarget.children) === null || _b === void 0 ? void 0 : _b.length) > 0) {\n var length_1 = Math.max((_c = nowTarget.children) === null || _c === void 0 ? void 0 : _c.length, (_d = formerTarget.children) === null || _d === void 0 ? void 0 : _d.length);\n var formerChildren = formerTarget.children || [];\n var nowChildren = nowTarget.children || [];\n for (var index = 0; index < length_1; index += 1) {\n children.push(compareTwoTarget(nowChildren[index], formerChildren[index]));\n }\n }\n var formerKeys = Object.keys(formerTarget.attrs);\n var nowKeys = Object.keys(nowTarget.attrs);\n if (formerTarget.type !== nowTarget.type) {\n return {\n action: 'restructure',\n nowTarget: nowTarget,\n formerTarget: formerTarget,\n key: key,\n children: children\n };\n }\n if (formerKeys.filter(function (e) {\n return e !== 'children';\n }).some(function (e) {\n return nowTarget.attrs[e] !== formerTarget.attrs[e] || !nowKeys.includes(e);\n })) {\n return {\n action: 'change',\n val: nowTarget,\n children: children,\n type: type,\n key: key\n };\n }\n return {\n action: 'same',\n children: children,\n type: type,\n key: key\n };\n}\n/**\n * 根据xml或者返回xml的函数构建自定义节点的结构\n * @param gen\n */\nexport function createNodeFromXML(gen) {\n var structures = {};\n var compileXML = function compileXML(cfg) {\n var rawStr = typeof gen === 'function' ? gen(cfg) : gen;\n var target = xmlDataRenderer(rawStr)(cfg);\n var xmlParser = document.createElement('div');\n xmlParser.innerHTML = target;\n var xml = xmlParser.children[0];\n var result = generateTarget(parseXML(xml, cfg));\n xmlParser.remove();\n return result;\n };\n return {\n draw: function draw(cfg, group) {\n var resultTarget = compileXML(cfg);\n var keyshape = group;\n var renderTarget = function renderTarget(target) {\n var _a = target.attrs,\n attrs = _a === void 0 ? {} : _a,\n bbox = target.bbox,\n type = target.type,\n children = target.children,\n rest = __rest(target, [\"attrs\", \"bbox\", \"type\", \"children\"]);\n if (target.type !== 'group') {\n var shape = group.addShape(target.type, __assign({\n attrs: attrs,\n origin: {\n bbox: bbox,\n type: type,\n children: children\n }\n }, rest));\n if (target.keyshape) {\n keyshape = shape;\n }\n }\n if (target.children) {\n target.children.forEach(function (n) {\n return renderTarget(n);\n });\n }\n };\n renderTarget(resultTarget);\n structures[cfg.id] = [resultTarget];\n return keyshape;\n },\n update: function update(cfg, node) {\n if (!structures[cfg.id]) {\n structures[cfg.id] = [];\n }\n var container = node.getContainer();\n var children = container.get('children');\n var newTarget = compileXML(cfg);\n var lastTarget = structures[cfg.id].pop();\n var diffResult = compareTwoTarget(newTarget, lastTarget);\n var addShape = function addShape(shape) {\n var _a;\n if (shape.type !== 'group') {\n container.addShape(shape.type, {\n attrs: shape.attrs\n });\n }\n if ((_a = shape.children) === null || _a === void 0 ? void 0 : _a.length) {\n shape.children.map(function (e) {\n return addShape(e);\n });\n }\n };\n var delShape = function delShape(shape) {\n var _a;\n var targetShape = children.find(function (e) {\n return e.attrs.key === shape.attrs.key;\n });\n if (targetShape) {\n container.removeChild(targetShape);\n }\n if ((_a = shape.children) === null || _a === void 0 ? void 0 : _a.length) {\n shape.children.map(function (e) {\n return delShape(e);\n });\n }\n };\n var updateTarget = function updateTarget(target) {\n var key = target.key;\n if (target.type !== 'group') {\n var targetShape = children.find(function (e) {\n return e.attrs.key === key;\n });\n switch (target.action) {\n case 'change':\n if (targetShape) {\n var originAttr = target.val.keyshape ? node.getOriginStyle() : {};\n targetShape.attr(__assign(__assign({}, originAttr), target.val.attrs));\n }\n break;\n case 'add':\n addShape(target.val);\n break;\n case 'delete':\n delShape(target.val);\n break;\n case 'restructure':\n delShape(target.formerTarget);\n addShape(target.nowTarget);\n break;\n default:\n break;\n }\n }\n if (target.children) {\n target.children.forEach(function (n) {\n return updateTarget(n);\n });\n }\n };\n updateTarget(diffResult);\n structures[cfg.id].push(newTarget);\n },\n getAnchorPoints: function getAnchorPoints() {\n return [[0, 0.5], [1, 0.5], [0.5, 1], [0.5, 0]];\n }\n };\n}","import { __assign } from \"tslib\";\nimport { upperFirst } from '@antv/util';\nimport { createNodeFromXML } from './xml';\nvar cache = {}; // ucfirst 开销过大,进行缓存\n// 首字母大写\nfunction ucfirst(str) {\n if (!cache[str]) {\n cache[str] = upperFirst(str);\n }\n return cache[str];\n}\n/**\n * 工厂方法的基类\n * @type Shape.FactoryBase\n */\nexport var ShapeFactoryBase = {\n /**\n * 默认的形状,当没有指定/匹配 shapeType 时,使用默认的\n * @type {String}\n */\n defaultShapeType: 'defaultType',\n /**\n * 形状的 className,用于搜索\n * @type {String}\n */\n className: null,\n /**\n * 获取绘制 Shape 的工具类,无状态\n * @param {String} type 类型\n * @return {Shape} 工具类\n */\n getShape: function getShape(type) {\n var self = this;\n var shape = self[type] || self[self.defaultShapeType] || self['simple-circle'];\n return shape;\n },\n /**\n * 绘制图形\n * @param {String} type 类型\n * @param {Object} cfg 配置项\n * @param {G.Group} group 图形的分组\n * @return {IShape} 图形对象\n */\n draw: function draw(type, cfg, group) {\n var shape = this.getShape(type);\n group['shapeMap'] = {};\n var rst = shape.draw(cfg, group);\n if (shape.afterDraw) {\n shape.afterDraw(cfg, group, rst);\n }\n return rst;\n },\n /**\n * 更新\n * @param {String} type 类型\n * @param {Object} cfg 配置项\n * @param {G6.Item} item 节点、边、分组等\n */\n baseUpdate: function baseUpdate(type, cfg, item, updateType) {\n var _a, _b;\n var shape = this.getShape(type);\n // 防止没定义 update 函数\n if (shape.update) {\n // shape.mergeStyle = updateType === 'move' || updateType === 'bbox' ? {} : shape.getOptions?.(cfg);\n shape.mergeStyle = (_a = shape.getOptions) === null || _a === void 0 ? void 0 : _a.call(shape, cfg, updateType);\n (_b = shape.update) === null || _b === void 0 ? void 0 : _b.call(shape, cfg, item, updateType);\n }\n if (shape.afterUpdate) {\n shape.afterUpdate(cfg, item);\n }\n },\n /**\n * 设置状态\n * @param {String} type 类型\n * @param {String} name 状态名\n * @param {String | Boolean} value 状态值\n * @param {G6.Item} item 节点、边、分组等\n */\n setState: function setState(type, name, value, item) {\n var shape = this.getShape(type);\n // 调用 shape/shapeBase.ts 中的 setState 方法\n shape.setState(name, value, item);\n },\n /**\n * 是否允许更新,不重新绘制图形\n * @param {String} type 类型\n * @return {Boolean} 是否允许使用更新\n */\n shouldUpdate: function shouldUpdate(type) {\n var shape = this.getShape(type);\n return !!shape.update;\n },\n getControlPoints: function getControlPoints(type, cfg) {\n var shape = this.getShape(type);\n return shape.getControlPoints(cfg);\n },\n /**\n * 获取控制点\n * @param {String} type 节点、边类型\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getAnchorPoints: function getAnchorPoints(type, cfg) {\n var shape = this.getShape(type);\n return shape.getAnchorPoints(cfg);\n }\n};\n/**\n * 元素的框架\n */\nvar ShapeFramework = {\n // 默认样式及配置\n options: {},\n /**\n * 绘制\n */\n draw: function draw(cfg, group) {\n return this.drawShape(cfg, group);\n },\n /**\n * 绘制\n */\n drawShape: function drawShape( /* cfg, group */) {},\n /**\n * 绘制完成后的操作,便于用户继承现有的节点、边\n */\n afterDraw: function afterDraw( /* cfg, group */) {},\n // update(cfg, item) // 默认不定义\n afterUpdate: function afterUpdate( /* cfg, item */) {},\n /**\n * 设置节点、边状态\n */\n setState: function setState( /* name, value, item */) {},\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getAnchorPoints: function getAnchorPoints(cfg) {\n var defaultAnchorPoints = this.options.anchorPoints;\n var anchorPoints = cfg.anchorPoints || defaultAnchorPoints;\n return anchorPoints;\n }\n /* 如果没定义 update 方法,每次都调用 draw 方法\n update(cfg, item) {\n }\n */\n};\n\nvar Shape = /** @class */function () {\n function Shape() {}\n Shape.registerFactory = function (factoryType, cfg) {\n var className = ucfirst(factoryType);\n var factoryBase = ShapeFactoryBase;\n var shapeFactory = __assign(__assign({}, factoryBase), cfg);\n Shape[className] = shapeFactory;\n shapeFactory.className = className;\n return shapeFactory;\n };\n Shape.getFactory = function (factoryType) {\n var className = ucfirst(factoryType);\n return Shape[className];\n };\n Shape.registerNode = function (shapeType, nodeDefinition, extendShapeType) {\n var shapeFactory = Shape.Node;\n var shapeObj;\n if (typeof nodeDefinition === 'string' || typeof nodeDefinition === 'function') {\n var autoNodeDefinition = createNodeFromXML(nodeDefinition);\n shapeObj = __assign(__assign({}, shapeFactory.getShape('single-node')), autoNodeDefinition);\n } else if (nodeDefinition.jsx) {\n var jsx = nodeDefinition.jsx;\n var autoNodeDefinition = createNodeFromXML(jsx);\n shapeObj = __assign(__assign(__assign({}, shapeFactory.getShape('single-node')), autoNodeDefinition), nodeDefinition);\n } else {\n shapeFactory.getShape(extendShapeType);\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n shapeObj = __assign(__assign({}, extendShape), nodeDefinition);\n }\n shapeObj.type = shapeType;\n shapeObj.itemType = 'node';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n Shape.registerEdge = function (shapeType, edgeDefinition, extendShapeType) {\n var shapeFactory = Shape.Edge;\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n var shapeObj = __assign(__assign({}, extendShape), edgeDefinition);\n shapeObj.type = shapeType;\n shapeObj.itemType = 'edge';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n Shape.registerCombo = function (shapeType, comboDefinition, extendShapeType) {\n var shapeFactory = Shape.Combo;\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n var shapeObj = __assign(__assign({}, extendShape), comboDefinition);\n shapeObj.type = shapeType;\n shapeObj.itemType = 'combo';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n return Shape;\n}();\nexport default Shape;\n// 注册 Node 的工厂方法\nShape.registerFactory('node', {\n defaultShapeType: 'circle'\n});\n// 注册 Edge 的工厂方法\nShape.registerFactory('edge', {\n defaultShapeType: 'line'\n});\n// 注册 Combo 的工厂方法\nShape.registerFactory('combo', {\n defaultShapeType: 'circle'\n});","import { __assign } from \"tslib\";\nimport { each, isPlainObject, isString, isBoolean, mix, deepMix, clone } from '@antv/util';\nimport Shape from '../element/shape';\nimport { getBBox } from '../util/graphic';\nimport { translate } from '../util/math';\nimport { uniqueId } from '../util/base';\nvar CACHE_BBOX = 'bboxCache';\nvar CACHE_CANVAS_BBOX = 'bboxCanvasCache';\nvar ARROWS = ['startArrow', 'endArrow'];\nvar ItemBase = /** @class */function () {\n function ItemBase(cfg) {\n this._cfg = {};\n this.destroyed = false;\n // 是否开启优化,由 graph 根据当前图上节点数量来控制\n this.optimize = false;\n var defaultCfg = {\n /**\n * id\n * @type {string}\n */\n id: undefined,\n /**\n * 类型\n * @type {string}\n */\n type: 'item',\n /**\n * data model\n * @type {object}\n */\n model: {},\n /**\n * g group\n * @type {G.Group}\n */\n group: undefined,\n /**\n * is open animate\n * @type {boolean}\n */\n animate: false,\n /**\n * visible - not group visible\n * @type {boolean}\n */\n visible: true,\n /**\n * locked - lock node\n * @type {boolean}\n */\n locked: false,\n /**\n * capture event\n * @type {boolean}\n */\n event: true,\n /**\n * key shape to calculate item's bbox\n * @type object\n */\n keyShape: undefined,\n /**\n * item's states, such as selected or active\n * @type Array\n */\n states: []\n };\n this._cfg = Object.assign(defaultCfg, this.getDefaultCfg(), cfg);\n var model = this.get('model');\n var id = model.id;\n var itemType = this.get('type');\n if (typeof id === 'undefined') {\n id = uniqueId(itemType);\n } else if (typeof id !== 'string') {\n id = String(id);\n }\n this.get('model').id = id;\n this.set('id', id);\n var group = cfg.group;\n if (group) {\n group.set('item', this);\n group.set('id', id);\n }\n this.init();\n this.draw();\n var shapeType = model.shape || model.type || (itemType === 'edge' ? 'line' : 'circle');\n var shapeFactory = this.get('shapeFactory');\n if (shapeFactory && shapeFactory[shapeType]) {\n var options = shapeFactory[shapeType].options;\n // merge the stateStyles from item and shape\n if (options && options.stateStyles) {\n var styles = this.get('styles') || model.stateStyles;\n styles = deepMix({}, options.stateStyles, styles);\n this.set('styles', styles);\n }\n }\n }\n /**\n * 根据 keyshape 计算包围盒\n */\n ItemBase.prototype.calculateBBox = function () {\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n return bbox;\n };\n /**\n * 根据 keyshape 计算包围盒\n */\n ItemBase.prototype.calculateCanvasBBox = function () {\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n return bbox;\n };\n /**\n * draw shape\n */\n ItemBase.prototype.drawInner = function () {\n var self = this;\n var shapeFactory = self.get('shapeFactory');\n var group = self.get('group');\n var model = self.get('model');\n group.clear();\n var visible = model.visible;\n if (visible !== undefined && !visible) self.changeVisibility(visible);\n if (!shapeFactory) {\n return;\n }\n self.updatePosition(model);\n var cfg = self.getShapeCfg(model); // 可能会附加额外信息\n var shapeType = cfg.type;\n var keyShape = shapeFactory.draw(shapeType, cfg, group);\n if (keyShape) {\n self.set('keyShape', keyShape);\n keyShape.set('isKeyShape', true);\n keyShape.set('draggable', true);\n }\n this.setOriginStyle();\n // 防止由于用户外部修改 model 中的 shape 导致 shape 不更新\n this.set('currentShape', shapeType);\n this.restoreStates(shapeFactory, shapeType);\n };\n /**\n * 设置图元素原始样式\n * @param keyShape 图元素 keyShape\n * @param group Group 容器\n */\n ItemBase.prototype.setOriginStyle = function () {\n var group = this.get('group');\n var children = group.get('children');\n var keyShape = this.getKeyShape();\n var self = this;\n var keyShapeName = keyShape.get('name');\n if (!this.get('originStyle')) {\n // 第一次 set originStyle,直接拿首次渲染所有图形的 attrs\n var originStyles = {};\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var shapeType = child.get('type');\n var name_1 = child.get('name');\n if (name_1 && name_1 !== keyShapeName) {\n originStyles[name_1] = shapeType !== 'image' ? clone(child.attr()) : self.getShapeStyleByName(name_1);\n // The text's position and matrix is not allowed to be affected by states\n if (shapeType === 'text' && originStyles[name_1]) {\n delete originStyles[name_1].x;\n delete originStyles[name_1].y;\n delete originStyles[name_1].matrix;\n }\n } else {\n var keyShapeStyle = self.getShapeStyleByName(); // 可优化,需要去除 child.attr 中其他 shape 名的对象\n delete keyShapeStyle.path;\n delete keyShapeStyle.matrix;\n if (!keyShapeName) {\n Object.assign(originStyles, keyShapeStyle);\n } else {\n // 若 keyShape 有 name 且 !name,这个图形不是 keyShape,给这个图形一个 name\n if (!name_1) {\n var shapeName = uniqueId('shape');\n child.set('name', shapeName);\n group['shapeMap'][shapeName] = child;\n originStyles[shapeName] = shapeType !== 'image' ? clone(child.attr()) : self.getShapeStyleByName(name_1);\n } else {\n originStyles[keyShapeName] = keyShapeStyle;\n }\n }\n }\n }\n self.set('originStyle', originStyles);\n } else {\n // 第二次 set originStyles,需要找到不是 stateStyles 的样式,更新到 originStyles 中\n // 上一次设置的 originStyle,是初始的 shape attrs\n var styles_1 = this.get('originStyle');\n // let styles: ShapeStyle = {};\n if (keyShapeName && !styles_1[keyShapeName]) styles_1[keyShapeName] = {};\n // 获取当前状态样式\n var currentStatesStyle_1 = this.getCurrentStatesStyle();\n var _loop_1 = function _loop_1(i) {\n var child = children[i];\n var name_2 = child.get('name');\n var shapeAttrs = child.attr();\n if (name_2 && name_2 !== keyShapeName) {\n // 有 name 的非 keyShape 图形\n var shapeStateStyle_1 = currentStatesStyle_1[name_2];\n if (!styles_1[name_2]) styles_1[name_2] = {};\n if (shapeStateStyle_1) {\n Object.keys(shapeAttrs).forEach(function (key) {\n var value = shapeAttrs[key];\n if (value !== shapeStateStyle_1[key]) styles_1[name_2][key] = value;\n });\n } else {\n styles_1[name_2] = child.get('type') !== 'image' ? clone(shapeAttrs) : self.getShapeStyleByName(name_2);\n }\n } else {\n var shapeAttrs_1 = child.attr();\n var keyShapeStateStyles_1 = {};\n Object.keys(currentStatesStyle_1).forEach(function (styleKey) {\n var subStyle = currentStatesStyle_1[styleKey];\n if (styleKey === keyShapeName || !isPlainObject(subStyle)) {\n keyShapeStateStyles_1[styleKey] = subStyle;\n }\n });\n Object.keys(shapeAttrs_1).forEach(function (key) {\n var value = shapeAttrs_1[key];\n // 如果是对象且不是 arrow,则是其他 shape 的样式\n // if (isPlainObject(value) && ARROWS.indexOf(name) === -1) return;\n if (keyShapeStateStyles_1[key] !== value) {\n if (keyShapeName) styles_1[keyShapeName][key] = value;else styles_1[key] = value;\n }\n });\n }\n };\n // 遍历当前所有图形的 attrs,找到不是 stateStyles 的样式更新到 originStyles 中\n for (var i = 0; i < children.length; i++) {\n _loop_1(i);\n }\n delete styles_1.path;\n delete styles_1.matrix;\n delete styles_1.x;\n delete styles_1.y;\n if (styles_1[keyShapeName]) {\n delete styles_1[keyShapeName].x;\n delete styles_1[keyShapeName].y;\n delete styles_1[keyShapeName].matrix;\n delete styles_1[keyShapeName].path;\n }\n self.set('originStyle', styles_1);\n }\n };\n /**\n * restore shape states\n * @param shapeFactory\n * @param shapeType\n */\n ItemBase.prototype.restoreStates = function (shapeFactory, shapeType) {\n var self = this;\n var states = self.get('states');\n each(states, function (state) {\n shapeFactory.setState(shapeType, state, true, self);\n });\n };\n ItemBase.prototype.init = function () {\n var shapeFactory = Shape.getFactory(this.get('type'));\n this.set('shapeFactory', shapeFactory);\n };\n /**\n * 获取属性\n * @internal 仅内部类使用\n * @param {String} key 属性名\n * @return {object | string | number} 属性值\n */\n ItemBase.prototype.get = function (key) {\n return this._cfg[key];\n };\n /**\n * 设置属性\n * @internal 仅内部类使用\n * @param {String|Object} key 属性名,也可以是对象\n * @param {object | string | number} val 属性值\n */\n ItemBase.prototype.set = function (key, val) {\n if (isPlainObject(key)) {\n this._cfg = __assign(__assign({}, this._cfg), key);\n } else {\n this._cfg[key] = val;\n }\n };\n ItemBase.prototype.getDefaultCfg = function () {\n return {};\n };\n /**\n * 更新/刷新等操作后,清除 cache\n */\n ItemBase.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null);\n this.set(CACHE_CANVAS_BBOX, null);\n };\n /**\n * 渲染前的逻辑,提供给子类复写\n */\n ItemBase.prototype.beforeDraw = function () {};\n /**\n * 渲染后的逻辑,提供给子类复写\n */\n ItemBase.prototype.afterDraw = function () {};\n /**\n * 更新后做一些工作\n */\n ItemBase.prototype.afterUpdate = function () {};\n /**\n * draw shape\n */\n ItemBase.prototype.draw = function () {\n this.beforeDraw();\n this.drawInner();\n this.afterDraw();\n };\n ItemBase.prototype.getShapeStyleByName = function (name) {\n var group = this.get('group');\n var currentShape;\n if (name) {\n currentShape = group['shapeMap'][name] || group.find(function (element) {\n return element.get('name') === name;\n });\n } else {\n currentShape = this.getKeyShape();\n }\n if (currentShape) {\n var styles_2 = {};\n each(currentShape.attr(), function (val, key) {\n // 修改 img 通过 updateItem 实现\n if (key !== 'img' || isString(val)) {\n styles_2[key] = val;\n }\n });\n return styles_2;\n }\n return {};\n };\n ItemBase.prototype.getShapeCfg = function (model, updateType) {\n var styles = this.get('styles');\n if (styles) {\n // merge graph的item样式与数据模型中的样式\n var newModel = model;\n newModel.style = __assign(__assign({}, styles), model.style);\n return newModel;\n }\n return model;\n };\n /**\n * 获取指定状态的样式,去除了全局样式\n * @param state 状态名称\n */\n ItemBase.prototype.getStateStyle = function (state) {\n var styles = this.get('styles');\n var stateStyle = styles && styles[state];\n return stateStyle;\n };\n /**\n * get keyshape style\n */\n ItemBase.prototype.getOriginStyle = function () {\n return this.get('originStyle');\n };\n ItemBase.prototype.getCurrentStatesStyle = function () {\n var self = this;\n var styles = {};\n var states = self.getStates();\n if (!states || !states.length) {\n return this.get('originStyle');\n }\n each(self.getStates(), function (state) {\n styles = Object.assign(styles, self.getStateStyle(state));\n });\n return styles;\n };\n /**\n * 更改元素状态, visible 不属于这个范畴\n * @internal 仅提供内部类 graph 使用\n * @param {String} state 状态名\n * @param {Boolean} value 节点状态值\n */\n ItemBase.prototype.setState = function (state, value) {\n var states = this.get('states');\n var shapeFactory = this.get('shapeFactory');\n var stateName = state;\n var filterStateName = state;\n if (isString(value)) {\n stateName = \"\".concat(state, \":\").concat(value);\n filterStateName = \"\".concat(state, \":\");\n }\n var newStates = states;\n if (isBoolean(value)) {\n var index = states.indexOf(filterStateName);\n if (value) {\n if (index > -1) {\n return;\n }\n states.push(stateName);\n } else if (index > -1) {\n states.splice(index, 1);\n }\n } else if (isString(value)) {\n // 过滤掉 states 中 filterStateName 相关的状态\n var filterStates = states.filter(function (name) {\n return name.includes(filterStateName);\n });\n if (filterStates.length > 0) {\n this.clearStates(filterStates);\n }\n newStates = newStates.filter(function (name) {\n return !name.includes(filterStateName);\n });\n newStates.push(stateName);\n this.set('states', newStates);\n }\n if (shapeFactory) {\n var model = this.get('model');\n var type = model.type;\n // 调用 shape/shape.ts 中的 setState\n shapeFactory.setState(type, state, value, this);\n }\n };\n /**\n * 清除指定的状态,如果参数为空,则不做任务处理\n * @param states 状态名称\n */\n ItemBase.prototype.clearStates = function (states) {\n var self = this;\n var originStates = self.getStates();\n var shapeFactory = self.get('shapeFactory');\n var model = self.get('model');\n var shape = model.type;\n if (!states) {\n states = originStates;\n }\n if (isString(states)) {\n states = [states];\n }\n var newStates = originStates.filter(function (state) {\n return states.indexOf(state) === -1;\n });\n self.set('states', newStates);\n states.forEach(function (state) {\n shapeFactory.setState(shape, state, false, self);\n });\n };\n /**\n * 设置是否开启性能优化模式\n * 目前影响:节点的状态样式更新是否影响相关边的更新\n * @param {Boolean} enableOptimize 是否开启\n */\n ItemBase.prototype.setOptimize = function (enableOptimize) {\n this.optimize = enableOptimize;\n };\n /**\n * 节点的图形容器\n * @return {G.Group} 图形容器\n */\n ItemBase.prototype.getContainer = function () {\n return this.get('group');\n };\n /**\n * 节点的关键形状,用于计算节点大小,连线截距等\n * @return {IShapeBase} 关键形状\n */\n ItemBase.prototype.getKeyShape = function () {\n return this.get('keyShape');\n };\n /**\n * 节点数据模型\n * @return {Object} 数据模型\n */\n ItemBase.prototype.getModel = function () {\n return this.get('model');\n };\n /**\n * 节点类型\n * @return {string} 节点的类型\n */\n ItemBase.prototype.getType = function () {\n return this.get('type');\n };\n /**\n * 获取 Item 的ID\n */\n ItemBase.prototype.getID = function () {\n return this.get('id');\n };\n /**\n * 是否是 Item 对象,悬空边情况下进行判定\n */\n ItemBase.prototype.isItem = function () {\n return true;\n };\n /**\n * 获取当前元素的所有状态\n * @return {Array} 元素的所有状态\n */\n ItemBase.prototype.getStates = function () {\n return this.get('states');\n };\n /**\n * 当前元素是否处于某状态\n * @param {String} state 状态名\n * @return {Boolean} 是否处于某状态\n */\n ItemBase.prototype.hasState = function (state) {\n var states = this.getStates();\n return states.indexOf(state) >= 0;\n };\n /**\n * 刷新一般用于处理几种情况\n * 1. item model 在外部被改变\n * 2. 边的节点位置发生改变,需要重新计算边\n *\n * 因为数据从外部被修改无法判断一些属性是否被修改,直接走位置和 shape 的更新\n */\n ItemBase.prototype.refresh = function (updateType) {\n var model = this.get('model');\n // 更新元素位置\n this.updatePosition(model);\n // 更新元素内容,样式\n this.updateShape(updateType);\n // 做一些更新之后的操作\n this.afterUpdate();\n // 清除缓存\n this.clearCache();\n };\n ItemBase.prototype.getUpdateType = function (cfg) {\n return undefined;\n };\n /**\n * 将更新应用到 model 上,刷新属性\n * @internal 仅提供给 Graph 使用,外部直接调用 graph.update 接口\n * @param {Object} cfg 配置项,可以是增量信息\n */\n ItemBase.prototype.update = function (cfg, updateType) {\n if (updateType === void 0) {\n updateType = undefined;\n }\n var model = this.get('model');\n // 仅仅移动位置时,既不更新,也不重绘\n if (updateType === 'move') {\n this.updatePosition(cfg);\n } else {\n var oriVisible = model.visible;\n var cfgVisible = cfg.visible;\n if (oriVisible !== cfgVisible && cfgVisible !== undefined) this.changeVisibility(cfgVisible);\n var originPosition = {\n x: model.x,\n y: model.y\n };\n cfg.x = isNaN(+cfg.x) ? model.x : +cfg.x;\n cfg.y = isNaN(+cfg.y) ? model.y : +cfg.y;\n var styles = this.get('styles');\n if (cfg.stateStyles) {\n // 更新 item 时更新 this.get('styles') 中的值\n var stateStyles = cfg.stateStyles;\n mix(styles, stateStyles);\n delete cfg.stateStyles;\n }\n // 直接将更新合到原数据模型上,可以保证用户在外部修改源数据然后刷新时的样式符合期待。\n Object.assign(model, cfg);\n // 如果 x,y 有变化,先重置位置\n if (originPosition.x !== cfg.x || originPosition.y !== cfg.y) {\n this.updatePosition(cfg);\n }\n this.updateShape(updateType);\n }\n this.afterUpdate();\n this.clearCache();\n };\n /**\n * 更新元素内容,样式\n */\n ItemBase.prototype.updateShape = function (updateType) {\n var shapeFactory = this.get('shapeFactory');\n var model = this.get('model');\n var shape = model.type;\n // 判定是否允许更新\n // 1. 注册的节点允许更新(即有继承的/复写的 update 方法,即 update 方法没有被复写为 undefined)\n // 2. 更新后的 shape 等于原先的 shape\n if (shapeFactory.shouldUpdate(shape) && shape === this.get('currentShape')) {\n var updateCfg = this.getShapeCfg(model, updateType);\n shapeFactory.baseUpdate(shape, updateCfg, this, updateType);\n // 更新完以后重新设置原始样式\n if (updateType !== 'move') this.setOriginStyle();\n } else {\n // 如果不满足上面两种状态,重新绘制\n this.draw();\n }\n // 更新后重置节点状态\n this.restoreStates(shapeFactory, shape);\n };\n /**\n * 更新位置,避免整体重绘\n * @param {object} cfg 待更新数据\n */\n ItemBase.prototype.updatePosition = function (cfg) {\n var model = this.get('model');\n var x = isNaN(+cfg.x) ? +model.x : +cfg.x;\n var y = isNaN(+cfg.y) ? +model.y : +cfg.y;\n var group = this.get('group');\n if (isNaN(x) || isNaN(y)) {\n return false;\n }\n model.x = x;\n model.y = y;\n var matrix = group.getMatrix();\n if (matrix && matrix[6] === x && matrix[7] === y) return false;\n group.resetMatrix();\n // G 4.0 element 中移除了矩阵相关方法,详见https://www.yuque.com/antv/blog/kxzk9g#4rMMV\n translate(group, {\n x: x,\n y: y\n });\n this.clearCache(); // 位置更新后需要清除缓存\n return true;\n };\n /**\n * 获取 item 的包围盒,这个包围盒是相对于 item 自己,不会将 matrix 计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n ItemBase.prototype.getBBox = function () {\n // 计算 bbox 开销有些大,缓存\n var bbox = this.get(CACHE_BBOX);\n if (!bbox) {\n bbox = this.calculateBBox();\n this.set(CACHE_BBOX, bbox);\n }\n return bbox;\n };\n /**\n * 获取 item 相对于画布的包围盒,会将从顶层到当前元素的 matrix 都计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n ItemBase.prototype.getCanvasBBox = function () {\n // 计算 bbox 开销大,缓存\n var bbox = this.get(CACHE_CANVAS_BBOX);\n if (!bbox) {\n bbox = this.calculateCanvasBBox();\n this.set(CACHE_CANVAS_BBOX, bbox);\n }\n return bbox;\n };\n /**\n * 将元素放到最前面\n */\n ItemBase.prototype.toFront = function () {\n var group = this.get('group');\n group.toFront();\n };\n /**\n * 将元素放到最后面\n */\n ItemBase.prototype.toBack = function () {\n var group = this.get('group');\n group.toBack();\n };\n /**\n * 显示元素\n */\n ItemBase.prototype.show = function () {\n this.changeVisibility(true);\n };\n /**\n * 隐藏元素\n */\n ItemBase.prototype.hide = function () {\n this.changeVisibility(false);\n };\n /**\n * 更改是否显示\n * @param {Boolean} visible 是否显示\n */\n ItemBase.prototype.changeVisibility = function (visible) {\n var group = this.get('group');\n if (visible) {\n group.show();\n } else {\n group.hide();\n }\n this.set('visible', visible);\n };\n /**\n * 元素是否可见\n * @return {Boolean} 返回该元素是否可见\n */\n ItemBase.prototype.isVisible = function () {\n return this.get('visible');\n };\n /**\n * 是否拾取及出发该元素的交互事件\n * @param {Boolean} enable 标识位\n */\n ItemBase.prototype.enableCapture = function (enable) {\n var group = this.get('group');\n if (group) {\n group.set('capture', enable);\n }\n };\n ItemBase.prototype.destroy = function () {\n if (!this.destroyed) {\n var animate = this.get('animate');\n var group = this.get('group');\n if (animate) {\n group.stopAnimate();\n }\n group['shapeMap'] = {};\n this.clearCache();\n group.remove();\n this._cfg = null;\n this.destroyed = true;\n }\n };\n return ItemBase;\n}();\nexport default ItemBase;","import { __extends } from \"tslib\";\nimport { isString, isPlainObject, isNil, mix } from '@antv/util';\nimport Item from './item';\nvar END_MAP = {\n source: 'start',\n target: 'end'\n};\nvar ITEM_NAME_SUFFIX = 'Node'; // 端点的后缀,如 sourceNode, targetNode\nvar POINT_NAME_SUFFIX = 'Point'; // 起点或者结束点的后缀,如 startPoint, endPoint\nvar ANCHOR_NAME_SUFFIX = 'Anchor';\nvar Edge = /** @class */function (_super) {\n __extends(Edge, _super);\n function Edge() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Edge.prototype.getDefaultCfg = function () {\n return {\n type: 'edge',\n sourceNode: null,\n targetNode: null,\n startPoint: null,\n endPoint: null,\n linkCenter: false\n };\n };\n Edge.prototype.setEnd = function (name, value) {\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var itemName = name + ITEM_NAME_SUFFIX;\n var preItem = this.get(itemName);\n if (preItem && !preItem.destroyed) {\n // 如果之前存在节点,则移除掉边\n preItem.removeEdge(this);\n }\n if (isPlainObject(value)) {\n // 如果设置成具体的点,则清理节点\n this.set(pointName, value);\n this.set(itemName, null);\n } else if (value) {\n value.addEdge(this);\n this.set(itemName, value);\n this.set(pointName, null);\n }\n };\n /**\n * 获取连接点的坐标\n * @param name source | target\n * @param model 边的数据模型\n * @param controlPoints 控制点\n */\n Edge.prototype.getLinkPoint = function (name, model, controlPoints) {\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var itemName = name + ITEM_NAME_SUFFIX;\n var point = this.get(pointName);\n if (!point) {\n var item = this.get(itemName);\n var anchorName = name + ANCHOR_NAME_SUFFIX;\n var prePoint = this.getPrePoint(name, controlPoints);\n var anchorIndex = model[anchorName];\n if (!isNil(anchorIndex)) {\n // 如果有锚点,则使用锚点索引获取连接点\n point = item.getLinkPointByAnchor(anchorIndex);\n }\n // 如果锚点没有对应的点或者没有锚点,则直接计算连接点\n point = point || item.getLinkPoint(prePoint);\n if (!isNil(point.index)) {\n this.set(\"\".concat(name, \"AnchorIndex\"), point.index);\n }\n }\n return point;\n };\n /**\n * 获取同端点进行连接的点,计算交汇点\n * @param name\n * @param controlPoints\n */\n Edge.prototype.getPrePoint = function (name, controlPoints) {\n if (controlPoints && controlPoints.length) {\n var index = name === 'source' ? 0 : controlPoints.length - 1;\n return controlPoints[index];\n }\n var oppositeName = name === 'source' ? 'target' : 'source'; // 取另一个节点的位置\n return this.getEndPoint(oppositeName);\n };\n /**\n * 获取端点的位置\n * @param name\n */\n Edge.prototype.getEndPoint = function (name) {\n var itemName = name + ITEM_NAME_SUFFIX;\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var item = this.get(itemName);\n // 如果有端点,直接使用 model\n if (item && !item.destroyed) {\n return item.get('model');\n } // 否则直接使用点\n return this.get(pointName);\n };\n /**\n * 通过端点的中心获取控制点\n * @param model\n */\n Edge.prototype.getControlPointsByCenter = function (model) {\n var sourcePoint = this.getEndPoint('source');\n var targetPoint = this.getEndPoint('target');\n var shapeFactory = this.get('shapeFactory');\n var type = model.type;\n return shapeFactory.getControlPoints(type, {\n startPoint: sourcePoint,\n endPoint: targetPoint\n });\n };\n Edge.prototype.getEndCenter = function (name) {\n var itemName = name + ITEM_NAME_SUFFIX;\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var item = this.get(itemName);\n // 如果有端点,直接使用 model\n if (item) {\n var bbox = item.getBBox();\n return {\n x: bbox.centerX,\n y: bbox.centerY\n };\n } // 否则直接使用点\n return this.get(pointName);\n };\n Edge.prototype.init = function () {\n _super.prototype.init.call(this);\n // 初始化两个端点\n this.setSource(this.get('source'));\n this.setTarget(this.get('target'));\n };\n Edge.prototype.getShapeCfg = function (model, updateType) {\n var self = this;\n var linkCenter = self.get('linkCenter'); // 如果连接到中心,忽视锚点、忽视控制点\n var cfg = (updateType === null || updateType === void 0 ? void 0 : updateType.includes('move')) ? model : _super.prototype.getShapeCfg.call(this, model);\n if (linkCenter) {\n cfg.startPoint = self.getEndCenter('source');\n cfg.endPoint = self.getEndCenter('target');\n } else {\n var controlPoints = cfg.controlPoints || self.getControlPointsByCenter(cfg);\n cfg.startPoint = self.getLinkPoint('source', model, controlPoints);\n cfg.endPoint = self.getLinkPoint('target', model, controlPoints);\n }\n cfg.sourceNode = self.get('sourceNode');\n cfg.targetNode = self.get('targetNode');\n return cfg;\n };\n /**\n * 获取边的数据模型\n */\n Edge.prototype.getModel = function () {\n var out = this.get('model');\n var sourceItem = this.get(\"source\".concat(ITEM_NAME_SUFFIX));\n var targetItem = this.get(\"target\".concat(ITEM_NAME_SUFFIX));\n if (sourceItem) {\n delete out[\"source\".concat(ITEM_NAME_SUFFIX)];\n } else {\n out.source = this.get(\"start\".concat(POINT_NAME_SUFFIX));\n }\n if (targetItem) {\n delete out[\"target\".concat(ITEM_NAME_SUFFIX)];\n } else {\n out.target = this.get(\"end\".concat(POINT_NAME_SUFFIX));\n }\n if (!isString(out.source) && !isPlainObject(out.source)) {\n out.source = out.source.getID();\n }\n if (!isString(out.target) && !isPlainObject(out.target)) {\n out.target = out.target.getID();\n }\n return out;\n };\n Edge.prototype.setSource = function (source) {\n this.setEnd('source', source);\n this.set('source', source);\n };\n Edge.prototype.setTarget = function (target) {\n this.setEnd('target', target);\n this.set('target', target);\n };\n Edge.prototype.getSource = function () {\n return this.get('source');\n };\n Edge.prototype.getTarget = function () {\n return this.get('target');\n };\n Edge.prototype.updatePosition = function () {\n return false;\n };\n /**\n * 边不需要重计算容器位置,直接重新计算 path 位置\n * @param {object} cfg 待更新数据\n */\n Edge.prototype.update = function (cfg, updateType) {\n if (updateType === void 0) {\n updateType = undefined;\n }\n var model = this.get('model');\n var oriVisible = model.visible;\n var cfgVisible = cfg.visible;\n if (oriVisible !== cfgVisible && cfgVisible !== undefined) this.changeVisibility(cfgVisible);\n var sourceItem = this.get('source');\n var targetItem = this.get('target');\n if (!sourceItem || sourceItem.destroyed || !targetItem || targetItem.destroyed) return;\n var styles = this.get('styles');\n if (cfg.stateStyles) {\n // 更新 item 时更新 this.get('styles') 中的值\n var stateStyles = cfg.stateStyles;\n mix(styles, stateStyles);\n delete cfg.stateStyles;\n }\n Object.assign(model, cfg);\n this.updateShape(updateType);\n this.afterUpdate();\n this.clearCache();\n };\n Edge.prototype.destroy = function () {\n var sourceItem = this.get(\"source\".concat(ITEM_NAME_SUFFIX));\n var targetItem = this.get(\"target\".concat(ITEM_NAME_SUFFIX));\n if (sourceItem && !sourceItem.destroyed) {\n sourceItem.removeEdge(this);\n }\n if (targetItem && !targetItem.destroyed) {\n targetItem.removeEdge(this);\n }\n _super.prototype.destroy.call(this);\n };\n return Edge;\n}(Item);\nexport default Edge;","import { __extends } from \"tslib\";\nimport { each, isNil, isNumber } from '@antv/util';\nimport { distance, getCircleIntersectByPoint, getEllipseIntersectByPoint, getRectIntersectByPoint } from '../util/math';\nimport Item from './item';\nvar CACHE_ANCHOR_POINTS = 'anchorPointsCache';\nvar CACHE_BBOX = 'bboxCache';\nvar Node = /** @class */function (_super) {\n __extends(Node, _super);\n function Node() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Node.prototype.getNearestPoint = function (points, curPoint) {\n var index = 0;\n var nearestPoint = points[0];\n var minDistance = distance(points[0], curPoint);\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n var dis = distance(point, curPoint);\n if (dis < minDistance) {\n nearestPoint = point;\n minDistance = dis;\n index = i;\n }\n }\n nearestPoint.anchorIndex = index;\n return nearestPoint;\n };\n Node.prototype.getDefaultCfg = function () {\n return {\n type: 'node',\n edges: []\n };\n };\n /**\n * 获取从节点关联的所有边\n */\n Node.prototype.getEdges = function () {\n return this.get('edges');\n };\n /**\n * 获取所有的入边\n */\n Node.prototype.getInEdges = function () {\n var self = this;\n return this.get('edges').filter(function (edge) {\n return edge.get('target') === self;\n });\n };\n /**\n * 获取所有的出边\n */\n Node.prototype.getOutEdges = function () {\n var self = this;\n return this.get('edges').filter(function (edge) {\n return edge.get('source') === self;\n });\n };\n /**\n * 获取节点的邻居节点\n *\n * @returns {INode[]}\n * @memberof Node\n */\n Node.prototype.getNeighbors = function (type) {\n var _this = this;\n var edges = this.get('edges');\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighborsConverter_1 = function neighborsConverter_1(edge) {\n return edge.getSource() === _this;\n };\n return edges.filter(neighborsConverter_1).map(function (edge) {\n return edge.getTarget();\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighborsConverter_2 = function neighborsConverter_2(edge) {\n return edge.getTarget() === _this;\n };\n return edges.filter(neighborsConverter_2).map(function (edge) {\n return edge.getSource();\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighborsConverter = function neighborsConverter(edge) {\n return edge.getSource() === _this ? edge.getTarget() : edge.getSource();\n };\n return edges.map(neighborsConverter);\n };\n /**\n * 根据锚点的索引获取连接点\n * @param {Number} index 索引\n */\n Node.prototype.getLinkPointByAnchor = function (index) {\n var anchorPoints = this.getAnchorPoints();\n return anchorPoints[index];\n };\n /**\n * 获取连接点\n * @param point\n */\n Node.prototype.getLinkPoint = function (point) {\n var keyShape = this.get('keyShape');\n var type = keyShape.get('type');\n var itemType = this.get('type');\n var centerX;\n var centerY;\n var bbox = this.getBBox();\n if (itemType === 'combo') {\n centerX = bbox.centerX || (bbox.maxX + bbox.minX) / 2;\n centerY = bbox.centerY || (bbox.maxY + bbox.minY) / 2;\n } else {\n centerX = bbox.centerX;\n centerY = bbox.centerY;\n }\n var anchorPoints = this.getAnchorPoints();\n var intersectPoint;\n switch (type) {\n case 'circle':\n intersectPoint = getCircleIntersectByPoint({\n x: centerX,\n y: centerY,\n r: bbox.width / 2\n }, point);\n break;\n case 'ellipse':\n intersectPoint = getEllipseIntersectByPoint({\n x: centerX,\n y: centerY,\n rx: bbox.width / 2,\n ry: bbox.height / 2\n }, point);\n break;\n default:\n intersectPoint = getRectIntersectByPoint(bbox, point);\n }\n var linkPoint = intersectPoint;\n // 如果存在锚点,则使用交点计算最近的锚点\n if (anchorPoints.length) {\n if (!linkPoint) {\n // 如果计算不出交点\n linkPoint = point;\n }\n linkPoint = this.getNearestPoint(anchorPoints, linkPoint);\n }\n if (!linkPoint) {\n // 如果最终依然没法找到锚点和连接点,直接返回中心点\n linkPoint = {\n x: centerX,\n y: centerY\n };\n }\n return linkPoint;\n };\n /**\n * 获取锚点的定义\n * @return {array} anchorPoints\n */\n Node.prototype.getAnchorPoints = function () {\n var anchorPoints = this.get(CACHE_ANCHOR_POINTS);\n if (!anchorPoints) {\n anchorPoints = [];\n var shapeFactory = this.get('shapeFactory');\n var bbox_1 = this.getBBox();\n var model = this.get('model');\n var shapeCfg = this.getShapeCfg(model);\n var type = model.type;\n var points = shapeFactory.getAnchorPoints(type, shapeCfg) || [];\n each(points, function (pointArr, index) {\n var point = {\n x: bbox_1.minX + pointArr[0] * bbox_1.width,\n y: bbox_1.minY + pointArr[1] * bbox_1.height,\n anchorIndex: index\n };\n anchorPoints.push(point);\n });\n this.set(CACHE_ANCHOR_POINTS, anchorPoints);\n }\n return anchorPoints;\n };\n /**\n * add edge\n * @param edge Edge instance\n */\n Node.prototype.addEdge = function (edge) {\n this.get('edges').push(edge);\n };\n /**\n * 锁定节点\n */\n Node.prototype.lock = function () {\n this.set('locked', true);\n };\n /**\n * 解锁锁定的节点\n */\n Node.prototype.unlock = function () {\n this.set('locked', false);\n };\n Node.prototype.hasLocked = function () {\n return this.get('locked');\n };\n /**\n * 移除边\n * @param {Edge} edge 边\n */\n Node.prototype.removeEdge = function (edge) {\n var edges = this.getEdges();\n var index = edges.indexOf(edge);\n if (index > -1) edges.splice(index, 1);\n };\n Node.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null); // 清理缓存的 bbox\n this.set(CACHE_ANCHOR_POINTS, null);\n };\n /**\n * 判断更新的种类,move 表示仅移动,bbox 表示大小有变化,style 表示仅与大小无关的参数变化\n * @param cfg 节点数据模型\n */\n Node.prototype.getUpdateType = function (cfg) {\n var _a, _b, _c, _d, _e;\n if (!cfg) return undefined;\n var existX = !isNil(cfg.x);\n var existY = !isNil(cfg.y);\n var keys = Object.keys(cfg);\n // 仅有一个字段,包含 x 或者 包含 y\n // 两个字段,同时有 x,同时有 y\n if (keys.length === 1 && (existX || existY) || keys.length === 2 && existX && existY) return 'move';\n if (isNumber(cfg.x) || isNumber(cfg.y) || cfg.type || cfg.anchorPoints || cfg.size || (cfg === null || cfg === void 0 ? void 0 : cfg.style) && (((_a = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _a === void 0 ? void 0 : _a.r) || ((_b = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _b === void 0 ? void 0 : _b.width) || ((_c = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _c === void 0 ? void 0 : _c.height) || ((_d = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _d === void 0 ? void 0 : _d.rx) || ((_e = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _e === void 0 ? void 0 : _e.ry))) return 'bbox|label';\n var updateLabel = keys.includes('label') || keys.includes('labelCfg');\n return updateLabel ? 'style|label' : 'style';\n };\n Node.prototype.setState = function (state, value) {\n var _this = this;\n if (this.optimize) {\n _super.prototype.setState.call(this, state, value);\n return;\n }\n this.runWithBBoxAffected(function () {\n return _super.prototype.setState.call(_this, state, value);\n });\n };\n Node.prototype.clearStates = function (states) {\n var _this = this;\n if (this.optimize) {\n _super.prototype.clearStates.call(this, states);\n return;\n }\n this.runWithBBoxAffected(function () {\n return _super.prototype.clearStates.call(_this, states);\n });\n };\n Node.prototype.runWithBBoxAffected = function (fn) {\n var bboxAffectedStyleKeys = ['r', 'width', 'height', 'rx', 'ry', 'lineWidth'];\n var beforeAttrs = this.getKeyShape().attr();\n var bboxAffectedStyleBefore = {};\n Object.keys(this.getKeyShape().attr()).forEach(function (key) {\n if (bboxAffectedStyleKeys.includes(key)) bboxAffectedStyleBefore[key] = beforeAttrs[key];\n });\n fn();\n // if the state styles affect the bbox, the bbox cache should be cleared to get correct edge connecting points\n var afterAttrs = this.getKeyShape().attr();\n for (var i = 0; i < bboxAffectedStyleKeys.length; i++) {\n var key = bboxAffectedStyleKeys[i];\n if (afterAttrs[key] !== bboxAffectedStyleBefore[key]) {\n this.clearCache();\n this.getEdges().forEach(function (edge) {\n return edge.refresh();\n });\n break;\n }\n }\n };\n return Node;\n}(Item);\nexport default Node;","import { __assign, __extends } from \"tslib\";\nimport Node from './node';\nimport Global from '../global';\nimport { getBBox } from '../util/graphic';\nimport { isNumber } from '@antv/util';\nvar CACHE_BBOX = 'bboxCache';\nvar CACHE_CANVAS_BBOX = 'bboxCanvasCache';\nvar CACHE_SIZE = 'sizeCache';\nvar CACHE_ANCHOR_POINTS = 'anchorPointsCache';\nvar Combo = /** @class */function (_super) {\n __extends(Combo, _super);\n function Combo() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Combo.prototype.getDefaultCfg = function () {\n return {\n type: 'combo',\n nodes: [],\n edges: [],\n combos: []\n };\n };\n Combo.prototype.getShapeCfg = function (model) {\n var styles = this.get('styles');\n var bbox = this.get('bbox');\n if (styles && bbox) {\n // merge graph的item样式与数据模型中的样式\n var newModel = model;\n var modelSize = isNumber(model.size) ? [model.size, model.size] : model.size;\n var modelFixSize = isNumber(model.fixSize) ? [model.fixSize, model.fixSize] : model.fixSize;\n var useModelSize = modelSize || modelFixSize || Global.defaultCombo.size;\n var size = {\n r: (Math.max(bbox.width, bbox.height) || Math.max(useModelSize[0], useModelSize[1])) / 2,\n width: bbox.width || useModelSize[0],\n height: bbox.height || useModelSize[1]\n };\n newModel.style = __assign(__assign(__assign({}, styles), model.style), size);\n var padding = model.padding || Global.defaultCombo.padding;\n if (isNumber(padding)) {\n size.r += padding;\n size.width += padding * 2;\n size.height += padding * 2;\n } else {\n size.r = size.r + Math.max.apply(Math, padding);\n size.width += padding[1] + padding[3] || padding[1] * 2;\n size.height += padding[0] + padding[2] || padding[0] * 2;\n }\n this.set(CACHE_SIZE, size);\n return newModel;\n }\n return model;\n };\n /**\n * 根据 keyshape 计算包围盒\n */\n Combo.prototype.calculateCanvasBBox = function () {\n if (this.destroyed) return;\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n var cacheBBox = this.get(CACHE_BBOX) || {};\n var oriX = cacheBBox.x;\n var oriY = cacheBBox.x;\n var cacheSize = this.get(CACHE_SIZE);\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n if (cacheSize) {\n cacheSize.width = Math.max(cacheSize.width, bbox.width);\n cacheSize.height = Math.max(cacheSize.height, bbox.height);\n this.set(CACHE_SIZE, cacheSize);\n var type = keyShape.get('type');\n if (type === 'circle') {\n bbox.width = cacheSize.r * 2;\n bbox.height = cacheSize.r * 2;\n } else {\n bbox.width = cacheSize.width;\n bbox.height = cacheSize.height;\n }\n bbox.minX = bbox.centerX - bbox.width / 2;\n bbox.minY = bbox.centerY - bbox.height / 2;\n bbox.maxX = bbox.centerX + bbox.width / 2;\n bbox.maxY = bbox.centerY + bbox.height / 2;\n } else {\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n }\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n if (bbox.x !== oriX || bbox.y !== oriY) this.set(CACHE_ANCHOR_POINTS, null);\n return bbox;\n };\n /**\n * 获取 Combo 中所有的子元素,包括 Combo、Node 及 Edge\n */\n Combo.prototype.getChildren = function () {\n var self = this;\n return {\n nodes: self.getNodes(),\n combos: self.getCombos()\n };\n };\n /**\n * 获取 Combo 中所有子节点\n */\n Combo.prototype.getNodes = function () {\n var self = this;\n return self.get('nodes');\n };\n /**\n * 获取 Combo 中所有子 combo\n */\n Combo.prototype.getCombos = function () {\n var self = this;\n return self.get('combos');\n };\n /**\n * 向 Combo 中增加子 combo 或 node\n * @param item Combo 或节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addChild = function (item) {\n var self = this;\n var itemType = item.getType();\n switch (itemType) {\n case 'node':\n self.addNode(item);\n break;\n case 'combo':\n self.addCombo(item);\n break;\n default:\n console.warn('Only node or combo items are allowed to be added into a combo');\n return false;\n }\n return true;\n };\n /**\n * 向 Combo 中增加 combo\n * @param combo Combo 实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addCombo = function (combo) {\n var self = this;\n self.get('combos').push(combo);\n return true;\n };\n /**\n * 向 Combo 中添加节点\n * @param node 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addNode = function (node) {\n var self = this;\n self.get('nodes').push(node);\n return true;\n };\n /**\n * 向 Combo 中增加子 combo 或 node\n * @param item Combo 或节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.removeChild = function (item) {\n var self = this;\n var itemType = item.getType();\n switch (itemType) {\n case 'node':\n self.removeNode(item);\n break;\n case 'combo':\n self.removeCombo(item);\n break;\n default:\n console.warn('Only node or combo items are allowed to be added into a combo');\n return false;\n }\n return true;\n };\n /**\n * 从 Combo 中移除指定的 combo\n * @param combo Combo 实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Combo.prototype.removeCombo = function (combo) {\n if (!combo) return;\n var combos = this.getCombos();\n var index = combos.indexOf(combo);\n if (index > -1) {\n combos.splice(index, 1);\n return true;\n }\n return false;\n };\n /**\n * 向 Combo 中移除指定的节点\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Combo.prototype.removeNode = function (node) {\n if (!node) return;\n var nodes = this.getNodes();\n var index = nodes.indexOf(node);\n if (index > -1) {\n nodes.splice(index, 1);\n return true;\n }\n return false;\n };\n Combo.prototype.getUpdateType = function (cfg) {\n return undefined;\n };\n /**\n * 获取 item 的包围盒,这个包围盒是相对于 item 自己,不会将 matrix 计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n Combo.prototype.getBBox = function () {\n this.set(CACHE_CANVAS_BBOX, null);\n var bbox = this.calculateCanvasBBox();\n return bbox;\n };\n Combo.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null); // 清理缓存的 bbox\n this.set(CACHE_CANVAS_BBOX, null);\n this.set(CACHE_ANCHOR_POINTS, null);\n };\n Combo.prototype.destroy = function () {\n if (!this.destroyed) {\n var animate = this.get('animate');\n var group = this.get('group');\n if (animate) {\n group.stopAnimate();\n }\n group['shapeMap'] = {};\n this.clearCache();\n this.set(CACHE_SIZE, null);\n this.set('bbox', null);\n group.remove();\n this._cfg = null;\n this.destroyed = true;\n }\n };\n return Combo;\n}(Node);\nexport default Combo;","import { __assign } from \"tslib\";\nimport { clone, deepMix, each, isArray, isObject, isString, upperFirst, throttle } from '@antv/util';\nimport Edge from '../../item/edge';\nimport Node from '../../item/node';\nimport Combo from '../../item/combo';\nimport { traverseTreeUp, traverseTree, getComboBBox } from '../../util/graphic';\nvar NODE = 'node';\nvar EDGE = 'edge';\nvar VEDGE = 'vedge';\nvar COMBO = 'combo';\nvar CFG_PREFIX = 'default';\nvar MAPPER_SUFFIX = 'Mapper';\nvar STATE_SUFFIX = 'stateStyles';\nvar ItemController = /** @class */function () {\n function ItemController(graph) {\n var _this = this;\n this.edgeToBeUpdateMap = {};\n /**\n * 更新边限流,同时可以防止相同的边频繁重复更新\n * */\n this.throttleRefresh = throttle(function (_) {\n var graph = _this.graph;\n if (!graph || graph.get('destroyed')) return;\n var edgeToBeUpdateMap = _this.edgeToBeUpdateMap;\n if (!edgeToBeUpdateMap) return;\n var edgeValues = Object.values(edgeToBeUpdateMap);\n if (!edgeValues.length) return;\n edgeValues.forEach(function (obj) {\n var edge = obj.edge;\n if (!edge || edge.destroyed) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n if (!source || source.destroyed || !target || target.destroyed) return;\n edge.refresh(obj.updateType);\n });\n _this.edgeToBeUpdateMap = {};\n }, 16, {\n trailing: true,\n leading: true\n });\n this.graph = graph;\n this.destroyed = false;\n }\n /**\n * 增加 Item 实例\n *\n * @param {ITEM_TYPE} type 实例类型,node 或 edge\n * @param {(NodeConfig & EdgeConfig)} model 数据模型\n * @returns {(Item)}\n * @memberof ItemController\n */\n ItemController.prototype.addItem = function (type, model) {\n var graph = this.graph;\n var vType = type === VEDGE ? EDGE : type;\n var parent = graph.get(\"\".concat(vType, \"Group\")) || graph.get('group');\n var upperType = upperFirst(vType);\n var item = null;\n // 获取 this.get('styles') 中的值\n var styles = graph.get(vType + upperFirst(STATE_SUFFIX)) || {};\n var defaultModel = graph.get(CFG_PREFIX + upperType);\n if (model[STATE_SUFFIX]) {\n // 设置 this.get('styles') 中的值\n styles = model[STATE_SUFFIX];\n }\n if (defaultModel) {\n // 很多布局会直接修改原数据模型,所以不能用 merge 的形式,逐个写入原 model 中\n each(defaultModel, function (val, cfg) {\n if (isObject(val) && !isArray(val)) {\n model[cfg] = deepMix({}, val, model[cfg]);\n } else if (isArray(val)) {\n model[cfg] = model[cfg] || clone(defaultModel[cfg]);\n } else {\n model[cfg] = model[cfg] || defaultModel[cfg];\n }\n });\n }\n var mapper = graph.get(vType + MAPPER_SUFFIX);\n if (mapper) {\n var mappedModel_1 = mapper(model);\n if (mappedModel_1[STATE_SUFFIX]) {\n // 设置 this.get('styles') 中的值\n styles = mappedModel_1[STATE_SUFFIX];\n delete mappedModel_1[STATE_SUFFIX];\n }\n // 如果配置了 defaultEdge 或 defaultNode,则将默认配置的数据也合并进去\n each(mappedModel_1, function (val, cfg) {\n if (isObject(val) && !isArray(val)) {\n model[cfg] = deepMix({}, model[cfg], val);\n } else {\n model[cfg] = mappedModel_1[cfg] || model[cfg];\n }\n });\n }\n graph.emit('beforeadditem', {\n type: type,\n model: model\n });\n if (type === EDGE || type === VEDGE) {\n var source = void 0;\n var target = void 0;\n source = model.source; // eslint-disable-line prefer-destructuring\n target = model.target; // eslint-disable-line prefer-destructuring\n if (source && isString(source)) {\n source = graph.findById(source);\n }\n if (target && isString(target)) {\n target = graph.findById(target);\n }\n if (!source || !target) {\n console.warn(\"The source or target node of edge \".concat(model.id, \" does not exist!\"));\n return;\n }\n if (source.getType && source.getType() === 'combo') {\n model.isComboEdge = true;\n // graph.updateCombo(source as ICombo);\n }\n\n if (target.getType && target.getType() === 'combo') {\n model.isComboEdge = true;\n // graph.updateCombo(target as ICombo);\n }\n\n item = new Edge({\n model: model,\n source: source,\n target: target,\n styles: styles,\n linkCenter: graph.get('linkCenter'),\n group: parent.addGroup()\n });\n } else if (type === NODE) {\n item = new Node({\n model: model,\n styles: styles,\n group: parent.addGroup()\n });\n } else if (type === COMBO) {\n var children = model.children;\n var comboBBox = getComboBBox(children, graph);\n var bboxX = void 0,\n bboxY = void 0;\n if (!isNaN(comboBBox.x)) bboxX = comboBBox.x;else if (isNaN(model.x)) bboxX = Math.random() * 100;\n if (!isNaN(comboBBox.y)) bboxY = comboBBox.y;else if (isNaN(model.y)) bboxY = Math.random() * 100;\n if (isNaN(model.x) || isNaN(model.y)) {\n model.x = bboxX;\n model.y = bboxY;\n } else {\n // if there is x y in model, place the combo according to it and move its succeed items. that means, the priority of the combo's position is higher than succeed items'\n var dx = model.x - bboxX;\n var dy = model.y - bboxY;\n // In the same time, adjust the children's positions\n this.updateComboSucceeds(model.id, dx, dy, children);\n }\n var comboGroup = parent.addGroup();\n comboGroup.setZIndex(model.depth);\n item = new Combo({\n model: model,\n styles: styles,\n animate: graph.get('animate'),\n bbox: model.collapsed ? getComboBBox([], graph) : comboBBox,\n group: comboGroup\n });\n // if it is a circle combo, diagonal length of the children's bbox should be the diameter of the combo's bbox\n if (!model.collapsed && item.getKeyShape().get('type') === 'circle') {\n comboBBox.width = Math.hypot(comboBBox.height, comboBBox.width);\n comboBBox.height = comboBBox.width;\n item.set('bbox', comboBBox);\n item.refresh();\n }\n var comboModel_1 = item.getModel();\n (children || []).forEach(function (child) {\n var childItem = graph.findById(child.id);\n item.addChild(childItem);\n child.depth = comboModel_1.depth + 2;\n });\n }\n if (item) {\n item.setOptimize(graph.getNodes().length > graph.get('optimizeThreshold'));\n graph.get(\"\".concat(type, \"s\")).push(item);\n graph.get('itemMap')[item.get('id')] = item;\n graph.emit('afteradditem', {\n item: item,\n model: model\n });\n // eslint-disable-next-line consistent-return\n return item;\n }\n };\n /**\n * 更新节点或边\n *\n * @param {Item} item ID 或 实例\n * @param {(EdgeConfig | Partial)} cfg 数据模型\n * @returns\n * @memberof ItemController\n */\n ItemController.prototype.updateItem = function (item, cfg) {\n var _this = this;\n var _a, _b;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item || item.destroyed) {\n return;\n }\n // 更新的 item 的类型\n var type = '';\n if (item.getType) type = item.getType();\n var mapper = graph.get(type + MAPPER_SUFFIX);\n var model = item.getModel();\n var oriX = model.x,\n oriY = model.y;\n var updateType = item.getUpdateType(cfg);\n if (mapper) {\n var result = deepMix({}, model, cfg);\n var mappedModel = mapper(result);\n // 将 update 时候用户传入的参数与mapperModel做deepMix,以便复用之前设置的参数值\n var newModel = deepMix({}, model, mappedModel, cfg);\n if (mappedModel[STATE_SUFFIX]) {\n item.set('styles', newModel[STATE_SUFFIX]);\n delete newModel[STATE_SUFFIX];\n }\n each(newModel, function (val, key) {\n cfg[key] = val;\n });\n } else {\n // merge update传进来的对象参数,model中没有的数据不做处理,对象和字符串值也不做处理,直接替换原来的\n each(cfg, function (val, key) {\n if (model[key]) {\n if (isObject(val) && !isArray(val)) {\n cfg[key] = __assign(__assign({}, model[key]), cfg[key]);\n }\n }\n });\n }\n // emit beforeupdateitem 事件\n graph.emit('beforeupdateitem', {\n item: item,\n cfg: cfg\n });\n if (type === EDGE) {\n // 若是边要更新source || target, 为了不影响示例内部model,并且重新计算startPoint和endPoint,手动设置\n if (cfg.source) {\n var source = cfg.source;\n if (isString(source)) {\n source = graph.findById(source);\n }\n item.setSource(source);\n }\n if (cfg.target) {\n var target = cfg.target;\n if (isString(target)) {\n target = graph.findById(target);\n }\n item.setTarget(target);\n }\n item.update(cfg);\n } else if (type === NODE) {\n item.update(cfg, updateType);\n var edges = item.getEdges();\n if (updateType === 'move') {\n each(edges, function (edge) {\n _this.edgeToBeUpdateMap[edge.getID()] = {\n edge: edge,\n updateType: updateType\n };\n _this.throttleRefresh();\n });\n } else if (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox')) {\n each(edges, function (edge) {\n edge.refresh(updateType);\n });\n }\n } else if (type === COMBO) {\n item.update(cfg, updateType);\n if (!isNaN(cfg.x) || !isNaN(cfg.y)) {\n // if there is x y in model, place the combo according to it and move its succeed items. that means, the priority of the combo's position is higher than succeed items'\n var dx = cfg.x - oriX || 0;\n var dy = cfg.y - oriY || 0;\n // In the same time, adjust the children's positions\n this.updateComboSucceeds(model.id, dx, dy);\n }\n var edges_1 = item.getEdges();\n var refreshEdge = (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox')) || updateType === 'move';\n if (refreshEdge && type === COMBO) {\n var shapeFactory = item.get('shapeFactory');\n var shapeType = model.type || 'circle';\n var comboAnimate = model.animate === undefined || cfg.animate === undefined ? (_b = (_a = shapeFactory[shapeType]) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.animate : model.animate || cfg.animate;\n if (comboAnimate) {\n setTimeout(function () {\n if (!item || item.destroyed) return;\n var keyShape = item.getKeyShape();\n if (!keyShape || keyShape.destroyed) return;\n each(edges_1, function (edge) {\n if (edge && !edge.destroyed) edge.refresh();\n });\n }, 201);\n } else {\n each(edges_1, function (edge) {\n edge.refresh();\n });\n }\n }\n }\n item.setOptimize(graph.getNodes().length > graph.get('optimizeThreshold'));\n graph.emit('afterupdateitem', {\n item: item,\n cfg: cfg\n });\n };\n /**\n * 根据 combo 的子元素更新 combo 的位置及大小\n *\n * @param {ICombo} combo ID 或 实例\n * @returns\n * @memberof ItemController\n */\n ItemController.prototype.updateCombo = function (combo, children, followCombo) {\n var _this = this;\n var _a, _b;\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n if (!combo || combo.destroyed) {\n return;\n }\n var model = combo.getModel();\n var comboBBox = getComboBBox(children, graph, combo);\n var comboX = comboBBox.x,\n comboY = comboBBox.y;\n combo.set('bbox', comboBBox);\n var x = comboX,\n y = comboY;\n if (followCombo) {\n // position of combo model first\n x = isNaN(model.x) ? comboX : model.x;\n y = isNaN(model.y) ? comboY : model.y;\n } else {\n // position of succeed items first\n x = isNaN(comboX) ? model.x : comboX;\n y = isNaN(comboY) ? model.y : comboY;\n }\n combo.update({\n x: x,\n y: y\n });\n var shapeFactory = combo.get('shapeFactory');\n var shapeType = model.type || 'circle';\n var comboAnimate = model.animate === undefined ? (_b = (_a = shapeFactory[shapeType]) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.animate : model.animate;\n if (comboAnimate) {\n setTimeout(function () {\n if (!combo || combo.destroyed) return;\n var keyShape = combo.getKeyShape();\n if (!keyShape || keyShape.destroyed) return;\n combo.getShapeCfg(model); // 更新 combo 缓存的 size\n _this.updateComboEdges(combo);\n }, 201);\n } else {\n this.updateComboEdges(combo);\n }\n };\n ItemController.prototype.updateComboEdges = function (combo) {\n var _a, _b;\n var combEdges = combo.getEdges() || [];\n for (var i = 0; i < combEdges.length; i++) {\n var edge = combEdges[i];\n if (!(edge === null || edge === void 0 ? void 0 : edge.destroyed) && !((_a = edge === null || edge === void 0 ? void 0 : edge.getSource()) === null || _a === void 0 ? void 0 : _a.destroyed) && !((_b = edge === null || edge === void 0 ? void 0 : edge.getTarget()) === null || _b === void 0 ? void 0 : _b.destroyed)) {\n edge.refresh();\n }\n }\n };\n /**\n * 收起 combo,隐藏相关元素\n */\n ItemController.prototype.collapseCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n var children = combo.getChildren();\n children.nodes.forEach(function (node) {\n graph.hideItem(node, stack);\n });\n children.combos.forEach(function (c) {\n graph.hideItem(c, stack);\n });\n };\n /**\n * 根据位置差量 dx dy,更新 comboId 后继元素的位置\n * */\n ItemController.prototype.updateComboSucceeds = function (comboId, dx, dy, children) {\n var _this = this;\n if (children === void 0) {\n children = [];\n }\n var graph = this.graph;\n if (!dx && !dy) return;\n var kids = children;\n if (!(kids === null || kids === void 0 ? void 0 : kids.length)) {\n var comboTrees = graph.get('comboTrees');\n comboTrees === null || comboTrees === void 0 ? void 0 : comboTrees.forEach(function (child) {\n traverseTree(child, function (subTree) {\n if (subTree.id === comboId) {\n kids = subTree.children;\n return false;\n }\n return true;\n });\n });\n }\n kids === null || kids === void 0 ? void 0 : kids.forEach(function (child) {\n var childItem = graph.findById(child.id);\n if (childItem) {\n var childModel = childItem.getModel();\n _this.updateItem(child.id, {\n x: (childModel.x || 0) + dx,\n y: (childModel.y || 0) + dy\n });\n }\n });\n };\n /**\n * 展开 combo,相关元素出现\n * 若子 combo 原先是收起状态,则保持它的收起状态\n */\n ItemController.prototype.expandCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n var children = combo.getChildren();\n var edgeSet = new Set();\n children.nodes.forEach(function (node) {\n graph.showItem(node, stack);\n node.getEdges().forEach(function (edge) {\n return edgeSet.add(edge);\n });\n });\n children.combos.forEach(function (c) {\n if (c.getModel().collapsed) {\n c.show();\n } else {\n graph.showItem(c, stack);\n }\n c.getEdges().forEach(function (edge) {\n return edgeSet.add(edge);\n });\n });\n edgeSet.forEach(function (edge) {\n return edge.refresh();\n });\n };\n /**\n * 删除指定的节点或边\n *\n * @param {Item} item item ID 或实例\n * @returns {void}\n * @memberof ItemController\n */\n ItemController.prototype.removeItem = function (item) {\n var _this = this;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item || item.destroyed) {\n return;\n }\n var itemModel = clone(item.getModel());\n var type = '';\n if (item.getType) type = item.getType();\n graph.emit('beforeremoveitem', {\n item: itemModel,\n type: type\n });\n var items = graph.get(\"\".concat(type, \"s\"));\n var index = items.indexOf(item);\n if (index > -1) items.splice(index, 1);\n if (type === EDGE) {\n var vitems = graph.get(\"v\".concat(type, \"s\"));\n var vindex = vitems.indexOf(item);\n if (vindex > -1) vitems.splice(vindex, 1);\n }\n var itemId = item.get('id');\n var itemMap = graph.get('itemMap');\n delete itemMap[itemId];\n var comboTrees = graph.get('comboTrees');\n var id = item.get('id');\n if (type === NODE) {\n var comboId = item.getModel().comboId;\n if (comboTrees && comboId) {\n var brothers_1 = comboTrees;\n var found_1 = false; // the flag to terminate the forEach circulation\n // remove the node from the children array of its parent fromt he tree\n comboTrees.forEach(function (ctree) {\n if (found_1) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id && brothers_1) {\n var bidx = brothers_1.indexOf(combo);\n brothers_1.splice(bidx, 1);\n found_1 = true;\n return false; // terminate the traverse\n }\n\n brothers_1 = combo.children;\n return true;\n });\n });\n }\n // 若移除的是节点,需要将与之相连的边一同删除\n var edges = item.getEdges();\n for (var i = edges.length - 1; i >= 0; i--) {\n graph.removeItem(edges[i], false);\n }\n if (comboId) graph.updateCombo(comboId);\n } else if (type === COMBO) {\n var parentId = item.getModel().parentId;\n var comboInTree_1;\n // find the subtree rooted at the item to be removed\n var found_2 = false; // the flag to terminate the forEach circulation\n (comboTrees || []).forEach(function (ctree) {\n if (found_2) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id) {\n comboInTree_1 = combo;\n found_2 = true;\n return false; // terminate the traverse\n }\n\n return true;\n });\n });\n comboInTree_1.removed = true;\n if (comboInTree_1 && comboInTree_1.children) {\n comboInTree_1.children.forEach(function (child) {\n _this.removeItem(child.id);\n });\n }\n // 若移除的是 combo,需要将与之相连的边一同删除\n var edges = item.getEdges();\n for (var i = edges.length; i >= 0; i--) {\n graph.removeItem(edges[i], false);\n }\n if (parentId) graph.updateCombo(parentId);\n }\n item.destroy();\n graph.emit('afterremoveitem', {\n item: itemModel,\n type: type\n });\n };\n /**\n * 更新 item 状态\n *\n * @param {Item} item Item 实例\n * @param {string} state 状态名称\n * @param {boolean} value 是否启用状态或状态值\n * @returns {void}\n * @memberof ItemController\n */\n ItemController.prototype.setItemState = function (item, state, value) {\n var graph = this.graph;\n var stateName = state;\n if (isString(value)) {\n stateName = \"\".concat(state, \":\").concat(value);\n }\n // 已经存在要设置的 state,或不存在 state 的样式为 undefined\n if (item.hasState(stateName) === value && value ||\n // 当该状态已经存在且现在需要设置为 true 时,不需要继续。当该状态不存在,且设置为 false 时,需要继续\n isString(value) && item.hasState(stateName)) {\n // 当该状态 value 是字符串,且已经存在该状态,不需要继续\n return;\n }\n graph.emit('beforeitemstatechange', {\n item: item,\n state: stateName,\n enabled: value\n });\n item.setState(state, value);\n graph.autoPaint();\n graph.emit('afteritemstatechange', {\n item: item,\n state: stateName,\n enabled: value\n });\n };\n /**\n * 将指定状态的优先级提升为最高优先级\n * @param {Item} item 元素id或元素实例\n * @param state 状态名称\n */\n ItemController.prototype.priorityState = function (item, state) {\n var graph = this.graph;\n var currentItem = item;\n if (isString(item)) {\n currentItem = graph.findById(item);\n }\n // 先取消已有的 state\n this.setItemState(currentItem, state, false);\n // 再设置state,则此时该优先级为最高\n this.setItemState(currentItem, state, true);\n };\n /**\n * 清除所有指定的状态\n *\n * @param {Item} item Item 实例\n * @param {string[]} states 状态名称集合\n * @memberof ItemController\n */\n ItemController.prototype.clearItemStates = function (item, states) {\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n graph.emit('beforeitemstatesclear', {\n item: item,\n states: states\n });\n item.clearStates(states);\n graph.emit('afteritemstatesclear', {\n item: item,\n states: states\n });\n };\n /**\n * 刷新指定的 Item\n *\n * @param {Item} item Item ID 或 实例\n * @memberof ItemController\n */\n ItemController.prototype.refreshItem = function (item) {\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n graph.emit('beforeitemrefresh', {\n item: item\n });\n // 调用 Item 的 refresh 方法,实现刷新功能\n item.refresh();\n graph.emit('afteritemrefresh', {\n item: item\n });\n };\n /**\n * 根据 graph 上用 combos 数据生成的 comboTree 来增加所有 combos\n *\n * @param {ComboTree[]} comboTrees graph 上用 combos 数据生成的 comboTree\n * @param {ComboConfig[]} comboModels combos 数据\n * @memberof ItemController\n */\n ItemController.prototype.addCombos = function (comboTrees, comboModels) {\n var _this = this;\n var graph = this.graph;\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var comboModel;\n comboModels.forEach(function (model) {\n if (model.id === child.id) {\n model.children = child.children;\n model.depth = child.depth;\n comboModel = model;\n }\n });\n if (comboModel) {\n _this.addItem('combo', comboModel);\n }\n return true;\n });\n });\n var comboGroup = graph.get('comboGroup');\n if (comboGroup) comboGroup.sort();\n };\n /**\n * 改变Item的显示状态\n *\n * @param {Item} item Item ID 或 实例\n * @param {boolean} visible 是否显示\n * @memberof ItemController\n */\n ItemController.prototype.changeItemVisibility = function (item, visible) {\n var _this = this;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item) {\n console.warn('The item to be shown or hidden does not exist!');\n return;\n }\n graph.emit('beforeitemvisibilitychange', {\n item: item,\n visible: visible\n });\n item.changeVisibility(visible);\n if (item.getType && item.getType() === NODE) {\n var edges = item.getEdges();\n each(edges, function (edge) {\n // 若隐藏节点,则将与之关联的边也隐藏\n // 若显示节点,则将与之关联的边也显示,但是需要判断边两端的节点都是可见的\n if (visible && !(edge.get('source').isVisible() && edge.get('target').isVisible())) {\n return;\n }\n _this.changeItemVisibility(edge, visible);\n });\n } else if (item.getType && item.getType() === COMBO) {\n var comboTrees = graph.get('comboTrees');\n var id_1 = item.get('id');\n var children_1 = [];\n var found_3 = false; // flag the terminate the forEach\n (comboTrees || []).forEach(function (ctree) {\n if (found_3) return;\n if (!ctree.children || ctree.children.length === 0) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id_1) {\n children_1 = combo.children;\n found_3 = true;\n return false; // terminate the traverse\n }\n\n return true;\n });\n });\n if (children_1 && (!visible || visible && !item.getModel().collapsed)) {\n children_1.forEach(function (child) {\n var childItem = graph.findById(child.id);\n _this.changeItemVisibility(childItem, visible);\n });\n }\n var edges = item.getEdges();\n each(edges, function (edge) {\n // 若隐藏 combo,则将与 combo 本身关联的边也隐藏\n // 若显示 combo,则将与 combo 本身关联的边也显示,但是需要判断边两端的节点都是可见的\n if (visible && !(edge.get('source').isVisible() && edge.get('target').isVisible())) {\n return;\n }\n _this.changeItemVisibility(edge, visible);\n });\n }\n graph.emit('afteritemvisibilitychange', {\n item: item,\n visible: visible\n });\n return item;\n };\n ItemController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = true;\n };\n return ItemController;\n}();\nexport default ItemController;","import { isString } from '@antv/util';\nvar StateController = /** @class */function () {\n function StateController(graph) {\n this.graph = graph;\n this.destroyed = false;\n }\n /**\n * 更新 Item 的状态\n *\n * @param {Item} item Item实例\n * @param {string} state 状态名称\n * @param {boolean} enabled 状态是否可用\n * @memberof State\n */\n StateController.prototype.updateState = function (item, state, enabled) {\n var graphStates = this.graph.get('states');\n var key = state;\n if (isString(enabled)) key = \"\".concat(state, \":\").concat(enabled);\n if (!graphStates[key]) graphStates[key] = [];\n if (enabled) graphStates[key].push(item);else graphStates[key] = graphStates[key].filter(function (itemInState) {\n return itemInState !== item;\n });\n this.graph.set('states', graphStates);\n this.graph.emit('graphstatechange', {\n states: graphStates\n });\n };\n /**\n * 批量更新 states,兼容 updateState,支持更新一个 state\n *\n * @param {Item} item\n * @param {(string | string[])} states\n * @param {boolean} enabled\n * @memberof State\n */\n StateController.prototype.updateStates = function (item, states, enabled) {\n var graphStates = this.graph.get('states');\n var stateNames = isString(states) ? [states] : states;\n stateNames.forEach(function (stateName) {\n var key = stateName;\n if (!graphStates[key]) graphStates[key] = [];\n if (isString(enabled)) key = \"\".concat(stateName, \":\").concat(enabled);\n if (enabled) graphStates[key].push(item);else graphStates[key] = graphStates[key].filter(function (itemInState) {\n return itemInState !== item;\n });\n });\n this.graph.set('states', graphStates);\n this.graph.emit('graphstatechange', {\n states: states\n });\n };\n StateController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = true;\n };\n return StateController;\n}();\nexport default StateController;","import { vec2 } from '@antv/matrix-util';\nimport { catmullRom2Bezier } from '@antv/path-util';\n/**\n * 替换字符串中的字段\n * @param {String} str 模版字符串\n * @param {Object} o json data\n */\nvar substitute = function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n var res = o[name];\n if (res === 0) res = '0';\n return res || '';\n });\n};\n/**\n * 给定坐标获取三次贝塞尔曲线的 M 及 C 值\n * @param points coordinate set\n */\nexport var getSpline = function getSpline(points) {\n var data = [];\n if (points.length < 2) {\n throw new Error(\"point length must largn than 2, now it's \".concat(points.length));\n }\n for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {\n var point = points_1[_i];\n var x = point.x,\n y = point.y;\n data.push(x);\n data.push(y);\n }\n var spliePath = catmullRom2Bezier(data);\n spliePath.unshift(['M', points[0].x, points[0].y]);\n return spliePath;\n};\n/**\n * 根据起始点、相对位置、偏移量计算控制点\n * @param {IPoint} startPoint 起始点,包含 x,y\n * @param {IPoint} endPoint 结束点, 包含 x,y\n * @param {Number} percent 相对位置,范围 0-1\n * @param {Number} offset 偏移量\n * @return {IPoint} 控制点,包含 x,y\n */\nexport var getControlPoint = function getControlPoint(startPoint, endPoint, percent, offset) {\n if (percent === void 0) {\n percent = 0;\n }\n if (offset === void 0) {\n offset = 0;\n }\n var point = {\n x: (1 - percent) * startPoint.x + percent * endPoint.x,\n y: (1 - percent) * startPoint.y + percent * endPoint.y\n };\n var tangent = [0, 0];\n vec2.normalize(tangent, [endPoint.x - startPoint.x, endPoint.y - startPoint.y]);\n if (!tangent || !tangent[0] && !tangent[1]) {\n tangent = [0, 0];\n }\n var perpendicular = [-tangent[1] * offset, tangent[0] * offset]; // 垂直向量\n point.x += perpendicular[0];\n point.y += perpendicular[1];\n return point;\n};\n/**\n * 点集转化为Path多边形\n * @param {Array} points 点集\n * @param {Boolen} z 是否封闭\n * @return {Array} Path\n */\nexport var pointsToPolygon = function pointsToPolygon(points, z) {\n var length = points.length;\n if (!length) {\n return '';\n }\n var path = '';\n var str = '';\n for (var i = 0; i < length; i++) {\n var item = points[i];\n if (i === 0) {\n str = 'M{x} {y}';\n } else {\n str = 'L{x} {y}';\n }\n path += substitute(str, item);\n }\n if (z) {\n path += 'Z';\n }\n return path;\n};\nexport var pathToPoints = function pathToPoints(path) {\n var points = [];\n path.forEach(function (seg) {\n var command = seg[0];\n if (command !== 'A') {\n for (var i = 1; i < seg.length; i = i + 2) {\n points.push([seg[i], seg[i + 1]]);\n }\n } else {\n var length_1 = seg.length;\n points.push([seg[length_1 - 2], seg[length_1 - 1]]);\n }\n });\n return points;\n};\n/**\n * 生成平滑的闭合曲线\n * @param points\n */\nexport var getClosedSpline = function getClosedSpline(points) {\n if (points.length < 2) {\n throw new Error(\"point length must larger than 2, now it's \".concat(points.length));\n }\n var first = points[0];\n var second = points[1];\n var last = points[points.length - 1];\n var lastSecond = points[points.length - 2];\n points.unshift(last);\n points.unshift(lastSecond);\n points.push(first);\n points.push(second);\n var closedPath = [];\n for (var i = 1; i < points.length - 2; i += 1) {\n var x0 = points[i - 1].x;\n var y0 = points[i - 1].y;\n var x1 = points[i].x;\n var y1 = points[i].y;\n var x2 = points[i + 1].x;\n var y2 = points[i + 1].y;\n var x3 = i !== points.length - 2 ? points[i + 2].x : x2;\n var y3 = i !== points.length - 2 ? points[i + 2].y : y2;\n var cp1x = x1 + (x2 - x0) / 6;\n var cp1y = y1 + (y2 - y0) / 6;\n var cp2x = x2 - (x3 - x1) / 6;\n var cp2y = y2 - (y3 - y1) / 6;\n closedPath.push(['C', cp1x, cp1y, cp2x, cp2y, x2, y2]);\n }\n closedPath.unshift(['M', last.x, last.y]);\n return closedPath;\n};\nvar vecScaleTo = function vecScaleTo(v, length) {\n // Vector with direction of v with specified length\n return vec2.scale([0, 0], vec2.normalize([0, 0], v), length);\n};\nvar unitNormal = function unitNormal(p0, p1) {\n // Returns the unit normal to the line segment from p0 to p1.\n var n = [p0[1] - p1[1], p1[0] - p0[0]];\n var nLength = Math.sqrt(n[0] * n[0] + n[1] * n[1]);\n if (nLength === 0) {\n throw new Error('p0 should not be equal to p1');\n }\n return [n[0] / nLength, n[1] / nLength];\n};\nvar vecFrom = function vecFrom(p0, p1) {\n // Vector from p0 to p1\n return [p1[0] - p0[0], p1[1] - p0[1]];\n};\n/**\n * 传入的节点作为多边形顶点,生成有圆角的多边形\n * @param polyPoints 多边形顶点\n * @param padding 在原多边形基础上增加最终轮廓和原多边形的空白间隔\n */\nexport function roundedHull(polyPoints, padding) {\n // The rounded hull path around a single point\n var roundedHull1 = function roundedHull1(points) {\n var p1 = [points[0][0], points[0][1] - padding];\n var p2 = [points[0][0], points[0][1] + padding];\n return \"M \".concat(p1, \" A \").concat(padding, \",\").concat(padding, \",0,0,0,\").concat(p2, \" A \").concat(padding, \",\").concat(padding, \",0,0,0,\").concat(p1);\n };\n // The rounded hull path around two points\n var roundedHull2 = function roundedHull2(points) {\n var offsetVector = vec2.scale([0, 0], unitNormal(points[0], points[1]), padding);\n var invOffsetVector = vec2.scale([0, 0], offsetVector, -1);\n var p0 = vec2.add([0, 0], points[0], offsetVector);\n var p1 = vec2.add([0, 0], points[1], offsetVector);\n var p2 = vec2.add([0, 0], points[1], invOffsetVector);\n var p3 = vec2.add([0, 0], points[0], invOffsetVector);\n return \"M \".concat(p0, \" L \").concat(p1, \" A \").concat([padding, padding, '0,0,0', p2].join(','), \" L \").concat(p3, \" A \").concat([padding, padding, '0,0,0', p0].join(','));\n };\n // 特殊情况处理:节点数小于等于2\n if (!polyPoints || polyPoints.length < 1) return '';\n if (polyPoints.length === 1) return roundedHull1(polyPoints);\n if (polyPoints.length === 2) return roundedHull2(polyPoints);\n var segments = new Array(polyPoints.length);\n // Calculate each offset (outwards) segment of the convex hull.\n for (var segmentIndex = 0; segmentIndex < segments.length; ++segmentIndex) {\n var p0 = segmentIndex === 0 ? polyPoints[polyPoints.length - 1] : polyPoints[segmentIndex - 1];\n var p1 = polyPoints[segmentIndex];\n // Compute the offset vector for the line segment, with length = padding.\n var offset = vec2.scale([0, 0], unitNormal(p0, p1), padding);\n segments[segmentIndex] = [vec2.add([0, 0], p0, offset), vec2.add([0, 0], p1, offset)];\n }\n var arcData = \"A \".concat([padding, padding, '0,0,0,'].join(','));\n segments = segments.map(function (segment, index) {\n var pathFragment = '';\n if (index === 0) {\n pathFragment = \"M \".concat(segments[segments.length - 1][1], \" \");\n }\n pathFragment += \"\".concat(arcData + segment[0], \" L \").concat(segment[1]);\n return pathFragment;\n });\n return segments.join(' ');\n}\n/**\n * 传入的节点作为多边形顶点,生成平滑的闭合多边形\n * @param polyPoints\n * @param padding\n */\nexport function paddedHull(polyPoints, padding) {\n var pointCount = polyPoints.length;\n var smoothHull1 = function smoothHull1(points) {\n // Returns the path for a circular hull around a single point.\n var p1 = [points[0][0], points[0][1] - padding];\n var p2 = [points[0][0], points[0][1] + padding];\n return \"M \".concat(p1, \" A \").concat([padding, padding, '0,0,0', p2].join(','), \" A \").concat([padding, padding, '0,0,0', p1].join(','));\n };\n // Returns the path for a rounded hull around two points.\n var smoothHull2 = function smoothHull2(points) {\n var v = vecFrom(points[0], points[1]);\n var extensionVec = vecScaleTo(v, padding);\n var extension0 = vec2.add([0, 0], points[0], vec2.scale([0, 0], extensionVec, -1));\n var extension1 = vec2.add([0, 0], points[1], extensionVec);\n var tangentHalfLength = 1.2 * padding;\n var controlDelta = vecScaleTo(vec2.normalize([0, 0], v), tangentHalfLength);\n var invControlDelta = vec2.scale([0, 0], controlDelta, -1);\n var control0 = vec2.add([0, 0], extension0, invControlDelta);\n var control1 = vec2.add([0, 0], extension1, invControlDelta);\n var control3 = vec2.add([0, 0], extension0, controlDelta);\n // return [\n // ['M', extension0[0], extension0[1]],\n // ['C', control0, control1, extension1],\n // ['S', control3, extension0],\n // 'Z',\n // ];\n return \"M \".concat(extension0, \" C \").concat([control0, control1, extension1].join(','), \" S \").concat([control3, extension0].join(','), \" Z\");\n };\n // Handle special cases\n if (!polyPoints || pointCount < 1) return '';\n if (pointCount === 1) return smoothHull1(polyPoints);\n if (pointCount === 2) return smoothHull2(polyPoints);\n var hullPoints = polyPoints.map(function (point, index) {\n var pNext = polyPoints[(index + 1) % pointCount];\n return {\n p: point,\n v: vec2.normalize([0, 0], vecFrom(point, pNext))\n };\n });\n // Compute the expanded hull points, and the nearest prior control point for each.\n for (var i = 0; i < hullPoints.length; ++i) {\n var priorIndex = i > 0 ? i - 1 : pointCount - 1;\n var extensionVec = vec2.normalize([0, 0], vec2.add([0, 0], hullPoints[priorIndex].v, vec2.scale([0, 0], hullPoints[i].v, -1)));\n hullPoints[i].p = vec2.add([0, 0], hullPoints[i].p, vec2.scale([0, 0], extensionVec, padding));\n }\n return hullPoints.map(function (obj) {\n var point = obj.p;\n return {\n x: point[0],\n y: point[1]\n };\n });\n}\n/**\n * get a path of a star with outer radius and inner radius\n * @param outerR\n * @param innerR\n * @returns\n */\nexport var getStarPath = function getStarPath(outerR, innerR) {\n var path = [];\n for (var i = 0; i < 5; i++) {\n var x1 = Math.cos((18 + 72 * i) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * i) / 180 * Math.PI) * outerR;\n var x2 = Math.cos((54 + 72 * i) / 180 * Math.PI) * innerR;\n var y2 = Math.sin((54 + 72 * i) / 180 * Math.PI) * innerR;\n if (i === 0) {\n path.push(['M', x1, -y1]);\n } else {\n path.push(['L', x1, -y1]);\n }\n path.push(['L', x2, -y2]);\n }\n path.push(['Z']);\n return path;\n};","/**\n * Use cross product to judge the direction of the turn.\n * Returns a positive value, if OAB makes a clockwise turn,\n * negative for counter-clockwise turn, and zero if the points are collinear.\n */\nexport var cross = function cross(a, b, o) {\n return (a.y - o.y) * (b.x - o.x) - (a.x - o.x) * (b.y - o.y);\n};\n/**\n * Generate a convex hull of given points. Andrew's monotone chain algorithm.\n * @param points An array of [x, y] representing the coordinates of points.\n * @return a list of vertices of the convex hull in counter-clockwise order,\n */\nexport var genConvexHull = function genConvexHull(items) {\n var points = items.map(function (item) {\n return {\n x: item.getModel().x,\n y: item.getModel().y\n };\n });\n points.sort(function (a, b) {\n return a.x === b.x ? a.y - b.y : a.x - b.x;\n });\n // remove duplicate points\n var pointMap = {};\n for (var i = points.length - 1; i >= 0; i--) {\n var _a = points[i],\n x = _a.x,\n y = _a.y;\n if (pointMap[\"\".concat(x, \"-\").concat(y)]) points.splice(i, 1);\n pointMap[\"\".concat(x, \"-\").concat(y)] = true;\n }\n if (points.length === 1) {\n return points;\n }\n // build the lower hull\n var lower = [];\n for (var i = 0; i < points.length; i++) {\n while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {\n lower.pop();\n }\n lower.push(points[i]);\n }\n // build the upper hull\n var upper = [];\n for (var i = points.length - 1; i >= 0; i--) {\n while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[i]) <= 0) {\n upper.pop();\n }\n upper.push(points[i]);\n }\n upper.pop();\n lower.pop();\n var strictHull = lower.concat(upper);\n return strictHull;\n};","import { squareDist, pointLineSquareDist, itemIntersectByLine, getPointsCenter, fractionToLine, isPointsOverlap, pointRectSquareDist, Line, isPointInPolygon } from '../../util/math';\nvar defaultOps = {\n maxRoutingIterations: 100,\n maxMarchingIterations: 100,\n pixelGroupSize: 2,\n edgeR0: 10,\n edgeR1: 10,\n nodeR0: 5,\n nodeR1: 10,\n morphBuffer: 5,\n threshold: 0.001,\n skip: 16,\n nodeInfluenceFactor: 1,\n edgeInfluenceFactor: 1,\n negativeNodeInfluenceFactor: -0.5\n};\n/**\n * Marching square algorithm for traching the contour of a pixel group\n * https://www.emanueleferonato.com/2013/03/01/using-marching-squares-algorithm-to-trace-the-contour-of-an-image/\n * @param potentialArea\n * @param threshold\n */\nfunction MarchingSquares(contour, potentialArea, threshold) {\n var marched = false;\n var getVal = function getVal(x, y) {\n return potentialArea.cells[x + y * potentialArea.width];\n };\n var getState = function getState(x, y) {\n var squareVal = 0;\n if (getVal(x - 1, y - 1) >= threshold) {\n squareVal += 1;\n }\n if (getVal(x, y - 1) > threshold) {\n squareVal += 2;\n }\n if (getVal(x - 1, y) > threshold) {\n squareVal += 4;\n }\n if (getVal(x, y) > threshold) {\n squareVal += 8;\n }\n return squareVal;\n };\n var doMarch = function doMarch(xPos, yPos) {\n var x = xPos;\n var y = yPos;\n var prevX;\n var prevY;\n for (var i = 0; i < potentialArea.width * potentialArea.height; i++) {\n prevX = x;\n prevY = y;\n if (contour.findIndex(function (item) {\n return item.x === x && item.y === y;\n }) > -1) {\n if (contour[0].x !== x || contour[0].y !== y) {\n // encountered a loop but haven't returned to start: change direction using conditionals and continue back to start\n } else {\n return true;\n }\n } else {\n contour.push({\n x: x,\n y: y\n });\n }\n var state = getState(x, y);\n // assign the move direction according to state of the square\n switch (state) {\n case -1:\n console.warn('Marched out of bounds');\n return true;\n case 0:\n case 3:\n case 2:\n case 7:\n x++; // go right\n break;\n case 12:\n case 14:\n case 4:\n x--; // go left\n break;\n case 6:\n // go left if come from up else go right\n if (prevX === 0) {\n if (prevY === -1) {\n x -= 1;\n } else {\n x += 1;\n }\n }\n break;\n case 1:\n case 13:\n case 5:\n y--; // go up\n break;\n case 9:\n // go up if come from right else go down\n if (prevX === 1) {\n if (prevY === 0) {\n y -= 1;\n } else {\n y += 1;\n }\n }\n break;\n case 10:\n case 8:\n case 11:\n y++; // go down\n break;\n default:\n console.warn(\"Marching squares invalid state: \".concat(state));\n return true;\n }\n }\n };\n this.march = function () {\n for (var x = 0; x < potentialArea.width && !marched; x += 1) {\n for (var y = 0; y < potentialArea.height && !marched; y += 1) {\n if (getVal(x, y) > threshold && getState(x, y) !== 15) {\n marched = doMarch(x, y);\n }\n }\n }\n return marched;\n };\n}\n/**\n * Space partition & assign value to each cell\n * @param points\n */\nvar initGridCells = function initGridCells(width, height, pixelGroupSize) {\n var scaleWidth = Math.ceil(width / pixelGroupSize);\n var scaleHeight = Math.ceil(height / pixelGroupSize);\n var gridCells = new Float32Array(Math.max(0, scaleWidth * scaleHeight)).fill(0);\n return {\n cells: gridCells,\n width: scaleWidth,\n height: scaleHeight\n };\n};\n/**\n * Find the optimal already visited member to item;\n Optimal: minimize cost(j) = distance(i,j) ∗ countObstacles(i,j)\n * @param item\n * @param visited\n */\nvar pickBestNeighbor = function pickBestNeighbor(item, visited, nonMembers) {\n var closestNeighbour = null;\n var minCost = Number.POSITIVE_INFINITY;\n visited.forEach(function (neighbourItem) {\n var itemP = {\n x: item.getModel().x,\n y: item.getModel().y\n };\n var neighbourItemP = {\n x: neighbourItem.getModel().x,\n y: neighbourItem.getModel().y\n };\n var dist = squareDist(itemP, neighbourItemP);\n var directLine = new Line(itemP.x, itemP.y, neighbourItemP.x, neighbourItemP.y);\n var numberObstacles = nonMembers.reduce(function (count, _item) {\n if (fractionToLine(_item, directLine) > 0) {\n return count + 1;\n }\n return count;\n }, 0);\n if (dist * Math.pow(numberObstacles + 1, 2) < minCost) {\n closestNeighbour = neighbourItem;\n minCost = dist * Math.pow(numberObstacles + 1, 2);\n }\n });\n return closestNeighbour;\n};\n/**\n * 返回和线相交的item中,离边的起点最近的item\n * @param items\n * @param line\n */\nvar getIntersectItem = function getIntersectItem(items, line) {\n var minDistance = Number.POSITIVE_INFINITY;\n var closestItem = null;\n items.forEach(function (item) {\n var distance = fractionToLine(item, line);\n // find closest intersection\n if (distance >= 0 && distance < minDistance) {\n closestItem = item;\n minDistance = distance;\n }\n });\n return closestItem;\n};\n/**\n * Modify the directLine and Route virtual edges around obstacles\n */\nvar computeRoute = function computeRoute(directLine, nonMembers, maxRoutingIterations, morphBuffer) {\n var checkedLines = [];\n var linesToCheck = [];\n linesToCheck.push(directLine);\n var hasIntersection = true;\n var iterations = 0;\n var pointExists = function pointExists(point, lines) {\n var flag = false;\n lines.forEach(function (line) {\n if (flag) return;\n if (isPointsOverlap(point, {\n x: line.x1,\n y: line.y1\n }) || isPointsOverlap(point, {\n x: line.x2,\n y: line.y2\n })) {\n flag = true;\n }\n });\n return flag;\n };\n var isPointInNonMembers = function isPointInNonMembers(point, _nonMembers) {\n for (var _i = 0, _nonMembers_1 = _nonMembers; _i < _nonMembers_1.length; _i++) {\n var item = _nonMembers_1[_i];\n var bbox = item.getBBox();\n var itemContour = [[bbox.x, bbox.y], [bbox.x + bbox.width, bbox.y], [bbox.x, bbox.y + bbox.height], [bbox.x + bbox.width, bbox.y + bbox.height]];\n if (isPointInPolygon(itemContour, point.x, point.y)) {\n return true;\n }\n }\n return false;\n };\n // outer loop end when no more intersections or out of iterations\n while (hasIntersection && iterations < maxRoutingIterations) {\n hasIntersection = false;\n var _loop_1 = function _loop_1() {\n var line = linesToCheck.pop();\n var closestItem = getIntersectItem(nonMembers, line);\n if (closestItem) {\n var _a = itemIntersectByLine(closestItem, line),\n intersections_1 = _a[0],\n countIntersections = _a[1];\n // if line passes through item\n if (countIntersections === 2) {\n var testReroute = function testReroute(isFirst) {\n var tempMorphBuffer = morphBuffer;\n var virtualNode = rerouteLine(closestItem, tempMorphBuffer, intersections_1, isFirst);\n // test the virtualNode already exists\n var exist = pointExists(virtualNode, linesToCheck) || pointExists(virtualNode, checkedLines);\n var pointInside = isPointInNonMembers(virtualNode, nonMembers);\n while (!exist && pointInside && tempMorphBuffer >= 1) {\n // try a smaller buffer\n tempMorphBuffer /= 1.5;\n virtualNode = rerouteLine(closestItem, tempMorphBuffer, intersections_1, isFirst);\n exist = pointExists(virtualNode, linesToCheck) || pointExists(virtualNode, checkedLines);\n pointInside = isPointInNonMembers(virtualNode, nonMembers);\n }\n // 第二次route时不要求pointInside\n if (virtualNode && !exist && (!isFirst || !pointInside)) {\n // add 2 rerouted lines to check\n linesToCheck.push(new Line(line.x1, line.y1, virtualNode.x, virtualNode.y));\n linesToCheck.push(new Line(virtualNode.x, virtualNode.y, line.x2, line.y2));\n hasIntersection = true;\n }\n };\n testReroute(true);\n if (!hasIntersection) {\n // if we didn't find a valid point around the first corner, try the second\n testReroute(false);\n }\n }\n }\n // no intersection found, mark this line as completed\n if (!hasIntersection) {\n checkedLines.push(line);\n }\n iterations += 1;\n };\n // inner loop end when out of lines or found an intersection\n while (!hasIntersection && linesToCheck.length) {\n _loop_1();\n }\n }\n // 加入剩余的线\n while (linesToCheck.length) {\n checkedLines.push(linesToCheck.pop());\n }\n return checkedLines;\n};\n/**\n * Connect item with visited members using direct line or virtual edges\n */\nfunction getRoute(item, nonMembers, visited, maxRoutingIterations, morphBuffer) {\n var optimalNeighbor = pickBestNeighbor(item, visited, nonMembers);\n if (optimalNeighbor === null) {\n return [];\n }\n // merge the consecutive lines\n var mergeLines = function mergeLines(checkedLines) {\n var finalRoute = [];\n while (checkedLines.length > 0) {\n var line1 = checkedLines.pop();\n if (checkedLines.length === 0) {\n finalRoute.push(line1);\n break;\n }\n var line2 = checkedLines.pop();\n var mergeLine = new Line(line1.x1, line1.y1, line2.x2, line2.y2);\n var closestItem = getIntersectItem(nonMembers, mergeLine);\n // merge most recent line and previous line\n if (!closestItem) {\n checkedLines.push(mergeLine);\n } else {\n finalRoute.push(line1);\n checkedLines.push(line2);\n }\n }\n return finalRoute;\n };\n var directLine = new Line(item.getModel().x, item.getModel().y, optimalNeighbor.getModel().x, optimalNeighbor.getModel().y);\n var checkedLines = computeRoute(directLine, nonMembers, maxRoutingIterations, morphBuffer);\n var finalRoute = mergeLines(checkedLines);\n return finalRoute;\n}\n/**\n * Calculate the counter that includes the selected items and exclues the non-selected items\n * @param graph\n * @param members\n * @param nonMembers\n * @param options\n */\nexport var genBubbleSet = function genBubbleSet(members, nonMembers, ops) {\n // eslint-disable-next-line no-redeclare\n var options = Object.assign(defaultOps, ops);\n var centroid = getPointsCenter(members.map(function (item) {\n return {\n x: item.getModel().x,\n y: item.getModel().y\n };\n }));\n // 按照到中心距离远近排序\n members = members.sort(function (a, b) {\n return squareDist({\n x: a.getModel().x,\n y: a.getModel().y\n }, centroid) - squareDist({\n x: b.getModel().x,\n y: b.getModel().y\n }, centroid);\n });\n var visited = [];\n var virtualEdges = [];\n members.forEach(function (item) {\n var lines = getRoute(item, nonMembers, visited, options.maxRoutingIterations, options.morphBuffer);\n lines.forEach(function (l) {\n virtualEdges.push(l);\n });\n visited.push(item);\n });\n // 由于edge也可以作为member和nonMember传入,暂时不考虑把edges作为参数传入genBubbleSet\n // edges && edges.forEach(e => {\n // virtualEdges.push(new Line(e.getSource().getModel().x, e.getSource().getModel().y, e.getTarget().getModel().x, e.getTarget().getModel().y));\n // });\n var activeRegion = getActiveRregion(members, virtualEdges, options.nodeR0);\n var potentialArea = initGridCells(activeRegion.width, activeRegion.height, options.pixelGroupSize);\n // Use march squares to generate contour\n var contour = [];\n var hull = [];\n for (var iterations = 0; iterations < options.maxMarchingIterations; iterations++) {\n fillPotentialArea(members, nonMembers, virtualEdges, activeRegion, potentialArea, options);\n contour = [];\n hull = [];\n if (!new MarchingSquares(contour, potentialArea, options.threshold).march()) continue;\n var marchedPath = contour.map(function (point) {\n return {\n x: Math.round(point.x * options.pixelGroupSize + activeRegion.minX),\n y: Math.round(point.y * options.pixelGroupSize + activeRegion.minY)\n };\n });\n // const marchedPath = marchingSquares(potentialArea, options.threshold).map(point => ({ x: Math.round(point.x * options.pixelGroupSize + activeRegion.minX), y: Math.round(point.y * options.pixelGroupSize + activeRegion.minY) }))\n if (marchedPath) {\n var size = marchedPath.length;\n if (options.skip > 1) {\n size = Math.floor(marchedPath.length / options.skip);\n // if we reduced too much (fewer than three points in reduced surface) reduce skip and try again\n while (size < 3 && options.skip > 1) {\n options.skip -= 1;\n size = Math.floor(marchedPath.length / options.skip);\n }\n }\n // copy hull values\n for (var i = 0, j = 0; j < size; j += 1, i += options.skip) {\n hull.push({\n x: marchedPath[i].x,\n y: marchedPath[i].y\n });\n }\n }\n var isContourValid = function isContourValid() {\n for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {\n var item = members_1[_i];\n var hullPoints = hull.map(function (point) {\n return [point.x, point.y];\n });\n if (!isPointInPolygon(hullPoints, item.getBBox().centerX, item.getBBox().centerY)) return false;\n }\n // 不强制要求所有nonMembers都没有包含在内\n // for (const item of nonMembers) {\n // if (isPointInPolygon({ x: item.getBBox().centerX, y: item.getBBox().centerY }, contour)) return false\n // }\n return true;\n };\n if (hull && isContourValid()) {\n return hull;\n }\n // update parameters for next iteration\n options.threshold *= 0.9;\n if (iterations <= options.maxMarchingIterations * 0.5) {\n options.memberInfluenceFactor *= 1.2;\n options.edgeInfluenceFactor *= 1.2;\n } else if (options.nonMemberInfluenceFactor !== 0 && nonMembers.length > 0) {\n // after half the iterations, start increasing positive energy and lowering the threshold\n options.nonMemberInfluenceFactor *= 0.8;\n } else {\n break;\n }\n }\n return hull;\n};\n/**\n * unionboundingbox\n * @param members\n * @param edges\n */\nfunction getActiveRregion(members, edges, offset) {\n var activeRegion = {\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n var bboxes = [];\n members.forEach(function (item) {\n bboxes.push(item.getBBox());\n });\n edges.forEach(function (l) {\n bboxes.push(l.getBBox());\n });\n for (var _i = 0, bboxes_1 = bboxes; _i < bboxes_1.length; _i++) {\n var bbox = bboxes_1[_i];\n activeRegion.minX = (bbox.minX < activeRegion.minX ? bbox.minX : activeRegion.minX) - offset;\n activeRegion.minY = (bbox.minY < activeRegion.minY ? bbox.minY : activeRegion.minY) - offset;\n activeRegion.maxX = (bbox.maxX > activeRegion.maxX ? bbox.maxX : activeRegion.maxX) + offset;\n activeRegion.maxY = (bbox.maxY > activeRegion.maxY ? bbox.maxY : activeRegion.maxY) + offset;\n }\n activeRegion.width = activeRegion.maxX - activeRegion.minX;\n activeRegion.height = activeRegion.maxY - activeRegion.minY;\n activeRegion.x = activeRegion.minX;\n activeRegion.y = activeRegion.minY;\n return activeRegion;\n}\nfunction fillPotentialArea(members, nonMembers, edges, activeRegion, potentialArea, options) {\n function pos2GridIx(x, offset) {\n var gridIx = Math.floor((x - offset) / options.pixelGroupSize);\n return gridIx < 0 ? 0 : gridIx;\n }\n function gridIx2Pos(x, offset) {\n return x * options.pixelGroupSize + offset;\n }\n // using inverse a for numerical stability\n var nodeInfA = (options.nodeR0 - options.nodeR1) * (options.nodeR0 - options.nodeR1);\n var edgeInfA = (options.edgeR0 - options.edgeR1) * (options.edgeR0 - options.edgeR1);\n var getAffectedRegion = function getAffectedRegion(bbox, thresholdR) {\n var startX = Math.min(pos2GridIx(bbox.minX, thresholdR + activeRegion.minX), potentialArea.width);\n var startY = Math.min(pos2GridIx(bbox.minY, thresholdR + activeRegion.minY), potentialArea.height);\n var endX = Math.min(pos2GridIx(bbox.maxX, -thresholdR + activeRegion.minX), potentialArea.width);\n var endY = Math.min(pos2GridIx(bbox.maxY, -thresholdR + activeRegion.minY), potentialArea.height);\n return [startX, startY, endX, endY];\n };\n var addItemInfluence = function addItemInfluence(item, influenceFactor) {\n var bbox = item.getBBox();\n var _a = getAffectedRegion(bbox, options.nodeR1),\n startX = _a[0],\n startY = _a[1],\n endX = _a[2],\n endY = _a[3];\n // calculate item influence for each cell\n for (var y = startY; y < endY; y += 1) {\n for (var x = startX; x < endX; x += 1) {\n if (influenceFactor < 0 && potentialArea[x + y * potentialArea.width] <= 0) {\n continue;\n }\n var tempX = gridIx2Pos(x, activeRegion.minX);\n var tempY = gridIx2Pos(y, activeRegion.minY);\n var distanceSq = pointRectSquareDist({\n x: tempX,\n y: tempY\n }, {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n });\n if (distanceSq < Math.pow(options.nodeR1, 2)) {\n var dr = Math.sqrt(distanceSq) - options.nodeR1;\n potentialArea.cells[x + y * potentialArea.width] += influenceFactor * dr * dr;\n }\n }\n }\n };\n var addEdgeInfluence = function addEdgeInfluence(line, influenceFactor) {\n var bbox = line.getBBox();\n var _a = getAffectedRegion(bbox, options.edgeR1),\n startX = _a[0],\n startY = _a[1],\n endX = _a[2],\n endY = _a[3];\n // for every point in active part of potentialArea, calculate distance to nearest point on line and add influence\n for (var y = startY; y < endY; y += 1) {\n for (var x = startX; x < endX; x += 1) {\n if (influenceFactor < 0 && potentialArea.cells[x + y * potentialArea.width] <= 0) {\n continue;\n }\n var tempX = gridIx2Pos(x, activeRegion.minX);\n var tempY = gridIx2Pos(y, activeRegion.minY);\n var minDistanceSq = pointLineSquareDist({\n x: tempX,\n y: tempY\n }, line);\n // only influence if less than r1\n if (minDistanceSq < Math.pow(options.edgeR1, 2)) {\n var mdr = Math.sqrt(minDistanceSq) - options.edgeR1;\n potentialArea.cells[x + y * potentialArea.width] += influenceFactor * mdr * mdr;\n }\n }\n }\n };\n if (options.nodeInfluenceFactor) {\n members.forEach(function (item) {\n addItemInfluence(item, options.nodeInfluenceFactor / nodeInfA);\n });\n }\n if (options.edgeInfluenceFactor) {\n edges.forEach(function (edge) {\n addEdgeInfluence(edge, options.edgeInfluenceFactor / edgeInfA);\n });\n }\n if (options.negativeNodeInfluenceFactor) {\n nonMembers.forEach(function (item) {\n addItemInfluence(item, options.negativeNodeInfluenceFactor / nodeInfA);\n });\n }\n}\nfunction rerouteLine(item, buffer, intersections, wrapNormal) {\n var bbox = item.getBBox();\n var topIntersect = intersections[0],\n leftIntersect = intersections[1],\n bottomIntersect = intersections[2],\n rightIntersect = intersections[3];\n var cornerPos = {\n topLeft: {\n x: bbox.minX - buffer,\n y: bbox.minY - buffer\n },\n topRight: {\n x: bbox.maxX + buffer,\n y: bbox.minY - buffer\n },\n bottomLeft: {\n x: bbox.minX - buffer,\n y: bbox.maxY + buffer\n },\n bottomRight: {\n x: bbox.maxX + buffer,\n y: bbox.maxY + buffer\n }\n };\n var totalArea = bbox.height * bbox.width;\n function calcHalfArea(intersect1, intersect2) {\n return bbox.width * ((intersect1.y - bbox.minY + (intersect2.y - bbox.minY)) * 0.5);\n }\n // 根据线和boundingbox相交的情况,确定control point的位置\n if (leftIntersect) {\n // 相交区域有三角形\n if (topIntersect) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n if (bottomIntersect) return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n // 相交区域分成上下两个梯形,比较面积\n var topArea = calcHalfArea(leftIntersect, rightIntersect);\n if (topArea < totalArea * 0.5) {\n if (leftIntersect.y > rightIntersect.y) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n }\n if (leftIntersect.y < rightIntersect.y) return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n }\n if (rightIntersect) {\n if (topIntersect) return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n if (bottomIntersect) return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n }\n // 相交区域分成左右两个梯形\n var leftArea = calcHalfArea(topIntersect, bottomIntersect);\n if (leftArea < totalArea * 0.5) {\n if (topIntersect.x > bottomIntersect.x) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n }\n if (topIntersect.x < bottomIntersect.x) return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n}","import { __assign } from \"tslib\";\nimport { deepMix, isString } from '@antv/util';\nimport { parsePathString } from '@antv/path-util';\nimport { pathToPoints, getClosedSpline, roundedHull, paddedHull } from '../util/path';\nimport { isPolygonsIntersect } from '../util/math';\nimport { genConvexHull } from '../element/hull/convexHull';\nimport { genBubbleSet } from '../element/hull/bubbleset';\n/**\n * 用于包裹内部的成员的轮廓。\n * convex hull(凸包):http://geomalgorithms.com/a10-_hull-1.html#Monotone%20Chain\n * bubble: 使用 bubbleset算法,refer: http://vialab.science.uoit.ca/wp-content/papercite-data/pdf/col2009c.pdf\n * 通过配置 padding 可以调节包裹轮廓对节点的松紧程度\n */\nvar Hull = /** @class */function () {\n function Hull(graph, cfg) {\n this.cfg = deepMix(this.getDefaultCfg(), cfg);\n this.graph = graph;\n this.id = this.cfg.id;\n this.group = this.cfg.group;\n this.members = this.cfg.members.map(function (item) {\n return isString(item) ? graph.findById(item) : item;\n });\n this.nonMembers = this.cfg.nonMembers.map(function (item) {\n return isString(item) ? graph.findById(item) : item;\n });\n this.setPadding();\n this.setType();\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n }\n Hull.prototype.getDefaultCfg = function () {\n return {\n id: 'g6-hull',\n type: 'round-convex',\n members: [],\n nonMembers: [],\n style: {\n fill: 'lightblue',\n stroke: 'blue',\n opacity: 0.2\n },\n padding: 10\n };\n };\n Hull.prototype.setPadding = function () {\n var nodeSize = this.members.length && this.members[0].getKeyShape().getCanvasBBox().width / 2;\n this.padding = this.cfg.padding > 0 ? this.cfg.padding + nodeSize : 10 + nodeSize;\n this.cfg.bubbleCfg = {\n nodeR0: this.padding - nodeSize,\n nodeR1: this.padding - nodeSize,\n morphBuffer: this.padding - nodeSize\n };\n };\n Hull.prototype.setType = function () {\n this.type = this.cfg.type;\n if (this.members.length < 3) {\n this.type = 'round-convex';\n }\n if (this.type !== 'round-convex' && this.type !== 'smooth-convex' && this.type !== 'bubble') {\n console.warn('The hull type should be either round-convex, smooth-convex or bubble, round-convex is used by default.');\n this.type = 'round-convex';\n }\n };\n Hull.prototype.calcPath = function (members, nonMembers) {\n var contour, path, hull;\n switch (this.type) {\n case 'round-convex':\n contour = genConvexHull(members);\n hull = roundedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = parsePathString(hull);\n break;\n case 'smooth-convex':\n contour = genConvexHull(members);\n if (contour.length === 2) {\n hull = roundedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = parsePathString(hull);\n } else if (contour.length > 2) {\n hull = paddedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = getClosedSpline(hull);\n }\n break;\n case 'bubble':\n contour = genBubbleSet(members, nonMembers, this.cfg.bubbleCfg);\n path = contour.length >= 2 && getClosedSpline(contour);\n break;\n default:\n }\n return path;\n };\n Hull.prototype.render = function () {\n this.group.addShape('path', {\n attrs: __assign({\n path: this.path\n }, this.cfg.style),\n id: this.id,\n name: this.cfg.id,\n capture: false\n });\n this.group.toBack();\n };\n /**\n * 增加hull的成员,同时如果该成员原先在nonMembers中,则从nonMembers中去掉\n * @param item 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Hull.prototype.addMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n this.members.push(item);\n var index = this.nonMembers.indexOf(item);\n if (index > -1) {\n this.nonMembers.splice(index, 1);\n }\n this.updateData(this.members, this.nonMembers);\n return true;\n };\n /**\n * 增加hull需要排除的节点,同时如果该成员原先在members中,则从members中去掉\n * @param item 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Hull.prototype.addNonMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n this.nonMembers.push(item);\n var index = this.members.indexOf(item);\n if (index > -1) {\n this.members.splice(index, 1);\n }\n this.updateData(this.members, this.nonMembers);\n return true;\n };\n /**\n * 移除hull中的成员\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Hull.prototype.removeMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n var index = this.members.indexOf(item);\n if (index > -1) {\n this.members.splice(index, 1);\n this.updateData(this.members, this.nonMembers);\n return true;\n }\n return false;\n };\n /**\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Hull.prototype.removeNonMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n var index = this.nonMembers.indexOf(item);\n if (index > -1) {\n this.nonMembers.splice(index, 1);\n this.updateData(this.members, this.nonMembers);\n return true;\n }\n return false;\n };\n Hull.prototype.updateData = function (members, nonMembers) {\n var _this = this;\n this.group.findById(this.id).remove();\n if (members) this.members = members.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n if (nonMembers) this.nonMembers = nonMembers.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n };\n Hull.prototype.updateStyle = function (cfg) {\n var path = this.group.findById(this.id);\n path.attr(__assign({}, cfg));\n };\n /**\n * 更新 hull\n * @param cfg hull 配置项\n */\n Hull.prototype.updateCfg = function (cfg) {\n var _this = this;\n this.cfg = deepMix(this.cfg, cfg);\n this.id = this.cfg.id;\n this.group = this.cfg.group;\n if (cfg.members) {\n this.members = this.cfg.members.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n }\n if (cfg.nonMembers) {\n this.nonMembers = this.cfg.nonMembers.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n }\n // TODO padding 设置太大,会影响到 contain 结果\n this.setPadding();\n this.setType();\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n };\n /**\n * 判断是否在hull内部\n * @param item\n */\n Hull.prototype.contain = function (item) {\n var _this = this;\n var nodeItem;\n if (isString(item)) {\n nodeItem = this.graph.findById(item);\n } else {\n nodeItem = item;\n }\n var shapePoints;\n var shape = nodeItem.getKeyShape();\n if (nodeItem.get('type') === 'path') {\n shapePoints = pathToPoints(shape.attr('path'));\n } else {\n var shapeBBox = shape.getCanvasBBox();\n shapePoints = [[shapeBBox.minX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.maxY], [shapeBBox.minX, shapeBBox.maxY]];\n }\n shapePoints = shapePoints.map(function (canvasPoint) {\n var point = _this.graph.getPointByCanvas(canvasPoint[0], canvasPoint[1]);\n return [point.x, point.y];\n });\n return isPolygonsIntersect(shapePoints, pathToPoints(this.path));\n };\n Hull.prototype.destroy = function () {\n this.group.remove();\n this.cfg = null;\n };\n return Hull;\n}();\nexport default Hull;","import { __assign, __extends, __spreadArray } from \"tslib\";\nimport EventEmitter from '@antv/event-emitter';\nimport { ext } from '@antv/matrix-util';\nimport { clone, deepMix, each, isPlainObject, isString, debounce } from '@antv/util';\nimport { getDegree, getAdjMatrix as getAdjacentMatrix, Stack, floydWarshall } from '@antv/algorithm';\nimport { lerp, move } from '../util/math';\nimport { dataValidation, singleDataValidation } from '../util/validation';\nimport Global from '../global';\nimport { ItemController, ModeController, StateController, ViewController } from './controller';\nimport { plainCombosToTrees, traverseTree, reconstructTree, traverseTreeUp, getAnimateCfgWithCallback } from '../util/graphic';\nimport Hull from '../item/hull';\nvar transform = ext.transform;\nvar NODE = 'node';\nvar AbstractGraph = /** @class */function (_super) {\n __extends(AbstractGraph, _super);\n function AbstractGraph(cfg) {\n var _this = _super.call(this) || this;\n /**\n * 根据 comboTree 结构整理 Combo 相关的图形绘制层级,包括 Combo 本身、节点、边\n * @param {GraphData} data 数据\n */\n _this.sortCombos = debounce(function () {\n var comboSorted = _this.get('comboSorted');\n if (!_this || _this.destroyed || comboSorted) return;\n _this.set('comboSorted', true);\n var depthMap = [];\n var dataDepthMap = {};\n var comboTrees = _this.get('comboTrees');\n (comboTrees || []).forEach(function (cTree) {\n traverseTree(cTree, function (child) {\n if (depthMap[child.depth]) depthMap[child.depth].push(child.id);else depthMap[child.depth] = [child.id];\n dataDepthMap[child.id] = child.depth;\n return true;\n });\n });\n var edges = _this.getEdges().concat(_this.get('vedges'));\n (edges || []).forEach(function (edgeItem) {\n var edge = edgeItem.getModel();\n var sourceDepth = dataDepthMap[edge.source] || 0;\n var targetDepth = dataDepthMap[edge.target] || 0;\n var depth = Math.max(sourceDepth, targetDepth);\n if (depthMap[depth]) depthMap[depth].push(edge.id);else depthMap[depth] = [edge.id];\n });\n depthMap.forEach(function (array) {\n if (!array || !array.length) return;\n for (var i = array.length - 1; i >= 0; i--) {\n var item = _this.findById(array[i]);\n if (item) item.toFront();\n }\n });\n }, 500, false);\n _this.cfg = deepMix(_this.getDefaultCfg(), cfg);\n _this.init();\n _this.animating = false;\n _this.destroyed = false;\n // 启用 stack 后,实例化 undoStack 和 redoStack\n if (_this.cfg.enabledStack) {\n // 实例化 undo 和 redo 栈\n _this.undoStack = new Stack(_this.cfg.maxStep);\n _this.redoStack = new Stack(_this.cfg.maxStep);\n }\n return _this;\n }\n AbstractGraph.prototype.init = function () {\n this.initCanvas();\n // instance controller\n var viewController = new ViewController(this);\n var modeController = new ModeController(this);\n var itemController = new ItemController(this);\n var stateController = new StateController(this);\n this.set({\n viewController: viewController,\n modeController: modeController,\n itemController: itemController,\n stateController: stateController\n });\n // 初始化布局机制\n this.initLayoutController();\n // 初始化事件机制\n this.initEventController();\n this.initGroups();\n /** 初始化插件 */\n this.initPlugins();\n };\n // 初始化所有 Group\n AbstractGraph.prototype.initGroups = function () {\n var canvas = this.get('canvas');\n if (!canvas) return;\n var el = canvas.get('el');\n var _a = (el || {}).id,\n id = _a === void 0 ? 'g6' : _a;\n var group = canvas.addGroup({\n id: \"\".concat(id, \"-root\"),\n className: Global.rootContainerClassName\n });\n if (this.get('groupByTypes')) {\n var edgeGroup = group.addGroup({\n id: \"\".concat(id, \"-edge\"),\n className: Global.edgeContainerClassName\n });\n var nodeGroup = group.addGroup({\n id: \"\".concat(id, \"-node\"),\n className: Global.nodeContainerClassName\n });\n var comboGroup = group.addGroup({\n id: \"\".concat(id, \"-combo\"),\n className: Global.comboContainerClassName\n });\n // 用于存储自定义的群组\n comboGroup.toBack();\n this.set({\n nodeGroup: nodeGroup,\n edgeGroup: edgeGroup,\n comboGroup: comboGroup\n });\n }\n var delegateGroup = group.addGroup({\n id: \"\".concat(id, \"-delegate\"),\n className: Global.delegateContainerClassName\n });\n this.set({\n delegateGroup: delegateGroup\n });\n this.set('group', group);\n };\n // eslint-disable-next-line class-methods-use-this\n AbstractGraph.prototype.getDefaultCfg = function () {\n return {\n /**\n * Container could be dom object or dom id\n */\n container: undefined,\n /**\n * Canvas width\n * unit pixel if undefined force fit width\n */\n width: undefined,\n /**\n * Canvas height\n * unit pixel if undefined force fit height\n */\n height: undefined,\n /**\n * renderer canvas or svg\n * @type {string}\n */\n renderer: 'canvas',\n /**\n * control graph behaviors\n */\n modes: {},\n /**\n * 注册插件\n */\n plugins: [],\n /**\n * source data\n */\n data: {},\n /**\n * Fit view padding (client scale)\n */\n fitViewPadding: 10,\n /**\n * Minimum scale size\n */\n minZoom: 0.02,\n /**\n * Maxmum scale size\n */\n maxZoom: 10,\n /**\n * capture events\n */\n event: true,\n /**\n * group node & edges into different graphic groups\n */\n groupByTypes: true,\n /**\n * determine if it's a directed graph\n */\n directed: false,\n /**\n * when data or shape changed, should canvas draw automatically\n */\n autoPaint: true,\n /**\n * store all the node instances\n */\n nodes: [],\n /**\n * store all the edge instances\n */\n edges: [],\n /**\n * store all the combo instances\n */\n combos: [],\n /**\n * store all the edge instances which are virtual edges related to collapsed combo\n */\n vedges: [],\n /**\n * all the instances indexed by id\n */\n itemMap: {},\n /**\n * 边直接连接到节点的中心,不再考虑锚点\n */\n linkCenter: false,\n /**\n * 默认的节点配置,data 上定义的配置会覆盖这些配置。例如:\n * defaultNode: {\n * type: 'rect',\n * size: [60, 40],\n * style: {\n * //... 样式配置项\n * }\n * }\n * 若数据项为 { id: 'node', x: 100, y: 100 }\n * 实际创建的节点模型是 { id: 'node', x: 100, y: 100, type: 'rect', size: [60, 40] }\n * 若数据项为 { id: 'node', x: 100, y: 100, type: 'circle' }\n * 实际创建的节点模型是 { id: 'node', x: 100, y: 100, type: 'circle', size: [60, 40] }\n */\n defaultNode: {},\n /**\n * 默认边配置,data 上定义的配置会覆盖这些配置。用法同 defaultNode\n */\n defaultEdge: {},\n /**\n * 节点默认样式,也可以添加状态样式\n * 例如:\n * const graph = new G6.Graph({\n * nodeStateStyles: {\n * selected: { fill: '#ccc', stroke: '#666' },\n * active: { lineWidth: 2 }\n * },\n * ...\n * });\n *\n */\n nodeStateStyles: {},\n /**\n * 边默认样式,用法同nodeStateStyle\n */\n edgeStateStyles: {},\n /**\n * graph 状态\n */\n states: {},\n /**\n * 是否启用全局动画\n */\n animate: false,\n /**\n * 动画设置,仅在 animate 为 true 时有效\n */\n animateCfg: {\n /**\n * 帧回调函数,用于自定义节点运动路径,为空时线性运动\n */\n onFrame: undefined,\n /**\n * 动画时长(ms)\n */\n duration: 500,\n /**\n * 指定动画动效\n */\n easing: 'easeLinear'\n },\n callback: undefined,\n // 默认不启用 undo & redo 功能\n enabledStack: false,\n // 只有当 enabledStack 为 true 时才起作用\n maxStep: 10,\n // 存储图上的 tooltip dom,方便销毁\n tooltips: [],\n // 达到这一节点数量(默认值 1000),将开启性能优化模式。目前包括:节点状态样式变更是否影响相关边的更新\n optimizeThreshold: 1000\n };\n };\n /**\n * 将值设置到 this.cfg 变量上面\n * @param key 键 或 对象值\n * @param val 值\n */\n AbstractGraph.prototype.set = function (key, val) {\n if (isPlainObject(key)) {\n this.cfg = __assign(__assign({}, this.cfg), key);\n } else {\n this.cfg[key] = val;\n }\n if (key === 'enabledStack' && val && !this.undoStack && !this.redoStack) {\n this.undoStack = new Stack(this.cfg.maxStep);\n this.redoStack = new Stack(this.cfg.maxStep);\n }\n return this;\n };\n /**\n * 获取 this.cfg 中的值\n * @param key 键\n */\n AbstractGraph.prototype.get = function (key) {\n var _a;\n return (_a = this.cfg) === null || _a === void 0 ? void 0 : _a[key];\n };\n /**\n * 获取 graph 的根图形分组\n * @return 根 group\n */\n AbstractGraph.prototype.getGroup = function () {\n return this.get('group');\n };\n /**\n * 获取 graph 的 DOM 容器\n * @return DOM 容器\n */\n AbstractGraph.prototype.getContainer = function () {\n return this.get('container');\n };\n /**\n * 获取 graph 的最小缩放比例\n * @return minZoom\n */\n AbstractGraph.prototype.getMinZoom = function () {\n return this.get('minZoom');\n };\n /**\n * 设置 graph 的最小缩放比例\n * @return minZoom\n */\n AbstractGraph.prototype.setMinZoom = function (ratio) {\n return this.set('minZoom', ratio);\n };\n /**\n * 获取 graph 的最大缩放比例\n * @param maxZoom\n */\n AbstractGraph.prototype.getMaxZoom = function () {\n return this.get('maxZoom');\n };\n /**\n * 设置 graph 的最大缩放比例\n * @param maxZoom\n */\n AbstractGraph.prototype.setMaxZoom = function (ratio) {\n return this.set('maxZoom', ratio);\n };\n /**\n * 获取 graph 的宽度\n * @return width\n */\n AbstractGraph.prototype.getWidth = function () {\n return this.get('width');\n };\n /**\n * 获取 graph 的高度\n * @return width\n */\n AbstractGraph.prototype.getHeight = function () {\n return this.get('height');\n };\n /**\n * 清理元素多个状态\n * @param {string|Item} item 元素id或元素实例\n * @param {string[]} states 状态\n */\n AbstractGraph.prototype.clearItemStates = function (item, states) {\n if (isString(item)) {\n item = this.findById(item);\n }\n var itemController = this.get('itemController');\n if (!states) {\n states = item.get('states');\n }\n itemController.clearItemStates(item, states);\n var stateController = this.get('stateController');\n stateController.updateStates(item, states, false);\n };\n /**\n * 设置各个节点样式,以及在各种状态下节点 keyShape 的样式。\n * 若是自定义节点切在各种状态下\n * graph.node(node => {\n * return {\n * type: 'rect',\n * label: node.id,\n * style: { fill: '#666' },\n * stateStyles: {\n * selected: { fill: 'blue' },\n * custom: { fill: 'green' }\n * }\n * }\n * });\n * @param {function} nodeFn 指定每个节点样式\n */\n AbstractGraph.prototype.node = function (nodeFn) {\n if (typeof nodeFn === 'function') {\n this.set('nodeMapper', nodeFn);\n }\n };\n /**\n * 设置各个边样式\n * @param {function} edgeFn 指定每个边的样式,用法同 node\n */\n AbstractGraph.prototype.edge = function (edgeFn) {\n if (typeof edgeFn === 'function') {\n this.set('edgeMapper', edgeFn);\n }\n };\n /**\n * 设置各个 combo 的配置\n * @param comboFn\n */\n AbstractGraph.prototype.combo = function (comboFn) {\n if (typeof comboFn === 'function') {\n this.set('comboMapper', comboFn);\n }\n };\n /**\n * 根据 ID 查询图元素实例\n * @param id 图元素 ID\n */\n AbstractGraph.prototype.findById = function (id) {\n return this.get('itemMap')[id];\n };\n /**\n * 根据对应规则查找单个元素\n * @param {ITEM_TYPE} type 元素类型(node | edge | group)\n * @param {(item: T, index: number) => T} fn 指定规则\n * @return {T} 元素实例\n */\n AbstractGraph.prototype.find = function (type, fn) {\n var result;\n var items = this.get(\"\".concat(type, \"s\"));\n // eslint-disable-next-line consistent-return\n each(items, function (item, i) {\n if (fn(item, i)) {\n result = item;\n return result;\n }\n });\n return result;\n };\n /**\n * 查找所有满足规则的元素\n * @param {string} type 元素类型(node|edge)\n * @param {string} fn 指定规则\n * @return {array} 元素实例\n */\n AbstractGraph.prototype.findAll = function (type, fn) {\n var result = [];\n each(this.get(\"\".concat(type, \"s\")), function (item, i) {\n if (fn(item, i)) {\n result.push(item);\n }\n });\n return result;\n };\n /**\n * 查找所有处于指定状态的元素\n * @param {string} type 元素类型(node|edge)\n * @param {string} state 状态\n * @return {object} 元素实例\n */\n AbstractGraph.prototype.findAllByState = function (type, state, additionalFilter) {\n if (additionalFilter) {\n return this.findAll(type, function (item) {\n return item.hasState(state) && additionalFilter(item);\n });\n } else {\n return this.findAll(type, function (item) {\n return item.hasState(state);\n });\n }\n };\n /**\n * 平移画布\n * @param dx 水平方向位移\n * @param dy 垂直方向位移\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.translate = function (dx, dy, animate, animateCfg) {\n var _this = this;\n var group = this.get('group');\n var matrix = clone(group.getMatrix());\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n if (animate) {\n var animateConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n return _this.emit('viewportchange', {\n action: 'translate',\n matrix: group.getMatrix()\n });\n }\n });\n move(group, {\n x: group.getCanvasBBox().x + dx,\n y: group.getCanvasBBox().y + dy\n }, animate, animateConfig || {\n duration: 500,\n easing: 'easeCubic'\n });\n } else {\n matrix = transform(matrix, [['t', dx, dy]]);\n group.setMatrix(matrix);\n this.emit('viewportchange', {\n action: 'translate',\n matrix: matrix\n });\n this.autoPaint();\n }\n };\n /**\n * 平移画布到某点\n * @param {number} x 水平坐标\n * @param {number} y 垂直坐标\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.moveTo = function (x, y, animate, animateCfg) {\n var group = this.get('group');\n move(group, {\n x: x,\n y: y\n }, animate, animateCfg || {\n duration: 500,\n easing: 'easeCubic'\n });\n this.emit('viewportchange', {\n action: 'move',\n matrix: group.getMatrix()\n });\n };\n /**\n * 调整视口适应视图\n * @param {object} padding 四周围边距\n * @param {FitViewRules} rules fitView的规则\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.fitView = function (padding, rules, animate, animateCfg) {\n if (padding) {\n this.set('fitViewPadding', padding);\n }\n var viewController = this.get('viewController');\n if (rules) {\n viewController.fitViewByRules(rules, animate, animateCfg);\n } else {\n viewController.fitView(animate, animateCfg);\n }\n this.autoPaint();\n };\n /**\n * 调整视口适应视图,不缩放,仅将图 bbox 中心对齐到画布中心\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.fitCenter = function (animate, animateCfg) {\n var viewController = this.get('viewController');\n viewController.fitCenter(animate, animateCfg);\n this.autoPaint();\n };\n /**\n * 新增行为\n * @param {string | ModeOption | ModeType[]} behaviors 添加的行为\n * @param {string | string[]} modes 添加到对应的模式\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.addBehaviors = function (behaviors, modes) {\n var modeController = this.get('modeController');\n modeController.manipulateBehaviors(behaviors, modes, true);\n return this;\n };\n /**\n * 移除行为\n * @param {string | ModeOption | ModeType[]} behaviors 移除的行为\n * @param {string | string[]} modes 从指定的模式中移除\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.removeBehaviors = function (behaviors, modes) {\n var modeController = this.get('modeController');\n modeController.manipulateBehaviors(behaviors, modes, false);\n return this;\n };\n /**\n * 更新行为参数\n * @param {string | ModeOption | ModeType} behavior 需要更新的行为\n * @param {string | string[]} modes 指定的模式中的行为,不指定则为 default\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.updateBehavior = function (behavior, newCfg, mode) {\n var modeController = this.get('modeController');\n modeController.updateBehavior(behavior, newCfg, mode);\n return this;\n };\n /**\n * 伸缩窗口\n * @param ratio 伸缩比例\n * @param center 以center的x, y坐标为中心缩放\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n * @return {boolean} 缩放是否成功\n */\n AbstractGraph.prototype.zoom = function (ratio, center, animate, animateCfg) {\n var _this = this;\n var group = this.get('group');\n var matrix = clone(group.getMatrix()) || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var minZoom = this.get('minZoom');\n var maxZoom = this.get('maxZoom');\n var currentZoom = this.getZoom() || 1;\n var targetZoom = currentZoom * ratio;\n var finalRatio = ratio;\n var failed = false;\n if (minZoom && targetZoom < minZoom) {\n finalRatio = minZoom / currentZoom;\n failed = true;\n } else if (maxZoom && targetZoom > maxZoom) {\n finalRatio = maxZoom / currentZoom;\n failed = true;\n }\n if (center) {\n matrix = transform(matrix, [['t', -center.x, -center.y], ['s', finalRatio, finalRatio], ['t', center.x, center.y]]);\n } else {\n matrix = transform(matrix, [['s', finalRatio, finalRatio]]);\n }\n if (animate) {\n // Clone the original matrix to perform the animation\n var aniMatrix_1 = clone(group.getMatrix());\n if (!aniMatrix_1) {\n aniMatrix_1 = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var initialRatio_1 = aniMatrix_1[0];\n var targetRatio_1 = initialRatio_1 * finalRatio;\n var animateConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n return _this.emit('viewportchange', {\n action: 'zoom',\n matrix: group.getMatrix()\n });\n }\n });\n group.animate(function (ratio) {\n if (ratio === 1) {\n // Reuse the first transformation\n aniMatrix_1 = matrix;\n } else {\n var scale = lerp(initialRatio_1, targetRatio_1, ratio) / aniMatrix_1[0];\n if (center) {\n aniMatrix_1 = transform(aniMatrix_1, [['t', -center.x, -center.y], ['s', scale, scale], ['t', center.x, center.y]]);\n } else {\n aniMatrix_1 = transform(aniMatrix_1, [['s', scale, scale]]);\n }\n }\n return {\n matrix: aniMatrix_1\n };\n }, animateConfig);\n } else {\n group.setMatrix(matrix);\n this.emit('viewportchange', {\n action: 'zoom',\n matrix: matrix\n });\n this.autoPaint();\n }\n return !failed;\n };\n /**\n * 伸缩视口到一固定比例\n * @param {number} toRatio 伸缩比例\n * @param {Point} center 以center的x, y坐标为中心缩放\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n * @return {boolean} 缩放是否成功\n */\n AbstractGraph.prototype.zoomTo = function (toRatio, center, animate, animateCfg) {\n var ratio = toRatio / this.getZoom();\n return this.zoom(ratio, center, animate, animateCfg);\n };\n /**\n * 将元素移动到视口中心\n * @param {Item} item 指定元素\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.focusItem = function (item, animate, animateCfg) {\n var viewController = this.get('viewController');\n var isAnimate = false;\n if (animate) isAnimate = true;else if (animate === undefined) isAnimate = this.get('animate');\n var curAniamteCfg = {};\n if (animateCfg) curAniamteCfg = animateCfg;else if (animateCfg === undefined) curAniamteCfg = this.get('animateCfg');\n viewController.focus(item, isAnimate, curAniamteCfg);\n this.autoPaint();\n };\n /**\n * Focus on the passed items\n * @param {Item[]} items Items you want to focus on\n * @param {boolean} zoomToFit Wether to zoom on the passed items\n * @param {boolean} animate Wether to animate the transition\n * @param {GraphAnimateConfig} animateCfg Animation configuration\n */\n AbstractGraph.prototype.focusItems = function (items, zoomToFit, animate, animateCfg) {\n var viewController = this.get('viewController');\n viewController.focusItems(items, zoomToFit, animate, animateCfg);\n };\n /**\n * 自动重绘\n * @internal 仅供内部更新机制调用,外部根据需求调用 render 或 paint 接口\n */\n AbstractGraph.prototype.autoPaint = function () {\n if (this.get('autoPaint')) {\n this.paint();\n }\n };\n /**\n * 仅画布重新绘制\n */\n AbstractGraph.prototype.paint = function () {\n this.emit('beforepaint');\n this.get('canvas').draw();\n this.emit('afterpaint');\n };\n /**\n * 将屏幕坐标转换为视口坐标\n * @param {number} clientX 屏幕x坐标\n * @param {number} clientY 屏幕y坐标\n * @return {Point} 视口坐标\n */\n AbstractGraph.prototype.getPointByClient = function (clientX, clientY) {\n var viewController = this.get('viewController');\n return viewController.getPointByClient(clientX, clientY);\n };\n /**\n * 将绘制坐标转换为屏幕坐标\n * @param {number} x 绘制坐标 x\n * @param {number} y 绘制坐标 y\n * @return {Point} 绘制坐标\n */\n AbstractGraph.prototype.getClientByPoint = function (x, y) {\n var viewController = this.get('viewController');\n return viewController.getClientByPoint(x, y);\n };\n /**\n * 将画布坐标转换为绘制坐标\n * @param {number} canvasX 画布 x 坐标\n * @param {number} canvasY 画布 y 坐标\n * @return {object} 绘制坐标\n */\n AbstractGraph.prototype.getPointByCanvas = function (canvasX, canvasY) {\n var viewController = this.get('viewController');\n return viewController.getPointByCanvas(canvasX, canvasY);\n };\n /**\n * 将绘制坐标转换为画布坐标\n * @param {number} x 绘制坐标 x\n * @param {number} y 绘制坐标 y\n * @return {object} 画布坐标\n */\n AbstractGraph.prototype.getCanvasByPoint = function (x, y) {\n var viewController = this.get('viewController');\n return viewController.getCanvasByPoint(x, y);\n };\n /**\n * 获取图内容的中心绘制坐标\n * @return {object} 中心绘制坐标\n */\n AbstractGraph.prototype.getGraphCenterPoint = function () {\n var bbox = this.get('group').getCanvasBBox();\n return {\n x: (bbox.minX + bbox.maxX) / 2,\n y: (bbox.minY + bbox.maxY) / 2\n };\n };\n /**\n * 获取视口中心绘制坐标\n * @return {object} 视口中心绘制坐标\n */\n AbstractGraph.prototype.getViewPortCenterPoint = function () {\n return this.getPointByCanvas(this.get('width') / 2, this.get('height') / 2);\n };\n /**\n * 显示元素\n * @param {Item} item 指定元素\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.showItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var object = itemController.changeItemVisibility(item, true);\n if (stack && this.get('enabledStack')) {\n var id = object.getID();\n var type = object.getType();\n var before = {};\n var after = {};\n switch (type) {\n case 'node':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.nodes = [{\n id: id,\n visible: true\n }];\n break;\n case 'edge':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.edges = [{\n id: id,\n visible: true\n }];\n break;\n case 'combo':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.combos = [{\n id: id,\n visible: true\n }];\n break;\n default:\n break;\n }\n this.pushStack('visible', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 隐藏元素\n * @param {Item} item 指定元素\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.hideItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var object = itemController.changeItemVisibility(item, false);\n if (stack && this.get('enabledStack')) {\n var id = object.getID();\n var type = object.getType();\n var before = {};\n var after = {};\n switch (type) {\n case 'node':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.nodes = [{\n id: id,\n visible: false\n }];\n break;\n case 'edge':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.edges = [{\n id: id,\n visible: false\n }];\n break;\n case 'combo':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.combos = [{\n id: id,\n visible: false\n }];\n break;\n default:\n break;\n }\n this.pushStack('visible', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 刷新元素\n * @param {string|object} item 元素id或元素实例\n */\n AbstractGraph.prototype.refreshItem = function (item) {\n var itemController = this.get('itemController');\n itemController.refreshItem(item);\n };\n /**\n * 设置是否在更新/刷新后自动重绘\n * @param {boolean} auto 自动重绘\n */\n AbstractGraph.prototype.setAutoPaint = function (auto) {\n var self = this;\n self.set('autoPaint', auto);\n var canvas = self.get('canvas');\n canvas.set('autoDraw', auto);\n };\n /**\n * 删除元素\n * @param {Item} item 元素id或元素实例\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.remove = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n this.removeItem(item, stack);\n };\n /**\n * 删除元素\n * @param {Item} item 元素id或元素实例\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.removeItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var nodeItem = item;\n if (isString(item)) nodeItem = this.findById(item);\n if (!nodeItem && isString(item)) {\n console.warn(\"The item \".concat(item, \" to be removed does not exist!\"));\n } else if (nodeItem) {\n var type = '';\n if (nodeItem.getType) type = nodeItem.getType();\n // 将删除的元素入栈\n if (stack && this.get('enabledStack')) {\n var deletedModel = __assign(__assign({}, nodeItem.getModel()), {\n itemType: type\n });\n var before = {};\n switch (type) {\n case 'node':\n {\n before.nodes = [deletedModel];\n before.edges = [];\n var edges = nodeItem.getEdges();\n for (var i = edges.length - 1; i >= 0; i--) {\n before.edges.push(__assign(__assign({}, edges[i].getModel()), {\n itemType: 'edge'\n }));\n }\n break;\n }\n case 'edge':\n before.edges = [deletedModel];\n break;\n case 'combo':\n before.combos = [deletedModel];\n break;\n default:\n break;\n }\n this.pushStack('delete', {\n before: before,\n after: {}\n });\n }\n if (type === 'node') {\n var model = nodeItem.getModel();\n // 如果删除的是节点,且该节点存在于某个 Combo 中,则需要先将 node 从 combo 中移除,否则删除节点后,操作 combo 会出错\n if (model.comboId) {\n this.updateComboTree(nodeItem, undefined, false);\n }\n }\n var itemController = this.get('itemController');\n itemController.removeItem(nodeItem);\n if (type === 'combo') {\n var newComboTrees = reconstructTree(this.get('comboTrees'));\n this.set('comboTrees', newComboTrees);\n }\n }\n };\n AbstractGraph.prototype.innerAddItem = function (type, model, itemController) {\n // 添加节点、边或combo之前,先验证数据是否符合规范\n if (!singleDataValidation(type, model)) {\n return false;\n }\n if (model.id && this.findById(model.id)) {\n console.warn(\"This item exists already. Be sure the id %c\".concat(model.id, \"%c is unique.\"), 'font-size: 20px; color: red;', '');\n return;\n }\n var item;\n var comboTrees = this.get('comboTrees') || [];\n if (type === 'combo') {\n var itemMap_1 = this.get('itemMap');\n var foundParent_1 = false;\n comboTrees.forEach(function (ctree) {\n if (foundParent_1) return; // terminate the forEach after the tree containing the item is done\n traverseTreeUp(ctree, function (child) {\n // find the parent\n if (model.parentId === child.id) {\n foundParent_1 = true;\n var newCombo = __assign({\n id: model.id,\n depth: child.depth + 2\n }, model);\n if (child.children) child.children.push(newCombo);else child.children = [newCombo];\n model.depth = newCombo.depth;\n item = itemController.addItem(type, model);\n }\n var childItem = itemMap_1[child.id];\n // after the parent is found, update all the ancestors\n if (foundParent_1 && childItem && childItem.getType && childItem.getType() === 'combo') {\n itemController.updateCombo(childItem, child.children);\n }\n return true;\n });\n });\n // if the parent is not found, add it to the root\n if (!foundParent_1) {\n var newCombo = __assign({\n id: model.id,\n depth: 0\n }, model);\n model.depth = newCombo.depth;\n comboTrees.push(newCombo);\n item = itemController.addItem(type, model);\n }\n this.set('comboTrees', comboTrees);\n if (model.collapsed) {\n this.collapseCombo(item, false);\n this.updateCombo(item);\n }\n } else if (type === 'node' && isString(model.comboId) && comboTrees) {\n var parentCombo = this.findById(model.comboId);\n if (parentCombo && parentCombo.getType && parentCombo.getType() !== 'combo') {\n console.warn(\"'\".concat(model.comboId, \"' is not a id of a combo in the graph, the node will be added without combo.\"));\n }\n item = itemController.addItem(type, model);\n var itemMap_2 = this.get('itemMap');\n var foundParent_2 = false,\n foundNode_1 = false;\n comboTrees.forEach(function (ctree) {\n if (foundNode_1 || foundParent_2) return; // terminate the forEach\n traverseTreeUp(ctree, function (child) {\n if (child.id === model.id) {\n // if the item exists in the tree already, terminate\n foundNode_1 = true;\n return false;\n }\n if (model.comboId === child.id && !foundNode_1) {\n // found the parent, add the item to the children of its parent in the tree\n foundParent_2 = true;\n var cloneNode = clone(model);\n cloneNode.itemType = 'node';\n if (child.children) child.children.push(cloneNode);else child.children = [cloneNode];\n cloneNode.depth = child.depth + 1;\n }\n // update the size of all the ancestors\n if (foundParent_2 && itemMap_2[child.id].getType && itemMap_2[child.id].getType() === 'combo') {\n itemController.updateCombo(itemMap_2[child.id], child.children);\n }\n return true;\n });\n });\n } else {\n item = itemController.addItem(type, model);\n }\n if (type === 'node' && model.comboId || type === 'combo' && model.parentId) {\n // add the combo to the parent's children array\n var parentCombo = this.findById(model.comboId || model.parentId);\n if (parentCombo && parentCombo.getType && parentCombo.getType() === 'combo') parentCombo.addChild(item);\n }\n return item;\n };\n /**\n * 新增元素\n * @param {ITEM_TYPE} type 元素类型(node | edge)\n * @param {ModelConfig} model 元素数据模型\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n * @param {boolean} sortCombo 本次操作是否需要更新 combo 层级顺序,内部参数,用户在外部使用 addItem 时始终时需要更新\n * @return {Item} 元素实例\n */\n AbstractGraph.prototype.addItem = function (type, model, stack, sortCombo) {\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n var currentComboSorted = this.get('comboSorted');\n this.set('comboSorted', currentComboSorted && !sortCombo);\n var itemController = this.get('itemController');\n var item = this.innerAddItem(type, model, itemController);\n if (item === false || item === true) {\n return item;\n }\n var combos = this.get('combos');\n if (combos && combos.length > 0) {\n this.sortCombos();\n }\n this.autoPaint();\n if (stack && this.get('enabledStack')) {\n var addedModel = __assign(__assign({}, item.getModel()), {\n itemType: type\n });\n var after = {};\n switch (type) {\n case 'node':\n after.nodes = [addedModel];\n break;\n case 'edge':\n after.edges = [addedModel];\n break;\n case 'combo':\n after.combos = [addedModel];\n break;\n default:\n break;\n }\n this.pushStack('add', {\n before: {},\n after: after\n });\n }\n return item;\n };\n AbstractGraph.prototype.addItems = function (items, stack, sortCombo) {\n if (items === void 0) {\n items = [];\n }\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n var currentComboSorted = this.get('comboSorted');\n this.set('comboSorted', currentComboSorted && !sortCombo);\n var itemController = this.get('itemController');\n var returnItems = [];\n // 1. add anything that is not an edge.\n // Add undefined as a placeholder for the next cycle. This way we return items matching the input order\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n if (item.type !== 'edge' && item.type !== 'vedge') {\n returnItems.push(this.innerAddItem(item.type, item.model, itemController));\n } else {\n returnItems.push(undefined);\n }\n }\n // 2. add all the edges\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n if (item.type === 'edge' || item.type === 'vedge') {\n returnItems[i] = this.innerAddItem(item.type, item.model, itemController);\n }\n }\n if (sortCombo) {\n var combos = this.get('combos');\n if (combos && combos.length > 0) {\n this.sortCombos();\n }\n }\n this.autoPaint();\n if (stack && this.get('enabledStack')) {\n var after = {\n nodes: [],\n edges: [],\n combos: []\n };\n for (var i = 0; i < items.length; i++) {\n var type = items[i].type;\n var returnItem = returnItems[i];\n if (!!returnItem && returnItem !== true) {\n var addedModel = __assign(__assign({}, returnItem.getModel()), {\n itemType: type\n });\n switch (type) {\n case 'node':\n after.nodes.push(addedModel);\n break;\n case 'edge':\n after.edges.push(addedModel);\n break;\n case 'combo':\n after.combos.push(addedModel);\n break;\n default:\n break;\n }\n }\n }\n this.pushStack('addItems', {\n before: {},\n after: after\n });\n }\n return returnItems;\n };\n /**\n * 新增元素\n * @param {ITEM_TYPE} type 元素类型(node | edge)\n * @param {ModelConfig} model 元素数据模型\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n * @param {boolean} sortCombo 本次操作是否需要更新 combo 层级顺序,内部参数,用户在外部使用 addItem 时始终时需要更新\n * @return {Item} 元素实例\n */\n AbstractGraph.prototype.add = function (type, model, stack, sortCombo) {\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n return this.addItem(type, model, stack, sortCombo);\n };\n /**\n * 更新元素\n * @param {Item} item 元素id或元素实例\n * @param {Partial | EdgeConfig} cfg 需要更新的数据\n */\n AbstractGraph.prototype.updateItem = function (item, cfg, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var currentItem;\n if (isString(item)) {\n currentItem = this.findById(item);\n } else {\n currentItem = item;\n }\n var stackEnabled = stack && this.get('enabledStack');\n var unupdatedModel;\n if (stackEnabled) {\n unupdatedModel = clone(currentItem.getModel());\n }\n var type = '';\n if (currentItem.getType) type = currentItem.getType();\n var states = __spreadArray([], currentItem.getStates(), true);\n if (type === 'combo') {\n each(states, function (state) {\n return _this.setItemState(currentItem, state, false);\n });\n }\n itemController.updateItem(currentItem, cfg);\n if (type === 'combo') {\n each(states, function (state) {\n return _this.setItemState(currentItem, state, true);\n });\n }\n if (stackEnabled) {\n var before = {\n nodes: [],\n edges: [],\n combos: []\n };\n var after = {\n nodes: [],\n edges: [],\n combos: []\n };\n var afterModel = __assign({\n id: unupdatedModel.id\n }, cfg);\n switch (type) {\n case 'node':\n before.nodes.push(unupdatedModel);\n after.nodes.push(afterModel);\n break;\n case 'edge':\n before.edges.push(unupdatedModel);\n after.edges.push(afterModel);\n break;\n case 'combo':\n before.combos.push(unupdatedModel);\n after.combos.push(afterModel);\n break;\n default:\n break;\n }\n this.pushStack('update', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 更新元素\n * @param {Item} item 元素id或元素实例\n * @param {Partial | EdgeConfig} cfg 需要更新的数据\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.update = function (item, cfg, stack) {\n if (stack === void 0) {\n stack = true;\n }\n this.updateItem(item, cfg, stack);\n };\n /**\n * 设置元素状态\n * @param {Item} item 元素id或元素实例\n * @param {string} state 状态名称\n * @param {string | boolean} value 是否启用状态 或 状态值\n */\n AbstractGraph.prototype.setItemState = function (item, state, value) {\n if (isString(item)) {\n item = this.findById(item);\n }\n var itemController = this.get('itemController');\n itemController.setItemState(item, state, value);\n var stateController = this.get('stateController');\n stateController.updateState(item, state, value);\n };\n /**\n * 将指定状态的优先级提升为最高优先级\n * @param {Item} item 元素id或元素实例\n * @param state 状态名称\n */\n AbstractGraph.prototype.priorityState = function (item, state) {\n var itemController = this.get('itemController');\n itemController.priorityState(item, state);\n };\n /**\n * 设置视图初始化数据\n * @param {GraphData} data 初始化数据\n */\n AbstractGraph.prototype.data = function (data) {\n dataValidation(data);\n this.set('data', data);\n };\n /**\n * 根据data接口的数据渲染视图\n */\n AbstractGraph.prototype.render = function () {\n var self = this;\n this.set('comboSorted', false);\n var data = this.get('data');\n if (this.get('enabledStack')) {\n // render 之前清空 redo 和 undo 栈\n this.clearStack();\n }\n if (!data) {\n throw new Error('data must be defined first');\n }\n var _a = data.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = data.edges,\n edges = _b === void 0 ? [] : _b,\n _c = data.combos,\n combos = _c === void 0 ? [] : _c;\n this.clear(true);\n this.emit('beforerender');\n self.addItems(nodes.map(function (node) {\n return {\n type: 'node',\n model: node\n };\n }), false, false);\n // process the data to tree structure\n if ((combos === null || combos === void 0 ? void 0 : combos.length) !== 0) {\n var comboTrees = plainCombosToTrees(combos, nodes);\n this.set('comboTrees', comboTrees);\n // add combos\n self.addCombos(combos);\n }\n self.addItems(edges.map(function (edge) {\n return {\n type: 'edge',\n model: edge\n };\n }), false, false);\n var animate = self.get('animate');\n if (self.get('fitView') || self.get('fitCenter')) {\n self.set('animate', false);\n }\n // layout\n var layoutController = self.get('layoutController');\n if (layoutController) {\n layoutController.layout(success);\n if (this.destroyed) return;\n } else {\n success();\n }\n // 将在 onLayoutEnd 中被调用\n function success() {\n // 自底向上将 collapsed 的 combo 合起\n (self.get('comboTrees') || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var item = self.findById(child.id);\n if (item.getType() === 'combo' && child.collapsed) {\n self.collapseCombo(child.id, false);\n self.updateCombo(item);\n }\n return true;\n });\n });\n // fitView 与 fitCenter 共存时,fitView 优先,fitCenter 不再执行\n if (self.get('fitView')) {\n self.fitView();\n } else if (self.get('fitCenter')) {\n self.fitCenter();\n }\n self.autoPaint();\n self.emit('afterrender');\n if (self.get('fitView') || self.get('fitCenter')) {\n self.set('animate', animate);\n }\n setTimeout(function () {\n var _a;\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n combo.set('animate', true);\n });\n }, 0);\n }\n if (!this.get('groupByTypes')) {\n if (combos && combos.length !== 0) {\n this.sortCombos();\n } else {\n // 为提升性能,选择数量少的进行操作\n if (data.nodes && data.edges && data.nodes.length < data.edges.length) {\n var nodesArr = this.getNodes();\n // 遍历节点实例,将所有节点提前。\n nodesArr.forEach(function (node) {\n node.toFront();\n });\n } else {\n var edgesArr = this.getEdges();\n // 遍历节点实例,将所有节点提前。\n edgesArr.forEach(function (edge) {\n edge.toBack();\n });\n }\n }\n }\n };\n /**\n * 接收数据进行渲染\n * @Param {Object} data 初始化数据\n */\n AbstractGraph.prototype.read = function (data) {\n this.data(data);\n this.render();\n };\n // 比较item\n AbstractGraph.prototype.diffItems = function (type, items, models) {\n var self = this;\n var item;\n var itemMap = this.get('itemMap');\n each(models, function (model) {\n item = itemMap[model.id];\n if (item) {\n if (self.get('animate') && type === NODE) {\n var containerMatrix = item.getContainer().getMatrix();\n if (!containerMatrix) containerMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n item.set('originAttrs', {\n x: containerMatrix[6],\n y: containerMatrix[7]\n });\n }\n self.updateItem(item, model, false);\n } else {\n item = self.addItem(type, model, false);\n }\n if (item) items[\"\".concat(type, \"s\")].push(item);\n });\n };\n /**\n * 更改源数据,根据新数据重新渲染视图\n * @param {GraphData | TreeGraphData} data 源数据\n * @param {boolean} 是否入栈,默认为true\n * @return {object} this\n */\n AbstractGraph.prototype.changeData = function (propsData, stack) {\n var _this = this;\n var _a;\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var data = propsData || self.get('data');\n if (!dataValidation(data)) {\n return this;\n }\n this.emit('beforechangedata');\n if (stack && this.get('enabledStack')) {\n this.pushStack('changedata', {\n before: self.save(),\n after: data\n });\n }\n this.set('comboSorted', false);\n // 删除 hulls\n this.removeHulls();\n // 更改数据源后,取消所有状态\n this.getNodes().map(function (node) {\n return self.clearItemStates(node);\n });\n this.getEdges().map(function (edge) {\n return self.clearItemStates(edge);\n });\n var canvas = this.get('canvas');\n var localRefresh = canvas.get('localRefresh');\n canvas.set('localRefresh', false);\n if (!self.get('data')) {\n self.data(data);\n self.render();\n }\n var itemMap = this.get('itemMap');\n var items = {\n nodes: [],\n edges: []\n };\n var combosData = data.combos;\n if (combosData) {\n var comboTrees = plainCombosToTrees(combosData, data.nodes);\n this.set('comboTrees', comboTrees);\n } else {\n this.set('comboTrees', []);\n }\n this.diffItems('node', items, data.nodes);\n each(itemMap, function (item, id) {\n itemMap[id].getModel().depth = 0;\n if (item.getType && item.getType() === 'edge') return;\n if (item.getType && item.getType() === 'combo') {\n delete itemMap[id];\n item.destroy();\n } else if (items.nodes.indexOf(item) < 0) {\n delete itemMap[id];\n self.remove(item, false);\n }\n });\n // clear the destroyed combos here to avoid removing sub nodes before removing the parent combo\n var comboItems = this.getCombos();\n var combosLength = comboItems.length;\n for (var i = combosLength - 1; i >= 0; i--) {\n if (comboItems[i].destroyed) {\n comboItems.splice(i, 1);\n }\n }\n // process the data to tree structure\n if (combosData) {\n // add combos\n self.addCombos(combosData);\n if (!this.get('groupByTypes')) {\n this.sortCombos();\n }\n }\n this.diffItems('edge', items, data.edges);\n each(itemMap, function (item, id) {\n if (item.getType && (item.getType() === 'node' || item.getType() === 'combo')) return;\n if (items.edges.indexOf(item) < 0) {\n delete itemMap[id];\n self.remove(item, false);\n }\n });\n // 自底向上将 collapsed 的 combo 合起\n (this.get('comboTrees') || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var item = _this.findById(child.id);\n if (item.getType() === 'combo' && child.collapsed) {\n _this.collapseCombo(child.id, false);\n }\n return true;\n });\n });\n this.set({\n nodes: items.nodes,\n edges: items.edges\n });\n var _b = (this.get('layout') || {}).relayoutAtChangeData,\n relayoutAtChangeData = _b === void 0 ? true : _b;\n var layoutController = this.get('layoutController');\n if (relayoutAtChangeData && layoutController) {\n layoutController.changeData(function () {\n setTimeout(function () {\n var _a;\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n combo.set('animate', true);\n });\n }, 0);\n });\n if (self.get('animate') && !layoutController.getLayoutType()) {\n // 如果没有指定布局\n self.positionsAnimate();\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n return combo.set('animate', true);\n });\n } else {\n self.autoPaint();\n }\n }\n setTimeout(function () {\n canvas.set('localRefresh', localRefresh);\n }, 16);\n this.set('data', data);\n this.emit('afterchangedata');\n return this;\n };\n /**\n * 私有方法,在 render 和 changeData 的时候批量添加数据中所有平铺的 combos\n * @param {ComboConfig[]} combos 平铺的 combos 数据\n */\n AbstractGraph.prototype.addCombos = function (combos) {\n var self = this;\n var comboTrees = self.get('comboTrees');\n var itemController = this.get('itemController');\n itemController.addCombos(comboTrees, combos);\n };\n /**\n * 根据已经存在的节点或 combo 创建新的 combo\n * @param combo combo ID 或 Combo 配置\n * @param childrenIds 添加到 Combo 中的元素,包括节点和 combo\n */\n AbstractGraph.prototype.createCombo = function (combo, childrenIds, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n this.set('comboSorted', false);\n // step 1: 创建新的 Combo\n var comboId = '';\n var comboConfig;\n if (!combo) return;\n if (isString(combo)) {\n comboId = combo;\n comboConfig = {\n id: combo\n };\n } else {\n comboId = combo.id;\n if (!comboId) {\n console.warn('Create combo failed. Please assign a unique string id for the adding combo.');\n return;\n }\n comboConfig = combo;\n }\n var shouldStack = stack && this.get('enabledStack');\n // cache the children's old parent for stack\n var childrenParentCache = {\n nodes: [],\n combos: []\n };\n if (shouldStack) {\n childrenIds.forEach(function (childId) {\n var childItem = _this.findById(childId);\n var childType = childItem.getType();\n if (childType !== 'node' && childType !== 'combo') return;\n var childModel = childItem.getModel();\n childrenParentCache[\"\".concat(childType, \"s\")].push({\n id: childId,\n parentId: childType === 'node' ? childModel.comboId : childModel.parentId\n });\n });\n }\n // step 2: Pull children out of their parents\n var comboTrees = this.get('comboTrees');\n var childrenIdsSet = new Set(childrenIds);\n var pulledComboTreesById = new Map();\n if (comboTrees) {\n comboTrees.forEach(function (ctree) {\n traverseTreeUp(ctree, function (treeNode, parentTreeNode, index) {\n if (childrenIdsSet.has(treeNode.id)) {\n if (parentTreeNode) {\n var parentItem = _this.findById(parentTreeNode.id);\n var item = _this.findById(treeNode.id);\n // Removing current item from the tree during the traversal is ok because children traversal is done\n // in an *inverse order* - indices of the next-traversed items are not disturbed by the removal.\n parentTreeNode.children.splice(index, 1);\n parentItem.removeChild(item);\n // We have to update the parent node geometry since nodes were removed from them, _while they are still visible_\n // (combos may be moved inside the new combo and become hidden)\n itemController.updateCombo(parentItem, parentTreeNode.children);\n }\n if (treeNode.itemType === 'combo') {\n pulledComboTreesById.set(treeNode.id, treeNode);\n }\n }\n return true;\n });\n });\n comboTrees = comboTrees.filter(function (ctree) {\n return !childrenIdsSet.has(ctree.id);\n });\n this.set('comboTrees', comboTrees);\n }\n // step 3: 更新 children,根据类型添加 comboId 或 parentId\n var newChildrenParent = {\n nodes: [],\n combos: []\n };\n var trees = childrenIds.map(function (elementId) {\n var item = _this.findById(elementId);\n var model = item.getModel();\n var type = '';\n if (item.getType) type = item.getType();\n // Combos will be just moved around, so their children can be preserved\n var cItem = pulledComboTreesById.get(elementId) || {\n id: item.getID(),\n itemType: type\n };\n if (type === 'combo') {\n cItem.parentId = comboId;\n model.parentId = comboId;\n } else if (type === 'node') {\n cItem.comboId = comboId;\n model.comboId = comboId;\n }\n if (shouldStack) {\n newChildrenParent[\"\".concat(type, \"s\")].push({\n id: model.id,\n parentId: comboId\n });\n }\n return cItem;\n });\n comboConfig.children = trees;\n // step 4: 添加 Combo,addItem 时会将子将元素添加到 Combo 中\n this.addItem('combo', comboConfig, false);\n this.set('comboSorted', false);\n // step 5: 更新 comboTrees 结构\n if (comboTrees) {\n comboTrees.forEach(function (ctree) {\n traverseTree(ctree, function (treeNode) {\n // Set the children to the newly created combo\n if (treeNode.id === comboId) {\n treeNode.itemType = 'combo';\n treeNode.children = trees;\n return false;\n }\n return true;\n });\n });\n this.sortCombos();\n }\n if (shouldStack) {\n newChildrenParent.combos.push(comboConfig);\n this.pushStack('createCombo', {\n before: childrenParentCache,\n after: newChildrenParent\n });\n }\n // Fixes issue of nested child combos not being interactive (under parent on graph).\n var comboItem = this.findById(comboId);\n if (!comboItem.getModel().parentId && comboItem.getChildren().combos.length) {\n this.updateComboTree(comboItem, undefined, false);\n }\n setTimeout(function () {\n comboItem.set('animate', true);\n }, 0);\n };\n /**\n * 解散 combo\n * @param {String | INode | ICombo} combo 需要被解散的 Combo item 或 id\n */\n AbstractGraph.prototype.uncombo = function (combo, stack) {\n var _this = this;\n var _a, _b;\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var comboItem = combo;\n if (isString(combo)) {\n comboItem = this.findById(combo);\n }\n if (!comboItem || comboItem.getType && comboItem.getType() !== 'combo') {\n console.warn('The item is not a combo!');\n return;\n }\n var comboModel = comboItem.getModel();\n var parentId = comboItem.getModel().parentId;\n var comboTrees = self.get('comboTrees');\n if (!comboTrees) comboTrees = [];\n var itemMap = this.get('itemMap');\n var comboId = comboItem.get('id');\n var treeToBeUncombo;\n var brothers = [];\n var comboItems = this.get('combos');\n var parentItem = this.findById(parentId);\n var shouldStack = stack && this.get('enabledStack');\n var comboConfig = {};\n if (shouldStack) {\n comboConfig = clone(comboModel);\n comboConfig.children = [];\n }\n comboTrees.forEach(function (ctree) {\n if (treeToBeUncombo) return; // terminate the forEach\n traverseTreeUp(ctree, function (subtree) {\n var _a;\n // find the combo to be uncomboed, delete the combo from map and cache\n if (subtree.id === comboId) {\n treeToBeUncombo = subtree;\n // delete the related edges\n var edgeIds = comboItem.getEdges().map(function (edge) {\n return edge.getID();\n });\n edgeIds.forEach(function (edgeId) {\n _this.removeItem(edgeId, false);\n });\n var index = comboItems.indexOf(comboItem);\n comboItems.splice(index, 1);\n delete itemMap[comboId];\n var itemModel = clone(comboItem.getModel());\n comboItem.destroy();\n _this.emit('afterremoveitem', {\n item: itemModel,\n type: 'combo'\n });\n }\n // find the parent to remove the combo from the combo's brothers array and add the combo's children to the combo's brothers array in the tree\n if (parentId && treeToBeUncombo && subtree.id === parentId) {\n parentItem.removeCombo(comboItem);\n brothers = subtree.children; // the combo's brothers\n // remove the combo from its brothers array\n var index = brothers.indexOf(treeToBeUncombo);\n if (index !== -1) {\n brothers.splice(index, 1);\n }\n // append the combo's children to the combo's brothers array\n (_a = treeToBeUncombo.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n var item = _this.findById(child.id);\n var childModel = item.getModel();\n if (item.getType && item.getType() === 'combo') {\n child.parentId = parentId;\n delete child.comboId;\n childModel.parentId = parentId; // update the parentId of the model\n delete childModel.comboId;\n } else if (item.getType && item.getType() === 'node') {\n child.comboId = parentId;\n childModel.comboId = parentId; // update the parentId of the model\n }\n\n parentItem.addChild(item);\n brothers.push(child);\n });\n _this.updateCombo(parentItem);\n return false;\n }\n return true;\n });\n });\n // if the parentId is not found, remove the combo from the roots\n if (!parentId && treeToBeUncombo) {\n var index = comboTrees.indexOf(treeToBeUncombo);\n comboTrees.splice(index, 1);\n // modify the parentId of the children\n (_a = treeToBeUncombo.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n child.parentId = undefined;\n var childModel = _this.findById(child.id).getModel();\n delete childModel.parentId; // update the parentId of the model\n delete childModel.comboId; // update the comboId of the model\n if (child.itemType !== 'node') comboTrees.push(child);\n });\n }\n if (shouldStack) {\n // cache the children's old parent and combo model for stack\n var childrenParentCache_1 = {\n nodes: [],\n combos: []\n };\n var childNewParent_1 = {\n nodes: [],\n combos: []\n };\n (_b = treeToBeUncombo.children) === null || _b === void 0 ? void 0 : _b.forEach(function (child) {\n var childItem = _this.findById(child.id);\n var childType = childItem.getType();\n if (childType !== 'node' && childType !== 'combo') return;\n childrenParentCache_1[\"\".concat(childType, \"s\")].push({\n id: child.id,\n parentId: comboId\n });\n childNewParent_1[\"\".concat(childType, \"s\")].push({\n id: child.id,\n parentId: parentId\n });\n });\n childrenParentCache_1.combos.push(comboConfig);\n this.pushStack('uncombo', {\n before: childrenParentCache_1,\n after: childNewParent_1\n });\n }\n };\n /**\n * 根据 combo 位置更新内部节点位置 followCombo = true\n * 或根据内部元素的 bbox 更新所有 combos 的绘制,包括 combos 的位置和范围,followCombo = false\n */\n AbstractGraph.prototype.updateCombos = function (followCombo) {\n var _this = this;\n if (followCombo === void 0) {\n followCombo = false;\n }\n var self = this;\n var comboTrees = this.get('comboTrees');\n var itemController = self.get('itemController');\n var itemMap = self.get('itemMap');\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var _a;\n if (!child) {\n return true;\n }\n var childItem = itemMap[child.id];\n if (((_a = childItem === null || childItem === void 0 ? void 0 : childItem.getType) === null || _a === void 0 ? void 0 : _a.call(childItem)) === 'combo') {\n // 更新具体的 Combo 之前先清除所有的已有状态,以免将 state 中的样式更新为 Combo 的样式\n var states = __spreadArray([], childItem.getStates(), true);\n each(states, function (state) {\n return _this.setItemState(childItem, state, false);\n });\n // 更新具体的 Combo\n itemController.updateCombo(childItem, child.children, followCombo);\n // 更新 Combo 后,还原已有的状态\n each(states, function (state) {\n return _this.setItemState(childItem, state, true);\n });\n }\n return true;\n });\n });\n self.sortCombos();\n };\n /**\n * 根据节点的 bbox 更新 combo 及其祖先 combos 的绘制,包括 combos 的位置和范围\n * @param {String | ICombo} combo 需要被更新的 Combo 或 id,若指定,则该 Combo 及所有祖先 Combod 都会被更新\n */\n AbstractGraph.prototype.updateCombo = function (combo) {\n var _this = this;\n var self = this;\n var comboItem = combo;\n var comboId;\n if (isString(combo)) {\n comboItem = this.findById(combo);\n }\n if (!comboItem || comboItem.getType && comboItem.getType() !== 'combo') {\n console.warn('The item to be updated is not a combo!');\n return;\n }\n comboId = comboItem.get('id');\n var comboTrees = this.get('comboTrees');\n var itemController = self.get('itemController');\n var itemMap = self.get('itemMap');\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n if (!child) {\n return true;\n }\n var childItem = itemMap[child.id];\n if (comboId === child.id && childItem && childItem.getType && childItem.getType() === 'combo') {\n // 更新具体的 Combo 之前先清除所有的已有状态,以免将 state 中的样式更新为 Combo 的样式\n var states = __spreadArray([], childItem.getStates(), true);\n // || !item.getStateStyle(stateName)\n each(states, function (state) {\n if (childItem.getStateStyle(state)) {\n _this.setItemState(childItem, state, false);\n }\n });\n // 更新具体的 Combo\n itemController.updateCombo(childItem, child.children);\n // 更新 Combo 后,还原已有的状态\n each(states, function (state) {\n if (childItem.getStateStyle(state)) {\n _this.setItemState(childItem, state, true);\n }\n });\n if (comboId) comboId = child.parentId;\n }\n return true;\n });\n });\n };\n /**\n * 更新树结构,例如移动子树等\n * @param {String | INode | ICombo} item 需要被更新的 Combo 或 节点 id\n * @param {string | undefined} parentId 新的父 combo id,undefined 代表没有父 combo\n */\n AbstractGraph.prototype.updateComboTree = function (item, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n this.set('comboSorted', false);\n var uItem;\n if (isString(item)) {\n uItem = self.findById(item);\n } else {\n uItem = item;\n }\n var model = uItem.getModel();\n var oldParentId = model.comboId || model.parentId;\n var type = '';\n if (uItem.getType) type = uItem.getType();\n // 若 item 是 Combo,且 parentId 是其子孙 combo 的 id,则警告并终止\n if (parentId && type === 'combo') {\n var comboTrees = this.get('comboTrees');\n var valid_1 = true;\n var itemSubTree_1;\n (comboTrees || []).forEach(function (ctree) {\n if (itemSubTree_1) return;\n traverseTree(ctree, function (subTree) {\n if (itemSubTree_1) return;\n // 找到从 item 开始的子树\n if (subTree.id === uItem.getID()) {\n itemSubTree_1 = subTree;\n }\n return true;\n });\n });\n // 在以 item 为根的子树中寻找与 parentId 相同的后继元素\n traverseTree(itemSubTree_1, function (subTree) {\n if (subTree.id === parentId) {\n valid_1 = false;\n return false;\n }\n return true;\n });\n // parentId 是 item 的一个后继元素,不能进行更新\n if (!valid_1) {\n console.warn('Failed to update the combo tree! The parentId points to a descendant of the combo!');\n return;\n }\n }\n if (stack && this.get('enabledStack')) {\n var beforeData = {},\n afterData = {};\n if (type === 'combo') {\n beforeData.combos = [{\n id: model.id,\n parentId: model.parentId\n }];\n afterData.combos = [{\n id: model.id,\n parentId: parentId\n }];\n } else if (type === 'node') {\n beforeData.nodes = [{\n id: model.id,\n parentId: model.comboId\n }];\n afterData.nodes = [{\n id: model.id,\n parentId: parentId\n }];\n }\n this.pushStack('updateComboTree', {\n before: beforeData,\n after: afterData\n });\n }\n // 当 combo 存在 parentId 或 comboId 时,才将其移除\n if (model.parentId || model.comboId) {\n var combo = this.findById(model.parentId || model.comboId);\n if (combo) {\n combo.removeChild(uItem);\n }\n }\n if (type === 'combo') {\n model.parentId = parentId;\n } else if (type === 'node') {\n model.comboId = parentId;\n }\n // 只有当移入到指定 combo 时才添加\n if (parentId) {\n var parentCombo = this.findById(parentId);\n if (parentCombo) {\n // 将元素添加到 parentCombo 中\n parentCombo.addChild(uItem);\n }\n }\n // 如果原先有父亲 combo,则从原父 combo 的子元素数组中删除\n if (oldParentId) {\n var parentCombo = this.findById(oldParentId);\n if (parentCombo) {\n // 将元素从 parentCombo 中移除\n parentCombo.removeChild(uItem);\n }\n }\n var newComboTrees = reconstructTree(this.get('comboTrees'), model.id, parentId);\n this.set('comboTrees', newComboTrees);\n this.updateCombos();\n };\n /**\n * 导出图数据\n * @return {object} data\n */\n AbstractGraph.prototype.save = function () {\n var nodes = [];\n var edges = [];\n var combos = [];\n each(this.get('nodes'), function (node) {\n nodes.push(node.getModel());\n });\n each(this.get('edges'), function (edge) {\n edges.push(edge.getModel());\n });\n each(this.get('combos'), function (combo) {\n combos.push(combo.getModel());\n });\n return {\n nodes: nodes,\n edges: edges,\n combos: combos\n };\n };\n /**\n * 改变画布大小\n * @param {number} width 画布宽度\n * @param {number} height 画布高度\n * @return {object} this\n */\n AbstractGraph.prototype.changeSize = function (width, height) {\n var viewController = this.get('viewController');\n viewController.changeSize(width, height);\n return this;\n };\n /**\n * 当源数据在外部发生变更时,根据新数据刷新视图。但是不刷新节点位置\n */\n AbstractGraph.prototype.refresh = function () {\n var self = this;\n self.emit('beforegraphrefresh');\n if (self.get('animate')) {\n self.positionsAnimate();\n } else {\n var nodes = self.get('nodes');\n var edges = self.get('edges');\n var vedges = self.get('edges');\n each(nodes, function (node) {\n node.refresh();\n });\n each(edges, function (edge) {\n edge.refresh();\n });\n each(vedges, function (vedge) {\n vedge.refresh();\n });\n }\n self.emit('aftergraphrefresh');\n self.autoPaint();\n };\n /**\n * 获取当前图中所有节点的item实例\n * @return {INode} item数组\n */\n AbstractGraph.prototype.getNodes = function () {\n return this.get('nodes');\n };\n /**\n * 获取当前图中所有边的item实例\n * @return {IEdge} item数组\n */\n AbstractGraph.prototype.getEdges = function () {\n return this.get('edges');\n };\n /**\n * 获取图中所有的 combo 实例\n */\n AbstractGraph.prototype.getCombos = function () {\n return this.get('combos');\n };\n /**\n * 获取指定 Combo 中所有的节点\n * @param comboId combo ID\n */\n AbstractGraph.prototype.getComboChildren = function (combo) {\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') {\n console.warn('The combo does not exist!');\n return;\n }\n return combo.getChildren();\n };\n /**\n * 根据 graph 上的 animateCfg 进行视图中节点位置动画接口\n */\n AbstractGraph.prototype.positionsAnimate = function (referComboModel) {\n var self = this;\n self.emit('beforeanimate');\n var animateCfg = self.get('animateCfg');\n var onFrame = animateCfg.onFrame;\n var nodes = referComboModel ? self.getNodes().concat(self.getCombos()) : self.getNodes();\n var toNodes = nodes.map(function (node) {\n var model = node.getModel();\n return {\n id: model.id,\n x: model.x,\n y: model.y\n };\n });\n self.stopAnimate();\n var canvas = self.get('canvas');\n self.animating = true;\n setTimeout(function () {\n canvas.animate(function (ratio) {\n each(toNodes, function (data) {\n var node = self.findById(data.id);\n if (!node || node.destroyed) {\n return;\n }\n var originAttrs = node.get('originAttrs');\n var model = node.get('model');\n var containerMatrix = node.getContainer().getMatrix();\n if (originAttrs === undefined || originAttrs === null) {\n // 变换前存在位置,设置到 originAttrs 上。否则标记 0 表示变换前不存在位置,不需要计算动画\n if (containerMatrix) {\n originAttrs = {\n x: containerMatrix[6],\n y: containerMatrix[7]\n };\n }\n node.set('originAttrs', originAttrs || 0);\n }\n if (onFrame) {\n var attrs = onFrame(node, ratio, data, originAttrs || {\n x: 0,\n y: 0\n });\n node.set('model', Object.assign(model, attrs));\n } else if (originAttrs) {\n // 变换前存在位置,进行动画\n model.x = originAttrs.x + (data.x - originAttrs.x) * ratio;\n model.y = originAttrs.y + (data.y - originAttrs.y) * ratio;\n } else {\n // 若在变换前不存在位置信息,则直接放到最终位置上\n model.x = data.x;\n model.y = data.y;\n }\n });\n self.refreshPositions(referComboModel);\n }, {\n duration: animateCfg.duration,\n easing: animateCfg.easing,\n callback: function callback() {\n each(nodes, function (node) {\n node.set('originAttrs', null);\n });\n if (animateCfg.callback) {\n animateCfg.callback();\n }\n self.emit('afteranimate');\n self.animating = false;\n }\n });\n }, 0);\n };\n /**\n * 当节点位置在外部发生改变时,刷新所有节点位置,重计算边\n */\n AbstractGraph.prototype.refreshPositions = function (referComboModel) {\n var self = this;\n self.emit('beforegraphrefreshposition');\n var nodes = self.get('nodes');\n var edges = self.get('edges');\n var vedges = self.get('vedges');\n var combos = self.get('combos');\n var model;\n var updatedNodes = {};\n var updateItems = function updateItems(items) {\n each(items, function (item) {\n model = item.getModel();\n var originAttrs = item.get('originAttrs');\n if (originAttrs && model.x === originAttrs.x && model.y === originAttrs.y) {\n return;\n }\n var changed = item.updatePosition({\n x: model.x,\n y: model.y\n });\n updatedNodes[model.id] = changed;\n if (model.comboId) updatedNodes[model.comboId] = updatedNodes[model.comboId] || changed;\n if (model.parentId) updatedNodes[model.parentId] = updatedNodes[model.parentId] || changed;\n });\n };\n updateItems(combos);\n updateItems(nodes);\n if (combos && combos.length !== 0) {\n if (referComboModel) {\n updateItems(combos);\n self.updateCombos();\n } else {\n self.updateCombos();\n }\n }\n each(edges, function (edge) {\n var sourceModel = edge.getSource().getModel();\n var target = edge.getTarget();\n // 避免 target 是纯对象的情况下调用 getModel 方法\n // 拖动生成边的时候 target 会是纯对象\n if (!isPlainObject(target)) {\n var targetModel = target.getModel();\n if (updatedNodes[sourceModel.id] || updatedNodes[targetModel.id] || edge.getModel().isComboEdge) {\n edge.refresh();\n }\n }\n });\n each(vedges, function (vedge) {\n vedge.refresh();\n });\n self.emit('aftergraphrefreshposition');\n self.autoPaint();\n };\n AbstractGraph.prototype.stopAnimate = function () {\n var canvas = this.get('canvas');\n var timeline = canvas.cfg.timeline;\n if (timeline) {\n timeline.stopAllAnimations();\n }\n };\n AbstractGraph.prototype.isAnimating = function () {\n return this.animating;\n };\n /**\n * 获取当前视口伸缩比例\n * @return {number} 比例\n */\n AbstractGraph.prototype.getZoom = function () {\n var matrix = this.get('group').getMatrix();\n return matrix ? matrix[0] : 1;\n };\n /**\n * 获取当前的行为模式\n * @return {string} 当前行为模式\n */\n AbstractGraph.prototype.getCurrentMode = function () {\n var modeController = this.get('modeController');\n return modeController.getMode();\n };\n /**\n * 切换行为模式\n * @param {string} mode 指定模式\n * @return {object} this\n */\n AbstractGraph.prototype.setMode = function (mode) {\n var modeController = this.get('modeController');\n modeController.setMode(mode);\n return this;\n };\n /**\n * 清除画布元素\n * @return {object} this\n */\n AbstractGraph.prototype.clear = function (avoidEmit) {\n var _a;\n if (avoidEmit === void 0) {\n avoidEmit = false;\n }\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.clear();\n this.initGroups();\n // 清空画布时同时清除数据\n this.set({\n itemMap: {},\n nodes: [],\n edges: [],\n vedges: [],\n groups: [],\n combos: [],\n comboTrees: []\n });\n if (!avoidEmit) this.emit('afterrender');\n return this;\n };\n /**\n * 更换布局配置项\n * @param {object} cfg 新布局配置项\n * @param {'center' | 'begin'} align 对齐方式,可选中心(center)对齐到对齐点,或左上角(begin)对齐到对齐点\n * @param {IPoint} alignPoint 画布上的对齐点,为 Canvas 坐标系(Canvas DOM)\n * 若 cfg 含有 type 字段或为 String 类型,且与现有布局方法不同,则更换布局\n * 若 cfg 不包括 type ,则保持原有布局方法,仅更新布局配置项\n */\n AbstractGraph.prototype.updateLayout = function (cfg, align, alignPoint, stack) {\n var _this = this;\n if (cfg === void 0) {\n cfg = {};\n }\n if (stack === void 0) {\n stack = true;\n }\n var layoutController = this.get('layoutController');\n if (isString(cfg)) {\n cfg = {\n type: cfg\n };\n }\n // align the graph after layout\n if (align) {\n var toPoint_1 = alignPoint;\n if (!toPoint_1) {\n if (align === 'begin') toPoint_1 = {\n x: 0,\n y: 0\n };else toPoint_1 = {\n x: this.getWidth() / 2,\n y: this.getHeight() / 2\n };\n }\n // translate to point coordinate system\n toPoint_1 = this.getPointByCanvas(toPoint_1.x, toPoint_1.y);\n var forceTypes = ['force', 'gForce', 'fruchterman', 'force2'];\n // if it is force layout, only center takes effect, and assign center force\n if (forceTypes.includes(cfg.type) || !cfg.type && forceTypes.includes(layoutController === null || layoutController === void 0 ? void 0 : layoutController.layoutType)) {\n cfg.center = [toPoint_1.x, toPoint_1.y];\n } else {\n this.once('afterlayout', function (e) {\n var matrix = _this.getGroup().getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n toPoint_1.x = toPoint_1.x * matrix[0] + matrix[6];\n toPoint_1.y = toPoint_1.y * matrix[0] + matrix[7];\n var _a = _this.getGroup().getCanvasBBox(),\n minX = _a.minX,\n maxX = _a.maxX,\n minY = _a.minY,\n maxY = _a.maxY;\n var bboxPoint = {\n x: (minX + maxX) / 2,\n y: (minY + maxY) / 2\n };\n if (align === 'begin') {\n bboxPoint.x = minX;\n bboxPoint.y = minY;\n }\n _this.translate(toPoint_1.x - bboxPoint.x, toPoint_1.y - bboxPoint.y);\n });\n }\n }\n var oriLayoutCfg = __assign({}, this.get('layout'));\n var layoutCfg = {};\n Object.assign(layoutCfg, oriLayoutCfg, cfg);\n if (cfg.pipes && !cfg.type) delete layoutCfg.type;else if (!cfg.pipes && layoutCfg.type) delete layoutCfg.pipes;\n this.set('layout', layoutCfg);\n if (!layoutController) return;\n if (layoutController.isLayoutTypeSame(layoutCfg) && layoutCfg.gpuEnabled === oriLayoutCfg.gpuEnabled) {\n // no type or same type, or switch the gpu and cpu, update layout\n layoutController.updateLayoutCfg(layoutCfg);\n } else {\n // has different type, change layout\n layoutController.changeLayout(layoutCfg);\n }\n if (stack && this.get('enabledStack')) {\n this.pushStack('layout', {\n before: oriLayoutCfg,\n after: layoutCfg\n });\n }\n };\n /**\n * 销毁布局,changeData 时不会再使用原来的布局方法对新数据进行布局\n */\n AbstractGraph.prototype.destroyLayout = function () {\n var layoutController = this.get('layoutController');\n layoutController === null || layoutController === void 0 ? void 0 : layoutController.destroyLayout();\n };\n /**\n * 重新以当前示例中配置的属性进行一次布局\n */\n AbstractGraph.prototype.layout = function () {\n var _a;\n var layoutController = this.get('layoutController');\n var layoutCfg = this.get('layout');\n if (!layoutCfg || !layoutController) return;\n if (layoutCfg.workerEnabled) {\n // 如果使用web worker布局\n layoutController.layout();\n return;\n }\n if ((_a = layoutController.layoutMethods) === null || _a === void 0 ? void 0 : _a.length) {\n layoutController.relayout(true);\n } else {\n layoutController.layout();\n }\n };\n /**\n * 收起指定的 combo\n * @param {string | ICombo} combo combo ID 或 combo item\n */\n AbstractGraph.prototype.collapseCombo = function (combo, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n if (this.destroyed) return;\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo) {\n console.warn('The combo to be collapsed does not exist!');\n return;\n }\n this.emit('beforecollapseexpandcombo', {\n action: 'collapse',\n item: combo\n });\n var comboModel = combo.getModel();\n var itemController = this.get('itemController');\n itemController.collapseCombo(combo, stack);\n comboModel.collapsed = true;\n // add virtual edges\n var edges = this.getEdges().concat(this.get('vedges'));\n // find all the descendant nodes and combos\n var cNodesCombos = [];\n var comboTrees = this.get('comboTrees');\n var found = false;\n (comboTrees || []).forEach(function (ctree) {\n if (found) return; // if the combo is found, terminate the forEach\n traverseTree(ctree, function (subTree) {\n // if the combo is found and it is traversing the other branches, terminate\n if (found && subTree.depth <= comboModel.depth) return false;\n // if the combo is found\n if (comboModel.id === subTree.id) found = true;\n if (found) {\n // if the combo is found, concat the descendant nodes and combos\n var item = _this.findById(subTree.id);\n if (item && item.getType && item.getType() === 'combo') {\n cNodesCombos = cNodesCombos.concat(item.getNodes());\n cNodesCombos = cNodesCombos.concat(item.getCombos());\n }\n }\n return true;\n });\n });\n var addedVEdgeMap = {};\n edges.forEach(function (edge) {\n var _a = edge.getModel(),\n isVEdge = _a.isVEdge,\n _b = _a.size,\n size = _b === void 0 ? 1 : _b;\n if (edge.isVisible() && !isVEdge) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n var otherEnd = null;\n var otherEndIsSource;\n if (source.getModel().id === comboModel.id || cNodesCombos.includes(source) && !cNodesCombos.includes(target)) {\n // source is the current combo, or descent node/combo is the source but not the target)\n otherEnd = target;\n otherEndIsSource = false;\n } else if (target.getModel().id === comboModel.id || !cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // target is the current combo, or descent node/combo is the target but not the source)\n otherEnd = source;\n otherEndIsSource = true;\n }\n if (otherEnd) {\n if (isVEdge) {\n _this.removeItem(edge, false);\n return;\n }\n var otherEndModel = otherEnd.getModel();\n while (!otherEnd.isVisible()) {\n var otherEndPId = otherEndModel.parentId,\n otherEndCId = otherEndModel.comboId;\n var otherEndParentId = otherEndPId || otherEndCId;\n otherEnd = _this.findById(otherEndParentId);\n if (!otherEnd || !otherEndParentId) return; // all the ancestors are hidden, then ignore the edge\n otherEndModel = otherEnd.getModel();\n }\n var otherEndId = otherEndModel.id;\n var vEdgeInfo = otherEndIsSource ? {\n source: otherEndId,\n target: comboModel.id,\n size: size,\n isVEdge: true\n } : {\n source: comboModel.id,\n target: otherEndId,\n size: size,\n isVEdge: true\n };\n var key = \"\".concat(vEdgeInfo.source, \"-\").concat(vEdgeInfo.target);\n if (addedVEdgeMap[key]) {\n addedVEdgeMap[key].size += size;\n return;\n }\n addedVEdgeMap[key] = vEdgeInfo;\n }\n });\n // update the width of the virtual edges, which is the sum of merged actual edges\n // be attention that the actual edges with same endpoints but different directions will be represented by two different virtual edges\n this.addItems(Object.values(addedVEdgeMap).map(function (edgeInfo) {\n return {\n type: 'vedge',\n model: edgeInfo\n };\n }), false);\n this.emit('aftercollapseexpandcombo', {\n action: 'collapse',\n item: combo\n });\n };\n /**\n * 展开指定的 combo\n * @param {string | ICombo} combo combo ID 或 combo item\n */\n AbstractGraph.prototype.expandCombo = function (combo, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') {\n console.warn('The combo to be collapsed does not exist!');\n return;\n }\n this.emit('beforecollapseexpandcombo', {\n action: 'expand',\n item: combo\n });\n var comboModel = combo.getModel();\n var itemController = this.get('itemController');\n itemController.expandCombo(combo, stack);\n comboModel.collapsed = false;\n // add virtual edges\n var edges = this.getEdges().concat(this.get('vedges'));\n // find all the descendant nodes and combos\n var cNodesCombos = [];\n var comboTrees = this.get('comboTrees');\n var found = false;\n (comboTrees || []).forEach(function (ctree) {\n if (found) return; // if the combo is found, terminate\n traverseTree(ctree, function (subTree) {\n // if the combo is found and it is traversing the other branches, terminate\n if (found && subTree.depth <= comboModel.depth) return false;\n if (comboModel.id === subTree.id) found = true;\n if (found) {\n var item = _this.findById(subTree.id);\n if (item && item.getType && item.getType() === 'combo') {\n cNodesCombos = cNodesCombos.concat(item.getNodes());\n cNodesCombos = cNodesCombos.concat(item.getCombos());\n }\n }\n return true;\n });\n });\n var addedVEdgeMap = {};\n edges.forEach(function (edge) {\n if (edge.isVisible() && !edge.getModel().isVEdge) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n var sourceId = source.get('id');\n var targetId = target.get('id');\n var otherEnd = null;\n var otherEndIsSource;\n if (sourceId === comboModel.id || cNodesCombos.includes(source) && !cNodesCombos.includes(target)) {\n // the source is in the combo, the target is not\n otherEnd = target;\n otherEndIsSource = false;\n } else if (targetId === comboModel.id || !cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // the target is in the combo, the source is not\n otherEnd = source;\n otherEndIsSource = true;\n } else if (cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // both source and target are in the combo, if the target and source are both visible, show the edge\n if (source.isVisible() && target.isVisible()) {\n edge.show();\n }\n }\n if (otherEnd) {\n var _a = edge.getModel(),\n isVEdge = _a.isVEdge,\n _b = _a.size,\n size = _b === void 0 ? 1 : _b;\n // ignore the virtual edges\n if (isVEdge) {\n _this.removeItem(edge, false);\n return;\n }\n var otherEndModel = otherEnd.getModel();\n // find the nearest visible ancestor\n while (!otherEnd.isVisible()) {\n var otherEndPId = otherEndModel.parentId,\n otherEndCId = otherEndModel.comboId;\n var otherEndParentId = otherEndPId || otherEndCId;\n otherEnd = _this.findById(otherEndParentId);\n if (!otherEnd || !otherEndParentId) {\n return; // if all the ancestors of the oppsite are all hidden, ignore the edge\n }\n\n otherEndModel = otherEnd.getModel();\n }\n var otherEndId = otherEndModel.id;\n var selfEnd = otherEndIsSource ? target : source;\n var selfEndModel = selfEnd.getModel();\n // find the nearest visible ancestor\n while (!selfEnd.isVisible()) {\n var selfEndPId = selfEndModel.parentId,\n selfEndCId = selfEndModel.comboId;\n var selfEndParentId = selfEndPId || selfEndCId;\n selfEnd = _this.findById(selfEndParentId);\n if (!selfEnd || !selfEndParentId) {\n return; // if all the ancestors of the oppsite are all hidden, ignore the edge\n }\n\n if (selfEndModel.comboId === comboModel.id || selfEndModel.parentId === comboModel.id) {\n break; // if the next ancestor is the combo, break the while\n }\n\n selfEndModel = selfEnd.getModel();\n }\n var selfEndId = selfEndModel.id;\n if (otherEndId) {\n var vEdgeInfo = otherEndIsSource ? {\n source: otherEndId,\n target: selfEndId,\n isVEdge: true,\n size: size\n } : {\n source: selfEndId,\n target: otherEndId,\n isVEdge: true,\n size: size\n };\n var vedgeId = \"\".concat(vEdgeInfo.source, \"-\").concat(vEdgeInfo.target);\n // update the width of the virtual edges, which is the sum of merged actual edges\n // be attention that the actual edges with same endpoints but different directions will be represented by two different virtual edges\n if (addedVEdgeMap[vedgeId]) {\n addedVEdgeMap[vedgeId].size += size;\n return;\n }\n addedVEdgeMap[vedgeId] = vEdgeInfo;\n }\n }\n });\n this.addItems(Object.values(addedVEdgeMap).map(function (edgeInfo) {\n return {\n type: 'vedge',\n model: edgeInfo\n };\n }), false);\n this.emit('aftercollapseexpandcombo', {\n action: 'expand',\n item: combo\n });\n };\n AbstractGraph.prototype.collapseExpandCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') return;\n var comboModel = combo.getModel();\n // if one ancestor combo of the combo is collapsed, it should not be collapsed or expanded\n var parentItem = this.findById(comboModel.parentId);\n while (parentItem) {\n var parentModel = parentItem.getModel();\n if (parentModel.collapsed) {\n console.warn(\"Fail to expand the combo since it's ancestor combo is collapsed.\");\n parentItem = undefined;\n return;\n }\n parentItem = this.findById(parentModel.parentId);\n }\n var collapsed = comboModel.collapsed;\n // 该群组已经处于收起状态,需要展开\n if (collapsed) {\n this.expandCombo(combo, stack);\n } else {\n this.collapseCombo(combo, stack);\n }\n this.updateCombo(combo);\n };\n /**\n * 获取节点所有的邻居节点\n *\n * @param {(string | INode)} node 节点 ID 或实例\n * @returns {INode[]}\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getNeighbors = function (node, type) {\n var item = node;\n if (isString(node)) {\n item = this.findById(node);\n }\n return item.getNeighbors(type);\n };\n /**\n * 获取 node 的度数\n *\n * @param {(string | INode)} node 节点 ID 或实例\n * @param {('in' | 'out' | 'total' | 'all' | undefined)} 度数类型,in 入度,out 出度,total 总度数,all 返回三种类型度数的对象\n * @returns {Number | Object} 该节点的度数\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getNodeDegree = function (node, type, refresh) {\n if (type === void 0) {\n type = undefined;\n }\n if (refresh === void 0) {\n refresh = false;\n }\n var item = node;\n if (isString(node)) {\n item = this.findById(node);\n }\n var degrees = this.get('degrees');\n if (!degrees || refresh) {\n degrees = getDegree(this.save());\n this.set('degrees', degrees);\n }\n var nodeDegrees = degrees[item.getID()];\n var res = 0;\n // 如果是通过 addItem 后面新增加的节点,此时它的所有度数都为 0\n if (!nodeDegrees) {\n return 0;\n }\n switch (type) {\n case 'in':\n res = nodeDegrees.inDegree;\n break;\n case 'out':\n res = nodeDegrees.outDegree;\n break;\n case 'all':\n res = nodeDegrees;\n break;\n default:\n res = nodeDegrees.degree;\n break;\n }\n return res;\n };\n AbstractGraph.prototype.getUndoStack = function () {\n return this.undoStack;\n };\n AbstractGraph.prototype.getRedoStack = function () {\n return this.redoStack;\n };\n /**\n * 获取 undo 和 redo 栈的数据\n */\n AbstractGraph.prototype.getStackData = function () {\n if (!this.get('enabledStack')) {\n return null;\n }\n return {\n undoStack: this.undoStack.toArray(),\n redoStack: this.redoStack.toArray()\n };\n };\n /**\n * 清空 undo stack & redo stack\n */\n AbstractGraph.prototype.clearStack = function () {\n if (this.get('enabledStack')) {\n this.undoStack.clear();\n this.redoStack.clear();\n this.emit('stackchange', {\n undoStack: this.undoStack,\n redoStack: this.redoStack\n });\n }\n };\n /**\n * 将操作类型和操作数据入栈\n * @param action 操作类型\n * @param data 入栈的数据\n * @param stackType 栈的类型\n */\n AbstractGraph.prototype.pushStack = function (action, data, stackType) {\n if (action === void 0) {\n action = 'update';\n }\n if (stackType === void 0) {\n stackType = 'undo';\n }\n if (!this.get('enabledStack')) {\n console.warn('请先启用 undo & redo 功能,在实例化 Graph 时候配置 enabledStack: true !');\n return;\n }\n var stackData = data ? clone(data) : {\n before: {},\n after: clone(this.save())\n };\n if (stackType === 'redo') {\n this.redoStack.push({\n action: action,\n data: stackData\n });\n } else {\n this.undoStack.push({\n action: action,\n data: stackData\n });\n }\n this.emit('stackchange', {\n action: action,\n stackType: stackType,\n undoStack: this.undoStack,\n redoStack: this.redoStack\n });\n };\n /**\n * 获取邻接矩阵\n *\n * @param {boolean} cache 是否使用缓存的\n * @param {boolean} directed 是否是有向图,默认取 graph.directed\n * @returns {Matrix} 邻接矩阵\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getAdjMatrix = function (cache, directed) {\n if (cache === void 0) {\n cache = true;\n }\n if (directed === undefined) directed = this.get('directed');\n var currentAdjMatrix = this.get('adjMatrix');\n if (!currentAdjMatrix || !cache) {\n currentAdjMatrix = getAdjacentMatrix(this.save(), directed);\n this.set('adjMatrix', currentAdjMatrix);\n }\n return currentAdjMatrix;\n };\n /**\n * 获取最短路径矩阵\n *\n * @param {boolean} cache 是否使用缓存的\n * @param {boolean} directed 是否是有向图,默认取 graph.directed\n * @returns {Matrix} 最短路径矩阵\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getShortestPathMatrix = function (cache, directed) {\n if (cache === void 0) {\n cache = true;\n }\n if (directed === undefined) directed = this.get('directed');\n var currentAdjMatrix = this.get('adjMatrix');\n var currentShourtestPathMatrix = this.get('shortestPathMatrix');\n if (!currentAdjMatrix || !cache) {\n currentAdjMatrix = getAdjacentMatrix(this.save(), directed);\n this.set('adjMatrix', currentAdjMatrix);\n }\n if (!currentShourtestPathMatrix || !cache) {\n currentShourtestPathMatrix = floydWarshall(this.save(), directed);\n this.set('shortestPathMatrix', currentShourtestPathMatrix);\n }\n return currentShourtestPathMatrix;\n };\n /**\n * 重新定义监听函数,复写参数类型\n */\n AbstractGraph.prototype.on = function (eventName, callback, once) {\n return _super.prototype.on.call(this, eventName, callback, once);\n };\n /**\n * 销毁画布\n */\n AbstractGraph.prototype.destroy = function () {\n var _a, _b, _c, _d, _e;\n this.emit('beforedestroy');\n this.clear();\n // 清空栈数据\n this.clearStack();\n (_a = this.get('itemController')) === null || _a === void 0 ? void 0 : _a.destroy();\n (_b = this.get('modeController')) === null || _b === void 0 ? void 0 : _b.destroy();\n (_c = this.get('viewController')) === null || _c === void 0 ? void 0 : _c.destroy();\n (_d = this.get('stateController')) === null || _d === void 0 ? void 0 : _d.destroy();\n (_e = this.get('canvas')) === null || _e === void 0 ? void 0 : _e.destroy();\n this.cfg = null;\n this.destroyed = true;\n this.redoStack = null;\n this.undoStack = null;\n this.emit('afterdestroy');\n };\n /**\n * 创建凸包或凹包轮廓\n * @param cfg HullCfg 轮廓配置项\n */\n AbstractGraph.prototype.createHull = function (cfg) {\n if (!cfg.members || cfg.members.length < 1) {\n console.warn('Create hull failed! The members is empty.');\n return;\n }\n var parent = this.get('hullGroup');\n var hullMap = this.get('hullMap');\n if (!hullMap) {\n hullMap = {};\n this.set('hullMap', hullMap);\n }\n if (!parent || parent.get('destroyed')) {\n parent = this.get('group').addGroup({\n id: 'hullGroup'\n });\n parent.toBack();\n this.set('hullGroup', parent);\n }\n if (hullMap[cfg.id]) {\n console.warn('Existed hull id.');\n return hullMap[cfg.id];\n }\n var group = parent.addGroup({\n id: \"\".concat(cfg.id, \"-container\")\n });\n var hull = new Hull(this, __assign(__assign({}, cfg), {\n group: group\n }));\n var hullId = hull.id;\n hullMap[hullId] = hull;\n return hull;\n };\n /**\n * 获取当前 graph 中存在的包裹轮廓\n * @return {[key: string]: Hull} Hull 的 map,hullId 对应的 hull 实例\n */\n AbstractGraph.prototype.getHulls = function () {\n return this.get('hullMap');\n };\n /**\n * 根据 hullId 获取对应的 hull\n * @return Hull\n */\n AbstractGraph.prototype.getHullById = function (hullId) {\n return this.get('hullMap')[hullId];\n };\n AbstractGraph.prototype.removeHull = function (hull) {\n var _a;\n var hullInstance;\n if (isString(hull)) {\n hullInstance = this.getHullById(hull);\n } else {\n hullInstance = hull;\n }\n (_a = this.get('hullMap')) === null || _a === void 0 ? true : delete _a[hullInstance.id];\n hullInstance.destroy();\n };\n AbstractGraph.prototype.removeHulls = function () {\n var hulls = this.getHulls();\n if (!hulls || !Object.keys(hulls).length) return;\n Object.keys(hulls).forEach(function (key) {\n var hull = hulls[key];\n hull.destroy();\n });\n this.set('hullMap', {});\n };\n return AbstractGraph;\n}(EventEmitter);\nexport default AbstractGraph;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport { __assign } from \"tslib\";\nimport Global from '../global';\nimport { ext } from '@antv/matrix-util';\nimport { deepMix, each, mix, isBoolean, isPlainObject, clone } from '@antv/util';\nimport { cloneBesidesImg } from '../util/graphic';\nvar transform = ext.transform;\nvar CLS_SHAPE_SUFFIX = '-shape';\nvar CLS_LABEL_SUFFIX = '-label';\nvar ARROWS = ['startArrow', 'endArrow'];\nvar SHAPE_DEFAULT_ATTRS = {\n lineWidth: 1,\n stroke: undefined,\n fill: undefined,\n lineAppendWidth: 1,\n opacity: undefined,\n strokeOpacity: undefined,\n fillOpacity: undefined,\n x: 0,\n y: 0,\n r: 10,\n width: 20,\n height: 20,\n shadowColor: undefined,\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\nvar PATH_SHAPE_DEFAULT_ATTRS = {\n lineWidth: 1,\n stroke: '#000',\n lineDash: undefined,\n startArrow: false,\n endArrow: false,\n opacity: undefined,\n strokeOpacity: undefined,\n fillOpacity: undefined,\n shadowColor: undefined,\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\nvar SHAPES_DEFAULT_ATTRS = {\n edge: PATH_SHAPE_DEFAULT_ATTRS,\n node: SHAPE_DEFAULT_ATTRS,\n combo: SHAPE_DEFAULT_ATTRS\n};\nexport var CLS_LABEL_BG_SUFFIX = '-label-bg';\n// 单个 shape 带有一个 label,共用这段代码\nexport var shapeBase = {\n // 默认样式及配置\n options: {\n labelCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n },\n descriptionCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n }\n },\n itemType: '',\n /**\n * 形状的类型,例如 circle,ellipse,polyline...\n */\n type: '',\n getCustomConfig: function getCustomConfig(cfg) {\n return {};\n },\n getOptions: function getOptions(cfg, updateType) {\n if (updateType === 'move' || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox'))) return cfg;\n return deepMix({}, this.options, this.getCustomConfig(cfg) || {}, cfg);\n },\n /**\n * 绘制节点/边,包含文本\n * @override\n * @param {Object} cfg 节点的配置项\n * @param {G.Group} group 节点的容器\n * @return {IShape} 绘制的图形\n */\n draw: function draw(cfg, group) {\n group['shapeMap'] = {};\n this.mergeStyle = this.getOptions(cfg);\n var shape = this.drawShape(cfg, group);\n shape.set('className', this.itemType + CLS_SHAPE_SUFFIX);\n group['shapeMap'][this.itemType + CLS_SHAPE_SUFFIX] = shape;\n if (cfg.label) {\n var label = this.drawLabel(cfg, group);\n label.set('className', this.itemType + CLS_LABEL_SUFFIX);\n group['shapeMap'][this.itemType + CLS_LABEL_SUFFIX] = label;\n }\n return shape;\n },\n /**\n * 绘制完成后的操作,便于用户继承现有的节点、边\n * @param cfg\n * @param group\n * @param keyShape\n */\n afterDraw: function afterDraw(cfg, group, keyShape) {},\n drawShape: function drawShape(cfg, group) {\n return null;\n },\n drawLabel: function drawLabel(cfg, group) {\n var defaultLabelCfg = (this.mergeStyle || this.getOptions(cfg) || {}).labelCfg;\n // image的情况下有可能为null\n var labelCfg = defaultLabelCfg || {};\n var labelStyle = this.getLabelStyle(cfg, labelCfg, group);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n var label = group.addShape('text', {\n attrs: labelStyle,\n draggable: true,\n className: 'text-shape',\n name: 'text-shape',\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n if (!isNaN(rotate) && rotate !== '') {\n var labelBBox = label.getBBox();\n var labelMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (labelStyle.rotateCenter) {\n switch (labelStyle.rotateCenter) {\n case 'center':\n labelMatrix = transform(labelMatrix, [['t', -labelBBox.width / 2, -labelBBox.height / 2], ['r', rotate], ['t', labelBBox.width / 2, labelBBox.height / 2]]);\n break;\n case 'lefttop':\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y], ['r', rotate], ['t', labelStyle.x, labelStyle.y]]);\n break;\n case 'leftcenter':\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y - labelBBox.height / 2], ['r', rotate], ['t', labelStyle.x, labelStyle.y + labelBBox.height / 2]]);\n break;\n default:\n labelMatrix = transform(labelMatrix, [['t', -labelBBox.width / 2, -labelBBox.height / 2], ['r', rotate], ['t', labelBBox.width / 2, labelBBox.height / 2]]);\n break;\n }\n } else {\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y - labelBBox.height / 2], ['r', rotate], ['t', labelStyle.x, labelStyle.y + labelBBox.height / 2]]);\n }\n label.setMatrix(labelMatrix);\n }\n if (labelStyle.background) {\n var rect = this.drawLabelBg(cfg, group, label);\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n rect.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = rect;\n label.toFront();\n }\n return label;\n },\n drawLabelBg: function drawLabelBg(cfg, group, label) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = mix({}, defaultLabelCfg, cfg.labelCfg);\n var style = this.getLabelBgStyleByPosition(label, labelCfg);\n var rect = group.addShape('rect', {\n name: 'text-bg-shape',\n attrs: style,\n labelRelated: true\n });\n group['shapeMap']['text-bg-shape'] = rect;\n return rect;\n },\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg, group) {\n return {\n text: cfg.label\n };\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n return {};\n },\n /**\n * 获取文本的配置项\n * @param cfg 节点的配置项\n * @param labelCfg 文本的配置项\n * @param group 父容器,label 的定位可能与图形相关\n */\n getLabelStyle: function getLabelStyle(cfg, labelCfg, group) {\n var calculateStyle = this.getLabelStyleByPosition(cfg, labelCfg, group);\n var attrName = \"\".concat(this.itemType, \"Label\"); // 取 nodeLabel,edgeLabel 的配置项\n var defaultStyle = Global[attrName] ? Global[attrName].style : null;\n return __assign(__assign(__assign({}, defaultStyle), calculateStyle), labelCfg.style);\n },\n /**\n * 获取图形的配置项\n * @param cfg\n */\n getShapeStyle: function getShapeStyle(cfg) {\n return cfg.style;\n },\n /**\n * 更新节点,包含文本\n * @override\n * @param {Object} cfg 节点/边的配置项\n * @param {G6.Item} item 节点/边\n */\n update: function update(cfg, item, updateType) {\n this.updateShapeStyle(cfg, item, updateType);\n this.updateLabel(cfg, item, updateType);\n },\n updateShapeStyle: function updateShapeStyle(cfg, item, updateType) {\n var _a;\n var group = item.getContainer();\n var shape = item.getKeyShape();\n var shapeStyle = mix({}, shape.attr(), cfg.style);\n var _loop_1 = function _loop_1(key) {\n var _b;\n var style = shapeStyle[key];\n if (isPlainObject(style)) {\n // 更新图元素样式,支持更新子元素\n var subShape = ((_a = group['shapeMap']) === null || _a === void 0 ? void 0 : _a[key]) || group.find(function (element) {\n return element.get('name') === key;\n });\n subShape === null || subShape === void 0 ? void 0 : subShape.attr(style);\n } else {\n shape.attr((_b = {}, _b[key] = style, _b));\n }\n };\n for (var key in shapeStyle) {\n _loop_1(key);\n }\n },\n updateLabel: function updateLabel(cfg, item, updateType) {\n var _a, _b;\n var group = item.getContainer();\n var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,\n labelCfg = _c === void 0 ? {} : _c;\n var labelClassName = this.itemType + CLS_LABEL_SUFFIX;\n var label = group['shapeMap'][labelClassName] || group.find(function (ele) {\n return ele.get('className') === labelClassName;\n });\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n var labelBg = group['shapeMap'][labelBgClassname] || group.find(function (ele) {\n return ele.get('className') === labelBgClassname;\n });\n if (label && cfg.label === undefined) {\n group.removeChild(label);\n delete group['shapeMap'][labelClassName];\n if (labelBg) {\n group.removeChild(labelBg);\n delete group['shapeMap'][labelBgClassname];\n }\n }\n // 防止 cfg.label = \"\" 的情况\n if (cfg.label || cfg.label === '') {\n // 若传入的新配置中有 label,(用户没传入但原先有 label,label 也会有值)\n if (!label) {\n // 若原先不存在 label,则绘制一个新的 label\n var newLabel = this.drawLabel(cfg, group);\n newLabel.set('className', labelClassName);\n group['shapeMap'][labelClassName] = newLabel;\n } else {\n // 若原先存在 label,则更新样式。与 getLabelStyle 不同在于这里需要融合当前 label 的样式\n // 融合 style 以外的属性:position, offset, ...\n if (!updateType || updateType === 'bbox|label' || this.itemType === 'edge' && updateType !== 'style') {\n labelCfg = deepMix(labelCfg, cfg.labelCfg);\n }\n // 获取位置信息\n var calculateStyle = this.getLabelStyleByPosition(cfg, labelCfg, group);\n // 取 nodeLabel,edgeLabel 的配置项\n var cfgStyle = (_a = cfg.labelCfg) === null || _a === void 0 ? void 0 : _a.style;\n // const cfgBgStyle = labelCfg.style?.background;\n // 需要融合当前\b label 的样式 label.attr()。不再需要全局/默认样式,因为已经应用在当前的 label 上\n var labelStyle = __assign(__assign({}, calculateStyle), cfgStyle);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n // 计算 label 的旋转矩阵\n if (!isNaN(rotate) && rotate !== '') {\n // if G 4.x define the rotateAtStart, use it directly instead of using the following codes\n var rotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n rotateMatrix = transform(rotateMatrix, [['t', -labelStyle.x, -labelStyle.y], ['r', rotate], ['t', labelStyle.x, labelStyle.y]]);\n labelStyle.matrix = rotateMatrix;\n label.attr(labelStyle);\n } else {\n if (((_b = label.getMatrix()) === null || _b === void 0 ? void 0 : _b[4]) !== 1) {\n label.resetMatrix();\n }\n label.attr(labelStyle);\n }\n if (!labelBg) {\n if (labelStyle.background) {\n labelBg = this.drawLabelBg(cfg, group, label);\n labelBg.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = labelBg;\n label.toFront();\n }\n } else if (labelStyle.background) {\n var calculateBgStyle = this.getLabelBgStyleByPosition(label, labelCfg);\n labelBg.attr(calculateBgStyle);\n } else {\n group.removeChild(labelBg);\n }\n }\n }\n },\n // update(cfg, item) // 默认不定义\n afterUpdate: function afterUpdate(cfg, item) {},\n /**\n * 设置节点的状态,主要是交互状态,业务状态请在 draw 方法中实现\n * 单图形的节点仅考虑 selected、active 状态,有其他状态需求的用户自己复写这个方法\n * @override\n * @param {String} name 状态名称\n * @param {String | Boolean} value 状态值\n * @param {G6.Item} item 节点\n */\n setState: function setState(name, value, item) {\n var _a, _b;\n var _c;\n var shape = item.get('keyShape');\n if (!shape || shape.destroyed) return;\n var type = item.getType();\n var stateName = isBoolean(value) ? name : \"\".concat(name, \":\").concat(value);\n var shapeStateStyle = this.getStateStyle(stateName, item);\n var itemStateStyle = item.getStateStyle(stateName);\n // const originStyle = item.getOriginStyle();\n // 不允许设置一个不存在的状态\n if (!itemStateStyle && !shapeStateStyle) {\n return;\n }\n // 要设置或取消的状态的样式\n // 当没有 state 状态时,默认使用 model.stateStyles 中的样式\n var styles = mix({}, itemStateStyle || shapeStateStyle);\n var group = item.getContainer();\n // 从图元素现有的样式中删除本次要取消的 states 中存在的属性值。使用对象检索更快\n var keptAttrs = {\n x: 1,\n y: 1,\n cx: 1,\n cy: 1,\n matrix: 1\n };\n if (type === 'combo') {\n keptAttrs.r = 1;\n keptAttrs.width = 1;\n keptAttrs.height = 1;\n }\n if (value) {\n var _loop_2 = function _loop_2(key) {\n var _d;\n var style = styles[key];\n if (isPlainObject(style) && !ARROWS.includes(key)) {\n var subShape = ((_c = group['shapeMap']) === null || _c === void 0 ? void 0 : _c[key]) || group.find(function (element) {\n return element.get('name') === key;\n });\n subShape === null || subShape === void 0 ? void 0 : subShape.attr(style);\n } else {\n // 非纯对象,则认为是设置到 keyShape 上面的\n shape.attr((_d = {}, _d[key] = style, _d));\n }\n };\n // style 为要设置的状态的样式\n for (var key in styles) {\n _loop_2(key);\n }\n } else {\n // 所有生效的 state 的样式\n var enableStatesStyle = cloneBesidesImg(item.getCurrentStatesStyle());\n var model = item.getModel();\n // 原始样式\n var originStyle_1 = mix({}, model.style, cloneBesidesImg(item.getOriginStyle()));\n var keyShapeName_1 = shape.get('name');\n // cloning shape.attr(), keys.forEach to avoid cloning the img attr, which leads to maximum clone heap #2383\n // const keyShapeStyles = clone(shape.attr())\n var shapeAttrs_1 = shape.attr();\n var keyShapeStyles_1 = {};\n Object.keys(shapeAttrs_1).forEach(function (key) {\n if (key === 'img') return;\n var attr = shapeAttrs_1[key];\n if (attr && _typeof(attr) === 'object') {\n keyShapeStyles_1[key] = clone(attr);\n } else {\n keyShapeStyles_1[key] = attr;\n }\n });\n // 已有样式 - 要取消的状态的样式\n var filtetDisableStatesStyle = {};\n var _loop_3 = function _loop_3(p) {\n var style = styles[p];\n if (isPlainObject(style) && !ARROWS.includes(p)) {\n var subShape_1 = group['shapeMap'][p] || group.find(function (ele) {\n return ele.get('name') === p;\n });\n if (subShape_1) {\n var subShapeStyles_1 = cloneBesidesImg(subShape_1.attr());\n each(style, function (v, key) {\n if (p === keyShapeName_1 && keyShapeStyles_1[key] && !keptAttrs[key]) {\n delete keyShapeStyles_1[key];\n var value_1 = originStyle_1[p][key] || SHAPES_DEFAULT_ATTRS[type][key];\n shape.attr(key, value_1);\n } else if (subShapeStyles_1[key] || subShapeStyles_1[key] === 0) {\n delete subShapeStyles_1[key];\n var value_2 = originStyle_1[p][key] || SHAPES_DEFAULT_ATTRS[type][key];\n subShape_1.attr(key, value_2);\n }\n });\n filtetDisableStatesStyle[p] = subShapeStyles_1;\n }\n } else {\n if (keyShapeStyles_1[p] && !keptAttrs[p]) {\n delete keyShapeStyles_1[p];\n var value_3 = originStyle_1[p] || (originStyle_1[keyShapeName_1] ? originStyle_1[keyShapeName_1][p] : undefined) || SHAPES_DEFAULT_ATTRS[type][p];\n shape.attr(p, value_3);\n }\n }\n };\n // styles 为要取消的状态的样式\n for (var p in styles) {\n _loop_3(p);\n }\n // 从图元素现有的样式中删除本次要取消的 states 中存在的属性值后,\n // 如果 keyShape 有 name 属性,则 filtetDisableStatesStyle 的格式为 { keyShapeName: {} }\n // 否则为普通对象\n if (!keyShapeName_1) {\n mix(filtetDisableStatesStyle, keyShapeStyles_1);\n } else {\n filtetDisableStatesStyle[keyShapeName_1] = keyShapeStyles_1;\n }\n for (var key in enableStatesStyle) {\n if (keptAttrs[key]) continue;\n var enableStyle = enableStatesStyle[key];\n if (!isPlainObject(enableStyle) || ARROWS.includes(key)) {\n // 把样式属性merge到keyShape中\n if (!keyShapeName_1) {\n mix(originStyle_1, (_a = {}, _a[key] = enableStyle, _a));\n } else {\n mix(originStyle_1[keyShapeName_1], (_b = {}, _b[key] = enableStyle, _b));\n delete originStyle_1[key];\n }\n delete enableStatesStyle[key];\n }\n }\n var originstyles = {};\n deepMix(originstyles, originStyle_1, filtetDisableStatesStyle, enableStatesStyle);\n var keyShapeSetted = false;\n var _loop_4 = function _loop_4(originKey) {\n var _e, _f;\n var style = originstyles[originKey];\n if (isPlainObject(style) && !ARROWS.includes(originKey)) {\n var subShape = group['shapeMap'][originKey] || group.find(function (ele) {\n return ele.get('name') === originKey;\n });\n if (subShape) {\n // The text's position and matrix is not allowed to be affected by states\n if (subShape.get('type') === 'text' || subShape.get('labelRelated')) {\n delete style.x;\n delete style.y;\n delete style.matrix;\n }\n if (originKey === keyShapeName_1) {\n if (type === 'combo') {\n delete style.r;\n delete style.width;\n delete style.height;\n }\n keyShapeSetted = true;\n }\n subShape.attr(style);\n }\n } else if (!keyShapeSetted) {\n var value_4 = style || SHAPES_DEFAULT_ATTRS[type][originKey];\n // 当更新 combo 状态时,当不存在 keyShapeName 时候,则认为是设置到 keyShape 上面的\n if (type === 'combo') {\n if (!keyShapeName_1) {\n shape.attr((_e = {}, _e[originKey] = value_4, _e));\n }\n } else {\n shape.attr((_f = {}, _f[originKey] = value_4, _f));\n }\n }\n };\n for (var originKey in originstyles) {\n _loop_4(originKey);\n }\n }\n },\n /**\n * 获取不同状态下的样式\n *\n * @param {string} name 状态名称\n * @param {Item} item Node或Edge的实例\n * @return {object} 样式\n */\n getStateStyle: function getStateStyle(name, item) {\n var model = item.getModel();\n var type = item.getType();\n var _a = this.getOptions(model),\n stateStyles = _a.stateStyles,\n _b = _a.style,\n style = _b === void 0 ? {} : _b;\n var modelStateStyle = model.stateStyles ? model.stateStyles[name] : stateStyles && stateStyles[name];\n if (type === 'combo') {\n return clone(modelStateStyle);\n }\n return mix({}, style, modelStateStyle);\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 锚点的数组,如果为 null,则没有锚点\n */\n getAnchorPoints: function getAnchorPoints(cfg) {\n var _a, _b;\n var anchorPoints = (cfg === null || cfg === void 0 ? void 0 : cfg.anchorPoints) || ((_a = this.getCustomConfig(cfg)) === null || _a === void 0 ? void 0 : _a.anchorPoints) || ((_b = this.options) === null || _b === void 0 ? void 0 : _b.anchorPoints);\n return anchorPoints;\n }\n};","import { __assign } from \"tslib\";\nimport { isArray, isNil, mix } from '@antv/util';\nimport { formatPadding } from '../util/base';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase } from './shapeBase';\nimport { truncateLabelByLength } from '../util/graphic';\nvar singleNode = {\n itemType: 'node',\n // 单个图形的类型\n shapeType: 'single-node',\n /**\n * 文本相对图形的位置,默认以中心点\n * 位置包括: top, bottom, left, right, center\n * @type {String}\n */\n labelPosition: 'center',\n /**\n * 文本相对偏移,当 labelPosition 不为 center 时有效\n * @type {Number}\n */\n offset: Global.nodeLabel.offset,\n /**\n * 获取节点宽高\n * @internal 返回节点的大小,以 [width, height] 的方式维护\n * @param {Object} cfg 节点的配置项\n * @return {Array} 宽高\n */\n getSize: function getSize(cfg) {\n var _a;\n var size = ((_a = this.mergeStyle) === null || _a === void 0 ? void 0 : _a.size) || cfg.size || this.getOptions({}).size || Global.defaultNode.size; // Global.defaultNode.size; // \n // size 是数组,但长度为1,则补长度为2\n if (isArray(size) && size.length === 1) {\n size = [size[0], size[0]];\n }\n // size 为数字,则转换为数组\n if (!isArray(size)) {\n size = [size, size];\n }\n return size;\n },\n // 私有方法,不希望扩展的节点复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelMaxLength = labelCfg.maxLength;\n var text = cfg.label;\n if (labelMaxLength) {\n text = truncateLabelByLength(text, labelMaxLength);\n }\n var labelPosition = labelCfg.position || this.labelPosition;\n // 默认的位置(最可能的情形),所以放在最上面\n if (labelPosition === 'center') {\n return {\n x: 0,\n y: 0,\n text: text,\n textBaseline: 'middle',\n textAlign: 'center'\n };\n }\n var offset = labelCfg.offset;\n if (isNil(offset)) {\n // 考虑 offset = 0 的场景,不用用 labelCfg.offset || Global.nodeLabel.offset\n offset = this.offset; // 不居中时的偏移量\n }\n\n var size = this.getSize(cfg);\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: 0,\n y: -size[1] / 2 - offset,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: size[1] / 2 + offset,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: -size[0] / 2 - offset,\n y: 0,\n textBaseline: 'middle',\n textAlign: 'right'\n };\n break;\n default:\n style = {\n x: size[0] / 2 + offset,\n y: 0,\n textBaseline: 'middle',\n textAlign: 'left'\n };\n break;\n }\n style.text = text;\n return style;\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n var _a;\n if (!label) return {};\n var backgroundStyle = (_a = labelCfg.style) === null || _a === void 0 ? void 0 : _a.background;\n if (!backgroundStyle) return {};\n var bbox = label.getBBox();\n var padding = formatPadding(backgroundStyle.padding);\n var backgroundWidth = bbox.width + padding[1] + padding[3];\n var backgroundHeight = bbox.height + padding[0] + padding[2];\n return __assign(__assign({\n x: bbox.minX - padding[3],\n y: bbox.minY - padding[0]\n }, backgroundStyle), {\n width: backgroundWidth,\n height: backgroundHeight\n });\n },\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType; // || this.type,都已经加了 shapeType\n var style = this.getShapeStyle(cfg);\n var shape = group.addShape(shapeType, {\n attrs: style,\n draggable: true,\n name: 'node-shape'\n });\n group['shapeMap']['node-shape'] = shape;\n return shape;\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var defaultLinkPoints = (this.mergeStyle || this.getOptions(cfg)).linkPoints;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markBottom = group['shapeMap']['link-point-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-bottom';\n });\n var currentLinkPoints;\n if (markLeft) {\n currentLinkPoints = markLeft.attr();\n }\n if (markRight && !currentLinkPoints) {\n currentLinkPoints = markRight.attr();\n }\n if (markTop && !currentLinkPoints) {\n currentLinkPoints = markTop.attr();\n }\n if (markBottom && !currentLinkPoints) {\n currentLinkPoints = markBottom.attr();\n }\n if (!currentLinkPoints) currentLinkPoints = defaultLinkPoints;\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _a = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n bottom: undefined\n },\n left = _a.left,\n right = _a.right,\n top = _a.top,\n bottom = _a.bottom;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: -width / 2,\n y: 0\n }));\n }\n } else if (left) {\n var name_1 = 'link-point-left';\n group['shapeMap'][name_1] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: -width / 2,\n y: 0\n }),\n className: name_1,\n name: name_1,\n isAnchorPoint: true\n });\n }\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n }\n markRight.attr(__assign(__assign({}, styles), {\n x: width / 2,\n y: 0\n }));\n } else if (right) {\n var name_2 = 'link-point-right';\n group['shapeMap'][name_2] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: width / 2,\n y: 0\n }),\n className: name_2,\n name: name_2,\n isAnchorPoint: true\n });\n }\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n }\n markTop.attr(__assign(__assign({}, styles), {\n x: 0,\n y: -height / 2\n }));\n } else if (top) {\n var name_3 = 'link-point-top';\n group['shapeMap'][name_3] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: 0,\n y: -height / 2\n }),\n className: name_3,\n name: name_3,\n isAnchorPoint: true\n });\n }\n if (markBottom) {\n if (!bottom && bottom !== undefined) {\n markBottom.remove();\n delete group['shapeMap']['link-point-bottom'];\n } else {\n markBottom.attr(__assign(__assign({}, styles), {\n x: 0,\n y: height / 2\n }));\n }\n } else if (bottom) {\n var name_4 = 'link-point-bottom';\n group['shapeMap'][name_4] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: 0,\n y: height / 2\n }),\n className: name_4,\n name: name_4,\n isAnchorPoint: true\n });\n }\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle, hasIcon, updateType) {\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign({}, keyShapeStyle));\n if (!undefined || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('label'))) {\n this.updateLabel(cfg, item, updateType);\n }\n if (hasIcon) {\n this.updateIcon(cfg, item);\n }\n },\n updateIcon: function updateIcon(cfg, item) {\n var _this = this;\n var group = item.getContainer();\n var icon = (this.mergeStyle || this.getOptions(cfg)).icon;\n var _a = cfg.icon ? cfg.icon : {\n show: undefined,\n text: undefined\n },\n show = _a.show,\n text = _a.text;\n var iconShape = group['shapeMap'][\"\".concat(this.type, \"-icon\")] || group.find(function (ele) {\n return ele.get('name') === \"\".concat(_this.type, \"-icon\");\n });\n if (iconShape) {\n // 若原先存在 icon\n if (show || show === undefined) {\n // 若传入 show: true, 或没有设置,则更新原有的 icon 样式\n var iconConfig = mix({}, iconShape.attr(), icon);\n var _b = iconConfig.width,\n w = _b === void 0 ? 20 : _b,\n _c = iconConfig.height,\n h = _c === void 0 ? 20 : _c;\n if (iconConfig.fontFamily === 'iconfont' || iconConfig.hasOwnProperty('text')) {\n w = 0;\n h = 0;\n }\n iconShape.attr(__assign(__assign({}, iconConfig), {\n x: -w / 2,\n y: -h / 2\n }));\n } else {\n // 若传入了 show: false 则删除原先的 icon\n iconShape.remove();\n delete group['shapeMap'][\"\".concat(this.type, \"-icon\")];\n }\n } else if (show) {\n // 如果原先不存在 icon,但传入了 show: true,则新增 icon\n var name_5 = \"\".concat(this.type, \"-icon\");\n if (text) {\n group['shapeMap'][name_5] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: name_5,\n name: name_5\n });\n } else {\n var w = icon.width,\n h = icon.height;\n group['shapeMap'][name_5] = group.addShape('image', {\n attrs: __assign(__assign({}, icon), {\n x: -w / 2,\n y: -h / 2\n }),\n className: name_5,\n name: name_5\n });\n }\n // to ensure the label is on the top of all the shapes\n var labelShape = group['shapeMap']['node-label'] || group.find(function (ele) {\n return ele.get('name') === 'node-label';\n });\n if (labelShape) {\n labelShape.toFront();\n }\n }\n }\n};\nvar singleNodeDef = __assign(__assign({}, shapeBase), singleNode);\nShape.registerNode('single-node', singleNodeDef);","/**\n * @fileOverview 自定义边\n * @description 自定义边中有大量逻辑同自定义节点重复,虽然可以提取成为 mixin ,但是考虑到代码的可读性,还是单独实现。\n */\nimport { __assign } from \"tslib\";\nimport { deepMix, mix, each, isNil, isNumber, isArray } from '@antv/util';\nimport { getLabelPosition, getLoopCfgs } from '../util/graphic';\nimport { distance, getCircleCenterByPoints } from '../util/math';\nimport { getControlPoint, getSpline } from '../util/path';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase, CLS_LABEL_BG_SUFFIX } from './shapeBase';\nvar CLS_SHAPE = 'edge-shape';\n// start,end 倒置,center 不变\nfunction revertAlign(labelPosition) {\n var textAlign = labelPosition;\n if (labelPosition === 'start') {\n textAlign = 'end';\n } else if (labelPosition === 'end') {\n textAlign = 'start';\n }\n return textAlign;\n}\nvar singleEdge = {\n itemType: 'edge',\n /**\n * 文本的位置\n * @type {String}\n */\n labelPosition: 'center',\n /**\n * 文本的 x 偏移\n * @type {Number}\n */\n refX: 0,\n /**\n * 文本的 y 偏移\n * @type {Number}\n */\n refY: 0,\n /**\n * 文本是否跟着线自动旋转,默认 false\n * @type {Boolean}\n */\n labelAutoRotate: false,\n // 自定义边时的配置\n options: {\n size: Global.defaultEdge.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultEdge.style.stroke,\n lineAppendWidth: Global.defaultEdge.style.lineAppendWidth\n },\n labelCfg: {\n style: {\n fill: Global.edgeLabel.style.fill,\n fontSize: Global.edgeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.edgeStateStyles)\n },\n /**\n * 获取边的 path\n * @internal 供扩展的边覆盖\n * @param {Array} points 构成边的点的集合\n * @return {Array} 构成 path 的数组\n */\n getPath: function getPath(points) {\n var path = [];\n each(points, function (point, index) {\n if (index === 0) {\n path.push(['M', point.x, point.y]);\n } else {\n path.push(['L', point.x, point.y]);\n }\n });\n return path;\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var size = cfg.size || Global.defaultEdge.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg);\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var path = this.getPath(points);\n var styles = mix({}, Global.defaultEdge.style, {\n stroke: Global.defaultEdge.color,\n lineWidth: size,\n path: path\n }, style);\n return styles;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item, updateType) {\n var _a;\n var group = item.getContainer();\n // const strokeStyle: ShapeStyle = {\n // stroke: cfg.color,\n // };\n var shape = ((_a = item.getKeyShape) === null || _a === void 0 ? void 0 : _a.call(item)) || group['shapeMap']['edge-shape']; // group.find((element) => element.get('className') === 'edge-shape');\n var size = cfg.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg); // || cfg.controlPoints;\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var currentAttr = shape.attr();\n // const previousStyle = mix({}, strokeStyle, currentAttr, cfg.style);\n var previousStyle = cfg.style || {};\n if (previousStyle.stroke === undefined) {\n previousStyle.stroke = cfg.color;\n }\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var routeCfg = {\n radius: previousStyle.radius\n };\n if (!controlPoints) {\n routeCfg = {\n source: source,\n target: target,\n offset: previousStyle.offset,\n radius: previousStyle.radius\n };\n }\n var path = this.getPath(points, routeCfg);\n var style = {};\n if (updateType === 'move') {\n style = {\n path: path\n };\n } else {\n if (currentAttr.endArrow && previousStyle.endArrow === false) {\n cfg.style.endArrow = {\n path: ''\n };\n }\n if (currentAttr.startArrow && previousStyle.startArrow === false) {\n cfg.style.startArrow = {\n path: ''\n };\n }\n style = __assign({}, cfg.style);\n if (style.lineWidth === undefined) style.lineWidth = (isNumber(size) ? size : size === null || size === void 0 ? void 0 : size[0]) || currentAttr.lineWidth;\n if (style.path === undefined) style.path = path;\n if (style.stroke === undefined) style.stroke = currentAttr.stroke || cfg.color;\n }\n if (shape) {\n shape.attr(style);\n }\n },\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg, group) {\n var labelPosition = labelCfg.position || this.labelPosition; // 文本的位置用户可以传入\n var style = {};\n var pathShape = group === null || group === void 0 ? void 0 : group['shapeMap'][CLS_SHAPE]; // group?.find((element) => element.get('className') === CLS_SHAPE);\n // 不对 pathShape 进行判空,如果线不存在,说明有问题了\n var pointPercent;\n if (labelPosition === 'start') {\n pointPercent = 0;\n } else if (labelPosition === 'end') {\n pointPercent = 1;\n } else {\n pointPercent = 0.5;\n }\n // 偏移量\n var offsetX = labelCfg.refX || this.refX;\n var offsetY = labelCfg.refY || this.refY;\n // 如果两个节点重叠,线就变成了一个点,这时候label的位置,就是这个点 + 绝对偏移\n if (cfg.startPoint.x === cfg.endPoint.x && cfg.startPoint.y === cfg.endPoint.y) {\n style.x = cfg.startPoint.x + offsetX;\n style.y = cfg.startPoint.y + offsetY;\n style.text = cfg.label;\n return style;\n }\n var autoRotate;\n if (isNil(labelCfg.autoRotate)) autoRotate = this.labelAutoRotate;else autoRotate = labelCfg.autoRotate;\n var offsetStyle = getLabelPosition(pathShape, pointPercent, offsetX, offsetY, autoRotate);\n style.x = offsetStyle.x;\n style.y = offsetStyle.y;\n style.rotate = offsetStyle.rotate;\n style.textAlign = this._getTextAlign(labelPosition, offsetStyle.angle);\n style.text = cfg.label;\n return style;\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n if (!label) {\n return {};\n }\n var bbox = label.getBBox();\n var backgroundStyle = labelCfg.style && labelCfg.style.background;\n if (!backgroundStyle) {\n return {};\n }\n var padding = backgroundStyle.padding;\n var backgroundWidth = bbox.width + padding[1] + padding[3];\n var backgroundHeight = bbox.height + padding[0] + padding[2];\n var style = __assign(__assign({}, backgroundStyle), {\n width: backgroundWidth,\n height: backgroundHeight,\n x: bbox.minX - padding[3],\n y: bbox.minY - padding[0],\n matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1]\n });\n var autoRotate;\n if (isNil(labelCfg.autoRotate)) autoRotate = this.labelAutoRotate;else autoRotate = labelCfg.autoRotate;\n if (autoRotate) {\n style.matrix = label.attr('matrix') || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n return style;\n },\n // 获取文本对齐方式\n _getTextAlign: function _getTextAlign(labelPosition, angle) {\n var textAlign = 'center';\n if (!angle) {\n return labelPosition;\n }\n angle = angle % (Math.PI * 2); // 取模\n if (labelPosition !== 'center') {\n if (angle >= 0 && angle <= Math.PI / 2 || angle >= 3 / 2 * Math.PI && angle < 2 * Math.PI) {\n textAlign = labelPosition;\n } else {\n textAlign = revertAlign(labelPosition);\n }\n }\n return textAlign;\n },\n /**\n * @internal 获取边的控制点\n * @param {Object} cfg 边的配置项\n * @return {Array} 控制点的数组\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * @internal 处理需要重计算点和边的情况\n * @param {Object} cfg 边的配置项\n * @return {Object} 边的配置项\n */\n getPathPoints: function getPathPoints(cfg) {\n return cfg;\n },\n /**\n * 绘制边\n * @override\n * @param {Object} cfg 边的配置项\n * @param {G.Group} group 边的容器\n * @return {IShape} 图形\n */\n drawShape: function drawShape(cfg, group) {\n var shapeStyle = this.getShapeStyle(cfg);\n var shape = group.addShape('path', {\n className: CLS_SHAPE,\n name: CLS_SHAPE,\n attrs: shapeStyle\n });\n group['shapeMap'][CLS_SHAPE] = shape;\n return shape;\n },\n drawLabel: function drawLabel(cfg, group) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = deepMix({}, defaultLabelCfg, cfg.labelCfg);\n var labelStyle = this.getLabelStyle(cfg, labelCfg, group);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n var label = group.addShape('text', {\n attrs: labelStyle,\n name: 'text-shape',\n labelRelated: true,\n draggable: true\n });\n group['shapeMap']['text-shape'] = label;\n if (!isNaN(rotate) && rotate !== '') {\n label.rotateAtStart(rotate);\n }\n if (labelStyle.background) {\n var rect = this.drawLabelBg(cfg, group, label, labelStyle, rotate);\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n rect.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = rect;\n label.toFront();\n }\n return label;\n },\n drawLabelBg: function drawLabelBg(cfg, group, label, labelStyle, rotate) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = deepMix({}, defaultLabelCfg, cfg.labelCfg);\n var style = this.getLabelBgStyleByPosition(label, labelCfg);\n var rect = group.addShape('rect', {\n name: 'text-bg-shape',\n attrs: style,\n labelRelated: true\n });\n group['shapeMap']['text-bg-shape'] = rect;\n return rect;\n }\n};\nvar singleEdgeDef = __assign(__assign({}, shapeBase), singleEdge);\nShape.registerEdge('single-edge', singleEdgeDef);\n// 直线, 不支持控制点\nShape.registerEdge('line', {\n // 控制点不生效\n getControlPoints: function getControlPoints() {\n return undefined;\n }\n}, 'single-edge');\n// 直线\nShape.registerEdge('spline', {\n getPath: function getPath(points) {\n var path = getSpline(points);\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('arc', {\n curveOffset: 20,\n clockwise: 1,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var midPoint = {\n x: (startPoint.x + endPoint.x) / 2,\n y: (startPoint.y + endPoint.y) / 2\n };\n var center;\n var arcPoint;\n // 根据给定点计算圆弧\n if (cfg.controlPoints !== undefined) {\n arcPoint = cfg.controlPoints[0];\n center = getCircleCenterByPoints(startPoint, arcPoint, endPoint);\n // 根据控制点和直线关系决定 clockwise值\n if (startPoint.x <= endPoint.x && startPoint.y > endPoint.y) {\n this.clockwise = center.x > arcPoint.x ? 0 : 1;\n } else if (startPoint.x <= endPoint.x && startPoint.y < endPoint.y) {\n this.clockwise = center.x > arcPoint.x ? 1 : 0;\n } else if (startPoint.x > endPoint.x && startPoint.y <= endPoint.y) {\n this.clockwise = center.y < arcPoint.y ? 0 : 1;\n } else {\n this.clockwise = center.y < arcPoint.y ? 1 : 0;\n }\n // 若给定点和两端点共线,无法生成圆弧,绘制直线\n if ((arcPoint.x - startPoint.x) / (arcPoint.y - startPoint.y) === (endPoint.x - startPoint.x) / (endPoint.y - startPoint.y)) {\n return [];\n }\n } else {\n // 根据直线连线中点的的偏移计算圆弧\n // 若用户给定偏移量则根据其计算,否则按照默认偏移值计算\n if (cfg.curveOffset === undefined) {\n cfg.curveOffset = this.curveOffset;\n }\n if (isArray(cfg.curveOffset)) {\n cfg.curveOffset = cfg.curveOffset[0];\n }\n if (cfg.curveOffset < 0) {\n this.clockwise = 0;\n } else {\n this.clockwise = 1;\n }\n var vec = {\n x: endPoint.x - startPoint.x,\n y: endPoint.y - startPoint.y\n };\n var edgeAngle = Math.atan2(vec.y, vec.x);\n arcPoint = {\n x: cfg.curveOffset * Math.cos(-Math.PI / 2 + edgeAngle) + midPoint.x,\n y: cfg.curveOffset * Math.sin(-Math.PI / 2 + edgeAngle) + midPoint.y\n };\n center = getCircleCenterByPoints(startPoint, arcPoint, endPoint);\n }\n var radius = distance(startPoint, center);\n var controlPoints = [{\n x: radius,\n y: radius\n }];\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n // 控制点与端点共线\n if (points.length === 2) {\n path.push(['L', points[1].x, points[1].y]);\n } else {\n path.push(['A', points[1].x, points[1].y, 0, 0, this.clockwise, points[2].x, points[2].y]);\n }\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('quadratic', {\n curvePosition: 0.5,\n curveOffset: -20,\n getControlPoints: function getControlPoints(cfg) {\n var controlPoints = cfg.controlPoints; // 指定controlPoints\n if (!controlPoints || !controlPoints.length) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (isArray(cfg.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];\n if (isArray(cfg.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];\n var innerPoint = getControlPoint(startPoint, endPoint, cfg.curvePosition, cfg.curveOffset);\n controlPoints = [innerPoint];\n }\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n path.push(['Q', points[1].x, points[1].y, points[2].x, points[2].y]);\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('cubic', {\n curvePosition: [1 / 2, 1 / 2],\n curveOffset: [-20, 20],\n getControlPoints: function getControlPoints(cfg) {\n var controlPoints = cfg.controlPoints; // 指定 controlPoints\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n if (!controlPoints || !controlPoints.length || controlPoints.length < 2) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var innerPoint1 = getControlPoint(startPoint, endPoint, cfg.curvePosition[0], cfg.curveOffset[0]);\n var innerPoint2 = getControlPoint(startPoint, endPoint, cfg.curvePosition[1], cfg.curveOffset[1]);\n controlPoints = [innerPoint1, innerPoint2];\n }\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n path.push(['C', points[1].x, points[1].y, points[2].x, points[2].y, points[3].x, points[3].y]);\n return path;\n }\n}, 'single-edge');\n// 垂直方向的三阶贝塞尔曲线,不再考虑用户外部传入的控制点\nShape.registerEdge('cubic-vertical', {\n curvePosition: [1 / 2, 1 / 2],\n minCurveOffset: [0, 0],\n curveOffset: undefined,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.minCurveOffset === undefined) cfg.minCurveOffset = this.minCurveOffset;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.minCurveOffset)) cfg.minCurveOffset = [cfg.minCurveOffset, -cfg.minCurveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n var yDist = endPoint.y - startPoint.y;\n var curveOffset = [0, 0];\n if (cfg.curveOffset) {\n curveOffset = cfg.curveOffset;\n } else if (Math.abs(yDist) < Math.abs(cfg.minCurveOffset[0])) {\n curveOffset = cfg.minCurveOffset;\n }\n var innerPoint1 = {\n x: startPoint.x,\n y: startPoint.y + yDist * this.curvePosition[0] + curveOffset[0]\n };\n var innerPoint2 = {\n x: endPoint.x,\n y: endPoint.y - yDist * this.curvePosition[1] + curveOffset[1]\n };\n return [innerPoint1, innerPoint2];\n }\n}, 'cubic');\n// 水平方向的三阶贝塞尔曲线,不再考虑用户外部传入的控制点\nShape.registerEdge('cubic-horizontal', {\n curvePosition: [1 / 2, 1 / 2],\n minCurveOffset: [0, 0],\n curveOffset: undefined,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.minCurveOffset === undefined) cfg.minCurveOffset = this.minCurveOffset;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.minCurveOffset)) cfg.minCurveOffset = [cfg.minCurveOffset, -cfg.minCurveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n var xDist = endPoint.x - startPoint.x;\n var curveOffset = [0, 0];\n if (cfg.curveOffset) {\n curveOffset = cfg.curveOffset;\n } else if (Math.abs(xDist) < Math.abs(cfg.minCurveOffset[0])) {\n curveOffset = cfg.minCurveOffset;\n }\n var innerPoint1 = {\n x: startPoint.x + xDist * this.curvePosition[0] + curveOffset[0],\n y: startPoint.y\n };\n var innerPoint2 = {\n x: endPoint.x - xDist * this.curvePosition[1] + curveOffset[1],\n y: endPoint.y\n };\n var controlPoints = [innerPoint1, innerPoint2];\n return controlPoints;\n }\n}, 'cubic');\nShape.registerEdge('loop', {\n getPathPoints: function getPathPoints(cfg) {\n return getLoopCfgs(cfg);\n },\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n afterDraw: function afterDraw(cfg) {\n cfg.controlPoints = undefined;\n },\n afterUpdate: function afterUpdate(cfg) {\n cfg.controlPoints = undefined;\n }\n}, 'cubic');","import { __assign } from \"tslib\";\nimport { isArray, isNil, clone } from '@antv/util';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase } from './shapeBase';\nvar singleCombo = {\n itemType: 'combo',\n // 单个图形的类型\n shapeType: 'single-combo',\n /**\n * Combo 标题文本相对图形的位置,默认为 top\n * 位置包括: top, bottom, left, right, center\n * @type {String}\n */\n labelPosition: 'top',\n /**\n * 标题文本相对偏移,当 labelPosition 不为 center 时有效\n * @type {Number}\n */\n refX: Global.comboLabel.refX,\n refY: Global.comboLabel.refY,\n options: {\n style: {\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n /**\n * 获取 Combo 宽高\n * @internal 返回 Combo 的大小,以 [width, height] 的方式维护\n * @param {Object} cfg Combo 的配置项\n * @return {Array} 宽高\n */\n getSize: function getSize(cfg) {\n var size = clone(cfg.size || this.options.size || Global.defaultCombo.size);\n // size 是数组,若长度为 1,则补长度为 2\n if (isArray(size) && size.length === 1) {\n size = [size[0], size[0]];\n }\n // size 为数字,则转换为数组\n if (!isArray(size)) {\n size = [size, size];\n }\n return size;\n },\n // 私有方法,不希望扩展的 Combo 复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelPosition = labelCfg.position || this.labelPosition;\n var cfgStyle = cfg.style;\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var refX = labelCfg.refX,\n refY = labelCfg.refY;\n // 考虑 refX 和 refY = 0 的场景,不用用 labelCfg.refX || Global.nodeLabel.refX\n if (isNil(refX)) {\n refX = this.refX; // 不居中时的偏移量\n }\n\n if (isNil(refY)) {\n refY = this.refY; // 不居中时的偏移量\n }\n\n var size = this.getSize(cfg);\n var r = Math.max(cfgStyle.r, size[0] / 2) || size[0] / 2;\n var dis = r + padding;\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: 0,\n y: -dis - refY,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: dis + refY,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: -dis + refX,\n y: 0,\n textAlign: 'left'\n };\n break;\n case 'center':\n style = {\n x: 0,\n y: 0,\n text: cfg.label,\n textAlign: 'center'\n };\n break;\n default:\n style = {\n x: dis + refX,\n y: 0,\n textAlign: 'right'\n };\n break;\n }\n style.text = cfg.label;\n return style;\n },\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType; // || this.type,都已经加了 shapeType\n var style = this.getShapeStyle(cfg);\n var shape = group.addShape(shapeType, {\n attrs: style,\n draggable: true,\n name: 'combo-shape'\n });\n return shape;\n },\n updateCollapsedIcon: function updateCollapsedIcon(cfg, item, keyShapeStyle) {\n var collapsed = cfg.collapsed,\n _a = cfg.collapsedSubstituteIcon,\n collapsedSubstituteIcon = _a === void 0 ? {} : _a;\n var substituteIconConfig = Object.assign({}, this.options.collapsedSubstituteIcon, collapsedSubstituteIcon);\n var show = substituteIconConfig.show,\n img = substituteIconConfig.img,\n width = substituteIconConfig.width,\n height = substituteIconConfig.height;\n var group = item.getContainer();\n var collapsedIconShape = group.find(function (ele) {\n return ele.get('name') === 'combo-collapsed-substitute-icon';\n });\n var iconShapeExist = collapsedIconShape && !collapsedIconShape.destroyed;\n var keyShape = item.get('keyShape');\n if (collapsed && show) {\n if (iconShapeExist) {\n collapsedIconShape.show();\n } else {\n var sizeAttr = {\n width: width || keyShapeStyle.r * 2 || keyShapeStyle.width,\n height: height || keyShapeStyle.r * 2 || keyShapeStyle.height\n };\n collapsedIconShape = group.addShape('image', {\n attrs: __assign({\n img: img,\n x: -sizeAttr.width / 2,\n y: -sizeAttr.height / 2\n }, sizeAttr),\n name: 'combo-collapsed-substitute-icon',\n draggable: true\n });\n }\n keyShape.hide();\n } else if (iconShapeExist) {\n collapsedIconShape.hide();\n keyShape.show();\n }\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle) {\n var _this = this;\n var keyShape = item.get('keyShape');\n var itemAnimate = item.get('animate');\n var animate = itemAnimate && (cfg.animate === undefined ? this.options.animate : cfg.animate);\n if (animate && keyShape.animate) {\n // 更新到展开状态,先将 collapsedIcon 隐藏。否则在动画完成后再出现 collapsedIcon\n if (!cfg.collapsed) {\n this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n keyShape.animate(keyShapeStyle, {\n duration: 200,\n easing: 'easeLinear',\n callback: function callback() {\n if (cfg.collapsed) {\n _this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n }\n });\n } else {\n keyShape.attr(__assign({}, keyShapeStyle));\n this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n this.updateLabel(cfg, item);\n // special for some types of nodes\n }\n};\n\nvar singleComboDef = __assign(__assign({}, shapeBase), singleCombo);\nShape.registerCombo('single-combo', singleComboDef);","import { __assign } from \"tslib\";\nimport Global from '../../global';\nimport Shape from '../shape';\nimport { isNumber, clone, mix, isArray } from '@antv/util';\n// 圆形 Combo\nShape.registerCombo('circle', {\n // 自定义节点时的配置\n options: {\n size: [Global.defaultCombo.size[0], Global.defaultCombo.size[0]],\n padding: Math.max.apply(Math, Global.defaultCombo.padding),\n animate: true,\n style: {\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize\n },\n refX: 0,\n refY: 0\n },\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'top',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n delete style.height;\n delete style.width;\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: 'circle-combo',\n name: 'circle-combo',\n draggable: true\n });\n return keyShape;\n },\n /**\n * 获取 Combo 的样式,供基于该 Combo 自定义时使用\n * @param {Object} cfg Combo 数据模型\n * @return {Object} Combo 的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n var r;\n if (fixSize) {\n r = isNumber(fixSize) ? fixSize / 2 : fixSize[0] / 2;\n } else {\n var size = this.getSize(cfg);\n if (!isNumber(style.r) || isNaN(style.r)) r = size[0] / 2 || Global.defaultCombo.style.r;else r = Math.max(style.r, size[0] / 2) || size[0] / 2;\n }\n style.r = r + padding;\n var styles = __assign({\n x: 0,\n y: 0\n }, style);\n if (cfg.style) cfg.style.r = r;else {\n cfg.style = {\n r: r\n };\n }\n return styles;\n },\n update: function update(cfg, item) {\n var size = this.getSize(cfg);\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var cfgStyle = clone(cfg.style);\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n var r;\n if (fixSize) {\n r = isNumber(fixSize) ? fixSize / 2 : fixSize[0] / 2;\n } else {\n r = Math.max(cfgStyle.r, size[0] / 2) || size[0] / 2;\n }\n cfgStyle.r = r + padding;\n var itemCacheSize = item.get('sizeCache');\n if (itemCacheSize) {\n itemCacheSize.r = cfgStyle.r;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, keyShape.attr(), strokeStyle, cfgStyle);\n if (cfg.style) cfg.style.r = r;else {\n cfg.style = {\n r: r\n };\n }\n this.updateShape(cfg, item, style, true);\n }\n}, 'single-combo');","import { __assign } from \"tslib\";\nimport { mix, isNumber, clone, isNil } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\nShape.registerCombo('rect', {\n // 自定义 Combo 时的配置\n options: {\n size: [40, 5],\n padding: [25, 20, 15, 20],\n animate: true,\n style: {\n radius: 0,\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 连接点,默认为左右\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n shapeType: 'rect',\n labelPosition: 'top',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: 'rect-combo',\n name: 'rect-combo',\n draggable: true\n });\n return keyShape;\n },\n // 私有方法,不希望扩展的 Combo 复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelPosition = labelCfg.position || this.labelPosition;\n var cfgStyle = cfg.style;\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var refX = labelCfg.refX,\n refY = labelCfg.refY;\n // 考虑 refX 和 refY = 0 的场景,不用用 labelCfg.refX || Global.nodeLabel.refY\n if (isNil(refX)) {\n refX = this.refX; // 不居中时的偏移量\n }\n\n if (isNil(refY)) {\n refY = this.refY; // 不居中时的偏移量\n }\n\n var left = -cfgStyle.width / 2 - padding[3];\n var right = cfgStyle.width / 2 + padding[1];\n var top = -cfgStyle.height / 2 - padding[0];\n var bottom = cfgStyle.height / 2 + padding[2];\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: left + refX,\n y: top + refY,\n textBaseline: 'top',\n textAlign: 'left'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: bottom + refY,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: left + refY,\n y: 0,\n textAlign: 'left'\n };\n break;\n case 'center':\n style = {\n x: 0,\n y: 0,\n text: cfg.label,\n textAlign: 'center'\n };\n break;\n case 'top-center':\n style = {\n x: 0,\n y: top + refY,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n default:\n style = {\n x: right + refX,\n y: 0,\n textAlign: 'right'\n };\n break;\n }\n style.text = cfg.label;\n return style;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var size = this.getSize(cfg);\n var width;\n var height;\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n if (fixSize) {\n if (isNumber(fixSize)) {\n width = fixSize;\n height = fixSize;\n } else {\n width = fixSize[0];\n height = fixSize[1];\n }\n } else {\n if (!isNumber(style.width) || isNaN(style.width)) width = size[0] || Global.defaultCombo.style.width;else width = Math.max(style.width, size[0]) || size[0];\n if (!isNumber(style.height) || isNaN(style.height)) height = size[1] || Global.defaultCombo.style.height;else height = Math.max(style.height, size[1]) || size[1];\n }\n var x = -width / 2 - padding[3];\n var y = -height / 2 - padding[0];\n style.width = width + padding[1] + padding[3];\n style.height = height + padding[0] + padding[2];\n var styles = __assign({\n x: x,\n y: y\n }, style);\n if (!cfg.style) {\n cfg.style = {\n width: width,\n height: height\n };\n } else {\n cfg.style.width = width;\n cfg.style.height = height;\n }\n return styles;\n },\n update: function update(cfg, item) {\n var size = this.getSize(cfg);\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var cfgStyle = clone(cfg.style);\n var width, height;\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n if (fixSize) {\n if (isNumber(fixSize)) {\n width = fixSize;\n height = fixSize;\n } else {\n width = fixSize[0];\n height = fixSize[1];\n }\n } else {\n width = Math.max(cfgStyle.width, size[0]) || size[0];\n height = Math.max(cfgStyle.height, size[1]) || size[1];\n }\n cfgStyle.width = width + padding[1] + padding[3];\n cfgStyle.height = height + padding[0] + padding[2];\n var itemCacheSize = item.get('sizeCache');\n if (itemCacheSize) {\n itemCacheSize.width = cfgStyle.width;\n itemCacheSize.height = cfgStyle.height;\n }\n cfgStyle.x = -width / 2 - padding[3];\n cfgStyle.y = -height / 2 - padding[0];\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, keyShape.attr(), strokeStyle, cfgStyle);\n if (cfg.style) {\n cfg.style.width = width;\n cfg.style.height = height;\n } else {\n cfg.style = {\n width: width,\n height: height\n };\n }\n this.updateShape(cfg, item, style, false);\n }\n}, 'single-combo');","import { __assign } from \"tslib\";\nimport { deepMix } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\n// 带有图标的圆,可用于拓扑图中\nShape.registerNode('simple-circle', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'simple-circle',\n // 文本位置\n labelPosition: 'center',\n shapeMap: {},\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var name = \"\".concat(this.type, \"-keyShape\");\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: name,\n draggable: true\n });\n group['shapeMap'][name] = keyShape;\n return keyShape;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = deepMix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n r: r\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var size = this.getSize(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n r: size[0] / 2\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = deepMix({}, keyShape.attr(), strokeStyle, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport { mix } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\nShape.registerNode('simple-rect', {\n // 自定义节点时的配置\n options: {\n size: [100, 30],\n style: {\n radius: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'simple-rect',\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n return keyShape;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var size = this.getSize(cfg);\n var keyShape = item.get('keyShape');\n if (!cfg.size) {\n size[0] = keyShape.attr('width') || defaultStyle.width;\n size[1] = keyShape.attr('height') || defaultStyle.height;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n x: -size[0] / 2,\n y: -size[1] / 2,\n width: size[0],\n height: size[1]\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, false, updateType);\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport Shape from '../shape';\nimport Global from '../../global';\n/**\n * 基本的图片,可以添加文本,默认文本在图片的下面\n */\nShape.registerNode('image', {\n options: {\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*eD7nT6tmYgAAAAAAAAAAAABkARQnAQ',\n size: 200,\n labelCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n },\n clipCfg: {\n show: false,\n type: 'circle',\n // circle\n r: 50,\n // ellipse\n rx: 50,\n ry: 35,\n // rect\n width: 50,\n height: 35,\n // polygon\n points: [[30, 12], [12, 30], [30, 48], [48, 30]],\n // path\n path: [['M', 25, 25], ['L', 50, 25], ['A', 12.5, 12.5, 0, 1, 1, 50, 50], ['A', 12.5, 12.5, 0, 1, 0, 50, 50], ['L', 25, 75], ['Z']],\n // 坐标\n x: 0,\n y: 0\n // clip 的属性样式\n // style: {\n // lineWidth: 1\n // },\n }\n },\n\n shapeType: 'image',\n labelPosition: 'bottom',\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType;\n var style = this.getShapeStyle(cfg);\n delete style.fill;\n var shape = group.addShape(shapeType, {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n this.drawClip(cfg, shape);\n return shape;\n },\n drawClip: function drawClip(cfg, shape) {\n var clip = (this.mergeStyle || this.getOptions(cfg)).clipCfg;\n if (!clip.show) {\n return;\n }\n // 支持 circle、rect、ellipse、Polygon 及自定义 path clip\n var type = clip.type,\n x = clip.x,\n y = clip.y,\n style = clip.style;\n if (type === 'circle') {\n var r = clip.r;\n shape.setClip({\n type: 'circle',\n attrs: __assign({\n r: r,\n x: x,\n y: y\n }, style)\n });\n } else if (type === 'rect') {\n var width = clip.width,\n height = clip.height;\n var rectX = x - width / 2;\n var rectY = y - height / 2;\n shape.setClip({\n type: 'rect',\n attrs: __assign({\n x: rectX,\n y: rectY,\n width: width,\n height: height\n }, style)\n });\n } else if (type === 'ellipse') {\n var rx = clip.rx,\n ry = clip.ry;\n shape.setClip({\n type: 'ellipse',\n attrs: __assign({\n x: x,\n y: y,\n rx: rx,\n ry: ry\n }, style)\n });\n } else if (type === 'polygon') {\n var points = clip.points;\n shape.setClip({\n type: 'polygon',\n attrs: __assign({\n points: points\n }, style)\n });\n } else if (type === 'path') {\n var path = clip.path;\n shape.setClip({\n type: 'path',\n attrs: __assign({\n path: path\n }, style)\n });\n }\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n defaultStyle = _a.style,\n img = _a.img;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (defaultStyle) {\n width = defaultStyle.width || size[0];\n height = defaultStyle.height || size[1];\n }\n var style = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height,\n img: img\n }, defaultStyle);\n return style;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item) {\n var group = item.getContainer();\n var shapeClassName = \"\".concat(this.itemType, \"-shape\");\n var shape = group['shapeMap'][shapeClassName] || group.find(function (element) {\n return element.get('className') === shapeClassName;\n }) || item.getKeyShape();\n var shapeStyle = this.getShapeStyle(cfg);\n if (shape && !shape.destroyed) {\n shape.attr(shapeStyle);\n }\n }\n}, 'single-node');","export default {\n triangle: function triangle(width, length, d) {\n if (width === void 0) {\n width = 10;\n }\n if (length === void 0) {\n length = 15;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + length, \",-\").concat(width / 2, \" L \").concat(begin + length, \",\").concat(width / 2, \" Z\");\n return path;\n },\n vee: function vee(width, length, d) {\n if (width === void 0) {\n width = 15;\n }\n if (length === void 0) {\n length = 20;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + length, \",-\").concat(width / 2, \"\\n L \").concat(begin + 2 * length / 3, \",0 L \").concat(begin + length, \",\").concat(width / 2, \" Z\");\n return path;\n },\n circle: function circle(r, d) {\n if (r === void 0) {\n r = 5;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \", 0\\n a \").concat(r, \",\").concat(r, \" 0 1,0 \").concat(r * 2, \",0\\n a \").concat(r, \",\").concat(r, \" 0 1,0 \").concat(-r * 2, \",0\");\n return path;\n },\n rect: function rect(width, length, d) {\n if (width === void 0) {\n width = 10;\n }\n if (length === void 0) {\n length = 10;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",\").concat(width / 2, \" \\n L \").concat(begin, \",\").concat(width / 2, \" Z\");\n return path;\n },\n diamond: function diamond(width, length, d) {\n if (width === void 0) {\n width = 15;\n }\n if (length === void 0) {\n length = 15;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 \\n L \").concat(begin + length / 2, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",0 \\n L \").concat(begin + length / 2, \",\").concat(width / 2, \" Z\");\n return path;\n },\n triangleRect: function triangleRect(tWidth, tLength, rWidth, rLength, gap, d) {\n if (tWidth === void 0) {\n tWidth = 15;\n }\n if (tLength === void 0) {\n tLength = 15;\n }\n if (rWidth === void 0) {\n rWidth = 15;\n }\n if (rLength === void 0) {\n rLength = 3;\n }\n if (gap === void 0) {\n gap = 5;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var rectBegin = begin + tLength + gap;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + tLength, \",-\").concat(tWidth / 2, \" L \").concat(begin + tLength, \",\").concat(tWidth / 2, \" Z\\n M \").concat(rectBegin, \", -\").concat(rWidth / 2, \"\\n L \").concat(rectBegin + rLength, \" -\").concat(rWidth / 2, \"\\n L \").concat(rectBegin + rLength, \" \").concat(rWidth / 2, \"\\n L \").concat(rectBegin, \" \").concat(rWidth / 2, \"\\n Z\");\n return path;\n }\n};","export default {\n collapse: function collapse(x, y, r) {\n return [['M', x - r, y], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0], ['M', x - r + 4, y], ['L', x + r - 4, y]];\n },\n expand: function expand(x, y, r) {\n return [['M', x - r, y], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0], ['M', x - r + 4, y], ['L', x - r + 2 * r - 4, y], ['M', x - r + r, y - r + 4], ['L', x, y + r - 4]];\n },\n upTriangle: function upTriangle(x, y, r) {\n var l1 = r * Math.cos(Math.PI / 6);\n var l2 = r * Math.sin(Math.PI / 6);\n return [['M', x - l1, y + l2], ['L', x + l1, y + l2], ['L', x, y - r], ['Z']];\n },\n downTriangle: function downTriangle(x, y, r) {\n var l1 = r * Math.cos(Math.PI / 6);\n var l2 = r * Math.sin(Math.PI / 6);\n return [['M', x - l1, y - l2], ['L', x + l1, y - l2], ['L', x, y + r], ['Z']];\n }\n};","export var defaultSubjectColors = ['#5F95FF', '#61DDAA', '#65789B', '#F6BD16', '#7262FD', '#78D3F8', '#9661BC', '#F6903D', '#008685', '#F08BB4'];","export var isForce = function isForce(layoutType) {\n return layoutType === 'force' || layoutType === 'g6force' || layoutType === 'gForce' || layoutType === 'force2';\n};","import { __assign } from \"tslib\";\nimport * as MathUtil from './math';\nimport * as GraphicUtil from './graphic';\nimport * as PathUtil from './path';\nimport * as BaseUtil from './base';\nimport * as ColorUtil from './color';\nimport * as LayoutUtil from './layout';\nimport { ext, mat3 } from '@antv/matrix-util';\nvar transform = ext.transform;\nvar Util = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), LayoutUtil), {\n transform: transform,\n mat3: mat3\n});\nexport default Util;","import { __assign, __awaiter, __generator, __rest } from \"tslib\";\nimport { isFunction, groupBy } from '@antv/util';\nimport { isNaN, calculationItemsBBox } from '../../util/base';\nimport { isForce } from '../../util/layout';\nvar LayoutController = /** @class */function () {\n function LayoutController(graph) {\n this.graph = graph;\n this.layoutCfg = graph.get('layout') || {};\n this.layoutType = this.getLayoutType();\n this.layoutMethods = [];\n this.initLayout();\n }\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.initLayout = function () {\n // no data before rendering\n };\n LayoutController.prototype.getLayoutType = function () {\n return this.getLayoutCfgType(this.layoutCfg);\n };\n LayoutController.prototype.getLayoutCfgType = function (layoutCfg) {\n var type = layoutCfg.type;\n // type should be top priority\n if (type) {\n return type;\n }\n var pipes = layoutCfg.pipes;\n if (Array.isArray(pipes)) {\n return pipes.map(function (pipe) {\n return (pipe === null || pipe === void 0 ? void 0 : pipe.type) || '';\n });\n }\n return null;\n };\n LayoutController.prototype.isLayoutTypeSame = function (cfg) {\n var current = this.getLayoutCfgType(cfg);\n var preHasPipes = Array.isArray(this.layoutType);\n var currentHasPipes = Array.isArray(current);\n // already has pipes, and the new one is pipes\n if (preHasPipes && currentHasPipes) {\n return this.layoutType.every(function (type, index) {\n return type === current[index];\n });\n }\n // only one of the pre and current is pipes\n if (Array.isArray(current) || Array.isArray(this.layoutType)) {\n return false;\n }\n // both of the pre and current are not pipes\n return (cfg === null || cfg === void 0 ? void 0 : cfg.type) === this.layoutType;\n };\n // 绘制\n LayoutController.prototype.refreshLayout = function () {\n var _a = this,\n graph = _a.graph,\n layoutType = _a.layoutType,\n _b = _a.layoutCfg,\n layoutCfg = _b === void 0 ? {} : _b;\n if (!graph) return;\n var animate = layoutCfg.animate;\n var isDefaultAnimateLayout = animate === undefined && (layoutType === 'force' || layoutType === 'force2');\n var forceAnimate = isForce(layoutType) && (animate || isDefaultAnimateLayout);\n if (graph.get('animate') && !forceAnimate) {\n graph.positionsAnimate(layoutType === 'comboCombined');\n } else {\n graph.refreshPositions(layoutType === 'comboCombined');\n }\n };\n // 更换布局\n LayoutController.prototype.changeLayout = function (cfg) {\n var disableTriggerLayout = cfg.disableTriggerLayout,\n otherCfgs = __rest(cfg, [\"disableTriggerLayout\"]);\n this.layoutCfg = otherCfgs;\n this.layoutType = otherCfgs.type || this.layoutType;\n // 不触发重新布局,仅更新参数\n if (disableTriggerLayout) return;\n this.layout();\n };\n // 更换数据\n LayoutController.prototype.changeData = function (success) {\n this.layout(success);\n };\n LayoutController.prototype.destoryLayoutMethods = function () {\n var layoutMethods = this.layoutMethods;\n var destroyedLayoutTypes = [];\n layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.forEach(function (layoutMethod) {\n var _a;\n var layoutType = (_a = layoutMethod.getType) === null || _a === void 0 ? void 0 : _a.call(layoutMethod);\n if (layoutType) destroyedLayoutTypes.push(layoutType);\n layoutMethod.destroy();\n });\n this.layoutMethods = [];\n return destroyedLayoutTypes;\n };\n // 销毁布局,不能使用 this.destroy,因为 controller 还需要被使用,只是把布局算法销毁\n LayoutController.prototype.destroyLayout = function () {\n this.destoryLayoutMethods();\n var graph = this.graph;\n if (graph && !graph.get('destroyed')) {\n graph.set('layout', undefined);\n }\n this.layoutCfg = undefined;\n this.layoutType = undefined;\n this.layoutMethods = undefined;\n };\n // 从 this.graph 获取数据\n LayoutController.prototype.setDataFromGraph = function () {\n var _a;\n var nodes = [];\n var hiddenNodes = [];\n var edges = [];\n var hiddenEdges = [];\n var comboEdges = [];\n var combos = [];\n var hiddenCombos = [];\n var nodeItems = this.graph.getNodes();\n var edgeItems = this.graph.getEdges();\n var comboItems = this.graph.getCombos();\n var nodeLength = nodeItems.length;\n for (var i = 0; i < nodeLength; i++) {\n var nodeItem = nodeItems[i];\n if (!nodeItem || nodeItem.destroyed) continue;\n var model = nodeItem.getModel();\n if (!nodeItem.isVisible()) {\n hiddenNodes.push(model);\n continue;\n }\n nodes.push(model);\n }\n var edgeLength = edgeItems.length;\n for (var i = 0; i < edgeLength; i++) {\n var edgeItem = edgeItems[i];\n if (!edgeItem || edgeItem.destroyed) continue;\n var model = edgeItem.getModel();\n if (!edgeItem.isVisible()) {\n hiddenEdges.push(model);\n continue;\n }\n if (!model.isComboEdge) edges.push(model);else comboEdges.push(model);\n }\n var comboLength = comboItems.length;\n for (var i = 0; i < comboLength; i++) {\n var comboItem = comboItems[i];\n if (comboItem.destroyed) continue;\n var model = comboItem.getModel();\n if (!comboItem.isVisible()) {\n hiddenCombos.push(model);\n continue;\n }\n combos.push(model);\n }\n return {\n nodes: nodes,\n hiddenNodes: hiddenNodes,\n edges: edges,\n hiddenEdges: hiddenEdges,\n combos: combos,\n hiddenCombos: hiddenCombos,\n comboEdges: comboEdges,\n vedges: (_a = this.graph.get('vedges')) === null || _a === void 0 ? void 0 : _a.map(function (edge) {\n return edge.getModel();\n })\n };\n };\n // 重新布局\n LayoutController.prototype.relayout = function (reloadData) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n layoutMethods = _a.layoutMethods,\n layoutCfg = _a.layoutCfg;\n if (!graph || graph.get('destroyed')) return;\n var start = Promise.resolve();\n if (reloadData) {\n this.data = this.setDataFromGraph();\n var nodes = this.data.nodes;\n if (!nodes) {\n return false;\n }\n start = this.initPositions(layoutCfg.center, nodes);\n }\n graph.emit('beforelayout');\n layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.forEach(function (layoutMethod, index) {\n var currentCfg = layoutCfg[index] || layoutCfg;\n start = start.then(function () {\n var _a;\n var relayoutPromise = _this.execLayoutMethod(currentCfg, index);\n if (index === layoutMethods.length - 1) {\n (_a = layoutCfg.onAllLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(layoutCfg);\n }\n return relayoutPromise;\n });\n });\n };\n // 筛选参与布局的nodes和edges\n LayoutController.prototype.filterLayoutData = function (data, cfg) {\n var nodes = data.nodes,\n edges = data.edges,\n rest = __rest(data, [\"nodes\", \"edges\"]);\n if (!nodes) {\n return data;\n }\n var nodesFilter;\n var edegsFilter;\n if (isFunction(cfg === null || cfg === void 0 ? void 0 : cfg.nodesFilter)) {\n nodesFilter = cfg.nodesFilter;\n } else {\n nodesFilter = function nodesFilter() {\n return true;\n };\n }\n var fNodes = nodes.filter(nodesFilter);\n if (isFunction(cfg === null || cfg === void 0 ? void 0 : cfg.edgesFilter)) {\n edegsFilter = cfg.edgesFilter;\n } else {\n var nodesMap_1 = fNodes.reduce(function (acc, cur) {\n acc[cur.id] = true;\n return acc;\n }, {});\n edegsFilter = function edegsFilter(edge) {\n return nodesMap_1[edge.source] && nodesMap_1[edge.target];\n };\n }\n return __assign({\n nodes: fNodes,\n edges: edges.filter(edegsFilter)\n }, rest);\n };\n LayoutController.prototype.getLayoutBBox = function (nodes) {\n var graph = this.graph;\n var graphGroupNodes = groupBy(graph.getNodes(), function (n) {\n return n.getModel().layoutOrder;\n });\n var layoutNodes = Object.values(graphGroupNodes).map(function (value) {\n var bbox = calculationItemsBBox(value);\n bbox.size = [bbox.width, bbox.height];\n return bbox;\n });\n var groupNodes = Object.values(groupBy(nodes, 'layoutOrder'));\n return {\n groupNodes: groupNodes,\n layoutNodes: layoutNodes\n };\n };\n // 控制布局动画\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.layoutAnimate = function () {};\n // 将当前节点的平均中心移动到原点\n LayoutController.prototype.moveToZero = function () {\n var graph = this.graph;\n var data = graph.get('data');\n var nodes = data.nodes;\n if (nodes[0].x === undefined || nodes[0].x === null || isNaN(nodes[0].x)) {\n return;\n }\n var meanCenter = [0, 0];\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n meanCenter[0] += node.x;\n meanCenter[1] += node.y;\n }\n meanCenter[0] /= nodes.length;\n meanCenter[1] /= nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n node.x -= meanCenter[0];\n node.y -= meanCenter[1];\n }\n };\n // 初始化节点到 center 附近\n LayoutController.prototype.initPositions = function (center, nodes) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var graph, nodesToInit, nodeLength;\n return __generator(this, function (_b) {\n graph = this.graph;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n return [2 /*return*/, Promise.resolve()];\n }\n nodesToInit = nodes.filter(function (node) {\n return isNaN(node.x) || isNaN(node.y);\n });\n nodeLength = nodesToInit ? nodesToInit.length : 0;\n if (!nodeLength) return [2 /*return*/];\n return [2 /*return*/, (_a = this.initWithPreset) === null || _a === void 0 ? void 0 : _a.call(this, function () {},\n // onFullfillment\n function () {\n var width = graph.get('width') * 0.85;\n var height = graph.get('height') * 0.85;\n var horiNum = Math.ceil(Math.sqrt(nodeLength) * (width / height));\n var vertiNum = Math.ceil(nodeLength / horiNum);\n var horiGap = width / (horiNum - 1);\n var vertiGap = height / (vertiNum - 1);\n if (!isFinite(horiGap) || !horiGap) horiGap = 0;\n if (!isFinite(vertiGap) || !horiGap) vertiGap = 0;\n var beginX = center[0] - width / 2;\n var beginY = center[1] - height / 2;\n var allHavePos = true;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodesToInit[i];\n if (isNaN(+node.x)) {\n allHavePos = false;\n node.x = i % horiNum * horiGap + beginX;\n }\n if (isNaN(+node.y)) {\n allHavePos = false;\n node.y = Math.floor(i / horiNum) * vertiGap + beginY;\n }\n }\n })];\n });\n });\n };\n LayoutController.prototype.destroy = function () {\n this.graph = null;\n this.destoryLayoutMethods();\n this.destroyed = true;\n };\n return LayoutController;\n}();\nexport default LayoutController;","var EventController = /** @class */function () {\n function EventController(graph) {\n this.graph = graph;\n this.destroyed = false;\n this.initEvents();\n }\n return EventController;\n}();\nexport default EventController;","import Behavior from './behavior';\nimport AbstractGraph from './graph/graph';\nimport Shape, { Arrow, Marker } from './element';\nimport Global from './global';\nimport Util from './util';\n// 用于 PC 和 Mobile 端分别实现 layout 和 updateLayoutCfg 方法\nimport AbstractLayout from './graph/controller/layout';\nimport AbstractEvent from './graph/controller/event';\nimport Node from './item/node';\nimport Edge from './item/edge';\nimport Hull from './item/hull';\nimport Combo from './item/combo';\nvar registerNode = Shape.registerNode;\nvar registerEdge = Shape.registerEdge;\nvar registerCombo = Shape.registerCombo;\nvar registerBehavior = Behavior.registerBehavior;\nvar BaseGlobal = Global;\nexport * from './types';\nexport { Arrow, Shape, Node, Edge, Combo, Hull, Marker, registerNode, registerCombo, AbstractGraph, Util, registerEdge, registerBehavior, AbstractLayout, AbstractEvent, BaseGlobal };\nexport default {\n version: Global.version,\n AbstractGraph: AbstractGraph,\n BaseGlobal: BaseGlobal,\n Util: Util,\n Shape: Shape,\n Node: Node,\n Edge: Edge,\n Combo: Combo,\n Hull: Hull,\n registerNode: Shape.registerNode,\n registerEdge: Shape.registerEdge,\n registerCombo: Shape.registerCombo,\n registerBehavior: Behavior.registerBehavior,\n Arrow: Arrow,\n Marker: Marker,\n AbstractLayout: AbstractLayout,\n AbstractEvent: AbstractEvent\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MESSAGE = exports.ALGORITHM = void 0;\nvar ALGORITHM = {\n pageRank: 'pageRank',\n breadthFirstSearch: 'breadthFirstSearch',\n connectedComponent: 'connectedComponent',\n depthFirstSearch: 'depthFirstSearch',\n detectCycle: 'detectCycle',\n detectDirectedCycle: 'detectDirectedCycle',\n detectAllCycles: 'detectAllCycles',\n detectAllDirectedCycle: 'detectAllDirectedCycle',\n detectAllUndirectedCycle: 'detectAllUndirectedCycle',\n dijkstra: 'dijkstra',\n findAllPath: 'findAllPath',\n findShortestPath: 'findShortestPath',\n floydWarshall: 'floydWarshall',\n getAdjMatrix: 'getAdjMatrix',\n getDegree: 'getDegree',\n getInDegree: 'getInDegree',\n getNeighbors: 'getNeighbors',\n getOutDegree: 'getOutDegree',\n labelPropagation: 'labelPropagation',\n louvain: 'louvain',\n GADDI: 'GADDI',\n minimumSpanningTree: 'minimumSpanningTree',\n SUCCESS: 'SUCCESS',\n FAILURE: 'FAILURE'\n};\nexports.ALGORITHM = ALGORITHM;\nvar MESSAGE = {\n SUCCESS: 'SUCCESS',\n FAILURE: 'FAILURE'\n};\nexports.MESSAGE = MESSAGE;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar adjMatrix = function adjMatrix(graphData, directed) {\n var nodes = graphData.nodes,\n edges = graphData.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error(\"invalid nodes data!\");\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (!sIndex && sIndex !== 0 || !tIndex && tIndex !== 0) return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\nvar _default = adjMatrix;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.LinkedListNode = void 0;\nvar defaultComparator = function defaultComparator(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n};\n/**\n * 链表中单个元素节点\n */\nvar LinkedListNode = /** @class */function () {\n function LinkedListNode(value, next) {\n if (next === void 0) {\n next = null;\n }\n this.value = value;\n this.next = next;\n }\n LinkedListNode.prototype.toString = function (callback) {\n return callback ? callback(this.value) : \"\".concat(this.value);\n };\n return LinkedListNode;\n}();\nexports.LinkedListNode = LinkedListNode;\nvar LinkedList = /** @class */function () {\n function LinkedList(comparator) {\n if (comparator === void 0) {\n comparator = defaultComparator;\n }\n this.head = null;\n this.tail = null;\n this.compare = comparator;\n }\n /**\n * 将指定元素添加到链表头部\n * @param value\n */\n LinkedList.prototype.prepend = function (value) {\n // 在头部添加一个节点\n var newNode = new LinkedListNode(value, this.head);\n this.head = newNode;\n if (!this.tail) {\n this.tail = newNode;\n }\n return this;\n };\n /**\n * 将指定元素添加到链表中\n * @param value\n */\n LinkedList.prototype.append = function (value) {\n var newNode = new LinkedListNode(value);\n // 如果不存在头节点,则将创建的新节点作为头节点\n if (!this.head) {\n this.head = newNode;\n this.tail = newNode;\n return this;\n }\n // 将新节点附加到链表末尾\n this.tail.next = newNode;\n this.tail = newNode;\n return this;\n };\n /**\n * 删除指定元素\n * @param value 要删除的元素\n */\n LinkedList.prototype.delete = function (value) {\n if (!this.head) {\n return null;\n }\n var deleteNode = null;\n // 如果删除的是头部元素,则将next作为头元素\n while (this.head && this.compare(this.head.value, value)) {\n deleteNode = this.head;\n this.head = this.head.next;\n }\n var currentNode = this.head;\n if (currentNode !== null) {\n // 如果删除了节点以后,将next节点前移\n while (currentNode.next) {\n if (this.compare(currentNode.next.value, value)) {\n deleteNode = currentNode.next;\n currentNode.next = currentNode.next.next;\n } else {\n currentNode = currentNode.next;\n }\n }\n }\n // 检查尾部节点是否被删除\n if (this.compare(this.tail.value, value)) {\n this.tail = currentNode;\n }\n return deleteNode;\n };\n /**\n * 查找指定的元素\n * @param param0\n */\n LinkedList.prototype.find = function (_a) {\n var _b = _a.value,\n value = _b === void 0 ? undefined : _b,\n _c = _a.callback,\n callback = _c === void 0 ? undefined : _c;\n if (!this.head) {\n return null;\n }\n var currentNode = this.head;\n while (currentNode) {\n // 如果指定了 callback,则按指定的 callback 查找\n if (callback && callback(currentNode.value)) {\n return currentNode;\n }\n // 如果指定了 value,则按 value 查找\n if (value !== undefined && this.compare(currentNode.value, value)) {\n return currentNode;\n }\n currentNode = currentNode.next;\n }\n return null;\n };\n /**\n * 删除尾部节点\n */\n LinkedList.prototype.deleteTail = function () {\n var deletedTail = this.tail;\n if (this.head === this.tail) {\n // 链表中只有一个元素\n this.head = null;\n this.tail = null;\n return deletedTail;\n }\n var currentNode = this.head;\n while (currentNode.next) {\n if (!currentNode.next.next) {\n currentNode.next = null;\n } else {\n currentNode = currentNode.next;\n }\n }\n this.tail = currentNode;\n return deletedTail;\n };\n /**\n * 删除头部节点\n */\n LinkedList.prototype.deleteHead = function () {\n if (!this.head) {\n return null;\n }\n var deletedHead = this.head;\n if (this.head.next) {\n this.head = this.head.next;\n } else {\n this.head = null;\n this.tail = null;\n }\n return deletedHead;\n };\n /**\n * 将一组元素转成链表中的节点\n * @param values 链表中的元素\n */\n LinkedList.prototype.fromArray = function (values) {\n var _this = this;\n values.forEach(function (value) {\n return _this.append(value);\n });\n return this;\n };\n /**\n * 将链表中的节点转成数组元素\n */\n LinkedList.prototype.toArray = function () {\n var nodes = [];\n var currentNode = this.head;\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n };\n /**\n * 反转链表中的元素节点\n */\n LinkedList.prototype.reverse = function () {\n var currentNode = this.head;\n var prevNode = null;\n var nextNode = null;\n while (currentNode) {\n // 存储下一个元素节点\n nextNode = currentNode.next;\n // 更改当前节点的下一个节点,以便将它连接到上一个节点上\n currentNode.next = prevNode;\n // 将 prevNode 和 currentNode 向前移动一步\n prevNode = currentNode;\n currentNode = nextNode;\n }\n this.tail = this.head;\n this.head = prevNode;\n };\n LinkedList.prototype.toString = function (callback) {\n if (callback === void 0) {\n callback = undefined;\n }\n return this.toArray().map(function (node) {\n return node.toString(callback);\n }).toString();\n };\n return LinkedList;\n}();\nvar _default = LinkedList;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _linkedList = _interopRequireDefault(require(\"./linked-list\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar Queue = /** @class */function () {\n function Queue() {\n this.linkedList = new _linkedList.default();\n }\n /**\n * 队列是否为空\n */\n Queue.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 读取队列头部的元素, 不删除队列中的元素\n */\n Queue.prototype.peek = function () {\n if (!this.linkedList.head) {\n return null;\n }\n return this.linkedList.head.value;\n };\n /**\n * 在队列的尾部新增一个元素\n * @param value\n */\n Queue.prototype.enqueue = function (value) {\n this.linkedList.append(value);\n };\n /**\n * 删除队列中的头部元素,如果队列为空,则返回 null\n */\n Queue.prototype.dequeue = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Queue.prototype.toString = function (callback) {\n return this.linkedList.toString(callback);\n };\n return Queue;\n}();\nvar _default = Queue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.uniqueId = exports.getOutEdgesNodeId = exports.getNeighbors = exports.getEdgesByNodeId = void 0;\n/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nvar getNeighbors = function getNeighbors(nodeId, edges, type) {\n if (edges === void 0) {\n edges = [];\n }\n var currentEdges = edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighhborsConverter_1 = function neighhborsConverter_1(edge) {\n return edge.source === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_1).map(function (edge) {\n return edge.target;\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighhborsConverter_2 = function neighhborsConverter_2(edge) {\n return edge.target === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_2).map(function (edge) {\n return edge.source;\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighhborsConverter = function neighhborsConverter(edge) {\n return edge.source === nodeId ? edge.target : edge.source;\n };\n return currentEdges.map(neighhborsConverter);\n};\n/**\n * 获取指定节点的出边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexports.getNeighbors = getNeighbors;\nvar getOutEdgesNodeId = function getOutEdgesNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId;\n });\n};\n/**\n * 获取指定节点的边,包括出边和入边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexports.getOutEdgesNodeId = getOutEdgesNodeId;\nvar getEdgesByNodeId = function getEdgesByNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n};\n/**\n * 生成唯一的 ID,规则是序号 + 时间戳\n * @param index 序号\n */\nexports.getEdgesByNodeId = getEdgesByNodeId;\nvar uniqueId = function uniqueId(index) {\n if (index === void 0) {\n index = 0;\n }\n var random1 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n var random2 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n return \"\".concat(index, \"-\").concat(random1).concat(random2);\n};\nexports.uniqueId = uniqueId;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _queue = _interopRequireDefault(require(\"./structs/queue\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n *\n * @param callbacks\n * allowTraversal: 确定 BFS 是否从顶点沿着边遍历到其邻居,默认情况下,同一个节点只能遍历一次\n * enterNode: 当 BFS 访问某个节点时调用\n * leaveNode: 当 BFS 访问访问结束某个节点时调用\n */\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n var id = next;\n if (!seen[id]) {\n seen[id] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * 广度优先遍历图\n * @param graph Graph 图实例\n * @param startNode 开始遍历的节点\n * @param originalCallbacks 回调\n */\nvar breadthFirstSearch = function breadthFirstSearch(graphData, startNodeId, originalCallbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n var callbacks = initCallbacks(originalCallbacks);\n var nodeQueue = new _queue.default();\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n // 初始化队列元素\n nodeQueue.enqueue(startNodeId);\n var previousNode = '';\n var _loop_1 = function _loop_1() {\n var currentNode = nodeQueue.dequeue();\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n // 将所有邻居添加到队列中以便遍历\n (0, _util.getNeighbors)(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n nodeQueue.enqueue(nextNode);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n // 下一次循环之前存储当前顶点\n previousNode = currentNode;\n };\n // 遍历队列中的所有顶点\n while (!nodeQueue.isEmpty()) {\n _loop_1();\n }\n};\nvar _default = breadthFirstSearch;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getConnectedComponents;\nexports.detectStrongConnectComponents = exports.detectConnectedComponents = void 0;\nvar _util = require(\"./util\");\n/**\n * Generate all connected components for an undirected graph\n * @param graph\n */\nvar detectConnectedComponents = function detectConnectedComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allComponents = [];\n var visited = {};\n var nodeStack = [];\n var getComponent = function getComponent(node) {\n nodeStack.push(node);\n visited[node.id] = true;\n var neighbors = (0, _util.getNeighbors)(node.id, edges);\n var _loop_1 = function _loop_1(i) {\n var neighbor = neighbors[i];\n if (!visited[neighbor]) {\n var targetNode = nodes.filter(function (node) {\n return node.id === neighbor;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n }\n };\n for (var i = 0; i < neighbors.length; ++i) {\n _loop_1(i);\n }\n };\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (!visited[node.id]) {\n // 对于无向图进行dfs遍历,每一次调用后都得到一个连通分量\n getComponent(node);\n var component = [];\n while (nodeStack.length > 0) {\n component.push(nodeStack.pop());\n }\n allComponents.push(component);\n }\n }\n return allComponents;\n};\n/**\n * Tarjan's Algorithm 复杂度 O(|V|+|E|)\n * For directed graph only\n * a directed graph is said to be strongly connected if \"every vertex is reachable from every other vertex\".\n * refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @param graph\n * @return a list of strongly connected components\n */\nexports.detectConnectedComponents = detectConnectedComponents;\nvar detectStrongConnectComponents = function detectStrongConnectComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeStack = [];\n var inStack = {}; // 辅助判断是否已经在stack中,减少查找开销\n var indices = {};\n var lowLink = {};\n var allComponents = [];\n var index = 0;\n var getComponent = function getComponent(node) {\n // Set the depth index for v to the smallest unused index\n indices[node.id] = index;\n lowLink[node.id] = index;\n index += 1;\n nodeStack.push(node);\n inStack[node.id] = true;\n // 考虑每个邻接点\n var neighbors = (0, _util.getNeighbors)(node.id, edges, 'target').filter(function (n) {\n return nodes.map(function (node) {\n return node.id;\n }).indexOf(n) > -1;\n });\n var _loop_2 = function _loop_2(i) {\n var targetNodeID = neighbors[i];\n if (!indices[targetNodeID] && indices[targetNodeID] !== 0) {\n var targetNode = nodes.filter(function (node) {\n return node.id === targetNodeID;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n // tree edge\n lowLink[node.id] = Math.min(lowLink[node.id], lowLink[targetNodeID]);\n } else if (inStack[targetNodeID]) {\n // back edge, target node is in the current SCC\n lowLink[node.id] = Math.min(lowLink[node.id], indices[targetNodeID]);\n }\n };\n for (var i = 0; i < neighbors.length; i++) {\n _loop_2(i);\n }\n // If node is a root node, generate an SCC\n if (lowLink[node.id] === indices[node.id]) {\n var component = [];\n while (nodeStack.length > 0) {\n var tmpNode = nodeStack.pop();\n inStack[tmpNode.id] = false;\n component.push(tmpNode);\n if (tmpNode === node) break;\n }\n if (component.length > 0) {\n allComponents.push(component);\n }\n }\n };\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (!indices[node.id] && indices[node.id] !== 0) {\n getComponent(node);\n }\n }\n return allComponents;\n};\nexports.detectStrongConnectComponents = detectStrongConnectComponents;\nfunction getConnectedComponents(graphData, directed) {\n if (directed) return detectStrongConnectComponents(graphData);\n return detectConnectedComponents(graphData);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getOutDegree = exports.getInDegree = exports.default = void 0;\nvar degree = function degree(graphData) {\n var degrees = {};\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n nodes.forEach(function (node) {\n degrees[node.id] = {\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n });\n edges.forEach(function (edge) {\n degrees[edge.source].degree++;\n degrees[edge.source].outDegree++;\n degrees[edge.target].degree++;\n degrees[edge.target].inDegree++;\n });\n return degrees;\n};\nvar _default = degree;\n/**\n * 获取指定节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.default = _default;\nvar getInDegree = function getInDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].inDegree;\n }\n return 0;\n};\n/**\n * 获取指定节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getInDegree = getInDegree;\nvar getOutDegree = function getOutDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].outDegree;\n }\n return 0;\n};\nexports.getOutDegree = getOutDegree;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = depthFirstSearch;\nvar _util = require(\"./util\");\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n if (!seen[next]) {\n seen[next] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * @param {Graph} graph\n * @param {GraphNode} currentNode\n * @param {GraphNode} previousNode\n * @param {Callbacks} callbacks\n */\nfunction depthFirstSearchRecursive(graphData, currentNode, previousNode, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n (0, _util.getNeighbors)(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n depthFirstSearchRecursive(graphData, nextNode, currentNode, callbacks, directed);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n}\n/**\n * 深度优先遍历图\n * @param data GraphData 图数据\n * @param startNodeId 开始遍历的节点的 ID\n * @param originalCallbacks 回调\n */\nfunction depthFirstSearch(graphData, startNodeId, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n depthFirstSearchRecursive(graphData, startNodeId, '', initCallbacks(callbacks), directed);\n}","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.detectAllUndirectedCycle = exports.detectAllDirectedCycle = exports.detectAllCycles = exports.default = void 0;\nvar _dfs = _interopRequireDefault(require(\"./dfs\"));\nvar _connectedComponent = _interopRequireWildcard(require(\"./connected-component\"));\nvar _util = require(\"./util\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar detectDirectedCycle = function detectDirectedCycle(graphData) {\n var cycle = null;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n var dfsParentMap = {};\n // 所有没有被访问的节点集合\n var unvisitedSet = {};\n // 正在被访问的节点集合\n var visitingSet = {};\n // 所有已经被访问过的节点集合\n var visitedSet = {};\n // 初始化 unvisitedSet\n nodes.forEach(function (node) {\n unvisitedSet[node.id] = node;\n });\n var callbacks = {\n enter: function enter(_a) {\n var currentNode = _a.current,\n previousNode = _a.previous;\n if (visitingSet[currentNode]) {\n // 如果当前节点正在访问中,则说明检测到环路了\n cycle = {};\n var currentCycleNode = currentNode;\n var previousCycleNode = previousNode;\n while (previousCycleNode !== currentNode) {\n cycle[currentCycleNode] = previousCycleNode;\n currentCycleNode = previousCycleNode;\n previousCycleNode = dfsParentMap[previousCycleNode];\n }\n cycle[currentCycleNode] = previousCycleNode;\n } else {\n // 如果不存在正在访问集合中,则将其放入正在访问集合,并从未访问集合中删除\n visitingSet[currentNode] = currentNode;\n delete unvisitedSet[currentNode];\n // 更新 DSF parents 列表\n dfsParentMap[currentNode] = previousNode;\n }\n },\n leave: function leave(_a) {\n var currentNode = _a.current;\n // 如果所有的节点的子节点都已经访问过了,则从正在访问集合中删除掉,并将其移入到已访问集合中,\n // 同时也意味着当前节点的所有邻居节点都被访问过了\n visitedSet[currentNode] = currentNode;\n delete visitingSet[currentNode];\n },\n allowTraversal: function allowTraversal(_a) {\n var nextNode = _a.next;\n // 如果检测到环路则需要终止所有进一步的遍历,否则会导致无限循环遍历\n if (cycle) {\n return false;\n }\n // 仅允许遍历没有访问的节点,visitedSet 中的都已经访问过了\n return !visitedSet[nextNode];\n }\n };\n // 开始遍历节点\n while (Object.keys(unvisitedSet).length) {\n // 从第一个节点开始进行 DFS 遍历\n var firsetUnVisitedKey = Object.keys(unvisitedSet)[0];\n (0, _dfs.default)(graphData, firsetUnVisitedKey, callbacks);\n }\n return cycle;\n};\n/**\n * 检测无向图中的所有Base cycles\n * refer: https://www.codeproject.com/Articles/1158232/Enumerating-All-Cycles-in-an-Undirected-Graph\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回一组base cycles\n */\nvar detectAllUndirectedCycle = function detectAllUndirectedCycle(graphData, nodeIds, include) {\n var _a, _b;\n if (include === void 0) {\n include = true;\n }\n var allCycles = [];\n var components = (0, _connectedComponent.default)(graphData, false);\n // loop through all connected components\n for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {\n var component = components_1[_i];\n if (!component.length) continue;\n var root = component[0];\n var rootId = root.id;\n var stack = [root];\n var parent_1 = (_a = {}, _a[rootId] = root, _a);\n var used = (_b = {}, _b[rootId] = new Set(), _b);\n // walk a spanning tree to find cycles\n while (stack.length > 0) {\n var curNode = stack.pop();\n var curNodeId = curNode.id;\n var neighbors = (0, _util.getNeighbors)(curNodeId, graphData.edges);\n var _loop_1 = function _loop_1(i) {\n var _c;\n var neighborId = neighbors[i];\n var neighbor = graphData.nodes.find(function (node) {\n return node.id === neighborId;\n });\n // const neighborId = neighbor.get('id');\n if (neighborId === curNodeId) {\n // 自环\n allCycles.push((_c = {}, _c[neighborId] = curNode, _c));\n } else if (!(neighborId in used)) {\n // visit a new node\n parent_1[neighborId] = curNode;\n stack.push(neighbor);\n used[neighborId] = new Set([curNode]);\n } else if (!used[curNodeId].has(neighbor)) {\n // a cycle found\n var cycleValid = true;\n var cyclePath = [neighbor, curNode];\n var p = parent_1[curNodeId];\n while (used[neighborId].size && !used[neighborId].has(p)) {\n cyclePath.push(p);\n if (p === parent_1[p.id]) break;else p = parent_1[p.id];\n }\n cyclePath.push(p);\n if (nodeIds && include) {\n // 如果有指定包含的节点\n cycleValid = false;\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = true;\n }\n } else if (nodeIds && !include) {\n // 如果有指定不包含的节点\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = false;\n }\n }\n // 把 node list 形式转换为 cycle 的格式\n if (cycleValid) {\n var cycle = {};\n for (var index = 1; index < cyclePath.length; index += 1) {\n cycle[cyclePath[index - 1].id] = cyclePath[index];\n }\n if (cyclePath.length) {\n cycle[cyclePath[cyclePath.length - 1].id] = cyclePath[0];\n }\n allCycles.push(cycle);\n }\n used[neighborId].add(curNode);\n }\n };\n for (var i = 0; i < neighbors.length; i += 1) {\n _loop_1(i);\n }\n }\n }\n return allCycles;\n};\n/**\n * Johnson's algorithm, 时间复杂度 O((V + E)(C + 1))$ and space bounded by O(V + E)\n * refer: https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF\n * refer: https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/cycles.html#simple_cycles\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回所有的 simple cycles\n */\nexports.detectAllUndirectedCycle = detectAllUndirectedCycle;\nvar detectAllDirectedCycle = function detectAllDirectedCycle(graphData, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n var path = []; // stack of nodes in current path\n var blocked = new Set();\n var B = []; // remember portions of the graph that yield no elementary circuit\n var allCycles = [];\n var idx2Node = {};\n var node2Idx = {};\n // 辅助函数: unblock all blocked nodes\n var unblock = function unblock(thisNode) {\n var stack = [thisNode];\n while (stack.length > 0) {\n var node = stack.pop();\n if (blocked.has(node)) {\n blocked.delete(node);\n B[node.id].forEach(function (n) {\n stack.push(n);\n });\n B[node.id].clear();\n }\n }\n };\n var circuit = function circuit(node, start, adjList) {\n var closed = false; // whether a path is closed\n if (nodeIds && include === false && nodeIds.indexOf(node.id) > -1) return closed;\n path.push(node);\n blocked.add(node);\n var neighbors = adjList[node.id];\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (neighbor === start) {\n var cycle = {};\n for (var index = 1; index < path.length; index += 1) {\n cycle[path[index - 1].id] = path[index];\n }\n if (path.length) {\n cycle[path[path.length - 1].id] = path[0];\n }\n allCycles.push(cycle);\n closed = true;\n } else if (!blocked.has(neighbor)) {\n if (circuit(neighbor, start, adjList)) {\n closed = true;\n }\n }\n }\n if (closed) {\n unblock(node);\n } else {\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (!B[neighbor.id].has(node)) {\n B[neighbor.id].add(node);\n }\n }\n }\n path.pop();\n return closed;\n };\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n // Johnson's algorithm 要求给节点赋顺序,先按节点在数组中的顺序\n for (var i = 0; i < nodes.length; i += 1) {\n var node = nodes[i];\n var nodeId = node.id;\n node2Idx[nodeId] = i;\n idx2Node[i] = node;\n }\n // 如果有指定包含的节点,则把指定节点排序在前,以便提早结束搜索\n if (nodeIds && include) {\n var _loop_2 = function _loop_2(i) {\n var nodeId = nodeIds[i];\n node2Idx[nodes[i].id] = node2Idx[nodeId];\n node2Idx[nodeId] = 0;\n idx2Node[0] = nodes.find(function (node) {\n return node.id === nodeId;\n });\n idx2Node[node2Idx[nodes[i].id]] = nodes[i];\n };\n for (var i = 0; i < nodeIds.length; i++) {\n _loop_2(i);\n }\n }\n // 返回 节点顺序 >= nodeOrder 的强连通分量的adjList\n var getMinComponentAdj = function getMinComponentAdj(components) {\n var _a;\n var minCompIdx;\n var minIdx = Infinity;\n // Find least component and the lowest node\n for (var i = 0; i < components.length; i += 1) {\n var comp = components[i];\n for (var j = 0; j < comp.length; j++) {\n var nodeIdx_1 = node2Idx[comp[j].id];\n if (nodeIdx_1 < minIdx) {\n minIdx = nodeIdx_1;\n minCompIdx = i;\n }\n }\n }\n var component = components[minCompIdx];\n var adjList = [];\n for (var i = 0; i < component.length; i += 1) {\n var node = component[i];\n adjList[node.id] = [];\n for (var _i = 0, _b = (0, _util.getNeighbors)(node.id, graphData.edges, 'target').filter(function (n) {\n return component.map(function (c) {\n return c.id;\n }).indexOf(n) > -1;\n }); _i < _b.length; _i++) {\n var neighbor = _b[_i];\n // 对自环情况 (点连向自身) 特殊处理:记录自环,但不加入adjList\n if (neighbor === node.id && !(include === false && nodeIds.indexOf(node.id) > -1)) {\n allCycles.push((_a = {}, _a[node.id] = node, _a));\n } else {\n adjList[node.id].push(node2Idx[neighbor]);\n }\n }\n }\n return {\n component: component,\n adjList: adjList,\n minIdx: minIdx\n };\n };\n var nodeIdx = 0;\n while (nodeIdx < nodes.length) {\n var subgraphNodes = nodes.filter(function (n) {\n return node2Idx[n.id] >= nodeIdx;\n });\n var sccs = (0, _connectedComponent.detectStrongConnectComponents)({\n nodes: subgraphNodes,\n edges: graphData.edges\n }).filter(function (component) {\n return component.length > 1;\n });\n if (sccs.length === 0) break;\n var scc = getMinComponentAdj(sccs);\n var minIdx = scc.minIdx,\n adjList = scc.adjList,\n component = scc.component;\n if (component.length > 1) {\n component.forEach(function (node) {\n B[node.id] = new Set();\n });\n var startNode = idx2Node[minIdx];\n // startNode 不在指定要包含的节点中,提前结束搜索\n if (nodeIds && include && nodeIds.indexOf(startNode.id) === -1) return allCycles;\n circuit(startNode, startNode, adjList);\n nodeIdx = minIdx + 1;\n } else {\n break;\n }\n }\n return allCycles;\n};\n/**\n * 查找图中所有满足要求的圈\n * @param graph\n * @param directed 是否为有向图\n * @param nodeIds 节点 ID 的数组,若不指定,则返回图中所有的圈\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: Node}] 包含所有环的数组,每个环用一个Object表示,其中key为节点id,value为该节点在环中指向的下一个节点\n */\nexports.detectAllDirectedCycle = detectAllDirectedCycle;\nvar detectAllCycles = function detectAllCycles(graphData, directed, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n if (directed) return detectAllDirectedCycle(graphData, nodeIds, include);\n return detectAllUndirectedCycle(graphData, nodeIds, include);\n};\nexports.detectAllCycles = detectAllCycles;\nvar _default = detectDirectedCycle;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _tslib = require(\"tslib\");\nvar _util = require(\"@antv/util\");\nvar _util2 = require(\"./util\");\nvar minVertex = function minVertex(D, nodes, marks) {\n // 找出最小的点\n var minDis = Infinity;\n var minNode;\n for (var i = 0; i < nodes.length; i++) {\n var nodeId = nodes[i].id;\n if (!marks[nodeId] && D[nodeId] <= minDis) {\n minDis = D[nodeId];\n minNode = nodes[i];\n }\n }\n return minNode;\n};\nvar dijkstra = function dijkstra(graphData, source, directed, weightPropertyName) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeIds = [];\n var marks = {};\n var D = {};\n var prevs = {}; // key: 顶点, value: 顶点的前驱点数组(可能有多条等长的最短路径)\n nodes.forEach(function (node, i) {\n var id = node.id;\n nodeIds.push(id);\n D[id] = Infinity;\n if (id === source) D[id] = 0;\n });\n var nodeNum = nodes.length;\n var _loop_1 = function _loop_1(i) {\n // Process the vertices\n var minNode = minVertex(D, nodes, marks);\n var minNodeId = minNode.id;\n marks[minNodeId] = true;\n if (D[minNodeId] === Infinity) return \"continue\"; // Unreachable vertices cannot be the intermediate point\n var relatedEdges = [];\n if (directed) relatedEdges = (0, _util2.getOutEdgesNodeId)(minNodeId, edges);else relatedEdges = (0, _util2.getEdgesByNodeId)(minNodeId, edges);\n relatedEdges.forEach(function (edge) {\n var edgeTarget = edge.target;\n var edgeSource = edge.source;\n var w = edgeTarget === minNodeId ? edgeSource : edgeTarget;\n var weight = weightPropertyName && edge[weightPropertyName] ? edge[weightPropertyName] : 1;\n if (D[w] > D[minNode.id] + weight) {\n D[w] = D[minNode.id] + weight;\n prevs[w] = [minNode.id];\n } else if (D[w] === D[minNode.id] + weight) {\n prevs[w].push(minNode.id);\n }\n });\n };\n for (var i = 0; i < nodeNum; i++) {\n _loop_1(i);\n }\n prevs[source] = [source];\n // 每个节点存可能存在多条最短路径\n var paths = {};\n for (var target in D) {\n if (D[target] !== Infinity) {\n findAllPaths(source, target, prevs, paths);\n }\n }\n // 兼容之前单路径\n var path = {};\n for (var target in paths) {\n path[target] = paths[target][0];\n }\n return {\n length: D,\n path: path,\n allPath: paths\n };\n};\nvar _default = dijkstra;\nexports.default = _default;\nfunction findAllPaths(source, target, prevs, foundPaths) {\n if (source === target) {\n return [source];\n }\n if (foundPaths[target]) {\n return foundPaths[target];\n }\n var paths = [];\n for (var _i = 0, _a = prevs[target]; _i < _a.length; _i++) {\n var prev = _a[_i];\n var prevPaths = findAllPaths(source, prev, prevs, foundPaths);\n if (!prevPaths) return;\n for (var _b = 0, prevPaths_1 = prevPaths; _b < prevPaths_1.length; _b++) {\n var prePath = prevPaths_1[_b];\n if ((0, _util.isArray)(prePath)) paths.push((0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], prePath, true), [target], false));else paths.push([prePath, target]);\n }\n }\n foundPaths[target] = paths;\n return foundPaths[target];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findShortestPath = exports.findAllPath = void 0;\nvar _dijkstra = _interopRequireDefault(require(\"./dijkstra\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar findShortestPath = function findShortestPath(graphData, start, end, directed, weightPropertyName) {\n var _a = (0, _dijkstra.default)(graphData, start, directed, weightPropertyName),\n length = _a.length,\n path = _a.path,\n allPath = _a.allPath;\n return {\n length: length[end],\n path: path[end],\n allPath: allPath[end]\n };\n};\nexports.findShortestPath = findShortestPath;\nvar findAllPath = function findAllPath(graphData, start, end, directed) {\n var _a;\n if (start === end) return [[start]];\n var _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var visited = [start];\n var isVisited = (_a = {}, _a[start] = true, _a);\n var stack = []; // 辅助栈,用于存储访问过的节点的邻居节点\n var allPath = [];\n var neighbors = directed ? (0, _util.getNeighbors)(start, edges, 'target') : (0, _util.getNeighbors)(start, edges);\n stack.push(neighbors);\n while (visited.length > 0 && stack.length > 0) {\n var children = stack[stack.length - 1];\n if (children.length) {\n var child = children.shift();\n if (child) {\n visited.push(child);\n isVisited[child] = true;\n neighbors = directed ? (0, _util.getNeighbors)(child, edges, 'target') : (0, _util.getNeighbors)(child, edges);\n stack.push(neighbors.filter(function (neighbor) {\n return !isVisited[neighbor];\n }));\n }\n } else {\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n continue;\n }\n if (visited[visited.length - 1] === end) {\n var path = visited.map(function (node) {\n return node;\n });\n allPath.push(path);\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n }\n }\n return allPath;\n};\nexports.findAllPath = findAllPath;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar floydWarshall = function floydWarshall(graphData, directed) {\n var adjacentMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n var dist = [];\n var size = adjacentMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjacentMatrix[i][j] === 0 || !adjacentMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjacentMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nvar _default = floydWarshall;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nvar labelPropagation = function labelPropagation(graphData, directed, weightPropertyName, maxIteration) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = (0, _util.uniqueId)();\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n });\n ks.push(k);\n });\n var iter = 0;\n var _loop_1 = function _loop_1() {\n var changed = false;\n nodes.forEach(function (node) {\n var neighborClusters = {};\n Object.keys(neighbors[node.id]).forEach(function (neighborId) {\n var neighborWeight = neighbors[node.id][neighborId];\n var neighborNode = nodeMap[neighborId].node;\n var neighborClusterId = neighborNode.clusterId;\n if (!neighborClusters[neighborClusterId]) neighborClusters[neighborClusterId] = 0;\n neighborClusters[neighborClusterId] += neighborWeight;\n });\n // find the cluster with max weight\n var maxWeight = -Infinity;\n var bestClusterIds = [];\n Object.keys(neighborClusters).forEach(function (clusterId) {\n if (maxWeight < neighborClusters[clusterId]) {\n maxWeight = neighborClusters[clusterId];\n bestClusterIds = [clusterId];\n } else if (maxWeight === neighborClusters[clusterId]) {\n bestClusterIds.push(clusterId);\n }\n });\n if (bestClusterIds.length === 1 && bestClusterIds[0] === node.clusterId) return;\n var selfClusterIdx = bestClusterIds.indexOf(node.clusterId);\n if (selfClusterIdx >= 0) bestClusterIds.splice(selfClusterIdx, 1);\n if (bestClusterIds && bestClusterIds.length) {\n changed = true;\n // remove from origin cluster\n var selfCluster = clusters[node.clusterId];\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // move the node to the best cluster\n var randomIdx = Math.floor(Math.random() * bestClusterIds.length);\n var bestCluster = clusters[bestClusterIds[randomIdx]];\n bestCluster.nodes.push(node);\n node.clusterId = bestCluster.id;\n }\n });\n if (!changed) return \"break\";\n iter++;\n };\n while (iter < maxIteration) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n // delete the empty clusters\n Object.keys(clusters).forEach(function (clusterId) {\n var cluster = clusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete clusters[clusterId];\n }\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(clusters).forEach(function (clusterId) {\n clustersArray.push(clusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nvar _default = labelPropagation;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\n/**\n * 向量运算\n */\n\nvar Vector = /** @class */function () {\n function Vector(arr) {\n this.arr = arr;\n }\n Vector.prototype.getArr = function () {\n return this.arr || [];\n };\n Vector.prototype.add = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] + otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.subtract = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] - otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.avg = function (length) {\n var res = [];\n if (length !== 0) {\n for (var index in this.arr) {\n res[index] = this.arr[index] / length;\n }\n }\n return new Vector(res);\n };\n Vector.prototype.negate = function () {\n var res = [];\n for (var index in this.arr) {\n res[index] = -this.arr[index];\n }\n return new Vector(res);\n };\n // 平方欧式距离\n Vector.prototype.squareEuclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return res;\n }\n };\n // 欧式距离\n Vector.prototype.euclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return Math.sqrt(res);\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 归一化处理\n Vector.prototype.normalize = function () {\n var res = [];\n var cloneArr = (0, _util.clone)(this.arr);\n cloneArr.sort(function (a, b) {\n return a - b;\n });\n var max = cloneArr[cloneArr.length - 1];\n var min = cloneArr[0];\n for (var index in this.arr) {\n res[index] = (this.arr[index] - min) / (max - min);\n }\n return new Vector(res);\n };\n // 2范数 or 模长\n Vector.prototype.norm2 = function () {\n var _a;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return 0;\n }\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index], 2);\n }\n return Math.sqrt(res);\n };\n // 两个向量的点积\n Vector.prototype.dot = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += this.arr[index] * otherVector.arr[index];\n }\n return res;\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 两个向量比较\n Vector.prototype.equal = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) !== (otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return false;\n }\n for (var index in this.arr) {\n if (this.arr[index] !== otherArr[index]) {\n return false;\n }\n }\n return true;\n };\n return Vector;\n}();\nvar _default = Vector;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.secondReg = exports.dateReg = void 0;\nvar secondReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2})$/;\nexports.secondReg = secondReg;\nvar dateReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$/;\nexports.dateReg = dateReg;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPropertyWeight = exports.getAllSortProperties = exports.getAllProperties = exports.default = void 0;\nvar _time = require(\"../constants/time\");\n// 获取所有属性并排序\nvar getAllSortProperties = function getAllSortProperties(nodes, n) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (n === void 0) {\n n = 100;\n }\n var propertyKeyInfo = {};\n nodes.forEach(function (node) {\n if (!node.properties) {\n return;\n }\n Object.keys(node.properties).forEach(function (propertyKey) {\n // 目前过滤只保留可以转成数值型的或日期型的, todo: 统一转成one-hot特征向量或者embedding\n if (propertyKey === 'id' || !\"\".concat(node.properties[propertyKey]).match(_time.secondReg) && !\"\".concat(node.properties[propertyKey]).match(_time.dateReg) && isNaN(Number(node.properties[propertyKey]))) {\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n delete propertyKeyInfo[propertyKey];\n }\n return;\n }\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n propertyKeyInfo[propertyKey] += 1;\n } else {\n propertyKeyInfo[propertyKey] = 1;\n }\n });\n });\n // 取top50的属性\n var sortKeys = Object.keys(propertyKeyInfo).sort(function (a, b) {\n return propertyKeyInfo[b] - propertyKeyInfo[a];\n });\n return sortKeys.length < n ? sortKeys : sortKeys.slice(0, n);\n};\nexports.getAllSortProperties = getAllSortProperties;\nvar processProperty = function processProperty(properties, propertyKeys) {\n return propertyKeys.map(function (key) {\n if (properties.hasOwnProperty(key)) {\n // // 可以转成数值的直接转成数值\n // if (!isNaN(Number(properties[key]))) {\n // return Number(properties[key]);\n // }\n // // 时间型的转成时间戳\n // if (properties[key].match(secondReg) || properties[key].match(dateReg)) {\n // // @ts-ignore\n // return Number(Date.parse(new Date(properties[key]))) / 1000;\n // }\n return properties[key];\n }\n return 0;\n });\n};\n// 获取属性特征权重\nvar getPropertyWeight = function getPropertyWeight(nodes) {\n var propertyKeys = getAllSortProperties(nodes);\n var allPropertiesWeight = [];\n for (var i = 0; i < nodes.length; i++) {\n allPropertiesWeight[i] = processProperty(nodes[i].properties, propertyKeys);\n }\n return allPropertiesWeight;\n};\n// 获取所有节点的属性集合\nexports.getPropertyWeight = getPropertyWeight;\nvar getAllProperties = function getAllProperties(nodes, key) {\n if (key === void 0) {\n key = undefined;\n }\n var allProperties = [];\n nodes.forEach(function (node) {\n if (key === undefined) {\n allProperties.push(node);\n }\n if (node[key] !== undefined) {\n allProperties.push(node[key]);\n }\n });\n return allProperties;\n};\nexports.getAllProperties = getAllProperties;\nvar _default = {\n getAllSortProperties: getAllSortProperties,\n getPropertyWeight: getPropertyWeight,\n getAllProperties: getAllProperties\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DistanceType = void 0;\nvar DistanceType;\nexports.DistanceType = DistanceType;\n(function (DistanceType) {\n DistanceType[\"EuclideanDistance\"] = \"euclideanDistance\";\n})(DistanceType || (exports.DistanceType = DistanceType = {}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.oneHot = exports.getDistance = exports.getAllKeyValueMap = exports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _types = require(\"../types\");\nvar _vector = _interopRequireDefault(require(\"./vector\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 获取数据中所有的属性及其对应的值\n * @param dataList 数据集\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nvar getAllKeyValueMap = function getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys) {\n var keys = [];\n // 指定了参与计算的keys时,使用指定的keys\n if (involvedKeys === null || involvedKeys === void 0 ? void 0 : involvedKeys.length) {\n keys = involvedKeys;\n } else {\n // 未指定抽取的keys时,提取数据中所有的key\n dataList.forEach(function (data) {\n keys = keys.concat(Object.keys(data));\n });\n keys = (0, _util.uniq)(keys);\n }\n // 获取所有值非空的key的value数组\n var allKeyValueMap = {};\n keys.forEach(function (key) {\n var value = [];\n dataList.forEach(function (data) {\n if (data[key] !== undefined && data[key] !== '') {\n value.push(data[key]);\n }\n });\n if (value.length && !(uninvolvedKeys === null || uninvolvedKeys === void 0 ? void 0 : uninvolvedKeys.includes(key))) {\n allKeyValueMap[key] = (0, _util.uniq)(value);\n }\n });\n return allKeyValueMap;\n};\n/**\n * one-hot编码:数据特征提取\n * @param dataList 数据集\n * @param involvedKeys 参与计算的的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexports.getAllKeyValueMap = getAllKeyValueMap;\nvar oneHot = function oneHot(dataList, involvedKeys, uninvolvedKeys) {\n // 获取数据中所有的属性/特征及其对应的值\n var allKeyValueMap = getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys);\n var oneHotCode = [];\n if (!Object.keys(allKeyValueMap).length) {\n return oneHotCode;\n }\n // 获取所有的属性/特征值\n var allValue = Object.values(allKeyValueMap);\n // 是否所有属性/特征的值都是数值型\n var isAllNumber = allValue.every(function (value) {\n return value.every(function (item) {\n return typeof item === 'number';\n });\n });\n // 对数据进行one-hot编码\n dataList.forEach(function (data, index) {\n var code = [];\n Object.keys(allKeyValueMap).forEach(function (key) {\n var keyValue = data[key];\n var allKeyValue = allKeyValueMap[key];\n var valueIndex = allKeyValue.findIndex(function (value) {\n return keyValue === value;\n });\n var subCode = [];\n // 如果属性/特征所有的值都能转成数值型,不满足分箱,则直接用值(todo: 为了收敛更快,需做归一化处理)\n if (isAllNumber) {\n subCode.push(keyValue);\n } else {\n // 进行one-hot编码\n for (var i = 0; i < allKeyValue.length; i++) {\n if (i === valueIndex) {\n subCode.push(1);\n } else {\n subCode.push(0);\n }\n }\n }\n code = code.concat(subCode);\n });\n oneHotCode[index] = code;\n });\n return oneHotCode;\n};\n/**\n * getDistance:获取两个元素之间的距离\n * @param item\n * @param otherItem\n * @param distanceType 距离类型\n * @param graphData 图数据\n */\nexports.oneHot = oneHot;\nvar getDistance = function getDistance(item, otherItem, distanceType, graphData) {\n if (distanceType === void 0) {\n distanceType = _types.DistanceType.EuclideanDistance;\n }\n var distance = 0;\n switch (distanceType) {\n case _types.DistanceType.EuclideanDistance:\n distance = new _vector.default(item).euclideanDistance(new _vector.default(otherItem));\n break;\n default:\n break;\n }\n return distance;\n};\nexports.getDistance = getDistance;\nvar _default = {\n getAllKeyValueMap: getAllKeyValueMap,\n oneHot: oneHot,\n getDistance: getDistance\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nvar _vector = _interopRequireDefault(require(\"./utils/vector\"));\nvar _nodeProperties = require(\"./utils/node-properties\");\nvar _dataPreprocessing = require(\"./utils/data-preprocessing\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar getModularity = function getModularity(nodes, adjMatrix, ks, m) {\n var length = adjMatrix.length;\n var param = 2 * m;\n var modularity = 0;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (clusteri !== clusterj) continue;\n var entry = adjMatrix[i][j] || 0;\n var ki = ks[i] || 0;\n var kj = ks[j] || 0;\n modularity += entry - ki * kj / param;\n }\n }\n modularity *= 1 / param;\n return modularity;\n};\n// 模块惯性度,衡量属性相似度\nvar getInertialModularity = function getInertialModularity(nodes, allPropertiesWeight) {\n if (nodes === void 0) {\n nodes = [];\n }\n var length = nodes.length;\n var totalProperties = new _vector.default([]);\n for (var i = 0; i < length; i++) {\n totalProperties = totalProperties.add(new _vector.default(allPropertiesWeight[i]));\n }\n // 均值向量\n var avgProperties = totalProperties.avg(length);\n avgProperties.normalize();\n // 节点集合的方差: 节点v与均值向量的平方欧式距离之和\n var variance = 0;\n for (var i = 0; i < length; i++) {\n var propertiesi = new _vector.default(allPropertiesWeight[i]);\n var squareEuclideanDistance = propertiesi.squareEuclideanDistance(avgProperties);\n variance += squareEuclideanDistance;\n }\n // 任意两点间的欧式平方距离\n var squareEuclideanDistanceInfo = [];\n nodes.forEach(function () {\n squareEuclideanDistanceInfo.push([]);\n });\n for (var i = 0; i < length; i++) {\n var propertiesi = new _vector.default(allPropertiesWeight[i]);\n nodes[i]['clusterInertial'] = 0;\n for (var j = 0; j < length; j++) {\n if (i === j) {\n squareEuclideanDistanceInfo[i][j] = 0;\n continue;\n }\n var propertiesj = new _vector.default(allPropertiesWeight[j]);\n squareEuclideanDistanceInfo[i][j] = propertiesi.squareEuclideanDistance(propertiesj);\n nodes[i]['clusterInertial'] += squareEuclideanDistanceInfo[i][j];\n }\n }\n // 计算模块惯性度\n var inertialModularity = 0;\n var param = 2 * length * variance;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (i === j || clusteri !== clusterj) continue;\n var inertial = nodes[i].clusterInertial * nodes[j].clusterInertial / Math.pow(param, 2) - squareEuclideanDistanceInfo[i][j] / param;\n inertialModularity += inertial;\n }\n }\n return Number(inertialModularity.toFixed(4));\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param inertialModularity 是否使用惯性模块度(即节点属性相似性)\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar louvain = function louvain(graphData, directed, weightPropertyName, threshold, inertialModularity, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (inertialModularity === void 0) {\n inertialModularity = false;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allPropertiesWeight = [];\n if (inertialModularity) {\n nodes.forEach(function (node, index) {\n node.properties = node.properties || {};\n node.originIndex = index;\n });\n var nodeTypeInfo_1 = [];\n if (nodes.every(function (node) {\n return node.hasOwnProperty('nodeType');\n })) {\n nodeTypeInfo_1 = Array.from(new Set(nodes.map(function (node) {\n return node.nodeType;\n })));\n nodes.forEach(function (node) {\n node.properties.nodeType = nodeTypeInfo_1.findIndex(function (nodeType) {\n return nodeType === node.nodeType;\n });\n });\n }\n // 所有节点属性集合\n var properties = (0, _nodeProperties.getAllProperties)(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n allPropertiesWeight = (0, _dataPreprocessing.oneHot)(properties, involvedKeys, uninvolvedKeys);\n }\n var uniqueId = 1;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = String(uniqueId++);\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n // the sum of the weights of all edges in the graph\n var m = 0;\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n m += entry;\n });\n ks.push(k);\n });\n m /= 2;\n var totalModularity = Infinity;\n var previousModularity = Infinity;\n var iter = 0;\n var finalNodes = [];\n var finalClusters = {};\n while (true) {\n if (inertialModularity && nodes.every(function (node) {\n return node.hasOwnProperty('properties');\n })) {\n totalModularity = getModularity(nodes, adjMatrix, ks, m) + getInertialModularity(nodes, allPropertiesWeight) * inertialWeight;\n } else {\n totalModularity = getModularity(nodes, adjMatrix, ks, m);\n }\n // 第一次迭代previousModularity直接赋值\n if (iter === 0) {\n previousModularity = totalModularity;\n finalNodes = nodes;\n finalClusters = clusters;\n }\n var increaseWithinThreshold = totalModularity > 0 && totalModularity > previousModularity && totalModularity - previousModularity < threshold;\n // 总模块度增加才更新最优解\n if (totalModularity > previousModularity) {\n finalNodes = nodes.map(function (node) {\n return {\n node: node,\n clusterId: node.clusterId\n };\n });\n finalClusters = (0, _util.clone)(clusters);\n previousModularity = totalModularity;\n }\n // whether to terminate the iterations\n if (increaseWithinThreshold || iter > 100) {\n break;\n }\n ;\n iter++;\n // pre compute some values for current clusters\n Object.keys(clusters).forEach(function (clusterId) {\n // sum of weights of edges to nodes in cluster\n var sumTot = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === clusterId && targetClusterId !== clusterId || targetClusterId === clusterId && sourceClusterId !== clusterId) {\n sumTot = sumTot + (edge[weightPropertyName] || 1);\n }\n });\n clusters[clusterId].sumTot = sumTot;\n });\n // move the nodes to increase the delta modularity\n nodes.forEach(function (node, i) {\n var selfCluster = clusters[node.clusterId];\n var bestIncrease = 0;\n var bestCluster;\n var commonParam = ks[i] / (2 * m);\n // sum of weights of edges from node to nodes in cluster\n var kiin = 0;\n var selfClusterNodes = selfCluster.nodes;\n selfClusterNodes.forEach(function (scNode) {\n var scNodeIdx = nodeMap[scNode.id].idx;\n kiin += adjMatrix[i][scNodeIdx] || 0;\n });\n // the modurarity for **removing** the node i from the origin cluster of node i\n var removeModurarity = kiin - selfCluster.sumTot * commonParam;\n // nodes for **removing** node i into this neighbor cluster\n var selfClusterNodesAfterRemove = selfClusterNodes.filter(function (scNode) {\n return scNode.id !== node.id;\n });\n var propertiesWeightRemove = [];\n selfClusterNodesAfterRemove.forEach(function (nodeRemove, index) {\n propertiesWeightRemove[index] = allPropertiesWeight[nodeRemove.originIndex];\n });\n // the inertialModularity for **removing** the node i from the origin cluster of node i\n var removeInertialModularity = getInertialModularity(selfClusterNodesAfterRemove, allPropertiesWeight) * inertialWeight;\n // the neightbors of the node\n var nodeNeighborIds = neighbors[node.id];\n Object.keys(nodeNeighborIds).forEach(function (neighborNodeId) {\n var neighborNode = nodeMap[neighborNodeId].node;\n var neighborClusterId = neighborNode.clusterId;\n // if the node and the neighbor of node are in the same cluster, reutrn\n if (neighborClusterId === node.clusterId) return;\n var neighborCluster = clusters[neighborClusterId];\n var clusterNodes = neighborCluster.nodes;\n // if the cluster is empty, remove the cluster and return\n if (!clusterNodes || !clusterNodes.length) return;\n // sum of weights of edges from node to nodes in cluster\n var neighborClusterKiin = 0;\n clusterNodes.forEach(function (cNode) {\n var cNodeIdx = nodeMap[cNode.id].idx;\n neighborClusterKiin += adjMatrix[i][cNodeIdx] || 0;\n });\n // the modurarity for **adding** node i into this neighbor cluster\n var addModurarity = neighborClusterKiin - neighborCluster.sumTot * commonParam;\n // nodes for **adding** node i into this neighbor cluster\n var clusterNodesAfterAdd = clusterNodes.concat([node]);\n var propertiesWeightAdd = [];\n clusterNodesAfterAdd.forEach(function (nodeAdd, index) {\n propertiesWeightAdd[index] = allPropertiesWeight[nodeAdd.originIndex];\n });\n // the inertialModularity for **adding** node i into this neighbor cluster\n var addInertialModularity = getInertialModularity(clusterNodesAfterAdd, allPropertiesWeight) * inertialWeight;\n // the increase modurarity is the difference between addModurarity and removeModurarity\n var increase = addModurarity - removeModurarity;\n if (inertialModularity) {\n increase = addModurarity + addInertialModularity - (removeModurarity + removeInertialModularity);\n }\n // find the best cluster to move node i into\n if (increase > bestIncrease) {\n bestIncrease = increase;\n bestCluster = neighborCluster;\n }\n });\n // if found a best cluster to move into\n if (bestIncrease > 0) {\n bestCluster.nodes.push(node);\n var previousClusterId_1 = node.clusterId;\n node.clusterId = bestCluster.id;\n // move the node to the best cluster\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n // remove from origin cluster\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // update sumTot for clusters\n // sum of weights of edges to nodes in cluster\n var neighborClusterSumTot_1 = 0;\n var selfClusterSumTot_1 = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === bestCluster.id && targetClusterId !== bestCluster.id || targetClusterId === bestCluster.id && sourceClusterId !== bestCluster.id) {\n neighborClusterSumTot_1 = neighborClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n if (sourceClusterId === previousClusterId_1 && targetClusterId !== previousClusterId_1 || targetClusterId === previousClusterId_1 && sourceClusterId !== previousClusterId_1) {\n selfClusterSumTot_1 = selfClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n });\n // the nodes of the clusters to move into and remove are changed, update their sumTot\n bestCluster.sumTot = neighborClusterSumTot_1;\n selfCluster.sumTot = selfClusterSumTot_1;\n }\n });\n }\n // delete the empty clusters, assign increasing clusterId\n var newClusterIdMap = {};\n var clusterIdx = 0;\n Object.keys(finalClusters).forEach(function (clusterId) {\n var cluster = finalClusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete finalClusters[clusterId];\n return;\n }\n var newId = String(clusterIdx + 1);\n if (newId === clusterId) {\n return;\n }\n cluster.id = newId;\n cluster.nodes = cluster.nodes.map(function (item) {\n return {\n id: item.id,\n clusterId: newId\n };\n });\n finalClusters[newId] = cluster;\n newClusterIdMap[clusterId] = newId;\n delete finalClusters[clusterId];\n clusterIdx++;\n });\n // restore node clusterId\n finalNodes.forEach(function (nodeInfo) {\n var node = nodeInfo.node,\n clusterId = nodeInfo.clusterId;\n if (!node) return;\n node.clusterId = clusterId;\n if (node.clusterId && newClusterIdMap[node.clusterId]) node.clusterId = newClusterIdMap[node.clusterId];\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (!sourceClusterId || !targetClusterId) return;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(finalClusters).forEach(function (clusterId) {\n clustersArray.push(finalClusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nvar _default = louvain;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * 并查集 Disjoint set to support quick union\n */\nvar UnionFind = /** @class */function () {\n function UnionFind(items) {\n this.count = items.length;\n this.parent = {};\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var i = items_1[_i];\n this.parent[i] = i;\n }\n }\n // find the root of the item\n UnionFind.prototype.find = function (item) {\n while (this.parent[item] !== item) {\n item = this.parent[item];\n }\n return item;\n };\n UnionFind.prototype.union = function (a, b) {\n var rootA = this.find(a);\n var rootB = this.find(b);\n if (rootA === rootB) return;\n // make the element with smaller root the parent\n if (rootA < rootB) {\n if (this.parent[b] !== b) this.union(this.parent[b], a);\n this.parent[b] = this.parent[a];\n } else {\n if (this.parent[a] !== a) this.union(this.parent[a], b);\n this.parent[a] = this.parent[b];\n }\n };\n // whether a and b are connected, i.e. a and b have the same root\n UnionFind.prototype.connected = function (a, b) {\n return this.find(a) === this.find(b);\n };\n return UnionFind;\n}();\nvar _default = UnionFind;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar defaultCompare = function defaultCompare(a, b) {\n return a - b;\n};\nvar MinBinaryHeap = /** @class */function () {\n function MinBinaryHeap(compareFn) {\n if (compareFn === void 0) {\n compareFn = defaultCompare;\n }\n this.compareFn = compareFn;\n this.list = [];\n }\n MinBinaryHeap.prototype.getLeft = function (index) {\n return 2 * index + 1;\n };\n MinBinaryHeap.prototype.getRight = function (index) {\n return 2 * index + 2;\n };\n MinBinaryHeap.prototype.getParent = function (index) {\n if (index === 0) {\n return null;\n }\n return Math.floor((index - 1) / 2);\n };\n MinBinaryHeap.prototype.isEmpty = function () {\n return this.list.length <= 0;\n };\n MinBinaryHeap.prototype.top = function () {\n return this.isEmpty() ? undefined : this.list[0];\n };\n MinBinaryHeap.prototype.delMin = function () {\n var top = this.top();\n var bottom = this.list.pop();\n if (this.list.length > 0) {\n this.list[0] = bottom;\n this.moveDown(0);\n }\n return top;\n };\n MinBinaryHeap.prototype.insert = function (value) {\n if (value !== null) {\n this.list.push(value);\n var index = this.list.length - 1;\n this.moveUp(index);\n return true;\n }\n return false;\n };\n MinBinaryHeap.prototype.moveUp = function (index) {\n var parent = this.getParent(index);\n while (index && index > 0 && this.compareFn(this.list[parent], this.list[index]) > 0) {\n // swap\n var tmp = this.list[parent];\n this.list[parent] = this.list[index];\n this.list[index] = tmp;\n // [this.list[index], this.list[parent]] = [this.list[parent], this.list[index]]\n index = parent;\n parent = this.getParent(index);\n }\n };\n MinBinaryHeap.prototype.moveDown = function (index) {\n var _a;\n var element = index;\n var left = this.getLeft(index);\n var right = this.getRight(index);\n var size = this.list.length;\n if (left !== null && left < size && this.compareFn(this.list[element], this.list[left]) > 0) {\n element = left;\n } else if (right !== null && right < size && this.compareFn(this.list[element], this.list[right]) > 0) {\n element = right;\n }\n if (index !== element) {\n _a = [this.list[element], this.list[index]], this.list[index] = _a[0], this.list[element] = _a[1];\n this.moveDown(element);\n }\n };\n return MinBinaryHeap;\n}();\nvar _default = MinBinaryHeap;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _unionFind = _interopRequireDefault(require(\"./structs/union-find\"));\nvar _binaryHeap = _interopRequireDefault(require(\"./structs/binary-heap\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Prim algorithm,use priority queue,复杂度 O(E+V*logV), V: 节点数量,E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Prim%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n */\nvar primMST = function primMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 从nodes[0]开始\n var currNode = nodes[0];\n var visited = new Set();\n visited.add(currNode);\n // 用二叉堆维护距已加入节点的其他节点的边的权值\n var compareWeight = function compareWeight(a, b) {\n if (weight) {\n return a.weight - b.weight;\n }\n return 0;\n };\n var edgeQueue = new _binaryHeap.default(compareWeight);\n (0, _util.getEdgesByNodeId)(currNode.id, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n while (!edgeQueue.isEmpty()) {\n // 选取与已加入的结点之间边权最小的结点\n var currEdge = edgeQueue.delMin();\n var source = currEdge.source;\n var target = currEdge.target;\n if (visited.has(source) && visited.has(target)) continue;\n selectedEdges.push(currEdge);\n if (!visited.has(source)) {\n visited.add(source);\n (0, _util.getEdgesByNodeId)(source, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n if (!visited.has(target)) {\n visited.add(target);\n (0, _util.getEdgesByNodeId)(target, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n }\n return selectedEdges;\n};\n/**\n * Kruskal algorithm,复杂度 O(E*logE), E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @return IEdge[] 返回构成MST的边的数组\n */\nvar kruskalMST = function kruskalMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 若指定weight,则将所有的边按权值从小到大排序\n var weightEdges = edges.map(function (edge) {\n return edge;\n });\n if (weight) {\n weightEdges.sort(function (a, b) {\n return a.weight - b.weight;\n });\n }\n var disjointSet = new _unionFind.default(nodes.map(function (n) {\n return n.id;\n }));\n // 从权值最小的边开始,如果这条边连接的两个节点于图G中不在同一个连通分量中,则添加这条边\n // 直到遍历完所有点或边\n while (weightEdges.length > 0) {\n var curEdge = weightEdges.shift();\n var source = curEdge.source;\n var target = curEdge.target;\n if (!disjointSet.connected(source, target)) {\n selectedEdges.push(curEdge);\n disjointSet.union(source, target);\n }\n }\n return selectedEdges;\n};\n/**\n * 最小生成树\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nvar minimumSpanningTree = function minimumSpanningTree(graphData, weight, algo) {\n var algos = {\n prim: primMST,\n kruskal: kruskalMST\n };\n if (!algo) return kruskalMST(graphData, weight);\n return algos[algo](graphData, weight);\n};\nvar _default = minimumSpanningTree;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _degree = _interopRequireDefault(require(\"./degree\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nvar pageRank = function pageRank(graphData, epsilon, linkProb) {\n if (typeof epsilon !== 'number') epsilon = 0.000001;\n if (typeof linkProb !== 'number') linkProb = 0.85;\n var distance = 1;\n var leakedRank = 0;\n var maxIterations = 1000;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodesCount = nodes.length;\n var currentRank;\n var curRanks = {};\n var prevRanks = {};\n // Initialize pageranks 初始化\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n curRanks[nodeId] = 1 / nodesCount;\n prevRanks[nodeId] = 1 / nodesCount;\n }\n var nodeDegree = (0, _degree.default)(graphData);\n while (maxIterations > 0 && distance > epsilon) {\n leakedRank = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = 0;\n if (nodeDegree[node.id].inDegree === 0) {\n curRanks[nodeId] = 0;\n } else {\n var neighbors = (0, _util.getNeighbors)(nodeId, edges, 'source');\n for (var i = 0; i < neighbors.length; ++i) {\n var neighbor = neighbors[i];\n var outDegree = nodeDegree[neighbor].outDegree;\n if (outDegree > 0) currentRank += prevRanks[neighbor] / outDegree;\n }\n curRanks[nodeId] = linkProb * currentRank;\n leakedRank += curRanks[nodeId];\n }\n }\n leakedRank = (1 - leakedRank) / nodesCount;\n distance = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = curRanks[nodeId] + leakedRank;\n distance += Math.abs(currentRank - prevRanks[nodeId]);\n prevRanks[nodeId] = currentRank;\n }\n maxIterations -= 1;\n }\n return prevRanks;\n};\nvar _default = pageRank;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VACANT_NODE_LABEL = exports.VACANT_NODE_ID = exports.VACANT_GRAPH_ID = exports.VACANT_EDGE_LABEL = exports.VACANT_EDGE_ID = exports.Node = exports.Graph = exports.Edge = exports.AUTO_EDGE_ID = void 0;\nvar VACANT_EDGE_ID = -1;\nexports.VACANT_EDGE_ID = VACANT_EDGE_ID;\nvar VACANT_NODE_ID = -1;\nexports.VACANT_NODE_ID = VACANT_NODE_ID;\nvar VACANT_EDGE_LABEL = \"-1\";\nexports.VACANT_EDGE_LABEL = VACANT_EDGE_LABEL;\nvar VACANT_NODE_LABEL = \"-1\";\nexports.VACANT_NODE_LABEL = VACANT_NODE_LABEL;\nvar VACANT_GRAPH_ID = -1;\nexports.VACANT_GRAPH_ID = VACANT_GRAPH_ID;\nvar AUTO_EDGE_ID = \"-1\";\nexports.AUTO_EDGE_ID = AUTO_EDGE_ID;\nvar Edge = /** @class */function () {\n function Edge(id, from, to, label) {\n if (id === void 0) {\n id = VACANT_EDGE_ID;\n }\n if (from === void 0) {\n from = VACANT_NODE_ID;\n }\n if (to === void 0) {\n to = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_EDGE_LABEL;\n }\n this.id = id;\n this.from = from;\n this.to = to;\n this.label = label;\n }\n return Edge;\n}();\nexports.Edge = Edge;\nvar Node = /** @class */function () {\n function Node(id, label) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_NODE_LABEL;\n }\n this.id = id;\n this.label = label;\n this.edges = [];\n this.edgeMap = {};\n }\n Node.prototype.addEdge = function (edge) {\n this.edges.push(edge);\n this.edgeMap[edge.id] = edge;\n };\n return Node;\n}();\nexports.Node = Node;\nvar Graph = /** @class */function () {\n function Graph(id, edgeIdAutoIncrease, directed) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (edgeIdAutoIncrease === void 0) {\n edgeIdAutoIncrease = true;\n }\n if (directed === void 0) {\n directed = false;\n }\n this.id = id;\n this.edgeIdAutoIncrease = edgeIdAutoIncrease;\n this.edges = [];\n this.nodes = [];\n this.nodeMap = {};\n this.edgeMap = {};\n this.nodeLabelMap = {};\n this.edgeLabelMap = {};\n this.counter = 0;\n this.directed = directed;\n }\n Graph.prototype.getNodeNum = function () {\n return this.nodes.length;\n };\n Graph.prototype.addNode = function (id, label) {\n if (this.nodeMap[id]) return;\n var node = new Node(id, label);\n this.nodes.push(node);\n this.nodeMap[id] = node;\n if (!this.nodeLabelMap[label]) this.nodeLabelMap[label] = [];\n this.nodeLabelMap[label].push(id);\n };\n Graph.prototype.addEdge = function (id, from, to, label) {\n if (this.edgeIdAutoIncrease || id === undefined) id = this.counter++;\n if (this.nodeMap[from] && this.nodeMap[to] && this.nodeMap[to].edgeMap[id]) return;\n var edge = new Edge(id, from, to, label);\n this.edges.push(edge);\n this.edgeMap[id] = edge;\n this.nodeMap[from].addEdge(edge);\n if (!this.edgeLabelMap[label]) this.edgeLabelMap[label] = [];\n this.edgeLabelMap[label].push(edge);\n if (!this.directed) {\n var rEdge = new Edge(id, to, from, label);\n this.nodeMap[to].addEdge(rEdge);\n this.edgeLabelMap[label].push(rEdge);\n }\n };\n return Graph;\n}();\nexports.Graph = Graph;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _struct = require(\"./struct\");\nvar DFSedge = /** @class */function () {\n function DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.fromNode = fromNode;\n this.toNode = toNode;\n this.nodeEdgeNodeLabel = {\n nodeLabel1: fromNodeLabel || _struct.VACANT_NODE_LABEL,\n edgeLabel: edgeLabel || _struct.VACANT_EDGE_LABEL,\n nodeLabel2: toNodeLabel || _struct.VACANT_NODE_LABEL\n };\n }\n DFSedge.prototype.equalTo = function (other) {\n return this.fromNode === other.formNode && this.toNode === other.toNode && this.nodeEdgeNodeLabel === other.nodeEdgeNodeLabel;\n };\n DFSedge.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n return DFSedge;\n}();\n// DFScode 是 DESedge 的数组\nvar DFScode = /** @class */function () {\n function DFScode() {\n this.rmpath = [];\n this.dfsEdgeList = [];\n }\n DFScode.prototype.equalTo = function (other) {\n var aLength = this.dfsEdgeList.length;\n var bLength = other.length;\n if (aLength !== bLength) return false;\n for (var i = 0; i < aLength; i++) {\n if (this.dfsEdgeList[i] !== other[i]) return false;\n }\n return true;\n };\n DFScode.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n /** 增加一条 edge 到 DFScode */\n DFScode.prototype.pushBack = function (fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.dfsEdgeList.push(new DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel));\n return this.dfsEdgeList;\n };\n /** 根据 dfs 构建图 */\n DFScode.prototype.toGraph = function (graphId, directed) {\n if (graphId === void 0) {\n graphId = _struct.VACANT_GRAPH_ID;\n }\n if (directed === void 0) {\n directed = false;\n }\n var graph = new _struct.Graph(graphId, true, directed);\n this.dfsEdgeList.forEach(function (dfsEdge) {\n var fromNodeId = dfsEdge.fromNode;\n var toNodeId = dfsEdge.toNode;\n var _a = dfsEdge.nodeEdgeNodeLabel,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (nodeLabel1 !== _struct.VACANT_NODE_LABEL) graph.addNode(fromNodeId, nodeLabel1);\n if (nodeLabel2 !== _struct.VACANT_NODE_LABEL) graph.addNode(toNodeId, nodeLabel2);\n if (nodeLabel1 !== _struct.VACANT_NODE_LABEL && nodeLabel2 !== nodeLabel1) graph.addEdge(undefined, fromNodeId, toNodeId, edgeLabel);\n });\n return graph;\n };\n // 建立 rightmost path\n DFScode.prototype.buildRmpath = function () {\n this.rmpath = [];\n var oldFrom = undefined;\n var selfLength = this.dfsEdgeList.length;\n for (var i = selfLength - 1; i >= 0; i--) {\n var dfsEdge = this.dfsEdgeList[i];\n var fromNodeIdx = dfsEdge.fromNode;\n var toNodeIdx = dfsEdge.toNode;\n if (fromNodeIdx < toNodeIdx && (oldFrom === undefined || toNodeIdx === oldFrom)) {\n this.rmpath.push(i);\n oldFrom = fromNodeIdx;\n }\n }\n return this.rmpath;\n };\n DFScode.prototype.getNodeNum = function () {\n var nodeMap = {};\n this.dfsEdgeList.forEach(function (dfsEdge) {\n if (!nodeMap[dfsEdge.fromNode]) nodeMap[dfsEdge.fromNode] = true;\n if (!nodeMap[dfsEdge.toNode]) nodeMap[dfsEdge.toNode] = true;\n });\n return Object.keys(nodeMap).length;\n };\n return DFScode;\n}();\nvar History = /** @class */function () {\n function History(pdfs) {\n this.his = {};\n this.nodesUsed = {};\n this.edgesUsed = {};\n this.edges = [];\n if (!pdfs) return;\n while (pdfs) {\n var e = pdfs.edge;\n this.edges.push(e);\n this.nodesUsed[e.from] = 1;\n this.nodesUsed[e.to] = 1;\n this.edgesUsed[e.id] = 1;\n pdfs = pdfs.preNode;\n }\n // 倒序\n this.edges = this.edges.reverse();\n }\n History.prototype.hasNode = function (node) {\n return this.nodesUsed[node.id] === 1;\n };\n History.prototype.hasEdge = function (edge) {\n return this.edgesUsed[edge.id] === 1;\n };\n return History;\n}();\nvar GSpan = /** @class */function () {\n function GSpan(_a) {\n var graphs = _a.graphs,\n _b = _a.minSupport,\n minSupport = _b === void 0 ? 2 : _b,\n _c = _a.minNodeNum,\n minNodeNum = _c === void 0 ? 1 : _c,\n _d = _a.maxNodeNum,\n maxNodeNum = _d === void 0 ? 4 : _d,\n _e = _a.top,\n top = _e === void 0 ? 10 : _e,\n _f = _a.directed,\n directed = _f === void 0 ? false : _f,\n _g = _a.verbose,\n verbose = _g === void 0 ? false : _g;\n // -------- 第零步,初始化-------\n this.graphs = graphs;\n this.dfsCode = new DFScode();\n this.support = 0;\n this.frequentSize1Subgraphs = [];\n this.frequentSubgraphs = [];\n this.minSupport = minSupport;\n this.top = top;\n this.directed = directed;\n this.counter = 0;\n // TODO? timestamp = {}\n this.maxNodeNum = maxNodeNum;\n this.minNodeNum = minNodeNum;\n this.verbose = verbose;\n if (this.maxNodeNum < this.minNodeNum) this.maxNodeNum = this.minNodeNum;\n this.reportDF = []; // matrix\n }\n // Line 352\n GSpan.prototype.findForwardRootEdges = function (graph, fromNode) {\n var _this = this;\n var result = [];\n var nodeMap = graph.nodeMap;\n fromNode.edges.forEach(function (edge) {\n if (_this.directed || fromNode.label <= nodeMap[edge.to].label) result.push(edge);\n });\n return result;\n };\n GSpan.prototype.findBackwardEdge = function (graph, edge1, edge2, history) {\n if (!this.directed && edge1 === edge2) return null;\n var nodeMap = graph.nodeMap;\n var edge2To = nodeMap[edge2.to];\n var edge2ToEdges = edge2To.edges;\n var edgeLength = edge2ToEdges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edge2ToEdges[i];\n if (history.hasEdge(edge) || edge.to !== edge1.from) continue;\n if (!this.directed) {\n if (edge1.label < edge.label || edge1.label === edge.label && nodeMap[edge1.to].label <= nodeMap[edge2.to].label) {\n return edge;\n }\n } else {\n if (nodeMap[edge1.from].label < nodeMap[edge2.to].label || nodeMap[edge1.from].label === nodeMap[edge2.to].label && edge1.label <= edge.label) {\n return edge;\n }\n }\n }\n return null;\n };\n GSpan.prototype.findForwardPureEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var rightmostEdgeToId = rightmostEdge.to;\n var edges = graph.nodeMap[rightmostEdgeToId].edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var toNode = graph.nodeMap[edge.to];\n if (minNodeLabel <= toNode.label && !history.hasNode(toNode)) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.findForwardRmpathEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var nodeMap = graph.nodeMap;\n var toNodeLabel = nodeMap[rightmostEdge.to].label;\n var fromNode = nodeMap[rightmostEdge.from];\n var edges = fromNode.edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var newToNodeLabel = nodeMap[edge.to].label;\n if (rightmostEdge.to === edge.to || minNodeLabel > newToNodeLabel || history.hasNode(nodeMap[edge.to])) {\n continue;\n }\n if (rightmostEdge.label < edge.label || rightmostEdge.label === edge.label && toNodeLabel <= newToNodeLabel) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.getSupport = function (projected) {\n var graphMap = {};\n projected.forEach(function (pro) {\n if (!graphMap[pro.graphId]) graphMap[pro.graphId] = true;\n });\n return Object.keys(graphMap).length;\n };\n GSpan.prototype.findMinLabel = function (obj) {\n var minLabel = undefined;\n Object.keys(obj).forEach(function (nodeEdgeNodeLabel) {\n var _a = obj[nodeEdgeNodeLabel],\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (!minLabel) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n return;\n }\n if (nodeLabel1 < minLabel.nodeLabel1 || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel < minLabel.edgeLabel || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel === minLabel.edgeLabel && nodeLabel2 < minLabel.nodeLabel2) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n }\n });\n return minLabel;\n };\n GSpan.prototype.isMin = function () {\n var _this = this;\n var dfsCode = this.dfsCode;\n if (this.verbose) console.log(\"isMin checking\", dfsCode);\n if (dfsCode.dfsEdgeList.length === 1) return true;\n var directed = this.directed;\n var graph = dfsCode.toGraph(_struct.VACANT_GRAPH_ID, directed);\n var nodeMap = graph.nodeMap;\n var dfsCodeMin = new DFScode();\n var root = {};\n graph.nodes.forEach(function (node) {\n var forwardEdges = _this.findForwardRootEdges(graph, node);\n forwardEdges.forEach(function (edge) {\n var otherNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(otherNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: otherNode.label\n };\n var pdfs = {\n graphId: graph.id,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n // 比较 root 中每一项的 nodeEdgeNodeLabel 大小,按照 nodeLabel1、edgeLabe、nodeLabel2 的顺序比较\n var minLabel = this.findMinLabel(root); // line 419\n if (!minLabel) return;\n dfsCodeMin.dfsEdgeList.push(new DFSedge(0, 1, minLabel.nodeLabel1, minLabel.edgeLabel, minLabel.nodeLabel2));\n // line 423\n var projectIsMin = function projectIsMin(projected) {\n // right most path\n var rmpath = dfsCodeMin.buildRmpath();\n var minNodeLabel = dfsCodeMin.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var maxToC = dfsCodeMin.dfsEdgeList[rmpath[0]].toNode; // node id\n var backwardRoot = {};\n var flag = false,\n newTo = 0;\n var end = directed ? -1 : 0; // 遍历到 1 还是到 0\n var _loop_1 = function _loop_1(i) {\n if (flag) return \"break\";\n // line 435\n projected.forEach(function (p) {\n var history = new History(p);\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n // Line 441\n if (!backwardRoot[backwardEdge.label]) {\n backwardRoot[backwardEdge.label] = {\n projected: [],\n edgeLabel: backwardEdge.label\n };\n }\n backwardRoot[backwardEdge.label].projected.push({\n graphId: graph.id,\n edge: backwardRoot,\n preNode: p\n });\n newTo = dfsCodeMin.dfsEdgeList[rmpath[i]].fromNode;\n flag = true;\n }\n });\n };\n for (var i = rmpath.length - 1; i > end; i--) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\") break;\n }\n if (flag) {\n var minBackwardEdgeLabel = _this.findMinLabel(backwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(maxToC, newTo, _struct.VACANT_NODE_LABEL, minBackwardEdgeLabel.edgeLabel, _struct.VACANT_NODE_LABEL));\n var idx_1 = dfsCodeMin.dfsEdgeList.length - 1;\n if (_this.dfsCode.dfsEdgeList[idx_1] !== dfsCodeMin.dfsEdgeList[idx_1]) return false;\n return projectIsMin(backwardRoot[minBackwardEdgeLabel.edgeLabel].projected);\n }\n var forwardRoot = {};\n flag = false;\n var newFrom = 0;\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n if (forwardPureEdges.length > 0) {\n flag = true;\n newFrom = maxToC;\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n var pathLength = rmpath.length;\n var _loop_2 = function _loop_2(i) {\n if (flag) return \"break\";\n var value = rmpath[i];\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[value], minNodeLabel, history);\n if (forwardRmpathEdges.length > 0) {\n flag = true;\n newFrom = dfsCodeMin.dfsEdgeList[value].fromNode;\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n };\n for (var i = 0; i < pathLength; i++) {\n var state_2 = _loop_2(i);\n if (state_2 === \"break\") break;\n }\n if (!flag) return true;\n var forwardMinEdgeNodeLabel = _this.findMinLabel(forwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(newFrom, maxToC + 1, _struct.VACANT_NODE_LABEL, forwardMinEdgeNodeLabel.edgeLabel, forwardMinEdgeNodeLabel.nodeLabel2));\n var idx = dfsCodeMin.dfsEdgeList.length - 1;\n if (dfsCode.dfsEdgeList[idx] !== dfsCodeMin.dfsEdgeList[idx]) return false;\n return projectIsMin(forwardRoot[\"\".concat(forwardMinEdgeNodeLabel.edgeLabel, \"-\").concat(forwardMinEdgeNodeLabel.nodeLabel2)].projected);\n };\n var key = \"\".concat(minLabel.nodeLabel1, \"-\").concat(minLabel.edgeLabel, \"-\").concat(minLabel.nodeLabel2);\n return projectIsMin(root[key].projected);\n };\n GSpan.prototype.report = function () {\n if (this.dfsCode.getNodeNum() < this.minNodeNum) return;\n this.counter++;\n var graph = this.dfsCode.toGraph(this.counter, this.directed);\n this.frequentSubgraphs.push((0, _util.clone)(graph));\n };\n GSpan.prototype.subGraphMining = function (projected) {\n var _this = this;\n var support = this.getSupport(projected);\n if (support < this.minSupport) return;\n if (!this.isMin()) return;\n this.report();\n var nodeNum = this.dfsCode.getNodeNum();\n var rmpath = this.dfsCode.buildRmpath();\n var maxToC = this.dfsCode.dfsEdgeList[rmpath[0]].toNode;\n var minNodeLabel = this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var forwardRoot = {};\n var backwardRoot = {};\n projected.forEach(function (p) {\n var graph = _this.graphs[p.graphId];\n var nodeMap = graph.nodeMap;\n var history = new History(p);\n // backward Line 526\n for (var i = rmpath.length - 1; i >= 0; i--) {\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(backwardEdge.label);\n if (!backwardRoot[key]) backwardRoot[key] = {\n projected: [],\n toNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: backwardEdge.label\n };\n backwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: backwardEdge,\n preNode: p\n });\n }\n }\n // pure forward\n if (nodeNum >= _this.maxNodeNum) return;\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(maxToC, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: maxToC,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n var _loop_3 = function _loop_3(i) {\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[rmpath[i]], minNodeLabel, history);\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n };\n // rmpath forward\n for (var i = 0; i < rmpath.length; i++) {\n _loop_3(i);\n }\n });\n // backward\n Object.keys(backwardRoot).forEach(function (key) {\n var _a = backwardRoot[key],\n toNodeId = _a.toNodeId,\n edgeLabel = _a.edgeLabel;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(maxToC, toNodeId, \"-1\", edgeLabel, \"-1\"));\n _this.subGraphMining(backwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n // forward\n Object.keys(forwardRoot).forEach(function (key) {\n var _a = forwardRoot[key],\n fromNodeId = _a.fromNodeId,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(fromNodeId, maxToC + 1, _struct.VACANT_NODE_LABEL, edgeLabel, nodeLabel2));\n _this.subGraphMining(forwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n GSpan.prototype.generate1EdgeFrequentSubGraphs = function () {\n var graphs = this.graphs;\n var directed = this.directed;\n var minSupport = this.minSupport;\n var frequentSize1Subgraphs = this.frequentSize1Subgraphs;\n var nodeLabelCounter = {},\n nodeEdgeNodeCounter = {};\n // 保存各个图和各自节点的关系 map,key 格式为 graphKey-node类型\n var nodeLableCounted = {};\n // 保存各个图和各自边的关系 map,key 格式为 graphKey-fromNode类型-edge类型-toNode类型\n var nodeEdgeNodeLabelCounted = {};\n Object.keys(graphs).forEach(function (key) {\n // Line 271\n var graph = graphs[key];\n var nodeMap = graph.nodeMap;\n // 遍历节点,记录对应图 与 每个节点的 label 到 nodeLableCounted\n graph.nodes.forEach(function (node, i) {\n // Line 272\n var nodeLabel = node.label;\n var graphNodeKey = \"\".concat(key, \"-\").concat(nodeLabel);\n if (!nodeLableCounted[graphNodeKey]) {\n var counter = nodeLabelCounter[nodeLabel] || 0;\n counter++;\n nodeLabelCounter[nodeLabel] = counter;\n }\n nodeLableCounted[graphNodeKey] = {\n graphKey: key,\n label: nodeLabel\n };\n // 遍历该节点的所有边,记录各个图和各自边的关系到 nodeEdgeNodeLabelCounted. Line 276\n node.edges.forEach(function (edge) {\n var nodeLabel1 = nodeLabel;\n var nodeLabel2 = nodeMap[edge.to].label;\n if (!directed && nodeLabel1 > nodeLabel2) {\n var tmp = nodeLabel2;\n nodeLabel2 = nodeLabel1;\n nodeLabel1 = tmp;\n }\n var edgeLabel = edge.label;\n var graphNodeEdgeNodeKey = \"\".concat(key, \"-\").concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n var nodeEdgeNodeKey = \"\".concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n if (!nodeEdgeNodeCounter[nodeEdgeNodeKey]) {\n var counter = nodeEdgeNodeCounter[nodeEdgeNodeKey] || 0;\n counter++;\n nodeEdgeNodeCounter[nodeEdgeNodeKey] = counter; // Line281\n }\n\n nodeEdgeNodeLabelCounted[graphNodeEdgeNodeKey] = {\n graphId: key,\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n });\n });\n });\n // 计算频繁的节点\n Object.keys(nodeLabelCounter).forEach(function (label) {\n var count = nodeLabelCounter[label];\n if (count < minSupport) return;\n var g = {\n nodes: [],\n edges: []\n };\n g.nodes.push({\n id: \"0\",\n label: label\n });\n frequentSize1Subgraphs.push(g);\n // if (minNodeNum <= 1) reportSize1 TODO\n });\n\n return frequentSize1Subgraphs;\n };\n GSpan.prototype.run = function () {\n var _this = this;\n // -------- 第一步, _generate_1edge_frequent_subgraphs:频繁的单个节点-------\n this.frequentSize1Subgraphs = this.generate1EdgeFrequentSubGraphs();\n if (this.maxNodeNum < 2) return;\n var graphs = this.graphs;\n var directed = this.directed;\n // PDFS 数组的 map Line 304\n var root = {};\n Object.keys(graphs).forEach(function (graphId) {\n var graph = graphs[graphId];\n var nodeMap = graph.nodeMap;\n // Line 306\n graph.nodes.forEach(function (node) {\n var forwardRootEdges = _this.findForwardRootEdges(graph, node);\n // Line 308\n forwardRootEdges.forEach(function (edge) {\n var toNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(toNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: toNode.label\n };\n var pdfs = {\n graphId: graphId,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n });\n // Line 313\n Object.keys(root).forEach(function (nodeEdgeNodeLabel) {\n var _a = root[nodeEdgeNodeLabel],\n projected = _a.projected,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(0, 1, nodeLabel1, edgeLabel, nodeLabel2));\n _this.subGraphMining(projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n return GSpan;\n}();\nvar formatGraphs = function formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp) {\n var result = {};\n Object.keys(graphs).forEach(function (key, i) {\n var graph = graphs[key];\n var fGraph = new _struct.Graph(i, true, directed);\n var nodeIdxMap = {};\n graph.nodes.forEach(function (node, j) {\n fGraph.addNode(j, node[nodeLabelProp]);\n nodeIdxMap[node.id] = j;\n });\n graph.edges.forEach(function (edge, k) {\n var sourceIdx = nodeIdxMap[edge.source];\n var targetIdx = nodeIdxMap[edge.target];\n fGraph.addEdge(-1, sourceIdx, targetIdx, edge[edgeLabelProp]);\n });\n if (fGraph && fGraph.getNodeNum()) result[fGraph.id] = fGraph;\n });\n return result;\n};\nvar toGraphDatas = function toGraphDatas(graphs, nodeLabelProp, edgeLabelProp) {\n var result = [];\n graphs.forEach(function (graph) {\n var graphData = {\n nodes: [],\n edges: []\n };\n graph.nodes.forEach(function (node) {\n var _a;\n graphData.nodes.push((_a = {\n id: \"\".concat(node.id)\n }, _a[nodeLabelProp] = node.label, _a));\n });\n graph.edges.forEach(function (edge) {\n var _a;\n graphData.edges.push((_a = {\n source: \"\".concat(edge.from),\n target: \"\".concat(edge.to)\n }, _a[edgeLabelProp] = edge.label, _a));\n });\n result.push(graphData);\n });\n return result;\n};\nvar DEFAULT_LABEL_NAME = \"cluster\";\n/**\n * gSpan 频繁子图计算算法(frequent graph mining)\n * @param params 参数\n */\nvar gSpan = function gSpan(params) {\n // ------- 将图数据 GraphData 的 map 转换为格式 -------\n var graphs = params.graphs,\n _a = params.directed,\n directed = _a === void 0 ? false : _a,\n _b = params.nodeLabelProp,\n nodeLabelProp = _b === void 0 ? DEFAULT_LABEL_NAME : _b,\n _c = params.edgeLabelProp,\n edgeLabelProp = _c === void 0 ? DEFAULT_LABEL_NAME : _c;\n var formattedGraphs = formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp);\n var minSupport = params.minSupport,\n maxNodeNum = params.maxNodeNum,\n minNodeNum = params.minNodeNum,\n verbose = params.verbose,\n top = params.top;\n // ------- 初始化与执行算法 -------\n var algoParams = {\n graphs: formattedGraphs,\n minSupport: minSupport,\n maxNodeNum: maxNodeNum,\n minNodeNum: minNodeNum,\n top: top,\n verbose: verbose,\n directed: directed\n };\n var calculator = new GSpan(algoParams);\n calculator.run();\n var result = toGraphDatas(calculator.frequentSubgraphs, nodeLabelProp, edgeLabelProp);\n return result;\n};\nvar _default = gSpan;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _tslib = require(\"tslib\");\nvar _floydWarshall = _interopRequireDefault(require(\"./floydWarshall\"));\nvar _gSpan = _interopRequireDefault(require(\"./gSpan/gSpan\"));\nvar _dijkstra = _interopRequireDefault(require(\"./dijkstra\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 为 graphData 中每个节点生成邻居单元数组\n * @param graphData\n * @param spm\n * @param nodeLabelProp\n * @param k k-近邻\n */\nvar findKNeighborUnits = function findKNeighborUnits(graphData, spm, nodeLabelProp, k) {\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (k === void 0) {\n k = 2;\n }\n var units = [];\n var nodes = graphData.nodes;\n spm.forEach(function (row, i) {\n units.push(findKNeighborUnit(nodes, row, i, nodeLabelProp, k));\n });\n return units;\n};\nvar findKNeighborUnit = function findKNeighborUnit(nodes, row, i, nodeLabelProp, k) {\n var unitNodeIdxs = [i];\n var neighbors = [];\n var labelCountMap = {};\n row.forEach(function (v, j) {\n if (v <= k && i !== j) {\n unitNodeIdxs.push(j);\n neighbors.push(nodes[j]);\n var label = nodes[j][nodeLabelProp];\n if (!labelCountMap[label]) labelCountMap[label] = {\n count: 1,\n dists: [v]\n };else {\n labelCountMap[label].count++;\n labelCountMap[label].dists.push(v);\n }\n }\n });\n // 将 labelCountMap 中的 dists 按照从小到大排序,方便后面使用\n Object.keys(labelCountMap).forEach(function (label) {\n labelCountMap[label].dists = labelCountMap[label].dists.sort(function (a, b) {\n return a - b;\n });\n });\n return {\n nodeIdx: i,\n nodeId: nodes[i].id,\n nodeIdxs: unitNodeIdxs,\n neighbors: neighbors,\n neighborNum: unitNodeIdxs.length - 1,\n nodeLabelCountMap: labelCountMap\n };\n};\n/**\n * 随机寻找点对,满足距离小于 k\n * @param k 参数 k,表示 k-近邻\n * @param nodeNum 参数 length\n * @param maxNodePairNum 寻找点对的数量不超过 maxNodePairNum\n * @param spm 最短路径矩阵\n */\nvar findNodePairsRandomly = function findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm) {\n // 每个节点需要随机找出的点对数\n var nodePairNumEachNode = Math.ceil(maxNodePairNum / nodeNum);\n var nodePairMap = {};\n var foundNodePairCount = 0;\n // 遍历节点,为每个节点随机找出 nodePairNumEachNode 个点对,满足距离小于 k。找到的点对数量超过 maxNodePairNum 或所有节点遍历结束时终止\n kNeighborUnits.forEach(function (unit, i) {\n // 若未达到 nodePairNumEachNode,或循环次数小于最大循环次数(2 * nodeNum),继续循环\n var nodePairForICount = 0;\n var outerLoopCount = 0;\n var neighbors = unit.nodeIdxs; // the first one is the center node\n var neighborNum = unit.neighborNum - 1;\n while (nodePairForICount < nodePairNumEachNode) {\n // 另一端节点在节点数组中的的 index\n var oidx = neighbors[1 + Math.floor(Math.random() * neighborNum)];\n var innerLoopCount = 0;\n // 若随机得到的另一端 idx 不符合条件,则继续 random。条件是不是同一个节点、这个点对没有被记录过、距离小于 k\n while (nodePairMap[\"\".concat(i, \"-\").concat(oidx)] || nodePairMap[\"\".concat(oidx, \"-\").concat(i)]) {\n oidx = Math.floor(Math.random() * nodeNum);\n innerLoopCount++;\n if (innerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n\n if (innerLoopCount < 2 * nodeNum) {\n // 未达到最大循环次数,说明找到了合适的另一端\n nodePairMap[\"\".concat(i, \"-\").concat(oidx)] = {\n start: i,\n end: oidx,\n distance: spm[i][oidx]\n };\n nodePairForICount++;\n foundNodePairCount++;\n // 如果当前找到的点对数量达到了上限,返回结果\n if (foundNodePairCount >= maxNodePairNum) return nodePairMap;\n }\n outerLoopCount++;\n if (outerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n // 这个节点没有找到足够 nodePairNumEachNode 的点对。更新 nodePairNumEachNode,让后续节点找更多的点对\n if (nodePairForICount < nodePairNumEachNode) {\n var gap = nodePairNumEachNode - nodePairForICount;\n nodePairNumEachNode = (nodePairNumEachNode + gap) / (nodeNum - i - 1);\n }\n });\n return nodePairMap;\n};\n/**\n * 计算所有 nodePairMap 中节点对的相交邻居诱导子图\n * @param nodePairMap 节点对 map,key 为 node1.id-node2.id,value 为 { startNodeIdx, endNodeIdx, distance }\n * @param neighborUnits 每个节点的邻居元数组\n * @param graphData 原图数据\n * @param edgeMap 边的 map,方便检索\n * @param cachedInducedGraphMap 缓存的结果,下次进入该函数将继续更新该缓存,若 key 在缓存中存在则不需要重复计算\n */\nvar getIntersectNeighborInducedGraph = function getIntersectNeighborInducedGraph(nodePairMap, neighborUnits, graphData, cachedInducedGraphMap) {\n var nodes = graphData.nodes;\n if (!cachedInducedGraphMap) cachedInducedGraphMap = {};\n Object.keys(nodePairMap).forEach(function (key) {\n var _a, _b;\n if (cachedInducedGraphMap && cachedInducedGraphMap[key]) return;\n cachedInducedGraphMap[key] = {\n nodes: [],\n edges: []\n };\n var pair = nodePairMap[key];\n var startUnitNodeIds = (_a = neighborUnits[pair.start]) === null || _a === void 0 ? void 0 : _a.nodeIdxs;\n var endUnitNodeIds = (_b = neighborUnits[pair.end]) === null || _b === void 0 ? void 0 : _b.nodeIdxs;\n if (!startUnitNodeIds || !endUnitNodeIds) return; // 不存在邻元,返回空图\n var endSet = new Set(endUnitNodeIds);\n var intersect = startUnitNodeIds.filter(function (x) {\n return endSet.has(x);\n }); // 可能会爆栈(在 1580 + 6 nodes full-connected 时出现)\n if (!intersect || !intersect.length) return; // 没有交集,返回空图\n var intersectIdMap = {};\n var intersectLength = intersect.length;\n for (var i = 0; i < intersectLength; i++) {\n var node = nodes[intersect[i]];\n cachedInducedGraphMap[key].nodes.push(node); // 将交集中的点加入诱导子图\n intersectIdMap[node.id] = true;\n }\n // 遍历所有边数据,如果边的两端都在交集中,将该边加入诱导子图\n graphData.edges.forEach(function (edge) {\n if (intersectIdMap[edge.source] && intersectIdMap[edge.target]) cachedInducedGraphMap[key].edges.push(edge);\n });\n });\n return cachedInducedGraphMap;\n};\n/**\n * 计算 strcutre 在 graph 上的匹配数量\n * @param graph 图数据\n * @param structure 目前支持只有两个节点一条边的最简单结构\n * @param nodeLabelProp 节点类型字段名\n * @param edgeLabelProp 边类型字段名\n */\nvar getMatchedCount = function getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp) {\n var _a, _b;\n var nodeMap = {};\n graph.nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var count = 0;\n if (!((_a = structure === null || structure === void 0 ? void 0 : structure.edges) === null || _a === void 0 ? void 0 : _a.length) || ((_b = structure === null || structure === void 0 ? void 0 : structure.nodes) === null || _b === void 0 ? void 0 : _b.length) < 2) return 0;\n graph.edges.forEach(function (e) {\n var sourceLabel = nodeMap[e.source][nodeLabelProp];\n var targetLabel = nodeMap[e.target][nodeLabelProp];\n var strNodeLabel1 = structure === null || structure === void 0 ? void 0 : structure.nodes[0][nodeLabelProp];\n var strNodeLabel2 = structure === null || structure === void 0 ? void 0 : structure.nodes[1][nodeLabelProp];\n var strEdgeLabel = structure === null || structure === void 0 ? void 0 : structure.edges[0][edgeLabelProp];\n if (e[edgeLabelProp] !== strEdgeLabel) return;\n if (sourceLabel === strNodeLabel1 && targetLabel === strNodeLabel2 || sourceLabel === strNodeLabel2 && targetLabel === strNodeLabel1) {\n count++;\n }\n });\n return count;\n};\n/**\n * structures 中寻找最具有代表性的一个。这个结构是使得 matchedCountMap 的分组方式类内间距最小,类间间距最大\n * @param matchedCountMap 每个 structure 分类后的各图匹配数量,格式 { [strcture.idx]: { [interInducedGraphKey]: count } }\n * @param structureNum strcuture 个数,与 matchedCountMap.length 对应\n * @param structures\n */\nvar findRepresentStructure = function findRepresentStructure(matchedCountMap, structureNum, structures) {\n var maxOffset = Infinity,\n representClusterType = 0;\n var _loop_1 = function _loop_1(i) {\n // 一种分组的 map,key 是 intGraph 的 key,value 是 structures[i] 的匹配个数\n var countMapI = matchedCountMap[i];\n // 按照 value 为该组排序,生成 keys 的数组:\n var sortedGraphKeys = Object.keys(countMapI).sort(function (a, b) {\n return countMapI[a] - countMapI[b];\n });\n // 共 100 个 graphKeys,将 graphKeys 按顺序分为 groupNum 组\n var groupNum = 10;\n var clusters = []; // 总共有 groupNum 个项\n sortedGraphKeys.forEach(function (key, j) {\n if (!clusters[j % groupNum]) clusters[j % groupNum] = {\n graphs: [],\n totalCount: 0,\n aveCount: 0\n };\n clusters[j % groupNum].graphs.push(key);\n clusters[j % groupNum].totalCount += countMapI[key];\n });\n // 计算 cluster 与 cluster 之间的距离 innerDist,每个 cluster 内部的距离 intraDist\n var aveIntraDist = 0; // 该类的类内平均值\n var aveCounts = []; // 类内平均匹配数量,将用于计算类间距离\n clusters.forEach(function (graphsInCluster) {\n // 类内均值\n var aveCount = graphsInCluster.totalCount / graphsInCluster.graphs.length;\n graphsInCluster.aveCount = aveCount;\n aveCounts.push(aveCount);\n // 对于每类,计算类内间距平均值\n var aveIntraPerCluster = 0;\n var graphsNum = graphsInCluster.length;\n graphsInCluster.graphs.forEach(function (graphKey1, j) {\n var graph1Count = countMapI[graphKey1];\n graphsInCluster.graphs.forEach(function (graphKey2, k) {\n if (j === k) return;\n aveIntraPerCluster += Math.abs(graph1Count - countMapI[graphKey2]);\n });\n });\n aveIntraPerCluster /= graphsNum * (graphsNum - 1) / 2;\n aveIntraDist += aveIntraPerCluster;\n });\n aveIntraDist /= clusters.length;\n // 用类内均值计算类间距\n var aveInterDist = 0; // 类间间距平均值\n aveCounts.forEach(function (aveCount1, j) {\n aveCounts.forEach(function (aveCount2, k) {\n if (j === k) return;\n aveInterDist += Math.abs(aveCount1 - aveCount2);\n });\n aveInterDist /= aveCounts.length * (aveCounts.length - 1) / 2;\n });\n // 寻找 (类间间距均值-类内间距均值) 最大的一种分组方式(对应的 structure 就是最终要找的唯一 DS(G))\n var offset = aveInterDist - aveIntraDist;\n if (maxOffset < offset) {\n maxOffset = offset;\n representClusterType = i;\n }\n };\n for (var i = 0; i < structureNum; i++) {\n _loop_1(i);\n }\n return {\n structure: structures[representClusterType],\n structureCountMap: matchedCountMap[representClusterType]\n };\n};\nvar getNodeMaps = function getNodeMaps(nodes, nodeLabelProp) {\n var nodeMap = {},\n nodeLabelMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = {\n idx: i,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var label = node[nodeLabelProp];\n if (!nodeLabelMap[label]) nodeLabelMap[label] = [];\n nodeLabelMap[label].push(node);\n });\n return {\n nodeMap: nodeMap,\n nodeLabelMap: nodeLabelMap\n };\n};\nvar getEdgeMaps = function getEdgeMaps(edges, edgeLabelProp, nodeMap) {\n var edgeMap = {},\n edgeLabelMap = {};\n edges.forEach(function (edge, i) {\n edgeMap[\"\".concat(_util.uniqueId)] = {\n idx: i,\n edge: edge\n };\n var label = edge[edgeLabelProp];\n if (!edgeLabelMap[label]) edgeLabelMap[label] = [];\n edgeLabelMap[label].push(edge);\n var sourceNode = nodeMap[edge.source];\n if (sourceNode) {\n sourceNode.degree++;\n sourceNode.outDegree++;\n }\n var targetNode = nodeMap[edge.target];\n if (targetNode) {\n targetNode.degree++;\n targetNode.inDegree++;\n }\n });\n return {\n edgeMap: edgeMap,\n edgeLabelMap: edgeLabelMap\n };\n};\n/**\n * 输出最短路径的 map,key 为 sourceNode.id-targetNode.id,value 为这两个节点的最短路径长度\n * @param nodes\n * @param spm\n * @param directed\n */\nvar getSpmMap = function getSpmMap(nodes, spm, directed) {\n var length = spm.length;\n var map = {};\n spm.forEach(function (row, i) {\n var start = directed ? 0 : i + 1;\n var iId = nodes[i].id;\n for (var j = start; j < length; j++) {\n if (i === j) continue;\n var jId = nodes[j].id;\n var dist = row[j];\n map[\"\".concat(iId, \"-\").concat(jId)] = dist;\n if (!directed) map[\"\".concat(jId, \"-\").concat(iId)] = dist;\n }\n });\n return map;\n};\n/**\n * 计算一对节点(node1,node2)的 NDS 距离\n * @param graph 原图数据\n * @param node1\n * @param node2\n */\nvar getNDSDist = function getNDSDist(graph, node1, node2, nodeMap, spDist, kNeighborUnits, structure, nodeLabelProp, edgeLabelProp, cachedNDSMap, cachedInterInducedGraph) {\n var _a;\n var key = \"\".concat(node1.id, \"-\").concat(node2.id);\n if (cachedNDSMap && cachedNDSMap[key]) return cachedNDSMap[key];\n var interInducedGraph = cachedInterInducedGraph ? cachedInterInducedGraph[key] : undefined;\n // 若没有缓存相交邻居诱导子图,计算\n if (!interInducedGraph) {\n var pairMap = (_a = {}, _a[key] = {\n start: nodeMap[node1.id].idx,\n end: nodeMap[node2.id].idx,\n distance: spDist\n }, _a);\n cachedInterInducedGraph = getIntersectNeighborInducedGraph(pairMap, kNeighborUnits, graph, cachedInterInducedGraph);\n interInducedGraph = cachedInterInducedGraph[key];\n }\n return getMatchedCount(interInducedGraph, structure, nodeLabelProp, edgeLabelProp);\n};\n/**\n * 计算 pattern 上绩点的度数并存储到 minPatternNodeLabelDegreeMap\n */\nvar stashPatternNodeLabelDegreeMap = function stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap) {\n var _a, _b, _c;\n var minPatternNodeLabelDegree = (_a = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _a === void 0 ? void 0 : _a.degree;\n var minPatternNodeLabelInDegree = (_b = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _b === void 0 ? void 0 : _b.inDegree;\n var minPatternNodeLabelOutDegree = (_c = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _c === void 0 ? void 0 : _c.outDegree;\n if (minPatternNodeLabelDegreeMap[neighborLabel] === undefined) {\n minPatternNodeLabelDegree = Infinity;\n minPatternNodeLabelInDegree = Infinity;\n minPatternNodeLabelOutDegree = Infinity;\n patternNodeLabelMap[neighborLabel].forEach(function (patternNodeWithLabel) {\n var patternNodeDegree = patternNodeMap[patternNodeWithLabel.id].degree;\n if (minPatternNodeLabelDegree > patternNodeDegree) minPatternNodeLabelDegree = patternNodeDegree;\n var patternNodeInDegree = patternNodeMap[patternNodeWithLabel.id].inDegree;\n if (minPatternNodeLabelInDegree > patternNodeInDegree) minPatternNodeLabelInDegree = patternNodeInDegree;\n var patternNodeOutDegree = patternNodeMap[patternNodeWithLabel.id].outDegree;\n if (minPatternNodeLabelOutDegree > patternNodeOutDegree) minPatternNodeLabelOutDegree = patternNodeOutDegree;\n });\n minPatternNodeLabelDegreeMap[neighborLabel] = {\n degree: minPatternNodeLabelDegree,\n inDegree: minPatternNodeLabelInDegree,\n outDegree: minPatternNodeLabelOutDegree\n };\n }\n return {\n minPatternNodeLabelDegree: minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree: minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree: minPatternNodeLabelOutDegree\n };\n};\n/**\n * GADDI 模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nvar GADDI = function GADDI(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n var _a;\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n if (!graphData || !graphData.nodes) return;\n // 分为三步:\n // 0. 预计算:节点/边数,邻接矩阵、最短路径矩阵\n // 1. 处理原图 graphData。再分为 1~5 小步\n // 2. 匹配\n // console.log(\"----- stage-pre: preprocessing -------\");\n // -------- 第零步,预计算:节点/边数,邻接矩阵、最短路径矩阵-------\n var nodeNum = graphData.nodes.length;\n if (!nodeNum) return;\n // console.log(\"----- stage-pre.1: calc shortest path matrix for graph -------\");\n var spm = (0, _floydWarshall.default)(graphData, directed);\n // console.log(\n // \"----- stage-pre.2: calc shortest path matrix for pattern -------\"\n // );\n var patternSpm = (0, _floydWarshall.default)(pattern, directed);\n // console.log(\n // \"----- stage-pre.3: calc shortest path matrix map for graph -------\"\n // );\n var spmMap = getSpmMap(graphData.nodes, spm, directed);\n // console.log(\n // \"----- stage-pre.4: calc shortest path matrix map for pattern -------\"\n // );\n var patternSpmMap = getSpmMap(pattern.nodes, patternSpm, directed);\n // console.log(\"----- stage-pre.5: establish maps -------\");\n // 节点的 map,以 id 为 id 映射,方便后续快速检索\n var _b = getNodeMaps(graphData.nodes, nodeLabelProp),\n nodeMap = _b.nodeMap,\n nodeLabelMap = _b.nodeLabelMap;\n var _c = getNodeMaps(pattern.nodes, nodeLabelProp),\n patternNodeMap = _c.nodeMap,\n patternNodeLabelMap = _c.nodeLabelMap;\n // 计算节点度数\n getEdgeMaps(graphData.edges, edgeLabelProp, nodeMap);\n var patternEdgeLabelMap = getEdgeMaps(pattern.edges, edgeLabelProp, patternNodeMap).edgeLabelMap;\n // 若未指定 length,自动计算 pattern 半径(最短路径最大值)\n var patternSpmSpread = [];\n patternSpm === null || patternSpm === void 0 ? void 0 : patternSpm.forEach(function (row) {\n patternSpmSpread = patternSpmSpread.concat(row);\n });\n if (!length) length = Math.max.apply(Math, (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], patternSpmSpread, false), [2], false));\n if (!k) k = length;\n // console.log(\"params\", directed, length, k);\n // console.log(\"----- stage-pre.6: calc k neighbor units -------\");\n // 计算每个节点的 k 邻元集合\n var kNeighborUnits = findKNeighborUnits(graphData, spm, nodeLabelProp, k);\n var patternKNeighborUnits = findKNeighborUnits(pattern, patternSpm, nodeLabelProp, k);\n // console.log(\n // \"----- stage0: going to processing graph and find intersect neighbor induced graphs -------\"\n // );\n // console.log(\"----- stage0.1: going to select random node pairs -------\");\n // -------- 第一步,处理原图 graphData-------\n // 1.1. 随机选择最多 100 个点对,满足距离小于 Length 和 k\n // 当 graphData 少于 20 个节点,则不能找出 100 个点对,只找出不多于 n(n-1)/2 个点对\n var maxNodePairNum = Math.min(100, nodeNum * (nodeNum - 1) / 2);\n var nodePairsMap = findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm);\n // console.log(\n // \"----- stage0.2: going to calculate intersect neighbor induced graphs -------\"\n // );\n // 1.2. 生成上面节点对的相应相交邻居诱导子图。格式为 {'beginNodeIdx-endNodeIdx': {nodes: [], edges: []}}\n var intGMap = getIntersectNeighborInducedGraph(nodePairsMap, kNeighborUnits, graphData);\n // 1.3. 使用 gSpan 算法(frequent graph mining)计算 ISIntG 的前 10 个频率最高的子结构(3-4条边)\n var top = 10,\n minSupport = 1,\n minNodeNum = 1,\n maxNodeNum = 4;\n var params = {\n graphs: intGMap,\n nodeLabelProp: nodeLabelProp,\n edgeLabelProp: edgeLabelProp,\n minSupport: minSupport,\n minNodeNum: minNodeNum,\n maxNodeNum: maxNodeNum,\n directed: directed\n };\n // console.log(\n // \"----- stage1: (gSpan) going to find frequent structure dsG -------\"\n // );\n // console.log(\"----- stage1.1: going to run gSpan -------\");\n // 暂时假设生成的 sub structure 都只有一条边\n var freStructures = (0, _gSpan.default)(params).slice(0, top);\n // structureNum 可能小于 top\n var structureNum = freStructures.length;\n // 1.4. 计算上述 10 个子结构在 intGMap 中每个诱导子图的匹配个数\n var matchedCountMap = [];\n freStructures.forEach(function (structure, i) {\n matchedCountMap[i] = {};\n Object.keys(intGMap).forEach(function (key) {\n var graph = intGMap[key];\n var subStructureCount = getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp);\n matchedCountMap[i][key] = subStructureCount;\n });\n });\n // console.log(\n // \"----- stage1.1: going to find the most represent strucutre -------\"\n // );\n // 1.5. 对于每个子结构,根据匹配个数为 intGMap 中的诱导子图分组,生成 structureNum 种分组\n // 计算每种分组的类间距和类内间距,找到类间距最大、类内间距最小的一种分组,这种分组对应的子结构被选为唯一代表性子结构 DS(G)\n var _d = findRepresentStructure(matchedCountMap, structureNum, freStructures),\n dsG = _d.structure,\n ndsDist = _d.structureCountMap;\n // -------- 第二步,匹配-------\n // 2.1 找到从 Q 中的一个节点作为起始节点,寻找 G 中的匹配。这个其实节点的标签可以在 G 中找到最多的节点\n var beginPNode = pattern.nodes[0],\n candidates = [],\n label = (_a = pattern.nodes[0]) === null || _a === void 0 ? void 0 : _a[nodeLabelProp],\n maxNodeNumWithSameLabel = -Infinity;\n pattern.nodes.forEach(function (node) {\n var pLabel = node[nodeLabelProp];\n var nodesWithSameLabel = nodeLabelMap[pLabel];\n if ((nodesWithSameLabel === null || nodesWithSameLabel === void 0 ? void 0 : nodesWithSameLabel.length) > maxNodeNumWithSameLabel) {\n maxNodeNumWithSameLabel = nodesWithSameLabel.length;\n candidates = nodesWithSameLabel;\n label = pLabel;\n beginPNode = node;\n }\n });\n // console.log(\"----- stage2: going to find candidates -------\");\n // 全局缓存,避免重复计算\n var minPatternNodeLabelDegreeMap = {}; // key 是 label,value 是该 label 节点的最小度数\n var patternIntGraphMap = {},\n patternNDSDist = {},\n // key 为 node.id-node.id\n patternNDSDistMap = {}; // key 为 node.id-label2,value nds距离值数组(按从大到小排序,无需关心具体对应哪个 node2)\n // 2.2.2 对于 Q 中的另一个标签的 k 个节点,计算它们到 node 的最短路径以及 NDS 距离\n var patternSpDist = {};\n var patternSpDistBack = {};\n Object.keys(patternNodeLabelMap).forEach(function (label2, j) {\n patternSpDist[label2] = [];\n if (directed) {\n patternSpDistBack[label2] = [];\n }\n var maxDist = -Infinity;\n var patternNodesWithLabel2 = patternNodeLabelMap[label2];\n var patternNodePairMap = {};\n patternNodesWithLabel2.forEach(function (nodeWithLabel2) {\n var dist = patternSpmMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)];\n dist && patternSpDist[label2].push(dist);\n if (maxDist < dist) maxDist = dist;\n patternNodePairMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)] = {\n start: 0,\n end: patternNodeMap[nodeWithLabel2.id].idx,\n distance: dist\n };\n if (directed) {\n var distBack = patternSpmMap[\"\".concat(nodeWithLabel2.id, \"-\").concat(beginPNode.id)];\n distBack && patternSpDistBack[label2].push(distBack);\n }\n });\n // spDist[label2] 按照从小到大排序\n patternSpDist[label2] = patternSpDist[label2].sort(function (a, b) {\n return a - b;\n });\n if (directed) patternSpDistBack[label2] = patternSpDistBack[label2].sort(function (a, b) {\n return a - b;\n });\n // 计算 Q 中所有 label2 节点到 beginPNode 的 NDS 距离\n // 所有 label2 节点到 beginPNode 的邻居相交诱导子图:\n // key: node1.id-node2.id\n patternIntGraphMap = getIntersectNeighborInducedGraph(patternNodePairMap, patternKNeighborUnits, pattern, patternIntGraphMap);\n // pattern 中 beginNode 到当前 label2 节点 的 NDS 距离(数组,无需关心具体对应到哪个节点)\n var currentPatternNDSDistArray = [];\n Object.keys(patternNodePairMap).forEach(function (key) {\n if (patternNDSDist[key]) {\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var patternIntGraph = patternIntGraphMap[key];\n patternNDSDist[key] = getMatchedCount(patternIntGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n });\n // 根据值为 currentPatternNDSDist 从大到小排序\n currentPatternNDSDistArray = currentPatternNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n patternNDSDistMap[\"\".concat(beginPNode.id, \"-\").concat(label2)] = currentPatternNDSDistArray;\n if (label2 === label) return;\n var candidatesNum = (candidates === null || candidates === void 0 ? void 0 : candidates.length) || 0;\n var _loop_4 = function _loop_4(m) {\n var cNode = candidates[m];\n // prune1:若 candidates 中节点 cNode 的 kNeighborUnits 中标签为 label2 的节点个数少于 pattern 中 label2 个数,删去它\n var graphNeighborUnit = kNeighborUnits[nodeMap[cNode.id].idx];\n var graphNeighborUnitCountMap = graphNeighborUnit.nodeLabelCountMap[label2];\n var patternLabel2Num = patternNodeLabelMap[label2].length;\n if (!graphNeighborUnitCountMap || graphNeighborUnitCountMap.count < patternLabel2Num) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune2:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点最短路径大于 patternSpDist[label2],删去它\n // (prune2 规则即:candidate 相关的最短路径的最大 spDist[label2].length 个,按照大小顺序依次和 patternSpDist[label2] 中的值比较,只要遇到一个是 G > Q 的,就删去这个 candidate)\n var prune2Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (graphNeighborUnitCountMap.dists[n] > patternSpDist[label2][n]) {\n prune2Invalid = true;\n break;\n }\n }\n if (prune2Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune3:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点 NDS 距离小于 patternNDSDist[beginNode.id-label2],删去它\n // TODO:prune3,currentPatternNDSDistArray 与 currentNDSDist 的比较\n // 计算 G 中所有 label2 节点到 cNode 的 NDS 距离\n // 所有 label2 节点到 cNode 的邻居相交诱导子图:\n var cNodePairMap = {};\n graphNeighborUnit.neighbors.forEach(function (neighborNode) {\n var dist = spmMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)];\n cNodePairMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)] = {\n start: nodeMap[cNode.id].idx,\n end: nodeMap[neighborNode.id].idx,\n distance: dist\n };\n });\n // 更新 intGMap\n intGMap = getIntersectNeighborInducedGraph(cNodePairMap, kNeighborUnits, graphData, intGMap);\n // candidate 到它周围 label2 节点的 NDS 距离, key 是 node.id-node.id\n var currentNDSDistArray = [];\n Object.keys(cNodePairMap).forEach(function (key) {\n if (ndsDist[key]) {\n currentNDSDistArray.push(ndsDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var intGraph = intGMap[key];\n ndsDist[key] = getMatchedCount(intGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentNDSDistArray.push(ndsDist[key]);\n });\n // 根据值为 currentNDSDistArray 从大到小排序\n currentNDSDistArray = currentNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n var prune3Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (currentNDSDistArray[n] < currentPatternNDSDistArray[n]) {\n prune3Invalid = true;\n break;\n }\n }\n if (prune3Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n };\n for (var m = candidatesNum - 1; m >= 0; m--) {\n _loop_4(m);\n }\n });\n var candidateGraphs = [];\n // console.log(\n // \"----- stage3: going to splice neighbors for each candidate graph -------\"\n // );\n // candidates 经过筛选后,以每个 candidate 为中心,生成 Length-neighbor 的邻居诱导子图\n // 并在诱导子图中去除不可能在 Q 上找到匹配的点:在 Q 上不存在的 label,其他 label 到 candidate 的最大最短距离符合 Q、NDS 距离符合 Q\n candidates === null || candidates === void 0 ? void 0 : candidates.forEach(function (candidate) {\n var nodeIdx = nodeMap[candidate.id].idx;\n var lengthNeighborUnit = findKNeighborUnit(graphData.nodes, spm[nodeIdx], nodeIdx, nodeLabelProp, length);\n var neighborNodes = lengthNeighborUnit.neighbors;\n // 删除不可能找到匹配的邻居点\n var neighborNum = neighborNodes.length;\n var unmatched = false;\n for (var i = neighborNum - 1; i >= 0; i--) {\n // 如果通过裁剪,符合条件的节点数量已过少,说明不能匹配这个 candidate 相关的图\n if (neighborNodes.length + 1 < pattern.nodes.length) {\n unmatched = true;\n return;\n }\n var neighborNode = neighborNodes[i];\n var neighborLabel = neighborNode[nodeLabelProp];\n // prune1: 若该邻居点的 label 不存在于 pattern 中,移除这个点\n if (!patternNodeLabelMap[neighborLabel] || !patternNodeLabelMap[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune2: 若该邻居点到 candidate 的最短路径比和它有相同 label 的节点到 beginPNode 的最大最短路径长度长,移除这个点\n // prune2.1: 如果没有这个标签到 beginPNode 的距离记录,说明 pattern 上(可能 beginPNode 是这个 label)没有其他这个 label 的节点\n if (!patternSpDist[neighborLabel] || !patternSpDist[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n var key = \"\".concat(candidate.id, \"-\").concat(neighborNode.id);\n // prune2.2\n var distToCandidate = spmMap[key];\n var idx = patternSpDist[neighborLabel].length - 1;\n var maxDistWithLabelInPattern = patternSpDist[neighborLabel][idx]; // patternSpDist[neighborLabel] 已经按照从小到大排序\n if (distToCandidate > maxDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n if (directed) {\n var keyBack = \"\".concat(neighborNode.id, \"-\").concat(candidate.id);\n var distFromCandidate = spmMap[keyBack];\n idx = patternSpDistBack[neighborLabel].length - 1;\n var maxBackDistWithLabelInPattern = patternSpDistBack[neighborLabel][idx];\n if (distFromCandidate > maxBackDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // prune3: 若该邻居点到 candidate 的 NDS 距离比和它有相同 label 的节点到 beginPNode 的最小 NDS 距离小,移除这个点\n var ndsToCandidate = ndsDist[key] ? ndsDist[key] : getNDSDist(graphData, candidate, neighborNode, nodeMap, distToCandidate, kNeighborUnits, dsG, nodeLabelProp, edgeLabelProp, ndsDist, intGMap);\n var patternKey = \"\".concat(beginPNode.id, \"-\").concat(neighborLabel);\n var minNdsWithLabelInPattern = patternNDSDistMap[patternKey][patternNDSDistMap[patternKey].length - 1]; // patternNDSDist[key] 一定存在\n if (ndsToCandidate < minNdsWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune4: 若该邻居点的度数小于 pattern 同 label 节点最小度数,删去该点\n var _a = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _a.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _a.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _a.minPatternNodeLabelOutDegree;\n if (nodeMap[neighborNode.id].degree < minPatternNodeLabelDegree) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // 节点在个数上符合匹配(不少于 pattern 的节点个数),现在筛选相关边\n if (!unmatched) {\n candidateGraphs.push({\n nodes: [candidate].concat(neighborNodes)\n });\n }\n });\n // console.log(\n // \"----- stage4: going to splice edges and neighbors for each candidate graph -------\"\n // );\n var undirectedLengthsToBeginPNode = (0, _dijkstra.default)(pattern, beginPNode.id, false).length;\n var undirectedLengthsToBeginPNodeLabelMap = {};\n if (directed) {\n Object.keys(undirectedLengthsToBeginPNode).forEach(function (nodeId) {\n var nodeLabel = patternNodeMap[nodeId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nodeLabel]) undirectedLengthsToBeginPNodeLabelMap[nodeLabel] = [undirectedLengthsToBeginPNode[nodeId]];else undirectedLengthsToBeginPNodeLabelMap[nodeLabel].push(undirectedLengthsToBeginPNode[nodeId]);\n });\n Object.keys(undirectedLengthsToBeginPNodeLabelMap).forEach(function (pLabel) {\n undirectedLengthsToBeginPNodeLabelMap[pLabel].sort(function (a, b) {\n return a - b;\n });\n });\n } else {\n undirectedLengthsToBeginPNodeLabelMap = patternSpDist;\n }\n // 现在 candidateGraphs 里面只有节点,进行边的筛选\n var candidateGraphNum = candidateGraphs.length;\n var _loop_2 = function _loop_2(i) {\n var candidateGraph = candidateGraphs[i];\n var candidate = candidateGraph.nodes[0];\n var candidateNodeLabelCountMap = {};\n var candidateNodeMap = {};\n candidateGraph.nodes.forEach(function (node, q) {\n candidateNodeMap[node.id] = {\n idx: q,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var cNodeLabel = node[nodeLabelProp];\n if (!candidateNodeLabelCountMap[cNodeLabel]) candidateNodeLabelCountMap[cNodeLabel] = 1;else candidateNodeLabelCountMap[cNodeLabel]++;\n });\n // 根据 candidate 和 neighborNodes 中的节点生成 G 的诱导子图\n // 即,将 graphData 上两端都在 candidateGraph.nodes 中的边放入 candidateEdges\n var candidateEdges = [];\n var edgeLabelCountMap = {};\n graphData.edges.forEach(function (edge) {\n if (candidateNodeMap[edge.source] && candidateNodeMap[edge.target]) {\n candidateEdges.push(edge);\n if (!edgeLabelCountMap[edge[edgeLabelProp]]) edgeLabelCountMap[edge[edgeLabelProp]] = 1;else edgeLabelCountMap[edge[edgeLabelProp]]++;\n candidateNodeMap[edge.source].degree++;\n candidateNodeMap[edge.target].degree++;\n candidateNodeMap[edge.source].outDegree++;\n candidateNodeMap[edge.target].inDegree++;\n }\n });\n // prune:若有一个 edgeLabel 在 candidateGraph 上的个数少于 pattern,去除该图\n var pattenrEdgeLabelNum = Object.keys(patternEdgeLabelMap).length;\n var prunedByEdgeLabel = false;\n for (var e = 0; e < pattenrEdgeLabelNum; e++) {\n var label_1 = Object.keys(patternEdgeLabelMap)[e];\n if (!edgeLabelCountMap[label_1] || edgeLabelCountMap[label_1] < patternEdgeLabelMap[label_1].length) {\n prunedByEdgeLabel = true;\n break;\n }\n }\n if (prunedByEdgeLabel) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // 遍历 candidateEdges,进行边的筛选\n var candidateEdgeNum = candidateEdges.length;\n // prune:若边数过少,去除该图\n if (candidateEdgeNum < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"break\";\n }\n var candidateGraphInvalid = false;\n var _loop_5 = function _loop_5(e) {\n var edge = candidateEdges[e];\n var edgeLabel = edge[edgeLabelProp];\n var patternEdgesWithLabel = patternEdgeLabelMap[edgeLabel];\n // prune 1: 若边的 label 不存在于 pattern 边 label 中,去除该边\n if (!patternEdgesWithLabel || !patternEdgesWithLabel.length) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n // prune 2: 若边的 label +两端 label 的三元组关系不能在 pattern 中找到,去除该边\n var sourceLabel = candidateNodeMap[edge.source].node[nodeLabelProp];\n var targetLabel = candidateNodeMap[edge.target].node[nodeLabelProp];\n var edgeMatched = false;\n patternEdgesWithLabel.forEach(function (patternEdge) {\n var patternSource = patternNodeMap[patternEdge.source].node;\n var patternTarget = patternNodeMap[patternEdge.target].node;\n if (patternSource[nodeLabelProp] === sourceLabel && patternTarget[nodeLabelProp] === targetLabel) edgeMatched = true;\n if (!directed && patternSource[nodeLabelProp] === targetLabel && patternTarget[nodeLabelProp] === sourceLabel) edgeMatched = true;\n });\n if (!edgeMatched) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n };\n for (var e = candidateEdgeNum - 1; e >= 0; e--) {\n var state_2 = _loop_5(e);\n if (state_2 === \"break\") break;\n }\n // prune2: 删除边的过程中,发现边数过少/边 label 数过少时,去除该图\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n candidateGraph.edges = candidateEdges;\n var lengthsToCandidate = (0, _dijkstra.default)(candidateGraph, candidateGraph.nodes[0].id, false).length;\n Object.keys(lengthsToCandidate).reverse().forEach(function (targetId) {\n if (targetId === candidateGraph.nodes[0].id || candidateGraphInvalid) return;\n // prune4: 通过上述裁剪,可能导致该邻居子图变为不连通。裁剪掉目前在这个邻居子图中和 candidate(第一个节点)不连通的节点\n if (lengthsToCandidate[targetId] === Infinity) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n return;\n }\n // prune5: 经过边裁剪后,可能又出现了最短路径过长的节点 (比 pattern 中同 label 的节点到 beginNode 最大最短距离远),删去这些节点\n var nLabel = nodeMap[targetId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nLabel] || !undirectedLengthsToBeginPNodeLabelMap[nLabel].length || lengthsToCandidate[targetId] > undirectedLengthsToBeginPNodeLabelMap[nLabel][undirectedLengthsToBeginPNodeLabelMap[nLabel].length - 1]) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n }\n });\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n var degreeChanged = true;\n var loopCount = 0;\n while (degreeChanged && !candidateGraphInvalid) {\n degreeChanged = false;\n // candidate 度数不足,删去该图\n var condition = directed ? candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree || candidateNodeMap[candidate.id].inDegree < patternNodeMap[beginPNode.id].inDegree || candidateNodeMap[candidate.id].outDegree < patternNodeMap[beginPNode.id].outDegree : candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree;\n if (condition) {\n candidateGraphInvalid = true;\n break;\n }\n // candidate label 个数不足,删去该图\n if (candidateNodeLabelCountMap[candidate[nodeLabelProp]] < patternNodeLabelMap[candidate[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n // prune6:去除度数过小的节点\n var currentCandidateNodeNum = candidateGraph.nodes.length;\n for (var o = currentCandidateNodeNum - 1; o >= 0; o--) {\n var cgNode = candidateGraph.nodes[o];\n var nodeDegree = candidateNodeMap[cgNode.id].degree;\n var nodeInDegree = candidateNodeMap[cgNode.id].inDegree;\n var nodeOutDegree = candidateNodeMap[cgNode.id].outDegree;\n var cNodeLabel = cgNode[nodeLabelProp];\n var _e = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, cNodeLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _e.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _e.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _e.minPatternNodeLabelOutDegree;\n var deleteCondition = directed ? nodeDegree < minPatternNodeLabelDegree || nodeInDegree < minPatternNodeLabelInDegree || nodeOutDegree < minPatternNodeLabelOutDegree : nodeDegree < minPatternNodeLabelDegree;\n if (deleteCondition) {\n candidateNodeLabelCountMap[cgNode[nodeLabelProp]]--;\n // 节点 label 个数不足\n if (candidateNodeLabelCountMap[cgNode[nodeLabelProp]] < patternNodeLabelMap[cgNode[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n candidateGraph.nodes.splice(o, 1);\n candidateNodeMap[cgNode.id] = undefined;\n degreeChanged = true;\n }\n }\n if (candidateGraphInvalid || !degreeChanged && loopCount !== 0) break;\n // 经过 prune5 节点裁剪,删去端点已经不在 candidateGraph 中的边\n candidateEdgeNum = candidateEdges.length;\n for (var y = candidateEdgeNum - 1; y >= 0; y--) {\n var cedge = candidateEdges[y];\n if (!candidateNodeMap[cedge.source] || !candidateNodeMap[cedge.target]) {\n candidateEdges.splice(y, 1);\n var edgeLabel = cedge[edgeLabelProp];\n edgeLabelCountMap[edgeLabel]--;\n if (candidateNodeMap[cedge.source]) {\n candidateNodeMap[cedge.source].degree--;\n candidateNodeMap[cedge.source].outDegree--;\n }\n if (candidateNodeMap[cedge.target]) {\n candidateNodeMap[cedge.target].degree--;\n candidateNodeMap[cedge.target].inDegree--;\n }\n // 边 label 数量不足\n if (patternEdgeLabelMap[edgeLabel] && edgeLabelCountMap[edgeLabel] < patternEdgeLabelMap[edgeLabel].length) {\n candidateGraphInvalid = true;\n break;\n }\n degreeChanged = true;\n }\n }\n loopCount++;\n }\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // prune: 若节点/边数过少,节点/边 label 过少,去掉这个图\n if (candidateGraphInvalid || candidateGraph.nodes.length < pattern.nodes.length || candidateEdges.length < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n };\n for (var i = candidateGraphNum - 1; i >= 0; i--) {\n var state_1 = _loop_2(i);\n if (state_1 === \"break\") break;\n }\n // 此时已经生成的多个 candidateGraphs,可能有重复\n // console.log(\n // \"----- stage5: going to splice dulplicated candidate graphs -------\"\n // );\n // 删去 candidateGraphs 中一模一样的子图,通过边的 node-node-edgeLabel 作为 key,这类边个数作为 value,进行匹配\n var currentLength = candidateGraphs.length;\n var _loop_3 = function _loop_3(i) {\n var cg1 = candidateGraphs[i];\n var cg1EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg1.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg1EdgeMap[key]) cg1EdgeMap[key] = 1;else cg1EdgeMap[key]++;\n });\n var _loop_6 = function _loop_6(j) {\n var cg2 = candidateGraphs[j];\n var cg2EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg2.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg2EdgeMap[key]) cg2EdgeMap[key] = 1;else cg2EdgeMap[key]++;\n });\n var same = true;\n if (Object.keys(cg2EdgeMap).length !== Object.keys(cg1EdgeMap).length) {\n same = false;\n } else {\n Object.keys(cg1EdgeMap).forEach(function (key) {\n if (cg2EdgeMap[key] !== cg1EdgeMap[key]) same = false;\n });\n }\n if (same) {\n candidateGraphs.splice(j, 1);\n }\n };\n for (var j = currentLength - 1; j > i; j--) {\n _loop_6(j);\n }\n currentLength = candidateGraphs.length;\n };\n for (var i = 0; i <= currentLength - 1; i++) {\n _loop_3(i);\n }\n return candidateGraphs;\n};\nvar _default = GADDI;\nexports.default = _default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GADDI\", {\n enumerable: true,\n get: function get() {\n return _gaddi.default;\n }\n});\nObject.defineProperty(exports, \"breadthFirstSearch\", {\n enumerable: true,\n get: function get() {\n return _bfs.default;\n }\n});\nObject.defineProperty(exports, \"connectedComponent\", {\n enumerable: true,\n get: function get() {\n return _connectedComponent.default;\n }\n});\nObject.defineProperty(exports, \"depthFirstSearch\", {\n enumerable: true,\n get: function get() {\n return _dfs.default;\n }\n});\nObject.defineProperty(exports, \"detectCycle\", {\n enumerable: true,\n get: function get() {\n return _detectCycle.default;\n }\n});\nObject.defineProperty(exports, \"dijkstra\", {\n enumerable: true,\n get: function get() {\n return _dijkstra.default;\n }\n});\nObject.defineProperty(exports, \"findAllPath\", {\n enumerable: true,\n get: function get() {\n return _findPath.findAllPath;\n }\n});\nObject.defineProperty(exports, \"findShortestPath\", {\n enumerable: true,\n get: function get() {\n return _findPath.findShortestPath;\n }\n});\nObject.defineProperty(exports, \"floydWarshall\", {\n enumerable: true,\n get: function get() {\n return _floydWarshall.default;\n }\n});\nObject.defineProperty(exports, \"getAdjMatrix\", {\n enumerable: true,\n get: function get() {\n return _adjacentMatrix.default;\n }\n});\nObject.defineProperty(exports, \"getDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.default;\n }\n});\nObject.defineProperty(exports, \"getInDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.getInDegree;\n }\n});\nObject.defineProperty(exports, \"getNeighbors\", {\n enumerable: true,\n get: function get() {\n return _util.getNeighbors;\n }\n});\nObject.defineProperty(exports, \"getOutDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.getOutDegree;\n }\n});\nObject.defineProperty(exports, \"labelPropagation\", {\n enumerable: true,\n get: function get() {\n return _labelPropagation.default;\n }\n});\nObject.defineProperty(exports, \"louvain\", {\n enumerable: true,\n get: function get() {\n return _louvain.default;\n }\n});\nObject.defineProperty(exports, \"minimumSpanningTree\", {\n enumerable: true,\n get: function get() {\n return _mts.default;\n }\n});\nObject.defineProperty(exports, \"pageRank\", {\n enumerable: true,\n get: function get() {\n return _pageRank.default;\n }\n});\nvar _adjacentMatrix = _interopRequireDefault(require(\"../adjacent-matrix\"));\nvar _bfs = _interopRequireDefault(require(\"../bfs\"));\nvar _connectedComponent = _interopRequireDefault(require(\"../connected-component\"));\nvar _degree = _interopRequireWildcard(require(\"../degree\"));\nvar _detectCycle = _interopRequireDefault(require(\"../detect-cycle\"));\nvar _dfs = _interopRequireDefault(require(\"../dfs\"));\nvar _dijkstra = _interopRequireDefault(require(\"../dijkstra\"));\nvar _findPath = require(\"../find-path\");\nvar _floydWarshall = _interopRequireDefault(require(\"../floydWarshall\"));\nvar _labelPropagation = _interopRequireDefault(require(\"../label-propagation\"));\nvar _louvain = _interopRequireDefault(require(\"../louvain\"));\nvar _mts = _interopRequireDefault(require(\"../mts\"));\nvar _pageRank = _interopRequireDefault(require(\"../pageRank\"));\nvar _gaddi = _interopRequireDefault(require(\"../gaddi\"));\nvar _util = require(\"../util\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar algorithm = _interopRequireWildcard(require(\"./algorithm\"));\nvar _constant = require(\"./constant\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nvar ctx = typeof self !== 'undefined' ? self : {};\nctx.onmessage = function (event) {\n var _a = event.data,\n _algorithmType = _a._algorithmType,\n data = _a.data;\n // 如果发送内容没有私有类型。说明不是自己发的。不管\n // fix: https://github.com/antvis/algorithm/issues/25\n if (!_algorithmType) {\n return;\n }\n if (typeof algorithm[_algorithmType] === 'function') {\n var result = algorithm[_algorithmType].apply(algorithm, data);\n ctx.postMessage({\n _algorithmType: _constant.MESSAGE.SUCCESS,\n data: result\n });\n return;\n }\n ctx.postMessage({\n _algorithmType: _constant.MESSAGE.FAILURE\n });\n};\n// https://stackoverflow.com/questions/50210416/webpack-worker-loader-fails-to-compile-typescript-worker\nvar _default = null;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _constant = require(\"./constant\");\nvar _index = _interopRequireDefault(require(\"./index.worker\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 创建一个在worker中运行的算法\n * @param type 算法类型\n */\nvar createWorker = function createWorker(type) {\n return function () {\n var data = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n data[_i] = arguments[_i];\n }\n return new Promise(function (resolve, reject) {\n var worker = new _index.default();\n worker.postMessage({\n _algorithmType: type,\n data: data\n });\n worker.onmessage = function (event) {\n var _a = event.data,\n data = _a.data,\n _algorithmType = _a._algorithmType;\n if (_constant.MESSAGE.SUCCESS === _algorithmType) {\n resolve(data);\n } else {\n reject();\n }\n worker.terminate();\n };\n });\n };\n};\nvar _default = createWorker;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.pageRankAsync = exports.minimumSpanningTreeAsync = exports.louvainAsync = exports.labelPropagationAsync = exports.getOutDegreeAsync = exports.getNeighborsAsync = exports.getInDegreeAsync = exports.getDegreeAsync = exports.getAdjMatrixAsync = exports.floydWarshallAsync = exports.findShortestPathAsync = exports.findAllPathAsync = exports.dijkstraAsync = exports.detectCycleAsync = exports.detectAllUndirectedCycleAsync = exports.detectAllDirectedCycleAsync = exports.detectAllCyclesAsync = exports.connectedComponentAsync = exports.GADDIAsync = void 0;\nvar _createWorker = _interopRequireDefault(require(\"./createWorker\"));\nvar _constant = require(\"./constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nvar getAdjMatrixAsync = function getAdjMatrixAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getAdjMatrix).apply(void 0, [graphData, directed]);\n};\n/**\n * 图的连通分量\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nexports.getAdjMatrixAsync = getAdjMatrixAsync;\nvar connectedComponentAsync = function connectedComponentAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.connectedComponent).apply(void 0, [graphData, directed]);\n};\n/**\n * 获取节点的度\n * @param graphData 图数据\n */\nexports.connectedComponentAsync = connectedComponentAsync;\nvar getDegreeAsync = function getDegreeAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getDegree)(graphData);\n};\n/**\n * 获取节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getDegreeAsync = getDegreeAsync;\nvar getInDegreeAsync = function getInDegreeAsync(graphData, nodeId) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getInDegree)(graphData, nodeId);\n};\n/**\n * 获取节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getInDegreeAsync = getInDegreeAsync;\nvar getOutDegreeAsync = function getOutDegreeAsync(graphData, nodeId) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getOutDegree)(graphData, nodeId);\n};\n/**\n * 检测图中的(有向) Cycle\n * @param graphData 图数据\n */\nexports.getOutDegreeAsync = getOutDegreeAsync;\nvar detectCycleAsync = function detectCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectCycle)(graphData);\n};\n/**\n * 检测图中的(无向) Cycle\n * @param graphData 图数据\n */\nexports.detectCycleAsync = detectCycleAsync;\nvar detectAllCyclesAsync = function detectAllCyclesAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllCycles)(graphData);\n};\n/**\n * 检测图中的所有(有向) Cycle\n * @param graphData 图数据\n */\nexports.detectAllCyclesAsync = detectAllCyclesAsync;\nvar detectAllDirectedCycleAsync = function detectAllDirectedCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllDirectedCycle)(graphData);\n};\n/**\n * 检测图中的所有(无向) Cycle\n * @param graphData 图数据\n */\nexports.detectAllDirectedCycleAsync = detectAllDirectedCycleAsync;\nvar detectAllUndirectedCycleAsync = function detectAllUndirectedCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllUndirectedCycle)(graphData);\n};\n/**\n * Dijkstra's algorithm, See {@link https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm}\n * @param graphData 图数据\n */\nexports.detectAllUndirectedCycleAsync = detectAllUndirectedCycleAsync;\nvar dijkstraAsync = function dijkstraAsync(graphData, source, directed, weightPropertyName) {\n return (0, _createWorker.default)(_constant.ALGORITHM.dijkstra).apply(void 0, [graphData, source, directed, weightPropertyName]);\n};\n/**\n * 查找两点之间的所有路径\n * @param graphData 图数据\n * @param start 路径起始点ID\n * @param end 路径终点ID\n * @param directed 是否为有向图\n */\nexports.dijkstraAsync = dijkstraAsync;\nvar findAllPathAsync = function findAllPathAsync(graphData, start, end, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.findAllPath).apply(void 0, [graphData, start, end, directed]);\n};\n/**\n * 查找两点之间的所有路径\n * @param graphData 图数据\n * @param start 路径起始点ID\n * @param end 路径终点ID\n * @param directed 是否为有向图\n * @param weightPropertyName 边权重的属名称,若数据中没有权重,则默认每条边权重为 1\n */\nexports.findAllPathAsync = findAllPathAsync;\nvar findShortestPathAsync = function findShortestPathAsync(graphData, start, end, directed, weightPropertyName) {\n return (0, _createWorker.default)(_constant.ALGORITHM.findShortestPath).apply(void 0, [graphData, start, end, directed, weightPropertyName]);\n};\n/**\n * Floyd–Warshall algorithm, See {@link https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm}\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nexports.findShortestPathAsync = findShortestPathAsync;\nvar floydWarshallAsync = function floydWarshallAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.floydWarshall).apply(void 0, [graphData, directed]);\n};\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nexports.floydWarshallAsync = floydWarshallAsync;\nvar labelPropagationAsync = function labelPropagationAsync(graphData, directed, weightPropertyName, maxIteration) {\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n return (0, _createWorker.default)(_constant.ALGORITHM.labelPropagation)(graphData, directed, weightPropertyName, maxIteration);\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold\n */\nexports.labelPropagationAsync = labelPropagationAsync;\nvar louvainAsync = function louvainAsync(graphData, directed, weightPropertyName, threshold) {\n return (0, _createWorker.default)(_constant.ALGORITHM.louvain)(graphData, directed, weightPropertyName, threshold);\n};\n/**\n * 最小生成树,See {@link https://en.wikipedia.org/wiki/Kruskal%27s_algorithm}\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nexports.louvainAsync = louvainAsync;\nvar minimumSpanningTreeAsync = function minimumSpanningTreeAsync(graphData, weight, algo) {\n return (0, _createWorker.default)(_constant.ALGORITHM.minimumSpanningTree).apply(void 0, [graphData, weight, algo]);\n};\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nexports.minimumSpanningTreeAsync = minimumSpanningTreeAsync;\nvar pageRankAsync = function pageRankAsync(graphData, epsilon, linkProb) {\n return (0, _createWorker.default)(_constant.ALGORITHM.pageRank).apply(void 0, [graphData, epsilon, linkProb]);\n};\n/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nexports.pageRankAsync = pageRankAsync;\nvar getNeighborsAsync = function getNeighborsAsync(nodeId, edges, type) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getNeighbors).apply(void 0, [nodeId, edges, type]);\n};\n/**\n * GADDI 图模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nexports.getNeighborsAsync = getNeighborsAsync;\nvar GADDIAsync = function GADDIAsync(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n return (0, _createWorker.default)(_constant.ALGORITHM.GADDI).apply(void 0, [graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp]);\n};\nexports.GADDIAsync = GADDIAsync;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GADDIAsync\", {\n enumerable: true,\n get: function get() {\n return _index.GADDIAsync;\n }\n});\nObject.defineProperty(exports, \"connectedComponentAsync\", {\n enumerable: true,\n get: function get() {\n return _index.connectedComponentAsync;\n }\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"detectAllCyclesAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllCyclesAsync;\n }\n});\nObject.defineProperty(exports, \"detectAllDirectedCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllDirectedCycleAsync;\n }\n});\nObject.defineProperty(exports, \"detectAllUndirectedCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllUndirectedCycleAsync;\n }\n});\nObject.defineProperty(exports, \"detectCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectCycleAsync;\n }\n});\nexports.detectDirectedCycleAsync = void 0;\nObject.defineProperty(exports, \"dijkstraAsync\", {\n enumerable: true,\n get: function get() {\n return _index.dijkstraAsync;\n }\n});\nObject.defineProperty(exports, \"findAllPathAsync\", {\n enumerable: true,\n get: function get() {\n return _index.findAllPathAsync;\n }\n});\nObject.defineProperty(exports, \"findShortestPathAsync\", {\n enumerable: true,\n get: function get() {\n return _index.findShortestPathAsync;\n }\n});\nObject.defineProperty(exports, \"floydWarshallAsync\", {\n enumerable: true,\n get: function get() {\n return _index.floydWarshallAsync;\n }\n});\nObject.defineProperty(exports, \"getAdjMatrixAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getAdjMatrixAsync;\n }\n});\nObject.defineProperty(exports, \"getDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"getInDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getInDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"getNeighborsAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getNeighborsAsync;\n }\n});\nObject.defineProperty(exports, \"getOutDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getOutDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"labelPropagationAsync\", {\n enumerable: true,\n get: function get() {\n return _index.labelPropagationAsync;\n }\n});\nObject.defineProperty(exports, \"louvainAsync\", {\n enumerable: true,\n get: function get() {\n return _index.louvainAsync;\n }\n});\nObject.defineProperty(exports, \"minimumSpanningTreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.minimumSpanningTreeAsync;\n }\n});\nObject.defineProperty(exports, \"pageRankAsync\", {\n enumerable: true,\n get: function get() {\n return _index.pageRankAsync;\n }\n});\nvar _index = require(\"./workers/index\");\nvar detectDirectedCycleAsync = _index.detectCycleAsync;\nexports.detectDirectedCycleAsync = detectDirectedCycleAsync;\nvar _default = {\n getAdjMatrixAsync: _index.getAdjMatrixAsync,\n connectedComponentAsync: _index.connectedComponentAsync,\n getDegreeAsync: _index.getDegreeAsync,\n getInDegreeAsync: _index.getInDegreeAsync,\n getOutDegreeAsync: _index.getOutDegreeAsync,\n detectCycleAsync: _index.detectCycleAsync,\n detectDirectedCycleAsync: detectDirectedCycleAsync,\n detectAllCyclesAsync: _index.detectAllCyclesAsync,\n detectAllDirectedCycleAsync: _index.detectAllDirectedCycleAsync,\n detectAllUndirectedCycleAsync: _index.detectAllUndirectedCycleAsync,\n dijkstraAsync: _index.dijkstraAsync,\n findAllPathAsync: _index.findAllPathAsync,\n findShortestPathAsync: _index.findShortestPathAsync,\n floydWarshallAsync: _index.floydWarshallAsync,\n labelPropagationAsync: _index.labelPropagationAsync,\n louvainAsync: _index.louvainAsync,\n minimumSpanningTreeAsync: _index.minimumSpanningTreeAsync,\n pageRankAsync: _index.pageRankAsync,\n getNeighborsAsync: _index.getNeighborsAsync,\n GADDIAsync: _index.GADDIAsync\n};\nexports.default = _default;","export function getPixelRatio() {\n return window ? window.devicePixelRatio : 1;\n}\n/**\n * 两点之间的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n */\nexport function distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\n/**\n * 是否在包围盒内\n * @param {number} minX 包围盒开始的点 x\n * @param {number} minY 包围盒开始的点 y\n * @param {number} width 宽度\n * @param {number} height 高度\n * @param {[type]} x 检测点的 x\n * @param {[type]} y 监测点的 y\n */\nexport function inBox(minX, minY, width, height, x, y) {\n return x >= minX && x <= minX + width && y >= minY && y <= minY + height;\n}\nexport function intersectRect(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n}\n// 合并两个区域\nexport function mergeRegion(region1, region2) {\n if (!region1 || !region2) {\n return region1 || region2;\n }\n return {\n minX: Math.min(region1.minX, region2.minX),\n minY: Math.min(region1.minY, region2.minY),\n maxX: Math.max(region1.maxX, region2.maxX),\n maxY: Math.max(region1.maxY, region2.maxY),\n };\n}\n/**\n * 判断两个点是否重合,点坐标的格式为 [x, y]\n * @param {Array} point1 第一个点\n * @param {Array} point2 第二个点\n */\nexport function isSamePoint(point1, point2) {\n return point1[0] === point2[0] && point1[1] === point2[1];\n}\nexport { isNil, isString, isFunction, isArray, each, toRadian, mod, isNumberEqual, requestAnimationFrame, clearAnimationFrame, } from '@antv/util';\n//# sourceMappingURL=util.js.map","import { isString, each, isArray } from './util';\nvar regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexPR = /^p\\s*\\(\\s*([axyn])\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^\\)]+\\))/gi;\nfunction addStop(steps, gradient) {\n var arr = steps.match(regexColorStop);\n each(arr, function (item) {\n var itemArr = item.split(':');\n gradient.addColorStop(itemArr[0], itemArr[1]);\n });\n}\n/**\n * 将边和填充设置的颜色转换成线性渐变对象\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} gradientStr 颜色\n * @returns {any} 渐变对象\n */\nexport function parseLineGradient(context, element, gradientStr) {\n var arr = regexLG.exec(gradientStr);\n var angle = (parseFloat(arr[1]) % 360) * (Math.PI / 180);\n var steps = arr[2];\n var box = element.getBBox();\n var start;\n var end;\n if (angle >= 0 && angle < (1 / 2) * Math.PI) {\n start = {\n x: box.minX,\n y: box.minY,\n };\n end = {\n x: box.maxX,\n y: box.maxY,\n };\n }\n else if ((1 / 2) * Math.PI <= angle && angle < Math.PI) {\n start = {\n x: box.maxX,\n y: box.minY,\n };\n end = {\n x: box.minX,\n y: box.maxY,\n };\n }\n else if (Math.PI <= angle && angle < (3 / 2) * Math.PI) {\n start = {\n x: box.maxX,\n y: box.maxY,\n };\n end = {\n x: box.minX,\n y: box.minY,\n };\n }\n else {\n start = {\n x: box.minX,\n y: box.maxY,\n };\n end = {\n x: box.maxX,\n y: box.minY,\n };\n }\n var tanTheta = Math.tan(angle);\n var tanTheta2 = tanTheta * tanTheta;\n var x = (end.x - start.x + tanTheta * (end.y - start.y)) / (tanTheta2 + 1) + start.x;\n var y = (tanTheta * (end.x - start.x + tanTheta * (end.y - start.y))) / (tanTheta2 + 1) + start.y;\n var gradient = context.createLinearGradient(start.x, start.y, x, y);\n addStop(steps, gradient);\n return gradient;\n}\n/**\n * 将边和填充设置的颜色转换成圆形渐变对象\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} gradientStr 颜色\n * @returns {any} 渐变对象\n */\nexport function parseRadialGradient(context, element, gradientStr) {\n var arr = regexRG.exec(gradientStr);\n var fx = parseFloat(arr[1]);\n var fy = parseFloat(arr[2]);\n var fr = parseFloat(arr[3]);\n var steps = arr[4];\n // 环半径为0时,默认无渐变,取渐变序列的最后一个颜色\n if (fr === 0) {\n var colors = steps.match(regexColorStop);\n return colors[colors.length - 1].split(':')[1];\n }\n var box = element.getBBox();\n var width = box.maxX - box.minX;\n var height = box.maxY - box.minY;\n var r = Math.sqrt(width * width + height * height) / 2;\n var gradient = context.createRadialGradient(box.minX + width * fx, box.minY + height * fy, 0, box.minX + width / 2, box.minY + height / 2, fr * r);\n addStop(steps, gradient);\n return gradient;\n}\n/**\n * 边和填充设置的颜色转换成 pattern\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} patternStr 生成 pattern 的字符串\n */\nexport function parsePattern(context, element, patternStr) {\n // 在转换过程中进行了缓存\n if (element.get('patternSource') && element.get('patternSource') === patternStr) {\n return element.get('pattern');\n }\n var pattern;\n var img;\n var arr = regexPR.exec(patternStr);\n var repeat = arr[1];\n var source = arr[2];\n // Function to be called when pattern loads\n function onload() {\n // Create pattern\n pattern = context.createPattern(img, repeat);\n element.set('pattern', pattern); // be a cache\n element.set('patternSource', patternStr);\n }\n switch (repeat) {\n case 'a':\n repeat = 'repeat';\n break;\n case 'x':\n repeat = 'repeat-x';\n break;\n case 'y':\n repeat = 'repeat-y';\n break;\n case 'n':\n repeat = 'no-repeat';\n break;\n default:\n repeat = 'no-repeat';\n }\n img = new Image();\n // If source URL is not a data URL\n if (!source.match(/^data:/i)) {\n // Set crossOrigin for this image\n img.crossOrigin = 'Anonymous';\n }\n img.src = source;\n if (img.complete) {\n onload();\n }\n else {\n img.onload = onload;\n // Fix onload() bug in IE9\n img.src = img.src;\n }\n return pattern;\n}\nexport function parseStyle(context, element, color) {\n var bbox = element.getBBox();\n if (isNaN(bbox.x) || isNaN(bbox.y) || isNaN(bbox.width) || isNaN(bbox.height)) {\n return color;\n }\n if (isString(color)) {\n if (color[1] === '(' || color[2] === '(') {\n if (color[0] === 'l') {\n // regexLG.test(color)\n return parseLineGradient(context, element, color);\n }\n if (color[0] === 'r') {\n // regexRG.test(color)\n return parseRadialGradient(context, element, color);\n }\n if (color[0] === 'p') {\n // regexPR.test(color)\n return parsePattern(context, element, color);\n }\n }\n return color;\n }\n if (color instanceof CanvasPattern) {\n return color;\n }\n}\nexport function parseRadius(radius) {\n var r1 = 0;\n var r2 = 0;\n var r3 = 0;\n var r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return [r1, r2, r3, r4];\n}\n//# sourceMappingURL=parse.js.map","import { mod, toRadian, isSamePoint } from './util';\n// 向量长度\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n// u.v/|u||v|,计算夹角的余弦值\nfunction vRatio(u, v) {\n // 当存在一个向量的长度为 0 时,夹角也为 0,即夹角的余弦值为 1\n return vMag(u) * vMag(v) ? (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)) : 1;\n}\n// 向量角度\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n// A 0:rx 1:ry 2:x-axis-rotation 3:large-arc-flag 4:sweep-flag 5: x 6: y\nexport default function getArcParams(startPoint, params) {\n var rx = params[1];\n var ry = params[2];\n var xRotation = mod(toRadian(params[3]), Math.PI * 2);\n var arcFlag = params[4];\n var sweepFlag = params[5];\n // 弧形起点坐标\n var x1 = startPoint[0];\n var y1 = startPoint[1];\n // 弧形终点坐标\n var x2 = params[6];\n var y2 = params[7];\n var xp = (Math.cos(xRotation) * (x1 - x2)) / 2.0 + (Math.sin(xRotation) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(xRotation) * (x1 - x2)) / 2.0 + (Math.cos(xRotation) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = diff ? Math.sqrt((rx * rx * (ry * ry) - diff) / diff) : 1;\n if (arcFlag === sweepFlag) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n // 旋转前的起点坐标,且当长半轴和短半轴的长度为 0 时,坐标按 (0, 0) 处理\n var cxp = ry ? (f * rx * yp) / ry : 0;\n var cyp = rx ? (f * -ry * xp) / rx : 0;\n // 椭圆圆心坐标\n var cx = (x1 + x2) / 2.0 + Math.cos(xRotation) * cxp - Math.sin(xRotation) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(xRotation) * cxp + Math.cos(xRotation) * cyp;\n // 起始点的单位向量\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n // 终止点的单位向量\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n // 计算起始点和圆心的连线,与 x 轴正方向的夹角\n var theta = vAngle([1, 0], u);\n // 计算圆弧起始点和终止点与椭圆圆心连线的夹角\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (sweepFlag === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (sweepFlag === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return {\n cx: cx,\n cy: cy,\n // 弧形的起点和终点相同时,长轴和短轴的长度按 0 处理\n rx: isSamePoint(startPoint, [x2, y2]) ? 0 : rx,\n ry: isSamePoint(startPoint, [x2, y2]) ? 0 : ry,\n startAngle: theta,\n endAngle: theta + dTheta,\n xRotation: xRotation,\n arcFlag: arcFlag,\n sweepFlag: sweepFlag,\n };\n}\n//# sourceMappingURL=arc-params.js.map","import { __assign, __rest } from \"tslib\";\nimport { Path } from '../shape';\nvar sin = Math.sin, cos = Math.cos, atan2 = Math.atan2, PI = Math.PI;\nfunction _addDefaultArrow(shape, attrs, x1, y1, x2, y2, isStart) {\n var stroke = attrs.stroke, lineWidth = attrs.lineWidth;\n var x = x1 - x2;\n var y = y1 - y2;\n var rad = atan2(y, x);\n var arrowShape = new Path({\n type: 'path',\n canvas: shape.get('canvas'),\n isArrowShape: true,\n attrs: {\n // 默认箭头的边长为 10,夹角为 60 度\n path: \"M\" + 10 * cos(PI / 6) + \",\" + 10 * sin(PI / 6) + \" L0,0 L\" + 10 * cos(PI / 6) + \",-\" + 10 * sin(PI / 6),\n // 使用 shape stroke 值\n stroke: stroke,\n lineWidth: lineWidth,\n },\n });\n arrowShape.translate(x2, y2);\n arrowShape.rotateAtPoint(x2, y2, rad);\n shape.set(isStart ? 'startArrowShape' : 'endArrowShape', arrowShape);\n}\n/**\n * 箭头 path 的设置要求\n * 1. 箭头顶点坐标需要为 (0, 0)\n * 2. 箭头夹角的中心分割线需要与 X 轴正方向对齐\n */\nfunction _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, isStart) {\n var startArrow = attrs.startArrow, endArrow = attrs.endArrow, stroke = attrs.stroke, lineWidth = attrs.lineWidth;\n var arrowAttrs = isStart ? startArrow : endArrow;\n var d = arrowAttrs.d, arrowFill = arrowAttrs.fill, arrowStroke = arrowAttrs.stroke, arrowLineWidth = arrowAttrs.lineWidth, restAttrs = __rest(arrowAttrs, [\"d\", \"fill\", \"stroke\", \"lineWidth\"]);\n var x = x1 - x2;\n var y = y1 - y2;\n var rad = atan2(y, x);\n if (d) {\n x2 = x2 - cos(rad) * d;\n y2 = y2 - sin(rad) * d;\n }\n var arrowShape = new Path({\n type: 'path',\n canvas: shape.get('canvas'),\n isArrowShape: true,\n attrs: __assign(__assign({}, restAttrs), { \n // 支持单独设置箭头的 stroke 和 lineWidth,若为空则使用 shape 的值\n stroke: arrowStroke || stroke, lineWidth: arrowLineWidth || lineWidth, \n // 箭头是否填充需要手动设置,不会继承自 shape 的值\n fill: arrowFill }),\n });\n arrowShape.translate(x2, y2);\n arrowShape.rotateAtPoint(x2, y2, rad);\n shape.set(isStart ? 'startArrowShape' : 'endArrowShape', arrowShape);\n}\n/**\n * 如果自定义箭头并且有 d 需要做偏移,如果直接画,线条会超出箭头尖端,因此需要根据箭头偏移 d, 返回线需要缩短的距离\n * |----------------\n * |<|--------------\n * |\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n * @param {number} d 箭头沿线条方向的偏移距离\n * @return {{dx: number, dy: number}} 返回线条偏移距离\n */\nexport function getShortenOffset(x1, y1, x2, y2, d) {\n var rad = atan2(y2 - y1, x2 - x1);\n return {\n dx: cos(rad) * d,\n dy: sin(rad) * d,\n };\n}\n/**\n * 绘制起始箭头\n * @param {IShape} shape 图形\n * @param {ShapeAttrs} attrs shape 的绘图属性\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n */\nexport function addStartArrow(shape, attrs, x1, y1, x2, y2) {\n if (typeof attrs.startArrow === 'object') {\n _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, true);\n }\n else if (attrs.startArrow) {\n _addDefaultArrow(shape, attrs, x1, y1, x2, y2, true);\n }\n else {\n shape.set('startArrowShape', null);\n }\n}\n/**\n * 绘制结束箭头\n * @param {IShape} shape 图形\n * @param {ShapeAttrs} attrs shape 的绘图属性\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n */\nexport function addEndArrow(shape, attrs, x1, y1, x2, y2) {\n if (typeof attrs.endArrow === 'object') {\n _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, false);\n }\n else if (attrs.endArrow) {\n _addDefaultArrow(shape, attrs, x1, y1, x2, y2, false);\n }\n else {\n shape.set('startArrowShape', null);\n }\n}\n//# sourceMappingURL=arrow.js.map","import { each, isArray, max, min } from '@antv/util';\nimport { parseStyle } from './parse';\nimport getArcParams from './arc-params';\nimport { mergeRegion, intersectRect } from './util';\nimport * as ArrowUtil from '../util/arrow';\nvar SHAPE_ATTRS_MAP = {\n fill: 'fillStyle',\n stroke: 'strokeStyle',\n opacity: 'globalAlpha',\n};\nexport function applyAttrsToContext(context, element) {\n var attrs = element.attr();\n for (var k in attrs) {\n var v = attrs[k];\n // 转换一下不与 canvas 兼容的属性名\n var name_1 = SHAPE_ATTRS_MAP[k] ? SHAPE_ATTRS_MAP[k] : k;\n if (name_1 === 'matrix' && v) {\n // 设置矩阵\n context.transform(v[0], v[1], v[3], v[4], v[6], v[7]);\n }\n else if (name_1 === 'lineDash' && context.setLineDash) {\n // 设置虚线,只支持数组形式,非数组形式不做任何操作\n isArray(v) && context.setLineDash(v);\n }\n else {\n if (name_1 === 'strokeStyle' || name_1 === 'fillStyle') {\n // 如果存在渐变、pattern 这个开销有些大\n // 可以考虑缓存机制,通过 hasUpdate 来避免一些运算\n v = parseStyle(context, element, v);\n }\n else if (name_1 === 'globalAlpha') {\n // opacity 效果可以叠加,子元素的 opacity 需要与父元素 opacity 相乘\n v = v * context.globalAlpha;\n }\n context[name_1] = v;\n }\n }\n}\nexport function drawChildren(context, children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.cfg.visible) {\n child.draw(context, region);\n }\n else {\n child.skipDraw();\n }\n }\n}\n// 这个地方的逻辑比较复杂,简单画了一张图:https://www.yuque.com/antv/ou292n/pcgt5g#OW1QE\nexport function checkRefresh(canvas, children, region) {\n var refreshElements = canvas.get('refreshElements');\n // 先遍历需要刷新的元素,将这些元素的父元素也设置 refresh\n each(refreshElements, function (el) {\n if (el !== canvas) {\n var parent_1 = el.cfg.parent;\n while (parent_1 && parent_1 !== canvas && !parent_1.cfg.refresh) {\n parent_1.cfg.refresh = true;\n parent_1 = parent_1.cfg.parent;\n }\n }\n });\n if (refreshElements[0] === canvas) {\n setChildrenRefresh(children, region);\n }\n else {\n // 检查所有子元素是否可以刷新\n checkChildrenRefresh(children, region);\n }\n}\n// 检查所有的子元素是否应该更新\nexport function checkChildrenRefresh(children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.cfg.visible) {\n // 先判断 hasChanged,因为它的优先级判断应该高于 refresh\n if (child.cfg.hasChanged) {\n // 如果节点发生了 change,则需要级联设置子元素的 refresh\n child.cfg.refresh = true;\n if (child.isGroup()) {\n setChildrenRefresh(child.cfg.children, region);\n }\n }\n else if (child.cfg.refresh) {\n // 如果当前图形/分组 refresh = true,说明其子节点存在 changed\n if (child.isGroup()) {\n checkChildrenRefresh(child.cfg.children, region);\n }\n }\n else {\n // 这个分支说明此次局部刷新,所有的节点和父元素没有发生变化,仅需要检查包围盒(缓存)是否相交即可\n var refresh = checkElementRefresh(child, region);\n child.cfg.refresh = refresh;\n if (refresh && child.isGroup()) {\n // 如果需要刷新,说明子元素也需要刷新,继续进行判定\n checkChildrenRefresh(child.cfg.children, region);\n }\n }\n }\n }\n}\n// 由于对改变的图形放入 refreshElements 时做了优化,判定父元素 changed 时不加入\n// 那么有可能会出现 elements 都为空,所以最终 group\nexport function clearChanged(elements) {\n for (var i = 0; i < elements.length; i++) {\n var el = elements[i];\n el.cfg.hasChanged = false;\n // 级联清理\n if (el.isGroup() && !el.destroyed) {\n clearChanged(el.cfg.children);\n }\n }\n}\n// 当某个父元素发生改变时,调用这个方法级联设置 refresh\nfunction setChildrenRefresh(children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (!child.cfg.visible) {\n continue;\n }\n // let refresh = true;\n // 获取缓存的 bbox,如果这个 bbox 还存在则说明父元素不是矩阵发生了改变\n // const bbox = child.cfg.canvasBBox;\n // if (bbox) {\n // // 如果这时候\n // refresh = intersectRect(bbox, region);\n // }\n child.cfg.refresh = true;\n // 如果需要刷新当前节点,所有的子元素设置 refresh\n if (child.isGroup()) {\n setChildrenRefresh(child.get('children'), region);\n }\n }\n}\nfunction checkElementRefresh(shape, region) {\n var bbox = shape.cfg.cacheCanvasBBox;\n var isAllow = shape.cfg.isInView && bbox && intersectRect(bbox, region);\n return isAllow;\n}\n// 绘制 path\nexport function drawPath(shape, context, attrs, arcParamsCache) {\n var path = attrs.path, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (!path) {\n return;\n }\n var currentPoint = [0, 0]; // 当前图形\n var startMovePoint = [0, 0]; // 开始 M 的点,可能会有多个\n var distance = {\n dx: 0,\n dy: 0,\n };\n context.beginPath();\n for (var i = 0; i < path.length; i++) {\n var params = path[i];\n var command = params[0];\n if (i === 0 && startArrow && startArrow.d) {\n var tangent = shape.getStartTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], startArrow.d);\n }\n else if (i === path.length - 2 && path[i + 1][0] === 'Z' && endArrow && endArrow.d) {\n // 为了防止结尾为 Z 的 segment 缩短不起效,需要取最后两个 segment 特殊处理\n var lastPath = path[i + 1];\n if (lastPath[0] === 'Z') {\n var tangent = shape.getEndTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], endArrow.d);\n }\n }\n else if (i === path.length - 1 && endArrow && endArrow.d) {\n if (path[0] !== 'Z') {\n var tangent = shape.getEndTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], endArrow.d);\n }\n }\n var dx = distance.dx, dy = distance.dy;\n // V,H,S,T 都在前面被转换成标准形式\n switch (command) {\n case 'M':\n context.moveTo(params[1] - dx, params[2] - dy);\n startMovePoint = [params[1], params[2]];\n break;\n case 'L':\n context.lineTo(params[1] - dx, params[2] - dy);\n break;\n case 'Q':\n context.quadraticCurveTo(params[1], params[2], params[3] - dx, params[4] - dy);\n break;\n case 'C':\n context.bezierCurveTo(params[1], params[2], params[3], params[4], params[5] - dx, params[6] - dy);\n break;\n case 'A': {\n var arcParams = void 0;\n // 为了加速绘制,可以提供参数的缓存,各个图形自己缓存\n if (arcParamsCache) {\n arcParams = arcParamsCache[i];\n if (!arcParams) {\n arcParams = getArcParams(currentPoint, params);\n arcParamsCache[i] = arcParams;\n }\n }\n else {\n arcParams = getArcParams(currentPoint, params);\n }\n var cx = arcParams.cx, cy = arcParams.cy, rx = arcParams.rx, ry = arcParams.ry, startAngle = arcParams.startAngle, endAngle = arcParams.endAngle, xRotation = arcParams.xRotation, sweepFlag = arcParams.sweepFlag;\n // 直接使用椭圆的 api\n if (context.ellipse) {\n context.ellipse(cx, cy, rx, ry, xRotation, startAngle, endAngle, 1 - sweepFlag);\n }\n else {\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(xRotation);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, startAngle, endAngle, 1 - sweepFlag);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-xRotation);\n context.translate(-cx, -cy);\n }\n break;\n }\n case 'Z':\n context.closePath();\n break;\n default:\n break;\n }\n // 有了 Z 后,当前节点从开始 M 的点开始\n if (command === 'Z') {\n currentPoint = startMovePoint;\n }\n else {\n var len = params.length;\n currentPoint = [params[len - 2], params[len - 1]];\n }\n }\n}\n// 刷新图形元素(Shape 或者 Group)\nexport function refreshElement(element, changeType) {\n var canvas = element.get('canvas');\n // 只有存在于 canvas 上时生效\n if (canvas) {\n if (changeType === 'remove') {\n // 一旦 remove,则无法在 element 上拿到包围盒\n // destroy 后所有属性都拿不到,所以需要暂存一下\n // 这是一段 hack 的代码\n element._cacheCanvasBBox = element.get('cacheCanvasBBox');\n }\n // 防止反复刷新\n if (!element.get('hasChanged')) {\n // 但是始终要标记为 hasChanged,便于后面进行局部渲染\n element.set('hasChanged', true);\n // 本来只有局部渲染模式下,才需要记录更新的元素队列\n // if (canvas.get('localRefresh')) {\n // canvas.refreshElement(element, changeType, canvas);\n // }\n // 但对于 https://github.com/antvis/g/issues/422 的场景,全局渲染的模式下也需要记录更新的元素队列\n // 如果当前元素的父元素发生了改变,可以不放入队列,这句话大概能够提升 15% 的初次渲染性能\n if (!(element.cfg.parent && element.cfg.parent.get('hasChanged'))) {\n canvas.refreshElement(element, changeType, canvas);\n if (canvas.get('autoDraw')) {\n canvas.draw();\n }\n }\n }\n }\n}\nexport function getRefreshRegion(element) {\n var region;\n if (!element.destroyed) {\n var cacheBox = element.get('cacheCanvasBBox');\n var validCache = cacheBox && !!(cacheBox.width && cacheBox.height);\n var bbox = element.getCanvasBBox();\n var validBBox = bbox && !!(bbox.width && bbox.height);\n // 是否是有效 bbox 判定,一些 NaN 或者 宽高为 0 的情况过滤掉\n if (validCache && validBBox) {\n region = mergeRegion(cacheBox, bbox);\n }\n else if (validCache) {\n region = cacheBox;\n }\n else if (validBBox) {\n region = bbox;\n }\n }\n else {\n // 因为元素已经销毁所以无法获取到缓存的包围盒\n region = element['_cacheCanvasBBox'];\n }\n return region;\n}\nexport function getMergedRegion(elements) {\n if (!elements.length) {\n return null;\n }\n var minXArr = [];\n var minYArr = [];\n var maxXArr = [];\n var maxYArr = [];\n each(elements, function (el) {\n var region = getRefreshRegion(el);\n if (region) {\n minXArr.push(region.minX);\n minYArr.push(region.minY);\n maxXArr.push(region.maxX);\n maxYArr.push(region.maxY);\n }\n });\n return {\n minX: min(minXArr),\n minY: min(minYArr),\n maxX: max(maxXArr),\n maxY: max(maxYArr),\n };\n}\nexport function mergeView(region, viewRegion) {\n if (!region || !viewRegion) {\n return null;\n }\n // 不相交,则直接返回 null\n if (!intersectRect(region, viewRegion)) {\n return null;\n }\n return {\n minX: Math.max(region.minX, viewRegion.minX),\n minY: Math.max(region.minY, viewRegion.minY),\n maxX: Math.min(region.maxX, viewRegion.maxX),\n maxY: Math.min(region.maxY, viewRegion.maxY),\n };\n}\n//# sourceMappingURL=draw.js.map","import { __extends } from \"tslib\";\nimport { AbstractGroup } from '@antv/g-base';\nimport * as Shape from './shape';\nimport { applyAttrsToContext, drawChildren, refreshElement } from './util/draw';\nimport { each, max, min } from '@antv/util';\nimport { intersectRect } from './util/util';\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Group.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n Group.prototype.getShapeBase = function () {\n return Shape;\n };\n Group.prototype.getGroupBase = function () {\n return Group;\n };\n // 同 shape 中的方法重复了\n Group.prototype._applyClip = function (context, clip) {\n if (clip) {\n context.save();\n // 将 clip 的属性挂载到 context 上\n applyAttrsToContext(context, clip);\n // 绘制 clip 路径\n clip.createPath(context);\n context.restore();\n // 裁剪\n context.clip();\n clip._afterDraw();\n }\n };\n // 这个方法以前直接使用的 getCanvasBBox,由于 group 上没有缓存,所以每次重新计算,导致性能开销比较大\n // 大概能够节省全局渲染 15-20% 的性能,如果不在这里加缓存优化后 10W 个节点无法达到 5-6 ms,大概能够 30-40ms\n Group.prototype.cacheCanvasBBox = function () {\n var children = this.cfg.children;\n var xArr = [];\n var yArr = [];\n each(children, function (child) {\n var bbox = child.cfg.cacheCanvasBBox;\n // isInview 的判定是一旦图形或者分组渲染就要计算是否在视图内,\n // 这个判定 10W 个图形下差不多能够节省 5-6 ms 的开销\n if (bbox && child.cfg.isInView) {\n xArr.push(bbox.minX, bbox.maxX);\n yArr.push(bbox.minY, bbox.maxY);\n }\n });\n var bbox = null;\n if (xArr.length) {\n var minX = min(xArr);\n var maxX = max(xArr);\n var minY = min(yArr);\n var maxY = max(yArr);\n bbox = {\n minX: minX,\n minY: minY,\n x: minX,\n y: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n var canvas = this.cfg.canvas;\n if (canvas) {\n var viewRange = canvas.getViewRange();\n // 如果这个地方判定 isInView == false 设置 bbox 为 false 的话,拾取的性能会更高\n // 但是目前 10W 图形的拾取在 2-5ms 内,这个优化意义不大,可以后期观察再看\n this.set('isInView', intersectRect(bbox, viewRange));\n }\n }\n else {\n this.set('isInView', false);\n }\n this.set('cacheCanvasBBox', bbox);\n };\n Group.prototype.draw = function (context, region) {\n var children = this.cfg.children;\n var allowDraw = region ? this.cfg.refresh : true; // 局部刷新需要判定\n // 这个地方需要判定,在 G6 的场景每个 group 都有 transform 的场景下性能会开销非常大\n // 通过 refresh 的判定,可以不刷新没有发生过变化的分组,不在视窗内的分组等等\n // 如果想进一步提升局部渲染性能,可以进一步优化 refresh 的判定,依然有潜力\n if (children.length && allowDraw) {\n context.save();\n // group 上的矩阵和属性也会应用到上下文上\n // 先将 attrs 应用到上下文中,再设置 clip。因为 clip 应该被当前元素的 matrix 所影响\n applyAttrsToContext(context, this);\n this._applyClip(context, this.getClip());\n drawChildren(context, children, region);\n context.restore();\n this.cacheCanvasBBox();\n }\n // 这里的成本比较大,如果不绘制则不再\n // this.set('cacheCanvasBBox', this.getCanvasBBox());\n this.cfg.refresh = null;\n // 绘制后,消除更新标记\n this.set('hasChanged', false);\n };\n // 绘制时被跳过,一般发生在分组隐藏时\n Group.prototype.skipDraw = function () {\n this.set('cacheCanvasBBox', null);\n this.set('hasChanged', false);\n };\n return Group;\n}(AbstractGroup));\nexport default Group;\n//# sourceMappingURL=group.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractShape } from '@antv/g-base';\nimport { isNil, intersectRect } from '../util/util';\nimport { applyAttrsToContext, refreshElement } from '../util/draw';\nimport { getBBoxMethod } from '@antv/g-base';\nimport * as Shape from './index';\nimport Group from '../group';\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n function ShapeBase() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ShapeBase.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n // 设置默认值\n return __assign(__assign({}, attrs), { lineWidth: 1, lineAppendWidth: 0, strokeOpacity: 1, fillOpacity: 1 });\n };\n ShapeBase.prototype.getShapeBase = function () {\n return Shape;\n };\n ShapeBase.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n ShapeBase.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n ShapeBase.prototype.calculateBBox = function () {\n var type = this.get('type');\n var lineWidth = this.getHitLineWidth();\n // const attrs = this.attr();\n var bboxMethod = getBBoxMethod(type);\n var box = bboxMethod(this);\n var halfLineWidth = lineWidth / 2;\n var minX = box.x - halfLineWidth;\n var minY = box.y - halfLineWidth;\n var maxX = box.x + box.width + halfLineWidth;\n var maxY = box.y + box.height + halfLineWidth;\n return {\n x: minX,\n minX: minX,\n y: minY,\n minY: minY,\n width: box.width + lineWidth,\n height: box.height + lineWidth,\n maxX: maxX,\n maxY: maxY,\n };\n };\n ShapeBase.prototype.isFill = function () {\n return !!this.attrs['fill'] || this.isClipShape();\n };\n ShapeBase.prototype.isStroke = function () {\n return !!this.attrs['stroke'];\n };\n // 同 shape 中的方法重复了\n ShapeBase.prototype._applyClip = function (context, clip) {\n if (clip) {\n context.save();\n // 将 clip 的属性挂载到 context 上\n applyAttrsToContext(context, clip);\n // 绘制 clip 路径\n clip.createPath(context);\n context.restore();\n // 裁剪\n context.clip();\n clip._afterDraw();\n }\n };\n // 绘制图形时需要考虑 region 限制\n ShapeBase.prototype.draw = function (context, region) {\n var clip = this.cfg.clipShape;\n // 如果指定了 region,同时不允许刷新时,直接返回\n if (region) {\n if (this.cfg.refresh === false) {\n // this._afterDraw();\n this.set('hasChanged', false);\n return;\n }\n // 是否相交需要考虑 clip 的包围盒\n var bbox = this.getCanvasBBox();\n if (!intersectRect(region, bbox)) {\n // 图形的包围盒与重绘区域不相交时,也需要清除标记\n this.set('hasChanged', false);\n // 存在多种情形需要更新 cacheCanvasBBox 和 isInview 的判定\n // 1. 之前图形在视窗内,但是现在不再视窗内\n // 2. 如果当前的图形以及父元素都没有发生过变化,refresh = false 不会走到这里,所以这里的图形都是父元素发生变化,但是没有在视图内的元素\n if (this.cfg.isInView) {\n this._afterDraw();\n }\n return;\n }\n }\n context.save();\n // 先将 attrs 应用到上下文中,再设置 clip。因为 clip 应该被当前元素的 matrix 所影响\n applyAttrsToContext(context, this);\n this._applyClip(context, clip);\n this.drawPath(context);\n context.restore();\n this._afterDraw();\n };\n ShapeBase.prototype.getCanvasViewBox = function () {\n var canvas = this.cfg.canvas;\n if (canvas) {\n // @ts-ignore\n return canvas.getViewRange();\n }\n return null;\n };\n ShapeBase.prototype.cacheCanvasBBox = function () {\n var canvasBBox = this.getCanvasViewBox();\n // 绘制的时候缓存包围盒\n if (canvasBBox) {\n var bbox = this.getCanvasBBox();\n var isInView = intersectRect(bbox, canvasBBox);\n this.set('isInView', isInView);\n // 不再视窗内 cacheCanvasBBox 设置成 null,会提升局部渲染的性能,\n // 因为在局部渲染影响的包围盒计算时不考虑这个图形的包围盒\n // 父元素 cacheCanvasBBox 计算的时候也不计算\n if (isInView) {\n this.set('cacheCanvasBBox', bbox);\n }\n else {\n this.set('cacheCanvasBBox', null);\n }\n }\n };\n ShapeBase.prototype._afterDraw = function () {\n this.cacheCanvasBBox();\n // 绘制后消除标记\n this.set('hasChanged', false);\n this.set('refresh', null);\n };\n ShapeBase.prototype.skipDraw = function () {\n this.set('cacheCanvasBBox', null);\n this.set('isInView', null);\n this.set('hasChanged', false);\n };\n /**\n * 绘制图形的路径\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.drawPath = function (context) {\n this.createPath(context);\n this.strokeAndFill(context);\n this.afterDrawPath(context);\n };\n /**\n * @protected\n * 填充图形\n * @param {CanvasRenderingContext2D} context context 上下文\n */\n ShapeBase.prototype.fill = function (context) {\n context.fill();\n };\n /**\n * @protected\n * 绘制图形边框\n * @param {CanvasRenderingContext2D} context context 上下文\n */\n ShapeBase.prototype.stroke = function (context) {\n context.stroke();\n };\n // 绘制或者填充\n ShapeBase.prototype.strokeAndFill = function (context) {\n var _a = this.attrs, lineWidth = _a.lineWidth, opacity = _a.opacity, strokeOpacity = _a.strokeOpacity, fillOpacity = _a.fillOpacity;\n if (this.isFill()) {\n if (!isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n this.fill(context);\n context.globalAlpha = opacity;\n }\n else {\n this.fill(context);\n }\n }\n if (this.isStroke()) {\n if (lineWidth > 0) {\n if (!isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = strokeOpacity;\n }\n this.stroke(context);\n }\n }\n this.afterDrawPath(context);\n };\n /**\n * @protected\n * 绘制图形的路径\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.createPath = function (context) { };\n /**\n * 绘制完成 path 后的操作\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.afterDrawPath = function (context) { };\n ShapeBase.prototype.isInShape = function (refX, refY) {\n // return HitUtil.isHitShape(this, refX, refY);\n var isStroke = this.isStroke();\n var isFill = this.isFill();\n var lineWidth = this.getHitLineWidth();\n return this.isInStrokeOrPath(refX, refY, isStroke, isFill, lineWidth);\n };\n // 之所以不拆成 isInStroke 和 isInPath 在于两者存在一些共同的计算\n ShapeBase.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n return false;\n };\n /**\n * 获取线拾取的宽度\n * @returns {number} 线的拾取宽度\n */\n ShapeBase.prototype.getHitLineWidth = function () {\n if (!this.isStroke()) {\n return 0;\n }\n var attrs = this.attrs;\n return attrs['lineWidth'] + attrs['lineAppendWidth'];\n };\n return ShapeBase;\n}(AbstractShape));\nexport default ShapeBase;\n//# sourceMappingURL=base.js.map","/**\n * @fileoverview 圆\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { distance } from '../util/util';\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Circle.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, r: 0 });\n };\n Circle.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n var halfLineWidth = lineWidth / 2;\n var absDistance = distance(cx, cy, x, y);\n // 直接用距离,如果同时存在边和填充时,可以减少两次计算\n if (isFill && isStroke) {\n return absDistance <= r + halfLineWidth;\n }\n if (isFill) {\n return absDistance <= r;\n }\n if (isStroke) {\n return absDistance >= r - halfLineWidth && absDistance <= r + halfLineWidth;\n }\n return false;\n };\n Circle.prototype.createPath = function (context) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n context.beginPath();\n context.arc(cx, cy, r, 0, Math.PI * 2, false);\n context.closePath();\n };\n return Circle;\n}(ShapeBase));\nexport default Circle;\n//# sourceMappingURL=circle.js.map","/**\n * @fileoverview 椭圆\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\n// 根据椭圆公式计算 x*x/rx*rx + y*y/ry*ry;\nfunction ellipseDistance(squareX, squareY, rx, ry) {\n return squareX / (rx * rx) + squareY / (ry * ry);\n}\nvar Ellipse = /** @class */ (function (_super) {\n __extends(Ellipse, _super);\n function Ellipse() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Ellipse.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, rx: 0, ry: 0 });\n };\n Ellipse.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var halfLineWith = lineWidth / 2;\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx, ry = attrs.ry;\n var squareX = (x - cx) * (x - cx);\n var squareY = (y - cy) * (y - cy);\n // 使用椭圆的公式: x*x/rx*rx + y*y/ry*ry = 1;\n if (isFill && isStroke) {\n return ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1;\n }\n if (isFill) {\n return ellipseDistance(squareX, squareY, rx, ry) <= 1;\n }\n if (isStroke) {\n return (ellipseDistance(squareX, squareY, rx - halfLineWith, ry - halfLineWith) >= 1 &&\n ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1);\n }\n return false;\n };\n Ellipse.prototype.createPath = function (context) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx;\n var ry = attrs.ry;\n context.beginPath();\n // 兼容逻辑\n if (context.ellipse) {\n context.ellipse(cx, cy, rx, ry, 0, 0, Math.PI * 2, false);\n }\n else {\n // 如果不支持,则使用圆来绘制,进行变形\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.save();\n context.translate(cx, cy);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, 0, Math.PI * 2);\n context.restore();\n context.closePath();\n }\n };\n return Ellipse;\n}(ShapeBase));\nexport default Ellipse;\n//# sourceMappingURL=ellipse.js.map","/**\n * @fileoverview 图片\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { isString, isNil } from '../util/util';\nfunction isCanvas(dom) {\n return dom instanceof HTMLElement && isString(dom.nodeName) && dom.nodeName.toUpperCase() === 'CANVAS';\n}\nvar ImageShape = /** @class */ (function (_super) {\n __extends(ImageShape, _super);\n function ImageShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImageShape.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0 });\n };\n ImageShape.prototype.initAttrs = function (attrs) {\n this._setImage(attrs.img);\n };\n // image 不计算 stroke\n ImageShape.prototype.isStroke = function () {\n return false;\n };\n // 仅仅使用包围盒检测来进行拾取\n // 所以不需要复写 isInStrokeOrPath 的方法\n ImageShape.prototype.isOnlyHitBox = function () {\n return true;\n };\n ImageShape.prototype._afterLoading = function () {\n if (this.get('toDraw') === true) {\n var canvas = this.get('canvas');\n if (canvas) {\n // 这段应该改成局部渲染\n canvas.draw();\n }\n else {\n // 这种方式如果发生遮挡会出现问题\n this.createPath(this.get('context'));\n }\n }\n };\n ImageShape.prototype._setImage = function (img) {\n var _this = this;\n var attrs = this.attrs;\n if (isString(img)) {\n var image_1 = new Image();\n image_1.onload = function () {\n // 图片未加载完,则已经被销毁\n if (_this.destroyed) {\n return false;\n }\n // 缓存原始地址,可以做对比,防止重复加载图片\n // 如果考虑到在加载过程中可能替换 img 属性,则情况更加复杂\n // this.set('imgSrc', img);\n // 这里会循环调用 _setImage 方法,但不会再走这个分支\n _this.attr('img', image_1);\n _this.set('loading', false);\n _this._afterLoading();\n var callback = _this.get('callback');\n if (callback) {\n callback.call(_this);\n }\n };\n // 设置跨域\n image_1.crossOrigin = 'Anonymous';\n image_1.src = img;\n // loading 过程中不绘制\n this.set('loading', true);\n }\n else if (img instanceof Image) {\n // 如果是一个 image 对象,则设置宽高\n if (!attrs.width) {\n attrs.width = img.width;\n }\n if (!attrs.height) {\n attrs.height = img.height;\n }\n }\n else if (isCanvas(img)) {\n // 如果设置了 canvas 对象\n if (!attrs.width) {\n attrs.width = Number(img.getAttribute('width'));\n }\n if (!attrs.height) {\n attrs.height, Number(img.getAttribute('height'));\n }\n }\n };\n ImageShape.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n // 如果加载的已经是当前图片,则不再处理\n if (name === 'img') {\n // 可以加缓冲,&& this.get('imgSrc') !== value\n this._setImage(value);\n }\n };\n ImageShape.prototype.createPath = function (context) {\n // 正在加载则不绘制\n if (this.get('loading')) {\n this.set('toDraw', true); // 加载完成后绘制\n this.set('context', context);\n return;\n }\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y, width = attrs.width, height = attrs.height, sx = attrs.sx, sy = attrs.sy, swidth = attrs.swidth, sheight = attrs.sheight;\n var img = attrs.img;\n if (img instanceof Image || isCanvas(img)) {\n if (!isNil(sx) && !isNil(sy) && !isNil(swidth) && !isNil(sheight)) {\n context.drawImage(img, sx, sy, swidth, sheight, x, y, width, height);\n }\n else {\n context.drawImage(img, x, y, width, height);\n }\n }\n };\n return ImageShape;\n}(ShapeBase));\nexport default ImageShape;\n//# sourceMappingURL=image.js.map","import { Line as LineUtil } from '@antv/g-math';\nexport default function inLine(x1, y1, x2, y2, lineWidth, x, y) {\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n var halfWidth = lineWidth / 2;\n // 因为目前的方案是计算点到直线的距离,而有可能会在延长线上,所以要先判断是否在包围盒内\n // 这种方案会在水平或者竖直的情况下载线的延长线上有半 lineWidth 的误差\n if (!(x >= minX - halfWidth && x <= maxX + halfWidth && y >= minY - halfWidth && y <= maxY + halfWidth)) {\n return false;\n }\n // 因为已经计算了包围盒,所以仅需要计算到直线的距离即可,可以显著提升性能\n return LineUtil.pointToLine(x1, y1, x2, y2, x, y) <= lineWidth / 2;\n}\n//# sourceMappingURL=line.js.map","import { __assign, __extends } from \"tslib\";\n/**\n * @fileoverview 线\n * @author dxq613@gmail.com\n */\nimport { Line as LineUtil } from '@antv/g-math';\nimport ShapeBase from './base';\nimport inLine from '../util/in-stroke/line';\nimport * as ArrowUtil from '../util/arrow';\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n function Line() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Line.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x1: 0, y1: 0, x2: 0, y2: 0, startArrow: false, endArrow: false });\n };\n Line.prototype.initAttrs = function (attrs) {\n this.setArrow();\n };\n // 更新属性时,检测是否更改了箭头\n Line.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n // 由于箭头的绘制依赖于 line 的诸多 attrs,因此这里不再对每个 attr 进行判断,attr 每次变化都会影响箭头的更新\n this.setArrow();\n };\n Line.prototype.setArrow = function () {\n var attrs = this.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (startArrow) {\n ArrowUtil.addStartArrow(this, attrs, x2, y2, x1, y1);\n }\n if (endArrow) {\n ArrowUtil.addEndArrow(this, attrs, x1, y1, x2, y2);\n }\n };\n Line.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n if (!isStroke || !lineWidth) {\n return false;\n }\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return inLine(x1, y1, x2, y2, lineWidth, x, y);\n };\n Line.prototype.createPath = function (context) {\n var attrs = this.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n var startArrowDistance = {\n dx: 0,\n dy: 0,\n };\n var endArrowDistance = {\n dx: 0,\n dy: 0,\n };\n if (startArrow && startArrow.d) {\n startArrowDistance = ArrowUtil.getShortenOffset(x1, y1, x2, y2, attrs.startArrow.d);\n }\n if (endArrow && endArrow.d) {\n endArrowDistance = ArrowUtil.getShortenOffset(x1, y1, x2, y2, attrs.endArrow.d);\n }\n context.beginPath();\n // 如果自定义箭头,线条相应缩进\n context.moveTo(x1 + startArrowDistance.dx, y1 + startArrowDistance.dy);\n context.lineTo(x2 - endArrowDistance.dx, y2 - endArrowDistance.dy);\n };\n Line.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get length of line\n * @return {number} length\n */\n Line.prototype.getTotalLength = function () {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.length(x1, y1, x2, y2);\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Line.prototype.getPoint = function (ratio) {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.pointAt(x1, y1, x2, y2, ratio);\n };\n return Line;\n}(ShapeBase));\nexport default Line;\n//# sourceMappingURL=line.js.map","/**\n * @fileoverview Marker\n * @author dxq613@gmail.com\n */\nimport { __extends } from \"tslib\";\nimport { isNil } from '@antv/util';\nimport { path2Absolute } from '@antv/path-util';\nimport ShapeBase from './base';\nimport { isFunction } from '../util/util';\nimport { drawPath } from '../util/draw';\nvar Symbols = {\n // 圆\n circle: function (x, y, r) {\n return [\n ['M', x - r, y],\n ['A', r, r, 0, 1, 0, x + r, y],\n ['A', r, r, 0, 1, 0, x - r, y],\n ];\n },\n // 正方形\n square: function (x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function (x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['Z']];\n },\n // 倒三角形\n 'triangle-down': function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n },\n};\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Marker.prototype.initAttrs = function (attrs) {\n this._resetParamsCache();\n };\n // 重置绘制 path 存储的缓存\n Marker.prototype._resetParamsCache = function () {\n // 为了加速 path 的绘制、拾取和计算,这个地方可以缓存很多东西\n // 这些缓存都是第一次需要时计算和存储,虽然增加了复杂度,但是频繁调用的方法,性能有很大提升\n this.set('paramsCache', {}); // 清理缓存\n };\n // 更新属性时,检测是否更改了 path\n Marker.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (['symbol', 'x', 'y', 'r', 'radius'].indexOf(name) !== -1) {\n // path 相关属性更改时,清理缓存\n this._resetParamsCache();\n }\n };\n // 仅仅使用包围盒检测来进行拾取\n // 所以不需要复写 isInStrokeOrPath 的方法\n Marker.prototype.isOnlyHitBox = function () {\n return true;\n };\n Marker.prototype._getR = function (attrs) {\n // 兼容 r 和 radius 两种写法,推荐使用 r\n return isNil(attrs.r) ? attrs.radius : attrs.r;\n };\n Marker.prototype._getPath = function () {\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y;\n var symbol = attrs.symbol || 'circle';\n var r = this._getR(attrs);\n var method;\n var path;\n if (isFunction(symbol)) {\n method = symbol;\n path = method(x, y, r);\n // 将 path 转成绝对路径\n path = path2Absolute(path);\n }\n else {\n // 内置 symbol 的 path 都是绝对路径,直接绘制即可,不需要对 path 进行特殊处理\n method = Marker.Symbols[symbol];\n if (!method) {\n console.warn(symbol + \" marker is not supported.\");\n return null;\n }\n path = method(x, y, r);\n }\n return path;\n };\n Marker.prototype.createPath = function (context) {\n var path = this._getPath();\n var paramsCache = this.get('paramsCache');\n drawPath(this, context, { path: path }, paramsCache);\n };\n Marker.Symbols = Symbols;\n return Marker;\n}(ShapeBase));\nexport default Marker;\n//# sourceMappingURL=marker.js.map","import { getOffScreenContext } from '@antv/g-base';\nexport default function isPointInPath(shape, x, y) {\n var ctx = getOffScreenContext();\n shape.createPath(ctx);\n return ctx.isPointInPath(x, y);\n}\n//# sourceMappingURL=point-in-path.js.map","/**\n * @fileoverview 判断点是否在多边形内\n * @author dxq613@gmail.com\n */\n// 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526\nvar tolerance = 1e-6;\n// 三态函数,判断两个double在eps精度下的大小关系\nfunction dcmp(x) {\n if (Math.abs(x) < tolerance) {\n return 0;\n }\n return x < 0 ? -1 : 1;\n}\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) &&\n Math.min(p1[0], p2[0]) <= q[0] &&\n q[0] <= Math.max(p1[0], p2[0]) &&\n Math.min(p1[1], p2[1]) <= q[1] &&\n q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n// 判断点P在多边形内-射线法\nexport default function isInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 &&\n dcmp(x - ((y - p1[1]) * (p1[0] - p2[0])) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n}\n//# sourceMappingURL=polygon.js.map","import { distance } from '../util';\nexport default function arc(cx, cy, r, startAngle, endAngle, lineWidth, x, y) {\n var angle = (Math.atan2(y - cy, x - cx) + Math.PI * 2) % (Math.PI * 2); // 转换到 0 - 2 * Math.PI 之间\n if (angle < startAngle || angle > endAngle) {\n return false;\n }\n var point = {\n x: cx + r * Math.cos(angle),\n y: cy + r * Math.sin(angle),\n };\n return distance(point.x, point.y, x, y) <= lineWidth / 2;\n}\n//# sourceMappingURL=arc.js.map","import { __assign } from \"tslib\";\n/**\n * @fileoverview path 的一些工具\n * @author dxq613@gmail.com\n */\nimport { PathUtil } from '@antv/g-base';\nimport { Quad as QuadUtil } from '@antv/g-math';\nimport { Cubic as CubicUtil } from '@antv/g-math';\nimport { ext } from '@antv/matrix-util';\nimport * as vec3 from 'gl-matrix/vec3';\nimport { inBox } from './util';\nimport inLine from './in-stroke/line';\nimport inArc from './in-stroke/arc';\nvar transform = ext.transform;\nfunction hasArc(path) {\n var hasArc = false;\n var count = path.length;\n for (var i = 0; i < count; i++) {\n var params = path[i];\n var cmd = params[0];\n if (cmd === 'C' || cmd === 'A' || cmd === 'Q') {\n hasArc = true;\n break;\n }\n }\n return hasArc;\n}\nfunction isPointInStroke(segments, lineWidth, x, y, length) {\n var isHit = false;\n var halfWidth = lineWidth / 2;\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n var currentPoint = segment.currentPoint, params = segment.params, prePoint = segment.prePoint, box = segment.box;\n // 如果在前面已经生成过包围盒,直接按照包围盒计算\n if (box && !inBox(box.x - halfWidth, box.y - halfWidth, box.width + lineWidth, box.height + lineWidth, x, y)) {\n continue;\n }\n switch (segment.command) {\n // L 和 Z 都是直线, M 不进行拾取\n case 'L':\n case 'Z':\n isHit = inLine(prePoint[0], prePoint[1], currentPoint[0], currentPoint[1], lineWidth, x, y);\n break;\n case 'Q':\n var qDistance = QuadUtil.pointDistance(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], x, y);\n isHit = qDistance <= lineWidth / 2;\n break;\n case 'C':\n var cDistance = CubicUtil.pointDistance(prePoint[0], // 上一段结束位置, 即 C 的起始点\n prePoint[1], params[1], // 'C' 的参数,1、2 为第一个控制点,3、4 为第二个控制点,5、6 为结束点\n params[2], params[3], params[4], params[5], params[6], x, y, length);\n isHit = cDistance <= lineWidth / 2;\n break;\n case 'A':\n // 计算点到椭圆圆弧的距离,暂时使用近似算法,后面可以改成切割法求最近距离\n var arcParams = segment.arcParams;\n var cx = arcParams.cx, cy = arcParams.cy, rx = arcParams.rx, ry = arcParams.ry, startAngle = arcParams.startAngle, endAngle = arcParams.endAngle, xRotation = arcParams.xRotation;\n var p = [x, y, 1];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n var m = transform(null, [\n ['t', -cx, -cy],\n ['r', -xRotation],\n ['s', 1 / scaleX, 1 / scaleY],\n ]);\n vec3.transformMat3(p, p, m);\n isHit = inArc(0, 0, r, startAngle, endAngle, lineWidth, p[0], p[1]);\n break;\n default:\n break;\n }\n if (isHit) {\n break;\n }\n }\n return isHit;\n}\n/**\n * 提取出内部的闭合多边形和非闭合的多边形,假设 path 不存在圆弧\n * @param {Array} path 路径\n * @returns {Array} 点的集合\n */\nfunction extractPolygons(path) {\n var count = path.length;\n var polygons = [];\n var polylines = [];\n var points = []; // 防止第一个命令不是 'M'\n for (var i = 0; i < count; i++) {\n var params = path[i];\n var cmd = params[0];\n if (cmd === 'M') {\n // 遇到 'M' 判定是否是新数组,新数组中没有点\n if (points.length) {\n // 如果存在点,则说明没有遇到 'Z',开始了一个新的多边形\n polylines.push(points);\n points = []; // 创建新的点\n }\n points.push([params[1], params[2]]);\n }\n else if (cmd === 'Z') {\n if (points.length) {\n // 存在点\n polygons.push(points);\n points = []; // 开始新的点集合\n }\n // 如果不存在点,同时 'Z',则说明是错误,不处理\n }\n else {\n points.push([params[1], params[2]]);\n }\n }\n // 说明 points 未放入 polygons 或者 polyline\n // 仅当只有一个 M,没有 Z 时会发生这种情况\n if (points.length > 0) {\n polylines.push(points);\n }\n return {\n polygons: polygons,\n polylines: polylines,\n };\n}\nexport default __assign({ hasArc: hasArc,\n extractPolygons: extractPolygons,\n isPointInStroke: isPointInStroke }, PathUtil);\n//# sourceMappingURL=path.js.map","import { __assign, __extends } from \"tslib\";\nimport { Cubic as CubicUtil } from '@antv/g-math';\nimport { each, isNil } from '@antv/util';\nimport ShapeBase from './base';\nimport { path2Absolute, path2Segments } from '@antv/path-util';\nimport { drawPath } from '../util/draw';\nimport isPointInPath from '../util/in-path/point-in-path';\nimport isInPolygon from '../util/in-path/polygon';\nimport PathUtil from '../util/path';\nimport * as ArrowUtil from '../util/arrow';\n// 是否在多个多边形内部\nfunction isInPolygons(polygons, x, y) {\n var isHit = false;\n for (var i = 0; i < polygons.length; i++) {\n var points = polygons[i];\n isHit = isInPolygon(points, x, y);\n if (isHit) {\n break;\n }\n }\n return isHit;\n}\nvar Path = /** @class */ (function (_super) {\n __extends(Path, _super);\n function Path() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Path.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n Path.prototype.initAttrs = function (attrs) {\n this._setPathArr(attrs.path);\n this.setArrow();\n };\n // 更新属性时,检测是否更改了 path\n Path.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name === 'path') {\n this._setPathArr(value);\n }\n // 由于箭头的绘制依赖于 line 的诸多 attrs,因此这里不再对每个 attr 进行判断,attr 每次变化都会影响箭头的更新\n this.setArrow();\n };\n // 将 path 转换成绝对路径\n Path.prototype._setPathArr = function (path) {\n // 转换 path 的格式\n this.attrs.path = path2Absolute(path);\n var hasArc = PathUtil.hasArc(path);\n // 为了加速 path 的绘制、拾取和计算,这个地方可以缓存很多东西\n // 这些缓存都是第一次需要时计算和存储,虽然增加了复杂度,但是频繁调用的方法,性能有很大提升\n this.set('hasArc', hasArc);\n this.set('paramsCache', {}); // 清理缓存\n this.set('segments', null); // 延迟生成 path,在动画场景下可能不会有拾取\n this.set('curve', null);\n this.set('tCache', null);\n this.set('totalLength', null);\n };\n Path.prototype.getSegments = function () {\n var segments = this.get('segements');\n if (!segments) {\n segments = path2Segments(this.attr('path'));\n this.set('segments', segments);\n }\n return segments;\n };\n Path.prototype.setArrow = function () {\n var attrs = this.attr();\n var startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (startArrow) {\n var tangent = this.getStartTangent();\n ArrowUtil.addStartArrow(this, attrs, tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1]);\n }\n if (endArrow) {\n var tangent = this.getEndTangent();\n ArrowUtil.addEndArrow(this, attrs, tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1]);\n }\n };\n Path.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var segments = this.getSegments();\n var hasArc = this.get('hasArc');\n var isHit = false;\n if (isStroke) {\n var length_1 = this.getTotalLength();\n isHit = PathUtil.isPointInStroke(segments, lineWidth, x, y, length_1);\n }\n if (!isHit && isFill) {\n if (hasArc) {\n // 存在曲线时,暂时使用 canvas 的 api 计算,后续可以进行多边形切割\n isHit = isPointInPath(this, x, y);\n }\n else {\n var path = this.attr('path');\n var extractResutl = PathUtil.extractPolygons(path);\n // 提取出来的多边形包含闭合的和非闭合的,在这里统一按照多边形处理\n isHit = isInPolygons(extractResutl.polygons, x, y) || isInPolygons(extractResutl.polylines, x, y);\n }\n }\n return isHit;\n };\n Path.prototype.createPath = function (context) {\n var attrs = this.attr();\n var paramsCache = this.get('paramsCache'); // 由于计算圆弧的参数成本很大,所以要缓存\n drawPath(this, context, attrs, paramsCache);\n };\n Path.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get total length of path\n * @return {number} length\n */\n Path.prototype.getTotalLength = function () {\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this._calculateCurve();\n this._setTcache();\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Path.prototype.getPoint = function (ratio) {\n var tCache = this.get('tCache');\n if (!tCache) {\n this._calculateCurve();\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n var curve = this.get('curve');\n if (!tCache || tCache.length === 0) {\n if (curve) {\n return {\n x: curve[0][1],\n y: curve[0][2],\n };\n }\n return null;\n }\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n var seg = curve[index];\n if (isNil(seg) || isNil(index)) {\n return null;\n }\n var l = seg.length;\n var nextSeg = curve[index + 1];\n return CubicUtil.pointAt(seg[l - 2], seg[l - 1], nextSeg[1], nextSeg[2], nextSeg[3], nextSeg[4], nextSeg[5], nextSeg[6], subt);\n };\n Path.prototype._calculateCurve = function () {\n var path = this.attr().path;\n this.set('curve', PathUtil.pathToCurve(path));\n };\n Path.prototype._setTcache = function () {\n var totalLength = 0;\n var tempLength = 0;\n // 每段 curve 对应起止点的长度比例列表,形如: [[0, 0.25], [0.25, 0.6]. [0.6, 0.9], [0.9, 1]]\n var tCache = [];\n var segmentT;\n var segmentL;\n var segmentN;\n var l;\n var curve = this.get('curve');\n if (!curve) {\n return;\n }\n each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n if (segmentN) {\n totalLength +=\n CubicUtil.length(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]) || 0;\n }\n });\n this.set('totalLength', totalLength);\n if (totalLength === 0) {\n this.set('tCache', []);\n return;\n }\n each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n if (segmentN) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = CubicUtil.length(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]);\n // 当 path 不连续时,segmentL 可能为空,为空时需要作为 0 处理\n tempLength += segmentL || 0;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n Path.prototype.getStartTangent = function () {\n var segments = this.getSegments();\n var result;\n if (segments.length > 1) {\n var startPoint = segments[0].currentPoint;\n var endPoint = segments[1].currentPoint;\n var tangent = segments[1].startTangent;\n result = [];\n if (tangent) {\n result.push([startPoint[0] - tangent[0], startPoint[1] - tangent[1]]);\n result.push([startPoint[0], startPoint[1]]);\n }\n else {\n result.push([endPoint[0], endPoint[1]]);\n result.push([startPoint[0], startPoint[1]]);\n }\n }\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n Path.prototype.getEndTangent = function () {\n var segments = this.getSegments();\n var length = segments.length;\n var result;\n if (length > 1) {\n var startPoint = segments[length - 2].currentPoint;\n var endPoint = segments[length - 1].currentPoint;\n var tangent = segments[length - 1].endTangent;\n result = [];\n if (tangent) {\n result.push([endPoint[0] - tangent[0], endPoint[1] - tangent[1]]);\n result.push([endPoint[0], endPoint[1]]);\n }\n else {\n result.push([startPoint[0], startPoint[1]]);\n result.push([endPoint[0], endPoint[1]]);\n }\n }\n return result;\n };\n return Path;\n}(ShapeBase));\nexport default Path;\n//# sourceMappingURL=path.js.map","import inLine from './line';\nexport default function inPolyline(points, lineWidth, x, y, isClose) {\n var count = points.length;\n if (count < 2) {\n return false;\n }\n for (var i = 0; i < count - 1; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var x2 = points[i + 1][0];\n var y2 = points[i + 1][1];\n if (inLine(x1, y1, x2, y2, lineWidth, x, y)) {\n return true;\n }\n }\n // 如果封闭,则计算起始点和结束点的边\n if (isClose) {\n var first = points[0];\n var last = points[count - 1];\n if (inLine(first[0], first[1], last[0], last[1], lineWidth, x, y)) {\n return true;\n }\n }\n return false;\n}\n//# sourceMappingURL=polyline.js.map","/**\n * @fileoverview 多边形\n * @author dxq613@gmail.com\n */\nimport { __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport inPolyline from '../util/in-stroke/polyline';\nimport isInPolygon from '../util/in-path/polygon';\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Polygon.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var points = this.attr().points;\n var isHit = false;\n if (isStroke) {\n isHit = inPolyline(points, lineWidth, x, y, true);\n }\n if (!isHit && isFill) {\n isHit = isInPolygon(points, x, y); // isPointInPath(shape, x, y);\n }\n return isHit;\n };\n Polygon.prototype.createPath = function (context) {\n var attrs = this.attr();\n var points = attrs.points;\n if (points.length < 2) {\n return;\n }\n context.beginPath();\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n if (i === 0) {\n context.moveTo(point[0], point[1]);\n }\n else {\n context.lineTo(point[0], point[1]);\n }\n }\n context.closePath();\n };\n return Polygon;\n}(ShapeBase));\nexport default Polygon;\n//# sourceMappingURL=polygon.js.map","import { __assign, __extends } from \"tslib\";\nimport { Line as LineUtil } from '@antv/g-math';\nimport { Polyline as PolylineUtil } from '@antv/g-math';\nimport { each, isNil } from '@antv/util';\nimport ShapeBase from './base';\nimport inPolyline from '../util/in-stroke/polyline';\nimport * as ArrowUtil from '../util/arrow';\nvar PolyLine = /** @class */ (function (_super) {\n __extends(PolyLine, _super);\n function PolyLine() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolyLine.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n PolyLine.prototype.initAttrs = function (attrs) {\n this.setArrow();\n };\n // 更新属性时,检测是否更改了 points\n PolyLine.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n this.setArrow();\n if (['points'].indexOf(name) !== -1) {\n this._resetCache();\n }\n };\n PolyLine.prototype._resetCache = function () {\n this.set('totalLength', null);\n this.set('tCache', null);\n };\n PolyLine.prototype.setArrow = function () {\n var attrs = this.attr();\n var _a = this.attrs, points = _a.points, startArrow = _a.startArrow, endArrow = _a.endArrow;\n var length = points.length;\n var x1 = points[0][0];\n var y1 = points[0][1];\n var x2 = points[length - 1][0];\n var y2 = points[length - 1][1];\n if (startArrow) {\n ArrowUtil.addStartArrow(this, attrs, points[1][0], points[1][1], x1, y1);\n }\n if (endArrow) {\n ArrowUtil.addEndArrow(this, attrs, points[length - 2][0], points[length - 2][1], x2, y2);\n }\n };\n // 不允许 fill\n PolyLine.prototype.isFill = function () {\n return false;\n };\n PolyLine.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n // 没有设置 stroke 不能被拾取, 没有线宽不能被拾取\n if (!isStroke || !lineWidth) {\n return false;\n }\n var points = this.attr().points;\n return inPolyline(points, lineWidth, x, y, false);\n };\n // 始终填充\n PolyLine.prototype.isStroke = function () {\n return true;\n };\n PolyLine.prototype.createPath = function (context) {\n var _a = this.attr(), points = _a.points, startArrow = _a.startArrow, endArrow = _a.endArrow;\n var length = points.length;\n if (points.length < 2) {\n return;\n }\n var x1 = points[0][0];\n var y1 = points[0][1];\n var x2 = points[length - 1][0];\n var y2 = points[length - 1][1];\n // 如果定义了箭头,并且是自定义箭头,线条相应缩进\n if (startArrow && startArrow.d) {\n var distance = ArrowUtil.getShortenOffset(x1, y1, points[1][0], points[1][1], startArrow.d);\n x1 += distance.dx;\n y1 += distance.dy;\n }\n if (endArrow && endArrow.d) {\n var distance = ArrowUtil.getShortenOffset(points[length - 2][0], points[length - 2][1], x2, y2, endArrow.d);\n x2 -= distance.dx;\n y2 -= distance.dy;\n }\n context.beginPath();\n context.moveTo(x1, y1);\n for (var i = 0; i < length - 1; i++) {\n var point = points[i];\n context.lineTo(point[0], point[1]);\n }\n context.lineTo(x2, y2);\n };\n PolyLine.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get length of polyline\n * @return {number} length\n */\n PolyLine.prototype.getTotalLength = function () {\n var points = this.attr().points;\n // get totalLength from cache\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this.set('totalLength', PolylineUtil.length(points));\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n PolyLine.prototype.getPoint = function (ratio) {\n var points = this.attr().points;\n // get tCache from cache\n var tCache = this.get('tCache');\n if (!tCache) {\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n return LineUtil.pointAt(points[index][0], points[index][1], points[index + 1][0], points[index + 1][1], subt);\n };\n PolyLine.prototype._setTcache = function () {\n var points = this.attr().points;\n if (!points || points.length === 0) {\n return;\n }\n var totalLength = this.getTotalLength();\n if (totalLength <= 0) {\n return;\n }\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n each(points, function (p, i) {\n if (points[i + 1]) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = LineUtil.length(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n PolyLine.prototype.getStartTangent = function () {\n var points = this.attr().points;\n var result = [];\n result.push([points[1][0], points[1][1]]);\n result.push([points[0][0], points[0][1]]);\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n PolyLine.prototype.getEndTangent = function () {\n var points = this.attr().points;\n var l = points.length - 1;\n var result = [];\n result.push([points[l - 1][0], points[l - 1][1]]);\n result.push([points[l][0], points[l][1]]);\n return result;\n };\n return PolyLine;\n}(ShapeBase));\nexport default PolyLine;\n//# sourceMappingURL=polyline.js.map","import { inBox } from '../util';\nexport default function inRect(minX, minY, width, height, lineWidth, x, y) {\n var halfWidth = lineWidth / 2;\n // 将四个边看做矩形来检测,比边的检测算法要快\n return (inBox(minX - halfWidth, minY - halfWidth, width, lineWidth, x, y) || // 上边\n inBox(minX + width - halfWidth, minY - halfWidth, lineWidth, height, x, y) || // 右边\n inBox(minX + halfWidth, minY + height - halfWidth, width, lineWidth, x, y) || // 下边\n inBox(minX - halfWidth, minY + halfWidth, lineWidth, height, x, y)); // 左边\n}\n//# sourceMappingURL=rect.js.map","import inLine from './line';\nimport inArc from './arc';\nexport default function rectWithRadius(minX, minY, width, height, radius, lineWidth, x, y) {\n var halfWidth = lineWidth / 2;\n return (inLine(minX + radius, minY, minX + width - radius, minY, lineWidth, x, y) ||\n inLine(minX + width, minY + radius, minX + width, minY + height - radius, lineWidth, x, y) ||\n inLine(minX + width - radius, minY + height, minX + radius, minY + height, lineWidth, x, y) ||\n inLine(minX, minY + height - radius, minX, minY + radius, lineWidth, x, y) ||\n inArc(minX + width - radius, minY + radius, radius, 1.5 * Math.PI, 2 * Math.PI, lineWidth, x, y) ||\n inArc(minX + width - radius, minY + height - radius, radius, 0, 0.5 * Math.PI, lineWidth, x, y) ||\n inArc(minX + radius, minY + height - radius, radius, 0.5 * Math.PI, Math.PI, lineWidth, x, y) ||\n inArc(minX + radius, minY + radius, radius, Math.PI, 1.5 * Math.PI, lineWidth, x, y));\n}\n//# sourceMappingURL=rect-radius.js.map","/**\n * @fileoverview 矩形\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { parseRadius } from '../util/parse';\nimport { inBox } from '../util/util';\nimport inRect from '../util/in-stroke/rect';\nimport inRectWithRadius from '../util/in-stroke/rect-radius';\nimport isPointInPath from '../util/in-path/point-in-path';\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n function Rect() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Rect.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0, radius: 0 });\n };\n Rect.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var minX = attrs.x;\n var minY = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var radius = attrs.radius;\n // 无圆角时的策略\n if (!radius) {\n var halfWidth = lineWidth / 2;\n // 同时填充和带有边框\n if (isFill && isStroke) {\n return inBox(minX - halfWidth, minY - halfWidth, width + halfWidth, height + halfWidth, x, y);\n }\n // 仅填充\n if (isFill) {\n return inBox(minX, minY, width, height, x, y);\n }\n if (isStroke) {\n return inRect(minX, minY, width, height, lineWidth, x, y);\n }\n }\n else {\n var isHit = false;\n if (isStroke) {\n isHit = inRectWithRadius(minX, minY, width, height, radius, lineWidth, x, y);\n }\n // 仅填充时带有圆角的矩形直接通过图形拾取\n // 以后可以改成纯数学的近似拾取,将圆弧切割成多边形\n if (!isHit && isFill) {\n isHit = isPointInPath(this, x, y);\n }\n return isHit;\n }\n };\n Rect.prototype.createPath = function (context) {\n var attrs = this.attr();\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var radius = attrs.radius;\n context.beginPath();\n if (radius === 0) {\n // 改成原生的rect方法\n context.rect(x, y, width, height);\n }\n else {\n var _a = parseRadius(radius), r1 = _a[0], r2 = _a[1], r3 = _a[2], r4 = _a[3];\n context.moveTo(x + r1, y);\n context.lineTo(x + width - r2, y);\n r2 !== 0 && context.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);\n context.lineTo(x + width, y + height - r3);\n r3 !== 0 && context.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);\n context.lineTo(x + r4, y + height);\n r4 !== 0 && context.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);\n context.lineTo(x, y + r1);\n r1 !== 0 && context.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);\n context.closePath();\n }\n };\n return Rect;\n}(ShapeBase));\nexport default Rect;\n//# sourceMappingURL=rect.js.map","/**\n * @fileoverview 文本\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { isNil, isString, each } from '../util/util';\nimport { getTextHeight, assembleFont } from '@antv/g-base';\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // 默认文本属性\n Text.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, text: null, fontSize: 12, fontFamily: 'sans-serif', fontStyle: 'normal', fontWeight: 'normal', fontVariant: 'normal', textAlign: 'start', textBaseline: 'bottom' });\n };\n // 仅仅使用包围盒检测来进行拾取\n Text.prototype.isOnlyHitBox = function () {\n return true;\n };\n // 初始化时组合 font,同时判断 text 是否换行\n Text.prototype.initAttrs = function (attrs) {\n this._assembleFont();\n if (attrs.text) {\n this._setText(attrs.text);\n }\n };\n // 组装字体\n Text.prototype._assembleFont = function () {\n var attrs = this.attrs;\n attrs.font = assembleFont(attrs);\n };\n // 如果文本换行,则缓存数组\n Text.prototype._setText = function (text) {\n var textArr = null;\n if (isString(text) && text.indexOf('\\n') !== -1) {\n textArr = text.split('\\n');\n }\n this.set('textArr', textArr);\n };\n // 更新属性时,检测是否更改了 font、text\n Text.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name.startsWith('font')) {\n this._assembleFont();\n }\n if (name === 'text') {\n this._setText(value);\n }\n };\n // 这个方法在 text 时没有可以做的事情,如果要支持文字背景时可以考虑\n // createPath(context) {\n // }\n // 如果文本多行,需要获取文本间距\n Text.prototype._getSpaceingY = function () {\n var attrs = this.attrs;\n var lineHeight = attrs.lineHeight;\n var fontSize = attrs.fontSize * 1;\n return lineHeight ? lineHeight - fontSize : fontSize * 0.14;\n };\n // 绘制文本,考虑多行的场景\n Text.prototype._drawTextArr = function (context, textArr, isFill) {\n var attrs = this.attrs;\n var textBaseline = attrs.textBaseline;\n var x = attrs.x;\n var y = attrs.y;\n var fontSize = attrs.fontSize * 1;\n var spaceingY = this._getSpaceingY();\n var height = getTextHeight(attrs.text, attrs.fontSize, attrs.lineHeight);\n var subY;\n each(textArr, function (subText, index) {\n subY = y + index * (spaceingY + fontSize) - height + fontSize; // bottom;\n if (textBaseline === 'middle')\n subY += height - fontSize - (height - fontSize) / 2;\n if (textBaseline === 'top')\n subY += height - fontSize;\n if (!isNil(subText)) {\n if (isFill) {\n context.fillText(subText, x, subY);\n }\n else {\n context.strokeText(subText, x, subY);\n }\n }\n });\n };\n // 绘制文本,同时考虑填充和绘制边框\n Text.prototype._drawText = function (context, isFill) {\n var attrs = this.attr();\n var x = attrs.x;\n var y = attrs.y;\n var textArr = this.get('textArr');\n if (textArr) {\n this._drawTextArr(context, textArr, isFill);\n }\n else {\n var text = attrs.text;\n if (!isNil(text)) {\n if (isFill) {\n context.fillText(text, x, y);\n }\n else {\n context.strokeText(text, x, y);\n }\n }\n }\n };\n // 复写绘制和填充的逻辑:对于文本,应该先绘制边框,再进行填充\n Text.prototype.strokeAndFill = function (context) {\n var _a = this.attrs, lineWidth = _a.lineWidth, opacity = _a.opacity, strokeOpacity = _a.strokeOpacity, fillOpacity = _a.fillOpacity;\n if (this.isStroke()) {\n if (lineWidth > 0) {\n if (!isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = opacity;\n }\n this.stroke(context);\n }\n }\n if (this.isFill()) {\n if (!isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n this.fill(context);\n context.globalAlpha = opacity;\n }\n else {\n this.fill(context);\n }\n }\n this.afterDrawPath(context);\n };\n // 复写填充逻辑\n Text.prototype.fill = function (context) {\n this._drawText(context, true);\n };\n // 复写绘制边框的逻辑\n Text.prototype.stroke = function (context) {\n this._drawText(context, false);\n };\n return Text;\n}(ShapeBase));\nexport default Text;\n//# sourceMappingURL=text.js.map","import { isAllowCapture, multiplyVec2, invert } from '@antv/g-base';\nfunction invertFromMatrix(v, matrix) {\n if (matrix) {\n var invertMatrix = invert(matrix);\n return multiplyVec2(invertMatrix, v);\n }\n return v;\n}\nfunction getRefXY(element, x, y) {\n // @ts-ignore\n var totalMatrix = element.getTotalMatrix();\n if (totalMatrix) {\n var _a = invertFromMatrix([x, y, 1], totalMatrix), refX = _a[0], refY = _a[1];\n return [refX, refY];\n }\n return [x, y];\n}\n// 拾取前的检测,只有通过检测才能继续拾取\nfunction preTest(element, x, y) {\n // @ts-ignore\n if (element.isCanvas && element.isCanvas()) {\n return true;\n }\n // 不允许被拾取,则返回 null\n // @ts-ignore\n if (!isAllowCapture(element) || element.cfg.isInView === false) {\n return false;\n }\n if (element.cfg.clipShape) {\n // 如果存在 clip\n var _a = getRefXY(element, x, y), refX = _a[0], refY = _a[1];\n if (element.isClipped(refX, refY)) {\n return false;\n }\n }\n // @ts-ignore ,这个地方调用过于频繁\n var bbox = element.cfg.cacheCanvasBBox || element.getCanvasBBox();\n // 如果没有缓存 bbox,则说明不可见\n // 注释掉的这段可能会加速拾取,上面的语句改写成 const bbox = element.cfg.cacheCanvasBBox;\n // 这时候的拾取假设图形/分组在上一次绘制都在视窗内,但是上面已经判定了 isInView 所以意义不大\n // 现在还调用 element.getCanvasBBox(); 一个很大的原因是便于单元测试\n // if (!bbox) {\n // return false;\n // }\n if (!(x >= bbox.minX && x <= bbox.maxX && y >= bbox.minY && y <= bbox.maxY)) {\n return false;\n }\n return true;\n}\n// 这个方法复写了 g-base 的 getShape\nexport function getShape(container, x, y) {\n // 没有通过检测,则返回 null\n if (!preTest(container, x, y)) {\n return null;\n }\n var shape = null;\n var children = container.getChildren();\n var count = children.length;\n for (var i = count - 1; i >= 0; i--) {\n var child = children[i];\n if (child.isGroup()) {\n shape = getShape(child, x, y);\n }\n else if (preTest(child, x, y)) {\n var curShape = child;\n var _a = getRefXY(child, x, y), refX = _a[0], refY = _a[1];\n // @ts-ignore\n if (curShape.isInShape(refX, refY)) {\n shape = child;\n }\n }\n if (shape) {\n break;\n }\n }\n return shape;\n}\n//# sourceMappingURL=hit.js.map","import { __extends } from \"tslib\";\nimport { AbstractCanvas } from '@antv/g-base';\nimport { getShape } from './util/hit';\nimport * as Shape from './shape';\nimport Group from './group';\nimport { each, getPixelRatio, requestAnimationFrame, clearAnimationFrame } from './util/util';\nimport { applyAttrsToContext, drawChildren, getMergedRegion, mergeView, checkRefresh, clearChanged } from './util/draw';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Canvas.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // 设置渲染引擎为 canvas,只读属性\n cfg['renderer'] = 'canvas';\n // 是否自动绘制,不需要用户调用 draw 方法\n cfg['autoDraw'] = true;\n // 是否允许局部刷新图表\n cfg['localRefresh'] = true;\n cfg['refreshElements'] = [];\n // 是否在视图内自动裁剪\n cfg['clipView'] = true;\n // 是否使用快速拾取的方案,默认为 false,上层可以打开\n cfg['quickHit'] = false;\n return cfg;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Canvas.prototype.onCanvasChange = function (changeType) {\n /**\n * 触发画布更新的三种 changeType\n * 1. attr: 修改画布的绘图属性\n * 2. sort: 画布排序,图形的层次会发生变化\n * 3. changeSize: 改变画布大小\n */\n if (changeType === 'attr' || changeType === 'sort' || changeType === 'changeSize') {\n this.set('refreshElements', [this]);\n this.draw();\n }\n };\n Canvas.prototype.getShapeBase = function () {\n return Shape;\n };\n Canvas.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 获取屏幕像素比\n */\n Canvas.prototype.getPixelRatio = function () {\n var pixelRatio = this.get('pixelRatio') || getPixelRatio();\n // 不足 1 的取 1,超出 1 的取整\n return pixelRatio >= 1 ? Math.ceil(pixelRatio) : 1;\n };\n Canvas.prototype.getViewRange = function () {\n return {\n minX: 0,\n minY: 0,\n maxX: this.cfg.width,\n maxY: this.cfg.height,\n };\n };\n // 复写基类的方法生成标签\n Canvas.prototype.createDom = function () {\n var element = document.createElement('canvas');\n var context = element.getContext('2d');\n // 缓存 context 对象\n this.set('context', context);\n return element;\n };\n Canvas.prototype.setDOMSize = function (width, height) {\n _super.prototype.setDOMSize.call(this, width, height);\n var context = this.get('context');\n var el = this.get('el');\n var pixelRatio = this.getPixelRatio();\n el.width = pixelRatio * width;\n el.height = pixelRatio * height;\n // 设置 canvas 元素的宽度和高度,会重置缩放,因此 context.scale 需要在每次设置宽、高后调用\n if (pixelRatio > 1) {\n context.scale(pixelRatio, pixelRatio);\n }\n };\n // 复写基类方法\n Canvas.prototype.clear = function () {\n _super.prototype.clear.call(this);\n this._clearFrame(); // 需要清理掉延迟绘制的帧\n var context = this.get('context');\n var element = this.get('el');\n context.clearRect(0, 0, element.width, element.height);\n };\n Canvas.prototype.getShape = function (x, y) {\n var shape;\n if (this.get('quickHit')) {\n shape = getShape(this, x, y);\n }\n else {\n shape = _super.prototype.getShape.call(this, x, y, null);\n }\n return shape;\n };\n // 对绘制区域边缘取整,避免浮点数问题\n Canvas.prototype._getRefreshRegion = function () {\n var elements = this.get('refreshElements');\n var viewRegion = this.getViewRange();\n var region;\n // 如果是当前画布整体发生了变化,则直接重绘整个画布\n if (elements.length && elements[0] === this) {\n region = viewRegion;\n }\n else {\n region = getMergedRegion(elements);\n if (region) {\n region.minX = Math.floor(region.minX);\n region.minY = Math.floor(region.minY);\n region.maxX = Math.ceil(region.maxX);\n region.maxY = Math.ceil(region.maxY);\n region.maxY += 1; // 在很多环境下字体的高低会不一致,附加一像素,避免残影\n var clipView = this.get('clipView');\n // 自动裁剪不在 view 内的区域\n if (clipView) {\n region = mergeView(region, viewRegion);\n }\n }\n }\n return region;\n };\n /**\n * 刷新图形元素,这里仅仅是放入队列,下次绘制时进行绘制\n * @param {IElement} element 图形元素\n */\n Canvas.prototype.refreshElement = function (element) {\n var refreshElements = this.get('refreshElements');\n refreshElements.push(element);\n // if (this.get('autoDraw')) {\n // this._startDraw();\n // }\n };\n // 清理还在进行的绘制\n Canvas.prototype._clearFrame = function () {\n var drawFrame = this.get('drawFrame');\n if (drawFrame) {\n // 如果全部渲染时,存在局部渲染,则抛弃掉局部渲染\n clearAnimationFrame(drawFrame);\n this.set('drawFrame', null);\n this.set('refreshElements', []);\n }\n };\n // 手工调用绘制接口\n Canvas.prototype.draw = function () {\n var drawFrame = this.get('drawFrame');\n if (this.get('autoDraw') && drawFrame) {\n return;\n }\n this._startDraw();\n };\n // 绘制所有图形\n Canvas.prototype._drawAll = function () {\n var context = this.get('context');\n var element = this.get('el');\n var children = this.getChildren();\n context.clearRect(0, 0, element.width, element.height);\n applyAttrsToContext(context, this);\n drawChildren(context, children);\n // 对于 https://github.com/antvis/g/issues/422 的场景,全局渲染的模式下也会记录更新的元素队列,因此全局渲染完后也需要置空\n this.set('refreshElements', []);\n };\n // 绘制局部\n Canvas.prototype._drawRegion = function () {\n var context = this.get('context');\n var refreshElements = this.get('refreshElements');\n var children = this.getChildren();\n var region = this._getRefreshRegion();\n // 需要注意可能没有 region 的场景\n // 一般发生在设置了 localRefresh ,在没有图形发生变化的情况下,用户调用了 draw\n if (region) {\n // 清理指定区域\n context.clearRect(region.minX, region.minY, region.maxX - region.minX, region.maxY - region.minY);\n // 保存上下文,设置 clip\n context.save();\n context.beginPath();\n context.rect(region.minX, region.minY, region.maxX - region.minX, region.maxY - region.minY);\n context.clip();\n applyAttrsToContext(context, this);\n // 确认更新的元素,这个优化可以提升 10 倍左右的性能,10W 个带有 group 的节点,局部渲染会从 90ms 下降到 5-6 ms\n checkRefresh(this, children, region);\n // 绘制子元素\n drawChildren(context, children, region);\n context.restore();\n }\n else if (refreshElements.length) {\n // 防止发生改变的 elements 没有 region 的场景,这会发生在多个情况下\n // 1. 空的 group\n // 2. 所有 elements 没有在绘图区域\n // 3. group 下面的 elements 隐藏掉\n // 如果不进行清理 hasChanged 的状态会不正确\n clearChanged(refreshElements);\n }\n each(refreshElements, function (element) {\n if (element.get('hasChanged')) {\n // 在视窗外的 Group 元素会加入到更新队列里,但实际却没有执行 draw() 逻辑,也就没有清除 hasChanged 标记\n // 即已经重绘完、但 hasChanged 标记没有清除的元素,需要统一清除掉。主要是 Group 存在问题,具体原因待排查\n element.set('hasChanged', false);\n }\n });\n this.set('refreshElements', []);\n };\n // 触发绘制\n Canvas.prototype._startDraw = function () {\n var _this = this;\n var drawFrame = this.get('drawFrame');\n if (!drawFrame) {\n drawFrame = requestAnimationFrame(function () {\n if (_this.get('localRefresh')) {\n _this._drawRegion();\n }\n else {\n _this._drawAll();\n }\n _this.set('drawFrame', null);\n });\n this.set('drawFrame', drawFrame);\n }\n };\n Canvas.prototype.skipDraw = function () { };\n Canvas.prototype.removeDom = function () {\n var el = this.get('el');\n // 需要清理 canvas 画布内容,否则ios下 创建的canvas垃圾未回收,导致Total canvas memory use exceeds问题\n // 相关问题列表\n // https://stackoverflow.com/questions/52532614/total-canvas-memory-use-exceeds-the-maximum-limit-safari-12\n // https://github.com/openlayers/openlayers/issues/9291\n el.width = 0;\n el.height = 0;\n el.parentNode.removeChild(el);\n };\n return Canvas;\n}(AbstractCanvas));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","export var SHAPE_TO_TAGS = {\n rect: 'path',\n circle: 'circle',\n line: 'line',\n path: 'path',\n marker: 'path',\n text: 'text',\n polyline: 'polyline',\n polygon: 'polygon',\n image: 'image',\n ellipse: 'ellipse',\n dom: 'foreignObject',\n};\nexport var SVG_ATTR_MAP = {\n opacity: 'opacity',\n fillStyle: 'fill',\n fill: 'fill',\n fillOpacity: 'fill-opacity',\n strokeStyle: 'stroke',\n strokeOpacity: 'stroke-opacity',\n stroke: 'stroke',\n x: 'x',\n y: 'y',\n r: 'r',\n rx: 'rx',\n ry: 'ry',\n width: 'width',\n height: 'height',\n x1: 'x1',\n x2: 'x2',\n y1: 'y1',\n y2: 'y2',\n lineCap: 'stroke-linecap',\n lineJoin: 'stroke-linejoin',\n lineWidth: 'stroke-width',\n lineDash: 'stroke-dasharray',\n lineDashOffset: 'stroke-dashoffset',\n miterLimit: 'stroke-miterlimit',\n font: 'font',\n fontSize: 'font-size',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n fontFamily: 'font-family',\n startArrow: 'marker-start',\n endArrow: 'marker-end',\n path: 'd',\n class: 'class',\n id: 'id',\n style: 'style',\n preserveAspectRatio: 'preserveAspectRatio',\n};\nexport var EVENTS = [\n 'click',\n 'mousedown',\n 'mouseup',\n 'dblclick',\n 'contextmenu',\n 'mouseenter',\n 'mouseleave',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'wheel',\n];\n//# sourceMappingURL=constant.js.map","import { toArray } from '@antv/util';\nimport { SHAPE_TO_TAGS } from '../constant';\n/**\n * 创建并返回图形的 svg 元素\n * @param type svg类型\n */\nexport function createSVGElement(type) {\n return document.createElementNS('http://www.w3.org/2000/svg', type);\n}\n/**\n * 创建并返回图形的 dom 元素\n * @param {IShape} shape 图形\n * @return {SVGElement}\n */\nexport function createDom(shape) {\n var type = SHAPE_TO_TAGS[shape.type];\n var parent = shape.getParent();\n if (!type) {\n throw new Error(\"the type \" + shape.type + \" is not supported by svg\");\n }\n var element = createSVGElement(type);\n if (shape.get('id')) {\n element.id = shape.get('id');\n }\n shape.set('el', element);\n shape.set('attrs', {});\n // 对于 defs 下的 dom 节点,parent 为空,通过 context 统一挂载到 defs 节点下\n if (parent) {\n var parentNode = parent.get('el');\n if (parentNode) {\n parentNode.appendChild(element);\n }\n else {\n // parentNode maybe null for group\n parentNode = parent.createDom();\n parent.set('el', parentNode);\n parentNode.appendChild(element);\n }\n }\n return element;\n}\n/**\n * 对 dom 元素进行排序\n * @param {IElement} element 元素\n * @param {sorter} function 排序函数\n */\nexport function sortDom(element, sorter) {\n var el = element.get('el');\n var childList = toArray(el.children).sort(sorter);\n // create empty fragment\n var fragment = document.createDocumentFragment();\n childList.forEach(function (child) {\n fragment.appendChild(child);\n });\n el.appendChild(fragment);\n}\n/**\n * 将 dom 元素移动到父元素下的指定位置\n * @param {SVGElement} element dom 元素\n * @param {number} targetIndex 目标位置(从 0 开始)\n */\nexport function moveTo(element, targetIndex) {\n var parentNode = element.parentNode;\n var siblings = Array.from(parentNode.childNodes).filter(\n // 要求为元素节点,且不能为 defs 节点\n function (node) { return node.nodeType === 1 && node.nodeName.toLowerCase() !== 'defs'; });\n // 获取目标节点\n var target = siblings[targetIndex];\n var currentIndex = siblings.indexOf(element);\n // 如果目标节点存在\n if (target) {\n // 当前索引 > 目标索引,直接插入到目标节点之前即可\n if (currentIndex > targetIndex) {\n parentNode.insertBefore(element, target);\n }\n else if (currentIndex < targetIndex) {\n // 当前索引 < 目标索引\n // 获取目标节点的下一个节点\n var targetNext = siblings[targetIndex + 1];\n // 如果目标节点的下一个节点存在,插入到该节点之前\n if (targetNext) {\n parentNode.insertBefore(element, targetNext);\n }\n else {\n // 如果该节点不存在,则追加到末尾\n parentNode.appendChild(element);\n }\n }\n }\n else {\n parentNode.appendChild(element);\n }\n}\n//# sourceMappingURL=dom.js.map","import { createDom } from './dom';\nexport function setShadow(model, context) {\n var el = model.cfg.el;\n var attrs = model.attr();\n var cfg = {\n dx: attrs.shadowOffsetX,\n dy: attrs.shadowOffsetY,\n blur: attrs.shadowBlur,\n color: attrs.shadowColor,\n };\n if (!cfg.dx && !cfg.dy && !cfg.blur && !cfg.color) {\n el.removeAttribute('filter');\n }\n else {\n var id = context.find('filter', cfg);\n if (!id) {\n id = context.addShadow(cfg);\n }\n el.setAttribute('filter', \"url(#\" + id + \")\");\n }\n}\nexport function setTransform(model) {\n var matrix = model.attr().matrix;\n if (matrix) {\n var el = model.cfg.el;\n var transform = [];\n for (var i = 0; i < 9; i += 3) {\n transform.push(matrix[i] + \",\" + matrix[i + 1]);\n }\n transform = transform.join(',');\n if (transform.indexOf('NaN') === -1) {\n el.setAttribute('transform', \"matrix(\" + transform + \")\");\n }\n else {\n console.warn('invalid matrix:', matrix);\n }\n }\n}\nexport function setClip(model, context) {\n var clip = model.getClip();\n var el = model.get('el');\n if (!clip) {\n el.removeAttribute('clip-path');\n }\n else if (clip && !el.hasAttribute('clip-path')) {\n createDom(clip);\n clip.createPath(context);\n var id = context.addClip(clip);\n el.setAttribute('clip-path', \"url(#\" + id + \")\");\n }\n}\n//# sourceMappingURL=svg.js.map","import { setTransform, setClip } from './svg';\nimport { sortDom, moveTo } from './dom';\nexport function drawChildren(context, children) {\n children.forEach(function (child) {\n child.draw(context);\n });\n}\n/**\n * 更新元素,包括 group 和 shape\n * @param {IElement} element SVG 元素\n * @param {ChangeType} changeType 更新类型\n */\nexport function refreshElement(element, changeType) {\n // 对于还没有挂载到画布下的元素,canvas 可能为空\n var canvas = element.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n var parent_1 = element.getParent();\n var parentChildren = parent_1 ? parent_1.getChildren() : [canvas];\n var el = element.get('el');\n if (changeType === 'remove') {\n var isClipShape = element.get('isClipShape');\n // 对于 clip,不仅需要将 clipShape 对于的 SVG 元素删除,还需要将上层的 clipPath 元素也删除\n if (isClipShape) {\n var clipPathEl = el && el.parentNode;\n var defsEl = clipPathEl && clipPathEl.parentNode;\n if (clipPathEl && defsEl) {\n defsEl.removeChild(clipPathEl);\n }\n }\n else if (el && el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }\n else if (changeType === 'show') {\n el.setAttribute('visibility', 'visible');\n }\n else if (changeType === 'hide') {\n el.setAttribute('visibility', 'hidden');\n }\n else if (changeType === 'zIndex') {\n moveTo(el, parentChildren.indexOf(element));\n }\n else if (changeType === 'sort') {\n var children_1 = element.get('children');\n if (children_1 && children_1.length) {\n sortDom(element, function (a, b) {\n return children_1.indexOf(a) - children_1.indexOf(b) ? 1 : 0;\n });\n }\n }\n else if (changeType === 'clear') {\n // el maybe null for group\n if (el) {\n el.innerHTML = '';\n }\n }\n else if (changeType === 'matrix') {\n setTransform(element);\n }\n else if (changeType === 'clip') {\n setClip(element, context);\n }\n else if (changeType === 'attr') {\n // 已在 afterAttrsChange 进行了处理,此处 do nothing\n }\n else if (changeType === 'add') {\n element.draw(context);\n }\n }\n}\n//# sourceMappingURL=draw.js.map","import { __extends } from \"tslib\";\nimport { AbstractGroup } from '@antv/g-base';\nimport { each } from '@antv/util';\nimport * as Shape from './shape';\nimport { drawChildren, refreshElement } from './util/draw';\nimport { setClip, setTransform } from './util/svg';\nimport { SVG_ATTR_MAP } from './constant';\nimport { createSVGElement } from './util/dom';\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // SVG 中分组对应实体标签 \n Group.prototype.isEntityGroup = function () {\n return true;\n };\n Group.prototype.createDom = function () {\n var element = createSVGElement('g');\n this.set('el', element);\n var parent = this.getParent();\n if (parent) {\n var parentNode = parent.get('el');\n if (parentNode) {\n parentNode.appendChild(element);\n }\n else {\n // parentNode maybe null for group\n parentNode = parent.createDom();\n parent.set('el', parentNode);\n parentNode.appendChild(element);\n }\n }\n return element;\n };\n // 覆盖基类的 afterAttrsChange 方法\n Group.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n var canvas = this.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n this.createPath(context, targetAttrs);\n }\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Group.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n Group.prototype.getShapeBase = function () {\n return Shape;\n };\n Group.prototype.getGroupBase = function () {\n return Group;\n };\n Group.prototype.draw = function (context) {\n var children = this.getChildren();\n var el = this.get('el');\n if (this.get('destroyed')) {\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n else {\n if (!el) {\n this.createDom();\n }\n setClip(this, context);\n this.createPath(context);\n if (children.length) {\n drawChildren(context, children);\n }\n }\n };\n /**\n * 绘制分组的路径\n * @param {Defs} context 上下文\n * @param {ShapeAttrs} targetAttrs 渲染的目标属性\n */\n Group.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n setTransform(this);\n };\n return Group;\n}(AbstractGroup));\nexport default Group;\n//# sourceMappingURL=group.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractShape } from '@antv/g-base';\nimport { setShadow, setTransform, setClip } from '../util/svg';\nimport { createDom } from '../util/dom';\nimport { refreshElement } from '../util/draw';\nimport { SVG_ATTR_MAP } from '../constant';\nimport * as Shape from './index';\nimport Group from '../group';\nimport { getBBoxMethod } from '@antv/g-base';\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n function ShapeBase() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'svg';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n ShapeBase.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n // 设置默认值\n return __assign(__assign({}, attrs), { lineWidth: 1, lineAppendWidth: 0, strokeOpacity: 1, fillOpacity: 1 });\n };\n // 覆盖基类的 afterAttrsChange 方法\n ShapeBase.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n var canvas = this.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n this.draw(context, targetAttrs);\n }\n };\n ShapeBase.prototype.getShapeBase = function () {\n return Shape;\n };\n ShapeBase.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n ShapeBase.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n ShapeBase.prototype.calculateBBox = function () {\n var el = this.get('el');\n var bbox = null;\n // 包围盒计算依赖于绘制,如果还没有生成对应的 Dom 元素,则包围盒的长宽均为 0\n if (el) {\n bbox = el.getBBox();\n }\n else {\n var bboxMethod = getBBoxMethod(this.get('type'));\n if (bboxMethod) {\n bbox = bboxMethod(this);\n }\n }\n if (bbox) {\n var x = bbox.x, y = bbox.y, width = bbox.width, height = bbox.height;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2;\n var minX = x - halfWidth;\n var minY = y - halfWidth;\n var maxX = x + width + halfWidth;\n var maxY = y + height + halfWidth;\n return {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: width + lineWidth,\n height: height + lineWidth,\n };\n }\n return {\n x: 0,\n y: 0,\n minX: 0,\n minY: 0,\n maxX: 0,\n maxY: 0,\n width: 0,\n height: 0,\n };\n };\n ShapeBase.prototype.isFill = function () {\n var _a = this.attr(), fill = _a.fill, fillStyle = _a.fillStyle;\n return (fill || fillStyle || this.isClipShape()) && this.canFill;\n };\n ShapeBase.prototype.isStroke = function () {\n var _a = this.attr(), stroke = _a.stroke, strokeStyle = _a.strokeStyle;\n return (stroke || strokeStyle) && this.canStroke;\n };\n ShapeBase.prototype.draw = function (context, targetAttrs) {\n var el = this.get('el');\n if (this.get('destroyed')) {\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n else {\n if (!el) {\n createDom(this);\n }\n setClip(this, context);\n this.createPath(context, targetAttrs);\n this.shadow(context, targetAttrs);\n this.strokeAndFill(context, targetAttrs);\n this.transform(targetAttrs);\n }\n };\n /**\n * @protected\n * 绘制图形的路径\n * @param {Defs} context 上下文\n * @param {ShapeAttrs} targetAttrs 渲染的目标属性\n */\n ShapeBase.prototype.createPath = function (context, targetAttrs) { };\n // stroke and fill\n ShapeBase.prototype.strokeAndFill = function (context, targetAttrs) {\n var attrs = targetAttrs || this.attr();\n var fill = attrs.fill, fillStyle = attrs.fillStyle, stroke = attrs.stroke, strokeStyle = attrs.strokeStyle, fillOpacity = attrs.fillOpacity, strokeOpacity = attrs.strokeOpacity, lineWidth = attrs.lineWidth;\n var el = this.get('el');\n if (this.canFill) {\n // 初次渲染和更新渲染的逻辑有所不同: 初次渲染值为空时,需要设置为 none,否则就会是黑色,而更新渲染则不需要\n if (!targetAttrs) {\n this._setColor(context, 'fill', fill || fillStyle);\n }\n else if ('fill' in attrs) {\n this._setColor(context, 'fill', fill);\n }\n else if ('fillStyle' in attrs) {\n // compatible with fillStyle\n this._setColor(context, 'fill', fillStyle);\n }\n if (fillOpacity) {\n el.setAttribute(SVG_ATTR_MAP['fillOpacity'], fillOpacity);\n }\n }\n if (this.canStroke && lineWidth > 0) {\n if (!targetAttrs) {\n this._setColor(context, 'stroke', stroke || strokeStyle);\n }\n else if ('stroke' in attrs) {\n this._setColor(context, 'stroke', stroke);\n }\n else if ('strokeStyle' in attrs) {\n // compatible with strokeStyle\n this._setColor(context, 'stroke', strokeStyle);\n }\n if (strokeOpacity) {\n el.setAttribute(SVG_ATTR_MAP['strokeOpacity'], strokeOpacity);\n }\n if (lineWidth) {\n el.setAttribute(SVG_ATTR_MAP['lineWidth'], lineWidth);\n }\n }\n };\n ShapeBase.prototype._setColor = function (context, attr, value) {\n var el = this.get('el');\n if (!value) {\n // need to set `none` to avoid default value\n el.setAttribute(SVG_ATTR_MAP[attr], 'none');\n return;\n }\n value = value.trim();\n if (/^[r,R,L,l]{1}[\\s]*\\(/.test(value)) {\n var id = context.find('gradient', value);\n if (!id) {\n id = context.addGradient(value);\n }\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else if (/^[p,P]{1}[\\s]*\\(/.test(value)) {\n var id = context.find('pattern', value);\n if (!id) {\n id = context.addPattern(value);\n }\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n };\n ShapeBase.prototype.shadow = function (context, targetAttrs) {\n var attrs = this.attr();\n var _a = targetAttrs || attrs, shadowOffsetX = _a.shadowOffsetX, shadowOffsetY = _a.shadowOffsetY, shadowBlur = _a.shadowBlur, shadowColor = _a.shadowColor;\n if (shadowOffsetX || shadowOffsetY || shadowBlur || shadowColor) {\n setShadow(this, context);\n }\n };\n ShapeBase.prototype.transform = function (targetAttrs) {\n var attrs = this.attr();\n var matrix = (targetAttrs || attrs).matrix;\n if (matrix) {\n setTransform(this);\n }\n };\n ShapeBase.prototype.isInShape = function (refX, refY) {\n return this.isPointInPath(refX, refY);\n };\n ShapeBase.prototype.isPointInPath = function (refX, refY) {\n var el = this.get('el');\n var canvas = this.get('canvas');\n var bbox = canvas.get('el').getBoundingClientRect();\n var clientX = refX + bbox.left;\n var clientY = refY + bbox.top;\n var element = document.elementFromPoint(clientX, clientY);\n if (element && element.isEqualNode(el)) {\n return true;\n }\n return false;\n };\n /**\n * 获取线拾取的宽度\n * @returns {number} 线的拾取宽度\n */\n ShapeBase.prototype.getHitLineWidth = function () {\n var _a = this.attrs, lineWidth = _a.lineWidth, lineAppendWidth = _a.lineAppendWidth;\n if (this.isStroke()) {\n return lineWidth + lineAppendWidth;\n }\n return 0;\n };\n return ShapeBase;\n}(AbstractShape));\nexport default ShapeBase;\n//# sourceMappingURL=base.js.map","/**\n * @fileoverview circle\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'circle';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Circle.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, r: 0 });\n };\n Circle.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n // 圆和椭圆的点坐标属性不是 x, y,而是 cx, cy\n if (attr === 'x' || attr === 'y') {\n el.setAttribute(\"c\" + attr, value);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Circle;\n}(ShapeBase));\nexport default Circle;\n//# sourceMappingURL=circle.js.map","/**\n * @fileoverview dom\n * @author dengfuping_develop@163.com\n */\nimport { __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Dom = /** @class */ (function (_super) {\n __extends(Dom, _super);\n function Dom() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dom';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n Dom.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n if (typeof attrs['html'] === 'function') {\n var element = attrs['html'].call(this, attrs);\n if (element instanceof Element || element instanceof HTMLDocument) {\n var children = el.childNodes;\n for (var i = children.length - 1; i >= 0; i--) {\n el.removeChild(children[i]);\n }\n el.appendChild(element); // append to el if it's an element\n }\n else {\n el.innerHTML = element; // set innerHTML\n }\n }\n else {\n el.innerHTML = attrs['html']; // set innerHTML\n }\n };\n return Dom;\n}(ShapeBase));\nexport default Dom;\n//# sourceMappingURL=dom.js.map","/**\n * @fileoverview ellipse\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Ellipse = /** @class */ (function (_super) {\n __extends(Ellipse, _super);\n function Ellipse() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'ellipse';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Ellipse.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, rx: 0, ry: 0 });\n };\n Ellipse.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n // 圆和椭圆的点坐标属性不是 x, y,而是 cx, cy\n if (attr === 'x' || attr === 'y') {\n el.setAttribute(\"c\" + attr, value);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Ellipse;\n}(ShapeBase));\nexport default Ellipse;\n//# sourceMappingURL=ellipse.js.map","/**\n * @fileoverview image\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each, isString } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Image = /** @class */ (function (_super) {\n __extends(Image, _super);\n function Image() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'image';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n Image.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0 });\n };\n Image.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'img') {\n _this._setImage(attrs.img);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Image.prototype.setAttr = function (name, value) {\n this.attrs[name] = value;\n if (name === 'img') {\n this._setImage(value);\n }\n };\n Image.prototype._setImage = function (img) {\n var attrs = this.attr();\n var el = this.get('el');\n if (isString(img)) {\n el.setAttribute('href', img);\n }\n else if (img instanceof window.Image) {\n if (!attrs.width) {\n el.setAttribute('width', img.width);\n this.attr('width', img.width);\n }\n if (!attrs.height) {\n el.setAttribute('height', img.height);\n this.attr('height', img.height);\n }\n el.setAttribute('href', img.src);\n }\n else if (img instanceof HTMLElement && isString(img.nodeName) && img.nodeName.toUpperCase() === 'CANVAS') {\n // @ts-ignore\n el.setAttribute('href', img.toDataURL());\n }\n else if (img instanceof ImageData) {\n var canvas = document.createElement('canvas');\n canvas.setAttribute('width', \"\" + img.width);\n canvas.setAttribute('height', \"\" + img.height);\n canvas.getContext('2d').putImageData(img, 0, 0);\n if (!attrs.width) {\n el.setAttribute('width', \"\" + img.width);\n this.attr('width', img.width);\n }\n if (!attrs.height) {\n el.setAttribute('height', \"\" + img.height);\n this.attr('height', img.height);\n }\n el.setAttribute('href', canvas.toDataURL());\n }\n };\n return Image;\n}(ShapeBase));\nexport default Image;\n//# sourceMappingURL=image.js.map","import { __assign, __extends } from \"tslib\";\n/**\n * @fileoverview line\n * @author dengfuping_develop@163.com\n */\nimport { Line as LineUtil } from '@antv/g-math';\nimport { each, isObject } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n function Line() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'line';\n _this.canFill = false;\n _this.canStroke = true;\n return _this;\n }\n Line.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x1: 0, y1: 0, x2: 0, y2: 0, startArrow: false, endArrow: false });\n };\n Line.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'startArrow' || attr === 'endArrow') {\n if (value) {\n var id = isObject(value)\n ? context.addArrow(attrs, SVG_ATTR_MAP[attr])\n : context.getDefaultArrow(attrs, SVG_ATTR_MAP[attr]);\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.removeAttribute(SVG_ATTR_MAP[attr]);\n }\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n /**\n * Use math calculation to get length of line\n * @return {number} length\n */\n Line.prototype.getTotalLength = function () {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.length(x1, y1, x2, y2);\n };\n /**\n * Use math calculation to get point according to ratio as same sa Canvas version\n * @param {number} ratio\n * @return {Point} point\n */\n Line.prototype.getPoint = function (ratio) {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.pointAt(x1, y1, x2, y2, ratio);\n };\n return Line;\n}(ShapeBase));\nexport default Line;\n//# sourceMappingURL=line.js.map","var Symbols = {\n // 圆\n circle: function (x, y, r) {\n return [\n ['M', x, y],\n ['m', -r, 0],\n ['a', r, r, 0, 1, 0, r * 2, 0],\n ['a', r, r, 0, 1, 0, -r * 2, 0],\n ];\n },\n // 正方形\n square: function (x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function (x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];\n },\n // 倒三角形\n triangleDown: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n },\n};\nexport default {\n get: function (type) {\n return Symbols[type];\n },\n register: function (type, func) {\n Symbols[type] = func;\n },\n remove: function (type) {\n delete Symbols[type];\n },\n getAll: function () {\n return Symbols;\n },\n};\n//# sourceMappingURL=symbols.js.map","/**\n * @fileoverview marker\n * @author dengfuping_develop@163.com\n */\nimport { __extends } from \"tslib\";\nimport { isArray, isFunction } from '@antv/util';\nimport ShapeBase from '../base';\nimport symbolsFactory from './symbols';\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'marker';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Marker.prototype.createPath = function (context) {\n var el = this.get('el');\n el.setAttribute('d', this._assembleMarker());\n };\n Marker.prototype._assembleMarker = function () {\n var d = this._getPath();\n if (isArray(d)) {\n return d\n .map(function (path) {\n return path.join(' ');\n })\n .join('');\n }\n return d;\n };\n Marker.prototype._getPath = function () {\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y;\n // 兼容 r 和 radius 两种写法,推荐使用 r\n var r = attrs.r || attrs.radius;\n var symbol = attrs.symbol || 'circle';\n var method;\n if (isFunction(symbol)) {\n method = symbol;\n }\n else {\n method = symbolsFactory.get(symbol);\n }\n if (!method) {\n console.warn(method + \" symbol is not exist.\");\n return null;\n }\n return method(x, y, r);\n };\n // 作为其静态属性\n Marker.symbolsFactory = symbolsFactory;\n return Marker;\n}(ShapeBase));\nexport default Marker;\n//# sourceMappingURL=index.js.map","import { __assign, __extends } from \"tslib\";\nimport { each, isArray, isObject } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Path = /** @class */ (function (_super) {\n __extends(Path, _super);\n function Path() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'path';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Path.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n Path.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'path' && isArray(value)) {\n el.setAttribute('d', _this._formatPath(value));\n }\n else if (attr === 'startArrow' || attr === 'endArrow') {\n if (value) {\n var id = isObject(value)\n ? context.addArrow(attrs, SVG_ATTR_MAP[attr])\n : context.getDefaultArrow(attrs, SVG_ATTR_MAP[attr]);\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.removeAttribute(SVG_ATTR_MAP[attr]);\n }\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Path.prototype._formatPath = function (value) {\n var newValue = value\n .map(function (path) {\n return path.join(' ');\n })\n .join('');\n if (~newValue.indexOf('NaN')) {\n return '';\n }\n return newValue;\n };\n /**\n * Get total length of path\n * 尽管通过浏览器的 SVGPathElement.getTotalLength() 接口获取的 path 长度,\n * 与 Canvas 版本通过数学计算的方式得到的长度有一些细微差异,但最大误差在个位数像素,精度上可以能接受\n * @return {number} length\n */\n Path.prototype.getTotalLength = function () {\n var el = this.get('el');\n return el ? el.getTotalLength() : null;\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Path.prototype.getPoint = function (ratio) {\n var el = this.get('el');\n var totalLength = this.getTotalLength();\n // @see https://github.com/antvis/g/issues/634\n if (totalLength === 0) {\n return null;\n }\n var point = el ? el.getPointAtLength(ratio * totalLength) : null;\n return point\n ? {\n x: point.x,\n y: point.y,\n }\n : null;\n };\n return Path;\n}(ShapeBase));\nexport default Path;\n//# sourceMappingURL=path.js.map","import { __extends } from \"tslib\";\n/**\n * @fileoverview polygon\n * @author dengfuping_develop@163.com\n */\nimport { each, isArray } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'polygon';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Polygon.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'points' && isArray(value) && value.length >= 2) {\n el.setAttribute('points', value.map(function (point) { return point[0] + \",\" + point[1]; }).join(' '));\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Polygon;\n}(ShapeBase));\nexport default Polygon;\n//# sourceMappingURL=polygon.js.map","import { __assign, __extends } from \"tslib\";\nimport { Polyline as PolylineUtil } from '@antv/g-math';\nimport { Line as LineUtil } from '@antv/g-math';\nimport { each, isArray, isNil } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Polyline = /** @class */ (function (_super) {\n __extends(Polyline, _super);\n function Polyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'polyline';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Polyline.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n // 更新属性时,检测是否更改了 points\n Polyline.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (['points'].indexOf(name) !== -1) {\n this._resetCache();\n }\n };\n Polyline.prototype._resetCache = function () {\n this.set('totalLength', null);\n this.set('tCache', null);\n };\n Polyline.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'points' && isArray(value) && value.length >= 2) {\n el.setAttribute('points', value.map(function (point) { return point[0] + \",\" + point[1]; }).join(' '));\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n /**\n * Get length of polyline\n * @return {number} length\n */\n Polyline.prototype.getTotalLength = function () {\n var points = this.attr().points;\n // get totalLength from cache\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this.set('totalLength', PolylineUtil.length(points));\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Polyline.prototype.getPoint = function (ratio) {\n var points = this.attr().points;\n // get tCache from cache\n var tCache = this.get('tCache');\n if (!tCache) {\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n return LineUtil.pointAt(points[index][0], points[index][1], points[index + 1][0], points[index + 1][1], subt);\n };\n Polyline.prototype._setTcache = function () {\n var points = this.attr().points;\n if (!points || points.length === 0) {\n return;\n }\n var totalLength = this.getTotalLength();\n if (totalLength <= 0) {\n return;\n }\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n each(points, function (p, i) {\n if (points[i + 1]) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = LineUtil.length(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n Polyline.prototype.getStartTangent = function () {\n var points = this.attr().points;\n var result = [];\n result.push([points[1][0], points[1][1]]);\n result.push([points[0][0], points[0][1]]);\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n Polyline.prototype.getEndTangent = function () {\n var points = this.attr().points;\n var l = points.length - 1;\n var result = [];\n result.push([points[l - 1][0], points[l - 1][1]]);\n result.push([points[l][0], points[l][1]]);\n return result;\n };\n return Polyline;\n}(ShapeBase));\nexport default Polyline;\n//# sourceMappingURL=polyline.js.map","import { each, isArray, isString } from '@antv/util';\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi;\nvar regexDot = /[^\\s,]+/gi;\nexport function parseRadius(radius) {\n var r1 = 0;\n var r2 = 0;\n var r3 = 0;\n var r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4,\n };\n}\nexport function parsePath(path) {\n path = path || [];\n if (isArray(path)) {\n return path;\n }\n if (isString(path)) {\n path = path.match(regexTags);\n each(path, function (item, index) {\n item = item.match(regexDot);\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n item.splice(1, 0, item[0].substr(1));\n item[0] = tag;\n }\n each(item, function (sub, i) {\n if (!isNaN(sub)) {\n item[i] = +sub;\n }\n });\n path[index] = item;\n });\n return path;\n }\n}\n//# sourceMappingURL=format.js.map","/**\n * @fileoverview rect\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each, isArray } from '@antv/util';\nimport ShapeBase from './base';\nimport { SVG_ATTR_MAP } from '../constant';\nimport { parseRadius } from '../util/format';\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n function Rect() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'rect';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Rect.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0, radius: 0 });\n };\n Rect.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n // 加上状态量,用来标记 path 是否已组装\n var completed = false;\n // 和组装 path 相关的绘图属性\n var pathRelatedAttrs = ['x', 'y', 'width', 'height', 'radius'];\n each(targetAttrs || attrs, function (value, attr) {\n if (pathRelatedAttrs.indexOf(attr) !== -1 && !completed) {\n el.setAttribute('d', _this._assembleRect(attrs));\n completed = true;\n }\n else if (pathRelatedAttrs.indexOf(attr) === -1 && SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Rect.prototype._assembleRect = function (attrs) {\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n var radius = attrs.radius;\n if (!radius) {\n return \"M \" + x + \",\" + y + \" l \" + w + \",0 l 0,\" + h + \" l\" + -w + \" 0 z\";\n }\n var r = parseRadius(radius);\n if (isArray(radius)) {\n if (radius.length === 1) {\n r.r1 = r.r2 = r.r3 = r.r4 = radius[0];\n }\n else if (radius.length === 2) {\n r.r1 = r.r3 = radius[0];\n r.r2 = r.r4 = radius[1];\n }\n else if (radius.length === 3) {\n r.r1 = radius[0];\n r.r2 = r.r4 = radius[1];\n r.r3 = radius[2];\n }\n else {\n r.r1 = radius[0];\n r.r2 = radius[1];\n r.r3 = radius[2];\n r.r4 = radius[3];\n }\n }\n else {\n r.r1 = r.r2 = r.r3 = r.r4 = radius;\n }\n var d = [\n [\"M \" + (x + r.r1) + \",\" + y],\n [\"l \" + (w - r.r1 - r.r2) + \",0\"],\n [\"a \" + r.r2 + \",\" + r.r2 + \",0,0,1,\" + r.r2 + \",\" + r.r2],\n [\"l 0,\" + (h - r.r2 - r.r3)],\n [\"a \" + r.r3 + \",\" + r.r3 + \",0,0,1,\" + -r.r3 + \",\" + r.r3],\n [\"l \" + (r.r3 + r.r4 - w) + \",0\"],\n [\"a \" + r.r4 + \",\" + r.r4 + \",0,0,1,\" + -r.r4 + \",\" + -r.r4],\n [\"l 0,\" + (r.r4 + r.r1 - h)],\n [\"a \" + r.r1 + \",\" + r.r1 + \",0,0,1,\" + r.r1 + \",\" + -r.r1],\n ['z'],\n ];\n return d.join(' ');\n };\n return Rect;\n}(ShapeBase));\nexport default Rect;\n//# sourceMappingURL=rect.js.map","/**\n * @fileoverview text\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { detect } from 'detect-browser';\nimport { setTransform } from '../util/svg';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar LETTER_SPACING = 0.3;\nvar BASELINE_MAP = {\n top: 'before-edge',\n middle: 'central',\n bottom: 'after-edge',\n alphabetic: 'baseline',\n hanging: 'hanging',\n};\n// for FireFox\nvar BASELINE_MAP_FOR_FIREFOX = {\n top: 'text-before-edge',\n middle: 'central',\n bottom: 'text-after-edge',\n alphabetic: 'alphabetic',\n hanging: 'hanging',\n};\nvar ANCHOR_MAP = {\n left: 'left',\n start: 'left',\n center: 'middle',\n right: 'end',\n end: 'end',\n};\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'text';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Text.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, text: null, fontSize: 12, fontFamily: 'sans-serif', fontStyle: 'normal', fontWeight: 'normal', fontVariant: 'normal', textAlign: 'start', textBaseline: 'bottom' });\n };\n Text.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n this._setFont();\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'text') {\n _this._setText(\"\" + value);\n }\n else if (attr === 'matrix' && value) {\n setTransform(_this);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n el.setAttribute('paint-order', 'stroke');\n el.setAttribute('style', 'stroke-linecap:butt; stroke-linejoin:miter;');\n };\n Text.prototype._setFont = function () {\n var el = this.get('el');\n var _a = this.attr(), textBaseline = _a.textBaseline, textAlign = _a.textAlign;\n var browser = detect();\n if (browser && browser.name === 'firefox') {\n // compatible with FireFox browser, ref: https://github.com/antvis/g/issues/119\n el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline] || 'alphabetic');\n }\n else {\n el.setAttribute('alignment-baseline', BASELINE_MAP[textBaseline] || 'baseline');\n }\n el.setAttribute('text-anchor', ANCHOR_MAP[textAlign] || 'left');\n };\n Text.prototype._setText = function (text) {\n var el = this.get('el');\n var _a = this.attr(), x = _a.x, _b = _a.textBaseline, baseline = _b === void 0 ? 'bottom' : _b;\n if (!text) {\n el.innerHTML = '';\n }\n else if (~text.indexOf('\\n')) {\n var textArr = text.split('\\n');\n var textLen_1 = textArr.length - 1;\n var arr_1 = '';\n each(textArr, function (segment, i) {\n if (i === 0) {\n if (baseline === 'alphabetic') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'top') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'middle') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'bottom') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'hanging') {\n arr_1 += \"\" + segment + \"\";\n }\n }\n else {\n arr_1 += \"\" + segment + \"\";\n }\n });\n el.innerHTML = arr_1;\n }\n else {\n el.innerHTML = text;\n }\n };\n return Text;\n}(ShapeBase));\nexport default Text;\n//# sourceMappingURL=text.js.map","/**\n * @fileoverview gradient\n * @author dengfuping_develop@163.com\n */\nimport { each, mod, toRadian, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^)]+\\))/gi;\nfunction addStop(steps) {\n var arr = steps.match(regexColorStop);\n if (!arr) {\n return '';\n }\n var stops = '';\n arr.sort(function (a, b) {\n a = a.split(':');\n b = b.split(':');\n return Number(a[0]) - Number(b[0]);\n });\n each(arr, function (item) {\n item = item.split(':');\n stops += \"\";\n });\n return stops;\n}\nfunction parseLineGradient(color, el) {\n var arr = regexLG.exec(color);\n var angle = mod(toRadian(parseFloat(arr[1])), Math.PI * 2);\n var steps = arr[2];\n var start;\n var end;\n if (angle >= 0 && angle < 0.5 * Math.PI) {\n start = {\n x: 0,\n y: 0,\n };\n end = {\n x: 1,\n y: 1,\n };\n }\n else if (0.5 * Math.PI <= angle && angle < Math.PI) {\n start = {\n x: 1,\n y: 0,\n };\n end = {\n x: 0,\n y: 1,\n };\n }\n else if (Math.PI <= angle && angle < 1.5 * Math.PI) {\n start = {\n x: 1,\n y: 1,\n };\n end = {\n x: 0,\n y: 0,\n };\n }\n else {\n start = {\n x: 0,\n y: 1,\n };\n end = {\n x: 1,\n y: 0,\n };\n }\n var tanTheta = Math.tan(angle);\n var tanTheta2 = tanTheta * tanTheta;\n var x = (end.x - start.x + tanTheta * (end.y - start.y)) / (tanTheta2 + 1) + start.x;\n var y = (tanTheta * (end.x - start.x + tanTheta * (end.y - start.y))) / (tanTheta2 + 1) + start.y;\n el.setAttribute('x1', start.x);\n el.setAttribute('y1', start.y);\n el.setAttribute('x2', x);\n el.setAttribute('y2', y);\n el.innerHTML = addStop(steps);\n}\nfunction parseRadialGradient(color, self) {\n var arr = regexRG.exec(color);\n var cx = parseFloat(arr[1]);\n var cy = parseFloat(arr[2]);\n var r = parseFloat(arr[3]);\n var steps = arr[4];\n self.setAttribute('cx', cx);\n self.setAttribute('cy', cy);\n self.setAttribute('r', r);\n self.innerHTML = addStop(steps);\n}\nvar Gradient = /** @class */ (function () {\n function Gradient(cfg) {\n this.cfg = {};\n var el = null;\n var id = uniqueId('gradient_');\n if (cfg.toLowerCase()[0] === 'l') {\n el = createSVGElement('linearGradient');\n parseLineGradient(cfg, el);\n }\n else {\n el = createSVGElement('radialGradient');\n parseRadialGradient(cfg, el);\n }\n el.setAttribute('id', id);\n this.el = el;\n this.id = id;\n this.cfg = cfg;\n return this;\n }\n Gradient.prototype.match = function (type, attr) {\n return this.cfg === attr;\n };\n return Gradient;\n}());\nexport default Gradient;\n//# sourceMappingURL=gradient.js.map","/**\n * @fileoverview shadow\n * @author dengfuping_develop@163.com\n */\nimport { each, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar ATTR_MAP = {\n shadowColor: 'color',\n shadowOpacity: 'opacity',\n shadowBlur: 'blur',\n shadowOffsetX: 'dx',\n shadowOffsetY: 'dy',\n};\nvar SHADOW_DIMENSION = {\n x: '-40%',\n y: '-40%',\n width: '200%',\n height: '200%',\n};\nvar Shadow = /** @class */ (function () {\n function Shadow(cfg) {\n this.type = 'filter';\n this.cfg = {};\n this.type = 'filter';\n var el = createSVGElement('filter');\n // expand the filter region to fill in shadows\n each(SHADOW_DIMENSION, function (v, k) {\n el.setAttribute(k, v);\n });\n this.el = el;\n this.id = uniqueId('filter_');\n this.el.id = this.id;\n this.cfg = cfg;\n this._parseShadow(cfg, el);\n return this;\n }\n Shadow.prototype.match = function (type, cfg) {\n if (this.type !== type) {\n return false;\n }\n var flag = true;\n var config = this.cfg;\n each(Object.keys(config), function (attr) {\n if (config[attr] !== cfg[attr]) {\n flag = false;\n return false;\n }\n });\n return flag;\n };\n Shadow.prototype.update = function (name, value) {\n var config = this.cfg;\n config[ATTR_MAP[name]] = value;\n this._parseShadow(config, this.el);\n return this;\n };\n Shadow.prototype._parseShadow = function (config, el) {\n var child = \"\";\n el.innerHTML = child;\n };\n return Shadow;\n}());\nexport default Shadow;\n//# sourceMappingURL=shadow.js.map","/**\n * @fileoverview arrow\n * @author dengfuping_develop@163.com\n */\nimport { isArray, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar Arrow = /** @class */ (function () {\n function Arrow(attrs, type) {\n this.cfg = {};\n var el = createSVGElement('marker');\n var id = uniqueId('marker_');\n el.setAttribute('id', id);\n var shape = createSVGElement('path');\n shape.setAttribute('stroke', attrs.stroke || 'none');\n shape.setAttribute('fill', attrs.fill || 'none');\n el.appendChild(shape);\n el.setAttribute('overflow', 'visible');\n el.setAttribute('orient', 'auto-start-reverse');\n this.el = el;\n this.child = shape;\n this.id = id;\n var cfg = attrs[type === 'marker-start' ? 'startArrow' : 'endArrow'];\n this.stroke = attrs.stroke || '#000';\n if (cfg === true) {\n this._setDefaultPath(type, shape);\n }\n else {\n this.cfg = cfg; // when arrow config exists\n this._setMarker(attrs.lineWidth, shape);\n }\n return this;\n }\n Arrow.prototype.match = function () {\n return false;\n };\n Arrow.prototype._setDefaultPath = function (type, el) {\n var parent = this.el;\n // 默认箭头的边长为 10,夹角为 60 度\n el.setAttribute('d', \"M0,0 L\" + 10 * Math.cos(Math.PI / 6) + \",5 L0,10\");\n parent.setAttribute('refX', \"\" + 10 * Math.cos(Math.PI / 6));\n parent.setAttribute('refY', \"\" + 5);\n };\n Arrow.prototype._setMarker = function (r, el) {\n var parent = this.el;\n var path = this.cfg.path;\n var d = this.cfg.d;\n if (isArray(path)) {\n path = path\n .map(function (segment) {\n return segment.join(' ');\n })\n .join('');\n }\n el.setAttribute('d', path);\n parent.appendChild(el);\n if (d) {\n parent.setAttribute('refX', \"\" + d / r);\n }\n };\n Arrow.prototype.update = function (fill) {\n var child = this.child;\n if (child.attr) {\n child.attr('fill', fill);\n }\n else {\n child.setAttribute('fill', fill);\n }\n };\n return Arrow;\n}());\nexport default Arrow;\n//# sourceMappingURL=arrow.js.map","/**\n * @fileoverview clip\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar Clip = /** @class */ (function () {\n function Clip(cfg) {\n this.type = 'clip';\n this.cfg = {};\n var el = createSVGElement('clipPath');\n this.el = el;\n this.id = uniqueId('clip_');\n el.id = this.id;\n var shapeEl = cfg.cfg.el;\n el.appendChild(shapeEl);\n this.cfg = cfg;\n return this;\n }\n Clip.prototype.match = function () {\n return false;\n };\n Clip.prototype.remove = function () {\n var el = this.el;\n el.parentNode.removeChild(el);\n };\n return Clip;\n}());\nexport default Clip;\n//# sourceMappingURL=clip.js.map","/**\n * @fileoverview pattern\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar regexPR = /^p\\s*\\(\\s*([axyn])\\s*\\)\\s*(.*)/i;\nvar Pattern = /** @class */ (function () {\n function Pattern(cfg) {\n this.cfg = {};\n var el = createSVGElement('pattern');\n el.setAttribute('patternUnits', 'userSpaceOnUse');\n var child = createSVGElement('image');\n el.appendChild(child);\n var id = uniqueId('pattern_');\n el.id = id;\n this.el = el;\n this.id = id;\n this.cfg = cfg;\n var arr = regexPR.exec(cfg);\n var source = arr[2];\n child.setAttribute('href', source);\n var img = new Image();\n if (!source.match(/^data:/i)) {\n img.crossOrigin = 'Anonymous';\n }\n img.src = source;\n function onload() {\n el.setAttribute('width', \"\" + img.width);\n el.setAttribute('height', \"\" + img.height);\n }\n if (img.complete) {\n onload();\n }\n else {\n img.onload = onload;\n // Fix onload() bug in IE9\n img.src = img.src;\n }\n return this;\n }\n Pattern.prototype.match = function (type, attr) {\n return this.cfg === attr;\n };\n return Pattern;\n}());\nexport default Pattern;\n//# sourceMappingURL=pattern.js.map","/**\n * @fileoverview defs\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport Gradient from './gradient';\nimport Shadow from './shadow';\nimport Arrow from './arrow';\nimport Clip from './clip';\nimport Pattern from './pattern';\nimport { createSVGElement } from '../util/dom';\nvar Defs = /** @class */ (function () {\n function Defs(canvas) {\n var el = createSVGElement('defs');\n var id = uniqueId('defs_');\n el.id = id;\n canvas.appendChild(el);\n this.children = [];\n this.defaultArrow = {};\n this.el = el;\n this.canvas = canvas;\n }\n Defs.prototype.find = function (type, attr) {\n var children = this.children;\n var result = null;\n for (var i = 0; i < children.length; i++) {\n if (children[i].match(type, attr)) {\n result = children[i].id;\n break;\n }\n }\n return result;\n };\n Defs.prototype.findById = function (id) {\n var children = this.children;\n var flag = null;\n for (var i = 0; i < children.length; i++) {\n if (children[i].id === id) {\n flag = children[i];\n break;\n }\n }\n return flag;\n };\n Defs.prototype.add = function (item) {\n this.children.push(item);\n item.canvas = this.canvas;\n item.parent = this;\n };\n Defs.prototype.getDefaultArrow = function (attrs, name) {\n var stroke = attrs.stroke || attrs.strokeStyle;\n if (this.defaultArrow[stroke]) {\n return this.defaultArrow[stroke].id;\n }\n var arrow = new Arrow(attrs, name);\n this.defaultArrow[stroke] = arrow;\n this.el.appendChild(arrow.el);\n this.add(arrow);\n return arrow.id;\n };\n Defs.prototype.addGradient = function (cfg) {\n var gradient = new Gradient(cfg);\n this.el.appendChild(gradient.el);\n this.add(gradient);\n return gradient.id;\n };\n Defs.prototype.addArrow = function (attrs, name) {\n var arrow = new Arrow(attrs, name);\n this.el.appendChild(arrow.el);\n this.add(arrow);\n return arrow.id;\n };\n Defs.prototype.addShadow = function (cfg) {\n var shadow = new Shadow(cfg);\n this.el.appendChild(shadow.el);\n this.add(shadow);\n return shadow.id;\n };\n Defs.prototype.addPattern = function (cfg) {\n var pattern = new Pattern(cfg);\n this.el.appendChild(pattern.el);\n this.add(pattern);\n return pattern.id;\n };\n Defs.prototype.addClip = function (cfg) {\n var clip = new Clip(cfg);\n this.el.appendChild(clip.el);\n this.add(clip);\n return clip.id;\n };\n return Defs;\n}());\nexport default Defs;\n//# sourceMappingURL=index.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractCanvas } from '@antv/g-base';\nimport { SHAPE_TO_TAGS } from './constant';\nimport { drawChildren } from './util/draw';\nimport { setTransform, setClip } from './util/svg';\nimport { sortDom, createSVGElement } from './util/dom';\nimport * as Shape from './shape';\nimport Group from './group';\nimport Defs from './defs';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas(cfg) {\n return _super.call(this, __assign(__assign({}, cfg), { autoDraw: true, \n // 设置渲染引擎为 canvas,只读属性\n renderer: 'svg' })) || this;\n }\n Canvas.prototype.getShapeBase = function () {\n return Shape;\n };\n Canvas.prototype.getGroupBase = function () {\n return Group;\n };\n // 覆盖 Container 中通过遍历的方式获取 shape 对象的逻辑,直接走 SVG 的 dom 拾取即可\n Canvas.prototype.getShape = function (x, y, ev) {\n var target = ev.target || ev.srcElement;\n if (!SHAPE_TO_TAGS[target.tagName]) {\n var parent_1 = target.parentNode;\n while (parent_1 && !SHAPE_TO_TAGS[parent_1.tagName]) {\n parent_1 = parent_1.parentNode;\n }\n target = parent_1;\n }\n return this.find(function (child) { return child.get('el') === target; });\n };\n // 复写基类的方法生成标签\n Canvas.prototype.createDom = function () {\n var element = createSVGElement('svg');\n var context = new Defs(element);\n element.setAttribute('width', \"\" + this.get('width'));\n element.setAttribute('height', \"\" + this.get('height'));\n // 缓存 context 对象\n this.set('context', context);\n return element;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Canvas.prototype.onCanvasChange = function (changeType) {\n var context = this.get('context');\n var el = this.get('el');\n if (changeType === 'sort') {\n var children_1 = this.get('children');\n if (children_1 && children_1.length) {\n sortDom(this, function (a, b) {\n return children_1.indexOf(a) - children_1.indexOf(b) ? 1 : 0;\n });\n }\n }\n else if (changeType === 'clear') {\n // el maybe null for canvas\n if (el) {\n // 清空 SVG 元素\n el.innerHTML = '';\n var defsEl = context.el;\n // 清空 defs 元素\n defsEl.innerHTML = '';\n // 将清空后的 defs 元素挂载到 el 下\n el.appendChild(defsEl);\n }\n }\n else if (changeType === 'matrix') {\n setTransform(this);\n }\n else if (changeType === 'clip') {\n setClip(this, context);\n }\n else if (changeType === 'changeSize') {\n el.setAttribute('width', \"\" + this.get('width'));\n el.setAttribute('height', \"\" + this.get('height'));\n }\n };\n // 复写基类的 draw 方法\n Canvas.prototype.draw = function () {\n var context = this.get('context');\n var children = this.getChildren();\n setClip(this, context);\n if (children.length) {\n drawChildren(context, children);\n }\n };\n return Canvas;\n}(AbstractCanvas));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","export default function addEventListener(target, eventType, callback) {\n if (target) {\n if (typeof target.addEventListener === 'function') {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function () {\n target.removeEventListener(eventType, callback, false);\n },\n };\n // @ts-ignore\n }\n if (typeof target.attachEvent === 'function') {\n // @ts-ignore\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function () {\n // @ts-ignore\n target.detachEvent('on' + eventType, callback);\n },\n };\n }\n }\n}\n//# sourceMappingURL=add-event-listener.js.map","/**\n * 创建DOM 节点\n * @param {String} str Dom 字符串\n * @return {HTMLElement} DOM 节点\n */\nvar TABLE;\nvar TABLE_TR;\nvar FRAGMENT_REG;\nvar CONTAINERS;\nfunction initConstants() {\n TABLE = document.createElement('table');\n TABLE_TR = document.createElement('tr');\n FRAGMENT_REG = /^\\s*<(\\w+|!)[^>]*>/;\n CONTAINERS = {\n tr: document.createElement('tbody'),\n tbody: TABLE,\n thead: TABLE,\n tfoot: TABLE,\n td: TABLE_TR,\n th: TABLE_TR,\n '*': document.createElement('div'),\n };\n}\nexport default function createDom(str) {\n if (!TABLE) {\n initConstants();\n }\n var name = FRAGMENT_REG.test(str) && RegExp.$1;\n if (!name || !(name in CONTAINERS)) {\n name = '*';\n }\n var container = CONTAINERS[name];\n str = typeof str === 'string' ? str.replace(/(^\\s*)|(\\s*$)/g, '') : str;\n container.innerHTML = '' + str;\n var dom = container.childNodes[0];\n if (dom && container.contains(dom)) {\n container.removeChild(dom);\n }\n return dom;\n}\n//# sourceMappingURL=create-dom.js.map","export default function modifyCSS(dom, css) {\n if (dom) {\n for (var key in css) {\n if (css.hasOwnProperty(key)) {\n dom.style[key] = css[key];\n }\n }\n }\n return dom;\n}\n//# sourceMappingURL=modify-css.js.map","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","// This file is autogenerated. It's used to publish ESM to npm.\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\nvar trimLeft = /^\\s+/;\nvar trimRight = /\\s+$/;\nfunction tinycolor(color, opts) {\n color = color ? color : \"\";\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n var rgb = inputToRGB(color);\n this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) this._r = Math.round(this._r);\n if (this._g < 1) this._g = Math.round(this._g);\n if (this._b < 1) this._b = Math.round(this._b);\n this._ok = rgb.ok;\n}\ntinycolor.prototype = {\n isDark: function isDark() {\n return this.getBrightness() < 128;\n },\n isLight: function isLight() {\n return !this.isDark();\n },\n isValid: function isValid() {\n return this._ok;\n },\n getOriginalInput: function getOriginalInput() {\n return this._originalInput;\n },\n getFormat: function getFormat() {\n return this._format;\n },\n getAlpha: function getAlpha() {\n return this._a;\n },\n getBrightness: function getBrightness() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function getLuminance() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r / 255;\n GsRGB = rgb.g / 255;\n BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n },\n setAlpha: function setAlpha(value) {\n this._a = boundAlpha(value);\n this._roundA = Math.round(100 * this._a) / 100;\n return this;\n },\n toHsv: function toHsv() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return {\n h: hsv.h * 360,\n s: hsv.s,\n v: hsv.v,\n a: this._a\n };\n },\n toHsvString: function toHsvString() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = Math.round(hsv.h * 360),\n s = Math.round(hsv.s * 100),\n v = Math.round(hsv.v * 100);\n return this._a == 1 ? \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" : \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + this._roundA + \")\";\n },\n toHsl: function toHsl() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return {\n h: hsl.h * 360,\n s: hsl.s,\n l: hsl.l,\n a: this._a\n };\n },\n toHslString: function toHslString() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = Math.round(hsl.h * 360),\n s = Math.round(hsl.s * 100),\n l = Math.round(hsl.l * 100);\n return this._a == 1 ? \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" : \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + this._roundA + \")\";\n },\n toHex: function toHex(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function toHexString(allow3Char) {\n return \"#\" + this.toHex(allow3Char);\n },\n toHex8: function toHex8(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function toHex8String(allow4Char) {\n return \"#\" + this.toHex8(allow4Char);\n },\n toRgb: function toRgb() {\n return {\n r: Math.round(this._r),\n g: Math.round(this._g),\n b: Math.round(this._b),\n a: this._a\n };\n },\n toRgbString: function toRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \")\" : \"rgba(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function toPercentageRgb() {\n return {\n r: Math.round(bound01(this._r, 255) * 100) + \"%\",\n g: Math.round(bound01(this._g, 255) * 100) + \"%\",\n b: Math.round(bound01(this._b, 255) * 100) + \"%\",\n a: this._a\n };\n },\n toPercentageRgbString: function toPercentageRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%)\" : \"rgba(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function toName() {\n if (this._a === 0) {\n return \"transparent\";\n }\n if (this._a < 1) {\n return false;\n }\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function toFilter(secondColor) {\n var hex8String = \"#\" + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = \"#\" + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n return \"progid:DXImageTransform.Microsoft.gradient(\" + gradientType + \"startColorstr=\" + hex8String + \",endColorstr=\" + secondHex8String + \")\";\n },\n toString: function toString(format) {\n var formatSet = !!format;\n format = format || this._format;\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n },\n clone: function clone() {\n return tinycolor(this.toString());\n },\n _applyModification: function _applyModification(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function lighten() {\n return this._applyModification(_lighten, arguments);\n },\n brighten: function brighten() {\n return this._applyModification(_brighten, arguments);\n },\n darken: function darken() {\n return this._applyModification(_darken, arguments);\n },\n desaturate: function desaturate() {\n return this._applyModification(_desaturate, arguments);\n },\n saturate: function saturate() {\n return this._applyModification(_saturate, arguments);\n },\n greyscale: function greyscale() {\n return this._applyModification(_greyscale, arguments);\n },\n spin: function spin() {\n return this._applyModification(_spin, arguments);\n },\n _applyCombination: function _applyCombination(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function analogous() {\n return this._applyCombination(_analogous, arguments);\n },\n complement: function complement() {\n return this._applyCombination(_complement, arguments);\n },\n monochromatic: function monochromatic() {\n return this._applyCombination(_monochromatic, arguments);\n },\n splitcomplement: function splitcomplement() {\n return this._applyCombination(_splitcomplement, arguments);\n },\n // Disabled until https://github.com/bgrins/TinyColor/issues/254\n // polyad: function (number) {\n // return this._applyCombination(polyad, [number]);\n // },\n triad: function triad() {\n return this._applyCombination(polyad, [3]);\n },\n tetrad: function tetrad() {\n return this._applyCombination(polyad, [4]);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function (color, opts) {\n if (_typeof(color) == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n var rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n if (_typeof(color) == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a\n };\n}\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// \n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n l: l\n };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n v = max;\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n v: v\n };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) return false;\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\ntinycolor.random = function () {\n return tinycolor.fromRatio({\n r: Math.random(),\n g: Math.random(),\n b: Math.random()\n });\n};\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// \n\nfunction _desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\nfunction _saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\nfunction _greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\nfunction _lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\nfunction _brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return tinycolor(rgb);\n}\nfunction _darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// \n\nfunction _complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\nfunction polyad(color, number) {\n if (isNaN(number) || number <= 0) {\n throw new Error(\"Argument to polyad must be a positive number\");\n }\n var hsl = tinycolor(color).toHsl();\n var result = [tinycolor(color)];\n var step = 360 / number;\n for (var i = 1; i < number; i++) {\n result.push(tinycolor({\n h: (hsl.h + i * step) % 360,\n s: hsl.s,\n l: hsl.l\n }));\n }\n return result;\n}\nfunction _splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [tinycolor(color), tinycolor({\n h: (h + 72) % 360,\n s: hsl.s,\n l: hsl.l\n }), tinycolor({\n h: (h + 216) % 360,\n s: hsl.s,\n l: hsl.l\n })];\n}\nfunction _analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\nfunction _monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n while (results--) {\n ret.push(tinycolor({\n h: h,\n s: s,\n v: v\n }));\n v = (v + modification) % 1;\n }\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function (color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a\n };\n return tinycolor(rgba);\n};\n\n// Readability Functions\n// ---------------------\n// false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function (color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n out = false;\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function (baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors;\n level = args.level;\n size = args.size;\n for (var i = 0; i < colorList.length; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n if (tinycolor.isReadable(baseColor, bestColor, {\n level: level,\n size: size\n }) || !includeFallbackColors) {\n return bestColor;\n } else {\n args.includeFallbackColors = false;\n return tinycolor.mostReadable(baseColor, [\"#fff\", \"#000\"], args);\n }\n};\n\n// Big List of Colors\n// ------------------\n// \nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) n = \"100%\";\n var processPercent = isPercentage(n);\n n = Math.min(max, Math.max(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return n % max / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf(\".\") != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf(\"%\") != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? \"0\" + c : \"\" + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\nvar matchers = function () {\n // \n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // \n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n}();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n color = color.replace(trimLeft, \"\").replace(trimRight, \"\").toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == \"transparent\") {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n format: \"name\"\n };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if (match = matchers.rgb.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3]\n };\n }\n if (match = matchers.rgba.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsl.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3]\n };\n }\n if (match = matchers.hsla.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsv.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3]\n };\n }\n if (match = matchers.hsva.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hex8.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex6.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if (match = matchers.hex4.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n a: convertHexToDecimal(match[4] + \"\" + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex3.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n return false;\n}\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\n level: \"AA\",\n size: \"small\"\n };\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\n level: level,\n size: size\n };\n}\n\nexport { tinycolor as default };\n","import tinycolor from 'tinycolor2';\n\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = tinycolor(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = pColor.toHsv();\n var colorString = tinycolor({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }).toHexString();\n patterns.push(colorString);\n }\n\n patterns.push(pColor.toHexString());\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = pColor.toHsv();\n\n var _colorString = tinycolor({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }).toHexString();\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref) {\n var index = _ref.index,\n opacity = _ref.opacity;\n var darkColorString = tinycolor.mix(opts.backgroundColor || '#141414', patterns[index], opacity * 100).toHexString();\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\n\nexport { blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow };\n","import color from 'color';\nimport { generate } from '@ant-design/colors';\n/**\n * get the mix color of backColor and frontColor with alpha\n * @param backColor background color\n * @param frontColor foreground color\n * @param frontAlpha the opacity of foreground color\n */\nexport var mixColor = function mixColor(backColor, frontColor, frontAlpha) {\n var bc = color(backColor);\n var fc = color(frontColor);\n return color([(1 - frontAlpha) * bc.red() + frontAlpha * fc.red(), (1 - frontAlpha) * bc.green() + frontAlpha * fc.green(), (1 - frontAlpha) * bc.blue() + frontAlpha * fc.blue()]).rgb();\n};\nvar getColorsWithDefaultTheme = function getColorsWithDefaultTheme(subjectColor, backColor, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n var subjectColor005 = mixColor(backColor, subjectColor, 0.05).rgb().toString();\n var subjectColor01 = mixColor(backColor, subjectColor, 0.1).rgb().toString();\n var subjectColor02 = mixColor(backColor, subjectColor, 0.2).rgb().toString();\n var subjectColor04 = mixColor(backColor, subjectColor, 0.4).rgb().toString();\n var disableColor002 = mixColor(backColor, disableColor, 0.02).rgb().toString();\n var disableColor005 = mixColor(backColor, disableColor, 0.05).rgb().toString();\n var disableColor01 = mixColor(backColor, disableColor, 0.1).rgb().toString();\n var disableColor02 = mixColor(backColor, disableColor, 0.2).rgb().toString();\n var disableColor03 = mixColor(backColor, disableColor, 0.3).rgb().toString();\n var paletteFromSubject = generate(subjectColor, {\n theme: 'default',\n backgroundColor: backColor\n });\n var subjectHex = color(subjectColor).hex().toLowerCase();\n var subjectIdx = paletteFromSubject.indexOf(subjectHex);\n var deeperSubject = subjectColor;\n if (subjectIdx !== -1) {\n deeperSubject = paletteFromSubject[subjectIdx + 1];\n }\n return {\n // for nodes\n mainStroke: subjectColor,\n mainFill: subjectColor01,\n activeStroke: subjectColor,\n activeFill: subjectColor005,\n inactiveStroke: subjectColor04,\n inactiveFill: subjectColor005,\n selectedStroke: subjectColor,\n selectedFill: backColor,\n highlightStroke: deeperSubject,\n highlightFill: subjectColor02,\n disableStroke: disableColor03,\n disableFill: disableColor005,\n // for edges\n edgeMainStroke: disableColor03,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: disableColor02,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: disableColor01,\n // for combos\n comboMainStroke: disableColor03,\n comboMainFill: disableColor002,\n comboActiveStroke: subjectColor,\n comboActiveFill: subjectColor005,\n comboInactiveStroke: disableColor03,\n comboInactiveFill: disableColor002,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: disableColor002,\n comboHighlightStroke: deeperSubject,\n comboHighlightFill: disableColor002,\n comboDisableStroke: disableColor02,\n comboDisableFill: disableColor005\n };\n};\nvar getColorsWithDarkTheme = function getColorsWithDarkTheme(subjectColor, backColor, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (disableColor === void 0) {\n disableColor = '#777';\n }\n var subjectColor02 = mixColor(backColor, subjectColor, 0.2).rgb().toString();\n var subjectColor03 = mixColor(backColor, subjectColor, 0.3).rgb().toString();\n var subjectColor06 = mixColor(backColor, subjectColor, 0.6).rgb().toString();\n var subjectColor08 = mixColor(backColor, subjectColor, 0.8).rgb().toString();\n var disableColor02 = mixColor(backColor, disableColor, 0.2).rgb().toString();\n var disableColor025 = mixColor(backColor, disableColor, 0.25).rgb().toString();\n var disableColor03 = mixColor(backColor, disableColor, 0.3).rgb().toString();\n var disableColor04 = mixColor(backColor, disableColor, 0.4).rgb().toString();\n var disableColor05 = mixColor(backColor, disableColor, 0.5).rgb().toString();\n var paletteFromSubject = generate(subjectColor, {\n theme: 'dark',\n backgroundColor: backColor\n });\n var subjectHex = color(subjectColor).hex().toLowerCase();\n var subjectIdx = paletteFromSubject.indexOf(subjectHex);\n var deeperSubject = subjectColor;\n if (subjectIdx !== -1) {\n deeperSubject = paletteFromSubject[subjectIdx + 1];\n }\n return {\n // for nodes\n mainStroke: subjectColor08,\n mainFill: subjectColor02,\n activeStroke: subjectColor,\n activeFill: subjectColor03,\n inactiveStroke: subjectColor08,\n inactiveFill: subjectColor02,\n selectedStroke: subjectColor,\n selectedFill: subjectColor02,\n highlightStroke: subjectColor,\n highlightFill: subjectColor06,\n disableStroke: disableColor05,\n disableFill: disableColor025,\n // for edges\n edgeMainStroke: disableColor,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: disableColor,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: disableColor03,\n // for combos\n comboMainStroke: disableColor04,\n comboMainFill: disableColor025,\n comboActiveStroke: subjectColor,\n comboActiveFill: disableColor02,\n comboInactiveStroke: disableColor04,\n comboInactiveFill: disableColor025,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: disableColor02,\n comboHighlightStroke: deeperSubject,\n comboHighlightFill: disableColor025,\n comboDisableStroke: disableColor04,\n comboDisableFill: disableColor02\n };\n};\n/**\n * get the set of colors according to the subject color and background color\n * @param subjectColor the subject color\n * @param backColor background color\n * @param disableColor the color for disable state\n */\nexport var getColorsWithSubjectColor = function getColorsWithSubjectColor(subjectColor, backColor, theme, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (theme === void 0) {\n theme = 'default';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n if (theme === 'default') return getColorsWithDefaultTheme(subjectColor, backColor, 'rgb(150, 150, 150)');\n return getColorsWithDarkTheme(subjectColor, backColor, '#777');\n};\nexport var getColorSetsBySubjectColors = function getColorSetsBySubjectColors(subjectColors, backColor, theme, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (theme === void 0) {\n theme = 'default';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n var sets = [];\n subjectColors.forEach(function (sColor) {\n sets.push(getColorsWithSubjectColor(sColor, backColor, theme, disableColor));\n });\n return sets;\n};","import { getColorsWithSubjectColor } from './util/color';\nvar subjectColor = 'rgb(95, 149, 255)';\nvar backColor = 'rgb(255, 255, 255)';\nvar textColor = 'rgb(0, 0, 0)';\nvar colorSet = getColorsWithSubjectColor(subjectColor, backColor);\nexport default {\n version: '0.8.23',\n rootContainerClassName: 'root-container',\n nodeContainerClassName: 'node-container',\n edgeContainerClassName: 'edge-container',\n comboContainerClassName: 'combo-container',\n delegateContainerClassName: 'delegate-container',\n defaultLoopPosition: 'top',\n nodeLabel: {\n style: {\n fill: '#000',\n fontSize: 12,\n textAlign: 'center',\n textBaseline: 'middle'\n },\n offset: 4 // 节点的默认文本不居中时的偏移量\n },\n\n defaultNode: {\n type: 'circle',\n style: {\n lineWidth: 1,\n stroke: colorSet.mainStroke,\n fill: colorSet.mainFill\n },\n size: 20,\n color: colorSet.mainStroke,\n linkPoints: {\n size: 8,\n lineWidth: 1,\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke\n }\n },\n // 节点应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n nodeStateStyles: {\n active: {\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke,\n lineWidth: 2,\n shadowColor: colorSet.mainStroke,\n shadowBlur: 10\n },\n selected: {\n fill: colorSet.selectedFill,\n stroke: colorSet.selectedStroke,\n lineWidth: 4,\n shadowColor: colorSet.selectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n fill: colorSet.highlightFill,\n stroke: colorSet.highlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n fill: colorSet.inactiveFill,\n stroke: colorSet.inactiveStroke,\n lineWidth: 1\n },\n disable: {\n fill: colorSet.disableFill,\n stroke: colorSet.disableStroke,\n lineWidth: 1\n }\n },\n edgeLabel: {\n style: {\n fill: textColor,\n textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n }\n },\n defaultEdge: {\n type: 'line',\n size: 1,\n style: {\n stroke: colorSet.edgeMainStroke,\n lineAppendWidth: 2\n },\n color: colorSet.edgeMainStroke\n },\n // 边应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n edgeStateStyles: {\n active: {\n stroke: colorSet.edgeActiveStroke,\n lineWidth: 1\n },\n selected: {\n stroke: colorSet.edgeSelectedStroke,\n lineWidth: 2,\n shadowColor: colorSet.edgeSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.edgeHighlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.edgeInactiveStroke,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.edgeDisableStroke,\n lineWidth: 1\n }\n },\n comboLabel: {\n style: {\n fill: textColor,\n // textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n },\n refY: 10,\n refX: 10 // Combo 的默认文本不居中时的偏移量\n },\n\n defaultCombo: {\n type: 'circle',\n style: {\n fill: colorSet.comboMainFill,\n lineWidth: 1,\n stroke: colorSet.comboMainStroke,\n r: 5,\n width: 20,\n height: 10\n },\n size: [20, 5],\n color: colorSet.comboMainStroke,\n padding: [25, 20, 15, 20]\n },\n // combo 应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n comboStateStyles: {\n active: {\n stroke: colorSet.comboActiveStroke,\n lineWidth: 1,\n fill: colorSet.comboActiveFill\n },\n selected: {\n stroke: colorSet.comboSelectedStroke,\n lineWidth: 2,\n fill: colorSet.comboSelectedFill,\n shadowColor: colorSet.comboSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.comboHighlightStroke,\n lineWidth: 2,\n fill: colorSet.comboHighlightFill,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.comboInactiveStroke,\n fill: colorSet.comboInactiveFill,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.comboDisableStroke,\n fill: colorSet.comboDisableFill,\n lineWidth: 1\n }\n },\n delegateStyle: {\n fill: '#F3F9FF',\n fillOpacity: 0.5,\n stroke: '#1890FF',\n strokeOpacity: 0.9,\n lineDash: [5, 5]\n },\n // 文本水印默认配置\n textWaterMarkerConfig: {\n width: 150,\n height: 100,\n compatible: false,\n text: {\n x: 0,\n y: 60,\n lineHeight: 20,\n rotate: 20,\n fontSize: 14,\n fontFamily: 'Microsoft YaHei',\n fill: 'rgba(0, 0, 0, 0.1)',\n baseline: 'Middle'\n }\n },\n imageWaterMarkerConfig: {\n width: 150,\n height: 130,\n compatible: false,\n image: {\n x: 0,\n y: 0,\n width: 30,\n height: 20,\n rotate: 0\n }\n },\n waterMarkerImage: 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg'\n};","/**\n * Clone group and clone the clip shapes of image shapes.\n * @param group group to be cloned\n * @returns cloned group with same clipped shapes of original group\n */\nexport var cloneGElement = function cloneGElement(element) {\n var vElement = element.clone();\n applyCloneClip(element, vElement);\n return vElement;\n};\n/**\n * Apply the clipShape for image shapes from original element to cloned one (clonedElement).\n * @param element original element\n * @param clonedElement cloned element of original element\n */\nvar applyCloneClip = function applyCloneClip(element, clonedElement) {\n var _a;\n if (element.isGroup() && clonedElement.isGroup()) {\n (_a = element.get('children')) === null || _a === void 0 ? void 0 : _a.forEach(function (child, i) {\n var clonedChild = clonedElement.get('children')[i];\n applyCloneClip(child, clonedChild);\n });\n }\n var type = element.get('type');\n var clonedType = clonedElement.get('type');\n if (type !== 'image' || clonedType !== 'image') return;\n var clipShape = element.get('clipShape');\n if (clipShape) {\n clonedElement.setClip({\n type: clipShape.get('type'),\n attrs: clipShape.attr()\n });\n }\n};","import { __extends } from \"tslib\";\nimport { addEventListener } from '@antv/dom-util';\nimport { each, isNil, wrapBehavior } from '@antv/util';\nimport { AbstractEvent, Util } from '@antv/g6-core';\nvar cloneEvent = Util.cloneEvent,\n isViewportChanged = Util.isViewportChanged;\nvar EventController = /** @class */function (_super) {\n __extends(EventController, _super);\n function EventController(graph) {\n var _this = _super.call(this, graph) || this;\n _this.extendEvents = [];\n _this.dragging = false;\n _this.mousedown = false;\n _this.preItem = null;\n _this.destroy();\n _this.graph = graph;\n _this.destroyed = false;\n _this.initEvents();\n return _this;\n }\n // 初始化 G6 中的事件\n EventController.prototype.initEvents = function () {\n var _a = this,\n graph = _a.graph,\n _b = _a.extendEvents,\n extendEvents = _b === void 0 ? [] : _b;\n var canvas = graph.get('canvas');\n // canvas.set('draggable', true);\n var el = canvas.get('el');\n var canvasHandler = wrapBehavior(this, 'onCanvasEvents');\n var originHandler = wrapBehavior(this, 'onExtendEvents');\n var wheelHandler = wrapBehavior(this, 'onWheelEvent');\n // each(EVENTS, event => {\n // canvas.off(event).on(event, canvasHandler);\n // });\n canvas.off('*').on('*', canvasHandler);\n this.canvasHandler = canvasHandler;\n extendEvents.push(addEventListener(el, 'wheel', wheelHandler));\n if (typeof window !== 'undefined') {\n extendEvents.push(addEventListener(window, 'keydown', originHandler));\n extendEvents.push(addEventListener(window, 'keyup', originHandler));\n extendEvents.push(addEventListener(window, 'focus', originHandler));\n }\n // 数据变更,重置一些状态\n if (this.resetHandler) graph.off('afterchangedata', this.resetHandler);\n this.resetHandler = wrapBehavior(this, 'resetStatus');\n graph.on('afterchangedata', this.resetHandler);\n };\n // 获取 shape 的 item 对象\n EventController.getItemRoot = function (shape) {\n while (shape && !shape.get('item')) {\n shape = shape.get('parent');\n }\n return shape;\n };\n /**\n * 处理 canvas 事件\n * @param evt 事件句柄\n */\n EventController.prototype.onCanvasEvents = function (evt) {\n var _this = this;\n var graph = this.graph;\n var canvas = graph.get('canvas');\n var target = evt.target;\n var eventType = evt.type;\n switch (eventType) {\n // solve G's problem: mousemove and mouseup are not triggered with drag and dragend\n case 'drag':\n this.onCanvasEvents(Object.assign({}, evt, {\n type: 'mousemove'\n }));\n break;\n case 'dragend':\n this.onCanvasEvents(Object.assign({}, evt, {\n type: 'mouseup'\n }));\n break;\n // solve G's problem: mousedown on other DOMs, mouseup on canvas, click event is triggered unexpectedly\n case 'mousedown':\n this.mousedown = true;\n break;\n case 'mouseup':\n // mouseup happend before click, so setTimeout to reset the tag for reference in click event\n setTimeout(function () {\n return _this.mousedown = false;\n });\n break;\n case 'click':\n // the mousedown is not happend, the click is invalid\n if (!this.mousedown) return;\n break;\n default:\n break;\n }\n /**\n * (clientX, clientY): 相对于页面的坐标;\n * (canvasX, canvasY): 相对于 左上角的坐标;\n * (x, y): 相对于整个画布的坐标, 与 model 的 x, y 是同一维度的。\n */\n evt.canvasX = evt.x;\n evt.canvasY = evt.y;\n var point = {\n x: evt.canvasX,\n y: evt.canvasY\n };\n var group = graph.get('group');\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n if (isViewportChanged(matrix)) {\n point = graph.getPointByClient(evt.clientX, evt.clientY);\n }\n evt.x = point.x;\n evt.y = point.y;\n evt.currentTarget = graph;\n if (target === canvas) {\n if (eventType === 'mousemove' || eventType === 'mouseleave') {\n this.handleMouseMove(evt, 'canvas');\n }\n evt.target = canvas;\n evt.item = null;\n graph.emit(eventType, evt);\n graph.emit(\"canvas:\".concat(eventType), evt);\n return;\n }\n var itemShape = EventController.getItemRoot(target);\n if (!itemShape) {\n graph.emit(eventType, evt);\n return;\n }\n var item = itemShape.get('item');\n if (item.destroyed) {\n return;\n }\n var type = item.getType();\n // 事件target是触发事件的Shape实例,item是触发事件的item实例\n evt.target = target;\n evt.item = item;\n if (evt.canvasX === evt.x && evt.canvasY === evt.y) {\n var canvasPoint = graph.getCanvasByPoint(evt.x, evt.y);\n evt.canvasX = canvasPoint.x;\n evt.canvasY = canvasPoint.y;\n }\n if (evt.name && !evt.name.includes(':')) {\n graph.emit(\"\".concat(type, \":\").concat(eventType), evt); // emit('node:click', evt)\n graph.emit(eventType, evt); // emit('click', evt);\n } else if (evt.name) {\n graph.emit(evt.name, evt); // emit('text-shape:click', evt)\n }\n\n if (eventType === 'dragstart') {\n this.dragging = true;\n }\n if (eventType === 'dragend') {\n this.dragging = false;\n }\n if (eventType === 'mousemove') {\n this.handleMouseMove(evt, type);\n }\n };\n /**\n * 处理扩展事件\n * @param evt 事件句柄\n */\n EventController.prototype.onExtendEvents = function (evt) {\n this.graph.emit(evt.type, evt);\n };\n /**\n * 处理滚轮事件\n * @param evt 事件句柄\n */\n EventController.prototype.onWheelEvent = function (evt) {\n if (isNil(evt.wheelDelta)) {\n evt.wheelDelta = -evt.detail;\n }\n this.graph.emit('wheel', evt);\n };\n /**\n * 处理鼠标移动的事件\n * @param evt 事件句柄\n * @param type item 类型\n */\n EventController.prototype.handleMouseMove = function (evt, type) {\n var _a = this,\n graph = _a.graph,\n preItem = _a.preItem;\n var canvas = graph.get('canvas');\n var item = evt.target === canvas ? null : evt.item;\n evt = cloneEvent(evt);\n // 从前一个item直接移动到当前item,触发前一个item的leave事件\n if (preItem && preItem !== item && !preItem.destroyed) {\n evt.item = preItem;\n this.emitCustomEvent(preItem.getType(), 'mouseleave', evt);\n if (this.dragging) {\n this.emitCustomEvent(preItem.getType(), 'dragleave', evt);\n }\n }\n // 从一个item或canvas移动到当前item,触发当前item的enter事件\n if (item && preItem !== item) {\n evt.item = item;\n this.emitCustomEvent(type, 'mouseenter', evt);\n if (this.dragging) {\n this.emitCustomEvent(type, 'dragenter', evt);\n }\n }\n this.preItem = item;\n };\n /**\n * 在 graph 上面 emit 事件\n * @param itemType item 类型\n * @param eventType 事件类型\n * @param evt 事件句柄\n */\n EventController.prototype.emitCustomEvent = function (itemType, eventType, evt) {\n evt.type = eventType;\n this.graph.emit(\"\".concat(itemType, \":\").concat(eventType), evt);\n };\n EventController.prototype.resetStatus = function () {\n this.mousedown = false;\n this.dragging = false;\n this.preItem = null;\n };\n EventController.prototype.destroy = function () {\n var _a = this,\n graph = _a.graph,\n canvasHandler = _a.canvasHandler,\n extendEvents = _a.extendEvents;\n var canvas = graph.get('canvas');\n // each(EVENTS, event => {\n // canvas.off(event, canvasHandler);\n // });\n canvas.off('*', canvasHandler);\n each(extendEvents, function (event) {\n event.remove();\n });\n this.resetStatus();\n this.extendEvents.length = 0;\n this.canvasHandler = null;\n this.resetHandler = null;\n this.destroyed = true;\n };\n return EventController;\n}(AbstractEvent);\nexport default EventController;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Base = void 0;\nvar Base = /** @class */ (function () {\n function Base() {\n this.nodes = [];\n this.edges = [];\n this.combos = [];\n this.comboEdges = [];\n this.hiddenNodes = [];\n this.hiddenEdges = [];\n this.hiddenCombos = [];\n // temp edges e.g. the edge generated for releated collapsed combo\n this.vedges = [];\n this.positions = [];\n this.destroyed = false;\n this.onLayoutEnd = function () { };\n }\n Base.prototype.layout = function (data) {\n this.init(data);\n return this.execute(true);\n };\n Base.prototype.init = function (data) {\n this.nodes = data.nodes || [];\n this.edges = data.edges || [];\n this.combos = data.combos || [];\n this.comboEdges = data.comboEdges || [];\n this.hiddenNodes = data.hiddenNodes || [];\n this.hiddenEdges = data.hiddenEdges || [];\n this.hiddenCombos = data.hiddenCombos || [];\n this.vedges = data.vedges || [];\n };\n Base.prototype.execute = function (reloadData) { };\n Base.prototype.executeWithWorker = function () { };\n Base.prototype.getDefaultCfg = function () {\n return {};\n };\n Base.prototype.updateCfg = function (cfg) {\n if (cfg) {\n Object.assign(this, cfg);\n }\n };\n Base.prototype.getType = function () {\n return 'base';\n };\n Base.prototype.destroy = function () {\n this.nodes = null;\n this.edges = null;\n this.combos = null;\n this.positions = null;\n this.destroyed = true;\n };\n return Base;\n}());\nexports.Base = Base;\n//# sourceMappingURL=base.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelize = exports.isString = void 0;\nvar isString = function (val) { return typeof val === 'string'; };\nexports.isString = isString;\nvar cacheStringFunction = function (fn) {\n var cache = Object.create(null);\n return (function (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str));\n });\n};\nvar camelizeRE = /-(\\w)/g;\nexports.camelize = cacheStringFunction(function (str) {\n return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\n// export const capitalize = cacheStringFunction(\n// (str: string) => str.charAt(0).toUpperCase() + str.slice(1),\n// )\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArray = void 0;\nexports.isArray = Array.isArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toNumber = exports.isNaN = exports.isNumber = void 0;\nvar isNumber = function (val) { return typeof val === 'number'; };\nexports.isNumber = isNumber;\nvar isNaN = function (num) { return Number.isNaN(Number(num)); };\nexports.isNaN = isNaN;\nvar toNumber = function (val) {\n var n = parseFloat(val);\n return (0, exports.isNaN)(n) ? val : n;\n};\nexports.toNumber = toNumber;\n//# sourceMappingURL=number.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clone = exports.isObject = void 0;\nvar isObject = function (val) {\n return val !== null && typeof val === 'object';\n};\nexports.isObject = isObject;\nvar clone = function (target) {\n if (target === null) {\n return target;\n }\n if (target instanceof Date) {\n return new Date(target.getTime());\n }\n if (target instanceof Array) {\n var cp_1 = [];\n target.forEach(function (v) {\n cp_1.push(v);\n });\n return cp_1.map(function (n) { return (0, exports.clone)(n); });\n }\n if (typeof target === 'object' && Object.keys(target).length) {\n var cp_2 = __assign({}, target);\n Object.keys(cp_2).forEach(function (k) {\n cp_2[k] = (0, exports.clone)(cp_2[k]);\n });\n return cp_2;\n }\n return target;\n};\nexports.clone = clone;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCoreNodeAndRelativeLeafNodes = exports.getAvgNodePosition = exports.getLayoutBBox = exports.traverseTreeUp = exports.scaleMatrix = exports.getAdjMatrix = exports.floydWarshall = exports.getDegreeMap = exports.getDegree = exports.getEdgeTerminal = void 0;\nvar array_1 = require(\"./array\");\nvar number_1 = require(\"./number\");\nvar object_1 = require(\"./object\");\nvar getEdgeTerminal = function (edge, type) {\n var terminal = edge[type];\n if ((0, object_1.isObject)(terminal)) {\n return terminal.cell;\n }\n return terminal;\n};\nexports.getEdgeTerminal = getEdgeTerminal;\nvar getDegree = function (n, nodeIdxMap, edges) {\n var degrees = [];\n for (var i = 0; i < n; i++) {\n degrees[i] = {\n in: 0,\n out: 0,\n all: 0\n };\n }\n if (!edges)\n return degrees;\n edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n if (source && degrees[nodeIdxMap[source]]) {\n degrees[nodeIdxMap[source]].out += 1;\n degrees[nodeIdxMap[source]].all += 1;\n }\n if (target && degrees[nodeIdxMap[target]]) {\n degrees[nodeIdxMap[target]].in += 1;\n degrees[nodeIdxMap[target]].all += 1;\n }\n });\n return degrees;\n};\nexports.getDegree = getDegree;\nvar getDegreeMap = function (nodes, edges) {\n var degreesMap = {};\n nodes.forEach(function (node) {\n degreesMap[node.id] = {\n in: 0,\n out: 0,\n all: 0\n };\n });\n if (!edges)\n return degreesMap;\n edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n if (source) {\n degreesMap[source].out += 1;\n degreesMap[source].all += 1;\n }\n if (target) {\n degreesMap[target].in += 1;\n degreesMap[target].all += 1;\n }\n });\n return degreesMap;\n};\nexports.getDegreeMap = getDegreeMap;\nvar floydWarshall = function (adjMatrix) {\n // initialize\n var dist = [];\n var size = adjMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n }\n else if (adjMatrix[i][j] === 0 || !adjMatrix[i][j]) {\n dist[i][j] = Infinity;\n }\n else {\n dist[i][j] = adjMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nexports.floydWarshall = floydWarshall;\nvar getAdjMatrix = function (data, directed) {\n var nodes = data.nodes, edges = data.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error('invalid nodes data!');\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n edges === null || edges === void 0 ? void 0 : edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (sIndex === undefined || tIndex === undefined)\n return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n return matrix;\n};\nexports.getAdjMatrix = getAdjMatrix;\n/**\n * scale matrix\n * @param matrix [ [], [], [] ]\n * @param ratio\n */\nvar scaleMatrix = function (matrix, ratio) {\n var result = [];\n matrix.forEach(function (row) {\n var newRow = [];\n row.forEach(function (v) {\n newRow.push(v * ratio);\n });\n result.push(newRow);\n });\n return result;\n};\nexports.scaleMatrix = scaleMatrix;\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseUp = function (data, fn) {\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverseUp(data.children[i], fn))\n return;\n }\n }\n if (!fn(data)) {\n return false;\n }\n return true;\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseTreeUp = function (data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverseUp(data, fn);\n};\nexports.traverseTreeUp = traverseTreeUp;\n/**\n * calculate the bounding box for the nodes according to their x, y, and size\n * @param nodes nodes in the layout\n * @returns\n */\nvar getLayoutBBox = function (nodes) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n nodes.forEach(function (node) {\n var size = node.size;\n if ((0, array_1.isArray)(size)) {\n if (size.length === 1)\n size = [size[0], size[0]];\n }\n else if ((0, number_1.isNumber)(size)) {\n size = [size, size];\n }\n else if (size === undefined || isNaN(size)) {\n size = [30, 30];\n }\n var halfSize = [size[0] / 2, size[1] / 2];\n var left = node.x - halfSize[0];\n var right = node.x + halfSize[0];\n var top = node.y - halfSize[1];\n var bottom = node.y + halfSize[1];\n if (minX > left)\n minX = left;\n if (minY > top)\n minY = top;\n if (maxX < right)\n maxX = right;\n if (maxY < bottom)\n maxY = bottom;\n });\n return { minX: minX, minY: minY, maxX: maxX, maxY: maxY };\n};\nexports.getLayoutBBox = getLayoutBBox;\n/**\n * 获取节点集合的平均位置信息\n * @param nodes 节点集合\n * @returns 平局内置\n */\nvar getAvgNodePosition = function (nodes) {\n var totalNodes = { x: 0, y: 0 };\n nodes.forEach(function (node) {\n totalNodes.x += node.x || 0;\n totalNodes.y += node.y || 0;\n });\n // 获取均值向量\n var length = nodes.length || 1;\n return {\n x: totalNodes.x / length,\n y: totalNodes.y / length,\n };\n};\nexports.getAvgNodePosition = getAvgNodePosition;\n// 找出指定节点关联的边的起点或终点\nvar getCoreNode = function (type, node, edges) {\n var _a, _b;\n if (type === 'source') {\n return (((_a = edges === null || edges === void 0 ? void 0 : edges.find(function (edge) { return edge.target === node.id; })) === null || _a === void 0 ? void 0 : _a.source) || {});\n }\n return (((_b = edges === null || edges === void 0 ? void 0 : edges.find(function (edge) { return edge.source === node.id; })) === null || _b === void 0 ? void 0 : _b.target) || {});\n};\n// 找出指定节点为起点或终点的所有一度叶子节点\nvar getRelativeNodeIds = function (type, coreNode, edges) {\n var relativeNodes = [];\n switch (type) {\n case 'source':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.source === coreNode.id; }).map(function (edge) { return edge.target; });\n break;\n case 'target':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.target === coreNode.id; }).map(function (edge) { return edge.source; });\n break;\n case 'both':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.source === coreNode.id; }).map(function (edge) { return edge.target; }).concat(edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.target === coreNode.id; }).map(function (edge) { return edge.source; }));\n break;\n default:\n break;\n }\n // 去重\n var set = new Set(relativeNodes);\n return Array.from(set);\n};\n// 找出同类型的节点\nvar getSameTypeNodes = function (type, nodeClusterBy, node, relativeNodes, degreesMap) {\n // @ts-ignore\n var typeName = node[nodeClusterBy] || '';\n // @ts-ignore\n var sameTypeNodes = (relativeNodes === null || relativeNodes === void 0 ? void 0 : relativeNodes.filter(function (item) { return item[nodeClusterBy] === typeName; })) || [];\n if (type === 'leaf') {\n sameTypeNodes = sameTypeNodes.filter(function (node) { var _a, _b; return ((_a = degreesMap[node.id]) === null || _a === void 0 ? void 0 : _a.in) === 0 || ((_b = degreesMap[node.id]) === null || _b === void 0 ? void 0 : _b.out) === 0; });\n }\n return sameTypeNodes;\n};\n// 找出与指定节点关联的边的起点或终点出发的所有一度叶子节点\nvar getCoreNodeAndRelativeLeafNodes = function (type, node, edges, nodeClusterBy, degreesMap, nodeMap) {\n var _a = degreesMap[node.id], inDegree = _a.in, outDegree = _a.out;\n var coreNode = node;\n var relativeLeafNodes = [];\n if (inDegree === 0) {\n // 如果为没有出边的叶子节点,则找出与它关联的边的起点出发的所有一度节点\n coreNode = getCoreNode('source', node, edges);\n relativeLeafNodes = getRelativeNodeIds('both', coreNode, edges).map(function (nodeId) { return nodeMap[nodeId]; });\n }\n else if (outDegree === 0) {\n // 如果为没有入边边的叶子节点,则找出与它关联的边的起点出发的所有一度节点\n coreNode = getCoreNode('target', node, edges);\n relativeLeafNodes = getRelativeNodeIds('both', coreNode, edges).map(function (nodeId) { return nodeMap[nodeId]; });\n }\n relativeLeafNodes = relativeLeafNodes.filter(function (node) { return degreesMap[node.id] && (degreesMap[node.id].in === 0 || degreesMap[node.id].out === 0); });\n var sameTypeLeafNodes = getSameTypeNodes(type, nodeClusterBy, node, relativeLeafNodes, degreesMap);\n return { coreNode: coreNode, relativeLeafNodes: relativeLeafNodes, sameTypeLeafNodes: sameTypeLeafNodes };\n};\nexports.getCoreNodeAndRelativeLeafNodes = getCoreNodeAndRelativeLeafNodes;\n//# sourceMappingURL=math.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFuncByUnknownType = exports.getFunc = exports.isFunction = void 0;\nvar _1 = require(\".\");\nvar number_1 = require(\"./number\");\nvar isFunction = function (val) {\n return typeof val === 'function';\n};\nexports.isFunction = isFunction;\nvar getFunc = function (value, defaultValue, func) {\n var resultFunc;\n if (func) {\n resultFunc = func;\n }\n else if ((0, number_1.isNumber)(value)) {\n resultFunc = function () { return value; };\n }\n else {\n resultFunc = function () { return defaultValue; };\n }\n return resultFunc;\n};\nexports.getFunc = getFunc;\nvar getFuncByUnknownType = function (defaultValue, value, resultIsNumber) {\n if (resultIsNumber === void 0) { resultIsNumber = true; }\n if (!value && value !== 0) {\n return function (d) {\n if (d.size) {\n if ((0, _1.isArray)(d.size))\n return d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n if ((0, _1.isObject)(d.size))\n return d.size.width > d.size.height ? d.size.width : d.size.height;\n return d.size;\n }\n return defaultValue;\n };\n }\n if ((0, exports.isFunction)(value)) {\n return value;\n }\n if ((0, number_1.isNumber)(value)) {\n return function () { return value; };\n }\n if ((0, _1.isArray)(value)) {\n return function () {\n if (resultIsNumber) {\n var max = Math.max.apply(Math, value);\n return isNaN(max) ? defaultValue : max;\n }\n return value;\n };\n }\n if ((0, _1.isObject)(value)) {\n return function () {\n if (resultIsNumber) {\n var max = Math.max(value.width, value.height);\n return isNaN(max) ? defaultValue : max;\n }\n return [value.width, value.height];\n };\n }\n return function () { return defaultValue; };\n};\nexports.getFuncByUnknownType = getFuncByUnknownType;\n//# sourceMappingURL=function.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./math\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./function\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLayoutByName = exports.unRegisterLayout = exports.registerLayout = void 0;\nvar base_1 = require(\"../layout/base\");\nvar util_1 = require(\"../util\");\nvar map = new Map();\nvar registerLayout = function (name, layoutOverride) {\n if (map.get(name)) {\n console.warn(\"The layout with the name \".concat(name, \" exists already, it will be overridden\"));\n }\n if ((0, util_1.isObject)(layoutOverride)) {\n // tslint:disable-next-line: max-classes-per-file\n var GLayout = /** @class */ (function (_super) {\n __extends(GLayout, _super);\n function GLayout(cfg) {\n var _this = this;\n var _a;\n _this = _super.call(this) || this;\n var self = _this;\n var props = {};\n var defaultCfg = Object.assign({}, self.getDefaultCfg(), ((_a = layoutOverride.getDefaultCfg) === null || _a === void 0 ? void 0 : _a.call(layoutOverride)) || {});\n Object.assign(props, defaultCfg, layoutOverride, cfg);\n Object.keys(props).forEach(function (key) {\n var value = props[key];\n self[key] = value;\n });\n return _this;\n }\n return GLayout;\n }(base_1.Base));\n map.set(name, GLayout);\n }\n else {\n map.set(name, layoutOverride);\n }\n return map.get(name);\n};\nexports.registerLayout = registerLayout;\nvar unRegisterLayout = function (name) {\n if (map.has(name)) {\n map.delete(name);\n }\n};\nexports.unRegisterLayout = unRegisterLayout;\nvar getLayoutByName = function (name) {\n if (map.has(name)) {\n return map.get(name);\n }\n return null;\n};\nexports.getLayoutByName = getLayoutByName;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview grid layout\n * @author shiwu.wyy@antfin.com\n * this algorithm refers to - https://github.com/cytoscape/cytoscape.js/\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridLayout = void 0;\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * 网格布局\n */\nvar GridLayout = /** @class */ (function (_super) {\n __extends(GridLayout, _super);\n function GridLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局起始点 */\n _this.begin = [0, 0];\n /** prevents node overlap, may overflow boundingBox if not enough space */\n _this.preventOverlap = true;\n /** extra spacing around nodes when preventOverlap: true */\n _this.preventOverlapPadding = 10;\n /** uses all available space on false, uses minimal space on true */\n _this.condense = false;\n /** a sorting function to order the nodes; e.g. function(a, b){ return a.datapublic ('weight') - b.data('weight') } */\n _this.sortBy = \"degree\";\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.row = 0;\n _this.col = 0;\n _this.cellWidth = 0;\n _this.cellHeight = 0;\n _this.cellUsed = {};\n _this.id2manPos = {};\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n GridLayout.prototype.getDefaultCfg = function () {\n return {\n begin: [0, 0],\n preventOverlap: true,\n preventOverlapPadding: 10,\n condense: false,\n rows: undefined,\n cols: undefined,\n position: undefined,\n sortBy: \"degree\",\n nodeSize: 30\n };\n };\n /**\n * 执行布局\n */\n GridLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, edges = self.edges, begin = self.begin;\n var n = nodes.length;\n if (n === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n }\n if (n === 1) {\n nodes[0].x = begin[0];\n nodes[0].y = begin[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges,\n };\n }\n var sortBy = self.sortBy, width = self.width, height = self.height;\n var condense = self.condense, preventOverlapPadding = self.preventOverlapPadding, preventOverlap = self.preventOverlap, paramNodeSpacing = self.nodeSpacing, paramNodeSize = self.nodeSize;\n var layoutNodes = [];\n nodes.forEach(function (node) {\n layoutNodes.push(node);\n });\n var nodeIdxMap = {};\n layoutNodes.forEach(function (node, i) {\n nodeIdxMap[node.id] = i;\n });\n if (sortBy === \"degree\" ||\n !(0, util_1.isString)(sortBy) ||\n layoutNodes[0][sortBy] === undefined) {\n sortBy = \"degree\";\n if ((0, util_1.isNaN)(nodes[0].degree)) {\n var values_1 = (0, util_1.getDegree)(layoutNodes.length, nodeIdxMap, edges);\n layoutNodes.forEach(function (node, i) {\n node.degree = values_1[i].all;\n });\n }\n }\n // sort nodes by value\n layoutNodes.sort(function (n1, n2) { return n2[sortBy] - n1[sortBy]; });\n if (!width && typeof window !== \"undefined\") {\n width = window.innerWidth;\n }\n if (!height && typeof window !== \"undefined\") {\n height = window.innerHeight;\n }\n var oRows = self.rows;\n var oCols = self.cols != null ? self.cols : self.columns;\n self.cells = n;\n // if rows or columns were set in self, use those values\n if (oRows != null && oCols != null) {\n self.rows = oRows;\n self.cols = oCols;\n }\n else if (oRows != null && oCols == null) {\n self.rows = oRows;\n self.cols = Math.ceil(self.cells / self.rows);\n }\n else if (oRows == null && oCols != null) {\n self.cols = oCols;\n self.rows = Math.ceil(self.cells / self.cols);\n }\n else {\n // otherwise use the automatic values and adjust accordingly\t // otherwise use the automatic values and adjust accordingly\n // width/height * splits^2 = cells where splits is number of times to split width\n self.splits = Math.sqrt((self.cells * self.height) / self.width);\n self.rows = Math.round(self.splits);\n self.cols = Math.round((self.width / self.height) * self.splits);\n }\n self.rows = Math.max(self.rows, 1);\n self.cols = Math.max(self.cols, 1);\n if (self.cols * self.rows > self.cells) {\n // otherwise use the automatic values and adjust accordingly\n // if rounding was up, see if we can reduce rows or columns\n var sm = self.small();\n var lg = self.large();\n // reducing the small side takes away the most cells, so try it first\n if ((sm - 1) * lg >= self.cells) {\n self.small(sm - 1);\n }\n else if ((lg - 1) * sm >= self.cells) {\n self.large(lg - 1);\n }\n }\n else {\n // if rounding was too low, add rows or columns\n while (self.cols * self.rows < self.cells) {\n var sm = self.small();\n var lg = self.large();\n // try to add to larger side first (adds less in multiplication)\n if ((lg + 1) * sm >= self.cells) {\n self.large(lg + 1);\n }\n else {\n self.small(sm + 1);\n }\n }\n }\n self.cellWidth = width / self.cols;\n self.cellHeight = height / self.rows;\n if (condense) {\n self.cellWidth = 0;\n self.cellHeight = 0;\n }\n if (preventOverlap || paramNodeSpacing) {\n var nodeSpacing_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSpacing);\n var nodeSize_1 = (0, util_1.getFuncByUnknownType)(30, paramNodeSize, false);\n layoutNodes.forEach(function (node) {\n if (!node.x || !node.y) {\n // for bb\n node.x = 0;\n node.y = 0;\n }\n var res = nodeSize_1(node) || 30;\n var nodeW;\n var nodeH;\n if ((0, util_1.isArray)(res)) {\n nodeW = res[0];\n nodeH = res[1];\n }\n else {\n nodeW = res;\n nodeH = res;\n }\n var p = nodeSpacing_1 !== undefined ? nodeSpacing_1(node) : preventOverlapPadding;\n var w = nodeW + p;\n var h = nodeH + p;\n self.cellWidth = Math.max(self.cellWidth, w);\n self.cellHeight = Math.max(self.cellHeight, h);\n });\n }\n self.cellUsed = {}; // e.g. 'c-0-2' => true\n // to keep track of current cell position\n self.row = 0;\n self.col = 0;\n // get a cache of all the manual positions\n self.id2manPos = {};\n for (var i = 0; i < layoutNodes.length; i++) {\n var node = layoutNodes[i];\n var rcPos = void 0;\n if (self.position) {\n rcPos = self.position(node);\n }\n if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) {\n // must have at least row or col def'd\n var pos = {\n row: rcPos.row,\n col: rcPos.col\n };\n if (pos.col === undefined) {\n // find unused col\n pos.col = 0;\n while (self.used(pos.row, pos.col)) {\n pos.col++;\n }\n }\n else if (pos.row === undefined) {\n // find unused row\n pos.row = 0;\n while (self.used(pos.row, pos.col)) {\n pos.row++;\n }\n }\n self.id2manPos[node.id] = pos;\n self.use(pos.row, pos.col);\n }\n self.getPos(node);\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n edges: edges,\n nodes: layoutNodes\n };\n };\n GridLayout.prototype.small = function (val) {\n var self = this;\n var res;\n var rows = self.rows || 5;\n var cols = self.cols || 5;\n if (val == null) {\n res = Math.min(rows, cols);\n }\n else {\n var min = Math.min(rows, cols);\n if (min === self.rows) {\n self.rows = val;\n }\n else {\n self.cols = val;\n }\n }\n return res;\n };\n GridLayout.prototype.large = function (val) {\n var self = this;\n var res;\n var rows = self.rows || 5;\n var cols = self.cols || 5;\n if (val == null) {\n res = Math.max(rows, cols);\n }\n else {\n var max = Math.max(rows, cols);\n if (max === self.rows) {\n self.rows = val;\n }\n else {\n self.cols = val;\n }\n }\n return res;\n };\n GridLayout.prototype.used = function (row, col) {\n var self = this;\n return self.cellUsed[\"c-\".concat(row, \"-\").concat(col)] || false;\n };\n GridLayout.prototype.use = function (row, col) {\n var self = this;\n self.cellUsed[\"c-\".concat(row, \"-\").concat(col)] = true;\n };\n GridLayout.prototype.moveToNextCell = function () {\n var self = this;\n var cols = self.cols || 5;\n self.col++;\n if (self.col >= cols) {\n self.col = 0;\n self.row++;\n }\n };\n GridLayout.prototype.getPos = function (node) {\n var self = this;\n var begin = self.begin, cellWidth = self.cellWidth, cellHeight = self.cellHeight;\n var x;\n var y;\n // see if we have a manual position set\n var rcPos = self.id2manPos[node.id];\n if (rcPos) {\n x = rcPos.col * cellWidth + cellWidth / 2 + begin[0];\n y = rcPos.row * cellHeight + cellHeight / 2 + begin[1];\n }\n else {\n // otherwise set automatically\n while (self.used(self.row, self.col)) {\n self.moveToNextCell();\n }\n x = self.col * cellWidth + cellWidth / 2 + begin[0];\n y = self.row * cellHeight + cellHeight / 2 + begin[1];\n self.use(self.row, self.col);\n self.moveToNextCell();\n }\n node.x = x;\n node.y = y;\n };\n GridLayout.prototype.getType = function () {\n return \"grid\";\n };\n return GridLayout;\n}(base_1.Base));\nexports.GridLayout = GridLayout;\n//# sourceMappingURL=grid.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomLayout = void 0;\nvar base_1 = require(\"./base\");\n/**\n * 随机布局\n */\nvar RandomLayout = /** @class */ (function (_super) {\n __extends(RandomLayout, _super);\n function RandomLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 宽度 */\n _this.width = 300;\n /** 高度 */\n _this.height = 300;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n RandomLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n width: 300,\n height: 300\n };\n };\n /**\n * 执行布局\n */\n RandomLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var layoutScale = 0.9;\n var center = self.center;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (nodes) {\n nodes.forEach(function (node) {\n node.x = (Math.random() - 0.5) * layoutScale * self.width + center[0];\n node.y = (Math.random() - 0.5) * layoutScale * self.height + center[1];\n });\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: this.edges\n };\n };\n RandomLayout.prototype.getType = function () {\n return \"random\";\n };\n return RandomLayout;\n}(base_1.Base));\nexports.RandomLayout = RandomLayout;\n//# sourceMappingURL=random.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GForceLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function (d) {\n return defaultV || 1;\n };\n }\n else if ((0, util_1.isNumber)(value)) {\n func = function (d) {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\n/**\n * graphin 中的 force 布局\n */\nvar GForceLayout = /** @class */ (function (_super) {\n __extends(GForceLayout, _super);\n function GForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 500;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 1000;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.5;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 1;\n /** 重力大小 */\n _this.gravity = 10;\n /** 是否防止重叠 */\n _this.preventOverlap = true;\n /** 防止重叠的力大小参数 */\n _this.collideStrength = 1;\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n /** 是否使用 window.setInterval 运行迭代 */\n _this.animate = true;\n _this.updateCfg(options);\n return _this;\n }\n GForceLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 500,\n gravity: 10,\n enableTick: true,\n animate: true,\n };\n };\n /**\n * 执行布局\n */\n GForceLayout.prototype.execute = function () {\n var _a, _b;\n var self = this;\n var nodes = self.nodes;\n if (self.timeInterval !== undefined && typeof window !== \"undefined\") {\n window.clearInterval(self.timeInterval);\n }\n if (!nodes || nodes.length === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.linkDistance = proccessToFunc(self.linkDistance, 1);\n self.nodeStrength = proccessToFunc(self.nodeStrength, 1);\n self.edgeStrength = proccessToFunc(self.edgeStrength, 1);\n // node size function\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n if (self.preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return Math.max(d.size[0], d.size[1]) + nodeSpacingFunc_1(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n return Math.max(d.size.width, d.size.height) + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return Math.max(nodeSize[0], nodeSize[1]) + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n }\n self.nodeSize = nodeSizeFunc;\n var edges = self.edges;\n self.degrees = (0, util_1.getDegree)(nodes.length, self.nodeIdxMap, edges);\n if (!self.getMass) {\n self.getMass = function (d) {\n var mass = d.mass || self.degrees[self.nodeIdxMap[d.id]].all || 1;\n return mass;\n };\n }\n // layout\n self.run();\n };\n GForceLayout.prototype.run = function () {\n var _a;\n var self = this;\n var maxIteration = self.maxIteration, nodes = self.nodes, workerEnabled = self.workerEnabled, minMovement = self.minMovement, animate = self.animate;\n if (!nodes)\n return;\n if (workerEnabled || !animate) {\n for (var i = 0; i < maxIteration; i++) {\n var previousPos = self.runOneStep(i);\n if (self.reachMoveThreshold(nodes, previousPos, minMovement)) {\n break;\n }\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n }\n else {\n if (typeof window === \"undefined\")\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n var _a, _b;\n if (!nodes)\n return;\n var previousPos = self.runOneStep(iter_1) || [];\n if (self.reachMoveThreshold(nodes, previousPos, minMovement)) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n window.clearInterval(self.timeInterval);\n }\n iter_1++;\n if (iter_1 >= maxIteration) {\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n };\n GForceLayout.prototype.reachMoveThreshold = function (nodes, previousPos, minMovement) {\n // whether to stop the iteration\n var movement = 0;\n nodes.forEach(function (node, j) {\n var vx = node.x - previousPos[j].x;\n var vy = node.y - previousPos[j].y;\n movement += Math.sqrt(vx * vx + vy * vy);\n });\n movement /= nodes.length;\n return movement < minMovement;\n };\n GForceLayout.prototype.runOneStep = function (iter) {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n var accArray = [];\n var velArray = [];\n if (!nodes)\n return;\n nodes.forEach(function (_, i) {\n accArray[2 * i] = 0;\n accArray[2 * i + 1] = 0;\n velArray[2 * i] = 0;\n velArray[2 * i + 1] = 0;\n });\n self.calRepulsive(accArray, nodes);\n if (edges)\n self.calAttractive(accArray, edges);\n self.calGravity(accArray, nodes);\n var stepInterval = Math.max(0.02, self.interval - iter * 0.002);\n self.updateVelocity(accArray, velArray, stepInterval, nodes);\n var previousPos = [];\n nodes.forEach(function (node) {\n previousPos.push({\n x: node.x,\n y: node.y\n });\n });\n self.updatePosition(velArray, stepInterval, nodes);\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n return previousPos;\n };\n GForceLayout.prototype.calRepulsive = function (accArray, nodes) {\n var self = this;\n var getMass = self.getMass, factor = self.factor, coulombDisScale = self.coulombDisScale, preventOverlap = self.preventOverlap, _a = self.collideStrength, collideStrength = _a === void 0 ? 1 : _a;\n var nodeStrength = self.nodeStrength;\n var nodeSize = self.nodeSize;\n nodes.forEach(function (ni, i) {\n var massi = getMass ? getMass(ni) : 1;\n nodes.forEach(function (nj, j) {\n if (i >= j)\n return;\n // if (!accArray[j]) accArray[j] = 0;\n var vecX = ni.x - nj.x;\n var vecY = ni.y - nj.y;\n if (vecX === 0 && vecY === 0) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var lengthSqr = vecX * vecX + vecY * vecY;\n var vecLength = Math.sqrt(lengthSqr);\n var nVecLength = (vecLength + 0.1) * coulombDisScale;\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n var param = (((nodeStrength(ni) + nodeStrength(nj)) * 0.5) * factor) /\n (nVecLength * nVecLength);\n var massj = getMass ? getMass(nj) : 1;\n accArray[2 * i] += (direX * param);\n accArray[2 * i + 1] += (direY * param);\n accArray[2 * j] -= (direX * param);\n accArray[2 * j + 1] -= (direY * param);\n if (preventOverlap && (nodeSize(ni) + nodeSize(nj)) / 2 > vecLength) {\n var paramOverlap = collideStrength * (nodeStrength(ni) + nodeStrength(nj)) * 0.5 / lengthSqr;\n accArray[2 * i] += (direX * paramOverlap) / massi;\n accArray[2 * i + 1] += (direY * paramOverlap) / massi;\n accArray[2 * j] -= (direX * paramOverlap) / massj;\n accArray[2 * j + 1] -= (direY * paramOverlap) / massj;\n }\n });\n });\n };\n GForceLayout.prototype.calAttractive = function (accArray, edges) {\n var self = this;\n var nodeMap = self.nodeMap, nodeIdxMap = self.nodeIdxMap, linkDistance = self.linkDistance, edgeStrength = self.edgeStrength;\n var nodeSize = self.nodeSize;\n var getMass = self.getMass;\n edges.forEach(function (edge, i) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n var sourceNode = nodeMap[source];\n var targetNode = nodeMap[target];\n var vecX = targetNode.x - sourceNode.x;\n var vecY = targetNode.y - sourceNode.y;\n if (vecX === 0 && vecY === 0) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n var length = linkDistance(edge, sourceNode, targetNode) || 1 + ((nodeSize(sourceNode) + nodeSize(targetNode)) || 0) / 2;\n var diff = length - vecLength;\n var param = diff * edgeStrength(edge);\n var sourceIdx = nodeIdxMap[source];\n var targetIdx = nodeIdxMap[target];\n var massSource = getMass ? getMass(sourceNode) : 1;\n var massTarget = getMass ? getMass(targetNode) : 1;\n accArray[2 * sourceIdx] -= (direX * param) / massSource;\n accArray[2 * sourceIdx + 1] -= (direY * param) / massSource;\n accArray[2 * targetIdx] += (direX * param) / massTarget;\n accArray[2 * targetIdx + 1] += (direY * param) / massTarget;\n });\n };\n GForceLayout.prototype.calGravity = function (accArray, nodes) {\n var self = this;\n // const nodes = self.nodes;\n var center = self.center;\n var defaultGravity = self.gravity;\n var degrees = self.degrees;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var vecX = node.x - center[0];\n var vecY = node.y - center[1];\n var gravity = defaultGravity;\n if (self.getCenter) {\n var customCenterOpt = self.getCenter(node, degrees[i].all);\n if (customCenterOpt &&\n (0, util_1.isNumber)(customCenterOpt[0]) &&\n (0, util_1.isNumber)(customCenterOpt[1]) &&\n (0, util_1.isNumber)(customCenterOpt[2])) {\n vecX = node.x - customCenterOpt[0];\n vecY = node.y - customCenterOpt[1];\n gravity = customCenterOpt[2];\n }\n }\n if (!gravity)\n continue;\n accArray[2 * i] -= gravity * vecX;\n accArray[2 * i + 1] -= gravity * vecY;\n }\n };\n GForceLayout.prototype.updateVelocity = function (accArray, velArray, stepInterval, nodes) {\n var self = this;\n var param = stepInterval * self.damping;\n // const nodes = self.nodes;\n nodes.forEach(function (node, i) {\n var vx = accArray[2 * i] * param || 0.01;\n var vy = accArray[2 * i + 1] * param || 0.01;\n var vLength = Math.sqrt(vx * vx + vy * vy);\n if (vLength > self.maxSpeed) {\n var param2 = self.maxSpeed / vLength;\n vx = param2 * vx;\n vy = param2 * vy;\n }\n velArray[2 * i] = vx;\n velArray[2 * i + 1] = vy;\n });\n };\n GForceLayout.prototype.updatePosition = function (velArray, stepInterval, nodes) {\n nodes.forEach(function (node, i) {\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n node.x = node.fx;\n node.y = node.fy;\n return;\n }\n var distX = velArray[2 * i] * stepInterval;\n var distY = velArray[2 * i + 1] * stepInterval;\n node.x += distX;\n node.y += distY;\n });\n };\n GForceLayout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== \"undefined\") {\n window.clearInterval(this.timeInterval);\n }\n };\n GForceLayout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n GForceLayout.prototype.getType = function () {\n return \"gForce\";\n };\n return GForceLayout;\n}(base_1.Base));\nexports.GForceLayout = GForceLayout;\n//# sourceMappingURL=gForce.js.map","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.forceNBody = void 0;\nvar d3_quadtree_1 = require(\"d3-quadtree\");\nvar theta2 = 0.81; // Barnes-Hut approximation threshold\nvar epsilon = 0.1; // 为了防止出现除0的情况,加一个epsilon\nfunction forceNBody(nodes, nodeMap, factor, coulombDisScale2, accArray) {\n var weightParam = factor / coulombDisScale2;\n var data = nodes.map(function (n, i) {\n // @ts-ignore\n var mappedNode = nodeMap[n.id];\n // @ts-ignore\n var nodeData = mappedNode.data, x = mappedNode.x, y = mappedNode.y, size = mappedNode.size;\n var nodeStrength = nodeData.layout.force.nodeStrength;\n return {\n x: x,\n y: y,\n size: size,\n index: i,\n vx: 0,\n vy: 0,\n weight: weightParam * nodeStrength,\n };\n });\n var tree = (0, d3_quadtree_1.quadtree)(data, function (d) { return d.x; }, function (d) { return d.y; }).visitAfter(accumulate); // init internal node\n data.forEach(function (n) {\n // @ts-ignore\n computeForce(n, tree);\n });\n data.map(function (n, i) {\n // @ts-ignore\n var mappedNode = nodeMap[nodes[i].id];\n // @ts-ignore\n var _a = mappedNode.data.layout.force.mass, mass = _a === void 0 ? 1 : _a;\n // 从 0 开始,= 初始化 + 加斥力\n accArray[2 * i] = n.vx / mass;\n accArray[2 * i + 1] = n.vy / mass;\n });\n return accArray;\n}\nexports.forceNBody = forceNBody;\n// @ts-ignore\nfunction accumulate(quad) {\n var accWeight = 0;\n var accX = 0;\n var accY = 0;\n if (quad.length) {\n // internal node, accumulate 4 child quads\n for (var i = 0; i < 4; i++) {\n var q = quad[i];\n if (q && q.weight) {\n accWeight += q.weight;\n accX += q.x * q.weight;\n accY += q.y * q.weight;\n }\n }\n quad.x = accX / accWeight;\n quad.y = accY / accWeight;\n quad.weight = accWeight;\n }\n else {\n // leaf node\n var q = quad;\n quad.x = q.data.x;\n quad.y = q.data.y;\n quad.weight = q.data.weight;\n }\n}\n// @ts-ignore\nvar apply = function (quad, x1, y1, x2, y2, node) {\n var dx = (node.x - quad.x) || epsilon;\n var dy = (node.y - quad.y) || epsilon;\n var width = x2 - x1;\n var len2 = dx * dx + dy * dy;\n var len3 = Math.sqrt(len2) * len2;\n // far node, apply Barnes-Hut approximation\n if ((width * width) * theta2 < len2) {\n var param = quad.weight / len3;\n node.vx += dx * param;\n node.vy += dy * param;\n return true;\n }\n // near quad, compute force directly\n if (quad.length)\n return false; // internal node, visit children\n // leaf node\n if (quad.data !== node) {\n var param = quad.data.weight / len3;\n node.vx += dx * param;\n node.vy += dy * param;\n }\n};\n// @ts-ignore\nfunction computeForce(node, tree) {\n // @ts-ignore\n tree.visit(function (quad, x1, y1, x2, y2) { return apply(quad, x1, y1, x2, y2, node); });\n}\n//# sourceMappingURL=ForceNBody.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Force2Layout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\nvar ForceNBody_1 = require(\"./ForceNBody\");\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function (d) {\n return defaultV || 1;\n };\n }\n else if ((0, util_1.isNumber)(value)) {\n func = function (d) {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\n/**\n * graphin 中的 force 布局\n */\nvar Force2Layout = /** @class */ (function (_super) {\n __extends(Force2Layout, _super);\n function Force2Layout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 500;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.4;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 200;\n /** 重力大小 */\n _this.gravity = 0;\n /** 节点聚类作用力系数 */\n _this.clusterNodeStrength = 20;\n /** 是否防止重叠 */\n _this.preventOverlap = true;\n /** 阈值的使用条件,mean 代表平均移动距离小于 minMovement 时停止迭代,max 代表最大移动距离大时 minMovement 时停时迭代。默认为 mean */\n _this.distanceThresholdMode = 'mean';\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.judgingDistance = 0;\n /** 默认的向心配置 */\n _this.centripetalOptions = {\n leaf: 2,\n single: 2,\n others: 1,\n // eslint-disable-next-line\n center: function (n) {\n return {\n x: _this.width / 2,\n y: _this.height / 2,\n };\n },\n };\n var getMass = options.getMass;\n _this.propsGetMass = getMass;\n _this.updateCfg(options);\n return _this;\n }\n Force2Layout.prototype.getCentripetalOptions = function () {\n var _a = this, leafCluster = _a.leafCluster, clustering = _a.clustering, nodeClusterBy = _a.nodeClusterBy, nodes = _a.nodes, nodeMap = _a.nodeMap, propsClusterNodeStrength = _a.clusterNodeStrength;\n var getClusterNodeStrength = function (node) {\n return typeof propsClusterNodeStrength === 'function'\n ? propsClusterNodeStrength(node)\n : propsClusterNodeStrength;\n };\n var centripetalOptions = {};\n var sameTypeLeafMap;\n // 如果传入了需要叶子节点聚类\n if (leafCluster) {\n sameTypeLeafMap = this.getSameTypeLeafMap() || {};\n var relativeNodesType_1 = Array.from(new Set(nodes === null || nodes === void 0 ? void 0 : nodes.map(function (node) { return node[nodeClusterBy]; }))) || [];\n centripetalOptions = {\n single: 100,\n leaf: function (node, nodes, edges) {\n // 找出与它关联的边的起点或终点出发的所有一度节点中同类型的叶子节点\n var _a = sameTypeLeafMap[node.id] || {}, relativeLeafNodes = _a.relativeLeafNodes, sameTypeLeafNodes = _a.sameTypeLeafNodes;\n // 如果都是同一类型或者每种类型只有1个,则施加默认向心力\n if ((sameTypeLeafNodes === null || sameTypeLeafNodes === void 0 ? void 0 : sameTypeLeafNodes.length) === (relativeLeafNodes === null || relativeLeafNodes === void 0 ? void 0 : relativeLeafNodes.length) ||\n (relativeNodesType_1 === null || relativeNodesType_1 === void 0 ? void 0 : relativeNodesType_1.length) === 1) {\n return 1;\n }\n return getClusterNodeStrength(node);\n },\n others: 1,\n center: function (node, nodes, edges) {\n var _a;\n var degree = (((_a = node.data) === null || _a === void 0 ? void 0 : _a.layout) || {}).degree;\n // 孤点默认给1个远离的中心点\n if (!degree) {\n return {\n x: 100,\n y: 100,\n };\n }\n var centerNode;\n if (degree === 1) {\n // 如果为叶子节点\n // 找出与它关联的边的起点出发的所有一度节点中同类型的叶子节点\n var _b = (sameTypeLeafMap[node.id] || {}).sameTypeLeafNodes, sameTypeLeafNodes = _b === void 0 ? [] : _b;\n if (sameTypeLeafNodes.length === 1) {\n // 如果同类型的叶子节点只有1个,中心节点置为undefined\n centerNode = undefined;\n }\n else if (sameTypeLeafNodes.length > 1) {\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n centerNode = (0, util_1.getAvgNodePosition)(sameTypeLeafNodes);\n }\n }\n else {\n centerNode = undefined;\n }\n return {\n x: centerNode === null || centerNode === void 0 ? void 0 : centerNode.x,\n y: centerNode === null || centerNode === void 0 ? void 0 : centerNode.y,\n };\n },\n };\n }\n // 如果传入了全局节点聚类\n if (clustering) {\n if (!sameTypeLeafMap)\n sameTypeLeafMap = this.getSameTypeLeafMap();\n var clusters = Array.from(new Set(nodes.map(function (node, i) {\n return node[nodeClusterBy];\n }))).filter(function (item) { return item !== undefined; });\n var centerNodeInfo_1 = {};\n clusters.forEach(function (cluster) {\n var sameTypeNodes = nodes\n .filter(function (item) { return item[nodeClusterBy] === cluster; })\n .map(function (node) { return nodeMap[node.id]; });\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n centerNodeInfo_1[cluster] = (0, util_1.getAvgNodePosition)(sameTypeNodes);\n });\n centripetalOptions = {\n single: function (node) { return getClusterNodeStrength(node); },\n leaf: function (node) { return getClusterNodeStrength(node); },\n others: function (node) { return getClusterNodeStrength(node); },\n center: function (node, nodes, edges) {\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n var centerNode = centerNodeInfo_1[node[nodeClusterBy]];\n return {\n x: centerNode === null || centerNode === void 0 ? void 0 : centerNode.x,\n y: centerNode === null || centerNode === void 0 ? void 0 : centerNode.y,\n };\n },\n };\n }\n this.centripetalOptions = __assign(__assign({}, this.centripetalOptions), centripetalOptions);\n var _b = this.centripetalOptions, leaf = _b.leaf, single = _b.single, others = _b.others;\n if (leaf && typeof leaf !== 'function')\n this.centripetalOptions.leaf = function () { return leaf; };\n if (single && typeof single !== 'function')\n this.centripetalOptions.single = function () { return single; };\n if (others && typeof others !== 'function')\n this.centripetalOptions.others = function () { return others; };\n };\n Force2Layout.prototype.updateCfg = function (cfg) {\n if (cfg)\n Object.assign(this, cfg);\n };\n Force2Layout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 500,\n gravity: 10,\n enableTick: true,\n animate: true,\n };\n };\n /**\n * 执行布局\n */\n Force2Layout.prototype.execute = function () {\n var self = this;\n self.stop();\n var nodes = self.nodes, edges = self.edges, defSpringLen = self.defSpringLen;\n self.judgingDistance = 0;\n if (!nodes || nodes.length === 0) {\n self.onLayoutEnd([]);\n return;\n }\n if (!self.width && typeof window !== 'undefined') {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== 'undefined') {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n self.onLayoutEnd([__assign({}, nodes[0])]);\n return;\n }\n self.degreesMap = (0, util_1.getDegreeMap)(nodes, edges);\n if (self.propsGetMass) {\n self.getMass = self.propsGetMass;\n }\n else {\n self.getMass = function (d) {\n var massWeight = 1;\n if ((0, util_1.isNumber)(d.mass))\n massWeight = d.mass;\n var degree = self.degreesMap[d.id].all;\n return !degree || degree < 5 ? massWeight : degree * 5 * massWeight;\n };\n }\n // node size function\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n if (self.preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return Math.max(d.size[0], d.size[1]) + nodeSpacingFunc_1(d);\n }\n else if ((0, util_1.isObject)(d.size)) {\n return Math.max(d.size.width, d.size.height) + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return Math.max(nodeSize[0], nodeSize[1]) + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n }\n self.nodeSize = nodeSizeFunc;\n self.linkDistance = proccessToFunc(self.linkDistance, 1);\n self.nodeStrength = proccessToFunc(self.nodeStrength, 1);\n self.edgeStrength = proccessToFunc(self.edgeStrength, 1);\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n var degree = self.degreesMap[node.id];\n nodeMap[node.id] = __assign(__assign({}, node), { data: __assign(__assign({}, node.data), { size: self.nodeSize(node) || 30, layout: {\n inDegree: degree.in,\n outDegree: degree.out,\n degree: degree.all,\n tDegree: degree.in,\n sDegree: degree.out,\n force: {\n mass: self.getMass(node),\n nodeStrength: self.nodeStrength(node, edges),\n },\n } }) });\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.edgeInfos = [];\n edges === null || edges === void 0 ? void 0 : edges.forEach(function (edge) {\n var sourceNode = nodeMap[edge.source];\n var targetNode = nodeMap[edge.target];\n if (!sourceNode || !targetNode) {\n elf.edgeInfos.push({});\n }\n else {\n self.edgeInfos.push({\n edgeStrength: self.edgeStrength(edge),\n linkDistance: defSpringLen\n ? defSpringLen(__assign(__assign({}, edge), { source: sourceNode, target: targetNode }), sourceNode, targetNode)\n : self.linkDistance(edge, sourceNode, targetNode) ||\n 1 + (nodeSize(sourceNode) + nodeSize(sourceNode) || 0) / 2,\n });\n }\n });\n this.getCentripetalOptions();\n self.onLayoutEnd = self.onLayoutEnd || (function () { });\n self.run();\n };\n Force2Layout.prototype.run = function () {\n var self = this;\n var maxIteration = self.maxIteration, nodes = self.nodes, edges = self.edges, workerEnabled = self.workerEnabled, minMovement = self.minMovement, animate = self.animate, nodeMap = self.nodeMap, height = self.height;\n self.currentMinY = 0;\n self.currentMaxY = height;\n if (!nodes)\n return;\n var velArray = [];\n nodes.forEach(function (_, i) {\n velArray[2 * i] = 0;\n velArray[2 * i + 1] = 0;\n });\n if (this.defSideCoe && typeof this.defSideCoe === 'function') {\n var relatedEdges_1 = {};\n edges.forEach(function (edge) {\n var source = edge.source, target = edge.target;\n relatedEdges_1[source] = relatedEdges_1[source] || [];\n relatedEdges_1[source].push(edge);\n relatedEdges_1[target] = relatedEdges_1[target] || [];\n relatedEdges_1[target].push(edge);\n });\n this.relatedEdges = relatedEdges_1;\n }\n var maxIter = maxIteration;\n var silence = !animate;\n if (workerEnabled || silence) {\n var usedIter = 0;\n for (var i = 0; (self.judgingDistance > minMovement || i < 1) && i < maxIter; i++) {\n usedIter = i;\n self.runOneStep(i, velArray);\n }\n self.onLayoutEnd(Object.values(nodeMap));\n }\n else {\n if (typeof window === 'undefined')\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n if (!nodes)\n return;\n self.runOneStep(iter_1, velArray);\n iter_1++;\n if (iter_1 >= maxIter || self.judgingDistance < minMovement) {\n self.onLayoutEnd(Object.values(nodeMap));\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n };\n Force2Layout.prototype.runOneStep = function (iter, velArray) {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges, nodeMap = self.nodeMap, monitor = self.monitor;\n var accArray = [];\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n self.calRepulsive(accArray);\n if (edges)\n self.calAttractive(accArray);\n self.calGravity(accArray);\n self.attractToSide(accArray);\n var stepInterval = self.interval; // Math.max(0.02, self.interval - iter * 0.002);\n self.updateVelocity(accArray, velArray, stepInterval);\n self.updatePosition(velArray, stepInterval);\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n /** 如果需要监控信息,则提供给用户 */\n if (monitor) {\n var energy = this.calTotalEnergy(accArray);\n monitor({ energy: energy, nodes: nodes, edges: edges, iterations: iter });\n }\n };\n Force2Layout.prototype.calTotalEnergy = function (accArray) {\n var _a = this, nodes = _a.nodes, nodeMap = _a.nodeMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return 0;\n var energy = 0.0;\n nodes.forEach(function (node, i) {\n var vx = accArray[2 * i];\n var vy = accArray[2 * i + 1];\n var speed2 = vx * vx + vy * vy;\n var _a = nodeMap[node.id].data.layout.force.mass, mass = _a === void 0 ? 1 : _a;\n energy += mass * speed2 * 0.5; // p = 1/2*(mv^2)\n });\n return energy;\n };\n // coulombs law\n Force2Layout.prototype.calRepulsive = function (accArray) {\n var self = this;\n var nodes = self.nodes, nodeMap = self.nodeMap, factor = self.factor, coulombDisScale = self.coulombDisScale;\n var nodeSize = self.nodeSize;\n (0, ForceNBody_1.forceNBody)(nodes, nodeMap, factor, coulombDisScale * coulombDisScale, accArray);\n };\n // hooks law\n Force2Layout.prototype.calAttractive = function (accArray) {\n var self = this;\n var edges = self.edges, nodeMap = self.nodeMap, nodeIdxMap = self.nodeIdxMap, edgeInfos = self.edgeInfos;\n var nodeSize = self.nodeSize;\n edges.forEach(function (edge, i) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n var sourceNode = nodeMap[source];\n var targetNode = nodeMap[target];\n if (!sourceNode || !targetNode)\n return;\n var vecX = targetNode.x - sourceNode.x;\n var vecY = targetNode.y - sourceNode.y;\n if (!vecX && !vecY) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n // @ts-ignore\n var _a = edgeInfos[i] || {}, _b = _a.linkDistance, linkDistance = _b === void 0 ? 200 : _b, _c = _a.edgeStrength, edgeStrength = _c === void 0 ? 200 : _c;\n var diff = linkDistance - vecLength;\n var param = diff * edgeStrength;\n var massSource = sourceNode.data.layout.force.mass || 1;\n var massTarget = targetNode.data.layout.force.mass || 1;\n // 质量占比越大,对另一端影响程度越大\n var sourceMassRatio = 1 / massSource;\n var targetMassRatio = 1 / massTarget;\n var disX = direX * param;\n var disY = direY * param;\n var sourceIdx = 2 * nodeIdxMap[source];\n var targetIdx = 2 * nodeIdxMap[target];\n accArray[sourceIdx] -= disX * sourceMassRatio;\n accArray[sourceIdx + 1] -= disY * sourceMassRatio;\n accArray[targetIdx] += disX * targetMassRatio;\n accArray[targetIdx + 1] += disY * targetMassRatio;\n });\n };\n // attract to center\n Force2Layout.prototype.calGravity = function (accArray) {\n var _a;\n var self = this;\n var nodes = self.nodes, _b = self.edges, edges = _b === void 0 ? [] : _b, nodeMap = self.nodeMap, width = self.width, height = self.height, center = self.center, defaultGravity = self.gravity, degreesMap = self.degreesMap, centripetalOptions = self.centripetalOptions;\n if (!nodes)\n return;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var idx = 2 * i;\n var node = nodeMap[nodes[i].id];\n var _c = node.data.layout.force.mass, mass = _c === void 0 ? 1 : _c;\n var vecX = 0;\n var vecY = 0;\n var gravity = defaultGravity;\n var _d = degreesMap[node.id], inDegree = _d.in, outDegree = _d.out, degree = _d.all;\n var forceCenter = (_a = self.getCenter) === null || _a === void 0 ? void 0 : _a.call(self, node, degree);\n if (forceCenter) {\n var centerX = forceCenter[0], centerY = forceCenter[1], strength = forceCenter[2];\n vecX = node.x - centerX;\n vecY = node.y - centerY;\n gravity = strength;\n }\n else {\n vecX = node.x - center[0];\n vecY = node.y - center[1];\n }\n if (gravity) {\n accArray[idx] -= (gravity * vecX) / mass;\n accArray[idx + 1] -= (gravity * vecY) / mass;\n }\n if (centripetalOptions) {\n var leaf = centripetalOptions.leaf, single = centripetalOptions.single, others = centripetalOptions.others, centriCenter = centripetalOptions.center;\n var _e = (centriCenter === null || centriCenter === void 0 ? void 0 : centriCenter(node, nodes, edges, width, height)) || {\n x: 0,\n y: 0,\n centerStrength: 0,\n }, centriX = _e.x, centriY = _e.y, centerStrength = _e.centerStrength;\n if (!(0, util_1.isNumber)(centriX) || !(0, util_1.isNumber)(centriY))\n continue;\n var vx = (node.x - centriX) / mass;\n var vy = (node.y - centriY) / mass;\n if (centerStrength) {\n accArray[idx] -= centerStrength * vx;\n accArray[idx + 1] -= centerStrength * vy;\n }\n // 孤点\n if (degree === 0) {\n var singleStrength = single(node);\n if (!singleStrength)\n continue;\n accArray[idx] -= singleStrength * vx;\n accArray[idx + 1] -= singleStrength * vy;\n continue;\n }\n // 没有出度或没有入度,都认为是叶子节点\n if (inDegree === 0 || outDegree === 0) {\n var leafStrength = leaf(node, nodes, edges);\n if (!leafStrength)\n continue;\n accArray[idx] -= leafStrength * vx;\n accArray[idx + 1] -= leafStrength * vy;\n continue;\n }\n /** others */\n var othersStrength = others(node);\n if (!othersStrength)\n continue;\n accArray[idx] -= othersStrength * vx;\n accArray[idx + 1] -= othersStrength * vy;\n }\n }\n };\n /**\n * Attract forces to the top and bottom.\n * @param accArray\n * @returns\n */\n Force2Layout.prototype.attractToSide = function (accArray) {\n var _a = this, defSideCoe = _a.defSideCoe, height = _a.height, nodes = _a.nodes, relatedEdges = _a.relatedEdges, _b = _a.currentMinY, currentMinY = _b === void 0 ? 0 : _b, _c = _a.currentMaxY, currentMaxY = _c === void 0 ? this.height : _c;\n if (!defSideCoe || typeof defSideCoe !== 'function' || !(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n nodes.forEach(function (node, i) {\n var sideCoe = defSideCoe(node, relatedEdges[node.id] || []);\n if (sideCoe === 0)\n return;\n var targetY = sideCoe < 0 ? currentMinY : currentMaxY;\n var strength = Math.abs(sideCoe);\n accArray[2 * i + 1] -= strength * (node.y - targetY);\n });\n };\n Force2Layout.prototype.updateVelocity = function (accArray, velArray, stepInterval) {\n var self = this;\n var nodes = self.nodes, damping = self.damping, maxSpeed = self.maxSpeed;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n nodes.forEach(function (_, i) {\n var vx = (velArray[2 * i] + accArray[2 * i] * stepInterval) * damping || 0.01;\n var vy = (velArray[2 * i + 1] + accArray[2 * i + 1] * stepInterval) * damping ||\n 0.01;\n var vLength = Math.sqrt(vx * vx + vy * vy);\n if (vLength > maxSpeed) {\n var param2 = maxSpeed / vLength;\n vx = param2 * vx;\n vy = param2 * vy;\n }\n velArray[2 * i] = vx;\n velArray[2 * i + 1] = vy;\n });\n };\n Force2Layout.prototype.updatePosition = function (velArray, stepInterval) {\n var self = this;\n var nodes = self.nodes, distanceThresholdMode = self.distanceThresholdMode, nodeMap = self.nodeMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n this.judgingDistance = 0;\n return;\n }\n var sum = 0;\n if (distanceThresholdMode === 'max')\n self.judgingDistance = -Infinity;\n else if (distanceThresholdMode === 'min')\n self.judgingDistance = Infinity;\n var currentMinY = Infinity;\n var currentMaxY = -Infinity;\n nodes.forEach(function (node, i) {\n var mappedNode = nodeMap[node.id];\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n node.x = node.fx;\n node.y = node.fy;\n mappedNode.x = node.x;\n mappedNode.y = node.y;\n return;\n }\n var distX = velArray[2 * i] * stepInterval;\n var distY = velArray[2 * i + 1] * stepInterval;\n node.x += distX;\n node.y += distY;\n mappedNode.x = node.x;\n mappedNode.y = node.y;\n if (node.y < currentMinY)\n currentMinY = node.y;\n if (node.y > currentMaxY)\n currentMaxY = node.y;\n var distanceMagnitude = Math.sqrt(distX * distX + distY * distY);\n switch (distanceThresholdMode) {\n case 'max':\n if (self.judgingDistance < distanceMagnitude)\n self.judgingDistance = distanceMagnitude;\n break;\n case 'min':\n if (self.judgingDistance > distanceMagnitude)\n self.judgingDistance = distanceMagnitude;\n break;\n default:\n sum = sum + distanceMagnitude;\n break;\n }\n });\n this.currentMinY = currentMinY;\n this.currentMaxY = currentMaxY;\n if (!distanceThresholdMode || distanceThresholdMode === 'mean')\n self.judgingDistance = sum / nodes.length;\n };\n Force2Layout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== 'undefined') {\n window.clearInterval(this.timeInterval);\n }\n };\n Force2Layout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n Force2Layout.prototype.getType = function () {\n return 'force2';\n };\n Force2Layout.prototype.getSameTypeLeafMap = function () {\n var _a = this, nodeClusterBy = _a.nodeClusterBy, nodes = _a.nodes, edges = _a.edges, nodeMap = _a.nodeMap, degreesMap = _a.degreesMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n // eslint-disable-next-line\n var sameTypeLeafMap = {};\n nodes.forEach(function (node, i) {\n var degree = degreesMap[node.id].all;\n if (degree === 1) {\n sameTypeLeafMap[node.id] = (0, util_1.getCoreNodeAndRelativeLeafNodes)('leaf', node, edges, nodeClusterBy, degreesMap, nodeMap);\n }\n });\n return sameTypeLeafMap;\n };\n return Force2Layout;\n}(base_1.Base));\nexports.Force2Layout = Force2Layout;\n//# sourceMappingURL=index.js.map","export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y) {\n var nodes,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = node.y - y || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n node.vy += dy * k;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _, initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar d3Force = __importStar(require(\"d3-force\"));\nvar util_1 = require(\"../../util\");\n// https://github.com/john-guerra/forceInABox/blob/master/src/forceInABox.js\nfunction forceInABox() {\n function constant(_) {\n return function () { return _; };\n }\n var groupBy = function (d) {\n return d.cluster;\n };\n var forceNodeSize = constant(1);\n var forceCharge = constant(-1);\n var forceLinkDistance = constant(100);\n var forceLinkStrength = constant(0.1);\n var offset = [0, 0];\n var nodes = [];\n var nodesMap = {};\n var links = [];\n var centerX = 100;\n var centerY = 100;\n var foci = {\n none: {\n x: 0,\n y: 0,\n },\n };\n var templateNodes = [];\n var templateForce;\n var template = 'force';\n var enableGrouping = true;\n var strength = 0.1;\n function force(alpha) {\n if (!enableGrouping) {\n return force;\n }\n templateForce.tick();\n getFocisFromTemplate();\n for (var i = 0, n = nodes.length, node = void 0, k = alpha * strength; i < n; ++i) {\n node = nodes[i];\n node.vx += (foci[groupBy(node)].x - node.x) * k;\n node.vy += (foci[groupBy(node)].y - node.y) * k;\n }\n }\n function initialize() {\n if (!nodes)\n return;\n initializeWithForce();\n }\n function initializeWithForce() {\n if (!nodes || !nodes.length) {\n return;\n }\n if (groupBy(nodes[0]) === undefined) {\n throw Error(\"Couldnt find the grouping attribute for the nodes. Make sure to set it up with forceInABox.groupBy('clusterAttr') before calling .links()\");\n }\n // checkLinksAsObjects();\n var net = getGroupsGraph();\n templateForce = d3Force\n .forceSimulation(net.nodes)\n .force('x', d3Force.forceX(centerX).strength(0.1))\n .force('y', d3Force.forceY(centerY).strength(0.1))\n .force('collide', d3Force.forceCollide(function (d) { return d.r; }).iterations(4))\n .force('charge', d3Force.forceManyBody().strength(forceCharge))\n .force('links', d3Force\n .forceLink(net.nodes.length ? net.links : [])\n .distance(forceLinkDistance)\n .strength(forceLinkStrength));\n templateNodes = templateForce.nodes();\n getFocisFromTemplate();\n }\n function getGroupsGraph() {\n var gnodes = [];\n var glinks = [];\n var dNodes = {};\n var clustersList = [];\n var clustersCounts = {};\n var clustersLinks = [];\n clustersCounts = computeClustersNodeCounts(nodes);\n clustersLinks = computeClustersLinkCounts(links);\n clustersList = Object.keys(clustersCounts);\n clustersList.forEach(function (key, index) {\n var val = clustersCounts[key];\n // Uses approx meta-node size\n gnodes.push({\n id: key,\n size: val.count,\n r: Math.sqrt(val.sumforceNodeSize / Math.PI),\n });\n dNodes[key] = index;\n });\n clustersLinks.forEach(function (l) {\n var sourceTerminal = (0, util_1.getEdgeTerminal)(l, 'source');\n var targetTerminal = (0, util_1.getEdgeTerminal)(l, 'target');\n var source = dNodes[sourceTerminal];\n var target = dNodes[targetTerminal];\n if (source !== undefined && target !== undefined) {\n glinks.push({\n source: source,\n target: target,\n count: l.count,\n });\n }\n });\n return {\n nodes: gnodes,\n links: glinks,\n };\n }\n function computeClustersNodeCounts(nodes) {\n var clustersCounts = {};\n nodes.forEach(function (d) {\n var key = groupBy(d);\n if (!clustersCounts[key]) {\n clustersCounts[key] = {\n count: 0,\n sumforceNodeSize: 0,\n };\n }\n });\n nodes.forEach(function (d) {\n var key = groupBy(d);\n var nodeSize = forceNodeSize(d);\n var tmpCount = clustersCounts[key];\n tmpCount.count = tmpCount.count + 1;\n tmpCount.sumforceNodeSize =\n tmpCount.sumforceNodeSize + Math.PI * (nodeSize * nodeSize) * 1.3;\n clustersCounts[key] = tmpCount;\n });\n return clustersCounts;\n }\n function computeClustersLinkCounts(links) {\n var dClusterLinks = {};\n var clusterLinks = [];\n links.forEach(function (l) {\n var key = getLinkKey(l);\n var count = 0;\n if (dClusterLinks[key] !== undefined) {\n count = dClusterLinks[key];\n }\n count += 1;\n dClusterLinks[key] = count;\n });\n // @ts-ignore\n var entries = Object.entries(dClusterLinks);\n entries.forEach(function (_a) {\n var key = _a[0], count = _a[1];\n var source = key.split('~')[0];\n var target = key.split('~')[1];\n if (source !== undefined && target !== undefined) {\n clusterLinks.push({\n source: source,\n target: target,\n count: count,\n });\n }\n });\n return clusterLinks;\n }\n function getFocisFromTemplate() {\n foci = {\n none: {\n x: 0,\n y: 0,\n },\n };\n templateNodes.forEach(function (d) {\n foci[d.id] = {\n x: d.x - offset[0],\n y: d.y - offset[1],\n };\n });\n return foci;\n }\n function getLinkKey(l) {\n var source = (0, util_1.getEdgeTerminal)(l, 'source');\n var target = (0, util_1.getEdgeTerminal)(l, 'target');\n var sourceID = groupBy(nodesMap[source]);\n var targetID = groupBy(nodesMap[target]);\n return sourceID <= targetID\n ? \"\".concat(sourceID, \"~\").concat(targetID)\n : \"\".concat(targetID, \"~\").concat(sourceID);\n }\n function genNodesMap(nodes) {\n nodesMap = {};\n nodes.forEach(function (node) {\n nodesMap[node.id] = node;\n });\n }\n function setTemplate(x) {\n if (!arguments.length)\n return template;\n template = x;\n initialize();\n return force;\n }\n function setGroupBy(x) {\n if (!arguments.length)\n return groupBy;\n if (typeof x === 'string') {\n groupBy = function (d) {\n return d[x];\n };\n return force;\n }\n groupBy = x;\n return force;\n }\n function setEnableGrouping(x) {\n if (!arguments.length)\n return enableGrouping;\n enableGrouping = x;\n return force;\n }\n function setStrength(x) {\n if (!arguments.length)\n return strength;\n strength = x;\n return force;\n }\n function setCenterX(_) {\n if (arguments.length) {\n centerX = _;\n return force;\n }\n return centerX;\n }\n function setCenterY(_) {\n if (arguments.length) {\n centerY = _;\n return force;\n }\n return centerY;\n }\n function setNodes(_) {\n if (arguments.length) {\n genNodesMap(_ || []);\n nodes = _ || [];\n return force;\n }\n return nodes;\n }\n function setLinks(_) {\n if (arguments.length) {\n links = _ || [];\n initialize();\n return force;\n }\n return links;\n }\n function setForceNodeSize(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceNodeSize = _;\n }\n else {\n forceNodeSize = constant(+_);\n }\n initialize();\n return force;\n }\n return forceNodeSize;\n }\n function setForceCharge(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceCharge = _;\n }\n else {\n forceCharge = constant(+_);\n }\n initialize();\n return force;\n }\n return forceCharge;\n }\n function setForceLinkDistance(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceLinkDistance = _;\n }\n else {\n forceLinkDistance = constant(+_);\n }\n initialize();\n return force;\n }\n return forceLinkDistance;\n }\n function setForceLinkStrength(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceLinkStrength = _;\n }\n else {\n forceLinkStrength = constant(+_);\n }\n initialize();\n return force;\n }\n return forceLinkStrength;\n }\n function setOffset(_) {\n if (arguments.length) {\n offset = _;\n return force;\n }\n return offset;\n }\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n force.template = setTemplate;\n force.groupBy = setGroupBy;\n force.enableGrouping = setEnableGrouping;\n force.strength = setStrength;\n force.centerX = setCenterX;\n force.centerY = setCenterY;\n force.nodes = setNodes;\n force.links = setLinks;\n force.forceNodeSize = setForceNodeSize;\n // Legacy support\n force.nodeSize = force.forceNodeSize;\n force.forceCharge = setForceCharge;\n force.forceLinkDistance = setForceLinkDistance;\n force.forceLinkStrength = setForceLinkStrength;\n force.offset = setOffset;\n force.getFocis = getFocisFromTemplate;\n return force;\n}\nexports.default = forceInABox;\n//# sourceMappingURL=force-in-a-box.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FORCE_LAYOUT_TYPE_MAP = exports.LAYOUT_MESSAGE = void 0;\n/** layout message type */\nexports.LAYOUT_MESSAGE = {\n // run layout\n RUN: \"LAYOUT_RUN\",\n // layout ended with success\n END: \"LAYOUT_END\",\n // layout error\n ERROR: \"LAYOUT_ERROR\",\n // layout tick, used in force directed layout\n TICK: \"LAYOUT_TICK\",\n GPURUN: \"GPU_LAYOUT_RUN\",\n GPUEND: \"GPU_LAYOUT_END\"\n};\nexports.FORCE_LAYOUT_TYPE_MAP = {\n 'gForce': true,\n 'force2': true,\n 'fruchterman': true,\n 'forceAtlas2': true,\n 'force': true,\n 'graphin-force': true,\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ForceLayout = void 0;\nvar d3Force = __importStar(require(\"d3-force\"));\nvar force_in_a_box_1 = __importDefault(require(\"./force-in-a-box\"));\nvar util_1 = require(\"../../util\");\nvar base_1 = require(\"../base\");\nvar constants_1 = require(\"../constants\");\n/**\n * 经典力导布局 force-directed\n */\nvar ForceLayout = /** @class */ (function (_super) {\n __extends(ForceLayout, _super);\n function ForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 向心力作用点 */\n _this.center = [0, 0];\n /** 节点作用力 */\n _this.nodeStrength = null;\n /** 边的作用力, 默认为根据节点的入度出度自适应 */\n _this.edgeStrength = null;\n /** 是否防止节点相互覆盖 */\n _this.preventOverlap = false;\n /** 聚类节点作用力 */\n _this.clusterNodeStrength = null;\n /** 聚类边作用力 */\n _this.clusterEdgeStrength = null;\n /** 聚类边长度 */\n _this.clusterEdgeDistance = null;\n /** 聚类节点大小 / 直径,直径越大,越分散 */\n _this.clusterNodeSize = null;\n /** 用于 foci 的力 */\n _this.clusterFociStrength = null;\n /** 默认边长度 */\n _this.linkDistance = 50;\n /** 迭代阈值的衰减率 [0, 1],0.028 对应最大迭代数为 300 */\n _this.alphaDecay = 0.028;\n /** 停止迭代的阈值 */\n _this.alphaMin = 0.001;\n /** 当前阈值 */\n _this.alpha = 0.3;\n /** 防止重叠的力强度 */\n _this.collideStrength = 1;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.tick = function () { };\n /** 布局完成回调 */\n _this.onLayoutEnd = function () { };\n /** 是否正在布局 */\n _this.ticking = undefined;\n if (options) {\n _this.updateCfg(options);\n }\n return _this;\n }\n ForceLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n nodeStrength: null,\n edgeStrength: null,\n preventOverlap: false,\n nodeSize: undefined,\n nodeSpacing: undefined,\n linkDistance: 50,\n forceSimulation: null,\n alphaDecay: 0.028,\n alphaMin: 0.001,\n alpha: 0.3,\n collideStrength: 1,\n clustering: false,\n clusterNodeStrength: -1,\n clusterEdgeStrength: 0.1,\n clusterEdgeDistance: 100,\n clusterFociStrength: 0.8,\n clusterNodeSize: 10,\n tick: function () { },\n onLayoutEnd: function () { },\n // 是否启用web worker。前提是在web worker里执行布局,否则无效\n workerEnabled: false\n };\n };\n /**\n * 初始化\n * @param {object} data 数据\n */\n ForceLayout.prototype.init = function (data) {\n var self = this;\n self.nodes = data.nodes || [];\n var edges = data.edges || [];\n self.edges = edges.map(function (edge) {\n var res = {};\n var expectKeys = [\"targetNode\", \"sourceNode\", \"startPoint\", \"endPoint\"];\n Object.keys(edge).forEach(function (key) {\n if (!(expectKeys.indexOf(key) > -1)) {\n res[key] = edge[key];\n }\n });\n return res;\n });\n self.ticking = false;\n };\n /**\n * 执行布局\n */\n ForceLayout.prototype.execute = function (reloadData) {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n // 如果正在布局,忽略布局请求\n if (self.ticking) {\n return;\n }\n var simulation = self.forceSimulation;\n var alphaMin = self.alphaMin;\n var alphaDecay = self.alphaDecay;\n var alpha = self.alpha;\n if (!simulation) {\n try {\n // 定义节点的力\n var nodeForce = d3Force.forceManyBody();\n if (self.nodeStrength) {\n nodeForce.strength(self.nodeStrength);\n }\n simulation = d3Force.forceSimulation().nodes(nodes);\n if (self.clustering) {\n var clusterForce = (0, force_in_a_box_1.default)();\n clusterForce\n .centerX(self.center[0])\n .centerY(self.center[1])\n .template(\"force\")\n .strength(self.clusterFociStrength);\n if (edges) {\n clusterForce.links(edges);\n }\n if (nodes) {\n clusterForce.nodes(nodes);\n }\n clusterForce\n .forceLinkDistance(self.clusterEdgeDistance)\n .forceLinkStrength(self.clusterEdgeStrength)\n .forceCharge(self.clusterNodeStrength)\n .forceNodeSize(self.clusterNodeSize);\n self.clusterForce = clusterForce;\n simulation.force(\"group\", clusterForce);\n }\n simulation\n .force(\"center\", d3Force.forceCenter(self.center[0], self.center[1]))\n .force(\"charge\", nodeForce)\n .alpha(alpha)\n .alphaDecay(alphaDecay)\n .alphaMin(alphaMin);\n if (self.preventOverlap) {\n self.overlapProcess(simulation);\n }\n // 如果有边,定义边的力\n if (edges) {\n // d3 的 forceLayout 会重新生成边的数据模型,为了避免污染源数据\n var edgeForce = d3Force\n .forceLink()\n .id(function (d) { return d.id; })\n .links(edges);\n if (self.edgeStrength) {\n edgeForce.strength(self.edgeStrength);\n }\n if (self.linkDistance) {\n edgeForce.distance(self.linkDistance);\n }\n self.edgeForce = edgeForce;\n simulation.force(\"link\", edgeForce);\n }\n if (self.workerEnabled && !isInWorker()) {\n // 如果不是运行在web worker里,不用web worker布局\n self.workerEnabled = false;\n console.warn(\"workerEnabled option is only supported when running in web worker.\");\n }\n if (!self.workerEnabled) {\n simulation\n .on(\"tick\", function () {\n self.tick();\n })\n .on(\"end\", function () {\n self.ticking = false;\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n });\n self.ticking = true;\n }\n else {\n // worker is enabled\n simulation.stop();\n var totalTicks = getSimulationTicks(simulation);\n for (var currentTick = 1; currentTick <= totalTicks; currentTick++) {\n simulation.tick();\n // currentTick starts from 1.\n postMessage({\n nodes: nodes,\n currentTick: currentTick,\n totalTicks: totalTicks,\n type: constants_1.LAYOUT_MESSAGE.TICK\n }, undefined);\n }\n self.ticking = false;\n }\n self.forceSimulation = simulation;\n self.ticking = true;\n }\n catch (e) {\n self.ticking = false;\n console.warn(e);\n }\n }\n else {\n if (reloadData) {\n if (self.clustering && self.clusterForce) {\n self.clusterForce.nodes(nodes);\n self.clusterForce.links(edges);\n }\n simulation.nodes(nodes);\n if (edges && self.edgeForce)\n self.edgeForce.links(edges);\n else if (edges && !self.edgeForce) {\n // d3 的 forceLayout 会重新生成边的数据模型,为了避免污染源数据\n var edgeForce = d3Force\n .forceLink()\n .id(function (d) { return d.id; })\n .links(edges);\n if (self.edgeStrength) {\n edgeForce.strength(self.edgeStrength);\n }\n if (self.linkDistance) {\n edgeForce.distance(self.linkDistance);\n }\n self.edgeForce = edgeForce;\n simulation.force(\"link\", edgeForce);\n }\n }\n if (self.preventOverlap) {\n self.overlapProcess(simulation);\n }\n simulation.alpha(alpha).restart();\n this.ticking = true;\n }\n };\n /**\n * 防止重叠\n * @param {object} simulation 力模拟模型\n */\n ForceLayout.prototype.overlapProcess = function (simulation) {\n var self = this;\n var nodeSize = self.nodeSize;\n var nodeSpacing = self.nodeSpacing;\n var nodeSizeFunc;\n var nodeSpacingFunc;\n var collideStrength = self.collideStrength;\n if ((0, util_1.isNumber)(nodeSpacing)) {\n nodeSpacingFunc = function () { return nodeSpacing; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing)) {\n nodeSpacingFunc = nodeSpacing;\n }\n else {\n nodeSpacingFunc = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res / 2 + nodeSpacingFunc(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res / 2 + nodeSpacingFunc(d);\n }\n return d.size / 2 + nodeSpacingFunc(d);\n }\n return 10 + nodeSpacingFunc(d);\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var size = nodeSize(d);\n return size + nodeSpacingFunc(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1 + nodeSpacingFunc(d); };\n }\n else if ((0, util_1.isNumber)(nodeSize)) {\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2 + nodeSpacingFunc(d); };\n }\n else {\n nodeSizeFunc = function () { return 10; };\n }\n // forceCollide's parameter is a radius\n simulation.force(\"collisionForce\", d3Force.forceCollide(nodeSizeFunc).strength(collideStrength));\n };\n /**\n * 更新布局配置,但不执行布局\n * @param {object} cfg 需要更新的配置项\n */\n ForceLayout.prototype.updateCfg = function (cfg) {\n var self = this;\n if (self.ticking) {\n self.forceSimulation.stop();\n self.ticking = false;\n }\n self.forceSimulation = null;\n Object.assign(self, cfg);\n };\n ForceLayout.prototype.destroy = function () {\n var self = this;\n if (self.ticking) {\n self.forceSimulation.stop();\n self.ticking = false;\n }\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n return ForceLayout;\n}(base_1.Base));\nexports.ForceLayout = ForceLayout;\n// Return total ticks of d3-force simulation\nfunction getSimulationTicks(simulation) {\n var alphaMin = simulation.alphaMin();\n var alphaTarget = simulation.alphaTarget();\n var alpha = simulation.alpha();\n var totalTicksFloat = Math.log((alphaMin - alphaTarget) / (alpha - alphaTarget)) /\n Math.log(1 - simulation.alphaDecay());\n var totalTicks = Math.ceil(totalTicksFloat);\n return totalTicks;\n}\n// 判断是否运行在web worker里\nfunction isInWorker() {\n // eslint-disable-next-line no-undef\n return (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope);\n}\n//# sourceMappingURL=force.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./force\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CircularLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nfunction initHierarchy(nodes, edges, nodeMap, directed) {\n nodes.forEach(function (_, i) {\n nodes[i].children = [];\n nodes[i].parent = [];\n });\n if (directed) {\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n var sourceIdx = 0;\n if (source) {\n sourceIdx = nodeMap[source];\n }\n var targetIdx = 0;\n if (target) {\n targetIdx = nodeMap[target];\n }\n var child = nodes[sourceIdx].children;\n var parent = nodes[targetIdx].parent;\n child.push(nodes[targetIdx].id);\n parent.push(nodes[sourceIdx].id);\n });\n }\n else {\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n var sourceIdx = 0;\n if (source) {\n sourceIdx = nodeMap[source];\n }\n var targetIdx = 0;\n if (target) {\n targetIdx = nodeMap[target];\n }\n var sourceChildren = nodes[sourceIdx].children;\n var targetChildren = nodes[targetIdx].children;\n sourceChildren.push(nodes[targetIdx].id);\n targetChildren.push(nodes[sourceIdx].id);\n });\n }\n}\nfunction connect(a, b, edges) {\n var m = edges.length;\n for (var i = 0; i < m; i++) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n if ((a.id === source && b.id === target) ||\n (b.id === source && a.id === target)) {\n return true;\n }\n }\n return false;\n}\nfunction compareDegree(a, b) {\n var aDegree = a.degree;\n var bDegree = b.degree;\n if (aDegree < bDegree) {\n return -1;\n }\n if (aDegree > bDegree) {\n return 1;\n }\n return 0;\n}\n/**\n * 圆形布局\n */\nvar CircularLayout = /** @class */ (function (_super) {\n __extends(CircularLayout, _super);\n function CircularLayout(options) {\n var _this = _super.call(this) || this;\n /** 固定半径,若设置了 radius,则 startRadius 与 endRadius 不起效 */\n _this.radius = null;\n /** 节点大小,配合 nodeSpacing,一起用于计算 radius。若不配置,节点大小默认为 30 */\n _this.nodeSize = undefined;\n /** 起始半径 */\n _this.startRadius = null;\n /** 终止半径 */\n _this.endRadius = null;\n /** 起始角度 */\n _this.startAngle = 0;\n /** 终止角度 */\n _this.endAngle = 2 * Math.PI;\n /** 是否顺时针 */\n _this.clockwise = true;\n /** 节点在环上分成段数(几个段将均匀分布),在 endRadius - startRadius != 0 时生效 */\n _this.divisions = 1;\n /** 节点在环上排序的依据,可选: 'topology', 'degree', 'null' */\n _this.ordering = null;\n /** how many 2*pi from first to last nodes */\n _this.angleRatio = 1;\n _this.nodes = [];\n _this.edges = [];\n _this.nodeMap = {};\n _this.degrees = [];\n _this.width = 300;\n _this.height = 300;\n _this.updateCfg(options);\n return _this;\n }\n CircularLayout.prototype.getDefaultCfg = function () {\n return {\n radius: null,\n startRadius: null,\n endRadius: null,\n startAngle: 0,\n endAngle: 2 * Math.PI,\n clockwise: true,\n divisions: 1,\n ordering: null,\n angleRatio: 1\n };\n };\n /**\n * 执行布局\n */\n CircularLayout.prototype.execute = function () {\n var _a;\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n var n = nodes.length;\n if (n === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (n === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var radius = self.radius, startRadius = self.startRadius, endRadius = self.endRadius;\n var divisions = self.divisions, startAngle = self.startAngle, endAngle = self.endAngle, angleRatio = self.angleRatio, ordering = self.ordering, clockwise = self.clockwise, paramNodeSpacing = self.nodeSpacing, paramNodeSize = self.nodeSize;\n var angleStep = (endAngle - startAngle) / n;\n // layout\n var nodeMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n var degrees = (0, util_1.getDegree)(nodes.length, nodeMap, edges);\n self.degrees = degrees;\n if (paramNodeSpacing) {\n var nodeSpacing_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSpacing);\n var nodeSize_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSize);\n var maxNodeSize_1 = -Infinity;\n nodes.forEach(function (node) {\n var nSize = nodeSize_1(node);\n if (maxNodeSize_1 < nSize)\n maxNodeSize_1 = nSize;\n });\n var length_1 = 0;\n nodes.forEach(function (node, i) {\n if (i === 0)\n length_1 += (maxNodeSize_1 || 10);\n else\n length_1 += (nodeSpacing_1(node) || 0) + (maxNodeSize_1 || 10);\n });\n radius = length_1 / (2 * Math.PI);\n }\n else if (!radius && !startRadius && !endRadius) {\n radius = self.height > self.width ? self.width / 2 : self.height / 2;\n }\n else if (!startRadius && endRadius) {\n startRadius = endRadius;\n }\n else if (startRadius && !endRadius) {\n endRadius = startRadius;\n }\n var astep = angleStep * angleRatio;\n var layoutNodes = [];\n if (ordering === \"topology\") {\n // layout according to the topology\n layoutNodes = self.topologyOrdering();\n }\n else if (ordering === \"topology-directed\") {\n // layout according to the topology\n layoutNodes = self.topologyOrdering(true);\n }\n else if (ordering === \"degree\") {\n // layout according to the descent order of degrees\n layoutNodes = self.degreeOrdering();\n }\n else {\n // layout according to the original order in the data.nodes\n layoutNodes = nodes;\n }\n var divN = Math.ceil(n / divisions); // node number in each division\n for (var i = 0; i < n; ++i) {\n var r = radius;\n if (!r && startRadius !== null && endRadius !== null) {\n r = startRadius + (i * (endRadius - startRadius)) / (n - 1);\n }\n if (!r) {\n r = 10 + (i * 100) / (n - 1);\n }\n var angle = startAngle +\n (i % divN) * astep +\n ((2 * Math.PI) / divisions) * Math.floor(i / divN);\n if (!clockwise) {\n angle =\n endAngle -\n (i % divN) * astep -\n ((2 * Math.PI) / divisions) * Math.floor(i / divN);\n }\n layoutNodes[i].x = center[0] + Math.cos(angle) * r;\n layoutNodes[i].y = center[1] + Math.sin(angle) * r;\n layoutNodes[i].weight = degrees[i].all;\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return {\n nodes: layoutNodes,\n edges: this.edges\n };\n };\n /**\n * 根据节点的拓扑结构排序\n * @return {array} orderedNodes 排序后的结果\n */\n CircularLayout.prototype.topologyOrdering = function (directed) {\n if (directed === void 0) { directed = false; }\n var self = this;\n var degrees = self.degrees;\n var edges = self.edges;\n var nodes = self.nodes;\n var cnodes = (0, util_1.clone)(nodes);\n var nodeMap = self.nodeMap;\n var orderedCNodes = [cnodes[0]];\n var resNodes = [nodes[0]];\n var pickFlags = [];\n var n = nodes.length;\n pickFlags[0] = true;\n initHierarchy(cnodes, edges, nodeMap, directed);\n var k = 0;\n cnodes.forEach(function (cnode, i) {\n if (i !== 0) {\n if ((i === n - 1 ||\n degrees[i].all !== degrees[i + 1].all ||\n connect(orderedCNodes[k], cnode, edges)) &&\n !pickFlags[i]) {\n orderedCNodes.push(cnode);\n resNodes.push(nodes[nodeMap[cnode.id]]);\n pickFlags[i] = true;\n k++;\n }\n else {\n var children = orderedCNodes[k].children;\n var foundChild = false;\n for (var j = 0; j < children.length; j++) {\n var childIdx = nodeMap[children[j]];\n if (degrees[childIdx].all === degrees[i].all && !pickFlags[childIdx]) {\n orderedCNodes.push(cnodes[childIdx]);\n resNodes.push(nodes[nodeMap[cnodes[childIdx].id]]);\n pickFlags[childIdx] = true;\n foundChild = true;\n break;\n }\n }\n var ii = 0;\n while (!foundChild) {\n if (!pickFlags[ii]) {\n orderedCNodes.push(cnodes[ii]);\n resNodes.push(nodes[nodeMap[cnodes[ii].id]]);\n pickFlags[ii] = true;\n foundChild = true;\n }\n ii++;\n if (ii === n) {\n break;\n }\n }\n }\n }\n });\n return resNodes;\n };\n /**\n * 根据节点度数大小排序\n * @return {array} orderedNodes 排序后的结果\n */\n CircularLayout.prototype.degreeOrdering = function () {\n var self = this;\n var nodes = self.nodes;\n var orderedNodes = [];\n var degrees = self.degrees;\n nodes.forEach(function (node, i) {\n node.degree = degrees[i].all;\n orderedNodes.push(node);\n });\n orderedNodes.sort(compareDegree);\n return orderedNodes;\n };\n CircularLayout.prototype.getType = function () {\n return \"circular\";\n };\n return CircularLayout;\n}(base_1.Base));\nexports.CircularLayout = CircularLayout;\n//# sourceMappingURL=circular.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar filterOutLinks = function (k, v) {\n if (k !== \"next\" && k !== \"prev\") {\n return v;\n }\n};\nvar unlink = function (entry) {\n entry.prev.next = entry.next;\n entry.next.prev = entry.prev;\n delete entry.next;\n delete entry.prev;\n};\nvar List = /** @class */ (function () {\n function List() {\n var shortcut = {};\n shortcut.prev = shortcut;\n shortcut.next = shortcut.prev;\n this.shortcut = shortcut;\n }\n List.prototype.dequeue = function () {\n var shortcut = this.shortcut;\n var entry = shortcut.prev;\n if (entry && entry !== shortcut) {\n unlink(entry);\n return entry;\n }\n };\n List.prototype.enqueue = function (entry) {\n var shortcut = this.shortcut;\n if (entry.prev && entry.next) {\n unlink(entry);\n }\n entry.next = shortcut.next;\n shortcut.next.prev = entry;\n shortcut.next = entry;\n entry.prev = shortcut;\n };\n List.prototype.toString = function () {\n var strs = [];\n var sentinel = this.shortcut;\n var curr = sentinel.prev;\n while (curr !== sentinel) {\n strs.push(JSON.stringify(curr, filterOutLinks));\n curr = curr === null || curr === void 0 ? void 0 : curr.prev;\n }\n return \"[\".concat(strs.join(\", \"), \"]\");\n };\n return List;\n}());\nexports.default = List;\n//# sourceMappingURL=list.js.map","export var GraphEnum;\n\n(function (GraphEnum) {\n GraphEnum[\"DEFAULT_EDGE_NAME\"] = \"\\0\";\n GraphEnum[\"GRAPH_NODE\"] = \"\\0\";\n GraphEnum[\"EDGE_KEY_DELIM\"] = \"\\x01\";\n})(GraphEnum || (GraphEnum = {}));","import { GraphEnum } from './Graph/enum';\n/**\n * @description add one to key's value in map\n * @description.zh-CN 在 map 中 key 的值加 1\n * @param map\n * @param key\n */\n\nexport function incrementOrInitEntry(map, key) {\n var val = map.get(key) || 0;\n map.set(key, val + 1);\n}\n/**\n * @description minus one from key's value in map, is value is 0, delete the key\n * @description.zh-CN 在 map 中 key 的值减 1,如果值为 0,则删除 key\n */\n\nexport function decrementOrRemoveEntry(map, key) {\n var val = map.get(key);\n\n if (val !== undefined) {\n val = val - 1;\n\n if (val > 0) {\n map.set(key, val);\n } else {\n map.delete(key);\n }\n }\n}\n/**\n * @description convert edge to string id\n * @description.zh-CN 转换边为字符串 id\n */\n\nexport function edgeArgsToId(isDirected, v_, w_, name) {\n var v = String(v_);\n var w = String(w_);\n\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n return v + GraphEnum.EDGE_KEY_DELIM + w + GraphEnum.EDGE_KEY_DELIM + (name === undefined ? GraphEnum.DEFAULT_EDGE_NAME : name);\n}\n/**\n * @description convert edge arguments to edge object\n * @description.zh-CN 转换边参数为边对象\n */\n\nexport function edgeArgsToObj(isDirected, v, w, name) {\n var strV = String(v);\n var strW = String(w);\n var edgeObj = {\n v: v,\n w: w\n };\n\n if (!isDirected && strV > strW) {\n var tmp = edgeObj.v;\n edgeObj.v = edgeObj.w;\n edgeObj.w = tmp;\n }\n\n if (name !== undefined) {\n edgeObj.name = name;\n }\n\n return edgeObj;\n}\n/**\n * @description convert edge object to string id\n * @description.zh-CN 转换边对象为字符串 id\n */\n\nexport function edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\nexport function isFunction(obj) {\n return typeof obj === 'function';\n}","import Graph from '.';\n/**\n * @description Convert a graph's node to JSON.\n * @description.zh-CN 转换图的节点为 JSON。\n * @param graph\n * @returns\n */\n\nvar nodeToJSON = function nodeToJSON(graph) {\n return graph.nodes().map(function (n) {\n var value = graph.node(n);\n var parent = graph.parent(n);\n var node = {\n id: n,\n value: value,\n parent: parent\n };\n\n if (node.value === undefined) {\n delete node.value;\n }\n\n if (node.parent === undefined) {\n delete node.parent;\n }\n\n return node;\n });\n};\n/**\n * @description Convert all graph's edges to JSON.\n * @description.zh-CN 转换图的所有边为 JSON。\n * @param graph\n * @returns\n */\n\n\nvar edgeToJSON = function edgeToJSON(graph) {\n return graph.edges().map(function (edge) {\n var value = graph.edge(edge);\n var e = {\n v: edge.v,\n w: edge.w,\n value: value,\n name: edge.name\n };\n\n if (e.name === undefined) {\n delete e.name;\n }\n\n if (e.value === undefined) {\n delete e.value;\n }\n\n return e;\n });\n};\n/**\n * @description Convert a graph to JSON.\n * @description.zh-CN 转换图为 JSON。\n * @param graph\n * @returns\n */\n\n\nexport var write = function write(graph) {\n var json = {\n options: {\n directed: graph.isDirected(),\n multigraph: graph.isMultigraph(),\n compound: graph.isCompound()\n },\n nodes: nodeToJSON(graph),\n edges: edgeToJSON(graph),\n value: graph.graph()\n };\n\n if (json.value === undefined) {\n delete json.value;\n }\n\n return json;\n};\n/**\n * @description read a graph from JSON.\n * @description.zh-CN 从 JSON 读取图。\n * @param json\n * @returns\n */\n\nexport var read = function read(json) {\n var graph = new Graph(json.options);\n\n if (json.value !== undefined) {\n graph.setGraph(json.value);\n }\n\n json.nodes.forEach(function (entry) {\n graph.setNode(entry.id, entry.value);\n\n if (entry.parent) {\n graph.setParent(entry.id, entry.parent);\n }\n });\n json.edges.forEach(function (entry) {\n graph.setEdge(entry.v, entry.w, entry.value, entry.name);\n });\n return graph;\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { edgeArgsToId, isFunction } from '../util';\nimport { GraphEnum } from './enum';\nimport { decrementOrRemoveEntry, edgeArgsToObj, edgeObjToId, incrementOrInitEntry } from '../util';\nimport { read, write } from './toJSON';\nvar defaultOption = {\n compound: false,\n multigraph: false,\n directed: true\n};\n\nvar Graph = /*#__PURE__*/function () {\n // Graph option or basic props\n\n /**\n * @description Label for this graph itself\n * @description.zh-CN 图本身的标签(label)\n * @default undefined\n */\n\n /**\n * @description Number of nodes in the graph\n * @description.zh-CN 节点的数量\n * @default 0\n */\n\n /**\n * @description Number of edges in the graph\n * @description.zh-CN 节点的数量\n * @default 0\n */\n\n /**\n * @description return node label with its id\n * @description.zh-CN 返回节点的默认的标签\n */\n\n /**\n * @description return edge label with its id\n * @description.zh-CN 返回边的默认的标签\n */\n function Graph() {\n var _this = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Graph);\n\n this.directed = true;\n this.multigraph = false;\n this.compound = false;\n this.GRAPH_NODE = GraphEnum.GRAPH_NODE;\n this.label = void 0;\n this.nodeCountNum = 0;\n this.edgeCountNum = 0;\n\n this.defaultNodeLabelFn = function () {\n return undefined;\n };\n\n this.defaultEdgeLabelFn = function () {\n return undefined;\n };\n\n this.parentMap = void 0;\n this.childrenMap = void 0;\n this.nodesLabelMap = new Map();\n this.inEdgesMap = new Map();\n this.outEdgesMap = new Map();\n this.predecessorsMap = new Map();\n this.successorsMap = new Map();\n this.edgesMap = new Map();\n this.edgesLabelsMap = new Map();\n\n this.isDirected = function () {\n return _this.directed;\n };\n\n this.isMultigraph = function () {\n return _this.multigraph;\n };\n\n this.isCompound = function () {\n return _this.compound;\n };\n\n this.setGraph = function (label) {\n _this.label = label;\n return _this;\n };\n\n this.graph = function () {\n return _this.label;\n };\n\n this.setDefaultNodeLabel = function (newDefault) {\n if (isFunction(newDefault)) {\n _this.defaultNodeLabelFn = newDefault;\n } else {\n _this.defaultNodeLabelFn = function () {\n return newDefault;\n };\n }\n\n return _this;\n };\n\n this.nodeCount = function () {\n return _this.nodeCountNum;\n };\n\n this.node = function (n) {\n return _this.nodesLabelMap.get(n);\n };\n\n this.nodes = function () {\n return Array.from(_this.nodesLabelMap.keys());\n };\n\n this.sources = function () {\n return _this.nodes().filter(function (n) {\n var _this$inEdgesMap$get;\n\n return !((_this$inEdgesMap$get = _this.inEdgesMap.get(n)) === null || _this$inEdgesMap$get === void 0 ? void 0 : _this$inEdgesMap$get.size);\n });\n };\n\n this.sinks = function () {\n return _this.nodes().filter(function (n) {\n var _this$outEdgesMap$get;\n\n return !((_this$outEdgesMap$get = _this.outEdgesMap.get(n)) === null || _this$outEdgesMap$get === void 0 ? void 0 : _this$outEdgesMap$get.size);\n });\n };\n\n this.setNodes = function (nodes, value) {\n nodes.map(function (node) {\n return _this.setNode(node, value);\n });\n return _this;\n };\n\n this.hasNode = function (node) {\n return _this.nodesLabelMap.has(node);\n };\n\n this.checkCompound = function () {\n if (!_this.isCompound()) {\n throw new Error('Cannot construct parent-children relations in a non-compound graph');\n }\n };\n\n this.parent = function (node) {\n if (_this.isCompound()) {\n var _this$parentMap;\n\n var parent = (_this$parentMap = _this.parentMap) === null || _this$parentMap === void 0 ? void 0 : _this$parentMap.get(node);\n\n if (parent !== _this.GRAPH_NODE) {\n return parent;\n }\n }\n };\n\n this.removeFromParentsChildList = function (node) {\n var targetParent = _this.parentMap.get(node);\n\n _this.childrenMap.get(targetParent).delete(node);\n };\n\n this.setParent = function (node, parent) {\n var _this$parentMap2, _this$childrenMap;\n\n _this.checkCompound();\n\n var realParent = parent === undefined ? _this.GRAPH_NODE : parent;\n\n var checkNode = _this.parent(realParent);\n\n while (checkNode) {\n if (node === checkNode) {\n throw new Error('Setting ' + parent + ' as parent of ' + node + ' would create a cycle');\n }\n\n checkNode = _this.parent(checkNode);\n }\n\n if (parent) {\n _this.setNode(parent);\n }\n\n _this.setNode(node);\n\n _this.removeFromParentsChildList(node);\n\n (_this$parentMap2 = _this.parentMap) === null || _this$parentMap2 === void 0 ? void 0 : _this$parentMap2.set(node, realParent);\n\n var realParentChilren = _this.childrenMap.get(realParent);\n\n realParentChilren.set(node, true);\n (_this$childrenMap = _this.childrenMap) === null || _this$childrenMap === void 0 ? void 0 : _this$childrenMap.set(realParent, realParentChilren);\n return _this;\n };\n\n this.children = function (node) {\n var targetNode = node === undefined ? _this.GRAPH_NODE : node;\n\n if (_this.isCompound()) {\n var _this$childrenMap2;\n\n var target = (_this$childrenMap2 = _this.childrenMap) === null || _this$childrenMap2 === void 0 ? void 0 : _this$childrenMap2.get(targetNode);\n\n if (target) {\n return Array.from(target.keys());\n }\n\n return undefined;\n }\n\n if (targetNode === _this.GRAPH_NODE) {\n return _this.nodes();\n }\n\n if (node && _this.hasNode(node)) {\n return [];\n }\n };\n\n this.predecessors = function (node) {\n var preds = _this.predecessorsMap.get(node);\n\n return preds ? Array.from(preds.keys()) : undefined;\n };\n\n this.successors = function (node) {\n var succs = _this.successorsMap.get(node);\n\n return succs ? Array.from(succs.keys()) : undefined;\n };\n\n this.neighbors = function (node) {\n var _this$predecessors;\n\n if (!_this.hasNode(node)) {\n return undefined;\n }\n\n return Array.from(new Set((_this$predecessors = _this.predecessors(node)) === null || _this$predecessors === void 0 ? void 0 : _this$predecessors.concat(_this.successors(node))));\n };\n\n this.isLeaf = function (node) {\n var _this$neighbors;\n\n if (_this.isDirected()) {\n var _this$successors;\n\n return !((_this$successors = _this.successors(node)) === null || _this$successors === void 0 ? void 0 : _this$successors.length);\n }\n\n return !((_this$neighbors = _this.neighbors(node)) === null || _this$neighbors === void 0 ? void 0 : _this$neighbors.length);\n };\n\n this.filterNodes = function (filter) {\n var directed = _this.directed,\n multigraph = _this.multigraph,\n compound = _this.compound;\n var copyGraph = new Graph({\n directed: directed,\n multigraph: multigraph,\n compound: compound\n });\n copyGraph.setGraph(_this.graph());\n\n _this.nodes().forEach(function (n) {\n if (filter(n)) {\n copyGraph.setNode(n, _this.node(n));\n }\n });\n\n _this.edges().forEach(function (edgeObj) {\n if (copyGraph.hasNode(edgeObj.v) && copyGraph.hasNode(edgeObj.w)) {\n copyGraph.setEdgeObj(edgeObj, _this.edge(edgeObj));\n }\n });\n\n if (compound) {\n var findParent = function findParent(node) {\n var parent = _this.parent(node);\n\n while (parent !== undefined && !copyGraph.hasNode(parent)) {\n parent = _this.parent(parent);\n }\n\n return parent;\n };\n\n copyGraph.nodes().forEach(function (node) {\n copyGraph.setParent(node, findParent(node));\n });\n }\n\n return copyGraph;\n };\n\n this.setDefaultEdgeLabel = function (newDefault) {\n if (isFunction(newDefault)) {\n _this.defaultEdgeLabelFn = newDefault;\n } else {\n _this.defaultEdgeLabelFn = function () {\n return newDefault;\n };\n }\n\n return _this;\n };\n\n this.edgeCount = function () {\n return _this.edgeCountNum;\n };\n\n this.setEdgeObj = function (edgeObj, value) {\n return _this.setEdge(edgeObj.v, edgeObj.w, value, edgeObj.name);\n };\n\n this.setPath = function (edges, value) {\n edges.reduce(function (v, w) {\n _this.setEdge(v, w, value);\n\n return w;\n });\n return _this;\n };\n\n this.edgeFromArgs = function (v, w, name) {\n return _this.edge({\n v: v,\n w: w,\n name: name\n });\n };\n\n this.edge = function (edgeObj) {\n return _this.edgesLabelsMap.get(edgeObjToId(_this.isDirected(), edgeObj));\n };\n\n this.hasEdge = function (v, w, name) {\n return _this.edgesLabelsMap.has(edgeObjToId(_this.isDirected(), {\n v: v,\n w: w,\n name: name\n }));\n };\n\n this.removeEdgeObj = function (_ref) {\n var v = _ref.v,\n w = _ref.w,\n name = _ref.name;\n return _this.removeEdge(v, w, name);\n };\n\n this.edges = function () {\n return Array.from(_this.edgesMap.values());\n };\n\n this.inEdges = function (v, u) {\n var inV = _this.inEdgesMap.get(v);\n\n if (inV) {\n return Array.from(inV.values()).filter(function (e) {\n return !u || e.v === u;\n });\n }\n\n return undefined;\n };\n\n this.outEdges = function (w, u) {\n var outW = _this.outEdgesMap.get(w);\n\n if (outW) {\n return Array.from(outW.values()).filter(function (e) {\n return !u || e.w === u;\n });\n }\n\n return undefined;\n };\n\n this.nodeEdges = function (v, w) {\n var _this$inEdges;\n\n if (!_this.hasNode(v)) {\n return undefined;\n }\n\n return (_this$inEdges = _this.inEdges(v, w)) === null || _this$inEdges === void 0 ? void 0 : _this$inEdges.concat(_this.outEdges(v, w));\n };\n\n this.toJSON = function () {\n return write(_this);\n };\n\n this.nodeInDegree = function (node) {\n var inEdges = _this.inEdgesMap.get(node);\n\n if (inEdges) {\n return inEdges.size;\n }\n\n return 0;\n };\n\n this.nodeOutDegree = function (node) {\n var outEdges = _this.outEdgesMap.get(node);\n\n if (outEdges) {\n return outEdges.size;\n }\n\n return 0;\n };\n\n this.nodeDegree = function (node) {\n return _this.nodeInDegree(node) + _this.nodeOutDegree(node);\n };\n\n this.source = function (edge) {\n return edge.v;\n };\n\n this.target = function (edge) {\n return edge.w;\n };\n\n var resultOptions = _objectSpread(_objectSpread({}, defaultOption), options);\n\n this.compound = resultOptions.compound;\n this.directed = resultOptions.directed;\n this.multigraph = resultOptions.multigraph;\n\n if (this.compound) {\n this.parentMap = new Map();\n this.childrenMap = new Map();\n }\n } // Map for graph\n\n /**\n * @description Map for parent relationship\n * @description.zh-CN 父子关系的映射\n */\n\n\n _createClass(Graph, [{\n key: \"setNode\",\n value:\n /**\n * @description Set Node label in graph if node not in graph then create it\n * @description.zh-CN 设置节点的label,如果这个节点不在图中,则在图中创建这个节点\n * @param node\n * @param value\n * @returns\n */\n function setNode(node, value) {\n var nodesLabelMap = this.nodesLabelMap,\n defaultNodeLabelFn = this.defaultNodeLabelFn,\n isCompound = this.isCompound,\n parentMap = this.parentMap,\n childrenMap = this.childrenMap,\n inEdgesMap = this.inEdgesMap,\n outEdgesMap = this.outEdgesMap,\n predecessorsMap = this.predecessorsMap,\n successorsMap = this.successorsMap; // 如果节点不在图中,则创建节点\n\n if (nodesLabelMap.has(node)) {\n if (value !== undefined) {\n nodesLabelMap.set(node, value);\n }\n\n return this;\n }\n\n nodesLabelMap.set(node, value || defaultNodeLabelFn(node)); // 如果是复合图,则创建节点的子节点\n\n if (isCompound()) {\n var _childrenMap$get;\n\n parentMap === null || parentMap === void 0 ? void 0 : parentMap.set(node, this.GRAPH_NODE);\n childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.set(node, new Map());\n\n if (!(childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.has(this.GRAPH_NODE))) {\n childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.set(this.GRAPH_NODE, new Map());\n }\n\n childrenMap === null || childrenMap === void 0 ? void 0 : (_childrenMap$get = childrenMap.get(this.GRAPH_NODE)) === null || _childrenMap$get === void 0 ? void 0 : _childrenMap$get.set(node, true);\n }\n\n [inEdgesMap, outEdgesMap, predecessorsMap, successorsMap].forEach(function (map) {\n return map.set(node, new Map());\n });\n this.nodeCountNum += 1;\n return this;\n }\n /**\n * @description Set nodes or add nodes in batch\n * @description.zh-CN 批量设置或者创建节点\n * @param nodes\n * @param value\n * @returns\n */\n\n }, {\n key: \"removeNode\",\n value:\n /**\n * @description Remove node from graph\n * @description.zh-CN 将节点从图中移除\n * @param node\n * @returns\n */\n function removeNode(node) {\n var _this2 = this;\n\n if (this.hasNode(node)) {\n var cleanEdge = function cleanEdge(edgeObj) {\n _this2.removeEdge(edgeObj.v, edgeObj.w, edgeObj.name);\n };\n\n var inEdgesMap = this.inEdgesMap,\n outEdgesMap = this.outEdgesMap,\n predecessorsMap = this.predecessorsMap,\n successorsMap = this.successorsMap,\n nodesLabelMap = this.nodesLabelMap;\n\n if (this.isCompound()) {\n var _this$parentMap3, _this$children, _this$childrenMap3;\n\n this.removeFromParentsChildList(node);\n (_this$parentMap3 = this.parentMap) === null || _this$parentMap3 === void 0 ? void 0 : _this$parentMap3.delete(node);\n (_this$children = this.children(node)) === null || _this$children === void 0 ? void 0 : _this$children.forEach(function (n) {\n return _this2.setParent(n);\n });\n (_this$childrenMap3 = this.childrenMap) === null || _this$childrenMap3 === void 0 ? void 0 : _this$childrenMap3.delete(node);\n }\n\n var inE = inEdgesMap.get(node);\n var outE = outEdgesMap.get(node);\n Array.from(inE.values()).forEach(function (edge) {\n return cleanEdge(edge);\n });\n Array.from(outE.values()).forEach(function (edge) {\n return cleanEdge(edge);\n });\n nodesLabelMap.delete(node);\n inEdgesMap.delete(node);\n outEdgesMap.delete(node);\n predecessorsMap.delete(node);\n successorsMap.delete(node);\n this.nodeCountNum -= 1;\n }\n\n return this;\n }\n /**\n * @description Set function that generate default label for edge, if param is non-function value then default label will always be this value;\n * @description.zh-CN 设置默认获取边Label的方法,如果传入不是函数的,那么默认label 的值只会是传入值\n * @param newDefault\n * @returns\n */\n\n }, {\n key: \"setEdge\",\n value:\n /**\n * @description set edge value, if nodes or edges not exsit then add to graph\n * @description.zh-CN 设置边的属性,如果边或节点不存在,那么将他们加入这个图\n * @param v\n * @param w\n * @param value\n * @param name\n * @returns\n */\n function setEdge(v_, w_, value, name) {\n var _this$inEdgesMap$get2, _this$outEdgesMap$get2;\n\n var edgeObj = edgeArgsToObj(this.isDirected(), v_, w_, name);\n var edgeId = edgeObjToId(this.isDirected(), edgeObj);\n var v = edgeObj.v,\n w = edgeObj.w;\n\n if (this.edgesLabelsMap.has(edgeId)) {\n this.edgesLabelsMap.set(edgeId, value);\n return this;\n }\n\n if (name !== undefined && !this.isMultigraph()) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n this.setNode(v);\n this.setNode(w);\n this.edgesLabelsMap.set(edgeId, value || this.defaultEdgeLabelFn(v, w, name));\n Object.freeze(edgeObj);\n this.edgesMap.set(edgeId, edgeObj);\n var preds = this.predecessorsMap.get(w);\n var succs = this.successorsMap.get(v);\n incrementOrInitEntry(preds, v);\n incrementOrInitEntry(succs, w);\n (_this$inEdgesMap$get2 = this.inEdgesMap.get(w)) === null || _this$inEdgesMap$get2 === void 0 ? void 0 : _this$inEdgesMap$get2.set(edgeId, edgeObj);\n (_this$outEdgesMap$get2 = this.outEdgesMap.get(v)) === null || _this$outEdgesMap$get2 === void 0 ? void 0 : _this$outEdgesMap$get2.set(edgeId, edgeObj);\n this.edgeCountNum += 1;\n return this;\n }\n }, {\n key: \"removeEdge\",\n value:\n /**\n * @description remove a specific edge\n * @description.zh-CN 删除一条边\n * @param v\n * @param w\n * @param name\n * @returns\n */\n function removeEdge(v_, w_, name) {\n var edgeId = edgeArgsToId(this.isDirected(), v_, w_, name);\n var edgeObj = this.edgesMap.get(edgeId);\n\n if (edgeObj) {\n var _edgeArgsToObj = edgeArgsToObj(this.isDirected(), v_, w_, name),\n v = _edgeArgsToObj.v,\n w = _edgeArgsToObj.w;\n\n this.edgesLabelsMap.delete(edgeId);\n this.edgesMap.delete(edgeId);\n var preds = this.predecessorsMap.get(w);\n var succs = this.successorsMap.get(v);\n decrementOrRemoveEntry(preds, v);\n decrementOrRemoveEntry(succs, w);\n this.inEdgesMap.get(w).delete(edgeId);\n this.outEdgesMap.get(v).delete(edgeId);\n this.edgeCountNum -= 1;\n }\n\n return this;\n }\n /**\n * @description remove a specific edge by edge object\n * @description.zh-CN 删除一条边\n */\n\n }]);\n\n return Graph;\n}();\n\nGraph.fromJSON = read;\nexport { Graph as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport Graph from '.';\nexport var GraphWithEvent = /*#__PURE__*/function (_Graph) {\n _inherits(GraphWithEvent, _Graph);\n\n var _super = _createSuper(GraphWithEvent);\n\n function GraphWithEvent() {\n var _this;\n\n _classCallCheck(this, GraphWithEvent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.eventPool = {};\n return _this;\n }\n\n _createClass(GraphWithEvent, [{\n key: \"appendEvent\",\n value:\n /**\n * @description Add an event listener.\n * @description.zh-CN 添加事件监听器。\n */\n function appendEvent(type, callback) {\n if (!this.eventPool[type]) {\n this.eventPool[type] = [];\n }\n\n this.eventPool[type].push(callback);\n }\n /**\n * @description remove an event listener.\n * @description.zh-CN 移除事件监听器。\n */\n\n }, {\n key: \"removeEvent\",\n value: function removeEvent(type, callback) {\n if (!this.eventPool[type]) {\n return;\n }\n\n var index = this.eventPool[type].indexOf(callback);\n\n if (index > -1) {\n this.eventPool[type].splice(index, 1);\n }\n }\n /**\n * @description trigger an event.\n * @description.zh-CN 触发事件。\n */\n\n }, {\n key: \"emitEvent\",\n value: function emitEvent(type) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (!this.eventPool[type]) {\n return;\n }\n\n this.eventPool[type].forEach(function (callback) {\n callback.apply(void 0, args);\n });\n }\n }, {\n key: \"setNode\",\n value: function setNode(node, value) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"setNode\", this).call(this, node, value);\n\n this.emitEvent('nodeAdd', node, value);\n return this;\n }\n }, {\n key: \"removeNode\",\n value: function removeNode(node) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"removeNode\", this).call(this, node);\n\n this.emitEvent('nodeRemove', node);\n return this;\n }\n }, {\n key: \"setEdge\",\n value: function setEdge(v_, w_, value, name) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"setEdge\", this).call(this, v_, w_, value, name);\n\n this.emitEvent('edgeAdd', v_, w_, value, name);\n return this;\n }\n }, {\n key: \"removeEdge\",\n value: function removeEdge(v_, w_, name) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"removeEdge\", this).call(this, v_, w_, name);\n\n this.emitEvent('edgeRemove', v_, w_, name);\n return this;\n }\n }]);\n\n return GraphWithEvent;\n}(Graph);","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// A PriorityQueue is a queue that can be sorted by priority.\nvar PriorityQueue = /*#__PURE__*/_createClass(function PriorityQueue() {\n var _this = this;\n\n _classCallCheck(this, PriorityQueue);\n\n this.arr = [];\n this.keyIndice = new Map();\n\n this.size = function () {\n return _this.arr.length;\n };\n\n this.keys = function () {\n return _this.arr.map(function (e) {\n return e.key;\n });\n };\n\n this.has = function (key) {\n return _this.keyIndice.has(key);\n };\n\n this.priority = function (key) {\n var index = _this.keyIndice.get(key);\n\n if (index !== undefined) {\n return _this.arr[index].priority;\n }\n };\n\n this.swap = function (i, j) {\n var arr = _this.arr,\n keyIndice = _this.keyIndice;\n var _ref = [arr[i], arr[j]],\n originI = _ref[0],\n originJ = _ref[1];\n arr[i] = originJ;\n arr[j] = originI;\n keyIndice.set(originI.key, j);\n keyIndice.set(originJ.key, i);\n };\n\n this.innerDecrease = function (index) {\n var arr = _this.arr;\n var priority = arr[index].priority;\n var parent;\n var i = index;\n\n while (i !== 0) {\n var _arr$parent;\n\n parent = i >> 1;\n\n if (((_arr$parent = arr[parent]) === null || _arr$parent === void 0 ? void 0 : _arr$parent.priority) < priority) {\n break;\n }\n\n _this.swap(i, parent);\n\n i = parent;\n }\n };\n\n this.heapify = function (i) {\n var arr = _this.arr;\n var l = i << 1;\n var r = l + 1;\n var largest = i;\n\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n\n if (largest !== i) {\n _this.swap(i, largest);\n\n _this.heapify(largest);\n }\n }\n };\n\n this.min = function () {\n if (_this.size() === 0) {\n throw new Error('Queue underflow');\n }\n\n return _this.arr[0].key;\n };\n\n this.add = function (key, priority) {\n var keyIndice = _this.keyIndice,\n arr = _this.arr; // if the key is already in the queue, update the priority\n\n if (!keyIndice.has(key)) {\n var index = arr.length;\n keyIndice.set(key, index);\n arr.push({\n key: key,\n priority: priority\n });\n\n _this.innerDecrease(index);\n\n return true;\n }\n\n return false;\n };\n\n this.removeMin = function () {\n _this.swap(0, _this.arr.length - 1);\n\n var min = _this.arr.pop();\n\n _this.keyIndice.delete(min.key);\n\n _this.heapify(0);\n\n return min.key;\n };\n\n this.decrease = function (key, priority) {\n if (!_this.has(key)) {\n throw new Error(\"There's no key named \".concat(key));\n } // there must be an index\n\n\n var index = _this.keyIndice.get(key);\n\n if (priority > _this.arr[index].priority) {\n throw new Error(\"New priority is greater than current priority.Key: \".concat(key, \" Old: + \").concat(_this.arr[index].priority, \" New: \").concat(priority));\n }\n\n _this.arr[index].priority = priority;\n\n _this.innerDecrease(index);\n };\n});\n\nexport { PriorityQueue as default };","import Graph from '../Graph';\nimport PriorityQueue from './PriorityQueue';\n\nvar prim = function prim(graph, weightFn) {\n var result = new Graph();\n var parents = new Map();\n var pq = new PriorityQueue();\n var v;\n\n function updateNeighbors(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var pri = pq.priority(w);\n\n if (pri !== undefined) {\n var edgeWeight = weightFn(edge);\n\n if (edgeWeight < pri) {\n parents.set(w, v);\n pq.decrease(w, edgeWeight);\n }\n }\n }\n\n if (graph.nodeCount() === 0) {\n return result;\n }\n\n graph.nodes().forEach(function (node) {\n pq.add(node, Number.POSITIVE_INFINITY);\n result.setNode(node);\n }); // Start from an arbitrary node\n\n pq.decrease(graph.nodes()[0], 0);\n var init = false;\n\n while (pq.size() > 0) {\n var _graph$nodeEdges;\n\n v = pq.removeMin();\n\n if (parents.has(v)) {\n result.setEdge(v, parents.get(v));\n } else if (init) {\n throw new Error('Input graph is not connected: ' + graph.graph());\n } else {\n init = true;\n }\n\n (_graph$nodeEdges = graph.nodeEdges(v)) === null || _graph$nodeEdges === void 0 ? void 0 : _graph$nodeEdges.forEach(updateNeighbors);\n }\n\n return result;\n};\n\nexport default prim;","var components = function components(graph) {\n var visited = new Set();\n var resultComponents = [];\n var nodes = graph.nodes();\n nodes.forEach(function (n) {\n var componentsArr = [];\n var waitingList = [n];\n\n while (waitingList.length > 0) {\n var node = waitingList.pop();\n\n if (!visited.has(node)) {\n var _graph$successors, _graph$predecessors;\n\n visited.add(node);\n componentsArr.push(node);\n (_graph$successors = graph.successors(node)) === null || _graph$successors === void 0 ? void 0 : _graph$successors.forEach(function (n) {\n return waitingList.push(n);\n });\n (_graph$predecessors = graph.predecessors(node)) === null || _graph$predecessors === void 0 ? void 0 : _graph$predecessors.forEach(function (n) {\n return waitingList.push(n);\n });\n }\n }\n\n if (componentsArr.length) {\n resultComponents.push(componentsArr);\n }\n });\n return resultComponents;\n};\n\nexport default components;","/**\n * @description DFS traversal.\n * @description.zh-CN DFS 遍历。\n */\nvar doDFS = function doDFS(graph, node, postorder, visited, navigator, result) {\n if (!visited.includes(node)) {\n visited.push(node);\n\n if (!postorder) {\n result.push(node);\n }\n\n navigator(node).forEach(function (n) {\n return doDFS(graph, n, postorder, visited, navigator, result);\n });\n\n if (postorder) {\n result.push(node);\n }\n }\n};\n/**\n * @description DFS traversal.\n * @description.zh-CN DFS 遍历。\n */\n\n\nvar dfs = function dfs(graph, node, order) {\n var nodes = Array.isArray(node) ? node : [node];\n\n var navigator = function navigator(n) {\n return graph.isDirected() ? graph.successors(n) : graph.neighbors(n);\n };\n\n var results = [];\n var visited = [];\n nodes.forEach(function (node) {\n if (!graph.hasNode(node)) {\n throw new Error('Graph does not have node: ' + node);\n } else {\n doDFS(graph, node, order === 'post', visited, navigator, results);\n }\n });\n return results;\n};\n\nexport default dfs;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport PriorityQueue from './PriorityQueue';\n\nvar DEFAULT_WEIGHT_FUNC = function DEFAULT_WEIGHT_FUNC() {\n return 1;\n};\n/**\n * @description Dijkstra's algorithm for single-source shortest paths.\n * @description https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm\n * @description.zh-CN Dijkstra 算法用于单源最短路径。\n */\n\n\nvar dijkstra = function dijkstra(graph, source, weightFn, edgeFn) {\n return runDijkstra(graph, source, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function (v) {\n return graph.outEdges(v);\n });\n};\n/**\n * @description Dijkstra's algorithm for single-source shortest paths.\n * @description https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm\n * @description.zh-CN Dijkstra 算法用于单源最短路径。\n */\n\n\nvar runDijkstra = function runDijkstra(graph, source, weightFn, edgeFn) {\n var results = new Map();\n var pq = new PriorityQueue();\n var v;\n var vEntry;\n\n var updateNeighbors = function updateNeighbors(edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results.get(w);\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error('dijkstra does not allow negative edge weights. ' + 'Bad edge: ' + edge + ' Weight: ' + weight);\n } // If there is already a shorter path to w, ignore this edge.\n\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n graph.nodes().forEach(function (v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results.set(v, {\n distance: distance\n });\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results.get(v);\n\n if (vEntry && vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n var obj = {};\n Array.from(results.entries()).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n e = _ref2[1];\n\n obj[String(node)] = e;\n return obj;\n });\n return obj;\n};\n\nexport default dijkstra;","import dijkstra from './dijkstra';\n\nvar dijkstraAll = function dijkstraAll(graph, weightFn, edgeFn) {\n var map = {};\n graph.nodes().forEach(function (node) {\n map[String(node)] = dijkstra(graph, node, weightFn, edgeFn);\n return map;\n });\n return map;\n};\n\nexport default dijkstraAll;","/**\n * @description Tarjan's algorithm for finding the strongly connected components of a graph.\n * @description https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @description.zh-CN Tarjan 算法用于找到图的强连通子图。\n * @param graph\n * @returns\n */\nvar tarjan = function tarjan(graph) {\n var index = 0;\n var stack = [];\n var visited = new Map(); // node id -> { onStack, lowlink, index }\n\n var results = [];\n\n function dfs(v) {\n var _graph$successors;\n\n var entry = {\n onStack: true,\n lowlink: index,\n index: index\n };\n visited.set(v, entry);\n index += 1;\n stack.push(v);\n (_graph$successors = graph.successors(v)) === null || _graph$successors === void 0 ? void 0 : _graph$successors.forEach(function (w) {\n var _visited$get;\n\n // 如果 w 没有被访问过,则继续访问 w\n if (!visited.has(w)) {\n dfs(w);\n var wEntry = visited.get(w);\n entry.lowlink = Math.min(entry.lowlink, wEntry.lowlink); // 如果 w 在栈顶,则说明 w 和 v 不是强连通的\n } else if ((_visited$get = visited.get(w)) === null || _visited$get === void 0 ? void 0 : _visited$get.onStack) {\n var _wEntry = visited.get(w); // 如果 w 在栈中,则说明 w 在当前访问的路径上\n\n\n entry.lowlink = Math.min(entry.lowlink, _wEntry.index);\n }\n }); // 如果 v 的 lowlink 不等于 v 的 index,则说明 v 和 v 的 lowlink 不是强连通的\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n\n do {\n // 将 w 出栈,并将 w 的所有邻接点加入强连通子图\n w = stack.pop();\n var wEntry = visited.get(w);\n wEntry.onStack = false;\n cmpt.push(w);\n } while (v !== w);\n\n results.push(cmpt);\n }\n }\n\n graph.nodes().forEach(function (v) {\n if (!visited.has(v)) {\n dfs(v);\n }\n });\n return results;\n};\n\nexport default tarjan;","import tarjan from './tarjan';\n\nvar findCycles = function findCycles(graph) {\n return tarjan(graph).filter(function (cmpt) {\n return cmpt.length > 1 || cmpt.length === 1 && graph.hasEdge(cmpt[0], cmpt[0]);\n });\n};\n\nexport default findCycles;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nexport var CycleException = /*#__PURE__*/function (_Error) {\n _inherits(CycleException, _Error);\n\n var _super = _createSuper(CycleException);\n\n function CycleException() {\n _classCallCheck(this, CycleException);\n\n return _super.apply(this, arguments);\n }\n\n return _createClass(CycleException);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction topsort(graph) {\n var visited = new Set();\n var stack = new Set();\n var results = [];\n\n function visit(node) {\n if (stack.has(node)) {\n throw new CycleException();\n }\n\n if (!visited.has(node)) {\n var _graph$predecessors;\n\n stack.add(node);\n visited.add(node);\n (_graph$predecessors = graph.predecessors(node)) === null || _graph$predecessors === void 0 ? void 0 : _graph$predecessors.forEach(visit);\n stack.delete(node);\n results.push(node);\n }\n }\n\n graph.sinks().forEach(visit);\n\n if (visited.size !== graph.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nexport default topsort;","import topsort, { CycleException } from './topsort';\n\nvar isAcyclic = function isAcyclic(graph) {\n try {\n topsort(graph);\n } catch (e) {\n if (e instanceof CycleException) {\n return false;\n }\n\n throw e;\n }\n\n return true;\n};\n\nexport default isAcyclic;","import dfs from './dfs';\n\nvar postorder = function postorder(graph, nodes) {\n return dfs(graph, nodes, 'post');\n};\n\nexport default postorder;","import dfs from './dfs';\n\nvar preorder = function preorder(graph, nodes) {\n return dfs(graph, nodes, 'pre');\n};\n\nexport default preorder;","var DEFAULT_WEIGHT_FUNC = function DEFAULT_WEIGHT_FUNC() {\n return 1;\n};\n\nexport function floydWarshall(graph, weightFn, edgeFn) {\n return runFloydWarshall(graph, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function (v) {\n return graph.outEdges(v);\n });\n}\n\nfunction runFloydWarshall(graph, weightFn, edgeFn) {\n var results = {};\n var nodes = graph.nodes();\n nodes.forEach(function (node) {\n var v = String(node);\n results[v] = {};\n results[v][v] = {\n distance: 0\n };\n nodes.forEach(function (w) {\n if (node !== w) {\n results[v][String(w)] = {\n distance: Number.POSITIVE_INFINITY\n };\n }\n });\n edgeFn(node).forEach(function (edge) {\n var w = edge.v === node ? edge.w : edge.v;\n var d = weightFn(edge);\n results[v][String(w)] = {\n distance: d,\n predecessor: node\n };\n });\n });\n nodes.forEach(function (nodek) {\n var k = String(nodek);\n var rowK = results[k];\n nodes.forEach(function (nodei) {\n var i = String(nodei);\n var rowI = results[i];\n nodes.forEach(function (nodej) {\n var j = String(nodej);\n var ik = rowI[k];\n var kj = rowK[j];\n var ij = rowI[j];\n var altDistance = ik.distance + kj.distance;\n\n if (altDistance < ij.distance) {\n ij.distance = altDistance;\n ij.predecessor = kj.predecessor;\n }\n });\n });\n });\n return results;\n}\n\nexport default floydWarshall;","/**\n * @file Functions that used to find similar element between two graph\n * @file.zh-CN 在两个图中查找相似元素的函数\n */\n\n/**\n * @description Check if two graphs are contains the same nodes.\n * @description.zh-CN 检查两个图是否包含相同的节点。\n */\nexport var containSameNodes = function containSameNodes(aGraph, bGraph) {\n var aNodes = aGraph.nodes();\n\n for (var i = 0; i < aNodes.length; i++) {\n var aNode = aNodes[i];\n\n if (bGraph.hasNode(aNode)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @description Check if two graphs are contains the same edges.\n * @description.zh-CN 检查两个图是否包含相同的边。\n */\n\nexport var containSameEdges = function containSameEdges(aGraph, bGraph) {\n var aEdges = aGraph.edges();\n\n for (var i = 0; i < aEdges.length; i++) {\n var aEdge = aEdges[i];\n\n if (bGraph.hasEdge(aEdge.v, aEdge.w, aEdge.name)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @description get same nodes in two graphs.\n * @description.zh-CN 获取两个图中相同的节点。\n */\n\nexport var getSameNodes = function getSameNodes(aGraph, bGraph) {\n var aNodes = aGraph.nodes();\n var sameNodes = aNodes.filter(function (aNode) {\n return bGraph.hasNode(aNode);\n });\n return sameNodes;\n};\n/**\n * @description get same edges in two graphs.\n * @description.zh-CN 获取两个图中相同的边。\n */\n\nexport var getSameEdges = function getSameEdges(aGraph, bGraph) {\n var aEdges = aGraph.edges();\n var sameEdges = aEdges.filter(function (aEdge) {\n return bGraph.hasEdge(aEdge.v, aEdge.w, aEdge.name);\n });\n return sameEdges;\n};\n/**\n * @description Check if two graphs'option are the same.\n * @description.zh-CN 检查两个图的选项是否相同。\n */\n\nexport var isGraphOptionSame = function isGraphOptionSame(aGraph, bGraph) {\n return aGraph.isCompound() === bGraph.isCompound() && aGraph.isDirected() === bGraph.isDirected() && aGraph.isMultigraph() === bGraph.isMultigraph();\n};\n/**\n * @description Check if a graph contains all nodes in another graph.\n * @description.zh-CN 检查一个图是否包含另一个图的所有节点。\n */\n\nexport var containAllSameNodes = function containAllSameNodes(aGraph, bGraph) {\n var sameNodes = getSameNodes(aGraph, bGraph);\n return sameNodes.length === aGraph.nodes().length;\n};\n/**\n * @description Check if a graph contains all edges in another graph.\n * @description.zh-CN 检查一个图是否包含另一个图的所有边。\n */\n\nexport var containAllSameEdges = function containAllSameEdges(aGraph, bGraph) {\n var sameEdges = getSameEdges(aGraph, bGraph);\n return sameEdges.length === aGraph.edges().length;\n};\n/**\n * @description Check if two graphs are the same.\n * @description.zh-CN 检查两个图是否相同。\n */\n\nexport var isGraphSame = function isGraphSame(aGraph, bGraph) {\n return isGraphOptionSame(aGraph, bGraph) && aGraph.nodeCount() === bGraph.nodeCount() && containAllSameNodes(aGraph, bGraph) && aGraph.edgeCount() === bGraph.edgeCount() && containAllSameEdges(aGraph, bGraph);\n};\n/**\n * @description Check if one graph is the subgraph of another graph.\n * @description.zh-CN 检查一个图是否是另一个图的子图。\n */\n\nexport var isGraphContainsAnother = function isGraphContainsAnother(originGraph, targetGraph) {\n return containAllSameNodes(originGraph, targetGraph) && containAllSameEdges(originGraph, targetGraph);\n};","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/**\n * @file To get graph essencial information.\n * @file.zh-CN 获取图的基本信息\n * @module essence\n */\nimport Graph from '../Graph';\n/**\n * @description Check if the object is a graph.\n * @description.zh-CN 检查对象是否为图。\n */\n\nexport function isGraph(obj) {\n return obj instanceof Graph;\n}\n/**\n * @description Check if the graph is a simple graph.\n * @description.zh-CN 检查图是否为简单图。\n */\n\nexport function isSimpleGraph(graph) {\n if (graph.isMultigraph()) {\n return false;\n }\n\n var edges = graph.edges();\n var edgeStack = new Map();\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (edge.v === edge.w) {\n return false;\n }\n\n var _sort = [edge.v, edge.w].sort(),\n _sort2 = _slicedToArray(_sort, 2),\n v = _sort2[0],\n w = _sort2[1];\n\n var key = \"\".concat(v, \"-\").concat(w);\n\n if (edgeStack.has(key)) {\n return false;\n }\n\n edgeStack.set(key, true);\n }\n\n return true;\n}\n/**\n * @description Check if the graph is a null graph.\n * @description.zh-CN 检查图是否为空图。\n */\n\nexport function isNullGraph(graph) {\n return graph.nodes().length === 0;\n}\n/**\n * @description Check if the graph contains Self loops.\n * @description.zh-CN 检查图是否包含自环。\n */\n\nexport function hasSelfLoop(graph) {\n var edges = graph.edges();\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (edge.v === edge.w) {\n return true;\n }\n }\n\n return false;\n}","import { isSimpleGraph } from '../essence';\nimport { containAllSameNodes, containSameEdges } from './contain';\n/**\n * @description Check if one graph is the complement of another graph.\n * @description.zh-CN 检查一个图是否是另一个图的补图。\n */\n\nexport var isGraphComplement = function isGraphComplement(originGraph, targetGraph) {\n if (!isSimpleGraph(originGraph) || !isSimpleGraph(targetGraph)) {\n return false;\n }\n\n if (!containAllSameNodes(originGraph, targetGraph)) {\n return false;\n }\n\n if (containSameEdges(originGraph, targetGraph)) {\n return false;\n }\n\n var nodeCount = originGraph.nodeCount();\n return originGraph.edgeCount() + targetGraph.edgeCount() === nodeCount * (nodeCount - 1) / 2;\n};","import { isSimpleGraph } from '../essence';\nimport Graph from '../Graph';\n/**\n * @description Get the graph's complement\n * @description.zh-CN 获取图的补图\n */\n\nexport var getGraphComplement = function getGraphComplement(originGraph) {\n if (!isSimpleGraph(originGraph)) {\n return null;\n }\n\n var nodeCount = originGraph.nodeCount();\n var complementGraph = new Graph({\n compound: originGraph.isCompound(),\n directed: originGraph.isDirected(),\n multigraph: originGraph.isMultigraph()\n });\n var nodes = originGraph.nodes();\n\n for (var i = 0; i < nodeCount; i++) {\n var nodei = nodes[i];\n complementGraph.setNode(nodei, originGraph.node(nodei));\n\n for (var j = i + 1; j < nodeCount; j++) {\n var nodej = nodes[j];\n\n if (!originGraph.hasEdge(nodei, nodej)) {\n complementGraph.setEdge(nodei, nodej);\n }\n }\n }\n\n return complementGraph;\n};","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar list_1 = __importDefault(require(\"./data/list\"));\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return List;\n}(list_1.default));\nvar StateGraph = /** @class */ (function (_super) {\n __extends(StateGraph, _super);\n function StateGraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StateGraph;\n}(graphlib_1.Graph));\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nvar DEFAULT_WEIGHT_FN = function () { return 1; };\nvar greedyFAS = function (g, weightFn) {\n var _a;\n if (g.nodeCount() <= 1)\n return [];\n var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n return (_a = results.map(function (e) { return g.outEdges(e.v, e.w); })) === null || _a === void 0 ? void 0 : _a.flat();\n};\nvar doGreedyFAS = function (g, buckets, zeroIdx) {\n var results = [];\n var sources = buckets[buckets.length - 1];\n var sinks = buckets[0];\n var entry;\n while (g.nodeCount()) {\n while ((entry = sinks.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n while ((entry = sources.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n if (g.nodeCount()) {\n for (var i = buckets.length - 2; i > 0; --i) {\n entry = buckets[i].dequeue();\n if (entry) {\n results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n break;\n }\n }\n }\n }\n return results;\n};\nvar removeNode = function (g, buckets, zeroIdx, entry, collectPredecessors) {\n var _a, _b;\n var results = [];\n (_a = g.inEdges(entry.v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edge) {\n var weight = g.edge(edge);\n var uEntry = g.node(edge.v);\n if (collectPredecessors) {\n // this result not really care about in or out\n results.push({ v: edge.v, w: edge.w, in: 0, out: 0 });\n }\n if (uEntry.out === undefined)\n uEntry.out = 0;\n uEntry.out -= weight;\n assignBucket(buckets, zeroIdx, uEntry);\n });\n (_b = g.outEdges(entry.v)) === null || _b === void 0 ? void 0 : _b.forEach(function (edge) {\n var weight = g.edge(edge);\n var w = edge.w;\n var wEntry = g.node(w);\n if (wEntry.in === undefined)\n wEntry.in = 0;\n wEntry.in -= weight;\n assignBucket(buckets, zeroIdx, wEntry);\n });\n g.removeNode(entry.v);\n return collectPredecessors ? results : undefined;\n};\nvar buildState = function (g, weightFn) {\n var fasGraph = new StateGraph();\n var maxIn = 0;\n var maxOut = 0;\n g.nodes().forEach(function (v) {\n fasGraph.setNode(v, { v: v, in: 0, out: 0 });\n });\n // Aggregate weights on nodes, but also sum the weights across multi-edges\n // into a single edge for the fasGraph.\n g.edges().forEach(function (e) {\n var prevWeight = fasGraph.edge(e) || 0;\n var weight = (weightFn === null || weightFn === void 0 ? void 0 : weightFn(e)) || 1;\n var edgeWeight = prevWeight + weight;\n fasGraph.setEdge(e.v, e.w, edgeWeight);\n maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));\n maxIn = Math.max(maxIn, (fasGraph.node(e.w).in += weight));\n });\n var buckets = [];\n var rangeMax = maxOut + maxIn + 3;\n for (var i = 0; i < rangeMax; i++) {\n buckets.push(new List());\n }\n var zeroIdx = maxIn + 1;\n fasGraph.nodes().forEach(function (v) {\n assignBucket(buckets, zeroIdx, fasGraph.node(v));\n });\n return { buckets: buckets, zeroIdx: zeroIdx, graph: fasGraph };\n};\nvar assignBucket = function (buckets, zeroIdx, entry) {\n if (!entry.out) {\n buckets[0].enqueue(entry);\n }\n else if (!entry[\"in\"]) {\n buckets[buckets.length - 1].enqueue(entry);\n }\n else {\n buckets[entry.out - entry[\"in\"] + zeroIdx].enqueue(entry);\n }\n};\nexports.default = greedyFAS;\n//# sourceMappingURL=greedy-fas.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar greedy_fas_1 = __importDefault(require(\"./greedy-fas\"));\nvar run = function (g) {\n var weightFn = function (g) {\n return function (e) { var _a; return ((_a = g.edge(e)) === null || _a === void 0 ? void 0 : _a.weight) || 1; };\n };\n var fas = g.graph().acyclicer === \"greedy\" ? (0, greedy_fas_1.default)(g, weightFn(g)) : dfsFAS(g);\n fas === null || fas === void 0 ? void 0 : fas.forEach(function (e) {\n var label = g.edge(e);\n g.removeEdgeObj(e);\n label.forwardName = e.name;\n label.reversed = true;\n g.setEdge(e.w, e.v, label, \"rev-\".concat(Math.random()));\n });\n};\nvar dfsFAS = function (g) {\n var fas = [];\n var stack = {};\n var visited = {};\n var dfs = function (v) {\n var _a;\n if (visited[v]) {\n return;\n }\n visited[v] = true;\n stack[v] = true;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n if (stack[e.w]) {\n fas.push(e);\n }\n else {\n dfs(e.w);\n }\n });\n delete stack[v];\n };\n g.nodes().forEach(dfs);\n return fas;\n};\nvar undo = function (g) {\n g.edges().forEach(function (e) {\n var label = g.edge(e);\n if (label.reversed) {\n g.removeEdgeObj(e);\n var forwardName = label.forwardName;\n delete label.reversed;\n delete label.forwardName;\n g.setEdge(e.w, e.v, label, forwardName);\n }\n });\n};\nexports.default = { run: run, undo: undo };\n//# sourceMappingURL=acyclic.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Graph = void 0;\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar Graph = /** @class */ (function (_super) {\n __extends(Graph, _super);\n function Graph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Graph;\n}(graphlib_1.Graph));\nexports.Graph = Graph;\n//# sourceMappingURL=graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.minBy = exports.notime = exports.time = exports.partition = exports.maxRank = exports.addBorderNode = exports.removeEmptyRanks = exports.normalizeRanks = exports.buildLayerMatrix = exports.intersectRect = exports.predecessorWeights = exports.successorWeights = exports.zipObject = exports.asNonCompoundGraph = exports.simplify = exports.addDummyNode = void 0;\nvar util_1 = require(\"../../../util\");\nvar graph_1 = require(\"../graph\");\nvar safeSort = function (valueA, valueB) {\n return Number(valueA) - Number(valueB);\n};\n/*\n * Adds a dummy node to the graph and return v.\n */\nvar addDummyNode = function (g, type, attrs, name) {\n var v;\n do {\n v = \"\".concat(name).concat(Math.random());\n } while (g.hasNode(v));\n attrs.dummy = type;\n g.setNode(v, attrs);\n return v;\n};\nexports.addDummyNode = addDummyNode;\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nvar simplify = function (g) {\n var simplified = new graph_1.Graph().setGraph(g.graph());\n g.nodes().forEach(function (v) { simplified.setNode(v, g.node(v)); });\n g.edges().forEach(function (e) {\n var simpleLabel = simplified.edgeFromArgs(e.v, e.w) || { weight: 0, minlen: 1 };\n var label = g.edge(e);\n simplified.setEdge(e.v, e.w, {\n weight: simpleLabel.weight + label.weight,\n minlen: Math.max(simpleLabel.minlen, label.minlen)\n });\n });\n return simplified;\n};\nexports.simplify = simplify;\nvar asNonCompoundGraph = function (g) {\n var simplified = new graph_1.Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n g.nodes().forEach(function (node) {\n var _a;\n if (!((_a = g.children(node)) === null || _a === void 0 ? void 0 : _a.length)) {\n simplified.setNode(node, g.node(node));\n }\n });\n g.edges().forEach(function (edge) {\n simplified.setEdgeObj(edge, g.edge(edge));\n });\n return simplified;\n};\nexports.asNonCompoundGraph = asNonCompoundGraph;\nvar zipObject = function (keys, values) {\n return keys === null || keys === void 0 ? void 0 : keys.reduce(function (obj, key, i) {\n obj[key] = values[i];\n return obj;\n }, {});\n};\nexports.zipObject = zipObject;\nvar successorWeights = function (g) {\n var weightsMap = {};\n g.nodes().forEach(function (node) {\n var _a;\n var sucs = {};\n (_a = g.outEdges(node)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var _a;\n sucs[e.w] = (sucs[e.w] || 0) + (((_a = g.edge(e)) === null || _a === void 0 ? void 0 : _a.weight) || 0);\n });\n weightsMap[node] = sucs;\n });\n return weightsMap;\n};\nexports.successorWeights = successorWeights;\nvar predecessorWeights = function (g) {\n var nodes = g.nodes();\n var weightMap = nodes.map(function (v) {\n var _a;\n var preds = {};\n (_a = g.inEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n });\n return preds;\n });\n return (0, exports.zipObject)(nodes, weightMap);\n};\nexports.predecessorWeights = predecessorWeights;\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nvar intersectRect = function (rect, point) {\n var x = Number(rect.x);\n var y = Number(rect.y);\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = Number(point.x) - x;\n var dy = Number(point.y) - y;\n var w = Number(rect.width) / 2;\n var h = Number(rect.height) / 2;\n if (!dx && !dy) {\n // completely overlapped directly, then return points its self\n return { x: 0, y: 0 };\n }\n var sx;\n var sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = (h * dx) / dy;\n sy = h;\n }\n else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = (w * dy) / dx;\n }\n return { x: x + sx, y: y + sy };\n};\nexports.intersectRect = intersectRect;\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * const will produce a matrix with the ids of each node.\n */\nvar buildLayerMatrix = function (g) {\n var layeringNodes = [];\n var rankMax = (0, exports.maxRank)(g) + 1;\n for (var i = 0; i < rankMax; i++) {\n layeringNodes.push([]);\n }\n // const layering = _.map(_.range(maxRank(g) + 1), function() { return []; });\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (!node)\n return;\n var rank = node.rank;\n if (rank !== undefined && layeringNodes[rank]) {\n layeringNodes[rank].push(v);\n }\n });\n for (var i = 0; i < rankMax; i++) {\n layeringNodes[i] = layeringNodes[i].sort(function (va, vb) { var _a, _b; return safeSort((_a = g.node(va)) === null || _a === void 0 ? void 0 : _a.order, (_b = g.node(vb)) === null || _b === void 0 ? void 0 : _b.order); });\n }\n return layeringNodes;\n};\nexports.buildLayerMatrix = buildLayerMatrix;\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nvar normalizeRanks = function (g) {\n var nodeRanks = g\n .nodes()\n .filter(function (v) { var _a; return ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) !== undefined; })\n .map(function (v) { return g.node(v).rank; });\n var min = Math.min.apply(Math, nodeRanks);\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.hasOwnProperty(\"rank\") && min !== Infinity) {\n node.rank -= min;\n }\n });\n};\nexports.normalizeRanks = normalizeRanks;\nvar removeEmptyRanks = function (g) {\n // Ranks may not start at 0, so we need to offset them\n var nodes = g.nodes();\n var nodeRanks = nodes\n .filter(function (v) { var _a; return ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) !== undefined; })\n .map(function (v) { return g.node(v).rank; });\n var offset = Math.min.apply(Math, nodeRanks);\n var layers = [];\n nodes.forEach(function (v) {\n var _a;\n var rank = (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) || 0) - offset;\n if (!layers[rank]) {\n layers[rank] = [];\n }\n layers[rank].push(v);\n });\n var delta = 0;\n var nodeRankFactor = g.graph().nodeRankFactor || 0;\n for (var i = 0; i < layers.length; i++) {\n var vs = layers[i];\n if (vs === undefined) {\n if (i % nodeRankFactor !== 0) {\n delta -= 1;\n }\n }\n else if (delta) {\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var node = g.node(v);\n if (node) {\n node.rank = node.rank || 0;\n node.rank += delta;\n }\n });\n }\n }\n};\nexports.removeEmptyRanks = removeEmptyRanks;\nvar addBorderNode = function (g, prefix, rank, order) {\n var node = {\n width: 0,\n height: 0\n };\n if ((0, util_1.isNumber)(rank) && (0, util_1.isNumber)(order)) {\n node.rank = rank;\n node.order = order;\n }\n return (0, exports.addDummyNode)(g, \"border\", node, prefix);\n};\nexports.addBorderNode = addBorderNode;\nvar maxRank = function (g) {\n var maxRank;\n g.nodes().forEach(function (v) {\n var _a;\n var rank = (_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank;\n if (rank !== undefined) {\n if (maxRank === undefined || rank > maxRank) {\n maxRank = rank;\n }\n }\n });\n if (!maxRank) {\n maxRank = 0;\n }\n return maxRank;\n};\nexports.maxRank = maxRank;\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * const returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nvar partition = function (collection, fn) {\n var result = { lhs: [], rhs: [] };\n collection === null || collection === void 0 ? void 0 : collection.forEach(function (value) {\n if (fn(value)) {\n result.lhs.push(value);\n }\n else {\n result.rhs.push(value);\n }\n });\n return result;\n};\nexports.partition = partition;\n/*\n * Returns a new const that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nvar time = function (name, fn) {\n var start = Date.now();\n try {\n return fn();\n }\n finally {\n console.log(\"\".concat(name, \" time: \").concat(Date.now() - start, \"ms\"));\n }\n};\nexports.time = time;\nvar notime = function (name, fn) {\n return fn();\n};\nexports.notime = notime;\nvar minBy = function (array, func) {\n return array.reduce(function (a, b) {\n var valA = func(a);\n var valB = func(b);\n return valA > valB ? b : a;\n });\n};\nexports.minBy = minBy;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */\nvar run = function (g) {\n g.graph().dummyChains = [];\n g.edges().forEach(function (edge) { return normalizeEdge(g, edge); });\n};\nvar normalizeEdge = function (g, e) {\n var v = e.v;\n var vRank = g.node(v).rank;\n var w = e.w;\n var wRank = g.node(w).rank;\n var name = e.name;\n var edgeLabel = g.edge(e);\n var labelRank = edgeLabel.labelRank;\n if (wRank === vRank + 1)\n return;\n g.removeEdgeObj(e);\n var graph = g.graph();\n var dummy;\n var attrs;\n var i;\n for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n edgeLabel.points = [];\n attrs = {\n edgeLabel: edgeLabel,\n width: 0,\n height: 0,\n edgeObj: e,\n rank: vRank,\n };\n dummy = (0, util_1.addDummyNode)(g, \"edge\", attrs, \"_d\");\n if (vRank === labelRank) {\n attrs.width = edgeLabel.width;\n attrs.height = edgeLabel.height;\n attrs.dummy = \"edge-label\";\n attrs.labelpos = edgeLabel.labelpos;\n }\n g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n if (i === 0) {\n if (!graph.dummyChains)\n graph.dummyChains = [];\n graph.dummyChains.push(dummy);\n }\n v = dummy;\n }\n g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n};\nvar undo = function (g) {\n var _a;\n (_a = g.graph().dummyChains) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n var node = g.node(v);\n var origLabel = node.edgeLabel;\n var w;\n if (node.edgeObj) {\n g.setEdgeObj(node.edgeObj, origLabel);\n }\n var currentV = v;\n while (node.dummy) {\n w = g.successors(currentV)[0];\n g.removeNode(currentV);\n origLabel.points.push({ x: node.x, y: node.y });\n if (node.dummy === \"edge-label\") {\n origLabel.x = node.x;\n origLabel.y = node.y;\n origLabel.width = node.width;\n origLabel.height = node.height;\n }\n currentV = w;\n node = g.node(currentV);\n }\n });\n};\nexports.default = { run: run, undo: undo };\n//# sourceMappingURL=normalize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slack = exports.longestPathWithLayer = exports.longestPath = void 0;\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nvar longestPath = function (g) {\n var _a;\n var visited = {};\n var dfs = function (v) {\n var _a;\n var label = g.node(v);\n if (!label)\n return 0;\n if (visited[v]) {\n return label.rank;\n }\n visited[v] = true;\n var rank;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edgeObj) {\n var wRank = dfs(edgeObj.w);\n var minLen = g.edge(edgeObj).minlen;\n var r = wRank - minLen;\n if (r) {\n if (rank === undefined || r < rank) {\n rank = r;\n }\n }\n });\n if (!rank) {\n rank = 0;\n }\n label.rank = rank;\n return rank;\n };\n (_a = g.sources()) === null || _a === void 0 ? void 0 : _a.forEach(function (source) { return dfs(source); });\n};\nexports.longestPath = longestPath;\nvar longestPathWithLayer = function (g) {\n var _a;\n // 用longest path,找出最深的点\n var visited = {};\n var minRank;\n var dfs = function (v) {\n var _a;\n var label = g.node(v);\n if (!label)\n return 0;\n if (visited[v]) {\n return label.rank;\n }\n visited[v] = true;\n var rank;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edgeObj) {\n var wRank = dfs(edgeObj.w);\n var minLen = g.edge(edgeObj).minlen;\n var r = wRank - minLen;\n if (r) {\n if (rank === undefined || r < rank) {\n rank = r;\n }\n }\n });\n if (!rank) {\n rank = 0;\n }\n if (minRank === undefined || rank < minRank) {\n minRank = rank;\n }\n label.rank = rank;\n return rank;\n };\n (_a = g.sources()) === null || _a === void 0 ? void 0 : _a.forEach(function (source) {\n if (g.node(source))\n dfs(source);\n });\n if (minRank === undefined) {\n minRank = 0;\n }\n // minRank += 1; // NOTE: 最小的层级是dummy root,+1\n // forward一遍,赋值层级\n var forwardVisited = {};\n var dfsForward = function (v, nextRank) {\n var _a;\n var label = g.node(v);\n var currRank = (!isNaN(label.layer) ? label.layer : nextRank);\n // 没有指定,取最大值\n if (label.rank === undefined || label.rank < currRank) {\n label.rank = currRank;\n }\n if (forwardVisited[v])\n return;\n forwardVisited[v] = true;\n // DFS遍历子节点\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.map(function (e) {\n dfsForward(e.w, currRank + g.edge(e).minlen);\n });\n };\n // 指定层级的,更新下游\n g.nodes().forEach(function (n) {\n var label = g.node(n);\n if (!label)\n return;\n if (!isNaN(label.layer)) {\n dfsForward(n, label.layer); // 默认的dummy root所在层的rank是-1\n }\n else {\n label.rank -= minRank;\n }\n });\n};\nexports.longestPathWithLayer = longestPathWithLayer;\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nvar slack = function (g, e) {\n return (g.node(e.w).rank -\n g.node(e.v).rank -\n g.edge(e).minlen);\n};\nexports.slack = slack;\nexports.default = {\n longestPath: longestPath,\n longestPathWithLayer: longestPathWithLayer,\n slack: slack,\n};\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.feasibleTreeWithLayer = exports.feasibleTree = void 0;\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"../util\");\nvar graph_1 = require(\"../../graph\");\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nvar feasibleTree = function (g) {\n var t = new graph_1.Graph({ directed: false });\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n var edge;\n var delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? (0, util_1.slack)(g, edge) : -(0, util_1.slack)(g, edge);\n shiftRanks(t, g, delta);\n }\n return t;\n};\nexports.feasibleTree = feasibleTree;\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nvar tightTree = function (t, g) {\n var dfs = function (v) {\n g.nodeEdges(v).forEach(function (e) {\n var edgeV = e.v;\n var w = (v === edgeV) ? e.w : edgeV;\n if (!t.hasNode(w) && !(0, util_1.slack)(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n };\n t.nodes().forEach(dfs);\n return t.nodeCount();\n};\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nvar feasibleTreeWithLayer = function (g) {\n var t = new graph_1.Graph({ directed: false });\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodes().filter(function (n) { return !!g.node(n); }).length;\n t.setNode(start, {});\n var edge;\n var delta;\n while (tightTreeWithLayer(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? (0, util_1.slack)(g, edge) : -(0, util_1.slack)(g, edge);\n shiftRanks(t, g, delta);\n }\n return t;\n};\nexports.feasibleTreeWithLayer = feasibleTreeWithLayer;\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nvar tightTreeWithLayer = function (t, g) {\n var dfs = function (v) {\n var _a;\n (_a = g.nodeEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var edgeV = e.v;\n var w = (v === edgeV) ? e.w : edgeV;\n // 对于指定layer的,直接加入tight-tree,不参与调整\n if (!t.hasNode(w) && (g.node(w).layer !== undefined || !(0, util_1.slack)(g, e))) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n };\n t.nodes().forEach(dfs);\n return t.nodeCount();\n};\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nvar findMinSlackEdge = function (t, g) {\n return (0, util_2.minBy)(g.edges(), function (e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return (0, util_1.slack)(g, e);\n }\n return Infinity;\n });\n};\nvar shiftRanks = function (t, g, delta) {\n t.nodes().forEach(function (v) {\n if (!g.node(v).rank)\n g.node(v).rank = 0;\n g.node(v).rank += delta;\n });\n};\nexports.default = {\n feasibleTree: feasibleTree,\n feasibleTreeWithLayer: feasibleTreeWithLayer\n};\n//# sourceMappingURL=feasible-tree.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exchangeEdges = exports.enterEdge = exports.leaveEdge = exports.initLowLimValues = exports.calcCutValue = exports.initCutValues = void 0;\nvar feasible_tree_1 = require(\"./feasible-tree\");\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"../util\");\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar preorder = graphlib_1.algorithm.preorder, postorder = graphlib_1.algorithm.postorder;\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nvar networkSimplex = function (og) {\n var g = (0, util_2.simplify)(og);\n (0, util_1.longestPath)(g);\n var t = (0, feasible_tree_1.feasibleTree)(g);\n (0, exports.initLowLimValues)(t);\n (0, exports.initCutValues)(t, g);\n var e;\n var f;\n while ((e = (0, exports.leaveEdge)(t))) {\n f = (0, exports.enterEdge)(t, g, e);\n (0, exports.exchangeEdges)(t, g, e, f);\n }\n};\n/*\n * Initializes cut values for all edges in the tree.\n */\nvar initCutValues = function (t, g) {\n var vs = postorder(t, t.nodes());\n vs = vs === null || vs === void 0 ? void 0 : vs.slice(0, (vs === null || vs === void 0 ? void 0 : vs.length) - 1);\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n assignCutValue(t, g, v);\n });\n};\nexports.initCutValues = initCutValues;\nvar assignCutValue = function (t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edgeFromArgs(child, parent).cutvalue = (0, exports.calcCutValue)(t, g, child);\n};\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nvar calcCutValue = function (t, g, child) {\n var _a;\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edgeFromArgs(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edgeFromArgs(parent, child);\n }\n cutValue = graphEdge.weight;\n (_a = g.nodeEdges(child)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var isOutEdge = e.v === child;\n var other = isOutEdge ? e.w : e.v;\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail;\n var otherWeight = g.edge(e).weight;\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edgeFromArgs(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n return cutValue;\n};\nexports.calcCutValue = calcCutValue;\nvar initLowLimValues = function (tree, root) {\n if (root === void 0) { root = tree.nodes()[0]; }\n dfsAssignLowLim(tree, {}, 1, root);\n};\nexports.initLowLimValues = initLowLimValues;\nvar dfsAssignLowLim = function (tree, visited, nextLim, v, parent) {\n var _a;\n var low = nextLim;\n var useNextLim = nextLim;\n var label = tree.node(v);\n visited[v] = true;\n (_a = tree.neighbors(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (w) {\n if (!visited[w]) {\n useNextLim = dfsAssignLowLim(tree, visited, useNextLim, w, v);\n }\n });\n label.low = low;\n label.lim = useNextLim++;\n if (parent) {\n label.parent = parent;\n }\n else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n return useNextLim;\n};\nvar leaveEdge = function (tree) {\n return tree.edges().find(function (e) {\n return tree.edge(e).cutvalue < 0;\n });\n};\nexports.leaveEdge = leaveEdge;\nvar enterEdge = function (t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n var candidates = g.edges().filter(function (edge) {\n return flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel);\n });\n return (0, util_2.minBy)(candidates, function (edge) { return (0, util_1.slack)(g, edge); });\n};\nexports.enterEdge = enterEdge;\nvar exchangeEdges = function (t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n (0, exports.initLowLimValues)(t);\n (0, exports.initCutValues)(t, g);\n updateRanks(t, g);\n};\nexports.exchangeEdges = exchangeEdges;\nvar updateRanks = function (t, g) {\n var root = t.nodes().find(function (v) { var _a; return !((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.parent); });\n var vs = preorder(t, root);\n vs = vs === null || vs === void 0 ? void 0 : vs.slice(1);\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var parent = t.node(v).parent;\n var edge = g.edgeFromArgs(v, parent);\n var flipped = false;\n if (!edge) {\n edge = g.edgeFromArgs(parent, v);\n flipped = true;\n }\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n};\n/*\n * Returns true if the edge is in the tree.\n */\nvar isTreeEdge = function (tree, u, v) {\n return tree.hasEdge(u, v);\n};\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nvar isDescendant = function (tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n};\nexports.default = networkSimplex;\n//# sourceMappingURL=network-simplex.js.map","\"use strict\";\n// \"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// var rankUtil = require(\"./util\");\n// var longestPath = rankUtil.longestPathWithLayer;\n// var feasibleTree = require(\"./feasible-tree\").feasibleTreeWithLayer;\n// var networkSimplex = require(\"./network-simplex\");\nvar util_1 = require(\"./util\");\nvar feasible_tree_1 = require(\"./feasible-tree\");\nvar network_simplex_1 = __importDefault(require(\"./network-simplex\"));\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nvar rank = function (g) {\n switch (g.graph().ranker) {\n case \"network-simplex\":\n networkSimplexRanker(g);\n break;\n case \"tight-tree\":\n tightTreeRanker(g);\n break;\n case \"longest-path\":\n longestPathRanker(g);\n break;\n // default: networkSimplexRanker(g);\n default: tightTreeRanker(g);\n }\n};\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = util_1.longestPath;\nvar tightTreeRanker = function (g) {\n (0, util_1.longestPathWithLayer)(g);\n (0, feasible_tree_1.feasibleTreeWithLayer)(g);\n};\nvar networkSimplexRanker = function (g) {\n (0, network_simplex_1.default)(g);\n};\nexports.default = rank;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// deep first search with both order low for pre, lim for post\nvar dfsBothOrder = function (g) {\n var _a;\n var result = {};\n var lim = 0;\n var dfs = function (v) {\n var _a;\n var low = lim;\n (_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.forEach(dfs);\n result[v] = { low: low, lim: lim++ };\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(dfs);\n return result;\n};\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nvar findPath = function (g, postorderNums, v, w) {\n var vPath = [];\n var wPath = [];\n var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n var parent;\n var lca;\n // Traverse up from v to find the LCA\n parent = v;\n do {\n parent = g.parent(parent);\n vPath.push(parent);\n } while (parent &&\n (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n lca = parent;\n // Traverse from w to LCA\n parent = w;\n while (parent && parent !== lca) {\n wPath.push(parent);\n parent = g.parent(parent);\n }\n return { lca: lca, path: vPath.concat(wPath.reverse()) };\n};\nvar parentDummyChains = function (g) {\n var _a;\n var postorderNums = dfsBothOrder(g);\n (_a = g.graph().dummyChains) === null || _a === void 0 ? void 0 : _a.forEach(function (startV) {\n var _a, _b;\n var v = startV;\n var node = g.node(v);\n var edgeObj = node.edgeObj;\n if (!edgeObj)\n return;\n var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n var path = pathData.path;\n var lca = pathData.lca;\n var pathIdx = 0;\n var pathV = path[pathIdx];\n var ascending = true;\n while (v !== edgeObj.w) {\n node = g.node(v);\n if (ascending) {\n while (pathV !== lca && ((_a = g.node(pathV)) === null || _a === void 0 ? void 0 : _a.maxRank) < node.rank) {\n pathIdx++;\n pathV = path[pathIdx];\n }\n if (pathV === lca) {\n ascending = false;\n }\n }\n if (!ascending) {\n while (pathIdx < path.length - 1 &&\n ((_b = g.node(path[pathIdx + 1])) === null || _b === void 0 ? void 0 : _b.minRank) <=\n node.rank) {\n pathIdx++;\n }\n pathV = path[pathIdx];\n }\n g.setParent(v, pathV);\n v = g.successors(v)[0];\n }\n });\n};\nexports.default = parentDummyChains;\n//# sourceMappingURL=parent-dummy-chains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nvar run = function (g) {\n var _a;\n var root = (0, util_1.addDummyNode)(g, \"root\", {}, \"_root\");\n var depths = treeDepths(g);\n var maxDepth = Math.max.apply(Math, Object.values(depths));\n if (Math.abs(maxDepth) === Infinity) {\n maxDepth = 1;\n }\n var height = maxDepth - 1; // Note: depths is an Object not an array\n var nodeSep = 2 * height + 1;\n g.graph().nestingRoot = root;\n // Multiply minlen by nodeSep to align nodes on non-border ranks.\n g.edges().forEach(function (e) {\n g.edge(e).minlen *= nodeSep;\n });\n // Calculate a weight that is sufficient to keep subgraphs vertically compact\n var weight = sumWeights(g) + 1;\n // Create border nodes and link them up\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n });\n // Save the multiplier for node layers for later removal of empty border\n // layers.\n g.graph().nodeRankFactor = nodeSep;\n};\nvar dfs = function (g, root, nodeSep, weight, height, depths, v) {\n var children = g.children(v);\n if (!(children === null || children === void 0 ? void 0 : children.length)) {\n if (v !== root) {\n g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n }\n return;\n }\n var top = (0, util_1.addBorderNode)(g, \"_bt\");\n var bottom = (0, util_1.addBorderNode)(g, \"_bb\");\n var label = g.node(v);\n g.setParent(top, v);\n label.borderTop = top;\n g.setParent(bottom, v);\n label.borderBottom = bottom;\n children === null || children === void 0 ? void 0 : children.forEach(function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n var childNode = g.node(child);\n var childTop = childNode.borderTop ? childNode.borderTop : child;\n var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n var thisWeight = childNode.borderTop ? weight : 2 * weight;\n var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n g.setEdge(top, childTop, {\n minlen: minlen,\n weight: thisWeight,\n nestingEdge: true,\n });\n g.setEdge(childBottom, bottom, {\n minlen: minlen,\n weight: thisWeight,\n nestingEdge: true,\n });\n });\n if (!g.parent(v)) {\n g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n }\n};\nvar treeDepths = function (g) {\n var _a;\n var depths = {};\n var dfs = function (v, depth) {\n var children = g.children(v);\n children === null || children === void 0 ? void 0 : children.forEach(function (child) { return dfs(child, depth + 1); });\n depths[v] = depth;\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (v) { return dfs(v, 1); });\n return depths;\n};\nvar sumWeights = function (g) {\n var result = 0;\n g.edges().forEach(function (e) {\n result += g.edge(e).weight;\n });\n return result;\n};\nvar cleanup = function (g) {\n var graphLabel = g.graph();\n graphLabel.nestingRoot && g.removeNode(graphLabel.nestingRoot);\n delete graphLabel.nestingRoot;\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge.nestingEdge) {\n g.removeEdgeObj(e);\n }\n });\n};\nexports.default = { run: run, cleanup: cleanup };\n//# sourceMappingURL=nesting-graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar addBorderSegments = function (g) {\n var _a;\n var dfs = function (v) {\n var children = g.children(v);\n var node = g.node(v);\n if (children === null || children === void 0 ? void 0 : children.length) {\n children.forEach(function (child) { return dfs(child); });\n }\n if (node.hasOwnProperty(\"minRank\")) {\n node.borderLeft = [];\n node.borderRight = [];\n for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; rank += 1) {\n addBorderNode(g, \"borderLeft\", \"_bl\", v, node, rank);\n addBorderNode(g, \"borderRight\", \"_br\", v, node, rank);\n }\n }\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { return dfs(child); });\n};\nvar addBorderNode = function (g, prop, prefix, sg, sgNode, rank) {\n var label = { rank: rank, borderType: prop, width: 0, height: 0 };\n var prev = sgNode[prop][rank - 1];\n var curr = (0, util_1.addDummyNode)(g, \"border\", label, prefix);\n sgNode[prop][rank] = curr;\n g.setParent(curr, sg);\n if (prev) {\n g.setEdge(prev, curr, { weight: 1 });\n }\n};\nexports.default = addBorderSegments;\n//# sourceMappingURL=add-border-segments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust = function (g) {\n var _a;\n var rankDir = (_a = g.graph().rankdir) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapWidthHeight(g);\n }\n};\nvar undo = function (g) {\n var _a;\n var rankDir = (_a = g.graph().rankdir) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (rankDir === \"bt\" || rankDir === \"rl\") {\n reverseY(g);\n }\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapXY(g);\n swapWidthHeight(g);\n }\n};\nvar swapWidthHeight = function (g) {\n g.nodes().forEach(function (v) {\n swapWidthHeightOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n swapWidthHeightOne(g.edge(e));\n });\n};\nvar swapWidthHeightOne = function (attrs) {\n var w = attrs.width;\n attrs.width = attrs.height;\n attrs.height = w;\n};\nvar reverseY = function (g) {\n g.nodes().forEach(function (v) {\n reverseYOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) { return reverseYOne(point); });\n if (edge.hasOwnProperty(\"y\")) {\n reverseYOne(edge);\n }\n });\n};\nvar reverseYOne = function (attrs) {\n if (attrs === null || attrs === void 0 ? void 0 : attrs.y) {\n attrs.y = -attrs.y;\n }\n};\nvar swapXY = function (g) {\n g.nodes().forEach(function (v) {\n swapXYOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) { return swapXYOne(point); });\n if (edge.hasOwnProperty(\"x\")) {\n swapXYOne(edge);\n }\n });\n};\nvar swapXYOne = function (attrs) {\n var x = attrs.x;\n attrs.x = attrs.y;\n attrs.y = x;\n};\nexports.default = { adjust: adjust, undo: undo };\n//# sourceMappingURL=coordinate-system.js.map","/**\n * rgb 颜色转换成数组\n * @param str\n * @returns\n */\nexport function rgb2arr(str) {\n return [parseInt(str.substr(1, 2), 16), parseInt(str.substr(3, 2), 16), parseInt(str.substr(5, 2), 16)];\n}\n//# sourceMappingURL=rgb2arr.js.map","/**\n * 将数值从 0-255 转换成 16 进制字符串\n * @param value\n * @returns\n */\nexport function toHex(value) {\n var x16Value = Math.round(value).toString(16);\n return x16Value.length === 1 ? \"0\" + x16Value : x16Value;\n}\n/**\n * 数组转换成颜色\n * @param arr\n * @returns\n */\nexport function arr2rgb(arr) {\n return \"#\" + toHex(arr[0]) + toHex(arr[1]) + toHex(arr[2]);\n}\n//# sourceMappingURL=arr2rgb.js.map","var isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\nexport default isArrayLike;\n//# sourceMappingURL=is-array-like.js.map","import isArrayLike from './is-array-like';\nvar contains = function (arr, value) {\n if (!isArrayLike(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\nexport default contains;\n//# sourceMappingURL=contains.js.map","import isArrayLike from './is-array-like';\nvar filter = function (arr, func) {\n if (!isArrayLike(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\nexport default filter;\n//# sourceMappingURL=filter.js.map","import filter from './filter';\nimport contains from './contains';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) { values = []; }\n return filter(arr, function (value) { return !contains(values, value); });\n};\nexport default difference;\n//# sourceMappingURL=difference.js.map","/**\n * @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction\n */\nexport default (function (value) {\n return typeof value === 'function';\n});\n//# sourceMappingURL=is-function.js.map","// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\nexport default isNil;\n//# sourceMappingURL=is-nil.js.map","var toString = {}.toString;\nvar isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };\nexport default isType;\n//# sourceMappingURL=is-type.js.map","import isType from './is-type';\nexport default (function (value) {\n return Array.isArray ? Array.isArray(value) : isType(value, 'Array');\n});\n//# sourceMappingURL=is-array.js.map","export default (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return (value !== null && type === 'object') || type === 'function';\n});\n//# sourceMappingURL=is-object.js.map","import isArray from './is-array';\nimport isObject from './is-object';\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (isArray(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n }\n else if (isObject(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\nexport default each;\n//# sourceMappingURL=each.js.map","import each from './each';\nimport isFunction from './is-function';\nvar keys = Object.keys\n ? function (obj) { return Object.keys(obj); }\n : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n };\nexport default keys;\n//# sourceMappingURL=keys.js.map","import isNil from './is-nil';\nimport keys from './keys';\nfunction isMatch(obj, attrs) {\n var _keys = keys(attrs);\n var length = _keys.length;\n if (isNil(obj))\n return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\nexport default isMatch;\n//# sourceMappingURL=is-match.js.map","var isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\nexport default isObjectLike;\n//# sourceMappingURL=is-object-like.js.map","import isObjectLike from './is-object-like';\nimport isType from './is-type';\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\nexport default isPlainObject;\n//# sourceMappingURL=is-plain-object.js.map","import isFunction from './is-function';\nimport isMatch from './is-match';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nfunction find(arr, predicate) {\n if (!isArray(arr))\n return null;\n var _predicate;\n if (isFunction(predicate)) {\n _predicate = predicate;\n }\n if (isPlainObject(predicate)) {\n _predicate = function (a) { return isMatch(a, predicate); };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\nexport default find;\n//# sourceMappingURL=find.js.map","function findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\nexport default findIndex;\n//# sourceMappingURL=find-index.js.map","import isNil from './is-nil';\nimport isArray from './is-array';\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n if (isArray(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n }\n else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\nexport default firstValue;\n//# sourceMappingURL=first-value.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!isArray(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\nexport default flatten;\n//# sourceMappingURL=flatten.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) { result = []; }\n if (!isArray(arr)) {\n result.push(arr);\n }\n else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\nexport default flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=max.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=min.js.map","import isArray from './is-array';\nimport { default as getMax } from './max';\nimport { default as getMin } from './min';\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) { return !isNaN(v); });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0,\n };\n }\n if (isArray(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = getMax(filterValues);\n var min = getMin(filterValues);\n return {\n min: min,\n max: max,\n };\n};\nexport default getRange;\n//# sourceMappingURL=get-range.js.map","var arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\nexport default pull;\n//# sourceMappingURL=pull.js.map","import isArrayLike from './is-array-like';\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!isArrayLike(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\nexport default pullAt;\n//# sourceMappingURL=pull-at.js.map","import each from './each';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar reduce = function (arr, fn, init) {\n if (!isArray(arr) && !isPlainObject(arr)) {\n return arr;\n }\n var result = init;\n each(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\nexport default reduce;\n//# sourceMappingURL=reduce.js.map","import isArrayLike from './is-array-like';\nimport pullAt from './pull-at';\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!isArrayLike(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n pullAt(arr, indexes);\n return result;\n};\nexport default remove;\n//# sourceMappingURL=remove.js.map","import isType from './is-type';\nexport default (function (str) {\n return isType(str, 'String');\n});\n//# sourceMappingURL=is-string.js.map","import isArray from './is-array';\nimport isString from './is-string';\nimport isFunction from './is-function';\nfunction sortBy(arr, key) {\n var comparer;\n if (isFunction(key)) {\n comparer = function (a, b) { return key(a) - key(b); };\n }\n else {\n var keys_1 = [];\n if (isString(key)) {\n keys_1.push(key);\n }\n else if (isArray(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\nexport default sortBy;\n//# sourceMappingURL=sort-by.js.map","export default function uniq(arr, cache) {\n if (cache === void 0) { cache = new Map(); }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n//# sourceMappingURL=uniq.js.map","import uniq from './uniq';\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return uniq([].concat.apply([], sources));\n};\nexport default union;\n//# sourceMappingURL=union.js.map","import isArray from './is-array';\nimport isNil from './is-nil';\nexport default (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n // flatten\n if (!isArray(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n//# sourceMappingURL=values-of-key.js.map","import isArrayLike from './is-array-like';\nexport default function head(o) {\n if (isArrayLike(o)) {\n return o[0];\n }\n return undefined;\n}\n//# sourceMappingURL=head.js.map","import isArrayLike from './is-array-like';\nexport default function last(o) {\n if (isArrayLike(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n//# sourceMappingURL=last.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction startsWith(arr, e) {\n return isArray(arr) || isString(arr) ? arr[0] === e : false;\n}\nexport default startsWith;\n//# sourceMappingURL=starts-with.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction endsWith(arr, e) {\n return isArray(arr) || isString(arr) ? arr[arr.length - 1] === e : false;\n}\nexport default endsWith;\n//# sourceMappingURL=ends-with.js.map","/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i))\n return false;\n }\n return true;\n};\nexport default every;\n//# sourceMappingURL=every.js.map","/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i))\n return true;\n }\n return false;\n};\nexport default some;\n//# sourceMappingURL=some.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !isArray(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = isFunction(condition) ? condition : function (item) { return item[condition]; };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n }\n else {\n result[key] = [item];\n }\n }\n return result;\n}\nexport default groupBy;\n//# sourceMappingURL=group-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nimport groupBy from './group-by';\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nexport default function groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data,\n };\n }\n if (!isFunction(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = isArray(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return groupBy(data, condition);\n}\n//# sourceMappingURL=group-to-map.js.map","import groupToMap from './group-to-map';\nexport default (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = groupToMap(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n//# sourceMappingURL=group.js.map","/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\nexport default getWrapBehavior;\n//# sourceMappingURL=get-wrap-behavior.js.map","/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\nexport default wrapBehavior;\n//# sourceMappingURL=wrap-behavior.js.map","var numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\nexport default numberToColor;\n//# sourceMappingURL=number2color.js.map","import isArray from './is-array';\nfunction parseRadius(radius) {\n var r1 = 0, r2 = 0, r3 = 0, r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4,\n };\n}\nexport default parseRadius;\n//# sourceMappingURL=parse-radius.js.map","var clamp = function (a, min, max) {\n if (a < min) {\n return min;\n }\n else if (a > max) {\n return max;\n }\n return a;\n};\nexport default clamp;\n//# sourceMappingURL=clamp.js.map","var fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\nexport default fixedBase;\n//# sourceMappingURL=fixed-base.js.map","/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\nimport isType from './is-type';\nvar isNumber = function (value) {\n return isType(value, 'Number');\n};\nexport default isNumber;\n//# sourceMappingURL=is-number.js.map","import isNumber from './is-number';\nvar isDecimal = function (num) {\n return isNumber(num) && num % 1 !== 0;\n};\nexport default isDecimal;\n//# sourceMappingURL=is-decimal.js.map","import isNumber from './is-number';\nvar isEven = function (num) {\n return isNumber(num) && num % 2 === 0;\n};\nexport default isEven;\n//# sourceMappingURL=is-even.js.map","import isNumber from './is-number';\nvar isInteger = Number.isInteger\n ? Number.isInteger\n : function (num) {\n return isNumber(num) && num % 1 === 0;\n };\nexport default isInteger;\n//# sourceMappingURL=is-integer.js.map","import isNumber from './is-number';\nvar isNegative = function (num) {\n return isNumber(num) && num < 0;\n};\nexport default isNegative;\n//# sourceMappingURL=is-negative.js.map","var PRECISION = 0.00001; // numbers less than this is considered as 0\nexport default function isNumberEqual(a, b, precision) {\n if (precision === void 0) { precision = PRECISION; }\n return Math.abs(a - b) < precision;\n}\n//# sourceMappingURL=is-number-equal.js.map","import isNumber from './is-number';\nvar isOdd = function (num) {\n return isNumber(num) && num % 2 !== 0;\n};\nexport default isOdd;\n//# sourceMappingURL=is-odd.js.map","import isNumber from './is-number';\nvar isPositive = function (num) {\n return isNumber(num) && num > 0;\n};\nexport default isPositive;\n//# sourceMappingURL=is-positive.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n//# sourceMappingURL=max-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n//# sourceMappingURL=min-by.js.map","var mod = function (n, m) {\n return ((n % m) + m) % m;\n};\nexport default mod;\n//# sourceMappingURL=mod.js.map","var DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\nexport default toDegree;\n//# sourceMappingURL=to-degree.js.map","export default parseInt;\n//# sourceMappingURL=to-integer.js.map","var RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\nexport default toRadian;\n//# sourceMappingURL=to-radian.js.map","export default (function (obj, key) { return obj.hasOwnProperty(key); });\n//# sourceMappingURL=has.js.map","import each from './each';\nimport isFunction from './is-function';\n// @ts-ignore\nvar values = Object.values\n ? function (obj) { return Object.values(obj); }\n : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n };\nexport default values;\n//# sourceMappingURL=values.js.map","import contains from './contains';\nimport values from './values';\nexport default (function (obj, value) { return contains(values(obj), value); });\n//# sourceMappingURL=has-value.js.map","import isNil from './is-nil';\nexport default (function (value) {\n if (isNil(value))\n return '';\n return value.toString();\n});\n//# sourceMappingURL=to-string.js.map","import toString from './to-string';\nvar lowerCase = function (str) {\n return toString(str).toLowerCase();\n};\nexport default lowerCase;\n//# sourceMappingURL=lower-case.js.map","import toString from './to-string';\nvar lowerFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\nexport default lowerFirst;\n//# sourceMappingURL=lower-first.js.map","function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return o[name] === undefined ? '' : o[name];\n });\n}\nexport default substitute;\n//# sourceMappingURL=substitute.js.map","import toString from './to-string';\nvar upperCase = function (str) {\n return toString(str).toUpperCase();\n};\nexport default upperCase;\n//# sourceMappingURL=upper-case.js.map","import toString from './to-string';\nvar upperFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\nexport default upperFirst;\n//# sourceMappingURL=upper-first.js.map","var toString = {}.toString;\nvar getType = function (value) {\n return toString\n .call(value)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n};\nexport default getType;\n//# sourceMappingURL=get-type.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isArguments = function (value) {\n return isType(value, 'Arguments');\n};\nexport default isArguments;\n//# sourceMappingURL=is-arguments.js.map","/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isBoolean = function (value) {\n return isType(value, 'Boolean');\n};\nexport default isBoolean;\n//# sourceMappingURL=is-boolean.js.map","import isType from './is-type';\nvar isDate = function (value) {\n return isType(value, 'Date');\n};\nexport default isDate;\n//# sourceMappingURL=is-date.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isError = function (value) {\n return isType(value, 'Error');\n};\nexport default isError;\n//# sourceMappingURL=is-error.js.map","/**\n * 判断是否为有限数\n * @return {Boolean}\n */\nimport isNumber from './is-number';\nexport default function (value) {\n return isNumber(value) && isFinite(value);\n}\n//# sourceMappingURL=is-finite.js.map","var isNull = function (value) {\n return value === null;\n};\nexport default isNull;\n//# sourceMappingURL=is-null.js.map","var objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\nexport default isPrototype;\n//# sourceMappingURL=is-prototype.js.map","import isType from './is-type';\nvar isRegExp = function (str) {\n return isType(str, 'RegExp');\n};\nexport default isRegExp;\n//# sourceMappingURL=is-reg-exp.js.map","var isUndefined = function (value) {\n return value === undefined;\n};\nexport default isUndefined;\n//# sourceMappingURL=is-undefined.js.map","/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof Document;\n};\nexport default isElement;\n//# sourceMappingURL=is-element.js.map","export default function requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame ||\n // @ts-ignore\n window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame ||\n function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n//# sourceMappingURL=request-animation-frame.js.map","export default function cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame ||\n // @ts-ignore\n window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame ||\n clearTimeout;\n method(handler);\n}\n//# sourceMappingURL=clear-animation-frame.js.map","// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nexport default function mix(dist, src1, src2, src3) {\n if (src1)\n _mix(dist, src1);\n if (src2)\n _mix(dist, src2);\n if (src3)\n _mix(dist, src3);\n return dist;\n}\n//# sourceMappingURL=mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (isFunction(obj)) {\n obj = obj.prototype;\n }\n mix(c.prototype, obj);\n }\n};\nexport default augment;\n//# sourceMappingURL=augment.js.map","import isArray from './is-array';\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (isArray(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n }\n else {\n rst[i] = obj[i];\n }\n }\n }\n else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n }\n else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\nexport default clone;\n//# sourceMappingURL=clone.js.map","function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\nexport default debounce;\n//# sourceMappingURL=debounce.js.map","export default function (max) {\n\tvar num, curr, prev;\n\tvar limit = max || 1;\n\n\tfunction keep(key, value) {\n\t\tif (++num > limit) {\n\t\t\tprev = curr;\n\t\t\treset(1);\n\t\t\t++num;\n\t\t}\n\t\tcurr[key] = value;\n\t}\n\n\tfunction reset(isPartial) {\n\t\tnum = 0;\n\t\tcurr = Object.create(null);\n\t\tisPartial || (prev=Object.create(null));\n\t}\n\n\treset();\n\n\treturn {\n\t\tclear: reset,\n\t\thas: function (key) {\n\t\t\treturn curr[key] !== void 0 || prev[key] !== void 0;\n\t\t},\n\t\tget: function (key) {\n\t\t\tvar val = curr[key];\n\t\t\tif (val !== void 0) return val;\n\t\t\tif ((val=prev[key]) !== void 0) {\n\t\t\t\tkeep(key, val);\n\t\t\t\treturn val;\n\t\t\t}\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (curr[key] !== void 0) {\n\t\t\t\tcurr[key] = value;\n\t\t\t} else {\n\t\t\t\tkeep(key, value);\n\t\t\t}\n\t\t}\n\t};\n}\n","import flru from 'flru';\nimport isFunction from './is-function';\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n * @param maxSize lru maxSize\n */\nexport default (function (f, resolver, maxSize) {\n if (maxSize === void 0) { maxSize = 128; }\n if (!isFunction(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = flru(maxSize);\n return memoized;\n});\n//# sourceMappingURL=memoize.js.map","import isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar MAX_MIX_LEVEL = 5;\nfunction hasOwn(object, property) {\n if (Object.hasOwn) {\n return Object.hasOwn(object, property);\n }\n if (object == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n return Object.prototype.hasOwnProperty.call(Object(object), property);\n}\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (hasOwn(src, key)) {\n var value = src[key];\n if (value !== null && isPlainObject(value)) {\n if (!isPlainObject(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n }\n else {\n dist[key] = src[key];\n }\n }\n else if (isArray(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n }\n else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\nexport default deepMix;\n//# sourceMappingURL=deep-mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!isFunction(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () { };\n }\n var create = Object.create\n ? function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c,\n },\n });\n }\n : function (proto, c) {\n function Tmp() { }\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = mix(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n mix(superObj, overrides);\n mix(subclass, staticOverrides);\n return subclass;\n};\nexport default extend;\n//# sourceMappingURL=extend.js.map","import isArrayLike from './is-array-like';\nvar indexOf = function (arr, obj) {\n if (!isArrayLike(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\nexport default indexOf;\n//# sourceMappingURL=index-of.js.map","import isNil from './is-nil';\nimport isArrayLike from './is-array-like';\nimport getType from './get-type';\nimport isPrototype from './is-prototype';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n var type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\nexport default isEmpty;\n//# sourceMappingURL=is-empty.js.map","import isObjectLike from './is-object-like';\nimport isArrayLike from './is-array-like';\nimport isString from './is-string';\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (isString(value) || isString(other)) {\n return false;\n }\n if (isArrayLike(value) || isArrayLike(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (isObjectLike(value) || isObjectLike(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\nexport default isEqual;\n//# sourceMappingURL=is-equal.js.map","import isFunction from './is-function';\nimport isEqual from './is-equal';\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\nexport default (function (value, other, fn) {\n if (!isFunction(fn)) {\n return isEqual(value, other);\n }\n return !!fn(value, other);\n});\n//# sourceMappingURL=is-equal-with.js.map","import isArrayLike from './is-array-like';\nvar map = function (arr, func) {\n if (!isArrayLike(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\nexport default map;\n//# sourceMappingURL=map.js.map","import isNil from './is-nil';\nimport isObject from './is-object';\nvar identity = function (v) { return v; };\nexport default (function (object, func) {\n if (func === void 0) { func = identity; }\n var r = {};\n if (isObject(object) && !isNil(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n//# sourceMappingURL=map-values.js.map","import isString from './is-string';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\nexport default (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = isString(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return obj === undefined || p < keyArr.length ? defaultValue : obj;\n});\n//# sourceMappingURL=get.js.map","import isObject from './is-object';\nimport isString from './is-string';\nimport isNumber from './is-number';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\nexport default (function (obj, path, value) {\n var o = obj;\n var keyArr = isString(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!isObject(o[key])) {\n o[key] = isNumber(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n }\n else {\n o[key] = value;\n }\n });\n return obj;\n});\n//# sourceMappingURL=set.js.map","import each from './each';\nimport isPlainObject from './is-plain-object';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport default (function (object, keys) {\n if (object === null || !isPlainObject(object)) {\n return {};\n }\n var result = {};\n each(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n//# sourceMappingURL=pick.js.map","import reduce from './reduce';\nexport default (function (obj, keys) {\n return reduce(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n//# sourceMappingURL=omit.js.map","export default (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options)\n options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false)\n previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n//# sourceMappingURL=throttle.js.map","import isArrayLike from './is-array-like';\nexport default (function (value) {\n return isArrayLike(value) ? Array.prototype.slice.call(value) : [];\n});\n//# sourceMappingURL=to-array.js.map","var map = {};\nexport default (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n }\n else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n//# sourceMappingURL=unique-id.js.map","export default (function () { });\n//# sourceMappingURL=noop.js.map","export default (function (v) { return v; });\n//# sourceMappingURL=identity.js.map","import isNil from './is-nil';\nimport isArraylike from './is-array-like';\nexport default function size(o) {\n if (isNil(o)) {\n return 0;\n }\n if (isArraylike(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n//# sourceMappingURL=size.js.map","/**\n * k-v 存储\n */\nvar default_1 = /** @class */ (function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}());\nexport default default_1;\n//# sourceMappingURL=cache.js.map","import { memoize } from '../lodash';\nimport { arr2rgb } from './arr2rgb';\nvar RGB_REG = /rgba?\\(([\\s.,0-9]+)\\)/;\n/**\n * 创建辅助 tag 取颜色\n * @returns\n */\nfunction createTmp() {\n var i = document.createElement('i');\n i.title = 'Web Colour Picker';\n i.style.display = 'none';\n document.body.appendChild(i);\n return i;\n}\nvar iEl;\n/**\n * 将颜色转换到 rgb 的格式\n * @param {color} color 颜色\n * @return 将颜色转换到 '#ffffff' 的格式\n */\nfunction toRGBString(color) {\n // 如果已经是 rgb的格式\n if (color[0] === '#' && color.length === 7) {\n return color;\n }\n if (!iEl) {\n // 防止防止在页头报错\n iEl = createTmp();\n }\n iEl.style.color = color;\n var rst = document.defaultView.getComputedStyle(iEl, '').getPropertyValue('color');\n var matches = RGB_REG.exec(rst);\n var cArray = matches[1].split(/\\s*,\\s*/).map(function (s) { return Number(s); });\n rst = arr2rgb(cArray);\n return rst;\n}\n/**\n * export with memoize.\n * @param color\n * @returns\n */\nexport var toRGB = memoize(toRGBString, function (color) { return color; }, 256);\n//# sourceMappingURL=torgb.js.map","import { rgb2arr } from './rgb2arr';\nimport { arr2rgb } from './arr2rgb';\nimport { toRGB } from './torgb';\n/**\n * 获取颜色之间的插值\n * @param start\n * @param end\n * @param percent\n * @param index\n * @returns\n */\nfunction getValue(start, end, percent, index) {\n return start[index] + (end[index] - start[index]) * percent;\n}\n/**\n * 计算颜色\n * @param points\n * @param percent\n * @returns\n */\nfunction calColor(points, percent) {\n var fixedPercent = isNaN(Number(percent)) || percent < 0 ? 0 : percent > 1 ? 1 : Number(percent);\n var steps = points.length - 1;\n var step = Math.floor(steps * fixedPercent);\n var left = steps * fixedPercent - step;\n var start = points[step];\n var end = step === steps ? start : points[step + 1];\n return arr2rgb([getValue(start, end, left, 0), getValue(start, end, left, 1), getValue(start, end, left, 2)]);\n}\n/**\n * 获取渐变函数\n * @param colors 多个颜色\n * @return 颜色值\n */\nexport function gradient(colors) {\n var colorArray = typeof colors === 'string' ? colors.split('-') : colors;\n var points = colorArray.map(function (color) {\n return rgb2arr(color.indexOf('#') === -1 ? toRGB(color) : color);\n });\n // 返回一个函数\n return function (percent) {\n return calColor(points, percent);\n };\n}\n//# sourceMappingURL=gradient.js.map","var regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^)]+\\))/gi;\nfunction isGradientColor(val) {\n return /^[r,R,L,l]{1}[\\s]*\\(/.test(val);\n}\nexport function toCSSGradient(gradientColor) {\n if (isGradientColor(gradientColor)) {\n var cssColor_1;\n var steps = void 0;\n if (gradientColor[0] === 'l') {\n // 线性渐变\n var arr = regexLG.exec(gradientColor);\n var angle = +arr[1] + 90; // css 和 g 的渐变起始角度不同\n steps = arr[2];\n cssColor_1 = \"linear-gradient(\" + angle + \"deg, \";\n }\n else if (gradientColor[0] === 'r') {\n // 径向渐变\n cssColor_1 = 'radial-gradient(';\n var arr = regexRG.exec(gradientColor);\n steps = arr[4];\n }\n var colorStops_1 = steps.match(regexColorStop);\n colorStops_1.forEach(function (item, index) {\n var itemArr = item.split(':');\n cssColor_1 += itemArr[1] + \" \" + Number(itemArr[0]) * 100 + \"%\";\n if (index !== colorStops_1.length - 1) {\n cssColor_1 += ', ';\n }\n });\n cssColor_1 += ')';\n return cssColor_1;\n }\n return gradientColor;\n}\n//# sourceMappingURL=tocssgradient.js.map","import { mat3 } from 'gl-matrix';\nfunction leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromTranslation(transMat, v);\n return mat3.multiply(out, transMat, a);\n}\nfunction leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromRotation(rotateMat, rad);\n return mat3.multiply(out, rotateMat, a);\n}\nfunction leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromScaling(scaleMat, v);\n return mat3.multiply(out, scaleMat, a);\n}\nfunction leftMultiply(out, a, a1) {\n return mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nexport function transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\n//# sourceMappingURL=transform.js.map","/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nexport function direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n//# sourceMappingURL=direction.js.map","import { vec2 } from 'gl-matrix';\nimport { direction } from './direction';\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nexport function angleTo(v1, v2, direct) {\n var ang = vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\n//# sourceMappingURL=angle-to.js.map","/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nexport function vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\n//# sourceMappingURL=vertical.js.map","/**\n * Rounds the values of a `PathArray` instance to\n * a specified amount of decimals and returns it.\n */\nexport function roundPath(path, round) {\n if (round === 'off')\n return [].concat(path);\n // to round values to the power\n // the `round` value must be integer\n var pow = typeof round === 'number' && round >= 1 ? Math.pow(10, round) : 1;\n return path.map(function (pi) {\n var values = pi\n .slice(1)\n .map(Number)\n .map(function (n) { return (round ? Math.round(n * pow) / pow : Math.round(n)); });\n // @ts-ignore\n return [pi[0]].concat(values);\n });\n}\n//# sourceMappingURL=round-path.js.map","import { roundPath } from '../process/round-path';\n/**\n * Returns a valid `d` attribute string value created\n * by rounding values and concatenating the `pathArray` segments.\n */\nexport function path2String(path, round) {\n if (round === void 0) { round = 'off'; }\n return roundPath(path, round)\n .map(function (x) { return x[0] + x.slice(1).join(' '); })\n .join('');\n}\n//# sourceMappingURL=path-2-string.js.map","export var paramsParser = {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n x: 0,\n y: 0,\n qx: null,\n qy: null,\n};\n//# sourceMappingURL=params-parser.js.map","export function fixArc(pathArray, allPathCommands, i) {\n if (pathArray[i].length > 7) {\n pathArray[i].shift();\n var pi = pathArray[i];\n // const ni = i + 1;\n var ni = i;\n while (pi.length) {\n // if created multiple C:s, their original seg is saved\n allPathCommands[i] = 'A';\n // @ts-ignore\n pathArray.splice((ni += 1), 0, ['C'].concat(pi.splice(0, 6)));\n }\n pathArray.splice(i, 1);\n }\n}\n//# sourceMappingURL=fix-arc.js.map","export var paramsCount = {\n a: 7,\n c: 6,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n z: 0,\n};\n//# sourceMappingURL=params-count.js.map","import { paramsCount } from '../parser/params-count';\n/**\n * Iterates an array to check if it's an actual `PathArray`.\n */\nexport function isPathArray(path) {\n return (Array.isArray(path) &&\n path.every(function (seg) {\n var lk = seg[0].toLowerCase();\n return paramsCount[lk] === seg.length - 1 && 'achlmqstvz'.includes(lk);\n }));\n}\n//# sourceMappingURL=is-path-array.js.map","import { isPathArray } from './is-path-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all absolute values.\n */\nexport function isAbsoluteArray(path) {\n return (isPathArray(path) &&\n // @ts-ignore -- `isPathArray` also checks if it's `Array`\n path.every(function (_a) {\n var x = _a[0];\n return x === x.toUpperCase();\n }));\n}\n//# sourceMappingURL=is-absolute-array.js.map","import { isAbsoluteArray } from './is-absolute-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all segments are in non-shorthand notation\n * with absolute values.\n */\nexport function isNormalizedArray(path) {\n return isAbsoluteArray(path) && path.every(function (_a) {\n var pc = _a[0];\n return 'ACLMQZ'.includes(pc);\n });\n}\n//# sourceMappingURL=is-normalized-array.js.map","import { paramsCount } from './params-count';\n/**\n * Breaks the parsing of a pathString once a segment is finalized.\n */\nexport function finalizeSegment(path) {\n var pathCommand = path.pathValue[path.segmentStart];\n var LK = pathCommand.toLowerCase();\n var data = path.data;\n while (data.length >= paramsCount[LK]) {\n // overloaded `moveTo`\n // https://github.com/rveciana/svg-path-properties/blob/master/src/parse.ts\n if (LK === 'm' && data.length > 2) {\n // @ts-ignore\n path.segments.push([pathCommand].concat(data.splice(0, 2)));\n LK = 'l';\n pathCommand = pathCommand === 'm' ? 'l' : 'L';\n }\n else {\n // @ts-ignore\n path.segments.push([pathCommand].concat(data.splice(0, paramsCount[LK])));\n }\n if (!paramsCount[LK]) {\n break;\n }\n }\n}\n//# sourceMappingURL=finalize-segment.js.map","/**\n * Validates an A (arc-to) specific path command value.\n * Usually a `large-arc-flag` or `sweep-flag`.\n */\nexport function scanFlag(path) {\n var index = path.index, pathValue = path.pathValue;\n var code = pathValue.charCodeAt(index);\n if (code === 0x30 /* 0 */) {\n path.param = 0;\n path.index += 1;\n return;\n }\n if (code === 0x31 /* 1 */) {\n path.param = 1;\n path.index += 1;\n return;\n }\n path.err = \"[path-util]: invalid Arc flag \\\"\" + pathValue[index] + \"\\\", expecting 0 or 1 at index \" + index;\n}\n//# sourceMappingURL=scan-flag.js.map","/**\n * Checks if the character is or belongs to a number.\n * [0-9]|+|-|.\n */\nexport function isDigitStart(code) {\n return ((code >= 48 && code <= 57) /* 0..9 */ || code === 0x2b /* + */ || code === 0x2d /* - */ || code === 0x2e); /* . */\n}\nexport function isDigit(code) {\n return code >= 48 && code <= 57; // 0..9\n}\n//# sourceMappingURL=is-digit-start.js.map","import { isDigit } from './is-digit-start';\n/**\n * Validates every character of the path string,\n * every path command, negative numbers or floating point numbers.\n */\nexport function scanParam(path) {\n var max = path.max, pathValue = path.pathValue, start = path.index;\n var index = start;\n var zeroFirst = false;\n var hasCeiling = false;\n var hasDecimal = false;\n var hasDot = false;\n var ch;\n if (index >= max) {\n // path.err = 'SvgPath: missed param (at pos ' + index + ')';\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"pathValue\\\" is missing param\";\n return;\n }\n ch = pathValue.charCodeAt(index);\n if (ch === 0x2b /* + */ || ch === 0x2d /* - */) {\n index += 1;\n // ch = (index < max) ? pathValue.charCodeAt(index) : 0;\n ch = pathValue.charCodeAt(index);\n }\n // This logic is shamelessly borrowed from Esprima\n // https://github.com/ariya/esprimas\n if (!isDigit(ch) && ch !== 0x2e /* . */) {\n // path.err = 'SvgPath: param should start with 0..9 or `.` (at pos ' + index + ')';\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" is not a number\";\n return;\n }\n if (ch !== 0x2e /* . */) {\n zeroFirst = ch === 0x30 /* 0 */;\n index += 1;\n ch = pathValue.charCodeAt(index);\n if (zeroFirst && index < max) {\n // decimal number starts with '0' such as '09' is illegal.\n if (ch && isDigit(ch)) {\n // path.err = 'SvgPath: numbers started with `0` such as `09`\n // are illegal (at pos ' + start + ')';\n path.err = \"[path-util]: Invalid path value at index \" + start + \", \\\"\" + pathValue[start] + \"\\\" illegal number\";\n return;\n }\n }\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasCeiling = true;\n }\n ch = pathValue.charCodeAt(index);\n }\n if (ch === 0x2e /* . */) {\n hasDot = true;\n index += 1;\n while (isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasDecimal = true;\n }\n ch = pathValue.charCodeAt(index);\n }\n if (ch === 0x65 /* e */ || ch === 0x45 /* E */) {\n if (hasDot && !hasCeiling && !hasDecimal) {\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" invalid float exponent\";\n return;\n }\n index += 1;\n ch = pathValue.charCodeAt(index);\n if (ch === 0x2b /* + */ || ch === 0x2d /* - */) {\n index += 1;\n }\n if (index < max && isDigit(pathValue.charCodeAt(index))) {\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n }\n }\n else {\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" invalid integer exponent\";\n return;\n }\n }\n path.index = index;\n path.param = +path.pathValue.slice(start, index);\n}\n//# sourceMappingURL=scan-param.js.map","/**\n * Checks if the character is a space.\n */\nexport function isSpace(ch) {\n var specialSpaces = [\n 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x202f,\n 0x205f, 0x3000, 0xfeff,\n ];\n /* istanbul ignore next */\n return (ch === 0x0a ||\n ch === 0x0d ||\n ch === 0x2028 ||\n ch === 0x2029 || // Line terminators\n // White spaces\n ch === 0x20 ||\n ch === 0x09 ||\n ch === 0x0b ||\n ch === 0x0c ||\n ch === 0xa0 ||\n (ch >= 0x1680 && specialSpaces.includes(ch)));\n}\n//# sourceMappingURL=is-space.js.map","import { isSpace } from './is-space';\n/**\n * Points the parser to the next character in the\n * path string every time it encounters any kind of\n * space character.\n */\nexport function skipSpaces(path) {\n var pathValue = path.pathValue, max = path.max;\n while (path.index < max && isSpace(pathValue.charCodeAt(path.index))) {\n path.index += 1;\n }\n}\n//# sourceMappingURL=skip-spaces.js.map","/**\n * Checks if the character is a path command.\n */\nexport function isPathCommand(code) {\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy\n switch (code | 0x20) {\n case 0x6d /* m */:\n case 0x7a /* z */:\n case 0x6c /* l */:\n case 0x68 /* h */:\n case 0x76 /* v */:\n case 0x63 /* c */:\n case 0x73 /* s */:\n case 0x71 /* q */:\n case 0x74 /* t */:\n case 0x61 /* a */:\n // case 0x72/* r */:\n return true;\n default:\n return false;\n }\n}\n//# sourceMappingURL=is-path-command.js.map","/**\n * Checks if the character is an A (arc-to) path command.\n */\nexport function isArcCommand(code) {\n return (code | 0x20) === 0x61;\n}\n//# sourceMappingURL=is-arc-command.js.map","import { finalizeSegment } from './finalize-segment';\nimport { paramsCount } from './params-count';\nimport { scanFlag } from './scan-flag';\nimport { scanParam } from './scan-param';\nimport { skipSpaces } from './skip-spaces';\nimport { isPathCommand } from './is-path-command';\nimport { isDigitStart } from './is-digit-start';\nimport { isArcCommand } from './is-arc-command';\n/**\n * Scans every character in the path string to determine\n * where a segment starts and where it ends.\n */\nexport function scanSegment(path) {\n var max = path.max, pathValue = path.pathValue, index = path.index;\n var cmdCode = pathValue.charCodeAt(index);\n var reqParams = paramsCount[pathValue[index].toLowerCase()];\n path.segmentStart = index;\n if (!isPathCommand(cmdCode)) {\n path.err = \"[path-util]: Invalid path value \\\"\" + pathValue[index] + \"\\\" is not a path command\";\n return;\n }\n path.index += 1;\n skipSpaces(path);\n path.data = [];\n if (!reqParams) {\n // Z\n finalizeSegment(path);\n return;\n }\n for (;;) {\n for (var i = reqParams; i > 0; i -= 1) {\n if (isArcCommand(cmdCode) && (i === 3 || i === 4))\n scanFlag(path);\n else\n scanParam(path);\n if (path.err.length) {\n return;\n }\n path.data.push(path.param);\n skipSpaces(path);\n // after ',' param is mandatory\n if (path.index < max && pathValue.charCodeAt(path.index) === 0x2c /* , */) {\n path.index += 1;\n skipSpaces(path);\n }\n }\n if (path.index >= path.max) {\n break;\n }\n // Stop on next segment\n if (!isDigitStart(pathValue.charCodeAt(path.index))) {\n break;\n }\n }\n finalizeSegment(path);\n}\n//# sourceMappingURL=scan-segment.js.map","/**\n * The `PathParser` is used by the `parsePathString` static method\n * to generate a `pathArray`.\n */\nvar PathParser = /** @class */ (function () {\n function PathParser(pathString) {\n this.pathValue = pathString;\n // @ts-ignore\n this.segments = [];\n this.max = pathString.length;\n this.index = 0;\n this.param = 0.0;\n this.segmentStart = 0;\n this.data = [];\n this.err = '';\n }\n return PathParser;\n}());\nexport { PathParser };\n//# sourceMappingURL=path-parser.js.map","import { isPathArray } from '../util/is-path-array';\nimport { scanSegment } from './scan-segment';\nimport { skipSpaces } from './skip-spaces';\nimport { PathParser } from './path-parser';\n/**\n * Parses a path string value and returns an array\n * of segments we like to call `pathArray`.\n */\nexport function parsePathString(pathInput) {\n if (isPathArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = new PathParser(pathInput);\n skipSpaces(path);\n while (path.index < path.max && !path.err.length) {\n scanSegment(path);\n }\n return path.err ? path.err : path.segments;\n}\n//# sourceMappingURL=parse-path-string.js.map","import { isAbsoluteArray } from '../util/is-absolute-array';\nimport { parsePathString } from '../parser/parse-path-string';\nexport function path2Absolute(pathInput) {\n if (isAbsoluteArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = parsePathString(pathInput);\n // if (!path || !path.length) {\n // return [['M', 0, 0]];\n // }\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n // @ts-ignore\n return path.map(function (segment) {\n var values = segment.slice(1).map(Number);\n var pathCommand = segment[0];\n var absCommand = pathCommand.toUpperCase();\n if (pathCommand === 'M') {\n x = values[0], y = values[1];\n mx = x;\n my = y;\n return ['M', x, y];\n }\n var absoluteSegment;\n if (pathCommand !== absCommand) {\n switch (absCommand) {\n case 'A':\n absoluteSegment = [\n absCommand,\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5] + x,\n values[6] + y,\n ];\n break;\n case 'V':\n absoluteSegment = [absCommand, values[0] + y];\n break;\n case 'H':\n absoluteSegment = [absCommand, values[0] + x];\n break;\n default: {\n // use brakets for `eslint: no-case-declaration`\n // https://stackoverflow.com/a/50753272/803358\n var absValues = values.map(function (n, j) { return n + (j % 2 ? y : x); });\n // for n, l, c, s, q, t\n // @ts-ignore\n absoluteSegment = [absCommand].concat(absValues);\n }\n }\n }\n else {\n // @ts-ignore\n absoluteSegment = [absCommand].concat(values);\n }\n var segLength = absoluteSegment.length;\n switch (absCommand) {\n case 'Z':\n x = mx;\n y = my;\n break;\n case 'H':\n x = absoluteSegment[1];\n break;\n case 'V':\n y = absoluteSegment[1];\n break;\n default:\n x = absoluteSegment[segLength - 2];\n y = absoluteSegment[segLength - 1];\n if (absCommand === 'M') {\n mx = x;\n my = y;\n }\n }\n return absoluteSegment;\n });\n}\n//# sourceMappingURL=path-2-absolute.js.map","/**\n * Normalizes a single segment of a `PathArray` object.\n * eg. H/V -> L, T -> Q\n */\nexport function normalizeSegment(segment, params) {\n var pathCommand = segment[0];\n var px1 = params.x1, py1 = params.y1, px2 = params.x2, py2 = params.y2;\n var values = segment.slice(1).map(Number);\n var result = segment;\n if (!'TQ'.includes(pathCommand)) {\n // optional but good to be cautious\n params.qx = null;\n params.qy = null;\n }\n if (pathCommand === 'H') {\n result = ['L', segment[1], py1];\n }\n else if (pathCommand === 'V') {\n result = ['L', px1, segment[1]];\n }\n else if (pathCommand === 'S') {\n var x1 = px1 * 2 - px2;\n var y1 = py1 * 2 - py2;\n params.x1 = x1;\n params.y1 = y1;\n result = ['C', x1, y1].concat(values);\n }\n else if (pathCommand === 'T') {\n var qx = px1 * 2 - params.qx;\n var qy = py1 * 2 - params.qy;\n params.qx = qx;\n params.qy = qy;\n result = ['Q', qx, qy].concat(values);\n }\n else if (pathCommand === 'Q') {\n var nqx = values[0], nqy = values[1];\n params.qx = nqx;\n params.qy = nqy;\n }\n return result;\n}\n//# sourceMappingURL=normalize-segment.js.map","import { __assign } from \"tslib\";\nimport { isNormalizedArray } from '../util/is-normalized-array';\nimport { paramsParser } from '../parser/params-parser';\nimport { path2Absolute } from '../convert/path-2-absolute';\nimport { normalizeSegment } from './normalize-segment';\n/**\n * @example\n * const path = 'M0 0 H50';\n * const normalizedPath = SVGPathCommander.normalizePath(path);\n * // result => [['M', 0, 0], ['L', 50, 0]]\n */\nexport function normalizePath(pathInput) {\n if (isNormalizedArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = path2Absolute(pathInput);\n var params = __assign({}, paramsParser);\n for (var i = 0; i < path.length; i += 1) {\n // Save current path command\n path[i] = normalizeSegment(path[i], params);\n var segment = path[i];\n var seglen = segment.length;\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +segment[seglen - 4] || params.x1;\n params.y2 = +segment[seglen - 3] || params.y1;\n }\n return path;\n}\n//# sourceMappingURL=normalize-path.js.map","import { isNormalizedArray } from './is-normalized-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all C (cubic bezier) segments.\n *\n * @param {string | PathArray} path the `Array` to be checked\n * @returns {boolean} iteration result\n */\nexport function isCurveArray(path) {\n return isNormalizedArray(path) && path.every(function (_a) {\n var pc = _a[0];\n return 'MC'.includes(pc);\n });\n}\n//# sourceMappingURL=is-curve-array.js.map","export function rotateVector(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return { x: X, y: Y };\n}\n//# sourceMappingURL=rotate-vector.js.map","import { rotateVector } from '../util/rotate-vector';\n/**\n * Converts A (arc-to) segments to C (cubic-bezier-to).\n *\n * For more information of where this math came from visit:\n * http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n */\nexport function arcToCubic(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, recursive) {\n var x1 = X1;\n var y1 = Y1;\n var rx = RX;\n var ry = RY;\n var x2 = X2;\n var y2 = Y2;\n // for more information of where this Math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n var d120 = (Math.PI * 120) / 180;\n var rad = (Math.PI / 180) * (+angle || 0);\n /** @type {number[]} */\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n if (!recursive) {\n xy = rotateVector(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotateVector(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx *= h;\n ry *= h;\n }\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (LAF === SF ? -1 : 1) *\n Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = (k * rx * y) / ry + (x1 + x2) / 2;\n cy = (k * -ry * x) / rx + (y1 + y2) / 2;\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f1 = Math.asin(((((y1 - cy) / ry) * Math.pow(10, 9)) >> 0) / Math.pow(10, 9));\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f2 = Math.asin(((((y2 - cy) / ry) * Math.pow(10, 9)) >> 0) / Math.pow(10, 9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n if (f1 < 0)\n f1 = Math.PI * 2 + f1;\n if (f2 < 0)\n f2 = Math.PI * 2 + f2;\n if (SF && f1 > f2) {\n f1 -= Math.PI * 2;\n }\n if (!SF && f2 > f1) {\n f2 -= Math.PI * 2;\n }\n }\n else {\n f1 = recursive[0], f2 = recursive[1], cx = recursive[2], cy = recursive[3];\n }\n var df = f2 - f1;\n if (Math.abs(df) > d120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + d120 * (SF && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = arcToCubic(x2, y2, rx, ry, angle, 0, SF, x2old, y2old, [f2, f2old, cx, cy]);\n }\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = (4 / 3) * rx * t;\n var hy = (4 / 3) * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return m2.concat(m3, m4, res);\n // return [...m2, ...m3, ...m4, ...res];\n }\n res = m2.concat(m3, m4, res);\n // res = [...m2, ...m3, ...m4, ...res];\n var newres = [];\n for (var i = 0, ii = res.length; i < ii; i += 1) {\n newres[i] = i % 2 ? rotateVector(res[i - 1], res[i], rad).y : rotateVector(res[i], res[i + 1], rad).x;\n }\n return newres;\n}\n// const TAU = Math.PI * 2;\n// const mapToEllipse = (\n// { x, y }: { x: number; y: number },\n// rx: number,\n// ry: number,\n// cosphi: number,\n// sinphi: number,\n// centerx: number,\n// centery: number,\n// ) => {\n// x *= rx;\n// y *= ry;\n// const xp = cosphi * x - sinphi * y;\n// const yp = sinphi * x + cosphi * y;\n// return {\n// x: xp + centerx,\n// y: yp + centery,\n// };\n// };\n// const approxUnitArc = (ang1: number, ang2: number) => {\n// // If 90 degree circular arc, use a constant\n// // as derived from http://spencermortensen.com/articles/bezier-circle\n// const a =\n// ang2 === 1.5707963267948966\n// ? 0.551915024494\n// : ang2 === -1.5707963267948966\n// ? -0.551915024494\n// : (4 / 3) * Math.tan(ang2 / 4);\n// const x1 = Math.cos(ang1);\n// const y1 = Math.sin(ang1);\n// const x2 = Math.cos(ang1 + ang2);\n// const y2 = Math.sin(ang1 + ang2);\n// return [\n// {\n// x: x1 - y1 * a,\n// y: y1 + x1 * a,\n// },\n// {\n// x: x2 + y2 * a,\n// y: y2 - x2 * a,\n// },\n// {\n// x: x2,\n// y: y2,\n// },\n// ];\n// };\n// const vectorAngle = (ux: number, uy: number, vx: number, vy: number) => {\n// const sign = ux * vy - uy * vx < 0 ? -1 : 1;\n// let dot = ux * vx + uy * vy;\n// if (dot > 1) {\n// dot = 1;\n// }\n// if (dot < -1) {\n// dot = -1;\n// }\n// return sign * Math.acos(dot);\n// };\n// const getArcCenter = (\n// px: any,\n// py: any,\n// cx: any,\n// cy: any,\n// rx: number,\n// ry: number,\n// largeArcFlag: number,\n// sweepFlag: number,\n// sinphi: number,\n// cosphi: number,\n// pxp: number,\n// pyp: number,\n// ) => {\n// const rxsq = Math.pow(rx, 2);\n// const rysq = Math.pow(ry, 2);\n// const pxpsq = Math.pow(pxp, 2);\n// const pypsq = Math.pow(pyp, 2);\n// let radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq;\n// if (radicant < 0) {\n// radicant = 0;\n// }\n// radicant /= rxsq * pypsq + rysq * pxpsq;\n// radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n// const centerxp = ((radicant * rx) / ry) * pyp;\n// const centeryp = ((radicant * -ry) / rx) * pxp;\n// const centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2;\n// const centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2;\n// const vx1 = (pxp - centerxp) / rx;\n// const vy1 = (pyp - centeryp) / ry;\n// const vx2 = (-pxp - centerxp) / rx;\n// const vy2 = (-pyp - centeryp) / ry;\n// const ang1 = vectorAngle(1, 0, vx1, vy1);\n// let ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n// if (sweepFlag === 0 && ang2 > 0) {\n// ang2 -= TAU;\n// }\n// if (sweepFlag === 1 && ang2 < 0) {\n// ang2 += TAU;\n// }\n// return [centerx, centery, ang1, ang2];\n// };\n// const arcToBezier = ({ px, py, cx, cy, rx, ry, xAxisRotation = 0, largeArcFlag = 0, sweepFlag = 0 }) => {\n// const curves = [];\n// if (rx === 0 || ry === 0) {\n// return [{ x1: 0, y1: 0, x2: 0, y2: 0, x: cx, y: cy }];\n// }\n// const sinphi = Math.sin((xAxisRotation * TAU) / 360);\n// const cosphi = Math.cos((xAxisRotation * TAU) / 360);\n// const pxp = (cosphi * (px - cx)) / 2 + (sinphi * (py - cy)) / 2;\n// const pyp = (-sinphi * (px - cx)) / 2 + (cosphi * (py - cy)) / 2;\n// if (pxp === 0 && pyp === 0) {\n// return [{ x1: 0, y1: 0, x2: 0, y2: 0, x: cx, y: cy }];\n// }\n// rx = Math.abs(rx);\n// ry = Math.abs(ry);\n// const lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2);\n// if (lambda > 1) {\n// rx *= Math.sqrt(lambda);\n// ry *= Math.sqrt(lambda);\n// }\n// let [centerx, centery, ang1, ang2] = getArcCenter(\n// px,\n// py,\n// cx,\n// cy,\n// rx,\n// ry,\n// largeArcFlag,\n// sweepFlag,\n// sinphi,\n// cosphi,\n// pxp,\n// pyp,\n// );\n// // If 'ang2' == 90.0000000001, then `ratio` will evaluate to\n// // 1.0000000001. This causes `segments` to be greater than one, which is an\n// // unecessary split, and adds extra points to the bezier curve. To alleviate\n// // this issue, we round to 1.0 when the ratio is close to 1.0.\n// let ratio = Math.abs(ang2) / (TAU / 4);\n// if (Math.abs(1.0 - ratio) < 0.0000001) {\n// ratio = 1.0;\n// }\n// const segments = Math.max(Math.ceil(ratio), 1);\n// ang2 /= segments;\n// for (let i = 0; i < segments; i++) {\n// curves.push(approxUnitArc(ang1, ang2));\n// ang1 += ang2;\n// }\n// return curves.map((curve) => {\n// const { x: x1, y: y1 } = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery);\n// const { x: x2, y: y2 } = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery);\n// const { x, y } = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery);\n// return { x1, y1, x2, y2, x, y };\n// });\n// };\n// export function arcToCubic(\n// x1: number,\n// y1: number,\n// rx: number,\n// ry: number,\n// angle: number,\n// LAF: number,\n// SF: number,\n// x2: number,\n// y2: number,\n// ) {\n// const curves = arcToBezier({\n// px: x1,\n// py: y1,\n// cx: x2,\n// cy: y2,\n// rx,\n// ry,\n// xAxisRotation: angle,\n// largeArcFlag: LAF,\n// sweepFlag: SF,\n// });\n// return curves.reduce((prev, cur) => {\n// const { x1, y1, x2, y2, x, y } = cur;\n// prev.push(x1, y1, x2, y2, x, y);\n// return prev;\n// }, [] as number[]);\n// }\n//# sourceMappingURL=arc-2-cubic.js.map","export function quadToCubic(x1, y1, qx, qy, x2, y2) {\n var r13 = 1 / 3;\n var r23 = 2 / 3;\n return [\n r13 * x1 + r23 * qx,\n r13 * y1 + r23 * qy,\n r13 * x2 + r23 * qx,\n r13 * y2 + r23 * qy,\n x2,\n y2, // x,y\n ];\n}\n//# sourceMappingURL=quad-2-cubic.js.map","export function midPoint(a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var bx = b[0];\n var by = b[1];\n return [ax + (bx - ax) * t, ay + (by - ay) * t];\n}\n//# sourceMappingURL=mid-point.js.map","import { __spreadArray } from \"tslib\";\nimport { midPoint } from '../util/mid-point';\nexport var lineToCubic = function (x1, y1, x2, y2) {\n var t = 0.5;\n var mid = midPoint([x1, y1], [x2, y2], t);\n return __spreadArray(__spreadArray([], mid, true), [x2, y2, x2, y2], false);\n};\n//# sourceMappingURL=line-2-cubic.js.map","import { arcToCubic } from './arc-2-cubic';\nimport { quadToCubic } from './quad-2-cubic';\nimport { lineToCubic } from './line-2-cubic';\nexport function segmentToCubic(segment, params) {\n var pathCommand = segment[0];\n var values = segment.slice(1).map(Number);\n var x = values[0], y = values[1];\n var args;\n var px1 = params.x1, py1 = params.y1, px = params.x, py = params.y;\n if (!'TQ'.includes(pathCommand)) {\n params.qx = null;\n params.qy = null;\n }\n switch (pathCommand) {\n case 'M':\n params.x = x;\n params.y = y;\n return segment;\n case 'A':\n args = [px1, py1].concat(values);\n // @ts-ignore\n return ['C'].concat(arcToCubic(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]));\n case 'Q':\n params.qx = x;\n params.qy = y;\n args = [px1, py1].concat(values);\n // @ts-ignore\n return ['C'].concat(quadToCubic(args[0], args[1], args[2], args[3], args[4], args[5]));\n case 'L':\n // @ts-ignore\n return ['C'].concat(lineToCubic(px1, py1, x, y));\n case 'Z':\n // prevent NaN from divide 0\n if (px1 === px && py1 === py) {\n return ['C', px1, py1, px, py, px, py];\n }\n // @ts-ignore\n return ['C'].concat(lineToCubic(px1, py1, px, py));\n default:\n }\n return segment;\n}\n//# sourceMappingURL=segment-2-cubic.js.map","import { __assign } from \"tslib\";\nimport { paramsParser } from '../parser/params-parser';\nimport { fixArc } from '../process/fix-arc';\nimport { normalizePath } from '../process/normalize-path';\nimport { isCurveArray } from '../util/is-curve-array';\nimport { segmentToCubic } from '../process/segment-2-cubic';\n// import { fixPath } from '../process/fix-path';\nexport function path2Curve(pathInput, needZCommandIndexes) {\n if (needZCommandIndexes === void 0) { needZCommandIndexes = false; }\n if (isCurveArray(pathInput)) {\n var cloned = [].concat(pathInput);\n if (needZCommandIndexes) {\n return [cloned, []];\n }\n else {\n return cloned;\n }\n }\n // fixPath will remove 'Z' command\n // const path = fixPath(normalizePath(pathInput));\n var path = normalizePath(pathInput);\n var params = __assign({}, paramsParser);\n var allPathCommands = [];\n var pathCommand = '';\n var ii = path.length;\n var segment;\n var seglen;\n var zCommandIndexes = [];\n for (var i = 0; i < ii; i += 1) {\n if (path[i])\n pathCommand = path[i][0];\n allPathCommands[i] = pathCommand;\n var curveSegment = segmentToCubic(path[i], params);\n path[i] = curveSegment;\n fixArc(path, allPathCommands, i);\n ii = path.length; // solves curveArrays ending in Z\n // keep Z command account for lineJoin\n // @see https://github.com/antvis/util/issues/68\n if (pathCommand === 'Z') {\n zCommandIndexes.push(i);\n }\n segment = path[i];\n seglen = segment.length;\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +segment[seglen - 4] || params.x1;\n params.y2 = +segment[seglen - 3] || params.y1;\n }\n // validate\n if (needZCommandIndexes) {\n return [path, zCommandIndexes];\n }\n else {\n return path;\n }\n}\n//# sourceMappingURL=path-2-curve.js.map","export function clonePath(path) {\n return path.map(function (x) { return (Array.isArray(x) ? [].concat(x) : x); });\n}\n//# sourceMappingURL=clone-path.js.map","// reverse CURVE based pathArray segments only\nexport function reverseCurve(pathArray) {\n var rotatedCurve = pathArray\n .slice(1)\n .map(function (x, i, curveOnly) {\n // @ts-ignore\n return !i ? pathArray[0].slice(1).concat(x.slice(1)) : curveOnly[i - 1].slice(-2).concat(x.slice(1));\n })\n // @ts-ignore\n .map(function (x) { return x.map(function (y, i) { return x[x.length - i - 2 * (1 - (i % 2))]; }); })\n .reverse();\n return [['M'].concat(rotatedCurve[0].slice(0, 2))].concat(rotatedCurve.map(function (x) { return ['C'].concat(x.slice(2)); }));\n}\n//# sourceMappingURL=reverse-curve.js.map","export function distanceSquareRoot(a, b) {\n return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));\n}\n//# sourceMappingURL=distance-square-root.js.map","import { midPoint } from './mid-point';\nimport { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a line (L,V,H,Z) segment.\n */\nexport function segmentLineFactory(x1, y1, x2, y2, distance) {\n var length = distanceSquareRoot([x1, y1], [x2, y2]);\n var point = { x: 0, y: 0 };\n if (typeof distance === 'number') {\n if (distance <= 0) {\n point = { x: x1, y: y1 };\n }\n else if (distance >= length) {\n point = { x: x2, y: y2 };\n }\n else {\n var _a = midPoint([x1, y1], [x2, y2], distance / length), x = _a[0], y = _a[1];\n point = { x: x, y: y };\n }\n }\n return {\n length: length,\n point: point,\n min: {\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n },\n max: {\n x: Math.max(x1, x2),\n y: Math.max(y1, y2),\n },\n };\n}\n//# sourceMappingURL=segment-line-factory.js.map","import { segmentLineFactory } from './segment-line-factory';\nimport { distanceSquareRoot } from './distance-square-root';\nfunction angleBetween(v0, v1) {\n var v0x = v0.x, v0y = v0.y;\n var v1x = v1.x, v1y = v1.y;\n var p = v0x * v1x + v0y * v1y;\n var n = Math.sqrt((Math.pow(v0x, 2) + Math.pow(v0y, 2)) * (Math.pow(v1x, 2) + Math.pow(v1y, 2)));\n var sign = v0x * v1y - v0y * v1x < 0 ? -1 : 1;\n var angle = sign * Math.acos(p / n);\n return angle;\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n * @see https://github.com/MadLittleMods/svg-curve-lib/blob/master/src/js/svg-curve-lib.js\n */\nfunction getPointAtArcSegmentLength(x1, y1, RX, RY, angle, LAF, SF, x, y, t) {\n var abs = Math.abs, sin = Math.sin, cos = Math.cos, sqrt = Math.sqrt, PI = Math.PI;\n var rx = abs(RX);\n var ry = abs(RY);\n var xRot = ((angle % 360) + 360) % 360;\n var xRotRad = xRot * (PI / 180);\n if (x1 === x && y1 === y) {\n return { x: x1, y: y1 };\n }\n if (rx === 0 || ry === 0) {\n return segmentLineFactory(x1, y1, x, y, t).point;\n }\n var dx = (x1 - x) / 2;\n var dy = (y1 - y) / 2;\n var transformedPoint = {\n x: cos(xRotRad) * dx + sin(xRotRad) * dy,\n y: -sin(xRotRad) * dx + cos(xRotRad) * dy,\n };\n var radiiCheck = Math.pow(transformedPoint.x, 2) / Math.pow(rx, 2) + Math.pow(transformedPoint.y, 2) / Math.pow(ry, 2);\n if (radiiCheck > 1) {\n rx *= sqrt(radiiCheck);\n ry *= sqrt(radiiCheck);\n }\n var cSquareNumerator = Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(transformedPoint.y, 2) - Math.pow(ry, 2) * Math.pow(transformedPoint.x, 2);\n var cSquareRootDenom = Math.pow(rx, 2) * Math.pow(transformedPoint.y, 2) + Math.pow(ry, 2) * Math.pow(transformedPoint.x, 2);\n var cRadicand = cSquareNumerator / cSquareRootDenom;\n cRadicand = cRadicand < 0 ? 0 : cRadicand;\n var cCoef = (LAF !== SF ? 1 : -1) * sqrt(cRadicand);\n var transformedCenter = {\n x: cCoef * ((rx * transformedPoint.y) / ry),\n y: cCoef * (-(ry * transformedPoint.x) / rx),\n };\n var center = {\n x: cos(xRotRad) * transformedCenter.x - sin(xRotRad) * transformedCenter.y + (x1 + x) / 2,\n y: sin(xRotRad) * transformedCenter.x + cos(xRotRad) * transformedCenter.y + (y1 + y) / 2,\n };\n var startVector = {\n x: (transformedPoint.x - transformedCenter.x) / rx,\n y: (transformedPoint.y - transformedCenter.y) / ry,\n };\n var startAngle = angleBetween({ x: 1, y: 0 }, startVector);\n var endVector = {\n x: (-transformedPoint.x - transformedCenter.x) / rx,\n y: (-transformedPoint.y - transformedCenter.y) / ry,\n };\n var sweepAngle = angleBetween(startVector, endVector);\n if (!SF && sweepAngle > 0) {\n sweepAngle -= 2 * PI;\n }\n else if (SF && sweepAngle < 0) {\n sweepAngle += 2 * PI;\n }\n sweepAngle %= 2 * PI;\n var alpha = startAngle + sweepAngle * t;\n var ellipseComponentX = rx * cos(alpha);\n var ellipseComponentY = ry * sin(alpha);\n var point = {\n x: cos(xRotRad) * ellipseComponentX - sin(xRotRad) * ellipseComponentY + center.x,\n y: sin(xRotRad) * ellipseComponentX + cos(xRotRad) * ellipseComponentY + center.y,\n };\n // to be used later\n // point.ellipticalArcStartAngle = startAngle;\n // point.ellipticalArcEndAngle = startAngle + sweepAngle;\n // point.ellipticalArcAngle = alpha;\n // point.ellipticalArcCenter = center;\n // point.resultantRx = rx;\n // point.resultantRy = ry;\n return point;\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the shape minimum and maximum {x,y} coordinates of an A (arc-to) segment.\n *\n * For better performance, it can skip calculate bbox or length in some scenario.\n */\nexport function segmentArcFactory(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 30 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = X1;\n var y = Y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n // bad perf when size > 100\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtArcSegmentLength(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: X2, y: Y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-arc-factory.js.map","import { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n */\nfunction getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t) {\n var t1 = 1 - t;\n return {\n x: Math.pow(t1, 3) * x1 + 3 * Math.pow(t1, 2) * t * c1x + 3 * t1 * Math.pow(t, 2) * c2x + Math.pow(t, 3) * x2,\n y: Math.pow(t1, 3) * y1 + 3 * Math.pow(t1, 2) * t * c1y + 3 * t1 * Math.pow(t, 2) * c2y + Math.pow(t, 3) * y2,\n };\n}\n/**\n * Returns the length of a C (cubic-bezier) segment\n * or an {x,y} point at a given length.\n */\nexport function segmentCubicFactory(x1, y1, c1x, c1y, c2x, c2y, x2, y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 10 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = x1;\n var y = y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n // bad perf when size = 300\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-cubic-factory.js.map","import { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns the {x,y} coordinates of a point at a\n * given length of a quadratic-bezier segment.\n *\n * @see https://github.com/substack/point-at-length\n */\nfunction getPointAtQuadSegmentLength(x1, y1, cx, cy, x2, y2, t) {\n var t1 = 1 - t;\n return {\n x: Math.pow(t1, 2) * x1 + 2 * t1 * t * cx + Math.pow(t, 2) * x2,\n y: Math.pow(t1, 2) * y1 + 2 * t1 * t * cy + Math.pow(t, 2) * y2,\n };\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a Q (quadratic-bezier) segment.\n */\nexport function segmentQuadFactory(x1, y1, qx, qy, x2, y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 10 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = x1;\n var y = y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtQuadSegmentLength(x1, y1, qx, qy, x2, y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n /* istanbul ignore else */\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-quad-factory.js.map","import { normalizePath } from '../process/normalize-path';\nimport { segmentLineFactory } from './segment-line-factory';\nimport { segmentArcFactory } from './segment-arc-factory';\nimport { segmentCubicFactory } from './segment-cubic-factory';\nimport { segmentQuadFactory } from './segment-quad-factory';\n/**\n * Returns a {x,y} point at a given length\n * of a shape, the shape total length and\n * the shape minimum and maximum {x,y} coordinates.\n */\nexport function pathLengthFactory(pathInput, distance, options) {\n var _a, _b, _c, _d, _e, _f;\n var path = normalizePath(pathInput);\n var distanceIsNumber = typeof distance === 'number';\n var isM;\n var data = [];\n var pathCommand;\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var seg;\n var MIN = [];\n var MAX = [];\n var length = 0;\n var min = { x: 0, y: 0 };\n var max = min;\n var point = min;\n var POINT = min;\n var LENGTH = 0;\n for (var i = 0, ll = path.length; i < ll; i += 1) {\n seg = path[i];\n pathCommand = seg[0];\n isM = pathCommand === 'M';\n data = !isM ? [x, y].concat(seg.slice(1)) : data;\n // this segment is always ZERO\n /* istanbul ignore else */\n if (isM) {\n // remember mx, my for Z\n mx = seg[1], my = seg[2];\n min = { x: mx, y: my };\n max = min;\n length = 0;\n if (distanceIsNumber && distance < 0.001) {\n POINT = min;\n }\n }\n else if (pathCommand === 'L') {\n (_a = segmentLineFactory(data[0], data[1], data[2], data[3], (distance || 0) - LENGTH), length = _a.length, min = _a.min, max = _a.max, point = _a.point);\n }\n else if (pathCommand === 'A') {\n (_b = segmentArcFactory(data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], (distance || 0) - LENGTH, options || {}), length = _b.length, min = _b.min, max = _b.max, point = _b.point);\n }\n else if (pathCommand === 'C') {\n (_c = segmentCubicFactory(data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], (distance || 0) - LENGTH, options || {}), length = _c.length, min = _c.min, max = _c.max, point = _c.point);\n }\n else if (pathCommand === 'Q') {\n (_d = segmentQuadFactory(data[0], data[1], data[2], data[3], data[4], data[5], (distance || 0) - LENGTH, options || {}), length = _d.length, min = _d.min, max = _d.max, point = _d.point);\n }\n else if (pathCommand === 'Z') {\n data = [x, y, mx, my];\n (_e = segmentLineFactory(data[0], data[1], data[2], data[3], (distance || 0) - LENGTH), length = _e.length, min = _e.min, max = _e.max, point = _e.point);\n }\n if (distanceIsNumber && LENGTH < distance && LENGTH + length >= distance) {\n POINT = point;\n }\n MAX.push(max);\n MIN.push(min);\n LENGTH += length;\n _f = pathCommand !== 'Z' ? seg.slice(-2) : [mx, my], x = _f[0], y = _f[1];\n }\n // native `getPointAtLength` behavior when the given distance\n // is higher than total length\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x, y: y };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, MIN.map(function (n) { return n.x; })),\n y: Math.min.apply(null, MIN.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, MAX.map(function (n) { return n.x; })),\n y: Math.max.apply(null, MAX.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=path-length-factory.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the bounding box of a shape.\n */\nexport function getPathBBox(path, options) {\n if (!path) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n x2: 0,\n y2: 0,\n cx: 0,\n cy: 0,\n cz: 0,\n };\n }\n var _a = pathLengthFactory(path, undefined, __assign(__assign({}, options), { length: false })), _b = _a.min, xMin = _b.x, yMin = _b.y, _c = _a.max, xMax = _c.x, yMax = _c.y;\n var width = xMax - xMin;\n var height = yMax - yMin;\n return {\n width: width,\n height: height,\n x: xMin,\n y: yMin,\n x2: xMax,\n y2: yMax,\n cx: xMin + width / 2,\n cy: yMin + height / 2,\n // an estimted guess\n cz: Math.max(width, height) + Math.min(width, height) / 2,\n };\n}\n//# sourceMappingURL=get-path-bbox.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the shape total length, or the equivalent to `shape.getTotalLength()`.\n *\n * The `normalizePath` version is lighter, faster, more efficient and more accurate\n * with paths that are not `curveArray`.\n */\nexport function getTotalLength(pathInput, options) {\n return pathLengthFactory(pathInput, undefined, __assign(__assign({}, options), { bbox: false, length: true })).length;\n}\n//# sourceMappingURL=get-total-length.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the bounding box of a shape.\n */\nexport function getPathBBoxTotalLength(path, options) {\n if (!path) {\n return {\n length: 0,\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n x2: 0,\n y2: 0,\n cx: 0,\n cy: 0,\n cz: 0,\n };\n }\n var _a = pathLengthFactory(path, undefined, __assign(__assign({}, options), { bbox: true, length: true })), length = _a.length, _b = _a.min, xMin = _b.x, yMin = _b.y, _c = _a.max, xMax = _c.x, yMax = _c.y;\n var width = xMax - xMin;\n var height = yMax - yMin;\n return {\n length: length,\n width: width,\n height: height,\n x: xMin,\n y: yMin,\n x2: xMax,\n y2: yMax,\n cx: xMin + width / 2,\n cy: yMin + height / 2,\n // an estimted guess\n cz: Math.max(width, height) + Math.min(width, height) / 2,\n };\n}\n//# sourceMappingURL=get-path-bbox-total-length.js.map","import { distanceSquareRoot } from './distance-square-root';\nfunction getRotations(a) {\n var segCount = a.length;\n var pointCount = segCount - 1;\n return a.map(function (f, idx) {\n return a.map(function (p, i) {\n var oldSegIdx = idx + i;\n var seg;\n if (i === 0 || (a[oldSegIdx] && a[oldSegIdx][0] === 'M')) {\n seg = a[oldSegIdx];\n return ['M'].concat(seg.slice(-2));\n }\n if (oldSegIdx >= segCount)\n oldSegIdx -= pointCount;\n return a[oldSegIdx];\n });\n });\n}\nexport function getRotatedCurve(a, b) {\n var segCount = a.length - 1;\n var lineLengths = [];\n var computedIndex = 0;\n var sumLensSqrd = 0;\n var rotations = getRotations(a);\n rotations.forEach(function (r, i) {\n a.slice(1).forEach(function (s, j) {\n // @ts-ignore\n sumLensSqrd += distanceSquareRoot(a[(i + j) % segCount].slice(-2), b[j % segCount].slice(-2));\n });\n lineLengths[i] = sumLensSqrd;\n sumLensSqrd = 0;\n });\n computedIndex = lineLengths.indexOf(Math.min.apply(null, lineLengths));\n return rotations[computedIndex];\n}\n//# sourceMappingURL=get-rotated-curve.js.map","import { path2Curve } from '../convert/path-2-curve';\n/**\n * Returns the area of a single cubic-bezier segment.\n *\n * http://objectmix.com/graphics/133553-area-closed-bezier-curve.html\n */\nfunction getCubicSegArea(x1, y1, c1x, c1y, c2x, c2y, x2, y2) {\n // https://stackoverflow.com/a/15845996\n return ((3 *\n ((y2 - y1) * (c1x + c2x) -\n (x2 - x1) * (c1y + c2y) +\n c1y * (x1 - c2x) -\n c1x * (y1 - c2y) +\n y2 * (c2x + x1 / 3) -\n x2 * (c2y + y1 / 3))) /\n 20);\n}\n/**\n * Returns the area of a shape.\n * @author Jürg Lehni & Jonathan Puckey\n *\n * @see https://github.com/paperjs/paper.js/blob/develop/src/path/Path.js\n */\nexport function getPathArea(path) {\n var x = 0;\n var y = 0;\n var len = 0;\n return path2Curve(path)\n .map(function (seg) {\n var _a;\n switch (seg[0]) {\n case 'M':\n x = seg[1], y = seg[2];\n return 0;\n default:\n // @ts-ignore\n var _b = seg.slice(1), c1x = _b[0], c1y = _b[1], c2x = _b[2], c2y = _b[3], x2 = _b[4], y2 = _b[5];\n len = getCubicSegArea(x, y, c1x, c1y, c2x, c2y, x2, y2);\n _a = seg.slice(-2), x = _a[0], y = _a[1];\n return len;\n }\n })\n .reduce(function (a, b) { return a + b; }, 0);\n}\n// export function getPathArea(pathArray: AbsoluteArray) {\n// let x = 0;\n// let y = 0;\n// let mx = 0;\n// let my = 0;\n// let len = 0;\n// return pathArray\n// .map((seg) => {\n// switch (seg[0]) {\n// case 'M':\n// case 'Z':\n// mx = seg[0] === 'M' ? seg[1] : mx;\n// my = seg[0] === 'M' ? seg[2] : my;\n// x = mx;\n// y = my;\n// return 0;\n// default:\n// // @ts-ignore\n// len = getCubicSegArea.apply(0, [x, y].concat(seg.slice(1)));\n// [x, y] = seg.slice(-2) as [number, number];\n// return len;\n// }\n// })\n// .reduce((a, b) => a + b, 0);\n// }\n//# sourceMappingURL=get-path-area.js.map","import { getPathArea } from './get-path-area';\nexport function getDrawDirection(pathArray) {\n return getPathArea(pathArray) >= 0;\n}\n//# sourceMappingURL=get-draw-direction.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns [x,y] coordinates of a point at a given length of a shape.\n */\nexport function getPointAtLength(pathInput, distance, options) {\n return pathLengthFactory(pathInput, distance, __assign(__assign({}, options), { bbox: false, length: true })).point;\n}\n//# sourceMappingURL=get-point-at-length.js.map","import { parsePathString } from '../parser/parse-path-string';\nimport { getTotalLength } from './get-total-length';\n/**\n * Returns the segment, its index and length as well as\n * the length to that segment at a given length in a path.\n */\nexport function getPropertiesAtLength(pathInput, distance) {\n var pathArray = parsePathString(pathInput);\n if (typeof pathArray === 'string') {\n throw TypeError(pathArray);\n }\n var pathTemp = pathArray.slice();\n var pathLength = getTotalLength(pathTemp);\n var index = pathTemp.length - 1;\n var lengthAtSegment = 0;\n var length = 0;\n var segment = pathArray[0];\n var _a = segment.slice(-2), x = _a[0], y = _a[1];\n var point = { x: x, y: y };\n // If the path is empty, return 0.\n if (index <= 0 || !distance || !Number.isFinite(distance)) {\n return {\n segment: segment,\n index: 0,\n length: length,\n point: point,\n lengthAtSegment: lengthAtSegment,\n };\n }\n if (distance >= pathLength) {\n pathTemp = pathArray.slice(0, -1);\n lengthAtSegment = getTotalLength(pathTemp);\n length = pathLength - lengthAtSegment;\n return {\n segment: pathArray[index],\n index: index,\n length: length,\n lengthAtSegment: lengthAtSegment,\n };\n }\n var segments = [];\n while (index > 0) {\n segment = pathTemp[index];\n pathTemp = pathTemp.slice(0, -1);\n lengthAtSegment = getTotalLength(pathTemp);\n length = pathLength - lengthAtSegment;\n pathLength = lengthAtSegment;\n segments.push({\n segment: segment,\n index: index,\n length: length,\n lengthAtSegment: lengthAtSegment,\n });\n index -= 1;\n }\n return segments.find(function (_a) {\n var l = _a.lengthAtSegment;\n return l <= distance;\n });\n}\n//# sourceMappingURL=get-properties-at-length.js.map","import { parsePathString } from '../parser/parse-path-string';\nimport { normalizePath } from '../process/normalize-path';\nimport { getPointAtLength } from './get-point-at-length';\nimport { getPropertiesAtLength } from './get-properties-at-length';\nimport { getTotalLength } from './get-total-length';\n/**\n * Returns the point and segment in path closest to a given point as well as\n * the distance to the path stroke.\n * @see https://bl.ocks.org/mbostock/8027637\n */\nexport function getPropertiesAtPoint(pathInput, point) {\n var path = parsePathString(pathInput);\n var normalPath = normalizePath(path);\n var pathLength = getTotalLength(path);\n var distanceTo = function (p) {\n var dx = p.x - point.x;\n var dy = p.y - point.y;\n return dx * dx + dy * dy;\n };\n var precision = 8;\n var scan;\n var scanDistance = 0;\n var closest;\n var bestLength = 0;\n var bestDistance = Infinity;\n // linear scan for coarse approximation\n for (var scanLength = 0; scanLength <= pathLength; scanLength += precision) {\n scan = getPointAtLength(normalPath, scanLength);\n scanDistance = distanceTo(scan);\n if (scanDistance < bestDistance) {\n closest = scan;\n bestLength = scanLength;\n bestDistance = scanDistance;\n }\n }\n // binary search for precise estimate\n precision /= 2;\n var before;\n var after;\n var beforeLength = 0;\n var afterLength = 0;\n var beforeDistance = 0;\n var afterDistance = 0;\n while (precision > 0.5) {\n beforeLength = bestLength - precision;\n before = getPointAtLength(normalPath, beforeLength);\n beforeDistance = distanceTo(before);\n afterLength = bestLength + precision;\n after = getPointAtLength(normalPath, afterLength);\n afterDistance = distanceTo(after);\n if (beforeLength >= 0 && beforeDistance < bestDistance) {\n closest = before;\n bestLength = beforeLength;\n bestDistance = beforeDistance;\n }\n else if (afterLength <= pathLength && afterDistance < bestDistance) {\n closest = after;\n bestLength = afterLength;\n bestDistance = afterDistance;\n }\n else {\n precision /= 2;\n }\n }\n var segment = getPropertiesAtLength(path, bestLength);\n var distance = Math.sqrt(bestDistance);\n return { closest: closest, distance: distance, segment: segment };\n}\n//# sourceMappingURL=get-properties-at-point.js.map","import { getPropertiesAtPoint } from './get-properties-at-point';\n/**\n * Checks if a given point is in the stroke of a path.\n */\nexport function isPointInStroke(pathInput, point) {\n var distance = getPropertiesAtPoint(pathInput, point).distance;\n return Math.abs(distance) < 0.001; // 0.01 might be more permissive\n}\n//# sourceMappingURL=is-point-in-stroke.js.map","import { midPoint } from './mid-point';\nimport { segmentCubicFactory } from './segment-cubic-factory';\nfunction splitCubic(pts, t) {\n if (t === void 0) { t = 0.5; }\n var p0 = pts.slice(0, 2);\n var p1 = pts.slice(2, 4);\n var p2 = pts.slice(4, 6);\n var p3 = pts.slice(6, 8);\n var p4 = midPoint(p0, p1, t);\n var p5 = midPoint(p1, p2, t);\n var p6 = midPoint(p2, p3, t);\n var p7 = midPoint(p4, p5, t);\n var p8 = midPoint(p5, p6, t);\n var p9 = midPoint(p7, p8, t);\n return [\n // @ts-ignore\n ['C'].concat(p4, p7, p9),\n // @ts-ignore\n ['C'].concat(p8, p6, p3),\n ];\n}\nfunction getCurveArray(segments) {\n return segments.map(function (segment, i, pathArray) {\n // @ts-ignore\n var segmentData = i && pathArray[i - 1].slice(-2).concat(segment.slice(1));\n // @ts-ignore\n var curveLength = i\n ? segmentCubicFactory(segmentData[0], segmentData[1], segmentData[2], segmentData[3], segmentData[4], segmentData[5], segmentData[6], segmentData[7], segmentData[8], { bbox: false }).length\n : 0;\n var subsegs;\n if (i) {\n // must be [segment,segment]\n subsegs = curveLength ? splitCubic(segmentData) : [segment, segment];\n }\n else {\n subsegs = [segment];\n }\n return {\n s: segment,\n ss: subsegs,\n l: curveLength,\n };\n });\n}\nexport function equalizeSegments(path1, path2, TL) {\n var c1 = getCurveArray(path1);\n var c2 = getCurveArray(path2);\n var L1 = c1.length;\n var L2 = c2.length;\n var l1 = c1.filter(function (x) { return x.l; }).length;\n var l2 = c2.filter(function (x) { return x.l; }).length;\n var m1 = c1.filter(function (x) { return x.l; }).reduce(function (a, _a) {\n var l = _a.l;\n return a + l;\n }, 0) / l1 || 0;\n var m2 = c2.filter(function (x) { return x.l; }).reduce(function (a, _a) {\n var l = _a.l;\n return a + l;\n }, 0) / l2 || 0;\n var tl = TL || Math.max(L1, L2);\n var mm = [m1, m2];\n var dif = [tl - L1, tl - L2];\n var canSplit = 0;\n var result = [c1, c2].map(function (x, i) {\n // @ts-ignore\n return x.l === tl\n ? x.map(function (y) { return y.s; })\n : x\n .map(function (y, j) {\n canSplit = j && dif[i] && y.l >= mm[i];\n dif[i] -= canSplit ? 1 : 0;\n return canSplit ? y.ss : [y.s];\n })\n .flat();\n });\n return result[0].length === result[1].length ? result : equalizeSegments(result[0], result[1], tl);\n}\n//# sourceMappingURL=equalize-segments.js.map","// 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526\nvar tolerance = 1e-6;\n// 三态函数,判断两个double在eps精度下的大小关系\nfunction dcmp(x) {\n if (Math.abs(x) < tolerance) {\n return 0;\n }\n return x < 0 ? -1 : 1;\n}\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) &&\n Math.min(p1[0], p2[0]) <= q[0] &&\n q[0] <= Math.max(p1[0], p2[0]) &&\n Math.min(p1[1], p2[1]) <= q[1] &&\n q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n// 判断点P在多边形内-射线法\nexport function isPointInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 &&\n dcmp(x - ((y - p1[1]) * (p1[0] - p2[0])) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n}\n//# sourceMappingURL=is-point-in-polygon.js.map","import { isPointInPolygon } from './is-point-in-polygon';\nvar isBetween = function (value, min, max) { return value >= min && value <= max; };\nfunction getLineIntersect(p0, p1, p2, p3) {\n var tolerance = 0.001;\n var E = {\n x: p2.x - p0.x,\n y: p2.y - p0.y,\n };\n var D0 = {\n x: p1.x - p0.x,\n y: p1.y - p0.y,\n };\n var D1 = {\n x: p3.x - p2.x,\n y: p3.y - p2.y,\n };\n var kross = D0.x * D1.y - D0.y * D1.x;\n var sqrKross = kross * kross;\n var sqrLen0 = D0.x * D0.x + D0.y * D0.y;\n var sqrLen1 = D1.x * D1.x + D1.y * D1.y;\n var point = null;\n if (sqrKross > tolerance * sqrLen0 * sqrLen1) {\n var s = (E.x * D1.y - E.y * D1.x) / kross;\n var t = (E.x * D0.y - E.y * D0.x) / kross;\n if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) {\n point = {\n x: p0.x + s * D0.x,\n y: p0.y + s * D0.y,\n };\n }\n }\n return point;\n}\nfunction parseToLines(points) {\n var lines = [];\n var count = points.length;\n for (var i = 0; i < count - 1; i++) {\n var point = points[i];\n var next = points[i + 1];\n lines.push({\n from: {\n x: point[0],\n y: point[1],\n },\n to: {\n x: next[0],\n y: next[1],\n },\n });\n }\n if (lines.length > 1) {\n var first = points[0];\n var last = points[count - 1];\n lines.push({\n from: {\n x: last[0],\n y: last[1],\n },\n to: {\n x: first[0],\n y: first[1],\n },\n });\n }\n return lines;\n}\nfunction lineIntersectPolygon(lines, line) {\n var isIntersect = false;\n lines.forEach(function (l) {\n if (getLineIntersect(l.from, l.to, line.from, line.to)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n}\nfunction getBBox(points) {\n var xArr = points.map(function (p) { return p[0]; });\n var yArr = points.map(function (p) { return p[1]; });\n return {\n minX: Math.min.apply(null, xArr),\n maxX: Math.max.apply(null, xArr),\n minY: Math.min.apply(null, yArr),\n maxY: Math.max.apply(null, yArr),\n };\n}\nfunction intersectBBox(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n}\n/**\n * @see https://stackoverflow.com/questions/753140/how-do-i-determine-if-two-convex-polygons-intersect\n */\nexport function isPolygonsIntersect(points1, points2) {\n // 空数组,或者一个点返回 false\n if (points1.length < 2 || points2.length < 2) {\n return false;\n }\n var bbox1 = getBBox(points1);\n var bbox2 = getBBox(points2);\n // 判定包围盒是否相交,比判定点是否在多边形内要快的多,可以筛选掉大多数情况\n if (!intersectBBox(bbox1, bbox2)) {\n return false;\n }\n var isIn = false;\n // 判定点是否在多边形内部,一旦有一个点在另一个多边形内,则返回\n points2.forEach(function (point) {\n if (isPointInPolygon(points1, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n // 两个多边形都需要判定\n points1.forEach(function (point) {\n if (isPointInPolygon(points2, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n var lines1 = parseToLines(points1);\n var lines2 = parseToLines(points2);\n var isIntersect = false;\n lines2.forEach(function (line) {\n if (lineIntersectPolygon(lines1, line)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n}\n//# sourceMappingURL=is-polygons-intersect.js.map","/**\n * Create DOM from a html string.\n * @param str\n * @returns\n */\nexport function createDOM(str) {\n var container = document.createElement('div');\n container.innerHTML = str;\n var dom = container.childNodes[0];\n if (dom && container.contains(dom)) {\n container.removeChild(dom);\n }\n return dom;\n}\n//# sourceMappingURL=create-dom.js.map","/**\n * Modify the CSS of a DOM.\n * @param dom\n * @param css\n * @returns\n */\nexport function modifyCSS(dom, css) {\n if (!dom)\n return;\n Object.keys(css).forEach(function (key) {\n dom.style[key] = css[key];\n });\n return dom;\n}\n//# sourceMappingURL=modify-css.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@antv/util\");\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nvar initOrder = function (g) {\n var visited = {};\n var simpleNodes = g.nodes().filter(function (v) {\n var _a;\n return !((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length);\n });\n var nodeRanks = simpleNodes.map(function (v) { return g.node(v).rank; });\n var maxRank = (0, util_1.max)(nodeRanks);\n var layers = [];\n for (var i = 0; i < maxRank + 1; i++) {\n layers.push([]);\n }\n var dfs = function (v) {\n var _a;\n if (visited.hasOwnProperty(v))\n return;\n visited[v] = true;\n var node = g.node(v);\n if (!isNaN(node.rank)) {\n layers[node.rank].push(v);\n }\n (_a = g.successors(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { return dfs(child); });\n };\n var orderedVs = simpleNodes.sort(function (a, b) { return g.node(a).rank - g.node(b).rank; });\n // const orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v)!.rank; });\n // 有fixOrder的,直接排序好放进去\n var beforeSort = orderedVs.filter(function (n) {\n return g.node(n).fixorder !== undefined;\n });\n var fixOrderNodes = beforeSort.sort(function (a, b) { return g.node(a).fixorder - g.node(b).fixorder; });\n fixOrderNodes === null || fixOrderNodes === void 0 ? void 0 : fixOrderNodes.forEach(function (n) {\n if (!isNaN(g.node(n).rank)) {\n layers[g.node(n).rank].push(n);\n }\n visited[n] = true;\n });\n orderedVs === null || orderedVs === void 0 ? void 0 : orderedVs.forEach(dfs);\n return layers;\n};\nexports.default = initOrder;\n//# sourceMappingURL=init-order.js.map","\"use strict\";\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar twoLayerCrossCount = function (g, northLayer, southLayer) {\n // Sort all of the edges between the north and south layers by their position\n // in the north layer and then the south. Map these edges to the position of\n // their head in the south layer.\n var southPos = (0, util_1.zipObject)(southLayer, southLayer.map(function (v, i) { return i; }));\n var unflat = northLayer.map(function (v) {\n var _a;\n var unsort = (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.map(function (e) {\n return { pos: southPos[e.w] || 0, weight: g.edge(e).weight };\n });\n return unsort === null || unsort === void 0 ? void 0 : unsort.sort(function (a, b) { return a.pos - b.pos; });\n });\n var southEntries = unflat.flat().filter(function (entry) { return entry !== undefined; });\n // Build the accumulator tree\n var firstIndex = 1;\n while (firstIndex < southLayer.length)\n firstIndex <<= 1;\n var treeSize = 2 * firstIndex - 1;\n firstIndex -= 1;\n var tree = Array(treeSize).fill(0, 0, treeSize);\n // Calculate the weighted crossings\n var cc = 0;\n southEntries === null || southEntries === void 0 ? void 0 : southEntries.forEach(function (entry) {\n if (entry) {\n var index = entry.pos + firstIndex;\n tree[index] += entry.weight;\n var weightSum = 0;\n while (index > 0) {\n if (index % 2) {\n weightSum += tree[index + 1];\n }\n index = (index - 1) >> 1;\n tree[index] += entry.weight;\n }\n cc += entry.weight * weightSum;\n }\n });\n return cc;\n};\nvar crossCount = function (g, layering) {\n var cc = 0;\n for (var i = 1; i < (layering === null || layering === void 0 ? void 0 : layering.length); i += 1) {\n cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);\n }\n return cc;\n};\nexports.default = crossCount;\n//# sourceMappingURL=cross-count.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graph_1 = require(\"../../graph\");\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */\nvar buildLayerGraph = function (g, rank, relationship) {\n var root = createRootNode(g);\n var result = new graph_1.Graph({ compound: true })\n .setGraph({ root: root })\n .setDefaultNodeLabel(function (v) {\n return g.node(v);\n });\n g.nodes().forEach(function (v) {\n var _a;\n var node = g.node(v);\n var parent = g.parent(v);\n if (node.rank === rank ||\n (node.minRank <= rank && rank <= node.maxRank)) {\n result.setNode(v);\n result.setParent(v, parent || root);\n // This assumes we have only short edges!\n (_a = g[relationship](v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var u = e.v === v ? e.w : e.v;\n var edge = result.edgeFromArgs(u, v);\n var weight = edge !== undefined ? edge.weight : 0;\n result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n });\n if (node.hasOwnProperty(\"minRank\")) {\n result.setNode(v, {\n borderLeft: node.borderLeft[rank],\n borderRight: node.borderRight[rank],\n });\n }\n }\n });\n return result;\n};\nvar createRootNode = function (g) {\n var v;\n while (g.hasNode((v = \"_root\".concat(Math.random()))))\n ;\n return v;\n};\nexports.default = buildLayerGraph;\n//# sourceMappingURL=build-layer-graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar addSubgraphConstraints = function (g, cg, vs) {\n var prev = {};\n var rootPrev;\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var child = g.parent(v);\n var parent;\n var prevChild;\n while (child) {\n parent = g.parent(child);\n if (parent) {\n prevChild = prev[parent];\n prev[parent] = child;\n }\n else {\n prevChild = rootPrev;\n rootPrev = child;\n }\n if (prevChild && prevChild !== child) {\n cg.setEdge(prevChild, child);\n return;\n }\n child = parent;\n }\n });\n};\nexports.default = addSubgraphConstraints;\n//# sourceMappingURL=add-subgraph-constraints.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar barycenter = function (g, movable) {\n return movable.map(function (v) {\n var inV = g.inEdges(v);\n if (!(inV === null || inV === void 0 ? void 0 : inV.length)) {\n return { v: v };\n }\n {\n var result_1 = { sum: 0, weight: 0 };\n inV === null || inV === void 0 ? void 0 : inV.forEach(function (e) {\n var edge = g.edge(e);\n var nodeU = g.node(e.v);\n result_1.sum += (edge.weight * nodeU.order);\n result_1.weight += edge.weight;\n });\n return {\n v: v,\n barycenter: result_1.sum / result_1.weight,\n weight: result_1.weight\n };\n }\n });\n};\nexports.default = barycenter;\n//# sourceMappingURL=barycenter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar resolveConflicts = function (entries, cg) {\n var _a, _b, _c;\n var mappedEntries = {};\n entries === null || entries === void 0 ? void 0 : entries.forEach(function (entry, i) {\n mappedEntries[entry.v] = {\n i: i,\n indegree: 0,\n in: [],\n out: [],\n vs: [entry.v],\n };\n var tmp = mappedEntries[entry.v];\n if (entry.barycenter !== undefined) {\n tmp.barycenter = entry.barycenter;\n tmp.weight = entry.weight;\n }\n });\n (_a = cg.edges()) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var entryV = mappedEntries[e.v];\n var entryW = mappedEntries[e.w];\n if (entryV !== undefined && entryW !== undefined) {\n entryW.indegree++;\n entryV.out.push(mappedEntries[e.w]);\n }\n });\n var sourceSet = (_c = (_b = Object.values(mappedEntries)).filter) === null || _c === void 0 ? void 0 : _c.call(_b, function (entry) { return !entry.indegree; });\n return doResolveConflicts(sourceSet);\n};\nvar doResolveConflicts = function (sourceSet) {\n var _a, _b;\n var entries = [];\n var handleIn = function (vEntry) {\n return function (uEntry) {\n if (uEntry.merged)\n return;\n if (uEntry.barycenter === undefined ||\n vEntry.barycenter === undefined ||\n uEntry.barycenter >= vEntry.barycenter) {\n mergeEntries(vEntry, uEntry);\n }\n };\n };\n var handleOut = function (vEntry) {\n return function (wEntry) {\n wEntry[\"in\"].push(vEntry);\n if (--wEntry.indegree === 0) {\n sourceSet.push(wEntry);\n }\n };\n };\n var _loop_1 = function () {\n var entry = sourceSet.pop();\n entries.push(entry);\n (_a = entry[\"in\"].reverse()) === null || _a === void 0 ? void 0 : _a.forEach(function (e) { return handleIn(entry)(e); });\n (_b = entry.out) === null || _b === void 0 ? void 0 : _b.forEach(function (e) { return handleOut(entry)(e); });\n };\n while (sourceSet === null || sourceSet === void 0 ? void 0 : sourceSet.length) {\n _loop_1();\n }\n var filtered = entries.filter(function (entry) { return !entry.merged; });\n var keys = [\n \"vs\",\n \"i\",\n \"barycenter\",\n \"weight\",\n ];\n return filtered.map(function (entry) {\n var picked = {};\n keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {\n if (entry[key] === undefined)\n return;\n picked[key] = entry[key];\n });\n return picked;\n });\n};\nvar mergeEntries = function (target, source) {\n var _a;\n var sum = 0;\n var weight = 0;\n if (target.weight) {\n sum += target.barycenter * target.weight;\n weight += target.weight;\n }\n if (source.weight) {\n sum += source.barycenter * source.weight;\n weight += source.weight;\n }\n target.vs = (_a = source.vs) === null || _a === void 0 ? void 0 : _a.concat(target.vs);\n target.barycenter = sum / weight;\n target.weight = weight;\n target.i = Math.min(source.i, target.i);\n source.merged = true;\n};\nexports.default = resolveConflicts;\n//# sourceMappingURL=resolve-conflicts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar sort = function (entries, biasRight, usePrev, keepNodeOrder) {\n var parts = (0, util_1.partition)(entries, function (entry) {\n var hasFixOrder = entry.hasOwnProperty(\"fixorder\") && !isNaN(entry.fixorder);\n if (keepNodeOrder)\n return !hasFixOrder && entry.hasOwnProperty(\"barycenter\");\n // NOTE: 有fixorder的也可以排\n return hasFixOrder || entry.hasOwnProperty(\"barycenter\");\n });\n var sortable = parts.lhs;\n var unsortable = parts.rhs.sort(function (a, b) { return -a.i - (-b.i); });\n var vs = [];\n var sum = 0;\n var weight = 0;\n var vsIndex = 0;\n sortable === null || sortable === void 0 ? void 0 : sortable.sort(compareWithBias(!!biasRight, !!usePrev));\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n sortable === null || sortable === void 0 ? void 0 : sortable.forEach(function (entry) {\n var _a;\n vsIndex += (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.length;\n vs.push(entry.vs);\n sum += entry.barycenter * entry.weight;\n weight += entry.weight;\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n });\n var result = { vs: vs.flat() };\n if (weight) {\n result.barycenter = sum / weight;\n result.weight = weight;\n }\n return result;\n};\nvar consumeUnsortable = function (vs, unsortable, index) {\n var iindex = index;\n var last;\n while (unsortable.length && (last = unsortable[unsortable.length - 1]).i <= iindex) {\n unsortable.pop();\n vs === null || vs === void 0 ? void 0 : vs.push(last.vs);\n iindex++;\n }\n return iindex;\n};\n/**\n * 配置是否考虑使用之前的布局结果\n */\nvar compareWithBias = function (bias, usePrev) {\n return function (entryV, entryW) {\n // 排序的时候先判断fixorder,不行再判断重心\n if (entryV.fixorder !== undefined && entryW.fixorder !== undefined) {\n return entryV.fixorder - entryW.fixorder;\n }\n if (entryV.barycenter < entryW.barycenter) {\n return -1;\n }\n if (entryV.barycenter > entryW.barycenter) {\n return 1;\n }\n // 重心相同,考虑之前排好的顺序\n if (usePrev && entryV.order !== undefined && entryW.order !== undefined) {\n if (entryV.order < entryW.order) {\n return -1;\n }\n if (entryV.order > entryW.order) {\n return 1;\n }\n }\n return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n };\n};\nexports.default = sort;\n//# sourceMappingURL=sort.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar barycenter_1 = __importDefault(require(\"./barycenter\"));\nvar resolve_conflicts_1 = __importDefault(require(\"./resolve-conflicts\"));\nvar sort_1 = __importDefault(require(\"./sort\"));\nvar sortSubgraph = function (g, v, cg, biasRight, usePrev, keepNodeOrder) {\n var _a, _b, _c, _d;\n var movable = g.children(v);\n // fixorder的点不参与排序(这个方案不合适,只排了新增节点,和原来的分离)\n var node = g.node(v);\n var bl = node ? node.borderLeft : undefined;\n var br = node ? node.borderRight : undefined;\n var subgraphs = {};\n if (bl) {\n movable = movable === null || movable === void 0 ? void 0 : movable.filter(function (w) {\n return w !== bl && w !== br;\n });\n }\n var barycenters = (0, barycenter_1.default)(g, movable || []);\n barycenters === null || barycenters === void 0 ? void 0 : barycenters.forEach(function (entry) {\n var _a;\n if ((_a = g.children(entry.v)) === null || _a === void 0 ? void 0 : _a.length) {\n var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight, keepNodeOrder);\n subgraphs[entry.v] = subgraphResult;\n if (subgraphResult.hasOwnProperty(\"barycenter\")) {\n mergeBarycenters(entry, subgraphResult);\n }\n }\n });\n var entries = (0, resolve_conflicts_1.default)(barycenters, cg);\n expandSubgraphs(entries, subgraphs);\n // 添加fixorder信息到entries里边\n // TODO: 不考虑复合情况,只用第一个点的fixorder信息,后续考虑更完备的实现\n (_a = entries\n .filter(function (e) { return e.vs.length > 0; })) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var node = g.node(e.vs[0]);\n if (node) {\n e.fixorder = node.fixorder;\n e.order = node.order;\n }\n });\n var result = (0, sort_1.default)(entries, biasRight, usePrev, keepNodeOrder);\n if (bl) {\n result.vs = [bl, result.vs, br].flat();\n if ((_b = g.predecessors(bl)) === null || _b === void 0 ? void 0 : _b.length) {\n var blPred = g.node(((_c = g.predecessors(bl)) === null || _c === void 0 ? void 0 : _c[0]) || \"\");\n var brPred = g.node(((_d = g.predecessors(br)) === null || _d === void 0 ? void 0 : _d[0]) || \"\");\n if (!result.hasOwnProperty(\"barycenter\")) {\n result.barycenter = 0;\n result.weight = 0;\n }\n result.barycenter =\n (result.barycenter * result.weight +\n blPred.order +\n brPred.order) /\n (result.weight + 2);\n result.weight += 2;\n }\n }\n return result;\n};\nvar expandSubgraphs = function (entries, subgraphs) {\n entries === null || entries === void 0 ? void 0 : entries.forEach(function (entry) {\n var _a;\n var vss = (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.map(function (v) {\n if (subgraphs[v]) {\n return subgraphs[v].vs;\n }\n return v;\n });\n entry.vs = vss.flat();\n });\n};\nvar mergeBarycenters = function (target, other) {\n if (target.barycenter !== undefined) {\n target.barycenter =\n (target.barycenter * target.weight + other.barycenter * other.weight) /\n (target.weight + other.weight);\n target.weight += other.weight;\n }\n else {\n target.barycenter = other.barycenter;\n target.weight = other.weight;\n }\n};\nexports.default = sortSubgraph;\n//# sourceMappingURL=sort-subgraph.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar init_order_1 = __importDefault(require(\"./init-order\"));\nvar cross_count_1 = __importDefault(require(\"./cross-count\"));\nvar build_layer_graph_1 = __importDefault(require(\"./build-layer-graph\"));\nvar add_subgraph_constraints_1 = __importDefault(require(\"./add-subgraph-constraints\"));\nvar sort_subgraph_1 = __importDefault(require(\"./sort-subgraph\"));\nvar util_1 = require(\"../../../../util\");\nvar graph_1 = require(\"../../graph\");\nvar util_2 = require(\"../util\");\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */\nvar order = function (g, keepNodeOrder) {\n var mxRank = (0, util_2.maxRank)(g);\n var range1 = [];\n var range2 = [];\n for (var i = 1; i < mxRank + 1; i++)\n range1.push(i);\n for (var i = mxRank - 1; i > -1; i--)\n range2.push(i);\n var downLayerGraphs = buildLayerGraphs(g, range1, \"inEdges\");\n var upLayerGraphs = buildLayerGraphs(g, range2, \"outEdges\");\n var layering = (0, init_order_1.default)(g);\n assignOrder(g, layering);\n var bestCC = Number.POSITIVE_INFINITY;\n var best;\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2, false, keepNodeOrder);\n layering = (0, util_2.buildLayerMatrix)(g);\n var cc = (0, cross_count_1.default)(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = (0, util_1.clone)(layering);\n bestCC = cc;\n }\n }\n // consider use previous result, maybe somewhat reduendant\n layering = (0, init_order_1.default)(g);\n assignOrder(g, layering);\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2, true, keepNodeOrder);\n layering = (0, util_2.buildLayerMatrix)(g);\n var cc = (0, cross_count_1.default)(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = (0, util_1.clone)(layering);\n bestCC = cc;\n }\n }\n assignOrder(g, best);\n};\nvar buildLayerGraphs = function (g, ranks, relationship) {\n return ranks.map(function (rank) {\n return (0, build_layer_graph_1.default)(g, rank, relationship);\n });\n};\nvar sweepLayerGraphs = function (layerGraphs, biasRight, usePrev, keepNodeOrder) {\n var cg = new graph_1.Graph();\n layerGraphs === null || layerGraphs === void 0 ? void 0 : layerGraphs.forEach(function (lg) {\n var _a;\n var root = lg.graph().root;\n var sorted = (0, sort_subgraph_1.default)(lg, root, cg, biasRight, usePrev, keepNodeOrder);\n for (var i = 0; i < ((_a = sorted.vs) === null || _a === void 0 ? void 0 : _a.length) || 0; i++) {\n var lnode = lg.node(sorted.vs[i]);\n if (lnode) {\n lnode.order = i;\n }\n }\n (0, add_subgraph_constraints_1.default)(lg, cg, sorted.vs);\n });\n};\nvar assignOrder = function (g, layering) {\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n g.node(v).order = i;\n });\n });\n};\nexports.default = order;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.width = exports.sep = exports.positionX = exports.balance = exports.alignCoordinates = exports.findSmallestWidthAlignment = exports.buildBlockGraph = exports.horizontalCompaction = exports.verticalAlignment = exports.hasConflict = exports.addConflict = exports.findOtherInnerSegmentNode = exports.findType2Conflicts = exports.findType1Conflicts = void 0;\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar util_1 = require(\"@antv/util\");\nvar util_2 = require(\"../util\");\nvar BlockGraph = /** @class */ (function (_super) {\n __extends(BlockGraph, _super);\n function BlockGraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return BlockGraph;\n}(graphlib_1.Graph));\nvar findType1Conflicts = function (g, layering) {\n var conflicts = {};\n var visitLayer = function (prevLayer, layer) {\n // last visited node in the previous layer that is incident on an inner\n // segment.\n var k0 = 0;\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n var scanPos = 0;\n var prevLayerLength = prevLayer.length;\n var lastNode = layer === null || layer === void 0 ? void 0 : layer[(layer === null || layer === void 0 ? void 0 : layer.length) - 1];\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n var _a;\n var w = (0, exports.findOtherInnerSegmentNode)(g, v);\n var k1 = w ? g.node(w).order : prevLayerLength;\n if (w || v === lastNode) {\n (_a = layer.slice(scanPos, i + 1)) === null || _a === void 0 ? void 0 : _a.forEach(function (scanNode) {\n var _a;\n (_a = g.predecessors(scanNode)) === null || _a === void 0 ? void 0 : _a.forEach(function (u) {\n var _a;\n var uLabel = g.node(u);\n var uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) &&\n !(uLabel.dummy && ((_a = g.node(scanNode)) === null || _a === void 0 ? void 0 : _a.dummy))) {\n (0, exports.addConflict)(conflicts, u, scanNode);\n }\n });\n });\n scanPos = i + 1;\n k0 = k1;\n }\n });\n return layer;\n };\n if (layering === null || layering === void 0 ? void 0 : layering.length) {\n layering.reduce(visitLayer);\n }\n return conflicts;\n};\nexports.findType1Conflicts = findType1Conflicts;\nvar findType2Conflicts = function (g, layering) {\n var conflicts = {};\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var _a, _b;\n var v;\n for (var i = southPos; i < southEnd; i++) {\n v = south[i];\n if ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) {\n (_b = g.predecessors(v)) === null || _b === void 0 ? void 0 : _b.forEach(function (u) {\n var uNode = g.node(u);\n if (uNode.dummy &&\n (uNode.order < prevNorthBorder ||\n uNode.order > nextNorthBorder)) {\n (0, exports.addConflict)(conflicts, u, v);\n }\n });\n }\n }\n }\n ;\n function getScannedKey(params) {\n // south数组可能很大,不适合做key\n return JSON.stringify(params.slice(1));\n }\n function scanIfNeeded(params, scanCache) {\n var cacheKey = getScannedKey(params);\n if (scanCache.get(cacheKey))\n return;\n scan.apply(void 0, params);\n scanCache.set(cacheKey, true);\n }\n var visitLayer = function (north, south) {\n var prevNorthPos = -1;\n var nextNorthPos;\n var southPos = 0;\n var scanned = new Map();\n south === null || south === void 0 ? void 0 : south.forEach(function (v, southLookahead) {\n var _a;\n if (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) === \"border\") {\n var predecessors = g.predecessors(v) || [];\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scanIfNeeded([south, southPos, southLookahead, prevNorthPos, nextNorthPos], scanned);\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scanIfNeeded([south, southPos, south.length, nextNorthPos, north.length], scanned);\n });\n return south;\n };\n if (layering === null || layering === void 0 ? void 0 : layering.length) {\n layering.reduce(visitLayer);\n }\n return conflicts;\n};\nexports.findType2Conflicts = findType2Conflicts;\nvar findOtherInnerSegmentNode = function (g, v) {\n var _a, _b;\n if ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) {\n return (_b = g.predecessors(v)) === null || _b === void 0 ? void 0 : _b.find(function (u) { return g.node(u).dummy; });\n }\n};\nexports.findOtherInnerSegmentNode = findOtherInnerSegmentNode;\nvar addConflict = function (conflicts, v, w) {\n var vv = v;\n var ww = w;\n if (vv > ww) {\n var tmp = vv;\n vv = ww;\n ww = tmp;\n }\n var conflictsV = conflicts[vv];\n if (!conflictsV) {\n conflicts[vv] = conflictsV = {};\n }\n conflictsV[ww] = true;\n};\nexports.addConflict = addConflict;\nvar hasConflict = function (conflicts, v, w) {\n var vv = v;\n var ww = w;\n if (vv > ww) {\n var tmp = v;\n vv = ww;\n ww = tmp;\n }\n return !!conflicts[vv];\n};\nexports.hasConflict = hasConflict;\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nvar verticalAlignment = function (g, layering, conflicts, neighborFn) {\n var root = {};\n var align = {};\n var pos = {};\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var prevIdx = -1;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = ws.sort(function (a, b) { return pos[a] - pos[b]; });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v &&\n prevIdx < pos[w] &&\n !(0, exports.hasConflict)(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n return { root: root, align: align };\n};\nexports.verticalAlignment = verticalAlignment;\nvar horizontalCompaction = function (g, layering, root, align, reverseSep) {\n var _a;\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {};\n var blockG = (0, exports.buildBlockGraph)(g, layering, root, reverseSep);\n var borderType = reverseSep ? \"borderLeft\" : \"borderRight\";\n var iterate = function (setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n }\n else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n elem = stack.pop();\n }\n };\n // First pass, assign smallest coordinates\n var pass1 = function (elem) {\n xs[elem] = (blockG.inEdges(elem) || []).reduce(function (acc, e) {\n return Math.max(acc, (xs[e.v] || 0) + blockG.edge(e));\n }, 0);\n };\n // Second pass, assign greatest coordinates\n var pass2 = function (elem) {\n var min = (blockG.outEdges(elem) || []).reduce(function (acc, e) {\n return Math.min(acc, (xs[e.w] || 0) - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n };\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n // Assign x coordinates to all nodes\n (_a = Object.values(align)) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n xs[v] = xs[root[v]];\n });\n return xs;\n};\nexports.horizontalCompaction = horizontalCompaction;\nvar buildBlockGraph = function (g, layering, root, reverseSep) {\n var blockGraph = new BlockGraph();\n var graphLabel = g.graph();\n var sepFn = (0, exports.sep)(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var u;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u];\n var prevMax = blockGraph.edgeFromArgs(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n return blockGraph;\n};\nexports.buildBlockGraph = buildBlockGraph;\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nvar findSmallestWidthAlignment = function (g, xss) {\n return (0, util_2.minBy)(Object.values(xss), function (xs) {\n var _a;\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n (_a = Object.keys(xs)) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n var x = xs[v];\n var halfWidth = (0, exports.width)(g, v) / 2;\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n return max - min;\n });\n};\nexports.findSmallestWidthAlignment = findSmallestWidthAlignment;\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = Object.values(alignTo);\n var alignToMin = (0, util_1.min)(alignToVals);\n var alignToMax = (0, util_1.max)(alignToVals);\n [\"u\", \"d\"].forEach(function (vert) {\n [\"l\", \"r\"].forEach(function (horiz) {\n var alignment = vert + horiz;\n var xs = xss[alignment];\n var delta;\n if (xs === alignTo)\n return;\n var xsVals = Object.values(xs);\n delta =\n horiz === \"l\"\n ? alignToMin - (0, util_1.min)(xsVals)\n : alignToMax - (0, util_1.max)(xsVals);\n if (delta) {\n xss[alignment] = {};\n Object.keys(xs).forEach(function (key) {\n xss[alignment][key] = xs[key] + delta;\n });\n }\n });\n });\n}\nexports.alignCoordinates = alignCoordinates;\nvar balance = function (xss, align) {\n var result = {};\n Object.keys(xss.ul).forEach(function (key) {\n if (align) {\n result[key] = xss[align.toLowerCase()][key];\n }\n else {\n var values = Object.values(xss).map(function (x) { return x[key]; });\n result[key] = (values[0] + values[1]) / 2; // (ur + ul) / 2\n }\n });\n return result;\n};\nexports.balance = balance;\nvar positionX = function (g) {\n var layering = (0, util_2.buildLayerMatrix)(g);\n var conflicts = Object.assign((0, exports.findType1Conflicts)(g, layering), (0, exports.findType2Conflicts)(g, layering));\n var xss = {};\n var adjustedLayering;\n [\"u\", \"d\"].forEach(function (vert) {\n adjustedLayering =\n vert === \"u\" ? layering : Object.values(layering).reverse();\n [\"l\", \"r\"].forEach(function (horiz) {\n if (horiz === \"r\") {\n adjustedLayering = adjustedLayering.map(function (inner) {\n return Object.values(inner).reverse();\n });\n }\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = (0, exports.verticalAlignment)(g, adjustedLayering, conflicts, neighborFn);\n var xs = (0, exports.horizontalCompaction)(g, adjustedLayering, align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n Object.keys(xs).forEach(function (key) {\n xs[key] = -xs[key];\n });\n }\n xss[vert + horiz] = xs;\n });\n });\n var smallestWidth = (0, exports.findSmallestWidthAlignment)(g, xss);\n alignCoordinates(xss, smallestWidth);\n return (0, exports.balance)(xss, g.graph().align);\n};\nexports.positionX = positionX;\nvar sep = function (nodeSep, edgeSep, reverseSep) {\n return function (g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n sum += vLabel.width / 2;\n if (vLabel.hasOwnProperty(\"labelpos\")) {\n switch ((vLabel.labelpos || \"\").toLowerCase()) {\n case \"l\":\n delta = -vLabel.width / 2;\n break;\n case \"r\":\n delta = vLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += wLabel.width / 2;\n if (wLabel.labelpos) {\n switch ((wLabel.labelpos || \"\").toLowerCase()) {\n case \"l\":\n delta = wLabel.width / 2;\n break;\n case \"r\":\n delta = -wLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n return sum;\n };\n};\nexports.sep = sep;\nvar width = function (g, v) { return g.node(v).width || 0; };\nexports.width = width;\n//# sourceMappingURL=bk.js.map","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar bk_1 = require(\"./bk\");\nvar positionY = function (g) {\n var layering = (0, util_1.buildLayerMatrix)(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var heights = layer.map(function (v) { return g.node(v).height; });\n var maxHeight = Math.max.apply(Math, __spreadArray(__spreadArray([], heights, false), [0], false));\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n};\nvar positionX = function (g) {\n var layering = (0, util_1.buildLayerMatrix)(g);\n var conflicts = Object.assign((0, bk_1.findType1Conflicts)(g, layering), (0, bk_1.findType2Conflicts)(g, layering));\n var xss = {};\n var adjustedLayering = [];\n [\"u\", \"d\"].forEach(function (vert) {\n adjustedLayering =\n vert === \"u\" ? layering : Object.values(layering).reverse();\n [\"l\", \"r\"].forEach(function (horiz) {\n if (horiz === \"r\") {\n adjustedLayering = adjustedLayering.map(function (inner) {\n return Object.values(inner).reverse();\n });\n }\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = (0, bk_1.verticalAlignment)(g, adjustedLayering, conflicts, neighborFn);\n var xs = (0, bk_1.horizontalCompaction)(g, adjustedLayering, align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n Object.keys(xs).forEach(function (xsKey) { return (xs[xsKey] = -xs[xsKey]); });\n }\n xss[vert + horiz] = xs;\n });\n });\n var smallestWidth = (0, bk_1.findSmallestWidthAlignment)(g, xss);\n smallestWidth && (0, bk_1.alignCoordinates)(xss, smallestWidth);\n return (0, bk_1.balance)(xss, g.graph().align);\n};\nvar position = function (g) {\n var _a;\n var ng = (0, util_1.asNonCompoundGraph)(g);\n positionY(ng);\n var xs = positionX(ng);\n (_a = Object.keys(xs)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n ng.node(key).x = xs[key];\n });\n};\nexports.default = position;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * 按照数据中的结果设置fixorder\n */\nvar initDataOrder = function (g, nodeOrder) {\n var simpleNodes = g.nodes().filter(function (v) {\n var _a;\n return !((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length);\n });\n var ranks = simpleNodes.map(function (v) { return g.node(v).rank; });\n var maxRank = Math.max.apply(Math, ranks);\n var layers = [];\n for (var i = 0; i < maxRank + 1; i++) {\n layers[i] = [];\n }\n nodeOrder === null || nodeOrder === void 0 ? void 0 : nodeOrder.forEach(function (n) {\n var node = g.node(n);\n // 只考虑原有节点,dummy节点需要按照后续算法排出\n if (!node || (node === null || node === void 0 ? void 0 : node.dummy)) {\n return;\n }\n if (!isNaN(node.rank)) {\n node.fixorder = layers[node.rank].length; // 设置fixorder为当层的顺序\n layers[node.rank].push(n);\n }\n });\n};\nexports.default = initDataOrder;\n//# sourceMappingURL=init-data-order.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar acyclic_1 = __importDefault(require(\"./acyclic\"));\nvar normalize_1 = __importDefault(require(\"./normalize\"));\nvar rank_1 = __importDefault(require(\"./rank\"));\nvar util_1 = require(\"./util\");\nvar parent_dummy_chains_1 = __importDefault(require(\"./parent-dummy-chains\"));\nvar nesting_graph_1 = __importDefault(require(\"./nesting-graph\"));\nvar add_border_segments_1 = __importDefault(require(\"./add-border-segments\"));\nvar coordinate_system_1 = __importDefault(require(\"./coordinate-system\"));\nvar order_1 = __importDefault(require(\"./order\"));\nvar position_1 = __importDefault(require(\"./position\"));\nvar init_data_order_1 = __importDefault(require(\"./order/init-data-order\"));\nvar graph_1 = require(\"../graph\");\nvar layout = function (g, opts) {\n var time = opts && opts.debugTiming ? util_1.time : util_1.notime;\n time(\"layout\", function () {\n // 如果在原图基础上修改,继承原图的order结果\n if (opts && !opts.keepNodeOrder && opts.prevGraph) {\n time(\" inheritOrder\", function () {\n inheritOrder(g, opts.prevGraph);\n });\n }\n var layoutGraph = time(\" buildLayoutGraph\", function () {\n return buildLayoutGraph(g);\n });\n // 控制是否为边的label留位置(这会影响是否在边中间添加dummy node)\n if (!(opts && opts.edgeLabelSpace === false)) {\n time(\" makeSpaceForEdgeLabels\", function () {\n makeSpaceForEdgeLabels(layoutGraph);\n });\n }\n // TODO: 暂时处理层级设置不正确时的异常报错,提示设置正确的层级\n try {\n time(\" runLayout\", function () {\n runLayout(layoutGraph, time, opts);\n });\n }\n catch (e) {\n if (e.message ===\n \"Not possible to find intersection inside of the rectangle\") {\n console.error(\"The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:\\n\", e);\n return;\n }\n throw e;\n }\n time(\" updateInputGraph\", function () {\n updateInputGraph(g, layoutGraph);\n });\n });\n};\nvar runLayout = function (g, time, opts) {\n time(\" removeSelfEdges\", function () {\n removeSelfEdges(g);\n });\n time(\" acyclic\", function () {\n acyclic_1.default.run(g);\n });\n time(\" nestingGraph.run\", function () {\n nesting_graph_1.default.run(g);\n });\n time(\" rank\", function () {\n (0, rank_1.default)((0, util_1.asNonCompoundGraph)(g));\n });\n time(\" injectEdgeLabelProxies\", function () {\n injectEdgeLabelProxies(g);\n });\n time(\" removeEmptyRanks\", function () {\n (0, util_1.removeEmptyRanks)(g);\n });\n time(\" nestingGraph.cleanup\", function () {\n nesting_graph_1.default.cleanup(g);\n });\n time(\" normalizeRanks\", function () {\n (0, util_1.normalizeRanks)(g);\n });\n time(\" assignRankMinMax\", function () {\n assignRankMinMax(g);\n });\n time(\" removeEdgeLabelProxies\", function () {\n removeEdgeLabelProxies(g);\n });\n time(\" normalize.run\", function () {\n normalize_1.default.run(g);\n });\n time(\" parentDummyChains\", function () {\n (0, parent_dummy_chains_1.default)(g);\n });\n time(\" addBorderSegments\", function () {\n (0, add_border_segments_1.default)(g);\n });\n if (opts && opts.keepNodeOrder) {\n time(\" initDataOrder\", function () {\n (0, init_data_order_1.default)(g, opts.nodeOrder);\n });\n }\n time(\" order\", function () {\n (0, order_1.default)(g, opts === null || opts === void 0 ? void 0 : opts.keepNodeOrder);\n });\n time(\" insertSelfEdges\", function () {\n insertSelfEdges(g);\n });\n time(\" adjustCoordinateSystem\", function () {\n coordinate_system_1.default.adjust(g);\n });\n time(\" position\", function () {\n (0, position_1.default)(g);\n });\n time(\" positionSelfEdges\", function () {\n positionSelfEdges(g);\n });\n time(\" removeBorderNodes\", function () {\n removeBorderNodes(g);\n });\n time(\" normalize.undo\", function () {\n normalize_1.default.undo(g);\n });\n time(\" fixupEdgeLabelCoords\", function () {\n fixupEdgeLabelCoords(g);\n });\n time(\" undoCoordinateSystem\", function () {\n coordinate_system_1.default.undo(g);\n });\n time(\" translateGraph\", function () {\n translateGraph(g);\n });\n time(\" assignNodeIntersects\", function () {\n assignNodeIntersects(g);\n });\n time(\" reversePoints\", function () {\n reversePointsForReversedEdges(g);\n });\n time(\" acyclic.undo\", function () {\n acyclic_1.default.undo(g);\n });\n};\n/**\n * 继承上一个布局中的order,防止翻转\n * TODO: 暂时没有考虑涉及层级变动的布局,只保证原来布局层级和相对顺序不变\n */\nvar inheritOrder = function (currG, prevG) {\n currG.nodes().forEach(function (n) {\n var node = currG.node(n);\n var prevNode = prevG.node(n);\n if (prevNode !== undefined) {\n node.fixorder = prevNode._order;\n delete prevNode._order;\n }\n else {\n delete node.fixorder;\n }\n });\n};\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nvar updateInputGraph = function (inputGraph, layoutGraph) {\n inputGraph.nodes().forEach(function (v) {\n var _a;\n var inputLabel = inputGraph.node(v);\n if (inputLabel) {\n var layoutLabel = layoutGraph.node(v);\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n inputLabel._order = layoutLabel.order;\n inputLabel._rank = layoutLabel.rank;\n if ((_a = layoutGraph.children(v)) === null || _a === void 0 ? void 0 : _a.length) {\n inputLabel.width = layoutLabel.width;\n inputLabel.height = layoutLabel.height;\n }\n }\n });\n inputGraph.edges().forEach(function (e) {\n var inputLabel = inputGraph.edge(e);\n var layoutLabel = layoutGraph.edge(e);\n inputLabel.points = layoutLabel ? layoutLabel.points : [];\n if (layoutLabel && layoutLabel.hasOwnProperty(\"x\")) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n }\n });\n inputGraph.graph().width = layoutGraph.graph().width;\n inputGraph.graph().height = layoutGraph.graph().height;\n};\nvar graphNumAttrs = [\"nodesep\", \"edgesep\", \"ranksep\", \"marginx\", \"marginy\"];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: \"tb\" };\nvar graphAttrs = [\"acyclicer\", \"ranker\", \"rankdir\", \"align\"];\nvar nodeNumAttrs = [\"width\", \"height\", \"layer\", \"fixorder\"]; // 需要传入layer, fixOrder作为参数参考\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = [\"minlen\", \"weight\", \"width\", \"height\", \"labeloffset\"];\nvar edgeDefaults = {\n minlen: 1,\n weight: 1,\n width: 0,\n height: 0,\n labeloffset: 10,\n labelpos: \"r\",\n};\nvar edgeAttrs = [\"labelpos\"];\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nvar buildLayoutGraph = function (inputGraph) {\n var g = new graph_1.Graph({ multigraph: true, compound: true });\n var graph = canonicalize(inputGraph.graph());\n var pickedProperties = {};\n graphAttrs === null || graphAttrs === void 0 ? void 0 : graphAttrs.forEach(function (key) {\n if (graph[key] !== undefined)\n pickedProperties[key] = graph[key];\n });\n g.setGraph(Object.assign({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pickedProperties));\n inputGraph.nodes().forEach(function (v) {\n var node = canonicalize(inputGraph.node(v));\n var defaultNode = __assign(__assign({}, nodeDefaults), node);\n var defaultAttrs = selectNumberAttrs(defaultNode, nodeNumAttrs);\n g.setNode(v, defaultAttrs);\n g.setParent(v, inputGraph.parent(v));\n });\n inputGraph.edges().forEach(function (e) {\n var edge = canonicalize(inputGraph.edge(e));\n var pickedProperties = {};\n edgeAttrs === null || edgeAttrs === void 0 ? void 0 : edgeAttrs.forEach(function (key) {\n if (edge[key] !== undefined)\n pickedProperties[key] = edge[key];\n });\n g.setEdgeObj(e, Object.assign({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pickedProperties));\n });\n return g;\n};\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nvar makeSpaceForEdgeLabels = function (g) {\n var graph = g.graph();\n if (!graph.ranksep)\n graph.ranksep = 0;\n graph.ranksep /= 2;\n g.nodes().forEach(function (n) {\n var node = g.node(n);\n if (!isNaN(node.layer)) {\n if (!node.layer)\n node.layer = 0;\n }\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n edge.minlen *= 2;\n if (((_a = edge.labelpos) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== \"c\") {\n if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n edge.width += edge.labeloffset;\n }\n else {\n edge.height += edge.labeloffset;\n }\n }\n });\n};\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nvar injectEdgeLabelProxies = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge.width && edge.height) {\n var v = g.node(e.v);\n var w = g.node(e.w);\n var label = {\n e: e,\n rank: (w.rank - v.rank) / 2 + v.rank,\n };\n (0, util_1.addDummyNode)(g, \"edge-proxy\", label, \"_ep\");\n }\n });\n};\nvar assignRankMinMax = function (g) {\n var maxRank = 0;\n g.nodes().forEach(function (v) {\n var _a, _b;\n var node = g.node(v);\n if (node.borderTop) {\n node.minRank = (_a = g.node(node.borderTop)) === null || _a === void 0 ? void 0 : _a.rank;\n node.maxRank = (_b = g.node(node.borderBottom)) === null || _b === void 0 ? void 0 : _b.rank;\n maxRank = Math.max(maxRank, node.maxRank || -Infinity);\n }\n });\n g.graph().maxRank = maxRank;\n};\nvar removeEdgeLabelProxies = function (g) {\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.dummy === \"edge-proxy\") {\n g.edge(node.e).labelRank = node.rank;\n g.removeNode(v);\n }\n });\n};\nvar translateGraph = function (g) {\n var minX;\n var maxX = 0;\n var minY;\n var maxY = 0;\n var graphLabel = g.graph();\n var marginX = graphLabel.marginx || 0;\n var marginY = graphLabel.marginy || 0;\n var getExtremes = function (attrs) {\n if (!attrs)\n return;\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n if (!isNaN(x) && !isNaN(w)) {\n if (minX === undefined) {\n minX = x - w / 2;\n }\n minX = Math.min(minX, x - w / 2);\n maxX = Math.max(maxX, x + w / 2);\n }\n if (!isNaN(y) && !isNaN(h)) {\n if (minY === undefined) {\n minY = y - h / 2;\n }\n minY = Math.min(minY, y - h / 2);\n maxY = Math.max(maxY, y + h / 2);\n }\n };\n g.nodes().forEach(function (v) {\n getExtremes(g.node(v));\n });\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge === null || edge === void 0 ? void 0 : edge.hasOwnProperty(\"x\")) {\n getExtremes(edge);\n }\n });\n minX -= marginX;\n minY -= marginY;\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node) {\n node.x -= minX;\n node.y -= minY;\n }\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (p) {\n p.x -= minX;\n p.y -= minY;\n });\n if (edge.hasOwnProperty(\"x\")) {\n edge.x -= minX;\n }\n if (edge.hasOwnProperty(\"y\")) {\n edge.y -= minY;\n }\n });\n graphLabel.width = maxX - minX + marginX;\n graphLabel.height = maxY - minY + marginY;\n};\nvar assignNodeIntersects = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n var nodeV = g.node(e.v);\n var nodeW = g.node(e.w);\n var p1;\n var p2;\n if (!edge.points) {\n edge.points = [];\n p1 = nodeW;\n p2 = nodeV;\n }\n else {\n p1 = edge.points[0];\n p2 = edge.points[edge.points.length - 1];\n }\n edge.points.unshift((0, util_1.intersectRect)(nodeV, p1));\n edge.points.push((0, util_1.intersectRect)(nodeW, p2));\n });\n};\nvar fixupEdgeLabelCoords = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge === null || edge === void 0 ? void 0 : edge.hasOwnProperty(\"x\")) {\n if (edge.labelpos === \"l\" || edge.labelpos === \"r\") {\n edge.width -= edge.labeloffset;\n }\n switch (edge.labelpos) {\n case \"l\":\n edge.x -= edge.width / 2 + edge.labeloffset;\n break;\n case \"r\":\n edge.x += edge.width / 2 + edge.labeloffset;\n break;\n }\n }\n });\n};\nvar reversePointsForReversedEdges = function (g) {\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n if (edge.reversed) {\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.reverse();\n }\n });\n};\nvar removeBorderNodes = function (g) {\n g.nodes().forEach(function (v) {\n var _a, _b, _c;\n if ((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length) {\n var node = g.node(v);\n var t = g.node(node.borderTop);\n var b = g.node(node.borderBottom);\n var l = g.node(node.borderLeft[((_b = node.borderLeft) === null || _b === void 0 ? void 0 : _b.length) - 1]);\n var r = g.node(node.borderRight[((_c = node.borderRight) === null || _c === void 0 ? void 0 : _c.length) - 1]);\n node.width = Math.abs((r === null || r === void 0 ? void 0 : r.x) - (l === null || l === void 0 ? void 0 : l.x)) || 10;\n node.height = Math.abs((b === null || b === void 0 ? void 0 : b.y) - (t === null || t === void 0 ? void 0 : t.y)) || 10;\n node.x = ((l === null || l === void 0 ? void 0 : l.x) || 0) + node.width / 2;\n node.y = ((t === null || t === void 0 ? void 0 : t.y) || 0) + node.height / 2;\n }\n });\n g.nodes().forEach(function (v) {\n var _a;\n if (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) === \"border\") {\n g.removeNode(v);\n }\n });\n};\nvar removeSelfEdges = function (g) {\n g.edges().forEach(function (e) {\n if (e.v === e.w) {\n var node = g.node(e.v);\n if (!node.selfEdges) {\n node.selfEdges = [];\n }\n node.selfEdges.push({ e: e, label: g.edge(e) });\n g.removeEdgeObj(e);\n }\n });\n};\nvar insertSelfEdges = function (g) {\n var layers = (0, util_1.buildLayerMatrix)(g);\n layers === null || layers === void 0 ? void 0 : layers.forEach(function (layer) {\n var orderShift = 0;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n var _a;\n var node = g.node(v);\n node.order = i + orderShift;\n (_a = node.selfEdges) === null || _a === void 0 ? void 0 : _a.forEach(function (selfEdge) {\n (0, util_1.addDummyNode)(g, \"selfedge\", {\n width: selfEdge.label.width,\n height: selfEdge.label.height,\n rank: node.rank,\n order: i + ++orderShift,\n e: selfEdge.e,\n label: selfEdge.label,\n }, \"_se\");\n });\n delete node.selfEdges;\n });\n });\n};\nvar positionSelfEdges = function (g) {\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.dummy === \"selfedge\") {\n var selfNode = g.node(node.e.v);\n var x = selfNode.x + selfNode.width / 2;\n var y = selfNode.y;\n var dx = node.x - x;\n var dy = selfNode.height / 2;\n g.setEdgeObj(node.e, node.label);\n g.removeNode(v);\n node.label.points = [\n { x: x + (2 * dx) / 3, y: y - dy },\n { x: x + (5 * dx) / 6, y: y - dy },\n { y: y, x: x + dx },\n { x: x + (5 * dx) / 6, y: y + dy },\n { x: x + (2 * dx) / 3, y: y + dy },\n ];\n node.label.x = node.x;\n node.label.y = node.y;\n }\n });\n};\nvar selectNumberAttrs = function (obj, attrs) {\n var pickedProperties = {};\n attrs === null || attrs === void 0 ? void 0 : attrs.forEach(function (key) {\n if (obj[key] === undefined)\n return;\n pickedProperties[key] = (+obj[key]);\n });\n return pickedProperties;\n};\nvar canonicalize = function (attrs) {\n if (attrs === void 0) { attrs = {}; }\n var newAttrs = {};\n Object.keys(attrs).forEach(function (k) {\n newAttrs[k.toLowerCase()] = attrs[k];\n });\n return newAttrs;\n};\nexports.default = layout;\n//# sourceMappingURL=layout.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\nvar layout_1 = __importDefault(require(\"./src/layout\"));\nvar util_1 = require(\"./src/util\");\nexports.default = {\n layout: layout_1.default,\n util: {\n time: util_1.time,\n notime: util_1.notime\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview dagre layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DagreLayout = void 0;\nvar index_1 = __importDefault(require(\"./dagre/index\"));\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\nvar graph_1 = require(\"./dagre/graph\");\n/**\n * 层次布局\n */\nvar DagreLayout = /** @class */ (function (_super) {\n __extends(DagreLayout, _super);\n function DagreLayout(options) {\n var _this = _super.call(this) || this;\n /** layout 方向, 可选 TB, BT, LR, RL */\n _this.rankdir = 'TB';\n /** 节点水平间距(px) */\n _this.nodesep = 50;\n /** 每一层节点之间间距 */\n _this.ranksep = 50;\n /** 是否保留布局连线的控制点 */\n _this.controlPoints = false;\n /** 每层节点是否根据节点数据中的 comboId 进行排序,以防止同层 combo 重叠 */\n _this.sortByCombo = false;\n /** 是否保留每条边上的dummy node */\n _this.edgeLabelSpace = true;\n /** 是否基于 dagre 进行辐射布局,若是,第一层节点将被放置在最内环上,其余层依次向外辐射 */\n _this.radial = false;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.layoutNode = function (nodeId) {\n var self = _this;\n var nodes = self.nodes;\n var node = nodes.find(function (node) { return node.id === nodeId; });\n if (node) {\n var layout = node.layout !== false;\n return layout;\n }\n return true;\n };\n _this.updateCfg(options);\n return _this;\n }\n DagreLayout.prototype.getDefaultCfg = function () {\n return {\n rankdir: 'TB',\n align: undefined,\n nodeSize: undefined,\n nodesepFunc: undefined,\n ranksepFunc: undefined,\n nodesep: 50,\n ranksep: 50,\n controlPoints: false,\n radial: false,\n focusNode: null, // radial 为 true 时生效,关注的节点\n };\n };\n /**\n * 执行布局\n */\n DagreLayout.prototype.execute = function () {\n var _this = this;\n var _a, _b, _c, _d;\n var self = this;\n var nodes = self.nodes, nodeSize = self.nodeSize, rankdir = self.rankdir, combos = self.combos, begin = self.begin, radial = self.radial, _e = self.comboEdges, comboEdges = _e === void 0 ? [] : _e, _f = self.vedges, vedges = _f === void 0 ? [] : _f;\n if (!nodes)\n return;\n var edges = self.edges || [];\n var g = new graph_1.Graph({\n multigraph: true,\n compound: true,\n });\n // collect the nodes in their combo, to create virtual edges for comboEdges\n self.nodeMap = {};\n var nodeComboMap = {};\n nodes.forEach(function (node) {\n self.nodeMap[node.id] = node;\n if (!node.comboId)\n return;\n nodeComboMap[node.comboId] = nodeComboMap[node.comboId] || [];\n nodeComboMap[node.comboId].push(node.id);\n });\n var sortedNodes = [];\n var visitedMap = {};\n if ((_a = self.nodeOrder) === null || _a === void 0 ? void 0 : _a.length) {\n self.nodeOrder.forEach(function (id) {\n visitedMap[id] = true;\n sortedNodes.push(self.nodeMap[id]);\n });\n nodes.forEach(function (node) {\n if (!visitedMap[node.id])\n sortedNodes.push(node);\n });\n }\n else {\n sortedNodes = nodes;\n }\n var nodeSizeFunc;\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n if ((0, util_1.isObject)(d.size)) {\n return [d.size.width || 40, d.size.height || 40];\n }\n return [d.size, d.size];\n }\n return [40, 40];\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function () { return nodeSize; };\n }\n else {\n nodeSizeFunc = function () { return [nodeSize, nodeSize]; };\n }\n var ranksepfunc = (0, util_1.getFunc)(self.ranksep, 50, self.ranksepFunc);\n var nodesepfunc = (0, util_1.getFunc)(self.nodesep, 50, self.nodesepFunc);\n var horisep = nodesepfunc;\n var vertisep = ranksepfunc;\n if (rankdir === 'LR' || rankdir === 'RL') {\n horisep = ranksepfunc;\n vertisep = nodesepfunc;\n }\n g.setDefaultEdgeLabel(function () { return ({}); });\n g.setGraph(self);\n var comboMap = {};\n if (this.sortByCombo && combos) {\n combos.forEach(function (combo) {\n comboMap[combo.id] = combo;\n // regard the collapsed combo as a node\n if (combo.collapsed) {\n var size = nodeSizeFunc(combo);\n var verti = vertisep(combo);\n var hori = horisep(combo);\n var width = size[0] + 2 * hori;\n var height = size[1] + 2 * verti;\n g.setNode(combo.id, { width: width, height: height });\n }\n if (!combo.parentId)\n return;\n if (!comboMap[combo.parentId]) {\n g.setNode(combo.parentId, {});\n }\n g.setParent(combo.id, combo.parentId);\n });\n }\n sortedNodes\n .filter(function (node) { return node.layout !== false; })\n .forEach(function (node) {\n var size = nodeSizeFunc(node);\n var verti = vertisep(node);\n var hori = horisep(node);\n var width = size[0] + 2 * hori;\n var height = size[1] + 2 * verti;\n var layer = node.layer;\n if ((0, util_1.isNumber)(layer)) {\n // 如果有layer属性,加入到node的label中\n g.setNode(node.id, { width: width, height: height, layer: layer });\n }\n else {\n g.setNode(node.id, { width: width, height: height });\n }\n if (_this.sortByCombo && node.comboId) {\n if (!comboMap[node.comboId]) {\n comboMap[node.comboId] = { id: node.comboId };\n g.setNode(node.comboId, {});\n }\n g.setParent(node.id, node.comboId);\n }\n });\n edges.forEach(function (edge) {\n // dagrejs Wiki https://github.com/dagrejs/dagre/wiki#configuring-the-layout\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n if (_this.layoutNode(source) && _this.layoutNode(target)) {\n g.setEdge(source, target, {\n weight: edge.weight || 1,\n });\n }\n });\n // create virtual edges from node to node for comboEdges\n (_b = comboEdges === null || comboEdges === void 0 ? void 0 : comboEdges.concat(vedges || [])) === null || _b === void 0 ? void 0 : _b.forEach(function (comboEdge) {\n var _a, _b;\n var source = comboEdge.source, target = comboEdge.target;\n var sources = ((_a = comboMap[source]) === null || _a === void 0 ? void 0 : _a.collapsed)\n ? [source]\n : nodeComboMap[source] || [source];\n var targets = ((_b = comboMap[target]) === null || _b === void 0 ? void 0 : _b.collapsed)\n ? [target]\n : nodeComboMap[target] || [target];\n sources.forEach(function (s) {\n targets.forEach(function (t) {\n g.setEdge(s, t, {\n weight: comboEdge.weight || 1,\n });\n });\n });\n });\n // 考虑增量图中的原始图\n var prevGraph = undefined;\n if ((_c = self.preset) === null || _c === void 0 ? void 0 : _c.nodes) {\n prevGraph = new graph_1.Graph({\n multigraph: true,\n compound: true,\n });\n self.preset.nodes.forEach(function (node) {\n prevGraph === null || prevGraph === void 0 ? void 0 : prevGraph.setNode(node.id, node);\n });\n }\n index_1.default.layout(g, {\n prevGraph: prevGraph,\n edgeLabelSpace: self.edgeLabelSpace,\n keepNodeOrder: Boolean(!!self.nodeOrder),\n nodeOrder: self.nodeOrder,\n });\n var dBegin = [0, 0];\n if (begin) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (minX_1 > coord.x)\n minX_1 = coord.x;\n if (minY_1 > coord.y)\n minY_1 = coord.y;\n });\n g.edges().forEach(function (edge) {\n var _a;\n var coord = g.edge(edge);\n (_a = coord.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) {\n if (minX_1 > point.x)\n minX_1 = point.x;\n if (minY_1 > point.y)\n minY_1 = point.y;\n });\n });\n dBegin[0] = begin[0] - minX_1;\n dBegin[1] = begin[1] - minY_1;\n }\n var isHorizontal = rankdir === 'LR' || rankdir === 'RL';\n // 变形为辐射\n if (radial) {\n var _g = this, focusNode = _g.focusNode, ranksep = _g.ranksep, getRadialPos_1 = _g.getRadialPos;\n var focusId = (0, util_1.isString)(focusNode) ? focusNode : focusNode === null || focusNode === void 0 ? void 0 : focusNode.id;\n var focusLayer_1 = focusId ? (_d = g.node(focusId)) === null || _d === void 0 ? void 0 : _d._rank : 0;\n var layers_1 = [];\n var dim_1 = isHorizontal ? 'y' : 'x';\n var sizeDim_1 = isHorizontal ? 'height' : 'width';\n // 找到整个图作为环的坐标维度(dim)的最大、最小值,考虑节点宽度\n var min_1 = Infinity;\n var max_1 = -Infinity;\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (!self.nodeMap[node])\n return;\n var currentNodesep = nodesepfunc(self.nodeMap[node]);\n if (focusLayer_1 === 0) {\n if (!layers_1[coord._rank]) {\n layers_1[coord._rank] = {\n nodes: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[coord._rank].nodes.push(node);\n layers_1[coord._rank].totalWidth += currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[coord._rank].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[coord._rank].maxSize = Math.max(coord.width, coord.height);\n }\n }\n else {\n var diffLayer = coord._rank - focusLayer_1;\n if (diffLayer === 0) {\n if (!layers_1[diffLayer]) {\n layers_1[diffLayer] = {\n nodes: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[diffLayer].nodes.push(node);\n layers_1[diffLayer].totalWidth += currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[diffLayer].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[diffLayer].maxSize = Math.max(coord.width, coord.height);\n }\n }\n else {\n var diffLayerAbs = Math.abs(diffLayer);\n if (!layers_1[diffLayerAbs]) {\n layers_1[diffLayerAbs] = {\n left: [],\n right: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[diffLayerAbs].totalWidth +=\n currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[diffLayerAbs].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[diffLayerAbs].maxSize = Math.max(coord.width, coord.height);\n }\n if (diffLayer < 0) {\n layers_1[diffLayerAbs].left.push(node);\n }\n else {\n layers_1[diffLayerAbs].right.push(node);\n }\n }\n }\n var leftPos = coord[dim_1] - coord[sizeDim_1] / 2 - currentNodesep;\n var rightPos = coord[dim_1] + coord[sizeDim_1] / 2 + currentNodesep;\n if (leftPos < min_1)\n min_1 = leftPos;\n if (rightPos > max_1)\n max_1 = rightPos;\n });\n // const padding = (max - min) * 0.1; // TODO\n // \b初始化为第一圈的半径,后面根据每层 ranksep 叠加\n var radius_1 = ranksep || 50; // TODO;\n var radiusMap_1 = {};\n // 扩大最大最小值范围,以便为环上留出接缝处的空隙\n var rangeLength_1 = (max_1 - min_1) / 0.9;\n var range_1 = [\n (min_1 + max_1 - rangeLength_1) * 0.5,\n (min_1 + max_1 + rangeLength_1) * 0.5,\n ];\n // 根据半径、分布比例,计算节点在环上的位置,并返回该组节点中最大的 ranksep 值\n var processNodes_1 = function (layerNodes, radius, propsMaxRanksep, arcRange) {\n if (propsMaxRanksep === void 0) { propsMaxRanksep = -Infinity; }\n if (arcRange === void 0) { arcRange = [0, 1]; }\n var maxRanksep = propsMaxRanksep;\n layerNodes.forEach(function (node) {\n var coord = g.node(node);\n radiusMap_1[node] = radius;\n // 获取变形为 radial 后的直角坐标系坐标\n var _a = getRadialPos_1(coord[dim_1], range_1, rangeLength_1, radius, arcRange), newX = _a.x, newY = _a.y;\n // 将新坐标写入源数据\n if (!self.nodeMap[node])\n return;\n self.nodeMap[node].x = newX + dBegin[0];\n self.nodeMap[node].y = newY + dBegin[1];\n // @ts-ignore: pass layer order to data for increment layout use\n self.nodeMap[node]._order = coord._order;\n // 找到本层最大的一个 ranksep,作为下一层与本层的间隙,叠加到下一层的半径上\n var currentNodeRanksep = ranksepfunc(self.nodeMap[node]);\n if (maxRanksep < currentNodeRanksep)\n maxRanksep = currentNodeRanksep;\n });\n return maxRanksep;\n };\n var isFirstLevel_1 = true;\n var lastLayerMaxNodeSize_1 = 0;\n layers_1.forEach(function (layerNodes) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (!((_a = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.nodes) === null || _a === void 0 ? void 0 : _a.length) &&\n !((_b = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.left) === null || _b === void 0 ? void 0 : _b.length) &&\n !((_c = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.right) === null || _c === void 0 ? void 0 : _c.length)) {\n return;\n }\n // 第一层只有一个节点,直接放在圆心,初始半径设定为 0\n if (isFirstLevel_1 && layerNodes.nodes.length === 1) {\n // 将新坐标写入源数据\n var nodeId = layerNodes.nodes[0];\n if (!self.nodeMap[nodeId])\n return;\n self.nodeMap[nodeId].x = dBegin[0];\n self.nodeMap[nodeId].y = dBegin[1];\n radiusMap_1[layerNodes.nodes[0]] = 0;\n radius_1 = ranksepfunc(self.nodeMap[nodeId]);\n isFirstLevel_1 = false;\n return;\n }\n // 为接缝留出空隙,半径也需要扩大\n radius_1 = Math.max(radius_1, layerNodes.totalWidth / (2 * Math.PI)); // / 0.9;\n var maxRanksep = -Infinity;\n if (focusLayer_1 === 0 || ((_d = layerNodes.nodes) === null || _d === void 0 ? void 0 : _d.length)) {\n maxRanksep = processNodes_1(layerNodes.nodes, radius_1, maxRanksep, [0, 1]); // 0.8\n }\n else {\n var leftRatio = ((_e = layerNodes.left) === null || _e === void 0 ? void 0 : _e.length) /\n (((_f = layerNodes.left) === null || _f === void 0 ? void 0 : _f.length) + ((_g = layerNodes.right) === null || _g === void 0 ? void 0 : _g.length));\n maxRanksep = processNodes_1(layerNodes.left, radius_1, maxRanksep, [\n 0,\n leftRatio,\n ]); // 接缝留出 0.05 的缝隙\n maxRanksep = processNodes_1(layerNodes.right, radius_1, maxRanksep, [\n leftRatio + 0.05,\n 1,\n ]); // 接缝留出 0.05 的缝隙\n }\n radius_1 += maxRanksep;\n isFirstLevel_1 = false;\n lastLayerMaxNodeSize_1 - layerNodes.maxSize;\n });\n g.edges().forEach(function (edge) {\n var _a, _b, _c;\n var coord = g.edge(edge);\n var i = edges.findIndex(function (it) {\n var source = (0, util_1.getEdgeTerminal)(it, 'source');\n var target = (0, util_1.getEdgeTerminal)(it, 'target');\n return source === edge.v && target === edge.w;\n });\n if (i <= -1)\n return;\n if (self.edgeLabelSpace &&\n self.controlPoints &&\n edges[i].type !== 'loop') {\n var otherDim_1 = dim_1 === 'x' ? 'y' : 'x';\n var controlPoints = (_a = coord === null || coord === void 0 ? void 0 : coord.points) === null || _a === void 0 ? void 0 : _a.slice(1, coord.points.length - 1);\n var newControlPoints_1 = [];\n var sourceOtherDimValue_1 = (_b = g.node(edge.v)) === null || _b === void 0 ? void 0 : _b[otherDim_1];\n var otherDimDist_1 = sourceOtherDimValue_1 - ((_c = g.node(edge.w)) === null || _c === void 0 ? void 0 : _c[otherDim_1]);\n var sourceRadius_1 = radiusMap_1[edge.v];\n var radiusDist_1 = sourceRadius_1 - radiusMap_1[edge.w];\n controlPoints === null || controlPoints === void 0 ? void 0 : controlPoints.forEach(function (point) {\n // 根据该边的起点、终点半径,及起点、终点、控制点位置关系,确定该控制点的半径\n var cRadius = ((point[otherDim_1] - sourceOtherDimValue_1) / otherDimDist_1) *\n radiusDist_1 +\n sourceRadius_1;\n // 获取变形为 radial 后的直角坐标系坐标\n var newPos = getRadialPos_1(point[dim_1], range_1, rangeLength_1, cRadius);\n newControlPoints_1.push({\n x: newPos.x + dBegin[0],\n y: newPos.y + dBegin[1],\n });\n });\n edges[i].controlPoints = newControlPoints_1;\n }\n });\n }\n else {\n var layerCoords_1 = new Set();\n var isInvert = rankdir === 'BT' || rankdir === 'RL';\n var layerCoordSort = isInvert\n ? function (a, b) { return b - a; }\n : function (a, b) { return a - b; };\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (!coord)\n return;\n var ndata = _this.nodeMap[node];\n if (!ndata) {\n ndata = combos === null || combos === void 0 ? void 0 : combos.find(function (it) { return it.id === node; });\n }\n if (!ndata)\n return;\n ndata.x = coord.x + dBegin[0];\n ndata.y = coord.y + dBegin[1];\n // @ts-ignore: pass layer order to data for increment layout use\n ndata._order = coord._order;\n layerCoords_1.add(isHorizontal ? ndata.x : ndata.y);\n });\n var layerCoordsArr_1 = Array.from(layerCoords_1).sort(layerCoordSort);\n // pre-define the isHorizontal related functions to avoid redundant calc in interations\n var isDifferentLayer_1 = isHorizontal\n ? function (point1, point2) { return point1.x !== point2.x; }\n : function (point1, point2) { return point1.y !== point2.y; };\n var filterControlPointsOutOfBoundary_1 = isHorizontal\n ? function (ps, point1, point2) {\n var max = Math.max(point1.y, point2.y);\n var min = Math.min(point1.y, point2.y);\n return ps.filter(function (point) { return point.y <= max && point.y >= min; });\n }\n : function (ps, point1, point2) {\n var max = Math.max(point1.x, point2.x);\n var min = Math.min(point1.x, point2.x);\n return ps.filter(function (point) { return point.x <= max && point.x >= min; });\n };\n g.edges().forEach(function (edge) {\n var _a;\n var coord = g.edge(edge);\n var i = edges.findIndex(function (it) {\n var source = (0, util_1.getEdgeTerminal)(it, 'source');\n var target = (0, util_1.getEdgeTerminal)(it, 'target');\n return source === edge.v && target === edge.w;\n });\n if (i <= -1)\n return;\n if (self.edgeLabelSpace &&\n self.controlPoints &&\n edges[i].type !== 'loop') {\n (_a = coord === null || coord === void 0 ? void 0 : coord.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) {\n point.x += dBegin[0];\n point.y += dBegin[1];\n });\n var sourceNode = self.nodeMap[edge.v];\n var targetNode = self.nodeMap[edge.w];\n edges[i].controlPoints = getControlPoints(coord === null || coord === void 0 ? void 0 : coord.points, sourceNode, targetNode, layerCoordsArr_1, isHorizontal, isDifferentLayer_1, filterControlPointsOutOfBoundary_1);\n }\n });\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges,\n };\n };\n DagreLayout.prototype.getRadialPos = function (dimValue, range, rangeLength, radius, arcRange) {\n if (arcRange === void 0) { arcRange = [0, 1]; }\n // dimRatio 占圆弧的比例\n var dimRatio = (dimValue - range[0]) / rangeLength;\n // 再进一步归一化到指定的范围上\n dimRatio = dimRatio * (arcRange[1] - arcRange[0]) + arcRange[0];\n // 使用最终归一化后的范围计算角度\n var angle = dimRatio * 2 * Math.PI; // 弧度\n // 将极坐标系转换为直角坐标系\n return {\n x: Math.cos(angle) * radius,\n y: Math.sin(angle) * radius,\n };\n };\n DagreLayout.prototype.getType = function () {\n return 'dagre';\n };\n return DagreLayout;\n}(base_1.Base));\nexports.DagreLayout = DagreLayout;\n/**\n * Format controlPoints to avoid polylines crossing nodes\n * @param points\n * @param sourceNode\n * @param targetNode\n * @param layerCoordsArr\n * @param isHorizontal\n * @returns\n */\nvar getControlPoints = function (points, sourceNode, targetNode, layerCoordsArr, isHorizontal, isDifferentLayer, filterControlPointsOutOfBoundary) {\n var controlPoints = (points === null || points === void 0 ? void 0 : points.slice(1, points.length - 1)) || []; // 去掉头尾\n // 酌情增加控制点,使折线不穿过跨层的节点\n if (sourceNode && targetNode) {\n var sourceX = sourceNode.x, sourceY = sourceNode.y;\n var targetX = targetNode.x, targetY = targetNode.y;\n if (isHorizontal) {\n sourceX = sourceNode.y;\n sourceY = sourceNode.x;\n targetX = targetNode.y;\n targetY = targetNode.x;\n }\n // 为跨层级的边增加第一个控制点。忽略垂直的/横向的边。\n // 新控制点 = {\n // x: 终点x,\n // y: (起点y + 下一层y) / 2, #下一层y可能不等于终点y\n // }\n if (targetY !== sourceY && sourceX !== targetX) {\n var sourceLayer = layerCoordsArr.indexOf(sourceY);\n var sourceNextLayerCoord = layerCoordsArr[sourceLayer + 1];\n if (sourceNextLayerCoord) {\n var firstControlPoint = controlPoints[0];\n var insertStartControlPoint = isHorizontal\n ? {\n x: (sourceY + sourceNextLayerCoord) / 2,\n y: (firstControlPoint === null || firstControlPoint === void 0 ? void 0 : firstControlPoint.y) || targetX,\n }\n : {\n x: (firstControlPoint === null || firstControlPoint === void 0 ? void 0 : firstControlPoint.x) || targetX,\n y: (sourceY + sourceNextLayerCoord) / 2,\n };\n // 当新增的控制点不存在(!=当前第一个控制点)时添加\n if (!firstControlPoint ||\n isDifferentLayer(firstControlPoint, insertStartControlPoint)) {\n controlPoints.unshift(insertStartControlPoint);\n }\n }\n var targetLayer = layerCoordsArr.indexOf(targetY);\n var layerDiff = Math.abs(targetLayer - sourceLayer);\n if (layerDiff === 1) {\n controlPoints = filterControlPointsOutOfBoundary(controlPoints, sourceNode, targetNode);\n // one controlPoint at least\n if (!controlPoints.length) {\n controlPoints.push(isHorizontal\n ? {\n x: (sourceY + targetY) / 2,\n y: sourceX,\n }\n : {\n x: sourceX,\n y: (sourceY + targetY) / 2,\n });\n }\n }\n else if (layerDiff > 1) {\n var targetLastLayerCoord = layerCoordsArr[targetLayer - 1];\n if (targetLastLayerCoord) {\n var lastControlPoints = controlPoints[controlPoints.length - 1];\n var insertEndControlPoint = isHorizontal\n ? {\n x: (targetY + targetLastLayerCoord) / 2,\n y: (lastControlPoints === null || lastControlPoints === void 0 ? void 0 : lastControlPoints.y) || targetX,\n }\n : {\n x: (lastControlPoints === null || lastControlPoints === void 0 ? void 0 : lastControlPoints.x) || sourceX,\n y: (targetY + targetLastLayerCoord) / 2,\n };\n // 当新增的控制点不存在(!=当前最后一个控制点)时添加\n if (!lastControlPoints ||\n isDifferentLayer(lastControlPoints, insertEndControlPoint)) {\n controlPoints.push(insertEndControlPoint);\n }\n }\n }\n }\n }\n return controlPoints;\n};\n//# sourceMappingURL=dagre.js.map","const e={graph:{meta:{rankDir:\"TB\",nodeSep:50,rankSep:50,edgeSep:5,align:void 0}},subScene:{meta:{paddingTop:20,paddingBottom:20,paddingLeft:20,paddingRight:20,labelHeight:20}},nodeSize:{meta:{width:100,maxLabelWidth:0,height:20},node:{width:80,height:20,labelOffset:10,maxLabelWidth:40},bridge:{width:5,height:5,radius:2,labelOffset:0}}};function n(n={},t=e){var r,o,i,a;const u=JSON.parse(JSON.stringify(t)),c=(null===(r=null==n?void 0:n.graph)||void 0===r?void 0:r.meta)||{},s=(null===(o=null==n?void 0:n.subScene)||void 0===o?void 0:o.meta)||{},d=(null===(i=null==n?void 0:n.nodeSize)||void 0===i?void 0:i.meta)||{},f=(null===(a=null==n?void 0:n.nodeSize)||void 0===a?void 0:a.node)||{},h=u.nodeSize.bridge;return{graph:{meta:Object.assign(u.graph.meta,c)},subScene:{meta:Object.assign(u.subScene.meta,s)},nodeSize:{meta:Object.assign(u.nodeSize.meta,d),node:Object.assign(u.nodeSize.node,f),bridge:h}}}function t(e){return`◬${e}◬`}const r=t(\"ROOT\"),o=t(\"BRIDGE_GRAPH\");var i,a,u,c;!function(e){e[e.META=0]=\"META\",e[e.NODE=1]=\"NODE\",e[e.BRIDGE=2]=\"BRIDGE\"}(i||(i={})),function(e){e[e.INCLUDE=0]=\"INCLUDE\",e[e.EXCLUDE=1]=\"EXCLUDE\",e[e.UNSPECIFIED=2]=\"UNSPECIFIED\"}(a||(a={})),function(e){e[e.META=0]=\"META\",e[e.CORE=1]=\"CORE\",e[e.BRIDGE=2]=\"BRIDGE\"}(u||(u={})),function(e){e[e.META=0]=\"META\",e[e.OP=1]=\"OP\",e[e.SERIES=2]=\"SERIES\"}(c||(c={}));var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function d(e,n){return e(n={exports:{}},n.exports),n.exports}var f=function(){this.__data__=[],this.size=0};var h=function(e,n){return e===n||e!=e&&n!=n};var l=function(e,n){for(var t=e.length;t--;)if(h(e[t][0],n))return t;return-1},v=Array.prototype.splice;var p=function(e){var n=this.__data__,t=l(n,e);return!(t<0)&&(t==n.length-1?n.pop():v.call(n,t,1),--this.size,!0)};var g=function(e){var n=this.__data__,t=l(n,e);return t<0?void 0:n[t][1]};var y=function(e){return l(this.__data__,e)>-1};var b=function(e,n){var t=this.__data__,r=l(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function m(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Ve={};Ve[\"[object Float32Array]\"]=Ve[\"[object Float64Array]\"]=Ve[\"[object Int8Array]\"]=Ve[\"[object Int16Array]\"]=Ve[\"[object Int32Array]\"]=Ve[\"[object Uint8Array]\"]=Ve[\"[object Uint8ClampedArray]\"]=Ve[\"[object Uint16Array]\"]=Ve[\"[object Uint32Array]\"]=!0,Ve[\"[object Arguments]\"]=Ve[\"[object Array]\"]=Ve[\"[object ArrayBuffer]\"]=Ve[\"[object Boolean]\"]=Ve[\"[object DataView]\"]=Ve[\"[object Date]\"]=Ve[\"[object Error]\"]=Ve[\"[object Function]\"]=Ve[\"[object Map]\"]=Ve[\"[object Number]\"]=Ve[\"[object Object]\"]=Ve[\"[object RegExp]\"]=Ve[\"[object Set]\"]=Ve[\"[object String]\"]=Ve[\"[object WeakMap]\"]=!1;var $e=function(e){return Ce(e)&&Ue(e.length)&&!!Ve[T(e)]};var He=function(e){return function(n){return e(n)}},We=d((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,o=r&&r.exports===t&&N.process,i=function(){try{var e=r&&r.require&&r.require(\"util\").types;return e||o&&o.binding&&o.binding(\"util\")}catch(e){}}();e.exports=i})),qe=We&&We.isTypedArray,Ye=qe?He(qe):$e,Je=Object.prototype.hasOwnProperty;var Xe=function(e,n){var t=Te(e),r=!t&&Re(e),o=!t&&!r&&Pe(e),i=!t&&!r&&!o&&Ye(e),a=t||r||o||i,u=a?Me(e.length,String):[],c=u.length;for(var s in e)!n&&!Je.call(e,s)||a&&(\"length\"==s||o&&(\"offset\"==s||\"parent\"==s)||i&&(\"buffer\"==s||\"byteLength\"==s||\"byteOffset\"==s)||Fe(s,c))||u.push(s);return u},Ke=Object.prototype;var Qe=function(e){var n=e&&e.constructor;return e===(\"function\"==typeof n&&n.prototype||Ke)};var Ze=function(e,n){return function(t){return e(n(t))}},en=Ze(Object.keys,Object),nn=Object.prototype.hasOwnProperty;var tn=function(e){if(!Qe(e))return en(e);var n=[];for(var t in Object(e))nn.call(e,t)&&\"constructor\"!=t&&n.push(t);return n};var rn=function(e){return null!=e&&Ue(e.length)&&!z(e)};var on=function(e){return rn(e)?Xe(e):tn(e)};var an=function(e,n){return e&&Se(n,on(n),e)};var un=function(e){var n=[];if(null!=e)for(var t in Object(e))n.push(t);return n},cn=Object.prototype.hasOwnProperty;var sn=function(e){if(!D(e))return un(e);var n=Qe(e),t=[];for(var r in e)(\"constructor\"!=r||!n&&cn.call(e,r))&&t.push(r);return t};var dn=function(e){return rn(e)?Xe(e,!0):sn(e)};var fn=function(e,n){return e&&Se(n,dn(n),e)},hn=d((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,o=r&&r.exports===t?k.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,n){if(n)return e.slice();var t=e.length,r=i?i(t):new e.constructor(t);return e.copy(r),r}}));var ln=function(e,n){var t=-1,r=e.length;for(n||(n=Array(r));++tu))return!1;var s=i.get(e),d=i.get(n);if(s&&d)return s==n&&d==e;var f=-1,h=!0,l=2&t?new wt:void 0;for(i.set(e,n),i.set(n,e);++f0&&r(c)?t>1?e(c,t-1,r,o,i):wn(i,c):o||(i[i.length]=c)}return i};var $r=function(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)},Hr=Math.max;var Wr=function(e,n,t){return n=Hr(void 0===n?e.length-1:n,0),function(){for(var r=arguments,o=-1,i=Hr(r.length-n,0),a=Array(i);++o0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}(qr);var Xr=function(e,n){return Jr(Wr(e,n,ht),e+\"\")};var Kr=function(e,n,t,r){for(var o=e.length,i=t+(r?1:-1);r?i--:++i-1};var to=function(e,n,t){for(var r=-1,o=null==e?0:e.length;++r=200){var s=n?null:oo(e);if(s)return Nt(s);a=!1,o=_t,c=new wt}else c=n?[]:u;e:for(;++ri){var a=o;o=i,i=a}return o+\"\u0001\"+i+\"\u0001\"+(ho.isUndefined(r)?\"\\0\":r)}function bo(e,n,t,r){var o=\"\"+n,i=\"\"+t;if(!e&&o>i){var a=o;o=i,i=a}var u={v:o,w:i};return r&&(u.name=r),u}function mo(e,n){return yo(e,n.v,n.w,n.name)}vo.prototype._nodeCount=0,vo.prototype._edgeCount=0,vo.prototype.isDirected=function(){return this._isDirected},vo.prototype.isMultigraph=function(){return this._isMultigraph},vo.prototype.isCompound=function(){return this._isCompound},vo.prototype.setGraph=function(e){return this._label=e,this},vo.prototype.graph=function(){return this._label},vo.prototype.setDefaultNodeLabel=function(e){return ho.isFunction(e)||(e=ho.constant(e)),this._defaultNodeLabelFn=e,this},vo.prototype.nodeCount=function(){return this._nodeCount},vo.prototype.nodes=function(){return ho.keys(this._nodes)},vo.prototype.sources=function(){var e=this;return ho.filter(this.nodes(),(function(n){return ho.isEmpty(e._in[n])}))},vo.prototype.sinks=function(){var e=this;return ho.filter(this.nodes(),(function(n){return ho.isEmpty(e._out[n])}))},vo.prototype.setNodes=function(e,n){var t=arguments,r=this;return ho.each(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this},vo.prototype.setNode=function(e,n){return ho.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=\"\\0\",this._children[e]={},this._children[\"\\0\"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},vo.prototype.node=function(e){return this._nodes[e]},vo.prototype.hasNode=function(e){return ho.has(this._nodes,e)},vo.prototype.removeNode=function(e){var n=this;if(ho.has(this._nodes,e)){var t=function(e){n.removeEdge(n._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],ho.each(this.children(e),(function(e){n.setParent(e)})),delete this._children[e]),ho.each(ho.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ho.each(ho.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},vo.prototype.setParent=function(e,n){if(!this._isCompound)throw new Error(\"Cannot set parent in a non-compound graph\");if(ho.isUndefined(n))n=\"\\0\";else{for(var t=n+=\"\";!ho.isUndefined(t);t=this.parent(t))if(t===e)throw new Error(\"Setting \"+n+\" as parent of \"+e+\" would create a cycle\");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this},vo.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},vo.prototype.parent=function(e){if(this._isCompound){var n=this._parent[e];if(\"\\0\"!==n)return n}},vo.prototype.children=function(e){if(ho.isUndefined(e)&&(e=\"\\0\"),this._isCompound){var n=this._children[e];if(n)return ho.keys(n)}else{if(\"\\0\"===e)return this.nodes();if(this.hasNode(e))return[]}},vo.prototype.predecessors=function(e){var n=this._preds[e];if(n)return ho.keys(n)},vo.prototype.successors=function(e){var n=this._sucs[e];if(n)return ho.keys(n)},vo.prototype.neighbors=function(e){var n=this.predecessors(e);if(n)return ho.union(n,this.successors(e))},vo.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},vo.prototype.filterNodes=function(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;ho.each(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),ho.each(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&ho.each(n.nodes(),(function(e){n.setParent(e,o(e))})),n},vo.prototype.setDefaultEdgeLabel=function(e){return ho.isFunction(e)||(e=ho.constant(e)),this._defaultEdgeLabelFn=e,this},vo.prototype.edgeCount=function(){return this._edgeCount},vo.prototype.edges=function(){return ho.values(this._edgeObjs)},vo.prototype.setPath=function(e,n){var t=this,r=arguments;return ho.reduce(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this},vo.prototype.setEdge=function(){var e,n,t,r,o=!1,i=arguments[0];\"object\"==typeof i&&null!==i&&\"v\"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=\"\"+e,n=\"\"+n,ho.isUndefined(t)||(t=\"\"+t);var a=yo(this._isDirected,e,n,t);if(ho.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=r),this;if(!ho.isUndefined(t)&&!this._isMultigraph)throw new Error(\"Cannot set a named edge when isMultigraph = false\");this.setNode(e),this.setNode(n),this._edgeLabels[a]=o?r:this._defaultEdgeLabelFn(e,n,t);var u=bo(this._isDirected,e,n,t);return e=u.v,n=u.w,Object.freeze(u),this._edgeObjs[a]=u,po(this._preds[n],e),po(this._sucs[e],n),this._in[n][a]=u,this._out[e][a]=u,this._edgeCount++,this},vo.prototype.edge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t);return this._edgeLabels[r]},vo.prototype.hasEdge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t);return ho.has(this._edgeLabels,r)},vo.prototype.removeEdge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],go(this._preds[n],e),go(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this},vo.prototype.inEdges=function(e,n){var t=this._in[e];if(t){var r=ho.values(t);return n?ho.filter(r,(function(e){return e.v===n})):r}},vo.prototype.outEdges=function(e,n){var t=this._out[e];if(t){var r=ho.values(t);return n?ho.filter(r,(function(e){return e.w===n})):r}},vo.prototype.nodeEdges=function(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))};var wo={Graph:lo,version:\"2.1.8\"},Eo={write:function(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:_o(e),edges:jo(e)};ho.isUndefined(e.graph())||(n.value=ho.clone(e.graph()));return n},read:function(e){var n=new lo(e.options).setGraph(e.value);return ho.each(e.nodes,(function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)})),ho.each(e.edges,(function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),n}};function _o(e){return ho.map(e.nodes(),(function(n){var t=e.node(n),r=e.parent(n),o={v:n};return ho.isUndefined(t)||(o.value=t),ho.isUndefined(r)||(o.parent=r),o}))}function jo(e){return ho.map(e.edges(),(function(n){var t=e.edge(n),r={v:n.v,w:n.w};return ho.isUndefined(n.name)||(r.name=n.name),ho.isUndefined(t)||(r.value=t),r}))}var xo=function(e){var n,t={},r=[];function o(r){ho.has(t,r)||(t[r]=!0,n.push(r),ho.each(e.successors(r),o),ho.each(e.predecessors(r),o))}return ho.each(e.nodes(),(function(e){n=[],o(e),n.length&&r.push(n)})),r};var No=Oo;function Oo(){this._arr=[],this._keyIndices={}}Oo.prototype.size=function(){return this._arr.length},Oo.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},Oo.prototype.has=function(e){return ho.has(this._keyIndices,e)},Oo.prototype.priority=function(e){var n=this._keyIndices[e];if(void 0!==n)return this._arr[n].priority},Oo.prototype.min=function(){if(0===this.size())throw new Error(\"Queue underflow\");return this._arr[0].key},Oo.prototype.add=function(e,n){var t=this._keyIndices;if(e=String(e),!ho.has(t,e)){var r=this._arr,o=r.length;return t[e]=o,r.push({key:e,priority:n}),this._decrease(o),!0}return!1},Oo.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},Oo.prototype.decrease=function(e,n){var t=this._keyIndices[e];if(n>this._arr[t].priority)throw new Error(\"New priority is greater than current priority. Key: \"+e+\" Old: \"+this._arr[t].priority+\" New: \"+n);this._arr[t].priority=n,this._decrease(t)},Oo.prototype._heapify=function(e){var n=this._arr,t=2*e,r=t+1,o=e;t>1].priority0&&(o=u.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return a}(e,String(n),t||Io,r||function(n){return e.outEdges(n)})},Io=ho.constant(1);var So=function(e,n,t){return ho.transform(e.nodes(),(function(r,o){r[o]=ko(e,o,n,t)}),{})};var Mo=function(e){var n=0,t=[],r={},o=[];function i(a){var u=r[a]={onStack:!0,lowlink:n,index:n++};if(t.push(a),e.successors(a).forEach((function(e){ho.has(r,e)?r[e].onStack&&(u.lowlink=Math.min(u.lowlink,r[e].index)):(i(e),u.lowlink=Math.min(u.lowlink,r[e].lowlink))})),u.lowlink===u.index){var c,s=[];do{c=t.pop(),r[c].onStack=!1,s.push(c)}while(a!==c);o.push(s)}}return e.nodes().forEach((function(e){ho.has(r,e)||i(e)})),o};var Co=function(e){return ho.filter(Mo(e),(function(n){return n.length>1||1===n.length&&e.hasEdge(n[0],n[0])}))};var Go=function(e,n,t){return function(e,n,t){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(n){e!==n&&(r[e][n]={distance:Number.POSITIVE_INFINITY})})),t(e).forEach((function(t){var o=t.v===e?t.w:t.v,i=n(t);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var n=r[e];o.forEach((function(t){var i=r[t];o.forEach((function(t){var r=i[e],o=n[t],a=i[t],u=r.distance+o.distance;u0;){if(t=i.removeMin(),ho.has(o,t))r.setEdge(t,o[t]);else{if(u)throw new Error(\"Input graph is not connected: \"+e);u=!0}e.nodeEdges(t).forEach(a)}return r},tarjan:Mo,topsort:Ao},version:wo.version};try{Po=zo}catch(e){}Po||(Po=window.graphlib);var Fo=Po;var Uo=function(e){return at(e,5)};var Vo=function(e,n,t){if(!D(t))return!1;var r=typeof n;return!!(\"number\"==r?rn(t)&&Fe(n,t.length):\"string\"==r&&n in t)&&h(t[n],e)},$o=Object.prototype,Ho=$o.hasOwnProperty,Wo=Xr((function(e,n){e=Object(e);var t=-1,r=n.length,o=r>2?n[2]:void 0;for(o&&Vo(n[0],n[1],o)&&(r=1);++t-1?o[i?n[a]:a]:void 0}},Yo=/^\\s+|\\s+$/g,Jo=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,Ko=/^0o[0-7]+$/i,Qo=parseInt;var Zo=function(e){if(\"number\"==typeof e)return e;if(Pt(e))return NaN;if(D(e)){var n=\"function\"==typeof e.valueOf?e.valueOf():e;e=D(n)?n+\"\":n}if(\"string\"!=typeof e)return 0===e?e:+e;e=e.replace(Yo,\"\");var t=Xo.test(e);return t||Ko.test(e)?Qo(e.slice(2),t?2:8):Jo.test(e)?NaN:+e};var ei=function(e){return e?Infinity===(e=Zo(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var ni=function(e){var n=ei(e),t=n%1;return n==n?t?n-t:n:0},ti=Math.max;var ri=qo((function(e,n,t){var r=null==e?0:e.length;if(!r)return-1;var o=null==t?0:ni(t);return o<0&&(o=ti(r+o,0)),Kr(e,dr(n),o)}));var oi=function(e){return(null==e?0:e.length)?Vr(e,1):[]};var ii=function(e,n){return null==e?e:st(e,lt(n),dn)};var ai=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var ui=function(e,n){var t={};return n=dr(n),dt(e,(function(e,r,o){Oe(t,r,n(e,r,o))})),t};var ci=function(e,n,t){for(var r=-1,o=e.length;++rn};var di=function(e){return e&&e.length?ci(e,ht,si):void 0};var fi=function(e,n,t){(void 0!==t&&!h(e[n],t)||void 0===t&&!(n in e))&&Oe(e,n,t)},hi=Function.prototype,li=Object.prototype,vi=hi.toString,pi=li.hasOwnProperty,gi=vi.call(Object);var yi=function(e){if(!Ce(e)||\"[object Object]\"!=T(e))return!1;var n=En(e);if(null===n)return!0;var t=pi.call(n,\"constructor\")&&n.constructor;return\"function\"==typeof t&&t instanceof t&&vi.call(t)==gi};var bi=function(e,n){if((\"constructor\"!==n||\"function\"!=typeof e[n])&&\"__proto__\"!=n)return e[n]};var mi=function(e){return Se(e,dn(e))};var wi=function(e,n,t,r,o,i,a){var u=bi(e,t),c=bi(n,t),s=a.get(c);if(s)fi(e,t,s);else{var d=i?i(u,c,t+\"\",e,n,a):void 0,f=void 0===d;if(f){var h=Te(c),l=!h&&Pe(c),v=!h&&!l&&Ye(c);d=c,h||l||v?Te(u)?d=u:ao(u)?d=ln(u):l?(f=!1,d=hn(c,!0)):v?(f=!1,d=Yn(c,!0)):d=[]:yi(c)||Re(c)?(d=u,Re(u)?d=mi(u):D(u)&&!z(u)||(d=Qn(c))):f=!1}f&&(a.set(c,d),o(d,c,r,i,a),a.delete(c)),fi(e,t,d)}};var Ei=function e(n,t,r,o,i){n!==t&&st(t,(function(a,u){if(i||(i=new je),D(a))wi(n,t,u,r,e,o,i);else{var c=o?o(bi(n,u),a,u+\"\",n,t,i):void 0;void 0===c&&(c=a),fi(n,u,c)}}),dn)};var _i=function(e){return Xr((function(n,t){var r=-1,o=t.length,i=o>1?t[o-1]:void 0,a=o>2?t[2]:void 0;for(i=e.length>3&&\"function\"==typeof i?(o--,i):void 0,a&&Vo(t[0],t[1],a)&&(i=o<3?void 0:i,o=1),n=Object(n);++rn||i&&a&&c&&!u&&!s||r&&a&&c||!t&&c||!o)return 1;if(!r&&!i&&!s&&e=u?c:c*(\"desc\"==t[r]?-1:1)}return e.index-n.index};var Di=function(e,n,t){n=n.length?Yt(n,(function(e){return Te(e)?function(n){return nr(n,1===e.length?e[0]:e)}:e})):[ht];var r=-1;n=Yt(n,He(dr));var o=br(e,(function(e,t,o){return{criteria:Yt(n,(function(n){return n(e)})),index:++r,value:e}}));return Li(o,(function(e,n){return Ti(e,n,t)}))},Pi=Xr((function(e,n){if(null==e)return[];var t=n.length;return t>1&&Vo(e,n[0],n[1])?n=[]:t>2&&Vo(n[0],n[1],n[2])&&(n=[n[0]]),Di(e,Vr(n,1),[])})),zi=0;var Fi=function(e){var n=++zi;return Qt(e)+n};var Ui=function(e,n,t){for(var r=-1,o=e.length,i=n.length,a={};++r0;--u)if(r=n[u].dequeue()){o=o.concat(Zi(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return Hi.flatten(Hi.map(r,(function(n){return e.outEdges(n.v,n.w)})),!0)},Qi=Hi.constant(1);function Zi(e,n,t,r,o){var i=o?[]:void 0;return Hi.forEach(e.inEdges(r.v),(function(r){var a=e.edge(r),u=e.node(r.v);o&&i.push({v:r.v,w:r.w}),u.out-=a,ea(n,t,u)})),Hi.forEach(e.outEdges(r.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,ea(n,t,a)})),e.removeNode(r.v),i}function ea(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}var na={run:function(e){var n=\"greedy\"===e.graph().acyclicer?Ki(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},r={};function o(i){Hi.has(r,i)||(r[i]=!0,t[i]=!0,Hi.forEach(e.outEdges(i),(function(e){Hi.has(t,e.w)?n.push(e):o(e.w)})),delete t[i])}return Hi.forEach(e.nodes(),o),n}(e);Hi.forEach(n,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,Hi.uniqueId(\"rev\"))}))},undo:function(e){Hi.forEach(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}};var ta=Fo.Graph,ra={addDummyNode:oa,simplify:function(e){var n=(new ta).setGraph(e.graph());return Hi.forEach(e.nodes(),(function(t){n.setNode(t,e.node(t))})),Hi.forEach(e.edges(),(function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},o=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),n},asNonCompoundGraph:function(e){var n=new ta({multigraph:e.isMultigraph()}).setGraph(e.graph());return Hi.forEach(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),Hi.forEach(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n},successorWeights:function(e){var n=Hi.map(e.nodes(),(function(n){var t={};return Hi.forEach(e.outEdges(n),(function(n){t[n.w]=(t[n.w]||0)+e.edge(n).weight})),t}));return Hi.zipObject(e.nodes(),n)},predecessorWeights:function(e){var n=Hi.map(e.nodes(),(function(n){var t={};return Hi.forEach(e.inEdges(n),(function(n){t[n.v]=(t[n.v]||0)+e.edge(n).weight})),t}));return Hi.zipObject(e.nodes(),n)},intersectRect:function(e,n){var t,r,o=e.x,i=e.y,a=n.x-o,u=n.y-i,c=e.width/2,s=e.height/2;if(!a&&!u)throw new Error(\"Not possible to find intersection inside of the rectangle\");Math.abs(u)*c>Math.abs(a)*s?(u<0&&(s=-s),t=s*a/u,r=s):(a<0&&(c=-c),t=c,r=c*u/a);return{x:o+t,y:i+r}},buildLayerMatrix:function(e){var n=Hi.map(Hi.range(ia(e)+1),(function(){return[]}));return Hi.forEach(e.nodes(),(function(t){var r=e.node(t),o=r.rank;Hi.isUndefined(o)||(n[o][r.order]=t)})),n},normalizeRanks:function(e){var n=Hi.min(Hi.map(e.nodes(),(function(n){return e.node(n).rank})));Hi.forEach(e.nodes(),(function(t){var r=e.node(t);Hi.has(r,\"rank\")&&(r.rank-=n)}))},removeEmptyRanks:function(e){var n=Hi.min(Hi.map(e.nodes(),(function(n){return e.node(n).rank}))),t=[];Hi.forEach(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var r=0,o=e.graph().nodeRankFactor;Hi.forEach(t,(function(n,t){Hi.isUndefined(n)&&t%o!=0?--r:r&&Hi.forEach(n,(function(n){e.node(n).rank+=r}))}))},addBorderNode:function(e,n,t,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=t,o.order=r);return oa(e,\"border\",o,n)},maxRank:ia,partition:function(e,n){var t={lhs:[],rhs:[]};return Hi.forEach(e,(function(e){n(e)?t.lhs.push(e):t.rhs.push(e)})),t},time:function(e,n){var t=Hi.now();try{return n()}finally{console.log(e+\" time: \"+(Hi.now()-t)+\"ms\")}},notime:function(e,n){return n()}};function oa(e,n,t,r){var o;do{o=Hi.uniqueId(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function ia(e){return Hi.max(Hi.map(e.nodes(),(function(n){var t=e.node(n).rank;if(!Hi.isUndefined(t))return t})))}var aa={run:function(e){e.graph().dummyChains=[],Hi.forEach(e.edges(),(function(n){!function(e,n){var t,r,o,i=n.v,a=e.node(i).rank,u=n.w,c=e.node(u).rank,s=n.name,d=e.edge(n),f=d.labelRank;if(c===a+1)return;for(e.removeEdge(n),o=0,++a;aa.lim&&(u=a,c=!0);var s=Hi.filter(n.edges(),(function(n){return c===Sa(e,e.node(n.v),u)&&c!==Sa(e,e.node(n.w),u)}));return Hi.minBy(s,(function(e){return pa(n,e)}))}function Ia(e,n,t,r){var o=t.v,i=t.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),xa(e),_a(e,n),function(e,n){var t=Hi.find(e.nodes(),(function(e){return!n.node(e).parent})),r=ya(e,t);r=r.slice(1),Hi.forEach(r,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function Sa(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}Ea.initLowLimValues=xa,Ea.initCutValues=_a,Ea.calcCutValue=ja,Ea.leaveEdge=Oa,Ea.enterEdge=ka,Ea.exchangeEdges=Ia;var Ma=ua,Ca=function(e){switch(e.graph().ranker){case\"network-simplex\":Ba(e);break;case\"tight-tree\":!function(e){Ma(e),fa(e)}(e);break;case\"longest-path\":Ga(e);break;default:Ba(e)}};var Ga=Ma;function Ba(e){wa(e)}var Aa=function(e){var n=function(e){var n={},t=0;function r(o){var i=t;Hi.forEach(e.children(o),r),n[o]={low:i,lim:t++}}return Hi.forEach(e.children(),r),n}(e);Hi.forEach(e.graph().dummyChains,(function(t){for(var r=e.node(t),o=r.edgeObj,i=function(e,n,t,r){var o,i,a=[],u=[],c=Math.min(n[t].low,n[r].low),s=Math.max(n[t].lim,n[r].lim);o=t;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>c||s>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,c=0,s=a[c],d=!0;t!==o.w;){if(r=e.node(t),d){for(;(s=a[c])!==u&&e.node(s).maxRank0;)n%2&&(t+=u[n+1]),u[n=n-1>>1]+=e.weight;c+=e.weight*t}))),c}var qa=function(e,n){return Hi.map(n,(function(n){var t=e.inEdges(n);if(t.length){var r=Hi.reduce(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))};var Ya=function(e,n){var t={};return Hi.forEach(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};Hi.isUndefined(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),Hi.forEach(n.edges(),(function(e){var n=t[e.v],r=t[e.w];Hi.isUndefined(n)||Hi.isUndefined(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){n.merged||(Hi.isUndefined(n.barycenter)||Hi.isUndefined(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function r(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var o=e.pop();n.push(o),Hi.forEach(o.in.reverse(),t(o)),Hi.forEach(o.out,r(o))}return Hi.map(Hi.filter(n,(function(e){return!e.merged})),(function(e){return Hi.pick(e,[\"vs\",\"i\",\"barycenter\",\"weight\"])}))}(Hi.filter(t,(function(e){return!e.indegree})))};var Ja=function(e,n){var t=ra.partition(e,(function(e){return Hi.has(e,\"barycenter\")})),r=t.lhs,o=Hi.sortBy(t.rhs,(function(e){return-e.i})),i=[],a=0,u=0,c=0;r.sort((s=!!n,function(e,n){return e.barycentern.barycenter?1:s?n.i-e.i:e.i-n.i})),c=Xa(i,o,c),Hi.forEach(r,(function(e){c+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,u+=e.weight,c=Xa(i,o,c)}));var s;var d={vs:Hi.flatten(i,!0)};u&&(d.barycenter=a/u,d.weight=u);return d};function Xa(e,n,t){for(var r;n.length&&(r=Hi.last(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}var Ka=function e(n,t,r,o){var i=n.children(t),a=n.node(t),u=a?a.borderLeft:void 0,c=a?a.borderRight:void 0,s={};u&&(i=Hi.filter(i,(function(e){return e!==u&&e!==c})));var d=qa(n,i);Hi.forEach(d,(function(t){if(n.children(t.v).length){var i=e(n,t.v,r,o);s[t.v]=i,Hi.has(i,\"barycenter\")&&(a=t,u=i,Hi.isUndefined(a.barycenter)?(a.barycenter=u.barycenter,a.weight=u.weight):(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight))}var a,u}));var f=Ya(d,r);!function(e,n){Hi.forEach(e,(function(e){e.vs=Hi.flatten(e.vs.map((function(e){return n[e]?n[e].vs:e})),!0)}))}(f,s);var h=Ja(f,o);if(u&&(h.vs=Hi.flatten([u,h.vs,c],!0),n.predecessors(u).length)){var l=n.node(n.predecessors(u)[0]),v=n.node(n.predecessors(c)[0]);Hi.has(h,\"barycenter\")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h};var Qa=Fo.Graph,Za=function(e,n,t){var r=function(e){var n;for(;e.hasNode(n=Hi.uniqueId(\"_root\")););return n}(e),o=new Qa({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(n){return e.node(n)}));return Hi.forEach(e.nodes(),(function(i){var a=e.node(i),u=e.parent(i);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(o.setNode(i),o.setParent(i,u||r),Hi.forEach(e[t](i),(function(n){var t=n.v===i?n.w:n.v,r=o.edge(t,i),a=Hi.isUndefined(r)?0:r.weight;o.setEdge(t,i,{weight:e.edge(n).weight+a})})),Hi.has(a,\"minRank\")&&o.setNode(i,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))})),o};var eu=function(e,n,t){var r,o={};Hi.forEach(t,(function(t){for(var i,a,u=e.parent(t);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=r,r=u),a&&a!==u)return void n.setEdge(a,u);u=i}}))};var nu=Fo.Graph,tu=function(e){var n=ra.maxRank(e),t=ru(e,Hi.range(1,n+1),\"inEdges\"),r=ru(e,Hi.range(n-1,-1,-1),\"outEdges\"),o=$a(e);iu(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,c=0;c<4;++u,++c){ou(u%2?t:r,u%4>=2),o=ra.buildLayerMatrix(e);var s=Ha(e,o);sa)&&du(t,n,u)}))}))}return Hi.reduce(n,(function(n,t){var o,i=-1,a=0;return Hi.forEach(t,(function(u,c){if(\"border\"===e.node(u).dummy){var s=e.predecessors(u);s.length&&(o=e.node(s[0]).order,r(t,a,c,i,o),a=c,i=o)}r(t,a,t.length,o,n.length)})),t})),t}function du(e,n,t){if(n>t){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function fu(e,n,t){if(n>t){var r=n;n=t,t=r}return Hi.has(e[n],t)}function hu(e,n,t,r){var o={},i={},a={};return Hi.forEach(n,(function(e){Hi.forEach(e,(function(e,n){o[e]=e,i[e]=e,a[e]=n}))})),Hi.forEach(n,(function(e){var n=-1;Hi.forEach(e,(function(e){var u=r(e);if(u.length)for(var c=((u=Hi.sortBy(u,(function(e){return a[e]}))).length-1)/2,s=Math.floor(c),d=Math.ceil(c);s<=d;++s){var f=u[s];i[e]===e&&nnew Du(e))).forEach((e=>{n.nodes[e.name]=e,e.inputs.forEach((t=>{!function(e,n,t){t.name!==n.name&&e.edges.push(Object.assign(Object.assign({},t.attr),{v:t.name,w:n.name}))}(n,e,t)}))})),n}class Fu{constructor(e,n={}){this.attr=null,this.bridgeGraph=null,this.cardinality=0,this.depth=1,this.include=a.UNSPECIFIED,this.isGroupNode=!0,this.parentNode=null,this.type=i.META,this.path=[],this.name=e,this.metaGraph=Hu(e,u.META,n)}getFirstChild(){return this.metaGraph.node(this.metaGraph.nodes()[0])}getChildren(){return this.metaGraph.nodes().map((e=>this.metaGraph.node(e)))}leaves(){let e,n=[],t=[this];for(;t.length;){let r=t.shift();r.isGroupNode?(e=r.metaGraph,e.nodes().forEach((n=>t.push(e.node(n))))):n.push(r.name)}return n}}class Uu{constructor(e,n){this.v=e,this.w=n,this.baseEdgeList=[],this.inbound=null,this.name=null}addBaseEdge(e,n){this.baseEdgeList.push(e)}}function Vu(e,n={}){return new Fu(e,n)}function $u(e,n){return new Uu(e,n)}function Hu(e,n,t){const r=t||{},o=new Ru.Graph(r);return o.setGraph({name:e,rankdir:r.rankdir,type:n,align:r.align}),o}class Wu{constructor(e={}){this.graphOptions=e,this.index={},this.graphOptions.compound=!0,this.root=Vu(r,this.graphOptions),this.index[r]=this.root}getNodeMap(){return this.index}node(e){return this.index[e]}setNode(e,n){this.index[e]=n}getBridgeGraph(e){const n=this.index[e];if(!n)throw Error(\"Could not find node in hierarchy: \"+e);if(!(\"metaGraph\"in n))return null;const t=n;if(t.bridgeGraph)return t.bridgeGraph;const r=Hu(o,u.BRIDGE,this.graphOptions);if(t.bridgeGraph=r,!n.parentNode||!(\"metaGraph\"in n.parentNode))return r;const i=n.parentNode;return[i.metaGraph,this.getBridgeGraph(i.name)].forEach((n=>{n.edges().filter((n=>n.v===e||n.w===e)).forEach((t=>{const o=t.w===e;n.edge(t).baseEdgeList.forEach((n=>{const[i,a]=o?[n.w,t.v]:[n.v,t.w],u=this.getChildName(e,i),c={v:o?a:u,w:o?u:a};let s=r.edge(c);s||(s=$u(c.v,c.w),s.inbound=o,r.setEdge(c.v,c.w,s)),s.addBaseEdge(n,this)}))}))})),r}getChildName(e,n){let t=this.index[n];for(;t;){if(t.parentNode&&t.parentNode.name===e)return t.name;t=t.parentNode}throw Error(\"Could not find immediate child for descendant: \"+n)}getPredecessors(e){const n=this.index[e];if(!n)throw Error(\"Could not find node with name: \"+e);return this.getOneWayEdges(n,!0)}getSuccessors(e){const n=this.index[e];if(!n)throw Error(\"Could not find node with name: \"+e);return this.getOneWayEdges(n,!1)}getOneWayEdges(e,n){const t=[];if(!e.parentNode||!e.parentNode.isGroupNode)return t;const r=e.parentNode,o=r.metaGraph,i=this.getBridgeGraph(r.name);return Yu(o,e,n,t),Yu(i,e,n,t),t}}function qu(e,n){const{rankDirection:t,align:r}=n,o=new Wu({rankdir:t,align:r});return function(e,n){Object.keys(n.nodes).forEach((t=>{const r=n.nodes[t],o=r.path;let i=e.root;i.depth=Math.max(o.length,i.depth);for(let n=0;n{let t=0;for(;e;)n[t++]=e.name,e=e.parentNode;return t-1};n.edges.forEach((a=>{r=[],o=[];let u=i(n.nodes[a.v],r),c=i(n.nodes[a.w],o);for(;r[u]===o[c];)if(u--,c--,u<0||c<0)throw Error(\"No difference found between ancestor paths.\");const s=t[r[u+1]],d=r[u],f=o[c];let h=s.metaGraph.edge(d,f);h||(h=$u(d,f),s.metaGraph.setEdge(d,f,h)),h.addBaseEdge(a,e)}))}(o,e),o}function Yu(e,n,t,r){(t?e.inEdges(n.name):e.outEdges(n.name)).forEach((n=>{const t=e.edge(n);r.push(t)}))}class Ju{constructor(e){this.hierarchy=e,this.index={},this.hasSubHierarchy={},this.root=new Qu(this.hierarchy.root,this.hierarchy.graphOptions),this.index[e.root.name]=this.root,this.buildSubHierarchy(e.root.name),this.root.expanded=!0}getRenderInfoNodes(){return Object.values(this.index)}getSubHierarchy(){return this.hasSubHierarchy}buildSubHierarchy(e){if(e in this.hasSubHierarchy)return;this.hasSubHierarchy[e]=!0;const n=this.index[e];if(n.node.type!==i.META)return;const t=n,r=t.node.metaGraph,o=t.coreGraph;r.nodes().forEach((e=>{const n=this.getOrCreateRenderNodeByName(e);o.setNode(e,n)})),r.edges().forEach((e=>{const n=r.edge(e),t=new Ku(n);o.setEdge(e.v,e.w,t)}));const u=t.node.parentNode;if(!u)return;const c=this.getRenderNodeByName(u.name),s=(e,...n)=>n.concat([e?\"IN\":\"OUT\"]).join(\"~~\"),d=this.hierarchy.getBridgeGraph(e);d.edges().forEach((n=>{const t=d.edge(n),f=!!r.node(n.w),[h,l]=f?[n.w,n.v]:[n.v,n.w],v=n=>{const t=f?{v:n,w:e}:{v:e,w:n};return c.coreGraph.edge(t)};let p=v(l);p||(p=v(s(f,l,u.name)));const g=s(f,e),y=s(f,l,e);let b=o.node(y);if(!b){let e=o.node(g);if(!e){const n={name:g,type:i.BRIDGE,isGroupNode:!1,cardinality:0,parentNode:null,include:a.UNSPECIFIED,inbound:f,attr:{}};e=new Xu(n),this.index[g]=e,o.setNode(g,e)}const n={name:y,type:i.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,include:a.UNSPECIFIED,inbound:f,attr:{}};b=new Xu(n),this.index[y]=b,o.setNode(y,b),o.setParent(y,g),e.node.cardinality++}const m=new Ku(t);m.adjoiningMetaEdge=p,f?o.setEdge(y,h,m):o.setEdge(h,y,m)}))}getOrCreateRenderNodeByName(e){if(!e)return null;if(e in this.index)return this.index[e];const n=this.getNodeByName(e);return n?(this.index[e]=n.isGroupNode?new Qu(n,this.hierarchy.graphOptions):new Xu(n),this.index[e]):null}getRenderNodeByName(e){return this.index[e]}getNodeByName(e){return this.hierarchy.node(e)}}class Xu{constructor(e){this.node=e,this.expanded=!1,this.x=0,this.y=0,this.coreBox={width:0,height:0},this.outboxWidth=0,this.labelOffset=0,this.radius=0,this.labelHeight=0,this.paddingTop=0,this.paddingLeft=0,this.paddingRight=0,this.paddingBottom=0,this.width=e.width||0,this.height=e.height||0,this.displayName=e.name,this.attr=e.attr}}class Ku{constructor(e){this.metaEdge=e,this.adjoiningMetaEdge=null,this.weight=1,this.points=[]}}class Qu extends Xu{constructor(e,n){super(e);const t=e.metaGraph.graph();n.compound=!0,this.coreGraph=Hu(t.name,u.CORE,n)}}function Zu(e,t){e.node.isGroupNode&&function(e,t){const r=n(t);e.coreGraph.nodes().map((n=>e.coreGraph.node(n))).forEach((e=>{var n,o,a,u,c,s;const{height:d,width:f}=e;switch(e.node.type){case i.NODE:Object.assign(e,r.nodeSize.node),e.height=d||r.nodeSize.node.height,e.width=f||r.nodeSize.node.width;break;case i.BRIDGE:Object.assign(e,r.nodeSize.bridge);break;case i.META:if(e.expanded){Zu(e,t)}else Object.assign(e,r.nodeSize.meta),e.height=r.nodeSize.meta.height,e.width=r.nodeSize.meta.width;break;default:throw Error(\"Unrecognized node type: \"+e.node.type)}if(!e.expanded){const r=e.attr;!function(e,n=!1){if(e.coreBox.width=e.width,e.coreBox.height=e.height,!n){const n=`${e.displayName}`.length,t=3;e.width=Math.max(e.coreBox.width,n*t)}}(e,t&&(0===e.node.type&&!!(null===(o=null===(n=null==t?void 0:t.nodeSize)||void 0===n?void 0:n.meta)||void 0===o?void 0:o.width)||1===e.node.type&&(!!(null===(u=null===(a=null==t?void 0:t.nodeSize)||void 0===a?void 0:a.node)||void 0===u?void 0:u.width)||!!r.width)||2===e.node.type&&!!(null===(s=null===(c=null==t?void 0:t.nodeSize)||void 0===c?void 0:c.bridge)||void 0===s?void 0:s.width)))}}))}(e,t),e.node.type===i.META&&function(e,t){const r=n(t),o=r.subScene.meta;Object.assign(e,o);const{nodeSep:a,rankSep:u,edgeSep:c,align:s}=r.graph.meta,d={nodesep:a,ranksep:u,edgesep:c,align:s};Object.assign(e.coreBox,function(e,n){const{ranksep:t,nodesep:r,edgesep:o,align:a}=n;Object.assign(e.graph(),{ranksep:t,nodesep:r,edgesep:o,align:a});const u=[];if(e.nodes().forEach((n=>{e.node(n).node.type!==i.BRIDGE&&u.push(n)})),!u.length)return{width:0,height:0};Tu(e);let c=1/0,s=1/0,d=-1/0,f=-1/0;return u.forEach((n=>{const t=e.node(n),r=.5*t.width,o=t.x-r,i=t.x+r;c=od?i:d;const a=.5*t.height,u=t.y-a,h=t.y+a;s=uf?h:f})),e.edges().forEach((n=>{const t=e.edge(n),r=e.node(t.metaEdge.v),o=e.node(t.metaEdge.w);if(3===t.points.length&&function(e){let n=ec(e[0],e[1]);for(let t=1;t1)return!1;n=r}return!0}(t.points)){if(null!=r){const e=r.expanded?r.x:nc(r);t.points[0].x=e}if(null!=o){const e=o.expanded?o.x:nc(o);t.points[2].x=e}t.points=[t.points[0],t.points[1]]}const i=t.points[t.points.length-2];null!=o&&(t.points[t.points.length-1]=tc(i,o));const a=t.points[1];null!=r&&(t.points[0]=tc(a,r)),t.points.forEach((e=>{c=e.xd?e.x:d,s=e.yf?e.y:f}))})),e.nodes().forEach((n=>{const t=e.node(n);t.x-=c,t.y-=s})),e.edges().forEach((n=>{e.edge(n).points.forEach((e=>{e.x-=c,e.y-=s}))})),{width:d-c,height:f-s}}(e.coreGraph,d));let f=0;e.coreGraph.nodeCount()>0&&f++;const h=f<=1?0:f;e.coreBox.width+=h+h,e.coreBox.height=o.labelHeight+e.coreBox.height,e.width=e.coreBox.width+o.paddingLeft+o.paddingRight,e.height=e.paddingTop+e.coreBox.height+e.paddingBottom}(e,t)}function ec(e,n){const t=n.x-e.x,r=n.y-e.y;return 180*Math.atan(r/t)/Math.PI}function nc(e){if(e.expanded)return e.x;return e.x-e.width/2+0+e.coreBox.width/2}function tc(e,n){const t=n.expanded?n.x:nc(n),r=n.y,o=e.x-t,i=e.y-r;let a,u,c=n.expanded?n.width:n.coreBox.width,s=n.expanded?n.height:n.coreBox.height;return Math.abs(i)*c/2>Math.abs(o)*s/2?(i<0&&(s=-s),a=0===i?0:s/2*o/i,u=s/2):(o<0&&(c=-c),a=c/2,u=0===o?0:c/2*i/o),{x:t+a,y:r+u}}function rc(n,t,r){var o,i,a,u;const c=n.nodes.filter(((e,n,t)=>t.findIndex((n=>n.id===e.id))!==n)).map((e=>e.id));if(c.length)throw new Error(`Duplicated ids found: ${c.join(\", \")}`);const s=function(e){const n={nodes:[]},t=e.compound,r=Object.keys(t||{}),o=new Map,i=(e,n=[])=>{if(o.has(e))return o.get(e);for(let o=0;oe.edges.filter((e=>e.w===n)).map((e=>({name:e.v})));return e.nodes.forEach((e=>{const t=e.id,r=[...i(t),t];let o=a(t);n.nodes.push({name:t,path:r,inputs:o,width:e.width,height:e.height,attr:Object.assign({},e)})})),n}(n),d=function(e,n){const t=(e,n)=>{for(let t of n.values())if(t.includes(e))return!0;return!1},r=(e,n=[])=>{if(0===Object.keys(e).length)return[...new Set(n)];const o=new Map(Object.keys(e).map((n=>[n,e[n]]))),i={};for(let[e,r]of o)t(e,o)?i[e]=r:n=n.concat(e,r);return r(i,n)};return r(e).filter((e=>n.includes(e)))}(n.compound||{},(null==t?void 0:t.expanded)||[]),f=function(e,n){return function(e){return new Ju(e)}(qu(zu(e),n))}(s,{rankDirection:(null===(i=null===(o=null==r?void 0:r.graph)||void 0===o?void 0:o.meta)||void 0===i?void 0:i.rankDir)||(null==t?void 0:t.rankDirection)||e.graph.meta.rankDir,align:(null===(u=null===(a=null==r?void 0:r.graph)||void 0===a?void 0:a.meta)||void 0===u?void 0:u.align)||e.graph.meta.align});return function(e,n){n.forEach((n=>{const t=e.getRenderInfoNodes().find((e=>e.displayName===n));let r=t&&t.node&&t.node.name||\"\";const o=e.getRenderNodeByName(r);if(!o)throw new Error(`No nodes found: ${r}`);o.expanded=!0,e.buildSubHierarchy(r)}))}(f,d),Zu(f.root,r),ac(f.root)}function oc(e,n=!1){const t=JSON.parse(JSON.stringify(e)),o={nodes:[t],edges:[...t.edges]};return t.nodes.forEach((function e(n){(0===n.type||1===n.type)&&o.nodes.push(n),0===n.type&&(o.edges=o.edges.concat(n.edges)),Array.isArray(n.nodes)&&n.nodes.forEach(e)})),n&&o.nodes.forEach((e=>{const n=o.nodes.find((n=>n.id===e.parentNodeName));if(n){const t=n.x-n.width/2+n.paddingLeft,o=n.y-n.height/2+n.labelHeight+n.paddingTop;n.id!==r&&(e.x+=t,e.y+=o),0===e.type&&e.edges.forEach((n=>{n.points.forEach((n=>{n.x+=e.x-e.width/2+e.paddingLeft,n.y+=e.y-e.height/2+e.labelHeight+e.paddingTop}))}))}})),o}function ic(e,n,t,o){var i,a;let u=[];const c=(null===(i=t.find((n=>n.id===e)))||void 0===i?void 0:i.path)||[],s=(null===(a=t.find((e=>e.id===n)))||void 0===a?void 0:a.path)||[],d=[r,...c].slice(0,c.length).reverse(),f=[r,...s].slice(0,s.length);return d.forEach((r=>{const i=t.find((e=>e.id===r));u=u.concat(i.edges.filter((t=>t.baseEdgeList.some((t=>t.v===((null==o?void 0:o.v)||e)&&t.w===((null==o?void 0:o.w)||n))))))})),f.filter((e=>!d.includes(e))).forEach((r=>{const i=t.find((e=>e.id===r));u=u.concat(i.edges.filter((t=>t.baseEdgeList.some((t=>t.v===((null==o?void 0:o.v)||e)&&t.w===((null==o?void 0:o.w)||n))))))})),u}function ac(e){const n=e.coreGraph.nodes().map((n=>e.coreGraph.node(n)));return Object.assign(Object.assign({},uc(e)),{expanded:e.expanded,nodes:e.expanded?(t=n,t.map((e=>e.node.type===i.META?ac(e):uc(e)))):[],edges:e.expanded?cc(e):[]});var t}function uc(e){return{id:e.node.name,name:e.node.name,type:e.node.type,cardinality:e.node.cardinality,attr:e.attr,parentNodeName:e.node.parentNode?e.node.parentNode.name:null,coreBox:Object.assign({},e.coreBox),x:e.x,y:e.y,width:e.width,height:e.height,radius:e.radius,labelHeight:e.labelHeight,labelOffset:e.labelOffset,outboxWidth:e.outboxWidth,paddingLeft:e.paddingLeft,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,path:e.node.path}}function cc(e){return e.coreGraph.edges().map((n=>({renderInfoEdge:e.coreGraph.edge(n),edge:n}))).filter((({renderInfoEdge:e})=>e.metaEdge)).map((({edge:n,renderInfoEdge:t})=>{const r=function(e,n){const t=n.points.map((e=>Object.assign({},e)));if(n.adjoiningMetaEdge){const r=n.adjoiningMetaEdge.points,o=n.metaEdge.inbound,i=o?r[r.length-1]:r[0],a=t[o?0:t.length-1],u=e.x-e.width/2,c=e.y-e.height/2,s=i.x-u,d=i.y-c,f=-e.paddingLeft,h=-(e.paddingTop+e.labelHeight);a.x=s+f,a.y=d+h}return t}(e,t);return{adjoiningEdge:t.adjoiningMetaEdge?{w:t.adjoiningMetaEdge.metaEdge.w,v:t.adjoiningMetaEdge.metaEdge.v}:null,inbound:t.metaEdge.inbound,w:n.w,v:n.v,points:r,weight:t.weight,baseEdgeList:t.metaEdge.baseEdgeList,parentNodeName:e.node.name}}))}export{o as BRIDGE_GRAPH_NAME,u as GraphType,c as HierarchyNodeType,a as InclusionType,e as LAYOUT_CONFIG,i as NodeType,r as ROOT_NAME,rc as buildGraph,oc as flatGraph,ic as getEdges,n as mergeConfig};\n//# sourceMappingURL=dagre-compound.es5.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DagreCompoundLayout = void 0;\nvar base_1 = require(\"./base\");\nvar dagre_compound_1 = require(\"dagre-compound\");\nvar util_1 = require(\"../util\");\nvar DagreCompoundLayout = /** @class */ (function (_super) {\n __extends(DagreCompoundLayout, _super);\n function DagreCompoundLayout(options) {\n var _this = _super.call(this) || this;\n /** layout 方向, 可选 TB, BT, LR, RL */\n _this.rankdir = 'TB';\n /** 节点水平间距(px) */\n _this.nodesep = 50;\n /** 边水平间距(px) */\n _this.edgesep = 5;\n /** 每一层节点之间间距 */\n _this.ranksep = 50;\n /** 是否保留布局连线的控制点 */\n _this.controlPoints = true;\n /** 是否保留使用布局计算的锚点 */\n _this.anchorPoint = true;\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n DagreCompoundLayout.prototype.getDefaultCfg = function () {\n return {\n rankdir: 'TB',\n align: undefined,\n begin: undefined,\n nodeSize: undefined,\n nodesep: 50,\n ranksep: 50,\n controlPoints: true,\n anchorPoint: true // 是否使用布局计算的锚点\n };\n };\n DagreCompoundLayout.prototype.init = function (data) {\n var hiddenNodes = data.hiddenNodes || []; // 被隐藏的节点\n var hiddenEdges = data.hiddenEdges || []; // 被隐藏的边\n var hiddenCombos = data.hiddenCombos || []; // 赋值 hiddenCombos\n // 确保此次排序按照用户输入顺序\n this.nodes = this.getDataByOrder((data.nodes || []).concat(hiddenNodes));\n this.edges = this.getDataByOrder((data.edges || []).concat(hiddenEdges));\n this.combos = (data.combos || []).concat(hiddenCombos.map(function (hc) { return (__assign(__assign({}, hc), { collapsed: true })); }));\n };\n DagreCompoundLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n if (!nodes)\n return;\n var _a = self.getLayoutConfig(), graphDef = _a.graphDef, graphOption = _a.graphOption, graphSettings = _a.graphSettings;\n var renderInfo = (0, dagre_compound_1.buildGraph)(graphDef, graphOption, graphSettings);\n var flattenedRenderInfo = (0, dagre_compound_1.flatGraph)(renderInfo, true); // 打平数据进行遍历\n this.updatePosition(flattenedRenderInfo);\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n /**\n * combo 模式下查找节点完整路径\n * @param nodeId\n * @private\n */\n DagreCompoundLayout.prototype.getNodePath = function (nodeId) {\n var self = this;\n var nodes = self.nodes, combos = self.combos;\n var targetNode = nodes.find(function (n) { return n.id === nodeId; });\n var findPath = function (comboId, fullPath) {\n if (fullPath === void 0) { fullPath = []; }\n var combo = combos.find(function (c) { return c.id === comboId; });\n if (combo) {\n fullPath.unshift(comboId);\n if (combo.parentId) {\n return findPath(combo.parentId, fullPath);\n }\n return fullPath;\n }\n return fullPath;\n };\n if (targetNode && targetNode.comboId) {\n return findPath(targetNode.comboId, [nodeId]);\n }\n return [nodeId];\n };\n /** 准备 dagre-compound 布局参数 */\n DagreCompoundLayout.prototype.getLayoutConfig = function () {\n var _a, _b, _c;\n var self = this;\n var nodes = self.nodes, edges = self.edges, combos = self.combos, nodeSize = self.nodeSize, rankdir = self.rankdir, align = self.align, edgesep = self.edgesep, nodesep = self.nodesep, ranksep = self.ranksep, settings = self.settings;\n var compound = (combos || []).reduce(function (pre, cur) {\n var matchedNodes = nodes.filter(function (n) { return n.comboId === cur.id; }).map(function (n) { return n.id; });\n var matchedCombos = (combos || []).filter(function (n) { return n.parentId === cur.id; }).map(function (n) { return n.id; });\n if (matchedNodes.length || matchedCombos.length) {\n pre[cur.id] = __spreadArray(__spreadArray([], matchedNodes, true), matchedCombos, true);\n }\n return pre;\n }, {});\n /** 计算 nodeSize */\n var nodeSizeFunc;\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d && d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n if ((0, util_1.isObject)(d.size)) {\n return [d.size.width || 40, d.size.height || 40];\n }\n return [d.size, d.size];\n }\n return [40, 40];\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function () { return nodeSize; };\n }\n else {\n nodeSizeFunc = function () { return [nodeSize, nodeSize]; };\n }\n /** 计算 comboSize */\n var comboSizeFunc = function (d) {\n if (d && d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n return [d.size, d.size];\n }\n return [80, 40];\n };\n // 接受 defaultCombo 设置的 size\n var _d = comboSizeFunc(combos === null || combos === void 0 ? void 0 : combos[0]), metaWidth = _d[0], metaHeight = _d[1];\n // 初始化 padding\n var subSceneMeta = (_b = (_a = self.graphSettings) === null || _a === void 0 ? void 0 : _a.subScene) === null || _b === void 0 ? void 0 : _b.meta;\n var _e = ((_c = combos.find(function (c) { return !c.collapsed; })) === null || _c === void 0 ? void 0 : _c.padding) || [20, 20, 20, 20], paddingTop = _e[0], paddingRight = _e[1], paddingBottom = _e[2], paddingLeft = _e[3];\n var graphDef = {\n compound: compound,\n nodes: __spreadArray([], (nodes || []).map(function (n) {\n var size = nodeSizeFunc(n);\n var width = size[0];\n var height = size[1];\n return __assign(__assign({}, n), { width: width, height: height });\n }), true),\n edges: __spreadArray([], (edges || []).map(function (e) { return (__assign(__assign({}, e), { v: e.source, w: e.target })); }), true)\n };\n // 需要展开的节点\n var graphOption = {\n expanded: (combos || []).filter(function (c) { return !c.collapsed; }).map(function (c) { return c.id; })\n };\n // dagre-compound 布局参数\n var graphMetaConfig = {\n graph: {\n meta: {\n align: align,\n rankDir: rankdir,\n nodeSep: nodesep,\n edgeSep: edgesep,\n rankSep: ranksep\n }\n },\n subScene: {\n meta: {\n paddingTop: paddingTop || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingTop) || 20,\n paddingRight: paddingRight || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingRight) || 20,\n paddingBottom: paddingBottom || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingBottom) || 20,\n paddingLeft: paddingLeft || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingLeft) || 20,\n labelHeight: 0\n }\n },\n nodeSize: {\n meta: {\n width: metaWidth,\n height: metaHeight\n }\n }\n };\n // 合并用户输入的内容\n var graphSettings = (0, dagre_compound_1.mergeConfig)(settings, __assign({}, (0, dagre_compound_1.mergeConfig)(graphMetaConfig, dagre_compound_1.LAYOUT_CONFIG)));\n self.graphSettings = graphSettings;\n return {\n graphDef: graphDef,\n graphOption: graphOption,\n graphSettings: graphSettings\n };\n };\n /** 更新节点与边位置 */\n DagreCompoundLayout.prototype.updatePosition = function (flattenedGraph) {\n var nodes = flattenedGraph.nodes, edges = flattenedGraph.edges;\n this.updateNodePosition(nodes, edges);\n this.updateEdgePosition(nodes, edges);\n };\n DagreCompoundLayout.prototype.getBegin = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var begin = self.begin;\n var dBegin = [0, 0];\n if (begin) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n flattenedNodes.forEach(function (node) {\n if (minX_1 > node.x)\n minX_1 = node.x;\n if (minY_1 > node.y)\n minY_1 = node.y;\n });\n flattenedEdges.forEach(function (edge) {\n edge.points.forEach(function (point) {\n if (minX_1 > point.x)\n minX_1 = point.x;\n if (minY_1 > point.y)\n minY_1 = point.y;\n });\n });\n dBegin[0] = begin[0] - minX_1;\n dBegin[1] = begin[1] - minY_1;\n }\n return dBegin;\n };\n DagreCompoundLayout.prototype.updateNodePosition = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var combos = self.combos, nodes = self.nodes, edges = self.edges, anchorPoint = self.anchorPoint, graphSettings = self.graphSettings;\n var dBegin = this.getBegin(flattenedNodes, flattenedEdges);\n flattenedNodes.forEach(function (node) {\n var _a;\n var x = node.x, y = node.y, id = node.id, type = node.type, coreBox = node.coreBox;\n if (type === dagre_compound_1.HierarchyNodeType.META && id !== dagre_compound_1.ROOT_NAME) {\n var i = combos.findIndex(function (item) { return item.id === id; });\n var subSceneMeta = (_a = graphSettings === null || graphSettings === void 0 ? void 0 : graphSettings.subScene) === null || _a === void 0 ? void 0 : _a.meta;\n // 将布局生成的 combo 位置暂存至 offsetX offsetY\n combos[i].offsetX = x + dBegin[0];\n combos[i].offsetY = y + dBegin[1];\n combos[i].fixSize = [coreBox.width, coreBox.height];\n combos[i].fixCollapseSize = [coreBox.width, coreBox.height];\n // 如果设置了收起时隐藏 padding,则手动优化 combo padding 信息,展开的话则恢复\n if (!node.expanded) {\n combos[i].padding = [0, 0, 0, 0];\n }\n else {\n combos[i].padding = [\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingTop,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingRight,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingBottom,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingLeft\n ];\n }\n }\n else if (type === dagre_compound_1.HierarchyNodeType.OP) {\n var i = nodes.findIndex(function (item) { return item.id === id; });\n nodes[i].x = x + dBegin[0];\n nodes[i].y = y + dBegin[1];\n if (anchorPoint) {\n var anchorPoints_1 = [];\n var outEdges = flattenedEdges.filter(function (e) { return e.v === id; });\n var inEdges = flattenedEdges.filter(function (e) { return e.w === id; });\n // 指定出边锚点,锚点中心点为 [0.5, 0.5]\n if (outEdges.length > 0) {\n outEdges.forEach(function (outEdge) {\n var firstPoint = outEdge.points[0];\n var anchorPointX = (firstPoint.x - x) / node.width + 0.5;\n var anchorPointY = (firstPoint.y - y) / node.height + 0.5;\n anchorPoints_1.push([anchorPointX, anchorPointY]);\n // 出边对应 source 边锚点\n outEdge.baseEdgeList.forEach(function (baseEdge) {\n var edge = edges.find(function (e) { return e.source === baseEdge.v && e.target === baseEdge.w; });\n if (edge) {\n edge.sourceAnchor = anchorPoints_1.length - 1;\n }\n });\n });\n }\n // 指定入边锚点\n if (inEdges.length > 0) {\n inEdges.forEach(function (inEdge) {\n var lastPoint = inEdge.points[inEdge.points.length - 1];\n var anchorPointX = (lastPoint.x - x) / node.width + 0.5;\n var anchorPointY = (lastPoint.y - y) / node.height + 0.5;\n anchorPoints_1.push([anchorPointX, anchorPointY]);\n // 出边对应 source 锚点\n inEdge.baseEdgeList.forEach(function (baseEdge) {\n var edge = edges.find(function (e) { return e.source === baseEdge.v && e.target === baseEdge.w; });\n if (edge) {\n edge.targetAnchor = anchorPoints_1.length - 1;\n }\n });\n });\n }\n nodes[i].anchorPoints = anchorPoints_1.length > 0 ? anchorPoints_1 : nodes[i].anchorPoints || [];\n }\n }\n });\n };\n DagreCompoundLayout.prototype.updateEdgePosition = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var combos = self.combos, edges = self.edges, controlPoints = self.controlPoints;\n var dBegin = this.getBegin(flattenedNodes, flattenedEdges);\n if (controlPoints) {\n combos.forEach(function (combo) {\n combo.inEdges = [];\n combo.outEdges = [];\n });\n edges.forEach(function (sourceEdge) {\n var _a, _b, _c, _d;\n var sourceNode = flattenedNodes.find(function (v) { return v.id === sourceEdge.source; });\n var targetNode = flattenedNodes.find(function (v) { return v.id === sourceEdge.target; });\n // Combo 收起状态,dagre-compound 不会渲染该节点,边需要使用到 group 的边作为补充\n var points = [];\n var sortedEdges = [];\n if (sourceNode && targetNode) {\n sortedEdges = (0, dagre_compound_1.getEdges)(sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id, targetNode === null || targetNode === void 0 ? void 0 : targetNode.id, flattenedNodes);\n }\n else if (!sourceNode || !targetNode) {\n /** 存在收起节点时,需要重新计算边的 controlPoints,确保线正常 */\n // 情况1:目标节点被收起了,向上寻找该节点最近一个存在的父节点\n var sourceNodePath = self.getNodePath(sourceEdge.source);\n var targetNodePath = self.getNodePath(sourceEdge.target);\n var lastExistingSource_1 = sourceNodePath\n .reverse()\n .slice(!sourceNode ? 1 : 0)\n .find(function (parentId) { return flattenedNodes.find(function (fNode) { return fNode.id === parentId; }); });\n var lastExistingTarget_1 = targetNodePath\n .reverse()\n .slice(!targetNode ? 1 : 0)\n .find(function (parentId) { return flattenedNodes.find(function (fNode) { return fNode.id === parentId; }); });\n sourceNode = flattenedNodes.find(function (v) { return v.id === lastExistingSource_1; });\n targetNode = flattenedNodes.find(function (v) { return v.id === lastExistingTarget_1; });\n sortedEdges = (0, dagre_compound_1.getEdges)(sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id, targetNode === null || targetNode === void 0 ? void 0 : targetNode.id, flattenedNodes, { v: sourceEdge.source, w: sourceEdge.target });\n }\n points = sortedEdges.reduce(function (pre, cur) {\n return __spreadArray(__spreadArray([], pre, true), cur.points.map(function (p) {\n return __assign(__assign({}, p), { x: p.x + dBegin[0], y: p.y + dBegin[1] });\n }), true);\n }, []);\n // 取消首尾节点\n points = points.slice(1, -1);\n sourceEdge.controlPoints = points;\n if ((targetNode === null || targetNode === void 0 ? void 0 : targetNode.type) === dagre_compound_1.NodeType.META) {\n // combo 节点控制点\n var i = combos.findIndex(function (item) { return item.id === (targetNode === null || targetNode === void 0 ? void 0 : targetNode.id); });\n if (!combos[i] || ((_a = combos[i].inEdges) === null || _a === void 0 ? void 0 : _a.some(function (inEdge) { return inEdge.source === sourceNode.id && inEdge.target === targetNode.id; }))) {\n return;\n }\n (_b = combos[i].inEdges) === null || _b === void 0 ? void 0 : _b.push({\n source: sourceNode.id,\n target: targetNode.id,\n controlPoints: points\n });\n }\n if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type) === dagre_compound_1.NodeType.META) {\n var i = combos.findIndex(function (item) { return item.id === (sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id); });\n if (!combos[i] || ((_c = combos[i].outEdges) === null || _c === void 0 ? void 0 : _c.some(function (oedge) { return oedge.source === sourceNode.id && oedge.target === targetNode.id; }))) {\n return;\n }\n (_d = combos[i].outEdges) === null || _d === void 0 ? void 0 : _d.push({\n source: sourceNode.id,\n target: targetNode.id,\n controlPoints: points\n });\n }\n });\n }\n };\n DagreCompoundLayout.prototype.getType = function () {\n return 'dagreCompound';\n };\n /**\n * 确保布局使用的数据与用户输入数据顺序一致\n * 通过 layoutOrder 排序 节点 与 边\n * @param list\n * @private\n */\n DagreCompoundLayout.prototype.getDataByOrder = function (list) {\n if (list.every(function (n) { return n.layoutOrder !== undefined; })) {\n // 所有数据均设置过索引,表示仅布局,数据未变化,无需处理\n }\n else {\n // 首次布局或动态添加删减节点时重新赋值\n list.forEach(function (n, i) {\n n.layoutOrder = i;\n });\n }\n // 按照 layoutOrder 排序\n return list.sort(function (pre, cur) { return pre.layoutOrder - cur.layoutOrder; });\n };\n return DagreCompoundLayout;\n}(base_1.Base));\nexports.DagreCompoundLayout = DagreCompoundLayout;\n//# sourceMappingURL=dagreCompound.js.map","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toString = Object.prototype.toString;\n/**\n * Checks if an object is an instance of an Array (array or typed array, except those that contain bigint values).\n *\n * @param value - Object to check.\n * @returns True if the object is an array or a typed array.\n */\nexport function isAnyArray(value) {\n const tag = toString.call(value);\n return tag.endsWith('Array]') && !tag.includes('Big');\n}\n//# sourceMappingURL=index.js.map","import { isAnyArray } from 'is-any-array';\n\nfunction max(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n }\n\n if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var _options$fromIndex = options.fromIndex,\n fromIndex = _options$fromIndex === void 0 ? 0 : _options$fromIndex,\n _options$toIndex = options.toIndex,\n toIndex = _options$toIndex === void 0 ? input.length : _options$toIndex;\n\n if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {\n throw new Error('fromIndex must be a positive integer smaller than length');\n }\n\n if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {\n throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');\n }\n\n var maxValue = input[fromIndex];\n\n for (var i = fromIndex + 1; i < toIndex; i++) {\n if (input[i] > maxValue) maxValue = input[i];\n }\n\n return maxValue;\n}\n\nexport { max as default };\n","import { isAnyArray } from 'is-any-array';\n\nfunction min(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n }\n\n if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var _options$fromIndex = options.fromIndex,\n fromIndex = _options$fromIndex === void 0 ? 0 : _options$fromIndex,\n _options$toIndex = options.toIndex,\n toIndex = _options$toIndex === void 0 ? input.length : _options$toIndex;\n\n if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {\n throw new Error('fromIndex must be a positive integer smaller than length');\n }\n\n if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {\n throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');\n }\n\n var minValue = input[fromIndex];\n\n for (var i = fromIndex + 1; i < toIndex; i++) {\n if (input[i] < minValue) minValue = input[i];\n }\n\n return minValue;\n}\n\nexport { min as default };\n","import { isAnyArray } from 'is-any-array';\nimport max from 'ml-array-max';\nimport min from 'ml-array-min';\n\nfunction rescale(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n } else if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var output;\n\n if (options.output !== undefined) {\n if (!isAnyArray(options.output)) {\n throw new TypeError('output option must be an array if specified');\n }\n\n output = options.output;\n } else {\n output = new Array(input.length);\n }\n\n var currentMin = min(input);\n var currentMax = max(input);\n\n if (currentMin === currentMax) {\n throw new RangeError('minimum and maximum input values are equal. Cannot rescale a constant array');\n }\n\n var _options$min = options.min,\n minValue = _options$min === void 0 ? options.autoMinMax ? currentMin : 0 : _options$min,\n _options$max = options.max,\n maxValue = _options$max === void 0 ? options.autoMinMax ? currentMax : 1 : _options$max;\n\n if (minValue >= maxValue) {\n throw new RangeError('min option must be smaller than max option');\n }\n\n var factor = (maxValue - minValue) / (currentMax - currentMin);\n\n for (var i = 0; i < input.length; i++) {\n output[i] = (input[i] - currentMin) * factor + minValue;\n }\n\n return output;\n}\n\nexport { rescale as default };\n","const indent = ' '.repeat(2);\nconst indentData = ' '.repeat(4);\n\nexport function inspectMatrix() {\n return inspectMatrixWithOptions(this);\n}\n\nexport function inspectMatrixWithOptions(matrix, options = {}) {\n const { maxRows = 15, maxColumns = 10, maxNumSize = 8 } = options;\n return `${matrix.constructor.name} {\n${indent}[\n${indentData}${inspectData(matrix, maxRows, maxColumns, maxNumSize)}\n${indent}]\n${indent}rows: ${matrix.rows}\n${indent}columns: ${matrix.columns}\n}`;\n}\n\nfunction inspectData(matrix, maxRows, maxColumns, maxNumSize) {\n const { rows, columns } = matrix;\n const maxI = Math.min(rows, maxRows);\n const maxJ = Math.min(columns, maxColumns);\n const result = [];\n for (let i = 0; i < maxI; i++) {\n let line = [];\n for (let j = 0; j < maxJ; j++) {\n line.push(formatNumber(matrix.get(i, j), maxNumSize));\n }\n result.push(`${line.join(' ')}`);\n }\n if (maxJ !== columns) {\n result[result.length - 1] += ` ... ${columns - maxColumns} more columns`;\n }\n if (maxI !== rows) {\n result.push(`... ${rows - maxRows} more rows`);\n }\n return result.join(`\\n${indentData}`);\n}\n\nfunction formatNumber(num, maxNumSize) {\n const numStr = String(num);\n if (numStr.length <= maxNumSize) {\n return numStr.padEnd(maxNumSize, ' ');\n }\n const precise = num.toPrecision(maxNumSize - 2);\n if (precise.length <= maxNumSize) {\n return precise;\n }\n const exponential = num.toExponential(maxNumSize - 2);\n const eIndex = exponential.indexOf('e');\n const e = exponential.slice(eIndex);\n return exponential.slice(0, maxNumSize - e.length) + e;\n}\n","export function installMathOperations(AbstractMatrix, Matrix) {\n AbstractMatrix.prototype.add = function add(value) {\n if (typeof value === 'number') return this.addS(value);\n return this.addM(value);\n };\n\n AbstractMatrix.prototype.addS = function addS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.addM = function addM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.add = function add(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.add(value);\n };\n\n AbstractMatrix.prototype.sub = function sub(value) {\n if (typeof value === 'number') return this.subS(value);\n return this.subM(value);\n };\n\n AbstractMatrix.prototype.subS = function subS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.subM = function subM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.sub = function sub(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sub(value);\n };\n AbstractMatrix.prototype.subtract = AbstractMatrix.prototype.sub;\n AbstractMatrix.prototype.subtractS = AbstractMatrix.prototype.subS;\n AbstractMatrix.prototype.subtractM = AbstractMatrix.prototype.subM;\n AbstractMatrix.subtract = AbstractMatrix.sub;\n\n AbstractMatrix.prototype.mul = function mul(value) {\n if (typeof value === 'number') return this.mulS(value);\n return this.mulM(value);\n };\n\n AbstractMatrix.prototype.mulS = function mulS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.mulM = function mulM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.mul = function mul(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.mul(value);\n };\n AbstractMatrix.prototype.multiply = AbstractMatrix.prototype.mul;\n AbstractMatrix.prototype.multiplyS = AbstractMatrix.prototype.mulS;\n AbstractMatrix.prototype.multiplyM = AbstractMatrix.prototype.mulM;\n AbstractMatrix.multiply = AbstractMatrix.mul;\n\n AbstractMatrix.prototype.div = function div(value) {\n if (typeof value === 'number') return this.divS(value);\n return this.divM(value);\n };\n\n AbstractMatrix.prototype.divS = function divS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.divM = function divM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.div = function div(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.div(value);\n };\n AbstractMatrix.prototype.divide = AbstractMatrix.prototype.div;\n AbstractMatrix.prototype.divideS = AbstractMatrix.prototype.divS;\n AbstractMatrix.prototype.divideM = AbstractMatrix.prototype.divM;\n AbstractMatrix.divide = AbstractMatrix.div;\n\n AbstractMatrix.prototype.mod = function mod(value) {\n if (typeof value === 'number') return this.modS(value);\n return this.modM(value);\n };\n\n AbstractMatrix.prototype.modS = function modS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) % value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.modM = function modM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) % matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.mod = function mod(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.mod(value);\n };\n AbstractMatrix.prototype.modulus = AbstractMatrix.prototype.mod;\n AbstractMatrix.prototype.modulusS = AbstractMatrix.prototype.modS;\n AbstractMatrix.prototype.modulusM = AbstractMatrix.prototype.modM;\n AbstractMatrix.modulus = AbstractMatrix.mod;\n\n AbstractMatrix.prototype.and = function and(value) {\n if (typeof value === 'number') return this.andS(value);\n return this.andM(value);\n };\n\n AbstractMatrix.prototype.andS = function andS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) & value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.andM = function andM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) & matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.and = function and(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.and(value);\n };\n\n AbstractMatrix.prototype.or = function or(value) {\n if (typeof value === 'number') return this.orS(value);\n return this.orM(value);\n };\n\n AbstractMatrix.prototype.orS = function orS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) | value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.orM = function orM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) | matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.or = function or(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.or(value);\n };\n\n AbstractMatrix.prototype.xor = function xor(value) {\n if (typeof value === 'number') return this.xorS(value);\n return this.xorM(value);\n };\n\n AbstractMatrix.prototype.xorS = function xorS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) ^ value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.xorM = function xorM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) ^ matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.xor = function xor(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.xor(value);\n };\n\n AbstractMatrix.prototype.leftShift = function leftShift(value) {\n if (typeof value === 'number') return this.leftShiftS(value);\n return this.leftShiftM(value);\n };\n\n AbstractMatrix.prototype.leftShiftS = function leftShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) << value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.leftShiftM = function leftShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) << matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.leftShift = function leftShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.leftShift(value);\n };\n\n AbstractMatrix.prototype.signPropagatingRightShift = function signPropagatingRightShift(value) {\n if (typeof value === 'number') return this.signPropagatingRightShiftS(value);\n return this.signPropagatingRightShiftM(value);\n };\n\n AbstractMatrix.prototype.signPropagatingRightShiftS = function signPropagatingRightShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >> value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.signPropagatingRightShiftM = function signPropagatingRightShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >> matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.signPropagatingRightShift = function signPropagatingRightShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.signPropagatingRightShift(value);\n };\n\n AbstractMatrix.prototype.rightShift = function rightShift(value) {\n if (typeof value === 'number') return this.rightShiftS(value);\n return this.rightShiftM(value);\n };\n\n AbstractMatrix.prototype.rightShiftS = function rightShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >>> value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.rightShiftM = function rightShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >>> matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.rightShift = function rightShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.rightShift(value);\n };\n AbstractMatrix.prototype.zeroFillRightShift = AbstractMatrix.prototype.rightShift;\n AbstractMatrix.prototype.zeroFillRightShiftS = AbstractMatrix.prototype.rightShiftS;\n AbstractMatrix.prototype.zeroFillRightShiftM = AbstractMatrix.prototype.rightShiftM;\n AbstractMatrix.zeroFillRightShift = AbstractMatrix.rightShift;\n\n AbstractMatrix.prototype.not = function not() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, ~(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.not = function not(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.not();\n };\n\n AbstractMatrix.prototype.abs = function abs() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.abs(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.abs = function abs(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.abs();\n };\n\n AbstractMatrix.prototype.acos = function acos() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.acos(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.acos = function acos(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.acos();\n };\n\n AbstractMatrix.prototype.acosh = function acosh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.acosh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.acosh = function acosh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.acosh();\n };\n\n AbstractMatrix.prototype.asin = function asin() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.asin(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.asin = function asin(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.asin();\n };\n\n AbstractMatrix.prototype.asinh = function asinh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.asinh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.asinh = function asinh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.asinh();\n };\n\n AbstractMatrix.prototype.atan = function atan() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.atan(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.atan = function atan(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.atan();\n };\n\n AbstractMatrix.prototype.atanh = function atanh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.atanh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.atanh = function atanh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.atanh();\n };\n\n AbstractMatrix.prototype.cbrt = function cbrt() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cbrt(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cbrt = function cbrt(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cbrt();\n };\n\n AbstractMatrix.prototype.ceil = function ceil() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.ceil(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.ceil = function ceil(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.ceil();\n };\n\n AbstractMatrix.prototype.clz32 = function clz32() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.clz32(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.clz32 = function clz32(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.clz32();\n };\n\n AbstractMatrix.prototype.cos = function cos() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cos(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cos = function cos(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cos();\n };\n\n AbstractMatrix.prototype.cosh = function cosh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cosh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cosh = function cosh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cosh();\n };\n\n AbstractMatrix.prototype.exp = function exp() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.exp(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.exp = function exp(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.exp();\n };\n\n AbstractMatrix.prototype.expm1 = function expm1() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.expm1(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.expm1 = function expm1(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.expm1();\n };\n\n AbstractMatrix.prototype.floor = function floor() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.floor(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.floor = function floor(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.floor();\n };\n\n AbstractMatrix.prototype.fround = function fround() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.fround(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.fround = function fround(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.fround();\n };\n\n AbstractMatrix.prototype.log = function log() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log = function log(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log();\n };\n\n AbstractMatrix.prototype.log1p = function log1p() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log1p(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log1p = function log1p(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log1p();\n };\n\n AbstractMatrix.prototype.log10 = function log10() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log10(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log10 = function log10(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log10();\n };\n\n AbstractMatrix.prototype.log2 = function log2() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log2(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log2 = function log2(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log2();\n };\n\n AbstractMatrix.prototype.round = function round() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.round(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.round = function round(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.round();\n };\n\n AbstractMatrix.prototype.sign = function sign() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sign(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sign = function sign(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sign();\n };\n\n AbstractMatrix.prototype.sin = function sin() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sin(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sin = function sin(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sin();\n };\n\n AbstractMatrix.prototype.sinh = function sinh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sinh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sinh = function sinh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sinh();\n };\n\n AbstractMatrix.prototype.sqrt = function sqrt() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sqrt(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sqrt = function sqrt(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sqrt();\n };\n\n AbstractMatrix.prototype.tan = function tan() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.tan(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.tan = function tan(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.tan();\n };\n\n AbstractMatrix.prototype.tanh = function tanh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.tanh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.tanh = function tanh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.tanh();\n };\n\n AbstractMatrix.prototype.trunc = function trunc() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.trunc(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.trunc = function trunc(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.trunc();\n };\n\n AbstractMatrix.pow = function pow(matrix, arg0) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.pow(arg0);\n };\n\n AbstractMatrix.prototype.pow = function pow(value) {\n if (typeof value === 'number') return this.powS(value);\n return this.powM(value);\n };\n\n AbstractMatrix.prototype.powS = function powS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.pow(this.get(i, j), value));\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.powM = function powM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.pow(this.get(i, j), matrix.get(i, j)));\n }\n }\n return this;\n };\n}\n","/**\n * @private\n * Check that a row index is not out of bounds\n * @param {Matrix} matrix\n * @param {number} index\n * @param {boolean} [outer]\n */\nexport function checkRowIndex(matrix, index, outer) {\n let max = outer ? matrix.rows : matrix.rows - 1;\n if (index < 0 || index > max) {\n throw new RangeError('Row index out of range');\n }\n}\n\n/**\n * @private\n * Check that a column index is not out of bounds\n * @param {Matrix} matrix\n * @param {number} index\n * @param {boolean} [outer]\n */\nexport function checkColumnIndex(matrix, index, outer) {\n let max = outer ? matrix.columns : matrix.columns - 1;\n if (index < 0 || index > max) {\n throw new RangeError('Column index out of range');\n }\n}\n\n/**\n * @private\n * Check that the provided vector is an array with the right length\n * @param {Matrix} matrix\n * @param {Array|Matrix} vector\n * @return {Array}\n * @throws {RangeError}\n */\nexport function checkRowVector(matrix, vector) {\n if (vector.to1DArray) {\n vector = vector.to1DArray();\n }\n if (vector.length !== matrix.columns) {\n throw new RangeError(\n 'vector size must be the same as the number of columns',\n );\n }\n return vector;\n}\n\n/**\n * @private\n * Check that the provided vector is an array with the right length\n * @param {Matrix} matrix\n * @param {Array|Matrix} vector\n * @return {Array}\n * @throws {RangeError}\n */\nexport function checkColumnVector(matrix, vector) {\n if (vector.to1DArray) {\n vector = vector.to1DArray();\n }\n if (vector.length !== matrix.rows) {\n throw new RangeError('vector size must be the same as the number of rows');\n }\n return vector;\n}\n\nexport function checkIndices(matrix, rowIndices, columnIndices) {\n return {\n row: checkRowIndices(matrix, rowIndices),\n column: checkColumnIndices(matrix, columnIndices),\n };\n}\n\nexport function checkRowIndices(matrix, rowIndices) {\n if (typeof rowIndices !== 'object') {\n throw new TypeError('unexpected type for row indices');\n }\n\n let rowOut = rowIndices.some((r) => {\n return r < 0 || r >= matrix.rows;\n });\n\n if (rowOut) {\n throw new RangeError('row indices are out of range');\n }\n\n if (!Array.isArray(rowIndices)) rowIndices = Array.from(rowIndices);\n\n return rowIndices;\n}\n\nexport function checkColumnIndices(matrix, columnIndices) {\n if (typeof columnIndices !== 'object') {\n throw new TypeError('unexpected type for column indices');\n }\n\n let columnOut = columnIndices.some((c) => {\n return c < 0 || c >= matrix.columns;\n });\n\n if (columnOut) {\n throw new RangeError('column indices are out of range');\n }\n if (!Array.isArray(columnIndices)) columnIndices = Array.from(columnIndices);\n\n return columnIndices;\n}\n\nexport function checkRange(matrix, startRow, endRow, startColumn, endColumn) {\n if (arguments.length !== 5) {\n throw new RangeError('expected 4 arguments');\n }\n checkNumber('startRow', startRow);\n checkNumber('endRow', endRow);\n checkNumber('startColumn', startColumn);\n checkNumber('endColumn', endColumn);\n if (\n startRow > endRow ||\n startColumn > endColumn ||\n startRow < 0 ||\n startRow >= matrix.rows ||\n endRow < 0 ||\n endRow >= matrix.rows ||\n startColumn < 0 ||\n startColumn >= matrix.columns ||\n endColumn < 0 ||\n endColumn >= matrix.columns\n ) {\n throw new RangeError('Submatrix indices are out of range');\n }\n}\n\nexport function newArray(length, value = 0) {\n let array = [];\n for (let i = 0; i < length; i++) {\n array.push(value);\n }\n return array;\n}\n\nfunction checkNumber(name, value) {\n if (typeof value !== 'number') {\n throw new TypeError(`${name} must be a number`);\n }\n}\n","import { newArray } from './util';\n\nexport function sumByRow(matrix) {\n let sum = newArray(matrix.rows);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[i] += matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function sumByColumn(matrix) {\n let sum = newArray(matrix.columns);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[j] += matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function sumAll(matrix) {\n let v = 0;\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n v += matrix.get(i, j);\n }\n }\n return v;\n}\n\nexport function productByRow(matrix) {\n let sum = newArray(matrix.rows, 1);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[i] *= matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function productByColumn(matrix) {\n let sum = newArray(matrix.columns, 1);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[j] *= matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function productAll(matrix) {\n let v = 1;\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n v *= matrix.get(i, j);\n }\n }\n return v;\n}\n\nexport function varianceByRow(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const variance = [];\n\n for (let i = 0; i < rows; i++) {\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let j = 0; j < cols; j++) {\n x = matrix.get(i, j) - mean[i];\n sum1 += x;\n sum2 += x * x;\n }\n if (unbiased) {\n variance.push((sum2 - (sum1 * sum1) / cols) / (cols - 1));\n } else {\n variance.push((sum2 - (sum1 * sum1) / cols) / cols);\n }\n }\n return variance;\n}\n\nexport function varianceByColumn(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const variance = [];\n\n for (let j = 0; j < cols; j++) {\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let i = 0; i < rows; i++) {\n x = matrix.get(i, j) - mean[j];\n sum1 += x;\n sum2 += x * x;\n }\n if (unbiased) {\n variance.push((sum2 - (sum1 * sum1) / rows) / (rows - 1));\n } else {\n variance.push((sum2 - (sum1 * sum1) / rows) / rows);\n }\n }\n return variance;\n}\n\nexport function varianceAll(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const size = rows * cols;\n\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < cols; j++) {\n x = matrix.get(i, j) - mean;\n sum1 += x;\n sum2 += x * x;\n }\n }\n if (unbiased) {\n return (sum2 - (sum1 * sum1) / size) / (size - 1);\n } else {\n return (sum2 - (sum1 * sum1) / size) / size;\n }\n}\n\nexport function centerByRow(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean[i]);\n }\n }\n}\n\nexport function centerByColumn(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean[j]);\n }\n }\n}\n\nexport function centerAll(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean);\n }\n }\n}\n\nexport function getScaleByRow(matrix) {\n const scale = [];\n for (let i = 0; i < matrix.rows; i++) {\n let sum = 0;\n for (let j = 0; j < matrix.columns; j++) {\n sum += Math.pow(matrix.get(i, j), 2) / (matrix.columns - 1);\n }\n scale.push(Math.sqrt(sum));\n }\n return scale;\n}\n\nexport function scaleByRow(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale[i]);\n }\n }\n}\n\nexport function getScaleByColumn(matrix) {\n const scale = [];\n for (let j = 0; j < matrix.columns; j++) {\n let sum = 0;\n for (let i = 0; i < matrix.rows; i++) {\n sum += Math.pow(matrix.get(i, j), 2) / (matrix.rows - 1);\n }\n scale.push(Math.sqrt(sum));\n }\n return scale;\n}\n\nexport function scaleByColumn(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale[j]);\n }\n }\n}\n\nexport function getScaleAll(matrix) {\n const divider = matrix.size - 1;\n let sum = 0;\n for (let j = 0; j < matrix.columns; j++) {\n for (let i = 0; i < matrix.rows; i++) {\n sum += Math.pow(matrix.get(i, j), 2) / divider;\n }\n }\n return Math.sqrt(sum);\n}\n\nexport function scaleAll(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale);\n }\n }\n}\n","import rescale from 'ml-array-rescale';\n\nimport { inspectMatrix, inspectMatrixWithOptions } from './inspect';\nimport { installMathOperations } from './mathOperations';\nimport {\n sumByRow,\n sumByColumn,\n sumAll,\n productByRow,\n productByColumn,\n productAll,\n varianceByRow,\n varianceByColumn,\n varianceAll,\n centerByRow,\n centerByColumn,\n centerAll,\n scaleByRow,\n scaleByColumn,\n scaleAll,\n getScaleByRow,\n getScaleByColumn,\n getScaleAll,\n} from './stat';\nimport {\n checkRowVector,\n checkRowIndex,\n checkColumnIndex,\n checkColumnVector,\n checkRange,\n checkIndices,\n} from './util';\n\nexport class AbstractMatrix {\n static from1DArray(newRows, newColumns, newData) {\n let length = newRows * newColumns;\n if (length !== newData.length) {\n throw new RangeError('data length does not match given dimensions');\n }\n let newMatrix = new Matrix(newRows, newColumns);\n for (let row = 0; row < newRows; row++) {\n for (let column = 0; column < newColumns; column++) {\n newMatrix.set(row, column, newData[row * newColumns + column]);\n }\n }\n return newMatrix;\n }\n\n static rowVector(newData) {\n let vector = new Matrix(1, newData.length);\n for (let i = 0; i < newData.length; i++) {\n vector.set(0, i, newData[i]);\n }\n return vector;\n }\n\n static columnVector(newData) {\n let vector = new Matrix(newData.length, 1);\n for (let i = 0; i < newData.length; i++) {\n vector.set(i, 0, newData[i]);\n }\n return vector;\n }\n\n static zeros(rows, columns) {\n return new Matrix(rows, columns);\n }\n\n static ones(rows, columns) {\n return new Matrix(rows, columns).fill(1);\n }\n\n static rand(rows, columns, options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { random = Math.random } = options;\n let matrix = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n matrix.set(i, j, random());\n }\n }\n return matrix;\n }\n\n static randInt(rows, columns, options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1000, random = Math.random } = options;\n if (!Number.isInteger(min)) throw new TypeError('min must be an integer');\n if (!Number.isInteger(max)) throw new TypeError('max must be an integer');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let interval = max - min;\n let matrix = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n let value = min + Math.round(random() * interval);\n matrix.set(i, j, value);\n }\n }\n return matrix;\n }\n\n static eye(rows, columns, value) {\n if (columns === undefined) columns = rows;\n if (value === undefined) value = 1;\n let min = Math.min(rows, columns);\n let matrix = this.zeros(rows, columns);\n for (let i = 0; i < min; i++) {\n matrix.set(i, i, value);\n }\n return matrix;\n }\n\n static diag(data, rows, columns) {\n let l = data.length;\n if (rows === undefined) rows = l;\n if (columns === undefined) columns = rows;\n let min = Math.min(l, rows, columns);\n let matrix = this.zeros(rows, columns);\n for (let i = 0; i < min; i++) {\n matrix.set(i, i, data[i]);\n }\n return matrix;\n }\n\n static min(matrix1, matrix2) {\n matrix1 = this.checkMatrix(matrix1);\n matrix2 = this.checkMatrix(matrix2);\n let rows = matrix1.rows;\n let columns = matrix1.columns;\n let result = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n result.set(i, j, Math.min(matrix1.get(i, j), matrix2.get(i, j)));\n }\n }\n return result;\n }\n\n static max(matrix1, matrix2) {\n matrix1 = this.checkMatrix(matrix1);\n matrix2 = this.checkMatrix(matrix2);\n let rows = matrix1.rows;\n let columns = matrix1.columns;\n let result = new this(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n result.set(i, j, Math.max(matrix1.get(i, j), matrix2.get(i, j)));\n }\n }\n return result;\n }\n\n static checkMatrix(value) {\n return AbstractMatrix.isMatrix(value) ? value : new Matrix(value);\n }\n\n static isMatrix(value) {\n return value != null && value.klass === 'Matrix';\n }\n\n get size() {\n return this.rows * this.columns;\n }\n\n apply(callback) {\n if (typeof callback !== 'function') {\n throw new TypeError('callback must be a function');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n callback.call(this, i, j);\n }\n }\n return this;\n }\n\n to1DArray() {\n let array = [];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n array.push(this.get(i, j));\n }\n }\n return array;\n }\n\n to2DArray() {\n let copy = [];\n for (let i = 0; i < this.rows; i++) {\n copy.push([]);\n for (let j = 0; j < this.columns; j++) {\n copy[i].push(this.get(i, j));\n }\n }\n return copy;\n }\n\n toJSON() {\n return this.to2DArray();\n }\n\n isRowVector() {\n return this.rows === 1;\n }\n\n isColumnVector() {\n return this.columns === 1;\n }\n\n isVector() {\n return this.rows === 1 || this.columns === 1;\n }\n\n isSquare() {\n return this.rows === this.columns;\n }\n\n isSymmetric() {\n if (this.isSquare()) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j <= i; j++) {\n if (this.get(i, j) !== this.get(j, i)) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }\n\n isEchelonForm() {\n let i = 0;\n let j = 0;\n let previousColumn = -1;\n let isEchelonForm = true;\n let checked = false;\n while (i < this.rows && isEchelonForm) {\n j = 0;\n checked = false;\n while (j < this.columns && checked === false) {\n if (this.get(i, j) === 0) {\n j++;\n } else if (this.get(i, j) === 1 && j > previousColumn) {\n checked = true;\n previousColumn = j;\n } else {\n isEchelonForm = false;\n checked = true;\n }\n }\n i++;\n }\n return isEchelonForm;\n }\n\n isReducedEchelonForm() {\n let i = 0;\n let j = 0;\n let previousColumn = -1;\n let isReducedEchelonForm = true;\n let checked = false;\n while (i < this.rows && isReducedEchelonForm) {\n j = 0;\n checked = false;\n while (j < this.columns && checked === false) {\n if (this.get(i, j) === 0) {\n j++;\n } else if (this.get(i, j) === 1 && j > previousColumn) {\n checked = true;\n previousColumn = j;\n } else {\n isReducedEchelonForm = false;\n checked = true;\n }\n }\n for (let k = j + 1; k < this.rows; k++) {\n if (this.get(i, k) !== 0) {\n isReducedEchelonForm = false;\n }\n }\n i++;\n }\n return isReducedEchelonForm;\n }\n\n echelonForm() {\n let result = this.clone();\n let h = 0;\n let k = 0;\n while (h < result.rows && k < result.columns) {\n let iMax = h;\n for (let i = h; i < result.rows; i++) {\n if (result.get(i, k) > result.get(iMax, k)) {\n iMax = i;\n }\n }\n if (result.get(iMax, k) === 0) {\n k++;\n } else {\n result.swapRows(h, iMax);\n let tmp = result.get(h, k);\n for (let j = k; j < result.columns; j++) {\n result.set(h, j, result.get(h, j) / tmp);\n }\n for (let i = h + 1; i < result.rows; i++) {\n let factor = result.get(i, k) / result.get(h, k);\n result.set(i, k, 0);\n for (let j = k + 1; j < result.columns; j++) {\n result.set(i, j, result.get(i, j) - result.get(h, j) * factor);\n }\n }\n h++;\n k++;\n }\n }\n return result;\n }\n\n reducedEchelonForm() {\n let result = this.echelonForm();\n let m = result.columns;\n let n = result.rows;\n let h = n - 1;\n while (h >= 0) {\n if (result.maxRow(h) === 0) {\n h--;\n } else {\n let p = 0;\n let pivot = false;\n while (p < n && pivot === false) {\n if (result.get(h, p) === 1) {\n pivot = true;\n } else {\n p++;\n }\n }\n for (let i = 0; i < h; i++) {\n let factor = result.get(i, p);\n for (let j = p; j < m; j++) {\n let tmp = result.get(i, j) - factor * result.get(h, j);\n result.set(i, j, tmp);\n }\n }\n h--;\n }\n }\n return result;\n }\n\n set() {\n throw new Error('set method is unimplemented');\n }\n\n get() {\n throw new Error('get method is unimplemented');\n }\n\n repeat(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { rows = 1, columns = 1 } = options;\n if (!Number.isInteger(rows) || rows <= 0) {\n throw new TypeError('rows must be a positive integer');\n }\n if (!Number.isInteger(columns) || columns <= 0) {\n throw new TypeError('columns must be a positive integer');\n }\n let matrix = new Matrix(this.rows * rows, this.columns * columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n matrix.setSubMatrix(this, this.rows * i, this.columns * j);\n }\n }\n return matrix;\n }\n\n fill(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, value);\n }\n }\n return this;\n }\n\n neg() {\n return this.mulS(-1);\n }\n\n getRow(index) {\n checkRowIndex(this, index);\n let row = [];\n for (let i = 0; i < this.columns; i++) {\n row.push(this.get(index, i));\n }\n return row;\n }\n\n getRowVector(index) {\n return Matrix.rowVector(this.getRow(index));\n }\n\n setRow(index, array) {\n checkRowIndex(this, index);\n array = checkRowVector(this, array);\n for (let i = 0; i < this.columns; i++) {\n this.set(index, i, array[i]);\n }\n return this;\n }\n\n swapRows(row1, row2) {\n checkRowIndex(this, row1);\n checkRowIndex(this, row2);\n for (let i = 0; i < this.columns; i++) {\n let temp = this.get(row1, i);\n this.set(row1, i, this.get(row2, i));\n this.set(row2, i, temp);\n }\n return this;\n }\n\n getColumn(index) {\n checkColumnIndex(this, index);\n let column = [];\n for (let i = 0; i < this.rows; i++) {\n column.push(this.get(i, index));\n }\n return column;\n }\n\n getColumnVector(index) {\n return Matrix.columnVector(this.getColumn(index));\n }\n\n setColumn(index, array) {\n checkColumnIndex(this, index);\n array = checkColumnVector(this, array);\n for (let i = 0; i < this.rows; i++) {\n this.set(i, index, array[i]);\n }\n return this;\n }\n\n swapColumns(column1, column2) {\n checkColumnIndex(this, column1);\n checkColumnIndex(this, column2);\n for (let i = 0; i < this.rows; i++) {\n let temp = this.get(i, column1);\n this.set(i, column1, this.get(i, column2));\n this.set(i, column2, temp);\n }\n return this;\n }\n\n addRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + vector[j]);\n }\n }\n return this;\n }\n\n subRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - vector[j]);\n }\n }\n return this;\n }\n\n mulRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * vector[j]);\n }\n }\n return this;\n }\n\n divRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / vector[j]);\n }\n }\n return this;\n }\n\n addColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + vector[i]);\n }\n }\n return this;\n }\n\n subColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - vector[i]);\n }\n }\n return this;\n }\n\n mulColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * vector[i]);\n }\n }\n return this;\n }\n\n divColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / vector[i]);\n }\n }\n return this;\n }\n\n mulRow(index, value) {\n checkRowIndex(this, index);\n for (let i = 0; i < this.columns; i++) {\n this.set(index, i, this.get(index, i) * value);\n }\n return this;\n }\n\n mulColumn(index, value) {\n checkColumnIndex(this, index);\n for (let i = 0; i < this.rows; i++) {\n this.set(i, index, this.get(i, index) * value);\n }\n return this;\n }\n\n max() {\n let v = this.get(0, 0);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) > v) {\n v = this.get(i, j);\n }\n }\n }\n return v;\n }\n\n maxIndex() {\n let v = this.get(0, 0);\n let idx = [0, 0];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) > v) {\n v = this.get(i, j);\n idx[0] = i;\n idx[1] = j;\n }\n }\n }\n return idx;\n }\n\n min() {\n let v = this.get(0, 0);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) < v) {\n v = this.get(i, j);\n }\n }\n }\n return v;\n }\n\n minIndex() {\n let v = this.get(0, 0);\n let idx = [0, 0];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) < v) {\n v = this.get(i, j);\n idx[0] = i;\n idx[1] = j;\n }\n }\n }\n return idx;\n }\n\n maxRow(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) > v) {\n v = this.get(row, i);\n }\n }\n return v;\n }\n\n maxRowIndex(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n let idx = [row, 0];\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) > v) {\n v = this.get(row, i);\n idx[1] = i;\n }\n }\n return idx;\n }\n\n minRow(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) < v) {\n v = this.get(row, i);\n }\n }\n return v;\n }\n\n minRowIndex(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n let idx = [row, 0];\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) < v) {\n v = this.get(row, i);\n idx[1] = i;\n }\n }\n return idx;\n }\n\n maxColumn(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) > v) {\n v = this.get(i, column);\n }\n }\n return v;\n }\n\n maxColumnIndex(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n let idx = [0, column];\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) > v) {\n v = this.get(i, column);\n idx[0] = i;\n }\n }\n return idx;\n }\n\n minColumn(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) < v) {\n v = this.get(i, column);\n }\n }\n return v;\n }\n\n minColumnIndex(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n let idx = [0, column];\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) < v) {\n v = this.get(i, column);\n idx[0] = i;\n }\n }\n return idx;\n }\n\n diag() {\n let min = Math.min(this.rows, this.columns);\n let diag = [];\n for (let i = 0; i < min; i++) {\n diag.push(this.get(i, i));\n }\n return diag;\n }\n\n norm(type = 'frobenius') {\n let result = 0;\n if (type === 'max') {\n return this.max();\n } else if (type === 'frobenius') {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n result = result + this.get(i, j) * this.get(i, j);\n }\n }\n return Math.sqrt(result);\n } else {\n throw new RangeError(`unknown norm type: ${type}`);\n }\n }\n\n cumulativeSum() {\n let sum = 0;\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n sum += this.get(i, j);\n this.set(i, j, sum);\n }\n }\n return this;\n }\n\n dot(vector2) {\n if (AbstractMatrix.isMatrix(vector2)) vector2 = vector2.to1DArray();\n let vector1 = this.to1DArray();\n if (vector1.length !== vector2.length) {\n throw new RangeError('vectors do not have the same size');\n }\n let dot = 0;\n for (let i = 0; i < vector1.length; i++) {\n dot += vector1[i] * vector2[i];\n }\n return dot;\n }\n\n mmul(other) {\n other = Matrix.checkMatrix(other);\n\n let m = this.rows;\n let n = this.columns;\n let p = other.columns;\n\n let result = new Matrix(m, p);\n\n let Bcolj = new Float64Array(n);\n for (let j = 0; j < p; j++) {\n for (let k = 0; k < n; k++) {\n Bcolj[k] = other.get(k, j);\n }\n\n for (let i = 0; i < m; i++) {\n let s = 0;\n for (let k = 0; k < n; k++) {\n s += this.get(i, k) * Bcolj[k];\n }\n\n result.set(i, j, s);\n }\n }\n return result;\n }\n\n strassen2x2(other) {\n other = Matrix.checkMatrix(other);\n let result = new Matrix(2, 2);\n const a11 = this.get(0, 0);\n const b11 = other.get(0, 0);\n const a12 = this.get(0, 1);\n const b12 = other.get(0, 1);\n const a21 = this.get(1, 0);\n const b21 = other.get(1, 0);\n const a22 = this.get(1, 1);\n const b22 = other.get(1, 1);\n\n // Compute intermediate values.\n const m1 = (a11 + a22) * (b11 + b22);\n const m2 = (a21 + a22) * b11;\n const m3 = a11 * (b12 - b22);\n const m4 = a22 * (b21 - b11);\n const m5 = (a11 + a12) * b22;\n const m6 = (a21 - a11) * (b11 + b12);\n const m7 = (a12 - a22) * (b21 + b22);\n\n // Combine intermediate values into the output.\n const c00 = m1 + m4 - m5 + m7;\n const c01 = m3 + m5;\n const c10 = m2 + m4;\n const c11 = m1 - m2 + m3 + m6;\n\n result.set(0, 0, c00);\n result.set(0, 1, c01);\n result.set(1, 0, c10);\n result.set(1, 1, c11);\n return result;\n }\n\n strassen3x3(other) {\n other = Matrix.checkMatrix(other);\n let result = new Matrix(3, 3);\n\n const a00 = this.get(0, 0);\n const a01 = this.get(0, 1);\n const a02 = this.get(0, 2);\n const a10 = this.get(1, 0);\n const a11 = this.get(1, 1);\n const a12 = this.get(1, 2);\n const a20 = this.get(2, 0);\n const a21 = this.get(2, 1);\n const a22 = this.get(2, 2);\n\n const b00 = other.get(0, 0);\n const b01 = other.get(0, 1);\n const b02 = other.get(0, 2);\n const b10 = other.get(1, 0);\n const b11 = other.get(1, 1);\n const b12 = other.get(1, 2);\n const b20 = other.get(2, 0);\n const b21 = other.get(2, 1);\n const b22 = other.get(2, 2);\n\n const m1 = (a00 + a01 + a02 - a10 - a11 - a21 - a22) * b11;\n const m2 = (a00 - a10) * (-b01 + b11);\n const m3 = a11 * (-b00 + b01 + b10 - b11 - b12 - b20 + b22);\n const m4 = (-a00 + a10 + a11) * (b00 - b01 + b11);\n const m5 = (a10 + a11) * (-b00 + b01);\n const m6 = a00 * b00;\n const m7 = (-a00 + a20 + a21) * (b00 - b02 + b12);\n const m8 = (-a00 + a20) * (b02 - b12);\n const m9 = (a20 + a21) * (-b00 + b02);\n const m10 = (a00 + a01 + a02 - a11 - a12 - a20 - a21) * b12;\n const m11 = a21 * (-b00 + b02 + b10 - b11 - b12 - b20 + b21);\n const m12 = (-a02 + a21 + a22) * (b11 + b20 - b21);\n const m13 = (a02 - a22) * (b11 - b21);\n const m14 = a02 * b20;\n const m15 = (a21 + a22) * (-b20 + b21);\n const m16 = (-a02 + a11 + a12) * (b12 + b20 - b22);\n const m17 = (a02 - a12) * (b12 - b22);\n const m18 = (a11 + a12) * (-b20 + b22);\n const m19 = a01 * b10;\n const m20 = a12 * b21;\n const m21 = a10 * b02;\n const m22 = a20 * b01;\n const m23 = a22 * b22;\n\n const c00 = m6 + m14 + m19;\n const c01 = m1 + m4 + m5 + m6 + m12 + m14 + m15;\n const c02 = m6 + m7 + m9 + m10 + m14 + m16 + m18;\n const c10 = m2 + m3 + m4 + m6 + m14 + m16 + m17;\n const c11 = m2 + m4 + m5 + m6 + m20;\n const c12 = m14 + m16 + m17 + m18 + m21;\n const c20 = m6 + m7 + m8 + m11 + m12 + m13 + m14;\n const c21 = m12 + m13 + m14 + m15 + m22;\n const c22 = m6 + m7 + m8 + m9 + m23;\n\n result.set(0, 0, c00);\n result.set(0, 1, c01);\n result.set(0, 2, c02);\n result.set(1, 0, c10);\n result.set(1, 1, c11);\n result.set(1, 2, c12);\n result.set(2, 0, c20);\n result.set(2, 1, c21);\n result.set(2, 2, c22);\n return result;\n }\n\n mmulStrassen(y) {\n y = Matrix.checkMatrix(y);\n let x = this.clone();\n let r1 = x.rows;\n let c1 = x.columns;\n let r2 = y.rows;\n let c2 = y.columns;\n if (c1 !== r2) {\n // eslint-disable-next-line no-console\n console.warn(\n `Multiplying ${r1} x ${c1} and ${r2} x ${c2} matrix: dimensions do not match.`,\n );\n }\n\n // Put a matrix into the top left of a matrix of zeros.\n // `rows` and `cols` are the dimensions of the output matrix.\n function embed(mat, rows, cols) {\n let r = mat.rows;\n let c = mat.columns;\n if (r === rows && c === cols) {\n return mat;\n } else {\n let resultat = AbstractMatrix.zeros(rows, cols);\n resultat = resultat.setSubMatrix(mat, 0, 0);\n return resultat;\n }\n }\n\n // Make sure both matrices are the same size.\n // This is exclusively for simplicity:\n // this algorithm can be implemented with matrices of different sizes.\n\n let r = Math.max(r1, r2);\n let c = Math.max(c1, c2);\n x = embed(x, r, c);\n y = embed(y, r, c);\n\n // Our recursive multiplication function.\n function blockMult(a, b, rows, cols) {\n // For small matrices, resort to naive multiplication.\n if (rows <= 512 || cols <= 512) {\n return a.mmul(b); // a is equivalent to this\n }\n\n // Apply dynamic padding.\n if (rows % 2 === 1 && cols % 2 === 1) {\n a = embed(a, rows + 1, cols + 1);\n b = embed(b, rows + 1, cols + 1);\n } else if (rows % 2 === 1) {\n a = embed(a, rows + 1, cols);\n b = embed(b, rows + 1, cols);\n } else if (cols % 2 === 1) {\n a = embed(a, rows, cols + 1);\n b = embed(b, rows, cols + 1);\n }\n\n let halfRows = parseInt(a.rows / 2, 10);\n let halfCols = parseInt(a.columns / 2, 10);\n // Subdivide input matrices.\n let a11 = a.subMatrix(0, halfRows - 1, 0, halfCols - 1);\n let b11 = b.subMatrix(0, halfRows - 1, 0, halfCols - 1);\n\n let a12 = a.subMatrix(0, halfRows - 1, halfCols, a.columns - 1);\n let b12 = b.subMatrix(0, halfRows - 1, halfCols, b.columns - 1);\n\n let a21 = a.subMatrix(halfRows, a.rows - 1, 0, halfCols - 1);\n let b21 = b.subMatrix(halfRows, b.rows - 1, 0, halfCols - 1);\n\n let a22 = a.subMatrix(halfRows, a.rows - 1, halfCols, a.columns - 1);\n let b22 = b.subMatrix(halfRows, b.rows - 1, halfCols, b.columns - 1);\n\n // Compute intermediate values.\n let m1 = blockMult(\n AbstractMatrix.add(a11, a22),\n AbstractMatrix.add(b11, b22),\n halfRows,\n halfCols,\n );\n let m2 = blockMult(AbstractMatrix.add(a21, a22), b11, halfRows, halfCols);\n let m3 = blockMult(a11, AbstractMatrix.sub(b12, b22), halfRows, halfCols);\n let m4 = blockMult(a22, AbstractMatrix.sub(b21, b11), halfRows, halfCols);\n let m5 = blockMult(AbstractMatrix.add(a11, a12), b22, halfRows, halfCols);\n let m6 = blockMult(\n AbstractMatrix.sub(a21, a11),\n AbstractMatrix.add(b11, b12),\n halfRows,\n halfCols,\n );\n let m7 = blockMult(\n AbstractMatrix.sub(a12, a22),\n AbstractMatrix.add(b21, b22),\n halfRows,\n halfCols,\n );\n\n // Combine intermediate values into the output.\n let c11 = AbstractMatrix.add(m1, m4);\n c11.sub(m5);\n c11.add(m7);\n let c12 = AbstractMatrix.add(m3, m5);\n let c21 = AbstractMatrix.add(m2, m4);\n let c22 = AbstractMatrix.sub(m1, m2);\n c22.add(m3);\n c22.add(m6);\n\n // Crop output to the desired size (undo dynamic padding).\n let resultat = AbstractMatrix.zeros(2 * c11.rows, 2 * c11.columns);\n resultat = resultat.setSubMatrix(c11, 0, 0);\n resultat = resultat.setSubMatrix(c12, c11.rows, 0);\n resultat = resultat.setSubMatrix(c21, 0, c11.columns);\n resultat = resultat.setSubMatrix(c22, c11.rows, c11.columns);\n return resultat.subMatrix(0, rows - 1, 0, cols - 1);\n }\n return blockMult(x, y, r, c);\n }\n\n scaleRows(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1 } = options;\n if (!Number.isFinite(min)) throw new TypeError('min must be a number');\n if (!Number.isFinite(max)) throw new TypeError('max must be a number');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let i = 0; i < this.rows; i++) {\n const row = this.getRow(i);\n rescale(row, { min, max, output: row });\n newMatrix.setRow(i, row);\n }\n return newMatrix;\n }\n\n scaleColumns(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1 } = options;\n if (!Number.isFinite(min)) throw new TypeError('min must be a number');\n if (!Number.isFinite(max)) throw new TypeError('max must be a number');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let i = 0; i < this.columns; i++) {\n const column = this.getColumn(i);\n rescale(column, {\n min: min,\n max: max,\n output: column,\n });\n newMatrix.setColumn(i, column);\n }\n return newMatrix;\n }\n\n flipRows() {\n const middle = Math.ceil(this.columns / 2);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < middle; j++) {\n let first = this.get(i, j);\n let last = this.get(i, this.columns - 1 - j);\n this.set(i, j, last);\n this.set(i, this.columns - 1 - j, first);\n }\n }\n return this;\n }\n\n flipColumns() {\n const middle = Math.ceil(this.rows / 2);\n for (let j = 0; j < this.columns; j++) {\n for (let i = 0; i < middle; i++) {\n let first = this.get(i, j);\n let last = this.get(this.rows - 1 - i, j);\n this.set(i, j, last);\n this.set(this.rows - 1 - i, j, first);\n }\n }\n return this;\n }\n\n kroneckerProduct(other) {\n other = Matrix.checkMatrix(other);\n\n let m = this.rows;\n let n = this.columns;\n let p = other.rows;\n let q = other.columns;\n\n let result = new Matrix(m * p, n * q);\n for (let i = 0; i < m; i++) {\n for (let j = 0; j < n; j++) {\n for (let k = 0; k < p; k++) {\n for (let l = 0; l < q; l++) {\n result.set(p * i + k, q * j + l, this.get(i, j) * other.get(k, l));\n }\n }\n }\n }\n return result;\n }\n\n transpose() {\n let result = new Matrix(this.columns, this.rows);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n result.set(j, i, this.get(i, j));\n }\n }\n return result;\n }\n\n sortRows(compareFunction = compareNumbers) {\n for (let i = 0; i < this.rows; i++) {\n this.setRow(i, this.getRow(i).sort(compareFunction));\n }\n return this;\n }\n\n sortColumns(compareFunction = compareNumbers) {\n for (let i = 0; i < this.columns; i++) {\n this.setColumn(i, this.getColumn(i).sort(compareFunction));\n }\n return this;\n }\n\n subMatrix(startRow, endRow, startColumn, endColumn) {\n checkRange(this, startRow, endRow, startColumn, endColumn);\n let newMatrix = new Matrix(\n endRow - startRow + 1,\n endColumn - startColumn + 1,\n );\n for (let i = startRow; i <= endRow; i++) {\n for (let j = startColumn; j <= endColumn; j++) {\n newMatrix.set(i - startRow, j - startColumn, this.get(i, j));\n }\n }\n return newMatrix;\n }\n\n subMatrixRow(indices, startColumn, endColumn) {\n if (startColumn === undefined) startColumn = 0;\n if (endColumn === undefined) endColumn = this.columns - 1;\n if (\n startColumn > endColumn ||\n startColumn < 0 ||\n startColumn >= this.columns ||\n endColumn < 0 ||\n endColumn >= this.columns\n ) {\n throw new RangeError('Argument out of range');\n }\n\n let newMatrix = new Matrix(indices.length, endColumn - startColumn + 1);\n for (let i = 0; i < indices.length; i++) {\n for (let j = startColumn; j <= endColumn; j++) {\n if (indices[i] < 0 || indices[i] >= this.rows) {\n throw new RangeError(`Row index out of range: ${indices[i]}`);\n }\n newMatrix.set(i, j - startColumn, this.get(indices[i], j));\n }\n }\n return newMatrix;\n }\n\n subMatrixColumn(indices, startRow, endRow) {\n if (startRow === undefined) startRow = 0;\n if (endRow === undefined) endRow = this.rows - 1;\n if (\n startRow > endRow ||\n startRow < 0 ||\n startRow >= this.rows ||\n endRow < 0 ||\n endRow >= this.rows\n ) {\n throw new RangeError('Argument out of range');\n }\n\n let newMatrix = new Matrix(endRow - startRow + 1, indices.length);\n for (let i = 0; i < indices.length; i++) {\n for (let j = startRow; j <= endRow; j++) {\n if (indices[i] < 0 || indices[i] >= this.columns) {\n throw new RangeError(`Column index out of range: ${indices[i]}`);\n }\n newMatrix.set(j - startRow, i, this.get(j, indices[i]));\n }\n }\n return newMatrix;\n }\n\n setSubMatrix(matrix, startRow, startColumn) {\n matrix = Matrix.checkMatrix(matrix);\n let endRow = startRow + matrix.rows - 1;\n let endColumn = startColumn + matrix.columns - 1;\n checkRange(this, startRow, endRow, startColumn, endColumn);\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n this.set(startRow + i, startColumn + j, matrix.get(i, j));\n }\n }\n return this;\n }\n\n selection(rowIndices, columnIndices) {\n let indices = checkIndices(this, rowIndices, columnIndices);\n let newMatrix = new Matrix(rowIndices.length, columnIndices.length);\n for (let i = 0; i < indices.row.length; i++) {\n let rowIndex = indices.row[i];\n for (let j = 0; j < indices.column.length; j++) {\n let columnIndex = indices.column[j];\n newMatrix.set(i, j, this.get(rowIndex, columnIndex));\n }\n }\n return newMatrix;\n }\n\n trace() {\n let min = Math.min(this.rows, this.columns);\n let trace = 0;\n for (let i = 0; i < min; i++) {\n trace += this.get(i, i);\n }\n return trace;\n }\n\n clone() {\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let row = 0; row < this.rows; row++) {\n for (let column = 0; column < this.columns; column++) {\n newMatrix.set(row, column, this.get(row, column));\n }\n }\n return newMatrix;\n }\n\n sum(by) {\n switch (by) {\n case 'row':\n return sumByRow(this);\n case 'column':\n return sumByColumn(this);\n case undefined:\n return sumAll(this);\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n product(by) {\n switch (by) {\n case 'row':\n return productByRow(this);\n case 'column':\n return productByColumn(this);\n case undefined:\n return productAll(this);\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n mean(by) {\n const sum = this.sum(by);\n switch (by) {\n case 'row': {\n for (let i = 0; i < this.rows; i++) {\n sum[i] /= this.columns;\n }\n return sum;\n }\n case 'column': {\n for (let i = 0; i < this.columns; i++) {\n sum[i] /= this.rows;\n }\n return sum;\n }\n case undefined:\n return sum / this.size;\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n variance(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { unbiased = true, mean = this.mean(by) } = options;\n if (typeof unbiased !== 'boolean') {\n throw new TypeError('unbiased must be a boolean');\n }\n switch (by) {\n case 'row': {\n if (!Array.isArray(mean)) {\n throw new TypeError('mean must be an array');\n }\n return varianceByRow(this, unbiased, mean);\n }\n case 'column': {\n if (!Array.isArray(mean)) {\n throw new TypeError('mean must be an array');\n }\n return varianceByColumn(this, unbiased, mean);\n }\n case undefined: {\n if (typeof mean !== 'number') {\n throw new TypeError('mean must be a number');\n }\n return varianceAll(this, unbiased, mean);\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n standardDeviation(by, options) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n const variance = this.variance(by, options);\n if (by === undefined) {\n return Math.sqrt(variance);\n } else {\n for (let i = 0; i < variance.length; i++) {\n variance[i] = Math.sqrt(variance[i]);\n }\n return variance;\n }\n }\n\n center(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { center = this.mean(by) } = options;\n switch (by) {\n case 'row': {\n if (!Array.isArray(center)) {\n throw new TypeError('center must be an array');\n }\n centerByRow(this, center);\n return this;\n }\n case 'column': {\n if (!Array.isArray(center)) {\n throw new TypeError('center must be an array');\n }\n centerByColumn(this, center);\n return this;\n }\n case undefined: {\n if (typeof center !== 'number') {\n throw new TypeError('center must be a number');\n }\n centerAll(this, center);\n return this;\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n scale(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n let scale = options.scale;\n switch (by) {\n case 'row': {\n if (scale === undefined) {\n scale = getScaleByRow(this);\n } else if (!Array.isArray(scale)) {\n throw new TypeError('scale must be an array');\n }\n scaleByRow(this, scale);\n return this;\n }\n case 'column': {\n if (scale === undefined) {\n scale = getScaleByColumn(this);\n } else if (!Array.isArray(scale)) {\n throw new TypeError('scale must be an array');\n }\n scaleByColumn(this, scale);\n return this;\n }\n case undefined: {\n if (scale === undefined) {\n scale = getScaleAll(this);\n } else if (typeof scale !== 'number') {\n throw new TypeError('scale must be a number');\n }\n scaleAll(this, scale);\n return this;\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n toString(options) {\n return inspectMatrixWithOptions(this, options);\n }\n}\n\nAbstractMatrix.prototype.klass = 'Matrix';\nif (typeof Symbol !== 'undefined') {\n AbstractMatrix.prototype[\n Symbol.for('nodejs.util.inspect.custom')\n ] = inspectMatrix;\n}\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\n// Synonyms\nAbstractMatrix.random = AbstractMatrix.rand;\nAbstractMatrix.randomInt = AbstractMatrix.randInt;\nAbstractMatrix.diagonal = AbstractMatrix.diag;\nAbstractMatrix.prototype.diagonal = AbstractMatrix.prototype.diag;\nAbstractMatrix.identity = AbstractMatrix.eye;\nAbstractMatrix.prototype.negate = AbstractMatrix.prototype.neg;\nAbstractMatrix.prototype.tensorProduct =\n AbstractMatrix.prototype.kroneckerProduct;\n\nexport default class Matrix extends AbstractMatrix {\n constructor(nRows, nColumns) {\n super();\n if (Matrix.isMatrix(nRows)) {\n return nRows.clone();\n } else if (Number.isInteger(nRows) && nRows > 0) {\n // Create an empty matrix\n this.data = [];\n if (Number.isInteger(nColumns) && nColumns > 0) {\n for (let i = 0; i < nRows; i++) {\n this.data.push(new Float64Array(nColumns));\n }\n } else {\n throw new TypeError('nColumns must be a positive integer');\n }\n } else if (Array.isArray(nRows)) {\n // Copy the values from the 2D array\n const arrayData = nRows;\n nRows = arrayData.length;\n nColumns = arrayData[0].length;\n if (typeof nColumns !== 'number' || nColumns === 0) {\n throw new TypeError(\n 'Data must be a 2D array with at least one element',\n );\n }\n this.data = [];\n for (let i = 0; i < nRows; i++) {\n if (arrayData[i].length !== nColumns) {\n throw new RangeError('Inconsistent array dimensions');\n }\n this.data.push(Float64Array.from(arrayData[i]));\n }\n } else {\n throw new TypeError(\n 'First argument must be a positive number or an array',\n );\n }\n this.rows = nRows;\n this.columns = nColumns;\n return this;\n }\n\n set(rowIndex, columnIndex, value) {\n this.data[rowIndex][columnIndex] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.data[rowIndex][columnIndex];\n }\n\n removeRow(index) {\n checkRowIndex(this, index);\n if (this.rows === 1) {\n throw new RangeError('A matrix cannot have less than one row');\n }\n this.data.splice(index, 1);\n this.rows -= 1;\n return this;\n }\n\n addRow(index, array) {\n if (array === undefined) {\n array = index;\n index = this.rows;\n }\n checkRowIndex(this, index, true);\n array = Float64Array.from(checkRowVector(this, array, true));\n this.data.splice(index, 0, array);\n this.rows += 1;\n return this;\n }\n\n removeColumn(index) {\n checkColumnIndex(this, index);\n if (this.columns === 1) {\n throw new RangeError('A matrix cannot have less than one column');\n }\n for (let i = 0; i < this.rows; i++) {\n const newRow = new Float64Array(this.columns - 1);\n for (let j = 0; j < index; j++) {\n newRow[j] = this.data[i][j];\n }\n for (let j = index + 1; j < this.columns; j++) {\n newRow[j - 1] = this.data[i][j];\n }\n this.data[i] = newRow;\n }\n this.columns -= 1;\n return this;\n }\n\n addColumn(index, array) {\n if (typeof array === 'undefined') {\n array = index;\n index = this.columns;\n }\n checkColumnIndex(this, index, true);\n array = checkColumnVector(this, array);\n for (let i = 0; i < this.rows; i++) {\n const newRow = new Float64Array(this.columns + 1);\n let j = 0;\n for (; j < index; j++) {\n newRow[j] = this.data[i][j];\n }\n newRow[j++] = array[i];\n for (; j < this.columns + 1; j++) {\n newRow[j] = this.data[i][j - 1];\n }\n this.data[i] = newRow;\n }\n this.columns += 1;\n return this;\n }\n}\n\ninstallMathOperations(AbstractMatrix, Matrix);\n","import { AbstractMatrix } from '../matrix';\n\nexport default class BaseView extends AbstractMatrix {\n constructor(matrix, rows, columns) {\n super();\n this.matrix = matrix;\n this.rows = rows;\n this.columns = columns;\n }\n}\n","import { checkColumnIndex } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixColumnView extends BaseView {\n constructor(matrix, column) {\n checkColumnIndex(matrix, column);\n super(matrix, matrix.rows, 1);\n this.column = column;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.column, value);\n return this;\n }\n\n get(rowIndex) {\n return this.matrix.get(rowIndex, this.column);\n }\n}\n","import { checkColumnIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixColumnSelectionView extends BaseView {\n constructor(matrix, columnIndices) {\n columnIndices = checkColumnIndices(matrix, columnIndices);\n super(matrix, matrix.rows, columnIndices.length);\n this.columnIndices = columnIndices;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.columnIndices[columnIndex], value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(rowIndex, this.columnIndices[columnIndex]);\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixFlipColumnView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.rows, matrix.columns);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.columns - columnIndex - 1, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(rowIndex, this.columns - columnIndex - 1);\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixFlipRowView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.rows, matrix.columns);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.rows - rowIndex - 1, columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.rows - rowIndex - 1, columnIndex);\n }\n}\n","import { checkRowIndex } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixRowView extends BaseView {\n constructor(matrix, row) {\n checkRowIndex(matrix, row);\n super(matrix, 1, matrix.columns);\n this.row = row;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.row, columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.row, columnIndex);\n }\n}\n","import { checkRowIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixRowSelectionView extends BaseView {\n constructor(matrix, rowIndices) {\n rowIndices = checkRowIndices(matrix, rowIndices);\n super(matrix, rowIndices.length, matrix.columns);\n this.rowIndices = rowIndices;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.rowIndices[rowIndex], columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.rowIndices[rowIndex], columnIndex);\n }\n}\n","import { checkIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixSelectionView extends BaseView {\n constructor(matrix, rowIndices, columnIndices) {\n let indices = checkIndices(matrix, rowIndices, columnIndices);\n super(matrix, indices.row.length, indices.column.length);\n this.rowIndices = indices.row;\n this.columnIndices = indices.column;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(\n this.rowIndices[rowIndex],\n this.columnIndices[columnIndex],\n value,\n );\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(\n this.rowIndices[rowIndex],\n this.columnIndices[columnIndex],\n );\n }\n}\n","import { checkRange } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixSubView extends BaseView {\n constructor(matrix, startRow, endRow, startColumn, endColumn) {\n checkRange(matrix, startRow, endRow, startColumn, endColumn);\n super(matrix, endRow - startRow + 1, endColumn - startColumn + 1);\n this.startRow = startRow;\n this.startColumn = startColumn;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(\n this.startRow + rowIndex,\n this.startColumn + columnIndex,\n value,\n );\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(\n this.startRow + rowIndex,\n this.startColumn + columnIndex,\n );\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixTransposeView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.columns, matrix.rows);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(columnIndex, rowIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(columnIndex, rowIndex);\n }\n}\n","import { AbstractMatrix } from '../matrix';\n\nexport default class WrapperMatrix1D extends AbstractMatrix {\n constructor(data, options = {}) {\n const { rows = 1 } = options;\n\n if (data.length % rows !== 0) {\n throw new Error('the data length is not divisible by the number of rows');\n }\n super();\n this.rows = rows;\n this.columns = data.length / rows;\n this.data = data;\n }\n\n set(rowIndex, columnIndex, value) {\n let index = this._calculateIndex(rowIndex, columnIndex);\n this.data[index] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n let index = this._calculateIndex(rowIndex, columnIndex);\n return this.data[index];\n }\n\n _calculateIndex(row, column) {\n return row * this.columns + column;\n }\n}\n","import { AbstractMatrix } from '../matrix';\n\nexport default class WrapperMatrix2D extends AbstractMatrix {\n constructor(data) {\n super();\n this.data = data;\n this.rows = data.length;\n this.columns = data[0].length;\n }\n\n set(rowIndex, columnIndex, value) {\n this.data[rowIndex][columnIndex] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.data[rowIndex][columnIndex];\n }\n}\n","import WrapperMatrix1D from './WrapperMatrix1D';\nimport WrapperMatrix2D from './WrapperMatrix2D';\n\nexport function wrap(array, options) {\n if (Array.isArray(array)) {\n if (array[0] && Array.isArray(array[0])) {\n return new WrapperMatrix2D(array);\n } else {\n return new WrapperMatrix1D(array, options);\n }\n } else {\n throw new Error('the argument is not an array');\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class LuDecomposition {\n constructor(matrix) {\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n\n let lu = matrix.clone();\n let rows = lu.rows;\n let columns = lu.columns;\n let pivotVector = new Float64Array(rows);\n let pivotSign = 1;\n let i, j, k, p, s, t, v;\n let LUcolj, kmax;\n\n for (i = 0; i < rows; i++) {\n pivotVector[i] = i;\n }\n\n LUcolj = new Float64Array(rows);\n\n for (j = 0; j < columns; j++) {\n for (i = 0; i < rows; i++) {\n LUcolj[i] = lu.get(i, j);\n }\n\n for (i = 0; i < rows; i++) {\n kmax = Math.min(i, j);\n s = 0;\n for (k = 0; k < kmax; k++) {\n s += lu.get(i, k) * LUcolj[k];\n }\n LUcolj[i] -= s;\n lu.set(i, j, LUcolj[i]);\n }\n\n p = j;\n for (i = j + 1; i < rows; i++) {\n if (Math.abs(LUcolj[i]) > Math.abs(LUcolj[p])) {\n p = i;\n }\n }\n\n if (p !== j) {\n for (k = 0; k < columns; k++) {\n t = lu.get(p, k);\n lu.set(p, k, lu.get(j, k));\n lu.set(j, k, t);\n }\n\n v = pivotVector[p];\n pivotVector[p] = pivotVector[j];\n pivotVector[j] = v;\n\n pivotSign = -pivotSign;\n }\n\n if (j < rows && lu.get(j, j) !== 0) {\n for (i = j + 1; i < rows; i++) {\n lu.set(i, j, lu.get(i, j) / lu.get(j, j));\n }\n }\n }\n\n this.LU = lu;\n this.pivotVector = pivotVector;\n this.pivotSign = pivotSign;\n }\n\n isSingular() {\n let data = this.LU;\n let col = data.columns;\n for (let j = 0; j < col; j++) {\n if (data.get(j, j) === 0) {\n return true;\n }\n }\n return false;\n }\n\n solve(value) {\n value = Matrix.checkMatrix(value);\n\n let lu = this.LU;\n let rows = lu.rows;\n\n if (rows !== value.rows) {\n throw new Error('Invalid matrix dimensions');\n }\n if (this.isSingular()) {\n throw new Error('LU matrix is singular');\n }\n\n let count = value.columns;\n let X = value.subMatrixRow(this.pivotVector, 0, count - 1);\n let columns = lu.columns;\n let i, j, k;\n\n for (k = 0; k < columns; k++) {\n for (i = k + 1; i < columns; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));\n }\n }\n }\n for (k = columns - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n X.set(k, j, X.get(k, j) / lu.get(k, k));\n }\n for (i = 0; i < k; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));\n }\n }\n }\n return X;\n }\n\n get determinant() {\n let data = this.LU;\n if (!data.isSquare()) {\n throw new Error('Matrix must be square');\n }\n let determinant = this.pivotSign;\n let col = data.columns;\n for (let j = 0; j < col; j++) {\n determinant *= data.get(j, j);\n }\n return determinant;\n }\n\n get lowerTriangularMatrix() {\n let data = this.LU;\n let rows = data.rows;\n let columns = data.columns;\n let X = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n if (i > j) {\n X.set(i, j, data.get(i, j));\n } else if (i === j) {\n X.set(i, j, 1);\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get upperTriangularMatrix() {\n let data = this.LU;\n let rows = data.rows;\n let columns = data.columns;\n let X = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n if (i <= j) {\n X.set(i, j, data.get(i, j));\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get pivotPermutationVector() {\n return Array.from(this.pivotVector);\n }\n}\n","export function hypotenuse(a, b) {\n let r = 0;\n if (Math.abs(a) > Math.abs(b)) {\n r = b / a;\n return Math.abs(a) * Math.sqrt(1 + r * r);\n }\n if (b !== 0) {\n r = a / b;\n return Math.abs(b) * Math.sqrt(1 + r * r);\n }\n return 0;\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class QrDecomposition {\n constructor(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let qr = value.clone();\n let m = value.rows;\n let n = value.columns;\n let rdiag = new Float64Array(n);\n let i, j, k, s;\n\n for (k = 0; k < n; k++) {\n let nrm = 0;\n for (i = k; i < m; i++) {\n nrm = hypotenuse(nrm, qr.get(i, k));\n }\n if (nrm !== 0) {\n if (qr.get(k, k) < 0) {\n nrm = -nrm;\n }\n for (i = k; i < m; i++) {\n qr.set(i, k, qr.get(i, k) / nrm);\n }\n qr.set(k, k, qr.get(k, k) + 1);\n for (j = k + 1; j < n; j++) {\n s = 0;\n for (i = k; i < m; i++) {\n s += qr.get(i, k) * qr.get(i, j);\n }\n s = -s / qr.get(k, k);\n for (i = k; i < m; i++) {\n qr.set(i, j, qr.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n rdiag[k] = -nrm;\n }\n\n this.QR = qr;\n this.Rdiag = rdiag;\n }\n\n solve(value) {\n value = Matrix.checkMatrix(value);\n\n let qr = this.QR;\n let m = qr.rows;\n\n if (value.rows !== m) {\n throw new Error('Matrix row dimensions must agree');\n }\n if (!this.isFullRank()) {\n throw new Error('Matrix is rank deficient');\n }\n\n let count = value.columns;\n let X = value.clone();\n let n = qr.columns;\n let i, j, k, s;\n\n for (k = 0; k < n; k++) {\n for (j = 0; j < count; j++) {\n s = 0;\n for (i = k; i < m; i++) {\n s += qr.get(i, k) * X.get(i, j);\n }\n s = -s / qr.get(k, k);\n for (i = k; i < m; i++) {\n X.set(i, j, X.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n for (k = n - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n X.set(k, j, X.get(k, j) / this.Rdiag[k]);\n }\n for (i = 0; i < k; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * qr.get(i, k));\n }\n }\n }\n\n return X.subMatrix(0, n - 1, 0, count - 1);\n }\n\n isFullRank() {\n let columns = this.QR.columns;\n for (let i = 0; i < columns; i++) {\n if (this.Rdiag[i] === 0) {\n return false;\n }\n }\n return true;\n }\n\n get upperTriangularMatrix() {\n let qr = this.QR;\n let n = qr.columns;\n let X = new Matrix(n, n);\n let i, j;\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n if (i < j) {\n X.set(i, j, qr.get(i, j));\n } else if (i === j) {\n X.set(i, j, this.Rdiag[i]);\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get orthogonalMatrix() {\n let qr = this.QR;\n let rows = qr.rows;\n let columns = qr.columns;\n let X = new Matrix(rows, columns);\n let i, j, k, s;\n\n for (k = columns - 1; k >= 0; k--) {\n for (i = 0; i < rows; i++) {\n X.set(i, k, 0);\n }\n X.set(k, k, 1);\n for (j = k; j < columns; j++) {\n if (qr.get(k, k) !== 0) {\n s = 0;\n for (i = k; i < rows; i++) {\n s += qr.get(i, k) * X.get(i, j);\n }\n\n s = -s / qr.get(k, k);\n\n for (i = k; i < rows; i++) {\n X.set(i, j, X.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n }\n return X;\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class SingularValueDecomposition {\n constructor(value, options = {}) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let m = value.rows;\n let n = value.columns;\n\n const {\n computeLeftSingularVectors = true,\n computeRightSingularVectors = true,\n autoTranspose = false,\n } = options;\n\n let wantu = Boolean(computeLeftSingularVectors);\n let wantv = Boolean(computeRightSingularVectors);\n\n let swapped = false;\n let a;\n if (m < n) {\n if (!autoTranspose) {\n a = value.clone();\n // eslint-disable-next-line no-console\n console.warn(\n 'Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose',\n );\n } else {\n a = value.transpose();\n m = a.rows;\n n = a.columns;\n swapped = true;\n let aux = wantu;\n wantu = wantv;\n wantv = aux;\n }\n } else {\n a = value.clone();\n }\n\n let nu = Math.min(m, n);\n let ni = Math.min(m + 1, n);\n let s = new Float64Array(ni);\n let U = new Matrix(m, nu);\n let V = new Matrix(n, n);\n\n let e = new Float64Array(n);\n let work = new Float64Array(m);\n\n let si = new Float64Array(ni);\n for (let i = 0; i < ni; i++) si[i] = i;\n\n let nct = Math.min(m - 1, n);\n let nrt = Math.max(0, Math.min(n - 2, m));\n let mrc = Math.max(nct, nrt);\n\n for (let k = 0; k < mrc; k++) {\n if (k < nct) {\n s[k] = 0;\n for (let i = k; i < m; i++) {\n s[k] = hypotenuse(s[k], a.get(i, k));\n }\n if (s[k] !== 0) {\n if (a.get(k, k) < 0) {\n s[k] = -s[k];\n }\n for (let i = k; i < m; i++) {\n a.set(i, k, a.get(i, k) / s[k]);\n }\n a.set(k, k, a.get(k, k) + 1);\n }\n s[k] = -s[k];\n }\n\n for (let j = k + 1; j < n; j++) {\n if (k < nct && s[k] !== 0) {\n let t = 0;\n for (let i = k; i < m; i++) {\n t += a.get(i, k) * a.get(i, j);\n }\n t = -t / a.get(k, k);\n for (let i = k; i < m; i++) {\n a.set(i, j, a.get(i, j) + t * a.get(i, k));\n }\n }\n e[j] = a.get(k, j);\n }\n\n if (wantu && k < nct) {\n for (let i = k; i < m; i++) {\n U.set(i, k, a.get(i, k));\n }\n }\n\n if (k < nrt) {\n e[k] = 0;\n for (let i = k + 1; i < n; i++) {\n e[k] = hypotenuse(e[k], e[i]);\n }\n if (e[k] !== 0) {\n if (e[k + 1] < 0) {\n e[k] = 0 - e[k];\n }\n for (let i = k + 1; i < n; i++) {\n e[i] /= e[k];\n }\n e[k + 1] += 1;\n }\n e[k] = -e[k];\n if (k + 1 < m && e[k] !== 0) {\n for (let i = k + 1; i < m; i++) {\n work[i] = 0;\n }\n for (let i = k + 1; i < m; i++) {\n for (let j = k + 1; j < n; j++) {\n work[i] += e[j] * a.get(i, j);\n }\n }\n for (let j = k + 1; j < n; j++) {\n let t = -e[j] / e[k + 1];\n for (let i = k + 1; i < m; i++) {\n a.set(i, j, a.get(i, j) + t * work[i]);\n }\n }\n }\n if (wantv) {\n for (let i = k + 1; i < n; i++) {\n V.set(i, k, e[i]);\n }\n }\n }\n }\n\n let p = Math.min(n, m + 1);\n if (nct < n) {\n s[nct] = a.get(nct, nct);\n }\n if (m < p) {\n s[p - 1] = 0;\n }\n if (nrt + 1 < p) {\n e[nrt] = a.get(nrt, p - 1);\n }\n e[p - 1] = 0;\n\n if (wantu) {\n for (let j = nct; j < nu; j++) {\n for (let i = 0; i < m; i++) {\n U.set(i, j, 0);\n }\n U.set(j, j, 1);\n }\n for (let k = nct - 1; k >= 0; k--) {\n if (s[k] !== 0) {\n for (let j = k + 1; j < nu; j++) {\n let t = 0;\n for (let i = k; i < m; i++) {\n t += U.get(i, k) * U.get(i, j);\n }\n t = -t / U.get(k, k);\n for (let i = k; i < m; i++) {\n U.set(i, j, U.get(i, j) + t * U.get(i, k));\n }\n }\n for (let i = k; i < m; i++) {\n U.set(i, k, -U.get(i, k));\n }\n U.set(k, k, 1 + U.get(k, k));\n for (let i = 0; i < k - 1; i++) {\n U.set(i, k, 0);\n }\n } else {\n for (let i = 0; i < m; i++) {\n U.set(i, k, 0);\n }\n U.set(k, k, 1);\n }\n }\n }\n\n if (wantv) {\n for (let k = n - 1; k >= 0; k--) {\n if (k < nrt && e[k] !== 0) {\n for (let j = k + 1; j < n; j++) {\n let t = 0;\n for (let i = k + 1; i < n; i++) {\n t += V.get(i, k) * V.get(i, j);\n }\n t = -t / V.get(k + 1, k);\n for (let i = k + 1; i < n; i++) {\n V.set(i, j, V.get(i, j) + t * V.get(i, k));\n }\n }\n }\n for (let i = 0; i < n; i++) {\n V.set(i, k, 0);\n }\n V.set(k, k, 1);\n }\n }\n\n let pp = p - 1;\n let iter = 0;\n let eps = Number.EPSILON;\n while (p > 0) {\n let k, kase;\n for (k = p - 2; k >= -1; k--) {\n if (k === -1) {\n break;\n }\n const alpha =\n Number.MIN_VALUE + eps * Math.abs(s[k] + Math.abs(s[k + 1]));\n if (Math.abs(e[k]) <= alpha || Number.isNaN(e[k])) {\n e[k] = 0;\n break;\n }\n }\n if (k === p - 2) {\n kase = 4;\n } else {\n let ks;\n for (ks = p - 1; ks >= k; ks--) {\n if (ks === k) {\n break;\n }\n let t =\n (ks !== p ? Math.abs(e[ks]) : 0) +\n (ks !== k + 1 ? Math.abs(e[ks - 1]) : 0);\n if (Math.abs(s[ks]) <= eps * t) {\n s[ks] = 0;\n break;\n }\n }\n if (ks === k) {\n kase = 3;\n } else if (ks === p - 1) {\n kase = 1;\n } else {\n kase = 2;\n k = ks;\n }\n }\n\n k++;\n\n switch (kase) {\n case 1: {\n let f = e[p - 2];\n e[p - 2] = 0;\n for (let j = p - 2; j >= k; j--) {\n let t = hypotenuse(s[j], f);\n let cs = s[j] / t;\n let sn = f / t;\n s[j] = t;\n if (j !== k) {\n f = -sn * e[j - 1];\n e[j - 1] = cs * e[j - 1];\n }\n if (wantv) {\n for (let i = 0; i < n; i++) {\n t = cs * V.get(i, j) + sn * V.get(i, p - 1);\n V.set(i, p - 1, -sn * V.get(i, j) + cs * V.get(i, p - 1));\n V.set(i, j, t);\n }\n }\n }\n break;\n }\n case 2: {\n let f = e[k - 1];\n e[k - 1] = 0;\n for (let j = k; j < p; j++) {\n let t = hypotenuse(s[j], f);\n let cs = s[j] / t;\n let sn = f / t;\n s[j] = t;\n f = -sn * e[j];\n e[j] = cs * e[j];\n if (wantu) {\n for (let i = 0; i < m; i++) {\n t = cs * U.get(i, j) + sn * U.get(i, k - 1);\n U.set(i, k - 1, -sn * U.get(i, j) + cs * U.get(i, k - 1));\n U.set(i, j, t);\n }\n }\n }\n break;\n }\n case 3: {\n const scale = Math.max(\n Math.abs(s[p - 1]),\n Math.abs(s[p - 2]),\n Math.abs(e[p - 2]),\n Math.abs(s[k]),\n Math.abs(e[k]),\n );\n const sp = s[p - 1] / scale;\n const spm1 = s[p - 2] / scale;\n const epm1 = e[p - 2] / scale;\n const sk = s[k] / scale;\n const ek = e[k] / scale;\n const b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2;\n const c = sp * epm1 * (sp * epm1);\n let shift = 0;\n if (b !== 0 || c !== 0) {\n if (b < 0) {\n shift = 0 - Math.sqrt(b * b + c);\n } else {\n shift = Math.sqrt(b * b + c);\n }\n shift = c / (b + shift);\n }\n let f = (sk + sp) * (sk - sp) + shift;\n let g = sk * ek;\n for (let j = k; j < p - 1; j++) {\n let t = hypotenuse(f, g);\n if (t === 0) t = Number.MIN_VALUE;\n let cs = f / t;\n let sn = g / t;\n if (j !== k) {\n e[j - 1] = t;\n }\n f = cs * s[j] + sn * e[j];\n e[j] = cs * e[j] - sn * s[j];\n g = sn * s[j + 1];\n s[j + 1] = cs * s[j + 1];\n if (wantv) {\n for (let i = 0; i < n; i++) {\n t = cs * V.get(i, j) + sn * V.get(i, j + 1);\n V.set(i, j + 1, -sn * V.get(i, j) + cs * V.get(i, j + 1));\n V.set(i, j, t);\n }\n }\n t = hypotenuse(f, g);\n if (t === 0) t = Number.MIN_VALUE;\n cs = f / t;\n sn = g / t;\n s[j] = t;\n f = cs * e[j] + sn * s[j + 1];\n s[j + 1] = -sn * e[j] + cs * s[j + 1];\n g = sn * e[j + 1];\n e[j + 1] = cs * e[j + 1];\n if (wantu && j < m - 1) {\n for (let i = 0; i < m; i++) {\n t = cs * U.get(i, j) + sn * U.get(i, j + 1);\n U.set(i, j + 1, -sn * U.get(i, j) + cs * U.get(i, j + 1));\n U.set(i, j, t);\n }\n }\n }\n e[p - 2] = f;\n iter = iter + 1;\n break;\n }\n case 4: {\n if (s[k] <= 0) {\n s[k] = s[k] < 0 ? -s[k] : 0;\n if (wantv) {\n for (let i = 0; i <= pp; i++) {\n V.set(i, k, -V.get(i, k));\n }\n }\n }\n while (k < pp) {\n if (s[k] >= s[k + 1]) {\n break;\n }\n let t = s[k];\n s[k] = s[k + 1];\n s[k + 1] = t;\n if (wantv && k < n - 1) {\n for (let i = 0; i < n; i++) {\n t = V.get(i, k + 1);\n V.set(i, k + 1, V.get(i, k));\n V.set(i, k, t);\n }\n }\n if (wantu && k < m - 1) {\n for (let i = 0; i < m; i++) {\n t = U.get(i, k + 1);\n U.set(i, k + 1, U.get(i, k));\n U.set(i, k, t);\n }\n }\n k++;\n }\n iter = 0;\n p--;\n break;\n }\n // no default\n }\n }\n\n if (swapped) {\n let tmp = V;\n V = U;\n U = tmp;\n }\n\n this.m = m;\n this.n = n;\n this.s = s;\n this.U = U;\n this.V = V;\n }\n\n solve(value) {\n let Y = value;\n let e = this.threshold;\n let scols = this.s.length;\n let Ls = Matrix.zeros(scols, scols);\n\n for (let i = 0; i < scols; i++) {\n if (Math.abs(this.s[i]) <= e) {\n Ls.set(i, i, 0);\n } else {\n Ls.set(i, i, 1 / this.s[i]);\n }\n }\n\n let U = this.U;\n let V = this.rightSingularVectors;\n\n let VL = V.mmul(Ls);\n let vrows = V.rows;\n let urows = U.rows;\n let VLU = Matrix.zeros(vrows, urows);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < urows; j++) {\n let sum = 0;\n for (let k = 0; k < scols; k++) {\n sum += VL.get(i, k) * U.get(j, k);\n }\n VLU.set(i, j, sum);\n }\n }\n\n return VLU.mmul(Y);\n }\n\n solveForDiagonal(value) {\n return this.solve(Matrix.diag(value));\n }\n\n inverse() {\n let V = this.V;\n let e = this.threshold;\n let vrows = V.rows;\n let vcols = V.columns;\n let X = new Matrix(vrows, this.s.length);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < vcols; j++) {\n if (Math.abs(this.s[j]) > e) {\n X.set(i, j, V.get(i, j) / this.s[j]);\n }\n }\n }\n\n let U = this.U;\n\n let urows = U.rows;\n let ucols = U.columns;\n let Y = new Matrix(vrows, urows);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < urows; j++) {\n let sum = 0;\n for (let k = 0; k < ucols; k++) {\n sum += X.get(i, k) * U.get(j, k);\n }\n Y.set(i, j, sum);\n }\n }\n\n return Y;\n }\n\n get condition() {\n return this.s[0] / this.s[Math.min(this.m, this.n) - 1];\n }\n\n get norm2() {\n return this.s[0];\n }\n\n get rank() {\n let tol = Math.max(this.m, this.n) * this.s[0] * Number.EPSILON;\n let r = 0;\n let s = this.s;\n for (let i = 0, ii = s.length; i < ii; i++) {\n if (s[i] > tol) {\n r++;\n }\n }\n return r;\n }\n\n get diagonal() {\n return Array.from(this.s);\n }\n\n get threshold() {\n return (Number.EPSILON / 2) * Math.max(this.m, this.n) * this.s[0];\n }\n\n get leftSingularVectors() {\n return this.U;\n }\n\n get rightSingularVectors() {\n return this.V;\n }\n\n get diagonalMatrix() {\n return Matrix.diag(this.s);\n }\n}\n","import LuDecomposition from './dc/lu';\nimport QrDecomposition from './dc/qr';\nimport SingularValueDecomposition from './dc/svd';\nimport Matrix from './matrix';\nimport WrapperMatrix2D from './wrap/WrapperMatrix2D';\n\nexport function inverse(matrix, useSVD = false) {\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n if (useSVD) {\n return new SingularValueDecomposition(matrix).inverse();\n } else {\n return solve(matrix, Matrix.eye(matrix.rows));\n }\n}\n\nexport function solve(leftHandSide, rightHandSide, useSVD = false) {\n leftHandSide = WrapperMatrix2D.checkMatrix(leftHandSide);\n rightHandSide = WrapperMatrix2D.checkMatrix(rightHandSide);\n if (useSVD) {\n return new SingularValueDecomposition(leftHandSide).solve(rightHandSide);\n } else {\n return leftHandSide.isSquare()\n ? new LuDecomposition(leftHandSide).solve(rightHandSide)\n : new QrDecomposition(leftHandSide).solve(rightHandSide);\n }\n}\n","import LuDecomposition from './dc/lu';\nimport Matrix from './matrix';\nimport MatrixSelectionView from './views/selection';\n\nexport function determinant(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (matrix.isSquare()) {\n let a, b, c, d;\n if (matrix.columns === 2) {\n // 2 x 2 matrix\n a = matrix.get(0, 0);\n b = matrix.get(0, 1);\n c = matrix.get(1, 0);\n d = matrix.get(1, 1);\n\n return a * d - b * c;\n } else if (matrix.columns === 3) {\n // 3 x 3 matrix\n let subMatrix0, subMatrix1, subMatrix2;\n subMatrix0 = new MatrixSelectionView(matrix, [1, 2], [1, 2]);\n subMatrix1 = new MatrixSelectionView(matrix, [1, 2], [0, 2]);\n subMatrix2 = new MatrixSelectionView(matrix, [1, 2], [0, 1]);\n a = matrix.get(0, 0);\n b = matrix.get(0, 1);\n c = matrix.get(0, 2);\n\n return (\n a * determinant(subMatrix0) -\n b * determinant(subMatrix1) +\n c * determinant(subMatrix2)\n );\n } else {\n // general purpose determinant using the LU decomposition\n return new LuDecomposition(matrix).determinant;\n }\n } else {\n throw Error('determinant can only be calculated for a square matrix');\n }\n}\n","import SingularValueDecomposition from './dc/svd';\nimport Matrix from './matrix';\n\nfunction xrange(n, exception) {\n let range = [];\n for (let i = 0; i < n; i++) {\n if (i !== exception) {\n range.push(i);\n }\n }\n return range;\n}\n\nfunction dependenciesOneRow(\n error,\n matrix,\n index,\n thresholdValue = 10e-10,\n thresholdError = 10e-10,\n) {\n if (error > thresholdError) {\n return new Array(matrix.rows + 1).fill(0);\n } else {\n let returnArray = matrix.addRow(index, [0]);\n for (let i = 0; i < returnArray.rows; i++) {\n if (Math.abs(returnArray.get(i, 0)) < thresholdValue) {\n returnArray.set(i, 0, 0);\n }\n }\n return returnArray.to1DArray();\n }\n}\n\nexport function linearDependencies(matrix, options = {}) {\n const { thresholdValue = 10e-10, thresholdError = 10e-10 } = options;\n matrix = Matrix.checkMatrix(matrix);\n\n let n = matrix.rows;\n let results = new Matrix(n, n);\n\n for (let i = 0; i < n; i++) {\n let b = Matrix.columnVector(matrix.getRow(i));\n let Abis = matrix.subMatrixRow(xrange(n, i)).transpose();\n let svd = new SingularValueDecomposition(Abis);\n let x = svd.solve(b);\n let error = Matrix.sub(b, Abis.mmul(x)).abs().max();\n results.setRow(\n i,\n dependenciesOneRow(error, x, i, thresholdValue, thresholdError),\n );\n }\n return results;\n}\n","import SVD from './dc/svd';\nimport Matrix from './matrix';\n\nexport function pseudoInverse(matrix, threshold = Number.EPSILON) {\n matrix = Matrix.checkMatrix(matrix);\n let svdSolution = new SVD(matrix, { autoTranspose: true });\n\n let U = svdSolution.leftSingularVectors;\n let V = svdSolution.rightSingularVectors;\n let s = svdSolution.diagonal;\n\n for (let i = 0; i < s.length; i++) {\n if (Math.abs(s[i]) > threshold) {\n s[i] = 1.0 / s[i];\n } else {\n s[i] = 0.0;\n }\n }\n\n return V.mmul(Matrix.diag(s).mmul(U.transpose()));\n}\n","import Matrix from './matrix';\n\nexport function covariance(xMatrix, yMatrix = xMatrix, options = {}) {\n xMatrix = new Matrix(xMatrix);\n let yIsSame = false;\n if (\n typeof yMatrix === 'object' &&\n !Matrix.isMatrix(yMatrix) &&\n !Array.isArray(yMatrix)\n ) {\n options = yMatrix;\n yMatrix = xMatrix;\n yIsSame = true;\n } else {\n yMatrix = new Matrix(yMatrix);\n }\n if (xMatrix.rows !== yMatrix.rows) {\n throw new TypeError('Both matrices must have the same number of rows');\n }\n const { center = true } = options;\n if (center) {\n xMatrix = xMatrix.center('column');\n if (!yIsSame) {\n yMatrix = yMatrix.center('column');\n }\n }\n const cov = xMatrix.transpose().mmul(yMatrix);\n for (let i = 0; i < cov.rows; i++) {\n for (let j = 0; j < cov.columns; j++) {\n cov.set(i, j, cov.get(i, j) * (1 / (xMatrix.rows - 1)));\n }\n }\n return cov;\n}\n","import Matrix from './matrix';\n\nexport function correlation(xMatrix, yMatrix = xMatrix, options = {}) {\n xMatrix = new Matrix(xMatrix);\n let yIsSame = false;\n if (\n typeof yMatrix === 'object' &&\n !Matrix.isMatrix(yMatrix) &&\n !Array.isArray(yMatrix)\n ) {\n options = yMatrix;\n yMatrix = xMatrix;\n yIsSame = true;\n } else {\n yMatrix = new Matrix(yMatrix);\n }\n if (xMatrix.rows !== yMatrix.rows) {\n throw new TypeError('Both matrices must have the same number of rows');\n }\n\n const { center = true, scale = true } = options;\n if (center) {\n xMatrix.center('column');\n if (!yIsSame) {\n yMatrix.center('column');\n }\n }\n if (scale) {\n xMatrix.scale('column');\n if (!yIsSame) {\n yMatrix.scale('column');\n }\n }\n\n const sdx = xMatrix.standardDeviation('column', { unbiased: true });\n const sdy = yIsSame\n ? sdx\n : yMatrix.standardDeviation('column', { unbiased: true });\n\n const corr = xMatrix.transpose().mmul(yMatrix);\n for (let i = 0; i < corr.rows; i++) {\n for (let j = 0; j < corr.columns; j++) {\n corr.set(\n i,\n j,\n corr.get(i, j) * (1 / (sdx[i] * sdy[j])) * (1 / (xMatrix.rows - 1)),\n );\n }\n }\n return corr;\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class EigenvalueDecomposition {\n constructor(matrix, options = {}) {\n const { assumeSymmetric = false } = options;\n\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n if (!matrix.isSquare()) {\n throw new Error('Matrix is not a square matrix');\n }\n\n let n = matrix.columns;\n let V = new Matrix(n, n);\n let d = new Float64Array(n);\n let e = new Float64Array(n);\n let value = matrix;\n let i, j;\n\n let isSymmetric = false;\n if (assumeSymmetric) {\n isSymmetric = true;\n } else {\n isSymmetric = matrix.isSymmetric();\n }\n\n if (isSymmetric) {\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n V.set(i, j, value.get(i, j));\n }\n }\n tred2(n, e, d, V);\n tql2(n, e, d, V);\n } else {\n let H = new Matrix(n, n);\n let ort = new Float64Array(n);\n for (j = 0; j < n; j++) {\n for (i = 0; i < n; i++) {\n H.set(i, j, value.get(i, j));\n }\n }\n orthes(n, H, ort, V);\n hqr2(n, e, d, V, H);\n }\n\n this.n = n;\n this.e = e;\n this.d = d;\n this.V = V;\n }\n\n get realEigenvalues() {\n return Array.from(this.d);\n }\n\n get imaginaryEigenvalues() {\n return Array.from(this.e);\n }\n\n get eigenvectorMatrix() {\n return this.V;\n }\n\n get diagonalMatrix() {\n let n = this.n;\n let e = this.e;\n let d = this.d;\n let X = new Matrix(n, n);\n let i, j;\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n X.set(i, j, 0);\n }\n X.set(i, i, d[i]);\n if (e[i] > 0) {\n X.set(i, i + 1, e[i]);\n } else if (e[i] < 0) {\n X.set(i, i - 1, e[i]);\n }\n }\n return X;\n }\n}\n\nfunction tred2(n, e, d, V) {\n let f, g, h, i, j, k, hh, scale;\n\n for (j = 0; j < n; j++) {\n d[j] = V.get(n - 1, j);\n }\n\n for (i = n - 1; i > 0; i--) {\n scale = 0;\n h = 0;\n for (k = 0; k < i; k++) {\n scale = scale + Math.abs(d[k]);\n }\n\n if (scale === 0) {\n e[i] = d[i - 1];\n for (j = 0; j < i; j++) {\n d[j] = V.get(i - 1, j);\n V.set(i, j, 0);\n V.set(j, i, 0);\n }\n } else {\n for (k = 0; k < i; k++) {\n d[k] /= scale;\n h += d[k] * d[k];\n }\n\n f = d[i - 1];\n g = Math.sqrt(h);\n if (f > 0) {\n g = -g;\n }\n\n e[i] = scale * g;\n h = h - f * g;\n d[i - 1] = f - g;\n for (j = 0; j < i; j++) {\n e[j] = 0;\n }\n\n for (j = 0; j < i; j++) {\n f = d[j];\n V.set(j, i, f);\n g = e[j] + V.get(j, j) * f;\n for (k = j + 1; k <= i - 1; k++) {\n g += V.get(k, j) * d[k];\n e[k] += V.get(k, j) * f;\n }\n e[j] = g;\n }\n\n f = 0;\n for (j = 0; j < i; j++) {\n e[j] /= h;\n f += e[j] * d[j];\n }\n\n hh = f / (h + h);\n for (j = 0; j < i; j++) {\n e[j] -= hh * d[j];\n }\n\n for (j = 0; j < i; j++) {\n f = d[j];\n g = e[j];\n for (k = j; k <= i - 1; k++) {\n V.set(k, j, V.get(k, j) - (f * e[k] + g * d[k]));\n }\n d[j] = V.get(i - 1, j);\n V.set(i, j, 0);\n }\n }\n d[i] = h;\n }\n\n for (i = 0; i < n - 1; i++) {\n V.set(n - 1, i, V.get(i, i));\n V.set(i, i, 1);\n h = d[i + 1];\n if (h !== 0) {\n for (k = 0; k <= i; k++) {\n d[k] = V.get(k, i + 1) / h;\n }\n\n for (j = 0; j <= i; j++) {\n g = 0;\n for (k = 0; k <= i; k++) {\n g += V.get(k, i + 1) * V.get(k, j);\n }\n for (k = 0; k <= i; k++) {\n V.set(k, j, V.get(k, j) - g * d[k]);\n }\n }\n }\n\n for (k = 0; k <= i; k++) {\n V.set(k, i + 1, 0);\n }\n }\n\n for (j = 0; j < n; j++) {\n d[j] = V.get(n - 1, j);\n V.set(n - 1, j, 0);\n }\n\n V.set(n - 1, n - 1, 1);\n e[0] = 0;\n}\n\nfunction tql2(n, e, d, V) {\n let g, h, i, j, k, l, m, p, r, dl1, c, c2, c3, el1, s, s2, iter;\n\n for (i = 1; i < n; i++) {\n e[i - 1] = e[i];\n }\n\n e[n - 1] = 0;\n\n let f = 0;\n let tst1 = 0;\n let eps = Number.EPSILON;\n\n for (l = 0; l < n; l++) {\n tst1 = Math.max(tst1, Math.abs(d[l]) + Math.abs(e[l]));\n m = l;\n while (m < n) {\n if (Math.abs(e[m]) <= eps * tst1) {\n break;\n }\n m++;\n }\n\n if (m > l) {\n iter = 0;\n do {\n iter = iter + 1;\n\n g = d[l];\n p = (d[l + 1] - g) / (2 * e[l]);\n r = hypotenuse(p, 1);\n if (p < 0) {\n r = -r;\n }\n\n d[l] = e[l] / (p + r);\n d[l + 1] = e[l] * (p + r);\n dl1 = d[l + 1];\n h = g - d[l];\n for (i = l + 2; i < n; i++) {\n d[i] -= h;\n }\n\n f = f + h;\n\n p = d[m];\n c = 1;\n c2 = c;\n c3 = c;\n el1 = e[l + 1];\n s = 0;\n s2 = 0;\n for (i = m - 1; i >= l; i--) {\n c3 = c2;\n c2 = c;\n s2 = s;\n g = c * e[i];\n h = c * p;\n r = hypotenuse(p, e[i]);\n e[i + 1] = s * r;\n s = e[i] / r;\n c = p / r;\n p = c * d[i] - s * g;\n d[i + 1] = h + s * (c * g + s * d[i]);\n\n for (k = 0; k < n; k++) {\n h = V.get(k, i + 1);\n V.set(k, i + 1, s * V.get(k, i) + c * h);\n V.set(k, i, c * V.get(k, i) - s * h);\n }\n }\n\n p = (-s * s2 * c3 * el1 * e[l]) / dl1;\n e[l] = s * p;\n d[l] = c * p;\n } while (Math.abs(e[l]) > eps * tst1);\n }\n d[l] = d[l] + f;\n e[l] = 0;\n }\n\n for (i = 0; i < n - 1; i++) {\n k = i;\n p = d[i];\n for (j = i + 1; j < n; j++) {\n if (d[j] < p) {\n k = j;\n p = d[j];\n }\n }\n\n if (k !== i) {\n d[k] = d[i];\n d[i] = p;\n for (j = 0; j < n; j++) {\n p = V.get(j, i);\n V.set(j, i, V.get(j, k));\n V.set(j, k, p);\n }\n }\n }\n}\n\nfunction orthes(n, H, ort, V) {\n let low = 0;\n let high = n - 1;\n let f, g, h, i, j, m;\n let scale;\n\n for (m = low + 1; m <= high - 1; m++) {\n scale = 0;\n for (i = m; i <= high; i++) {\n scale = scale + Math.abs(H.get(i, m - 1));\n }\n\n if (scale !== 0) {\n h = 0;\n for (i = high; i >= m; i--) {\n ort[i] = H.get(i, m - 1) / scale;\n h += ort[i] * ort[i];\n }\n\n g = Math.sqrt(h);\n if (ort[m] > 0) {\n g = -g;\n }\n\n h = h - ort[m] * g;\n ort[m] = ort[m] - g;\n\n for (j = m; j < n; j++) {\n f = 0;\n for (i = high; i >= m; i--) {\n f += ort[i] * H.get(i, j);\n }\n\n f = f / h;\n for (i = m; i <= high; i++) {\n H.set(i, j, H.get(i, j) - f * ort[i]);\n }\n }\n\n for (i = 0; i <= high; i++) {\n f = 0;\n for (j = high; j >= m; j--) {\n f += ort[j] * H.get(i, j);\n }\n\n f = f / h;\n for (j = m; j <= high; j++) {\n H.set(i, j, H.get(i, j) - f * ort[j]);\n }\n }\n\n ort[m] = scale * ort[m];\n H.set(m, m - 1, scale * g);\n }\n }\n\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n V.set(i, j, i === j ? 1 : 0);\n }\n }\n\n for (m = high - 1; m >= low + 1; m--) {\n if (H.get(m, m - 1) !== 0) {\n for (i = m + 1; i <= high; i++) {\n ort[i] = H.get(i, m - 1);\n }\n\n for (j = m; j <= high; j++) {\n g = 0;\n for (i = m; i <= high; i++) {\n g += ort[i] * V.get(i, j);\n }\n\n g = g / ort[m] / H.get(m, m - 1);\n for (i = m; i <= high; i++) {\n V.set(i, j, V.get(i, j) + g * ort[i]);\n }\n }\n }\n }\n}\n\nfunction hqr2(nn, e, d, V, H) {\n let n = nn - 1;\n let low = 0;\n let high = nn - 1;\n let eps = Number.EPSILON;\n let exshift = 0;\n let norm = 0;\n let p = 0;\n let q = 0;\n let r = 0;\n let s = 0;\n let z = 0;\n let iter = 0;\n let i, j, k, l, m, t, w, x, y;\n let ra, sa, vr, vi;\n let notlast, cdivres;\n\n for (i = 0; i < nn; i++) {\n if (i < low || i > high) {\n d[i] = H.get(i, i);\n e[i] = 0;\n }\n\n for (j = Math.max(i - 1, 0); j < nn; j++) {\n norm = norm + Math.abs(H.get(i, j));\n }\n }\n\n while (n >= low) {\n l = n;\n while (l > low) {\n s = Math.abs(H.get(l - 1, l - 1)) + Math.abs(H.get(l, l));\n if (s === 0) {\n s = norm;\n }\n if (Math.abs(H.get(l, l - 1)) < eps * s) {\n break;\n }\n l--;\n }\n\n if (l === n) {\n H.set(n, n, H.get(n, n) + exshift);\n d[n] = H.get(n, n);\n e[n] = 0;\n n--;\n iter = 0;\n } else if (l === n - 1) {\n w = H.get(n, n - 1) * H.get(n - 1, n);\n p = (H.get(n - 1, n - 1) - H.get(n, n)) / 2;\n q = p * p + w;\n z = Math.sqrt(Math.abs(q));\n H.set(n, n, H.get(n, n) + exshift);\n H.set(n - 1, n - 1, H.get(n - 1, n - 1) + exshift);\n x = H.get(n, n);\n\n if (q >= 0) {\n z = p >= 0 ? p + z : p - z;\n d[n - 1] = x + z;\n d[n] = d[n - 1];\n if (z !== 0) {\n d[n] = x - w / z;\n }\n e[n - 1] = 0;\n e[n] = 0;\n x = H.get(n, n - 1);\n s = Math.abs(x) + Math.abs(z);\n p = x / s;\n q = z / s;\n r = Math.sqrt(p * p + q * q);\n p = p / r;\n q = q / r;\n\n for (j = n - 1; j < nn; j++) {\n z = H.get(n - 1, j);\n H.set(n - 1, j, q * z + p * H.get(n, j));\n H.set(n, j, q * H.get(n, j) - p * z);\n }\n\n for (i = 0; i <= n; i++) {\n z = H.get(i, n - 1);\n H.set(i, n - 1, q * z + p * H.get(i, n));\n H.set(i, n, q * H.get(i, n) - p * z);\n }\n\n for (i = low; i <= high; i++) {\n z = V.get(i, n - 1);\n V.set(i, n - 1, q * z + p * V.get(i, n));\n V.set(i, n, q * V.get(i, n) - p * z);\n }\n } else {\n d[n - 1] = x + p;\n d[n] = x + p;\n e[n - 1] = z;\n e[n] = -z;\n }\n\n n = n - 2;\n iter = 0;\n } else {\n x = H.get(n, n);\n y = 0;\n w = 0;\n if (l < n) {\n y = H.get(n - 1, n - 1);\n w = H.get(n, n - 1) * H.get(n - 1, n);\n }\n\n if (iter === 10) {\n exshift += x;\n for (i = low; i <= n; i++) {\n H.set(i, i, H.get(i, i) - x);\n }\n s = Math.abs(H.get(n, n - 1)) + Math.abs(H.get(n - 1, n - 2));\n x = y = 0.75 * s;\n w = -0.4375 * s * s;\n }\n\n if (iter === 30) {\n s = (y - x) / 2;\n s = s * s + w;\n if (s > 0) {\n s = Math.sqrt(s);\n if (y < x) {\n s = -s;\n }\n s = x - w / ((y - x) / 2 + s);\n for (i = low; i <= n; i++) {\n H.set(i, i, H.get(i, i) - s);\n }\n exshift += s;\n x = y = w = 0.964;\n }\n }\n\n iter = iter + 1;\n\n m = n - 2;\n while (m >= l) {\n z = H.get(m, m);\n r = x - z;\n s = y - z;\n p = (r * s - w) / H.get(m + 1, m) + H.get(m, m + 1);\n q = H.get(m + 1, m + 1) - z - r - s;\n r = H.get(m + 2, m + 1);\n s = Math.abs(p) + Math.abs(q) + Math.abs(r);\n p = p / s;\n q = q / s;\n r = r / s;\n if (m === l) {\n break;\n }\n if (\n Math.abs(H.get(m, m - 1)) * (Math.abs(q) + Math.abs(r)) <\n eps *\n (Math.abs(p) *\n (Math.abs(H.get(m - 1, m - 1)) +\n Math.abs(z) +\n Math.abs(H.get(m + 1, m + 1))))\n ) {\n break;\n }\n m--;\n }\n\n for (i = m + 2; i <= n; i++) {\n H.set(i, i - 2, 0);\n if (i > m + 2) {\n H.set(i, i - 3, 0);\n }\n }\n\n for (k = m; k <= n - 1; k++) {\n notlast = k !== n - 1;\n if (k !== m) {\n p = H.get(k, k - 1);\n q = H.get(k + 1, k - 1);\n r = notlast ? H.get(k + 2, k - 1) : 0;\n x = Math.abs(p) + Math.abs(q) + Math.abs(r);\n if (x !== 0) {\n p = p / x;\n q = q / x;\n r = r / x;\n }\n }\n\n if (x === 0) {\n break;\n }\n\n s = Math.sqrt(p * p + q * q + r * r);\n if (p < 0) {\n s = -s;\n }\n\n if (s !== 0) {\n if (k !== m) {\n H.set(k, k - 1, -s * x);\n } else if (l !== m) {\n H.set(k, k - 1, -H.get(k, k - 1));\n }\n\n p = p + s;\n x = p / s;\n y = q / s;\n z = r / s;\n q = q / p;\n r = r / p;\n\n for (j = k; j < nn; j++) {\n p = H.get(k, j) + q * H.get(k + 1, j);\n if (notlast) {\n p = p + r * H.get(k + 2, j);\n H.set(k + 2, j, H.get(k + 2, j) - p * z);\n }\n\n H.set(k, j, H.get(k, j) - p * x);\n H.set(k + 1, j, H.get(k + 1, j) - p * y);\n }\n\n for (i = 0; i <= Math.min(n, k + 3); i++) {\n p = x * H.get(i, k) + y * H.get(i, k + 1);\n if (notlast) {\n p = p + z * H.get(i, k + 2);\n H.set(i, k + 2, H.get(i, k + 2) - p * r);\n }\n\n H.set(i, k, H.get(i, k) - p);\n H.set(i, k + 1, H.get(i, k + 1) - p * q);\n }\n\n for (i = low; i <= high; i++) {\n p = x * V.get(i, k) + y * V.get(i, k + 1);\n if (notlast) {\n p = p + z * V.get(i, k + 2);\n V.set(i, k + 2, V.get(i, k + 2) - p * r);\n }\n\n V.set(i, k, V.get(i, k) - p);\n V.set(i, k + 1, V.get(i, k + 1) - p * q);\n }\n }\n }\n }\n }\n\n if (norm === 0) {\n return;\n }\n\n for (n = nn - 1; n >= 0; n--) {\n p = d[n];\n q = e[n];\n\n if (q === 0) {\n l = n;\n H.set(n, n, 1);\n for (i = n - 1; i >= 0; i--) {\n w = H.get(i, i) - p;\n r = 0;\n for (j = l; j <= n; j++) {\n r = r + H.get(i, j) * H.get(j, n);\n }\n\n if (e[i] < 0) {\n z = w;\n s = r;\n } else {\n l = i;\n if (e[i] === 0) {\n H.set(i, n, w !== 0 ? -r / w : -r / (eps * norm));\n } else {\n x = H.get(i, i + 1);\n y = H.get(i + 1, i);\n q = (d[i] - p) * (d[i] - p) + e[i] * e[i];\n t = (x * s - z * r) / q;\n H.set(i, n, t);\n H.set(\n i + 1,\n n,\n Math.abs(x) > Math.abs(z) ? (-r - w * t) / x : (-s - y * t) / z,\n );\n }\n\n t = Math.abs(H.get(i, n));\n if (eps * t * t > 1) {\n for (j = i; j <= n; j++) {\n H.set(j, n, H.get(j, n) / t);\n }\n }\n }\n }\n } else if (q < 0) {\n l = n - 1;\n\n if (Math.abs(H.get(n, n - 1)) > Math.abs(H.get(n - 1, n))) {\n H.set(n - 1, n - 1, q / H.get(n, n - 1));\n H.set(n - 1, n, -(H.get(n, n) - p) / H.get(n, n - 1));\n } else {\n cdivres = cdiv(0, -H.get(n - 1, n), H.get(n - 1, n - 1) - p, q);\n H.set(n - 1, n - 1, cdivres[0]);\n H.set(n - 1, n, cdivres[1]);\n }\n\n H.set(n, n - 1, 0);\n H.set(n, n, 1);\n for (i = n - 2; i >= 0; i--) {\n ra = 0;\n sa = 0;\n for (j = l; j <= n; j++) {\n ra = ra + H.get(i, j) * H.get(j, n - 1);\n sa = sa + H.get(i, j) * H.get(j, n);\n }\n\n w = H.get(i, i) - p;\n\n if (e[i] < 0) {\n z = w;\n r = ra;\n s = sa;\n } else {\n l = i;\n if (e[i] === 0) {\n cdivres = cdiv(-ra, -sa, w, q);\n H.set(i, n - 1, cdivres[0]);\n H.set(i, n, cdivres[1]);\n } else {\n x = H.get(i, i + 1);\n y = H.get(i + 1, i);\n vr = (d[i] - p) * (d[i] - p) + e[i] * e[i] - q * q;\n vi = (d[i] - p) * 2 * q;\n if (vr === 0 && vi === 0) {\n vr =\n eps *\n norm *\n (Math.abs(w) +\n Math.abs(q) +\n Math.abs(x) +\n Math.abs(y) +\n Math.abs(z));\n }\n cdivres = cdiv(\n x * r - z * ra + q * sa,\n x * s - z * sa - q * ra,\n vr,\n vi,\n );\n H.set(i, n - 1, cdivres[0]);\n H.set(i, n, cdivres[1]);\n if (Math.abs(x) > Math.abs(z) + Math.abs(q)) {\n H.set(\n i + 1,\n n - 1,\n (-ra - w * H.get(i, n - 1) + q * H.get(i, n)) / x,\n );\n H.set(\n i + 1,\n n,\n (-sa - w * H.get(i, n) - q * H.get(i, n - 1)) / x,\n );\n } else {\n cdivres = cdiv(\n -r - y * H.get(i, n - 1),\n -s - y * H.get(i, n),\n z,\n q,\n );\n H.set(i + 1, n - 1, cdivres[0]);\n H.set(i + 1, n, cdivres[1]);\n }\n }\n\n t = Math.max(Math.abs(H.get(i, n - 1)), Math.abs(H.get(i, n)));\n if (eps * t * t > 1) {\n for (j = i; j <= n; j++) {\n H.set(j, n - 1, H.get(j, n - 1) / t);\n H.set(j, n, H.get(j, n) / t);\n }\n }\n }\n }\n }\n }\n\n for (i = 0; i < nn; i++) {\n if (i < low || i > high) {\n for (j = i; j < nn; j++) {\n V.set(i, j, H.get(i, j));\n }\n }\n }\n\n for (j = nn - 1; j >= low; j--) {\n for (i = low; i <= high; i++) {\n z = 0;\n for (k = low; k <= Math.min(j, high); k++) {\n z = z + V.get(i, k) * H.get(k, j);\n }\n V.set(i, j, z);\n }\n }\n}\n\nfunction cdiv(xr, xi, yr, yi) {\n let r, d;\n if (Math.abs(yr) > Math.abs(yi)) {\n r = yi / yr;\n d = yr + r * yi;\n return [(xr + r * xi) / d, (xi - r * xr) / d];\n } else {\n r = yr / yi;\n d = yi + r * yr;\n return [(r * xr + xi) / d, (r * xi - xr) / d];\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class CholeskyDecomposition {\n constructor(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n if (!value.isSymmetric()) {\n throw new Error('Matrix is not symmetric');\n }\n\n let a = value;\n let dimension = a.rows;\n let l = new Matrix(dimension, dimension);\n let positiveDefinite = true;\n let i, j, k;\n\n for (j = 0; j < dimension; j++) {\n let d = 0;\n for (k = 0; k < j; k++) {\n let s = 0;\n for (i = 0; i < k; i++) {\n s += l.get(k, i) * l.get(j, i);\n }\n s = (a.get(j, k) - s) / l.get(k, k);\n l.set(j, k, s);\n d = d + s * s;\n }\n\n d = a.get(j, j) - d;\n\n positiveDefinite &= d > 0;\n l.set(j, j, Math.sqrt(Math.max(d, 0)));\n for (k = j + 1; k < dimension; k++) {\n l.set(j, k, 0);\n }\n }\n\n this.L = l;\n this.positiveDefinite = Boolean(positiveDefinite);\n }\n\n isPositiveDefinite() {\n return this.positiveDefinite;\n }\n\n solve(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let l = this.L;\n let dimension = l.rows;\n\n if (value.rows !== dimension) {\n throw new Error('Matrix dimensions do not match');\n }\n if (this.isPositiveDefinite() === false) {\n throw new Error('Matrix is not positive definite');\n }\n\n let count = value.columns;\n let B = value.clone();\n let i, j, k;\n\n for (k = 0; k < dimension; k++) {\n for (j = 0; j < count; j++) {\n for (i = 0; i < k; i++) {\n B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(k, i));\n }\n B.set(k, j, B.get(k, j) / l.get(k, k));\n }\n }\n\n for (k = dimension - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n for (i = k + 1; i < dimension; i++) {\n B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(i, k));\n }\n B.set(k, j, B.get(k, j) / l.get(k, k));\n }\n }\n\n return B;\n }\n\n get lowerTriangularMatrix() {\n return this.L;\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class nipals {\n constructor(X, options = {}) {\n X = WrapperMatrix2D.checkMatrix(X);\n let { Y } = options;\n const {\n scaleScores = false,\n maxIterations = 1000,\n terminationCriteria = 1e-10,\n } = options;\n\n let u;\n if (Y) {\n if (Array.isArray(Y) && typeof Y[0] === 'number') {\n Y = Matrix.columnVector(Y);\n } else {\n Y = WrapperMatrix2D.checkMatrix(Y);\n }\n if (!Y.isColumnVector() || Y.rows !== X.rows) {\n throw new Error('Y must be a column vector of length X.rows');\n }\n u = Y;\n } else {\n u = X.getColumnVector(0);\n }\n\n let diff = 1;\n let t, q, w, tOld;\n\n for (\n let counter = 0;\n counter < maxIterations && diff > terminationCriteria;\n counter++\n ) {\n w = X.transpose().mmul(u).div(u.transpose().mmul(u).get(0, 0));\n w = w.div(w.norm());\n\n t = X.mmul(w).div(w.transpose().mmul(w).get(0, 0));\n\n if (counter > 0) {\n diff = t.clone().sub(tOld).pow(2).sum();\n }\n tOld = t.clone();\n\n if (Y) {\n q = Y.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n q = q.div(q.norm());\n\n u = Y.mmul(q).div(q.transpose().mmul(q).get(0, 0));\n } else {\n u = t;\n }\n }\n\n if (Y) {\n let p = X.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n p = p.div(p.norm());\n let xResidual = X.clone().sub(t.clone().mmul(p.transpose()));\n let residual = u.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n let yResidual = Y.clone().sub(\n t.clone().mulS(residual.get(0, 0)).mmul(q.transpose()),\n );\n\n this.t = t;\n this.p = p.transpose();\n this.w = w.transpose();\n this.q = q;\n this.u = u;\n this.s = t.transpose().mmul(t);\n this.xResidual = xResidual;\n this.yResidual = yResidual;\n this.betas = residual;\n } else {\n this.w = w.transpose();\n this.s = t.transpose().mmul(t).sqrt();\n if (scaleScores) {\n this.t = t.clone().div(this.s.get(0, 0));\n } else {\n this.t = t;\n }\n this.xResidual = X.sub(t.mmul(w.transpose()));\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ml_matrix_1 = require(\"ml-matrix\");\nvar MDS = /** @class */ (function () {\n function MDS(params) {\n this.distances = params.distances;\n this.dimension = params.dimension || 2;\n this.linkDistance = params.linkDistance;\n }\n MDS.prototype.layout = function () {\n var self = this;\n var dimension = self.dimension, distances = self.distances, linkDistance = self.linkDistance;\n try {\n // square distances\n var M = ml_matrix_1.Matrix.mul(ml_matrix_1.Matrix.pow(distances, 2), -0.5);\n // double centre the rows/columns\n var rowMeans = M.mean('row');\n var colMeans = M.mean('column');\n var totalMean = M.mean();\n M.add(totalMean).subRowVector(rowMeans).subColumnVector(colMeans);\n // take the SVD of the double centred matrix, and return the\n // points from it\n var ret = new ml_matrix_1.SingularValueDecomposition(M);\n var eigenValues_1 = ml_matrix_1.Matrix.sqrt(ret.diagonalMatrix).diagonal();\n return ret.leftSingularVectors.toJSON().map(function (row) {\n return ml_matrix_1.Matrix.mul([row], [eigenValues_1]).toJSON()[0].splice(0, dimension);\n });\n }\n catch (_a) {\n var res = [];\n for (var i = 0; i < distances.length; i++) {\n var x = Math.random() * linkDistance;\n var y = Math.random() * linkDistance;\n res.push([x, y]);\n }\n return res;\n }\n };\n return MDS;\n}());\nexports.default = MDS;\n//# sourceMappingURL=mds.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SPEED_DIVISOR = 800;\nvar RadialNonoverlapForce = /** @class */ (function () {\n function RadialNonoverlapForce(params) {\n this.disp = [];\n this.positions = params.positions;\n this.adjMatrix = params.adjMatrix;\n this.focusID = params.focusID;\n this.radii = params.radii;\n this.iterations = params.iterations || 10;\n this.height = params.height || 10;\n this.width = params.width || 10;\n this.speed = params.speed || 100;\n this.gravity = params.gravity || 10;\n this.nodeSizeFunc = params.nodeSizeFunc;\n this.k = params.k || 5;\n this.strictRadial = params.strictRadial;\n this.nodes = params.nodes;\n }\n RadialNonoverlapForce.prototype.layout = function () {\n var self = this;\n var positions = self.positions;\n var disp = [];\n var iterations = self.iterations;\n var maxDisplace = self.width / 10;\n self.maxDisplace = maxDisplace;\n self.disp = disp;\n for (var i = 0; i < iterations; i++) {\n positions.forEach(function (_, k) {\n disp[k] = { x: 0, y: 0 };\n });\n // 给重叠的节点增加斥力\n self.getRepulsion();\n self.updatePositions();\n }\n return positions;\n };\n RadialNonoverlapForce.prototype.getRepulsion = function () {\n var self = this;\n var positions = self.positions;\n var nodes = self.nodes;\n var disp = self.disp;\n var k = self.k;\n var radii = self.radii || [];\n positions.forEach(function (v, i) {\n disp[i] = { x: 0, y: 0 };\n positions.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n // v and u are not on the same circle, return\n if (radii[i] !== radii[j]) {\n return;\n }\n var vecx = v[0] - u[0];\n var vecy = v[1] - u[1];\n var vecLength = Math.sqrt(vecx * vecx + vecy * vecy);\n if (vecLength === 0) {\n vecLength = 1;\n var sign = i > j ? 1 : -1;\n vecx = 0.01 * sign;\n vecy = 0.01 * sign;\n }\n // these two nodes overlap\n if (vecLength < self.nodeSizeFunc(nodes[i]) / 2 + self.nodeSizeFunc(nodes[j]) / 2) {\n var common = (k * k) / vecLength;\n disp[i].x += (vecx / vecLength) * common;\n disp[i].y += (vecy / vecLength) * common;\n }\n });\n });\n };\n RadialNonoverlapForce.prototype.updatePositions = function () {\n var self = this;\n var positions = self.positions;\n var disp = self.disp;\n var speed = self.speed;\n var strictRadial = self.strictRadial;\n var f = self.focusID;\n var maxDisplace = self.maxDisplace || self.width / 10;\n if (strictRadial) {\n disp.forEach(function (di, i) {\n var vx = positions[i][0] - positions[f][0];\n var vy = positions[i][1] - positions[f][1];\n var vLength = Math.sqrt(vx * vx + vy * vy);\n var vpx = vy / vLength;\n var vpy = -vx / vLength;\n var diLength = Math.sqrt(di.x * di.x + di.y * di.y);\n var alpha = Math.acos((vpx * di.x + vpy * di.y) / diLength);\n if (alpha > Math.PI / 2) {\n alpha -= Math.PI / 2;\n vpx *= -1;\n vpy *= -1;\n }\n var tdispLength = Math.cos(alpha) * diLength;\n di.x = vpx * tdispLength;\n di.y = vpy * tdispLength;\n });\n }\n // move\n var radii = self.radii;\n positions.forEach(function (n, i) {\n if (i === f) {\n return;\n }\n var distLength = Math.sqrt(disp[i].x * disp[i].x + disp[i].y * disp[i].y);\n if (distLength > 0 && i !== f) {\n var limitedDist = Math.min(maxDisplace * (speed / SPEED_DIVISOR), distLength);\n n[0] += (disp[i].x / distLength) * limitedDist;\n n[1] += (disp[i].y / distLength) * limitedDist;\n if (strictRadial) {\n var vx = n[0] - positions[f][0];\n var vy = n[1] - positions[f][1];\n var nfDis = Math.sqrt(vx * vx + vy * vy);\n vx = (vx / nfDis) * radii[i];\n vy = (vy / nfDis) * radii[i];\n n[0] = positions[f][0] + vx;\n n[1] = positions[f][1] + vy;\n }\n }\n });\n };\n return RadialNonoverlapForce;\n}());\nexports.default = RadialNonoverlapForce;\n//# sourceMappingURL=radialNonoverlapForce.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RadialLayout = void 0;\nvar util_1 = require(\"../../util\");\nvar base_1 = require(\"../base\");\nvar mds_1 = __importDefault(require(\"./mds\"));\nvar radialNonoverlapForce_1 = __importDefault(require(\"./radialNonoverlapForce\"));\nfunction getWeightMatrix(M) {\n var rows = M.length;\n var cols = M[0].length;\n var result = [];\n for (var i = 0; i < rows; i++) {\n var row = [];\n for (var j = 0; j < cols; j++) {\n if (M[i][j] !== 0) {\n row.push(1 / (M[i][j] * M[i][j]));\n }\n else {\n row.push(0);\n }\n }\n result.push(row);\n }\n return result;\n}\nfunction getIndexById(array, id) {\n var index = -1;\n array.forEach(function (a, i) {\n if (a.id === id) {\n index = i;\n }\n });\n return index;\n}\nfunction getEDistance(p1, p2) {\n return Math.sqrt((p1[0] - p2[0]) * (p1[0] - p2[0]) + (p1[1] - p2[1]) * (p1[1] - p2[1]));\n}\n/**\n * 辐射状布局\n */\nvar RadialLayout = /** @class */ (function (_super) {\n __extends(RadialLayout, _super);\n function RadialLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 中心点,默认为数据中第一个点 */\n _this.focusNode = null;\n /** 每一圈半径 */\n _this.unitRadius = null;\n /** 默认边长度 */\n _this.linkDistance = 50;\n /** 是否防止重叠 */\n _this.preventOverlap = false;\n /** 是否必须是严格的 radial 布局,即每一层的节点严格布局在一个环上。preventOverlap 为 true 时生效 */\n _this.strictRadial = true;\n /** 防止重叠步骤的最大迭代次数 */\n _this.maxPreventOverlapIteration = 200;\n _this.sortStrength = 10;\n _this.nodes = [];\n _this.edges = [];\n _this.updateCfg(options);\n return _this;\n }\n RadialLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n focusNode: null,\n unitRadius: null,\n linkDistance: 50,\n preventOverlap: false,\n nodeSize: undefined,\n nodeSpacing: undefined,\n strictRadial: true,\n maxPreventOverlapIteration: 200,\n sortBy: undefined,\n sortStrength: 10\n };\n };\n /**\n * 执行布局\n */\n RadialLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges || [];\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var linkDistance = self.linkDistance;\n // layout\n var focusNode = null;\n if ((0, util_1.isString)(self.focusNode)) {\n var found = false;\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].id === self.focusNode) {\n focusNode = nodes[i];\n self.focusNode = focusNode;\n found = true;\n i = nodes.length;\n }\n }\n if (!found) {\n focusNode = null;\n }\n }\n else {\n focusNode = self.focusNode;\n }\n // default focus node\n if (!focusNode) {\n focusNode = nodes[0];\n self.focusNode = focusNode;\n }\n // the index of the focusNode in data\n var focusIndex = getIndexById(nodes, focusNode.id);\n if (focusIndex < 0)\n focusIndex = 0;\n self.focusIndex = focusIndex;\n // the graph-theoretic distance (shortest path distance) matrix\n var adjMatrix = (0, util_1.getAdjMatrix)({ nodes: nodes, edges: edges }, false);\n var D = (0, util_1.floydWarshall)(adjMatrix);\n var maxDistance = self.maxToFocus(D, focusIndex);\n // replace first node in unconnected component to the circle at (maxDistance + 1)\n self.handleInfinity(D, focusIndex, maxDistance + 1);\n self.distances = D;\n // the shortest path distance from each node to focusNode\n var focusNodeD = D[focusIndex];\n var width = self.width || 500;\n var height = self.height || 500;\n var semiWidth = width - center[0] > center[0] ? center[0] : width - center[0];\n var semiHeight = height - center[1] > center[1] ? center[1] : height - center[1];\n if (semiWidth === 0) {\n semiWidth = width / 2;\n }\n if (semiHeight === 0) {\n semiHeight = height / 2;\n }\n // the maxRadius of the graph\n var maxRadius = semiHeight > semiWidth ? semiWidth : semiHeight;\n var maxD = Math.max.apply(Math, focusNodeD);\n // the radius for each nodes away from focusNode\n var radii = [];\n focusNodeD.forEach(function (value, i) {\n if (!self.unitRadius) {\n self.unitRadius = maxRadius / maxD;\n }\n radii[i] = value * self.unitRadius;\n });\n self.radii = radii;\n var eIdealD = self.eIdealDisMatrix();\n // const eIdealD = scaleMatrix(D, linkDistance);\n self.eIdealDistances = eIdealD;\n // the weight matrix, Wij = 1 / dij^(-2)\n var W = getWeightMatrix(eIdealD);\n self.weights = W;\n // the initial positions from mds\n var mds = new mds_1.default({ linkDistance: linkDistance, distances: eIdealD });\n var positions = mds.layout();\n positions.forEach(function (p) {\n if ((0, util_1.isNaN)(p[0])) {\n p[0] = Math.random() * linkDistance;\n }\n if ((0, util_1.isNaN)(p[1])) {\n p[1] = Math.random() * linkDistance;\n }\n });\n self.positions = positions;\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n // move the graph to origin, centered at focusNode\n positions.forEach(function (p) {\n p[0] -= positions[focusIndex][0];\n p[1] -= positions[focusIndex][1];\n });\n self.run();\n var preventOverlap = self.preventOverlap;\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n var strictRadial = self.strictRadial;\n // stagger the overlapped nodes\n if (preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res + nodeSpacingFunc_1(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var res = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n return res + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n var nonoverlapForceParams = {\n nodes: nodes,\n nodeSizeFunc: nodeSizeFunc,\n adjMatrix: adjMatrix,\n positions: positions,\n radii: radii,\n height: height,\n width: width,\n strictRadial: strictRadial,\n focusID: focusIndex,\n iterations: self.maxPreventOverlapIteration || 200,\n k: positions.length / 4.5\n };\n var nonoverlapForce = new radialNonoverlapForce_1.default(nonoverlapForceParams);\n positions = nonoverlapForce.layout();\n }\n // move the graph to center\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n RadialLayout.prototype.run = function () {\n var self = this;\n var maxIteration = self.maxIteration;\n var positions = self.positions || [];\n var W = self.weights || [];\n var eIdealDis = self.eIdealDistances || [];\n var radii = self.radii || [];\n for (var i = 0; i <= maxIteration; i++) {\n var param = i / maxIteration;\n self.oneIteration(param, positions, radii, eIdealDis, W);\n }\n };\n RadialLayout.prototype.oneIteration = function (param, positions, radii, D, W) {\n var self = this;\n var vparam = 1 - param;\n var focusIndex = self.focusIndex;\n positions.forEach(function (v, i) {\n // v\n var originDis = getEDistance(v, [0, 0]);\n var reciODis = originDis === 0 ? 0 : 1 / originDis;\n if (i === focusIndex) {\n return;\n }\n var xMolecule = 0;\n var yMolecule = 0;\n var denominator = 0;\n positions.forEach(function (u, j) {\n // u\n if (i === j) {\n return;\n }\n // the euclidean distance between v and u\n var edis = getEDistance(v, u);\n var reciEdis = edis === 0 ? 0 : 1 / edis;\n var idealDis = D[j][i];\n // same for x and y\n denominator += W[i][j];\n // x\n xMolecule += W[i][j] * (u[0] + idealDis * (v[0] - u[0]) * reciEdis);\n // y\n yMolecule += W[i][j] * (u[1] + idealDis * (v[1] - u[1]) * reciEdis);\n });\n var reciR = radii[i] === 0 ? 0 : 1 / radii[i];\n denominator *= vparam;\n denominator += param * reciR * reciR;\n // x\n xMolecule *= vparam;\n xMolecule += param * reciR * v[0] * reciODis;\n v[0] = xMolecule / denominator;\n // y\n yMolecule *= vparam;\n yMolecule += param * reciR * v[1] * reciODis;\n v[1] = yMolecule / denominator;\n });\n };\n RadialLayout.prototype.eIdealDisMatrix = function () {\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return [];\n var D = self.distances;\n var linkDis = self.linkDistance;\n var radii = self.radii || [];\n var unitRadius = self.unitRadius || 50;\n var result = [];\n if (D) {\n D.forEach(function (row, i) {\n var newRow = [];\n row.forEach(function (v, j) {\n if (i === j) {\n newRow.push(0);\n }\n else if (radii[i] === radii[j]) {\n // i and j are on the same circle\n if (self.sortBy === \"data\") {\n // sort the nodes on the same circle according to the ordering of the data\n newRow.push((v * (Math.abs(i - j) * self.sortStrength)) /\n (radii[i] / unitRadius));\n }\n else if (self.sortBy) {\n // sort the nodes on the same circle according to the attributes\n var iValue = nodes[i][self.sortBy] || 0;\n var jValue = nodes[j][self.sortBy] || 0;\n if ((0, util_1.isString)(iValue)) {\n iValue = iValue.charCodeAt(0);\n }\n if ((0, util_1.isString)(jValue)) {\n jValue = jValue.charCodeAt(0);\n }\n newRow.push((v * (Math.abs(iValue - jValue) * self.sortStrength)) /\n (radii[i] / unitRadius));\n }\n else {\n newRow.push((v * linkDis) / (radii[i] / unitRadius));\n }\n }\n else {\n // i and j are on different circle\n // i and j are on different circle\n var link = (linkDis + unitRadius) / 2;\n newRow.push(v * link);\n }\n });\n result.push(newRow);\n });\n }\n return result;\n };\n RadialLayout.prototype.handleInfinity = function (matrix, focusIndex, step) {\n var length = matrix.length;\n // 遍历 matrix 中遍历 focus 对应行\n for (var i = 0; i < length; i++) {\n // matrix 关注点对应行的 Inf 项\n if (matrix[focusIndex][i] === Infinity) {\n matrix[focusIndex][i] = step;\n matrix[i][focusIndex] = step;\n // 遍历 matrix 中的 i 行,i 行中非 Inf 项若在 focus 行为 Inf,则替换 focus 行的那个 Inf\n for (var j = 0; j < length; j++) {\n if (matrix[i][j] !== Infinity && matrix[focusIndex][j] === Infinity) {\n matrix[focusIndex][j] = step + matrix[i][j];\n matrix[j][focusIndex] = step + matrix[i][j];\n }\n }\n }\n }\n // 处理其他行的 Inf。根据该行对应点与 focus 距离以及 Inf 项点 与 focus 距离,决定替换值\n for (var i = 0; i < length; i++) {\n if (i === focusIndex) {\n continue;\n }\n for (var j = 0; j < length; j++) {\n if (matrix[i][j] === Infinity) {\n var minus = Math.abs(matrix[focusIndex][i] - matrix[focusIndex][j]);\n minus = minus === 0 ? 1 : minus;\n matrix[i][j] = minus;\n }\n }\n }\n };\n RadialLayout.prototype.maxToFocus = function (matrix, focusIndex) {\n var max = 0;\n for (var i = 0; i < matrix[focusIndex].length; i++) {\n if (matrix[focusIndex][i] === Infinity) {\n continue;\n }\n max = matrix[focusIndex][i] > max ? matrix[focusIndex][i] : max;\n }\n return max;\n };\n RadialLayout.prototype.getType = function () {\n return \"radial\";\n };\n return RadialLayout;\n}(base_1.Base));\nexports.RadialLayout = RadialLayout;\n//# sourceMappingURL=radial.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./radial\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview concentric layout\n * @author shiwu.wyy@antfin.com\n * this algorithm refers to - https://github.com/cytoscape/cytoscape.js/\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConcentricLayout = void 0;\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * 同心圆布局\n */\nvar ConcentricLayout = /** @class */ (function (_super) {\n __extends(ConcentricLayout, _super);\n function ConcentricLayout(options) {\n var _this = _super.call(this) || this;\n _this.nodeSize = 30;\n /** min spacing between outside of nodes (used for radius adjustment) */\n _this.minNodeSpacing = 10;\n /** same as minNodeSpacing. min spacing between outside of nodes (used for radius adjustment) */\n _this.nodeSpacing = 10;\n /** prevents node overlap, may overflow boundingBox if not enough space */\n _this.preventOverlap = false;\n /** whether levels have an equal radial distance betwen them, may cause bounding box overflow */\n _this.equidistant = false;\n /** where nodes start in radians */\n _this.startAngle = (3 / 2) * Math.PI;\n /** whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) */\n _this.clockwise = true;\n /** 根据 sortBy 指定的属性进行排布,数值高的放在中心,如果是 sortBy 则会计算节点度数,度数最高的放在中心 */\n _this.sortBy = \"degree\";\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n ConcentricLayout.prototype.getDefaultCfg = function () {\n return {\n nodeSize: 30,\n minNodeSpacing: 10,\n nodeSpacing: 10,\n preventOverlap: false,\n sweep: undefined,\n equidistant: false,\n startAngle: (3 / 2) * Math.PI,\n clockwise: true,\n maxLevelDiff: undefined,\n sortBy: \"degree\"\n };\n };\n /**\n * 执行布局\n */\n ConcentricLayout.prototype.execute = function () {\n var _a, _b;\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n var n = nodes.length;\n if (n === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (n === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeSize = self.nodeSize, nodeSpacing = self.nodeSpacing;\n var layoutNodes = [];\n var maxNodeSize;\n var maxNodeSpacing = 0;\n if ((0, util_1.isArray)(nodeSize)) {\n maxNodeSize = Math.max(nodeSize[0], nodeSize[1]);\n }\n else {\n maxNodeSize = nodeSize;\n }\n if ((0, util_1.isArray)(nodeSpacing)) {\n maxNodeSpacing = Math.max(nodeSpacing[0], nodeSpacing[1]);\n }\n else if ((0, util_1.isNumber)(nodeSpacing)) {\n maxNodeSpacing = nodeSpacing;\n }\n nodes.forEach(function (node) {\n layoutNodes.push(node);\n var nodeSize = maxNodeSize;\n if ((0, util_1.isArray)(node.size)) {\n nodeSize = Math.max(node.size[0], node.size[1]);\n }\n else if ((0, util_1.isNumber)(node.size)) {\n nodeSize = node.size;\n }\n else if ((0, util_1.isObject)(node.size)) {\n nodeSize = Math.max(node.size.width, node.size.height);\n }\n maxNodeSize = Math.max(maxNodeSize, nodeSize);\n if ((0, util_1.isFunction)(nodeSpacing)) {\n maxNodeSpacing = Math.max(nodeSpacing(node), maxNodeSpacing);\n }\n });\n self.clockwise =\n self.counterclockwise !== undefined\n ? !self.counterclockwise\n : self.clockwise;\n // layout\n var nodeMap = {};\n var indexMap = {};\n layoutNodes.forEach(function (node, i) {\n nodeMap[node.id] = node;\n indexMap[node.id] = i;\n });\n // get the node degrees\n if (self.sortBy === \"degree\" ||\n !(0, util_1.isString)(self.sortBy) ||\n layoutNodes[0][self.sortBy] === undefined) {\n self.sortBy = \"degree\";\n if (!(0, util_1.isNumber)(nodes[0].degree)) {\n var values_1 = (0, util_1.getDegree)(nodes.length, indexMap, edges);\n layoutNodes.forEach(function (node, i) {\n node.degree = values_1[i].all;\n });\n }\n }\n // sort nodes by value\n layoutNodes.sort(function (n1, n2) {\n return n2[self.sortBy] - n1[self.sortBy];\n });\n self.maxValueNode = layoutNodes[0];\n self.maxLevelDiff =\n self.maxLevelDiff || self.maxValueNode[self.sortBy] / 4;\n // put the values into levels\n var levels = [[]];\n var currentLevel = levels[0];\n layoutNodes.forEach(function (node) {\n if (currentLevel.length > 0) {\n var diff = Math.abs(currentLevel[0][self.sortBy] - node[self.sortBy]);\n if (self.maxLevelDiff && diff >= self.maxLevelDiff) {\n currentLevel = [];\n levels.push(currentLevel);\n }\n }\n currentLevel.push(node);\n });\n // create positions for levels\n var minDist = maxNodeSize + (maxNodeSpacing || self.minNodeSpacing); // min dist between nodes\n if (!self.preventOverlap) {\n // then strictly constrain to bb\n var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1;\n var maxR = Math.min(self.width, self.height) / 2 - minDist;\n var rStep = maxR / (levels.length + (firstLvlHasMulti ? 1 : 0));\n minDist = Math.min(minDist, rStep);\n }\n // find the metrics for each level\n var r = 0;\n levels.forEach(function (level) {\n var sweep = self.sweep;\n if (sweep === undefined) {\n sweep = 2 * Math.PI - (2 * Math.PI) / level.length;\n }\n var dTheta = (level.dTheta = sweep / Math.max(1, level.length - 1));\n // calculate the radius\n if (level.length > 1 && self.preventOverlap) {\n // but only if more than one node (can't overlap)\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt((minDist * minDist) / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n r = Math.max(rMin, r);\n }\n level.r = r;\n r += minDist;\n });\n if (self.equidistant) {\n var rDeltaMax_1 = 0;\n var rr_1 = 0;\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var rDelta = level.r - rr_1;\n rDeltaMax_1 = Math.max(rDeltaMax_1, rDelta);\n }\n rr_1 = 0;\n levels.forEach(function (level, i) {\n if (i === 0) {\n rr_1 = level.r;\n }\n level.r = rr_1;\n rr_1 += rDeltaMax_1;\n });\n }\n // calculate the node positions\n levels.forEach(function (level) {\n var dTheta = level.dTheta;\n var rr = level.r;\n level.forEach(function (node, j) {\n var theta = self.startAngle + (self.clockwise ? 1 : -1) * dTheta * j;\n node.x = center[0] + rr * Math.cos(theta);\n node.y = center[1] + rr * Math.sin(theta);\n });\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n ConcentricLayout.prototype.getType = function () {\n return \"concentric\";\n };\n return ConcentricLayout;\n}(base_1.Base));\nexports.ConcentricLayout = ConcentricLayout;\n//# sourceMappingURL=concentric.js.map","\"use strict\";\n/**\n * @fileOverview MDS layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MDSLayout = void 0;\nvar ml_matrix_1 = require(\"ml-matrix\");\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * mds 布局\n */\nvar MDSLayout = /** @class */ (function (_super) {\n __extends(MDSLayout, _super);\n function MDSLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 边长度 */\n _this.linkDistance = 50;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n MDSLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n linkDistance: 50\n };\n };\n /**\n * 执行布局\n */\n MDSLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, _a = self.edges, edges = _a === void 0 ? [] : _a;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var linkDistance = self.linkDistance;\n // the graph-theoretic distance (shortest path distance) matrix\n var adjMatrix = (0, util_1.getAdjMatrix)({ nodes: nodes, edges: edges }, false);\n var distances = (0, util_1.floydWarshall)(adjMatrix);\n self.handleInfinity(distances);\n // scale the ideal edge length acoording to linkDistance\n var scaledD = (0, util_1.scaleMatrix)(distances, linkDistance);\n self.scaledDistances = scaledD;\n // get positions by MDS\n var positions = self.runMDS();\n self.positions = positions;\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n /**\n * mds 算法\n * @return {array} positions 计算后的节点位置数组\n */\n MDSLayout.prototype.runMDS = function () {\n var self = this;\n var dimension = 2;\n var distances = self.scaledDistances;\n // square distances\n var M = ml_matrix_1.Matrix.mul(ml_matrix_1.Matrix.pow(distances, 2), -0.5);\n // double centre the rows/columns\n var rowMeans = M.mean(\"row\");\n var colMeans = M.mean(\"column\");\n var totalMean = M.mean();\n M.add(totalMean)\n .subRowVector(rowMeans)\n .subColumnVector(colMeans);\n // take the SVD of the double centred matrix, and return the\n // points from it\n var ret = new ml_matrix_1.SingularValueDecomposition(M);\n var eigenValues = ml_matrix_1.Matrix.sqrt(ret.diagonalMatrix).diagonal();\n return ret.leftSingularVectors.toJSON().map(function (row) {\n return ml_matrix_1.Matrix.mul([row], [eigenValues])\n .toJSON()[0]\n .splice(0, dimension);\n });\n };\n MDSLayout.prototype.handleInfinity = function (distances) {\n var maxDistance = -999999;\n distances.forEach(function (row) {\n row.forEach(function (value) {\n if (value === Infinity) {\n return;\n }\n if (maxDistance < value) {\n maxDistance = value;\n }\n });\n });\n distances.forEach(function (row, i) {\n row.forEach(function (value, j) {\n if (value === Infinity) {\n distances[i][j] = maxDistance;\n }\n });\n });\n };\n MDSLayout.prototype.getType = function () {\n return \"mds\";\n };\n return MDSLayout;\n}(base_1.Base));\nexports.MDSLayout = MDSLayout;\n//# sourceMappingURL=mds.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FruchtermanLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar SPEED_DIVISOR = 800;\n/**\n * fruchterman 布局\n */\nvar FruchtermanLayout = /** @class */ (function (_super) {\n __extends(FruchtermanLayout, _super);\n function FruchtermanLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 速度 */\n _this.speed = 5;\n /** 是否产生聚类力 */\n _this.clustering = false;\n /** 聚类力大小 */\n _this.clusterGravity = 10;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n /** 是否使用 window.setInterval 运行迭代 */\n _this.animate = true;\n _this.updateCfg(options);\n return _this;\n }\n FruchtermanLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n gravity: 10,\n speed: 1,\n clustering: false,\n clusterGravity: 10,\n animate: true\n };\n };\n /**\n * 执行布局\n */\n FruchtermanLayout.prototype.execute = function () {\n var _this = this;\n var _a, _b;\n var self = this;\n var nodes = self.nodes;\n if (self.timeInterval !== undefined && typeof window !== \"undefined\") {\n window.clearInterval(self.timeInterval);\n }\n if (!nodes || nodes.length === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return self.run();\n };\n FruchtermanLayout.prototype.run = function () {\n var _a;\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return;\n var edges = self.edges, maxIteration = self.maxIteration, workerEnabled = self.workerEnabled, clustering = self.clustering, animate = self.animate;\n var clusterMap = {};\n if (clustering) {\n nodes.forEach(function (n) {\n if (clusterMap[n.cluster] === undefined) {\n clusterMap[n.cluster] = {\n name: n.cluster,\n cx: 0,\n cy: 0,\n count: 0\n };\n }\n });\n }\n if (workerEnabled || !animate) {\n for (var i = 0; i < maxIteration; i++) {\n self.runOneStep(clusterMap);\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n }\n else {\n if (typeof window === \"undefined\")\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n var _a;\n self.runOneStep(clusterMap);\n iter_1++;\n if (iter_1 >= maxIteration) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n return {\n nodes: nodes,\n edges: edges\n };\n };\n FruchtermanLayout.prototype.runOneStep = function (clusterMap) {\n var _a;\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return;\n var edges = self.edges, center = self.center, gravity = self.gravity, speed = self.speed, clustering = self.clustering;\n var area = self.height * self.width;\n var maxDisplace = Math.sqrt(area) / 10;\n var k2 = area / (nodes.length + 1);\n var k = Math.sqrt(k2);\n var displacements = [];\n nodes.forEach(function (_, j) {\n displacements[j] = { x: 0, y: 0 };\n });\n self.applyCalculate(nodes, edges, displacements, k, k2);\n // gravity for clusters\n if (clustering) {\n // re-compute the clustering centers\n for (var key in clusterMap) {\n clusterMap[key].cx = 0;\n clusterMap[key].cy = 0;\n clusterMap[key].count = 0;\n }\n nodes.forEach(function (n) {\n var c = clusterMap[n.cluster];\n if ((0, util_1.isNumber)(n.x)) {\n c.cx += n.x;\n }\n if ((0, util_1.isNumber)(n.y)) {\n c.cy += n.y;\n }\n c.count++;\n });\n for (var key in clusterMap) {\n clusterMap[key].cx /= clusterMap[key].count;\n clusterMap[key].cy /= clusterMap[key].count;\n }\n // compute the cluster gravity forces\n var clusterGravity_1 = self.clusterGravity || gravity;\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var c = clusterMap[n.cluster];\n var distLength = Math.sqrt((n.x - c.cx) * (n.x - c.cx) + (n.y - c.cy) * (n.y - c.cy));\n var gravityForce = k * clusterGravity_1;\n displacements[j].x -= (gravityForce * (n.x - c.cx)) / distLength;\n displacements[j].y -= (gravityForce * (n.y - c.cy)) / distLength;\n });\n }\n // gravity\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var gravityForce = 0.01 * k * gravity;\n displacements[j].x -= gravityForce * (n.x - center[0]);\n displacements[j].y -= gravityForce * (n.y - center[1]);\n });\n // move\n nodes.forEach(function (n, j) {\n if ((0, util_1.isNumber)(n.fx) && (0, util_1.isNumber)(n.fy)) {\n n.x = n.fx;\n n.y = n.fy;\n return;\n }\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var distLength = Math.sqrt(displacements[j].x * displacements[j].x +\n displacements[j].y * displacements[j].y);\n if (distLength > 0) {\n // && !n.isFixed()\n var limitedDist = Math.min(maxDisplace * (speed / SPEED_DIVISOR), distLength);\n n.x += (displacements[j].x / distLength) * limitedDist;\n n.y += (displacements[j].y / distLength) * limitedDist;\n }\n });\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n };\n FruchtermanLayout.prototype.applyCalculate = function (nodes, edges, displacements, k, k2) {\n var self = this;\n self.calRepulsive(nodes, displacements, k2);\n if (edges)\n self.calAttractive(edges, displacements, k);\n };\n FruchtermanLayout.prototype.calRepulsive = function (nodes, displacements, k2) {\n nodes.forEach(function (v, i) {\n displacements[i] = { x: 0, y: 0 };\n nodes.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n if (!(0, util_1.isNumber)(v.x) ||\n !(0, util_1.isNumber)(u.x) ||\n !(0, util_1.isNumber)(v.y) ||\n !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var vecX = v.x - u.x;\n var vecY = v.y - u.y;\n var vecLengthSqr = vecX * vecX + vecY * vecY;\n if (vecLengthSqr === 0) {\n vecLengthSqr = 1;\n var sign = i > j ? 1 : -1;\n vecX = 0.01 * sign;\n vecY = 0.01 * sign;\n }\n var common = k2 / vecLengthSqr;\n displacements[i].x += vecX * common;\n displacements[i].y += vecY * common;\n });\n });\n };\n FruchtermanLayout.prototype.calAttractive = function (edges, displacements, k) {\n var _this = this;\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n if (!source || !target)\n return;\n var uIndex = _this.nodeIdxMap[source];\n var vIndex = _this.nodeIdxMap[target];\n if (uIndex === vIndex) {\n return;\n }\n var u = _this.nodeMap[source];\n var v = _this.nodeMap[target];\n if (!(0, util_1.isNumber)(v.x) || !(0, util_1.isNumber)(u.x) || !(0, util_1.isNumber)(v.y) || !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var vecX = v.x - u.x;\n var vecY = v.y - u.y;\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var common = (vecLength * vecLength) / k;\n displacements[vIndex].x -= (vecX / vecLength) * common;\n displacements[vIndex].y -= (vecY / vecLength) * common;\n displacements[uIndex].x += (vecX / vecLength) * common;\n displacements[uIndex].y += (vecY / vecLength) * common;\n });\n };\n FruchtermanLayout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== \"undefined\") {\n window.clearInterval(this.timeInterval);\n }\n };\n FruchtermanLayout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n FruchtermanLayout.prototype.getType = function () {\n return \"fruchterman\";\n };\n return FruchtermanLayout;\n}(base_1.Base));\nexports.FruchtermanLayout = FruchtermanLayout;\n//# sourceMappingURL=fruchterman.js.map","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export var EMPTY = -1;\nvar entitySequence = 1;\n\n/**\n * 类似关系型数据库的主键\n * TODO: 自动生成,考虑序列化\n */\nexport function createEntity() {\n return entitySequence++;\n}\n//# sourceMappingURL=Entity.js.map","/**\n * WebGL 枚举值\n * @see http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14\n * 使用 babel 插件对常量进行内联,以减少最终打包产物大小\n * @see https://github.com/uber/deck.gl/blob/7.1-release/dev-docs/roadmaps/dist-size-roadmap.md#inline-gl-constants\n * 为了支持 WebGPU,新增 TextureUsage\n * @see https://gpuweb.github.io/gpuweb/#gputextureusage\n */\nexport var gl;\n(function (gl) {\n gl[gl[\"DEPTH_BUFFER_BIT\"] = 256] = \"DEPTH_BUFFER_BIT\";\n gl[gl[\"STENCIL_BUFFER_BIT\"] = 1024] = \"STENCIL_BUFFER_BIT\";\n gl[gl[\"COLOR_BUFFER_BIT\"] = 16384] = \"COLOR_BUFFER_BIT\";\n gl[gl[\"POINTS\"] = 0] = \"POINTS\";\n gl[gl[\"LINES\"] = 1] = \"LINES\";\n gl[gl[\"LINE_LOOP\"] = 2] = \"LINE_LOOP\";\n gl[gl[\"LINE_STRIP\"] = 3] = \"LINE_STRIP\";\n gl[gl[\"TRIANGLES\"] = 4] = \"TRIANGLES\";\n gl[gl[\"TRIANGLE_STRIP\"] = 5] = \"TRIANGLE_STRIP\";\n gl[gl[\"TRIANGLE_FAN\"] = 6] = \"TRIANGLE_FAN\";\n gl[gl[\"ZERO\"] = 0] = \"ZERO\";\n gl[gl[\"ONE\"] = 1] = \"ONE\";\n gl[gl[\"SRC_COLOR\"] = 768] = \"SRC_COLOR\";\n gl[gl[\"ONE_MINUS_SRC_COLOR\"] = 769] = \"ONE_MINUS_SRC_COLOR\";\n gl[gl[\"SRC_ALPHA\"] = 770] = \"SRC_ALPHA\";\n gl[gl[\"ONE_MINUS_SRC_ALPHA\"] = 771] = \"ONE_MINUS_SRC_ALPHA\";\n gl[gl[\"DST_ALPHA\"] = 772] = \"DST_ALPHA\";\n gl[gl[\"ONE_MINUS_DST_ALPHA\"] = 773] = \"ONE_MINUS_DST_ALPHA\";\n gl[gl[\"DST_COLOR\"] = 774] = \"DST_COLOR\";\n gl[gl[\"ONE_MINUS_DST_COLOR\"] = 775] = \"ONE_MINUS_DST_COLOR\";\n gl[gl[\"SRC_ALPHA_SATURATE\"] = 776] = \"SRC_ALPHA_SATURATE\";\n gl[gl[\"FUNC_ADD\"] = 32774] = \"FUNC_ADD\";\n gl[gl[\"BLEND_EQUATION\"] = 32777] = \"BLEND_EQUATION\";\n gl[gl[\"BLEND_EQUATION_RGB\"] = 32777] = \"BLEND_EQUATION_RGB\";\n gl[gl[\"BLEND_EQUATION_ALPHA\"] = 34877] = \"BLEND_EQUATION_ALPHA\";\n gl[gl[\"FUNC_SUBTRACT\"] = 32778] = \"FUNC_SUBTRACT\";\n gl[gl[\"FUNC_REVERSE_SUBTRACT\"] = 32779] = \"FUNC_REVERSE_SUBTRACT\";\n gl[gl[\"MAX_EXT\"] = 32776] = \"MAX_EXT\";\n gl[gl[\"MIN_EXT\"] = 32775] = \"MIN_EXT\";\n gl[gl[\"BLEND_DST_RGB\"] = 32968] = \"BLEND_DST_RGB\";\n gl[gl[\"BLEND_SRC_RGB\"] = 32969] = \"BLEND_SRC_RGB\";\n gl[gl[\"BLEND_DST_ALPHA\"] = 32970] = \"BLEND_DST_ALPHA\";\n gl[gl[\"BLEND_SRC_ALPHA\"] = 32971] = \"BLEND_SRC_ALPHA\";\n gl[gl[\"CONSTANT_COLOR\"] = 32769] = \"CONSTANT_COLOR\";\n gl[gl[\"ONE_MINUS_CONSTANT_COLOR\"] = 32770] = \"ONE_MINUS_CONSTANT_COLOR\";\n gl[gl[\"CONSTANT_ALPHA\"] = 32771] = \"CONSTANT_ALPHA\";\n gl[gl[\"ONE_MINUS_CONSTANT_ALPHA\"] = 32772] = \"ONE_MINUS_CONSTANT_ALPHA\";\n gl[gl[\"BLEND_COLOR\"] = 32773] = \"BLEND_COLOR\";\n gl[gl[\"ARRAY_BUFFER\"] = 34962] = \"ARRAY_BUFFER\";\n gl[gl[\"ELEMENT_ARRAY_BUFFER\"] = 34963] = \"ELEMENT_ARRAY_BUFFER\";\n gl[gl[\"ARRAY_BUFFER_BINDING\"] = 34964] = \"ARRAY_BUFFER_BINDING\";\n gl[gl[\"ELEMENT_ARRAY_BUFFER_BINDING\"] = 34965] = \"ELEMENT_ARRAY_BUFFER_BINDING\";\n gl[gl[\"STREAM_DRAW\"] = 35040] = \"STREAM_DRAW\";\n gl[gl[\"STATIC_DRAW\"] = 35044] = \"STATIC_DRAW\";\n gl[gl[\"DYNAMIC_DRAW\"] = 35048] = \"DYNAMIC_DRAW\";\n gl[gl[\"BUFFER_SIZE\"] = 34660] = \"BUFFER_SIZE\";\n gl[gl[\"BUFFER_USAGE\"] = 34661] = \"BUFFER_USAGE\";\n gl[gl[\"CURRENT_VERTEX_ATTRIB\"] = 34342] = \"CURRENT_VERTEX_ATTRIB\";\n gl[gl[\"FRONT\"] = 1028] = \"FRONT\";\n gl[gl[\"BACK\"] = 1029] = \"BACK\";\n gl[gl[\"FRONT_AND_BACK\"] = 1032] = \"FRONT_AND_BACK\";\n gl[gl[\"CULL_FACE\"] = 2884] = \"CULL_FACE\";\n gl[gl[\"BLEND\"] = 3042] = \"BLEND\";\n gl[gl[\"DITHER\"] = 3024] = \"DITHER\";\n gl[gl[\"STENCIL_TEST\"] = 2960] = \"STENCIL_TEST\";\n gl[gl[\"DEPTH_TEST\"] = 2929] = \"DEPTH_TEST\";\n gl[gl[\"SCISSOR_TEST\"] = 3089] = \"SCISSOR_TEST\";\n gl[gl[\"POLYGON_OFFSET_FILL\"] = 32823] = \"POLYGON_OFFSET_FILL\";\n gl[gl[\"SAMPLE_ALPHA_TO_COVERAGE\"] = 32926] = \"SAMPLE_ALPHA_TO_COVERAGE\";\n gl[gl[\"SAMPLE_COVERAGE\"] = 32928] = \"SAMPLE_COVERAGE\";\n gl[gl[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n gl[gl[\"INVALID_ENUM\"] = 1280] = \"INVALID_ENUM\";\n gl[gl[\"INVALID_VALUE\"] = 1281] = \"INVALID_VALUE\";\n gl[gl[\"INVALID_OPERATION\"] = 1282] = \"INVALID_OPERATION\";\n gl[gl[\"OUT_OF_MEMORY\"] = 1285] = \"OUT_OF_MEMORY\";\n gl[gl[\"CW\"] = 2304] = \"CW\";\n gl[gl[\"CCW\"] = 2305] = \"CCW\";\n gl[gl[\"LINE_WIDTH\"] = 2849] = \"LINE_WIDTH\";\n gl[gl[\"ALIASED_POINT_SIZE_RANGE\"] = 33901] = \"ALIASED_POINT_SIZE_RANGE\";\n gl[gl[\"ALIASED_LINE_WIDTH_RANGE\"] = 33902] = \"ALIASED_LINE_WIDTH_RANGE\";\n gl[gl[\"CULL_FACE_MODE\"] = 2885] = \"CULL_FACE_MODE\";\n gl[gl[\"FRONT_FACE\"] = 2886] = \"FRONT_FACE\";\n gl[gl[\"DEPTH_RANGE\"] = 2928] = \"DEPTH_RANGE\";\n gl[gl[\"DEPTH_WRITEMASK\"] = 2930] = \"DEPTH_WRITEMASK\";\n gl[gl[\"DEPTH_CLEAR_VALUE\"] = 2931] = \"DEPTH_CLEAR_VALUE\";\n gl[gl[\"DEPTH_FUNC\"] = 2932] = \"DEPTH_FUNC\";\n gl[gl[\"STENCIL_CLEAR_VALUE\"] = 2961] = \"STENCIL_CLEAR_VALUE\";\n gl[gl[\"STENCIL_FUNC\"] = 2962] = \"STENCIL_FUNC\";\n gl[gl[\"STENCIL_FAIL\"] = 2964] = \"STENCIL_FAIL\";\n gl[gl[\"STENCIL_PASS_DEPTH_FAIL\"] = 2965] = \"STENCIL_PASS_DEPTH_FAIL\";\n gl[gl[\"STENCIL_PASS_DEPTH_PASS\"] = 2966] = \"STENCIL_PASS_DEPTH_PASS\";\n gl[gl[\"STENCIL_REF\"] = 2967] = \"STENCIL_REF\";\n gl[gl[\"STENCIL_VALUE_MASK\"] = 2963] = \"STENCIL_VALUE_MASK\";\n gl[gl[\"STENCIL_WRITEMASK\"] = 2968] = \"STENCIL_WRITEMASK\";\n gl[gl[\"STENCIL_BACK_FUNC\"] = 34816] = \"STENCIL_BACK_FUNC\";\n gl[gl[\"STENCIL_BACK_FAIL\"] = 34817] = \"STENCIL_BACK_FAIL\";\n gl[gl[\"STENCIL_BACK_PASS_DEPTH_FAIL\"] = 34818] = \"STENCIL_BACK_PASS_DEPTH_FAIL\";\n gl[gl[\"STENCIL_BACK_PASS_DEPTH_PASS\"] = 34819] = \"STENCIL_BACK_PASS_DEPTH_PASS\";\n gl[gl[\"STENCIL_BACK_REF\"] = 36003] = \"STENCIL_BACK_REF\";\n gl[gl[\"STENCIL_BACK_VALUE_MASK\"] = 36004] = \"STENCIL_BACK_VALUE_MASK\";\n gl[gl[\"STENCIL_BACK_WRITEMASK\"] = 36005] = \"STENCIL_BACK_WRITEMASK\";\n gl[gl[\"VIEWPORT\"] = 2978] = \"VIEWPORT\";\n gl[gl[\"SCISSOR_BOX\"] = 3088] = \"SCISSOR_BOX\";\n gl[gl[\"COLOR_CLEAR_VALUE\"] = 3106] = \"COLOR_CLEAR_VALUE\";\n gl[gl[\"COLOR_WRITEMASK\"] = 3107] = \"COLOR_WRITEMASK\";\n gl[gl[\"UNPACK_ALIGNMENT\"] = 3317] = \"UNPACK_ALIGNMENT\";\n gl[gl[\"PACK_ALIGNMENT\"] = 3333] = \"PACK_ALIGNMENT\";\n gl[gl[\"MAX_TEXTURE_SIZE\"] = 3379] = \"MAX_TEXTURE_SIZE\";\n gl[gl[\"MAX_VIEWPORT_DIMS\"] = 3386] = \"MAX_VIEWPORT_DIMS\";\n gl[gl[\"SUBPIXEL_BITS\"] = 3408] = \"SUBPIXEL_BITS\";\n gl[gl[\"RED_BITS\"] = 3410] = \"RED_BITS\";\n gl[gl[\"GREEN_BITS\"] = 3411] = \"GREEN_BITS\";\n gl[gl[\"BLUE_BITS\"] = 3412] = \"BLUE_BITS\";\n gl[gl[\"ALPHA_BITS\"] = 3413] = \"ALPHA_BITS\";\n gl[gl[\"DEPTH_BITS\"] = 3414] = \"DEPTH_BITS\";\n gl[gl[\"STENCIL_BITS\"] = 3415] = \"STENCIL_BITS\";\n gl[gl[\"POLYGON_OFFSET_UNITS\"] = 10752] = \"POLYGON_OFFSET_UNITS\";\n gl[gl[\"POLYGON_OFFSET_FACTOR\"] = 32824] = \"POLYGON_OFFSET_FACTOR\";\n gl[gl[\"TEXTURE_BINDING_2D\"] = 32873] = \"TEXTURE_BINDING_2D\";\n gl[gl[\"SAMPLE_BUFFERS\"] = 32936] = \"SAMPLE_BUFFERS\";\n gl[gl[\"SAMPLES\"] = 32937] = \"SAMPLES\";\n gl[gl[\"SAMPLE_COVERAGE_VALUE\"] = 32938] = \"SAMPLE_COVERAGE_VALUE\";\n gl[gl[\"SAMPLE_COVERAGE_INVERT\"] = 32939] = \"SAMPLE_COVERAGE_INVERT\";\n gl[gl[\"COMPRESSED_TEXTURE_FORMATS\"] = 34467] = \"COMPRESSED_TEXTURE_FORMATS\";\n gl[gl[\"DONT_CARE\"] = 4352] = \"DONT_CARE\";\n gl[gl[\"FASTEST\"] = 4353] = \"FASTEST\";\n gl[gl[\"NICEST\"] = 4354] = \"NICEST\";\n gl[gl[\"GENERATE_MIPMAP_HINT\"] = 33170] = \"GENERATE_MIPMAP_HINT\";\n gl[gl[\"BYTE\"] = 5120] = \"BYTE\";\n gl[gl[\"UNSIGNED_BYTE\"] = 5121] = \"UNSIGNED_BYTE\";\n gl[gl[\"SHORT\"] = 5122] = \"SHORT\";\n gl[gl[\"UNSIGNED_SHORT\"] = 5123] = \"UNSIGNED_SHORT\";\n gl[gl[\"INT\"] = 5124] = \"INT\";\n gl[gl[\"UNSIGNED_INT\"] = 5125] = \"UNSIGNED_INT\";\n gl[gl[\"FLOAT\"] = 5126] = \"FLOAT\";\n gl[gl[\"DEPTH_COMPONENT\"] = 6402] = \"DEPTH_COMPONENT\";\n gl[gl[\"ALPHA\"] = 6406] = \"ALPHA\";\n gl[gl[\"RGB\"] = 6407] = \"RGB\";\n gl[gl[\"RGBA\"] = 6408] = \"RGBA\";\n gl[gl[\"LUMINANCE\"] = 6409] = \"LUMINANCE\";\n gl[gl[\"LUMINANCE_ALPHA\"] = 6410] = \"LUMINANCE_ALPHA\";\n gl[gl[\"UNSIGNED_SHORT_4_4_4_4\"] = 32819] = \"UNSIGNED_SHORT_4_4_4_4\";\n gl[gl[\"UNSIGNED_SHORT_5_5_5_1\"] = 32820] = \"UNSIGNED_SHORT_5_5_5_1\";\n gl[gl[\"UNSIGNED_SHORT_5_6_5\"] = 33635] = \"UNSIGNED_SHORT_5_6_5\";\n gl[gl[\"FRAGMENT_SHADER\"] = 35632] = \"FRAGMENT_SHADER\";\n gl[gl[\"VERTEX_SHADER\"] = 35633] = \"VERTEX_SHADER\";\n gl[gl[\"MAX_VERTEX_ATTRIBS\"] = 34921] = \"MAX_VERTEX_ATTRIBS\";\n gl[gl[\"MAX_VERTEX_UNIFORM_VECTORS\"] = 36347] = \"MAX_VERTEX_UNIFORM_VECTORS\";\n gl[gl[\"MAX_VARYING_VECTORS\"] = 36348] = \"MAX_VARYING_VECTORS\";\n gl[gl[\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\"] = 35661] = \"MAX_COMBINED_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\"] = 35660] = \"MAX_VERTEX_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_TEXTURE_IMAGE_UNITS\"] = 34930] = \"MAX_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_FRAGMENT_UNIFORM_VECTORS\"] = 36349] = \"MAX_FRAGMENT_UNIFORM_VECTORS\";\n gl[gl[\"SHADER_TYPE\"] = 35663] = \"SHADER_TYPE\";\n gl[gl[\"DELETE_STATUS\"] = 35712] = \"DELETE_STATUS\";\n gl[gl[\"LINK_STATUS\"] = 35714] = \"LINK_STATUS\";\n gl[gl[\"VALIDATE_STATUS\"] = 35715] = \"VALIDATE_STATUS\";\n gl[gl[\"ATTACHED_SHADERS\"] = 35717] = \"ATTACHED_SHADERS\";\n gl[gl[\"ACTIVE_UNIFORMS\"] = 35718] = \"ACTIVE_UNIFORMS\";\n gl[gl[\"ACTIVE_ATTRIBUTES\"] = 35721] = \"ACTIVE_ATTRIBUTES\";\n gl[gl[\"SHADING_LANGUAGE_VERSION\"] = 35724] = \"SHADING_LANGUAGE_VERSION\";\n gl[gl[\"CURRENT_PROGRAM\"] = 35725] = \"CURRENT_PROGRAM\";\n gl[gl[\"NEVER\"] = 512] = \"NEVER\";\n gl[gl[\"LESS\"] = 513] = \"LESS\";\n gl[gl[\"EQUAL\"] = 514] = \"EQUAL\";\n gl[gl[\"LEQUAL\"] = 515] = \"LEQUAL\";\n gl[gl[\"GREATER\"] = 516] = \"GREATER\";\n gl[gl[\"NOTEQUAL\"] = 517] = \"NOTEQUAL\";\n gl[gl[\"GEQUAL\"] = 518] = \"GEQUAL\";\n gl[gl[\"ALWAYS\"] = 519] = \"ALWAYS\";\n gl[gl[\"KEEP\"] = 7680] = \"KEEP\";\n gl[gl[\"REPLACE\"] = 7681] = \"REPLACE\";\n gl[gl[\"INCR\"] = 7682] = \"INCR\";\n gl[gl[\"DECR\"] = 7683] = \"DECR\";\n gl[gl[\"INVERT\"] = 5386] = \"INVERT\";\n gl[gl[\"INCR_WRAP\"] = 34055] = \"INCR_WRAP\";\n gl[gl[\"DECR_WRAP\"] = 34056] = \"DECR_WRAP\";\n gl[gl[\"VENDOR\"] = 7936] = \"VENDOR\";\n gl[gl[\"RENDERER\"] = 7937] = \"RENDERER\";\n gl[gl[\"VERSION\"] = 7938] = \"VERSION\";\n gl[gl[\"NEAREST\"] = 9728] = \"NEAREST\";\n gl[gl[\"LINEAR\"] = 9729] = \"LINEAR\";\n gl[gl[\"NEAREST_MIPMAP_NEAREST\"] = 9984] = \"NEAREST_MIPMAP_NEAREST\";\n gl[gl[\"LINEAR_MIPMAP_NEAREST\"] = 9985] = \"LINEAR_MIPMAP_NEAREST\";\n gl[gl[\"NEAREST_MIPMAP_LINEAR\"] = 9986] = \"NEAREST_MIPMAP_LINEAR\";\n gl[gl[\"LINEAR_MIPMAP_LINEAR\"] = 9987] = \"LINEAR_MIPMAP_LINEAR\";\n gl[gl[\"TEXTURE_MAG_FILTER\"] = 10240] = \"TEXTURE_MAG_FILTER\";\n gl[gl[\"TEXTURE_MIN_FILTER\"] = 10241] = \"TEXTURE_MIN_FILTER\";\n gl[gl[\"TEXTURE_WRAP_S\"] = 10242] = \"TEXTURE_WRAP_S\";\n gl[gl[\"TEXTURE_WRAP_T\"] = 10243] = \"TEXTURE_WRAP_T\";\n gl[gl[\"TEXTURE_2D\"] = 3553] = \"TEXTURE_2D\";\n gl[gl[\"TEXTURE\"] = 5890] = \"TEXTURE\";\n gl[gl[\"TEXTURE_CUBE_MAP\"] = 34067] = \"TEXTURE_CUBE_MAP\";\n gl[gl[\"TEXTURE_BINDING_CUBE_MAP\"] = 34068] = \"TEXTURE_BINDING_CUBE_MAP\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_X\"] = 34069] = \"TEXTURE_CUBE_MAP_POSITIVE_X\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_X\"] = 34070] = \"TEXTURE_CUBE_MAP_NEGATIVE_X\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_Y\"] = 34071] = \"TEXTURE_CUBE_MAP_POSITIVE_Y\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_Y\"] = 34072] = \"TEXTURE_CUBE_MAP_NEGATIVE_Y\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_Z\"] = 34073] = \"TEXTURE_CUBE_MAP_POSITIVE_Z\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_Z\"] = 34074] = \"TEXTURE_CUBE_MAP_NEGATIVE_Z\";\n gl[gl[\"MAX_CUBE_MAP_TEXTURE_SIZE\"] = 34076] = \"MAX_CUBE_MAP_TEXTURE_SIZE\";\n gl[gl[\"TEXTURE0\"] = 33984] = \"TEXTURE0\";\n gl[gl[\"TEXTURE1\"] = 33985] = \"TEXTURE1\";\n gl[gl[\"TEXTURE2\"] = 33986] = \"TEXTURE2\";\n gl[gl[\"TEXTURE3\"] = 33987] = \"TEXTURE3\";\n gl[gl[\"TEXTURE4\"] = 33988] = \"TEXTURE4\";\n gl[gl[\"TEXTURE5\"] = 33989] = \"TEXTURE5\";\n gl[gl[\"TEXTURE6\"] = 33990] = \"TEXTURE6\";\n gl[gl[\"TEXTURE7\"] = 33991] = \"TEXTURE7\";\n gl[gl[\"TEXTURE8\"] = 33992] = \"TEXTURE8\";\n gl[gl[\"TEXTURE9\"] = 33993] = \"TEXTURE9\";\n gl[gl[\"TEXTURE10\"] = 33994] = \"TEXTURE10\";\n gl[gl[\"TEXTURE11\"] = 33995] = \"TEXTURE11\";\n gl[gl[\"TEXTURE12\"] = 33996] = \"TEXTURE12\";\n gl[gl[\"TEXTURE13\"] = 33997] = \"TEXTURE13\";\n gl[gl[\"TEXTURE14\"] = 33998] = \"TEXTURE14\";\n gl[gl[\"TEXTURE15\"] = 33999] = \"TEXTURE15\";\n gl[gl[\"TEXTURE16\"] = 34000] = \"TEXTURE16\";\n gl[gl[\"TEXTURE17\"] = 34001] = \"TEXTURE17\";\n gl[gl[\"TEXTURE18\"] = 34002] = \"TEXTURE18\";\n gl[gl[\"TEXTURE19\"] = 34003] = \"TEXTURE19\";\n gl[gl[\"TEXTURE20\"] = 34004] = \"TEXTURE20\";\n gl[gl[\"TEXTURE21\"] = 34005] = \"TEXTURE21\";\n gl[gl[\"TEXTURE22\"] = 34006] = \"TEXTURE22\";\n gl[gl[\"TEXTURE23\"] = 34007] = \"TEXTURE23\";\n gl[gl[\"TEXTURE24\"] = 34008] = \"TEXTURE24\";\n gl[gl[\"TEXTURE25\"] = 34009] = \"TEXTURE25\";\n gl[gl[\"TEXTURE26\"] = 34010] = \"TEXTURE26\";\n gl[gl[\"TEXTURE27\"] = 34011] = \"TEXTURE27\";\n gl[gl[\"TEXTURE28\"] = 34012] = \"TEXTURE28\";\n gl[gl[\"TEXTURE29\"] = 34013] = \"TEXTURE29\";\n gl[gl[\"TEXTURE30\"] = 34014] = \"TEXTURE30\";\n gl[gl[\"TEXTURE31\"] = 34015] = \"TEXTURE31\";\n gl[gl[\"ACTIVE_TEXTURE\"] = 34016] = \"ACTIVE_TEXTURE\";\n gl[gl[\"REPEAT\"] = 10497] = \"REPEAT\";\n gl[gl[\"CLAMP_TO_EDGE\"] = 33071] = \"CLAMP_TO_EDGE\";\n gl[gl[\"MIRRORED_REPEAT\"] = 33648] = \"MIRRORED_REPEAT\";\n gl[gl[\"FLOAT_VEC2\"] = 35664] = \"FLOAT_VEC2\";\n gl[gl[\"FLOAT_VEC3\"] = 35665] = \"FLOAT_VEC3\";\n gl[gl[\"FLOAT_VEC4\"] = 35666] = \"FLOAT_VEC4\";\n gl[gl[\"INT_VEC2\"] = 35667] = \"INT_VEC2\";\n gl[gl[\"INT_VEC3\"] = 35668] = \"INT_VEC3\";\n gl[gl[\"INT_VEC4\"] = 35669] = \"INT_VEC4\";\n gl[gl[\"BOOL\"] = 35670] = \"BOOL\";\n gl[gl[\"BOOL_VEC2\"] = 35671] = \"BOOL_VEC2\";\n gl[gl[\"BOOL_VEC3\"] = 35672] = \"BOOL_VEC3\";\n gl[gl[\"BOOL_VEC4\"] = 35673] = \"BOOL_VEC4\";\n gl[gl[\"FLOAT_MAT2\"] = 35674] = \"FLOAT_MAT2\";\n gl[gl[\"FLOAT_MAT3\"] = 35675] = \"FLOAT_MAT3\";\n gl[gl[\"FLOAT_MAT4\"] = 35676] = \"FLOAT_MAT4\";\n gl[gl[\"SAMPLER_2D\"] = 35678] = \"SAMPLER_2D\";\n gl[gl[\"SAMPLER_CUBE\"] = 35680] = \"SAMPLER_CUBE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_ENABLED\"] = 34338] = \"VERTEX_ATTRIB_ARRAY_ENABLED\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_SIZE\"] = 34339] = \"VERTEX_ATTRIB_ARRAY_SIZE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_STRIDE\"] = 34340] = \"VERTEX_ATTRIB_ARRAY_STRIDE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_TYPE\"] = 34341] = \"VERTEX_ATTRIB_ARRAY_TYPE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_NORMALIZED\"] = 34922] = \"VERTEX_ATTRIB_ARRAY_NORMALIZED\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_POINTER\"] = 34373] = \"VERTEX_ATTRIB_ARRAY_POINTER\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\"] = 34975] = \"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\";\n gl[gl[\"COMPILE_STATUS\"] = 35713] = \"COMPILE_STATUS\";\n gl[gl[\"LOW_FLOAT\"] = 36336] = \"LOW_FLOAT\";\n gl[gl[\"MEDIUM_FLOAT\"] = 36337] = \"MEDIUM_FLOAT\";\n gl[gl[\"HIGH_FLOAT\"] = 36338] = \"HIGH_FLOAT\";\n gl[gl[\"LOW_INT\"] = 36339] = \"LOW_INT\";\n gl[gl[\"MEDIUM_INT\"] = 36340] = \"MEDIUM_INT\";\n gl[gl[\"HIGH_INT\"] = 36341] = \"HIGH_INT\";\n gl[gl[\"FRAMEBUFFER\"] = 36160] = \"FRAMEBUFFER\";\n gl[gl[\"RENDERBUFFER\"] = 36161] = \"RENDERBUFFER\";\n gl[gl[\"RGBA4\"] = 32854] = \"RGBA4\";\n gl[gl[\"RGB5_A1\"] = 32855] = \"RGB5_A1\";\n gl[gl[\"RGB565\"] = 36194] = \"RGB565\";\n gl[gl[\"DEPTH_COMPONENT16\"] = 33189] = \"DEPTH_COMPONENT16\";\n gl[gl[\"STENCIL_INDEX\"] = 6401] = \"STENCIL_INDEX\";\n gl[gl[\"STENCIL_INDEX8\"] = 36168] = \"STENCIL_INDEX8\";\n gl[gl[\"DEPTH_STENCIL\"] = 34041] = \"DEPTH_STENCIL\";\n gl[gl[\"RENDERBUFFER_WIDTH\"] = 36162] = \"RENDERBUFFER_WIDTH\";\n gl[gl[\"RENDERBUFFER_HEIGHT\"] = 36163] = \"RENDERBUFFER_HEIGHT\";\n gl[gl[\"RENDERBUFFER_INTERNAL_FORMAT\"] = 36164] = \"RENDERBUFFER_INTERNAL_FORMAT\";\n gl[gl[\"RENDERBUFFER_RED_SIZE\"] = 36176] = \"RENDERBUFFER_RED_SIZE\";\n gl[gl[\"RENDERBUFFER_GREEN_SIZE\"] = 36177] = \"RENDERBUFFER_GREEN_SIZE\";\n gl[gl[\"RENDERBUFFER_BLUE_SIZE\"] = 36178] = \"RENDERBUFFER_BLUE_SIZE\";\n gl[gl[\"RENDERBUFFER_ALPHA_SIZE\"] = 36179] = \"RENDERBUFFER_ALPHA_SIZE\";\n gl[gl[\"RENDERBUFFER_DEPTH_SIZE\"] = 36180] = \"RENDERBUFFER_DEPTH_SIZE\";\n gl[gl[\"RENDERBUFFER_STENCIL_SIZE\"] = 36181] = \"RENDERBUFFER_STENCIL_SIZE\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\"] = 36048] = \"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\"] = 36049] = \"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\"] = 36050] = \"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\"] = 36051] = \"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\";\n gl[gl[\"COLOR_ATTACHMENT0\"] = 36064] = \"COLOR_ATTACHMENT0\";\n gl[gl[\"DEPTH_ATTACHMENT\"] = 36096] = \"DEPTH_ATTACHMENT\";\n gl[gl[\"STENCIL_ATTACHMENT\"] = 36128] = \"STENCIL_ATTACHMENT\";\n gl[gl[\"DEPTH_STENCIL_ATTACHMENT\"] = 33306] = \"DEPTH_STENCIL_ATTACHMENT\";\n gl[gl[\"NONE\"] = 0] = \"NONE\";\n gl[gl[\"FRAMEBUFFER_COMPLETE\"] = 36053] = \"FRAMEBUFFER_COMPLETE\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\"] = 36054] = \"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\"] = 36055] = \"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\"] = 36057] = \"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\";\n gl[gl[\"FRAMEBUFFER_UNSUPPORTED\"] = 36061] = \"FRAMEBUFFER_UNSUPPORTED\";\n gl[gl[\"FRAMEBUFFER_BINDING\"] = 36006] = \"FRAMEBUFFER_BINDING\";\n gl[gl[\"RENDERBUFFER_BINDING\"] = 36007] = \"RENDERBUFFER_BINDING\";\n gl[gl[\"MAX_RENDERBUFFER_SIZE\"] = 34024] = \"MAX_RENDERBUFFER_SIZE\";\n gl[gl[\"INVALID_FRAMEBUFFER_OPERATION\"] = 1286] = \"INVALID_FRAMEBUFFER_OPERATION\";\n gl[gl[\"UNPACK_FLIP_Y_WEBGL\"] = 37440] = \"UNPACK_FLIP_Y_WEBGL\";\n gl[gl[\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\"] = 37441] = \"UNPACK_PREMULTIPLY_ALPHA_WEBGL\";\n gl[gl[\"CONTEXT_LOST_WEBGL\"] = 37442] = \"CONTEXT_LOST_WEBGL\";\n gl[gl[\"UNPACK_COLORSPACE_CONVERSION_WEBGL\"] = 37443] = \"UNPACK_COLORSPACE_CONVERSION_WEBGL\";\n gl[gl[\"BROWSER_DEFAULT_WEBGL\"] = 37444] = \"BROWSER_DEFAULT_WEBGL\";\n gl[gl[\"COPY_SRC\"] = 1] = \"COPY_SRC\";\n gl[gl[\"COPY_DST\"] = 2] = \"COPY_DST\";\n gl[gl[\"SAMPLED\"] = 4] = \"SAMPLED\";\n gl[gl[\"STORAGE\"] = 8] = \"STORAGE\";\n gl[gl[\"RENDER_ATTACHMENT\"] = 16] = \"RENDER_ATTACHMENT\";\n})(gl || (gl = {}));\n//# sourceMappingURL=gl.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nexport var ConfigService = /*#__PURE__*/function () {\n function ConfigService() {\n _classCallCheck(this, ConfigService);\n this.config = void 0;\n }\n _createClass(ConfigService, [{\n key: \"get\",\n value: function get() {\n return this.config;\n }\n }, {\n key: \"set\",\n value: function set(config) {\n this.config = config;\n }\n }]);\n return ConfigService;\n}();\n//# sourceMappingURL=ConfigService.js.map","import { Component, ComponentManager } from './ComponentManager';\nimport { gl } from './components/renderer/gl';\nimport { createEntity } from './Entity';\nimport { ConfigService } from './services/config/ConfigService';\nimport { isSafari } from './utils/isSafari';\nvar AST_TOKEN_TYPES;\n(function (AST_TOKEN_TYPES) {\n AST_TOKEN_TYPES[\"Void\"] = \"Void\";\n AST_TOKEN_TYPES[\"Boolean\"] = \"Boolean\";\n AST_TOKEN_TYPES[\"Float\"] = \"Float\";\n AST_TOKEN_TYPES[\"Uint32\"] = \"Uint32\";\n AST_TOKEN_TYPES[\"Int32\"] = \"Int32\";\n AST_TOKEN_TYPES[\"Vector\"] = \"Vector\";\n AST_TOKEN_TYPES[\"Vector2Float\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Float\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Float\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Boolean\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Boolean\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Boolean\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Uint\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Uint\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Uint\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Int\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Int\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Int\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Matrix\"] = \"Matrix\";\n AST_TOKEN_TYPES[\"Matrix3x3Float\"] = \"mat3x3\";\n AST_TOKEN_TYPES[\"Matrix4x4Float\"] = \"mat4x4\";\n AST_TOKEN_TYPES[\"Struct\"] = \"Struct\";\n AST_TOKEN_TYPES[\"FloatArray\"] = \"Float[]\";\n AST_TOKEN_TYPES[\"Vector4FloatArray\"] = \"vec4[]\";\n})(AST_TOKEN_TYPES || (AST_TOKEN_TYPES = {}));\nvar AST_NODE_TYPES;\n(function (AST_NODE_TYPES) {\n AST_NODE_TYPES[\"Program\"] = \"Program\";\n AST_NODE_TYPES[\"Identifier\"] = \"Identifier\";\n AST_NODE_TYPES[\"VariableDeclaration\"] = \"VariableDeclaration\";\n AST_NODE_TYPES[\"BlockStatement\"] = \"BlockStatement\";\n AST_NODE_TYPES[\"ReturnStatement\"] = \"ReturnStatement\";\n AST_NODE_TYPES[\"FunctionDeclaration\"] = \"FunctionDeclaration\";\n AST_NODE_TYPES[\"VariableDeclarator\"] = \"VariableDeclarator\";\n AST_NODE_TYPES[\"AssignmentExpression\"] = \"AssignmentExpression\";\n AST_NODE_TYPES[\"LogicalExpression\"] = \"LogicalExpression\";\n AST_NODE_TYPES[\"BinaryExpression\"] = \"BinaryExpression\";\n AST_NODE_TYPES[\"ArrayExpression\"] = \"ArrayExpression\";\n AST_NODE_TYPES[\"UnaryExpression\"] = \"UnaryExpression\";\n AST_NODE_TYPES[\"UpdateExpression\"] = \"UpdateExpression\";\n AST_NODE_TYPES[\"FunctionExpression\"] = \"FunctionExpression\";\n AST_NODE_TYPES[\"MemberExpression\"] = \"MemberExpression\";\n AST_NODE_TYPES[\"ConditionalExpression\"] = \"ConditionalExpression\";\n AST_NODE_TYPES[\"ExpressionStatement\"] = \"ExpressionStatement\";\n AST_NODE_TYPES[\"CallExpression\"] = \"CallExpression\";\n AST_NODE_TYPES[\"NumThreadStatement\"] = \"NumThreadStatement\";\n AST_NODE_TYPES[\"StorageStatement\"] = \"StorageStatement\";\n AST_NODE_TYPES[\"DoWhileStatement\"] = \"DoWhileStatement\";\n AST_NODE_TYPES[\"WhileStatement\"] = \"WhileStatement\";\n AST_NODE_TYPES[\"ForStatement\"] = \"ForStatement\";\n AST_NODE_TYPES[\"BreakStatement\"] = \"BreakStatement\";\n AST_NODE_TYPES[\"ContinueStatement\"] = \"ContinueStatement\";\n AST_NODE_TYPES[\"IfStatement\"] = \"IfStatement\";\n AST_NODE_TYPES[\"ImportedFunctionStatement\"] = \"ImportedFunctionStatement\";\n})(AST_NODE_TYPES || (AST_NODE_TYPES = {}));\nvar STORAGE_CLASS;\n(function (STORAGE_CLASS) {\n STORAGE_CLASS[\"Input\"] = \"Input\";\n STORAGE_CLASS[\"Output\"] = \"Output\";\n STORAGE_CLASS[\"Uniform\"] = \"Uniform\";\n STORAGE_CLASS[\"Workgroup\"] = \"Workgroup\";\n STORAGE_CLASS[\"UniformConstant\"] = \"UniformConstant\";\n STORAGE_CLASS[\"Image\"] = \"Image\";\n STORAGE_CLASS[\"StorageBuffer\"] = \"StorageBuffer\";\n STORAGE_CLASS[\"Private\"] = \"Private\";\n STORAGE_CLASS[\"Function\"] = \"Function\";\n})(STORAGE_CLASS || (STORAGE_CLASS = {}));\n/**\n * 根据目标平台生成 Shader 代码\n * * WebGL GLSL 1.0\n * * WebGPU Chrome/Edge GLSL 4.5 & WGSL @see https://gpuweb.github.io/gpuweb/wgsl.html\n * * Safari WHLSL (maybe deprecated)\n */\nvar Target;\n(function (Target) {\n Target[\"GLSL100\"] = \"GLSL100\";\n Target[\"GLSL450\"] = \"GLSL450\";\n Target[\"WGSL\"] = \"WGSL\";\n})(Target || (Target = {}));\nvar DefineValuePlaceholder = '__DefineValuePlaceholder__';\nexport { createEntity, Component, ComponentManager, isSafari,\n// renderer service\ngl, ConfigService, AST_TOKEN_TYPES, AST_NODE_TYPES, STORAGE_CLASS, Target, DefineValuePlaceholder };\n//# sourceMappingURL=index.js.map","export function createCanvas() {\n if (typeof document !== 'undefined') {\n return document.createElement('canvas');\n } else {\n throw new Error('Cannot create a canvas in this context');\n }\n}\n//# sourceMappingURL=canvas.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _isTypedArray from \"lodash/isTypedArray\";\nimport _isNumber from \"lodash/isNumber\";\nimport _isArray from \"lodash/isArray\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { AST_TOKEN_TYPES, DefineValuePlaceholder, STORAGE_CLASS, Target } from '@antv/g-webgpu-core';\nimport { createCanvas } from './utils/canvas';\nexport var Kernel = /*#__PURE__*/function () {\n function Kernel(engine, configService) {\n _classCallCheck(this, Kernel);\n this.engine = engine;\n this.configService = configService;\n this.model = void 0;\n this.dirty = true;\n this.compiledBundle = void 0;\n this.initPromise = void 0;\n }\n _createClass(Kernel, [{\n key: \"init\",\n value: function init() {\n var _this$configService$g = this.configService.get(),\n canvas = _this$configService$g.canvas,\n engineOptions = _this$configService$g.engineOptions;\n this.initPromise = this.engine.init(_objectSpread({\n canvas: canvas || createCanvas(),\n // swapChainFormat: WebGPUConstants.TextureFormat.BGRA8Unorm,\n antialiasing: false\n }, engineOptions));\n }\n }, {\n key: \"setBundle\",\n value: function setBundle(bundle) {\n // deep clone\n this.compiledBundle = JSON.parse(JSON.stringify(bundle));\n }\n }, {\n key: \"setDispatch\",\n value: function setDispatch(dispatch) {\n if (this.compiledBundle.context) {\n this.compiledBundle.context.dispatch = dispatch;\n }\n return this;\n }\n }, {\n key: \"setMaxIteration\",\n value: function setMaxIteration(maxIteration) {\n if (this.compiledBundle.context) {\n this.compiledBundle.context.maxIteration = maxIteration;\n }\n return this;\n }\n }, {\n key: \"setBinding\",\n value: function setBinding(name, data) {\n var _this = this;\n if (typeof name === 'string') {\n var isNumberLikeData = _isNumber(data) || _isTypedArray(data) || _isArray(data);\n if (this.compiledBundle && this.compiledBundle.context) {\n // set define, eg. setBinding('MAX_LENGTH', 10)\n var existedDefine = this.compiledBundle.context.defines.find(function (b) {\n return b.name === name;\n });\n if (existedDefine) {\n existedDefine.value = data;\n return this;\n }\n\n // set uniform\n var existedBinding = this.compiledBundle.context.uniforms.find(function (b) {\n return b.name === name;\n });\n if (existedBinding) {\n // update uniform or buffer\n if (isNumberLikeData) {\n // @ts-ignore\n existedBinding.data = data;\n existedBinding.isReferer = false;\n if (existedBinding.storageClass === STORAGE_CLASS.Uniform) {\n if (this.model) {\n // @ts-ignore\n this.model.updateUniform(name, data);\n }\n } else {\n if (this.model) {\n // @ts-ignore\n this.model.updateBuffer(name, data);\n }\n }\n } else {\n // update with another kernel\n existedBinding.isReferer = true;\n // @ts-ignore\n existedBinding.data = data;\n }\n }\n }\n } else {\n Object.keys(name).forEach(function (key) {\n _this.setBinding(key, name[key]);\n });\n }\n return this;\n }\n }, {\n key: \"execute\",\n value: function () {\n var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _this2 = this;\n var iteration,\n i,\n _args = arguments;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n iteration = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1;\n if (!this.dirty) {\n _context.next = 6;\n break;\n }\n if (this.compiledBundle.context) {\n if (iteration > 1) {\n this.compiledBundle.context.maxIteration = iteration;\n } else {\n this.compiledBundle.context.maxIteration++;\n }\n }\n _context.next = 5;\n return this.compile();\n case 5:\n this.dirty = false;\n case 6:\n this.engine.beginFrame();\n\n // 首先开启当前 frame 的 compute pass\n this.engine.clear({});\n if (this.compiledBundle.context) {\n this.compiledBundle.context.uniforms.filter(function (_ref) {\n var isReferer = _ref.isReferer;\n return isReferer;\n }).forEach(function (_ref2) {\n var data = _ref2.data,\n name = _ref2.name;\n // @ts-ignore\n _this2.model.confirmInput(data.model, name);\n });\n }\n for (i = 0; i < iteration; i++) {\n this.model.run();\n }\n this.engine.endFrame();\n return _context.abrupt(\"return\", this);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n function execute() {\n return _execute.apply(this, arguments);\n }\n return execute;\n }()\n /**\n * read output from GPUBuffer\n */\n }, {\n key: \"getOutput\",\n value: function () {\n var _getOutput = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n return _context2.abrupt(\"return\", this.model.readData());\n case 1:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n function getOutput() {\n return _getOutput.apply(this, arguments);\n }\n return getOutput;\n }()\n }, {\n key: \"compile\",\n value: function () {\n var _compile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {\n var context, target, shader;\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return this.initPromise;\n case 2:\n context = _objectSpread({}, this.compiledBundle.context);\n target = this.engine.supportWebGPU ? this.engine.useWGSL ? Target.WGSL : Target.GLSL450 : Target.GLSL100;\n shader = this.compiledBundle.shaders[target]; // this.bindings?.forEach(({ name, data }) => {\n // if (name === name.toUpperCase()) {\n // const define = context.defines.find((d) => d.name === name);\n // if (define) {\n // // @ts-ignore\n // define.value = data;\n // }\n // }\n // });\n // 生成运行时 define\n context.defines.filter(function (define) {\n return define.runtime;\n }).forEach(function (define) {\n var valuePlaceHolder = \"\".concat(DefineValuePlaceholder).concat(define.name);\n shader = shader.replace(valuePlaceHolder, \"\".concat(define.value));\n });\n context.shader = shader;\n\n // 添加 uniform 绑定的数据\n context.uniforms.forEach(function (uniform) {\n // const binding = this.bindings.find((b) => b.name === uniform.name);\n // if (binding) {\n // // @ts-ignore\n // uniform.data = binding.referer || binding.data;\n // // @ts-ignore\n // uniform.isReferer = !!binding.referer;\n // }\n\n // 未指定数据,尝试根据 uniform 类型初始化\n if (!uniform.data) {\n if (uniform.storageClass === STORAGE_CLASS.StorageBuffer) {\n var sizePerElement = 1;\n if (uniform.type === AST_TOKEN_TYPES.FloatArray) {\n sizePerElement = 1;\n } else if (uniform.type === AST_TOKEN_TYPES.Vector4FloatArray) {\n sizePerElement = 4;\n }\n uniform.data = new Float32Array(context.output.length * sizePerElement).fill(0);\n }\n }\n });\n // } else if (uniform.type === 'image2D') {\n // // @ts-ignore\n // buffer.data = new Uint8ClampedArray(context.output.length!).fill(0);\n // }\n\n this.compiledBundle.context = context;\n _context3.next = 11;\n return this.engine.createComputeModel(this.compiledBundle.context);\n case 11:\n this.model = _context3.sent;\n case 12:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n function compile() {\n return _compile.apply(this, arguments);\n }\n return compile;\n }()\n }]);\n return Kernel;\n}();\n//# sourceMappingURL=Kernel.js.map","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.createREGL = factory());\n}(this, (function () { 'use strict';\n\nvar isTypedArray = function (x) {\n return (\n x instanceof Uint8Array ||\n x instanceof Uint16Array ||\n x instanceof Uint32Array ||\n x instanceof Int8Array ||\n x instanceof Int16Array ||\n x instanceof Int32Array ||\n x instanceof Float32Array ||\n x instanceof Float64Array ||\n x instanceof Uint8ClampedArray\n )\n}\n\nvar extend = function (base, opts) {\n var keys = Object.keys(opts)\n for (var i = 0; i < keys.length; ++i) {\n base[keys[i]] = opts[keys[i]]\n }\n return base\n}\n\n// Error checking and parameter validation.\n//\n// Statements for the form `check.someProcedure(...)` get removed by\n// a browserify transform for optimized/minified bundles.\n//\n/* globals atob */\nvar endl = '\\n'\n\n// only used for extracting shader names. if atob not present, then errors\n// will be slightly crappier\nfunction decodeB64 (str) {\n if (typeof atob !== 'undefined') {\n return atob(str)\n }\n return 'base64:' + str\n}\n\nfunction raise (message) {\n var error = new Error('(regl) ' + message)\n console.error(error)\n throw error\n}\n\nfunction check (pred, message) {\n if (!pred) {\n raise(message)\n }\n}\n\nfunction encolon (message) {\n if (message) {\n return ': ' + message\n }\n return ''\n}\n\nfunction checkParameter (param, possibilities, message) {\n if (!(param in possibilities)) {\n raise('unknown parameter (' + param + ')' + encolon(message) +\n '. possible values: ' + Object.keys(possibilities).join())\n }\n}\n\nfunction checkIsTypedArray (data, message) {\n if (!isTypedArray(data)) {\n raise(\n 'invalid parameter type' + encolon(message) +\n '. must be a typed array')\n }\n}\n\nfunction standardTypeEh (value, type) {\n switch (type) {\n case 'number': return typeof value === 'number'\n case 'object': return typeof value === 'object'\n case 'string': return typeof value === 'string'\n case 'boolean': return typeof value === 'boolean'\n case 'function': return typeof value === 'function'\n case 'undefined': return typeof value === 'undefined'\n case 'symbol': return typeof value === 'symbol'\n }\n}\n\nfunction checkTypeOf (value, type, message) {\n if (!standardTypeEh(value, type)) {\n raise(\n 'invalid parameter type' + encolon(message) +\n '. expected ' + type + ', got ' + (typeof value))\n }\n}\n\nfunction checkNonNegativeInt (value, message) {\n if (!((value >= 0) &&\n ((value | 0) === value))) {\n raise('invalid parameter type, (' + value + ')' + encolon(message) +\n '. must be a nonnegative integer')\n }\n}\n\nfunction checkOneOf (value, list, message) {\n if (list.indexOf(value) < 0) {\n raise('invalid value' + encolon(message) + '. must be one of: ' + list)\n }\n}\n\nvar constructorKeys = [\n 'gl',\n 'canvas',\n 'container',\n 'attributes',\n 'pixelRatio',\n 'extensions',\n 'optionalExtensions',\n 'profile',\n 'onDone'\n]\n\nfunction checkConstructor (obj) {\n Object.keys(obj).forEach(function (key) {\n if (constructorKeys.indexOf(key) < 0) {\n raise('invalid regl constructor argument \"' + key + '\". must be one of ' + constructorKeys)\n }\n })\n}\n\nfunction leftPad (str, n) {\n str = str + ''\n while (str.length < n) {\n str = ' ' + str\n }\n return str\n}\n\nfunction ShaderFile () {\n this.name = 'unknown'\n this.lines = []\n this.index = {}\n this.hasErrors = false\n}\n\nfunction ShaderLine (number, line) {\n this.number = number\n this.line = line\n this.errors = []\n}\n\nfunction ShaderError (fileNumber, lineNumber, message) {\n this.file = fileNumber\n this.line = lineNumber\n this.message = message\n}\n\nfunction guessCommand () {\n var error = new Error()\n var stack = (error.stack || error).toString()\n var pat = /compileProcedure.*\\n\\s*at.*\\((.*)\\)/.exec(stack)\n if (pat) {\n return pat[1]\n }\n var pat2 = /compileProcedure.*\\n\\s*at\\s+(.*)(\\n|$)/.exec(stack)\n if (pat2) {\n return pat2[1]\n }\n return 'unknown'\n}\n\nfunction guessCallSite () {\n var error = new Error()\n var stack = (error.stack || error).toString()\n var pat = /at REGLCommand.*\\n\\s+at.*\\((.*)\\)/.exec(stack)\n if (pat) {\n return pat[1]\n }\n var pat2 = /at REGLCommand.*\\n\\s+at\\s+(.*)\\n/.exec(stack)\n if (pat2) {\n return pat2[1]\n }\n return 'unknown'\n}\n\nfunction parseSource (source, command) {\n var lines = source.split('\\n')\n var lineNumber = 1\n var fileNumber = 0\n var files = {\n unknown: new ShaderFile(),\n 0: new ShaderFile()\n }\n files.unknown.name = files[0].name = command || guessCommand()\n files.unknown.lines.push(new ShaderLine(0, ''))\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i]\n var parts = /^\\s*#\\s*(\\w+)\\s+(.+)\\s*$/.exec(line)\n if (parts) {\n switch (parts[1]) {\n case 'line':\n var lineNumberInfo = /(\\d+)(\\s+\\d+)?/.exec(parts[2])\n if (lineNumberInfo) {\n lineNumber = lineNumberInfo[1] | 0\n if (lineNumberInfo[2]) {\n fileNumber = lineNumberInfo[2] | 0\n if (!(fileNumber in files)) {\n files[fileNumber] = new ShaderFile()\n }\n }\n }\n break\n case 'define':\n var nameInfo = /SHADER_NAME(_B64)?\\s+(.*)$/.exec(parts[2])\n if (nameInfo) {\n files[fileNumber].name = (nameInfo[1]\n ? decodeB64(nameInfo[2])\n : nameInfo[2])\n }\n break\n }\n }\n files[fileNumber].lines.push(new ShaderLine(lineNumber++, line))\n }\n Object.keys(files).forEach(function (fileNumber) {\n var file = files[fileNumber]\n file.lines.forEach(function (line) {\n file.index[line.number] = line\n })\n })\n return files\n}\n\nfunction parseErrorLog (errLog) {\n var result = []\n errLog.split('\\n').forEach(function (errMsg) {\n if (errMsg.length < 5) {\n return\n }\n var parts = /^ERROR:\\s+(\\d+):(\\d+):\\s*(.*)$/.exec(errMsg)\n if (parts) {\n result.push(new ShaderError(\n parts[1] | 0,\n parts[2] | 0,\n parts[3].trim()))\n } else if (errMsg.length > 0) {\n result.push(new ShaderError('unknown', 0, errMsg))\n }\n })\n return result\n}\n\nfunction annotateFiles (files, errors) {\n errors.forEach(function (error) {\n var file = files[error.file]\n if (file) {\n var line = file.index[error.line]\n if (line) {\n line.errors.push(error)\n file.hasErrors = true\n return\n }\n }\n files.unknown.hasErrors = true\n files.unknown.lines[0].errors.push(error)\n })\n}\n\nfunction checkShaderError (gl, shader, source, type, command) {\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var errLog = gl.getShaderInfoLog(shader)\n var typeName = type === gl.FRAGMENT_SHADER ? 'fragment' : 'vertex'\n checkCommandType(source, 'string', typeName + ' shader source must be a string', command)\n var files = parseSource(source, command)\n var errors = parseErrorLog(errLog)\n annotateFiles(files, errors)\n\n Object.keys(files).forEach(function (fileNumber) {\n var file = files[fileNumber]\n if (!file.hasErrors) {\n return\n }\n\n var strings = ['']\n var styles = ['']\n\n function push (str, style) {\n strings.push(str)\n styles.push(style || '')\n }\n\n push('file number ' + fileNumber + ': ' + file.name + '\\n', 'color:red;text-decoration:underline;font-weight:bold')\n\n file.lines.forEach(function (line) {\n if (line.errors.length > 0) {\n push(leftPad(line.number, 4) + '| ', 'background-color:yellow; font-weight:bold')\n push(line.line + endl, 'color:red; background-color:yellow; font-weight:bold')\n\n // try to guess token\n var offset = 0\n line.errors.forEach(function (error) {\n var message = error.message\n var token = /^\\s*'(.*)'\\s*:\\s*(.*)$/.exec(message)\n if (token) {\n var tokenPat = token[1]\n message = token[2]\n switch (tokenPat) {\n case 'assign':\n tokenPat = '='\n break\n }\n offset = Math.max(line.line.indexOf(tokenPat, offset), 0)\n } else {\n offset = 0\n }\n\n push(leftPad('| ', 6))\n push(leftPad('^^^', offset + 3) + endl, 'font-weight:bold')\n push(leftPad('| ', 6))\n push(message + endl, 'font-weight:bold')\n })\n push(leftPad('| ', 6) + endl)\n } else {\n push(leftPad(line.number, 4) + '| ')\n push(line.line + endl, 'color:red')\n }\n })\n if (typeof document !== 'undefined' && !window.chrome) {\n styles[0] = strings.join('%c')\n console.log.apply(console, styles)\n } else {\n console.log(strings.join(''))\n }\n })\n\n check.raise('Error compiling ' + typeName + ' shader, ' + files[0].name)\n }\n}\n\nfunction checkLinkError (gl, program, fragShader, vertShader, command) {\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var errLog = gl.getProgramInfoLog(program)\n var fragParse = parseSource(fragShader, command)\n var vertParse = parseSource(vertShader, command)\n\n var header = 'Error linking program with vertex shader, \"' +\n vertParse[0].name + '\", and fragment shader \"' + fragParse[0].name + '\"'\n\n if (typeof document !== 'undefined') {\n console.log('%c' + header + endl + '%c' + errLog,\n 'color:red;text-decoration:underline;font-weight:bold',\n 'color:red')\n } else {\n console.log(header + endl + errLog)\n }\n check.raise(header)\n }\n}\n\nfunction saveCommandRef (object) {\n object._commandRef = guessCommand()\n}\n\nfunction saveDrawCommandInfo (opts, uniforms, attributes, stringStore) {\n saveCommandRef(opts)\n\n function id (str) {\n if (str) {\n return stringStore.id(str)\n }\n return 0\n }\n opts._fragId = id(opts.static.frag)\n opts._vertId = id(opts.static.vert)\n\n function addProps (dict, set) {\n Object.keys(set).forEach(function (u) {\n dict[stringStore.id(u)] = true\n })\n }\n\n var uniformSet = opts._uniformSet = {}\n addProps(uniformSet, uniforms.static)\n addProps(uniformSet, uniforms.dynamic)\n\n var attributeSet = opts._attributeSet = {}\n addProps(attributeSet, attributes.static)\n addProps(attributeSet, attributes.dynamic)\n\n opts._hasCount = (\n 'count' in opts.static ||\n 'count' in opts.dynamic ||\n 'elements' in opts.static ||\n 'elements' in opts.dynamic)\n}\n\nfunction commandRaise (message, command) {\n var callSite = guessCallSite()\n raise(message +\n ' in command ' + (command || guessCommand()) +\n (callSite === 'unknown' ? '' : ' called from ' + callSite))\n}\n\nfunction checkCommand (pred, message, command) {\n if (!pred) {\n commandRaise(message, command || guessCommand())\n }\n}\n\nfunction checkParameterCommand (param, possibilities, message, command) {\n if (!(param in possibilities)) {\n commandRaise(\n 'unknown parameter (' + param + ')' + encolon(message) +\n '. possible values: ' + Object.keys(possibilities).join(),\n command || guessCommand())\n }\n}\n\nfunction checkCommandType (value, type, message, command) {\n if (!standardTypeEh(value, type)) {\n commandRaise(\n 'invalid parameter type' + encolon(message) +\n '. expected ' + type + ', got ' + (typeof value),\n command || guessCommand())\n }\n}\n\nfunction checkOptional (block) {\n block()\n}\n\nfunction checkFramebufferFormat (attachment, texFormats, rbFormats) {\n if (attachment.texture) {\n checkOneOf(\n attachment.texture._texture.internalformat,\n texFormats,\n 'unsupported texture format for attachment')\n } else {\n checkOneOf(\n attachment.renderbuffer._renderbuffer.format,\n rbFormats,\n 'unsupported renderbuffer format for attachment')\n }\n}\n\nvar GL_CLAMP_TO_EDGE = 0x812F\n\nvar GL_NEAREST = 0x2600\nvar GL_NEAREST_MIPMAP_NEAREST = 0x2700\nvar GL_LINEAR_MIPMAP_NEAREST = 0x2701\nvar GL_NEAREST_MIPMAP_LINEAR = 0x2702\nvar GL_LINEAR_MIPMAP_LINEAR = 0x2703\n\nvar GL_BYTE = 5120\nvar GL_UNSIGNED_BYTE = 5121\nvar GL_SHORT = 5122\nvar GL_UNSIGNED_SHORT = 5123\nvar GL_INT = 5124\nvar GL_UNSIGNED_INT = 5125\nvar GL_FLOAT = 5126\n\nvar GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033\nvar GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034\nvar GL_UNSIGNED_SHORT_5_6_5 = 0x8363\nvar GL_UNSIGNED_INT_24_8_WEBGL = 0x84FA\n\nvar GL_HALF_FLOAT_OES = 0x8D61\n\nvar TYPE_SIZE = {}\n\nTYPE_SIZE[GL_BYTE] =\nTYPE_SIZE[GL_UNSIGNED_BYTE] = 1\n\nTYPE_SIZE[GL_SHORT] =\nTYPE_SIZE[GL_UNSIGNED_SHORT] =\nTYPE_SIZE[GL_HALF_FLOAT_OES] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_5_6_5] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_4_4_4_4] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_5_5_5_1] = 2\n\nTYPE_SIZE[GL_INT] =\nTYPE_SIZE[GL_UNSIGNED_INT] =\nTYPE_SIZE[GL_FLOAT] =\nTYPE_SIZE[GL_UNSIGNED_INT_24_8_WEBGL] = 4\n\nfunction pixelSize (type, channels) {\n if (type === GL_UNSIGNED_SHORT_5_5_5_1 ||\n type === GL_UNSIGNED_SHORT_4_4_4_4 ||\n type === GL_UNSIGNED_SHORT_5_6_5) {\n return 2\n } else if (type === GL_UNSIGNED_INT_24_8_WEBGL) {\n return 4\n } else {\n return TYPE_SIZE[type] * channels\n }\n}\n\nfunction isPow2 (v) {\n return !(v & (v - 1)) && (!!v)\n}\n\nfunction checkTexture2D (info, mipData, limits) {\n var i\n var w = mipData.width\n var h = mipData.height\n var c = mipData.channels\n\n // Check texture shape\n check(w > 0 && w <= limits.maxTextureSize &&\n h > 0 && h <= limits.maxTextureSize,\n 'invalid texture shape')\n\n // check wrap mode\n if (info.wrapS !== GL_CLAMP_TO_EDGE || info.wrapT !== GL_CLAMP_TO_EDGE) {\n check(isPow2(w) && isPow2(h),\n 'incompatible wrap mode for texture, both width and height must be power of 2')\n }\n\n if (mipData.mipmask === 1) {\n if (w !== 1 && h !== 1) {\n check(\n info.minFilter !== GL_NEAREST_MIPMAP_NEAREST &&\n info.minFilter !== GL_NEAREST_MIPMAP_LINEAR &&\n info.minFilter !== GL_LINEAR_MIPMAP_NEAREST &&\n info.minFilter !== GL_LINEAR_MIPMAP_LINEAR,\n 'min filter requires mipmap')\n }\n } else {\n // texture must be power of 2\n check(isPow2(w) && isPow2(h),\n 'texture must be a square power of 2 to support mipmapping')\n check(mipData.mipmask === (w << 1) - 1,\n 'missing or incomplete mipmap data')\n }\n\n if (mipData.type === GL_FLOAT) {\n if (limits.extensions.indexOf('oes_texture_float_linear') < 0) {\n check(info.minFilter === GL_NEAREST && info.magFilter === GL_NEAREST,\n 'filter not supported, must enable oes_texture_float_linear')\n }\n check(!info.genMipmaps,\n 'mipmap generation not supported with float textures')\n }\n\n // check image complete\n var mipimages = mipData.images\n for (i = 0; i < 16; ++i) {\n if (mipimages[i]) {\n var mw = w >> i\n var mh = h >> i\n check(mipData.mipmask & (1 << i), 'missing mipmap data')\n\n var img = mipimages[i]\n\n check(\n img.width === mw &&\n img.height === mh,\n 'invalid shape for mip images')\n\n check(\n img.format === mipData.format &&\n img.internalformat === mipData.internalformat &&\n img.type === mipData.type,\n 'incompatible type for mip image')\n\n if (img.compressed) {\n // TODO: check size for compressed images\n } else if (img.data) {\n // check(img.data.byteLength === mw * mh *\n // Math.max(pixelSize(img.type, c), img.unpackAlignment),\n var rowSize = Math.ceil(pixelSize(img.type, c) * mw / img.unpackAlignment) * img.unpackAlignment\n check(img.data.byteLength === rowSize * mh,\n 'invalid data for image, buffer size is inconsistent with image format')\n } else if (img.element) {\n // TODO: check element can be loaded\n } else if (img.copy) {\n // TODO: check compatible format and type\n }\n } else if (!info.genMipmaps) {\n check((mipData.mipmask & (1 << i)) === 0, 'extra mipmap data')\n }\n }\n\n if (mipData.compressed) {\n check(!info.genMipmaps,\n 'mipmap generation for compressed images not supported')\n }\n}\n\nfunction checkTextureCube (texture, info, faces, limits) {\n var w = texture.width\n var h = texture.height\n var c = texture.channels\n\n // Check texture shape\n check(\n w > 0 && w <= limits.maxTextureSize && h > 0 && h <= limits.maxTextureSize,\n 'invalid texture shape')\n check(\n w === h,\n 'cube map must be square')\n check(\n info.wrapS === GL_CLAMP_TO_EDGE && info.wrapT === GL_CLAMP_TO_EDGE,\n 'wrap mode not supported by cube map')\n\n for (var i = 0; i < faces.length; ++i) {\n var face = faces[i]\n check(\n face.width === w && face.height === h,\n 'inconsistent cube map face shape')\n\n if (info.genMipmaps) {\n check(!face.compressed,\n 'can not generate mipmap for compressed textures')\n check(face.mipmask === 1,\n 'can not specify mipmaps and generate mipmaps')\n } else {\n // TODO: check mip and filter mode\n }\n\n var mipmaps = face.images\n for (var j = 0; j < 16; ++j) {\n var img = mipmaps[j]\n if (img) {\n var mw = w >> j\n var mh = h >> j\n check(face.mipmask & (1 << j), 'missing mipmap data')\n check(\n img.width === mw &&\n img.height === mh,\n 'invalid shape for mip images')\n check(\n img.format === texture.format &&\n img.internalformat === texture.internalformat &&\n img.type === texture.type,\n 'incompatible type for mip image')\n\n if (img.compressed) {\n // TODO: check size for compressed images\n } else if (img.data) {\n check(img.data.byteLength === mw * mh *\n Math.max(pixelSize(img.type, c), img.unpackAlignment),\n 'invalid data for image, buffer size is inconsistent with image format')\n } else if (img.element) {\n // TODO: check element can be loaded\n } else if (img.copy) {\n // TODO: check compatible format and type\n }\n }\n }\n }\n}\n\nvar check$1 = extend(check, {\n optional: checkOptional,\n raise: raise,\n commandRaise: commandRaise,\n command: checkCommand,\n parameter: checkParameter,\n commandParameter: checkParameterCommand,\n constructor: checkConstructor,\n type: checkTypeOf,\n commandType: checkCommandType,\n isTypedArray: checkIsTypedArray,\n nni: checkNonNegativeInt,\n oneOf: checkOneOf,\n shaderError: checkShaderError,\n linkError: checkLinkError,\n callSite: guessCallSite,\n saveCommandRef: saveCommandRef,\n saveDrawInfo: saveDrawCommandInfo,\n framebufferFormat: checkFramebufferFormat,\n guessCommand: guessCommand,\n texture2D: checkTexture2D,\n textureCube: checkTextureCube\n});\n\nvar VARIABLE_COUNTER = 0\n\nvar DYN_FUNC = 0\nvar DYN_CONSTANT = 5\nvar DYN_ARRAY = 6\n\nfunction DynamicVariable (type, data) {\n this.id = (VARIABLE_COUNTER++)\n this.type = type\n this.data = data\n}\n\nfunction escapeStr (str) {\n return str.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n}\n\nfunction splitParts (str) {\n if (str.length === 0) {\n return []\n }\n\n var firstChar = str.charAt(0)\n var lastChar = str.charAt(str.length - 1)\n\n if (str.length > 1 &&\n firstChar === lastChar &&\n (firstChar === '\"' || firstChar === \"'\")) {\n return ['\"' + escapeStr(str.substr(1, str.length - 2)) + '\"']\n }\n\n var parts = /\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(str)\n if (parts) {\n return (\n splitParts(str.substr(0, parts.index))\n .concat(splitParts(parts[1]))\n .concat(splitParts(str.substr(parts.index + parts[0].length)))\n )\n }\n\n var subparts = str.split('.')\n if (subparts.length === 1) {\n return ['\"' + escapeStr(str) + '\"']\n }\n\n var result = []\n for (var i = 0; i < subparts.length; ++i) {\n result = result.concat(splitParts(subparts[i]))\n }\n return result\n}\n\nfunction toAccessorString (str) {\n return '[' + splitParts(str).join('][') + ']'\n}\n\nfunction defineDynamic (type, data) {\n return new DynamicVariable(type, toAccessorString(data + ''))\n}\n\nfunction isDynamic (x) {\n return (typeof x === 'function' && !x._reglType) || (x instanceof DynamicVariable)\n}\n\nfunction unbox (x, path) {\n if (typeof x === 'function') {\n return new DynamicVariable(DYN_FUNC, x)\n } else if (typeof x === 'number' || typeof x === 'boolean') {\n return new DynamicVariable(DYN_CONSTANT, x)\n } else if (Array.isArray(x)) {\n return new DynamicVariable(DYN_ARRAY, x.map((y, i) => unbox(y, path + '[' + i + ']')))\n } else if (x instanceof DynamicVariable) {\n return x\n }\n check$1(false, 'invalid option type in uniform ' + path)\n}\n\nvar dynamic = {\n DynamicVariable: DynamicVariable,\n define: defineDynamic,\n isDynamic: isDynamic,\n unbox: unbox,\n accessor: toAccessorString\n};\n\n/* globals requestAnimationFrame, cancelAnimationFrame */\nvar raf = {\n next: typeof requestAnimationFrame === 'function'\n ? function (cb) { return requestAnimationFrame(cb) }\n : function (cb) { return setTimeout(cb, 16) },\n cancel: typeof cancelAnimationFrame === 'function'\n ? function (raf) { return cancelAnimationFrame(raf) }\n : clearTimeout\n};\n\n/* globals performance */\nvar clock = (typeof performance !== 'undefined' && performance.now)\n ? function () { return performance.now() }\n : function () { return +(new Date()) };\n\nfunction createStringStore () {\n var stringIds = { '': 0 }\n var stringValues = ['']\n return {\n id: function (str) {\n var result = stringIds[str]\n if (result) {\n return result\n }\n result = stringIds[str] = stringValues.length\n stringValues.push(str)\n return result\n },\n\n str: function (id) {\n return stringValues[id]\n }\n }\n}\n\n// Context and canvas creation helper functions\nfunction createCanvas (element, onDone, pixelRatio) {\n var canvas = document.createElement('canvas')\n extend(canvas.style, {\n border: 0,\n margin: 0,\n padding: 0,\n top: 0,\n left: 0\n })\n element.appendChild(canvas)\n\n if (element === document.body) {\n canvas.style.position = 'absolute'\n extend(element.style, {\n margin: 0,\n padding: 0\n })\n }\n\n function resize () {\n var w = window.innerWidth\n var h = window.innerHeight\n if (element !== document.body) {\n var bounds = element.getBoundingClientRect()\n w = bounds.right - bounds.left\n h = bounds.bottom - bounds.top\n }\n canvas.width = pixelRatio * w\n canvas.height = pixelRatio * h\n extend(canvas.style, {\n width: w + 'px',\n height: h + 'px'\n })\n }\n\n var resizeObserver\n if (element !== document.body && typeof ResizeObserver === 'function') {\n // ignore 'ResizeObserver' is not defined\n // eslint-disable-next-line\n resizeObserver = new ResizeObserver(function () {\n // setTimeout to avoid flicker\n setTimeout(resize)\n })\n resizeObserver.observe(element)\n } else {\n window.addEventListener('resize', resize, false)\n }\n\n function onDestroy () {\n if (resizeObserver) {\n resizeObserver.disconnect()\n } else {\n window.removeEventListener('resize', resize)\n }\n element.removeChild(canvas)\n }\n\n resize()\n\n return {\n canvas: canvas,\n onDestroy: onDestroy\n }\n}\n\nfunction createContext (canvas, contextAttributes) {\n function get (name) {\n try {\n return canvas.getContext(name, contextAttributes)\n } catch (e) {\n return null\n }\n }\n return (\n get('webgl') ||\n get('experimental-webgl') ||\n get('webgl-experimental')\n )\n}\n\nfunction isHTMLElement (obj) {\n return (\n typeof obj.nodeName === 'string' &&\n typeof obj.appendChild === 'function' &&\n typeof obj.getBoundingClientRect === 'function'\n )\n}\n\nfunction isWebGLContext (obj) {\n return (\n typeof obj.drawArrays === 'function' ||\n typeof obj.drawElements === 'function'\n )\n}\n\nfunction parseExtensions (input) {\n if (typeof input === 'string') {\n return input.split()\n }\n check$1(Array.isArray(input), 'invalid extension array')\n return input\n}\n\nfunction getElement (desc) {\n if (typeof desc === 'string') {\n check$1(typeof document !== 'undefined', 'not supported outside of DOM')\n return document.querySelector(desc)\n }\n return desc\n}\n\nfunction parseArgs (args_) {\n var args = args_ || {}\n var element, container, canvas, gl\n var contextAttributes = {}\n var extensions = []\n var optionalExtensions = []\n var pixelRatio = (typeof window === 'undefined' ? 1 : window.devicePixelRatio)\n var profile = false\n var onDone = function (err) {\n if (err) {\n check$1.raise(err)\n }\n }\n var onDestroy = function () {}\n if (typeof args === 'string') {\n check$1(\n typeof document !== 'undefined',\n 'selector queries only supported in DOM enviroments')\n element = document.querySelector(args)\n check$1(element, 'invalid query string for element')\n } else if (typeof args === 'object') {\n if (isHTMLElement(args)) {\n element = args\n } else if (isWebGLContext(args)) {\n gl = args\n canvas = gl.canvas\n } else {\n check$1.constructor(args)\n if ('gl' in args) {\n gl = args.gl\n } else if ('canvas' in args) {\n canvas = getElement(args.canvas)\n } else if ('container' in args) {\n container = getElement(args.container)\n }\n if ('attributes' in args) {\n contextAttributes = args.attributes\n check$1.type(contextAttributes, 'object', 'invalid context attributes')\n }\n if ('extensions' in args) {\n extensions = parseExtensions(args.extensions)\n }\n if ('optionalExtensions' in args) {\n optionalExtensions = parseExtensions(args.optionalExtensions)\n }\n if ('onDone' in args) {\n check$1.type(\n args.onDone, 'function',\n 'invalid or missing onDone callback')\n onDone = args.onDone\n }\n if ('profile' in args) {\n profile = !!args.profile\n }\n if ('pixelRatio' in args) {\n pixelRatio = +args.pixelRatio\n check$1(pixelRatio > 0, 'invalid pixel ratio')\n }\n }\n } else {\n check$1.raise('invalid arguments to regl')\n }\n\n if (element) {\n if (element.nodeName.toLowerCase() === 'canvas') {\n canvas = element\n } else {\n container = element\n }\n }\n\n if (!gl) {\n if (!canvas) {\n check$1(\n typeof document !== 'undefined',\n 'must manually specify webgl context outside of DOM environments')\n var result = createCanvas(container || document.body, onDone, pixelRatio)\n if (!result) {\n return null\n }\n canvas = result.canvas\n onDestroy = result.onDestroy\n }\n // workaround for chromium bug, premultiplied alpha value is platform dependent\n if (contextAttributes.premultipliedAlpha === undefined) contextAttributes.premultipliedAlpha = true\n gl = createContext(canvas, contextAttributes)\n }\n\n if (!gl) {\n onDestroy()\n onDone('webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org')\n return null\n }\n\n return {\n gl: gl,\n canvas: canvas,\n container: container,\n extensions: extensions,\n optionalExtensions: optionalExtensions,\n pixelRatio: pixelRatio,\n profile: profile,\n onDone: onDone,\n onDestroy: onDestroy\n }\n}\n\nfunction createExtensionCache (gl, config) {\n var extensions = {}\n\n function tryLoadExtension (name_) {\n check$1.type(name_, 'string', 'extension name must be string')\n var name = name_.toLowerCase()\n var ext\n try {\n ext = extensions[name] = gl.getExtension(name)\n } catch (e) {}\n return !!ext\n }\n\n for (var i = 0; i < config.extensions.length; ++i) {\n var name = config.extensions[i]\n if (!tryLoadExtension(name)) {\n config.onDestroy()\n config.onDone('\"' + name + '\" extension is not supported by the current WebGL context, try upgrading your system or a different browser')\n return null\n }\n }\n\n config.optionalExtensions.forEach(tryLoadExtension)\n\n return {\n extensions: extensions,\n restore: function () {\n Object.keys(extensions).forEach(function (name) {\n if (extensions[name] && !tryLoadExtension(name)) {\n throw new Error('(regl): error restoring extension ' + name)\n }\n })\n }\n }\n}\n\nfunction loop (n, f) {\n var result = Array(n)\n for (var i = 0; i < n; ++i) {\n result[i] = f(i)\n }\n return result\n}\n\nvar GL_BYTE$1 = 5120\nvar GL_UNSIGNED_BYTE$2 = 5121\nvar GL_SHORT$1 = 5122\nvar GL_UNSIGNED_SHORT$1 = 5123\nvar GL_INT$1 = 5124\nvar GL_UNSIGNED_INT$1 = 5125\nvar GL_FLOAT$2 = 5126\n\nfunction nextPow16 (v) {\n for (var i = 16; i <= (1 << 28); i *= 16) {\n if (v <= i) {\n return i\n }\n }\n return 0\n}\n\nfunction log2 (v) {\n var r, shift\n r = (v > 0xFFFF) << 4\n v >>>= r\n shift = (v > 0xFF) << 3\n v >>>= shift; r |= shift\n shift = (v > 0xF) << 2\n v >>>= shift; r |= shift\n shift = (v > 0x3) << 1\n v >>>= shift; r |= shift\n return r | (v >> 1)\n}\n\nfunction createPool () {\n var bufferPool = loop(8, function () {\n return []\n })\n\n function alloc (n) {\n var sz = nextPow16(n)\n var bin = bufferPool[log2(sz) >> 2]\n if (bin.length > 0) {\n return bin.pop()\n }\n return new ArrayBuffer(sz)\n }\n\n function free (buf) {\n bufferPool[log2(buf.byteLength) >> 2].push(buf)\n }\n\n function allocType (type, n) {\n var result = null\n switch (type) {\n case GL_BYTE$1:\n result = new Int8Array(alloc(n), 0, n)\n break\n case GL_UNSIGNED_BYTE$2:\n result = new Uint8Array(alloc(n), 0, n)\n break\n case GL_SHORT$1:\n result = new Int16Array(alloc(2 * n), 0, n)\n break\n case GL_UNSIGNED_SHORT$1:\n result = new Uint16Array(alloc(2 * n), 0, n)\n break\n case GL_INT$1:\n result = new Int32Array(alloc(4 * n), 0, n)\n break\n case GL_UNSIGNED_INT$1:\n result = new Uint32Array(alloc(4 * n), 0, n)\n break\n case GL_FLOAT$2:\n result = new Float32Array(alloc(4 * n), 0, n)\n break\n default:\n return null\n }\n if (result.length !== n) {\n return result.subarray(0, n)\n }\n return result\n }\n\n function freeType (array) {\n free(array.buffer)\n }\n\n return {\n alloc: alloc,\n free: free,\n allocType: allocType,\n freeType: freeType\n }\n}\n\nvar pool = createPool()\n\n// zero pool for initial zero data\npool.zero = createPool()\n\nvar GL_SUBPIXEL_BITS = 0x0D50\nvar GL_RED_BITS = 0x0D52\nvar GL_GREEN_BITS = 0x0D53\nvar GL_BLUE_BITS = 0x0D54\nvar GL_ALPHA_BITS = 0x0D55\nvar GL_DEPTH_BITS = 0x0D56\nvar GL_STENCIL_BITS = 0x0D57\n\nvar GL_ALIASED_POINT_SIZE_RANGE = 0x846D\nvar GL_ALIASED_LINE_WIDTH_RANGE = 0x846E\n\nvar GL_MAX_TEXTURE_SIZE = 0x0D33\nvar GL_MAX_VIEWPORT_DIMS = 0x0D3A\nvar GL_MAX_VERTEX_ATTRIBS = 0x8869\nvar GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB\nvar GL_MAX_VARYING_VECTORS = 0x8DFC\nvar GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D\nvar GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C\nvar GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872\nvar GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD\nvar GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C\nvar GL_MAX_RENDERBUFFER_SIZE = 0x84E8\n\nvar GL_VENDOR = 0x1F00\nvar GL_RENDERER = 0x1F01\nvar GL_VERSION = 0x1F02\nvar GL_SHADING_LANGUAGE_VERSION = 0x8B8C\n\nvar GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF\n\nvar GL_MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF\nvar GL_MAX_DRAW_BUFFERS_WEBGL = 0x8824\n\nvar GL_TEXTURE_2D = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP = 0x8513\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515\nvar GL_TEXTURE0 = 0x84C0\nvar GL_RGBA = 0x1908\nvar GL_FLOAT$1 = 0x1406\nvar GL_UNSIGNED_BYTE$1 = 0x1401\nvar GL_FRAMEBUFFER = 0x8D40\nvar GL_FRAMEBUFFER_COMPLETE = 0x8CD5\nvar GL_COLOR_ATTACHMENT0 = 0x8CE0\nvar GL_COLOR_BUFFER_BIT$1 = 0x4000\n\nvar wrapLimits = function (gl, extensions) {\n var maxAnisotropic = 1\n if (extensions.ext_texture_filter_anisotropic) {\n maxAnisotropic = gl.getParameter(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)\n }\n\n var maxDrawbuffers = 1\n var maxColorAttachments = 1\n if (extensions.webgl_draw_buffers) {\n maxDrawbuffers = gl.getParameter(GL_MAX_DRAW_BUFFERS_WEBGL)\n maxColorAttachments = gl.getParameter(GL_MAX_COLOR_ATTACHMENTS_WEBGL)\n }\n\n // detect if reading float textures is available (Safari doesn't support)\n var readFloat = !!extensions.oes_texture_float\n if (readFloat) {\n var readFloatTexture = gl.createTexture()\n gl.bindTexture(GL_TEXTURE_2D, readFloatTexture)\n gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_FLOAT$1, null)\n\n var fbo = gl.createFramebuffer()\n gl.bindFramebuffer(GL_FRAMEBUFFER, fbo)\n gl.framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, readFloatTexture, 0)\n gl.bindTexture(GL_TEXTURE_2D, null)\n\n if (gl.checkFramebufferStatus(GL_FRAMEBUFFER) !== GL_FRAMEBUFFER_COMPLETE) readFloat = false\n\n else {\n gl.viewport(0, 0, 1, 1)\n gl.clearColor(1.0, 0.0, 0.0, 1.0)\n gl.clear(GL_COLOR_BUFFER_BIT$1)\n var pixels = pool.allocType(GL_FLOAT$1, 4)\n gl.readPixels(0, 0, 1, 1, GL_RGBA, GL_FLOAT$1, pixels)\n\n if (gl.getError()) readFloat = false\n else {\n gl.deleteFramebuffer(fbo)\n gl.deleteTexture(readFloatTexture)\n\n readFloat = pixels[0] === 1.0\n }\n\n pool.freeType(pixels)\n }\n }\n\n // detect non power of two cube textures support (IE doesn't support)\n var isIE = typeof navigator !== 'undefined' && (/MSIE/.test(navigator.userAgent) || /Trident\\//.test(navigator.appVersion) || /Edge/.test(navigator.userAgent))\n\n var npotTextureCube = true\n\n if (!isIE) {\n var cubeTexture = gl.createTexture()\n var data = pool.allocType(GL_UNSIGNED_BYTE$1, 36)\n gl.activeTexture(GL_TEXTURE0)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP, cubeTexture)\n gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 3, 3, 0, GL_RGBA, GL_UNSIGNED_BYTE$1, data)\n pool.freeType(data)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP, null)\n gl.deleteTexture(cubeTexture)\n npotTextureCube = !gl.getError()\n }\n\n return {\n // drawing buffer bit depth\n colorBits: [\n gl.getParameter(GL_RED_BITS),\n gl.getParameter(GL_GREEN_BITS),\n gl.getParameter(GL_BLUE_BITS),\n gl.getParameter(GL_ALPHA_BITS)\n ],\n depthBits: gl.getParameter(GL_DEPTH_BITS),\n stencilBits: gl.getParameter(GL_STENCIL_BITS),\n subpixelBits: gl.getParameter(GL_SUBPIXEL_BITS),\n\n // supported extensions\n extensions: Object.keys(extensions).filter(function (ext) {\n return !!extensions[ext]\n }),\n\n // max aniso samples\n maxAnisotropic: maxAnisotropic,\n\n // max draw buffers\n maxDrawbuffers: maxDrawbuffers,\n maxColorAttachments: maxColorAttachments,\n\n // point and line size ranges\n pointSizeDims: gl.getParameter(GL_ALIASED_POINT_SIZE_RANGE),\n lineWidthDims: gl.getParameter(GL_ALIASED_LINE_WIDTH_RANGE),\n maxViewportDims: gl.getParameter(GL_MAX_VIEWPORT_DIMS),\n maxCombinedTextureUnits: gl.getParameter(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS),\n maxCubeMapSize: gl.getParameter(GL_MAX_CUBE_MAP_TEXTURE_SIZE),\n maxRenderbufferSize: gl.getParameter(GL_MAX_RENDERBUFFER_SIZE),\n maxTextureUnits: gl.getParameter(GL_MAX_TEXTURE_IMAGE_UNITS),\n maxTextureSize: gl.getParameter(GL_MAX_TEXTURE_SIZE),\n maxAttributes: gl.getParameter(GL_MAX_VERTEX_ATTRIBS),\n maxVertexUniforms: gl.getParameter(GL_MAX_VERTEX_UNIFORM_VECTORS),\n maxVertexTextureUnits: gl.getParameter(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS),\n maxVaryingVectors: gl.getParameter(GL_MAX_VARYING_VECTORS),\n maxFragmentUniforms: gl.getParameter(GL_MAX_FRAGMENT_UNIFORM_VECTORS),\n\n // vendor info\n glsl: gl.getParameter(GL_SHADING_LANGUAGE_VERSION),\n renderer: gl.getParameter(GL_RENDERER),\n vendor: gl.getParameter(GL_VENDOR),\n version: gl.getParameter(GL_VERSION),\n\n // quirks\n readFloat: readFloat,\n npotTextureCube: npotTextureCube\n }\n}\n\nfunction isNDArrayLike (obj) {\n return (\n !!obj &&\n typeof obj === 'object' &&\n Array.isArray(obj.shape) &&\n Array.isArray(obj.stride) &&\n typeof obj.offset === 'number' &&\n obj.shape.length === obj.stride.length &&\n (Array.isArray(obj.data) ||\n isTypedArray(obj.data)))\n}\n\nvar values = function (obj) {\n return Object.keys(obj).map(function (key) { return obj[key] })\n}\n\nvar flattenUtils = {\n shape: arrayShape$1,\n flatten: flattenArray\n};\n\nfunction flatten1D (array, nx, out) {\n for (var i = 0; i < nx; ++i) {\n out[i] = array[i]\n }\n}\n\nfunction flatten2D (array, nx, ny, out) {\n var ptr = 0\n for (var i = 0; i < nx; ++i) {\n var row = array[i]\n for (var j = 0; j < ny; ++j) {\n out[ptr++] = row[j]\n }\n }\n}\n\nfunction flatten3D (array, nx, ny, nz, out, ptr_) {\n var ptr = ptr_\n for (var i = 0; i < nx; ++i) {\n var row = array[i]\n for (var j = 0; j < ny; ++j) {\n var col = row[j]\n for (var k = 0; k < nz; ++k) {\n out[ptr++] = col[k]\n }\n }\n }\n}\n\nfunction flattenRec (array, shape, level, out, ptr) {\n var stride = 1\n for (var i = level + 1; i < shape.length; ++i) {\n stride *= shape[i]\n }\n var n = shape[level]\n if (shape.length - level === 4) {\n var nx = shape[level + 1]\n var ny = shape[level + 2]\n var nz = shape[level + 3]\n for (i = 0; i < n; ++i) {\n flatten3D(array[i], nx, ny, nz, out, ptr)\n ptr += stride\n }\n } else {\n for (i = 0; i < n; ++i) {\n flattenRec(array[i], shape, level + 1, out, ptr)\n ptr += stride\n }\n }\n}\n\nfunction flattenArray (array, shape, type, out_) {\n var sz = 1\n if (shape.length) {\n for (var i = 0; i < shape.length; ++i) {\n sz *= shape[i]\n }\n } else {\n sz = 0\n }\n var out = out_ || pool.allocType(type, sz)\n switch (shape.length) {\n case 0:\n break\n case 1:\n flatten1D(array, shape[0], out)\n break\n case 2:\n flatten2D(array, shape[0], shape[1], out)\n break\n case 3:\n flatten3D(array, shape[0], shape[1], shape[2], out, 0)\n break\n default:\n flattenRec(array, shape, 0, out, 0)\n }\n return out\n}\n\nfunction arrayShape$1 (array_) {\n var shape = []\n for (var array = array_; array.length; array = array[0]) {\n shape.push(array.length)\n }\n return shape\n}\n\nvar arrayTypes = {\n\t\"[object Int8Array]\": 5120,\n\t\"[object Int16Array]\": 5122,\n\t\"[object Int32Array]\": 5124,\n\t\"[object Uint8Array]\": 5121,\n\t\"[object Uint8ClampedArray]\": 5121,\n\t\"[object Uint16Array]\": 5123,\n\t\"[object Uint32Array]\": 5125,\n\t\"[object Float32Array]\": 5126,\n\t\"[object Float64Array]\": 5121,\n\t\"[object ArrayBuffer]\": 5121\n};\n\nvar int8 = 5120;\nvar int16 = 5122;\nvar int32 = 5124;\nvar uint8 = 5121;\nvar uint16 = 5123;\nvar uint32 = 5125;\nvar float = 5126;\nvar float32 = 5126;\nvar glTypes = {\n\tint8: int8,\n\tint16: int16,\n\tint32: int32,\n\tuint8: uint8,\n\tuint16: uint16,\n\tuint32: uint32,\n\tfloat: float,\n\tfloat32: float32\n};\n\nvar dynamic$1 = 35048;\nvar stream = 35040;\nvar usageTypes = {\n\tdynamic: dynamic$1,\n\tstream: stream,\n\t\"static\": 35044\n};\n\nvar arrayFlatten = flattenUtils.flatten\nvar arrayShape = flattenUtils.shape\n\nvar GL_STATIC_DRAW = 0x88E4\nvar GL_STREAM_DRAW = 0x88E0\n\nvar GL_UNSIGNED_BYTE$3 = 5121\nvar GL_FLOAT$3 = 5126\n\nvar DTYPES_SIZES = []\nDTYPES_SIZES[5120] = 1 // int8\nDTYPES_SIZES[5122] = 2 // int16\nDTYPES_SIZES[5124] = 4 // int32\nDTYPES_SIZES[5121] = 1 // uint8\nDTYPES_SIZES[5123] = 2 // uint16\nDTYPES_SIZES[5125] = 4 // uint32\nDTYPES_SIZES[5126] = 4 // float32\n\nfunction typedArrayCode (data) {\n return arrayTypes[Object.prototype.toString.call(data)] | 0\n}\n\nfunction copyArray (out, inp) {\n for (var i = 0; i < inp.length; ++i) {\n out[i] = inp[i]\n }\n}\n\nfunction transpose (\n result, data, shapeX, shapeY, strideX, strideY, offset) {\n var ptr = 0\n for (var i = 0; i < shapeX; ++i) {\n for (var j = 0; j < shapeY; ++j) {\n result[ptr++] = data[strideX * i + strideY * j + offset]\n }\n }\n}\n\nfunction wrapBufferState (gl, stats, config, destroyBuffer) {\n var bufferCount = 0\n var bufferSet = {}\n\n function REGLBuffer (type) {\n this.id = bufferCount++\n this.buffer = gl.createBuffer()\n this.type = type\n this.usage = GL_STATIC_DRAW\n this.byteLength = 0\n this.dimension = 1\n this.dtype = GL_UNSIGNED_BYTE$3\n\n this.persistentData = null\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n REGLBuffer.prototype.bind = function () {\n gl.bindBuffer(this.type, this.buffer)\n }\n\n REGLBuffer.prototype.destroy = function () {\n destroy(this)\n }\n\n var streamPool = []\n\n function createStream (type, data) {\n var buffer = streamPool.pop()\n if (!buffer) {\n buffer = new REGLBuffer(type)\n }\n buffer.bind()\n initBufferFromData(buffer, data, GL_STREAM_DRAW, 0, 1, false)\n return buffer\n }\n\n function destroyStream (stream$$1) {\n streamPool.push(stream$$1)\n }\n\n function initBufferFromTypedArray (buffer, data, usage) {\n buffer.byteLength = data.byteLength\n gl.bufferData(buffer.type, data, usage)\n }\n\n function initBufferFromData (buffer, data, usage, dtype, dimension, persist) {\n var shape\n buffer.usage = usage\n if (Array.isArray(data)) {\n buffer.dtype = dtype || GL_FLOAT$3\n if (data.length > 0) {\n var flatData\n if (Array.isArray(data[0])) {\n shape = arrayShape(data)\n var dim = 1\n for (var i = 1; i < shape.length; ++i) {\n dim *= shape[i]\n }\n buffer.dimension = dim\n flatData = arrayFlatten(data, shape, buffer.dtype)\n initBufferFromTypedArray(buffer, flatData, usage)\n if (persist) {\n buffer.persistentData = flatData\n } else {\n pool.freeType(flatData)\n }\n } else if (typeof data[0] === 'number') {\n buffer.dimension = dimension\n var typedData = pool.allocType(buffer.dtype, data.length)\n copyArray(typedData, data)\n initBufferFromTypedArray(buffer, typedData, usage)\n if (persist) {\n buffer.persistentData = typedData\n } else {\n pool.freeType(typedData)\n }\n } else if (isTypedArray(data[0])) {\n buffer.dimension = data[0].length\n buffer.dtype = dtype || typedArrayCode(data[0]) || GL_FLOAT$3\n flatData = arrayFlatten(\n data,\n [data.length, data[0].length],\n buffer.dtype)\n initBufferFromTypedArray(buffer, flatData, usage)\n if (persist) {\n buffer.persistentData = flatData\n } else {\n pool.freeType(flatData)\n }\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n } else if (isTypedArray(data)) {\n buffer.dtype = dtype || typedArrayCode(data)\n buffer.dimension = dimension\n initBufferFromTypedArray(buffer, data, usage)\n if (persist) {\n buffer.persistentData = new Uint8Array(new Uint8Array(data.buffer))\n }\n } else if (isNDArrayLike(data)) {\n shape = data.shape\n var stride = data.stride\n var offset = data.offset\n\n var shapeX = 0\n var shapeY = 0\n var strideX = 0\n var strideY = 0\n if (shape.length === 1) {\n shapeX = shape[0]\n shapeY = 1\n strideX = stride[0]\n strideY = 0\n } else if (shape.length === 2) {\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n } else {\n check$1.raise('invalid shape')\n }\n\n buffer.dtype = dtype || typedArrayCode(data.data) || GL_FLOAT$3\n buffer.dimension = shapeY\n\n var transposeData = pool.allocType(buffer.dtype, shapeX * shapeY)\n transpose(transposeData,\n data.data,\n shapeX, shapeY,\n strideX, strideY,\n offset)\n initBufferFromTypedArray(buffer, transposeData, usage)\n if (persist) {\n buffer.persistentData = transposeData\n } else {\n pool.freeType(transposeData)\n }\n } else if (data instanceof ArrayBuffer) {\n buffer.dtype = GL_UNSIGNED_BYTE$3\n buffer.dimension = dimension\n initBufferFromTypedArray(buffer, data, usage)\n if (persist) {\n buffer.persistentData = new Uint8Array(new Uint8Array(data))\n }\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n\n function destroy (buffer) {\n stats.bufferCount--\n\n // remove attribute link\n destroyBuffer(buffer)\n\n var handle = buffer.buffer\n check$1(handle, 'buffer must not be deleted already')\n gl.deleteBuffer(handle)\n buffer.buffer = null\n delete bufferSet[buffer.id]\n }\n\n function createBuffer (options, type, deferInit, persistent) {\n stats.bufferCount++\n\n var buffer = new REGLBuffer(type)\n bufferSet[buffer.id] = buffer\n\n function reglBuffer (options) {\n var usage = GL_STATIC_DRAW\n var data = null\n var byteLength = 0\n var dtype = 0\n var dimension = 1\n if (Array.isArray(options) ||\n isTypedArray(options) ||\n isNDArrayLike(options) ||\n options instanceof ArrayBuffer) {\n data = options\n } else if (typeof options === 'number') {\n byteLength = options | 0\n } else if (options) {\n check$1.type(\n options, 'object',\n 'buffer arguments must be an object, a number or an array')\n\n if ('data' in options) {\n check$1(\n data === null ||\n Array.isArray(data) ||\n isTypedArray(data) ||\n isNDArrayLike(data),\n 'invalid data for buffer')\n data = options.data\n }\n\n if ('usage' in options) {\n check$1.parameter(options.usage, usageTypes, 'invalid buffer usage')\n usage = usageTypes[options.usage]\n }\n\n if ('type' in options) {\n check$1.parameter(options.type, glTypes, 'invalid buffer type')\n dtype = glTypes[options.type]\n }\n\n if ('dimension' in options) {\n check$1.type(options.dimension, 'number', 'invalid dimension')\n dimension = options.dimension | 0\n }\n\n if ('length' in options) {\n check$1.nni(byteLength, 'buffer length must be a nonnegative integer')\n byteLength = options.length | 0\n }\n }\n\n buffer.bind()\n if (!data) {\n // #475\n if (byteLength) gl.bufferData(buffer.type, byteLength, usage)\n buffer.dtype = dtype || GL_UNSIGNED_BYTE$3\n buffer.usage = usage\n buffer.dimension = dimension\n buffer.byteLength = byteLength\n } else {\n initBufferFromData(buffer, data, usage, dtype, dimension, persistent)\n }\n\n if (config.profile) {\n buffer.stats.size = buffer.byteLength * DTYPES_SIZES[buffer.dtype]\n }\n\n return reglBuffer\n }\n\n function setSubData (data, offset) {\n check$1(offset + data.byteLength <= buffer.byteLength,\n 'invalid buffer subdata call, buffer is too small. ' + ' Can\\'t write data of size ' + data.byteLength + ' starting from offset ' + offset + ' to a buffer of size ' + buffer.byteLength)\n\n gl.bufferSubData(buffer.type, offset, data)\n }\n\n function subdata (data, offset_) {\n var offset = (offset_ || 0) | 0\n var shape\n buffer.bind()\n if (isTypedArray(data) || data instanceof ArrayBuffer) {\n setSubData(data, offset)\n } else if (Array.isArray(data)) {\n if (data.length > 0) {\n if (typeof data[0] === 'number') {\n var converted = pool.allocType(buffer.dtype, data.length)\n copyArray(converted, data)\n setSubData(converted, offset)\n pool.freeType(converted)\n } else if (Array.isArray(data[0]) || isTypedArray(data[0])) {\n shape = arrayShape(data)\n var flatData = arrayFlatten(data, shape, buffer.dtype)\n setSubData(flatData, offset)\n pool.freeType(flatData)\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n } else if (isNDArrayLike(data)) {\n shape = data.shape\n var stride = data.stride\n\n var shapeX = 0\n var shapeY = 0\n var strideX = 0\n var strideY = 0\n if (shape.length === 1) {\n shapeX = shape[0]\n shapeY = 1\n strideX = stride[0]\n strideY = 0\n } else if (shape.length === 2) {\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n } else {\n check$1.raise('invalid shape')\n }\n var dtype = Array.isArray(data.data)\n ? buffer.dtype\n : typedArrayCode(data.data)\n\n var transposeData = pool.allocType(dtype, shapeX * shapeY)\n transpose(transposeData,\n data.data,\n shapeX, shapeY,\n strideX, strideY,\n data.offset)\n setSubData(transposeData, offset)\n pool.freeType(transposeData)\n } else {\n check$1.raise('invalid data for buffer subdata')\n }\n return reglBuffer\n }\n\n if (!deferInit) {\n reglBuffer(options)\n }\n\n reglBuffer._reglType = 'buffer'\n reglBuffer._buffer = buffer\n reglBuffer.subdata = subdata\n if (config.profile) {\n reglBuffer.stats = buffer.stats\n }\n reglBuffer.destroy = function () { destroy(buffer) }\n\n return reglBuffer\n }\n\n function restoreBuffers () {\n values(bufferSet).forEach(function (buffer) {\n buffer.buffer = gl.createBuffer()\n gl.bindBuffer(buffer.type, buffer.buffer)\n gl.bufferData(\n buffer.type, buffer.persistentData || buffer.byteLength, buffer.usage)\n })\n }\n\n if (config.profile) {\n stats.getTotalBufferSize = function () {\n var total = 0\n // TODO: Right now, the streams are not part of the total count.\n Object.keys(bufferSet).forEach(function (key) {\n total += bufferSet[key].stats.size\n })\n return total\n }\n }\n\n return {\n create: createBuffer,\n\n createStream: createStream,\n destroyStream: destroyStream,\n\n clear: function () {\n values(bufferSet).forEach(destroy)\n streamPool.forEach(destroy)\n },\n\n getBuffer: function (wrapper) {\n if (wrapper && wrapper._buffer instanceof REGLBuffer) {\n return wrapper._buffer\n }\n return null\n },\n\n restore: restoreBuffers,\n\n _initBuffer: initBufferFromData\n }\n}\n\nvar points = 0;\nvar point = 0;\nvar lines = 1;\nvar line = 1;\nvar triangles = 4;\nvar triangle = 4;\nvar primTypes = {\n\tpoints: points,\n\tpoint: point,\n\tlines: lines,\n\tline: line,\n\ttriangles: triangles,\n\ttriangle: triangle,\n\t\"line loop\": 2,\n\t\"line strip\": 3,\n\t\"triangle strip\": 5,\n\t\"triangle fan\": 6\n};\n\nvar GL_POINTS = 0\nvar GL_LINES = 1\nvar GL_TRIANGLES = 4\n\nvar GL_BYTE$2 = 5120\nvar GL_UNSIGNED_BYTE$4 = 5121\nvar GL_SHORT$2 = 5122\nvar GL_UNSIGNED_SHORT$2 = 5123\nvar GL_INT$2 = 5124\nvar GL_UNSIGNED_INT$2 = 5125\n\nvar GL_ELEMENT_ARRAY_BUFFER = 34963\n\nvar GL_STREAM_DRAW$1 = 0x88E0\nvar GL_STATIC_DRAW$1 = 0x88E4\n\nfunction wrapElementsState (gl, extensions, bufferState, stats) {\n var elementSet = {}\n var elementCount = 0\n\n var elementTypes = {\n 'uint8': GL_UNSIGNED_BYTE$4,\n 'uint16': GL_UNSIGNED_SHORT$2\n }\n\n if (extensions.oes_element_index_uint) {\n elementTypes.uint32 = GL_UNSIGNED_INT$2\n }\n\n function REGLElementBuffer (buffer) {\n this.id = elementCount++\n elementSet[this.id] = this\n this.buffer = buffer\n this.primType = GL_TRIANGLES\n this.vertCount = 0\n this.type = 0\n }\n\n REGLElementBuffer.prototype.bind = function () {\n this.buffer.bind()\n }\n\n var bufferPool = []\n\n function createElementStream (data) {\n var result = bufferPool.pop()\n if (!result) {\n result = new REGLElementBuffer(bufferState.create(\n null,\n GL_ELEMENT_ARRAY_BUFFER,\n true,\n false)._buffer)\n }\n initElements(result, data, GL_STREAM_DRAW$1, -1, -1, 0, 0)\n return result\n }\n\n function destroyElementStream (elements) {\n bufferPool.push(elements)\n }\n\n function initElements (\n elements,\n data,\n usage,\n prim,\n count,\n byteLength,\n type) {\n elements.buffer.bind()\n var dtype\n if (data) {\n var predictedType = type\n if (!type && (\n !isTypedArray(data) ||\n (isNDArrayLike(data) && !isTypedArray(data.data)))) {\n predictedType = extensions.oes_element_index_uint\n ? GL_UNSIGNED_INT$2\n : GL_UNSIGNED_SHORT$2\n }\n bufferState._initBuffer(\n elements.buffer,\n data,\n usage,\n predictedType,\n 3)\n } else {\n gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, byteLength, usage)\n elements.buffer.dtype = dtype || GL_UNSIGNED_BYTE$4\n elements.buffer.usage = usage\n elements.buffer.dimension = 3\n elements.buffer.byteLength = byteLength\n }\n\n dtype = type\n if (!type) {\n switch (elements.buffer.dtype) {\n case GL_UNSIGNED_BYTE$4:\n case GL_BYTE$2:\n dtype = GL_UNSIGNED_BYTE$4\n break\n\n case GL_UNSIGNED_SHORT$2:\n case GL_SHORT$2:\n dtype = GL_UNSIGNED_SHORT$2\n break\n\n case GL_UNSIGNED_INT$2:\n case GL_INT$2:\n dtype = GL_UNSIGNED_INT$2\n break\n\n default:\n check$1.raise('unsupported type for element array')\n }\n elements.buffer.dtype = dtype\n }\n elements.type = dtype\n\n // Check oes_element_index_uint extension\n check$1(\n dtype !== GL_UNSIGNED_INT$2 ||\n !!extensions.oes_element_index_uint,\n '32 bit element buffers not supported, enable oes_element_index_uint first')\n\n // try to guess default primitive type and arguments\n var vertCount = count\n if (vertCount < 0) {\n vertCount = elements.buffer.byteLength\n if (dtype === GL_UNSIGNED_SHORT$2) {\n vertCount >>= 1\n } else if (dtype === GL_UNSIGNED_INT$2) {\n vertCount >>= 2\n }\n }\n elements.vertCount = vertCount\n\n // try to guess primitive type from cell dimension\n var primType = prim\n if (prim < 0) {\n primType = GL_TRIANGLES\n var dimension = elements.buffer.dimension\n if (dimension === 1) primType = GL_POINTS\n if (dimension === 2) primType = GL_LINES\n if (dimension === 3) primType = GL_TRIANGLES\n }\n elements.primType = primType\n }\n\n function destroyElements (elements) {\n stats.elementsCount--\n\n check$1(elements.buffer !== null, 'must not double destroy elements')\n delete elementSet[elements.id]\n elements.buffer.destroy()\n elements.buffer = null\n }\n\n function createElements (options, persistent) {\n var buffer = bufferState.create(null, GL_ELEMENT_ARRAY_BUFFER, true)\n var elements = new REGLElementBuffer(buffer._buffer)\n stats.elementsCount++\n\n function reglElements (options) {\n if (!options) {\n buffer()\n elements.primType = GL_TRIANGLES\n elements.vertCount = 0\n elements.type = GL_UNSIGNED_BYTE$4\n } else if (typeof options === 'number') {\n buffer(options)\n elements.primType = GL_TRIANGLES\n elements.vertCount = options | 0\n elements.type = GL_UNSIGNED_BYTE$4\n } else {\n var data = null\n var usage = GL_STATIC_DRAW$1\n var primType = -1\n var vertCount = -1\n var byteLength = 0\n var dtype = 0\n if (Array.isArray(options) ||\n isTypedArray(options) ||\n isNDArrayLike(options)) {\n data = options\n } else {\n check$1.type(options, 'object', 'invalid arguments for elements')\n if ('data' in options) {\n data = options.data\n check$1(\n Array.isArray(data) ||\n isTypedArray(data) ||\n isNDArrayLike(data),\n 'invalid data for element buffer')\n }\n if ('usage' in options) {\n check$1.parameter(\n options.usage,\n usageTypes,\n 'invalid element buffer usage')\n usage = usageTypes[options.usage]\n }\n if ('primitive' in options) {\n check$1.parameter(\n options.primitive,\n primTypes,\n 'invalid element buffer primitive')\n primType = primTypes[options.primitive]\n }\n if ('count' in options) {\n check$1(\n typeof options.count === 'number' && options.count >= 0,\n 'invalid vertex count for elements')\n vertCount = options.count | 0\n }\n if ('type' in options) {\n check$1.parameter(\n options.type,\n elementTypes,\n 'invalid buffer type')\n dtype = elementTypes[options.type]\n }\n if ('length' in options) {\n byteLength = options.length | 0\n } else {\n byteLength = vertCount\n if (dtype === GL_UNSIGNED_SHORT$2 || dtype === GL_SHORT$2) {\n byteLength *= 2\n } else if (dtype === GL_UNSIGNED_INT$2 || dtype === GL_INT$2) {\n byteLength *= 4\n }\n }\n }\n initElements(\n elements,\n data,\n usage,\n primType,\n vertCount,\n byteLength,\n dtype)\n }\n\n return reglElements\n }\n\n reglElements(options)\n\n reglElements._reglType = 'elements'\n reglElements._elements = elements\n reglElements.subdata = function (data, offset) {\n buffer.subdata(data, offset)\n return reglElements\n }\n reglElements.destroy = function () {\n destroyElements(elements)\n }\n\n return reglElements\n }\n\n return {\n create: createElements,\n createStream: createElementStream,\n destroyStream: destroyElementStream,\n getElements: function (elements) {\n if (typeof elements === 'function' &&\n elements._elements instanceof REGLElementBuffer) {\n return elements._elements\n }\n return null\n },\n clear: function () {\n values(elementSet).forEach(destroyElements)\n }\n }\n}\n\nvar FLOAT = new Float32Array(1)\nvar INT = new Uint32Array(FLOAT.buffer)\n\nvar GL_UNSIGNED_SHORT$4 = 5123\n\nfunction convertToHalfFloat (array) {\n var ushorts = pool.allocType(GL_UNSIGNED_SHORT$4, array.length)\n\n for (var i = 0; i < array.length; ++i) {\n if (isNaN(array[i])) {\n ushorts[i] = 0xffff\n } else if (array[i] === Infinity) {\n ushorts[i] = 0x7c00\n } else if (array[i] === -Infinity) {\n ushorts[i] = 0xfc00\n } else {\n FLOAT[0] = array[i]\n var x = INT[0]\n\n var sgn = (x >>> 31) << 15\n var exp = ((x << 1) >>> 24) - 127\n var frac = (x >> 13) & ((1 << 10) - 1)\n\n if (exp < -24) {\n // round non-representable denormals to 0\n ushorts[i] = sgn\n } else if (exp < -14) {\n // handle denormals\n var s = -14 - exp\n ushorts[i] = sgn + ((frac + (1 << 10)) >> s)\n } else if (exp > 15) {\n // round overflow to +/- Infinity\n ushorts[i] = sgn + 0x7c00\n } else {\n // otherwise convert directly\n ushorts[i] = sgn + ((exp + 15) << 10) + frac\n }\n }\n }\n\n return ushorts\n}\n\nfunction isArrayLike (s) {\n return Array.isArray(s) || isTypedArray(s)\n}\n\nvar isPow2$1 = function (v) {\n return !(v & (v - 1)) && (!!v)\n}\n\nvar GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3\n\nvar GL_TEXTURE_2D$1 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP$1 = 0x8513\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 = 0x8515\n\nvar GL_RGBA$1 = 0x1908\nvar GL_ALPHA = 0x1906\nvar GL_RGB = 0x1907\nvar GL_LUMINANCE = 0x1909\nvar GL_LUMINANCE_ALPHA = 0x190A\n\nvar GL_RGBA4 = 0x8056\nvar GL_RGB5_A1 = 0x8057\nvar GL_RGB565 = 0x8D62\n\nvar GL_UNSIGNED_SHORT_4_4_4_4$1 = 0x8033\nvar GL_UNSIGNED_SHORT_5_5_5_1$1 = 0x8034\nvar GL_UNSIGNED_SHORT_5_6_5$1 = 0x8363\nvar GL_UNSIGNED_INT_24_8_WEBGL$1 = 0x84FA\n\nvar GL_DEPTH_COMPONENT = 0x1902\nvar GL_DEPTH_STENCIL = 0x84F9\n\nvar GL_SRGB_EXT = 0x8C40\nvar GL_SRGB_ALPHA_EXT = 0x8C42\n\nvar GL_HALF_FLOAT_OES$1 = 0x8D61\n\nvar GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0\nvar GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1\nvar GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2\nvar GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3\n\nvar GL_COMPRESSED_RGB_ATC_WEBGL = 0x8C92\nvar GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93\nvar GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE\n\nvar GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00\nvar GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01\nvar GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02\nvar GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03\n\nvar GL_COMPRESSED_RGB_ETC1_WEBGL = 0x8D64\n\nvar GL_UNSIGNED_BYTE$5 = 0x1401\nvar GL_UNSIGNED_SHORT$3 = 0x1403\nvar GL_UNSIGNED_INT$3 = 0x1405\nvar GL_FLOAT$4 = 0x1406\n\nvar GL_TEXTURE_WRAP_S = 0x2802\nvar GL_TEXTURE_WRAP_T = 0x2803\n\nvar GL_REPEAT = 0x2901\nvar GL_CLAMP_TO_EDGE$1 = 0x812F\nvar GL_MIRRORED_REPEAT = 0x8370\n\nvar GL_TEXTURE_MAG_FILTER = 0x2800\nvar GL_TEXTURE_MIN_FILTER = 0x2801\n\nvar GL_NEAREST$1 = 0x2600\nvar GL_LINEAR = 0x2601\nvar GL_NEAREST_MIPMAP_NEAREST$1 = 0x2700\nvar GL_LINEAR_MIPMAP_NEAREST$1 = 0x2701\nvar GL_NEAREST_MIPMAP_LINEAR$1 = 0x2702\nvar GL_LINEAR_MIPMAP_LINEAR$1 = 0x2703\n\nvar GL_GENERATE_MIPMAP_HINT = 0x8192\nvar GL_DONT_CARE = 0x1100\nvar GL_FASTEST = 0x1101\nvar GL_NICEST = 0x1102\n\nvar GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE\n\nvar GL_UNPACK_ALIGNMENT = 0x0CF5\nvar GL_UNPACK_FLIP_Y_WEBGL = 0x9240\nvar GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241\nvar GL_UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243\n\nvar GL_BROWSER_DEFAULT_WEBGL = 0x9244\n\nvar GL_TEXTURE0$1 = 0x84C0\n\nvar MIPMAP_FILTERS = [\n GL_NEAREST_MIPMAP_NEAREST$1,\n GL_NEAREST_MIPMAP_LINEAR$1,\n GL_LINEAR_MIPMAP_NEAREST$1,\n GL_LINEAR_MIPMAP_LINEAR$1\n]\n\nvar CHANNELS_FORMAT = [\n 0,\n GL_LUMINANCE,\n GL_LUMINANCE_ALPHA,\n GL_RGB,\n GL_RGBA$1\n]\n\nvar FORMAT_CHANNELS = {}\nFORMAT_CHANNELS[GL_LUMINANCE] =\nFORMAT_CHANNELS[GL_ALPHA] =\nFORMAT_CHANNELS[GL_DEPTH_COMPONENT] = 1\nFORMAT_CHANNELS[GL_DEPTH_STENCIL] =\nFORMAT_CHANNELS[GL_LUMINANCE_ALPHA] = 2\nFORMAT_CHANNELS[GL_RGB] =\nFORMAT_CHANNELS[GL_SRGB_EXT] = 3\nFORMAT_CHANNELS[GL_RGBA$1] =\nFORMAT_CHANNELS[GL_SRGB_ALPHA_EXT] = 4\n\nfunction objectName (str) {\n return '[object ' + str + ']'\n}\n\nvar CANVAS_CLASS = objectName('HTMLCanvasElement')\nvar OFFSCREENCANVAS_CLASS = objectName('OffscreenCanvas')\nvar CONTEXT2D_CLASS = objectName('CanvasRenderingContext2D')\nvar BITMAP_CLASS = objectName('ImageBitmap')\nvar IMAGE_CLASS = objectName('HTMLImageElement')\nvar VIDEO_CLASS = objectName('HTMLVideoElement')\n\nvar PIXEL_CLASSES = Object.keys(arrayTypes).concat([\n CANVAS_CLASS,\n OFFSCREENCANVAS_CLASS,\n CONTEXT2D_CLASS,\n BITMAP_CLASS,\n IMAGE_CLASS,\n VIDEO_CLASS\n])\n\n// for every texture type, store\n// the size in bytes.\nvar TYPE_SIZES = []\nTYPE_SIZES[GL_UNSIGNED_BYTE$5] = 1\nTYPE_SIZES[GL_FLOAT$4] = 4\nTYPE_SIZES[GL_HALF_FLOAT_OES$1] = 2\n\nTYPE_SIZES[GL_UNSIGNED_SHORT$3] = 2\nTYPE_SIZES[GL_UNSIGNED_INT$3] = 4\n\nvar FORMAT_SIZES_SPECIAL = []\nFORMAT_SIZES_SPECIAL[GL_RGBA4] = 2\nFORMAT_SIZES_SPECIAL[GL_RGB5_A1] = 2\nFORMAT_SIZES_SPECIAL[GL_RGB565] = 2\nFORMAT_SIZES_SPECIAL[GL_DEPTH_STENCIL] = 4\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_S3TC_DXT1_EXT] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT1_EXT] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT3_EXT] = 1\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT5_EXT] = 1\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_ATC_WEBGL] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL] = 1\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL] = 1\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG] = 0.25\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG] = 0.25\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_ETC1_WEBGL] = 0.5\n\nfunction isNumericArray (arr) {\n return (\n Array.isArray(arr) &&\n (arr.length === 0 ||\n typeof arr[0] === 'number'))\n}\n\nfunction isRectArray (arr) {\n if (!Array.isArray(arr)) {\n return false\n }\n var width = arr.length\n if (width === 0 || !isArrayLike(arr[0])) {\n return false\n }\n return true\n}\n\nfunction classString (x) {\n return Object.prototype.toString.call(x)\n}\n\nfunction isCanvasElement (object) {\n return classString(object) === CANVAS_CLASS\n}\n\nfunction isOffscreenCanvas (object) {\n return classString(object) === OFFSCREENCANVAS_CLASS\n}\n\nfunction isContext2D (object) {\n return classString(object) === CONTEXT2D_CLASS\n}\n\nfunction isBitmap (object) {\n return classString(object) === BITMAP_CLASS\n}\n\nfunction isImageElement (object) {\n return classString(object) === IMAGE_CLASS\n}\n\nfunction isVideoElement (object) {\n return classString(object) === VIDEO_CLASS\n}\n\nfunction isPixelData (object) {\n if (!object) {\n return false\n }\n var className = classString(object)\n if (PIXEL_CLASSES.indexOf(className) >= 0) {\n return true\n }\n return (\n isNumericArray(object) ||\n isRectArray(object) ||\n isNDArrayLike(object))\n}\n\nfunction typedArrayCode$1 (data) {\n return arrayTypes[Object.prototype.toString.call(data)] | 0\n}\n\nfunction convertData (result, data) {\n var n = data.length\n switch (result.type) {\n case GL_UNSIGNED_BYTE$5:\n case GL_UNSIGNED_SHORT$3:\n case GL_UNSIGNED_INT$3:\n case GL_FLOAT$4:\n var converted = pool.allocType(result.type, n)\n converted.set(data)\n result.data = converted\n break\n\n case GL_HALF_FLOAT_OES$1:\n result.data = convertToHalfFloat(data)\n break\n\n default:\n check$1.raise('unsupported texture type, must specify a typed array')\n }\n}\n\nfunction preConvert (image, n) {\n return pool.allocType(\n image.type === GL_HALF_FLOAT_OES$1\n ? GL_FLOAT$4\n : image.type, n)\n}\n\nfunction postConvert (image, data) {\n if (image.type === GL_HALF_FLOAT_OES$1) {\n image.data = convertToHalfFloat(data)\n pool.freeType(data)\n } else {\n image.data = data\n }\n}\n\nfunction transposeData (image, array, strideX, strideY, strideC, offset) {\n var w = image.width\n var h = image.height\n var c = image.channels\n var n = w * h * c\n var data = preConvert(image, n)\n\n var p = 0\n for (var i = 0; i < h; ++i) {\n for (var j = 0; j < w; ++j) {\n for (var k = 0; k < c; ++k) {\n data[p++] = array[strideX * j + strideY * i + strideC * k + offset]\n }\n }\n }\n\n postConvert(image, data)\n}\n\nfunction getTextureSize (format, type, width, height, isMipmap, isCube) {\n var s\n if (typeof FORMAT_SIZES_SPECIAL[format] !== 'undefined') {\n // we have a special array for dealing with weird color formats such as RGB5A1\n s = FORMAT_SIZES_SPECIAL[format]\n } else {\n s = FORMAT_CHANNELS[format] * TYPE_SIZES[type]\n }\n\n if (isCube) {\n s *= 6\n }\n\n if (isMipmap) {\n // compute the total size of all the mipmaps.\n var total = 0\n\n var w = width\n while (w >= 1) {\n // we can only use mipmaps on a square image,\n // so we can simply use the width and ignore the height:\n total += s * w * w\n w /= 2\n }\n return total\n } else {\n return s * width * height\n }\n}\n\nfunction createTextureSet (\n gl, extensions, limits, reglPoll, contextState, stats, config) {\n // -------------------------------------------------------\n // Initialize constants and parameter tables here\n // -------------------------------------------------------\n var mipmapHint = {\n \"don't care\": GL_DONT_CARE,\n 'dont care': GL_DONT_CARE,\n 'nice': GL_NICEST,\n 'fast': GL_FASTEST\n }\n\n var wrapModes = {\n 'repeat': GL_REPEAT,\n 'clamp': GL_CLAMP_TO_EDGE$1,\n 'mirror': GL_MIRRORED_REPEAT\n }\n\n var magFilters = {\n 'nearest': GL_NEAREST$1,\n 'linear': GL_LINEAR\n }\n\n var minFilters = extend({\n 'mipmap': GL_LINEAR_MIPMAP_LINEAR$1,\n 'nearest mipmap nearest': GL_NEAREST_MIPMAP_NEAREST$1,\n 'linear mipmap nearest': GL_LINEAR_MIPMAP_NEAREST$1,\n 'nearest mipmap linear': GL_NEAREST_MIPMAP_LINEAR$1,\n 'linear mipmap linear': GL_LINEAR_MIPMAP_LINEAR$1\n }, magFilters)\n\n var colorSpace = {\n 'none': 0,\n 'browser': GL_BROWSER_DEFAULT_WEBGL\n }\n\n var textureTypes = {\n 'uint8': GL_UNSIGNED_BYTE$5,\n 'rgba4': GL_UNSIGNED_SHORT_4_4_4_4$1,\n 'rgb565': GL_UNSIGNED_SHORT_5_6_5$1,\n 'rgb5 a1': GL_UNSIGNED_SHORT_5_5_5_1$1\n }\n\n var textureFormats = {\n 'alpha': GL_ALPHA,\n 'luminance': GL_LUMINANCE,\n 'luminance alpha': GL_LUMINANCE_ALPHA,\n 'rgb': GL_RGB,\n 'rgba': GL_RGBA$1,\n 'rgba4': GL_RGBA4,\n 'rgb5 a1': GL_RGB5_A1,\n 'rgb565': GL_RGB565\n }\n\n var compressedTextureFormats = {}\n\n if (extensions.ext_srgb) {\n textureFormats.srgb = GL_SRGB_EXT\n textureFormats.srgba = GL_SRGB_ALPHA_EXT\n }\n\n if (extensions.oes_texture_float) {\n textureTypes.float32 = textureTypes.float = GL_FLOAT$4\n }\n\n if (extensions.oes_texture_half_float) {\n textureTypes['float16'] = textureTypes['half float'] = GL_HALF_FLOAT_OES$1\n }\n\n if (extensions.webgl_depth_texture) {\n extend(textureFormats, {\n 'depth': GL_DEPTH_COMPONENT,\n 'depth stencil': GL_DEPTH_STENCIL\n })\n\n extend(textureTypes, {\n 'uint16': GL_UNSIGNED_SHORT$3,\n 'uint32': GL_UNSIGNED_INT$3,\n 'depth stencil': GL_UNSIGNED_INT_24_8_WEBGL$1\n })\n }\n\n if (extensions.webgl_compressed_texture_s3tc) {\n extend(compressedTextureFormats, {\n 'rgb s3tc dxt1': GL_COMPRESSED_RGB_S3TC_DXT1_EXT,\n 'rgba s3tc dxt1': GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,\n 'rgba s3tc dxt3': GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,\n 'rgba s3tc dxt5': GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\n })\n }\n\n if (extensions.webgl_compressed_texture_atc) {\n extend(compressedTextureFormats, {\n 'rgb atc': GL_COMPRESSED_RGB_ATC_WEBGL,\n 'rgba atc explicit alpha': GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,\n 'rgba atc interpolated alpha': GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL\n })\n }\n\n if (extensions.webgl_compressed_texture_pvrtc) {\n extend(compressedTextureFormats, {\n 'rgb pvrtc 4bppv1': GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,\n 'rgb pvrtc 2bppv1': GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,\n 'rgba pvrtc 4bppv1': GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,\n 'rgba pvrtc 2bppv1': GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\n })\n }\n\n if (extensions.webgl_compressed_texture_etc1) {\n compressedTextureFormats['rgb etc1'] = GL_COMPRESSED_RGB_ETC1_WEBGL\n }\n\n // Copy over all texture formats\n var supportedCompressedFormats = Array.prototype.slice.call(\n gl.getParameter(GL_COMPRESSED_TEXTURE_FORMATS))\n Object.keys(compressedTextureFormats).forEach(function (name) {\n var format = compressedTextureFormats[name]\n if (supportedCompressedFormats.indexOf(format) >= 0) {\n textureFormats[name] = format\n }\n })\n\n var supportedFormats = Object.keys(textureFormats)\n limits.textureFormats = supportedFormats\n\n // associate with every format string its\n // corresponding GL-value.\n var textureFormatsInvert = []\n Object.keys(textureFormats).forEach(function (key) {\n var val = textureFormats[key]\n textureFormatsInvert[val] = key\n })\n\n // associate with every type string its\n // corresponding GL-value.\n var textureTypesInvert = []\n Object.keys(textureTypes).forEach(function (key) {\n var val = textureTypes[key]\n textureTypesInvert[val] = key\n })\n\n var magFiltersInvert = []\n Object.keys(magFilters).forEach(function (key) {\n var val = magFilters[key]\n magFiltersInvert[val] = key\n })\n\n var minFiltersInvert = []\n Object.keys(minFilters).forEach(function (key) {\n var val = minFilters[key]\n minFiltersInvert[val] = key\n })\n\n var wrapModesInvert = []\n Object.keys(wrapModes).forEach(function (key) {\n var val = wrapModes[key]\n wrapModesInvert[val] = key\n })\n\n // colorFormats[] gives the format (channels) associated to an\n // internalformat\n var colorFormats = supportedFormats.reduce(function (color, key) {\n var glenum = textureFormats[key]\n if (glenum === GL_LUMINANCE ||\n glenum === GL_ALPHA ||\n glenum === GL_LUMINANCE ||\n glenum === GL_LUMINANCE_ALPHA ||\n glenum === GL_DEPTH_COMPONENT ||\n glenum === GL_DEPTH_STENCIL ||\n (extensions.ext_srgb &&\n (glenum === GL_SRGB_EXT ||\n glenum === GL_SRGB_ALPHA_EXT))) {\n color[glenum] = glenum\n } else if (glenum === GL_RGB5_A1 || key.indexOf('rgba') >= 0) {\n color[glenum] = GL_RGBA$1\n } else {\n color[glenum] = GL_RGB\n }\n return color\n }, {})\n\n function TexFlags () {\n // format info\n this.internalformat = GL_RGBA$1\n this.format = GL_RGBA$1\n this.type = GL_UNSIGNED_BYTE$5\n this.compressed = false\n\n // pixel storage\n this.premultiplyAlpha = false\n this.flipY = false\n this.unpackAlignment = 1\n this.colorSpace = GL_BROWSER_DEFAULT_WEBGL\n\n // shape info\n this.width = 0\n this.height = 0\n this.channels = 0\n }\n\n function copyFlags (result, other) {\n result.internalformat = other.internalformat\n result.format = other.format\n result.type = other.type\n result.compressed = other.compressed\n\n result.premultiplyAlpha = other.premultiplyAlpha\n result.flipY = other.flipY\n result.unpackAlignment = other.unpackAlignment\n result.colorSpace = other.colorSpace\n\n result.width = other.width\n result.height = other.height\n result.channels = other.channels\n }\n\n function parseFlags (flags, options) {\n if (typeof options !== 'object' || !options) {\n return\n }\n\n if ('premultiplyAlpha' in options) {\n check$1.type(options.premultiplyAlpha, 'boolean',\n 'invalid premultiplyAlpha')\n flags.premultiplyAlpha = options.premultiplyAlpha\n }\n\n if ('flipY' in options) {\n check$1.type(options.flipY, 'boolean',\n 'invalid texture flip')\n flags.flipY = options.flipY\n }\n\n if ('alignment' in options) {\n check$1.oneOf(options.alignment, [1, 2, 4, 8],\n 'invalid texture unpack alignment')\n flags.unpackAlignment = options.alignment\n }\n\n if ('colorSpace' in options) {\n check$1.parameter(options.colorSpace, colorSpace,\n 'invalid colorSpace')\n flags.colorSpace = colorSpace[options.colorSpace]\n }\n\n if ('type' in options) {\n var type = options.type\n check$1(extensions.oes_texture_float ||\n !(type === 'float' || type === 'float32'),\n 'you must enable the OES_texture_float extension in order to use floating point textures.')\n check$1(extensions.oes_texture_half_float ||\n !(type === 'half float' || type === 'float16'),\n 'you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures.')\n check$1(extensions.webgl_depth_texture ||\n !(type === 'uint16' || type === 'uint32' || type === 'depth stencil'),\n 'you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures.')\n check$1.parameter(type, textureTypes,\n 'invalid texture type')\n flags.type = textureTypes[type]\n }\n\n var w = flags.width\n var h = flags.height\n var c = flags.channels\n var hasChannels = false\n if ('shape' in options) {\n check$1(Array.isArray(options.shape) && options.shape.length >= 2,\n 'shape must be an array')\n w = options.shape[0]\n h = options.shape[1]\n if (options.shape.length === 3) {\n c = options.shape[2]\n check$1(c > 0 && c <= 4, 'invalid number of channels')\n hasChannels = true\n }\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid width')\n check$1(h >= 0 && h <= limits.maxTextureSize, 'invalid height')\n } else {\n if ('radius' in options) {\n w = h = options.radius\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid radius')\n }\n if ('width' in options) {\n w = options.width\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid width')\n }\n if ('height' in options) {\n h = options.height\n check$1(h >= 0 && h <= limits.maxTextureSize, 'invalid height')\n }\n if ('channels' in options) {\n c = options.channels\n check$1(c > 0 && c <= 4, 'invalid number of channels')\n hasChannels = true\n }\n }\n flags.width = w | 0\n flags.height = h | 0\n flags.channels = c | 0\n\n var hasFormat = false\n if ('format' in options) {\n var formatStr = options.format\n check$1(extensions.webgl_depth_texture ||\n !(formatStr === 'depth' || formatStr === 'depth stencil'),\n 'you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures.')\n check$1.parameter(formatStr, textureFormats,\n 'invalid texture format')\n var internalformat = flags.internalformat = textureFormats[formatStr]\n flags.format = colorFormats[internalformat]\n if (formatStr in textureTypes) {\n if (!('type' in options)) {\n flags.type = textureTypes[formatStr]\n }\n }\n if (formatStr in compressedTextureFormats) {\n flags.compressed = true\n }\n hasFormat = true\n }\n\n // Reconcile channels and format\n if (!hasChannels && hasFormat) {\n flags.channels = FORMAT_CHANNELS[flags.format]\n } else if (hasChannels && !hasFormat) {\n if (flags.channels !== CHANNELS_FORMAT[flags.format]) {\n flags.format = flags.internalformat = CHANNELS_FORMAT[flags.channels]\n }\n } else if (hasFormat && hasChannels) {\n check$1(\n flags.channels === FORMAT_CHANNELS[flags.format],\n 'number of channels inconsistent with specified format')\n }\n }\n\n function setFlags (flags) {\n gl.pixelStorei(GL_UNPACK_FLIP_Y_WEBGL, flags.flipY)\n gl.pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL, flags.premultiplyAlpha)\n gl.pixelStorei(GL_UNPACK_COLORSPACE_CONVERSION_WEBGL, flags.colorSpace)\n gl.pixelStorei(GL_UNPACK_ALIGNMENT, flags.unpackAlignment)\n }\n\n // -------------------------------------------------------\n // Tex image data\n // -------------------------------------------------------\n function TexImage () {\n TexFlags.call(this)\n\n this.xOffset = 0\n this.yOffset = 0\n\n // data\n this.data = null\n this.needsFree = false\n\n // html element\n this.element = null\n\n // copyTexImage info\n this.needsCopy = false\n }\n\n function parseImage (image, options) {\n var data = null\n if (isPixelData(options)) {\n data = options\n } else if (options) {\n check$1.type(options, 'object', 'invalid pixel data type')\n parseFlags(image, options)\n if ('x' in options) {\n image.xOffset = options.x | 0\n }\n if ('y' in options) {\n image.yOffset = options.y | 0\n }\n if (isPixelData(options.data)) {\n data = options.data\n }\n }\n\n check$1(\n !image.compressed ||\n data instanceof Uint8Array,\n 'compressed texture data must be stored in a uint8array')\n\n if (options.copy) {\n check$1(!data, 'can not specify copy and data field for the same texture')\n var viewW = contextState.viewportWidth\n var viewH = contextState.viewportHeight\n image.width = image.width || (viewW - image.xOffset)\n image.height = image.height || (viewH - image.yOffset)\n image.needsCopy = true\n check$1(image.xOffset >= 0 && image.xOffset < viewW &&\n image.yOffset >= 0 && image.yOffset < viewH &&\n image.width > 0 && image.width <= viewW &&\n image.height > 0 && image.height <= viewH,\n 'copy texture read out of bounds')\n } else if (!data) {\n image.width = image.width || 1\n image.height = image.height || 1\n image.channels = image.channels || 4\n } else if (isTypedArray(data)) {\n image.channels = image.channels || 4\n image.data = data\n if (!('type' in options) && image.type === GL_UNSIGNED_BYTE$5) {\n image.type = typedArrayCode$1(data)\n }\n } else if (isNumericArray(data)) {\n image.channels = image.channels || 4\n convertData(image, data)\n image.alignment = 1\n image.needsFree = true\n } else if (isNDArrayLike(data)) {\n var array = data.data\n if (!Array.isArray(array) && image.type === GL_UNSIGNED_BYTE$5) {\n image.type = typedArrayCode$1(array)\n }\n var shape = data.shape\n var stride = data.stride\n var shapeX, shapeY, shapeC, strideX, strideY, strideC\n if (shape.length === 3) {\n shapeC = shape[2]\n strideC = stride[2]\n } else {\n check$1(shape.length === 2, 'invalid ndarray pixel data, must be 2 or 3D')\n shapeC = 1\n strideC = 1\n }\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n image.alignment = 1\n image.width = shapeX\n image.height = shapeY\n image.channels = shapeC\n image.format = image.internalformat = CHANNELS_FORMAT[shapeC]\n image.needsFree = true\n transposeData(image, array, strideX, strideY, strideC, data.offset)\n } else if (isCanvasElement(data) || isOffscreenCanvas(data) || isContext2D(data)) {\n if (isCanvasElement(data) || isOffscreenCanvas(data)) {\n image.element = data\n } else {\n image.element = data.canvas\n }\n image.width = image.element.width\n image.height = image.element.height\n image.channels = 4\n } else if (isBitmap(data)) {\n image.element = data\n image.width = data.width\n image.height = data.height\n image.channels = 4\n } else if (isImageElement(data)) {\n image.element = data\n image.width = data.naturalWidth\n image.height = data.naturalHeight\n image.channels = 4\n } else if (isVideoElement(data)) {\n image.element = data\n image.width = data.videoWidth\n image.height = data.videoHeight\n image.channels = 4\n } else if (isRectArray(data)) {\n var w = image.width || data[0].length\n var h = image.height || data.length\n var c = image.channels\n if (isArrayLike(data[0][0])) {\n c = c || data[0][0].length\n } else {\n c = c || 1\n }\n var arrayShape = flattenUtils.shape(data)\n var n = 1\n for (var dd = 0; dd < arrayShape.length; ++dd) {\n n *= arrayShape[dd]\n }\n var allocData = preConvert(image, n)\n flattenUtils.flatten(data, arrayShape, '', allocData)\n postConvert(image, allocData)\n image.alignment = 1\n image.width = w\n image.height = h\n image.channels = c\n image.format = image.internalformat = CHANNELS_FORMAT[c]\n image.needsFree = true\n }\n\n if (image.type === GL_FLOAT$4) {\n check$1(limits.extensions.indexOf('oes_texture_float') >= 0,\n 'oes_texture_float extension not enabled')\n } else if (image.type === GL_HALF_FLOAT_OES$1) {\n check$1(limits.extensions.indexOf('oes_texture_half_float') >= 0,\n 'oes_texture_half_float extension not enabled')\n }\n\n // do compressed texture validation here.\n }\n\n function setImage (info, target, miplevel) {\n var element = info.element\n var data = info.data\n var internalformat = info.internalformat\n var format = info.format\n var type = info.type\n var width = info.width\n var height = info.height\n\n setFlags(info)\n\n if (element) {\n gl.texImage2D(target, miplevel, format, format, type, element)\n } else if (info.compressed) {\n gl.compressedTexImage2D(target, miplevel, internalformat, width, height, 0, data)\n } else if (info.needsCopy) {\n reglPoll()\n gl.copyTexImage2D(\n target, miplevel, format, info.xOffset, info.yOffset, width, height, 0)\n } else {\n gl.texImage2D(target, miplevel, format, width, height, 0, format, type, data || null)\n }\n }\n\n function setSubImage (info, target, x, y, miplevel) {\n var element = info.element\n var data = info.data\n var internalformat = info.internalformat\n var format = info.format\n var type = info.type\n var width = info.width\n var height = info.height\n\n setFlags(info)\n\n if (element) {\n gl.texSubImage2D(\n target, miplevel, x, y, format, type, element)\n } else if (info.compressed) {\n gl.compressedTexSubImage2D(\n target, miplevel, x, y, internalformat, width, height, data)\n } else if (info.needsCopy) {\n reglPoll()\n gl.copyTexSubImage2D(\n target, miplevel, x, y, info.xOffset, info.yOffset, width, height)\n } else {\n gl.texSubImage2D(\n target, miplevel, x, y, width, height, format, type, data)\n }\n }\n\n // texImage pool\n var imagePool = []\n\n function allocImage () {\n return imagePool.pop() || new TexImage()\n }\n\n function freeImage (image) {\n if (image.needsFree) {\n pool.freeType(image.data)\n }\n TexImage.call(image)\n imagePool.push(image)\n }\n\n // -------------------------------------------------------\n // Mip map\n // -------------------------------------------------------\n function MipMap () {\n TexFlags.call(this)\n\n this.genMipmaps = false\n this.mipmapHint = GL_DONT_CARE\n this.mipmask = 0\n this.images = Array(16)\n }\n\n function parseMipMapFromShape (mipmap, width, height) {\n var img = mipmap.images[0] = allocImage()\n mipmap.mipmask = 1\n img.width = mipmap.width = width\n img.height = mipmap.height = height\n img.channels = mipmap.channels = 4\n }\n\n function parseMipMapFromObject (mipmap, options) {\n var imgData = null\n if (isPixelData(options)) {\n imgData = mipmap.images[0] = allocImage()\n copyFlags(imgData, mipmap)\n parseImage(imgData, options)\n mipmap.mipmask = 1\n } else {\n parseFlags(mipmap, options)\n if (Array.isArray(options.mipmap)) {\n var mipData = options.mipmap\n for (var i = 0; i < mipData.length; ++i) {\n imgData = mipmap.images[i] = allocImage()\n copyFlags(imgData, mipmap)\n imgData.width >>= i\n imgData.height >>= i\n parseImage(imgData, mipData[i])\n mipmap.mipmask |= (1 << i)\n }\n } else {\n imgData = mipmap.images[0] = allocImage()\n copyFlags(imgData, mipmap)\n parseImage(imgData, options)\n mipmap.mipmask = 1\n }\n }\n copyFlags(mipmap, mipmap.images[0])\n\n // For textures of the compressed format WEBGL_compressed_texture_s3tc\n // we must have that\n //\n // \"When level equals zero width and height must be a multiple of 4.\n // When level is greater than 0 width and height must be 0, 1, 2 or a multiple of 4. \"\n //\n // but we do not yet support having multiple mipmap levels for compressed textures,\n // so we only test for level zero.\n\n if (\n mipmap.compressed &&\n (\n mipmap.internalformat === GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\n )\n ) {\n check$1(mipmap.width % 4 === 0 && mipmap.height % 4 === 0,\n 'for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4')\n }\n }\n\n function setMipMap (mipmap, target) {\n var images = mipmap.images\n for (var i = 0; i < images.length; ++i) {\n if (!images[i]) {\n return\n }\n setImage(images[i], target, i)\n }\n }\n\n var mipPool = []\n\n function allocMipMap () {\n var result = mipPool.pop() || new MipMap()\n TexFlags.call(result)\n result.mipmask = 0\n for (var i = 0; i < 16; ++i) {\n result.images[i] = null\n }\n return result\n }\n\n function freeMipMap (mipmap) {\n var images = mipmap.images\n for (var i = 0; i < images.length; ++i) {\n if (images[i]) {\n freeImage(images[i])\n }\n images[i] = null\n }\n mipPool.push(mipmap)\n }\n\n // -------------------------------------------------------\n // Tex info\n // -------------------------------------------------------\n function TexInfo () {\n this.minFilter = GL_NEAREST$1\n this.magFilter = GL_NEAREST$1\n\n this.wrapS = GL_CLAMP_TO_EDGE$1\n this.wrapT = GL_CLAMP_TO_EDGE$1\n\n this.anisotropic = 1\n\n this.genMipmaps = false\n this.mipmapHint = GL_DONT_CARE\n }\n\n function parseTexInfo (info, options) {\n if ('min' in options) {\n var minFilter = options.min\n check$1.parameter(minFilter, minFilters)\n info.minFilter = minFilters[minFilter]\n if (MIPMAP_FILTERS.indexOf(info.minFilter) >= 0 && !('faces' in options)) {\n info.genMipmaps = true\n }\n }\n\n if ('mag' in options) {\n var magFilter = options.mag\n check$1.parameter(magFilter, magFilters)\n info.magFilter = magFilters[magFilter]\n }\n\n var wrapS = info.wrapS\n var wrapT = info.wrapT\n if ('wrap' in options) {\n var wrap = options.wrap\n if (typeof wrap === 'string') {\n check$1.parameter(wrap, wrapModes)\n wrapS = wrapT = wrapModes[wrap]\n } else if (Array.isArray(wrap)) {\n check$1.parameter(wrap[0], wrapModes)\n check$1.parameter(wrap[1], wrapModes)\n wrapS = wrapModes[wrap[0]]\n wrapT = wrapModes[wrap[1]]\n }\n } else {\n if ('wrapS' in options) {\n var optWrapS = options.wrapS\n check$1.parameter(optWrapS, wrapModes)\n wrapS = wrapModes[optWrapS]\n }\n if ('wrapT' in options) {\n var optWrapT = options.wrapT\n check$1.parameter(optWrapT, wrapModes)\n wrapT = wrapModes[optWrapT]\n }\n }\n info.wrapS = wrapS\n info.wrapT = wrapT\n\n if ('anisotropic' in options) {\n var anisotropic = options.anisotropic\n check$1(typeof anisotropic === 'number' &&\n anisotropic >= 1 && anisotropic <= limits.maxAnisotropic,\n 'aniso samples must be between 1 and ')\n info.anisotropic = options.anisotropic\n }\n\n if ('mipmap' in options) {\n var hasMipMap = false\n switch (typeof options.mipmap) {\n case 'string':\n check$1.parameter(options.mipmap, mipmapHint,\n 'invalid mipmap hint')\n info.mipmapHint = mipmapHint[options.mipmap]\n info.genMipmaps = true\n hasMipMap = true\n break\n\n case 'boolean':\n hasMipMap = info.genMipmaps = options.mipmap\n break\n\n case 'object':\n check$1(Array.isArray(options.mipmap), 'invalid mipmap type')\n info.genMipmaps = false\n hasMipMap = true\n break\n\n default:\n check$1.raise('invalid mipmap type')\n }\n if (hasMipMap && !('min' in options)) {\n info.minFilter = GL_NEAREST_MIPMAP_NEAREST$1\n }\n }\n }\n\n function setTexInfo (info, target) {\n gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, info.minFilter)\n gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, info.magFilter)\n gl.texParameteri(target, GL_TEXTURE_WRAP_S, info.wrapS)\n gl.texParameteri(target, GL_TEXTURE_WRAP_T, info.wrapT)\n if (extensions.ext_texture_filter_anisotropic) {\n gl.texParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, info.anisotropic)\n }\n if (info.genMipmaps) {\n gl.hint(GL_GENERATE_MIPMAP_HINT, info.mipmapHint)\n gl.generateMipmap(target)\n }\n }\n\n // -------------------------------------------------------\n // Full texture object\n // -------------------------------------------------------\n var textureCount = 0\n var textureSet = {}\n var numTexUnits = limits.maxTextureUnits\n var textureUnits = Array(numTexUnits).map(function () {\n return null\n })\n\n function REGLTexture (target) {\n TexFlags.call(this)\n this.mipmask = 0\n this.internalformat = GL_RGBA$1\n\n this.id = textureCount++\n\n this.refCount = 1\n\n this.target = target\n this.texture = gl.createTexture()\n\n this.unit = -1\n this.bindCount = 0\n\n this.texInfo = new TexInfo()\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n function tempBind (texture) {\n gl.activeTexture(GL_TEXTURE0$1)\n gl.bindTexture(texture.target, texture.texture)\n }\n\n function tempRestore () {\n var prev = textureUnits[0]\n if (prev) {\n gl.bindTexture(prev.target, prev.texture)\n } else {\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n }\n }\n\n function destroy (texture) {\n var handle = texture.texture\n check$1(handle, 'must not double destroy texture')\n var unit = texture.unit\n var target = texture.target\n if (unit >= 0) {\n gl.activeTexture(GL_TEXTURE0$1 + unit)\n gl.bindTexture(target, null)\n textureUnits[unit] = null\n }\n gl.deleteTexture(handle)\n texture.texture = null\n texture.params = null\n texture.pixels = null\n texture.refCount = 0\n delete textureSet[texture.id]\n stats.textureCount--\n }\n\n extend(REGLTexture.prototype, {\n bind: function () {\n var texture = this\n texture.bindCount += 1\n var unit = texture.unit\n if (unit < 0) {\n for (var i = 0; i < numTexUnits; ++i) {\n var other = textureUnits[i]\n if (other) {\n if (other.bindCount > 0) {\n continue\n }\n other.unit = -1\n }\n textureUnits[i] = texture\n unit = i\n break\n }\n if (unit >= numTexUnits) {\n check$1.raise('insufficient number of texture units')\n }\n if (config.profile && stats.maxTextureUnits < (unit + 1)) {\n stats.maxTextureUnits = unit + 1 // +1, since the units are zero-based\n }\n texture.unit = unit\n gl.activeTexture(GL_TEXTURE0$1 + unit)\n gl.bindTexture(texture.target, texture.texture)\n }\n return unit\n },\n\n unbind: function () {\n this.bindCount -= 1\n },\n\n decRef: function () {\n if (--this.refCount <= 0) {\n destroy(this)\n }\n }\n })\n\n function createTexture2D (a, b) {\n var texture = new REGLTexture(GL_TEXTURE_2D$1)\n textureSet[texture.id] = texture\n stats.textureCount++\n\n function reglTexture2D (a, b) {\n var texInfo = texture.texInfo\n TexInfo.call(texInfo)\n var mipData = allocMipMap()\n\n if (typeof a === 'number') {\n if (typeof b === 'number') {\n parseMipMapFromShape(mipData, a | 0, b | 0)\n } else {\n parseMipMapFromShape(mipData, a | 0, a | 0)\n }\n } else if (a) {\n check$1.type(a, 'object', 'invalid arguments to regl.texture')\n parseTexInfo(texInfo, a)\n parseMipMapFromObject(mipData, a)\n } else {\n // empty textures get assigned a default shape of 1x1\n parseMipMapFromShape(mipData, 1, 1)\n }\n\n if (texInfo.genMipmaps) {\n mipData.mipmask = (mipData.width << 1) - 1\n }\n texture.mipmask = mipData.mipmask\n\n copyFlags(texture, mipData)\n\n check$1.texture2D(texInfo, mipData, limits)\n texture.internalformat = mipData.internalformat\n\n reglTexture2D.width = mipData.width\n reglTexture2D.height = mipData.height\n\n tempBind(texture)\n setMipMap(mipData, GL_TEXTURE_2D$1)\n setTexInfo(texInfo, GL_TEXTURE_2D$1)\n tempRestore()\n\n freeMipMap(mipData)\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n mipData.width,\n mipData.height,\n texInfo.genMipmaps,\n false)\n }\n reglTexture2D.format = textureFormatsInvert[texture.internalformat]\n reglTexture2D.type = textureTypesInvert[texture.type]\n\n reglTexture2D.mag = magFiltersInvert[texInfo.magFilter]\n reglTexture2D.min = minFiltersInvert[texInfo.minFilter]\n\n reglTexture2D.wrapS = wrapModesInvert[texInfo.wrapS]\n reglTexture2D.wrapT = wrapModesInvert[texInfo.wrapT]\n\n return reglTexture2D\n }\n\n function subimage (image, x_, y_, level_) {\n check$1(!!image, 'must specify image data')\n\n var x = x_ | 0\n var y = y_ | 0\n var level = level_ | 0\n\n var imageData = allocImage()\n copyFlags(imageData, texture)\n imageData.width = 0\n imageData.height = 0\n parseImage(imageData, image)\n imageData.width = imageData.width || ((texture.width >> level) - x)\n imageData.height = imageData.height || ((texture.height >> level) - y)\n\n check$1(\n texture.type === imageData.type &&\n texture.format === imageData.format &&\n texture.internalformat === imageData.internalformat,\n 'incompatible format for texture.subimage')\n check$1(\n x >= 0 && y >= 0 &&\n x + imageData.width <= texture.width &&\n y + imageData.height <= texture.height,\n 'texture.subimage write out of bounds')\n check$1(\n texture.mipmask & (1 << level),\n 'missing mipmap data')\n check$1(\n imageData.data || imageData.element || imageData.needsCopy,\n 'missing image data')\n\n tempBind(texture)\n setSubImage(imageData, GL_TEXTURE_2D$1, x, y, level)\n tempRestore()\n\n freeImage(imageData)\n\n return reglTexture2D\n }\n\n function resize (w_, h_) {\n var w = w_ | 0\n var h = (h_ | 0) || w\n if (w === texture.width && h === texture.height) {\n return reglTexture2D\n }\n\n reglTexture2D.width = texture.width = w\n reglTexture2D.height = texture.height = h\n\n tempBind(texture)\n\n for (var i = 0; texture.mipmask >> i; ++i) {\n var _w = w >> i\n var _h = h >> i\n if (!_w || !_h) break\n gl.texImage2D(\n GL_TEXTURE_2D$1,\n i,\n texture.format,\n _w,\n _h,\n 0,\n texture.format,\n texture.type,\n null)\n }\n tempRestore()\n\n // also, recompute the texture size.\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n w,\n h,\n false,\n false)\n }\n\n return reglTexture2D\n }\n\n reglTexture2D(a, b)\n\n reglTexture2D.subimage = subimage\n reglTexture2D.resize = resize\n reglTexture2D._reglType = 'texture2d'\n reglTexture2D._texture = texture\n if (config.profile) {\n reglTexture2D.stats = texture.stats\n }\n reglTexture2D.destroy = function () {\n texture.decRef()\n }\n\n return reglTexture2D\n }\n\n function createTextureCube (a0, a1, a2, a3, a4, a5) {\n var texture = new REGLTexture(GL_TEXTURE_CUBE_MAP$1)\n textureSet[texture.id] = texture\n stats.cubeCount++\n\n var faces = new Array(6)\n\n function reglTextureCube (a0, a1, a2, a3, a4, a5) {\n var i\n var texInfo = texture.texInfo\n TexInfo.call(texInfo)\n for (i = 0; i < 6; ++i) {\n faces[i] = allocMipMap()\n }\n\n if (typeof a0 === 'number' || !a0) {\n var s = (a0 | 0) || 1\n for (i = 0; i < 6; ++i) {\n parseMipMapFromShape(faces[i], s, s)\n }\n } else if (typeof a0 === 'object') {\n if (a1) {\n parseMipMapFromObject(faces[0], a0)\n parseMipMapFromObject(faces[1], a1)\n parseMipMapFromObject(faces[2], a2)\n parseMipMapFromObject(faces[3], a3)\n parseMipMapFromObject(faces[4], a4)\n parseMipMapFromObject(faces[5], a5)\n } else {\n parseTexInfo(texInfo, a0)\n parseFlags(texture, a0)\n if ('faces' in a0) {\n var faceInput = a0.faces\n check$1(Array.isArray(faceInput) && faceInput.length === 6,\n 'cube faces must be a length 6 array')\n for (i = 0; i < 6; ++i) {\n check$1(typeof faceInput[i] === 'object' && !!faceInput[i],\n 'invalid input for cube map face')\n copyFlags(faces[i], texture)\n parseMipMapFromObject(faces[i], faceInput[i])\n }\n } else {\n for (i = 0; i < 6; ++i) {\n parseMipMapFromObject(faces[i], a0)\n }\n }\n }\n } else {\n check$1.raise('invalid arguments to cube map')\n }\n\n copyFlags(texture, faces[0])\n\n if (!limits.npotTextureCube) {\n check$1(isPow2$1(texture.width) && isPow2$1(texture.height), 'your browser does not support non power or two texture dimensions')\n }\n\n if (texInfo.genMipmaps) {\n texture.mipmask = (faces[0].width << 1) - 1\n } else {\n texture.mipmask = faces[0].mipmask\n }\n\n check$1.textureCube(texture, texInfo, faces, limits)\n texture.internalformat = faces[0].internalformat\n\n reglTextureCube.width = faces[0].width\n reglTextureCube.height = faces[0].height\n\n tempBind(texture)\n for (i = 0; i < 6; ++i) {\n setMipMap(faces[i], GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + i)\n }\n setTexInfo(texInfo, GL_TEXTURE_CUBE_MAP$1)\n tempRestore()\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n reglTextureCube.width,\n reglTextureCube.height,\n texInfo.genMipmaps,\n true)\n }\n\n reglTextureCube.format = textureFormatsInvert[texture.internalformat]\n reglTextureCube.type = textureTypesInvert[texture.type]\n\n reglTextureCube.mag = magFiltersInvert[texInfo.magFilter]\n reglTextureCube.min = minFiltersInvert[texInfo.minFilter]\n\n reglTextureCube.wrapS = wrapModesInvert[texInfo.wrapS]\n reglTextureCube.wrapT = wrapModesInvert[texInfo.wrapT]\n\n for (i = 0; i < 6; ++i) {\n freeMipMap(faces[i])\n }\n\n return reglTextureCube\n }\n\n function subimage (face, image, x_, y_, level_) {\n check$1(!!image, 'must specify image data')\n check$1(typeof face === 'number' && face === (face | 0) &&\n face >= 0 && face < 6, 'invalid face')\n\n var x = x_ | 0\n var y = y_ | 0\n var level = level_ | 0\n\n var imageData = allocImage()\n copyFlags(imageData, texture)\n imageData.width = 0\n imageData.height = 0\n parseImage(imageData, image)\n imageData.width = imageData.width || ((texture.width >> level) - x)\n imageData.height = imageData.height || ((texture.height >> level) - y)\n\n check$1(\n texture.type === imageData.type &&\n texture.format === imageData.format &&\n texture.internalformat === imageData.internalformat,\n 'incompatible format for texture.subimage')\n check$1(\n x >= 0 && y >= 0 &&\n x + imageData.width <= texture.width &&\n y + imageData.height <= texture.height,\n 'texture.subimage write out of bounds')\n check$1(\n texture.mipmask & (1 << level),\n 'missing mipmap data')\n check$1(\n imageData.data || imageData.element || imageData.needsCopy,\n 'missing image data')\n\n tempBind(texture)\n setSubImage(imageData, GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + face, x, y, level)\n tempRestore()\n\n freeImage(imageData)\n\n return reglTextureCube\n }\n\n function resize (radius_) {\n var radius = radius_ | 0\n if (radius === texture.width) {\n return\n }\n\n reglTextureCube.width = texture.width = radius\n reglTextureCube.height = texture.height = radius\n\n tempBind(texture)\n for (var i = 0; i < 6; ++i) {\n for (var j = 0; texture.mipmask >> j; ++j) {\n gl.texImage2D(\n GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + i,\n j,\n texture.format,\n radius >> j,\n radius >> j,\n 0,\n texture.format,\n texture.type,\n null)\n }\n }\n tempRestore()\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n reglTextureCube.width,\n reglTextureCube.height,\n false,\n true)\n }\n\n return reglTextureCube\n }\n\n reglTextureCube(a0, a1, a2, a3, a4, a5)\n\n reglTextureCube.subimage = subimage\n reglTextureCube.resize = resize\n reglTextureCube._reglType = 'textureCube'\n reglTextureCube._texture = texture\n if (config.profile) {\n reglTextureCube.stats = texture.stats\n }\n reglTextureCube.destroy = function () {\n texture.decRef()\n }\n\n return reglTextureCube\n }\n\n // Called when regl is destroyed\n function destroyTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n gl.activeTexture(GL_TEXTURE0$1 + i)\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n textureUnits[i] = null\n }\n values(textureSet).forEach(destroy)\n\n stats.cubeCount = 0\n stats.textureCount = 0\n }\n\n if (config.profile) {\n stats.getTotalTextureSize = function () {\n var total = 0\n Object.keys(textureSet).forEach(function (key) {\n total += textureSet[key].stats.size\n })\n return total\n }\n }\n\n function restoreTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n var tex = textureUnits[i]\n if (tex) {\n tex.bindCount = 0\n tex.unit = -1\n textureUnits[i] = null\n }\n }\n\n values(textureSet).forEach(function (texture) {\n texture.texture = gl.createTexture()\n gl.bindTexture(texture.target, texture.texture)\n for (var i = 0; i < 32; ++i) {\n if ((texture.mipmask & (1 << i)) === 0) {\n continue\n }\n if (texture.target === GL_TEXTURE_2D$1) {\n gl.texImage2D(GL_TEXTURE_2D$1,\n i,\n texture.internalformat,\n texture.width >> i,\n texture.height >> i,\n 0,\n texture.internalformat,\n texture.type,\n null)\n } else {\n for (var j = 0; j < 6; ++j) {\n gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + j,\n i,\n texture.internalformat,\n texture.width >> i,\n texture.height >> i,\n 0,\n texture.internalformat,\n texture.type,\n null)\n }\n }\n }\n setTexInfo(texture.texInfo, texture.target)\n })\n }\n\n function refreshTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n var tex = textureUnits[i]\n if (tex) {\n tex.bindCount = 0\n tex.unit = -1\n textureUnits[i] = null\n }\n gl.activeTexture(GL_TEXTURE0$1 + i)\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP$1, null)\n }\n }\n\n return {\n create2D: createTexture2D,\n createCube: createTextureCube,\n clear: destroyTextures,\n getTexture: function (wrapper) {\n return null\n },\n restore: restoreTextures,\n refresh: refreshTextures\n }\n}\n\nvar GL_RENDERBUFFER = 0x8D41\n\nvar GL_RGBA4$1 = 0x8056\nvar GL_RGB5_A1$1 = 0x8057\nvar GL_RGB565$1 = 0x8D62\nvar GL_DEPTH_COMPONENT16 = 0x81A5\nvar GL_STENCIL_INDEX8 = 0x8D48\nvar GL_DEPTH_STENCIL$1 = 0x84F9\n\nvar GL_SRGB8_ALPHA8_EXT = 0x8C43\n\nvar GL_RGBA32F_EXT = 0x8814\n\nvar GL_RGBA16F_EXT = 0x881A\nvar GL_RGB16F_EXT = 0x881B\n\nvar FORMAT_SIZES = []\n\nFORMAT_SIZES[GL_RGBA4$1] = 2\nFORMAT_SIZES[GL_RGB5_A1$1] = 2\nFORMAT_SIZES[GL_RGB565$1] = 2\n\nFORMAT_SIZES[GL_DEPTH_COMPONENT16] = 2\nFORMAT_SIZES[GL_STENCIL_INDEX8] = 1\nFORMAT_SIZES[GL_DEPTH_STENCIL$1] = 4\n\nFORMAT_SIZES[GL_SRGB8_ALPHA8_EXT] = 4\nFORMAT_SIZES[GL_RGBA32F_EXT] = 16\nFORMAT_SIZES[GL_RGBA16F_EXT] = 8\nFORMAT_SIZES[GL_RGB16F_EXT] = 6\n\nfunction getRenderbufferSize (format, width, height) {\n return FORMAT_SIZES[format] * width * height\n}\n\nvar wrapRenderbuffers = function (gl, extensions, limits, stats, config) {\n var formatTypes = {\n 'rgba4': GL_RGBA4$1,\n 'rgb565': GL_RGB565$1,\n 'rgb5 a1': GL_RGB5_A1$1,\n 'depth': GL_DEPTH_COMPONENT16,\n 'stencil': GL_STENCIL_INDEX8,\n 'depth stencil': GL_DEPTH_STENCIL$1\n }\n\n if (extensions.ext_srgb) {\n formatTypes['srgba'] = GL_SRGB8_ALPHA8_EXT\n }\n\n if (extensions.ext_color_buffer_half_float) {\n formatTypes['rgba16f'] = GL_RGBA16F_EXT\n formatTypes['rgb16f'] = GL_RGB16F_EXT\n }\n\n if (extensions.webgl_color_buffer_float) {\n formatTypes['rgba32f'] = GL_RGBA32F_EXT\n }\n\n var formatTypesInvert = []\n Object.keys(formatTypes).forEach(function (key) {\n var val = formatTypes[key]\n formatTypesInvert[val] = key\n })\n\n var renderbufferCount = 0\n var renderbufferSet = {}\n\n function REGLRenderbuffer (renderbuffer) {\n this.id = renderbufferCount++\n this.refCount = 1\n\n this.renderbuffer = renderbuffer\n\n this.format = GL_RGBA4$1\n this.width = 0\n this.height = 0\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n REGLRenderbuffer.prototype.decRef = function () {\n if (--this.refCount <= 0) {\n destroy(this)\n }\n }\n\n function destroy (rb) {\n var handle = rb.renderbuffer\n check$1(handle, 'must not double destroy renderbuffer')\n gl.bindRenderbuffer(GL_RENDERBUFFER, null)\n gl.deleteRenderbuffer(handle)\n rb.renderbuffer = null\n rb.refCount = 0\n delete renderbufferSet[rb.id]\n stats.renderbufferCount--\n }\n\n function createRenderbuffer (a, b) {\n var renderbuffer = new REGLRenderbuffer(gl.createRenderbuffer())\n renderbufferSet[renderbuffer.id] = renderbuffer\n stats.renderbufferCount++\n\n function reglRenderbuffer (a, b) {\n var w = 0\n var h = 0\n var format = GL_RGBA4$1\n\n if (typeof a === 'object' && a) {\n var options = a\n if ('shape' in options) {\n var shape = options.shape\n check$1(Array.isArray(shape) && shape.length >= 2,\n 'invalid renderbuffer shape')\n w = shape[0] | 0\n h = shape[1] | 0\n } else {\n if ('radius' in options) {\n w = h = options.radius | 0\n }\n if ('width' in options) {\n w = options.width | 0\n }\n if ('height' in options) {\n h = options.height | 0\n }\n }\n if ('format' in options) {\n check$1.parameter(options.format, formatTypes,\n 'invalid renderbuffer format')\n format = formatTypes[options.format]\n }\n } else if (typeof a === 'number') {\n w = a | 0\n if (typeof b === 'number') {\n h = b | 0\n } else {\n h = w\n }\n } else if (!a) {\n w = h = 1\n } else {\n check$1.raise('invalid arguments to renderbuffer constructor')\n }\n\n // check shape\n check$1(\n w > 0 && h > 0 &&\n w <= limits.maxRenderbufferSize && h <= limits.maxRenderbufferSize,\n 'invalid renderbuffer size')\n\n if (w === renderbuffer.width &&\n h === renderbuffer.height &&\n format === renderbuffer.format) {\n return\n }\n\n reglRenderbuffer.width = renderbuffer.width = w\n reglRenderbuffer.height = renderbuffer.height = h\n renderbuffer.format = format\n\n gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, format, w, h)\n\n check$1(\n gl.getError() === 0,\n 'invalid render buffer format')\n\n if (config.profile) {\n renderbuffer.stats.size = getRenderbufferSize(renderbuffer.format, renderbuffer.width, renderbuffer.height)\n }\n reglRenderbuffer.format = formatTypesInvert[renderbuffer.format]\n\n return reglRenderbuffer\n }\n\n function resize (w_, h_) {\n var w = w_ | 0\n var h = (h_ | 0) || w\n\n if (w === renderbuffer.width && h === renderbuffer.height) {\n return reglRenderbuffer\n }\n\n // check shape\n check$1(\n w > 0 && h > 0 &&\n w <= limits.maxRenderbufferSize && h <= limits.maxRenderbufferSize,\n 'invalid renderbuffer size')\n\n reglRenderbuffer.width = renderbuffer.width = w\n reglRenderbuffer.height = renderbuffer.height = h\n\n gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, renderbuffer.format, w, h)\n\n check$1(\n gl.getError() === 0,\n 'invalid render buffer format')\n\n // also, recompute size.\n if (config.profile) {\n renderbuffer.stats.size = getRenderbufferSize(\n renderbuffer.format, renderbuffer.width, renderbuffer.height)\n }\n\n return reglRenderbuffer\n }\n\n reglRenderbuffer(a, b)\n\n reglRenderbuffer.resize = resize\n reglRenderbuffer._reglType = 'renderbuffer'\n reglRenderbuffer._renderbuffer = renderbuffer\n if (config.profile) {\n reglRenderbuffer.stats = renderbuffer.stats\n }\n reglRenderbuffer.destroy = function () {\n renderbuffer.decRef()\n }\n\n return reglRenderbuffer\n }\n\n if (config.profile) {\n stats.getTotalRenderbufferSize = function () {\n var total = 0\n Object.keys(renderbufferSet).forEach(function (key) {\n total += renderbufferSet[key].stats.size\n })\n return total\n }\n }\n\n function restoreRenderbuffers () {\n values(renderbufferSet).forEach(function (rb) {\n rb.renderbuffer = gl.createRenderbuffer()\n gl.bindRenderbuffer(GL_RENDERBUFFER, rb.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, rb.format, rb.width, rb.height)\n })\n gl.bindRenderbuffer(GL_RENDERBUFFER, null)\n }\n\n return {\n create: createRenderbuffer,\n clear: function () {\n values(renderbufferSet).forEach(destroy)\n },\n restore: restoreRenderbuffers\n }\n}\n\n// We store these constants so that the minifier can inline them\nvar GL_FRAMEBUFFER$1 = 0x8D40\nvar GL_RENDERBUFFER$1 = 0x8D41\n\nvar GL_TEXTURE_2D$2 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 = 0x8515\n\nvar GL_COLOR_ATTACHMENT0$1 = 0x8CE0\nvar GL_DEPTH_ATTACHMENT = 0x8D00\nvar GL_STENCIL_ATTACHMENT = 0x8D20\nvar GL_DEPTH_STENCIL_ATTACHMENT = 0x821A\n\nvar GL_FRAMEBUFFER_COMPLETE$1 = 0x8CD5\nvar GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6\nvar GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7\nvar GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9\nvar GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD\n\nvar GL_HALF_FLOAT_OES$2 = 0x8D61\nvar GL_UNSIGNED_BYTE$6 = 0x1401\nvar GL_FLOAT$5 = 0x1406\n\nvar GL_RGB$1 = 0x1907\nvar GL_RGBA$2 = 0x1908\n\nvar GL_DEPTH_COMPONENT$1 = 0x1902\n\nvar colorTextureFormatEnums = [\n GL_RGB$1,\n GL_RGBA$2\n]\n\n// for every texture format, store\n// the number of channels\nvar textureFormatChannels = []\ntextureFormatChannels[GL_RGBA$2] = 4\ntextureFormatChannels[GL_RGB$1] = 3\n\n// for every texture type, store\n// the size in bytes.\nvar textureTypeSizes = []\ntextureTypeSizes[GL_UNSIGNED_BYTE$6] = 1\ntextureTypeSizes[GL_FLOAT$5] = 4\ntextureTypeSizes[GL_HALF_FLOAT_OES$2] = 2\n\nvar GL_RGBA4$2 = 0x8056\nvar GL_RGB5_A1$2 = 0x8057\nvar GL_RGB565$2 = 0x8D62\nvar GL_DEPTH_COMPONENT16$1 = 0x81A5\nvar GL_STENCIL_INDEX8$1 = 0x8D48\nvar GL_DEPTH_STENCIL$2 = 0x84F9\n\nvar GL_SRGB8_ALPHA8_EXT$1 = 0x8C43\n\nvar GL_RGBA32F_EXT$1 = 0x8814\n\nvar GL_RGBA16F_EXT$1 = 0x881A\nvar GL_RGB16F_EXT$1 = 0x881B\n\nvar colorRenderbufferFormatEnums = [\n GL_RGBA4$2,\n GL_RGB5_A1$2,\n GL_RGB565$2,\n GL_SRGB8_ALPHA8_EXT$1,\n GL_RGBA16F_EXT$1,\n GL_RGB16F_EXT$1,\n GL_RGBA32F_EXT$1\n]\n\nvar statusCode = {}\nstatusCode[GL_FRAMEBUFFER_COMPLETE$1] = 'complete'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT] = 'incomplete attachment'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS] = 'incomplete dimensions'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT] = 'incomplete, missing attachment'\nstatusCode[GL_FRAMEBUFFER_UNSUPPORTED] = 'unsupported'\n\nfunction wrapFBOState (\n gl,\n extensions,\n limits,\n textureState,\n renderbufferState,\n stats) {\n var framebufferState = {\n cur: null,\n next: null,\n dirty: false,\n setFBO: null\n }\n\n var colorTextureFormats = ['rgba']\n var colorRenderbufferFormats = ['rgba4', 'rgb565', 'rgb5 a1']\n\n if (extensions.ext_srgb) {\n colorRenderbufferFormats.push('srgba')\n }\n\n if (extensions.ext_color_buffer_half_float) {\n colorRenderbufferFormats.push('rgba16f', 'rgb16f')\n }\n\n if (extensions.webgl_color_buffer_float) {\n colorRenderbufferFormats.push('rgba32f')\n }\n\n var colorTypes = ['uint8']\n if (extensions.oes_texture_half_float) {\n colorTypes.push('half float', 'float16')\n }\n if (extensions.oes_texture_float) {\n colorTypes.push('float', 'float32')\n }\n\n function FramebufferAttachment (target, texture, renderbuffer) {\n this.target = target\n this.texture = texture\n this.renderbuffer = renderbuffer\n\n var w = 0\n var h = 0\n if (texture) {\n w = texture.width\n h = texture.height\n } else if (renderbuffer) {\n w = renderbuffer.width\n h = renderbuffer.height\n }\n this.width = w\n this.height = h\n }\n\n function decRef (attachment) {\n if (attachment) {\n if (attachment.texture) {\n attachment.texture._texture.decRef()\n }\n if (attachment.renderbuffer) {\n attachment.renderbuffer._renderbuffer.decRef()\n }\n }\n }\n\n function incRefAndCheckShape (attachment, width, height) {\n if (!attachment) {\n return\n }\n if (attachment.texture) {\n var texture = attachment.texture._texture\n var tw = Math.max(1, texture.width)\n var th = Math.max(1, texture.height)\n check$1(tw === width && th === height,\n 'inconsistent width/height for supplied texture')\n texture.refCount += 1\n } else {\n var renderbuffer = attachment.renderbuffer._renderbuffer\n check$1(\n renderbuffer.width === width && renderbuffer.height === height,\n 'inconsistent width/height for renderbuffer')\n renderbuffer.refCount += 1\n }\n }\n\n function attach (location, attachment) {\n if (attachment) {\n if (attachment.texture) {\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n location,\n attachment.target,\n attachment.texture._texture.texture,\n 0)\n } else {\n gl.framebufferRenderbuffer(\n GL_FRAMEBUFFER$1,\n location,\n GL_RENDERBUFFER$1,\n attachment.renderbuffer._renderbuffer.renderbuffer)\n }\n }\n }\n\n function parseAttachment (attachment) {\n var target = GL_TEXTURE_2D$2\n var texture = null\n var renderbuffer = null\n\n var data = attachment\n if (typeof attachment === 'object') {\n data = attachment.data\n if ('target' in attachment) {\n target = attachment.target | 0\n }\n }\n\n check$1.type(data, 'function', 'invalid attachment data')\n\n var type = data._reglType\n if (type === 'texture2d') {\n texture = data\n check$1(target === GL_TEXTURE_2D$2)\n } else if (type === 'textureCube') {\n texture = data\n check$1(\n target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 &&\n target < GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 + 6,\n 'invalid cube map target')\n } else if (type === 'renderbuffer') {\n renderbuffer = data\n target = GL_RENDERBUFFER$1\n } else {\n check$1.raise('invalid regl object for attachment')\n }\n\n return new FramebufferAttachment(target, texture, renderbuffer)\n }\n\n function allocAttachment (\n width,\n height,\n isTexture,\n format,\n type) {\n if (isTexture) {\n var texture = textureState.create2D({\n width: width,\n height: height,\n format: format,\n type: type\n })\n texture._texture.refCount = 0\n return new FramebufferAttachment(GL_TEXTURE_2D$2, texture, null)\n } else {\n var rb = renderbufferState.create({\n width: width,\n height: height,\n format: format\n })\n rb._renderbuffer.refCount = 0\n return new FramebufferAttachment(GL_RENDERBUFFER$1, null, rb)\n }\n }\n\n function unwrapAttachment (attachment) {\n return attachment && (attachment.texture || attachment.renderbuffer)\n }\n\n function resizeAttachment (attachment, w, h) {\n if (attachment) {\n if (attachment.texture) {\n attachment.texture.resize(w, h)\n } else if (attachment.renderbuffer) {\n attachment.renderbuffer.resize(w, h)\n }\n attachment.width = w\n attachment.height = h\n }\n }\n\n var framebufferCount = 0\n var framebufferSet = {}\n\n function REGLFramebuffer () {\n this.id = framebufferCount++\n framebufferSet[this.id] = this\n\n this.framebuffer = gl.createFramebuffer()\n this.width = 0\n this.height = 0\n\n this.colorAttachments = []\n this.depthAttachment = null\n this.stencilAttachment = null\n this.depthStencilAttachment = null\n }\n\n function decFBORefs (framebuffer) {\n framebuffer.colorAttachments.forEach(decRef)\n decRef(framebuffer.depthAttachment)\n decRef(framebuffer.stencilAttachment)\n decRef(framebuffer.depthStencilAttachment)\n }\n\n function destroy (framebuffer) {\n var handle = framebuffer.framebuffer\n check$1(handle, 'must not double destroy framebuffer')\n gl.deleteFramebuffer(handle)\n framebuffer.framebuffer = null\n stats.framebufferCount--\n delete framebufferSet[framebuffer.id]\n }\n\n function updateFramebuffer (framebuffer) {\n var i\n\n gl.bindFramebuffer(GL_FRAMEBUFFER$1, framebuffer.framebuffer)\n var colorAttachments = framebuffer.colorAttachments\n for (i = 0; i < colorAttachments.length; ++i) {\n attach(GL_COLOR_ATTACHMENT0$1 + i, colorAttachments[i])\n }\n for (i = colorAttachments.length; i < limits.maxColorAttachments; ++i) {\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_COLOR_ATTACHMENT0$1 + i,\n GL_TEXTURE_2D$2,\n null,\n 0)\n }\n\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_DEPTH_STENCIL_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_DEPTH_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_STENCIL_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n\n attach(GL_DEPTH_ATTACHMENT, framebuffer.depthAttachment)\n attach(GL_STENCIL_ATTACHMENT, framebuffer.stencilAttachment)\n attach(GL_DEPTH_STENCIL_ATTACHMENT, framebuffer.depthStencilAttachment)\n\n // Check status code\n var status = gl.checkFramebufferStatus(GL_FRAMEBUFFER$1)\n if (!gl.isContextLost() && status !== GL_FRAMEBUFFER_COMPLETE$1) {\n check$1.raise('framebuffer configuration not supported, status = ' +\n statusCode[status])\n }\n\n gl.bindFramebuffer(GL_FRAMEBUFFER$1, framebufferState.next ? framebufferState.next.framebuffer : null)\n framebufferState.cur = framebufferState.next\n\n // FIXME: Clear error code here. This is a work around for a bug in\n // headless-gl\n gl.getError()\n }\n\n function createFBO (a0, a1) {\n var framebuffer = new REGLFramebuffer()\n stats.framebufferCount++\n\n function reglFramebuffer (a, b) {\n var i\n\n check$1(framebufferState.next !== framebuffer,\n 'can not update framebuffer which is currently in use')\n\n var width = 0\n var height = 0\n\n var needsDepth = true\n var needsStencil = true\n\n var colorBuffer = null\n var colorTexture = true\n var colorFormat = 'rgba'\n var colorType = 'uint8'\n var colorCount = 1\n\n var depthBuffer = null\n var stencilBuffer = null\n var depthStencilBuffer = null\n var depthStencilTexture = false\n\n if (typeof a === 'number') {\n width = a | 0\n height = (b | 0) || width\n } else if (!a) {\n width = height = 1\n } else {\n check$1.type(a, 'object', 'invalid arguments for framebuffer')\n var options = a\n\n if ('shape' in options) {\n var shape = options.shape\n check$1(Array.isArray(shape) && shape.length >= 2,\n 'invalid shape for framebuffer')\n width = shape[0]\n height = shape[1]\n } else {\n if ('radius' in options) {\n width = height = options.radius\n }\n if ('width' in options) {\n width = options.width\n }\n if ('height' in options) {\n height = options.height\n }\n }\n\n if ('color' in options ||\n 'colors' in options) {\n colorBuffer =\n options.color ||\n options.colors\n if (Array.isArray(colorBuffer)) {\n check$1(\n colorBuffer.length === 1 || extensions.webgl_draw_buffers,\n 'multiple render targets not supported')\n }\n }\n\n if (!colorBuffer) {\n if ('colorCount' in options) {\n colorCount = options.colorCount | 0\n check$1(colorCount > 0, 'invalid color buffer count')\n }\n\n if ('colorTexture' in options) {\n colorTexture = !!options.colorTexture\n colorFormat = 'rgba4'\n }\n\n if ('colorType' in options) {\n colorType = options.colorType\n if (!colorTexture) {\n if (colorType === 'half float' || colorType === 'float16') {\n check$1(extensions.ext_color_buffer_half_float,\n 'you must enable EXT_color_buffer_half_float to use 16-bit render buffers')\n colorFormat = 'rgba16f'\n } else if (colorType === 'float' || colorType === 'float32') {\n check$1(extensions.webgl_color_buffer_float,\n 'you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers')\n colorFormat = 'rgba32f'\n }\n } else {\n check$1(extensions.oes_texture_float ||\n !(colorType === 'float' || colorType === 'float32'),\n 'you must enable OES_texture_float in order to use floating point framebuffer objects')\n check$1(extensions.oes_texture_half_float ||\n !(colorType === 'half float' || colorType === 'float16'),\n 'you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects')\n }\n check$1.oneOf(colorType, colorTypes, 'invalid color type')\n }\n\n if ('colorFormat' in options) {\n colorFormat = options.colorFormat\n if (colorTextureFormats.indexOf(colorFormat) >= 0) {\n colorTexture = true\n } else if (colorRenderbufferFormats.indexOf(colorFormat) >= 0) {\n colorTexture = false\n } else {\n if (colorTexture) {\n check$1.oneOf(\n options.colorFormat, colorTextureFormats,\n 'invalid color format for texture')\n } else {\n check$1.oneOf(\n options.colorFormat, colorRenderbufferFormats,\n 'invalid color format for renderbuffer')\n }\n }\n }\n }\n\n if ('depthTexture' in options || 'depthStencilTexture' in options) {\n depthStencilTexture = !!(options.depthTexture ||\n options.depthStencilTexture)\n check$1(!depthStencilTexture || extensions.webgl_depth_texture,\n 'webgl_depth_texture extension not supported')\n }\n\n if ('depth' in options) {\n if (typeof options.depth === 'boolean') {\n needsDepth = options.depth\n } else {\n depthBuffer = options.depth\n needsStencil = false\n }\n }\n\n if ('stencil' in options) {\n if (typeof options.stencil === 'boolean') {\n needsStencil = options.stencil\n } else {\n stencilBuffer = options.stencil\n needsDepth = false\n }\n }\n\n if ('depthStencil' in options) {\n if (typeof options.depthStencil === 'boolean') {\n needsDepth = needsStencil = options.depthStencil\n } else {\n depthStencilBuffer = options.depthStencil\n needsDepth = false\n needsStencil = false\n }\n }\n }\n\n // parse attachments\n var colorAttachments = null\n var depthAttachment = null\n var stencilAttachment = null\n var depthStencilAttachment = null\n\n // Set up color attachments\n if (Array.isArray(colorBuffer)) {\n colorAttachments = colorBuffer.map(parseAttachment)\n } else if (colorBuffer) {\n colorAttachments = [parseAttachment(colorBuffer)]\n } else {\n colorAttachments = new Array(colorCount)\n for (i = 0; i < colorCount; ++i) {\n colorAttachments[i] = allocAttachment(\n width,\n height,\n colorTexture,\n colorFormat,\n colorType)\n }\n }\n\n check$1(extensions.webgl_draw_buffers || colorAttachments.length <= 1,\n 'you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers.')\n check$1(colorAttachments.length <= limits.maxColorAttachments,\n 'too many color attachments, not supported')\n\n width = width || colorAttachments[0].width\n height = height || colorAttachments[0].height\n\n if (depthBuffer) {\n depthAttachment = parseAttachment(depthBuffer)\n } else if (needsDepth && !needsStencil) {\n depthAttachment = allocAttachment(\n width,\n height,\n depthStencilTexture,\n 'depth',\n 'uint32')\n }\n\n if (stencilBuffer) {\n stencilAttachment = parseAttachment(stencilBuffer)\n } else if (needsStencil && !needsDepth) {\n stencilAttachment = allocAttachment(\n width,\n height,\n false,\n 'stencil',\n 'uint8')\n }\n\n if (depthStencilBuffer) {\n depthStencilAttachment = parseAttachment(depthStencilBuffer)\n } else if (!depthBuffer && !stencilBuffer && needsStencil && needsDepth) {\n depthStencilAttachment = allocAttachment(\n width,\n height,\n depthStencilTexture,\n 'depth stencil',\n 'depth stencil')\n }\n\n check$1(\n (!!depthBuffer) + (!!stencilBuffer) + (!!depthStencilBuffer) <= 1,\n 'invalid framebuffer configuration, can specify exactly one depth/stencil attachment')\n\n var commonColorAttachmentSize = null\n\n for (i = 0; i < colorAttachments.length; ++i) {\n incRefAndCheckShape(colorAttachments[i], width, height)\n check$1(!colorAttachments[i] ||\n (colorAttachments[i].texture &&\n colorTextureFormatEnums.indexOf(colorAttachments[i].texture._texture.format) >= 0) ||\n (colorAttachments[i].renderbuffer &&\n colorRenderbufferFormatEnums.indexOf(colorAttachments[i].renderbuffer._renderbuffer.format) >= 0),\n 'framebuffer color attachment ' + i + ' is invalid')\n\n if (colorAttachments[i] && colorAttachments[i].texture) {\n var colorAttachmentSize =\n textureFormatChannels[colorAttachments[i].texture._texture.format] *\n textureTypeSizes[colorAttachments[i].texture._texture.type]\n\n if (commonColorAttachmentSize === null) {\n commonColorAttachmentSize = colorAttachmentSize\n } else {\n // We need to make sure that all color attachments have the same number of bitplanes\n // (that is, the same numer of bits per pixel)\n // This is required by the GLES2.0 standard. See the beginning of Chapter 4 in that document.\n check$1(commonColorAttachmentSize === colorAttachmentSize,\n 'all color attachments much have the same number of bits per pixel.')\n }\n }\n }\n incRefAndCheckShape(depthAttachment, width, height)\n check$1(!depthAttachment ||\n (depthAttachment.texture &&\n depthAttachment.texture._texture.format === GL_DEPTH_COMPONENT$1) ||\n (depthAttachment.renderbuffer &&\n depthAttachment.renderbuffer._renderbuffer.format === GL_DEPTH_COMPONENT16$1),\n 'invalid depth attachment for framebuffer object')\n incRefAndCheckShape(stencilAttachment, width, height)\n check$1(!stencilAttachment ||\n (stencilAttachment.renderbuffer &&\n stencilAttachment.renderbuffer._renderbuffer.format === GL_STENCIL_INDEX8$1),\n 'invalid stencil attachment for framebuffer object')\n incRefAndCheckShape(depthStencilAttachment, width, height)\n check$1(!depthStencilAttachment ||\n (depthStencilAttachment.texture &&\n depthStencilAttachment.texture._texture.format === GL_DEPTH_STENCIL$2) ||\n (depthStencilAttachment.renderbuffer &&\n depthStencilAttachment.renderbuffer._renderbuffer.format === GL_DEPTH_STENCIL$2),\n 'invalid depth-stencil attachment for framebuffer object')\n\n // decrement references\n decFBORefs(framebuffer)\n\n framebuffer.width = width\n framebuffer.height = height\n\n framebuffer.colorAttachments = colorAttachments\n framebuffer.depthAttachment = depthAttachment\n framebuffer.stencilAttachment = stencilAttachment\n framebuffer.depthStencilAttachment = depthStencilAttachment\n\n reglFramebuffer.color = colorAttachments.map(unwrapAttachment)\n reglFramebuffer.depth = unwrapAttachment(depthAttachment)\n reglFramebuffer.stencil = unwrapAttachment(stencilAttachment)\n reglFramebuffer.depthStencil = unwrapAttachment(depthStencilAttachment)\n\n reglFramebuffer.width = framebuffer.width\n reglFramebuffer.height = framebuffer.height\n\n updateFramebuffer(framebuffer)\n\n return reglFramebuffer\n }\n\n function resize (w_, h_) {\n check$1(framebufferState.next !== framebuffer,\n 'can not resize a framebuffer which is currently in use')\n\n var w = Math.max(w_ | 0, 1)\n var h = Math.max((h_ | 0) || w, 1)\n if (w === framebuffer.width && h === framebuffer.height) {\n return reglFramebuffer\n }\n\n // resize all buffers\n var colorAttachments = framebuffer.colorAttachments\n for (var i = 0; i < colorAttachments.length; ++i) {\n resizeAttachment(colorAttachments[i], w, h)\n }\n resizeAttachment(framebuffer.depthAttachment, w, h)\n resizeAttachment(framebuffer.stencilAttachment, w, h)\n resizeAttachment(framebuffer.depthStencilAttachment, w, h)\n\n framebuffer.width = reglFramebuffer.width = w\n framebuffer.height = reglFramebuffer.height = h\n\n updateFramebuffer(framebuffer)\n\n return reglFramebuffer\n }\n\n reglFramebuffer(a0, a1)\n\n return extend(reglFramebuffer, {\n resize: resize,\n _reglType: 'framebuffer',\n _framebuffer: framebuffer,\n destroy: function () {\n destroy(framebuffer)\n decFBORefs(framebuffer)\n },\n use: function (block) {\n framebufferState.setFBO({\n framebuffer: reglFramebuffer\n }, block)\n }\n })\n }\n\n function createCubeFBO (options) {\n var faces = Array(6)\n\n function reglFramebufferCube (a) {\n var i\n\n check$1(faces.indexOf(framebufferState.next) < 0,\n 'can not update framebuffer which is currently in use')\n\n var params = {\n color: null\n }\n\n var radius = 0\n\n var colorBuffer = null\n var colorFormat = 'rgba'\n var colorType = 'uint8'\n var colorCount = 1\n\n if (typeof a === 'number') {\n radius = a | 0\n } else if (!a) {\n radius = 1\n } else {\n check$1.type(a, 'object', 'invalid arguments for framebuffer')\n var options = a\n\n if ('shape' in options) {\n var shape = options.shape\n check$1(\n Array.isArray(shape) && shape.length >= 2,\n 'invalid shape for framebuffer')\n check$1(\n shape[0] === shape[1],\n 'cube framebuffer must be square')\n radius = shape[0]\n } else {\n if ('radius' in options) {\n radius = options.radius | 0\n }\n if ('width' in options) {\n radius = options.width | 0\n if ('height' in options) {\n check$1(options.height === radius, 'must be square')\n }\n } else if ('height' in options) {\n radius = options.height | 0\n }\n }\n\n if ('color' in options ||\n 'colors' in options) {\n colorBuffer =\n options.color ||\n options.colors\n if (Array.isArray(colorBuffer)) {\n check$1(\n colorBuffer.length === 1 || extensions.webgl_draw_buffers,\n 'multiple render targets not supported')\n }\n }\n\n if (!colorBuffer) {\n if ('colorCount' in options) {\n colorCount = options.colorCount | 0\n check$1(colorCount > 0, 'invalid color buffer count')\n }\n\n if ('colorType' in options) {\n check$1.oneOf(\n options.colorType, colorTypes,\n 'invalid color type')\n colorType = options.colorType\n }\n\n if ('colorFormat' in options) {\n colorFormat = options.colorFormat\n check$1.oneOf(\n options.colorFormat, colorTextureFormats,\n 'invalid color format for texture')\n }\n }\n\n if ('depth' in options) {\n params.depth = options.depth\n }\n\n if ('stencil' in options) {\n params.stencil = options.stencil\n }\n\n if ('depthStencil' in options) {\n params.depthStencil = options.depthStencil\n }\n }\n\n var colorCubes\n if (colorBuffer) {\n if (Array.isArray(colorBuffer)) {\n colorCubes = []\n for (i = 0; i < colorBuffer.length; ++i) {\n colorCubes[i] = colorBuffer[i]\n }\n } else {\n colorCubes = [ colorBuffer ]\n }\n } else {\n colorCubes = Array(colorCount)\n var cubeMapParams = {\n radius: radius,\n format: colorFormat,\n type: colorType\n }\n for (i = 0; i < colorCount; ++i) {\n colorCubes[i] = textureState.createCube(cubeMapParams)\n }\n }\n\n // Check color cubes\n params.color = Array(colorCubes.length)\n for (i = 0; i < colorCubes.length; ++i) {\n var cube = colorCubes[i]\n check$1(\n typeof cube === 'function' && cube._reglType === 'textureCube',\n 'invalid cube map')\n radius = radius || cube.width\n check$1(\n cube.width === radius && cube.height === radius,\n 'invalid cube map shape')\n params.color[i] = {\n target: GL_TEXTURE_CUBE_MAP_POSITIVE_X$2,\n data: colorCubes[i]\n }\n }\n\n for (i = 0; i < 6; ++i) {\n for (var j = 0; j < colorCubes.length; ++j) {\n params.color[j].target = GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 + i\n }\n // reuse depth-stencil attachments across all cube maps\n if (i > 0) {\n params.depth = faces[0].depth\n params.stencil = faces[0].stencil\n params.depthStencil = faces[0].depthStencil\n }\n if (faces[i]) {\n (faces[i])(params)\n } else {\n faces[i] = createFBO(params)\n }\n }\n\n return extend(reglFramebufferCube, {\n width: radius,\n height: radius,\n color: colorCubes\n })\n }\n\n function resize (radius_) {\n var i\n var radius = radius_ | 0\n check$1(radius > 0 && radius <= limits.maxCubeMapSize,\n 'invalid radius for cube fbo')\n\n if (radius === reglFramebufferCube.width) {\n return reglFramebufferCube\n }\n\n var colors = reglFramebufferCube.color\n for (i = 0; i < colors.length; ++i) {\n colors[i].resize(radius)\n }\n\n for (i = 0; i < 6; ++i) {\n faces[i].resize(radius)\n }\n\n reglFramebufferCube.width = reglFramebufferCube.height = radius\n\n return reglFramebufferCube\n }\n\n reglFramebufferCube(options)\n\n return extend(reglFramebufferCube, {\n faces: faces,\n resize: resize,\n _reglType: 'framebufferCube',\n destroy: function () {\n faces.forEach(function (f) {\n f.destroy()\n })\n }\n })\n }\n\n function restoreFramebuffers () {\n framebufferState.cur = null\n framebufferState.next = null\n framebufferState.dirty = true\n values(framebufferSet).forEach(function (fb) {\n fb.framebuffer = gl.createFramebuffer()\n updateFramebuffer(fb)\n })\n }\n\n return extend(framebufferState, {\n getFramebuffer: function (object) {\n if (typeof object === 'function' && object._reglType === 'framebuffer') {\n var fbo = object._framebuffer\n if (fbo instanceof REGLFramebuffer) {\n return fbo\n }\n }\n return null\n },\n create: createFBO,\n createCube: createCubeFBO,\n clear: function () {\n values(framebufferSet).forEach(destroy)\n },\n restore: restoreFramebuffers\n })\n}\n\nvar GL_FLOAT$6 = 5126\nvar GL_ARRAY_BUFFER$1 = 34962\n\nfunction AttributeRecord () {\n this.state = 0\n\n this.x = 0.0\n this.y = 0.0\n this.z = 0.0\n this.w = 0.0\n\n this.buffer = null\n this.size = 0\n this.normalized = false\n this.type = GL_FLOAT$6\n this.offset = 0\n this.stride = 0\n this.divisor = 0\n}\n\nfunction wrapAttributeState (\n gl,\n extensions,\n limits,\n stats,\n bufferState) {\n var NUM_ATTRIBUTES = limits.maxAttributes\n var attributeBindings = new Array(NUM_ATTRIBUTES)\n for (var i = 0; i < NUM_ATTRIBUTES; ++i) {\n attributeBindings[i] = new AttributeRecord()\n }\n var vaoCount = 0\n var vaoSet = {}\n\n var state = {\n Record: AttributeRecord,\n scope: {},\n state: attributeBindings,\n currentVAO: null,\n targetVAO: null,\n restore: extVAO() ? restoreVAO : function () {},\n createVAO: createVAO,\n getVAO: getVAO,\n destroyBuffer: destroyBuffer,\n setVAO: extVAO() ? setVAOEXT : setVAOEmulated,\n clear: extVAO() ? destroyVAOEXT : function () {}\n }\n\n function destroyBuffer (buffer) {\n for (var i = 0; i < attributeBindings.length; ++i) {\n var record = attributeBindings[i]\n if (record.buffer === buffer) {\n gl.disableVertexAttribArray(i)\n record.buffer = null\n }\n }\n }\n\n function extVAO () {\n return extensions.oes_vertex_array_object\n }\n\n function extInstanced () {\n return extensions.angle_instanced_arrays\n }\n\n function getVAO (vao) {\n if (typeof vao === 'function' && vao._vao) {\n return vao._vao\n }\n return null\n }\n\n function setVAOEXT (vao) {\n if (vao === state.currentVAO) {\n return\n }\n var ext = extVAO()\n if (vao) {\n ext.bindVertexArrayOES(vao.vao)\n } else {\n ext.bindVertexArrayOES(null)\n }\n state.currentVAO = vao\n }\n\n function setVAOEmulated (vao) {\n if (vao === state.currentVAO) {\n return\n }\n if (vao) {\n vao.bindAttrs()\n } else {\n var exti = extInstanced()\n for (var i = 0; i < attributeBindings.length; ++i) {\n var binding = attributeBindings[i]\n if (binding.buffer) {\n gl.enableVertexAttribArray(i)\n gl.vertexAttribPointer(i, binding.size, binding.type, binding.normalized, binding.stride, binding.offfset)\n if (exti && binding.divisor) {\n exti.vertexAttribDivisorANGLE(i, binding.divisor)\n }\n } else {\n gl.disableVertexAttribArray(i)\n gl.vertexAttrib4f(i, binding.x, binding.y, binding.z, binding.w)\n }\n }\n }\n state.currentVAO = vao\n }\n\n function destroyVAOEXT () {\n values(vaoSet).forEach(function (vao) {\n vao.destroy()\n })\n }\n\n function REGLVAO () {\n this.id = ++vaoCount\n this.attributes = []\n var extension = extVAO()\n if (extension) {\n this.vao = extension.createVertexArrayOES()\n } else {\n this.vao = null\n }\n vaoSet[this.id] = this\n this.buffers = []\n }\n\n REGLVAO.prototype.bindAttrs = function () {\n var exti = extInstanced()\n var attributes = this.attributes\n for (var i = 0; i < attributes.length; ++i) {\n var attr = attributes[i]\n if (attr.buffer) {\n gl.enableVertexAttribArray(i)\n gl.bindBuffer(GL_ARRAY_BUFFER$1, attr.buffer.buffer)\n gl.vertexAttribPointer(i, attr.size, attr.type, attr.normalized, attr.stride, attr.offset)\n if (exti && attr.divisor) {\n exti.vertexAttribDivisorANGLE(i, attr.divisor)\n }\n } else {\n gl.disableVertexAttribArray(i)\n gl.vertexAttrib4f(i, attr.x, attr.y, attr.z, attr.w)\n }\n }\n for (var j = attributes.length; j < NUM_ATTRIBUTES; ++j) {\n gl.disableVertexAttribArray(j)\n }\n }\n\n REGLVAO.prototype.refresh = function () {\n var ext = extVAO()\n if (ext) {\n ext.bindVertexArrayOES(this.vao)\n this.bindAttrs()\n state.currentVAO = this\n }\n }\n\n REGLVAO.prototype.destroy = function () {\n if (this.vao) {\n var extension = extVAO()\n if (this === state.currentVAO) {\n state.currentVAO = null\n extension.bindVertexArrayOES(null)\n }\n extension.deleteVertexArrayOES(this.vao)\n this.vao = null\n }\n if (vaoSet[this.id]) {\n delete vaoSet[this.id]\n stats.vaoCount -= 1\n }\n }\n\n function restoreVAO () {\n var ext = extVAO()\n if (ext) {\n values(vaoSet).forEach(function (vao) {\n vao.refresh()\n })\n }\n }\n\n function createVAO (_attr) {\n var vao = new REGLVAO()\n stats.vaoCount += 1\n\n function updateVAO (attributes) {\n check$1(Array.isArray(attributes), 'arguments to vertex array constructor must be an array')\n check$1(attributes.length < NUM_ATTRIBUTES, 'too many attributes')\n check$1(attributes.length > 0, 'must specify at least one attribute')\n\n var bufUpdated = {}\n var nattributes = vao.attributes\n nattributes.length = attributes.length\n for (var i = 0; i < attributes.length; ++i) {\n var spec = attributes[i]\n var rec = nattributes[i] = new AttributeRecord()\n var data = spec.data || spec\n if (Array.isArray(data) || isTypedArray(data) || isNDArrayLike(data)) {\n var buf\n if (vao.buffers[i]) {\n buf = vao.buffers[i]\n if (isTypedArray(data) && buf._buffer.byteLength >= data.byteLength) {\n buf.subdata(data)\n } else {\n buf.destroy()\n vao.buffers[i] = null\n }\n }\n if (!vao.buffers[i]) {\n buf = vao.buffers[i] = bufferState.create(spec, GL_ARRAY_BUFFER$1, false, true)\n }\n rec.buffer = bufferState.getBuffer(buf)\n rec.size = rec.buffer.dimension | 0\n rec.normalized = false\n rec.type = rec.buffer.dtype\n rec.offset = 0\n rec.stride = 0\n rec.divisor = 0\n rec.state = 1\n bufUpdated[i] = 1\n } else if (bufferState.getBuffer(spec)) {\n rec.buffer = bufferState.getBuffer(spec)\n rec.size = rec.buffer.dimension | 0\n rec.normalized = false\n rec.type = rec.buffer.dtype\n rec.offset = 0\n rec.stride = 0\n rec.divisor = 0\n rec.state = 1\n } else if (bufferState.getBuffer(spec.buffer)) {\n rec.buffer = bufferState.getBuffer(spec.buffer)\n rec.size = ((+spec.size) || rec.buffer.dimension) | 0\n rec.normalized = !!spec.normalized || false\n if ('type' in spec) {\n check$1.parameter(spec.type, glTypes, 'invalid buffer type')\n rec.type = glTypes[spec.type]\n } else {\n rec.type = rec.buffer.dtype\n }\n rec.offset = (spec.offset || 0) | 0\n rec.stride = (spec.stride || 0) | 0\n rec.divisor = (spec.divisor || 0) | 0\n rec.state = 1\n\n check$1(rec.size >= 1 && rec.size <= 4, 'size must be between 1 and 4')\n check$1(rec.offset >= 0, 'invalid offset')\n check$1(rec.stride >= 0 && rec.stride <= 255, 'stride must be between 0 and 255')\n check$1(rec.divisor >= 0, 'divisor must be positive')\n check$1(!rec.divisor || !!extensions.angle_instanced_arrays, 'ANGLE_instanced_arrays must be enabled to use divisor')\n } else if ('x' in spec) {\n check$1(i > 0, 'first attribute must not be a constant')\n rec.x = +spec.x || 0\n rec.y = +spec.y || 0\n rec.z = +spec.z || 0\n rec.w = +spec.w || 0\n rec.state = 2\n } else {\n check$1(false, 'invalid attribute spec for location ' + i)\n }\n }\n\n // retire unused buffers\n for (var j = 0; j < vao.buffers.length; ++j) {\n if (!bufUpdated[j] && vao.buffers[j]) {\n vao.buffers[j].destroy()\n vao.buffers[j] = null\n }\n }\n\n vao.refresh()\n return updateVAO\n }\n\n updateVAO.destroy = function () {\n for (var j = 0; j < vao.buffers.length; ++j) {\n if (vao.buffers[j]) {\n vao.buffers[j].destroy()\n }\n }\n vao.buffers.length = 0\n vao.destroy()\n }\n\n updateVAO._vao = vao\n updateVAO._reglType = 'vao'\n\n return updateVAO(_attr)\n }\n\n return state\n}\n\nvar GL_FRAGMENT_SHADER = 35632\nvar GL_VERTEX_SHADER = 35633\n\nvar GL_ACTIVE_UNIFORMS = 0x8B86\nvar GL_ACTIVE_ATTRIBUTES = 0x8B89\n\nfunction wrapShaderState (gl, stringStore, stats, config) {\n // ===================================================\n // glsl compilation and linking\n // ===================================================\n var fragShaders = {}\n var vertShaders = {}\n\n function ActiveInfo (name, id, location, info) {\n this.name = name\n this.id = id\n this.location = location\n this.info = info\n }\n\n function insertActiveInfo (list, info) {\n for (var i = 0; i < list.length; ++i) {\n if (list[i].id === info.id) {\n list[i].location = info.location\n return\n }\n }\n list.push(info)\n }\n\n function getShader (type, id, command) {\n var cache = type === GL_FRAGMENT_SHADER ? fragShaders : vertShaders\n var shader = cache[id]\n\n if (!shader) {\n var source = stringStore.str(id)\n shader = gl.createShader(type)\n gl.shaderSource(shader, source)\n gl.compileShader(shader)\n check$1.shaderError(gl, shader, source, type, command)\n cache[id] = shader\n }\n\n return shader\n }\n\n // ===================================================\n // program linking\n // ===================================================\n var programCache = {}\n var programList = []\n\n var PROGRAM_COUNTER = 0\n\n function REGLProgram (fragId, vertId) {\n this.id = PROGRAM_COUNTER++\n this.fragId = fragId\n this.vertId = vertId\n this.program = null\n this.uniforms = []\n this.attributes = []\n this.refCount = 1\n\n if (config.profile) {\n this.stats = {\n uniformsCount: 0,\n attributesCount: 0\n }\n }\n }\n\n function linkProgram (desc, command, attributeLocations) {\n var i, info\n\n // -------------------------------\n // compile & link\n // -------------------------------\n var fragShader = getShader(GL_FRAGMENT_SHADER, desc.fragId)\n var vertShader = getShader(GL_VERTEX_SHADER, desc.vertId)\n\n var program = desc.program = gl.createProgram()\n gl.attachShader(program, fragShader)\n gl.attachShader(program, vertShader)\n if (attributeLocations) {\n for (i = 0; i < attributeLocations.length; ++i) {\n var binding = attributeLocations[i]\n gl.bindAttribLocation(program, binding[0], binding[1])\n }\n }\n\n gl.linkProgram(program)\n check$1.linkError(\n gl,\n program,\n stringStore.str(desc.fragId),\n stringStore.str(desc.vertId),\n command)\n\n // -------------------------------\n // grab uniforms\n // -------------------------------\n var numUniforms = gl.getProgramParameter(program, GL_ACTIVE_UNIFORMS)\n if (config.profile) {\n desc.stats.uniformsCount = numUniforms\n }\n var uniforms = desc.uniforms\n for (i = 0; i < numUniforms; ++i) {\n info = gl.getActiveUniform(program, i)\n if (info) {\n if (info.size > 1) {\n for (var j = 0; j < info.size; ++j) {\n var name = info.name.replace('[0]', '[' + j + ']')\n insertActiveInfo(uniforms, new ActiveInfo(\n name,\n stringStore.id(name),\n gl.getUniformLocation(program, name),\n info))\n }\n } else {\n insertActiveInfo(uniforms, new ActiveInfo(\n info.name,\n stringStore.id(info.name),\n gl.getUniformLocation(program, info.name),\n info))\n }\n }\n }\n\n // -------------------------------\n // grab attributes\n // -------------------------------\n var numAttributes = gl.getProgramParameter(program, GL_ACTIVE_ATTRIBUTES)\n if (config.profile) {\n desc.stats.attributesCount = numAttributes\n }\n\n var attributes = desc.attributes\n for (i = 0; i < numAttributes; ++i) {\n info = gl.getActiveAttrib(program, i)\n if (info) {\n insertActiveInfo(attributes, new ActiveInfo(\n info.name,\n stringStore.id(info.name),\n gl.getAttribLocation(program, info.name),\n info))\n }\n }\n }\n\n if (config.profile) {\n stats.getMaxUniformsCount = function () {\n var m = 0\n programList.forEach(function (desc) {\n if (desc.stats.uniformsCount > m) {\n m = desc.stats.uniformsCount\n }\n })\n return m\n }\n\n stats.getMaxAttributesCount = function () {\n var m = 0\n programList.forEach(function (desc) {\n if (desc.stats.attributesCount > m) {\n m = desc.stats.attributesCount\n }\n })\n return m\n }\n }\n\n function restoreShaders () {\n fragShaders = {}\n vertShaders = {}\n for (var i = 0; i < programList.length; ++i) {\n linkProgram(programList[i], null, programList[i].attributes.map(function (info) {\n return [info.location, info.name]\n }))\n }\n }\n\n return {\n clear: function () {\n var deleteShader = gl.deleteShader.bind(gl)\n values(fragShaders).forEach(deleteShader)\n fragShaders = {}\n values(vertShaders).forEach(deleteShader)\n vertShaders = {}\n\n programList.forEach(function (desc) {\n gl.deleteProgram(desc.program)\n })\n programList.length = 0\n programCache = {}\n\n stats.shaderCount = 0\n },\n\n program: function (vertId, fragId, command, attribLocations) {\n check$1.command(vertId >= 0, 'missing vertex shader', command)\n check$1.command(fragId >= 0, 'missing fragment shader', command)\n\n var cache = programCache[fragId]\n if (!cache) {\n cache = programCache[fragId] = {}\n }\n var prevProgram = cache[vertId]\n if (prevProgram) {\n prevProgram.refCount++\n if (!attribLocations) {\n return prevProgram\n }\n }\n var program = new REGLProgram(fragId, vertId)\n stats.shaderCount++\n linkProgram(program, command, attribLocations)\n if (!prevProgram) {\n cache[vertId] = program\n }\n programList.push(program)\n return extend(program, {\n destroy: function () {\n program.refCount--\n if (program.refCount <= 0) {\n gl.deleteProgram(program.program)\n var idx = programList.indexOf(program)\n programList.splice(idx, 1)\n stats.shaderCount--\n }\n // no program is linked to this vert anymore\n if (cache[program.vertId].refCount <= 0) {\n gl.deleteShader(vertShaders[program.vertId])\n delete vertShaders[program.vertId]\n delete programCache[program.fragId][program.vertId]\n }\n // no program is linked to this frag anymore\n if (!Object.keys(programCache[program.fragId]).length) {\n gl.deleteShader(fragShaders[program.fragId])\n delete fragShaders[program.fragId]\n delete programCache[program.fragId]\n }\n }\n })\n },\n\n restore: restoreShaders,\n\n shader: getShader,\n\n frag: -1,\n vert: -1\n }\n}\n\nvar GL_RGBA$3 = 6408\nvar GL_UNSIGNED_BYTE$7 = 5121\nvar GL_PACK_ALIGNMENT = 0x0D05\nvar GL_FLOAT$7 = 0x1406 // 5126\n\nfunction wrapReadPixels (\n gl,\n framebufferState,\n reglPoll,\n context,\n glAttributes,\n extensions,\n limits) {\n function readPixelsImpl (input) {\n var type\n if (framebufferState.next === null) {\n check$1(\n glAttributes.preserveDrawingBuffer,\n 'you must create a webgl context with \"preserveDrawingBuffer\":true in order to read pixels from the drawing buffer')\n type = GL_UNSIGNED_BYTE$7\n } else {\n check$1(\n framebufferState.next.colorAttachments[0].texture !== null,\n 'You cannot read from a renderbuffer')\n type = framebufferState.next.colorAttachments[0].texture._texture.type\n\n if (extensions.oes_texture_float) {\n check$1(\n type === GL_UNSIGNED_BYTE$7 || type === GL_FLOAT$7,\n 'Reading from a framebuffer is only allowed for the types \\'uint8\\' and \\'float\\'')\n\n if (type === GL_FLOAT$7) {\n check$1(limits.readFloat, 'Reading \\'float\\' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float')\n }\n } else {\n check$1(\n type === GL_UNSIGNED_BYTE$7,\n 'Reading from a framebuffer is only allowed for the type \\'uint8\\'')\n }\n }\n\n var x = 0\n var y = 0\n var width = context.framebufferWidth\n var height = context.framebufferHeight\n var data = null\n\n if (isTypedArray(input)) {\n data = input\n } else if (input) {\n check$1.type(input, 'object', 'invalid arguments to regl.read()')\n x = input.x | 0\n y = input.y | 0\n check$1(\n x >= 0 && x < context.framebufferWidth,\n 'invalid x offset for regl.read')\n check$1(\n y >= 0 && y < context.framebufferHeight,\n 'invalid y offset for regl.read')\n width = (input.width || (context.framebufferWidth - x)) | 0\n height = (input.height || (context.framebufferHeight - y)) | 0\n data = input.data || null\n }\n\n // sanity check input.data\n if (data) {\n if (type === GL_UNSIGNED_BYTE$7) {\n check$1(\n data instanceof Uint8Array,\n 'buffer must be \\'Uint8Array\\' when reading from a framebuffer of type \\'uint8\\'')\n } else if (type === GL_FLOAT$7) {\n check$1(\n data instanceof Float32Array,\n 'buffer must be \\'Float32Array\\' when reading from a framebuffer of type \\'float\\'')\n }\n }\n\n check$1(\n width > 0 && width + x <= context.framebufferWidth,\n 'invalid width for read pixels')\n check$1(\n height > 0 && height + y <= context.framebufferHeight,\n 'invalid height for read pixels')\n\n // Update WebGL state\n reglPoll()\n\n // Compute size\n var size = width * height * 4\n\n // Allocate data\n if (!data) {\n if (type === GL_UNSIGNED_BYTE$7) {\n data = new Uint8Array(size)\n } else if (type === GL_FLOAT$7) {\n data = data || new Float32Array(size)\n }\n }\n\n // Type check\n check$1.isTypedArray(data, 'data buffer for regl.read() must be a typedarray')\n check$1(data.byteLength >= size, 'data buffer for regl.read() too small')\n\n // Run read pixels\n gl.pixelStorei(GL_PACK_ALIGNMENT, 4)\n gl.readPixels(x, y, width, height, GL_RGBA$3,\n type,\n data)\n\n return data\n }\n\n function readPixelsFBO (options) {\n var result\n framebufferState.setFBO({\n framebuffer: options.framebuffer\n }, function () {\n result = readPixelsImpl(options)\n })\n return result\n }\n\n function readPixels (options) {\n if (!options || !('framebuffer' in options)) {\n return readPixelsImpl(options)\n } else {\n return readPixelsFBO(options)\n }\n }\n\n return readPixels\n}\n\nfunction slice (x) {\n return Array.prototype.slice.call(x)\n}\n\nfunction join (x) {\n return slice(x).join('')\n}\n\nfunction createEnvironment () {\n // Unique variable id counter\n var varCounter = 0\n\n // Linked values are passed from this scope into the generated code block\n // Calling link() passes a value into the generated scope and returns\n // the variable name which it is bound to\n var linkedNames = []\n var linkedValues = []\n function link (value) {\n for (var i = 0; i < linkedValues.length; ++i) {\n if (linkedValues[i] === value) {\n return linkedNames[i]\n }\n }\n\n var name = 'g' + (varCounter++)\n linkedNames.push(name)\n linkedValues.push(value)\n return name\n }\n\n // create a code block\n function block () {\n var code = []\n function push () {\n code.push.apply(code, slice(arguments))\n }\n\n var vars = []\n function def () {\n var name = 'v' + (varCounter++)\n vars.push(name)\n\n if (arguments.length > 0) {\n code.push(name, '=')\n code.push.apply(code, slice(arguments))\n code.push(';')\n }\n\n return name\n }\n\n return extend(push, {\n def: def,\n toString: function () {\n return join([\n (vars.length > 0 ? 'var ' + vars.join(',') + ';' : ''),\n join(code)\n ])\n }\n })\n }\n\n function scope () {\n var entry = block()\n var exit = block()\n\n var entryToString = entry.toString\n var exitToString = exit.toString\n\n function save (object, prop) {\n exit(object, prop, '=', entry.def(object, prop), ';')\n }\n\n return extend(function () {\n entry.apply(entry, slice(arguments))\n }, {\n def: entry.def,\n entry: entry,\n exit: exit,\n save: save,\n set: function (object, prop, value) {\n save(object, prop)\n entry(object, prop, '=', value, ';')\n },\n toString: function () {\n return entryToString() + exitToString()\n }\n })\n }\n\n function conditional () {\n var pred = join(arguments)\n var thenBlock = scope()\n var elseBlock = scope()\n\n var thenToString = thenBlock.toString\n var elseToString = elseBlock.toString\n\n return extend(thenBlock, {\n then: function () {\n thenBlock.apply(thenBlock, slice(arguments))\n return this\n },\n else: function () {\n elseBlock.apply(elseBlock, slice(arguments))\n return this\n },\n toString: function () {\n var elseClause = elseToString()\n if (elseClause) {\n elseClause = 'else{' + elseClause + '}'\n }\n return join([\n 'if(', pred, '){',\n thenToString(),\n '}', elseClause\n ])\n }\n })\n }\n\n // procedure list\n var globalBlock = block()\n var procedures = {}\n function proc (name, count) {\n var args = []\n function arg () {\n var name = 'a' + args.length\n args.push(name)\n return name\n }\n\n count = count || 0\n for (var i = 0; i < count; ++i) {\n arg()\n }\n\n var body = scope()\n var bodyToString = body.toString\n\n var result = procedures[name] = extend(body, {\n arg: arg,\n toString: function () {\n return join([\n 'function(', args.join(), '){',\n bodyToString(),\n '}'\n ])\n }\n })\n\n return result\n }\n\n function compile () {\n var code = ['\"use strict\";',\n globalBlock,\n 'return {']\n Object.keys(procedures).forEach(function (name) {\n code.push('\"', name, '\":', procedures[name].toString(), ',')\n })\n code.push('}')\n var src = join(code)\n .replace(/;/g, ';\\n')\n .replace(/}/g, '}\\n')\n .replace(/{/g, '{\\n')\n var proc = Function.apply(null, linkedNames.concat(src))\n return proc.apply(null, linkedValues)\n }\n\n return {\n global: globalBlock,\n link: link,\n block: block,\n proc: proc,\n scope: scope,\n cond: conditional,\n compile: compile\n }\n}\n\n// \"cute\" names for vector components\nvar CUTE_COMPONENTS = 'xyzw'.split('')\n\nvar GL_UNSIGNED_BYTE$8 = 5121\n\nvar ATTRIB_STATE_POINTER = 1\nvar ATTRIB_STATE_CONSTANT = 2\n\nvar DYN_FUNC$1 = 0\nvar DYN_PROP$1 = 1\nvar DYN_CONTEXT$1 = 2\nvar DYN_STATE$1 = 3\nvar DYN_THUNK = 4\nvar DYN_CONSTANT$1 = 5\nvar DYN_ARRAY$1 = 6\n\nvar S_DITHER = 'dither'\nvar S_BLEND_ENABLE = 'blend.enable'\nvar S_BLEND_COLOR = 'blend.color'\nvar S_BLEND_EQUATION = 'blend.equation'\nvar S_BLEND_FUNC = 'blend.func'\nvar S_DEPTH_ENABLE = 'depth.enable'\nvar S_DEPTH_FUNC = 'depth.func'\nvar S_DEPTH_RANGE = 'depth.range'\nvar S_DEPTH_MASK = 'depth.mask'\nvar S_COLOR_MASK = 'colorMask'\nvar S_CULL_ENABLE = 'cull.enable'\nvar S_CULL_FACE = 'cull.face'\nvar S_FRONT_FACE = 'frontFace'\nvar S_LINE_WIDTH = 'lineWidth'\nvar S_POLYGON_OFFSET_ENABLE = 'polygonOffset.enable'\nvar S_POLYGON_OFFSET_OFFSET = 'polygonOffset.offset'\nvar S_SAMPLE_ALPHA = 'sample.alpha'\nvar S_SAMPLE_ENABLE = 'sample.enable'\nvar S_SAMPLE_COVERAGE = 'sample.coverage'\nvar S_STENCIL_ENABLE = 'stencil.enable'\nvar S_STENCIL_MASK = 'stencil.mask'\nvar S_STENCIL_FUNC = 'stencil.func'\nvar S_STENCIL_OPFRONT = 'stencil.opFront'\nvar S_STENCIL_OPBACK = 'stencil.opBack'\nvar S_SCISSOR_ENABLE = 'scissor.enable'\nvar S_SCISSOR_BOX = 'scissor.box'\nvar S_VIEWPORT = 'viewport'\n\nvar S_PROFILE = 'profile'\n\nvar S_FRAMEBUFFER = 'framebuffer'\nvar S_VERT = 'vert'\nvar S_FRAG = 'frag'\nvar S_ELEMENTS = 'elements'\nvar S_PRIMITIVE = 'primitive'\nvar S_COUNT = 'count'\nvar S_OFFSET = 'offset'\nvar S_INSTANCES = 'instances'\nvar S_VAO = 'vao'\n\nvar SUFFIX_WIDTH = 'Width'\nvar SUFFIX_HEIGHT = 'Height'\n\nvar S_FRAMEBUFFER_WIDTH = S_FRAMEBUFFER + SUFFIX_WIDTH\nvar S_FRAMEBUFFER_HEIGHT = S_FRAMEBUFFER + SUFFIX_HEIGHT\nvar S_VIEWPORT_WIDTH = S_VIEWPORT + SUFFIX_WIDTH\nvar S_VIEWPORT_HEIGHT = S_VIEWPORT + SUFFIX_HEIGHT\nvar S_DRAWINGBUFFER = 'drawingBuffer'\nvar S_DRAWINGBUFFER_WIDTH = S_DRAWINGBUFFER + SUFFIX_WIDTH\nvar S_DRAWINGBUFFER_HEIGHT = S_DRAWINGBUFFER + SUFFIX_HEIGHT\n\nvar NESTED_OPTIONS = [\n S_BLEND_FUNC,\n S_BLEND_EQUATION,\n S_STENCIL_FUNC,\n S_STENCIL_OPFRONT,\n S_STENCIL_OPBACK,\n S_SAMPLE_COVERAGE,\n S_VIEWPORT,\n S_SCISSOR_BOX,\n S_POLYGON_OFFSET_OFFSET\n]\n\nvar GL_ARRAY_BUFFER$2 = 34962\nvar GL_ELEMENT_ARRAY_BUFFER$1 = 34963\n\nvar GL_FRAGMENT_SHADER$1 = 35632\nvar GL_VERTEX_SHADER$1 = 35633\n\nvar GL_TEXTURE_2D$3 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP$2 = 0x8513\n\nvar GL_CULL_FACE = 0x0B44\nvar GL_BLEND = 0x0BE2\nvar GL_DITHER = 0x0BD0\nvar GL_STENCIL_TEST = 0x0B90\nvar GL_DEPTH_TEST = 0x0B71\nvar GL_SCISSOR_TEST = 0x0C11\nvar GL_POLYGON_OFFSET_FILL = 0x8037\nvar GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E\nvar GL_SAMPLE_COVERAGE = 0x80A0\n\nvar GL_FLOAT$8 = 5126\nvar GL_FLOAT_VEC2 = 35664\nvar GL_FLOAT_VEC3 = 35665\nvar GL_FLOAT_VEC4 = 35666\nvar GL_INT$3 = 5124\nvar GL_INT_VEC2 = 35667\nvar GL_INT_VEC3 = 35668\nvar GL_INT_VEC4 = 35669\nvar GL_BOOL = 35670\nvar GL_BOOL_VEC2 = 35671\nvar GL_BOOL_VEC3 = 35672\nvar GL_BOOL_VEC4 = 35673\nvar GL_FLOAT_MAT2 = 35674\nvar GL_FLOAT_MAT3 = 35675\nvar GL_FLOAT_MAT4 = 35676\nvar GL_SAMPLER_2D = 35678\nvar GL_SAMPLER_CUBE = 35680\n\nvar GL_TRIANGLES$1 = 4\n\nvar GL_FRONT = 1028\nvar GL_BACK = 1029\nvar GL_CW = 0x0900\nvar GL_CCW = 0x0901\nvar GL_MIN_EXT = 0x8007\nvar GL_MAX_EXT = 0x8008\nvar GL_ALWAYS = 519\nvar GL_KEEP = 7680\nvar GL_ZERO = 0\nvar GL_ONE = 1\nvar GL_FUNC_ADD = 0x8006\nvar GL_LESS = 513\n\nvar GL_FRAMEBUFFER$2 = 0x8D40\nvar GL_COLOR_ATTACHMENT0$2 = 0x8CE0\n\nvar blendFuncs = {\n '0': 0,\n '1': 1,\n 'zero': 0,\n 'one': 1,\n 'src color': 768,\n 'one minus src color': 769,\n 'src alpha': 770,\n 'one minus src alpha': 771,\n 'dst color': 774,\n 'one minus dst color': 775,\n 'dst alpha': 772,\n 'one minus dst alpha': 773,\n 'constant color': 32769,\n 'one minus constant color': 32770,\n 'constant alpha': 32771,\n 'one minus constant alpha': 32772,\n 'src alpha saturate': 776\n}\n\n// There are invalid values for srcRGB and dstRGB. See:\n// https://www.khronos.org/registry/webgl/specs/1.0/#6.13\n// https://github.com/KhronosGroup/WebGL/blob/0d3201f5f7ec3c0060bc1f04077461541f1987b9/conformance-suites/1.0.3/conformance/misc/webgl-specific.html#L56\nvar invalidBlendCombinations = [\n 'constant color, constant alpha',\n 'one minus constant color, constant alpha',\n 'constant color, one minus constant alpha',\n 'one minus constant color, one minus constant alpha',\n 'constant alpha, constant color',\n 'constant alpha, one minus constant color',\n 'one minus constant alpha, constant color',\n 'one minus constant alpha, one minus constant color'\n]\n\nvar compareFuncs = {\n 'never': 512,\n 'less': 513,\n '<': 513,\n 'equal': 514,\n '=': 514,\n '==': 514,\n '===': 514,\n 'lequal': 515,\n '<=': 515,\n 'greater': 516,\n '>': 516,\n 'notequal': 517,\n '!=': 517,\n '!==': 517,\n 'gequal': 518,\n '>=': 518,\n 'always': 519\n}\n\nvar stencilOps = {\n '0': 0,\n 'zero': 0,\n 'keep': 7680,\n 'replace': 7681,\n 'increment': 7682,\n 'decrement': 7683,\n 'increment wrap': 34055,\n 'decrement wrap': 34056,\n 'invert': 5386\n}\n\nvar shaderType = {\n 'frag': GL_FRAGMENT_SHADER$1,\n 'vert': GL_VERTEX_SHADER$1\n}\n\nvar orientationType = {\n 'cw': GL_CW,\n 'ccw': GL_CCW\n}\n\nfunction isBufferArgs (x) {\n return Array.isArray(x) ||\n isTypedArray(x) ||\n isNDArrayLike(x)\n}\n\n// Make sure viewport is processed first\nfunction sortState (state) {\n return state.sort(function (a, b) {\n if (a === S_VIEWPORT) {\n return -1\n } else if (b === S_VIEWPORT) {\n return 1\n }\n return (a < b) ? -1 : 1\n })\n}\n\nfunction Declaration (thisDep, contextDep, propDep, append) {\n this.thisDep = thisDep\n this.contextDep = contextDep\n this.propDep = propDep\n this.append = append\n}\n\nfunction isStatic (decl) {\n return decl && !(decl.thisDep || decl.contextDep || decl.propDep)\n}\n\nfunction createStaticDecl (append) {\n return new Declaration(false, false, false, append)\n}\n\nfunction createDynamicDecl (dyn, append) {\n var type = dyn.type\n if (type === DYN_FUNC$1) {\n var numArgs = dyn.data.length\n return new Declaration(\n true,\n numArgs >= 1,\n numArgs >= 2,\n append)\n } else if (type === DYN_THUNK) {\n var data = dyn.data\n return new Declaration(\n data.thisDep,\n data.contextDep,\n data.propDep,\n append)\n } else if (type === DYN_CONSTANT$1) {\n return new Declaration(\n false,\n false,\n false,\n append)\n } else if (type === DYN_ARRAY$1) {\n var thisDep = false\n var contextDep = false\n var propDep = false\n for (var i = 0; i < dyn.data.length; ++i) {\n var subDyn = dyn.data[i]\n if (subDyn.type === DYN_PROP$1) {\n propDep = true\n } else if (subDyn.type === DYN_CONTEXT$1) {\n contextDep = true\n } else if (subDyn.type === DYN_STATE$1) {\n thisDep = true\n } else if (subDyn.type === DYN_FUNC$1) {\n thisDep = true\n var subArgs = subDyn.data\n if (subArgs >= 1) {\n contextDep = true\n }\n if (subArgs >= 2) {\n propDep = true\n }\n } else if (subDyn.type === DYN_THUNK) {\n thisDep = thisDep || subDyn.data.thisDep\n contextDep = contextDep || subDyn.data.contextDep\n propDep = propDep || subDyn.data.propDep\n }\n }\n return new Declaration(\n thisDep,\n contextDep,\n propDep,\n append)\n } else {\n return new Declaration(\n type === DYN_STATE$1,\n type === DYN_CONTEXT$1,\n type === DYN_PROP$1,\n append)\n }\n}\n\nvar SCOPE_DECL = new Declaration(false, false, false, function () {})\n\nfunction reglCore (\n gl,\n stringStore,\n extensions,\n limits,\n bufferState,\n elementState,\n textureState,\n framebufferState,\n uniformState,\n attributeState,\n shaderState,\n drawState,\n contextState,\n timer,\n config) {\n var AttributeRecord = attributeState.Record\n\n var blendEquations = {\n 'add': 32774,\n 'subtract': 32778,\n 'reverse subtract': 32779\n }\n if (extensions.ext_blend_minmax) {\n blendEquations.min = GL_MIN_EXT\n blendEquations.max = GL_MAX_EXT\n }\n\n var extInstancing = extensions.angle_instanced_arrays\n var extDrawBuffers = extensions.webgl_draw_buffers\n\n // ===================================================\n // ===================================================\n // WEBGL STATE\n // ===================================================\n // ===================================================\n var currentState = {\n dirty: true,\n profile: config.profile\n }\n var nextState = {}\n var GL_STATE_NAMES = []\n var GL_FLAGS = {}\n var GL_VARIABLES = {}\n\n function propName (name) {\n return name.replace('.', '_')\n }\n\n function stateFlag (sname, cap, init) {\n var name = propName(sname)\n GL_STATE_NAMES.push(sname)\n nextState[name] = currentState[name] = !!init\n GL_FLAGS[name] = cap\n }\n\n function stateVariable (sname, func, init) {\n var name = propName(sname)\n GL_STATE_NAMES.push(sname)\n if (Array.isArray(init)) {\n currentState[name] = init.slice()\n nextState[name] = init.slice()\n } else {\n currentState[name] = nextState[name] = init\n }\n GL_VARIABLES[name] = func\n }\n\n // Dithering\n stateFlag(S_DITHER, GL_DITHER)\n\n // Blending\n stateFlag(S_BLEND_ENABLE, GL_BLEND)\n stateVariable(S_BLEND_COLOR, 'blendColor', [0, 0, 0, 0])\n stateVariable(S_BLEND_EQUATION, 'blendEquationSeparate',\n [GL_FUNC_ADD, GL_FUNC_ADD])\n stateVariable(S_BLEND_FUNC, 'blendFuncSeparate',\n [GL_ONE, GL_ZERO, GL_ONE, GL_ZERO])\n\n // Depth\n stateFlag(S_DEPTH_ENABLE, GL_DEPTH_TEST, true)\n stateVariable(S_DEPTH_FUNC, 'depthFunc', GL_LESS)\n stateVariable(S_DEPTH_RANGE, 'depthRange', [0, 1])\n stateVariable(S_DEPTH_MASK, 'depthMask', true)\n\n // Color mask\n stateVariable(S_COLOR_MASK, S_COLOR_MASK, [true, true, true, true])\n\n // Face culling\n stateFlag(S_CULL_ENABLE, GL_CULL_FACE)\n stateVariable(S_CULL_FACE, 'cullFace', GL_BACK)\n\n // Front face orientation\n stateVariable(S_FRONT_FACE, S_FRONT_FACE, GL_CCW)\n\n // Line width\n stateVariable(S_LINE_WIDTH, S_LINE_WIDTH, 1)\n\n // Polygon offset\n stateFlag(S_POLYGON_OFFSET_ENABLE, GL_POLYGON_OFFSET_FILL)\n stateVariable(S_POLYGON_OFFSET_OFFSET, 'polygonOffset', [0, 0])\n\n // Sample coverage\n stateFlag(S_SAMPLE_ALPHA, GL_SAMPLE_ALPHA_TO_COVERAGE)\n stateFlag(S_SAMPLE_ENABLE, GL_SAMPLE_COVERAGE)\n stateVariable(S_SAMPLE_COVERAGE, 'sampleCoverage', [1, false])\n\n // Stencil\n stateFlag(S_STENCIL_ENABLE, GL_STENCIL_TEST)\n stateVariable(S_STENCIL_MASK, 'stencilMask', -1)\n stateVariable(S_STENCIL_FUNC, 'stencilFunc', [GL_ALWAYS, 0, -1])\n stateVariable(S_STENCIL_OPFRONT, 'stencilOpSeparate',\n [GL_FRONT, GL_KEEP, GL_KEEP, GL_KEEP])\n stateVariable(S_STENCIL_OPBACK, 'stencilOpSeparate',\n [GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP])\n\n // Scissor\n stateFlag(S_SCISSOR_ENABLE, GL_SCISSOR_TEST)\n stateVariable(S_SCISSOR_BOX, 'scissor',\n [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight])\n\n // Viewport\n stateVariable(S_VIEWPORT, S_VIEWPORT,\n [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight])\n\n // ===================================================\n // ===================================================\n // ENVIRONMENT\n // ===================================================\n // ===================================================\n var sharedState = {\n gl: gl,\n context: contextState,\n strings: stringStore,\n next: nextState,\n current: currentState,\n draw: drawState,\n elements: elementState,\n buffer: bufferState,\n shader: shaderState,\n attributes: attributeState.state,\n vao: attributeState,\n uniforms: uniformState,\n framebuffer: framebufferState,\n extensions: extensions,\n\n timer: timer,\n isBufferArgs: isBufferArgs\n }\n\n var sharedConstants = {\n primTypes: primTypes,\n compareFuncs: compareFuncs,\n blendFuncs: blendFuncs,\n blendEquations: blendEquations,\n stencilOps: stencilOps,\n glTypes: glTypes,\n orientationType: orientationType\n }\n\n check$1.optional(function () {\n sharedState.isArrayLike = isArrayLike\n })\n\n if (extDrawBuffers) {\n sharedConstants.backBuffer = [GL_BACK]\n sharedConstants.drawBuffer = loop(limits.maxDrawbuffers, function (i) {\n if (i === 0) {\n return [0]\n }\n return loop(i, function (j) {\n return GL_COLOR_ATTACHMENT0$2 + j\n })\n })\n }\n\n var drawCallCounter = 0\n function createREGLEnvironment () {\n var env = createEnvironment()\n var link = env.link\n var global = env.global\n env.id = drawCallCounter++\n\n env.batchId = '0'\n\n // link shared state\n var SHARED = link(sharedState)\n var shared = env.shared = {\n props: 'a0'\n }\n Object.keys(sharedState).forEach(function (prop) {\n shared[prop] = global.def(SHARED, '.', prop)\n })\n\n // Inject runtime assertion stuff for debug builds\n check$1.optional(function () {\n env.CHECK = link(check$1)\n env.commandStr = check$1.guessCommand()\n env.command = link(env.commandStr)\n env.assert = function (block, pred, message) {\n block(\n 'if(!(', pred, '))',\n this.CHECK, '.commandRaise(', link(message), ',', this.command, ');')\n }\n\n sharedConstants.invalidBlendCombinations = invalidBlendCombinations\n })\n\n // Copy GL state variables over\n var nextVars = env.next = {}\n var currentVars = env.current = {}\n Object.keys(GL_VARIABLES).forEach(function (variable) {\n if (Array.isArray(currentState[variable])) {\n nextVars[variable] = global.def(shared.next, '.', variable)\n currentVars[variable] = global.def(shared.current, '.', variable)\n }\n })\n\n // Initialize shared constants\n var constants = env.constants = {}\n Object.keys(sharedConstants).forEach(function (name) {\n constants[name] = global.def(JSON.stringify(sharedConstants[name]))\n })\n\n // Helper function for calling a block\n env.invoke = function (block, x) {\n switch (x.type) {\n case DYN_FUNC$1:\n var argList = [\n 'this',\n shared.context,\n shared.props,\n env.batchId\n ]\n return block.def(\n link(x.data), '.call(',\n argList.slice(0, Math.max(x.data.length + 1, 4)),\n ')')\n case DYN_PROP$1:\n return block.def(shared.props, x.data)\n case DYN_CONTEXT$1:\n return block.def(shared.context, x.data)\n case DYN_STATE$1:\n return block.def('this', x.data)\n case DYN_THUNK:\n x.data.append(env, block)\n return x.data.ref\n case DYN_CONSTANT$1:\n return x.data.toString()\n case DYN_ARRAY$1:\n return x.data.map(function (y) {\n return env.invoke(block, y)\n })\n }\n }\n\n env.attribCache = {}\n\n var scopeAttribs = {}\n env.scopeAttrib = function (name) {\n var id = stringStore.id(name)\n if (id in scopeAttribs) {\n return scopeAttribs[id]\n }\n var binding = attributeState.scope[id]\n if (!binding) {\n binding = attributeState.scope[id] = new AttributeRecord()\n }\n var result = scopeAttribs[id] = link(binding)\n return result\n }\n\n return env\n }\n\n // ===================================================\n // ===================================================\n // PARSING\n // ===================================================\n // ===================================================\n function parseProfile (options) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n var profileEnable\n if (S_PROFILE in staticOptions) {\n var value = !!staticOptions[S_PROFILE]\n profileEnable = createStaticDecl(function (env, scope) {\n return value\n })\n profileEnable.enable = value\n } else if (S_PROFILE in dynamicOptions) {\n var dyn = dynamicOptions[S_PROFILE]\n profileEnable = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n }\n\n return profileEnable\n }\n\n function parseFramebuffer (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n if (S_FRAMEBUFFER in staticOptions) {\n var framebuffer = staticOptions[S_FRAMEBUFFER]\n if (framebuffer) {\n framebuffer = framebufferState.getFramebuffer(framebuffer)\n check$1.command(framebuffer, 'invalid framebuffer object')\n return createStaticDecl(function (env, block) {\n var FRAMEBUFFER = env.link(framebuffer)\n var shared = env.shared\n block.set(\n shared.framebuffer,\n '.next',\n FRAMEBUFFER)\n var CONTEXT = shared.context\n block.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n FRAMEBUFFER + '.width')\n block.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n FRAMEBUFFER + '.height')\n return FRAMEBUFFER\n })\n } else {\n return createStaticDecl(function (env, scope) {\n var shared = env.shared\n scope.set(\n shared.framebuffer,\n '.next',\n 'null')\n var CONTEXT = shared.context\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n CONTEXT + '.' + S_DRAWINGBUFFER_WIDTH)\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n CONTEXT + '.' + S_DRAWINGBUFFER_HEIGHT)\n return 'null'\n })\n }\n } else if (S_FRAMEBUFFER in dynamicOptions) {\n var dyn = dynamicOptions[S_FRAMEBUFFER]\n return createDynamicDecl(dyn, function (env, scope) {\n var FRAMEBUFFER_FUNC = env.invoke(scope, dyn)\n var shared = env.shared\n var FRAMEBUFFER_STATE = shared.framebuffer\n var FRAMEBUFFER = scope.def(\n FRAMEBUFFER_STATE, '.getFramebuffer(', FRAMEBUFFER_FUNC, ')')\n\n check$1.optional(function () {\n env.assert(scope,\n '!' + FRAMEBUFFER_FUNC + '||' + FRAMEBUFFER,\n 'invalid framebuffer object')\n })\n\n scope.set(\n FRAMEBUFFER_STATE,\n '.next',\n FRAMEBUFFER)\n var CONTEXT = shared.context\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n FRAMEBUFFER + '?' + FRAMEBUFFER + '.width:' +\n CONTEXT + '.' + S_DRAWINGBUFFER_WIDTH)\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n FRAMEBUFFER +\n '?' + FRAMEBUFFER + '.height:' +\n CONTEXT + '.' + S_DRAWINGBUFFER_HEIGHT)\n return FRAMEBUFFER\n })\n } else {\n return null\n }\n }\n\n function parseViewportScissor (options, framebuffer, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseBox (param) {\n if (param in staticOptions) {\n var box = staticOptions[param]\n check$1.commandType(box, 'object', 'invalid ' + param, env.commandStr)\n\n var isStatic = true\n var x = box.x | 0\n var y = box.y | 0\n var w, h\n if ('width' in box) {\n w = box.width | 0\n check$1.command(w >= 0, 'invalid ' + param, env.commandStr)\n } else {\n isStatic = false\n }\n if ('height' in box) {\n h = box.height | 0\n check$1.command(h >= 0, 'invalid ' + param, env.commandStr)\n } else {\n isStatic = false\n }\n\n return new Declaration(\n !isStatic && framebuffer && framebuffer.thisDep,\n !isStatic && framebuffer && framebuffer.contextDep,\n !isStatic && framebuffer && framebuffer.propDep,\n function (env, scope) {\n var CONTEXT = env.shared.context\n var BOX_W = w\n if (!('width' in box)) {\n BOX_W = scope.def(CONTEXT, '.', S_FRAMEBUFFER_WIDTH, '-', x)\n }\n var BOX_H = h\n if (!('height' in box)) {\n BOX_H = scope.def(CONTEXT, '.', S_FRAMEBUFFER_HEIGHT, '-', y)\n }\n return [x, y, BOX_W, BOX_H]\n })\n } else if (param in dynamicOptions) {\n var dynBox = dynamicOptions[param]\n var result = createDynamicDecl(dynBox, function (env, scope) {\n var BOX = env.invoke(scope, dynBox)\n\n check$1.optional(function () {\n env.assert(scope,\n BOX + '&&typeof ' + BOX + '===\"object\"',\n 'invalid ' + param)\n })\n\n var CONTEXT = env.shared.context\n var BOX_X = scope.def(BOX, '.x|0')\n var BOX_Y = scope.def(BOX, '.y|0')\n var BOX_W = scope.def(\n '\"width\" in ', BOX, '?', BOX, '.width|0:',\n '(', CONTEXT, '.', S_FRAMEBUFFER_WIDTH, '-', BOX_X, ')')\n var BOX_H = scope.def(\n '\"height\" in ', BOX, '?', BOX, '.height|0:',\n '(', CONTEXT, '.', S_FRAMEBUFFER_HEIGHT, '-', BOX_Y, ')')\n\n check$1.optional(function () {\n env.assert(scope,\n BOX_W + '>=0&&' +\n BOX_H + '>=0',\n 'invalid ' + param)\n })\n\n return [BOX_X, BOX_Y, BOX_W, BOX_H]\n })\n if (framebuffer) {\n result.thisDep = result.thisDep || framebuffer.thisDep\n result.contextDep = result.contextDep || framebuffer.contextDep\n result.propDep = result.propDep || framebuffer.propDep\n }\n return result\n } else if (framebuffer) {\n return new Declaration(\n framebuffer.thisDep,\n framebuffer.contextDep,\n framebuffer.propDep,\n function (env, scope) {\n var CONTEXT = env.shared.context\n return [\n 0, 0,\n scope.def(CONTEXT, '.', S_FRAMEBUFFER_WIDTH),\n scope.def(CONTEXT, '.', S_FRAMEBUFFER_HEIGHT)]\n })\n } else {\n return null\n }\n }\n\n var viewport = parseBox(S_VIEWPORT)\n\n if (viewport) {\n var prevViewport = viewport\n viewport = new Declaration(\n viewport.thisDep,\n viewport.contextDep,\n viewport.propDep,\n function (env, scope) {\n var VIEWPORT = prevViewport.append(env, scope)\n var CONTEXT = env.shared.context\n scope.set(\n CONTEXT,\n '.' + S_VIEWPORT_WIDTH,\n VIEWPORT[2])\n scope.set(\n CONTEXT,\n '.' + S_VIEWPORT_HEIGHT,\n VIEWPORT[3])\n return VIEWPORT\n })\n }\n\n return {\n viewport: viewport,\n scissor_box: parseBox(S_SCISSOR_BOX)\n }\n }\n\n function parseAttribLocations (options, attributes) {\n var staticOptions = options.static\n var staticProgram =\n typeof staticOptions[S_FRAG] === 'string' &&\n typeof staticOptions[S_VERT] === 'string'\n if (staticProgram) {\n if (Object.keys(attributes.dynamic).length > 0) {\n return null\n }\n var staticAttributes = attributes.static\n var sAttributes = Object.keys(staticAttributes)\n if (sAttributes.length > 0 && typeof staticAttributes[sAttributes[0]] === 'number') {\n var bindings = []\n for (var i = 0; i < sAttributes.length; ++i) {\n check$1(typeof staticAttributes[sAttributes[i]] === 'number', 'must specify all vertex attribute locations when using vaos')\n bindings.push([staticAttributes[sAttributes[i]] | 0, sAttributes[i]])\n }\n return bindings\n }\n }\n return null\n }\n\n function parseProgram (options, env, attribLocations) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseShader (name) {\n if (name in staticOptions) {\n var id = stringStore.id(staticOptions[name])\n check$1.optional(function () {\n shaderState.shader(shaderType[name], id, check$1.guessCommand())\n })\n var result = createStaticDecl(function () {\n return id\n })\n result.id = id\n return result\n } else if (name in dynamicOptions) {\n var dyn = dynamicOptions[name]\n return createDynamicDecl(dyn, function (env, scope) {\n var str = env.invoke(scope, dyn)\n var id = scope.def(env.shared.strings, '.id(', str, ')')\n check$1.optional(function () {\n scope(\n env.shared.shader, '.shader(',\n shaderType[name], ',',\n id, ',',\n env.command, ');')\n })\n return id\n })\n }\n return null\n }\n\n var frag = parseShader(S_FRAG)\n var vert = parseShader(S_VERT)\n\n var program = null\n var progVar\n if (isStatic(frag) && isStatic(vert)) {\n program = shaderState.program(vert.id, frag.id, null, attribLocations)\n progVar = createStaticDecl(function (env, scope) {\n return env.link(program)\n })\n } else {\n progVar = new Declaration(\n (frag && frag.thisDep) || (vert && vert.thisDep),\n (frag && frag.contextDep) || (vert && vert.contextDep),\n (frag && frag.propDep) || (vert && vert.propDep),\n function (env, scope) {\n var SHADER_STATE = env.shared.shader\n var fragId\n if (frag) {\n fragId = frag.append(env, scope)\n } else {\n fragId = scope.def(SHADER_STATE, '.', S_FRAG)\n }\n var vertId\n if (vert) {\n vertId = vert.append(env, scope)\n } else {\n vertId = scope.def(SHADER_STATE, '.', S_VERT)\n }\n var progDef = SHADER_STATE + '.program(' + vertId + ',' + fragId\n check$1.optional(function () {\n progDef += ',' + env.command\n })\n return scope.def(progDef + ')')\n })\n }\n\n return {\n frag: frag,\n vert: vert,\n progVar: progVar,\n program: program\n }\n }\n\n function parseDraw (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseElements () {\n if (S_ELEMENTS in staticOptions) {\n var elements = staticOptions[S_ELEMENTS]\n if (isBufferArgs(elements)) {\n elements = elementState.getElements(elementState.create(elements, true))\n } else if (elements) {\n elements = elementState.getElements(elements)\n check$1.command(elements, 'invalid elements', env.commandStr)\n }\n var result = createStaticDecl(function (env, scope) {\n if (elements) {\n var result = env.link(elements)\n env.ELEMENTS = result\n return result\n }\n env.ELEMENTS = null\n return null\n })\n result.value = elements\n return result\n } else if (S_ELEMENTS in dynamicOptions) {\n var dyn = dynamicOptions[S_ELEMENTS]\n return createDynamicDecl(dyn, function (env, scope) {\n var shared = env.shared\n\n var IS_BUFFER_ARGS = shared.isBufferArgs\n var ELEMENT_STATE = shared.elements\n\n var elementDefn = env.invoke(scope, dyn)\n var elements = scope.def('null')\n var elementStream = scope.def(IS_BUFFER_ARGS, '(', elementDefn, ')')\n\n var ifte = env.cond(elementStream)\n .then(elements, '=', ELEMENT_STATE, '.createStream(', elementDefn, ');')\n .else(elements, '=', ELEMENT_STATE, '.getElements(', elementDefn, ');')\n\n check$1.optional(function () {\n env.assert(ifte.else,\n '!' + elementDefn + '||' + elements,\n 'invalid elements')\n })\n\n scope.entry(ifte)\n scope.exit(\n env.cond(elementStream)\n .then(ELEMENT_STATE, '.destroyStream(', elements, ');'))\n\n env.ELEMENTS = elements\n\n return elements\n })\n }\n\n return null\n }\n\n var elements = parseElements()\n\n function parsePrimitive () {\n if (S_PRIMITIVE in staticOptions) {\n var primitive = staticOptions[S_PRIMITIVE]\n check$1.commandParameter(primitive, primTypes, 'invalid primitve', env.commandStr)\n return createStaticDecl(function (env, scope) {\n return primTypes[primitive]\n })\n } else if (S_PRIMITIVE in dynamicOptions) {\n var dynPrimitive = dynamicOptions[S_PRIMITIVE]\n return createDynamicDecl(dynPrimitive, function (env, scope) {\n var PRIM_TYPES = env.constants.primTypes\n var prim = env.invoke(scope, dynPrimitive)\n check$1.optional(function () {\n env.assert(scope,\n prim + ' in ' + PRIM_TYPES,\n 'invalid primitive, must be one of ' + Object.keys(primTypes))\n })\n return scope.def(PRIM_TYPES, '[', prim, ']')\n })\n } else if (elements) {\n if (isStatic(elements)) {\n if (elements.value) {\n return createStaticDecl(function (env, scope) {\n return scope.def(env.ELEMENTS, '.primType')\n })\n } else {\n return createStaticDecl(function () {\n return GL_TRIANGLES$1\n })\n }\n } else {\n return new Declaration(\n elements.thisDep,\n elements.contextDep,\n elements.propDep,\n function (env, scope) {\n var elements = env.ELEMENTS\n return scope.def(elements, '?', elements, '.primType:', GL_TRIANGLES$1)\n })\n }\n }\n return null\n }\n\n function parseParam (param, isOffset) {\n if (param in staticOptions) {\n var value = staticOptions[param] | 0\n check$1.command(!isOffset || value >= 0, 'invalid ' + param, env.commandStr)\n return createStaticDecl(function (env, scope) {\n if (isOffset) {\n env.OFFSET = value\n }\n return value\n })\n } else if (param in dynamicOptions) {\n var dynValue = dynamicOptions[param]\n return createDynamicDecl(dynValue, function (env, scope) {\n var result = env.invoke(scope, dynValue)\n if (isOffset) {\n env.OFFSET = result\n check$1.optional(function () {\n env.assert(scope,\n result + '>=0',\n 'invalid ' + param)\n })\n }\n return result\n })\n } else if (isOffset && elements) {\n return createStaticDecl(function (env, scope) {\n env.OFFSET = '0'\n return 0\n })\n }\n return null\n }\n\n var OFFSET = parseParam(S_OFFSET, true)\n\n function parseVertCount () {\n if (S_COUNT in staticOptions) {\n var count = staticOptions[S_COUNT] | 0\n check$1.command(\n typeof count === 'number' && count >= 0, 'invalid vertex count', env.commandStr)\n return createStaticDecl(function () {\n return count\n })\n } else if (S_COUNT in dynamicOptions) {\n var dynCount = dynamicOptions[S_COUNT]\n return createDynamicDecl(dynCount, function (env, scope) {\n var result = env.invoke(scope, dynCount)\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + result + '===\"number\"&&' +\n result + '>=0&&' +\n result + '===(' + result + '|0)',\n 'invalid vertex count')\n })\n return result\n })\n } else if (elements) {\n if (isStatic(elements)) {\n if (elements) {\n if (OFFSET) {\n return new Declaration(\n OFFSET.thisDep,\n OFFSET.contextDep,\n OFFSET.propDep,\n function (env, scope) {\n var result = scope.def(\n env.ELEMENTS, '.vertCount-', env.OFFSET)\n\n check$1.optional(function () {\n env.assert(scope,\n result + '>=0',\n 'invalid vertex offset/element buffer too small')\n })\n\n return result\n })\n } else {\n return createStaticDecl(function (env, scope) {\n return scope.def(env.ELEMENTS, '.vertCount')\n })\n }\n } else {\n var result = createStaticDecl(function () {\n return -1\n })\n check$1.optional(function () {\n result.MISSING = true\n })\n return result\n }\n } else {\n var variable = new Declaration(\n elements.thisDep || OFFSET.thisDep,\n elements.contextDep || OFFSET.contextDep,\n elements.propDep || OFFSET.propDep,\n function (env, scope) {\n var elements = env.ELEMENTS\n if (env.OFFSET) {\n return scope.def(elements, '?', elements, '.vertCount-',\n env.OFFSET, ':-1')\n }\n return scope.def(elements, '?', elements, '.vertCount:-1')\n })\n check$1.optional(function () {\n variable.DYNAMIC = true\n })\n return variable\n }\n }\n return null\n }\n\n return {\n elements: elements,\n primitive: parsePrimitive(),\n count: parseVertCount(),\n instances: parseParam(S_INSTANCES, false),\n offset: OFFSET\n }\n }\n\n function parseGLState (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n var STATE = {}\n\n GL_STATE_NAMES.forEach(function (prop) {\n var param = propName(prop)\n\n function parseParam (parseStatic, parseDynamic) {\n if (prop in staticOptions) {\n var value = parseStatic(staticOptions[prop])\n STATE[param] = createStaticDecl(function () {\n return value\n })\n } else if (prop in dynamicOptions) {\n var dyn = dynamicOptions[prop]\n STATE[param] = createDynamicDecl(dyn, function (env, scope) {\n return parseDynamic(env, scope, env.invoke(scope, dyn))\n })\n }\n }\n\n switch (prop) {\n case S_CULL_ENABLE:\n case S_BLEND_ENABLE:\n case S_DITHER:\n case S_STENCIL_ENABLE:\n case S_DEPTH_ENABLE:\n case S_SCISSOR_ENABLE:\n case S_POLYGON_OFFSET_ENABLE:\n case S_SAMPLE_ALPHA:\n case S_SAMPLE_ENABLE:\n case S_DEPTH_MASK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'boolean', prop, env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"boolean\"',\n 'invalid flag ' + prop, env.commandStr)\n })\n return value\n })\n\n case S_DEPTH_FUNC:\n return parseParam(\n function (value) {\n check$1.commandParameter(value, compareFuncs, 'invalid ' + prop, env.commandStr)\n return compareFuncs[value]\n },\n function (env, scope, value) {\n var COMPARE_FUNCS = env.constants.compareFuncs\n check$1.optional(function () {\n env.assert(scope,\n value + ' in ' + COMPARE_FUNCS,\n 'invalid ' + prop + ', must be one of ' + Object.keys(compareFuncs))\n })\n return scope.def(COMPARE_FUNCS, '[', value, ']')\n })\n\n case S_DEPTH_RANGE:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number' &&\n value[0] <= value[1],\n 'depth range is 2d array',\n env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===2&&' +\n 'typeof ' + value + '[0]===\"number\"&&' +\n 'typeof ' + value + '[1]===\"number\"&&' +\n value + '[0]<=' + value + '[1]',\n 'depth range must be a 2d array')\n })\n\n var Z_NEAR = scope.def('+', value, '[0]')\n var Z_FAR = scope.def('+', value, '[1]')\n return [Z_NEAR, Z_FAR]\n })\n\n case S_BLEND_FUNC:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', 'blend.func', env.commandStr)\n var srcRGB = ('srcRGB' in value ? value.srcRGB : value.src)\n var srcAlpha = ('srcAlpha' in value ? value.srcAlpha : value.src)\n var dstRGB = ('dstRGB' in value ? value.dstRGB : value.dst)\n var dstAlpha = ('dstAlpha' in value ? value.dstAlpha : value.dst)\n check$1.commandParameter(srcRGB, blendFuncs, param + '.srcRGB', env.commandStr)\n check$1.commandParameter(srcAlpha, blendFuncs, param + '.srcAlpha', env.commandStr)\n check$1.commandParameter(dstRGB, blendFuncs, param + '.dstRGB', env.commandStr)\n check$1.commandParameter(dstAlpha, blendFuncs, param + '.dstAlpha', env.commandStr)\n\n check$1.command(\n (invalidBlendCombinations.indexOf(srcRGB + ', ' + dstRGB) === -1),\n 'unallowed blending combination (srcRGB, dstRGB) = (' + srcRGB + ', ' + dstRGB + ')', env.commandStr)\n\n return [\n blendFuncs[srcRGB],\n blendFuncs[dstRGB],\n blendFuncs[srcAlpha],\n blendFuncs[dstAlpha]\n ]\n },\n function (env, scope, value) {\n var BLEND_FUNCS = env.constants.blendFuncs\n\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid blend func, must be an object')\n })\n\n function read (prefix, suffix) {\n var func = scope.def(\n '\"', prefix, suffix, '\" in ', value,\n '?', value, '.', prefix, suffix,\n ':', value, '.', prefix)\n\n check$1.optional(function () {\n env.assert(scope,\n func + ' in ' + BLEND_FUNCS,\n 'invalid ' + prop + '.' + prefix + suffix + ', must be one of ' + Object.keys(blendFuncs))\n })\n\n return func\n }\n\n var srcRGB = read('src', 'RGB')\n var dstRGB = read('dst', 'RGB')\n\n check$1.optional(function () {\n var INVALID_BLEND_COMBINATIONS = env.constants.invalidBlendCombinations\n\n env.assert(scope,\n INVALID_BLEND_COMBINATIONS +\n '.indexOf(' + srcRGB + '+\", \"+' + dstRGB + ') === -1 ',\n 'unallowed blending combination for (srcRGB, dstRGB)'\n )\n })\n\n var SRC_RGB = scope.def(BLEND_FUNCS, '[', srcRGB, ']')\n var SRC_ALPHA = scope.def(BLEND_FUNCS, '[', read('src', 'Alpha'), ']')\n var DST_RGB = scope.def(BLEND_FUNCS, '[', dstRGB, ']')\n var DST_ALPHA = scope.def(BLEND_FUNCS, '[', read('dst', 'Alpha'), ']')\n\n return [SRC_RGB, DST_RGB, SRC_ALPHA, DST_ALPHA]\n })\n\n case S_BLEND_EQUATION:\n return parseParam(\n function (value) {\n if (typeof value === 'string') {\n check$1.commandParameter(value, blendEquations, 'invalid ' + prop, env.commandStr)\n return [\n blendEquations[value],\n blendEquations[value]\n ]\n } else if (typeof value === 'object') {\n check$1.commandParameter(\n value.rgb, blendEquations, prop + '.rgb', env.commandStr)\n check$1.commandParameter(\n value.alpha, blendEquations, prop + '.alpha', env.commandStr)\n return [\n blendEquations[value.rgb],\n blendEquations[value.alpha]\n ]\n } else {\n check$1.commandRaise('invalid blend.equation', env.commandStr)\n }\n },\n function (env, scope, value) {\n var BLEND_EQUATIONS = env.constants.blendEquations\n\n var RGB = scope.def()\n var ALPHA = scope.def()\n\n var ifte = env.cond('typeof ', value, '===\"string\"')\n\n check$1.optional(function () {\n function checkProp (block, name, value) {\n env.assert(block,\n value + ' in ' + BLEND_EQUATIONS,\n 'invalid ' + name + ', must be one of ' + Object.keys(blendEquations))\n }\n checkProp(ifte.then, prop, value)\n\n env.assert(ifte.else,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n checkProp(ifte.else, prop + '.rgb', value + '.rgb')\n checkProp(ifte.else, prop + '.alpha', value + '.alpha')\n })\n\n ifte.then(\n RGB, '=', ALPHA, '=', BLEND_EQUATIONS, '[', value, '];')\n ifte.else(\n RGB, '=', BLEND_EQUATIONS, '[', value, '.rgb];',\n ALPHA, '=', BLEND_EQUATIONS, '[', value, '.alpha];')\n\n scope(ifte)\n\n return [RGB, ALPHA]\n })\n\n case S_BLEND_COLOR:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) &&\n value.length === 4,\n 'blend.color must be a 4d array', env.commandStr)\n return loop(4, function (i) {\n return +value[i]\n })\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===4',\n 'blend.color must be a 4d array')\n })\n return loop(4, function (i) {\n return scope.def('+', value, '[', i, ']')\n })\n })\n\n case S_STENCIL_MASK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'number', param, env.commandStr)\n return value | 0\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"number\"',\n 'invalid stencil.mask')\n })\n return scope.def(value, '|0')\n })\n\n case S_STENCIL_FUNC:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var cmp = value.cmp || 'keep'\n var ref = value.ref || 0\n var mask = 'mask' in value ? value.mask : -1\n check$1.commandParameter(cmp, compareFuncs, prop + '.cmp', env.commandStr)\n check$1.commandType(ref, 'number', prop + '.ref', env.commandStr)\n check$1.commandType(mask, 'number', prop + '.mask', env.commandStr)\n return [\n compareFuncs[cmp],\n ref,\n mask\n ]\n },\n function (env, scope, value) {\n var COMPARE_FUNCS = env.constants.compareFuncs\n check$1.optional(function () {\n function assert () {\n env.assert(scope,\n Array.prototype.join.call(arguments, ''),\n 'invalid stencil.func')\n }\n assert(value + '&&typeof ', value, '===\"object\"')\n assert('!(\"cmp\" in ', value, ')||(',\n value, '.cmp in ', COMPARE_FUNCS, ')')\n })\n var cmp = scope.def(\n '\"cmp\" in ', value,\n '?', COMPARE_FUNCS, '[', value, '.cmp]',\n ':', GL_KEEP)\n var ref = scope.def(value, '.ref|0')\n var mask = scope.def(\n '\"mask\" in ', value,\n '?', value, '.mask|0:-1')\n return [cmp, ref, mask]\n })\n\n case S_STENCIL_OPFRONT:\n case S_STENCIL_OPBACK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var fail = value.fail || 'keep'\n var zfail = value.zfail || 'keep'\n var zpass = value.zpass || 'keep'\n check$1.commandParameter(fail, stencilOps, prop + '.fail', env.commandStr)\n check$1.commandParameter(zfail, stencilOps, prop + '.zfail', env.commandStr)\n check$1.commandParameter(zpass, stencilOps, prop + '.zpass', env.commandStr)\n return [\n prop === S_STENCIL_OPBACK ? GL_BACK : GL_FRONT,\n stencilOps[fail],\n stencilOps[zfail],\n stencilOps[zpass]\n ]\n },\n function (env, scope, value) {\n var STENCIL_OPS = env.constants.stencilOps\n\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n })\n\n function read (name) {\n check$1.optional(function () {\n env.assert(scope,\n '!(\"' + name + '\" in ' + value + ')||' +\n '(' + value + '.' + name + ' in ' + STENCIL_OPS + ')',\n 'invalid ' + prop + '.' + name + ', must be one of ' + Object.keys(stencilOps))\n })\n\n return scope.def(\n '\"', name, '\" in ', value,\n '?', STENCIL_OPS, '[', value, '.', name, ']:',\n GL_KEEP)\n }\n\n return [\n prop === S_STENCIL_OPBACK ? GL_BACK : GL_FRONT,\n read('fail'),\n read('zfail'),\n read('zpass')\n ]\n })\n\n case S_POLYGON_OFFSET_OFFSET:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var factor = value.factor | 0\n var units = value.units | 0\n check$1.commandType(factor, 'number', param + '.factor', env.commandStr)\n check$1.commandType(units, 'number', param + '.units', env.commandStr)\n return [factor, units]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n })\n\n var FACTOR = scope.def(value, '.factor|0')\n var UNITS = scope.def(value, '.units|0')\n\n return [FACTOR, UNITS]\n })\n\n case S_CULL_FACE:\n return parseParam(\n function (value) {\n var face = 0\n if (value === 'front') {\n face = GL_FRONT\n } else if (value === 'back') {\n face = GL_BACK\n }\n check$1.command(!!face, param, env.commandStr)\n return face\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '===\"front\"||' +\n value + '===\"back\"',\n 'invalid cull.face')\n })\n return scope.def(value, '===\"front\"?', GL_FRONT, ':', GL_BACK)\n })\n\n case S_LINE_WIDTH:\n return parseParam(\n function (value) {\n check$1.command(\n typeof value === 'number' &&\n value >= limits.lineWidthDims[0] &&\n value <= limits.lineWidthDims[1],\n 'invalid line width, must be a positive number between ' +\n limits.lineWidthDims[0] + ' and ' + limits.lineWidthDims[1], env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"number\"&&' +\n value + '>=' + limits.lineWidthDims[0] + '&&' +\n value + '<=' + limits.lineWidthDims[1],\n 'invalid line width')\n })\n\n return value\n })\n\n case S_FRONT_FACE:\n return parseParam(\n function (value) {\n check$1.commandParameter(value, orientationType, param, env.commandStr)\n return orientationType[value]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '===\"cw\"||' +\n value + '===\"ccw\"',\n 'invalid frontFace, must be one of cw,ccw')\n })\n return scope.def(value + '===\"cw\"?' + GL_CW + ':' + GL_CCW)\n })\n\n case S_COLOR_MASK:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'color.mask must be length 4 array', env.commandStr)\n return value.map(function (v) { return !!v })\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===4',\n 'invalid color.mask')\n })\n return loop(4, function (i) {\n return '!!' + value + '[' + i + ']'\n })\n })\n\n case S_SAMPLE_COVERAGE:\n return parseParam(\n function (value) {\n check$1.command(typeof value === 'object' && value, param, env.commandStr)\n var sampleValue = 'value' in value ? value.value : 1\n var sampleInvert = !!value.invert\n check$1.command(\n typeof sampleValue === 'number' &&\n sampleValue >= 0 && sampleValue <= 1,\n 'sample.coverage.value must be a number between 0 and 1', env.commandStr)\n return [sampleValue, sampleInvert]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid sample.coverage')\n })\n var VALUE = scope.def(\n '\"value\" in ', value, '?+', value, '.value:1')\n var INVERT = scope.def('!!', value, '.invert')\n return [VALUE, INVERT]\n })\n }\n })\n\n return STATE\n }\n\n function parseUniforms (uniforms, env) {\n var staticUniforms = uniforms.static\n var dynamicUniforms = uniforms.dynamic\n\n var UNIFORMS = {}\n\n Object.keys(staticUniforms).forEach(function (name) {\n var value = staticUniforms[name]\n var result\n if (typeof value === 'number' ||\n typeof value === 'boolean') {\n result = createStaticDecl(function () {\n return value\n })\n } else if (typeof value === 'function') {\n var reglType = value._reglType\n if (reglType === 'texture2d' ||\n reglType === 'textureCube') {\n result = createStaticDecl(function (env) {\n return env.link(value)\n })\n } else if (reglType === 'framebuffer' ||\n reglType === 'framebufferCube') {\n check$1.command(value.color.length > 0,\n 'missing color attachment for framebuffer sent to uniform \"' + name + '\"', env.commandStr)\n result = createStaticDecl(function (env) {\n return env.link(value.color[0])\n })\n } else {\n check$1.commandRaise('invalid data for uniform \"' + name + '\"', env.commandStr)\n }\n } else if (isArrayLike(value)) {\n result = createStaticDecl(function (env) {\n var ITEM = env.global.def('[',\n loop(value.length, function (i) {\n check$1.command(\n typeof value[i] === 'number' ||\n typeof value[i] === 'boolean',\n 'invalid uniform ' + name, env.commandStr)\n return value[i]\n }), ']')\n return ITEM\n })\n } else {\n check$1.commandRaise('invalid or missing data for uniform \"' + name + '\"', env.commandStr)\n }\n result.value = value\n UNIFORMS[name] = result\n })\n\n Object.keys(dynamicUniforms).forEach(function (key) {\n var dyn = dynamicUniforms[key]\n UNIFORMS[key] = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n })\n\n return UNIFORMS\n }\n\n function parseAttributes (attributes, env) {\n var staticAttributes = attributes.static\n var dynamicAttributes = attributes.dynamic\n\n var attributeDefs = {}\n\n Object.keys(staticAttributes).forEach(function (attribute) {\n var value = staticAttributes[attribute]\n var id = stringStore.id(attribute)\n\n var record = new AttributeRecord()\n if (isBufferArgs(value)) {\n record.state = ATTRIB_STATE_POINTER\n record.buffer = bufferState.getBuffer(\n bufferState.create(value, GL_ARRAY_BUFFER$2, false, true))\n record.type = 0\n } else {\n var buffer = bufferState.getBuffer(value)\n if (buffer) {\n record.state = ATTRIB_STATE_POINTER\n record.buffer = buffer\n record.type = 0\n } else {\n check$1.command(typeof value === 'object' && value,\n 'invalid data for attribute ' + attribute, env.commandStr)\n if ('constant' in value) {\n var constant = value.constant\n record.buffer = 'null'\n record.state = ATTRIB_STATE_CONSTANT\n if (typeof constant === 'number') {\n record.x = constant\n } else {\n check$1.command(\n isArrayLike(constant) &&\n constant.length > 0 &&\n constant.length <= 4,\n 'invalid constant for attribute ' + attribute, env.commandStr)\n CUTE_COMPONENTS.forEach(function (c, i) {\n if (i < constant.length) {\n record[c] = constant[i]\n }\n })\n }\n } else {\n if (isBufferArgs(value.buffer)) {\n buffer = bufferState.getBuffer(\n bufferState.create(value.buffer, GL_ARRAY_BUFFER$2, false, true))\n } else {\n buffer = bufferState.getBuffer(value.buffer)\n }\n check$1.command(!!buffer, 'missing buffer for attribute \"' + attribute + '\"', env.commandStr)\n\n var offset = value.offset | 0\n check$1.command(offset >= 0,\n 'invalid offset for attribute \"' + attribute + '\"', env.commandStr)\n\n var stride = value.stride | 0\n check$1.command(stride >= 0 && stride < 256,\n 'invalid stride for attribute \"' + attribute + '\", must be integer betweeen [0, 255]', env.commandStr)\n\n var size = value.size | 0\n check$1.command(!('size' in value) || (size > 0 && size <= 4),\n 'invalid size for attribute \"' + attribute + '\", must be 1,2,3,4', env.commandStr)\n\n var normalized = !!value.normalized\n\n var type = 0\n if ('type' in value) {\n check$1.commandParameter(\n value.type, glTypes,\n 'invalid type for attribute ' + attribute, env.commandStr)\n type = glTypes[value.type]\n }\n\n var divisor = value.divisor | 0\n if ('divisor' in value) {\n check$1.command(divisor === 0 || extInstancing,\n 'cannot specify divisor for attribute \"' + attribute + '\", instancing not supported', env.commandStr)\n check$1.command(divisor >= 0,\n 'invalid divisor for attribute \"' + attribute + '\"', env.commandStr)\n }\n\n check$1.optional(function () {\n var command = env.commandStr\n\n var VALID_KEYS = [\n 'buffer',\n 'offset',\n 'divisor',\n 'normalized',\n 'type',\n 'size',\n 'stride'\n ]\n\n Object.keys(value).forEach(function (prop) {\n check$1.command(\n VALID_KEYS.indexOf(prop) >= 0,\n 'unknown parameter \"' + prop + '\" for attribute pointer \"' + attribute + '\" (valid parameters are ' + VALID_KEYS + ')',\n command)\n })\n })\n\n record.buffer = buffer\n record.state = ATTRIB_STATE_POINTER\n record.size = size\n record.normalized = normalized\n record.type = type || buffer.dtype\n record.offset = offset\n record.stride = stride\n record.divisor = divisor\n }\n }\n }\n\n attributeDefs[attribute] = createStaticDecl(function (env, scope) {\n var cache = env.attribCache\n if (id in cache) {\n return cache[id]\n }\n var result = {\n isStream: false\n }\n Object.keys(record).forEach(function (key) {\n result[key] = record[key]\n })\n if (record.buffer) {\n result.buffer = env.link(record.buffer)\n result.type = result.type || (result.buffer + '.dtype')\n }\n cache[id] = result\n return result\n })\n })\n\n Object.keys(dynamicAttributes).forEach(function (attribute) {\n var dyn = dynamicAttributes[attribute]\n\n function appendAttributeCode (env, block) {\n var VALUE = env.invoke(block, dyn)\n\n var shared = env.shared\n var constants = env.constants\n\n var IS_BUFFER_ARGS = shared.isBufferArgs\n var BUFFER_STATE = shared.buffer\n\n // Perform validation on attribute\n check$1.optional(function () {\n env.assert(block,\n VALUE + '&&(typeof ' + VALUE + '===\"object\"||typeof ' +\n VALUE + '===\"function\")&&(' +\n IS_BUFFER_ARGS + '(' + VALUE + ')||' +\n BUFFER_STATE + '.getBuffer(' + VALUE + ')||' +\n BUFFER_STATE + '.getBuffer(' + VALUE + '.buffer)||' +\n IS_BUFFER_ARGS + '(' + VALUE + '.buffer)||' +\n '(\"constant\" in ' + VALUE +\n '&&(typeof ' + VALUE + '.constant===\"number\"||' +\n shared.isArrayLike + '(' + VALUE + '.constant))))',\n 'invalid dynamic attribute \"' + attribute + '\"')\n })\n\n // allocate names for result\n var result = {\n isStream: block.def(false)\n }\n var defaultRecord = new AttributeRecord()\n defaultRecord.state = ATTRIB_STATE_POINTER\n Object.keys(defaultRecord).forEach(function (key) {\n result[key] = block.def('' + defaultRecord[key])\n })\n\n var BUFFER = result.buffer\n var TYPE = result.type\n block(\n 'if(', IS_BUFFER_ARGS, '(', VALUE, ')){',\n result.isStream, '=true;',\n BUFFER, '=', BUFFER_STATE, '.createStream(', GL_ARRAY_BUFFER$2, ',', VALUE, ');',\n TYPE, '=', BUFFER, '.dtype;',\n '}else{',\n BUFFER, '=', BUFFER_STATE, '.getBuffer(', VALUE, ');',\n 'if(', BUFFER, '){',\n TYPE, '=', BUFFER, '.dtype;',\n '}else if(\"constant\" in ', VALUE, '){',\n result.state, '=', ATTRIB_STATE_CONSTANT, ';',\n 'if(typeof ' + VALUE + '.constant === \"number\"){',\n result[CUTE_COMPONENTS[0]], '=', VALUE, '.constant;',\n CUTE_COMPONENTS.slice(1).map(function (n) {\n return result[n]\n }).join('='), '=0;',\n '}else{',\n CUTE_COMPONENTS.map(function (name, i) {\n return (\n result[name] + '=' + VALUE + '.constant.length>' + i +\n '?' + VALUE + '.constant[' + i + ']:0;'\n )\n }).join(''),\n '}}else{',\n 'if(', IS_BUFFER_ARGS, '(', VALUE, '.buffer)){',\n BUFFER, '=', BUFFER_STATE, '.createStream(', GL_ARRAY_BUFFER$2, ',', VALUE, '.buffer);',\n '}else{',\n BUFFER, '=', BUFFER_STATE, '.getBuffer(', VALUE, '.buffer);',\n '}',\n TYPE, '=\"type\" in ', VALUE, '?',\n constants.glTypes, '[', VALUE, '.type]:', BUFFER, '.dtype;',\n result.normalized, '=!!', VALUE, '.normalized;')\n function emitReadRecord (name) {\n block(result[name], '=', VALUE, '.', name, '|0;')\n }\n emitReadRecord('size')\n emitReadRecord('offset')\n emitReadRecord('stride')\n emitReadRecord('divisor')\n\n block('}}')\n\n block.exit(\n 'if(', result.isStream, '){',\n BUFFER_STATE, '.destroyStream(', BUFFER, ');',\n '}')\n\n return result\n }\n\n attributeDefs[attribute] = createDynamicDecl(dyn, appendAttributeCode)\n })\n\n return attributeDefs\n }\n\n function parseVAO (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n if (S_VAO in staticOptions) {\n var vao = staticOptions[S_VAO]\n if (vao !== null && attributeState.getVAO(vao) === null) {\n vao = attributeState.createVAO(vao)\n }\n return createStaticDecl(function (env) {\n return env.link(attributeState.getVAO(vao))\n })\n } else if (S_VAO in dynamicOptions) {\n var dyn = dynamicOptions[S_VAO]\n return createDynamicDecl(dyn, function (env, scope) {\n var vaoRef = env.invoke(scope, dyn)\n return scope.def(env.shared.vao + '.getVAO(' + vaoRef + ')')\n })\n }\n return null\n }\n\n function parseContext (context) {\n var staticContext = context.static\n var dynamicContext = context.dynamic\n var result = {}\n\n Object.keys(staticContext).forEach(function (name) {\n var value = staticContext[name]\n result[name] = createStaticDecl(function (env, scope) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return '' + value\n } else {\n return env.link(value)\n }\n })\n })\n\n Object.keys(dynamicContext).forEach(function (name) {\n var dyn = dynamicContext[name]\n result[name] = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n })\n\n return result\n }\n\n function parseArguments (options, attributes, uniforms, context, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n check$1.optional(function () {\n var KEY_NAMES = [\n S_FRAMEBUFFER,\n S_VERT,\n S_FRAG,\n S_ELEMENTS,\n S_PRIMITIVE,\n S_OFFSET,\n S_COUNT,\n S_INSTANCES,\n S_PROFILE,\n S_VAO\n ].concat(GL_STATE_NAMES)\n\n function checkKeys (dict) {\n Object.keys(dict).forEach(function (key) {\n check$1.command(\n KEY_NAMES.indexOf(key) >= 0,\n 'unknown parameter \"' + key + '\"',\n env.commandStr)\n })\n }\n\n checkKeys(staticOptions)\n checkKeys(dynamicOptions)\n })\n\n var attribLocations = parseAttribLocations(options, attributes)\n\n var framebuffer = parseFramebuffer(options, env)\n var viewportAndScissor = parseViewportScissor(options, framebuffer, env)\n var draw = parseDraw(options, env)\n var state = parseGLState(options, env)\n var shader = parseProgram(options, env, attribLocations)\n\n function copyBox (name) {\n var defn = viewportAndScissor[name]\n if (defn) {\n state[name] = defn\n }\n }\n copyBox(S_VIEWPORT)\n copyBox(propName(S_SCISSOR_BOX))\n\n var dirty = Object.keys(state).length > 0\n\n var result = {\n framebuffer: framebuffer,\n draw: draw,\n shader: shader,\n state: state,\n dirty: dirty,\n scopeVAO: null,\n drawVAO: null,\n useVAO: false,\n attributes: {}\n }\n\n result.profile = parseProfile(options, env)\n result.uniforms = parseUniforms(uniforms, env)\n result.drawVAO = result.scopeVAO = parseVAO(options, env)\n // special case: check if we can statically allocate a vertex array object for this program\n if (!result.drawVAO && shader.program && !attribLocations && extensions.angle_instanced_arrays) {\n var useVAO = true\n var staticBindings = shader.program.attributes.map(function (attr) {\n var binding = attributes.static[attr]\n useVAO = useVAO && !!binding\n return binding\n })\n if (useVAO && staticBindings.length > 0) {\n var vao = attributeState.getVAO(attributeState.createVAO(staticBindings))\n result.drawVAO = new Declaration(null, null, null, function (env, scope) {\n return env.link(vao)\n })\n result.useVAO = true\n }\n }\n if (attribLocations) {\n result.useVAO = true\n } else {\n result.attributes = parseAttributes(attributes, env)\n }\n result.context = parseContext(context, env)\n return result\n }\n\n // ===================================================\n // ===================================================\n // COMMON UPDATE FUNCTIONS\n // ===================================================\n // ===================================================\n function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n var value = defn.append(env, scope)\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];')\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';')\n }\n })\n\n scope(contextEnter)\n }\n\n // ===================================================\n // ===================================================\n // COMMON DRAWING FUNCTIONS\n // ===================================================\n // ===================================================\n function emitPollFramebuffer (env, scope, framebuffer, skipCheck) {\n var shared = env.shared\n\n var GL = shared.gl\n var FRAMEBUFFER_STATE = shared.framebuffer\n var EXT_DRAW_BUFFERS\n if (extDrawBuffers) {\n EXT_DRAW_BUFFERS = scope.def(shared.extensions, '.webgl_draw_buffers')\n }\n\n var constants = env.constants\n\n var DRAW_BUFFERS = constants.drawBuffer\n var BACK_BUFFER = constants.backBuffer\n\n var NEXT\n if (framebuffer) {\n NEXT = framebuffer.append(env, scope)\n } else {\n NEXT = scope.def(FRAMEBUFFER_STATE, '.next')\n }\n\n if (!skipCheck) {\n scope('if(', NEXT, '!==', FRAMEBUFFER_STATE, '.cur){')\n }\n scope(\n 'if(', NEXT, '){',\n GL, '.bindFramebuffer(', GL_FRAMEBUFFER$2, ',', NEXT, '.framebuffer);')\n if (extDrawBuffers) {\n scope(EXT_DRAW_BUFFERS, '.drawBuffersWEBGL(',\n DRAW_BUFFERS, '[', NEXT, '.colorAttachments.length]);')\n }\n scope('}else{',\n GL, '.bindFramebuffer(', GL_FRAMEBUFFER$2, ',null);')\n if (extDrawBuffers) {\n scope(EXT_DRAW_BUFFERS, '.drawBuffersWEBGL(', BACK_BUFFER, ');')\n }\n scope(\n '}',\n FRAMEBUFFER_STATE, '.cur=', NEXT, ';')\n if (!skipCheck) {\n scope('}')\n }\n }\n\n function emitPollState (env, scope, args) {\n var shared = env.shared\n\n var GL = shared.gl\n\n var CURRENT_VARS = env.current\n var NEXT_VARS = env.next\n var CURRENT_STATE = shared.current\n var NEXT_STATE = shared.next\n\n var block = env.cond(CURRENT_STATE, '.dirty')\n\n GL_STATE_NAMES.forEach(function (prop) {\n var param = propName(prop)\n if (param in args.state) {\n return\n }\n\n var NEXT, CURRENT\n if (param in NEXT_VARS) {\n NEXT = NEXT_VARS[param]\n CURRENT = CURRENT_VARS[param]\n var parts = loop(currentState[param].length, function (i) {\n return block.def(NEXT, '[', i, ']')\n })\n block(env.cond(parts.map(function (p, i) {\n return p + '!==' + CURRENT + '[' + i + ']'\n }).join('||'))\n .then(\n GL, '.', GL_VARIABLES[param], '(', parts, ');',\n parts.map(function (p, i) {\n return CURRENT + '[' + i + ']=' + p\n }).join(';'), ';'))\n } else {\n NEXT = block.def(NEXT_STATE, '.', param)\n var ifte = env.cond(NEXT, '!==', CURRENT_STATE, '.', param)\n block(ifte)\n if (param in GL_FLAGS) {\n ifte(\n env.cond(NEXT)\n .then(GL, '.enable(', GL_FLAGS[param], ');')\n .else(GL, '.disable(', GL_FLAGS[param], ');'),\n CURRENT_STATE, '.', param, '=', NEXT, ';')\n } else {\n ifte(\n GL, '.', GL_VARIABLES[param], '(', NEXT, ');',\n CURRENT_STATE, '.', param, '=', NEXT, ';')\n }\n }\n })\n if (Object.keys(args.state).length === 0) {\n block(CURRENT_STATE, '.dirty=false;')\n }\n scope(block)\n }\n\n function emitSetOptions (env, scope, options, filter) {\n var shared = env.shared\n var CURRENT_VARS = env.current\n var CURRENT_STATE = shared.current\n var GL = shared.gl\n sortState(Object.keys(options)).forEach(function (param) {\n var defn = options[param]\n if (filter && !filter(defn)) {\n return\n }\n var variable = defn.append(env, scope)\n if (GL_FLAGS[param]) {\n var flag = GL_FLAGS[param]\n if (isStatic(defn)) {\n if (variable) {\n scope(GL, '.enable(', flag, ');')\n } else {\n scope(GL, '.disable(', flag, ');')\n }\n } else {\n scope(env.cond(variable)\n .then(GL, '.enable(', flag, ');')\n .else(GL, '.disable(', flag, ');'))\n }\n scope(CURRENT_STATE, '.', param, '=', variable, ';')\n } else if (isArrayLike(variable)) {\n var CURRENT = CURRENT_VARS[param]\n scope(\n GL, '.', GL_VARIABLES[param], '(', variable, ');',\n variable.map(function (v, i) {\n return CURRENT + '[' + i + ']=' + v\n }).join(';'), ';')\n } else {\n scope(\n GL, '.', GL_VARIABLES[param], '(', variable, ');',\n CURRENT_STATE, '.', param, '=', variable, ';')\n }\n })\n }\n\n function injectExtensions (env, scope) {\n if (extInstancing) {\n env.instancing = scope.def(\n env.shared.extensions, '.angle_instanced_arrays')\n }\n }\n\n function emitProfile (env, scope, args, useScope, incrementCounter) {\n var shared = env.shared\n var STATS = env.stats\n var CURRENT_STATE = shared.current\n var TIMER = shared.timer\n var profileArg = args.profile\n\n function perfCounter () {\n if (typeof performance === 'undefined') {\n return 'Date.now()'\n } else {\n return 'performance.now()'\n }\n }\n\n var CPU_START, QUERY_COUNTER\n function emitProfileStart (block) {\n CPU_START = scope.def()\n block(CPU_START, '=', perfCounter(), ';')\n if (typeof incrementCounter === 'string') {\n block(STATS, '.count+=', incrementCounter, ';')\n } else {\n block(STATS, '.count++;')\n }\n if (timer) {\n if (useScope) {\n QUERY_COUNTER = scope.def()\n block(QUERY_COUNTER, '=', TIMER, '.getNumPendingQueries();')\n } else {\n block(TIMER, '.beginQuery(', STATS, ');')\n }\n }\n }\n\n function emitProfileEnd (block) {\n block(STATS, '.cpuTime+=', perfCounter(), '-', CPU_START, ';')\n if (timer) {\n if (useScope) {\n block(TIMER, '.pushScopeStats(',\n QUERY_COUNTER, ',',\n TIMER, '.getNumPendingQueries(),',\n STATS, ');')\n } else {\n block(TIMER, '.endQuery();')\n }\n }\n }\n\n function scopeProfile (value) {\n var prev = scope.def(CURRENT_STATE, '.profile')\n scope(CURRENT_STATE, '.profile=', value, ';')\n scope.exit(CURRENT_STATE, '.profile=', prev, ';')\n }\n\n var USE_PROFILE\n if (profileArg) {\n if (isStatic(profileArg)) {\n if (profileArg.enable) {\n emitProfileStart(scope)\n emitProfileEnd(scope.exit)\n scopeProfile('true')\n } else {\n scopeProfile('false')\n }\n return\n }\n USE_PROFILE = profileArg.append(env, scope)\n scopeProfile(USE_PROFILE)\n } else {\n USE_PROFILE = scope.def(CURRENT_STATE, '.profile')\n }\n\n var start = env.block()\n emitProfileStart(start)\n scope('if(', USE_PROFILE, '){', start, '}')\n var end = env.block()\n emitProfileEnd(end)\n scope.exit('if(', USE_PROFILE, '){', end, '}')\n }\n\n function emitAttributes (env, scope, args, attributes, filter) {\n var shared = env.shared\n\n function typeLength (x) {\n switch (x) {\n case GL_FLOAT_VEC2:\n case GL_INT_VEC2:\n case GL_BOOL_VEC2:\n return 2\n case GL_FLOAT_VEC3:\n case GL_INT_VEC3:\n case GL_BOOL_VEC3:\n return 3\n case GL_FLOAT_VEC4:\n case GL_INT_VEC4:\n case GL_BOOL_VEC4:\n return 4\n default:\n return 1\n }\n }\n\n function emitBindAttribute (ATTRIBUTE, size, record) {\n var GL = shared.gl\n\n var LOCATION = scope.def(ATTRIBUTE, '.location')\n var BINDING = scope.def(shared.attributes, '[', LOCATION, ']')\n\n var STATE = record.state\n var BUFFER = record.buffer\n var CONST_COMPONENTS = [\n record.x,\n record.y,\n record.z,\n record.w\n ]\n\n var COMMON_KEYS = [\n 'buffer',\n 'normalized',\n 'offset',\n 'stride'\n ]\n\n function emitBuffer () {\n scope(\n 'if(!', BINDING, '.buffer){',\n GL, '.enableVertexAttribArray(', LOCATION, ');}')\n\n var TYPE = record.type\n var SIZE\n if (!record.size) {\n SIZE = size\n } else {\n SIZE = scope.def(record.size, '||', size)\n }\n\n scope('if(',\n BINDING, '.type!==', TYPE, '||',\n BINDING, '.size!==', SIZE, '||',\n COMMON_KEYS.map(function (key) {\n return BINDING + '.' + key + '!==' + record[key]\n }).join('||'),\n '){',\n GL, '.bindBuffer(', GL_ARRAY_BUFFER$2, ',', BUFFER, '.buffer);',\n GL, '.vertexAttribPointer(', [\n LOCATION,\n SIZE,\n TYPE,\n record.normalized,\n record.stride,\n record.offset\n ], ');',\n BINDING, '.type=', TYPE, ';',\n BINDING, '.size=', SIZE, ';',\n COMMON_KEYS.map(function (key) {\n return BINDING + '.' + key + '=' + record[key] + ';'\n }).join(''),\n '}')\n\n if (extInstancing) {\n var DIVISOR = record.divisor\n scope(\n 'if(', BINDING, '.divisor!==', DIVISOR, '){',\n env.instancing, '.vertexAttribDivisorANGLE(', [LOCATION, DIVISOR], ');',\n BINDING, '.divisor=', DIVISOR, ';}')\n }\n }\n\n function emitConstant () {\n scope(\n 'if(', BINDING, '.buffer){',\n GL, '.disableVertexAttribArray(', LOCATION, ');',\n BINDING, '.buffer=null;',\n '}if(', CUTE_COMPONENTS.map(function (c, i) {\n return BINDING + '.' + c + '!==' + CONST_COMPONENTS[i]\n }).join('||'), '){',\n GL, '.vertexAttrib4f(', LOCATION, ',', CONST_COMPONENTS, ');',\n CUTE_COMPONENTS.map(function (c, i) {\n return BINDING + '.' + c + '=' + CONST_COMPONENTS[i] + ';'\n }).join(''),\n '}')\n }\n\n if (STATE === ATTRIB_STATE_POINTER) {\n emitBuffer()\n } else if (STATE === ATTRIB_STATE_CONSTANT) {\n emitConstant()\n } else {\n scope('if(', STATE, '===', ATTRIB_STATE_POINTER, '){')\n emitBuffer()\n scope('}else{')\n emitConstant()\n scope('}')\n }\n }\n\n attributes.forEach(function (attribute) {\n var name = attribute.name\n var arg = args.attributes[name]\n var record\n if (arg) {\n if (!filter(arg)) {\n return\n }\n record = arg.append(env, scope)\n } else {\n if (!filter(SCOPE_DECL)) {\n return\n }\n var scopeAttrib = env.scopeAttrib(name)\n check$1.optional(function () {\n env.assert(scope,\n scopeAttrib + '.state',\n 'missing attribute ' + name)\n })\n record = {}\n Object.keys(new AttributeRecord()).forEach(function (key) {\n record[key] = scope.def(scopeAttrib, '.', key)\n })\n }\n emitBindAttribute(\n env.link(attribute), typeLength(attribute.info.type), record)\n })\n }\n\n function emitUniforms (env, scope, args, uniforms, filter) {\n var shared = env.shared\n var GL = shared.gl\n\n var infix\n for (var i = 0; i < uniforms.length; ++i) {\n var uniform = uniforms[i]\n var name = uniform.name\n var type = uniform.info.type\n var arg = args.uniforms[name]\n var UNIFORM = env.link(uniform)\n var LOCATION = UNIFORM + '.location'\n\n var VALUE\n if (arg) {\n if (!filter(arg)) {\n continue\n }\n if (isStatic(arg)) {\n var value = arg.value\n check$1.command(\n value !== null && typeof value !== 'undefined',\n 'missing uniform \"' + name + '\"', env.commandStr)\n if (type === GL_SAMPLER_2D || type === GL_SAMPLER_CUBE) {\n check$1.command(\n typeof value === 'function' &&\n ((type === GL_SAMPLER_2D &&\n (value._reglType === 'texture2d' ||\n value._reglType === 'framebuffer')) ||\n (type === GL_SAMPLER_CUBE &&\n (value._reglType === 'textureCube' ||\n value._reglType === 'framebufferCube'))),\n 'invalid texture for uniform ' + name, env.commandStr)\n var TEX_VALUE = env.link(value._texture || value.color[0]._texture)\n scope(GL, '.uniform1i(', LOCATION, ',', TEX_VALUE + '.bind());')\n scope.exit(TEX_VALUE, '.unbind();')\n } else if (\n type === GL_FLOAT_MAT2 ||\n type === GL_FLOAT_MAT3 ||\n type === GL_FLOAT_MAT4) {\n check$1.optional(function () {\n check$1.command(isArrayLike(value),\n 'invalid matrix for uniform ' + name, env.commandStr)\n check$1.command(\n (type === GL_FLOAT_MAT2 && value.length === 4) ||\n (type === GL_FLOAT_MAT3 && value.length === 9) ||\n (type === GL_FLOAT_MAT4 && value.length === 16),\n 'invalid length for matrix uniform ' + name, env.commandStr)\n })\n var MAT_VALUE = env.global.def('new Float32Array([' +\n Array.prototype.slice.call(value) + '])')\n var dim = 2\n if (type === GL_FLOAT_MAT3) {\n dim = 3\n } else if (type === GL_FLOAT_MAT4) {\n dim = 4\n }\n scope(\n GL, '.uniformMatrix', dim, 'fv(',\n LOCATION, ',false,', MAT_VALUE, ');')\n } else {\n switch (type) {\n case GL_FLOAT$8:\n check$1.commandType(value, 'number', 'uniform ' + name, env.commandStr)\n infix = '1f'\n break\n case GL_FLOAT_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2f'\n break\n case GL_FLOAT_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3f'\n break\n case GL_FLOAT_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4f'\n break\n case GL_BOOL:\n check$1.commandType(value, 'boolean', 'uniform ' + name, env.commandStr)\n infix = '1i'\n break\n case GL_INT$3:\n check$1.commandType(value, 'number', 'uniform ' + name, env.commandStr)\n infix = '1i'\n break\n case GL_BOOL_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2i'\n break\n case GL_INT_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2i'\n break\n case GL_BOOL_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3i'\n break\n case GL_INT_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3i'\n break\n case GL_BOOL_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4i'\n break\n case GL_INT_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4i'\n break\n }\n scope(GL, '.uniform', infix, '(', LOCATION, ',',\n isArrayLike(value) ? Array.prototype.slice.call(value) : value,\n ');')\n }\n continue\n } else {\n VALUE = arg.append(env, scope)\n }\n } else {\n if (!filter(SCOPE_DECL)) {\n continue\n }\n VALUE = scope.def(shared.uniforms, '[', stringStore.id(name), ']')\n }\n\n if (type === GL_SAMPLER_2D) {\n check$1(!Array.isArray(VALUE), 'must specify a scalar prop for textures')\n scope(\n 'if(', VALUE, '&&', VALUE, '._reglType===\"framebuffer\"){',\n VALUE, '=', VALUE, '.color[0];',\n '}')\n } else if (type === GL_SAMPLER_CUBE) {\n check$1(!Array.isArray(VALUE), 'must specify a scalar prop for cube maps')\n scope(\n 'if(', VALUE, '&&', VALUE, '._reglType===\"framebufferCube\"){',\n VALUE, '=', VALUE, '.color[0];',\n '}')\n }\n\n // perform type validation\n check$1.optional(function () {\n function emitCheck (pred, message) {\n env.assert(scope, pred,\n 'bad data or missing for uniform \"' + name + '\". ' + message)\n }\n\n function checkType (type) {\n check$1(!Array.isArray(VALUE), 'must not specify an array type for uniform')\n emitCheck(\n 'typeof ' + VALUE + '===\"' + type + '\"',\n 'invalid type, expected ' + type)\n }\n\n function checkVector (n, type) {\n if (Array.isArray(VALUE)) {\n check$1(VALUE.length === n, 'must have length ' + n)\n } else {\n emitCheck(\n shared.isArrayLike + '(' + VALUE + ')&&' + VALUE + '.length===' + n,\n 'invalid vector, should have length ' + n, env.commandStr)\n }\n }\n\n function checkTexture (target) {\n check$1(!Array.isArray(VALUE), 'must not specify a value type')\n emitCheck(\n 'typeof ' + VALUE + '===\"function\"&&' +\n VALUE + '._reglType===\"texture' +\n (target === GL_TEXTURE_2D$3 ? '2d' : 'Cube') + '\"',\n 'invalid texture type', env.commandStr)\n }\n\n switch (type) {\n case GL_INT$3:\n checkType('number')\n break\n case GL_INT_VEC2:\n checkVector(2, 'number')\n break\n case GL_INT_VEC3:\n checkVector(3, 'number')\n break\n case GL_INT_VEC4:\n checkVector(4, 'number')\n break\n case GL_FLOAT$8:\n checkType('number')\n break\n case GL_FLOAT_VEC2:\n checkVector(2, 'number')\n break\n case GL_FLOAT_VEC3:\n checkVector(3, 'number')\n break\n case GL_FLOAT_VEC4:\n checkVector(4, 'number')\n break\n case GL_BOOL:\n checkType('boolean')\n break\n case GL_BOOL_VEC2:\n checkVector(2, 'boolean')\n break\n case GL_BOOL_VEC3:\n checkVector(3, 'boolean')\n break\n case GL_BOOL_VEC4:\n checkVector(4, 'boolean')\n break\n case GL_FLOAT_MAT2:\n checkVector(4, 'number')\n break\n case GL_FLOAT_MAT3:\n checkVector(9, 'number')\n break\n case GL_FLOAT_MAT4:\n checkVector(16, 'number')\n break\n case GL_SAMPLER_2D:\n checkTexture(GL_TEXTURE_2D$3)\n break\n case GL_SAMPLER_CUBE:\n checkTexture(GL_TEXTURE_CUBE_MAP$2)\n break\n }\n })\n\n var unroll = 1\n switch (type) {\n case GL_SAMPLER_2D:\n case GL_SAMPLER_CUBE:\n var TEX = scope.def(VALUE, '._texture')\n scope(GL, '.uniform1i(', LOCATION, ',', TEX, '.bind());')\n scope.exit(TEX, '.unbind();')\n continue\n\n case GL_INT$3:\n case GL_BOOL:\n infix = '1i'\n break\n\n case GL_INT_VEC2:\n case GL_BOOL_VEC2:\n infix = '2i'\n unroll = 2\n break\n\n case GL_INT_VEC3:\n case GL_BOOL_VEC3:\n infix = '3i'\n unroll = 3\n break\n\n case GL_INT_VEC4:\n case GL_BOOL_VEC4:\n infix = '4i'\n unroll = 4\n break\n\n case GL_FLOAT$8:\n infix = '1f'\n break\n\n case GL_FLOAT_VEC2:\n infix = '2f'\n unroll = 2\n break\n\n case GL_FLOAT_VEC3:\n infix = '3f'\n unroll = 3\n break\n\n case GL_FLOAT_VEC4:\n infix = '4f'\n unroll = 4\n break\n\n case GL_FLOAT_MAT2:\n infix = 'Matrix2fv'\n break\n\n case GL_FLOAT_MAT3:\n infix = 'Matrix3fv'\n break\n\n case GL_FLOAT_MAT4:\n infix = 'Matrix4fv'\n break\n }\n\n scope(GL, '.uniform', infix, '(', LOCATION, ',')\n if (infix.charAt(0) === 'M') {\n var matSize = Math.pow(type - GL_FLOAT_MAT2 + 2, 2)\n var STORAGE = env.global.def('new Float32Array(', matSize, ')')\n if (Array.isArray(VALUE)) {\n scope(\n 'false,(',\n loop(matSize, function (i) {\n return STORAGE + '[' + i + ']=' + VALUE[i]\n }), ',', STORAGE, ')')\n } else {\n scope(\n 'false,(Array.isArray(', VALUE, ')||', VALUE, ' instanceof Float32Array)?', VALUE, ':(',\n loop(matSize, function (i) {\n return STORAGE + '[' + i + ']=' + VALUE + '[' + i + ']'\n }), ',', STORAGE, ')')\n }\n } else if (unroll > 1) {\n scope(loop(unroll, function (i) {\n return Array.isArray(VALUE) ? VALUE[i] : VALUE + '[' + i + ']'\n }))\n } else {\n check$1(!Array.isArray(VALUE), 'uniform value must not be an array')\n scope(VALUE)\n }\n scope(');')\n }\n }\n\n function emitDraw (env, outer, inner, args) {\n var shared = env.shared\n var GL = shared.gl\n var DRAW_STATE = shared.draw\n\n var drawOptions = args.draw\n\n function emitElements () {\n var defn = drawOptions.elements\n var ELEMENTS\n var scope = outer\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n scope = inner\n }\n ELEMENTS = defn.append(env, scope)\n } else {\n ELEMENTS = scope.def(DRAW_STATE, '.', S_ELEMENTS)\n }\n if (ELEMENTS) {\n scope(\n 'if(' + ELEMENTS + ')' +\n GL + '.bindBuffer(' + GL_ELEMENT_ARRAY_BUFFER$1 + ',' + ELEMENTS + '.buffer.buffer);')\n }\n return ELEMENTS\n }\n\n function emitCount () {\n var defn = drawOptions.count\n var COUNT\n var scope = outer\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n scope = inner\n }\n COUNT = defn.append(env, scope)\n check$1.optional(function () {\n if (defn.MISSING) {\n env.assert(outer, 'false', 'missing vertex count')\n }\n if (defn.DYNAMIC) {\n env.assert(scope, COUNT + '>=0', 'missing vertex count')\n }\n })\n } else {\n COUNT = scope.def(DRAW_STATE, '.', S_COUNT)\n check$1.optional(function () {\n env.assert(scope, COUNT + '>=0', 'missing vertex count')\n })\n }\n return COUNT\n }\n\n var ELEMENTS = emitElements()\n function emitValue (name) {\n var defn = drawOptions[name]\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n return defn.append(env, inner)\n } else {\n return defn.append(env, outer)\n }\n } else {\n return outer.def(DRAW_STATE, '.', name)\n }\n }\n\n var PRIMITIVE = emitValue(S_PRIMITIVE)\n var OFFSET = emitValue(S_OFFSET)\n\n var COUNT = emitCount()\n if (typeof COUNT === 'number') {\n if (COUNT === 0) {\n return\n }\n } else {\n inner('if(', COUNT, '){')\n inner.exit('}')\n }\n\n var INSTANCES, EXT_INSTANCING\n if (extInstancing) {\n INSTANCES = emitValue(S_INSTANCES)\n EXT_INSTANCING = env.instancing\n }\n\n var ELEMENT_TYPE = ELEMENTS + '.type'\n\n var elementsStatic = drawOptions.elements && isStatic(drawOptions.elements)\n\n function emitInstancing () {\n function drawElements () {\n inner(EXT_INSTANCING, '.drawElementsInstancedANGLE(', [\n PRIMITIVE,\n COUNT,\n ELEMENT_TYPE,\n OFFSET + '<<((' + ELEMENT_TYPE + '-' + GL_UNSIGNED_BYTE$8 + ')>>1)',\n INSTANCES\n ], ');')\n }\n\n function drawArrays () {\n inner(EXT_INSTANCING, '.drawArraysInstancedANGLE(',\n [PRIMITIVE, OFFSET, COUNT, INSTANCES], ');')\n }\n\n if (ELEMENTS) {\n if (!elementsStatic) {\n inner('if(', ELEMENTS, '){')\n drawElements()\n inner('}else{')\n drawArrays()\n inner('}')\n } else {\n drawElements()\n }\n } else {\n drawArrays()\n }\n }\n\n function emitRegular () {\n function drawElements () {\n inner(GL + '.drawElements(' + [\n PRIMITIVE,\n COUNT,\n ELEMENT_TYPE,\n OFFSET + '<<((' + ELEMENT_TYPE + '-' + GL_UNSIGNED_BYTE$8 + ')>>1)'\n ] + ');')\n }\n\n function drawArrays () {\n inner(GL + '.drawArrays(' + [PRIMITIVE, OFFSET, COUNT] + ');')\n }\n\n if (ELEMENTS) {\n if (!elementsStatic) {\n inner('if(', ELEMENTS, '){')\n drawElements()\n inner('}else{')\n drawArrays()\n inner('}')\n } else {\n drawElements()\n }\n } else {\n drawArrays()\n }\n }\n\n if (extInstancing && (typeof INSTANCES !== 'number' || INSTANCES >= 0)) {\n if (typeof INSTANCES === 'string') {\n inner('if(', INSTANCES, '>0){')\n emitInstancing()\n inner('}else if(', INSTANCES, '<0){')\n emitRegular()\n inner('}')\n } else {\n emitInstancing()\n }\n } else {\n emitRegular()\n }\n }\n\n function createBody (emitBody, parentEnv, args, program, count) {\n var env = createREGLEnvironment()\n var scope = env.proc('body', count)\n check$1.optional(function () {\n env.commandStr = parentEnv.commandStr\n env.command = env.link(parentEnv.commandStr)\n })\n if (extInstancing) {\n env.instancing = scope.def(\n env.shared.extensions, '.angle_instanced_arrays')\n }\n emitBody(env, scope, args, program)\n return env.compile().body\n }\n\n // ===================================================\n // ===================================================\n // DRAW PROC\n // ===================================================\n // ===================================================\n function emitDrawBody (env, draw, args, program) {\n injectExtensions(env, draw)\n if (args.useVAO) {\n if (args.drawVAO) {\n draw(env.shared.vao, '.setVAO(', args.drawVAO.append(env, draw), ');')\n } else {\n draw(env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n }\n } else {\n draw(env.shared.vao, '.setVAO(null);')\n emitAttributes(env, draw, args, program.attributes, function () {\n return true\n })\n }\n emitUniforms(env, draw, args, program.uniforms, function () {\n return true\n })\n emitDraw(env, draw, draw, args)\n }\n\n function emitDrawProc (env, args) {\n var draw = env.proc('draw', 1)\n\n injectExtensions(env, draw)\n\n emitContext(env, draw, args.context)\n emitPollFramebuffer(env, draw, args.framebuffer)\n\n emitPollState(env, draw, args)\n emitSetOptions(env, draw, args.state)\n\n emitProfile(env, draw, args, false, true)\n\n var program = args.shader.progVar.append(env, draw)\n draw(env.shared.gl, '.useProgram(', program, '.program);')\n\n if (args.shader.program) {\n emitDrawBody(env, draw, args, args.shader.program)\n } else {\n draw(env.shared.vao, '.setVAO(null);')\n var drawCache = env.global.def('{}')\n var PROG_ID = draw.def(program, '.id')\n var CACHED_PROC = draw.def(drawCache, '[', PROG_ID, ']')\n draw(\n env.cond(CACHED_PROC)\n .then(CACHED_PROC, '.call(this,a0);')\n .else(\n CACHED_PROC, '=', drawCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(emitDrawBody, env, args, program, 1)\n }), '(', program, ');',\n CACHED_PROC, '.call(this,a0);'))\n }\n\n if (Object.keys(args.state).length > 0) {\n draw(env.shared.current, '.dirty=true;')\n }\n }\n\n // ===================================================\n // ===================================================\n // BATCH PROC\n // ===================================================\n // ===================================================\n\n function emitBatchDynamicShaderBody (env, scope, args, program) {\n env.batchId = 'a1'\n\n injectExtensions(env, scope)\n\n function all () {\n return true\n }\n\n emitAttributes(env, scope, args, program.attributes, all)\n emitUniforms(env, scope, args, program.uniforms, all)\n emitDraw(env, scope, scope, args)\n }\n\n function emitBatchBody (env, scope, args, program) {\n injectExtensions(env, scope)\n\n var contextDynamic = args.contextDep\n\n var BATCH_ID = scope.def()\n var PROP_LIST = 'a0'\n var NUM_PROPS = 'a1'\n var PROPS = scope.def()\n env.shared.props = PROPS\n env.batchId = BATCH_ID\n\n var outer = env.scope()\n var inner = env.scope()\n\n scope(\n outer.entry,\n 'for(', BATCH_ID, '=0;', BATCH_ID, '<', NUM_PROPS, ';++', BATCH_ID, '){',\n PROPS, '=', PROP_LIST, '[', BATCH_ID, '];',\n inner,\n '}',\n outer.exit)\n\n function isInnerDefn (defn) {\n return ((defn.contextDep && contextDynamic) || defn.propDep)\n }\n\n function isOuterDefn (defn) {\n return !isInnerDefn(defn)\n }\n\n if (args.needsContext) {\n emitContext(env, inner, args.context)\n }\n if (args.needsFramebuffer) {\n emitPollFramebuffer(env, inner, args.framebuffer)\n }\n emitSetOptions(env, inner, args.state, isInnerDefn)\n\n if (args.profile && isInnerDefn(args.profile)) {\n emitProfile(env, inner, args, false, true)\n }\n\n if (!program) {\n var progCache = env.global.def('{}')\n var PROGRAM = args.shader.progVar.append(env, inner)\n var PROG_ID = inner.def(PROGRAM, '.id')\n var CACHED_PROC = inner.def(progCache, '[', PROG_ID, ']')\n inner(\n env.shared.gl, '.useProgram(', PROGRAM, '.program);',\n 'if(!', CACHED_PROC, '){',\n CACHED_PROC, '=', progCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(\n emitBatchDynamicShaderBody, env, args, program, 2)\n }), '(', PROGRAM, ');}',\n CACHED_PROC, '.call(this,a0[', BATCH_ID, '],', BATCH_ID, ');')\n } else {\n if (args.useVAO) {\n if (args.drawVAO) {\n if (isInnerDefn(args.drawVAO)) {\n // vao is a prop\n inner(env.shared.vao, '.setVAO(', args.drawVAO.append(env, inner), ');')\n } else {\n // vao is invariant\n outer(env.shared.vao, '.setVAO(', args.drawVAO.append(env, outer), ');')\n }\n } else {\n // scoped vao binding\n outer(env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n }\n } else {\n outer(env.shared.vao, '.setVAO(null);')\n emitAttributes(env, outer, args, program.attributes, isOuterDefn)\n emitAttributes(env, inner, args, program.attributes, isInnerDefn)\n }\n emitUniforms(env, outer, args, program.uniforms, isOuterDefn)\n emitUniforms(env, inner, args, program.uniforms, isInnerDefn)\n emitDraw(env, outer, inner, args)\n }\n }\n\n function emitBatchProc (env, args) {\n var batch = env.proc('batch', 2)\n env.batchId = '0'\n\n injectExtensions(env, batch)\n\n // Check if any context variables depend on props\n var contextDynamic = false\n var needsContext = true\n Object.keys(args.context).forEach(function (name) {\n contextDynamic = contextDynamic || args.context[name].propDep\n })\n if (!contextDynamic) {\n emitContext(env, batch, args.context)\n needsContext = false\n }\n\n // framebuffer state affects framebufferWidth/height context vars\n var framebuffer = args.framebuffer\n var needsFramebuffer = false\n if (framebuffer) {\n if (framebuffer.propDep) {\n contextDynamic = needsFramebuffer = true\n } else if (framebuffer.contextDep && contextDynamic) {\n needsFramebuffer = true\n }\n if (!needsFramebuffer) {\n emitPollFramebuffer(env, batch, framebuffer)\n }\n } else {\n emitPollFramebuffer(env, batch, null)\n }\n\n // viewport is weird because it can affect context vars\n if (args.state.viewport && args.state.viewport.propDep) {\n contextDynamic = true\n }\n\n function isInnerDefn (defn) {\n return (defn.contextDep && contextDynamic) || defn.propDep\n }\n\n // set webgl options\n emitPollState(env, batch, args)\n emitSetOptions(env, batch, args.state, function (defn) {\n return !isInnerDefn(defn)\n })\n\n if (!args.profile || !isInnerDefn(args.profile)) {\n emitProfile(env, batch, args, false, 'a1')\n }\n\n // Save these values to args so that the batch body routine can use them\n args.contextDep = contextDynamic\n args.needsContext = needsContext\n args.needsFramebuffer = needsFramebuffer\n\n // determine if shader is dynamic\n var progDefn = args.shader.progVar\n if ((progDefn.contextDep && contextDynamic) || progDefn.propDep) {\n emitBatchBody(\n env,\n batch,\n args,\n null)\n } else {\n var PROGRAM = progDefn.append(env, batch)\n batch(env.shared.gl, '.useProgram(', PROGRAM, '.program);')\n if (args.shader.program) {\n emitBatchBody(\n env,\n batch,\n args,\n args.shader.program)\n } else {\n batch(env.shared.vao, '.setVAO(null);')\n var batchCache = env.global.def('{}')\n var PROG_ID = batch.def(PROGRAM, '.id')\n var CACHED_PROC = batch.def(batchCache, '[', PROG_ID, ']')\n batch(\n env.cond(CACHED_PROC)\n .then(CACHED_PROC, '.call(this,a0,a1);')\n .else(\n CACHED_PROC, '=', batchCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(emitBatchBody, env, args, program, 2)\n }), '(', PROGRAM, ');',\n CACHED_PROC, '.call(this,a0,a1);'))\n }\n }\n\n if (Object.keys(args.state).length > 0) {\n batch(env.shared.current, '.dirty=true;')\n }\n }\n\n // ===================================================\n // ===================================================\n // SCOPE COMMAND\n // ===================================================\n // ===================================================\n function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3)\n env.batchId = 'a2'\n\n var shared = env.shared\n var CURRENT_STATE = shared.current\n\n emitContext(env, scope, args.context)\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope)\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name]\n var value = defn.append(env, scope)\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v)\n })\n } else {\n scope.set(shared.next, '.' + name, value)\n }\n })\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt]\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope))\n })\n\n Object.keys(args.uniforms).forEach(function (opt) {\n var value = args.uniforms[opt].append(env, scope)\n if (Array.isArray(value)) {\n value = '[' + value.join() + ']'\n }\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n value)\n })\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope)\n var scopeAttrib = env.scopeAttrib(name)\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop])\n })\n })\n\n if (args.scopeVAO) {\n scope.set(shared.vao, '.targetVAO', args.scopeVAO.append(env, scope))\n }\n\n function saveShader (name) {\n var shader = args.shader[name]\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope))\n }\n }\n saveShader(S_VERT)\n saveShader(S_FRAG)\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;')\n scope.exit(CURRENT_STATE, '.dirty=true;')\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');')\n }\n\n function isDynamicObject (object) {\n if (typeof object !== 'object' || isArrayLike(object)) {\n return\n }\n var props = Object.keys(object)\n for (var i = 0; i < props.length; ++i) {\n if (dynamic.isDynamic(object[props[i]])) {\n return true\n }\n }\n return false\n }\n\n function splatObject (env, options, name) {\n var object = options.static[name]\n if (!object || !isDynamicObject(object)) {\n return\n }\n\n var globals = env.global\n var keys = Object.keys(object)\n var thisDep = false\n var contextDep = false\n var propDep = false\n var objectRef = env.global.def('{}')\n keys.forEach(function (key) {\n var value = object[key]\n if (dynamic.isDynamic(value)) {\n if (typeof value === 'function') {\n value = object[key] = dynamic.unbox(value)\n }\n var deps = createDynamicDecl(value, null)\n thisDep = thisDep || deps.thisDep\n propDep = propDep || deps.propDep\n contextDep = contextDep || deps.contextDep\n } else {\n globals(objectRef, '.', key, '=')\n switch (typeof value) {\n case 'number':\n globals(value)\n break\n case 'string':\n globals('\"', value, '\"')\n break\n case 'object':\n if (Array.isArray(value)) {\n globals('[', value.join(), ']')\n }\n break\n default:\n globals(env.link(value))\n break\n }\n globals(';')\n }\n })\n\n function appendBlock (env, block) {\n keys.forEach(function (key) {\n var value = object[key]\n if (!dynamic.isDynamic(value)) {\n return\n }\n var ref = env.invoke(block, value)\n block(objectRef, '.', key, '=', ref, ';')\n })\n }\n\n options.dynamic[name] = new dynamic.DynamicVariable(DYN_THUNK, {\n thisDep: thisDep,\n contextDep: contextDep,\n propDep: propDep,\n ref: objectRef,\n append: appendBlock\n })\n delete options.static[name]\n }\n\n // ===========================================================================\n // ===========================================================================\n // MAIN DRAW COMMAND\n // ===========================================================================\n // ===========================================================================\n function compileCommand (options, attributes, uniforms, context, stats) {\n var env = createREGLEnvironment()\n\n // link stats, so that we can easily access it in the program.\n env.stats = env.link(stats)\n\n // splat options and attributes to allow for dynamic nested properties\n Object.keys(attributes.static).forEach(function (key) {\n splatObject(env, attributes, key)\n })\n NESTED_OPTIONS.forEach(function (name) {\n splatObject(env, options, name)\n })\n\n var args = parseArguments(options, attributes, uniforms, context, env)\n\n emitDrawProc(env, args)\n emitScopeProc(env, args)\n emitBatchProc(env, args)\n\n return extend(env.compile(), {\n destroy: function () {\n args.shader.program.destroy()\n }\n })\n }\n\n // ===========================================================================\n // ===========================================================================\n // POLL / REFRESH\n // ===========================================================================\n // ===========================================================================\n return {\n next: nextState,\n current: currentState,\n procs: (function () {\n var env = createREGLEnvironment()\n var poll = env.proc('poll')\n var refresh = env.proc('refresh')\n var common = env.block()\n poll(common)\n refresh(common)\n\n var shared = env.shared\n var GL = shared.gl\n var NEXT_STATE = shared.next\n var CURRENT_STATE = shared.current\n\n common(CURRENT_STATE, '.dirty=false;')\n\n emitPollFramebuffer(env, poll)\n emitPollFramebuffer(env, refresh, null, true)\n\n // Refresh updates all attribute state changes\n var INSTANCING\n if (extInstancing) {\n INSTANCING = env.link(extInstancing)\n }\n\n // update vertex array bindings\n if (extensions.oes_vertex_array_object) {\n refresh(env.link(extensions.oes_vertex_array_object), '.bindVertexArrayOES(null);')\n }\n for (var i = 0; i < limits.maxAttributes; ++i) {\n var BINDING = refresh.def(shared.attributes, '[', i, ']')\n var ifte = env.cond(BINDING, '.buffer')\n ifte.then(\n GL, '.enableVertexAttribArray(', i, ');',\n GL, '.bindBuffer(',\n GL_ARRAY_BUFFER$2, ',',\n BINDING, '.buffer.buffer);',\n GL, '.vertexAttribPointer(',\n i, ',',\n BINDING, '.size,',\n BINDING, '.type,',\n BINDING, '.normalized,',\n BINDING, '.stride,',\n BINDING, '.offset);'\n ).else(\n GL, '.disableVertexAttribArray(', i, ');',\n GL, '.vertexAttrib4f(',\n i, ',',\n BINDING, '.x,',\n BINDING, '.y,',\n BINDING, '.z,',\n BINDING, '.w);',\n BINDING, '.buffer=null;')\n refresh(ifte)\n if (extInstancing) {\n refresh(\n INSTANCING, '.vertexAttribDivisorANGLE(',\n i, ',',\n BINDING, '.divisor);')\n }\n }\n refresh(\n env.shared.vao, '.currentVAO=null;',\n env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n\n Object.keys(GL_FLAGS).forEach(function (flag) {\n var cap = GL_FLAGS[flag]\n var NEXT = common.def(NEXT_STATE, '.', flag)\n var block = env.block()\n block('if(', NEXT, '){',\n GL, '.enable(', cap, ')}else{',\n GL, '.disable(', cap, ')}',\n CURRENT_STATE, '.', flag, '=', NEXT, ';')\n refresh(block)\n poll(\n 'if(', NEXT, '!==', CURRENT_STATE, '.', flag, '){',\n block,\n '}')\n })\n\n Object.keys(GL_VARIABLES).forEach(function (name) {\n var func = GL_VARIABLES[name]\n var init = currentState[name]\n var NEXT, CURRENT\n var block = env.block()\n block(GL, '.', func, '(')\n if (isArrayLike(init)) {\n var n = init.length\n NEXT = env.global.def(NEXT_STATE, '.', name)\n CURRENT = env.global.def(CURRENT_STATE, '.', name)\n block(\n loop(n, function (i) {\n return NEXT + '[' + i + ']'\n }), ');',\n loop(n, function (i) {\n return CURRENT + '[' + i + ']=' + NEXT + '[' + i + '];'\n }).join(''))\n poll(\n 'if(', loop(n, function (i) {\n return NEXT + '[' + i + ']!==' + CURRENT + '[' + i + ']'\n }).join('||'), '){',\n block,\n '}')\n } else {\n NEXT = common.def(NEXT_STATE, '.', name)\n CURRENT = common.def(CURRENT_STATE, '.', name)\n block(\n NEXT, ');',\n CURRENT_STATE, '.', name, '=', NEXT, ';')\n poll(\n 'if(', NEXT, '!==', CURRENT, '){',\n block,\n '}')\n }\n refresh(block)\n })\n\n return env.compile()\n })(),\n compile: compileCommand\n }\n}\n\nfunction stats () {\n return {\n vaoCount: 0,\n bufferCount: 0,\n elementsCount: 0,\n framebufferCount: 0,\n shaderCount: 0,\n textureCount: 0,\n cubeCount: 0,\n renderbufferCount: 0,\n maxTextureUnits: 0\n }\n}\n\nvar GL_QUERY_RESULT_EXT = 0x8866\nvar GL_QUERY_RESULT_AVAILABLE_EXT = 0x8867\nvar GL_TIME_ELAPSED_EXT = 0x88BF\n\nvar createTimer = function (gl, extensions) {\n if (!extensions.ext_disjoint_timer_query) {\n return null\n }\n\n // QUERY POOL BEGIN\n var queryPool = []\n function allocQuery () {\n return queryPool.pop() || extensions.ext_disjoint_timer_query.createQueryEXT()\n }\n function freeQuery (query) {\n queryPool.push(query)\n }\n // QUERY POOL END\n\n var pendingQueries = []\n function beginQuery (stats) {\n var query = allocQuery()\n extensions.ext_disjoint_timer_query.beginQueryEXT(GL_TIME_ELAPSED_EXT, query)\n pendingQueries.push(query)\n pushScopeStats(pendingQueries.length - 1, pendingQueries.length, stats)\n }\n\n function endQuery () {\n extensions.ext_disjoint_timer_query.endQueryEXT(GL_TIME_ELAPSED_EXT)\n }\n\n //\n // Pending stats pool.\n //\n function PendingStats () {\n this.startQueryIndex = -1\n this.endQueryIndex = -1\n this.sum = 0\n this.stats = null\n }\n var pendingStatsPool = []\n function allocPendingStats () {\n return pendingStatsPool.pop() || new PendingStats()\n }\n function freePendingStats (pendingStats) {\n pendingStatsPool.push(pendingStats)\n }\n // Pending stats pool end\n\n var pendingStats = []\n function pushScopeStats (start, end, stats) {\n var ps = allocPendingStats()\n ps.startQueryIndex = start\n ps.endQueryIndex = end\n ps.sum = 0\n ps.stats = stats\n pendingStats.push(ps)\n }\n\n // we should call this at the beginning of the frame,\n // in order to update gpuTime\n var timeSum = []\n var queryPtr = []\n function update () {\n var ptr, i\n\n var n = pendingQueries.length\n if (n === 0) {\n return\n }\n\n // Reserve space\n queryPtr.length = Math.max(queryPtr.length, n + 1)\n timeSum.length = Math.max(timeSum.length, n + 1)\n timeSum[0] = 0\n queryPtr[0] = 0\n\n // Update all pending timer queries\n var queryTime = 0\n ptr = 0\n for (i = 0; i < pendingQueries.length; ++i) {\n var query = pendingQueries[i]\n if (extensions.ext_disjoint_timer_query.getQueryObjectEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT)) {\n queryTime += extensions.ext_disjoint_timer_query.getQueryObjectEXT(query, GL_QUERY_RESULT_EXT)\n freeQuery(query)\n } else {\n pendingQueries[ptr++] = query\n }\n timeSum[i + 1] = queryTime\n queryPtr[i + 1] = ptr\n }\n pendingQueries.length = ptr\n\n // Update all pending stat queries\n ptr = 0\n for (i = 0; i < pendingStats.length; ++i) {\n var stats = pendingStats[i]\n var start = stats.startQueryIndex\n var end = stats.endQueryIndex\n stats.sum += timeSum[end] - timeSum[start]\n var startPtr = queryPtr[start]\n var endPtr = queryPtr[end]\n if (endPtr === startPtr) {\n stats.stats.gpuTime += stats.sum / 1e6\n freePendingStats(stats)\n } else {\n stats.startQueryIndex = startPtr\n stats.endQueryIndex = endPtr\n pendingStats[ptr++] = stats\n }\n }\n pendingStats.length = ptr\n }\n\n return {\n beginQuery: beginQuery,\n endQuery: endQuery,\n pushScopeStats: pushScopeStats,\n update: update,\n getNumPendingQueries: function () {\n return pendingQueries.length\n },\n clear: function () {\n queryPool.push.apply(queryPool, pendingQueries)\n for (var i = 0; i < queryPool.length; i++) {\n extensions.ext_disjoint_timer_query.deleteQueryEXT(queryPool[i])\n }\n pendingQueries.length = 0\n queryPool.length = 0\n },\n restore: function () {\n pendingQueries.length = 0\n queryPool.length = 0\n }\n }\n}\n\nvar GL_COLOR_BUFFER_BIT = 16384\nvar GL_DEPTH_BUFFER_BIT = 256\nvar GL_STENCIL_BUFFER_BIT = 1024\n\nvar GL_ARRAY_BUFFER = 34962\n\nvar CONTEXT_LOST_EVENT = 'webglcontextlost'\nvar CONTEXT_RESTORED_EVENT = 'webglcontextrestored'\n\nvar DYN_PROP = 1\nvar DYN_CONTEXT = 2\nvar DYN_STATE = 3\n\nfunction find (haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) {\n return i\n }\n }\n return -1\n}\n\nfunction wrapREGL (args) {\n var config = parseArgs(args)\n if (!config) {\n return null\n }\n\n var gl = config.gl\n var glAttributes = gl.getContextAttributes()\n var contextLost = gl.isContextLost()\n\n var extensionState = createExtensionCache(gl, config)\n if (!extensionState) {\n return null\n }\n\n var stringStore = createStringStore()\n var stats$$1 = stats()\n var extensions = extensionState.extensions\n var timer = createTimer(gl, extensions)\n\n var START_TIME = clock()\n var WIDTH = gl.drawingBufferWidth\n var HEIGHT = gl.drawingBufferHeight\n\n var contextState = {\n tick: 0,\n time: 0,\n viewportWidth: WIDTH,\n viewportHeight: HEIGHT,\n framebufferWidth: WIDTH,\n framebufferHeight: HEIGHT,\n drawingBufferWidth: WIDTH,\n drawingBufferHeight: HEIGHT,\n pixelRatio: config.pixelRatio\n }\n var uniformState = {}\n var drawState = {\n elements: null,\n primitive: 4, // GL_TRIANGLES\n count: -1,\n offset: 0,\n instances: -1\n }\n\n var limits = wrapLimits(gl, extensions)\n var bufferState = wrapBufferState(\n gl,\n stats$$1,\n config,\n destroyBuffer)\n var attributeState = wrapAttributeState(\n gl,\n extensions,\n limits,\n stats$$1,\n bufferState)\n function destroyBuffer (buffer) {\n return attributeState.destroyBuffer(buffer)\n }\n var elementState = wrapElementsState(gl, extensions, bufferState, stats$$1)\n var shaderState = wrapShaderState(gl, stringStore, stats$$1, config)\n var textureState = createTextureSet(\n gl,\n extensions,\n limits,\n function () { core.procs.poll() },\n contextState,\n stats$$1,\n config)\n var renderbufferState = wrapRenderbuffers(gl, extensions, limits, stats$$1, config)\n var framebufferState = wrapFBOState(\n gl,\n extensions,\n limits,\n textureState,\n renderbufferState,\n stats$$1)\n var core = reglCore(\n gl,\n stringStore,\n extensions,\n limits,\n bufferState,\n elementState,\n textureState,\n framebufferState,\n uniformState,\n attributeState,\n shaderState,\n drawState,\n contextState,\n timer,\n config)\n var readPixels = wrapReadPixels(\n gl,\n framebufferState,\n core.procs.poll,\n contextState,\n glAttributes, extensions, limits)\n\n var nextState = core.next\n var canvas = gl.canvas\n\n var rafCallbacks = []\n var lossCallbacks = []\n var restoreCallbacks = []\n var destroyCallbacks = [config.onDestroy]\n\n var activeRAF = null\n function handleRAF () {\n if (rafCallbacks.length === 0) {\n if (timer) {\n timer.update()\n }\n activeRAF = null\n return\n }\n\n // schedule next animation frame\n activeRAF = raf.next(handleRAF)\n\n // poll for changes\n poll()\n\n // fire a callback for all pending rafs\n for (var i = rafCallbacks.length - 1; i >= 0; --i) {\n var cb = rafCallbacks[i]\n if (cb) {\n cb(contextState, null, 0)\n }\n }\n\n // flush all pending webgl calls\n gl.flush()\n\n // poll GPU timers *after* gl.flush so we don't delay command dispatch\n if (timer) {\n timer.update()\n }\n }\n\n function startRAF () {\n if (!activeRAF && rafCallbacks.length > 0) {\n activeRAF = raf.next(handleRAF)\n }\n }\n\n function stopRAF () {\n if (activeRAF) {\n raf.cancel(handleRAF)\n activeRAF = null\n }\n }\n\n function handleContextLoss (event) {\n event.preventDefault()\n\n // set context lost flag\n contextLost = true\n\n // pause request animation frame\n stopRAF()\n\n // lose context\n lossCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n function handleContextRestored (event) {\n // clear error code\n gl.getError()\n\n // clear context lost flag\n contextLost = false\n\n // refresh state\n extensionState.restore()\n shaderState.restore()\n bufferState.restore()\n textureState.restore()\n renderbufferState.restore()\n framebufferState.restore()\n attributeState.restore()\n if (timer) {\n timer.restore()\n }\n\n // refresh state\n core.procs.refresh()\n\n // restart RAF\n startRAF()\n\n // restore context\n restoreCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n if (canvas) {\n canvas.addEventListener(CONTEXT_LOST_EVENT, handleContextLoss, false)\n canvas.addEventListener(CONTEXT_RESTORED_EVENT, handleContextRestored, false)\n }\n\n function destroy () {\n rafCallbacks.length = 0\n stopRAF()\n\n if (canvas) {\n canvas.removeEventListener(CONTEXT_LOST_EVENT, handleContextLoss)\n canvas.removeEventListener(CONTEXT_RESTORED_EVENT, handleContextRestored)\n }\n\n shaderState.clear()\n framebufferState.clear()\n renderbufferState.clear()\n textureState.clear()\n elementState.clear()\n bufferState.clear()\n attributeState.clear()\n\n if (timer) {\n timer.clear()\n }\n\n destroyCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n function compileProcedure (options) {\n check$1(!!options, 'invalid args to regl({...})')\n check$1.type(options, 'object', 'invalid args to regl({...})')\n\n function flattenNestedOptions (options) {\n var result = extend({}, options)\n delete result.uniforms\n delete result.attributes\n delete result.context\n delete result.vao\n\n if ('stencil' in result && result.stencil.op) {\n result.stencil.opBack = result.stencil.opFront = result.stencil.op\n delete result.stencil.op\n }\n\n function merge (name) {\n if (name in result) {\n var child = result[name]\n delete result[name]\n Object.keys(child).forEach(function (prop) {\n result[name + '.' + prop] = child[prop]\n })\n }\n }\n merge('blend')\n merge('depth')\n merge('cull')\n merge('stencil')\n merge('polygonOffset')\n merge('scissor')\n merge('sample')\n\n if ('vao' in options) {\n result.vao = options.vao\n }\n\n return result\n }\n\n function separateDynamic (object, useArrays) {\n var staticItems = {}\n var dynamicItems = {}\n Object.keys(object).forEach(function (option) {\n var value = object[option]\n if (dynamic.isDynamic(value)) {\n dynamicItems[option] = dynamic.unbox(value, option)\n return\n } else if (useArrays && Array.isArray(value)) {\n for (var i = 0; i < value.length; ++i) {\n if (dynamic.isDynamic(value[i])) {\n dynamicItems[option] = dynamic.unbox(value, option)\n return\n }\n }\n }\n staticItems[option] = value\n })\n return {\n dynamic: dynamicItems,\n static: staticItems\n }\n }\n\n // Treat context variables separate from other dynamic variables\n var context = separateDynamic(options.context || {}, true)\n var uniforms = separateDynamic(options.uniforms || {}, true)\n var attributes = separateDynamic(options.attributes || {}, false)\n var opts = separateDynamic(flattenNestedOptions(options), false)\n\n var stats$$1 = {\n gpuTime: 0.0,\n cpuTime: 0.0,\n count: 0\n }\n\n var compiled = core.compile(opts, attributes, uniforms, context, stats$$1)\n\n var draw = compiled.draw\n var batch = compiled.batch\n var scope = compiled.scope\n\n // FIXME: we should modify code generation for batch commands so this\n // isn't necessary\n var EMPTY_ARRAY = []\n function reserve (count) {\n while (EMPTY_ARRAY.length < count) {\n EMPTY_ARRAY.push(null)\n }\n return EMPTY_ARRAY\n }\n\n function REGLCommand (args, body) {\n var i\n if (contextLost) {\n check$1.raise('context lost')\n }\n if (typeof args === 'function') {\n return scope.call(this, null, args, 0)\n } else if (typeof body === 'function') {\n if (typeof args === 'number') {\n for (i = 0; i < args; ++i) {\n scope.call(this, null, body, i)\n }\n } else if (Array.isArray(args)) {\n for (i = 0; i < args.length; ++i) {\n scope.call(this, args[i], body, i)\n }\n } else {\n return scope.call(this, args, body, 0)\n }\n } else if (typeof args === 'number') {\n if (args > 0) {\n return batch.call(this, reserve(args | 0), args | 0)\n }\n } else if (Array.isArray(args)) {\n if (args.length) {\n return batch.call(this, args, args.length)\n }\n } else {\n return draw.call(this, args)\n }\n }\n\n return extend(REGLCommand, {\n stats: stats$$1,\n destroy: function () {\n compiled.destroy()\n }\n })\n }\n\n var setFBO = framebufferState.setFBO = compileProcedure({\n framebuffer: dynamic.define.call(null, DYN_PROP, 'framebuffer')\n })\n\n function clearImpl (_, options) {\n var clearFlags = 0\n core.procs.poll()\n\n var c = options.color\n if (c) {\n gl.clearColor(+c[0] || 0, +c[1] || 0, +c[2] || 0, +c[3] || 0)\n clearFlags |= GL_COLOR_BUFFER_BIT\n }\n if ('depth' in options) {\n gl.clearDepth(+options.depth)\n clearFlags |= GL_DEPTH_BUFFER_BIT\n }\n if ('stencil' in options) {\n gl.clearStencil(options.stencil | 0)\n clearFlags |= GL_STENCIL_BUFFER_BIT\n }\n\n check$1(!!clearFlags, 'called regl.clear with no buffer specified')\n gl.clear(clearFlags)\n }\n\n function clear (options) {\n check$1(\n typeof options === 'object' && options,\n 'regl.clear() takes an object as input')\n if ('framebuffer' in options) {\n if (options.framebuffer &&\n options.framebuffer_reglType === 'framebufferCube') {\n for (var i = 0; i < 6; ++i) {\n setFBO(extend({\n framebuffer: options.framebuffer.faces[i]\n }, options), clearImpl)\n }\n } else {\n setFBO(options, clearImpl)\n }\n } else {\n clearImpl(null, options)\n }\n }\n\n function frame (cb) {\n check$1.type(cb, 'function', 'regl.frame() callback must be a function')\n rafCallbacks.push(cb)\n\n function cancel () {\n // FIXME: should we check something other than equals cb here?\n // what if a user calls frame twice with the same callback...\n //\n var i = find(rafCallbacks, cb)\n check$1(i >= 0, 'cannot cancel a frame twice')\n function pendingCancel () {\n var index = find(rafCallbacks, pendingCancel)\n rafCallbacks[index] = rafCallbacks[rafCallbacks.length - 1]\n rafCallbacks.length -= 1\n if (rafCallbacks.length <= 0) {\n stopRAF()\n }\n }\n rafCallbacks[i] = pendingCancel\n }\n\n startRAF()\n\n return {\n cancel: cancel\n }\n }\n\n // poll viewport\n function pollViewport () {\n var viewport = nextState.viewport\n var scissorBox = nextState.scissor_box\n viewport[0] = viewport[1] = scissorBox[0] = scissorBox[1] = 0\n contextState.viewportWidth =\n contextState.framebufferWidth =\n contextState.drawingBufferWidth =\n viewport[2] =\n scissorBox[2] = gl.drawingBufferWidth\n contextState.viewportHeight =\n contextState.framebufferHeight =\n contextState.drawingBufferHeight =\n viewport[3] =\n scissorBox[3] = gl.drawingBufferHeight\n }\n\n function poll () {\n contextState.tick += 1\n contextState.time = now()\n pollViewport()\n core.procs.poll()\n }\n\n function refresh () {\n textureState.refresh()\n pollViewport()\n core.procs.refresh()\n if (timer) {\n timer.update()\n }\n }\n\n function now () {\n return (clock() - START_TIME) / 1000.0\n }\n\n refresh()\n\n function addListener (event, callback) {\n check$1.type(callback, 'function', 'listener callback must be a function')\n\n var callbacks\n switch (event) {\n case 'frame':\n return frame(callback)\n case 'lost':\n callbacks = lossCallbacks\n break\n case 'restore':\n callbacks = restoreCallbacks\n break\n case 'destroy':\n callbacks = destroyCallbacks\n break\n default:\n check$1.raise('invalid event, must be one of frame,lost,restore,destroy')\n }\n\n callbacks.push(callback)\n return {\n cancel: function () {\n for (var i = 0; i < callbacks.length; ++i) {\n if (callbacks[i] === callback) {\n callbacks[i] = callbacks[callbacks.length - 1]\n callbacks.pop()\n return\n }\n }\n }\n }\n }\n\n var regl = extend(compileProcedure, {\n // Clear current FBO\n clear: clear,\n\n // Short cuts for dynamic variables\n prop: dynamic.define.bind(null, DYN_PROP),\n context: dynamic.define.bind(null, DYN_CONTEXT),\n this: dynamic.define.bind(null, DYN_STATE),\n\n // executes an empty draw command\n draw: compileProcedure({}),\n\n // Resources\n buffer: function (options) {\n return bufferState.create(options, GL_ARRAY_BUFFER, false, false)\n },\n elements: function (options) {\n return elementState.create(options, false)\n },\n texture: textureState.create2D,\n cube: textureState.createCube,\n renderbuffer: renderbufferState.create,\n framebuffer: framebufferState.create,\n framebufferCube: framebufferState.createCube,\n vao: attributeState.createVAO,\n\n // Expose context attributes\n attributes: glAttributes,\n\n // Frame rendering\n frame: frame,\n on: addListener,\n\n // System limits\n limits: limits,\n hasExtension: function (name) {\n return limits.extensions.indexOf(name.toLowerCase()) >= 0\n },\n\n // Read pixels\n read: readPixels,\n\n // Destroy regl and all associated resources\n destroy: destroy,\n\n // Direct GL state manipulation\n _gl: gl,\n _refresh: refresh,\n\n poll: function () {\n poll()\n if (timer) {\n timer.update()\n }\n },\n\n // Current time\n now: now,\n\n // regl Statistics Information\n stats: stats$$1\n })\n\n config.onDone(null, regl)\n\n return regl\n}\n\nreturn wrapREGL;\n\n})));\n//# sourceMappingURL=regl.js.map\n","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n/**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#attributes\n */\nvar ReglAttribute = /*#__PURE__*/function () {\n function ReglAttribute(gl, options) {\n _classCallCheck(this, ReglAttribute);\n this.attribute = void 0;\n this.buffer = void 0;\n var buffer = options.buffer,\n offset = options.offset,\n stride = options.stride,\n normalized = options.normalized,\n size = options.size,\n divisor = options.divisor;\n this.buffer = buffer;\n this.attribute = {\n buffer: buffer.get(),\n offset: offset || 0,\n stride: stride || 0,\n normalized: normalized || false,\n divisor: divisor || 0\n };\n if (size) {\n this.attribute.size = size;\n }\n }\n _createClass(ReglAttribute, [{\n key: \"get\",\n value: function get() {\n return this.attribute;\n }\n }, {\n key: \"updateBuffer\",\n value: function updateBuffer(options) {\n this.buffer.subData(options);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.buffer.destroy();\n }\n }]);\n return ReglAttribute;\n}();\nexport { ReglAttribute as default };\n//# sourceMappingURL=ReglAttribute.js.map","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _primitiveMap, _usageMap, _dataTypeMap, _formatMap, _mipmapMap, _filterMap, _wrapModeMap, _colorSpaceMap, _depthFuncMap, _blendEquationMap, _blendFuncMap, _stencilFuncMap, _stencilOpMap, _cullFaceMap;\n/**\n * @desc 由于 regl 使用大量字符串而非 WebGL 常量,因此需要映射\n */\nimport { gl } from '@antv/g-webgpu-core';\n// @see https://github.com/regl-project/regl/blob/gh-pages/lib/constants/primitives.json\nexport var primitiveMap = (_primitiveMap = {}, _defineProperty(_primitiveMap, gl.POINTS, 'points'), _defineProperty(_primitiveMap, gl.LINES, 'lines'), _defineProperty(_primitiveMap, gl.LINE_LOOP, 'line loop'), _defineProperty(_primitiveMap, gl.LINE_STRIP, 'line strip'), _defineProperty(_primitiveMap, gl.TRIANGLES, 'triangles'), _defineProperty(_primitiveMap, gl.TRIANGLE_FAN, 'triangle fan'), _defineProperty(_primitiveMap, gl.TRIANGLE_STRIP, 'triangle strip'), _primitiveMap);\nexport var usageMap = (_usageMap = {}, _defineProperty(_usageMap, gl.STATIC_DRAW, 'static'), _defineProperty(_usageMap, gl.DYNAMIC_DRAW, 'dynamic'), _defineProperty(_usageMap, gl.STREAM_DRAW, 'stream'), _usageMap);\nexport var dataTypeMap = (_dataTypeMap = {}, _defineProperty(_dataTypeMap, gl.BYTE, 'int8'), _defineProperty(_dataTypeMap, gl.UNSIGNED_INT, 'int16'), _defineProperty(_dataTypeMap, gl.INT, 'int32'), _defineProperty(_dataTypeMap, gl.UNSIGNED_BYTE, 'uint8'), _defineProperty(_dataTypeMap, gl.UNSIGNED_SHORT, 'uint16'), _defineProperty(_dataTypeMap, gl.UNSIGNED_INT, 'uint32'), _defineProperty(_dataTypeMap, gl.FLOAT, 'float'), _dataTypeMap);\nexport var formatMap = (_formatMap = {}, _defineProperty(_formatMap, gl.ALPHA, 'alpha'), _defineProperty(_formatMap, gl.LUMINANCE, 'luminance'), _defineProperty(_formatMap, gl.LUMINANCE_ALPHA, 'luminance alpha'), _defineProperty(_formatMap, gl.RGB, 'rgb'), _defineProperty(_formatMap, gl.RGBA, 'rgba'), _defineProperty(_formatMap, gl.RGBA4, 'rgba4'), _defineProperty(_formatMap, gl.RGB5_A1, 'rgb5 a1'), _defineProperty(_formatMap, gl.RGB565, 'rgb565'), _defineProperty(_formatMap, gl.DEPTH_COMPONENT, 'depth'), _defineProperty(_formatMap, gl.DEPTH_STENCIL, 'depth stencil'), _formatMap);\nexport var mipmapMap = (_mipmapMap = {}, _defineProperty(_mipmapMap, gl.DONT_CARE, 'dont care'), _defineProperty(_mipmapMap, gl.NICEST, 'nice'), _defineProperty(_mipmapMap, gl.FASTEST, 'fast'), _mipmapMap);\nexport var filterMap = (_filterMap = {}, _defineProperty(_filterMap, gl.NEAREST, 'nearest'), _defineProperty(_filterMap, gl.LINEAR, 'linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_LINEAR, 'mipmap'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_LINEAR, 'nearest mipmap linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_NEAREST, 'linear mipmap nearest'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_NEAREST, 'nearest mipmap nearest'), _filterMap);\nexport var wrapModeMap = (_wrapModeMap = {}, _defineProperty(_wrapModeMap, gl.REPEAT, 'repeat'), _defineProperty(_wrapModeMap, gl.CLAMP_TO_EDGE, 'clamp'), _defineProperty(_wrapModeMap, gl.MIRRORED_REPEAT, 'mirror'), _wrapModeMap);\nexport var colorSpaceMap = (_colorSpaceMap = {}, _defineProperty(_colorSpaceMap, gl.NONE, 'none'), _defineProperty(_colorSpaceMap, gl.BROWSER_DEFAULT_WEBGL, 'browser'), _colorSpaceMap);\nexport var depthFuncMap = (_depthFuncMap = {}, _defineProperty(_depthFuncMap, gl.NEVER, 'never'), _defineProperty(_depthFuncMap, gl.ALWAYS, 'always'), _defineProperty(_depthFuncMap, gl.LESS, 'less'), _defineProperty(_depthFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_depthFuncMap, gl.GREATER, 'greater'), _defineProperty(_depthFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_depthFuncMap, gl.EQUAL, 'equal'), _defineProperty(_depthFuncMap, gl.NOTEQUAL, 'notequal'), _depthFuncMap);\nexport var blendEquationMap = (_blendEquationMap = {}, _defineProperty(_blendEquationMap, gl.FUNC_ADD, 'add'), _defineProperty(_blendEquationMap, gl.MIN_EXT, 'min'), _defineProperty(_blendEquationMap, gl.MAX_EXT, 'max'), _defineProperty(_blendEquationMap, gl.FUNC_SUBTRACT, 'subtract'), _defineProperty(_blendEquationMap, gl.FUNC_REVERSE_SUBTRACT, 'reverse subtract'), _blendEquationMap);\nexport var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_blendFuncMap, gl.ZERO, 'zero'), _defineProperty(_blendFuncMap, gl.ONE, 'one'), _defineProperty(_blendFuncMap, gl.SRC_COLOR, 'src color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_COLOR, 'one minus src color'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA, 'src alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_ALPHA, 'one minus src alpha'), _defineProperty(_blendFuncMap, gl.DST_COLOR, 'dst color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_COLOR, 'one minus dst color'), _defineProperty(_blendFuncMap, gl.DST_ALPHA, 'dst alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_ALPHA, 'one minus dst alpha'), _defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, 'constant color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_COLOR, 'one minus constant color'), _defineProperty(_blendFuncMap, gl.CONSTANT_ALPHA, 'constant alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_ALPHA, 'one minus constant alpha'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA_SATURATE, 'src alpha saturate'), _blendFuncMap);\nexport var stencilFuncMap = (_stencilFuncMap = {}, _defineProperty(_stencilFuncMap, gl.NEVER, 'never'), _defineProperty(_stencilFuncMap, gl.ALWAYS, 'always'), _defineProperty(_stencilFuncMap, gl.LESS, 'less'), _defineProperty(_stencilFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_stencilFuncMap, gl.GREATER, 'greater'), _defineProperty(_stencilFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_stencilFuncMap, gl.EQUAL, 'equal'), _defineProperty(_stencilFuncMap, gl.NOTEQUAL, 'notequal'), _stencilFuncMap);\nexport var stencilOpMap = (_stencilOpMap = {}, _defineProperty(_stencilOpMap, gl.ZERO, 'zero'), _defineProperty(_stencilOpMap, gl.KEEP, 'keep'), _defineProperty(_stencilOpMap, gl.REPLACE, 'replace'), _defineProperty(_stencilOpMap, gl.INVERT, 'invert'), _defineProperty(_stencilOpMap, gl.INCR, 'increment'), _defineProperty(_stencilOpMap, gl.DECR, 'decrement'), _defineProperty(_stencilOpMap, gl.INCR_WRAP, 'increment wrap'), _defineProperty(_stencilOpMap, gl.DECR_WRAP, 'decrement wrap'), _stencilOpMap);\nexport var cullFaceMap = (_cullFaceMap = {}, _defineProperty(_cullFaceMap, gl.FRONT, 'front'), _defineProperty(_cullFaceMap, gl.BACK, 'back'), _cullFaceMap);\n//# sourceMappingURL=constants.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { dataTypeMap, usageMap } from './constants';\n\n/**\n * adaptor for regl.Buffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers\n */\nvar ReglBuffer = /*#__PURE__*/function () {\n function ReglBuffer(reGl, options) {\n _classCallCheck(this, ReglBuffer);\n this.buffer = void 0;\n var data = options.data,\n usage = options.usage,\n type = options.type;\n // @ts-ignore\n this.buffer = reGl.buffer({\n data: data,\n usage: usageMap[usage || gl.STATIC_DRAW],\n type: dataTypeMap[type || gl.UNSIGNED_BYTE]\n // length: 0,\n });\n }\n _createClass(ReglBuffer, [{\n key: \"get\",\n value: function get() {\n return this.buffer;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // this.buffer.destroy();\n }\n }, {\n key: \"subData\",\n value: function subData(_ref) {\n var data = _ref.data,\n offset = _ref.offset;\n // @ts-ignore\n this.buffer.subdata(data, offset);\n }\n }]);\n return ReglBuffer;\n}();\nexport { ReglBuffer as default };\n//# sourceMappingURL=ReglBuffer.js.map","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _isTypedArray from \"lodash/isTypedArray\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nimport { AST_TOKEN_TYPES, createEntity, STORAGE_CLASS } from '@antv/g-webgpu-core';\n/* babel-plugin-inline-import './shaders/quad.vert.glsl' */\nvar quadVert = \"attribute vec3 a_Position;\\nattribute vec2 a_TexCoord;\\n\\nvarying vec2 v_TexCoord;\\n\\nvoid main() {\\n gl_Position = vec4(a_Position, 1.0);\\n v_TexCoord = a_TexCoord;\\n}\";\nvar textureId = 0;\nvar debug = false;\n\n/**\n * adaptor for regl.DrawCommand\n */\nvar ReglComputeModel = /*#__PURE__*/function () {\n function ReglComputeModel(reGl, context) {\n var _this = this;\n _classCallCheck(this, ReglComputeModel);\n this.reGl = reGl;\n this.context = context;\n this.entity = createEntity();\n this.texFBO = void 0;\n this.computeCommand = void 0;\n this.textureCache = {};\n this.outputTextureName = void 0;\n this.swapOutputTextureName = void 0;\n this.compiledPingpong = void 0;\n this.dynamicPingpong = void 0;\n var uniforms = {};\n this.context.uniforms.forEach(function (uniform) {\n var name = uniform.name,\n type = uniform.type,\n data = uniform.data,\n isReferer = uniform.isReferer,\n storageClass = uniform.storageClass;\n // store data with a 2D texture\n if (storageClass === STORAGE_CLASS.StorageBuffer) {\n if (!isReferer) {\n _this.textureCache[name] = _this.calcDataTexture(name, type, data);\n var _this$textureCache$na = _this.textureCache[name],\n width = _this$textureCache$na.textureWidth,\n isOutput = _this$textureCache$na.isOutput;\n uniforms[\"\".concat(name, \"Size\")] = [width, width];\n if (isOutput) {\n _this.outputTextureName = name;\n if (_this.context.needPingpong) {\n _this.outputTextureName = \"\".concat(name, \"Output\");\n _this.textureCache[_this.outputTextureName] = _this.calcDataTexture(name, type, data);\n }\n }\n } else {\n // @ts-ignore\n _this.textureCache[name] = {\n data: undefined\n };\n // refer to another kernel's output,\n // the referred kernel may not have been initialized, so we use dynamic way here\n uniforms[\"\".concat(name, \"Size\")] = function () {\n return (\n // @ts-ignore\n data.compiledBundle.context.output.textureSize\n );\n };\n }\n uniforms[name] = function () {\n if (debug) {\n console.log(\"[\".concat(_this.entity, \"]: \").concat(name, \" \").concat(_this.textureCache[name].id));\n }\n return _this.textureCache[name].texture;\n };\n } else if (storageClass === STORAGE_CLASS.Uniform) {\n if (data && (Array.isArray(data) || _isTypedArray(data)) && data.length > 16) {\n // up to mat4 which includes 16 elements\n throw new Error(\"invalid data type \".concat(type));\n }\n // get uniform dynamically\n uniforms[name] = function () {\n return uniform.data;\n };\n }\n });\n var _this$getOuputDataTex = this.getOuputDataTexture(),\n textureWidth = _this$getOuputDataTex.textureWidth,\n texelCount = _this$getOuputDataTex.texelCount;\n\n // 传入 output 纹理尺寸和数据长度,便于多余的 texel 提前退出\n uniforms.u_OutputTextureSize = [textureWidth, textureWidth];\n uniforms.u_OutputTexelCount = texelCount;\n\n // 保存在 Kernel 的上下文中,供其他 Kernel 引用\n this.context.output.textureSize = [textureWidth, textureWidth];\n var drawParams = {\n attributes: {\n a_Position: [[-1, 1, 0], [-1, -1, 0], [1, 1, 0], [1, -1, 0]],\n a_TexCoord: [[0, 1], [0, 0], [1, 1], [1, 0]]\n },\n frag: \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n precision highp float;\\n#else\\n precision mediump float;\\n#endif\\n\".concat(this.context.shader),\n uniforms: uniforms,\n vert: quadVert,\n // TODO: use a fullscreen triangle instead.\n primitive: 'triangle strip',\n count: 4\n };\n this.computeCommand = this.reGl(drawParams);\n }\n _createClass(ReglComputeModel, [{\n key: \"run\",\n value: function run() {\n var _this2 = this;\n if (this.context.maxIteration > 1 && this.context.needPingpong) {\n this.compiledPingpong = true;\n }\n // need pingpong when (@in@out and execute(10)) or use `setBinding('out', self)`\n // this.needPingpong =\n // !!(this.context.maxIteration > 1 && this.context.needPingpong);\n\n // if (this.relativeOutputTextureNames.length) {\n // const { id, texture } = this.getOuputDataTexture();\n // this.relativeOutputTextureNames.forEach((name) => {\n // this.textureCache[name].id = id;\n // this.textureCache[name].texture = texture;\n // });\n // this.swap();\n // }\n\n if (this.compiledPingpong || this.dynamicPingpong) {\n this.swap();\n }\n this.texFBO = this.reGl.framebuffer({\n color: this.getOuputDataTexture().texture\n });\n this.texFBO.use(function () {\n _this2.computeCommand();\n });\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: output \").concat(this.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"readData\",\n value: function () {\n var _readData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _this3 = this;\n var pixels, _this$getOuputDataTex2, originalDataLength, elementsPerTexel, _this$getOuputDataTex3, typedArrayConstructor, formattedPixels, i;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.reGl({\n framebuffer: this.texFBO\n })(function () {\n pixels = _this3.reGl.read();\n });\n\n // @ts-ignore\n if (!pixels) {\n _context.next = 6;\n break;\n }\n _this$getOuputDataTex2 = this.getOuputDataTexture(), originalDataLength = _this$getOuputDataTex2.originalDataLength, elementsPerTexel = _this$getOuputDataTex2.elementsPerTexel, _this$getOuputDataTex3 = _this$getOuputDataTex2.typedArrayConstructor, typedArrayConstructor = _this$getOuputDataTex3 === void 0 ? Float32Array : _this$getOuputDataTex3;\n formattedPixels = [];\n if (elementsPerTexel !== 4) {\n for (i = 0; i < pixels.length; i += 4) {\n if (elementsPerTexel === 1) {\n formattedPixels.push(pixels[i]);\n } else if (elementsPerTexel === 2) {\n formattedPixels.push(pixels[i], pixels[i + 1]);\n } else {\n formattedPixels.push(pixels[i], pixels[i + 1], pixels[i + 2]);\n }\n }\n } else {\n // @ts-ignore\n formattedPixels = pixels;\n }\n\n // 截取多余的部分\n // @ts-ignore\n return _context.abrupt(\"return\", new typedArrayConstructor(formattedPixels.slice(0, originalDataLength)));\n case 6:\n return _context.abrupt(\"return\", new Float32Array());\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n function readData() {\n return _readData.apply(this, arguments);\n }\n return readData;\n }()\n }, {\n key: \"confirmInput\",\n value: function confirmInput(model, inputName) {\n var inputModel;\n // refer to self, same as pingpong\n if (this.entity === model.entity) {\n this.dynamicPingpong = true;\n inputModel = this;\n } else {\n inputModel = model;\n }\n this.textureCache[inputName].id = inputModel.getOuputDataTexture().id;\n this.textureCache[inputName].texture = inputModel.getOuputDataTexture().texture;\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: confirm input \").concat(inputName, \" from model \").concat(inputModel.entity, \", \").concat(inputModel.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"updateUniform\",\n value: function updateUniform() {\n // already get uniform's data dynamically when created, do nothing here\n }\n }, {\n key: \"updateBuffer\",\n value: function updateBuffer(bufferName, data) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n // regenerate data texture\n var buffer = this.context.uniforms.find(function (_ref) {\n var name = _ref.name;\n return name === bufferName;\n });\n if (buffer) {\n var _this$calcDataTexture = this.calcDataTexture(bufferName, buffer.type, data),\n texture = _this$calcDataTexture.texture,\n paddingData = _this$calcDataTexture.data;\n\n // TODO: destroy outdated texture\n this.textureCache[bufferName].data = paddingData;\n this.textureCache[bufferName].texture = texture;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // regl will destroy all resources\n }\n }, {\n key: \"swap\",\n value: function swap() {\n if (!this.swapOutputTextureName) {\n this.createSwapOutputDataTexture();\n }\n if (this.compiledPingpong) {\n var outputTextureUniformName = this.context.output.name;\n this.textureCache[outputTextureUniformName].id = this.getOuputDataTexture().id;\n this.textureCache[outputTextureUniformName].texture = this.getOuputDataTexture().texture;\n }\n var tmp = this.outputTextureName;\n this.outputTextureName = this.swapOutputTextureName;\n this.swapOutputTextureName = tmp;\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: after swap, output \").concat(this.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"getOuputDataTexture\",\n value: function getOuputDataTexture() {\n return this.textureCache[this.outputTextureName];\n }\n }, {\n key: \"createSwapOutputDataTexture\",\n value: function createSwapOutputDataTexture() {\n var texture = this.cloneDataTexture(this.getOuputDataTexture());\n this.swapOutputTextureName = \"\".concat(this.entity, \"-swap\");\n this.textureCache[this.swapOutputTextureName] = texture;\n }\n }, {\n key: \"cloneDataTexture\",\n value: function cloneDataTexture(texture) {\n var data = texture.data,\n textureWidth = texture.textureWidth;\n return _objectSpread(_objectSpread({}, texture), {}, {\n id: textureId++,\n // @ts-ignore\n texture: this.reGl.texture({\n width: textureWidth,\n height: textureWidth,\n data: data,\n type: 'float'\n })\n });\n }\n }, {\n key: \"calcDataTexture\",\n value: function calcDataTexture(name, type, data) {\n var elementsPerTexel = 1;\n if (type === AST_TOKEN_TYPES.Vector4FloatArray) {\n elementsPerTexel = 4;\n }\n\n // 用 0 补全不足 vec4 的部分\n var paddingData = [];\n for (var i = 0; i < data.length; i += elementsPerTexel) {\n if (elementsPerTexel === 1) {\n paddingData.push(data[i], 0, 0, 0);\n } else if (elementsPerTexel === 2) {\n paddingData.push(data[i], data[i + 1], 0, 0);\n } else if (elementsPerTexel === 3) {\n paddingData.push(data[i], data[i + 1], data[i + 2], 0);\n } else if (elementsPerTexel === 4) {\n paddingData.push(data[i], data[i + 1], data[i + 2], data[i + 3]);\n }\n }\n\n // 使用纹理存储,例如 Array(8) 使用 3 * 3 纹理,末尾空白使用 0 填充\n var originalDataLength = data.length;\n var texelCount = Math.ceil(originalDataLength / elementsPerTexel);\n var width = Math.ceil(Math.sqrt(texelCount));\n var paddingTexelCount = width * width;\n if (texelCount < paddingTexelCount) {\n paddingData.push.apply(paddingData, _toConsumableArray(new Array((paddingTexelCount - texelCount) * 4).fill(0)));\n }\n var texture = this.reGl.texture({\n width: width,\n height: width,\n data: paddingData,\n type: 'float'\n });\n return {\n id: textureId++,\n data: paddingData,\n originalDataLength: originalDataLength,\n typedArrayConstructor: _isTypedArray(data) ? data.constructor : undefined,\n textureWidth: width,\n texture: texture,\n texelCount: texelCount,\n elementsPerTexel: elementsPerTexel,\n isOutput: name === this.context.output.name\n };\n }\n }]);\n return ReglComputeModel;\n}();\nexport { ReglComputeModel as default };\n//# sourceMappingURL=ReglComputeModel.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { dataTypeMap, usageMap } from './constants';\n\n/**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#elements\n */\nvar ReglElements = /*#__PURE__*/function () {\n function ReglElements(reGl, options) {\n _classCallCheck(this, ReglElements);\n this.elements = void 0;\n var data = options.data,\n usage = options.usage,\n type = options.type,\n count = options.count;\n this.elements = reGl.elements({\n data: data,\n usage: usageMap[usage || gl.STATIC_DRAW],\n type: dataTypeMap[type || gl.UNSIGNED_BYTE],\n count: count\n });\n }\n _createClass(ReglElements, [{\n key: \"get\",\n value: function get() {\n return this.elements;\n }\n }, {\n key: \"subData\",\n value: function subData(_ref) {\n var data = _ref.data;\n this.elements.subdata(data);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.elements.destroy();\n }\n }]);\n return ReglElements;\n}();\nexport { ReglElements as default };\n//# sourceMappingURL=ReglElements.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n/**\n * adaptor for regl.Framebuffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#framebuffers\n */\nvar ReglFramebuffer = /*#__PURE__*/function () {\n function ReglFramebuffer(reGl, options) {\n _classCallCheck(this, ReglFramebuffer);\n this.framebuffer = void 0;\n var width = options.width,\n height = options.height,\n color = options.color,\n colors = options.colors,\n depth = options.depth,\n stencil = options.stencil;\n var framebufferOptions = {\n width: width,\n height: height\n };\n if (Array.isArray(colors)) {\n framebufferOptions.colors = colors.map(function (c) {\n return c.get();\n });\n }\n if (color && typeof color !== 'boolean') {\n framebufferOptions.color = color.get();\n }\n\n // TODO: depth & stencil\n\n this.framebuffer = reGl.framebuffer(framebufferOptions);\n }\n _createClass(ReglFramebuffer, [{\n key: \"get\",\n value: function get() {\n return this.framebuffer;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.framebuffer.destroy();\n }\n }, {\n key: \"resize\",\n value: function resize(_ref) {\n var width = _ref.width,\n height = _ref.height;\n this.framebuffer.resize(width, height);\n }\n }]);\n return ReglFramebuffer;\n}();\nexport { ReglFramebuffer as default };\n//# sourceMappingURL=ReglFramebuffer.js.map","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import _isTypedArray from \"lodash/isTypedArray\";\nimport _isPlainObject from \"lodash/isPlainObject\";\n/**\n * 考虑结构体命名, eg:\n * a: { b: 1 } -> 'a.b'\n * a: [ { b: 1 } ] -> 'a[0].b'\n */\nexport function extractUniforms(uniforms) {\n var extractedUniforms = {};\n Object.keys(uniforms).forEach(function (uniformName) {\n extractUniformsRecursively(uniformName, uniforms[uniformName], extractedUniforms, '');\n });\n return extractedUniforms;\n}\nfunction extractUniformsRecursively(uniformName, uniformValue, uniforms, prefix) {\n if (uniformValue === null || typeof uniformValue === 'number' ||\n // u_A: 1\n typeof uniformValue === 'boolean' ||\n // u_A: false\n Array.isArray(uniformValue) && typeof uniformValue[0] === 'number' ||\n // u_A: [1, 2, 3]\n _isTypedArray(uniformValue) ||\n // u_A: Float32Array\n // @ts-ignore\n uniformValue === '' ||\n // @ts-ignore\n uniformValue.resize !== undefined) {\n uniforms[\"\".concat(prefix && prefix + '.').concat(uniformName)] = uniformValue;\n return;\n }\n\n // u_Struct.a.b.c\n if (_isPlainObject(uniformValue)) {\n Object.keys(uniformValue).forEach(function (childName) {\n extractUniformsRecursively(childName,\n // @ts-ignore\n uniformValue[childName], uniforms, \"\".concat(prefix && prefix + '.').concat(uniformName));\n });\n }\n\n // u_Struct[0].a\n if (Array.isArray(uniformValue)) {\n // @ts-ignore\n uniformValue.forEach(function (child, idx) {\n Object.keys(child).forEach(function (childName) {\n extractUniformsRecursively(childName,\n // @ts-ignore\n child[childName], uniforms, \"\".concat(prefix && prefix + '.').concat(uniformName, \"[\").concat(idx, \"]\"));\n });\n });\n }\n}\n//# sourceMappingURL=uniform.js.map","import _typeof from \"@babel/runtime/helpers/typeof\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { gl } from '@antv/g-webgpu-core';\nimport { extractUniforms } from '../utils/uniform';\nimport { blendEquationMap, blendFuncMap, cullFaceMap, depthFuncMap, primitiveMap, stencilFuncMap, stencilOpMap } from './constants';\n/**\n * adaptor for regl.DrawCommand\n */\nvar ReglModel = /*#__PURE__*/function () {\n function ReglModel(reGl, options) {\n _classCallCheck(this, ReglModel);\n this.reGl = void 0;\n this.drawCommand = void 0;\n this.uniforms = {};\n this.reGl = reGl;\n var vs = options.vs,\n fs = options.fs,\n defines = options.defines,\n attributes = options.attributes,\n uniforms = options.uniforms,\n primitive = options.primitive,\n count = options.count,\n elements = options.elements,\n depth = options.depth,\n blend = options.blend,\n stencil = options.stencil,\n cull = options.cull,\n instances = options.instances,\n scissor = options.scissor,\n viewport = options.viewport;\n var reglUniforms = {};\n if (uniforms) {\n this.uniforms = extractUniforms(uniforms);\n Object.keys(uniforms).forEach(function (uniformName) {\n // use regl prop API\n // @ts-ignore\n reglUniforms[uniformName] = reGl.prop(uniformName);\n });\n }\n var reglAttributes = {};\n Object.keys(attributes).forEach(function (name) {\n reglAttributes[name] = attributes[name].get();\n });\n var defineStmts = defines && this.generateDefines(defines) || '';\n var drawParams = {\n attributes: reglAttributes,\n frag: \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n precision highp float;\\n#else\\n precision mediump float;\\n#endif\\n\".concat(defineStmts, \"\\n\").concat(fs),\n uniforms: reglUniforms,\n vert: \"\\n\".concat(defineStmts, \"\\n\").concat(vs),\n primitive: primitiveMap[primitive === undefined ? gl.TRIANGLES : primitive]\n };\n if (instances) {\n drawParams.instances = instances;\n }\n\n // elements 中可能包含 count,此时不应传入\n if (count) {\n drawParams.count = count;\n }\n if (elements) {\n drawParams.elements = elements.get();\n }\n if (scissor) {\n drawParams.scissor = scissor;\n }\n if (viewport) {\n drawParams.viewport = viewport;\n }\n this.initDepthDrawParams({\n depth: depth\n }, drawParams);\n this.initBlendDrawParams({\n blend: blend\n }, drawParams);\n this.initStencilDrawParams({\n stencil: stencil\n }, drawParams);\n this.initCullDrawParams({\n cull: cull\n }, drawParams);\n this.drawCommand = reGl(drawParams);\n }\n _createClass(ReglModel, [{\n key: \"addUniforms\",\n value: function addUniforms(uniforms) {\n this.uniforms = _objectSpread(_objectSpread({}, this.uniforms), extractUniforms(uniforms));\n }\n }, {\n key: \"draw\",\n value: function draw(options) {\n var uniforms = _objectSpread(_objectSpread({}, this.uniforms), extractUniforms(options.uniforms || {}));\n var reglDrawProps = {};\n Object.keys(uniforms).forEach(function (uniformName) {\n var type = _typeof(uniforms[uniformName]);\n if (type === 'boolean' || type === 'number' || Array.isArray(uniforms[uniformName]) ||\n // @ts-ignore\n uniforms[uniformName].BYTES_PER_ELEMENT) {\n reglDrawProps[uniformName] = uniforms[uniformName];\n } else if (type === 'string') {\n // TODO: image url\n } else {\n reglDrawProps[uniformName] = uniforms[uniformName].get();\n }\n });\n this.drawCommand(reglDrawProps);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // don't need do anything since we will call `rendererService.cleanup()`\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#depth-buffer\n */\n }, {\n key: \"initDepthDrawParams\",\n value: function initDepthDrawParams(_ref, drawParams) {\n var depth = _ref.depth;\n if (depth) {\n drawParams.depth = {\n enable: depth.enable === undefined ? true : !!depth.enable,\n mask: depth.mask === undefined ? true : !!depth.mask,\n func: depthFuncMap[depth.func || gl.LESS],\n range: depth.range || [0, 1]\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#blending\n */\n }, {\n key: \"initBlendDrawParams\",\n value: function initBlendDrawParams(_ref2, drawParams) {\n var blend = _ref2.blend;\n if (blend) {\n var enable = blend.enable,\n func = blend.func,\n equation = blend.equation,\n _blend$color = blend.color,\n color = _blend$color === void 0 ? [0, 0, 0, 0] : _blend$color;\n // @ts-ignore\n drawParams.blend = {\n enable: !!enable,\n func: {\n srcRGB: blendFuncMap[func && func.srcRGB || gl.SRC_ALPHA],\n srcAlpha: blendFuncMap[func && func.srcAlpha || gl.SRC_ALPHA],\n dstRGB: blendFuncMap[func && func.dstRGB || gl.ONE_MINUS_SRC_ALPHA],\n dstAlpha: blendFuncMap[func && func.dstAlpha || gl.ONE_MINUS_SRC_ALPHA]\n },\n equation: {\n rgb: blendEquationMap[equation && equation.rgb || gl.FUNC_ADD],\n alpha: blendEquationMap[equation && equation.alpha || gl.FUNC_ADD]\n },\n color: color\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#stencil\n */\n }, {\n key: \"initStencilDrawParams\",\n value: function initStencilDrawParams(_ref3, drawParams) {\n var stencil = _ref3.stencil;\n if (stencil) {\n var enable = stencil.enable,\n _stencil$mask = stencil.mask,\n mask = _stencil$mask === void 0 ? -1 : _stencil$mask,\n _stencil$func = stencil.func,\n func = _stencil$func === void 0 ? {\n cmp: gl.ALWAYS,\n ref: 0,\n mask: -1\n } : _stencil$func,\n _stencil$opFront = stencil.opFront,\n opFront = _stencil$opFront === void 0 ? {\n fail: gl.KEEP,\n zfail: gl.KEEP,\n zpass: gl.KEEP\n } : _stencil$opFront,\n _stencil$opBack = stencil.opBack,\n opBack = _stencil$opBack === void 0 ? {\n fail: gl.KEEP,\n zfail: gl.KEEP,\n zpass: gl.KEEP\n } : _stencil$opBack;\n drawParams.stencil = {\n enable: !!enable,\n mask: mask,\n func: _objectSpread(_objectSpread({}, func), {}, {\n cmp: stencilFuncMap[func.cmp]\n }),\n opFront: {\n fail: stencilOpMap[opFront.fail],\n zfail: stencilOpMap[opFront.zfail],\n zpass: stencilOpMap[opFront.zpass]\n },\n opBack: {\n fail: stencilOpMap[opBack.fail],\n zfail: stencilOpMap[opBack.zfail],\n zpass: stencilOpMap[opBack.zpass]\n }\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#culling\n */\n }, {\n key: \"initCullDrawParams\",\n value: function initCullDrawParams(_ref4, drawParams) {\n var cull = _ref4.cull;\n if (cull) {\n var enable = cull.enable,\n _cull$face = cull.face,\n face = _cull$face === void 0 ? gl.BACK : _cull$face;\n drawParams.cull = {\n enable: !!enable,\n face: cullFaceMap[face]\n };\n }\n }\n }, {\n key: \"generateDefines\",\n value: function generateDefines(defines) {\n return Object.keys(defines).map(function (name) {\n return \"#define \".concat(name, \" \").concat(Number(defines[name]));\n }).join('\\n');\n }\n }]);\n return ReglModel;\n}();\nexport { ReglModel as default };\n//# sourceMappingURL=ReglModel.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { colorSpaceMap, dataTypeMap, filterMap, formatMap, mipmapMap, wrapModeMap } from './constants';\n\n/**\n * adaptor for regl.Buffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers\n */\nvar ReglTexture2D = /*#__PURE__*/function () {\n function ReglTexture2D(reGl, options) {\n _classCallCheck(this, ReglTexture2D);\n this.texture = void 0;\n this.width = void 0;\n this.height = void 0;\n var data = options.data,\n _options$type = options.type,\n type = _options$type === void 0 ? gl.UNSIGNED_BYTE : _options$type,\n width = options.width,\n height = options.height,\n _options$flipY = options.flipY,\n flipY = _options$flipY === void 0 ? false : _options$flipY,\n _options$format = options.format,\n format = _options$format === void 0 ? gl.RGBA : _options$format,\n _options$mipmap = options.mipmap,\n mipmap = _options$mipmap === void 0 ? false : _options$mipmap,\n _options$wrapS = options.wrapS,\n wrapS = _options$wrapS === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapS,\n _options$wrapT = options.wrapT,\n wrapT = _options$wrapT === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapT,\n _options$aniso = options.aniso,\n aniso = _options$aniso === void 0 ? 0 : _options$aniso,\n _options$alignment = options.alignment,\n alignment = _options$alignment === void 0 ? 1 : _options$alignment,\n _options$premultiplyA = options.premultiplyAlpha,\n premultiplyAlpha = _options$premultiplyA === void 0 ? false : _options$premultiplyA,\n _options$mag = options.mag,\n mag = _options$mag === void 0 ? gl.NEAREST : _options$mag,\n _options$min = options.min,\n min = _options$min === void 0 ? gl.NEAREST : _options$min,\n _options$colorSpace = options.colorSpace,\n colorSpace = _options$colorSpace === void 0 ? gl.BROWSER_DEFAULT_WEBGL : _options$colorSpace;\n this.width = width;\n this.height = height;\n var textureOptions = {\n width: width,\n height: height,\n // @ts-ignore\n type: dataTypeMap[type],\n format: formatMap[format],\n wrapS: wrapModeMap[wrapS],\n wrapT: wrapModeMap[wrapT],\n // @ts-ignore\n mag: filterMap[mag],\n min: filterMap[min],\n alignment: alignment,\n flipY: flipY,\n colorSpace: colorSpaceMap[colorSpace],\n premultiplyAlpha: premultiplyAlpha,\n aniso: aniso\n };\n if (data) {\n textureOptions.data = data;\n }\n if (typeof mipmap === 'number') {\n textureOptions.mipmap = mipmapMap[mipmap];\n } else if (typeof mipmap === 'boolean') {\n textureOptions.mipmap = mipmap;\n }\n this.texture = reGl.texture(textureOptions);\n }\n _createClass(ReglTexture2D, [{\n key: \"get\",\n value: function get() {\n return this.texture;\n }\n }, {\n key: \"update\",\n value: function update() {\n // @ts-ignore\n this.texture._texture.bind();\n }\n }, {\n key: \"resize\",\n value: function resize(_ref) {\n var width = _ref.width,\n height = _ref.height;\n this.texture.resize(width, height);\n this.width = width;\n this.height = height;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.texture.destroy();\n }\n }]);\n return ReglTexture2D;\n}();\nexport { ReglTexture2D as default };\n//# sourceMappingURL=ReglTexture2D.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n/**\n * render w/ regl\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md\n */\nimport { gl } from '@antv/g-webgpu-core';\nimport regl from 'regl';\nimport ReglAttribute from './ReglAttribute';\nimport ReglBuffer from './ReglBuffer';\nimport ReglComputeModel from './ReglComputeModel';\nimport ReglElements from './ReglElements';\nimport ReglFramebuffer from './ReglFramebuffer';\nimport ReglModel from './ReglModel';\nimport ReglTexture2D from './ReglTexture2D';\n\n/**\n * regl renderer\n */\nexport var WebGLEngine = /*#__PURE__*/function () {\n function WebGLEngine() {\n var _this = this;\n _classCallCheck(this, WebGLEngine);\n this.supportWebGPU = false;\n this.useWGSL = false;\n this.$canvas = void 0;\n this.gl = void 0;\n this.inited = void 0;\n this.createModel = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(options) {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!options.uniforms) {\n _context2.next = 3;\n break;\n }\n _context2.next = 3;\n return Promise.all(Object.keys(options.uniforms).map( /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(name) {\n var texture;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(options.uniforms[name] &&\n // @ts-ignore\n options.uniforms[name].load !== undefined)) {\n _context.next = 5;\n break;\n }\n _context.next = 3;\n return options.uniforms[name].load();\n case 3:\n texture = _context.sent;\n // @ts-ignore\n options.uniforms[name] = texture;\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return function (_x2) {\n return _ref2.apply(this, arguments);\n };\n }()));\n case 3:\n return _context2.abrupt(\"return\", new ReglModel(_this.gl, options));\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }();\n this.createAttribute = function (options) {\n return new ReglAttribute(_this.gl, options);\n };\n this.createBuffer = function (options) {\n return new ReglBuffer(_this.gl, options);\n };\n this.createElements = function (options) {\n return new ReglElements(_this.gl, options);\n };\n this.createTexture2D = function (options) {\n return new ReglTexture2D(_this.gl, options);\n };\n this.createFramebuffer = function (options) {\n return new ReglFramebuffer(_this.gl, options);\n };\n this.useFramebuffer = function (framebuffer, drawCommands) {\n _this.gl({\n framebuffer: framebuffer ? framebuffer.get() : null\n })(drawCommands);\n };\n this.createComputeModel = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(context) {\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", new ReglComputeModel(_this.gl, context));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return function (_x3) {\n return _ref3.apply(this, arguments);\n };\n }();\n this.clear = function (options) {\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#clear-the-draw-buffer\n var color = options.color,\n depth = options.depth,\n stencil = options.stencil,\n _options$framebuffer = options.framebuffer,\n framebuffer = _options$framebuffer === void 0 ? null : _options$framebuffer;\n var reglClearOptions = {\n color: color,\n depth: depth,\n stencil: stencil\n };\n reglClearOptions.framebuffer = framebuffer === null ? framebuffer : framebuffer.get();\n _this.gl.clear(reglClearOptions);\n };\n this.setScissor = function (scissor) {\n if (_this.gl && _this.gl._gl) {\n // https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLRenderingContext/scissor\n if (scissor.enable && scissor.box) {\n // console.log(scissor.box);\n _this.gl._gl.enable(gl.SCISSOR_TEST);\n _this.gl._gl.scissor(scissor.box.x, scissor.box.y, scissor.box.width, scissor.box.height);\n } else {\n _this.gl._gl.disable(gl.SCISSOR_TEST);\n }\n _this.gl._refresh();\n }\n };\n this.viewport = function (_ref4) {\n var x = _ref4.x,\n y = _ref4.y,\n width = _ref4.width,\n height = _ref4.height;\n if (_this.gl && _this.gl._gl) {\n // use WebGL context directly\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#unsafe-escape-hatch\n _this.gl._gl.viewport(x, y, width, height);\n _this.gl._refresh();\n }\n };\n this.readPixels = function (options) {\n var framebuffer = options.framebuffer,\n x = options.x,\n y = options.y,\n width = options.width,\n height = options.height;\n var readPixelsOptions = {\n x: x,\n y: y,\n width: width,\n height: height\n };\n if (framebuffer) {\n readPixelsOptions.framebuffer = framebuffer.get();\n }\n return _this.gl.read(readPixelsOptions);\n };\n this.getCanvas = function () {\n return _this.$canvas;\n };\n this.getGLContext = function () {\n return _this.gl._gl;\n };\n this.destroy = function () {\n if (_this.gl) {\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#clean-up\n _this.gl.destroy();\n _this.inited = false;\n }\n };\n }\n _createClass(WebGLEngine, [{\n key: \"init\",\n value: function () {\n var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(cfg) {\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (!this.inited) {\n _context4.next = 2;\n break;\n }\n return _context4.abrupt(\"return\");\n case 2:\n this.$canvas = cfg.canvas;\n // tslint:disable-next-line:typedef\n _context4.next = 5;\n return new Promise(function (resolve, reject) {\n regl({\n canvas: cfg.canvas,\n attributes: {\n alpha: true,\n // use TAA instead of MSAA\n // @see https://www.khronos.org/registry/webgl/specs/1.0/#5.2.1\n antialias: cfg.antialias,\n premultipliedAlpha: true\n // preserveDrawingBuffer: false,\n },\n\n pixelRatio: 1,\n // TODO: use extensions\n extensions: ['OES_element_index_uint', 'OES_texture_float', 'OES_standard_derivatives',\n // wireframe\n 'angle_instanced_arrays' // VSM shadow map\n ],\n\n optionalExtensions: ['EXT_texture_filter_anisotropic', 'EXT_blend_minmax', 'WEBGL_depth_texture'],\n profile: true,\n onDone: function onDone(err, r) {\n if (err || !r) {\n reject(err);\n }\n // @ts-ignore\n resolve(r);\n }\n });\n });\n case 5:\n this.gl = _context4.sent;\n this.inited = true;\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n function init(_x4) {\n return _init.apply(this, arguments);\n }\n return init;\n }()\n }, {\n key: \"isFloatSupported\",\n value: function isFloatSupported() {\n // @see https://github.com/antvis/GWebGPUEngine/issues/26\n // @ts-ignore\n return this.gl.limits.readFloat;\n }\n }, {\n key: \"beginFrame\",\n value: function beginFrame() {\n //\n }\n }, {\n key: \"endFrame\",\n value: function endFrame() {\n //\n }\n }]);\n return WebGLEngine;\n}();\n//# sourceMappingURL=index.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { ConfigService, createEntity as _createEntity } from '@antv/g-webgpu-core';\nimport { WebGLEngine } from '@antv/g-webgpu-engine';\nimport { Kernel } from './Kernel';\nexport var World = /*#__PURE__*/function () {\n function World() {\n _classCallCheck(this, World);\n this.engine = void 0;\n this.configService = new ConfigService();\n }\n _createClass(World, [{\n key: \"setConfig\",\n value: function setConfig(config) {\n this.configService.set(config);\n }\n }, {\n key: \"setEngine\",\n value: function setEngine(engine) {\n this.engine = engine;\n }\n }, {\n key: \"createEntity\",\n value: function createEntity() {\n return _createEntity();\n }\n }, {\n key: \"createKernel\",\n value: function createKernel(precompiledBundle) {\n var kernel = new Kernel(this.engine, this.configService);\n if (typeof precompiledBundle === 'string') {\n kernel.setBundle(JSON.parse(precompiledBundle));\n } else {\n kernel.setBundle(precompiledBundle);\n }\n kernel.init();\n return kernel;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.engine.destroy();\n }\n }], [{\n key: \"create\",\n value: function create() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var world = new World();\n world.setConfig(config);\n world.setEngine(new WebGLEngine());\n return world;\n }\n }]);\n return World;\n}();\n//# sourceMappingURL=World.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayToTextureData = exports.attributesToTextureData = exports.buildTextureDataWithTwoEdgeAttr = exports.buildTextureData = exports.proccessToFunc = void 0;\nvar _1 = require(\"./\");\nvar math_1 = require(\"./math\");\n/**\n * 将 number | Function 类型的参数转换为 return number 的 Function\n * @param {number | Function} value 需要被转换的值\n * @param {number} defaultV 返回函数的默认返回值\n * @return {Function} 转换后的函数\n */\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function () {\n return defaultV || 1;\n };\n }\n else if ((0, _1.isNumber)(value)) {\n func = function () {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\nexports.proccessToFunc = proccessToFunc;\n/**\n * 将节点和边数据转换为 GPU 可读的数组。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 需要被转换的值\n * @param {EdgeConfig[]} edges 返回函数的默认返回值\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nvar buildTextureData = function (nodes, edges) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n var source = (0, math_1.getEdgeTerminal)(e, 'source');\n var target = (0, math_1.getEdgeTerminal)(e, 'target');\n if (!isNaN(mapIdPos[source]) && !isNaN(mapIdPos[target])) {\n nodeDict[mapIdPos[source]].push(mapIdPos[target]);\n nodeDict[mapIdPos[target]].push(mapIdPos[source]);\n }\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i];\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = len;\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n maxEdgePerVetex: maxEdgePerVetex,\n array: new Float32Array(dataArray),\n };\n};\nexports.buildTextureData = buildTextureData;\n/**\n* 将节点和边数据转换为 GPU 可读的数组,每条边带有一个属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n* @param {NodeConfig[]} nodes 节点数组\n* @param {EdgeConfig[]} edges 边数组\n* @param {Function} attrs 读取边属性的函数\n* @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n*/\n// export const buildTextureDataWithOneEdgeAttr = (nodes: OutNode[], edges: Edge[], attrs: Function): {\n// array: Float32Array,\n// maxEdgePerVetex: number\n// } => {\n// const dataArray = [];\n// const nodeDict: any = [];\n// const mapIdPos: IndexMap = {};\n// let i = 0;\n// for (i = 0; i < nodes.length; i++) {\n// const n = nodes[i];\n// mapIdPos[n.id] = i;\n// dataArray.push(n.x);\n// dataArray.push(n.y);\n// dataArray.push(0);\n// dataArray.push(0);\n// nodeDict.push([]);\n// }\n// for (i = 0; i < edges.length; i++) {\n// const e = edges[i];\n// nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n// nodeDict[mapIdPos[e.source]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n// nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n// nodeDict[mapIdPos[e.target]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n// }\n// let maxEdgePerVetex = 0;\n// for (i = 0; i < nodes.length; i++) {\n// const offset: number = dataArray.length;\n// const dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n// const len = dests.length;\n// dataArray[i * 4 + 2] = offset;\n// dataArray[i * 4 + 3] = len / 2; // 第四位存储与该节点相关的所有节点个数\n// maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 2);\n// for (let j = 0; j < len; ++j) {\n// const dest = dests[j];\n// dataArray.push(+dest);\n// }\n// }\n// // 不是 4 的倍数,填充 0\n// while (dataArray.length % 4 !== 0) {\n// dataArray.push(0);\n// }\n// return {\n// array: new Float32Array(dataArray),\n// maxEdgePerVetex\n// }\n// }\n/**\n* 将节点和边数据转换为 GPU 可读的数组,每条边带有一个以上属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n* @param {NodeConfig[]} nodes 节点数组\n* @param {EdgeConfig[]} edges 边数组\n* @param {Function} attrs 读取边属性的函数\n* @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n*/\nvar buildTextureDataWithTwoEdgeAttr = function (nodes, edges, attrs1, attrs2) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n var source = (0, math_1.getEdgeTerminal)(e, 'source');\n var target = (0, math_1.getEdgeTerminal)(e, 'target');\n nodeDict[mapIdPos[source]].push(mapIdPos[target]);\n nodeDict[mapIdPos[source]].push(attrs1(e));\n nodeDict[mapIdPos[source]].push(attrs2(e));\n nodeDict[mapIdPos[source]].push(0);\n nodeDict[mapIdPos[target]].push(mapIdPos[source]);\n nodeDict[mapIdPos[target]].push(attrs1(e));\n nodeDict[mapIdPos[target]].push(attrs2(e));\n nodeDict[mapIdPos[target]].push(0);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n // dataArray[i * 4 + 2] = offset;\n // dataArray[i * 4 + 3] = len / 4; // 第四位存储与该节点相关的所有节点个数\n // pack offset & length into float32: offset 20bit, length 12bit\n dataArray[i * 4 + 2] = offset + 1048576 * len / 4;\n dataArray[i * 4 + 3] = 0; // 第四位存储与上一次的距离差值\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 4);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n maxEdgePerVetex: maxEdgePerVetex,\n array: new Float32Array(dataArray),\n };\n};\nexports.buildTextureDataWithTwoEdgeAttr = buildTextureDataWithTwoEdgeAttr;\n/**\n* transform the extended attributes of nodes or edges to a texture array\n* @param {string[]} attributeNames attributes' name to be read from items and put into output array\n* @param {ModelConfig[]} items the items to be read\n* @return {Float32Array} the attributes' value array to be read by GPU\n*/\nvar attributesToTextureData = function (attributeNames, items) {\n var dataArray = [];\n var attributeNum = attributeNames.length;\n var attributteStringMap = {};\n items.forEach(function (item) {\n attributeNames.forEach(function (name, i) {\n if (attributteStringMap[item[name]] === undefined) {\n attributteStringMap[item[name]] = Object.keys(attributteStringMap).length;\n }\n dataArray.push(attributteStringMap[item[name]]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n });\n return {\n array: new Float32Array(dataArray),\n count: Object.keys(attributteStringMap).length\n };\n};\nexports.attributesToTextureData = attributesToTextureData;\n/**\n* transform the number array format of extended attributes of nodes or edges to a texture array\n* @param {string[]} attributeNames attributes' name to be read from items and put into output array\n* @return {Float32Array} the attributes' value array to be read by GPU\n*/\nvar arrayToTextureData = function (valueArrays) {\n var dataArray = [];\n var attributeNum = valueArrays.length;\n var itemNum = valueArrays[0].length;\n var _loop_1 = function (j) {\n valueArrays.forEach(function (valueArray, i) {\n dataArray.push(valueArray[j]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n };\n for (var j = 0; j < itemNum; j++) {\n _loop_1(j);\n }\n return new Float32Array(dataArray);\n};\nexports.arrayToTextureData = arrayToTextureData;\n//# sourceMappingURL=gpu.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clusterBundle = exports.clusterCode = exports.fruchtermanBundle = exports.fruchtermanCode = void 0;\nexports.fruchtermanCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\nconst MAX_EDGE_PER_VERTEX;\\nconst VERTEX_COUNT;\\n@numthreads(1, 1, 1)\\nclass Fruchterman {\\n @in @out\\n u_Data: vec4[];\\n @in\\n u_K: float;\\n @in\\n u_K2: float;\\n \\n @in\\n u_Center: vec2;\\n @in\\n u_Gravity: float;\\n @in\\n u_ClusterGravity: float;\\n @in\\n u_Speed: float;\\n @in\\n u_MaxDisplace: float;\\n @in\\n u_Clustering: float;\\n @in\\n u_AttributeArray: vec4[];\\n @in\\n u_ClusterCenters: vec4[];\\n calcRepulsive(i: int, currentNode: vec4): vec2 {\\n let dx = 0, dy = 0;\\n for (let j = 0; j < VERTEX_COUNT; j++) {\\n if (i != j) {\\n const nextNode = this.u_Data[j];\\n const xDist = currentNode[0] - nextNode[0];\\n const yDist = currentNode[1] - nextNode[1];\\n const dist = (xDist * xDist + yDist * yDist) + 0.01;\\n let param = this.u_K2 / dist;\\n \\n if (dist > 0.0) {\\n dx += param * xDist;\\n dy += param * yDist;\\n if (xDist == 0 && yDist == 0) {\\n const sign = i < j ? 1 : -1;\\n dx += param * sign;\\n dy += param * sign;\\n }\\n }\\n }\\n }\\n return [dx, dy];\\n }\\n calcGravity(currentNode: vec4, nodeAttributes: vec4): vec2 { // \\n let dx = 0, dy = 0;\\n const vx = currentNode[0] - this.u_Center[0];\\n const vy = currentNode[1] - this.u_Center[1];\\n const gf = 0.01 * this.u_K * this.u_Gravity;\\n dx = gf * vx;\\n dy = gf * vy;\\n if (this.u_Clustering == 1) {\\n const clusterIdx = int(nodeAttributes[0]);\\n const center = this.u_ClusterCenters[clusterIdx];\\n const cvx = currentNode[0] - center[0];\\n const cvy = currentNode[1] - center[1];\\n const dist = sqrt(cvx * cvx + cvy * cvy) + 0.01;\\n const parma = this.u_K * this.u_ClusterGravity / dist;\\n dx += parma * cvx;\\n dy += parma * cvy;\\n }\\n return [dx, dy];\\n }\\n calcAttractive(i: int, currentNode: vec4): vec2 {\\n let dx = 0, dy = 0;\\n const arr_offset = int(floor(currentNode[2] + 0.5));\\n const length = int(floor(currentNode[3] + 0.5));\\n const node_buffer: vec4;\\n for (let p = 0; p < MAX_EDGE_PER_VERTEX; p++) {\\n if (p >= length) break;\\n const arr_idx = arr_offset + p;\\n // when arr_idx % 4 == 0 update currentNodedx_buffer\\n const buf_offset = arr_idx - arr_idx / 4 * 4;\\n if (p == 0 || buf_offset == 0) {\\n node_buffer = this.u_Data[int(arr_idx / 4)];\\n }\\n const float_j = buf_offset == 0 ? node_buffer[0] :\\n buf_offset == 1 ? node_buffer[1] :\\n buf_offset == 2 ? node_buffer[2] :\\n node_buffer[3];\\n const nextNode = this.u_Data[int(float_j)];\\n const xDist = currentNode[0] - nextNode[0];\\n const yDist = currentNode[1] - nextNode[1];\\n const dist = sqrt(xDist * xDist + yDist * yDist) + 0.01;\\n let attractiveF = dist / this.u_K;\\n \\n if (dist > 0.0) {\\n dx -= xDist * attractiveF;\\n dy -= yDist * attractiveF;\\n if (xDist == 0 && yDist == 0) {\\n const sign = i < int(float_j) ? 1 : -1;\\n dx -= sign * attractiveF;\\n dy -= sign * attractiveF;\\n }\\n }\\n }\\n return [dx, dy];\\n }\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const currentNode = this.u_Data[i];\\n let dx = 0, dy = 0;\\n if (i >= VERTEX_COUNT) {\\n this.u_Data[i] = currentNode;\\n return;\\n }\\n\\n // [gravity, fx, fy, 0]\\n const nodeAttributes = this.u_AttributeArray[i];\\n\\n if (nodeAttributes[1] != 0 && nodeAttributes[2] != 0) {\\n // the node is fixed\\n this.u_Data[i] = [\\n nodeAttributes[1],\\n nodeAttributes[2],\\n currentNode[2],\\n currentNode[3]\\n ];\\n return;\\n }\\n\\n // repulsive\\n const repulsive = this.calcRepulsive(i, currentNode);\\n dx += repulsive[0];\\n dy += repulsive[1];\\n // attractive\\n const attractive = this.calcAttractive(i, currentNode);\\n dx += attractive[0];\\n dy += attractive[1];\\n // gravity\\n const gravity = this.calcGravity(currentNode, nodeAttributes);\\n dx -= gravity[0];\\n dy -= gravity[1];\\n // speed\\n dx *= this.u_Speed;\\n dy *= this.u_Speed;\\n\\n // move\\n const distLength = sqrt(dx * dx + dy * dy);\\n if (distLength > 0.0) {\\n const limitedDist = min(this.u_MaxDisplace * this.u_Speed, distLength);\\n this.u_Data[i] = [\\n currentNode[0] + dx / distLength * limitedDist,\\n currentNode[1] + dy / distLength * limitedDist,\\n currentNode[2],\\n currentNode[3]\\n ];\\n }\\n }\\n}\\n\";\nexports.fruchtermanBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define MAX_EDGE_PER_VERTEX __DefineValuePlaceholder__MAX_EDGE_PER_VERTEX\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_K;\\\\nuniform float u_K2;\\\\nuniform vec2 u_Center;\\\\nuniform float u_Gravity;\\\\nuniform float u_ClusterGravity;\\\\nuniform float u_Speed;\\\\nuniform float u_MaxDisplace;\\\\nuniform float u_Clustering;\\\\nuniform sampler2D u_AttributeArray;\\\\nuniform vec2 u_AttributeArraySize;\\\\nvec4 getDatau_AttributeArray(vec2 address2D) {\\\\n return vec4(texture2D(u_AttributeArray, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AttributeArray(float address1D) {\\\\n return getDatau_AttributeArray(addrTranslation_1Dto2D(address1D, u_AttributeArraySize));\\\\n}\\\\nvec4 getDatau_AttributeArray(int address1D) {\\\\n return getDatau_AttributeArray(float(address1D));\\\\n}\\\\nuniform sampler2D u_ClusterCenters;\\\\nuniform vec2 u_ClusterCentersSize;\\\\nvec4 getDatau_ClusterCenters(vec2 address2D) {\\\\n return vec4(texture2D(u_ClusterCenters, address2D).rgba);\\\\n}\\\\nvec4 getDatau_ClusterCenters(float address1D) {\\\\n return getDatau_ClusterCenters(addrTranslation_1Dto2D(address1D, u_ClusterCentersSize));\\\\n}\\\\nvec4 getDatau_ClusterCenters(int address1D) {\\\\n return getDatau_ClusterCenters(float(address1D));\\\\n}\\\\nvec2 calcRepulsive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {if (i != j) {vec4 nextNode = getDatau_Data(j);\\\\nfloat xDist = currentNode.x - nextNode.x;\\\\nfloat yDist = currentNode.y - nextNode.y;\\\\nfloat dist = ((xDist * xDist) + (yDist * yDist)) + 0.01;\\\\nfloat param = u_K2 / dist;\\\\nif (dist > 0.0) {dx += param * xDist;\\\\ndy += param * yDist;\\\\nif ((xDist == 0.0) && (yDist == 0.0)) {float sign = (i < j) ? (1.0) : (-1.0);\\\\ndx += param * sign;\\\\ndy += param * sign;}}}}\\\\nreturn vec2(dx, dy);}\\\\nvec2 calcGravity(vec4 currentNode, vec4 nodeAttributes) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nfloat vx = currentNode.x - u_Center.x;\\\\nfloat vy = currentNode.y - u_Center.y;\\\\nfloat gf = (0.01 * u_K) * u_Gravity;\\\\ndx = gf * vx;\\\\ndy = gf * vy;\\\\nif (u_Clustering == 1.0) {int clusterIdx = int(nodeAttributes.x);\\\\nvec4 center = getDatau_ClusterCenters(clusterIdx);\\\\nfloat cvx = currentNode.x - center.x;\\\\nfloat cvy = currentNode.y - center.y;\\\\nfloat dist = sqrt((cvx * cvx) + (cvy * cvy)) + 0.01;\\\\nfloat parma = (u_K * u_ClusterGravity) / dist;\\\\ndx += parma * cvx;\\\\ndy += parma * cvy;}\\\\nreturn vec2(dx, dy);}\\\\nvec2 calcAttractive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nint arr_offset = int(floor(currentNode.z + 0.5));\\\\nint length = int(floor(currentNode.w + 0.5));\\\\nvec4 node_buffer;\\\\nfor (int p = 0; p < MAX_EDGE_PER_VERTEX; p++) {if (p >= length) {break;}\\\\nint arr_idx = arr_offset + int(p);\\\\nint buf_offset = arr_idx - ((arr_idx / 4) * 4);\\\\nif ((p == 0) || (buf_offset == 0)) {node_buffer = getDatau_Data(int(arr_idx / 4));}\\\\nfloat float_j = (buf_offset == 0) ? (node_buffer.x) : ((buf_offset == 1) ? (node_buffer.y) : ((buf_offset == 2) ? (node_buffer.z) : (node_buffer.w)));\\\\nvec4 nextNode = getDatau_Data(int(float_j));\\\\nfloat xDist = currentNode.x - nextNode.x;\\\\nfloat yDist = currentNode.y - nextNode.y;\\\\nfloat dist = sqrt((xDist * xDist) + (yDist * yDist)) + 0.01;\\\\nfloat attractiveF = dist / u_K;\\\\nif (dist > 0.0) {dx -= xDist * attractiveF;\\\\ndy -= yDist * attractiveF;\\\\nif ((xDist == 0.0) && (yDist == 0.0)) {float sign = (i < int(float_j)) ? (1.0) : (-1.0);\\\\ndx -= sign * attractiveF;\\\\ndy -= sign * attractiveF;}}}\\\\nreturn vec2(dx, dy);}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 currentNode = getDatau_Data(i);\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nif (i >= VERTEX_COUNT) {gl_FragColor = vec4(currentNode);\\\\nreturn ;}\\\\nvec4 nodeAttributes = getDatau_AttributeArray(i);\\\\nif ((nodeAttributes.y != 0.0) && (nodeAttributes.z != 0.0)) {gl_FragColor = vec4(vec4(nodeAttributes.y, nodeAttributes.z, currentNode.z, currentNode.w));\\\\nreturn ;}\\\\nvec2 repulsive = calcRepulsive(i, currentNode);\\\\ndx += repulsive.x;\\\\ndy += repulsive.y;\\\\nvec2 attractive = calcAttractive(i, currentNode);\\\\ndx += attractive.x;\\\\ndy += attractive.y;\\\\nvec2 gravity = calcGravity(currentNode, nodeAttributes);\\\\ndx -= gravity.x;\\\\ndy -= gravity.y;\\\\ndx *= u_Speed;\\\\ndy *= u_Speed;\\\\nfloat distLength = sqrt((dx * dx) + (dy * dy));\\\\nif (distLength > 0.0) {float limitedDist = min(u_MaxDisplace * u_Speed, distLength);\\\\ngl_FragColor = vec4(vec4(currentNode.x + ((dx / distLength) * limitedDist), currentNode.y + ((dy / distLength) * limitedDist), currentNode.z, currentNode.w));}if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"MAX_EDGE_PER_VERTEX\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_K\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_K2\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Center\\\",\\\"type\\\":\\\"vec2\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Gravity\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterGravity\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Speed\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_MaxDisplace\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Clustering\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AttributeArray\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_Data\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\nexports.clusterCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\nconst VERTEX_COUNT;\\nconst CLUSTER_COUNT;\\n@numthreads(1, 1, 1)\\nclass CalcCenter {\\n @in\\n u_Data: vec4[];\\n @in\\n u_NodeAttributes: vec4[]; // [[clusterIdx, 0, 0, 0], ...]\\n @in @out\\n u_ClusterCenters: vec4[]; // [[cx, cy, nodeCount, clusterIdx], ...]\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const center = this.u_ClusterCenters[i];\\n let sumx = 0;\\n let sumy = 0;\\n let count = 0;\\n for (let j = 0; j < VERTEX_COUNT; j++) {\\n const attributes = this.u_NodeAttributes[j];\\n const clusterIdx = int(attributes[0]);\\n const vertex = this.u_Data[j];\\n if (clusterIdx == i) {\\n sumx += vertex.x;\\n sumy += vertex.y;\\n count += 1;\\n }\\n }\\n this.u_ClusterCenters[i] = [\\n sumx / count,\\n sumy / count,\\n count,\\n i\\n ];\\n }\\n}\\n\";\nexports.clusterBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n#define CLUSTER_COUNT __DefineValuePlaceholder__CLUSTER_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform sampler2D u_NodeAttributes;\\\\nuniform vec2 u_NodeAttributesSize;\\\\nvec4 getDatau_NodeAttributes(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributes, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributes(float address1D) {\\\\n return getDatau_NodeAttributes(addrTranslation_1Dto2D(address1D, u_NodeAttributesSize));\\\\n}\\\\nvec4 getDatau_NodeAttributes(int address1D) {\\\\n return getDatau_NodeAttributes(float(address1D));\\\\n}\\\\nuniform sampler2D u_ClusterCenters;\\\\nuniform vec2 u_ClusterCentersSize;\\\\nvec4 getDatau_ClusterCenters(vec2 address2D) {\\\\n return vec4(texture2D(u_ClusterCenters, address2D).rgba);\\\\n}\\\\nvec4 getDatau_ClusterCenters(float address1D) {\\\\n return getDatau_ClusterCenters(addrTranslation_1Dto2D(address1D, u_ClusterCentersSize));\\\\n}\\\\nvec4 getDatau_ClusterCenters(int address1D) {\\\\n return getDatau_ClusterCenters(float(address1D));\\\\n}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 center = getDatau_ClusterCenters(i);\\\\nfloat sumx = 0.0;\\\\nfloat sumy = 0.0;\\\\nfloat count = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {vec4 attributes = getDatau_NodeAttributes(j);\\\\nint clusterIdx = int(attributes.x);\\\\nvec4 vertex = getDatau_Data(j);\\\\nif (clusterIdx == i) {sumx += vertex.x;\\\\nsumy += vertex.y;\\\\ncount += 1.0;}}\\\\ngl_FragColor = vec4(vec4(sumx / count, sumy / count, count, i));if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"CLUSTER_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributes\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\n//# sourceMappingURL=fruchtermanShader.js.map","\"use strict\";\n// @ts-nocheck\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FruchtermanGPULayout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\n// @ts-ignore\nvar g_webgpu_1 = require(\"@antv/g-webgpu\");\n// compile at runtime in dev mode\nvar gpu_1 = require(\"../../util/gpu\");\n// use compiled bundle in prod mode\nvar fruchtermanShader_1 = require(\"./fruchtermanShader\");\nvar constants_1 = require(\"../constants\");\n/**\n * fruchterman 布局\n */\nvar FruchtermanGPULayout = /** @class */ (function (_super) {\n __extends(FruchtermanGPULayout, _super);\n function FruchtermanGPULayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 速度 */\n _this.speed = 1;\n /** 是否产生聚类力 */\n _this.clustering = false;\n /** 根据哪个字段聚类 */\n _this.clusterField = \"cluster\";\n /** 聚类力大小 */\n _this.clusterGravity = 10;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.updateCfg(options);\n return _this;\n }\n FruchtermanGPULayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n gravity: 10,\n speed: 1,\n clustering: false,\n clusterGravity: 10\n };\n };\n /**\n * 执行布局\n */\n FruchtermanGPULayout.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return [4 /*yield*/, self.run()];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.executeWithWorker = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n center = self.center;\n if (!nodes || nodes.length === 0) {\n return [2 /*return*/];\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return [4 /*yield*/, self.run(canvas, ctx)];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.run = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, edges, maxIteration, center, area, maxDisplace, k2, k, speed, clustering, _a, attributeArray, clusterCount, numParticles, _b, maxEdgePerVetex, nodesEdgesArray, workerEnabled, world, onLayoutEnd, clusterCenters, i, kernelFruchterman, kernelCluster, execute;\n var _this = this;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n edges = self.edges;\n maxIteration = self.maxIteration;\n center = self.center;\n area = self.height * self.width;\n maxDisplace = Math.sqrt(area) / 10;\n k2 = area / (nodes.length + 1);\n k = Math.sqrt(k2);\n speed = self.speed;\n clustering = self.clustering;\n _a = (0, gpu_1.attributesToTextureData)([self.clusterField], nodes), attributeArray = _a.array, clusterCount = _a.count;\n // pushing the fx and fy\n nodes.forEach(function (node, i) {\n var fx = 0;\n var fy = 0;\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n fx = node.fx || 0.001;\n fy = node.fy || 0.001;\n }\n attributeArray[4 * i + 1] = fx;\n attributeArray[4 * i + 2] = fy;\n });\n numParticles = nodes.length;\n _b = (0, gpu_1.buildTextureData)(nodes, edges), maxEdgePerVetex = _b.maxEdgePerVetex, nodesEdgesArray = _b.array;\n workerEnabled = self.workerEnabled;\n if (workerEnabled) {\n world = g_webgpu_1.World.create({\n canvas: canvas,\n engineOptions: {\n supportCompute: true\n }\n });\n }\n else {\n world = g_webgpu_1.World.create({\n engineOptions: {\n supportCompute: true\n }\n });\n }\n onLayoutEnd = self.onLayoutEnd;\n clusterCenters = [];\n for (i = 0; i < clusterCount; i++) {\n clusterCenters.push(0, 0, 0, 0);\n }\n kernelFruchterman = world\n .createKernel(fruchtermanShader_1.fruchtermanBundle)\n .setDispatch([numParticles, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_K: k,\n u_K2: k2,\n u_Gravity: self.gravity,\n u_ClusterGravity: self.clusterGravity || self.gravity || 1,\n u_Speed: speed,\n u_MaxDisplace: maxDisplace,\n u_Clustering: clustering ? 1 : 0,\n u_Center: center,\n u_AttributeArray: attributeArray,\n u_ClusterCenters: clusterCenters,\n MAX_EDGE_PER_VERTEX: maxEdgePerVetex,\n VERTEX_COUNT: numParticles\n });\n if (clustering) {\n kernelCluster = world\n .createKernel(fruchtermanShader_1.clusterBundle)\n .setDispatch([clusterCount, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_NodeAttributes: attributeArray,\n u_ClusterCenters: clusterCenters,\n VERTEX_COUNT: numParticles,\n CLUSTER_COUNT: clusterCount\n });\n }\n execute = function () { return __awaiter(_this, void 0, void 0, function () {\n var i, finalParticleData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < maxIteration)) return [3 /*break*/, 6];\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelFruchterman.execute()];\n case 2:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n if (!clustering) return [3 /*break*/, 4];\n kernelCluster.setBinding({\n u_Data: kernelFruchterman\n });\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelCluster.execute()];\n case 3:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n kernelFruchterman.setBinding({\n u_ClusterCenters: kernelCluster\n });\n _a.label = 4;\n case 4:\n kernelFruchterman.setBinding({\n u_MaxDisplace: maxDisplace *= 0.99\n });\n _a.label = 5;\n case 5:\n i++;\n return [3 /*break*/, 1];\n case 6: return [4 /*yield*/, kernelFruchterman.getOutput()];\n case 7:\n finalParticleData = _a.sent();\n if (canvas) {\n // 传递数据给主线程\n ctx.postMessage({\n type: constants_1.LAYOUT_MESSAGE.GPUEND,\n vertexEdgeData: finalParticleData\n // edgeIndexBufferData,\n });\n }\n else {\n nodes.forEach(function (node, i) {\n var x = finalParticleData[4 * i];\n var y = finalParticleData[4 * i + 1];\n node.x = x;\n node.y = y;\n });\n }\n if (onLayoutEnd)\n onLayoutEnd();\n return [2 /*return*/];\n }\n });\n }); };\n return [4 /*yield*/, execute()];\n case 1:\n _c.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.getType = function () {\n return \"fruchterman-gpu\";\n };\n return FruchtermanGPULayout;\n}(base_1.Base));\nexports.FruchtermanGPULayout = FruchtermanGPULayout;\n//# sourceMappingURL=fruchterman.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.aveMovementBundle = exports.aveMovementCode = exports.gForceBundle = exports.gForceCode = void 0;\nexports.gForceCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\n\\nconst MAX_EDGE_PER_VERTEX;\\nconst VERTEX_COUNT;\\nconst SHIFT_20 = 1048576;\\n\\n@numthreads(1, 1, 1)\\nclass GGForce {\\n @in @out\\n u_Data: vec4[];\\n\\n @in\\n u_damping: float;\\n \\n @in\\n u_maxSpeed: float;\\n\\n @in\\n u_minMovement: float;\\n\\n @in\\n u_AveMovement: vec4[];\\n\\n @in\\n u_coulombDisScale: float;\\n\\n @in\\n u_factor: float;\\n\\n @in\\n u_NodeAttributeArray1: vec4[];\\n\\n @in\\n u_NodeAttributeArray2: vec4[];\\n\\n @in\\n u_interval: float;\\n\\n unpack_float(packedValue: float): ivec2 {\\n const packedIntValue = int(packedValue);\\n const v0 = packedIntValue / SHIFT_20;\\n return [v0, packedIntValue - v0 * SHIFT_20];\\n }\\n\\n calcRepulsive(i: int, currentNode: vec4): vec2 {\\n let ax = 0, ay = 0;\\n for (let j: int = 0; j < VERTEX_COUNT; j++) {\\n if (i != j) {\\n const nextNode = this.u_Data[j];\\n const vx = currentNode[0] - nextNode[0];\\n const vy = currentNode[1] - nextNode[1];\\n const dist = sqrt(vx * vx + vy * vy) + 0.01;\\n const n_dist = (dist + 0.1) * this.u_coulombDisScale;\\n const direx = vx / dist;\\n const direy = vy / dist;\\n const attributesi = this.u_NodeAttributeArray1[i];\\n const attributesj = this.u_NodeAttributeArray1[j];\\n const massi = attributesi[0];\\n const nodeStrengthi = attributesi[2];\\n const nodeStrengthj = attributesj[2];\\n const nodeStrength = (nodeStrengthi + nodeStrengthj) / 2;\\n // const param = nodeStrength * this.u_factor / (n_dist * n_dist * massi);\\n const param = nodeStrength * this.u_factor / (n_dist * n_dist);\\n ax += direx * param;\\n ay += direy * param;\\n }\\n }\\n return [ax, ay];\\n }\\n\\n calcGravity(i: int, currentNode: vec4, attributes2: vec4): vec2 {\\n // note: attributes2 = [centerX, centerY, gravity, 0]\\n\\n const vx = currentNode[0] - attributes2[0];\\n const vy = currentNode[1] - attributes2[1];\\n \\n const ax = vx * attributes2[2];\\n const ay = vy * attributes2[2];\\n \\n return [ax, ay];\\n }\\n\\n calcAttractive(i: int, currentNode: vec4, attributes1: vec4): vec2 {\\n // note: attributes1 = [mass, degree, nodeSterngth, 0]\\n\\n const mass = attributes1[0];\\n let ax = 0, ay = 0;\\n // const arr_offset = int(floor(currentNode[2] + 0.5));\\n // const length = int(floor(currentNode[3] + 0.5));\\n\\n const compressed = this.unpack_float(currentNode[2]);\\n const length = compressed[0];\\n const arr_offset = compressed[1];\\n\\n const node_buffer: vec4;\\n for (let p: int = 0; p < MAX_EDGE_PER_VERTEX; p++) {\\n if (p >= length) break;\\n const arr_idx = arr_offset + 4 * p; // i \\u8282\\u70B9\\u7684\\u7B2C p \\u6761\\u8FB9\\u5F00\\u59CB\\u7684\\u5C0F\\u683C\\u5B50\\u4F4D\\u7F6E\\n const buf_offset = arr_idx - arr_idx / 4 * 4;\\n if (p == 0 || buf_offset == 0) {\\n node_buffer = this.u_Data[int(arr_idx / 4)]; // \\u5927\\u683C\\u5B50\\uFF0C\\u5927\\u683C\\u5B50\\u4F4D\\u7F6E=\\u5C0F\\u4E2A\\u5B50\\u4F4D\\u7F6E / 4\\uFF0C\\n }\\n\\n let float_j: float = node_buffer[0];\\n\\n const nextNode = this.u_Data[int(float_j)];\\n const vx = nextNode[0] - currentNode[0];\\n const vy = nextNode[1] - currentNode[1];\\n const dist = sqrt(vx * vx + vy * vy) + 0.01;\\n const direx = vx / dist;\\n const direy = vy / dist;\\n const edgeLength = node_buffer[1];\\n const edgeStrength = node_buffer[2];\\n const diff: float = edgeLength - dist;//edgeLength\\n // const param = diff * this.u_stiffness / mass; //\\n const param = diff * edgeStrength / mass; // \\n ax -= direx * param;\\n ay -= direy * param;\\n }\\n return [ax, ay];\\n }\\n\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const currentNode = this.u_Data[i];\\n const movement = u_AveMovement[0];\\n let ax = 0, ay = 0;\\n\\n if (i >= VERTEX_COUNT || movement.x < u_minMovement) {\\n this.u_Data[i] = currentNode;\\n return;\\n }\\n\\n // \\u6BCF\\u4E2A\\u8282\\u70B9\\u5C5E\\u6027\\u5360\\u4E24\\u4E2A\\u6570\\u7EC4\\u4E2D\\u5404\\u4E00\\u683C\\n // [mass, degree, nodeStrength, fx]\\n const nodeAttributes1 = this.u_NodeAttributeArray1[i];\\n // [centerX, centerY, centerGravity, fy]\\n const nodeAttributes2 = this.u_NodeAttributeArray2[i];\\n\\n // repulsive\\n const repulsive = this.calcRepulsive(i, currentNode);\\n ax += repulsive[0];\\n ay += repulsive[1];\\n\\n // attractive\\n const attractive = this.calcAttractive(i, currentNode, nodeAttributes1);\\n ax += attractive[0];\\n ay += attractive[1];\\n\\n // gravity\\n const gravity = this.calcGravity(i, currentNode, nodeAttributes2);\\n ax -= gravity[0];\\n ay -= gravity[1];\\n\\n // speed\\n const param = this.u_interval * this.u_damping;\\n let vx = ax * param;\\n let vy = ay * param;\\n const vlength = sqrt(vx * vx + vy * vy) + 0.0001;\\n if (vlength > this.u_maxSpeed) {\\n const param2 = this.u_maxSpeed / vlength;\\n vx = param2 * vx;\\n vy = param2 * vy;\\n }\\n\\n // move\\n if (nodeAttributes1[3] != 0 && nodeAttributes2[3] != 0) {\\n this.u_Data[i] = [\\n nodeAttributes1[3],\\n nodeAttributes2[3],\\n currentNode[2],\\n 0\\n ];\\n } else {\\n const distx = vx * this.u_interval;\\n const disty = vy * this.u_interval;\\n const distLength = sqrt(distx * distx + disty * disty);\\n this.u_Data[i] = [\\n currentNode[0] + distx,\\n currentNode[1] + disty,\\n currentNode[2],\\n distLength\\n ];\\n }\\n \\n // the avarage move distance\\n // need to share memory\\n \\n }\\n}\\n\";\nexports.gForceBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define MAX_EDGE_PER_VERTEX __DefineValuePlaceholder__MAX_EDGE_PER_VERTEX\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n#define SHIFT_20 1048576.0\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_damping;\\\\nuniform float u_maxSpeed;\\\\nuniform float u_minMovement;\\\\nuniform sampler2D u_AveMovement;\\\\nuniform vec2 u_AveMovementSize;\\\\nvec4 getDatau_AveMovement(vec2 address2D) {\\\\n return vec4(texture2D(u_AveMovement, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AveMovement(float address1D) {\\\\n return getDatau_AveMovement(addrTranslation_1Dto2D(address1D, u_AveMovementSize));\\\\n}\\\\nvec4 getDatau_AveMovement(int address1D) {\\\\n return getDatau_AveMovement(float(address1D));\\\\n}\\\\nuniform float u_coulombDisScale;\\\\nuniform float u_factor;\\\\nuniform sampler2D u_NodeAttributeArray1;\\\\nuniform vec2 u_NodeAttributeArray1Size;\\\\nvec4 getDatau_NodeAttributeArray1(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributeArray1, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributeArray1(float address1D) {\\\\n return getDatau_NodeAttributeArray1(addrTranslation_1Dto2D(address1D, u_NodeAttributeArray1Size));\\\\n}\\\\nvec4 getDatau_NodeAttributeArray1(int address1D) {\\\\n return getDatau_NodeAttributeArray1(float(address1D));\\\\n}\\\\nuniform sampler2D u_NodeAttributeArray2;\\\\nuniform vec2 u_NodeAttributeArray2Size;\\\\nvec4 getDatau_NodeAttributeArray2(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributeArray2, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributeArray2(float address1D) {\\\\n return getDatau_NodeAttributeArray2(addrTranslation_1Dto2D(address1D, u_NodeAttributeArray2Size));\\\\n}\\\\nvec4 getDatau_NodeAttributeArray2(int address1D) {\\\\n return getDatau_NodeAttributeArray2(float(address1D));\\\\n}\\\\nuniform float u_interval;\\\\nivec2 unpack_float(float packedValue) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint packedIntValue = int(packedValue);\\\\nint v0 = packedIntValue / int(SHIFT_20);\\\\nreturn ivec2(v0, packedIntValue - (v0 * int(SHIFT_20)));}\\\\nvec2 calcRepulsive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {if (i != j) {vec4 nextNode = getDatau_Data(j);\\\\nfloat vx = currentNode.x - nextNode.x;\\\\nfloat vy = currentNode.y - nextNode.y;\\\\nfloat dist = sqrt((vx * vx) + (vy * vy)) + 0.01;\\\\nfloat n_dist = (dist + 0.1) * u_coulombDisScale;\\\\nfloat direx = vx / dist;\\\\nfloat direy = vy / dist;\\\\nvec4 attributesi = getDatau_NodeAttributeArray1(i);\\\\nvec4 attributesj = getDatau_NodeAttributeArray1(j);\\\\nfloat massi = attributesi.x;\\\\nfloat nodeStrengthi = attributesi.z;\\\\nfloat nodeStrengthj = attributesj.z;\\\\nfloat nodeStrength = (nodeStrengthi + nodeStrengthj) / 2.0;\\\\nfloat param = (nodeStrength * u_factor) / (n_dist * n_dist);\\\\nax += direx * param;\\\\nay += direy * param;}}\\\\nreturn vec2(ax, ay);}\\\\nvec2 calcGravity(int i, vec4 currentNode, vec4 attributes2) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat vx = currentNode.x - attributes2.x;\\\\nfloat vy = currentNode.y - attributes2.y;\\\\nfloat ax = vx * attributes2.z;\\\\nfloat ay = vy * attributes2.z;\\\\nreturn vec2(ax, ay);}\\\\nvec2 calcAttractive(int i, vec4 currentNode, vec4 attributes1) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat mass = attributes1.x;\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nivec2 compressed = unpack_float(currentNode.z);\\\\nint length = compressed.x;\\\\nint arr_offset = compressed.y;\\\\nvec4 node_buffer;\\\\nfor (int p = 0; p < MAX_EDGE_PER_VERTEX; p++) {if (p >= length) {break;}\\\\nint arr_idx = arr_offset + (4 * p);\\\\nint buf_offset = arr_idx - ((arr_idx / 4) * 4);\\\\nif ((p == 0) || (buf_offset == 0)) {node_buffer = getDatau_Data(int(arr_idx / 4));}\\\\nfloat float_j = node_buffer.x;\\\\nvec4 nextNode = getDatau_Data(int(float_j));\\\\nfloat vx = nextNode.x - currentNode.x;\\\\nfloat vy = nextNode.y - currentNode.y;\\\\nfloat dist = sqrt((vx * vx) + (vy * vy)) + 0.01;\\\\nfloat direx = vx / dist;\\\\nfloat direy = vy / dist;\\\\nfloat edgeLength = node_buffer.y;\\\\nfloat edgeStrength = node_buffer.z;\\\\nfloat diff = edgeLength - dist;\\\\nfloat param = (diff * edgeStrength) / mass;\\\\nax -= direx * param;\\\\nay -= direy * param;}\\\\nreturn vec2(ax, ay);}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 currentNode = getDatau_Data(i);\\\\nvec4 movement = getDatau_AveMovement(0.0);\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nif ((i >= VERTEX_COUNT) || (movement.x < u_minMovement)) {gl_FragColor = vec4(currentNode);\\\\nreturn ;}\\\\nvec4 nodeAttributes1 = getDatau_NodeAttributeArray1(i);\\\\nvec4 nodeAttributes2 = getDatau_NodeAttributeArray2(i);\\\\nvec2 repulsive = calcRepulsive(i, currentNode);\\\\nax += repulsive.x;\\\\nay += repulsive.y;\\\\nvec2 attractive = calcAttractive(i, currentNode, nodeAttributes1);\\\\nax += attractive.x;\\\\nay += attractive.y;\\\\nvec2 gravity = calcGravity(i, currentNode, nodeAttributes2);\\\\nax -= gravity.x;\\\\nay -= gravity.y;\\\\nfloat param = u_interval * u_damping;\\\\nfloat vx = ax * param;\\\\nfloat vy = ay * param;\\\\nfloat vlength = sqrt((vx * vx) + (vy * vy)) + 0.0001;\\\\nif (vlength > u_maxSpeed) {float param2 = u_maxSpeed / vlength;\\\\nvx = param2 * vx;\\\\nvy = param2 * vy;}\\\\nif ((nodeAttributes1.w != 0.0) && (nodeAttributes2.w != 0.0)) {gl_FragColor = vec4(vec4(nodeAttributes1.w, nodeAttributes2.w, currentNode.z, 0.0));}else {float distx = vx * u_interval;\\\\nfloat disty = vy * u_interval;\\\\nfloat distLength = sqrt((distx * distx) + (disty * disty));\\\\ngl_FragColor = vec4(vec4(currentNode.x + distx, currentNode.y + disty, currentNode.z, distLength));}if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"MAX_EDGE_PER_VERTEX\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"SHIFT_20\\\",\\\"type\\\":\\\"Float\\\",\\\"value\\\":1048576,\\\"runtime\\\":false}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_damping\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_maxSpeed\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_minMovement\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AveMovement\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_coulombDisScale\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_factor\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributeArray1\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributeArray2\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_interval\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_Data\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\nexports.aveMovementCode = \"\\nconst VERTEX_COUNT;\\n@numthreads(1, 1, 1)\\nclass CalcAveMovement {\\n @in\\n u_Data: vec4[];\\n @in\\n u_iter: float;\\n @in @out\\n u_AveMovement: vec4[];\\n @main\\n compute() {\\n let movement = 0;\\n for (let j: int = 0; j < VERTEX_COUNT; j++) {\\n const vertex = this.u_Data[j];\\n movement += vertex[3];\\n }\\n movement = movement / float(VERTEX_COUNT);\\n this.u_AveMovement[0] = [movement, 0, 0, 0];\\n }\\n}\\n\";\nexports.aveMovementBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_iter;\\\\nuniform sampler2D u_AveMovement;\\\\nuniform vec2 u_AveMovementSize;\\\\nvec4 getDatau_AveMovement(vec2 address2D) {\\\\n return vec4(texture2D(u_AveMovement, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AveMovement(float address1D) {\\\\n return getDatau_AveMovement(addrTranslation_1Dto2D(address1D, u_AveMovementSize));\\\\n}\\\\nvec4 getDatau_AveMovement(int address1D) {\\\\n return getDatau_AveMovement(float(address1D));\\\\n}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat movement = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {vec4 vertex = getDatau_Data(j);\\\\nmovement += vertex.w;}\\\\nmovement = movement / float(VERTEX_COUNT);\\\\ngl_FragColor = vec4(vec4(movement, 0.0, 0.0, 0.0));if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_iter\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AveMovement\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_AveMovement\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\n//# sourceMappingURL=gForceShader.js.map","\"use strict\";\n// @ts-nocheck\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GForceGPULayout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\n// @ts-ignore\nvar g_webgpu_1 = require(\"@antv/g-webgpu\");\nvar gpu_1 = require(\"../../util/gpu\");\nvar math_1 = require(\"../../util/math\");\nvar gForceShader_1 = require(\"./gForceShader\");\nvar constants_1 = require(\"../constants\");\n/**\n * graphin 中的 force 布局\n */\nvar GForceGPULayout = /** @class */ (function (_super) {\n __extends(GForceGPULayout, _super);\n function GForceGPULayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 1000;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.5;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 1;\n /** 重力大小 */\n _this.gravity = 10;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.updateCfg(options);\n return _this;\n }\n GForceGPULayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 2000,\n gravity: 10,\n clustering: false,\n clusterGravity: 10\n };\n };\n /**\n * 执行布局\n */\n GForceGPULayout.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.nodeStrength = (0, gpu_1.proccessToFunc)(self.nodeStrength, 1);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength, 1);\n // layout\n return [4 /*yield*/, self.run()];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n GForceGPULayout.prototype.executeWithWorker = function (canvas, ctx) {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.nodeStrength = (0, gpu_1.proccessToFunc)(self.nodeStrength, 1);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength, 1);\n // layout\n self.run(canvas, ctx);\n };\n GForceGPULayout.prototype.run = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, edges, maxIteration, numParticles, _a, maxEdgePerVetex, nodesEdgesArray, masses, nodeStrengths, centerXs, centerYs, centerGravities, fxs, fys, gravity, center, nodeAttributeArray1, nodeAttributeArray2, workerEnabled, world, onLayoutEnd, initPreviousData, i, kernelGForce, kernelAveMovement, execute;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n edges = self.edges;\n maxIteration = self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n numParticles = nodes.length;\n self.linkDistance = (0, gpu_1.proccessToFunc)(self.linkDistance);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength);\n _a = (0, gpu_1.buildTextureDataWithTwoEdgeAttr)(nodes, edges, self.linkDistance, self.edgeStrength), maxEdgePerVetex = _a.maxEdgePerVetex, nodesEdgesArray = _a.array;\n // init degree for mass\n self.degrees = (0, math_1.getDegree)(nodes.length, self.nodeIdxMap, edges).map(function (degree) { return degree.all; });\n masses = [];\n nodeStrengths = [];\n centerXs = [];\n centerYs = [];\n centerGravities = [];\n fxs = [];\n fys = [];\n if (!self.getMass) {\n self.getMass = function (d) {\n return self.degrees[self.nodeIdxMap[d.id]] || 1;\n };\n }\n gravity = self.gravity;\n center = self.center;\n nodes.forEach(function (node, i) {\n masses.push(self.getMass(node));\n nodeStrengths.push(self.nodeStrength(node));\n if (!self.degrees[i])\n self.degrees[i] = 0;\n var nodeGravity = [center[0], center[1], gravity];\n if (self.getCenter) {\n var customCenter = self.getCenter(node, self.degrees[i]);\n if (customCenter &&\n (0, util_1.isNumber)(customCenter[0]) &&\n (0, util_1.isNumber)(customCenter[1]) &&\n (0, util_1.isNumber)(customCenter[2])) {\n nodeGravity = customCenter;\n }\n }\n centerXs.push(nodeGravity[0]);\n centerYs.push(nodeGravity[1]);\n centerGravities.push(nodeGravity[2]);\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n fxs.push(node.fx || 0.001);\n fys.push(node.fy || 0.001);\n }\n else {\n fxs.push(0);\n fys.push(0);\n }\n });\n nodeAttributeArray1 = (0, gpu_1.arrayToTextureData)([\n masses,\n self.degrees,\n nodeStrengths,\n fxs\n ]);\n nodeAttributeArray2 = (0, gpu_1.arrayToTextureData)([\n centerXs,\n centerYs,\n centerGravities,\n fys\n ]);\n workerEnabled = self.workerEnabled;\n if (workerEnabled) {\n world = g_webgpu_1.World.create({\n canvas: canvas,\n engineOptions: {\n supportCompute: true\n }\n });\n }\n else {\n world = g_webgpu_1.World.create({\n engineOptions: {\n supportCompute: true\n }\n });\n }\n onLayoutEnd = self.onLayoutEnd;\n initPreviousData = [];\n nodesEdgesArray.forEach(function (value) {\n initPreviousData.push(value);\n });\n for (i = 0; i < 4; i++) {\n initPreviousData.push(0);\n }\n kernelGForce = world\n .createKernel(gForceShader_1.gForceBundle)\n .setDispatch([numParticles, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_damping: self.damping,\n u_maxSpeed: self.maxSpeed,\n u_minMovement: self.minMovement,\n u_coulombDisScale: self.coulombDisScale,\n u_factor: self.factor,\n u_NodeAttributeArray1: nodeAttributeArray1,\n u_NodeAttributeArray2: nodeAttributeArray2,\n MAX_EDGE_PER_VERTEX: maxEdgePerVetex,\n VERTEX_COUNT: numParticles,\n u_AveMovement: initPreviousData,\n u_interval: self.interval // 每次迭代更新,首次设置为 interval,在 onIterationCompleted 中更新\n });\n kernelAveMovement = world\n .createKernel(gForceShader_1.aveMovementBundle)\n .setDispatch([1, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n VERTEX_COUNT: numParticles,\n u_AveMovement: [0, 0, 0, 0]\n });\n execute = function () { return __awaiter(_this, void 0, void 0, function () {\n var i, stepInterval, finalParticleData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < maxIteration)) return [3 /*break*/, 5];\n // TODO: 似乎都来自 kernelGForce 是一个引用\n // 当前坐标作为下一次迭代的 PreviousData\n // if (i > 0) {\n // kernelAveMovement.setBinding({\n // u_PreviousData: kernelGForce\n // });\n // }\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelGForce.execute()];\n case 2:\n // TODO: 似乎都来自 kernelGForce 是一个引用\n // 当前坐标作为下一次迭代的 PreviousData\n // if (i > 0) {\n // kernelAveMovement.setBinding({\n // u_PreviousData: kernelGForce\n // });\n // }\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n // midRes = await kernelGForce.getOutput();\n // 每次迭代完成后\n // 计算平均位移,用于提前终止迭代\n kernelAveMovement.setBinding({\n u_Data: kernelGForce\n });\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelAveMovement.execute()];\n case 3:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n stepInterval = Math.max(0.02, self.interval - i * 0.002);\n kernelGForce.setBinding({\n u_interval: stepInterval,\n u_AveMovement: kernelAveMovement\n });\n _a.label = 4;\n case 4:\n i++;\n return [3 /*break*/, 1];\n case 5: return [4 /*yield*/, kernelGForce.getOutput()];\n case 6:\n finalParticleData = _a.sent();\n // 所有迭代完成后\n if (canvas) {\n // 传递数据给主线程\n ctx.postMessage({\n type: constants_1.LAYOUT_MESSAGE.GPUEND,\n vertexEdgeData: finalParticleData\n // edgeIndexBufferData,\n });\n }\n else {\n nodes.forEach(function (node, i) {\n var x = finalParticleData[4 * i];\n var y = finalParticleData[4 * i + 1];\n node.x = x;\n node.y = y;\n });\n }\n if (onLayoutEnd)\n onLayoutEnd();\n return [2 /*return*/];\n }\n });\n }); };\n return [4 /*yield*/, execute()];\n case 1:\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n GForceGPULayout.prototype.getType = function () {\n return \"gForce-gpu\";\n };\n return GForceGPULayout;\n}(base_1.Base));\nexports.GForceGPULayout = GForceGPULayout;\n//# sourceMappingURL=gForce.js.map","\"use strict\";\n/**\n * @fileOverview Combo force layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComboForceLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\n/**\n * force layout for graph with combos\n */\nvar ComboForceLayout = /** @class */ (function (_super) {\n __extends(ComboForceLayout, _super);\n function ComboForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 100;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 群组中心力大小 */\n _this.comboGravity = 10;\n /** 默认边长度 */\n _this.linkDistance = 10;\n /** 每次迭代位移的衰减相关参数 */\n _this.alpha = 1;\n _this.alphaMin = 0.001;\n _this.alphaDecay = 1 - Math.pow(_this.alphaMin, (1 / 300));\n _this.alphaTarget = 0;\n /** 节点运动速度衰减参数 */\n _this.velocityDecay = 0.6;\n /** 边引力大小 */\n _this.edgeStrength = 0.6;\n /** 节点引力大小 */\n _this.nodeStrength = 30;\n /** 是否开启防止重叠 */\n _this.preventOverlap = false;\n /** 是否开启节点之间的防止重叠 */\n _this.preventNodeOverlap = false;\n /** 是否开启 Combo 之间的防止重叠 */\n _this.preventComboOverlap = false;\n /** 防止重叠的碰撞力大小 */\n _this.collideStrength = undefined;\n /** 防止重叠的碰撞力大小 */\n _this.nodeCollideStrength = 0.5;\n /** 防止重叠的碰撞力大小 */\n _this.comboCollideStrength = 0.5;\n /** Combo 最小间距,防止重叠时的间隙 */\n _this.comboSpacing = 20;\n /** Combo 内部的 padding */\n _this.comboPadding = 10;\n /** 优化计算斥力的速度,两节点间距超过 optimizeRangeFactor * width 则不再计算斥力和重叠斥力 */\n _this.optimizeRangeFactor = 1;\n /** 每次迭代的回调函数 */\n _this.onTick = function () { };\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n /** 根据边两端节点层级差距的调整引力系数的因子,取值范围 [0, 1]。层级差距越大,引力越小 */\n _this.depthAttractiveForceScale = 1;\n /** 根据边两端节点层级差距的调整斥力系数的因子,取值范围 [1, Infinity]。层级差距越大,斥力越大 */\n _this.depthRepulsiveForceScale = 2;\n /** 内部计算参数 */\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n _this.comboTrees = [];\n _this.width = 300;\n _this.height = 300;\n _this.bias = [];\n _this.nodeMap = {};\n _this.oriComboMap = {};\n _this.indexMap = {};\n _this.comboMap = {};\n _this.previousLayouted = false;\n _this.updateCfg(options);\n return _this;\n }\n ComboForceLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 100,\n center: [0, 0],\n gravity: 10,\n speed: 1,\n comboGravity: 30,\n preventOverlap: false,\n preventComboOverlap: true,\n preventNodeOverlap: true,\n nodeSpacing: undefined,\n collideStrength: undefined,\n nodeCollideStrength: 0.5,\n comboCollideStrength: 0.5,\n comboSpacing: 20,\n comboPadding: 10,\n edgeStrength: 0.6,\n nodeStrength: 30,\n linkDistance: 10\n };\n };\n /**\n * 执行布局\n */\n ComboForceLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n self.comboTree = {\n id: \"comboTreeRoot\",\n depth: -1,\n children: self.comboTrees\n };\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n self.initVals();\n // layout\n self.run();\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n };\n ComboForceLayout.prototype.run = function () {\n var self = this;\n var nodes = self.nodes;\n var maxIteration = self.previousLayouted\n ? self.maxIteration / 5\n : self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n var center = self.center;\n var velocityDecay = self.velocityDecay;\n // init the positions to make the nodes with same combo gather around the combo\n var comboMap = self.comboMap;\n if (!self.previousLayouted)\n self.initPos(comboMap);\n var _loop_1 = function (i) {\n var displacements = [];\n nodes.forEach(function (_, j) {\n displacements[j] = { x: 0, y: 0 };\n });\n self.applyCalculate(displacements);\n // gravity for combos\n self.applyComboCenterForce(displacements);\n // move\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n n.x += displacements[j].x * velocityDecay;\n n.y += displacements[j].y * velocityDecay;\n });\n self.alpha += (self.alphaTarget - self.alpha) * self.alphaDecay;\n self.onTick();\n };\n // iterate\n for (var i = 0; i < maxIteration; i++) {\n _loop_1(i);\n }\n // move to center\n var meanCenter = [0, 0];\n nodes.forEach(function (n) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n meanCenter[0] += n.x;\n meanCenter[1] += n.y;\n });\n meanCenter[0] /= nodes.length;\n meanCenter[1] /= nodes.length;\n var centerOffset = [center[0] - meanCenter[0], center[1] - meanCenter[1]];\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n n.x += centerOffset[0];\n n.y += centerOffset[1];\n });\n // arrange the empty combo\n self.combos.forEach(function (combo) {\n var mapped = comboMap[combo.id];\n if (mapped && mapped.empty) {\n combo.x = mapped.cx || combo.x;\n combo.y = mapped.cy || combo.y;\n }\n });\n self.previousLayouted = true;\n };\n ComboForceLayout.prototype.initVals = function () {\n var self = this;\n var edges = self.edges;\n var nodes = self.nodes;\n var combos = self.combos;\n var count = {};\n var nodeMap = {};\n var indexMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = node;\n indexMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.indexMap = indexMap;\n var oriComboMap = {};\n combos.forEach(function (combo) {\n oriComboMap[combo.id] = combo;\n });\n self.oriComboMap = oriComboMap;\n self.comboMap = self.getComboMap();\n var preventOverlap = self.preventOverlap;\n self.preventComboOverlap = self.preventComboOverlap || preventOverlap;\n self.preventNodeOverlap = self.preventNodeOverlap || preventOverlap;\n var collideStrength = self.collideStrength;\n if (collideStrength) {\n self.comboCollideStrength = collideStrength;\n self.nodeCollideStrength = collideStrength;\n }\n self.comboCollideStrength = self.comboCollideStrength\n ? self.comboCollideStrength\n : 0;\n self.nodeCollideStrength = self.nodeCollideStrength\n ? self.nodeCollideStrength\n : 0;\n // get edge bias\n for (var i = 0; i < edges.length; ++i) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n if (count[source])\n count[source]++;\n else\n count[source] = 1;\n if (count[target])\n count[target]++;\n else\n count[target] = 1;\n }\n var bias = [];\n for (var i = 0; i < edges.length; ++i) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n bias[i] = count[source] / (count[source] + count[target]);\n }\n this.bias = bias;\n var nodeSize = self.nodeSize;\n var nodeSpacing = self.nodeSpacing;\n var nodeSizeFunc;\n var nodeSpacingFunc;\n // nodeSpacing to function\n if ((0, util_1.isNumber)(nodeSpacing)) {\n nodeSpacingFunc = function () { return nodeSpacing; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing)) {\n nodeSpacingFunc = nodeSpacing;\n }\n else {\n nodeSpacingFunc = function () { return 0; };\n }\n this.nodeSpacing = nodeSpacingFunc;\n // nodeSize to function\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res / 2;\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res / 2;\n }\n return d.size / 2;\n }\n return 10;\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return nodeSize(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1; };\n }\n else {\n // number type\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2; };\n }\n this.nodeSize = nodeSizeFunc;\n // comboSpacing to function\n var comboSpacing = self.comboSpacing;\n var comboSpacingFunc;\n if ((0, util_1.isNumber)(comboSpacing)) {\n comboSpacingFunc = function () { return comboSpacing; };\n }\n else if ((0, util_1.isFunction)(comboSpacing)) {\n comboSpacingFunc = comboSpacing;\n }\n else {\n // null type\n comboSpacingFunc = function () { return 0; };\n }\n this.comboSpacing = comboSpacingFunc;\n // comboPadding to function\n var comboPadding = self.comboPadding;\n var comboPaddingFunc;\n if ((0, util_1.isNumber)(comboPadding)) {\n comboPaddingFunc = function () { return comboPadding; };\n }\n else if ((0, util_1.isArray)(comboPadding)) {\n comboPaddingFunc = function () { return Math.max.apply(null, comboPadding); };\n }\n else if ((0, util_1.isFunction)(comboPadding)) {\n comboPaddingFunc = comboPadding;\n }\n else {\n // null type\n comboPaddingFunc = function () { return 0; };\n }\n this.comboPadding = comboPaddingFunc;\n // linkDistance to function\n var linkDistance = this.linkDistance;\n var linkDistanceFunc;\n if (!linkDistance) {\n linkDistance = 10;\n }\n if ((0, util_1.isNumber)(linkDistance)) {\n linkDistanceFunc = function (d) {\n return linkDistance;\n };\n }\n else {\n linkDistanceFunc = linkDistance;\n }\n this.linkDistance = linkDistanceFunc;\n // linkStrength to function\n var edgeStrength = this.edgeStrength;\n var edgeStrengthFunc;\n if (!edgeStrength) {\n edgeStrength = 1;\n }\n if ((0, util_1.isNumber)(edgeStrength)) {\n edgeStrengthFunc = function (d) {\n return edgeStrength;\n };\n }\n else {\n edgeStrengthFunc = edgeStrength;\n }\n this.edgeStrength = edgeStrengthFunc;\n // nodeStrength to function\n var nodeStrength = this.nodeStrength;\n var nodeStrengthFunc;\n if (!nodeStrength) {\n nodeStrength = 30;\n }\n if ((0, util_1.isNumber)(nodeStrength)) {\n nodeStrengthFunc = function (d) {\n return nodeStrength;\n };\n }\n else {\n nodeStrengthFunc = nodeStrength;\n }\n this.nodeStrength = nodeStrengthFunc;\n };\n ComboForceLayout.prototype.initPos = function (comboMap) {\n var self = this;\n var nodes = self.nodes;\n nodes.forEach(function (node, i) {\n var comboId = node.comboId;\n var combo = comboMap[comboId];\n if (comboId && combo) {\n node.x = combo.cx + 100 / (i + 1);\n node.y = combo.cy + 100 / (i + 1);\n }\n else {\n node.x = 100 / (i + 1);\n node.y = 100 / (i + 1);\n }\n });\n };\n ComboForceLayout.prototype.getComboMap = function () {\n var self = this;\n var nodeMap = self.nodeMap;\n var comboTrees = self.comboTrees;\n var oriComboMap = self.oriComboMap;\n var comboMap = {};\n (comboTrees || []).forEach(function (ctree) {\n var treeChildren = [];\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n if (!oriComboMap[treeNode.id])\n return true; // means it is hidden, skip it\n if (comboMap[treeNode.id] === undefined) {\n var combo = {\n id: treeNode.id,\n name: treeNode.id,\n cx: 0,\n cy: 0,\n count: 0,\n depth: self.oriComboMap[treeNode.id].depth || 0,\n children: []\n };\n comboMap[treeNode.id] = combo;\n }\n var children = treeNode.children;\n if (children) {\n children.forEach(function (child) {\n if (!comboMap[child.id] && !nodeMap[child.id])\n return true; // means it is hidden\n treeChildren.push(child);\n });\n }\n var c = comboMap[treeNode.id];\n c.cx = 0;\n c.cy = 0;\n if (treeChildren.length === 0) {\n c.empty = true;\n var oriCombo = oriComboMap[treeNode.id];\n c.cx = oriCombo.x;\n c.cy = oriCombo.y;\n }\n treeChildren.forEach(function (child) {\n c.count++;\n if (child.itemType !== \"node\") {\n var childCombo = comboMap[child.id];\n if ((0, util_1.isNumber)(childCombo.cx))\n c.cx += childCombo.cx;\n if ((0, util_1.isNumber)(childCombo.cy))\n c.cy += childCombo.cy;\n return;\n }\n var node = nodeMap[child.id];\n // means the node is hidden, skip it\n if (!node)\n return;\n if ((0, util_1.isNumber)(node.x)) {\n c.cx += node.x;\n }\n if ((0, util_1.isNumber)(node.y)) {\n c.cy += node.y;\n }\n });\n c.cx /= (c.count || 1);\n c.cy /= (c.count || 1);\n c.children = treeChildren;\n return true;\n });\n });\n return comboMap;\n };\n ComboForceLayout.prototype.applyComboCenterForce = function (displacements) {\n var self = this;\n var gravity = self.gravity;\n var comboGravity = self.comboGravity || gravity;\n var alpha = this.alpha;\n var comboTrees = self.comboTrees;\n var indexMap = self.indexMap;\n var nodeMap = self.nodeMap;\n var comboMap = self.comboMap;\n (comboTrees || []).forEach(function (ctree) {\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n var combo = comboMap[treeNode.id];\n // means the combo is hidden, skip it\n if (!combo)\n return true;\n var c = comboMap[treeNode.id];\n // higher depth the combo, larger the gravity\n var gravityScale = ((c.depth + 1) / 10) * 0.5;\n // apply combo center force for all the descend nodes in this combo\n // and update the center position and count for this combo\n var comboX = c.cx;\n var comboY = c.cy;\n c.cx = 0;\n c.cy = 0;\n c.children.forEach(function (child) {\n if (child.itemType !== \"node\") {\n var childCombo = comboMap[child.id];\n if (childCombo && (0, util_1.isNumber)(childCombo.cx))\n c.cx += childCombo.cx;\n if (childCombo && (0, util_1.isNumber)(childCombo.cy))\n c.cy += childCombo.cy;\n return;\n }\n var node = nodeMap[child.id];\n var vecX = (node.x - comboX) || 0.005;\n var vecY = (node.y - comboY) || 0.005;\n var l = Math.sqrt(vecX * vecX + vecY * vecY);\n var childIdx = indexMap[node.id];\n var params = ((comboGravity * alpha) / l) * gravityScale;\n displacements[childIdx].x -= vecX * params;\n displacements[childIdx].y -= vecY * params;\n if ((0, util_1.isNumber)(node.x))\n c.cx += node.x;\n if ((0, util_1.isNumber)(node.y))\n c.cy += node.y;\n });\n c.cx /= (c.count || 1);\n c.cy /= (c.count || 1);\n return true;\n });\n });\n };\n ComboForceLayout.prototype.applyCalculate = function (displacements) {\n var self = this;\n var comboMap = self.comboMap;\n var nodes = self.nodes;\n // store the vx, vy, and distance to reduce dulplicate calculation\n var vecMap = {};\n nodes.forEach(function (v, i) {\n nodes.forEach(function (u, j) {\n if (i < j)\n return;\n var vx = (v.x - u.x) || 0.005;\n var vy = (v.y - u.y) || 0.005;\n var vl2 = vx * vx + vy * vy;\n var vl = Math.sqrt(vl2);\n if (vl2 < 1)\n vl2 = vl;\n vecMap[\"\".concat(v.id, \"-\").concat(u.id)] = { vx: vx, vy: vy, vl2: vl2, vl: vl };\n vecMap[\"\".concat(u.id, \"-\").concat(v.id)] = { vl2: vl2, vl: vl, vx: -vx, vy: -vy };\n });\n });\n // get the sizes of the combos\n self.updateComboSizes(comboMap);\n self.calRepulsive(displacements, vecMap);\n self.calAttractive(displacements, vecMap);\n var preventComboOverlap = self.preventComboOverlap;\n if (preventComboOverlap)\n self.comboNonOverlapping(displacements, comboMap);\n };\n /**\n * Update the sizes of the combos according to their children\n * Used for combos nonoverlap, but not re-render the combo shapes\n */\n ComboForceLayout.prototype.updateComboSizes = function (comboMap) {\n var self = this;\n var comboTrees = self.comboTrees;\n var nodeMap = self.nodeMap;\n var nodeSize = self.nodeSize;\n var comboSpacing = self.comboSpacing;\n var comboPadding = self.comboPadding;\n (comboTrees || []).forEach(function (ctree) {\n var treeChildren = [];\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n var c = comboMap[treeNode.id];\n // means the combo is hidden, skip it\n if (!c)\n return false;\n var children = treeNode.children;\n if (children) {\n children.forEach(function (child) {\n // means the combo is hidden.\n if (!comboMap[child.id] && !nodeMap[child.id])\n return;\n treeChildren.push(child);\n });\n }\n c.minX = Infinity;\n c.minY = Infinity;\n c.maxX = -Infinity;\n c.maxY = -Infinity;\n treeChildren.forEach(function (child) {\n if (child.itemType !== \"node\")\n return true; // skip it\n var node = nodeMap[child.id];\n if (!node)\n return true; // means it is hidden\n var r = nodeSize(node);\n var nodeMinX = node.x - r;\n var nodeMinY = node.y - r;\n var nodeMaxX = node.x + r;\n var nodeMaxY = node.y + r;\n if (c.minX > nodeMinX)\n c.minX = nodeMinX;\n if (c.minY > nodeMinY)\n c.minY = nodeMinY;\n if (c.maxX < nodeMaxX)\n c.maxX = nodeMaxX;\n if (c.maxY < nodeMaxY)\n c.maxY = nodeMaxY;\n });\n var minSize = self.oriComboMap[treeNode.id].size || 10;\n if ((0, util_1.isArray)(minSize))\n minSize = minSize[0];\n var maxLength = Math.max(c.maxX - c.minX, c.maxY - c.minY, minSize);\n c.r = maxLength / 2 + comboSpacing(c) / 2 + comboPadding(c);\n return true;\n });\n });\n };\n /**\n * prevent the overlappings among combos\n */\n ComboForceLayout.prototype.comboNonOverlapping = function (displacements, comboMap) {\n var self = this;\n var comboTree = self.comboTree;\n var comboCollideStrength = self.comboCollideStrength;\n var indexMap = self.indexMap;\n var nodeMap = self.nodeMap;\n (0, util_1.traverseTreeUp)(comboTree, function (treeNode) {\n if (!comboMap[treeNode.id] &&\n !nodeMap[treeNode.id] &&\n treeNode.id !== \"comboTreeRoot\") {\n return false;\n } // means it is hidden\n var children = treeNode.children;\n // 同个子树下的子 combo 间两两对比\n if (children && children.length > 1) {\n children.forEach(function (v, i) {\n if (v.itemType === \"node\")\n return false; // skip it\n var cv = comboMap[v.id];\n if (!cv)\n return; // means it is hidden, skip it\n children.forEach(function (u, j) {\n if (i <= j)\n return false;\n if (u.itemType === \"node\")\n return false; // skip it\n var cu = comboMap[u.id];\n if (!cu)\n return false; // means it is hidden, skip it\n var vx = (cv.cx - cu.cx) || 0.005;\n var vy = (cv.cy - cu.cy) || 0.005;\n var l = vx * vx + vy * vy;\n var rv = cv.r || 1;\n var ru = cu.r || 1;\n var r = rv + ru;\n var ru2 = ru * ru;\n var rv2 = rv * rv;\n // overlapping\n if (l < r * r) {\n var vnodes = v.children;\n if (!vnodes || vnodes.length === 0)\n return false; // skip it\n var unodes_1 = u.children;\n if (!unodes_1 || unodes_1.length === 0)\n return false; // skip it\n var sqrtl = Math.sqrt(l);\n var ll = ((r - sqrtl) / sqrtl) * comboCollideStrength;\n var xl_1 = vx * ll;\n var yl_1 = vy * ll;\n var rratio_1 = ru2 / (rv2 + ru2);\n var irratio_1 = 1 - rratio_1;\n // 两兄弟 combo 的子节点上施加斥力\n vnodes.forEach(function (vn) {\n if (vn.itemType !== \"node\")\n return false; // skip it\n if (!nodeMap[vn.id])\n return; // means it is hidden, skip it\n var vindex = indexMap[vn.id];\n unodes_1.forEach(function (un) {\n if (un.itemType !== \"node\")\n return false;\n if (!nodeMap[un.id])\n return false; // means it is hidden, skip it\n var uindex = indexMap[un.id];\n displacements[vindex].x += xl_1 * rratio_1;\n displacements[vindex].y += yl_1 * rratio_1;\n displacements[uindex].x -= xl_1 * irratio_1;\n displacements[uindex].y -= yl_1 * irratio_1;\n });\n });\n }\n });\n });\n }\n return true;\n });\n };\n /**\n * Calculate the repulsive force between each node pair\n * @param displacements The array stores the displacements for nodes\n * @param vecMap The map stores vector between each node pair\n */\n ComboForceLayout.prototype.calRepulsive = function (displacements, vecMap) {\n var self = this;\n var nodes = self.nodes;\n var max = self.width * self.optimizeRangeFactor;\n var nodeStrength = self.nodeStrength;\n var alpha = self.alpha;\n var nodeCollideStrength = self.nodeCollideStrength;\n var preventNodeOverlap = self.preventNodeOverlap;\n var nodeSizeFunc = self.nodeSize;\n var nodeSpacingFunc = self.nodeSpacing;\n var scale = self.depthRepulsiveForceScale;\n var center = self.center;\n nodes.forEach(function (v, i) {\n if (!v.x || !v.y)\n return;\n // center gravity\n if (center) {\n var gravity = self.gravity;\n var vecX = (v.x - center[0]) || 0.005;\n var vecY = (v.y - center[1]) || 0.005;\n var l = Math.sqrt(vecX * vecX + vecY * vecY);\n displacements[i].x -= (vecX * gravity * alpha) / l;\n displacements[i].y -= (vecY * gravity * alpha) / l;\n }\n nodes.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n if (!u.x || !u.y)\n return;\n var _a = vecMap[\"\".concat(v.id, \"-\").concat(u.id)], vl2 = _a.vl2, vl = _a.vl;\n if (vl > max)\n return;\n var _b = vecMap[\"\".concat(v.id, \"-\").concat(u.id)], vx = _b.vx, vy = _b.vy;\n var depthDiff = Math.log(Math.abs(u.depth - v.depth) / 10) + 1 || 1;\n depthDiff = depthDiff < 1 ? 1 : depthDiff;\n if (u.comboId !== v.comboId)\n depthDiff += 1;\n var depthParam = depthDiff ? Math.pow(scale, depthDiff) : 1;\n var params = ((nodeStrength(u) * alpha) / vl2) * depthParam;\n displacements[i].x += vx * params;\n displacements[i].y += vy * params;\n // prevent node overlappings\n if (i < j && preventNodeOverlap) {\n var ri = (nodeSizeFunc(v) + nodeSpacingFunc(v)) || 1;\n var rj = (nodeSizeFunc(u) + nodeSpacingFunc(u)) || 1;\n var r = ri + rj;\n if (vl2 < r * r) {\n var ll = ((r - vl) / vl) * nodeCollideStrength;\n var rj2 = rj * rj;\n var rratio = rj2 / (ri * ri + rj2);\n var xl = vx * ll;\n var yl = vy * ll;\n displacements[i].x += xl * rratio;\n displacements[i].y += yl * rratio;\n rratio = 1 - rratio;\n displacements[j].x -= xl * rratio;\n displacements[j].y -= yl * rratio;\n }\n }\n });\n });\n };\n /**\n * Calculate the attractive force between the node pair with edge\n * @param displacements The array stores the displacements for nodes\n * @param vecMap The map stores vector between each node pair\n */\n ComboForceLayout.prototype.calAttractive = function (displacements, vecMap) {\n var self = this;\n var edges = self.edges;\n var linkDistance = self.linkDistance;\n var alpha = self.alpha;\n var edgeStrength = self.edgeStrength;\n var bias = self.bias;\n var scale = self.depthAttractiveForceScale;\n edges.forEach(function (e, i) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n if (!source || !target || source === target)\n return;\n var uIndex = self.indexMap[source];\n var vIndex = self.indexMap[target];\n var u = self.nodeMap[source];\n var v = self.nodeMap[target];\n if (!u || !v)\n return;\n var depthDiff = u.depth === v.depth ? 0 : Math.log(Math.abs(u.depth - v.depth) / 10);\n if (u.comboId === v.comboId) {\n depthDiff = depthDiff / 2;\n }\n var depthParam = depthDiff ? Math.pow(scale, depthDiff) : 1;\n if (u.comboId !== v.comboId && depthParam === 1) {\n depthParam = scale / 2;\n }\n else if (u.comboId === v.comboId) {\n depthParam = 2;\n }\n if (!(0, util_1.isNumber)(v.x) || !(0, util_1.isNumber)(u.x) || !(0, util_1.isNumber)(v.y) || !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var _a = vecMap[\"\".concat(target, \"-\").concat(source)], vl = _a.vl, vx = _a.vx, vy = _a.vy;\n var l = ((vl - linkDistance(e)) / vl) * alpha * edgeStrength(e) * depthParam;\n var vecX = vx * l;\n var vecY = vy * l;\n var b = bias[i];\n displacements[vIndex].x -= vecX * b;\n displacements[vIndex].y -= vecY * b;\n displacements[uIndex].x += vecX * (1 - b);\n displacements[uIndex].y += vecY * (1 - b);\n });\n };\n ComboForceLayout.prototype.getType = function () {\n return \"comboForce\";\n };\n return ComboForceLayout;\n}(base_1.Base));\nexports.ComboForceLayout = ComboForceLayout;\n//# sourceMappingURL=comboForce.js.map","\"use strict\";\n/**\n * @fileOverview Combo force layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComboCombinedLayout = void 0;\nvar constants_1 = require(\"./constants\");\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar _1 = require(\".\");\n/**\n * combined two layouts (inner and outer) for graph with combos\n */\nvar ComboCombinedLayout = /** @class */ (function (_super) {\n __extends(ComboCombinedLayout, _super);\n function ComboCombinedLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 内部计算参数 */\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n _this.comboEdges = [];\n /** Combo 内部的 padding */\n _this.comboPadding = 10;\n _this.comboTrees = [];\n _this.updateCfg(options);\n return _this;\n }\n ComboCombinedLayout.prototype.getDefaultCfg = function () {\n return {};\n };\n /**\n * 执行布局\n */\n ComboCombinedLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n self.initVals();\n // layout\n self.run();\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n };\n ComboCombinedLayout.prototype.run = function () {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges, combos = self.combos, comboEdges = self.comboEdges, center = self.center;\n var nodeMap = {};\n nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var comboMap = {};\n combos.forEach(function (combo) {\n comboMap[combo.id] = combo;\n });\n var innerGraphs = self.getInnerGraphs(nodeMap);\n // 每个 innerGraph 作为一个节点,带有大小,参与 force 计算\n var outerNodeIds = [];\n var outerNodes = [];\n var nodeAncestorIdMap = {};\n var allHaveNoPosition = true;\n this.comboTrees.forEach(function (cTree) {\n var innerNode = innerGraphs[cTree.id];\n if (!innerNode) {\n return;\n }\n // 代表 combo 的节点\n var oNode = __assign(__assign({}, cTree), { x: innerNode.x || comboMap[cTree.id].x, y: innerNode.y || comboMap[cTree.id].y, fx: innerNode.fx || comboMap[cTree.id].fx, fy: innerNode.fy || comboMap[cTree.id].fy, mass: innerNode.mass || comboMap[cTree.id].mass, size: innerNode.size });\n outerNodes.push(oNode);\n if (!isNaN(oNode.x) &&\n oNode.x !== 0 &&\n !isNaN(oNode.y) &&\n oNode.y !== 0) {\n allHaveNoPosition = false;\n }\n else {\n oNode.x = Math.random() * 100;\n oNode.y = Math.random() * 100;\n }\n outerNodeIds.push(cTree.id);\n (0, util_1.traverseTreeUp)(cTree, function (child) {\n if (child.id !== cTree.id)\n nodeAncestorIdMap[child.id] = cTree.id;\n return true;\n });\n });\n nodes.forEach(function (node) {\n if (node.comboId && comboMap[node.comboId])\n return;\n // 代表节点的节点\n var oNode = __assign({}, node);\n outerNodes.push(oNode);\n if (!isNaN(oNode.x) &&\n oNode.x !== 0 &&\n !isNaN(oNode.y) &&\n oNode.y !== 0) {\n allHaveNoPosition = false;\n }\n else {\n oNode.x = Math.random() * 100;\n oNode.y = Math.random() * 100;\n }\n outerNodeIds.push(node.id);\n });\n var outerEdges = [];\n edges.concat(comboEdges).forEach(function (edge) {\n var sourceAncestorId = nodeAncestorIdMap[edge.source] || edge.source;\n var targetAncestorId = nodeAncestorIdMap[edge.target] || edge.target;\n // 若两个点的祖先都在力导图的节点中,且是不同的节点,创建一条链接两个祖先的边到力导图的边中\n if (sourceAncestorId !== targetAncestorId &&\n outerNodeIds.includes(sourceAncestorId) &&\n outerNodeIds.includes(targetAncestorId)) {\n outerEdges.push({\n source: sourceAncestorId,\n target: targetAncestorId,\n });\n }\n });\n // 若有需要最外层的 combo 或节点,则对最外层执行力导向\n if (outerNodes === null || outerNodes === void 0 ? void 0 : outerNodes.length) {\n if (outerNodes.length === 1) {\n outerNodes[0].x = center[0];\n outerNodes[0].y = center[1];\n }\n else {\n var outerData = {\n nodes: outerNodes,\n edges: outerEdges,\n };\n // 需要使用一个同步的布局\n // @ts-ignore\n var outerLayout = this.outerLayout ||\n new _1.GForceLayout({\n gravity: 1,\n factor: 4,\n linkDistance: function (edge, source, target) {\n var _a, _b;\n var nodeSize = ((((_a = source.size) === null || _a === void 0 ? void 0 : _a[0]) || 30) + (((_b = target.size) === null || _b === void 0 ? void 0 : _b[0]) || 30)) / 2;\n return Math.min(nodeSize * 1.5, 700);\n },\n });\n var outerLayoutType = (_a = outerLayout.getType) === null || _a === void 0 ? void 0 : _a.call(outerLayout);\n outerLayout.updateCfg({\n center: center,\n kg: 5,\n preventOverlap: true,\n animate: false,\n });\n // 若所有 outerNodes 都没有位置,且 outerLayout 是力导家族的布局,则先执行 preset mds 或 grid\n if (allHaveNoPosition && constants_1.FORCE_LAYOUT_TYPE_MAP[outerLayoutType]) {\n var outerLayoutPreset = outerNodes.length < 100 ? new _1.MDSLayout() : new _1.GridLayout();\n outerLayoutPreset.layout(outerData);\n }\n outerLayout.layout(outerData);\n }\n // 根据外部布局结果,平移 innerGraphs 中的节点(第一层)\n outerNodes.forEach(function (outerNode) {\n var innerGraph = innerGraphs[outerNode.id];\n if (!innerGraph) {\n var node = nodeMap[outerNode.id];\n if (node) {\n node.x = outerNode.x;\n node.y = outerNode.y;\n }\n return;\n }\n innerGraph.visited = true;\n innerGraph.x = outerNode.x;\n innerGraph.y = outerNode.y;\n innerGraph.nodes.forEach(function (node) {\n node.x += outerNode.x;\n node.y += outerNode.y;\n });\n });\n }\n // 至上而下遍历树处理下面各层节点位置\n var innerGraphIds = Object.keys(innerGraphs);\n var _loop_1 = function (i) {\n var id = innerGraphIds[i];\n var innerGraph = innerGraphs[id];\n if (!innerGraph)\n return \"continue\";\n innerGraph.nodes.forEach(function (node) {\n if (!innerGraph.visited) {\n node.x += innerGraph.x || 0;\n node.y += innerGraph.y || 0;\n }\n if (nodeMap[node.id]) {\n nodeMap[node.id].x = node.x;\n nodeMap[node.id].y = node.y;\n }\n });\n if (comboMap[id]) {\n comboMap[id].x = innerGraph.x;\n comboMap[id].y = innerGraph.y;\n }\n };\n for (var i = innerGraphIds.length - 1; i >= 0; i--) {\n _loop_1(i);\n }\n return { nodes: nodes, edges: edges, combos: combos, comboEdges: comboEdges };\n };\n ComboCombinedLayout.prototype.getInnerGraphs = function (nodeMap) {\n var self = this;\n var comboTrees = self.comboTrees, nodeSize = self.nodeSize, edges = self.edges, comboPadding = self.comboPadding, spacing = self.spacing;\n var innerGraphs = {};\n // @ts-ignore\n var innerGraphLayout = this.innerLayout ||\n new _1.ConcentricLayout({ type: 'concentric', sortBy: 'id' });\n innerGraphLayout.center = [0, 0];\n innerGraphLayout.preventOverlap = true;\n innerGraphLayout.nodeSpacing = spacing;\n (comboTrees || []).forEach(function (ctree) {\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n var _a;\n // @ts-ignore\n var padding = (comboPadding === null || comboPadding === void 0 ? void 0 : comboPadding(treeNode)) || 10; // 返回的最大值\n if ((0, util_1.isArray)(padding))\n padding = Math.max.apply(Math, padding);\n if (!((_a = treeNode.children) === null || _a === void 0 ? void 0 : _a.length)) {\n // 空 combo\n if (treeNode.itemType === 'combo') {\n var treeNodeSize = padding\n ? [padding * 2, padding * 2]\n : [30, 30];\n innerGraphs[treeNode.id] = {\n id: treeNode.id,\n nodes: [],\n size: treeNodeSize,\n };\n }\n }\n else {\n // 非空 combo\n var innerGraphNodes = treeNode.children.map(function (child) {\n if (child.itemType === 'combo')\n return innerGraphs[child.id];\n var oriNode = nodeMap[child.id] || {};\n return __assign(__assign({}, oriNode), child);\n });\n var innerGraphNodeIds_1 = innerGraphNodes.map(function (node) { return node.id; });\n var innerGraphData = {\n nodes: innerGraphNodes,\n edges: edges.filter(function (edge) {\n return innerGraphNodeIds_1.includes(edge.source) &&\n innerGraphNodeIds_1.includes(edge.target);\n }),\n };\n var minNodeSize_1 = Infinity;\n innerGraphNodes.forEach(function (node) {\n var _a;\n // @ts-ignore\n if (!node.size)\n node.size = ((_a = innerGraphs[node.id]) === null || _a === void 0 ? void 0 : _a.size) ||\n (nodeSize === null || nodeSize === void 0 ? void 0 : nodeSize(node)) || [30, 30];\n if ((0, util_1.isNumber)(node.size))\n node.size = [node.size, node.size];\n if (minNodeSize_1 > node.size[0])\n minNodeSize_1 = node.size[0];\n if (minNodeSize_1 > node.size[1])\n minNodeSize_1 = node.size[1];\n });\n // 根据节点数量、spacing,调整布局参数\n innerGraphLayout.layout(innerGraphData);\n var _b = (0, util_1.getLayoutBBox)(innerGraphNodes), minX = _b.minX, minY = _b.minY, maxX = _b.maxX, maxY = _b.maxY;\n // move the innerGraph to [0, 0],for later controled by parent layout\n var center_1 = { x: (maxX + minX) / 2, y: (maxY + minY) / 2 };\n innerGraphData.nodes.forEach(function (node) {\n node.x -= center_1.x;\n node.y -= center_1.y;\n });\n var innerGraphWidth = Math.max(maxX - minX, minNodeSize_1) + padding * 2;\n var innerGraphHeight = Math.max(maxY - minY, minNodeSize_1) + padding * 2;\n innerGraphs[treeNode.id] = {\n id: treeNode.id,\n nodes: innerGraphNodes,\n size: [innerGraphWidth, innerGraphHeight],\n };\n }\n return true;\n });\n });\n return innerGraphs;\n };\n ComboCombinedLayout.prototype.initVals = function () {\n var self = this;\n var nodeSize = self.nodeSize;\n var spacing = self.spacing;\n var nodeSizeFunc;\n var spacingFunc;\n // nodeSpacing to function\n if ((0, util_1.isNumber)(spacing)) {\n spacingFunc = function () { return spacing; };\n }\n else if ((0, util_1.isFunction)(spacing)) {\n spacingFunc = spacing;\n }\n else {\n spacingFunc = function () { return 0; };\n }\n this.spacing = spacingFunc;\n // nodeSize to function\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n var spacing = spacingFunc(d);\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return (res + spacing) / 2;\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return (res + spacing) / 2;\n }\n return (d.size + spacing) / 2;\n }\n return 10 + spacing / 2;\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var size = nodeSize(d);\n var spacing = spacingFunc(d);\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return (res + spacing) / 2;\n }\n return ((size || 10) + spacing) / 2;\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1 + spacingFunc(d) / 2; };\n }\n else {\n // number type\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2 + spacingFunc(d) / 2; };\n }\n this.nodeSize = nodeSizeFunc;\n // comboPadding to function\n var comboPadding = self.comboPadding;\n var comboPaddingFunc;\n if ((0, util_1.isNumber)(comboPadding)) {\n comboPaddingFunc = function () { return comboPadding; };\n }\n else if ((0, util_1.isArray)(comboPadding)) {\n comboPaddingFunc = function () { return Math.max.apply(null, comboPadding); };\n }\n else if ((0, util_1.isFunction)(comboPadding)) {\n comboPaddingFunc = comboPadding;\n }\n else {\n // null type\n comboPaddingFunc = function () { return 0; };\n }\n this.comboPadding = comboPaddingFunc;\n };\n ComboCombinedLayout.prototype.getType = function () {\n return 'comboCombined';\n };\n return ComboCombinedLayout;\n}(base_1.Base));\nexports.ComboCombinedLayout = ComboCombinedLayout;\n//# sourceMappingURL=comboCombined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// represents a body(a point mass) and its position\nvar Body = /** @class */ (function () {\n function Body(params) {\n /**\n * the id of this body, the same with the node id\n * @type {number}\n */\n this.id = params.id || 0;\n /**\n * the position of this body\n * @type {number}\n */\n this.rx = params.rx;\n /**\n * the position of this body\n * @type {number}\n */\n this.ry = params.ry;\n /**\n * the force acting on this body\n * @type {number}\n */\n this.fx = 0;\n /**\n * the force acting on this body\n * @type {number}\n */\n this.fy = 0;\n /**\n * the mass of this body, =1 for a node\n * @type {number}\n */\n this.mass = params.mass;\n /**\n * the degree of the node represented by this body\n * @type {number}\n */\n this.degree = params.degree;\n /**\n * the parameter for repulsive force, = kr\n * @type {number}\n */\n this.g = params.g || 0;\n }\n // returns the euclidean distance\n Body.prototype.distanceTo = function (bo) {\n var dx = this.rx - bo.rx;\n var dy = this.ry - bo.ry;\n return Math.hypot(dx, dy);\n };\n Body.prototype.setPos = function (x, y) {\n this.rx = x;\n this.ry = y;\n };\n // resets the forces\n Body.prototype.resetForce = function () {\n this.fx = 0;\n this.fy = 0;\n };\n Body.prototype.addForce = function (b) {\n var dx = b.rx - this.rx;\n var dy = b.ry - this.ry;\n var dist = Math.hypot(dx, dy);\n dist = dist < 0.0001 ? 0.0001 : dist;\n // the repulsive defined by force atlas 2\n var F = (this.g * (this.degree + 1) * (b.degree + 1)) / dist;\n this.fx += F * dx / dist;\n this.fy += F * dy / dist;\n };\n // if quad contains this body\n Body.prototype.in = function (quad) {\n return quad.contains(this.rx, this.ry);\n };\n // returns a new body\n Body.prototype.add = function (bo) {\n var nenwMass = this.mass + bo.mass;\n var x = (this.rx * this.mass + bo.rx * bo.mass) / nenwMass;\n var y = (this.ry * this.mass + bo.ry * bo.mass) / nenwMass;\n var dg = this.degree + bo.degree;\n var params = {\n rx: x,\n ry: y,\n mass: nenwMass,\n degree: dg\n };\n return new Body(params);\n };\n return Body;\n}());\nexports.default = Body;\n//# sourceMappingURL=body.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Quad = /** @class */ (function () {\n function Quad(params) {\n /**\n * the center position of this quad\n * @type {number}\n */\n this.xmid = params.xmid;\n /**\n * the center position of this quad\n * @type {number}\n */\n this.ymid = params.ymid;\n /**\n * the length of this quad\n * @type {number}\n */\n this.length = params.length;\n /**\n * the mass center of this quad\n * @type {number}\n */\n this.massCenter = params.massCenter || [0, 0];\n /**\n * the mass of this quad\n * @type {number}\n */\n this.mass = params.mass || 1;\n }\n Quad.prototype.getLength = function () {\n return this.length;\n };\n Quad.prototype.contains = function (x, y) {\n var halfLen = this.length / 2;\n return (x <= this.xmid + halfLen &&\n x >= this.xmid - halfLen &&\n y <= this.ymid + halfLen &&\n y >= this.ymid - halfLen);\n };\n // northwest quadrant\n // tslint:disable-next-line\n Quad.prototype.NW = function () {\n var x = this.xmid - this.length / 4;\n var y = this.ymid + this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var NW = new Quad(params);\n return NW;\n };\n // northeast\n // tslint:disable-next-line\n Quad.prototype.NE = function () {\n var x = this.xmid + this.length / 4;\n var y = this.ymid + this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var NE = new Quad(params);\n return NE;\n };\n // southwest\n // tslint:disable-next-line\n Quad.prototype.SW = function () {\n var x = this.xmid - this.length / 4;\n var y = this.ymid - this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var SW = new Quad(params);\n return SW;\n };\n // southeast\n // tslint:disable-next-line\n Quad.prototype.SE = function () {\n var x = this.xmid + this.length / 4;\n var y = this.ymid - this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var SE = new Quad(params);\n return SE;\n };\n return Quad;\n}());\nexports.default = Quad;\n//# sourceMappingURL=quad.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @fileOverview quadTree\n * @author shiwu.wyy@antfin.com\n */\nvar QuadTree = /** @class */ (function () {\n // each quadtree represents a quadrant and an aggregate body\n // that represents all bodies inside the quadrant\n function QuadTree(param) {\n /**\n * (aggregated) body in this quad\n * @type {object}\n */\n this.body = null;\n /**\n * tree representing the northwest quadrant\n * @type {object}\n */\n this.quad = null;\n this.NW = null;\n this.NE = null;\n this.SW = null;\n this.SE = null;\n /**\n * threshold\n * @type {number}\n */\n this.theta = 0.5;\n if (param != null)\n this.quad = param;\n }\n // insert a body(node) into the tree\n QuadTree.prototype.insert = function (bo) {\n // if this node does not contain a body, put the new body bo here\n if (this.body == null) {\n this.body = bo;\n return;\n }\n // internal node\n if (!this._isExternal()) {\n // update mass info\n this.body = this.body.add(bo);\n // insert body into quadrant\n this._putBody(bo);\n }\n else { // external node\n // divide this region into four children\n if (this.quad) {\n this.NW = new QuadTree(this.quad.NW());\n this.NE = new QuadTree(this.quad.NE());\n this.SW = new QuadTree(this.quad.SW());\n this.SE = new QuadTree(this.quad.SE());\n }\n // insert this body and bo\n this._putBody(this.body);\n this._putBody(bo);\n // update the mass info\n this.body = this.body.add(bo);\n }\n };\n // inserts bo into a quad\n // tslint:disable-next-line\n QuadTree.prototype._putBody = function (bo) {\n if (!this.quad)\n return;\n if (bo.in(this.quad.NW()) && this.NW)\n this.NW.insert(bo);\n else if (bo.in(this.quad.NE()) && this.NE)\n this.NE.insert(bo);\n else if (bo.in(this.quad.SW()) && this.SW)\n this.SW.insert(bo);\n else if (bo.in(this.quad.SE()) && this.SE)\n this.SE.insert(bo);\n };\n // tslint:disable-next-line\n QuadTree.prototype._isExternal = function () {\n // four children are null\n return (this.NW == null && this.NE == null && this.SW == null && this.SE == null);\n };\n // update the forces\n QuadTree.prototype.updateForce = function (bo) {\n if (this.body == null || bo === this.body) {\n return;\n }\n // if the current node is external\n if (this._isExternal())\n bo.addForce(this.body);\n // internal nodes\n else {\n var s = this.quad ? this.quad.getLength() : 0;\n var d = this.body.distanceTo(bo);\n // b is far enough\n if ((s / d) < this.theta)\n bo.addForce(this.body);\n else {\n this.NW && this.NW.updateForce(bo);\n this.NE && this.NE.updateForce(bo);\n this.SW && this.SW.updateForce(bo);\n this.SE && this.SE.updateForce(bo);\n }\n }\n };\n return QuadTree;\n}());\nexports.default = QuadTree;\n//# sourceMappingURL=quadTree.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ForceAtlas2Layout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\nvar body_1 = __importDefault(require(\"./body\"));\nvar quad_1 = __importDefault(require(\"./quad\"));\nvar quadTree_1 = __importDefault(require(\"./quadTree\"));\nvar ForceAtlas2Layout = /** @class */ (function (_super) {\n __extends(ForceAtlas2Layout, _super);\n function ForceAtlas2Layout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 宽度 */\n _this.width = 300;\n /** 高度 */\n _this.height = 300;\n _this.nodes = [];\n _this.edges = [];\n /**\n * the parameter for repulsive forces,\n * it will scale the layout but won't change the layout\n * larger the kr, looser the layout\n * @type {number}\n */\n _this.kr = 5;\n /**\n * the parameter for gravity forces\n * @type {number}\n */\n _this.kg = 1;\n /**\n * modes:\n * 'normal' for normal using\n * 'linlog' for compact clusters.\n * @type {string}\n */\n _this.mode = 'normal';\n /**\n * whether preventing the node overlapping\n * @type {boolean}\n */\n _this.preventOverlap = false;\n /**\n * whether active the dissuade hub mode\n * true: grant authorities (nodes with a high indegree)\n * a more central position than hubs (nodes with a high outdegree)\n * @type {boolean}\n */\n _this.dissuadeHubs = false;\n /**\n * whether active the barnes hut optimization on computing repulsive forces\n * @type {boolean}\n */\n _this.barnesHut = undefined;\n /**\n * the max iteration number\n * @type {number}\n */\n _this.maxIteration = 0;\n /**\n * control the global velocity\n * defualt: 0.1(gephi)\n * @type {number}\n */\n _this.ks = 0.1;\n /**\n * the max global velocity\n * @type {number}\n */\n _this.ksmax = 10;\n /**\n * the tolerance for the global swinging\n * @type {number}\n */\n _this.tao = 0.1;\n /**\n * the function of layout complete listener, display the legend and minimap after layout\n * @type {function}\n */\n _this.onLayoutEnd = function () { };\n /**\n * activate prune or not.\n * prune the leaves during most iterations, layout the leaves in the last 50 iteraitons.\n * if prune === '', it will be activated when the nodes number > 100\n * note that it will reduce the quality of the layout\n * @type {boolean}\n */\n _this.prune = undefined;\n _this.updateCfg(options);\n return _this;\n }\n ForceAtlas2Layout.prototype.getDefaultCfg = function () {\n return {};\n };\n // execute the layout\n ForceAtlas2Layout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, onLayoutEnd = self.onLayoutEnd, prune = self.prune;\n var maxIteration = self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n // the whidth of each nodes\n var sizes = [];\n var nodeNum = nodes.length;\n for (var i = 0; i < nodeNum; i += 1) {\n var node = nodes[i];\n var nodeWidth = 10;\n var nodeHeight = 10;\n if ((0, util_1.isNumber)(node.size)) {\n nodeWidth = node.size;\n nodeHeight = node.size;\n }\n if ((0, util_1.isArray)(node.size)) {\n if (!isNaN(node.size[0]))\n nodeWidth = node.size[0];\n if (!isNaN(node.size[1]))\n nodeHeight = node.size[1];\n }\n else if ((0, util_1.isObject)(node.size)) {\n nodeWidth = node.size.width;\n nodeHeight = node.size.height;\n }\n if (self.getWidth && !isNaN(self.getWidth(node)))\n nodeHeight = self.getWidth(node);\n if (self.getHeight && !isNaN(self.getHeight(node)))\n nodeWidth = self.getHeight(node);\n var maxSize = Math.max(nodeWidth, nodeHeight);\n sizes.push(maxSize);\n }\n if (self.barnesHut === undefined && nodeNum > 250)\n self.barnesHut = true;\n if (self.prune === undefined && nodeNum > 100)\n self.prune = true;\n if (this.maxIteration === 0 && !self.prune) {\n maxIteration = 250;\n if (nodeNum <= 200 && nodeNum > 100)\n maxIteration = 1000;\n else if (nodeNum > 200)\n maxIteration = 1200;\n this.maxIteration = maxIteration;\n }\n else if (this.maxIteration === 0 && prune) {\n maxIteration = 100;\n if (nodeNum <= 200 && nodeNum > 100)\n maxIteration = 500;\n else if (nodeNum > 200)\n maxIteration = 950;\n this.maxIteration = maxIteration;\n }\n if (!self.kr) {\n self.kr = 50;\n if (nodeNum > 100 && nodeNum <= 500)\n self.kr = 20;\n else if (nodeNum > 500)\n self.kr = 1;\n }\n if (!self.kg) {\n self.kg = 20;\n if (nodeNum > 100 && nodeNum <= 500)\n self.kg = 10;\n else if (nodeNum > 500)\n self.kg = 1;\n }\n this.nodes = self.updateNodesByForces(sizes);\n onLayoutEnd();\n };\n ForceAtlas2Layout.prototype.updateNodesByForces = function (sizes) {\n var self = this;\n var edges = self.edges, maxIteration = self.maxIteration;\n var nodes = self.nodes;\n var nonLoopEdges = edges.filter(function (edge) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n return source !== target;\n });\n var size = nodes.length;\n var esize = nonLoopEdges.length;\n var degrees = [];\n var idMap = {};\n var edgeEndsIdMap = {};\n // tslint:disable-next-line\n var Es = [];\n for (var i = 0; i < size; i += 1) {\n idMap[nodes[i].id] = i;\n degrees[i] = 0;\n if (nodes[i].x === undefined || isNaN(nodes[i].x)) {\n nodes[i].x = Math.random() * 1000;\n }\n if (nodes[i].y === undefined || isNaN(nodes[i].y)) {\n nodes[i].y = Math.random() * 1000;\n }\n Es.push({ x: nodes[i].x, y: nodes[i].y });\n }\n for (var i = 0; i < esize; i += 1) {\n var node1 = void 0;\n var node2 = void 0;\n var sIdx = 0;\n var tIdx = 0;\n for (var j = 0; j < size; j += 1) {\n var source = (0, util_1.getEdgeTerminal)(nonLoopEdges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(nonLoopEdges[i], 'target');\n if (nodes[j].id === source) {\n node1 = nodes[j];\n sIdx = j;\n }\n else if (nodes[j].id === target) {\n node2 = nodes[j];\n tIdx = j;\n }\n edgeEndsIdMap[i] = { sourceIdx: sIdx, targetIdx: tIdx };\n }\n if (node1)\n degrees[idMap[node1.id]] += 1;\n if (node2)\n degrees[idMap[node2.id]] += 1;\n }\n var iteration = maxIteration;\n nodes = this.iterate(iteration, idMap, edgeEndsIdMap, esize, degrees, sizes);\n // if prune, place the leaves around their parents, and then re-layout for several iterations.\n if (self.prune) {\n for (var j = 0; j < esize; j += 1) {\n if (degrees[edgeEndsIdMap[j].sourceIdx] <= 1) {\n nodes[edgeEndsIdMap[j].sourceIdx].x = nodes[edgeEndsIdMap[j].targetIdx].x;\n nodes[edgeEndsIdMap[j].sourceIdx].y = nodes[edgeEndsIdMap[j].targetIdx].y;\n }\n else if (degrees[edgeEndsIdMap[j].targetIdx] <= 1) {\n nodes[edgeEndsIdMap[j].targetIdx].x = nodes[edgeEndsIdMap[j].sourceIdx].x;\n nodes[edgeEndsIdMap[j].targetIdx].y = nodes[edgeEndsIdMap[j].sourceIdx].y;\n }\n }\n self.prune = false;\n self.barnesHut = false;\n iteration = 100;\n nodes = this.iterate(iteration, idMap, edgeEndsIdMap, esize, degrees, sizes);\n }\n return nodes;\n };\n ForceAtlas2Layout.prototype.iterate = function (iteration, idMap, edgeEndsIdMap, esize, degrees, sizes) {\n var self = this;\n var nodes = self.nodes;\n var kr = self.kr, preventOverlap = self.preventOverlap;\n var barnesHut = self.barnesHut;\n var nodeNum = nodes.length;\n var sg = 0;\n var krPrime = 100;\n var iter = iteration;\n var prevoIter = 50;\n var forces = [];\n var preForces = [];\n var bodies = [];\n for (var i = 0; i < nodeNum; i += 1) {\n forces[2 * i] = 0;\n forces[2 * i + 1] = 0;\n if (barnesHut) {\n var params = {\n id: i,\n rx: nodes[i].x,\n ry: nodes[i].y,\n mass: 1,\n g: kr,\n degree: degrees[i]\n };\n bodies[i] = new body_1.default(params);\n }\n }\n while (iter > 0) {\n for (var i = 0; i < nodeNum; i += 1) {\n preForces[2 * i] = forces[2 * i];\n preForces[2 * i + 1] = forces[2 * i + 1];\n forces[2 * i] = 0;\n forces[2 * i + 1] = 0;\n }\n // attractive forces, existing on every actual edge\n forces = this.getAttrForces(iter, prevoIter, esize, idMap, edgeEndsIdMap, degrees, sizes, forces);\n // repulsive forces and Gravity, existing on every node pair\n // if preventOverlap, using the no-optimized method in the last prevoIter instead.\n if (barnesHut && ((preventOverlap && iter > prevoIter) || !preventOverlap)) {\n forces = this.getOptRepGraForces(forces, bodies, degrees);\n }\n else {\n forces = this.getRepGraForces(iter, prevoIter, forces, krPrime, sizes, degrees);\n }\n // update the positions\n var res = this.updatePos(forces, preForces, sg, degrees);\n nodes = res.nodes;\n sg = res.sg;\n iter--;\n if (self.tick)\n self.tick();\n }\n return nodes;\n };\n ForceAtlas2Layout.prototype.getAttrForces = function (iter, prevoIter, esize, idMap, edgeEndsIdMap, degrees, sizes, forces) {\n var self = this;\n var nodes = self.nodes, preventOverlap = self.preventOverlap, dissuadeHubs = self.dissuadeHubs, mode = self.mode, prune = self.prune;\n for (var i = 0; i < esize; i += 1) {\n var sourceNode = nodes[edgeEndsIdMap[i].sourceIdx];\n var sourceIdx = edgeEndsIdMap[i].sourceIdx;\n var targetNode = nodes[edgeEndsIdMap[i].targetIdx];\n var targetIdx = edgeEndsIdMap[i].targetIdx;\n if (prune && (degrees[sourceIdx] <= 1 || degrees[targetIdx] <= 1))\n continue;\n var dir = [targetNode.x - sourceNode.x, targetNode.y - sourceNode.y];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n eucliDis = eucliDis < 0.0001 ? 0.0001 : eucliDis;\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n if (preventOverlap && iter < prevoIter)\n eucliDis = eucliDis - sizes[sourceIdx] - sizes[targetIdx];\n var Fa1 = eucliDis; // tslint:disable-line\n var Fa2 = Fa1; // tslint:disable-line\n if (mode === 'linlog') {\n Fa1 = Math.log(1 + eucliDis);\n Fa2 = Fa1;\n }\n if (dissuadeHubs) {\n Fa1 = eucliDis / degrees[sourceIdx];\n Fa2 = eucliDis / degrees[targetIdx];\n }\n if (preventOverlap && iter < prevoIter && eucliDis <= 0) {\n Fa1 = 0;\n Fa2 = 0;\n }\n else if (preventOverlap && iter < prevoIter && eucliDis > 0) {\n Fa1 = eucliDis;\n Fa2 = eucliDis;\n }\n forces[2 * idMap[sourceNode.id]] += Fa1 * dir[0];\n forces[2 * idMap[targetNode.id]] -= Fa2 * dir[0];\n forces[2 * idMap[sourceNode.id] + 1] += Fa1 * dir[1];\n forces[2 * idMap[targetNode.id] + 1] -= Fa2 * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.getRepGraForces = function (iter, prevoIter, forces, krPrime, sizes, degrees) {\n var self = this;\n var nodes = self.nodes, preventOverlap = self.preventOverlap, kr = self.kr, kg = self.kg, center = self.center, prune = self.prune;\n var nodeNum = nodes.length;\n for (var i = 0; i < nodeNum; i += 1) {\n for (var j = i + 1; j < nodeNum; j += 1) {\n if (prune && (degrees[i] <= 1 || degrees[j] <= 1))\n continue;\n var dir_1 = [nodes[j].x - nodes[i].x, nodes[j].y - nodes[i].y];\n var eucliDis_1 = Math.hypot(dir_1[0], dir_1[1]);\n eucliDis_1 = eucliDis_1 < 0.0001 ? 0.0001 : eucliDis_1;\n dir_1[0] = dir_1[0] / eucliDis_1;\n dir_1[1] = dir_1[1] / eucliDis_1;\n if (preventOverlap && iter < prevoIter)\n eucliDis_1 = eucliDis_1 - sizes[i] - sizes[j];\n var Fr = kr * (degrees[i] + 1) * (degrees[j] + 1) / eucliDis_1; // tslint:disable-line\n if (preventOverlap && iter < prevoIter && eucliDis_1 < 0) {\n Fr = krPrime * (degrees[i] + 1) * (degrees[j] + 1);\n }\n else if (preventOverlap && iter < prevoIter && eucliDis_1 === 0) {\n Fr = 0;\n }\n else if (preventOverlap && iter < prevoIter && eucliDis_1 > 0) {\n Fr = kr * (degrees[i] + 1) * (degrees[j] + 1) / eucliDis_1;\n }\n forces[2 * i] -= Fr * dir_1[0];\n forces[2 * j] += Fr * dir_1[0];\n forces[2 * i + 1] -= Fr * dir_1[1];\n forces[2 * j + 1] += Fr * dir_1[1];\n }\n // gravity\n var dir = [nodes[i].x - center[0], nodes[i].y - center[1]];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n var Fg = kg * (degrees[i] + 1); // tslint:disable-line\n forces[2 * i] -= Fg * dir[0];\n forces[2 * i + 1] -= Fg * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.getOptRepGraForces = function (forces, bodies, degrees) {\n var self = this;\n var nodes = self.nodes, kg = self.kg, center = self.center, prune = self.prune;\n var nodeNum = nodes.length;\n var minx = 9e10;\n var maxx = -9e10;\n var miny = 9e10;\n var maxy = -9e10;\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n bodies[i].setPos(nodes[i].x, nodes[i].y);\n if (nodes[i].x >= maxx)\n maxx = nodes[i].x;\n if (nodes[i].x <= minx)\n minx = nodes[i].x;\n if (nodes[i].y >= maxy)\n maxy = nodes[i].y;\n if (nodes[i].y <= miny)\n miny = nodes[i].y;\n }\n var width = Math.max(maxx - minx, maxy - miny);\n var quadParams = {\n xmid: (maxx + minx) / 2,\n ymid: (maxy + miny) / 2,\n length: width,\n massCenter: center,\n mass: nodeNum\n };\n var quad = new quad_1.default(quadParams);\n var quadTree = new quadTree_1.default(quad);\n // build the tree, insert the nodes(quads) into the tree\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n if (bodies[i].in(quad))\n quadTree.insert(bodies[i]);\n }\n // update the repulsive forces and the gravity.\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n bodies[i].resetForce();\n quadTree.updateForce(bodies[i]);\n forces[2 * i] -= bodies[i].fx;\n forces[2 * i + 1] -= bodies[i].fy;\n // gravity\n var dir = [nodes[i].x - center[0], nodes[i].y - center[1]];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n eucliDis = eucliDis < 0.0001 ? 0.0001 : eucliDis;\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n var Fg = kg * (degrees[i] + 1); // tslint:disable-line\n forces[2 * i] -= Fg * dir[0];\n forces[2 * i + 1] -= Fg * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.updatePos = function (forces, preForces, sg, degrees) {\n var self = this;\n var nodes = self.nodes, ks = self.ks, tao = self.tao, prune = self.prune, ksmax = self.ksmax;\n var nodeNum = nodes.length;\n var swgns = [];\n var trans = [];\n // swg(G) and tra(G)\n var swgG = 0;\n var traG = 0;\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n var minus = [forces[2 * i] - preForces[2 * i],\n forces[2 * i + 1] - preForces[2 * i + 1]\n ];\n var minusNorm = Math.hypot(minus[0], minus[1]);\n var add = [forces[2 * i] + preForces[2 * i],\n forces[2 * i + 1] + preForces[2 * i + 1]\n ];\n var addNorm = Math.hypot(add[0], add[1]);\n swgns[i] = minusNorm;\n trans[i] = addNorm / 2;\n swgG += (degrees[i] + 1) * swgns[i];\n traG += (degrees[i] + 1) * trans[i];\n }\n var preSG = sg;\n sg = tao * traG / swgG; // tslint:disable-line\n if (preSG !== 0) {\n sg = sg > (1.5 * preSG) ? (1.5 * preSG) : sg; // tslint:disable-line\n }\n // update the node positions\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n if ((0, util_1.isNumber)(nodes[i].fx) && (0, util_1.isNumber)(nodes[i].fy))\n continue;\n var sn = ks * sg / (1 + sg * Math.sqrt(swgns[i]));\n var absForce = Math.hypot(forces[2 * i], forces[2 * i + 1]);\n absForce = absForce < 0.0001 ? 0.0001 : absForce;\n var max = ksmax / absForce;\n sn = sn > max ? max : sn;\n var dnx = sn * forces[2 * i];\n var dny = sn * forces[2 * i + 1];\n nodes[i].x += dnx;\n nodes[i].y += dny;\n }\n return { nodes: nodes, sg: sg };\n };\n return ForceAtlas2Layout;\n}(base_1.Base));\nexports.ForceAtlas2Layout = ForceAtlas2Layout;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Grid = /** @class */ (function () {\n function Grid() {\n this.cells = [];\n this.columnNum = 0;\n this.rowNum = 0;\n this.additionColumn = [];\n this.additionRow = [];\n }\n Grid.prototype.init = function (width, height, gridSize) {\n this.cells = [];\n this.CELL_W = gridSize.CELL_W || Grid.DEFAULT_CELL_W;\n this.CELL_H = gridSize.CELL_H || Grid.DEFAULT_CELL_H;\n this.columnNum = Math.ceil(width / this.CELL_W);\n this.rowNum = Math.ceil(height / this.CELL_H);\n Grid.MIN_DIST = Math.pow(width, 2) + Math.pow(height, 2);\n for (var i = 0; i < this.columnNum; i++) {\n var tmp = [];\n for (var j = 0; j < this.rowNum; j++) {\n var cell = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false\n };\n tmp.push(cell);\n }\n this.cells.push(tmp);\n }\n };\n Grid.prototype.findGridByNodeId = function (nodeId) {\n var _a, _b;\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (this.cells[i][j].node) {\n if (((_b = (_a = this.cells[i][j]) === null || _a === void 0 ? void 0 : _a.node) === null || _b === void 0 ? void 0 : _b.id) === nodeId) {\n return { column: i, row: j };\n }\n }\n }\n }\n return null;\n };\n Grid.prototype.sqdist = function (a, b) {\n return Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2);\n };\n Grid.prototype.occupyNearest = function (p) {\n var minDist = Grid.MIN_DIST;\n var d;\n var candidate = null;\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (!this.cells[i][j].occupied && (d = this.sqdist(p, this.cells[i][j])) < minDist) {\n minDist = d;\n candidate = this.cells[i][j];\n }\n }\n }\n if (candidate) {\n candidate.occupied = true;\n }\n return candidate;\n };\n Grid.prototype.insertColumn = function (columnIndex, length) {\n if (length <= 0)\n return;\n // 插入空列\n for (var i = 0; i < length; i++) {\n this.cells[i + this.columnNum] = [];\n for (var j = 0; j < this.rowNum; j++) {\n this.cells[i + this.columnNum][j] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 交换数据\n for (var i = (this.columnNum - 1); i > columnIndex; i--) {\n for (var j = 0; j < this.rowNum; j++) {\n this.cells[i + length][j] = __assign(__assign({}, this.cells[i][j]), { x: (i + length) * this.CELL_W, y: j * this.CELL_H });\n this.cells[i][j] = {\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: true,\n node: null,\n };\n }\n }\n // 已有行列的处理\n for (var j = 0; j < this.additionColumn.length; j++) {\n if (this.additionColumn[j] >= columnIndex) {\n this.additionColumn[j] += length;\n }\n }\n // 记录新增的行列\n for (var i = 0; i < length; i++) {\n this.additionColumn.push(columnIndex + i + 1);\n }\n this.columnNum += length;\n };\n Grid.prototype.insertRow = function (rowIndex, length) {\n if (length <= 0)\n return;\n // 插入空行\n for (var j = 0; j < length; j++) {\n for (var i = 0; i < this.columnNum; i++) {\n this.cells[i][j + this.rowNum] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 交换数据\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = (this.rowNum - 1); j > rowIndex; j--) {\n this.cells[i][j + length] = __assign(__assign({}, this.cells[i][j]), { dx: i, dy: j + length, x: i * this.CELL_W, y: (j + length) * this.CELL_H });\n this.cells[i][j] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 已有行列的处理\n for (var j = 0; j < this.additionRow.length; j++) {\n if (this.additionRow[j] >= rowIndex) {\n this.additionRow[j] += length;\n }\n }\n // 记录新增的行列\n for (var i = 0; i < length; i++) {\n this.additionRow.push(rowIndex + i + 1);\n }\n this.rowNum += length;\n };\n Grid.prototype.getNodes = function () {\n var nodes = [];\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (this.cells[i][j].node) {\n nodes.push(this.cells[i][j]);\n }\n }\n }\n return nodes;\n };\n Grid.MIN_DIST = 50;\n Grid.DEFAULT_CELL_W = 80;\n Grid.DEFAULT_CELL_H = 80;\n return Grid;\n}());\nexports.default = Grid;\n//# sourceMappingURL=grid.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar grid_1 = __importDefault(require(\"./grid\"));\nfunction layout(data, options) {\n if (!data.nodes || data.nodes.length === 0)\n return data;\n var width = options.width;\n var height = options.height;\n var nodeMinGap = options.nodeMinGap;\n // 2. 网格布局\n var CELL_W = 10000;\n var CELL_H = 10000;\n data.nodes.forEach(function (node) {\n var nodeWidth = node.size[0] || 50;\n var nodeHeight = node.size[1] || 50;\n CELL_W = Math.min(nodeWidth, CELL_W);\n CELL_H = Math.min(nodeHeight, CELL_H);\n });\n var grid = new grid_1.default();\n grid.init(width, height, {\n CELL_H: CELL_H,\n CELL_W: CELL_W,\n });\n data.nodes.forEach(function (d) {\n var gridpoint = grid.occupyNearest(d);\n if (gridpoint) {\n gridpoint.node = {\n id: d.id,\n size: d.size,\n };\n d.x = gridpoint.x;\n d.y = gridpoint.y;\n d.dx = gridpoint.dx;\n d.dy = gridpoint.dy;\n }\n });\n // 加入节点size\n for (var i = 0; i < data.nodes.length; i++) {\n // 节点宽度大于网格宽度,则往当前网格的右边插入列\n var node = data.nodes[i];\n var result = grid.findGridByNodeId(node.id);\n if (!result)\n throw new Error(\"can not find node cell\");\n var column = result.column, row = result.row;\n if ((node.size[0] + nodeMinGap) > CELL_W) {\n var addGridSize = Math.ceil((node.size[0] + nodeMinGap) / CELL_W) - 1;\n var realAdd = addGridSize;\n // 优化,假设同一列,不同行存在两个size为2的节点,遍历到第一个节点的时候,会往右插入两列,遍历到第二个节点,又往右插入。就会导致多余的网格\n for (var j = 0; j < addGridSize; j++) {\n var hasColumn = grid.additionColumn.indexOf(column + j + 1) > -1;\n if (hasColumn && !grid.cells[column + j + 1][row].node) {\n realAdd--;\n }\n else {\n break;\n }\n }\n grid.insertColumn(column, realAdd);\n }\n // 节点高度大于网格宽度,则往当前网格的下边插入行\n if ((node.size[1] + nodeMinGap) > CELL_H) {\n var addGridSize = Math.ceil((node.size[1] + nodeMinGap) / CELL_H) - 1;\n var realAdd = addGridSize;\n for (var j = 0; j < addGridSize; j++) {\n var hasColumn = grid.additionRow.indexOf(row + j + 1) > -1;\n if (hasColumn && !grid.cells[column][row + j + 1].node) {\n realAdd--;\n }\n else {\n break;\n }\n }\n grid.insertRow(row, realAdd);\n }\n }\n // 同步节点坐标\n for (var i = 0; i < grid.columnNum; i++) {\n var _loop_1 = function (j) {\n var cell = grid.cells[i][j];\n if (cell.node) {\n var node = data.nodes.find(function (node) { var _a; return node.id === ((_a = cell === null || cell === void 0 ? void 0 : cell.node) === null || _a === void 0 ? void 0 : _a.id); });\n if (node) {\n node.x = cell.x + node.size[0] / 2;\n node.y = cell.y + node.size[1] / 2;\n }\n }\n };\n for (var j = 0; j < grid.rowNum; j++) {\n _loop_1(j);\n }\n }\n}\nexports.default = layout;\n//# sourceMappingURL=forceGrid.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphWidth = 1200;\nvar graphHeight = 800;\nvar OVERLAP_QUOT = 10000000;\nvar MIN_DIST = 10;\nvar M_PI = 3.14159265358979323846;\nvar M_PI_2 = 1.57079632679489661923;\nvar PI_38 = M_PI * 0.375;\nvar PI_58 = M_PI * 0.625;\nvar nodeEdgeMap = new Map();\nvar CELL_W = 10;\nvar CELL_H = 10;\nvar T = 0.8;\nvar T_MIN = 0.1;\nvar R = 0.5;\nfunction distanceToNode(node1, node2, isHoriz) {\n var x11 = node1.x - node1.size[0] / 2;\n var y11 = node1.y - node1.size[1] / 2;\n var x12 = node1.x + node1.size[0] / 2;\n var y12 = node1.y + node1.size[1] / 2;\n var x21 = node2.x - node2.size[0] / 2;\n var y21 = node2.y - node2.size[1] / 2;\n var x22 = node2.x + node2.size[0] / 2;\n var y22 = node2.y + node2.size[1] / 2;\n var cx1 = node1.x;\n var cy1 = node1.y;\n var cx2 = node2.x;\n var cy2 = node2.y;\n var dcx = cx2 - cx1;\n // 两个节点间的方位角 \n var qr = Math.atan2(dcx, (cy2 - cy1));\n var dx = 0;\n var dy = 0;\n var l1 = 0;\n var l2 = 0;\n if (qr > M_PI_2) {\n dy = y11 - y22;\n dx = x21 - x12;\n l1 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n else if (0.0 < qr && qr <= M_PI_2) {\n dy = y21 - y12;\n dx = x21 - x12;\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n else if (qr < -M_PI_2) {\n dy = y11 - y22;\n dx = -(x22 - x11);\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n else {\n dy = y21 - y12;\n if (Math.abs(dcx) > (x12 - x11) / 2) {\n dx = x11 - x22;\n }\n else {\n dx = dcx;\n }\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat((dx && qr !== 0.0) ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n var aqr = parseFloat(qr.toFixed(2));\n // 判断是否水平,角度\n var newHoriz = isHoriz;\n if (isHoriz) {\n newHoriz = PI_38 < aqr && aqr < PI_58;\n }\n return {\n distance: Math.abs(l1 < l2 ? l1 : l2),\n isHoriz: newHoriz,\n };\n}\nfunction calcNodePair(nodeA, nodeB) {\n // 确定两个节点间是否存在连线\n var edges = nodeEdgeMap.get(nodeA.id) || [];\n var isLinked = edges.find(function (edge) {\n return edge.source === nodeB.id || edge.target === nodeB.id;\n });\n var areaA = nodeA.size[0] * nodeA.size[1];\n var areaB = nodeB.size[0] * nodeB.size[1];\n var node1 = areaA > areaB ? nodeB : nodeA;\n var node2 = areaA > areaB ? nodeA : nodeB;\n var x11 = node1.x - node1.size[0] / 2;\n var y11 = node1.y - node1.size[1] / 2;\n var x12 = node1.x + node1.size[0] / 2;\n var y12 = node1.y + node1.size[1] / 2;\n var x21 = node2.x - node2.size[0] / 2;\n var y21 = node2.y - node2.size[1] / 2;\n var x22 = node2.x + node2.size[0] / 2;\n var y22 = node2.y + node2.size[1] / 2;\n var cx1 = node1.x;\n var cy1 = node1.y;\n var cx2 = node2.x;\n var cy2 = node2.y;\n // Detect if nodes overlap 检查节点之间是否存在覆盖问题\n var isoverlap = ((x12 >= x21) && (x22 >= x11) && (y12 >= y21) && (y22 >= y11));\n var e = 0;\n var distance = 0;\n if (isoverlap) {\n distance = Math.sqrt(Math.pow((cx2 - cx1), 2) + Math.pow((cy2 - cy1), 2));\n // calc area of overlap 计算重复区域的坐标和面积\n var sx1 = x11 > x21 ? x11 : x21;\n var sy1 = y11 > y21 ? y11 : y21;\n var sx2 = x12 < x22 ? x12 : x22;\n var sy2 = y12 < y22 ? y12 : y22;\n var dsx = sx2 - sx1;\n var dsy = sy2 - sy1;\n var sov = dsx * dsy;\n if (distance === 0.0) {\n distance = 0.0000001;\n }\n e = MIN_DIST * 1 / distance * 100 + sov;\n e *= OVERLAP_QUOT;\n }\n else {\n var isHoriz = false;\n var res = distanceToNode(node1, node2, isHoriz);\n distance = res.distance;\n isHoriz = res.isHoriz;\n if (distance <= MIN_DIST) {\n if (distance !== 0) {\n if (isLinked) {\n e += MIN_DIST + OVERLAP_QUOT * 1 / distance;\n }\n else {\n e += MIN_DIST + OVERLAP_QUOT * MIN_DIST / distance;\n }\n }\n else {\n e += OVERLAP_QUOT;\n }\n }\n else {\n e += distance;\n if (isLinked) {\n e += distance * distance;\n }\n }\n }\n return e;\n}\nfunction calcEnergy(nodes) {\n var energy = 0;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if ((node.x < 0) || (node.y < 0) || (node.x > graphWidth) || (node.y > graphHeight)) {\n energy += 1000000000000;\n }\n for (var j = i + 1; j < nodes.length; j++) {\n energy += calcNodePair(node, nodes[j]);\n }\n }\n return energy;\n}\nfunction isCorrectPosition(node, newPosition, nodes, edges) {\n var nodeIdxMap = new Map();\n nodes.forEach(function (o, i) {\n nodeIdxMap.set(o.id, o);\n });\n var relateEdges = edges.filter(function (edge) { return edge.source === node.id || edge.target === node.id; }) || [];\n var relateNodes = [];\n relateEdges.forEach(function (edge) {\n var otherNodeId = edge.source === node.id ? edge.target : edge.source;\n var otherNode = nodeIdxMap.get(otherNodeId);\n if (otherNode) {\n relateNodes.push(otherNode);\n }\n });\n var flag = true;\n for (var i = 0; i < relateNodes.length; i++) {\n var item = relateNodes[i];\n // 判断条件调整,节点的坐标不需要完全一致。可以根据节点间的夹角来判断\n var delta = Math.atan((node.y - item.y) / (item.x - node.y)) * 180;\n var newDelta = Math.atan((newPosition.y - item.y) / (item.x - newPosition.y)) * 180;\n var isHor = delta < 30 || delta > 150;\n var newIsHor = newDelta < 30 || newDelta > 150;\n var isVer = delta > 70 && delta < 110;\n var newIsVer = newDelta > 70 && newDelta < 110;\n // 定义四个相似角度区间,0-15度,75-90度,90到105度,165到180度。\n if (isHor && !newIsHor || ((delta * newDelta) < 0)) {\n flag = false;\n break;\n }\n else if (isVer && !newIsVer || ((delta * newDelta) < 0)) {\n flag = false;\n break;\n }\n else if ((item.x - node.x) * (item.x - newPosition.x) < 0) {\n flag = false;\n break;\n }\n else if ((item.y - node.y) * (item.y - newPosition.y) < 0) {\n flag = false;\n break;\n }\n }\n return flag;\n}\nfunction shuffle(nodes, edges) {\n var foundSmallerEnergy = false;\n // 多次测试发现step为1时的效果最佳。\n var step = 1;\n var wstep = CELL_W * step;\n var hstep = CELL_H * step;\n var wsteps = [wstep, -wstep, 0, 0,];\n var hsteps = [0, 0, hstep, -hstep,];\n for (var i = 0; i < nodes.length; ++i) {\n var node = nodes[i];\n var nodeEnergy = calcNodeEnergy(node, nodes);\n for (var ns = 0; ns < wsteps.length; ns++) {\n // 判断新位置与其他连线节点的位置关系是否违规\n var flag = isCorrectPosition(node, { x: node.x + wsteps[ns], y: node.y + hsteps[ns] }, nodes, edges);\n if (flag) {\n // 节点朝上下左右四个方向移动,找到能量最小的那个位置\n node.x += wsteps[ns];\n node.y += hsteps[ns];\n // 计算移动后节点的能量\n var energy = calcNodeEnergy(node, nodes);\n var rdm = Math.random();\n if (energy < nodeEnergy) {\n nodeEnergy = energy;\n foundSmallerEnergy = true;\n }\n else if (rdm < T && rdm > T_MIN) {\n nodeEnergy = energy;\n foundSmallerEnergy = true;\n }\n else {\n // 回归原位\n node.x -= wsteps[ns];\n node.y -= hsteps[ns];\n }\n }\n }\n }\n if (T > T_MIN) {\n T *= R;\n }\n // 重新计算图整体的能量\n if (foundSmallerEnergy) {\n return calcEnergy(nodes);\n }\n return 0;\n}\n// 计算节点的能量,\nfunction calcNodeEnergy(node, nodes) {\n var e = 0.0;\n if ((node.x < 0) || (node.y < 0) ||\n (node.x + node.size[0] + 20 > graphWidth) ||\n (node.y + node.size[1] + 20 > graphHeight)) {\n e += 1000000000000.0;\n }\n for (var i = 0; i < nodes.length; ++i) {\n if (node.id !== nodes[i].id) {\n e += calcNodePair(node, nodes[i]);\n }\n }\n return e;\n}\nfunction layout(nodes, edges) {\n if (nodes.length === 0) {\n return { nodes: nodes, edges: edges };\n }\n nodes.forEach(function (node) {\n var relateEdge = edges.filter(function (edge) { return edge.source === node.id || edge.target === node.id; });\n nodeEdgeMap.set(node, relateEdge);\n });\n // 1. 初始化\n // 将node按照连接数进行排序\n nodes.sort(function (node1, node2) {\n var _a, _b;\n return ((_a = nodeEdgeMap.get(node1.id)) === null || _a === void 0 ? void 0 : _a.length) - ((_b = nodeEdgeMap.get(node2.id)) === null || _b === void 0 ? void 0 : _b.length);\n });\n // 2. 计算图能量\n var minEnergy = calcEnergy(nodes);\n var deSameCount = 20; // de=0 count\n var de = 1; // energy delta\n var prevEnergy = 0;\n // 定义总的迭代次数。超过就停掉,防止死循环\n var MAX_COUNT = 50;\n var count = 0;\n while (deSameCount > 0) {\n count++;\n if (count >= MAX_COUNT) {\n break;\n }\n var ea = shuffle(nodes, edges);\n if (ea !== 0) {\n prevEnergy = ea;\n }\n de = prevEnergy - minEnergy;\n minEnergy = prevEnergy;\n if (de === 0) {\n --deSameCount;\n }\n else {\n deSameCount = 20;\n }\n }\n nodes.forEach(function (node) {\n node.x = node.x - node.size[0] / 2;\n node.y = node.y - node.size[1] / 2;\n });\n return {\n nodes: nodes,\n edges: edges,\n };\n}\nexports.default = layout;\n//# sourceMappingURL=mysqlWorkbench.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar d3Force = __importStar(require(\"d3-force\"));\nvar forceGrid_1 = __importDefault(require(\"./forceGrid\"));\nvar mysqlWorkbench_1 = __importDefault(require(\"./mysqlWorkbench\"));\nvar dagre_1 = require(\"../dagre\");\nfunction layout(data, options) {\n var nodes = data.nodes, edges = data.edges;\n var width = options.width;\n var height = options.height;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return Promise.resolve();\n // 筛选非叶子节点,做Dagre布局\n var noLeafNodes = [];\n nodes.forEach(function (node) {\n var relateEdges = edges.filter(function (edge) {\n return edge.source === node.id || edge.target === node.id;\n });\n if (relateEdges.length > 1) {\n var temp = __assign({}, node);\n delete temp.size;\n noLeafNodes.push(temp);\n }\n });\n var noLeafEdge = [];\n edges.forEach(function (edge) {\n var sourceNode = noLeafNodes.find(function (node) { return node.id === edge.source; });\n var targetNode = noLeafNodes.find(function (node) { return node.id === edge.target; });\n if (sourceNode && targetNode) {\n noLeafEdge.push(edge);\n }\n });\n var graphLayout = new dagre_1.DagreLayout({\n type: 'dagre',\n ranksep: options.nodeMinGap,\n nodesep: options.nodeMinGap,\n });\n var nodesTmp = graphLayout.layout({\n nodes: noLeafNodes,\n edges: noLeafEdge,\n }).nodes;\n // 布局后,坐标同步\n nodes.forEach(function (n) {\n var found = (nodesTmp || []).find(function (temp) { return temp.id === n.id; });\n n.x = (found === null || found === void 0 ? void 0 : found.x) || width / 2;\n n.y = (found === null || found === void 0 ? void 0 : found.y) || height / 2;\n });\n var copyNodes = JSON.parse(JSON.stringify(nodes));\n var copyEdges = JSON.parse(JSON.stringify(edges));\n var simulation = d3Force.forceSimulation().nodes(copyNodes)\n .force(\"link\", d3Force.forceLink(copyEdges).id(function (d) { return d.id; }).distance(function (d) {\n var edgeInfo = noLeafEdge.find(function (edge) { return edge.source === d.source && edge.target === d.target; });\n if (edgeInfo) {\n return 30;\n }\n return 20;\n }))\n .force(\"charge\", d3Force.forceManyBody())\n .force(\"center\", d3Force.forceCenter(width / 2, height / 2))\n .force(\"x\", d3Force.forceX(width / 2))\n .force(\"y\", d3Force.forceY(height / 2))\n .alpha(0.3)\n .alphaDecay(0.08)\n .alphaMin(0.001);\n var layoutPromise = new Promise(function (resolve) {\n simulation.on('end', function () {\n // 坐标信息同步到nodes,edges中\n nodes.forEach(function (node) {\n var nodeInfo = copyNodes.find(function (item) { return item.id === node.id; });\n if (nodeInfo) {\n node.x = nodeInfo.x;\n node.y = nodeInfo.y;\n }\n });\n var minX = Math.min.apply(Math, nodes.map(function (node) { return node.x; }));\n var maxX = Math.max.apply(Math, nodes.map(function (node) { return node.x; }));\n var minY = Math.min.apply(Math, nodes.map(function (node) { return node.y; }));\n var maxY = Math.max.apply(Math, nodes.map(function (node) { return node.y; }));\n var scalex = width / (maxX - minX);\n var scaley = height / (maxY - minY);\n nodes.forEach(function (node) {\n if (node.x !== undefined && scalex < 1) {\n node.x = (node.x - minX) * scalex;\n }\n if (node.y !== undefined && scaley < 1) {\n node.y = (node.y - minY) * scaley;\n }\n });\n // 这一步就执行缩小空间。且不考虑节点size\n nodes.forEach(function (node) {\n node.sizeTemp = node.size;\n node.size = [10, 10];\n });\n (0, mysqlWorkbench_1.default)(nodes, edges);\n nodes.forEach(function (node) {\n node.size = node.sizeTemp || [];\n delete node.sizeTemp;\n });\n // 进行网格对齐+节点大小扩增\n (0, forceGrid_1.default)({\n nodes: nodes,\n edges: edges,\n }, options);\n resolve();\n });\n });\n return layoutPromise;\n}\nexports.default = layout;\n//# sourceMappingURL=core.js.map","\"use strict\";\n/**\n * @fileOverview Force Layout Grid Align layout\n * @author wenyanqi\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERLayout = void 0;\nvar base_1 = require(\"../base\");\nvar core_1 = __importDefault(require(\"./core\"));\nvar ERLayout = /** @class */ (function (_super) {\n __extends(ERLayout, _super);\n function ERLayout(options) {\n var _this = _super.call(this) || this;\n _this.width = 300;\n _this.height = 300;\n _this.nodeMinGap = 50;\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n if (options) {\n _this.updateCfg(options);\n }\n return _this;\n }\n ERLayout.prototype.getDefaultCfg = function () {\n return {\n width: 300,\n height: 300,\n nodeMinGap: 50,\n };\n };\n /**\n * 执行布局\n */\n ERLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n // 节点初始化,size初始化\n nodes === null || nodes === void 0 ? void 0 : nodes.forEach(function (node) {\n if (!node.size) {\n node.size = [50, 50];\n }\n });\n return (0, core_1.default)({\n nodes: nodes,\n edges: edges,\n }, {\n width: this.width,\n height: this.height,\n nodeMinGap: this.nodeMinGap,\n }).then(function () {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n });\n };\n ERLayout.prototype.getType = function () {\n return \"er\";\n };\n return ERLayout;\n}(base_1.Base));\nexports.ERLayout = ERLayout;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Layouts = exports.Layout = void 0;\nvar registy_1 = require(\"../registy\");\nvar grid_1 = require(\"./grid\");\nvar random_1 = require(\"./random\");\nvar force2_1 = require(\"./force2\");\nvar gForce_1 = require(\"./gForce\");\nvar force_1 = require(\"./force\");\nvar circular_1 = require(\"./circular\");\nvar dagre_1 = require(\"./dagre\");\nvar radial_1 = require(\"./radial\");\nvar concentric_1 = require(\"./concentric\");\nvar mds_1 = require(\"./mds\");\nvar fruchterman_1 = require(\"./fruchterman\");\nvar fruchterman_2 = require(\"./gpu/fruchterman\");\nvar gForce_2 = require(\"./gpu/gForce\");\nvar comboForce_1 = require(\"./comboForce\");\nvar comboCombined_1 = require(\"./comboCombined\");\nvar forceAtlas2_1 = require(\"./forceAtlas2\");\nvar er_1 = require(\"./er\");\nvar dagreCompound_1 = require(\"./dagreCompound\");\nvar util_1 = require(\"../util\");\nvar Layout = /** @class */ (function () {\n function Layout(options) {\n var layoutClass = (0, registy_1.getLayoutByName)(options.type);\n this.layoutInstance = new layoutClass(options);\n }\n Layout.prototype.layout = function (data) {\n return this.layoutInstance.layout(data);\n };\n Layout.prototype.updateCfg = function (cfg) {\n this.layoutInstance.updateCfg(cfg);\n };\n Layout.prototype.init = function (data) {\n this.correctLayers(data.nodes);\n this.layoutInstance.init(data);\n };\n /**\n * correcting the layers on the node data\n * if min(layer) <= 0, layers should begin from abs(min(layer)) + 1\n * @param nodes\n * @returns\n */\n Layout.prototype.correctLayers = function (nodes) {\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n var minLayer = Infinity;\n var hasLayerNodes = [];\n nodes.forEach(function (node) {\n if ((0, util_1.isString)(node.layer)) {\n node.layer = parseInt(node.layer, 10);\n }\n // keep node.layer === undefined for TS problem\n if (node.layer === undefined || isNaN(node.layer))\n return;\n hasLayerNodes.push(node);\n if (node.layer < minLayer)\n minLayer = node.layer;\n });\n if (minLayer <= 0) {\n var layerOffset_1 = Math.abs(minLayer) + 1;\n // @ts-ignore\n hasLayerNodes.forEach(function (node) { return node.layer += layerOffset_1; });\n }\n };\n Layout.prototype.execute = function () {\n this.layoutInstance.execute();\n };\n Layout.prototype.getDefaultCfg = function () {\n return this.layoutInstance.getDefaultCfg();\n };\n Layout.prototype.destroy = function () {\n return this.layoutInstance.destroy();\n };\n return Layout;\n}());\nexports.Layout = Layout;\n// FIXME\n// FOR G6\n// tslint:disable-next-line\nexports.Layouts = {\n force: force_1.ForceLayout,\n fruchterman: fruchterman_1.FruchtermanLayout,\n forceAtlas2: forceAtlas2_1.ForceAtlas2Layout,\n gForce: gForce_1.GForceLayout,\n force2: force2_1.Force2Layout,\n dagre: dagre_1.DagreLayout,\n dagreCompound: dagreCompound_1.DagreCompoundLayout,\n circular: circular_1.CircularLayout,\n radial: radial_1.RadialLayout,\n concentric: concentric_1.ConcentricLayout,\n grid: grid_1.GridLayout,\n mds: mds_1.MDSLayout,\n comboForce: comboForce_1.ComboForceLayout,\n comboCombined: comboCombined_1.ComboCombinedLayout,\n random: random_1.RandomLayout,\n 'gForce-gpu': gForce_2.GForceGPULayout,\n 'fruchterman-gpu': fruchterman_2.FruchtermanGPULayout,\n er: er_1.ERLayout,\n};\n//# sourceMappingURL=layout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERLayout = exports.ForceAtlas2Layout = exports.ComboCombinedLayout = exports.ComboForceLayout = exports.GForceGPULayout = exports.FruchtermanGPULayout = exports.FruchtermanLayout = exports.MDSLayout = exports.ConcentricLayout = exports.RadialLayout = exports.DagreCompoundLayout = exports.DagreLayout = exports.CircularLayout = exports.ForceLayout = exports.Force2Layout = exports.GForceLayout = exports.RandomLayout = exports.GridLayout = exports.Layouts = exports.Layout = void 0;\nvar grid_1 = require(\"./grid\");\nObject.defineProperty(exports, \"GridLayout\", { enumerable: true, get: function () { return grid_1.GridLayout; } });\nvar random_1 = require(\"./random\");\nObject.defineProperty(exports, \"RandomLayout\", { enumerable: true, get: function () { return random_1.RandomLayout; } });\nvar gForce_1 = require(\"./gForce\");\nObject.defineProperty(exports, \"GForceLayout\", { enumerable: true, get: function () { return gForce_1.GForceLayout; } });\nvar force2_1 = require(\"./force2\");\nObject.defineProperty(exports, \"Force2Layout\", { enumerable: true, get: function () { return force2_1.Force2Layout; } });\nvar force_1 = require(\"./force\");\nObject.defineProperty(exports, \"ForceLayout\", { enumerable: true, get: function () { return force_1.ForceLayout; } });\nvar circular_1 = require(\"./circular\");\nObject.defineProperty(exports, \"CircularLayout\", { enumerable: true, get: function () { return circular_1.CircularLayout; } });\nvar dagre_1 = require(\"./dagre\");\nObject.defineProperty(exports, \"DagreLayout\", { enumerable: true, get: function () { return dagre_1.DagreLayout; } });\nvar dagreCompound_1 = require(\"./dagreCompound\");\nObject.defineProperty(exports, \"DagreCompoundLayout\", { enumerable: true, get: function () { return dagreCompound_1.DagreCompoundLayout; } });\nvar radial_1 = require(\"./radial\");\nObject.defineProperty(exports, \"RadialLayout\", { enumerable: true, get: function () { return radial_1.RadialLayout; } });\nvar concentric_1 = require(\"./concentric\");\nObject.defineProperty(exports, \"ConcentricLayout\", { enumerable: true, get: function () { return concentric_1.ConcentricLayout; } });\nvar mds_1 = require(\"./mds\");\nObject.defineProperty(exports, \"MDSLayout\", { enumerable: true, get: function () { return mds_1.MDSLayout; } });\nvar fruchterman_1 = require(\"./fruchterman\");\nObject.defineProperty(exports, \"FruchtermanLayout\", { enumerable: true, get: function () { return fruchterman_1.FruchtermanLayout; } });\nvar fruchterman_2 = require(\"./gpu/fruchterman\");\nObject.defineProperty(exports, \"FruchtermanGPULayout\", { enumerable: true, get: function () { return fruchterman_2.FruchtermanGPULayout; } });\nvar gForce_2 = require(\"./gpu/gForce\");\nObject.defineProperty(exports, \"GForceGPULayout\", { enumerable: true, get: function () { return gForce_2.GForceGPULayout; } });\nvar comboForce_1 = require(\"./comboForce\");\nObject.defineProperty(exports, \"ComboForceLayout\", { enumerable: true, get: function () { return comboForce_1.ComboForceLayout; } });\nvar comboCombined_1 = require(\"./comboCombined\");\nObject.defineProperty(exports, \"ComboCombinedLayout\", { enumerable: true, get: function () { return comboCombined_1.ComboCombinedLayout; } });\nvar forceAtlas2_1 = require(\"./forceAtlas2\");\nObject.defineProperty(exports, \"ForceAtlas2Layout\", { enumerable: true, get: function () { return forceAtlas2_1.ForceAtlas2Layout; } });\nvar er_1 = require(\"./er\");\nObject.defineProperty(exports, \"ERLayout\", { enumerable: true, get: function () { return er_1.ERLayout; } });\nvar layout_1 = require(\"./layout\");\nObject.defineProperty(exports, \"Layout\", { enumerable: true, get: function () { return layout_1.Layout; } });\nObject.defineProperty(exports, \"Layouts\", { enumerable: true, get: function () { return layout_1.Layouts; } });\n// types file\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLayoutByName = exports.unRegisterLayout = exports.registerLayout = void 0;\nvar registy_1 = require(\"./registy\");\nObject.defineProperty(exports, \"registerLayout\", { enumerable: true, get: function () { return registy_1.registerLayout; } });\nObject.defineProperty(exports, \"unRegisterLayout\", { enumerable: true, get: function () { return registy_1.unRegisterLayout; } });\nObject.defineProperty(exports, \"getLayoutByName\", { enumerable: true, get: function () { return registy_1.getLayoutByName; } });\n// layout, layout types file, worker\n__exportStar(require(\"./layout\"), exports);\n//# sourceMappingURL=index.js.map","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Hierarchy\"] = factory();\n\telse\n\t\troot[\"Hierarchy\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 36);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Array.isArray ? Array.isArray(value) : Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Array');\n});\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isArrayLike);\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Function');\n});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar toString = {}.toString;\nvar isType = function (value, type) {\n return toString.call(value) === '[object ' + type + ']';\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isType);\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(str, 'String');\n});\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\n\nvar isNumber = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Number');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNumber);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _require = __webpack_require__(38),\n mix = _require.mix;\n\n/**\n * Get average height or height for node's position calculation, according to align.\n * @param {*} preNode previous node\n * @param {*} node current node, whose position is going to be calculated\n * @param {'center' | undefined} align 'center' means nodes align at the center, other value means align at the left-top\n * @param {string} heightField field name for height value on preNode and node\n * @return {number} the height for calculation\n */\nfunction getHeight(preNode, node, align, heightField) {\n if (heightField === void 0) {\n heightField = 'height';\n }\n return align === 'center' ? (preNode[heightField] + node[heightField]) / 2 : preNode.height;\n}\nmodule.exports = {\n assign: mix,\n getHeight: getHeight\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNil);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);\n\n\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n } else if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__[\"a\" /* default */])(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (each);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) return '';\n return value.toString();\n});\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_type__ = __webpack_require__(3);\n\n\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(value) || !Object(__WEBPACK_IMPORTED_MODULE_1__is_type__[\"a\" /* default */])(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPlainObject);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = __webpack_require__(18);\nvar Layout = /*#__PURE__*/function () {\n function Layout(root, options) {\n if (options === void 0) {\n options = {};\n }\n var me = this;\n me.options = options;\n me.rootNode = hierarchy(root, options);\n }\n var _proto = Layout.prototype;\n _proto.execute = function execute() {\n throw new Error('please override this method');\n };\n return Layout;\n}();\nmodule.exports = Layout;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return value !== null && type === 'object' || type === 'function';\n});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar contains = function (arr, value) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (contains);\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isObjectLike);\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n// @ts-ignore\nvar values = Object.values ? function (obj) {\n return Object.values(obj);\n} : function (obj) {\n var result = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(obj, function (value, key) {\n if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (values);\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = mix;\n// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nfunction mix(dist, src1, src2, src3) {\n if (src1) _mix(dist, src1);\n if (src2) _mix(dist, src2);\n if (src3) _mix(dist, src3);\n return dist;\n}\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar separateTree = __webpack_require__(35);\nvar VALID_DIRECTIONS = ['LR',\n// left to right\n'RL',\n// right to left\n'TB',\n// top to bottom\n'BT',\n// bottom to top\n'H',\n// horizontal\n'V' // vertical\n];\n\nvar HORIZONTAL_DIRECTIONS = ['LR', 'RL', 'H'];\nvar isHorizontal = function isHorizontal(direction) {\n return HORIZONTAL_DIRECTIONS.indexOf(direction) > -1;\n};\nvar DEFAULT_DIRECTION = VALID_DIRECTIONS[0];\nmodule.exports = function (root, options, layoutAlgrithm) {\n var direction = options.direction || DEFAULT_DIRECTION;\n options.isHorizontal = isHorizontal(direction);\n if (direction && VALID_DIRECTIONS.indexOf(direction) === -1) {\n throw new TypeError(\"Invalid direction: \" + direction);\n }\n if (direction === VALID_DIRECTIONS[0]) {\n // LR\n layoutAlgrithm(root, options);\n } else if (direction === VALID_DIRECTIONS[1]) {\n // RL\n layoutAlgrithm(root, options);\n root.right2left();\n } else if (direction === VALID_DIRECTIONS[2]) {\n // TB\n layoutAlgrithm(root, options);\n } else if (direction === VALID_DIRECTIONS[3]) {\n // BT\n layoutAlgrithm(root, options);\n root.bottom2top();\n } else if (direction === VALID_DIRECTIONS[4] || direction === VALID_DIRECTIONS[5]) {\n // H or V\n // separate into left and right trees\n var _separateTree = separateTree(root, options),\n left = _separateTree.left,\n right = _separateTree.right;\n // do layout for left and right trees\n layoutAlgrithm(left, options);\n layoutAlgrithm(right, options);\n options.isHorizontal ? left.right2left() : left.bottom2top();\n // combine left and right trees\n right.translate(left.x - right.x, left.y - right.y);\n // translate root\n root.x = left.x;\n root.y = right.y;\n var bb = root.getBoundingBox();\n if (options.isHorizontal) {\n if (bb.top < 0) {\n root.translate(0, -bb.top);\n }\n } else {\n if (bb.left < 0) {\n root.translate(-bb.left, 0);\n }\n }\n }\n // fixed root position, default value is true\n var fixedRoot = options.fixedRoot;\n if (fixedRoot === undefined) fixedRoot = true;\n if (fixedRoot) {\n root.translate(-(root.x + root.width / 2 + root.hgap), -(root.y + root.height / 2 + root.vgap));\n }\n return root;\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable no-cond-assign */\nvar util = __webpack_require__(6);\nvar PEM = 18;\nvar DEFAULT_HEIGHT = PEM * 2;\nvar DEFAULT_GAP = PEM;\nvar DEFAULT_OPTIONS = {\n getId: function getId(d) {\n return d.id || d.name;\n },\n getPreH: function getPreH(d) {\n return d.preH || 0;\n },\n getPreV: function getPreV(d) {\n return d.preV || 0;\n },\n getHGap: function getHGap(d) {\n return d.hgap || DEFAULT_GAP;\n },\n getVGap: function getVGap(d) {\n return d.vgap || DEFAULT_GAP;\n },\n getChildren: function getChildren(d) {\n return d.children;\n },\n getHeight: function getHeight(d) {\n return d.height || DEFAULT_HEIGHT;\n },\n getWidth: function getWidth(d) {\n var label = d.label || ' ';\n return d.width || label.split('').length * PEM; // FIXME DO NOT get width like this\n }\n};\n\nfunction Node(data, options) {\n var me = this;\n me.vgap = me.hgap = 0;\n if (data instanceof Node) return data;\n me.data = data;\n /*\n * Gaps: filling space between nodes\n * (x, y) ----------------------\n * | vgap |\n * | -------------------- h\n * | h | | e\n * | g | | i\n * | a | | g\n * | p | | h\n * | --------------------- t\n * | |\n * -----------width------------\n */\n var hgap = options.getHGap(data);\n var vgap = options.getVGap(data);\n me.preH = options.getPreH(data);\n me.preV = options.getPreV(data);\n me.width = options.getWidth(data);\n me.height = options.getHeight(data);\n me.width += me.preH;\n me.height += me.preV;\n me.id = options.getId(data);\n me.x = me.y = 0;\n me.depth = 0;\n if (!me.children) {\n me.children = [];\n }\n me.addGap(hgap, vgap);\n return me;\n}\nutil.assign(Node.prototype, {\n isRoot: function isRoot() {\n return this.depth === 0;\n },\n isLeaf: function isLeaf() {\n return this.children.length === 0;\n },\n addGap: function addGap(hgap, vgap) {\n var me = this;\n me.hgap += hgap;\n me.vgap += vgap;\n me.width += 2 * hgap;\n me.height += 2 * vgap;\n },\n eachNode: function eachNode(callback) {\n // Depth First traverse\n var me = this;\n var nodes = [me];\n var current;\n while (current = nodes.shift()) {\n callback(current);\n nodes = current.children.concat(nodes);\n }\n },\n DFTraverse: function DFTraverse(callback) {\n // Depth First traverse\n this.eachNode(callback);\n },\n BFTraverse: function BFTraverse(callback) {\n // Breadth First traverse\n var me = this;\n var nodes = [me];\n var current;\n while (current = nodes.shift()) {\n callback(current);\n nodes = nodes.concat(current.children);\n }\n },\n getBoundingBox: function getBoundingBox() {\n // BBox for just one tree node\n var bb = {\n left: Number.MAX_VALUE,\n top: Number.MAX_VALUE,\n width: 0,\n height: 0\n };\n this.eachNode(function (node) {\n bb.left = Math.min(bb.left, node.x);\n bb.top = Math.min(bb.top, node.y);\n bb.width = Math.max(bb.width, node.x + node.width);\n bb.height = Math.max(bb.height, node.y + node.height);\n });\n return bb;\n },\n // translate\n translate: function translate(tx, ty) {\n if (tx === void 0) {\n tx = 0;\n }\n if (ty === void 0) {\n ty = 0;\n }\n this.eachNode(function (node) {\n node.x += tx;\n node.y += ty;\n node.x += node.preH;\n node.y += node.preV;\n });\n },\n right2left: function right2left() {\n var me = this;\n var bb = me.getBoundingBox();\n me.eachNode(function (node) {\n node.x = node.x - (node.x - bb.left) * 2 - node.width;\n // node.x = - node.x;\n });\n\n me.translate(bb.width, 0);\n },\n bottom2top: function bottom2top() {\n var me = this;\n var bb = me.getBoundingBox();\n me.eachNode(function (node) {\n node.y = node.y - (node.y - bb.top) * 2 - node.height;\n // node.y = - node.y;\n });\n\n me.translate(0, bb.height);\n }\n});\nfunction hierarchy(data, options, isolated) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n var root = new Node(data, options);\n var nodes = [root];\n var node;\n if (!isolated && !data.collapsed) {\n while (node = nodes.shift()) {\n if (!node.data.collapsed) {\n var children = options.getChildren(node.data);\n var length = children ? children.length : 0;\n node.children = new Array(length);\n if (children && length) {\n for (var i = 0; i < length; i++) {\n var child = new Node(children[i], options);\n node.children[i] = child;\n nodes.push(child);\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n }\n }\n return root;\n}\nmodule.exports = hierarchy;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar filter = function (arr, func) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (filter);\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys__ = __webpack_require__(21);\n\n\nfunction isMatch(obj, attrs) {\n var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys__[\"a\" /* default */])(attrs);\n var length = _keys.length;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(obj)) return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (isMatch);\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar keys = Object.keys ? function (obj) {\n return Object.keys(obj);\n} : function (obj) {\n var result = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(obj, function (value, key) {\n if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (keys);\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (pullAt);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_plain_object__ = __webpack_require__(10);\n\n\n\nvar reduce = function (arr, fn, init) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_array__[\"a\" /* default */])(arr) && !Object(__WEBPACK_IMPORTED_MODULE_2__is_plain_object__[\"a\" /* default */])(arr)) {\n return arr;\n }\n var result = init;\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (reduce);\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = uniq;\nfunction uniq(arr, cache) {\n if (cache === void 0) {\n cache = new Map();\n }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n\n/***/ }),\n/* 27 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = groupToMap;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group_by__ = __webpack_require__(28);\n\n\n\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nfunction groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data\n };\n }\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return Object(__WEBPACK_IMPORTED_MODULE_2__group_by__[\"a\" /* default */])(data, condition);\n}\n\n/***/ }),\n/* 28 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(condition) ? condition : function (item) {\n return item[condition];\n };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n } else {\n result[key] = [item];\n }\n }\n return result;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (groupBy);\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, key) {\n return obj.hasOwnProperty(key);\n});\n\n/***/ }),\n/* 30 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar toString = {}.toString;\nvar getType = function (value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/]$/, '');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (getType);\n\n/***/ }),\n/* 31 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = typeof Ctor === 'function' && Ctor.prototype || objectProto;\n return value === proto;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPrototype);\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (f, resolver) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = new Map();\n return memoized;\n});\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_string__ = __webpack_require__(4);\n\n\n\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_2__is_string__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_2__is_string__[\"a\" /* default */])(other)) {\n return false;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEqual);\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(116);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__memoize__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_string__ = __webpack_require__(4);\n\n\n\n\nvar ctx;\n/**\n * 计算文本的宽度\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_2__memoize__[\"a\" /* default */])(function (text, font) {\n if (font === void 0) {\n font = {};\n }\n var fontSize = font.fontSize,\n fontFamily = font.fontFamily,\n fontWeight = font.fontWeight,\n fontStyle = font.fontStyle,\n fontVariant = font.fontVariant;\n if (!ctx) {\n ctx = document.createElement('canvas').getContext('2d');\n }\n ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ');\n return ctx.measureText(Object(__WEBPACK_IMPORTED_MODULE_3__is_string__[\"a\" /* default */])(text) ? text : '').width;\n}, function (text, font) {\n if (font === void 0) {\n font = {};\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__[\"a\" /* __spreadArrays */])([text], Object(__WEBPACK_IMPORTED_MODULE_1__values__[\"a\" /* default */])(font)).join('');\n}));\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = __webpack_require__(18);\nmodule.exports = function (root, options) {\n // separate into left and right trees\n var left = hierarchy(root.data, options, true); // root only\n var right = hierarchy(root.data, options, true); // root only\n // automatically\n var treeSize = root.children.length;\n var rightTreeSize = Math.round(treeSize / 2);\n // separate left and right tree by meta data\n var getSide = options.getSide || function (child, index) {\n if (index < rightTreeSize) {\n return 'right';\n }\n return 'left';\n };\n for (var i = 0; i < treeSize; i++) {\n var child = root.children[i];\n var side = getSide(child, i);\n if (side === 'right') {\n right.children.push(child);\n } else {\n left.children.push(child);\n }\n }\n left.eachNode(function (node) {\n if (!node.isRoot()) {\n node.side = 'left';\n }\n });\n right.eachNode(function (node) {\n if (!node.isRoot()) {\n node.side = 'right';\n }\n });\n return {\n left: left,\n right: right\n };\n};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = {\n compactBox: __webpack_require__(37),\n dendrogram: __webpack_require__(120),\n indented: __webpack_require__(122),\n mindmap: __webpack_require__(124)\n};\nmodule.exports = hierarchy;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar nonLayeredTidyTree = __webpack_require__(119);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar CompactBoxTreeLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(CompactBoxTreeLayout, _TreeLayout);\n function CompactBoxTreeLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = CompactBoxTreeLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n return doTreeLayout(me.rootNode, me.options, nonLayeredTidyTree);\n };\n return CompactBoxTreeLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction compactBoxLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new CompactBoxTreeLayout(root, options).execute();\n}\nmodule.exports = compactBoxLayout;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"contains\", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"includes\", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__difference__ = __webpack_require__(39);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return __WEBPACK_IMPORTED_MODULE_1__difference__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__find__ = __webpack_require__(40);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return __WEBPACK_IMPORTED_MODULE_2__find__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__find_index__ = __webpack_require__(41);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"findIndex\", function() { return __WEBPACK_IMPORTED_MODULE_3__find_index__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__first_value__ = __webpack_require__(42);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"firstValue\", function() { return __WEBPACK_IMPORTED_MODULE_4__first_value__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__flatten__ = __webpack_require__(43);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"flatten\", function() { return __WEBPACK_IMPORTED_MODULE_5__flatten__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__flatten_deep__ = __webpack_require__(44);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"flattenDeep\", function() { return __WEBPACK_IMPORTED_MODULE_6__flatten_deep__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__get_range__ = __webpack_require__(45);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getRange\", function() { return __WEBPACK_IMPORTED_MODULE_7__get_range__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pull__ = __webpack_require__(46);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pull\", function() { return __WEBPACK_IMPORTED_MODULE_8__pull__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pull_at__ = __webpack_require__(24);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pullAt\", function() { return __WEBPACK_IMPORTED_MODULE_9__pull_at__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__reduce__ = __webpack_require__(25);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return __WEBPACK_IMPORTED_MODULE_10__reduce__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__remove__ = __webpack_require__(47);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"remove\", function() { return __WEBPACK_IMPORTED_MODULE_11__remove__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__sort_by__ = __webpack_require__(48);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"sortBy\", function() { return __WEBPACK_IMPORTED_MODULE_12__sort_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__union__ = __webpack_require__(49);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return __WEBPACK_IMPORTED_MODULE_13__union__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__uniq__ = __webpack_require__(26);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"uniq\", function() { return __WEBPACK_IMPORTED_MODULE_14__uniq__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__values_of_key__ = __webpack_require__(50);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"valuesOfKey\", function() { return __WEBPACK_IMPORTED_MODULE_15__values_of_key__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__head__ = __webpack_require__(51);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"head\", function() { return __WEBPACK_IMPORTED_MODULE_16__head__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__last__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"last\", function() { return __WEBPACK_IMPORTED_MODULE_17__last__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__starts_with__ = __webpack_require__(53);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"startsWith\", function() { return __WEBPACK_IMPORTED_MODULE_18__starts_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ends_with__ = __webpack_require__(54);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"endsWith\", function() { return __WEBPACK_IMPORTED_MODULE_19__ends_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__filter__ = __webpack_require__(19);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return __WEBPACK_IMPORTED_MODULE_20__filter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__every__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return __WEBPACK_IMPORTED_MODULE_21__every__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__some__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return __WEBPACK_IMPORTED_MODULE_22__some__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__group__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return __WEBPACK_IMPORTED_MODULE_23__group__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__group_by__ = __webpack_require__(28);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"groupBy\", function() { return __WEBPACK_IMPORTED_MODULE_24__group_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__group_to_map__ = __webpack_require__(27);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"groupToMap\", function() { return __WEBPACK_IMPORTED_MODULE_25__group_to_map__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__ = __webpack_require__(58);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getWrapBehavior\", function() { return __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__ = __webpack_require__(59);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapBehavior\", function() { return __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__number2color__ = __webpack_require__(60);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"number2color\", function() { return __WEBPACK_IMPORTED_MODULE_28__number2color__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__parse_radius__ = __webpack_require__(61);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"parseRadius\", function() { return __WEBPACK_IMPORTED_MODULE_29__parse_radius__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__clamp__ = __webpack_require__(62);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clamp\", function() { return __WEBPACK_IMPORTED_MODULE_30__clamp__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__fixed_base__ = __webpack_require__(63);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"fixedBase\", function() { return __WEBPACK_IMPORTED_MODULE_31__fixed_base__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__is_decimal__ = __webpack_require__(64);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isDecimal\", function() { return __WEBPACK_IMPORTED_MODULE_32__is_decimal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__is_even__ = __webpack_require__(65);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEven\", function() { return __WEBPACK_IMPORTED_MODULE_33__is_even__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__is_integer__ = __webpack_require__(66);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isInteger\", function() { return __WEBPACK_IMPORTED_MODULE_34__is_integer__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__is_negative__ = __webpack_require__(67);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNegative\", function() { return __WEBPACK_IMPORTED_MODULE_35__is_negative__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__is_number_equal__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberEqual\", function() { return __WEBPACK_IMPORTED_MODULE_36__is_number_equal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__is_odd__ = __webpack_require__(69);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isOdd\", function() { return __WEBPACK_IMPORTED_MODULE_37__is_odd__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__is_positive__ = __webpack_require__(70);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPositive\", function() { return __WEBPACK_IMPORTED_MODULE_38__is_positive__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__max__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return __WEBPACK_IMPORTED_MODULE_39__max__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__max_by__ = __webpack_require__(71);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"maxBy\", function() { return __WEBPACK_IMPORTED_MODULE_40__max_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__min__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return __WEBPACK_IMPORTED_MODULE_41__min__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__min_by__ = __webpack_require__(72);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"minBy\", function() { return __WEBPACK_IMPORTED_MODULE_42__min_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__mod__ = __webpack_require__(73);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mod\", function() { return __WEBPACK_IMPORTED_MODULE_43__mod__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__to_degree__ = __webpack_require__(74);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toDegree\", function() { return __WEBPACK_IMPORTED_MODULE_44__to_degree__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__to_integer__ = __webpack_require__(75);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toInteger\", function() { return __WEBPACK_IMPORTED_MODULE_45__to_integer__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__to_radian__ = __webpack_require__(76);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toRadian\", function() { return __WEBPACK_IMPORTED_MODULE_46__to_radian__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__for_in__ = __webpack_require__(77);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"forIn\", function() { return __WEBPACK_IMPORTED_MODULE_47__for_in__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__has__ = __webpack_require__(29);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"has\", function() { return __WEBPACK_IMPORTED_MODULE_48__has__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__has_key__ = __webpack_require__(78);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"hasKey\", function() { return __WEBPACK_IMPORTED_MODULE_49__has_key__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__has_value__ = __webpack_require__(79);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"hasValue\", function() { return __WEBPACK_IMPORTED_MODULE_50__has_value__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__keys__ = __webpack_require__(21);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return __WEBPACK_IMPORTED_MODULE_51__keys__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__is_match__ = __webpack_require__(20);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isMatch\", function() { return __WEBPACK_IMPORTED_MODULE_52__is_match__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__values__ = __webpack_require__(15);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return __WEBPACK_IMPORTED_MODULE_53__values__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__lower_case__ = __webpack_require__(80);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"lowerCase\", function() { return __WEBPACK_IMPORTED_MODULE_54__lower_case__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__lower_first__ = __webpack_require__(81);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"lowerFirst\", function() { return __WEBPACK_IMPORTED_MODULE_55__lower_first__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__substitute__ = __webpack_require__(82);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"substitute\", function() { return __WEBPACK_IMPORTED_MODULE_56__substitute__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__upper_case__ = __webpack_require__(83);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"upperCase\", function() { return __WEBPACK_IMPORTED_MODULE_57__upper_case__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__upper_first__ = __webpack_require__(84);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"upperFirst\", function() { return __WEBPACK_IMPORTED_MODULE_58__upper_first__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__get_type__ = __webpack_require__(30);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getType\", function() { return __WEBPACK_IMPORTED_MODULE_59__get_type__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__is_arguments__ = __webpack_require__(85);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArguments\", function() { return __WEBPACK_IMPORTED_MODULE_60__is_arguments__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__is_array__ = __webpack_require__(0);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArray\", function() { return __WEBPACK_IMPORTED_MODULE_61__is_array__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__is_array_like__ = __webpack_require__(1);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArrayLike\", function() { return __WEBPACK_IMPORTED_MODULE_62__is_array_like__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__is_boolean__ = __webpack_require__(86);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isBoolean\", function() { return __WEBPACK_IMPORTED_MODULE_63__is_boolean__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__is_date__ = __webpack_require__(87);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isDate\", function() { return __WEBPACK_IMPORTED_MODULE_64__is_date__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__is_error__ = __webpack_require__(88);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isError\", function() { return __WEBPACK_IMPORTED_MODULE_65__is_error__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__is_function__ = __webpack_require__(2);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isFunction\", function() { return __WEBPACK_IMPORTED_MODULE_66__is_function__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__is_finite__ = __webpack_require__(89);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isFinite\", function() { return __WEBPACK_IMPORTED_MODULE_67__is_finite__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__is_nil__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNil\", function() { return __WEBPACK_IMPORTED_MODULE_68__is_nil__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__is_null__ = __webpack_require__(90);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNull\", function() { return __WEBPACK_IMPORTED_MODULE_69__is_null__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__is_number__ = __webpack_require__(5);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumber\", function() { return __WEBPACK_IMPORTED_MODULE_70__is_number__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_71__is_object__ = __webpack_require__(12);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return __WEBPACK_IMPORTED_MODULE_71__is_object__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_72__is_object_like__ = __webpack_require__(14);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isObjectLike\", function() { return __WEBPACK_IMPORTED_MODULE_72__is_object_like__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__is_plain_object__ = __webpack_require__(10);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPlainObject\", function() { return __WEBPACK_IMPORTED_MODULE_73__is_plain_object__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_74__is_prototype__ = __webpack_require__(31);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPrototype\", function() { return __WEBPACK_IMPORTED_MODULE_74__is_prototype__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__ = __webpack_require__(91);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isRegExp\", function() { return __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_76__is_string__ = __webpack_require__(4);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return __WEBPACK_IMPORTED_MODULE_76__is_string__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_77__is_type__ = __webpack_require__(3);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isType\", function() { return __WEBPACK_IMPORTED_MODULE_77__is_type__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_78__is_undefined__ = __webpack_require__(92);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isUndefined\", function() { return __WEBPACK_IMPORTED_MODULE_78__is_undefined__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__is_element__ = __webpack_require__(93);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isElement\", function() { return __WEBPACK_IMPORTED_MODULE_79__is_element__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__ = __webpack_require__(94);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"requestAnimationFrame\", function() { return __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__ = __webpack_require__(95);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clearAnimationFrame\", function() { return __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__augment__ = __webpack_require__(96);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"augment\", function() { return __WEBPACK_IMPORTED_MODULE_82__augment__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__clone__ = __webpack_require__(97);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return __WEBPACK_IMPORTED_MODULE_83__clone__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__debounce__ = __webpack_require__(98);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return __WEBPACK_IMPORTED_MODULE_84__debounce__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_85__memoize__ = __webpack_require__(32);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"memoize\", function() { return __WEBPACK_IMPORTED_MODULE_85__memoize__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_86__deep_mix__ = __webpack_require__(99);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"deepMix\", function() { return __WEBPACK_IMPORTED_MODULE_86__deep_mix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_87__each__ = __webpack_require__(8);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"each\", function() { return __WEBPACK_IMPORTED_MODULE_87__each__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__extend__ = __webpack_require__(100);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return __WEBPACK_IMPORTED_MODULE_88__extend__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__index_of__ = __webpack_require__(101);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"indexOf\", function() { return __WEBPACK_IMPORTED_MODULE_89__index_of__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__is_empty__ = __webpack_require__(102);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEmpty\", function() { return __WEBPACK_IMPORTED_MODULE_90__is_empty__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_91__is_equal__ = __webpack_require__(33);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEqual\", function() { return __WEBPACK_IMPORTED_MODULE_91__is_equal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_92__is_equal_with__ = __webpack_require__(103);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEqualWith\", function() { return __WEBPACK_IMPORTED_MODULE_92__is_equal_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_93__map__ = __webpack_require__(104);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return __WEBPACK_IMPORTED_MODULE_93__map__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_94__map_values__ = __webpack_require__(105);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mapValues\", function() { return __WEBPACK_IMPORTED_MODULE_94__map_values__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_95__mix__ = __webpack_require__(16);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mix\", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"assign\", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_96__get__ = __webpack_require__(106);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return __WEBPACK_IMPORTED_MODULE_96__get__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_97__set__ = __webpack_require__(107);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return __WEBPACK_IMPORTED_MODULE_97__set__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_98__pick__ = __webpack_require__(108);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pick\", function() { return __WEBPACK_IMPORTED_MODULE_98__pick__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_99__omit__ = __webpack_require__(109);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"omit\", function() { return __WEBPACK_IMPORTED_MODULE_99__omit__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_100__throttle__ = __webpack_require__(110);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"throttle\", function() { return __WEBPACK_IMPORTED_MODULE_100__throttle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_101__to_array__ = __webpack_require__(111);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toArray\", function() { return __WEBPACK_IMPORTED_MODULE_101__to_array__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_102__to_string__ = __webpack_require__(9);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toString\", function() { return __WEBPACK_IMPORTED_MODULE_102__to_string__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_103__unique_id__ = __webpack_require__(112);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return __WEBPACK_IMPORTED_MODULE_103__unique_id__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_104__noop__ = __webpack_require__(113);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return __WEBPACK_IMPORTED_MODULE_104__noop__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_105__identity__ = __webpack_require__(114);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return __WEBPACK_IMPORTED_MODULE_105__identity__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_106__size__ = __webpack_require__(115);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"size\", function() { return __WEBPACK_IMPORTED_MODULE_106__size__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_107__measure_text_width__ = __webpack_require__(34);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"measureTextWidth\", function() { return __WEBPACK_IMPORTED_MODULE_107__measure_text_width__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__ = __webpack_require__(117);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getEllipsisText\", function() { return __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_109__cache__ = __webpack_require__(118);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"Cache\", function() { return __WEBPACK_IMPORTED_MODULE_109__cache__[\"a\"]; });\n// array\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// event\n\n\n// format\n\n\n// math\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// object\n\n\n\n\n\n\n\n// string\n\n\n\n\n\n// type\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// other\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// text\n\n\n// 不知道为什么,需要把这个 export,不然 ts 会报类型错误\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__contains__ = __webpack_require__(13);\n\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) {\n values = [];\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0__filter__[\"a\" /* default */])(arr, function (value) {\n return !Object(__WEBPACK_IMPORTED_MODULE_1__contains__[\"a\" /* default */])(values, value);\n });\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (difference);\n\n/***/ }),\n/* 40 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_match__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_plain_object__ = __webpack_require__(10);\n\n\n\n\nfunction find(arr, predicate) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_2__is_array__[\"a\" /* default */])(arr)) return null;\n var _predicate;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(predicate)) {\n _predicate = predicate;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_3__is_plain_object__[\"a\" /* default */])(predicate)) {\n _predicate = function (a) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__is_match__[\"a\" /* default */])(a, predicate);\n };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (find);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) {\n fromIndex = 0;\n }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findIndex);\n\n/***/ }),\n/* 42 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);\n\n\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) {\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array__[\"a\" /* default */])(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n } else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (firstValue);\n\n/***/ }),\n/* 43 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (flatten);\n\n/***/ }),\n/* 44 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) {\n result = [];\n }\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n result.push(arr);\n } else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (flattenDeep);\n\n/***/ }),\n/* 45 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__max__ = __webpack_require__(22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__min__ = __webpack_require__(23);\n\n\n\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) {\n return !isNaN(v);\n });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0\n };\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = Object(__WEBPACK_IMPORTED_MODULE_1__max__[\"a\" /* default */])(filterValues);\n var min = Object(__WEBPACK_IMPORTED_MODULE_2__min__[\"a\" /* default */])(filterValues);\n return {\n min: min,\n max: max\n };\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (getRange);\n\n/***/ }),\n/* 46 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (pull);\n\n/***/ }),\n/* 47 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pull_at__ = __webpack_require__(24);\n\n\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n Object(__WEBPACK_IMPORTED_MODULE_1__pull_at__[\"a\" /* default */])(arr, indexes);\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (remove);\n\n/***/ }),\n/* 48 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_function__ = __webpack_require__(2);\n\n\n\nfunction sortBy(arr, key) {\n var comparer;\n if (Object(__WEBPACK_IMPORTED_MODULE_2__is_function__[\"a\" /* default */])(key)) {\n comparer = function (a, b) {\n return key(a) - key(b);\n };\n } else {\n var keys_1 = [];\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(key)) {\n keys_1.push(key);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (sortBy);\n\n/***/ }),\n/* 49 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__uniq__ = __webpack_require__(26);\n\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0__uniq__[\"a\" /* default */])([].concat.apply([], sources));\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (union);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_nil__ = __webpack_require__(7);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_nil__[\"a\" /* default */])(value)) {\n // flatten\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n\n/***/ }),\n/* 51 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = head;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nfunction head(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(o)) {\n return o[0];\n }\n return undefined;\n}\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = last;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nfunction last(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n\n\nfunction startsWith(arr, e) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(arr) ? arr[0] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (startsWith);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n\n\nfunction endsWith(arr, e) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(arr) ? arr[arr.length - 1] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (endsWith);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i)) return false;\n }\n return true;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (every);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i)) return true;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (some);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_to_map__ = __webpack_require__(27);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = Object(__WEBPACK_IMPORTED_MODULE_0__group_to_map__[\"a\" /* default */])(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getWrapBehavior);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (wrapBehavior);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (numberToColor);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\nfunction parseRadius(radius) {\n var r1 = 0,\n r2 = 0,\n r3 = 0,\n r4 = 0;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n } else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n } else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n } else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n } else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (parseRadius);\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar clamp = function (a, min, max) {\n if (a < min) {\n return min;\n } else if (a > max) {\n return max;\n }\n return a;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (clamp);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (fixedBase);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isDecimal = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 1 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isDecimal);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isEven = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 2 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEven);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isInteger = Number.isInteger ? Number.isInteger : function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 1 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isInteger);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isNegative = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num < 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNegative);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isNumberEqual;\nvar PRECISION = 0.00001; // numbers less than this is considered as 0\nfunction isNumberEqual(a, b, precision) {\n if (precision === void 0) {\n precision = PRECISION;\n }\n return Math.abs(a - b) < precision;\n}\n;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isOdd = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 2 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isOdd);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isPositive = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num > 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPositive);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar mod = function (n, m) {\n return (n % m + m) % m;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (mod);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (toDegree);\n\n/***/ }),\n/* 75 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (parseInt);\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (toRadian);\n\n/***/ }),\n/* 77 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */]);\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__has__ = __webpack_require__(29);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0__has__[\"a\" /* default */]);\n\n/***/ }),\n/* 79 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__contains__[\"a\" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__values__[\"a\" /* default */])(obj), value);\n});\n\n/***/ }),\n/* 80 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar lowerCase = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(str).toLowerCase();\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (lowerCase);\n\n/***/ }),\n/* 81 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar lowerFirst = function (value) {\n var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (lowerFirst);\n\n/***/ }),\n/* 82 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return o[name] === undefined ? '' : o[name];\n });\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (substitute);\n\n/***/ }),\n/* 83 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar upperCase = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(str).toUpperCase();\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (upperCase);\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar upperFirst = function (value) {\n var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (upperFirst);\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isArguments = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Arguments');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isArguments);\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isBoolean = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Boolean');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isBoolean);\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\nvar isDate = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Date');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isDate);\n\n/***/ }),\n/* 88 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isError = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Error');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isError);\n\n/***/ }),\n/* 89 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n/**\n * 判断是否为有限数\n * @return {Boolean}\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(value) && isFinite(value);\n});\n\n/***/ }),\n/* 90 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isNull = function (value) {\n return value === null;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNull);\n\n/***/ }),\n/* 91 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\nvar isRegExp = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(str, 'RegExp');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isRegExp);\n\n/***/ }),\n/* 92 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isUndefined = function (value) {\n return value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isUndefined);\n\n/***/ }),\n/* 93 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof HTMLDocument;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isElement);\n\n/***/ }),\n/* 94 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = requestAnimationFrame;\nfunction requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame || function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n;\n\n/***/ }),\n/* 95 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = cancelAnimationFrame;\nfunction cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame || window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame || clearTimeout;\n method(handler);\n}\n;\n\n/***/ }),\n/* 96 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj)) {\n obj = obj.prototype;\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(c.prototype, obj);\n }\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (augment);\n\n/***/ }),\n/* 97 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n } else {\n rst[i] = obj[i];\n }\n }\n } else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n } else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (clone);\n\n/***/ }),\n/* 98 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (debounce);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);\n\n\nvar MAX_MIX_LEVEL = 5;\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(value)) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n } else {\n dist[key] = src[key];\n }\n } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n } else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (deepMix);\n\n/***/ }),\n/* 100 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () {};\n }\n var create = Object.create ? function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } : function (proto, c) {\n function Tmp() {}\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(superObj, overrides);\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(subclass, staticOverrides);\n return subclass;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (extend);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar indexOf = function (arr, obj) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (indexOf);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__get_type__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_prototype__ = __webpack_require__(31);\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) {\n return true;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(value)) {\n return !value.length;\n }\n var type = Object(__WEBPACK_IMPORTED_MODULE_2__get_type__[\"a\" /* default */])(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_3__is_prototype__[\"a\" /* default */])(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEmpty);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_equal__ = __webpack_require__(33);\n\n\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value, other, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(fn)) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__is_equal__[\"a\" /* default */])(value, other);\n }\n return !!fn(value, other);\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar map = function (arr, func) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (map);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);\n\n\nvar identity = function (v) {\n return v;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (object, func) {\n if (func === void 0) {\n func = identity;\n }\n var r = {};\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__[\"a\" /* default */])(object) && !Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = Object(__WEBPACK_IMPORTED_MODULE_0__is_string__[\"a\" /* default */])(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return obj === undefined || p < keyArr.length ? defaultValue : obj;\n});\n\n/***/ }),\n/* 107 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_number__ = __webpack_require__(5);\n\n\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, path, value) {\n var o = obj;\n var keyArr = Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object__[\"a\" /* default */])(o[key])) {\n o[key] = Object(__WEBPACK_IMPORTED_MODULE_2__is_number__[\"a\" /* default */])(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n } else {\n o[key] = value;\n }\n });\n return obj;\n});\n\n/***/ }),\n/* 108 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (object, keys) {\n if (object === null || !Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(object)) {\n return {};\n }\n var result = {};\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n\n/***/ }),\n/* 109 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(25);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, keys) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__reduce__[\"a\" /* default */])(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n\n/***/ }),\n/* 110 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n\n/***/ }),\n/* 111 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(value) ? Array.prototype.slice.call(value) : [];\n});\n\n/***/ }),\n/* 112 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar map = {};\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n } else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n\n/***/ }),\n/* 113 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function () {});\n\n/***/ }),\n/* 114 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (v) {\n return v;\n});\n\n/***/ }),\n/* 115 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = size;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n\n\nfunction size(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(o)) {\n return 0;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n\n/***/ }),\n/* 116 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export __extends */\n/* unused harmony export __assign */\n/* unused harmony export __rest */\n/* unused harmony export __decorate */\n/* unused harmony export __param */\n/* unused harmony export __esDecorate */\n/* unused harmony export __runInitializers */\n/* unused harmony export __propKey */\n/* unused harmony export __setFunctionName */\n/* unused harmony export __metadata */\n/* unused harmony export __awaiter */\n/* unused harmony export __generator */\n/* unused harmony export __createBinding */\n/* unused harmony export __exportStar */\n/* unused harmony export __values */\n/* unused harmony export __read */\n/* unused harmony export __spread */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = __spreadArrays;\n/* unused harmony export __spreadArray */\n/* unused harmony export __await */\n/* unused harmony export __asyncGenerator */\n/* unused harmony export __asyncDelegator */\n/* unused harmony export __asyncValues */\n/* unused harmony export __makeTemplateObject */\n/* unused harmony export __importStar */\n/* unused harmony export __importDefault */\n/* unused harmony export __classPrivateFieldGet */\n/* unused harmony export __classPrivateFieldSet */\n/* unused harmony export __classPrivateFieldIn */\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nfunction __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.push(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.push(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nvar __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nfunction __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\n/***/ }),\n/* 117 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_string__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__measure_text_width__ = __webpack_require__(34);\n\n\n\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth 最大宽度\n * @param font 字体\n * @param str 要替换的文本\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (text, maxWidth, font, str) {\n if (str === void 0) {\n str = '...';\n }\n var STEP = 16; // 每次 16,调参工程师\n var PLACEHOLDER_WIDTH = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(str, font);\n var leftText = !Object(__WEBPACK_IMPORTED_MODULE_0__is_string__[\"a\" /* default */])(text) ? Object(__WEBPACK_IMPORTED_MODULE_1__to_string__[\"a\" /* default */])(text) : text;\n var leftWidth = maxWidth;\n var r = []; // 最终的分段字符串\n var currentText;\n var currentWidth;\n if (Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(text, font) <= maxWidth) {\n return text;\n }\n // 首先通过 step 计算,找出最大的未超出长度的\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n // 计算宽度\n currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n // 计算宽度\n currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n break;\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n if (!leftText) {\n return r.join('');\n }\n }\n return \"\" + r.join('') + str;\n});\n\n/***/ }),\n/* 118 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * k-v 存储\n */\nvar default_1 = /** @class */function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}();\n/* harmony default export */ __webpack_exports__[\"a\"] = (default_1);\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports) {\n\n// wrap tree node\nfunction WrappedTree(w, h, y, c) {\n if (c === void 0) {\n c = [];\n }\n var me = this;\n // size\n me.w = w || 0;\n me.h = h || 0;\n\n // position\n me.y = y || 0;\n me.x = 0;\n\n // children\n me.c = c || [];\n me.cs = c.length;\n\n // modified\n me.prelim = 0;\n me.mod = 0;\n me.shift = 0;\n me.change = 0;\n\n // left/right tree\n me.tl = null;\n me.tr = null;\n\n // extreme left/right tree\n me.el = null;\n me.er = null;\n\n // modified left/right tree\n me.msel = 0;\n me.mser = 0;\n}\nWrappedTree.fromNode = function (root, isHorizontal) {\n if (!root) return null;\n var children = [];\n root.children.forEach(function (child) {\n children.push(WrappedTree.fromNode(child, isHorizontal));\n });\n if (isHorizontal) return new WrappedTree(root.height, root.width, root.x, children);\n return new WrappedTree(root.width, root.height, root.y, children);\n};\n\n// node utils\nfunction moveRight(node, move, isHorizontal) {\n if (isHorizontal) {\n node.y += move;\n } else {\n node.x += move;\n }\n node.children.forEach(function (child) {\n moveRight(child, move, isHorizontal);\n });\n}\nfunction getMin(node, isHorizontal) {\n var res = isHorizontal ? node.y : node.x;\n node.children.forEach(function (child) {\n res = Math.min(getMin(child, isHorizontal), res);\n });\n return res;\n}\nfunction normalize(node, isHorizontal) {\n var min = getMin(node, isHorizontal);\n moveRight(node, -min, isHorizontal);\n}\nfunction convertBack(converted /* WrappedTree */, root /* TreeNode */, isHorizontal) {\n if (isHorizontal) {\n root.y = converted.x;\n } else {\n root.x = converted.x;\n }\n converted.c.forEach(function (child, i) {\n convertBack(child, root.children[i], isHorizontal);\n });\n}\nfunction layer(node, isHorizontal, d) {\n if (d === void 0) {\n d = 0;\n }\n if (isHorizontal) {\n node.x = d;\n d += node.width;\n } else {\n node.y = d;\n d += node.height;\n }\n node.children.forEach(function (child) {\n layer(child, isHorizontal, d);\n });\n}\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n var isHorizontal = options.isHorizontal;\n function firstWalk(t) {\n if (t.cs === 0) {\n setExtremes(t);\n return;\n }\n firstWalk(t.c[0]);\n var ih = updateIYL(bottom(t.c[0].el), 0, null);\n for (var i = 1; i < t.cs; ++i) {\n firstWalk(t.c[i]);\n var min = bottom(t.c[i].er);\n separate(t, i, ih);\n ih = updateIYL(min, i, ih);\n }\n positionRoot(t);\n setExtremes(t);\n }\n function setExtremes(t) {\n if (t.cs === 0) {\n t.el = t;\n t.er = t;\n t.msel = t.mser = 0;\n } else {\n t.el = t.c[0].el;\n t.msel = t.c[0].msel;\n t.er = t.c[t.cs - 1].er;\n t.mser = t.c[t.cs - 1].mser;\n }\n }\n function separate(t, i, ih) {\n var sr = t.c[i - 1];\n var mssr = sr.mod;\n var cl = t.c[i];\n var mscl = cl.mod;\n while (sr !== null && cl !== null) {\n if (bottom(sr) > ih.low) ih = ih.nxt;\n var dist = mssr + sr.prelim + sr.w - (mscl + cl.prelim);\n if (dist > 0) {\n mscl += dist;\n moveSubtree(t, i, ih.index, dist);\n }\n var sy = bottom(sr);\n var cy = bottom(cl);\n if (sy <= cy) {\n sr = nextRightContour(sr);\n if (sr !== null) mssr += sr.mod;\n }\n if (sy >= cy) {\n cl = nextLeftContour(cl);\n if (cl !== null) mscl += cl.mod;\n }\n }\n if (!sr && !!cl) {\n setLeftThread(t, i, cl, mscl);\n } else if (!!sr && !cl) {\n setRightThread(t, i, sr, mssr);\n }\n }\n function moveSubtree(t, i, si, dist) {\n t.c[i].mod += dist;\n t.c[i].msel += dist;\n t.c[i].mser += dist;\n distributeExtra(t, i, si, dist);\n }\n function nextLeftContour(t) {\n return t.cs === 0 ? t.tl : t.c[0];\n }\n function nextRightContour(t) {\n return t.cs === 0 ? t.tr : t.c[t.cs - 1];\n }\n function bottom(t) {\n return t.y + t.h;\n }\n function setLeftThread(t, i, cl, modsumcl) {\n var li = t.c[0].el;\n li.tl = cl;\n var diff = modsumcl - cl.mod - t.c[0].msel;\n li.mod += diff;\n li.prelim -= diff;\n t.c[0].el = t.c[i].el;\n t.c[0].msel = t.c[i].msel;\n }\n function setRightThread(t, i, sr, modsumsr) {\n var ri = t.c[i].er;\n ri.tr = sr;\n var diff = modsumsr - sr.mod - t.c[i].mser;\n ri.mod += diff;\n ri.prelim -= diff;\n t.c[i].er = t.c[i - 1].er;\n t.c[i].mser = t.c[i - 1].mser;\n }\n function positionRoot(t) {\n t.prelim = (t.c[0].prelim + t.c[0].mod + t.c[t.cs - 1].mod + t.c[t.cs - 1].prelim + t.c[t.cs - 1].w) / 2 - t.w / 2;\n }\n function secondWalk(t, modsum) {\n modsum += t.mod;\n t.x = t.prelim + modsum;\n addChildSpacing(t);\n for (var i = 0; i < t.cs; i++) {\n secondWalk(t.c[i], modsum);\n }\n }\n function distributeExtra(t, i, si, dist) {\n if (si !== i - 1) {\n var nr = i - si;\n t.c[si + 1].shift += dist / nr;\n t.c[i].shift -= dist / nr;\n t.c[i].change -= dist - dist / nr;\n }\n }\n function addChildSpacing(t) {\n var d = 0;\n var modsumdelta = 0;\n for (var i = 0; i < t.cs; i++) {\n d += t.c[i].shift;\n modsumdelta += d + t.c[i].change;\n t.c[i].mod += modsumdelta;\n }\n }\n function updateIYL(low, index, ih) {\n while (ih !== null && low >= ih.low) {\n ih = ih.nxt;\n }\n return {\n low: low,\n index: index,\n nxt: ih\n };\n }\n\n // do layout\n layer(root, isHorizontal);\n var wt = WrappedTree.fromNode(root, isHorizontal);\n firstWalk(wt);\n secondWalk(wt, 0);\n convertBack(wt, root, isHorizontal);\n normalize(root, isHorizontal);\n return root;\n};\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar dendrogram = __webpack_require__(121);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar DendrogramLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(DendrogramLayout, _TreeLayout);\n function DendrogramLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = DendrogramLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n me.rootNode.width = 0;\n return doTreeLayout(me.rootNode, me.options, dendrogram);\n };\n return DendrogramLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction dendrogramLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new DendrogramLayout(root, options).execute();\n}\nmodule.exports = dendrogramLayout;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// wrap tree node\n// TODO considering size\nvar util = __webpack_require__(6);\nfunction WrappedTree(height, children) {\n if (height === void 0) {\n height = 0;\n }\n if (children === void 0) {\n children = [];\n }\n var me = this;\n me.x = me.y = 0;\n me.leftChild = me.rightChild = null;\n me.height = 0;\n me.children = children;\n}\nvar DEFAULT_OPTIONS = {\n isHorizontal: true,\n nodeSep: 20,\n nodeSize: 20,\n rankSep: 200,\n subTreeSep: 10\n};\nfunction convertBack(converted /* WrappedTree */, root /* TreeNode */, isHorizontal) {\n if (isHorizontal) {\n root.x = converted.x;\n root.y = converted.y;\n } else {\n root.x = converted.y;\n root.y = converted.x;\n }\n converted.children.forEach(function (child, i) {\n convertBack(child, root.children[i], isHorizontal);\n });\n}\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n var maxDepth = 0;\n function wrappedTreeFromNode(n) {\n if (!n) return null;\n n.width = 0;\n if (n.depth && n.depth > maxDepth) {\n maxDepth = n.depth; // get the max depth\n }\n\n var children = n.children;\n var childrenCount = children.length;\n var t = new WrappedTree(n.height, []);\n children.forEach(function (child, i) {\n var childWT = wrappedTreeFromNode(child);\n t.children.push(childWT);\n if (i === 0) {\n // t.leftChild = childWT.leftChild ? childWT.leftChild : childWT\n t.leftChild = childWT;\n }\n if (i === childrenCount - 1) {\n // t.rightChild = childWT.rightChild ? childWT.rightChild : childWT\n t.rightChild = childWT;\n }\n });\n t.originNode = n;\n t.isLeaf = n.isLeaf();\n return t;\n }\n function getDrawingDepth(t) {\n if (t.isLeaf || t.children.length === 0) {\n t.drawingDepth = maxDepth;\n } else {\n var depths = t.children.map(function (child) {\n return getDrawingDepth(child);\n });\n var minChildDepth = Math.min.apply(null, depths);\n t.drawingDepth = minChildDepth - 1;\n }\n return t.drawingDepth;\n }\n var prevLeaf;\n function position(t) {\n t.x = t.drawingDepth * options.rankSep;\n if (t.isLeaf) {\n t.y = 0;\n if (prevLeaf) {\n t.y = prevLeaf.y + prevLeaf.height + options.nodeSep;\n if (t.originNode.parent !== prevLeaf.originNode.parent) {\n t.y += options.subTreeSep;\n }\n }\n prevLeaf = t;\n } else {\n t.children.forEach(function (child) {\n position(child);\n });\n t.y = (t.leftChild.y + t.rightChild.y) / 2;\n }\n }\n\n // wrap node\n var wt = wrappedTreeFromNode(root);\n // get depth for drawing\n getDrawingDepth(wt);\n // get position\n position(wt);\n // get x, y\n convertBack(wt, root, options.isHorizontal);\n return root;\n};\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar indentedTree = __webpack_require__(123);\nvar separateTree = __webpack_require__(35);\nvar util = __webpack_require__(6);\nvar VALID_DIRECTIONS = ['LR',\n// left to right\n'RL',\n// right to left\n'H' // horizontal\n];\n\nvar DEFAULT_DIRECTION = VALID_DIRECTIONS[0];\nvar IndentedLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(IndentedLayout, _TreeLayout);\n function IndentedLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = IndentedLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n var options = me.options;\n var root = me.rootNode;\n options.isHorizontal = true;\n // default indent 20 and sink first children;\n var _options$indent = options.indent,\n indent = _options$indent === void 0 ? 20 : _options$indent,\n _options$dropCap = options.dropCap,\n dropCap = _options$dropCap === void 0 ? true : _options$dropCap,\n _options$direction = options.direction,\n direction = _options$direction === void 0 ? DEFAULT_DIRECTION : _options$direction,\n align = options.align;\n if (direction && VALID_DIRECTIONS.indexOf(direction) === -1) {\n throw new TypeError(\"Invalid direction: \" + direction);\n }\n if (direction === VALID_DIRECTIONS[0]) {\n // LR\n indentedTree(root, indent, dropCap, align);\n } else if (direction === VALID_DIRECTIONS[1]) {\n // RL\n indentedTree(root, indent, dropCap, align);\n root.right2left();\n } else if (direction === VALID_DIRECTIONS[2]) {\n // H\n // separate into left and right trees\n var _separateTree = separateTree(root, options),\n left = _separateTree.left,\n right = _separateTree.right;\n indentedTree(left, indent, dropCap, align);\n left.right2left();\n indentedTree(right, indent, dropCap, align);\n var bbox = left.getBoundingBox();\n right.translate(bbox.width, 0);\n root.x = right.x - root.width / 2;\n }\n return root;\n };\n return IndentedLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction indentedLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new IndentedLayout(root, options).execute();\n}\nmodule.exports = indentedLayout;\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(6);\nfunction positionNode(node, previousNode, indent, dropCap, align) {\n // caculate the node's horizontal offset DX, dx's type might be number or function\n var displacementX = typeof indent === \"function\" ? indent(node) : indent * node.depth;\n if (!dropCap) {\n try {\n if (node.id === node.parent.children[0].id) {\n node.x += displacementX;\n node.y = previousNode ? previousNode.y : 0;\n return;\n }\n } catch (e) {\n // skip to normal when a node has no parent\n }\n }\n node.x += displacementX;\n if (previousNode) {\n node.y = previousNode.y + util.getHeight(previousNode, node, align);\n if (previousNode.parent && node.parent.id !== previousNode.parent.id) {\n // previous node has different parent\n var prevParent = previousNode.parent;\n var preY = prevParent.y + util.getHeight(prevParent, node, align);\n node.y = preY > node.y ? preY : node.y;\n }\n } else {\n node.y = 0;\n }\n return;\n}\nmodule.exports = function (root, indent, dropCap, align) {\n var previousNode = null;\n root.eachNode(function (node) {\n positionNode(node, previousNode, indent, dropCap, align);\n previousNode = node;\n });\n};\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar mindmap = __webpack_require__(125);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar MindmapLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(MindmapLayout, _TreeLayout);\n function MindmapLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = MindmapLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n return doTreeLayout(me.rootNode, me.options, mindmap);\n };\n return MindmapLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction mindmapLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new MindmapLayout(root, options).execute();\n}\nmodule.exports = mindmapLayout;\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(6);\nfunction secondWalk(node, options) {\n var totalHeight = 0;\n if (!node.children.length) {\n totalHeight = node.height;\n } else {\n node.children.forEach(function (c) {\n totalHeight += secondWalk(c, options);\n });\n }\n node._subTreeSep = options.getSubTreeSep(node.data);\n node.totalHeight = Math.max(node.height, totalHeight) + 2 * node._subTreeSep;\n return node.totalHeight;\n}\nfunction thirdWalk(node) {\n var children = node.children;\n var len = children.length;\n if (len) {\n children.forEach(function (c) {\n thirdWalk(c);\n });\n var first = children[0];\n var last = children[len - 1];\n var childrenHeight = last.y - first.y + last.height;\n var childrenTotalHeight = 0;\n children.forEach(function (child) {\n childrenTotalHeight += child.totalHeight;\n });\n if (childrenHeight > node.height) {\n // 当子节点总高度大于父节点高度\n node.y = first.y + childrenHeight / 2 - node.height / 2;\n } else if (children.length !== 1 || node.height > childrenTotalHeight) {\n // 多于一个子节点或者父节点大于所有子节点的总高度\n var offset = node.y + (node.height - childrenHeight) / 2 - first.y;\n children.forEach(function (c) {\n c.translate(0, offset);\n });\n } else {\n // 只有一个子节点\n node.y = (first.y + first.height / 2 + last.y + last.height / 2) / 2 - node.height / 2;\n }\n }\n}\nvar DEFAULT_OPTIONS = {\n getSubTreeSep: function getSubTreeSep() {\n return 0;\n }\n};\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n root.parent = {\n x: 0,\n width: 0,\n height: 0,\n y: 0\n };\n // first walk\n root.BFTraverse(function (node) {\n node.x = node.parent.x + node.parent.width; // simply get x\n });\n\n root.parent = null;\n // second walk\n secondWalk(root, options); // assign sub tree totalHeight\n // adjusting\n // separating nodes\n root.startY = 0;\n root.y = root.totalHeight / 2 - root.height / 2;\n root.eachNode(function (node) {\n var children = node.children;\n var len = children.length;\n if (len) {\n var first = children[0];\n first.startY = node.startY + node._subTreeSep;\n if (len === 1) {\n first.y = node.y + node.height / 2 - first.height / 2;\n } else {\n first.y = first.startY + first.totalHeight / 2 - first.height / 2;\n for (var i = 1; i < len; i++) {\n var c = children[i];\n c.startY = children[i - 1].startY + children[i - 1].totalHeight;\n c.y = c.startY + c.totalHeight / 2 - c.height / 2;\n }\n }\n }\n });\n\n // third walk\n thirdWalk(root);\n};\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=hierarchy.js.map","import { Util } from '@antv/g6-core';\nimport { isNumber } from '@antv/util';\nvar traverseTree = Util.traverseTree;\n/**\n * 将 number | Function 类型的参数转换为 return number 的 Function\n * @param {number | Function} value 需要被转换的值\n * @param {number} defaultV 返回函数的默认返回值\n * @return {Function} 转换后的函数\n */\nexport var proccessToFunc = function proccessToFunc(value, defaultV) {\n var func;\n if (!value) {\n func = function func(d) {\n return defaultV || 1;\n };\n } else if (isNumber(value)) {\n func = function func(d) {\n return value;\n };\n } else {\n func = value;\n }\n return func;\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 需要被转换的值\n * @param {EdgeConfig[]} edges 返回函数的默认返回值\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureData = function buildTextureData(nodes, edges) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i];\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = dests.length;\n maxEdgePerVetex = Math.max(maxEdgePerVetex, dests.length);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组,每条边带有一个属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 节点数组\n * @param {EdgeConfig[]} edges 边数组\n * @param {Function} attrs 读取边属性的函数\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureDataWithOneEdgeAttr = function buildTextureDataWithOneEdgeAttr(nodes, edges, attrs) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.source]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n nodeDict[mapIdPos[e.target]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n }\n\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = len / 2; // 第四位存储与该节点相关的所有节点个数\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 2);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组,每条边带有一个以上属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 节点数组\n * @param {EdgeConfig[]} edges 边数组\n * @param {Function} attrs 读取边属性的函数\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureDataWithTwoEdgeAttr = function buildTextureDataWithTwoEdgeAttr(nodes, edges, attrs1, attrs2) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.source]].push(attrs1(e));\n nodeDict[mapIdPos[e.source]].push(attrs2(e));\n nodeDict[mapIdPos[e.source]].push(0);\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n nodeDict[mapIdPos[e.target]].push(attrs1(e));\n nodeDict[mapIdPos[e.target]].push(attrs2(e));\n nodeDict[mapIdPos[e.target]].push(0);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n // dataArray[i * 4 + 2] = offset;\n // dataArray[i * 4 + 3] = len / 4; // 第四位存储与该节点相关的所有节点个数\n // pack offset & length into float32: offset 20bit, length 12bit\n dataArray[i * 4 + 2] = offset + 1048576 * len / 4;\n dataArray[i * 4 + 3] = 0; // 第四位存储与上一次的距离差值\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 4);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * transform the extended attributes of nodes or edges to a texture array\n * @param {string[]} attributeNames attributes' name to be read from items and put into output array\n * @param {ModelConfig[]} items the items to be read\n * @return {Float32Array} the attributes' value array to be read by GPU\n */\nexport var attributesToTextureData = function attributesToTextureData(attributeNames, items) {\n var dataArray = [];\n var attributeNum = attributeNames.length;\n var attributeStringMap = {};\n items.forEach(function (item) {\n attributeNames.forEach(function (name, i) {\n if (attributeStringMap[item[name]] === undefined) {\n attributeStringMap[item[name]] = Object.keys(attributeStringMap).length;\n }\n dataArray.push(attributeStringMap[item[name]]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n });\n return {\n array: new Float32Array(dataArray),\n count: Object.keys(attributeStringMap).length\n };\n};\n/**\n * transform the number array format of extended attributes of nodes or edges to a texture array\n * @param {string[]} attributeNames attributes' name to be read from items and put into output array\n * @return {Float32Array} the attributes' value array to be read by GPU\n */\nexport var arrayToTextureData = function arrayToTextureData(valueArrays) {\n var dataArray = [];\n var attributeNum = valueArrays.length;\n var itemNum = valueArrays[0].length;\n var _loop_1 = function _loop_1(j) {\n valueArrays.forEach(function (valueArray, i) {\n dataArray.push(valueArray[j]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n };\n for (var j = 0; j < itemNum; j++) {\n _loop_1(j);\n }\n return new Float32Array(dataArray);\n};\n/**\n *\n * @param data Tree graph data\n * @param layout\n */\nexport var radialLayout = function radialLayout(data, layout) {\n // 布局方式有 H / V / LR / RL / TB / BT\n var VERTICAL_LAYOUTS = ['V', 'TB', 'BT'];\n var min = {\n x: Infinity,\n y: Infinity\n };\n var max = {\n x: -Infinity,\n y: -Infinity\n };\n // 默认布局是垂直布局TB,此时x对应rad,y对应r\n var rScale = 'x';\n var radScale = 'y';\n if (layout && VERTICAL_LAYOUTS.indexOf(layout) >= 0) {\n // 若是水平布局,y对应rad,x对应r\n radScale = 'x';\n rScale = 'y';\n }\n var count = 0;\n traverseTree(data, function (node) {\n count++;\n if (node.x > max.x) {\n max.x = node.x;\n }\n if (node.x < min.x) {\n min.x = node.x;\n }\n if (node.y > max.y) {\n max.y = node.y;\n }\n if (node.y < min.y) {\n min.y = node.y;\n }\n return true;\n });\n var avgRad = Math.PI * 2 / count;\n var radDiff = max[radScale] - min[radScale];\n if (radDiff === 0) {\n return data;\n }\n traverseTree(data, function (node) {\n var radial = (node[radScale] - min[radScale]) / radDiff * (Math.PI * 2 - avgRad) + avgRad;\n var r = Math.abs(rScale === 'x' ? node.x - data.x : node.y - data.y);\n node.x = r * Math.cos(radial);\n node.y = r * Math.sin(radial);\n return true;\n });\n return data;\n};","/**\n * 调用 gpuDetector.webgl 判断当前浏览器是否支持 webgl。(支持 gpgpu 的浏览器一定也支持 webgl)\n */\nexport var gpuDetector = function gpuDetector() {\n if (typeof window === 'undefined' || typeof document === 'undefined') return {};\n return {\n canvas: !!window.CanvasRenderingContext2D,\n webgl: function () {\n try {\n var canvas = document.createElement('canvas');\n return !!(window.WebGLRenderingContext && (canvas.getContext('webgl') || canvas.getContext('experimental-webgl')));\n } catch (e) {\n return false;\n }\n }(),\n workers: !!window.Worker,\n fileapi: window.File && window.FileReader && window.FileList && window.Blob,\n getWebGLErrorMessage: function getWebGLErrorMessage() {\n var element = document.createElement('div');\n element.id = 'webgl-error-message';\n element.style.fontFamily = 'monospace';\n element.style.fontSize = '13px';\n element.style.fontWeight = 'normal';\n element.style.textAlign = 'center';\n element.style.background = '#fff';\n element.style.color = '#000';\n element.style.padding = '1.5em';\n element.style.width = '400px';\n element.style.margin = '5em auto 0';\n if (!this.webgl) {\n element.innerHTML = window.WebGLRenderingContext ? ['Your graphics card does not seem to support WebGL.
', 'Find out how to get it here.'].join('\\n') : ['Your browser does not seem to support WebGL.
', 'Find out how to get it here.'].join('\\n');\n }\n return element;\n },\n addGetWebGLMessage: function addGetWebGLMessage(parameters) {\n parameters = parameters || {};\n var parent = parameters.parent !== undefined ? parameters.parent : document.body;\n var id = parameters.id !== undefined ? parameters.id : 'oldie';\n var element = gpuDetector().getWebGLErrorMessage();\n element.id = id;\n parent.appendChild(element);\n }\n };\n};","/**\n * Get current browser name.\n * @returns browser name\n */\nexport var getBrowserName = function getBrowserName() {\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf('firefox') > -1) return 'firefox';\n if (userAgent.indexOf('safari') > -1) return 'safari';\n if (userAgent.indexOf('opr') > -1) return 'opera';\n if (userAgent.indexOf('chrome') > -1) return 'chrome';\n if (userAgent.indexOf('trident') > -1) return 'ie 11';\n if (userAgent.indexOf('ie') > -1) return 'ie';\n return 'unknown';\n};","import { __assign } from \"tslib\";\nimport * as ColorUtil from './color';\nimport * as LayoutUtil from './layout';\nimport * as GpuUtil from './gpu';\nimport * as BrowserUtil from './browser';\nimport { Util } from '@antv/g6-core';\nvar G6Util = __assign(__assign(__assign(__assign(__assign({}, Util), ColorUtil), LayoutUtil), GpuUtil), BrowserUtil);\nexport default G6Util;","import Hierarchy from '@antv/hierarchy';\nimport Util from '../util';\nvar radialLayout = Util.radialLayout;\nvar TreeLayout = /** @class */function () {\n function TreeLayout(cfg) {\n this.type = cfg.type;\n this.radial = cfg.radial;\n this.config = cfg;\n }\n TreeLayout.prototype.init = function (data) {\n var _this = this;\n this.data = data;\n if (this.radial) {\n this.layoutMethod = function (data) {\n var layoutData = Hierarchy[_this.type](data, _this.config);\n radialLayout(layoutData);\n return layoutData;\n };\n return;\n }\n this.layoutMethod = function (data) {\n return Hierarchy[_this.type](data, _this.config);\n };\n };\n TreeLayout.prototype.execute = function () {\n return this.layoutMethod(this.data, this.config);\n };\n TreeLayout.prototype.layout = function (data) {\n this.init(data);\n return this.execute();\n };\n return TreeLayout;\n}();\nexport default TreeLayout;","import { Layouts as Layout, registerLayout as oRegisterLayout, GridLayout, RandomLayout, ForceLayout, CircularLayout, DagreLayout, DagreCompoundLayout, RadialLayout, ConcentricLayout, MDSLayout, FruchtermanGPULayout, FruchtermanLayout, GForceLayout, Force2Layout, GForceGPULayout, ComboForceLayout, ComboCombinedLayout, ForceAtlas2Layout } from '@antv/layout/lib';\nimport TreeLayout from './tree-layout';\noRegisterLayout('grid', GridLayout);\noRegisterLayout('random', RandomLayout);\noRegisterLayout('force', ForceLayout);\noRegisterLayout('circular', CircularLayout);\noRegisterLayout('dagre', DagreLayout);\noRegisterLayout('dagreCompound', DagreCompoundLayout);\noRegisterLayout('radial', RadialLayout);\noRegisterLayout('concentric', ConcentricLayout);\noRegisterLayout('mds', MDSLayout);\noRegisterLayout('fruchterman', FruchtermanLayout);\noRegisterLayout('fruchterman-gpu', FruchtermanGPULayout);\noRegisterLayout('gForce', GForceLayout);\noRegisterLayout('force2', Force2Layout);\noRegisterLayout('gForce-gpu', GForceGPULayout);\noRegisterLayout('comboForce', ComboForceLayout);\noRegisterLayout('comboCombined', ComboCombinedLayout);\noRegisterLayout('forceAtlas2', ForceAtlas2Layout);\nvar registerLayout = function registerLayout(name, layoutOverride) {\n layoutOverride.isCustomLayout = true;\n Layout[name] = oRegisterLayout(name, layoutOverride);\n};\nexport { TreeLayout, Layout, registerLayout };","var WebWorker = /** @class */function () {\n function WebWorker(worker, workerScirptURL) {\n var code = worker.toString();\n var blob = new Blob([\"importScripts('\".concat(workerScirptURL, \"');(\").concat(code, \")()\")], {\n type: 'text/javascript'\n });\n return new Worker(URL.createObjectURL(blob));\n }\n return WebWorker;\n}();\nexport default WebWorker;","import WebWorker from './work';\nexport var LayoutWorker = function LayoutWorker(workerScriptURL) {\n if (workerScriptURL === void 0) {\n workerScriptURL = 'https://unpkg.com/@antv/layout@0.3.23/dist/layout.min.js';\n }\n function workerCode() {\n var LAYOUT_MESSAGE = {\n // run layout\n RUN: 'LAYOUT_RUN',\n // layout ended with success\n END: 'LAYOUT_END',\n // layout error\n ERROR: 'LAYOUT_ERROR',\n // layout tick, used in force directed layout\n TICK: 'LAYOUT_TICK',\n GPURUN: 'GPU_LAYOUT_RUN',\n GPUEND: 'GPU_LAYOUT_END'\n };\n // @ts-ignore\n layout.registerLayout('grid', layout.GridLayout);\n // @ts-ignore\n layout.registerLayout('random', layout.RandomLayout);\n // @ts-ignore\n layout.registerLayout('force', layout.ForceLayout);\n // @ts-ignore\n layout.registerLayout('force2', layout.Force2Layout);\n // @ts-ignore\n layout.registerLayout('circular', layout.CircularLayout);\n // @ts-ignore\n layout.registerLayout('dagre', layout.DagreLayout);\n // @ts-ignore\n layout.registerLayout('dagreCompound', layout.DagreCompoundLayout);\n // @ts-ignore\n layout.registerLayout('radial', layout.RadialLayout);\n // @ts-ignore\n layout.registerLayout('concentric', layout.ConcentricLayout);\n // @ts-ignore\n layout.registerLayout('mds', layout.MDSLayout);\n // @ts-ignore\n layout.registerLayout('fruchterman', layout.FruchtermanLayout);\n // @ts-ignore\n layout.registerLayout('fruchterman-gpu', layout.FruchtermanGPULayout);\n // @ts-ignore\n layout.registerLayout('gForce', layout.GForceLayout);\n // @ts-ignore\n layout.registerLayout('gForce-gpu', layout.GForceGPULayout);\n // @ts-ignore\n layout.registerLayout('comboForce', layout.ComboForceLayout);\n // @ts-ignore\n layout.registerLayout('comboCombined', layout.ComboCombinedLayout);\n // @ts-ignore\n layout.registerLayout('forceAtlas2', layout.ForceAtlas2Layout);\n function isLayoutMessage(event) {\n var type = event.data.type;\n return type === LAYOUT_MESSAGE.RUN || type === LAYOUT_MESSAGE.GPURUN;\n }\n function handleLayoutMessage(event) {\n var _this = this;\n var type = event.data.type;\n switch (type) {\n case LAYOUT_MESSAGE.RUN:\n {\n var _a = event.data,\n nodes_1 = _a.nodes,\n edges = _a.edges,\n _b = _a.layoutCfg,\n layoutCfg = _b === void 0 ? {} : _b;\n var layoutType = layoutCfg.type;\n // @ts-ignore\n var LayoutClass = layout.getLayoutByName(layoutType);\n if (!LayoutClass) {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" not found\")\n });\n break;\n }\n // eslint-disable-next-line prefer-const\n var layoutMethod_1;\n layoutCfg.onLayoutEnd = function () {\n _this.postMessage({\n type: LAYOUT_MESSAGE.END,\n nodes: nodes_1\n });\n layoutMethod_1 === null || layoutMethod_1 === void 0 ? void 0 : layoutMethod_1.destroy();\n };\n layoutMethod_1 = new LayoutClass(layoutCfg);\n layoutMethod_1.init({\n nodes: nodes_1,\n edges: edges\n });\n layoutMethod_1.execute();\n break;\n }\n case LAYOUT_MESSAGE.GPURUN:\n {\n var _c = event.data,\n nodes = _c.nodes,\n edges = _c.edges,\n _d = _c.layoutCfg,\n layoutCfg = _d === void 0 ? {} : _d,\n canvas = _c.canvas;\n var layoutType = layoutCfg.type;\n // @ts-ignore\n var LayoutClass = layout.getLayoutByName(layoutType);\n if (!LayoutClass) {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" not found\")\n });\n break;\n }\n if (layoutType.split('-')[1] !== 'gpu') {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" does not support GPU\")\n });\n break;\n }\n var layoutMethod = new LayoutClass(layoutCfg);\n layoutMethod.init({\n nodes: nodes,\n edges: edges\n });\n layoutMethod.executeWithWorker(canvas, this);\n break;\n }\n default:\n break;\n }\n }\n onmessage = function onmessage(event) {\n if (isLayoutMessage(event)) {\n handleLayoutMessage(event);\n }\n };\n }\n var layoutWorker = new WebWorker(workerCode, workerScriptURL);\n return layoutWorker;\n};","/**\n * @fileoverview constants for layout\n * @author changzhe.zb@antfin.com\n */\n/** layout message type */\nexport var LAYOUT_MESSAGE = {\n // run layout\n RUN: 'LAYOUT_RUN',\n // layout ended with success\n END: 'LAYOUT_END',\n // layout error\n ERROR: 'LAYOUT_ERROR',\n // layout tick, used in force directed layout\n TICK: 'LAYOUT_TICK',\n GPURUN: 'GPU_LAYOUT_RUN',\n GPUEND: 'GPU_LAYOUT_END'\n};","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport { __awaiter, __extends, __generator, __rest } from \"tslib\";\nimport { AbstractLayout, Util } from '@antv/g6-core';\nimport { Layout } from '../../layout';\nimport { LayoutWorker } from '../../layout/worker/layout';\nimport { LAYOUT_MESSAGE } from '../../layout/worker/layoutConst';\nimport { gpuDetector } from '../../util/gpu';\nimport { mix, clone } from '@antv/util';\n// eslint-disable-next-line @typescript-eslint/no-implied-eval\nvar mockRaf = function mockRaf(cb) {\n return setTimeout(cb, 16);\n};\nvar mockCaf = function mockCaf(reqId) {\n return clearTimeout(reqId);\n};\nvar helper = {\n // pollyfill\n requestAnimationFrame: function requestAnimationFrame(callback) {\n var fn = typeof window !== 'undefined' ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || mockRaf : mockRaf;\n return fn(callback);\n },\n cancelAnimationFrame: function cancelAnimationFrame(requestId) {\n var fn = typeof window !== 'undefined' ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || mockCaf : mockCaf;\n return fn(requestId);\n }\n};\nvar GPU_LAYOUT_NAMES = ['fruchterman', 'gForce'];\nvar LAYOUT_PIPES_ADJUST_NAMES = ['force', 'grid', 'circular'];\nvar LayoutController = /** @class */function (_super) {\n __extends(LayoutController, _super);\n // the configurations of the layout\n // private layoutCfg: any; // LayoutOptions\n // the type name of the layout\n // private layoutType: string;\n // private data: GraphData;\n // private layoutMethods: typeof Layout;\n function LayoutController(graph) {\n var _this = _super.call(this, graph) || this;\n _this.graph = graph;\n _this.layoutCfg = graph.get('layout') || {};\n _this.layoutType = _this.getLayoutType();\n _this.worker = null;\n _this.workerData = {};\n _this.initLayout();\n return _this;\n }\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.initLayout = function () {\n // no data before rendering\n };\n // get layout worker and create one if not exists\n LayoutController.prototype.getWorker = function () {\n if (this.worker) {\n return this.worker;\n }\n if (typeof Worker === 'undefined') {\n // 如果当前浏览器不支持 web worker,则不使用 web worker\n console.warn('Web worker is not supported in current browser.');\n this.worker = null;\n } else {\n this.worker = LayoutWorker(this.layoutCfg.workerScriptURL);\n }\n return this.worker;\n };\n // stop layout worker\n LayoutController.prototype.stopWorker = function () {\n var workerData = this.workerData;\n if (!this.worker) {\n return;\n }\n this.worker.terminate();\n this.worker = null;\n // 重新开始新的布局之前,先取消之前布局的requestAnimationFrame。\n if (workerData.requestId) {\n helper.cancelAnimationFrame(workerData.requestId);\n workerData.requestId = null;\n }\n if (workerData.requestId2) {\n helper.cancelAnimationFrame(workerData.requestId2);\n workerData.requestId2 = null;\n }\n };\n LayoutController.prototype.execLayoutMethod = function (layoutCfg, order) {\n var _this = this;\n return new Promise(function (reslove, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var graph, layoutType, onTick_1, animate_1, isDefaultAnimateLayout_1, tick, enableTick, layoutMethod, onTick_2, tick, layoutData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n graph = this.graph;\n if (!graph || graph.get('destroyed')) return [2 /*return*/];\n layoutType = layoutCfg.type;\n // 每个布局方法都需要注册\n layoutCfg.onLayoutEnd = function () {\n graph.emit('aftersublayout', {\n type: layoutType\n });\n reslove();\n };\n // 若用户指定开启 gpu,且当前浏览器支持 webgl,且该算法存在 GPU 版本(目前仅支持 fruchterman 和 gForce),使用 gpu 版本的布局\n if (layoutType && this.isGPU) {\n if (!hasGPUVersion(layoutType)) {\n console.warn(\"The '\".concat(layoutType, \"' layout does not support GPU calculation for now, it will run in CPU.\"));\n } else {\n layoutType = \"\".concat(layoutType, \"-gpu\");\n }\n }\n if (Util.isForce(layoutType)) {\n onTick_1 = layoutCfg.onTick, animate_1 = layoutCfg.animate;\n isDefaultAnimateLayout_1 = animate_1 === undefined && (layoutType === 'force' || layoutType === 'force2');\n tick = function tick() {\n if (onTick_1) {\n onTick_1();\n }\n if (animate_1 || isDefaultAnimateLayout_1) graph.refreshPositions();\n };\n layoutCfg.tick = tick;\n } else if (layoutType === 'comboForce' || layoutType === 'comboCombined') {\n layoutCfg.comboTrees = graph.get('comboTrees');\n }\n enableTick = false;\n try {\n layoutMethod = new Layout[layoutType](layoutCfg);\n if (this.layoutMethods[order]) {\n this.layoutMethods[order].destroy();\n }\n this.layoutMethods[order] = layoutMethod;\n } catch (e) {\n console.warn(\"The layout method: '\".concat(layoutType, \"' does not exist! Please specify it first.\"));\n reject();\n }\n // 是否需要迭代的方式完成布局。这里是来自布局对象的实例属性,是由布局的定义者在布局类定义的。\n enableTick = layoutMethod.enableTick;\n if (enableTick) {\n onTick_2 = layoutCfg.onTick;\n tick = function tick() {\n if (onTick_2) {\n onTick_2();\n }\n graph.refreshPositions();\n };\n layoutMethod.tick = tick;\n }\n layoutData = this.filterLayoutData(this.data, layoutCfg);\n addLayoutOrder(layoutData, order);\n layoutMethod.init(layoutData);\n // 若存在节点没有位置信息,且没有设置 layout,在 initPositions 中 random 给出了所有节点的位置,不需要再次执行 random 布局\n // 所有节点都有位置信息,且指定了 layout,则执行布局(代表不是第一次进行布局)\n graph.emit('beforesublayout', {\n type: layoutType\n });\n return [4 /*yield*/, layoutMethod.execute()];\n case 1:\n _a.sent();\n if (layoutMethod.isCustomLayout && layoutCfg.onLayoutEnd) layoutCfg.onLayoutEnd();\n return [2 /*return*/];\n }\n });\n });\n });\n };\n\n LayoutController.prototype.updateLayoutMethod = function (layoutMethod, layoutCfg) {\n var _this = this;\n return new Promise(function (reslove, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var graph, layoutType, onTick_3, animate_2, isDefaultAnimateLayout_2, tick, layoutData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n graph = this.graph;\n layoutType = layoutCfg === null || layoutCfg === void 0 ? void 0 : layoutCfg.type;\n // 每个布局方法都需要注册\n layoutCfg.onLayoutEnd = function () {\n graph.emit('aftersublayout', {\n type: layoutType\n });\n reslove();\n };\n if (Util.isForce(layoutType)) {\n onTick_3 = layoutCfg.onTick, animate_2 = layoutCfg.animate;\n isDefaultAnimateLayout_2 = animate_2 === undefined && (layoutType === 'force' || layoutType === 'force2');\n tick = function tick() {\n onTick_3 === null || onTick_3 === void 0 ? void 0 : onTick_3();\n if (animate_2 || isDefaultAnimateLayout_2) graph.refreshPositions();\n };\n layoutCfg.tick = tick;\n }\n layoutData = this.filterLayoutData(this.data, layoutCfg);\n layoutMethod.init(layoutData);\n layoutMethod.updateCfg(layoutCfg);\n graph.emit('beforesublayout', {\n type: layoutType\n });\n return [4 /*yield*/, layoutMethod.execute()];\n case 1:\n _a.sent();\n if (layoutMethod.isCustomLayout && layoutCfg.onLayoutEnd) layoutCfg.onLayoutEnd();\n return [2 /*return*/];\n }\n });\n });\n });\n };\n /**\n * @param {function} success callback\n * @return {boolean} 是否使用web worker布局\n */\n LayoutController.prototype.layout = function (success) {\n var _this = this;\n var _a;\n var graph = this.graph;\n if (!graph || graph.get('destroyed')) return;\n this.data = this.setDataFromGraph();\n var _b = this.data,\n nodes = _b.nodes,\n hiddenNodes = _b.hiddenNodes;\n if (!nodes) {\n return false;\n }\n var width = graph.get('width');\n var height = graph.get('height');\n var layoutCfg = {};\n Object.assign(layoutCfg, {\n width: width,\n height: height,\n center: [width / 2, height / 2]\n }, this.layoutCfg);\n this.layoutCfg = layoutCfg;\n var layoutType = layoutCfg.type;\n var prevHasNodes = false;\n (_a = this.layoutMethods) === null || _a === void 0 ? void 0 : _a.forEach(function (method) {\n var _a;\n return prevHasNodes = !!((_a = method.nodes) === null || _a === void 0 ? void 0 : _a.length) || prevHasNodes;\n });\n var preLayoutTypes = this.destoryLayoutMethods();\n graph.emit('beforelayout');\n var start = Promise.resolve();\n // 增量情况下(上一次的布局与当前布局一致),上一次有节点,使用 treakInit\n if (prevHasNodes && layoutType && (preLayoutTypes === null || preLayoutTypes === void 0 ? void 0 : preLayoutTypes.length) === 1 && preLayoutTypes[0] === layoutType) {\n this.tweakInit();\n } else {\n // 初始化位置,若配置了 preset,则使用 preset 的参数生成布局作为预布局,否则使用 grid\n start = this.initPositions(layoutCfg.center, nodes);\n }\n // init hidden nodes\n var initHiddenPromise = this.initPositions(layoutCfg.center, hiddenNodes);\n initHiddenPromise.then();\n // 若用户指定开启 gpu,且当前浏览器支持 webgl,且该算法存在 GPU 版本(目前仅支持 fruchterman 和 gForce),使用 gpu 版本的布局\n this.isGPU = getGPUEnabled(layoutCfg, layoutType);\n // 在 onAllLayoutEnd 中执行用户自定义 onLayoutEnd,触发 afterlayout、更新节点位置、fitView/fitCenter、触发 afterrender\n var onLayoutEnd = layoutCfg.onLayoutEnd,\n layoutEndFormatted = layoutCfg.layoutEndFormatted,\n adjust = layoutCfg.adjust;\n if (!layoutEndFormatted) {\n layoutCfg.layoutEndFormatted = true;\n layoutCfg.onAllLayoutEnd = function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // 执行用户自定义 onLayoutEnd\n if (onLayoutEnd) {\n onLayoutEnd(nodes);\n }\n // 更新节点位置\n this.refreshLayout();\n if (!(adjust && layoutCfg.pipes)) return [3 /*break*/, 2];\n return [4 /*yield*/, this.adjustPipesBox(this.data, adjust)];\n case 1:\n _a.sent();\n this.refreshLayout();\n _a.label = 2;\n case 2:\n // 触发 afterlayout\n graph.emit('afterlayout');\n return [2 /*return*/];\n }\n });\n });\n };\n }\n\n this.stopWorker();\n if (layoutCfg.workerEnabled && this.layoutWithWorker(this.data, success)) {\n // 如果启用布局web worker并且浏览器支持web worker,用web worker布局。否则回退到不用web worker布局。\n return true;\n }\n var hasLayout = false;\n if (layoutCfg.type) {\n hasLayout = true;\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.execLayoutMethod(layoutCfg, 0)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n } else if (layoutCfg.pipes) {\n hasLayout = true;\n layoutCfg.pipes.forEach(function (cfg, index) {\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.execLayoutMethod(cfg, index)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n });\n }\n if (hasLayout) {\n // 最后统一在外部调用onAllLayoutEnd\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n // 在执行 execute 后立即执行 success,且在 timeBar 中有 throttle,可以防止 timeBar 监听 afterrender 进行 changeData 后 layout,从而死循环\n // 对于 force 一类布局完成后的 fitView 需要用户自己在 onLayoutEnd 中配置\n if (success) success();\n }).catch(function (error) {\n console.warn('graph layout failed,', error);\n });\n } else {\n // 无布局配置\n graph.refreshPositions();\n success === null || success === void 0 ? void 0 : success();\n }\n return false;\n };\n /**\n * 增量数据初始化位置\n */\n LayoutController.prototype.tweakInit = function () {\n var _a = this,\n data = _a.data,\n graph = _a.graph;\n var nodes = data.nodes,\n edges = data.edges;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) return;\n var positionMap = {};\n nodes.forEach(function (node) {\n var x = node.x,\n y = node.y;\n if (!isNaN(x) && !isNaN(y)) {\n positionMap[node.id] = {\n x: x,\n y: y\n };\n // 有位置信息,则是原有节点,增加 mass\n node.mass = node.mass || 2;\n }\n });\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourcePosition = positionMap[source];\n var targetPosition = positionMap[target];\n if (!sourcePosition && targetPosition) {\n positionMap[source] = {\n x: targetPosition.x + (Math.random() - 0.5) * 80,\n y: targetPosition.y + (Math.random() - 0.5) * 80\n };\n } else if (!targetPosition && sourcePosition) {\n positionMap[target] = {\n x: sourcePosition.x + (Math.random() - 0.5) * 80,\n y: sourcePosition.y + (Math.random() - 0.5) * 80\n };\n }\n });\n var width = graph.get('width');\n var height = graph.get('height');\n nodes.forEach(function (node) {\n var position = positionMap[node.id] || {\n x: width / 2 + (Math.random() - 0.5) * 20,\n y: height / 2 + (Math.random() - 0.5) * 20\n };\n node.x = position.x;\n node.y = position.y;\n });\n };\n LayoutController.prototype.initWithPreset = function (hasPresetCallback, noPresetCallback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var _a, layoutCfg, data, preset, isGPU, layoutType, presetLayout;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = this, layoutCfg = _a.layoutCfg, data = _a.data;\n preset = layoutCfg.preset;\n if (!(preset === null || preset === void 0 ? void 0 : preset.type) || !Layout[preset === null || preset === void 0 ? void 0 : preset.type]) {\n noPresetCallback === null || noPresetCallback === void 0 ? void 0 : noPresetCallback();\n resolve();\n return [2 /*return*/, false];\n }\n isGPU = getGPUEnabled(preset, preset.type);\n layoutType = isGPU ? \"\".concat(preset.type, \"-gpu\") : preset.type;\n presetLayout = new Layout[layoutType](preset);\n delete layoutCfg.preset;\n presetLayout.init(data);\n return [4 /*yield*/, presetLayout.execute()];\n case 1:\n _b.sent();\n hasPresetCallback === null || hasPresetCallback === void 0 ? void 0 : hasPresetCallback();\n resolve();\n return [2 /*return*/, true];\n }\n });\n });\n });\n };\n /**\n * layout with web worker\n * @param {object} data graph data\n * @return {boolean} 是否支持web worker\n */\n LayoutController.prototype.layoutWithWorker = function (data, success) {\n var _this = this;\n var _a = this,\n layoutCfg = _a.layoutCfg,\n graph = _a.graph;\n var worker = this.getWorker();\n // 每次worker message event handler调用之间的共享数据,会被修改。\n var workerData = this.workerData;\n if (!worker) {\n return false;\n }\n workerData.requestId = null;\n workerData.requestId2 = null;\n workerData.currentTick = null;\n workerData.currentTickData = null;\n graph.emit('beforelayout');\n var start = Promise.resolve();\n var hasLayout = false;\n if (layoutCfg.type) {\n hasLayout = true;\n start = start.then(function () {\n return _this.runWebworker(worker, data, layoutCfg);\n });\n } else if (layoutCfg.pipes) {\n hasLayout = true;\n var _loop_1 = function _loop_1(cfg) {\n start = start.then(function () {\n return _this.runWebworker(worker, data, cfg);\n });\n };\n for (var _i = 0, _b = layoutCfg.pipes; _i < _b.length; _i++) {\n var cfg = _b[_i];\n _loop_1(cfg);\n }\n }\n if (hasLayout) {\n // 最后统一在外部调用onAllLayoutEnd\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n success === null || success === void 0 ? void 0 : success();\n }).catch(function (error) {\n console.error('layout failed', error);\n });\n }\n return true;\n };\n LayoutController.prototype.runWebworker = function (worker, allData, layoutCfg) {\n var _this = this;\n var isGPU = this.isGPU;\n var data = this.filterLayoutData(allData, layoutCfg);\n var nodes = data.nodes,\n edges = data.edges;\n var offScreenCanvas = document.createElement('canvas');\n var gpuWorkerAbility = isGPU && typeof window !== 'undefined' &&\n // eslint-disable-next-line @typescript-eslint/dot-notation\n window.navigator && !navigator[\"gpu\"] &&\n // WebGPU 还不支持 OffscreenCanvas\n 'OffscreenCanvas' in window && 'transferControlToOffscreen' in offScreenCanvas;\n // NOTE: postMessage的message参数里面不能包含函数,否则postMessage会报错,\n // 例如:'function could not be cloned'。\n // 详情参考:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n // 所以这里需要把过滤layoutCfg里的函数字段过滤掉。\n var filteredLayoutCfg = filterObject(layoutCfg, function (value) {\n return typeof value !== 'function';\n });\n if (!gpuWorkerAbility) {\n worker.postMessage({\n type: LAYOUT_MESSAGE.RUN,\n nodes: nodes,\n edges: edges,\n layoutCfg: filteredLayoutCfg\n });\n } else {\n var offscreen = offScreenCanvas.transferControlToOffscreen();\n // filteredLayoutCfg.canvas = offscreen;\n filteredLayoutCfg.type = \"\".concat(filteredLayoutCfg.type, \"-gpu\");\n worker.postMessage({\n type: LAYOUT_MESSAGE.GPURUN,\n nodes: nodes,\n edges: edges,\n layoutCfg: filteredLayoutCfg,\n canvas: offscreen\n }, [offscreen]);\n }\n return new Promise(function (reslove, reject) {\n worker.onmessage = function (event) {\n _this.handleWorkerMessage(reslove, reject, event, data, layoutCfg);\n };\n });\n };\n // success callback will be called when updating graph positions for the first time.\n LayoutController.prototype.handleWorkerMessage = function (reslove, reject, event, data, layoutCfg) {\n var _a = this,\n graph = _a.graph,\n workerData = _a.workerData;\n var eventData = event.data;\n var type = eventData.type;\n var onTick = function onTick() {\n if (layoutCfg.onTick) {\n layoutCfg.onTick();\n }\n };\n switch (type) {\n case LAYOUT_MESSAGE.TICK:\n workerData.currentTick = eventData.currentTick;\n workerData.currentTickData = eventData;\n if (!workerData.requestId) {\n workerData.requestId = helper.requestAnimationFrame(function requestId() {\n updateLayoutPosition(data, eventData);\n graph.refreshPositions();\n onTick();\n if (eventData.currentTick === eventData.totalTicks) {\n // 如果是最后一次tick\n reslove();\n } else if (workerData.currentTick === eventData.totalTicks) {\n // 注意这里workerData.currentTick可能已经不再是前面赋值时候的值了,\n // 因为在requestAnimationFrame等待时间里,可能产生新的tick。\n // 如果当前tick不是最后一次tick,并且所有的tick消息都已发出来了,那么需要用最后一次tick的数据再刷新一次。\n workerData.requestId2 = helper.requestAnimationFrame(function requestId2() {\n updateLayoutPosition(data, workerData.currentTickData);\n graph.refreshPositions();\n workerData.requestId2 = null;\n onTick();\n reslove();\n });\n }\n workerData.requestId = null;\n });\n }\n break;\n case LAYOUT_MESSAGE.END:\n // 如果没有tick消息(非力导布局)\n if (workerData.currentTick == null) {\n updateLayoutPosition(data, eventData);\n reslove();\n }\n break;\n case LAYOUT_MESSAGE.GPUEND:\n // 如果没有tick消息(非力导布局)\n if (workerData.currentTick == null) {\n updateGPUWorkerLayoutPosition(data, eventData);\n reslove();\n }\n break;\n case LAYOUT_MESSAGE.ERROR:\n console.warn('Web-Worker layout error!', eventData.message);\n reject();\n break;\n default:\n reject();\n break;\n }\n };\n // 更新布局参数\n LayoutController.prototype.updateLayoutCfg = function (cfg) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n layoutMethods = _a.layoutMethods;\n if (!graph || graph.get('destroyed')) return;\n // disableTriggerLayout 不触发重新布局,仅更新参数\n var disableTriggerLayout = cfg.disableTriggerLayout,\n otherCfg = __rest(cfg, [\"disableTriggerLayout\"]);\n var layoutCfg = mix({}, this.layoutCfg, otherCfg);\n this.layoutCfg = layoutCfg;\n // disableTriggerLayout 不触发重新布局,仅更新参数\n if (disableTriggerLayout) {\n return;\n }\n if (!(layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length)) {\n this.layout();\n return;\n }\n this.data = this.setDataFromGraph();\n this.stopWorker();\n if (otherCfg.workerEnabled && this.layoutWithWorker(this.data, null)) {\n // 如果启用布局web worker并且浏览器支持web worker,用web worker布局。否则回退到不用web worker布局。\n return;\n }\n graph.emit('beforelayout');\n var start = Promise.resolve();\n var hasLayout = false;\n if ((layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length) === 1) {\n hasLayout = true;\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.updateLayoutMethod(layoutMethods[0], layoutCfg)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n } else if (layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length) {\n hasLayout = true;\n layoutMethods.forEach(function (layoutMethod, index) {\n var currentCfg = layoutCfg.pipes[index];\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.updateLayoutMethod(layoutMethod, currentCfg)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n });\n }\n if (hasLayout) {\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n }).catch(function (error) {\n console.warn('layout failed', error);\n });\n }\n };\n LayoutController.prototype.adjustPipesBox = function (data, adjust) {\n var _this = this;\n return new Promise(function (resolve) {\n var nodes = data.nodes;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n resolve();\n }\n if (!LAYOUT_PIPES_ADJUST_NAMES.includes(adjust)) {\n console.warn(\"The adjust type \".concat(adjust, \" is not supported yet, please assign it with 'force', 'grid', or 'circular'.\"));\n resolve();\n }\n var layoutCfg = {\n center: _this.layoutCfg.center,\n nodeSize: function nodeSize(d) {\n return Math.max(d.height, d.width);\n },\n preventOverlap: true,\n onLayoutEnd: function onLayoutEnd() {}\n };\n // 计算出大单元\n var _a = _this.getLayoutBBox(nodes),\n groupNodes = _a.groupNodes,\n layoutNodes = _a.layoutNodes;\n var preNodes = clone(layoutNodes);\n // 根据大单元坐标的变化,调整这里面每个小单元nodes\n layoutCfg.onLayoutEnd = function () {\n layoutNodes === null || layoutNodes === void 0 ? void 0 : layoutNodes.forEach(function (ele, index) {\n var _a, _b, _c;\n var dx = ele.x - ((_a = preNodes[index]) === null || _a === void 0 ? void 0 : _a.x);\n var dy = ele.y - ((_b = preNodes[index]) === null || _b === void 0 ? void 0 : _b.y);\n (_c = groupNodes[index]) === null || _c === void 0 ? void 0 : _c.forEach(function (n) {\n n.x += dx;\n n.y += dy;\n });\n });\n resolve();\n };\n var layoutMethod = new Layout[adjust](layoutCfg);\n layoutMethod.layout({\n nodes: layoutNodes\n });\n });\n };\n LayoutController.prototype.destroy = function () {\n this.destoryLayoutMethods();\n var worker = this.worker;\n if (worker) {\n worker.terminate();\n this.worker = null;\n }\n this.destroyed = true;\n this.graph.set('layout', undefined);\n this.layoutCfg = undefined;\n this.layoutType = undefined;\n this.layoutMethods = undefined;\n this.graph = null;\n };\n return LayoutController;\n}(AbstractLayout);\nexport default LayoutController;\nfunction updateLayoutPosition(data, layoutData) {\n var nodes = data.nodes;\n var layoutNodes = layoutData.nodes;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n node.x = layoutNodes[i].x;\n node.y = layoutNodes[i].y;\n }\n}\nfunction filterObject(collection, callback) {\n var result = {};\n if (collection && _typeof(collection) === 'object') {\n Object.keys(collection).forEach(function (key) {\n if (collection.hasOwnProperty(key) && callback(collection[key])) {\n result[key] = collection[key];\n }\n });\n return result;\n }\n return collection;\n}\nfunction updateGPUWorkerLayoutPosition(data, layoutData) {\n var nodes = data.nodes;\n var vertexEdgeData = layoutData.vertexEdgeData;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var x = vertexEdgeData[4 * i];\n var y = vertexEdgeData[4 * i + 1];\n node.x = x;\n node.y = y;\n }\n}\nfunction addLayoutOrder(data, order) {\n var _a;\n if (!((_a = data === null || data === void 0 ? void 0 : data.nodes) === null || _a === void 0 ? void 0 : _a.length)) {\n return;\n }\n var nodes = data.nodes;\n nodes.forEach(function (node) {\n node.layoutOrder = order;\n });\n}\nfunction hasGPUVersion(layoutName) {\n return GPU_LAYOUT_NAMES.includes(layoutName);\n}\nfunction getGPUEnabled(layoutCfg, layoutType) {\n var type = layoutType;\n // 防止用户直接用 -gpu 结尾指定布局\n if (layoutType && layoutType.split('-')[1] === 'gpu') {\n type = layoutType.split('-')[0];\n layoutCfg.gpuEnabled = true;\n }\n var enableGPU = false;\n if (layoutCfg.gpuEnabled) {\n enableGPU = true;\n // 打开下面语句将会导致 webworker 报找不到 window\n if (!gpuDetector().webgl) {\n console.warn(\"Your browser does not support webGL or GPGPU. The layout will run in CPU.\");\n enableGPU = false;\n }\n }\n // the layout does not support GPU, will run in CPU\n if (enableGPU && !hasGPUVersion(type)) {\n console.warn(\"The '\".concat(type, \"' layout does not support GPU calculation for now, it will run in CPU.\"));\n enableGPU = false;\n }\n return enableGPU;\n}","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { AbstractGraph } from '@antv/g6-core';\nimport { ext } from '@antv/matrix-util';\nimport { clone, deepMix, each, isNumber, isString } from '@antv/util';\nimport { createDom } from '@antv/dom-util';\nimport Global from '../global';\nimport { cloneGElement } from '../util/image';\nimport { EventController, LayoutController } from './controller';\nvar transform = ext.transform;\nvar SVG = 'svg';\nvar Graph = /** @class */function (_super) {\n __extends(Graph, _super);\n function Graph(cfg) {\n var _this = _super.call(this, cfg) || this;\n var defaultNode = _this.get('defaultNode');\n if (!defaultNode) {\n _this.set('defaultNode', {\n type: 'circle'\n });\n }\n if (!defaultNode.type) {\n defaultNode.type = 'circle';\n _this.set('defaultNode', defaultNode);\n }\n _this.destroyed = false;\n return _this;\n }\n Graph.prototype.initLayoutController = function () {\n var layoutController = new LayoutController(this);\n this.set({\n layoutController: layoutController\n });\n };\n Graph.prototype.initEventController = function () {\n var eventController = new EventController(this);\n this.set({\n eventController: eventController\n });\n };\n Graph.prototype.initCanvas = function () {\n var container = this.get('container');\n if (typeof container === 'string') {\n container = document.getElementById(container);\n this.set('container', container);\n }\n if (!container) {\n throw new Error('invalid container');\n }\n var clientWidth = container.clientWidth,\n clientHeight = container.clientHeight;\n var width = this.get('width') || clientWidth;\n var height = this.get('height') || clientHeight;\n if (!this.get('width') && !this.get('height')) {\n this.set('width', clientWidth);\n this.set('height', clientHeight);\n }\n var renderer = this.get('renderer');\n var canvas;\n if (renderer === SVG) {\n canvas = new GSVGCanvas({\n container: container,\n width: width,\n height: height\n });\n } else {\n var canvasCfg = {\n container: container,\n width: width,\n height: height\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n }\n this.set('canvas', canvas);\n };\n Graph.prototype.initPlugins = function () {\n var self = this;\n each(self.get('plugins'), function (plugin) {\n if (!plugin.destroyed && plugin.initPlugin) {\n plugin.initPlugin(self);\n }\n });\n };\n /**\n * 增加图片下载水印功能\n */\n Graph.prototype.downloadImageWatermark = function (watermarker, context, width, height) {\n return __awaiter(this, void 0, void 0, function () {\n var watermarkStr, watermarkbase64, img;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n watermarkStr = watermarker.style.backgroundImage;\n watermarkbase64 = watermarkStr.slice(5, watermarkStr.length - 2);\n img = new Image();\n img.src = watermarkbase64;\n return [4 /*yield*/, new Promise(function (resolve) {\n img.onload = function () {\n var pat = context.createPattern(img, 'repeat');\n context.rect(0, 0, width, height);\n context.fillStyle = pat;\n context.fill();\n resolve('');\n };\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * 用于生成图片 (异步callback)\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n * @return {string} 图片 dataURL\n */\n Graph.prototype.asyncToDataUrl = function (type, backgroundColor, callback, widths, heights, vCanvasEl) {\n var _this = this;\n var watermarker = document.querySelector('.g6-graph-watermarker');\n var canvas = this.get('canvas');\n var renderer = canvas.getRenderer();\n var canvasDom = vCanvasEl || canvas.get('el');\n var dataURL = '';\n if (!type) type = 'image/png';\n setTimeout(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var cloneNode, svgDocType, svgDoc, svgData, imageData, context, width, height, compositeOperation, pixelRatio;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(renderer === 'svg')) return [3 /*break*/, 1];\n cloneNode = canvasDom.cloneNode(true);\n svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n return [3 /*break*/, 4];\n case 1:\n imageData = void 0;\n context = canvasDom.getContext('2d');\n width = widths || this.get('width');\n height = heights || this.get('height');\n compositeOperation = void 0;\n if (!watermarker) return [3 /*break*/, 3];\n return [4 /*yield*/, this.downloadImageWatermark(watermarker, context, width, height)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n if (backgroundColor) {\n pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio : 1;\n try {\n imageData = context.getImageData(0, 0, width * pixelRatio, height * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, width, height);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = canvasDom.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, width, height);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n _a.label = 4;\n case 4:\n if (callback) callback(dataURL);\n return [2 /*return*/];\n }\n });\n });\n }, 16);\n };\n /**\n * 返回可见区域的图的 dataUrl,用于生成图片\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n * @return {string} 图片 dataURL\n */\n Graph.prototype.toDataURL = function (type, backgroundColor) {\n var canvas = this.get('canvas');\n var renderer = canvas.getRenderer();\n var canvasDom = canvas.get('el');\n if (!type) type = 'image/png';\n var dataURL = '';\n if (renderer === 'svg') {\n var cloneNode = canvasDom.cloneNode(true);\n var svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n var svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n } else {\n var imageData = void 0;\n var context = canvasDom.getContext('2d');\n var width = Math.max(this.get('width'), 500);\n var height = Math.max(this.get('height'), 500);\n var compositeOperation = void 0;\n if (backgroundColor) {\n var pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;\n try {\n imageData = context.getImageData(0, 0, width * pixelRatio, height * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, width, height);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = canvasDom.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, width, height);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n }\n return dataURL;\n };\n /**\n * 返回整个图(包括超出可见区域的部分)的 dataUrl,用于生成图片\n * @param {Function} callback 异步生成 dataUrl 完成后的回调函数,在这里处理生成的 dataUrl 字符串\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {Object} imageConfig 图片配置项,包括背景色和上下左右的 padding\n */\n Graph.prototype.toFullDataURL = function (callback, type, imageConfig) {\n var bbox = this.get('group').getCanvasBBox();\n var height = bbox.height;\n var width = bbox.width;\n var renderer = this.get('renderer');\n var vContainerDOM = createDom('
');\n var backgroundColor = imageConfig ? imageConfig.backgroundColor : undefined;\n var padding = imageConfig ? imageConfig.padding : undefined;\n if (!padding) padding = [0, 0, 0, 0];else if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var vHeight = height + padding[0] + padding[2];\n var vWidth = width + padding[1] + padding[3];\n var canvasOptions = {\n container: vContainerDOM,\n height: vHeight,\n width: vWidth,\n quickHit: true\n };\n var vCanvas = renderer === 'svg' ? new GSVGCanvas(canvasOptions) : new GCanvas(canvasOptions);\n var group = this.get('group');\n var vGroup = group.clone();\n var matrix = clone(vGroup.getMatrix());\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var centerX = (bbox.maxX + bbox.minX) / 2;\n var centerY = (bbox.maxY + bbox.minY) / 2;\n matrix = transform(matrix, [['t', -centerX, -centerY], ['t', width / 2 + padding[3], height / 2 + padding[0]]]);\n vGroup.resetMatrix();\n vGroup.setMatrix(matrix);\n vCanvas.add(vGroup);\n var vCanvasEl = vCanvas.get('el');\n var dataURL = '';\n if (!type) type = 'image/png';\n setTimeout(function () {\n if (renderer === 'svg') {\n var cloneNode = vCanvasEl.cloneNode(true);\n var svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n var svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n } else {\n var imageData = void 0;\n var context = vCanvasEl.getContext('2d');\n var compositeOperation = void 0;\n if (backgroundColor) {\n var pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio : 1;\n try {\n imageData = context.getImageData(0, 0, vWidth * pixelRatio, vHeight * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, vWidth, vHeight);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = vCanvasEl.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, vWidth, vHeight);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n }\n if (callback) callback(dataURL);\n }, 16);\n };\n /**\n * 导出包含全图的图片\n * @param {String} name 图片的名称\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {Object} imageConfig 图片配置项,包括背景色和上下左右的 padding\n */\n Graph.prototype.downloadFullImage = function (name, type, imageConfig) {\n var _this = this;\n var bbox = this.get('group').getCanvasBBox();\n var height = bbox.height;\n var width = bbox.width;\n var renderer = this.get('renderer');\n var vContainerDOM = createDom('
');\n var watermarker = document.querySelector('.g6-graph-watermarker');\n var backgroundColor = imageConfig ? imageConfig.backgroundColor : undefined;\n var padding = imageConfig ? imageConfig.padding : undefined;\n if (!padding) padding = [0, 0, 0, 0];else if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var vHeight = height + padding[0] + padding[2];\n var vWidth = width + padding[1] + padding[3];\n if (watermarker) {\n var _a = this.get('graphWaterMarker').cfg || {},\n wmWidth = _a.width,\n wmHeight = _a.height;\n vHeight = Math.ceil(vHeight / wmHeight) * wmHeight;\n vWidth = Math.ceil(vWidth / wmWidth) * wmWidth;\n }\n var canvasOptions = {\n container: vContainerDOM,\n height: vHeight,\n width: vWidth\n };\n var vCanvas = renderer === 'svg' ? new GSVGCanvas(canvasOptions) : new GCanvas(canvasOptions);\n var group = this.get('group');\n // clone group and clone image shape's clip\n var vGroup = cloneGElement(group);\n var matrix = clone(vGroup.getMatrix());\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var centerX = (bbox.maxX + bbox.minX) / 2;\n var centerY = (bbox.maxY + bbox.minY) / 2;\n matrix = transform(matrix, [['t', -centerX, -centerY], ['t', width / 2 + padding[3], height / 2 + padding[0]]]);\n vGroup.resetMatrix();\n vGroup.setMatrix(matrix);\n vCanvas.add(vGroup);\n var vCanvasEl = vCanvas.get('el');\n if (!type) type = 'image/png';\n this.asyncToDataUrl(type, backgroundColor, function (dataURL) {\n var link = document.createElement('a');\n var fileName = (name || 'graph') + (renderer === 'svg' ? '.svg' : \".\".concat(type.split('/')[1]));\n _this.dataURLToImage(dataURL, renderer, link, fileName);\n var e = document.createEvent('MouseEvents');\n e.initEvent('click', false, false);\n link.dispatchEvent(e);\n }, vWidth, vHeight, vCanvasEl);\n };\n /**\n * 画布导出图片,图片仅包含画布可见区域部分内容\n * @param {String} name 图片的名称\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n */\n Graph.prototype.downloadImage = function (name, type, backgroundColor) {\n var _this = this;\n var self = this;\n self.stopAnimate();\n var canvas = self.get('canvas');\n var renderer = canvas.getRenderer();\n if (!type) type = 'image/png';\n var fileName = (name || 'graph') + (renderer === 'svg' ? '.svg' : \".\".concat(type.split('/')[1]));\n var link = document.createElement('a');\n self.asyncToDataUrl(type, backgroundColor, function (dataURL) {\n _this.dataURLToImage(dataURL, renderer, link, fileName);\n var e = document.createEvent('MouseEvents');\n e.initEvent('click', false, false);\n link.dispatchEvent(e);\n });\n };\n Graph.prototype.dataURLToImage = function (dataURL, renderer, link, fileName) {\n if (!dataURL || dataURL === 'data:') {\n console.error('Download image failed. The graph is too large or there is invalid attribute values in graph items');\n return;\n }\n if (typeof window !== 'undefined') {\n if (window.Blob && window.URL && renderer !== 'svg') {\n var arr = dataURL.split(',');\n var mime = '';\n if (arr && arr.length > 0) {\n var match = arr[0].match(/:(.*?);/);\n // eslint-disable-next-line prefer-destructuring\n if (match && match.length >= 2) mime = match[1];\n }\n var bstr = atob(arr[1]);\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blobObj_1 = new Blob([u8arr], {\n type: mime\n });\n if (window.navigator.msSaveBlob) {\n window.navigator.msSaveBlob(blobObj_1, fileName);\n } else {\n link.addEventListener('click', function () {\n link.download = fileName;\n link.href = window.URL.createObjectURL(blobObj_1);\n });\n }\n } else {\n link.addEventListener('click', function () {\n link.download = fileName;\n link.href = dataURL;\n });\n }\n }\n };\n /**\n * 添加插件\n * @param {object} plugin 插件实例\n */\n Graph.prototype.addPlugin = function (plugin) {\n var self = this;\n if (plugin.destroyed) {\n return;\n }\n self.get('plugins').push(plugin);\n plugin.initPlugin(self);\n };\n /**\n * 添加插件\n * @param {object} plugin 插件实例\n */\n Graph.prototype.removePlugin = function (plugin) {\n var plugins = this.get('plugins');\n var index = plugins.indexOf(plugin);\n if (index >= 0) {\n plugin.destroyPlugin();\n plugins.splice(index, 1);\n }\n };\n /**\n * 设置图片水印\n * @param {string} imgURL 图片水印的url地址\n * @param {WaterMarkerConfig} config 文本水印的配置项\n */\n Graph.prototype.setImageWaterMarker = function (imgURL, config) {\n if (imgURL === void 0) {\n imgURL = Global.waterMarkerImage;\n }\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n var canvas = this.get('graphWaterMarker');\n var waterMarkerConfig = deepMix({}, Global.imageWaterMarkerConfig, config);\n var width = waterMarkerConfig.width,\n height = waterMarkerConfig.height,\n compatible = waterMarkerConfig.compatible,\n image = waterMarkerConfig.image;\n if (!imgURL) {\n var dom = compatible ? container : document.querySelector('.g6-graph-watermarker');\n if (dom) dom.style.cssText = undefined;\n if (canvas) canvas.clear();\n return;\n }\n if (!canvas) {\n var canvasCfg = {\n container: container,\n width: width,\n height: height,\n capture: false\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n this.set('graphWaterMarker', canvas);\n } else {\n canvas.clear();\n }\n canvas.get('el').style.display = 'none';\n var ctx = canvas.get('context');\n var rotate = image.rotate,\n x = image.x,\n y = image.y;\n // 旋转20度\n ctx.rotate(-rotate * Math.PI / 180);\n var img = new Image();\n img.crossOrigin = 'anonymous';\n img.src = imgURL;\n img.onload = function () {\n ctx.drawImage(img, x, y, image.width, image.height);\n // 恢复旋转角度\n ctx.rotate(rotate * Math.PI / 180);\n // 默认按照现代浏览器处理\n if (!compatible) {\n var box = document.querySelector('.g6-graph-watermarker');\n if (!box) {\n box = document.createElement('div');\n box.className = 'g6-graph-watermarker';\n }\n box.className = 'g6-graph-watermarker';\n if (!canvas.destroyed) {\n box.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;z-index:-1;\");\n container.appendChild(box);\n }\n } else {\n // 当需要兼容不支持 pointer-events属性的浏览器时,将 compatible 设置为 true\n container.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;\");\n }\n };\n };\n /**\n * 设置文本水印\n * @param {string[]} texts 水印的文本内容\n * @param {WaterMarkerConfig} config 文本水印的配置项\n */\n Graph.prototype.setTextWaterMarker = function (texts, config) {\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n var canvas = this.get('graphWaterMarker');\n var waterMarkerConfig = deepMix({}, Global.textWaterMarkerConfig, config);\n var width = waterMarkerConfig.width,\n height = waterMarkerConfig.height,\n compatible = waterMarkerConfig.compatible,\n text = waterMarkerConfig.text;\n if (!(texts === null || texts === void 0 ? void 0 : texts.length)) {\n var dom = compatible ? container : document.querySelector('.g6-graph-watermarker');\n if (dom) dom.style.cssText = undefined;\n if (canvas) canvas.clear();\n return;\n }\n if (!canvas) {\n var canvasCfg = {\n container: container,\n width: width,\n height: height,\n capture: false\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n this.set('graphWaterMarker', canvas);\n } else {\n canvas.clear();\n }\n canvas.get('el').style.display = 'none';\n var ctx = canvas.get('context');\n var rotate = text.rotate,\n fill = text.fill,\n fontFamily = text.fontFamily,\n fontSize = text.fontSize,\n baseline = text.baseline,\n x = text.x,\n y = text.y,\n lineHeight = text.lineHeight;\n // 旋转20度\n ctx.rotate(-rotate * Math.PI / 180);\n // 设置文字样式\n ctx.font = \"\".concat(fontSize, \"px \").concat(fontFamily);\n // 设置文字颜色\n ctx.fillStyle = fill;\n ctx.textBaseline = baseline;\n var displayTexts = isString(texts) ? [texts] : texts;\n for (var i = displayTexts.length - 1; i >= 0; i--) {\n // 将文字绘制到画布\n ctx.fillText(displayTexts[i], x, y + i * lineHeight);\n }\n // 恢复旋转角度\n ctx.rotate(rotate * Math.PI / 180);\n // 默认按照现代浏览器处理\n if (!compatible) {\n var box = document.querySelector('.g6-graph-watermarker');\n if (!box) {\n box = document.createElement('div');\n box.className = 'g6-graph-watermarker';\n }\n box.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;z-index:99;\");\n container.appendChild(box);\n } else {\n // 当需要兼容不支持 pointer-events属性的浏览器时,将 compatible 设置为 true\n container.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;\");\n }\n };\n /**\n * 销毁画布\n */\n Graph.prototype.destroy = function () {\n var _a, _b, _c, _d;\n each(this.get('plugins'), function (plugin) {\n plugin.destroyPlugin();\n });\n // destroy tooltip doms, removed when upgrade G6 4.0\n var tooltipDOMs = this.get('tooltips');\n if (tooltipDOMs) {\n for (var i = 0; i < tooltipDOMs.length; i++) {\n var container = tooltipDOMs[i];\n if (!container) continue;\n var parent_1 = container.parentElement;\n if (!parent_1) continue;\n parent_1.removeChild(container);\n }\n }\n (_a = this.get('eventController')) === null || _a === void 0 ? void 0 : _a.destroy();\n (_b = this.get('layoutController')) === null || _b === void 0 ? void 0 : _b.destroy();\n // this.get('eventController').destroy();\n // this.get('itemController').destroy();\n // this.get('modeController').destroy();\n // this.get('viewController').destroy();\n // this.get('stateController').destroy();\n // this.get('canvas').destroy();\n (_c = this.get('graphWaterMarker')) === null || _c === void 0 ? void 0 : _c.destroy();\n (_d = document.querySelector('.g6-graph-watermarker')) === null || _d === void 0 ? void 0 : _d.remove();\n _super.prototype.destroy.call(this);\n };\n return Graph;\n}(AbstractGraph);\nexport default Graph;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * 递归进行深拷贝. 模拟还原 JSON.parse + JSON.stringify\n */\nfunction traverseClone(obj, hash) {\n if (hash === void 0) {\n hash = new WeakMap();\n }\n if (obj === null) return obj;\n if (obj instanceof Date) return new Date(obj);\n if (obj instanceof RegExp) return new RegExp(obj);\n // 可能是对象或者普通的值 如果是函数的话是不需要深拷贝\n if (_typeof(obj) !== 'object') return obj;\n // 对象分为两种,一种是数组一种是普通的对象\n if (hash.get(obj)) return hash.get(obj);\n var cloneObj = Array.isArray(obj) ? [] : {};\n // 找到的是所属于自己的属性才拷贝\n hash.set(obj, cloneObj);\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] !== undefined) {\n // 实现一个递归拷贝\n cloneObj[key] = traverseClone(obj[key], hash);\n }\n }\n return cloneObj;\n}\nexport function deepClone(data) {\n try {\n return structuredClone(data);\n } catch (err) {\n return traverseClone(data);\n }\n}","import { __extends } from \"tslib\";\nimport Hierarchy from '@antv/hierarchy';\nimport { each, isObject, isString, clone } from '@antv/util';\nimport Util from '../util';\nimport { deepClone } from '../util/deepClone';\nimport Graph from './graph';\nvar radialLayout = Util.radialLayout,\n traverseTree = Util.traverseTree;\nvar TreeGraph = /** @class */function (_super) {\n __extends(TreeGraph, _super);\n function TreeGraph(cfg) {\n var _this = _super.call(this, cfg) || this;\n _this.layoutAnimating = false;\n // 用于缓存动画结束后需要删除的节点\n _this.set('removeList', []);\n _this.set('layoutMethod', _this.getLayout());\n return _this;\n }\n /**\n * 通过 Layout 配置获取布局配置\n */\n TreeGraph.prototype.getLayout = function () {\n var layout = this.get('layout');\n if (!layout) {\n return null;\n }\n if (typeof layout === 'function') {\n return layout;\n }\n if (!layout.type) {\n layout.type = 'dendrogram';\n }\n if (!layout.direction) {\n layout.direction = layout.type === 'indented' ? 'LR' : 'TB';\n }\n if (layout.radial) {\n return function (data) {\n var layoutData = Hierarchy[layout.type](data, layout);\n radialLayout(layoutData);\n return layoutData;\n };\n }\n return function (data) {\n return Hierarchy[layout.type](data, layout);\n };\n };\n /**\n * 返回指定节点在树图数据中的索引\n * @param children 树图数据\n * @param child 树图中某一个 Item 的数据\n */\n TreeGraph.indexOfChild = function (children, id) {\n var index = -1;\n // eslint-disable-next-line consistent-return\n each(children, function (former, i) {\n if (id === former.id) {\n index = i;\n return false;\n }\n });\n return index;\n };\n TreeGraph.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // 树图默认打开动画\n cfg.animate = true;\n return cfg;\n };\n /**\n * 向🌲树中添加数据\n * @param treeData 树图数据\n * @param parent 父节点实例\n * @param animate 是否开启动画\n */\n TreeGraph.prototype.innerAddChild = function (treeData, parent, animate) {\n var self = this;\n var model = treeData.data;\n if (model) {\n // model 中应存储真实的数据,特别是真实的 children\n model.x = treeData.x;\n model.y = treeData.y;\n model.depth = treeData.depth;\n }\n var node = self.addItem('node', model, false);\n if (parent) {\n node.set('parent', parent);\n if (animate) {\n var origin_1 = parent.get('originAttrs');\n if (origin_1) {\n node.set('originAttrs', origin_1);\n } else {\n var parentModel = parent.getModel();\n node.set('originAttrs', {\n x: parentModel.x,\n y: parentModel.y\n });\n }\n }\n var childrenList = parent.get('children');\n if (!childrenList) {\n parent.set('children', [node]);\n } else {\n childrenList.push(node);\n }\n self.addItem('edge', {\n source: parent.get('id'),\n target: node.get('id'),\n id: \"\".concat(parent.get('id'), \":\").concat(node.get('id'))\n }, false);\n }\n // 渲染到视图上应参考布局的children, 避免多绘制了收起的节点\n each(treeData.children || [], function (child) {\n self.innerAddChild(child, node, animate);\n });\n self.emit('afteraddchild', {\n item: node,\n parent: parent\n });\n return node;\n };\n /**\n * 将数据上的变更转换到视图上\n * @param data\n * @param parent\n * @param animate\n */\n TreeGraph.prototype.innerUpdateChild = function (data, parent, animate) {\n var self = this;\n var current = self.findById(data.id);\n // 若子树不存在,整体添加即可\n if (!current) {\n self.innerAddChild(data, parent, animate);\n return;\n }\n // 更新新节点下所有子节点\n each(data.children || [], function (child) {\n self.innerUpdateChild(child, current, animate);\n });\n // 用现在节点的children实例来删除移除的子节点\n var children = current.get('children');\n if (children) {\n var len = children.length;\n if (len > 0) {\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i].getModel();\n if (TreeGraph.indexOfChild(data.children || [], child.id) === -1) {\n self.innerRemoveChild(child.id, {\n x: data.x,\n y: data.y\n }, animate);\n // 更新父节点下缓存的子节点 item 实例列表\n children.splice(i, 1);\n }\n }\n }\n }\n var oriX;\n var oriY;\n if (current.get('originAttrs')) {\n oriX = current.get('originAttrs').x;\n oriY = current.get('originAttrs').y;\n }\n var model = current.getModel();\n if (animate) {\n // 如果有动画,先缓存节点运动再更新节点\n current.set('originAttrs', {\n x: model.x,\n y: model.y\n });\n }\n current.set('model', Object.assign(model, data.data));\n if (oriX !== data.x || oriY !== data.y) {\n current.updatePosition({\n x: data.x,\n y: data.y\n });\n }\n };\n /**\n * 删除子节点Item对象\n * @param id\n * @param to\n * @param animate\n */\n TreeGraph.prototype.innerRemoveChild = function (id, to, animate) {\n var self = this;\n var node = self.findById(id);\n if (!node) {\n return;\n }\n each(node.get('children'), function (child) {\n self.innerRemoveChild(child.getModel().id, to, animate);\n });\n if (animate) {\n var model = node.getModel();\n node.set('to', to);\n node.set('originAttrs', {\n x: model.x,\n y: model.y\n });\n self.get('removeList').push(node);\n } else {\n self.removeItem(node, false);\n }\n };\n /**\n * 更新数据模型,差量更新并重新渲染\n * @param {object} data 数据模型\n */\n TreeGraph.prototype.changeData = function (data, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 更改数据源后,取消所有状态\n this.getNodes().map(function (node) {\n return self.clearItemStates(node);\n });\n this.getEdges().map(function (edge) {\n return self.clearItemStates(edge);\n });\n if (stack && this.get('enabledStack')) {\n this.pushStack('changedata', {\n before: self.get('originData'),\n after: data || self.get('data')\n });\n }\n if (data) {\n self.data(data);\n self.render(false);\n } else {\n self.layout(this.get('fitView'));\n }\n };\n /**\n * 已更名为 updateLayout,为保持兼容暂且保留。\n * 更改并应用树布局算法\n * @param {object} layout 布局算法\n */\n TreeGraph.prototype.changeLayout = function (layout) {\n // eslint-disable-next-line no-console\n console.warn('Please call updateLayout instead of changeLayout. changeLayout will be discarded soon');\n var self = this;\n self.updateLayout(layout);\n };\n /**\n * 更改并应用树布局算法\n * @param {object} layout 布局算法\n */\n TreeGraph.prototype.updateLayout = function (layout, align, alignPoint, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n if (!layout) {\n // eslint-disable-next-line no-console\n console.warn('layout cannot be null');\n return;\n }\n if (stack && this.get('enabledStack')) {\n this.pushStack('layout', {\n before: self.get('layout'),\n after: layout\n });\n }\n self.set('layout', layout);\n self.set('layoutMethod', self.getLayout());\n self.layout();\n // align the graph after layout\n if (align) {\n var toPoint = alignPoint;\n if (!toPoint) {\n if (align === 'begin') toPoint = {\n x: 0,\n y: 0\n };else toPoint = {\n x: this.getWidth() / 2,\n y: this.getHeight() / 2\n };\n }\n // translate to point coordinate system\n toPoint = this.getPointByCanvas(toPoint.x, toPoint.y);\n var matrix = this.getGroup().getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n toPoint.x = toPoint.x * matrix[0] + matrix[6];\n toPoint.y = toPoint.y * matrix[0] + matrix[7];\n var _a = this.getGroup().getCanvasBBox(),\n minX = _a.minX,\n maxX = _a.maxX,\n minY = _a.minY,\n maxY = _a.maxY;\n var bboxPoint = {\n x: (minX + maxX) / 2,\n y: (minY + maxY) / 2\n };\n if (align === 'begin') {\n bboxPoint.x = minX;\n bboxPoint.y = minY;\n }\n this.translate(toPoint.x - bboxPoint.x, toPoint.y - bboxPoint.y);\n }\n };\n /**\n * 已更名为 layout,为保持兼容暂且保留。\n * 根据目前的 data 刷新布局,更新到画布上。用于变更数据之后刷新视图。\n * @param {boolean} fitView 更新布局时是否需要适应窗口\n */\n TreeGraph.prototype.refreshLayout = function (fitView) {\n // eslint-disable-next-line no-console\n console.warn('Please call layout instead of refreshLayout. refreshLayout will be discarded soon');\n var self = this;\n self.layout(fitView);\n };\n /**\n * 根据目前的 data 刷新布局,更新到画布上。用于变更数据之后刷新视图。\n * @param {boolean} fitView 更新布局时是否需要适应窗口\n */\n TreeGraph.prototype.layout = function (fitView) {\n var _this = this;\n var self = this;\n var data = self.get('data');\n var layoutMethod = self.get('layoutMethod');\n var layoutConfig = self.get('layout');\n var layoutData = data;\n if (layoutConfig === null || layoutConfig === void 0 ? void 0 : layoutConfig.excludeInvisibles) {\n data = clone(self.get('data'));\n var cacheChidMap_1 = {};\n traverseTree(data, function (subTree) {\n var siblings = subTree.children;\n if (!(siblings === null || siblings === void 0 ? void 0 : siblings.length)) return true;\n for (var i = siblings.length - 1; i >= 0; i--) {\n var node = _this.findById(siblings[i].id);\n var isHidden = node ? !node.isVisible() : siblings[i].visible === false;\n if (isHidden) {\n cacheChidMap_1[subTree.id] = cacheChidMap_1[subTree.id] || [];\n cacheChidMap_1[subTree.id].push({\n idx: i,\n child: siblings.splice(i, 1)[0]\n });\n }\n }\n });\n layoutData = layoutMethod ? layoutMethod(data, self.get('layout')) : data;\n traverseTree(layoutData, function (subTree) {\n var cachedItems = cacheChidMap_1[subTree.id];\n if (cachedItems === null || cachedItems === void 0 ? void 0 : cachedItems.length) {\n for (var i = cachedItems.length - 1; i >= 0; i--) {\n var _a = cachedItems[i],\n idx = _a.idx,\n child = _a.child;\n subTree.children.splice(idx, 0, child);\n }\n }\n });\n } else {\n layoutData = layoutMethod ? layoutMethod(data, self.get('layout')) : data;\n }\n var animate = self.get('animate');\n self.emit('beforerefreshlayout', {\n data: data,\n layoutData: layoutData\n });\n self.emit('beforelayout');\n self.innerUpdateChild(layoutData, undefined, animate);\n if (fitView) {\n var viewController = self.get('viewController');\n viewController.fitView();\n }\n if (!animate) {\n // 如果没有动画,目前仅更新了节点的位置,刷新一下边的样式\n self.refresh();\n self.paint();\n } else {\n self.layoutAnimate(layoutData);\n }\n self.emit('afterrefreshlayout', {\n data: data,\n layoutData: layoutData\n });\n self.emit('afterlayout');\n };\n /**\n * 添加子树到对应 id 的节点\n * @param {TreeGraphData} data 子树数据模型\n * @param {string} parent 子树的父节点id\n */\n TreeGraph.prototype.addChild = function (data, parent, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n self.emit('beforeaddchild', {\n model: data,\n parent: parent\n });\n // 将数据添加到源数据中,走changeData方法\n if (!isString(parent)) {\n parent = parent.get('id');\n }\n var parentData = self.findDataById(parent);\n if (parentData) {\n if (!parentData.children) {\n parentData.children = [];\n }\n parentData.children.push(data);\n var parentItem = self.findById(parent);\n parentItem.refresh();\n self.changeData(undefined, stack);\n }\n };\n /**\n * 更新某个节点下的所有子节点\n * @param {TreeGraphData[]} data 子树数据模型集合\n * @param {string} parent 子树的父节点id\n */\n TreeGraph.prototype.updateChildren = function (data, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 如果没有父节点或找不到该节点,是全量的更新,直接重置data\n var parentItem = self.findById(parentId);\n if (!parentId || !parentItem) {\n console.warn(\"Update children failed! There is no node with id '\".concat(parentId, \"'\"));\n return;\n }\n var parentModel = self.findDataById(parentId);\n parentModel.children = data;\n parentItem.refresh();\n self.changeData(undefined, stack);\n };\n /**\n * 更新源数据,差量更新子树\n * @param {TreeGraphData} data 子树数据模型\n * @param {string} parentId 子树的父节点id\n */\n TreeGraph.prototype.updateChild = function (data, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 如果没有父节点或找不到该节点,是全量的更新,直接重置data\n if (!parentId || !self.findById(parentId)) {\n self.changeData(data, stack);\n return;\n }\n var parentModel = self.findDataById(parentId);\n var current = self.findById(data.id);\n if (!parentModel.children) {\n // 当 current 不存在时,children 为空数组\n parentModel.children = [];\n }\n // 如果不存在该节点,则添加\n if (!current) {\n parentModel.children.push(data);\n } else {\n var index = TreeGraph.indexOfChild(parentModel.children, data.id);\n if (index > -1) parentModel.children[index] = data;\n }\n var parentItem = self.findById(parentId);\n parentItem === null || parentItem === void 0 ? void 0 : parentItem.refresh();\n self.changeData(undefined, stack);\n };\n /**\n * 删除子树\n * @param {string} id 子树根节点id\n */\n TreeGraph.prototype.removeChild = function (id, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var node = self.findById(id);\n var parent;\n if (!node) {\n parent = self.getNodes().find(function (node) {\n var children = node.getModel().children || [];\n return !!children.find(function (child) {\n return child.id === id;\n });\n });\n } else {\n parent = node === null || node === void 0 ? void 0 : node.get('parent');\n }\n if (parent && !parent.destroyed) {\n var parentId = parent.get('id');\n var parentNode = self.findDataById(parentId);\n var siblings = parentNode && parentNode.children || [];\n var index = TreeGraph.indexOfChild(siblings, id);\n siblings.splice(index, 1);\n parent.refresh();\n }\n self.changeData(undefined, stack);\n };\n /**\n * 根据id获取对应的源数据\n * @param {string} id 元素id\n * @param {TreeGraphData | undefined} parent 从哪个节点开始寻找,为空时从根节点开始查找\n * @return {TreeGraphData} 对应源数据\n */\n TreeGraph.prototype.findDataById = function (id, parent) {\n var self = this;\n if (!parent) {\n parent = self.get('data');\n }\n if (id === parent.id) {\n return parent;\n }\n var result = null;\n // eslint-disable-next-line consistent-return\n each(parent.children || [], function (child) {\n if (child.id === id) {\n result = child;\n return false;\n }\n result = self.findDataById(id, child);\n if (result) {\n return false;\n }\n });\n return result;\n };\n /**\n * 布局动画接口,用于数据更新时做节点位置更新的动画\n * @param {TreeGraphData} data 更新的数据\n * @param {function} onFrame 定义节点位置更新时如何移动\n */\n TreeGraph.prototype.layoutAnimate = function (data, onFrame) {\n var self = this;\n var animateCfg = this.get('animateCfg');\n self.emit('beforeanimate', {\n data: data\n });\n // 如果边中没有指定锚点,但是本身有锚点控制,在动画过程中保持锚点不变\n self.getEdges().forEach(function (edge) {\n var model = edge.get('model');\n if (!model.sourceAnchor) {\n model.sourceAnchor = edge.get('sourceAnchorIndex');\n }\n });\n this.get('canvas').animate(function (ratio) {\n traverseTree(data, function (child) {\n var node = self.findById(child.id);\n // 只有当存在node的时候才执行\n if (node) {\n var origin_2 = node.get('originAttrs');\n var model = node.get('model');\n if (!origin_2) {\n origin_2 = {\n x: model.x,\n y: model.y\n };\n node.set('originAttrs', origin_2);\n }\n if (onFrame) {\n var attrs = onFrame(node, ratio, origin_2, data);\n node.set('model', Object.assign(model, attrs));\n } else {\n model.x = origin_2.x + (child.x - origin_2.x) * ratio;\n model.y = origin_2.y + (child.y - origin_2.y) * ratio;\n }\n }\n return true;\n });\n each(self.get('removeList'), function (node) {\n var model = node.getModel();\n var from = node.get('originAttrs');\n var to = node.get('to');\n model.x = from.x + (to.x - from.x) * ratio;\n model.y = from.y + (to.y - from.y) * ratio;\n });\n self.refreshPositions();\n }, {\n duration: animateCfg.duration,\n easing: animateCfg.ease,\n callback: function callback() {\n each(self.getNodes(), function (node) {\n node.set('originAttrs', null);\n });\n each(self.get('removeList'), function (node) {\n self.removeItem(node, false);\n });\n self.set('removeList', []);\n if (animateCfg.callback) {\n animateCfg.callback();\n }\n self.emit('afteranimate', {\n data: data\n });\n },\n delay: animateCfg.delay\n });\n };\n /**\n * 立即停止布局动画\n */\n TreeGraph.prototype.stopLayoutAnimate = function () {\n this.get('canvas').stopAnimate();\n this.emit('layoutanimateend', {\n data: this.get('data')\n });\n this.layoutAnimating = false;\n };\n /**\n * 是否在布局动画\n * @return {boolean} 是否有布局动画\n */\n TreeGraph.prototype.isLayoutAnimating = function () {\n return this.layoutAnimating;\n };\n /**\n * 根据data接口的数据渲染视图\n */\n TreeGraph.prototype.render = function (clearStack) {\n if (clearStack === void 0) {\n clearStack = true;\n }\n var self = this;\n var data = self.get('data');\n if (!data || !isObject(data) || !Object.keys(data).length) {\n throw new Error('data must be defined first');\n }\n self.clear();\n if (clearStack && this.get('enabledStack')) {\n // render 之前清空 redo 和 undo 栈\n this.clearStack();\n }\n self.emit('beforerender');\n self.layout(this.get('fitView'));\n self.emit('afterrender');\n };\n /**\n * 导出图数据\n * @return {object} data\n */\n TreeGraph.prototype.save = function () {\n return this.get('data');\n };\n /**\n * 设置视图初始化数据\n * @param {TreeGraphData} data 初始化数据\n */\n TreeGraph.prototype.data = function (data) {\n _super.prototype.data.call(this, data);\n this.set('originData', deepClone(data));\n };\n return TreeGraph;\n}(Graph);\nexport default TreeGraph;","import { wrapBehavior, each, deepMix } from '@antv/util';\nvar PluginBase = /** @class */function () {\n /**\n * 插件基类的构造函数\n * @param cfgs 插件的配置项\n */\n function PluginBase(cfgs) {\n this._cfgs = deepMix(this.getDefaultCfgs(), cfgs);\n this._events = {};\n this.destroyed = false;\n }\n /**\n * 获取默认的插件配置\n */\n PluginBase.prototype.getDefaultCfgs = function () {\n return {};\n };\n /**\n * 初始化插件\n * @param graph IGraph 实例\n */\n PluginBase.prototype.initPlugin = function (graph) {\n var self = this;\n self.set('graph', graph);\n var events = self.getEvents();\n var bindEvents = {};\n each(events, function (v, k) {\n var event = wrapBehavior(self, v);\n bindEvents[k] = event;\n graph.on(k, event);\n });\n this._events = bindEvents;\n this.init();\n };\n /**\n * 获取插件中的事件和事件处理方法,供子类实现\n */\n PluginBase.prototype.getEvents = function () {\n return {};\n };\n /**\n * 获取配置项中的某个值\n * @param key 键值\n */\n PluginBase.prototype.get = function (key) {\n var _a;\n return (_a = this._cfgs) === null || _a === void 0 ? void 0 : _a[key];\n };\n /**\n * 将指定的值存储到 cfgs 中\n * @param key 键值\n * @param val 设置的值\n */\n PluginBase.prototype.set = function (key, val) {\n this._cfgs[key] = val;\n };\n /**\n * 销毁方法,供子类复写\n */\n PluginBase.prototype.destroy = function () {};\n /**\n * 销毁插件\n */\n PluginBase.prototype.destroyPlugin = function () {\n this.destroy();\n var graph = this.get('graph');\n var events = this._events;\n each(events, function (v, k) {\n graph.off(k, v);\n });\n this._events = null;\n this._cfgs = null;\n this.destroyed = true;\n };\n return PluginBase;\n}();\nexport default PluginBase;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport Base from '../base';\n// 网格背景图片\nvar GRID_PNG = 'url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2UwZTBlMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)';\nvar Grid = /** @class */function (_super) {\n __extends(Grid, _super);\n function Grid(config) {\n return _super.call(this, config) || this;\n }\n Grid.prototype.getDefaultCfgs = function () {\n return {\n img: GRID_PNG,\n follow: true\n };\n };\n Grid.prototype.init = function () {\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var canvas = graph.get('canvas').get('el');\n var img = this.get('img') || GRID_PNG;\n if (!img.includes('url(')) {\n img = \"url(\\\"\".concat(img, \"\\\")\");\n }\n var container = createDom(\"
\");\n var gridContainer = createDom(\"\"));\n this.set('container', container);\n this.set('gridContainer', gridContainer);\n this.positionInit();\n container.appendChild(gridContainer);\n graphContainer.insertBefore(container, canvas);\n };\n /** 定位信息初始化 */\n Grid.prototype.positionInit = function () {\n var graph = this.get('graph');\n var minZoom = graph.get('minZoom');\n var width = graph.get('width');\n var height = graph.get('height');\n modifyCSS(this.get('container'), {\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n // 网格 40*40 需保证 (gridContainerWidth / 2) % 40 = 0 才能让网格线对齐左上角 故 * 80\n var gridContainerWidth = width * 80 / minZoom;\n var gridContainerHeight = height * 80 / minZoom;\n modifyCSS(this.get('gridContainer'), {\n width: \"\".concat(gridContainerWidth, \"px\"),\n height: \"\".concat(gridContainerHeight, \"px\"),\n left: \"-\".concat(gridContainerWidth / 2, \"px\"),\n top: \"-\".concat(gridContainerHeight / 2, \"px\")\n });\n };\n // class-methods-use-this\n Grid.prototype.getEvents = function () {\n return {\n viewportchange: 'updateGrid'\n };\n };\n /**\n * viewport change 事件的响应函数\n * @param param\n */\n Grid.prototype.updateGrid = function (param) {\n var gridContainer = this.get('gridContainer');\n var matrix = param.matrix;\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var isFollow = this.get('follow');\n var transform = \"matrix(\".concat(matrix[0], \", \").concat(matrix[1], \", \").concat(matrix[3], \", \").concat(matrix[4], \", \").concat(isFollow ? matrix[6] : '0', \", \").concat(isFollow ? matrix[7] : '0', \")\");\n modifyCSS(gridContainer, {\n transform: transform\n });\n };\n Grid.prototype.getContainer = function () {\n return this.get('container');\n };\n Grid.prototype.destroy = function () {\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = this.get('container');\n graphContainer.removeChild(container);\n };\n return Grid;\n}(Base);\nexport default Grid;","var containers = []; // will store container HTMLElement references\nvar styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}\n\nvar usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';\n\nfunction insertCss(css, options) {\n options = options || {};\n\n if (css === undefined) {\n throw new Error(usage);\n }\n\n var position = options.prepend === true ? 'prepend' : 'append';\n var container = options.container !== undefined ? options.container : document.querySelector('head');\n var containerId = containers.indexOf(container);\n\n // first time we see this container, create the necessary entries\n if (containerId === -1) {\n containerId = containers.push(container) - 1;\n styleElements[containerId] = {};\n }\n\n // try to get the correponding container + position styleElement, create it otherwise\n var styleElement;\n\n if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {\n styleElement = styleElements[containerId][position];\n } else {\n styleElement = styleElements[containerId][position] = createStyleElement();\n\n if (position === 'prepend') {\n container.insertBefore(styleElement, container.childNodes[0]);\n } else {\n container.appendChild(styleElement);\n }\n }\n\n // strip potential UTF-8 BOM if css was read from a file\n if (css.charCodeAt(0) === 0xFEFF) { css = css.substr(1, css.length); }\n\n // actually add the stylesheet\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText += css\n } else {\n styleElement.textContent += css;\n }\n\n return styleElement;\n};\n\nfunction createStyleElement() {\n var styleElement = document.createElement('style');\n styleElement.setAttribute('type', 'text/css');\n return styleElement;\n}\n\nmodule.exports = insertCss;\nmodule.exports.insertCss = insertCss;\n","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { isString } from '@antv/util';\nimport insertCss from 'insert-css';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-contextmenu {\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n background-color: rgba(255, 255, 255, 0.9);\\n padding: 10px 8px;\\n box-shadow: rgb(174, 174, 174) 0px 0px 10px;\\n }\\n .g6-contextmenu-ul {\\n padding: 0;\\n margin: 0;\\n list-style: none;\\n }\\n\\n\");\nvar Menu = /** @class */function (_super) {\n __extends(Menu, _super);\n function Menu(config) {\n return _super.call(this, config) || this;\n }\n Menu.prototype.getDefaultCfgs = function () {\n return {\n offsetX: 6,\n offsetY: 6,\n handleMenuClick: undefined,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(e) {\n return \"\\n
    \\n
  • \\u83DC\\u5355\\u98791
  • \\n
  • \\u83DC\\u5355\\u98792
  • \\n
\\n \";\n },\n shouldBegin: function shouldBegin(e) {\n return true;\n },\n // 菜单隐藏事件\n onHide: function onHide() {\n return true;\n },\n itemTypes: ['node', 'edge', 'combo'],\n trigger: 'contextmenu'\n };\n };\n // class-methods-use-this\n Menu.prototype.getEvents = function () {\n if (this.get('trigger') === 'click') {\n return {\n click: 'onMenuShow',\n touchend: 'onMenuShow'\n };\n }\n return {\n contextmenu: 'onMenuShow'\n };\n };\n Menu.prototype.init = function () {\n var className = this.get('className');\n var menu = createDom(\"
\"));\n modifyCSS(menu, {\n top: '0px',\n position: 'absolute',\n visibility: 'hidden'\n });\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.appendChild(menu);\n this.set('menu', menu);\n };\n Menu.prototype.onMenuShow = function (e) {\n var self = this;\n e.preventDefault();\n var itemTypes = this.get('itemTypes');\n if (!e.item) {\n if (itemTypes.indexOf('canvas') === -1) {\n self.onMenuHide();\n return;\n }\n } else {\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) {\n self.onMenuHide();\n return;\n }\n }\n var shouldBegin = this.get('shouldBegin');\n if (!shouldBegin(e)) return;\n var menuDom = this.get('menu');\n var getContent = this.get('getContent');\n var graph = this.get('graph');\n var menu = getContent(e, graph);\n if (isString(menu)) {\n menuDom.innerHTML = menu;\n } else {\n menuDom.innerHTML = menu.outerHTML;\n }\n // 清除之前监听的事件\n this.removeMenuEventListener();\n var handleMenuClick = this.get('handleMenuClick');\n if (handleMenuClick) {\n var handleMenuClickWrapper = function handleMenuClickWrapper(evt) {\n handleMenuClick(evt.target, e.item, graph);\n };\n this.set('handleMenuClickWrapper', handleMenuClickWrapper);\n menuDom.addEventListener('click', handleMenuClickWrapper);\n }\n var width = graph.get('width');\n var height = graph.get('height');\n var bbox = menuDom.getBoundingClientRect();\n var offsetX = this.get('offsetX') || 0;\n var offsetY = this.get('offsetY') || 0;\n var graphTop = graph.getContainer().offsetTop;\n var graphLeft = graph.getContainer().offsetLeft;\n var x = e.canvasX + graphLeft + offsetX;\n var y = e.canvasY + graphTop + offsetY;\n // when the menu is (part of) out of the canvas\n if (x + bbox.width > width) {\n x = e.canvasX - bbox.width - offsetX + graphLeft;\n }\n if (y + bbox.height > height) {\n y = e.canvasY - bbox.height - offsetY + graphTop;\n }\n if (y < 0) {\n y = 0;\n }\n modifyCSS(menuDom, {\n top: \"\".concat(y, \"px\"),\n left: \"\".concat(x, \"px\"),\n visibility: 'visible'\n });\n // 左键单击会触发 body 上监听的 click 事件,导致菜单展示出来后又立即被隐藏了,需要过滤掉\n var triggeredByFirstClick = this.get('trigger') === 'click';\n var handler = function handler(evt) {\n if (triggeredByFirstClick) {\n triggeredByFirstClick = false;\n return;\n }\n self.onMenuHide();\n };\n // 如果在页面中其他任意地方进行click, 隐去菜单\n document.body.addEventListener('click', handler);\n this.set('handler', handler);\n };\n Menu.prototype.removeMenuEventListener = function () {\n var handleMenuClickWrapper = this.get('handleMenuClickWrapper');\n var handler = this.get('handler');\n if (handleMenuClickWrapper) {\n var menuDom = this.get('menu');\n menuDom.removeEventListener('click', handleMenuClickWrapper);\n this.set('handleMenuClickWrapper', null);\n }\n if (handler) {\n document.body.removeEventListener('click', handler);\n }\n };\n Menu.prototype.onMenuHide = function () {\n var menuDom = this.get('menu');\n if (menuDom) {\n modifyCSS(menuDom, {\n visibility: 'hidden'\n });\n }\n // 隐藏菜单后需要移除事件监听\n this.removeMenuEventListener();\n };\n Menu.prototype.destroy = function () {\n var menu = this.get('menu');\n this.removeMenuEventListener();\n if (menu) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(menu);\n }\n };\n return Menu;\n}(Base);\nexport default Menu;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { isString, isNil, each, debounce } from '@antv/util';\nimport { createDom, modifyCSS } from '@antv/dom-util';\nimport { ext } from '@antv/matrix-util';\nimport Base from '../base';\nvar max = Math.max;\nvar transform = ext.transform;\nvar DEFAULT_MODE = 'default';\nvar KEYSHAPE_MODE = 'keyShape';\nvar DELEGATE_MODE = 'delegate';\nvar SVG = 'svg';\nvar MiniMap = /** @class */function (_super) {\n __extends(MiniMap, _super);\n function MiniMap(config) {\n var _this = _super.call(this, config) || this;\n /**\n * 主图更新的监听函数,使用 debounce 减少渲染频率\n * e.g. 拖拽节点只会在松手后的 100ms 后执行 updateCanvas\n * e.g. render 时大量 addItem 也只会执行一次 updateCanvas\n */\n _this.handleUpdateCanvas = debounce(function (event) {\n var self = _this;\n if (self.destroyed) return;\n self.updateCanvas();\n }, 100, false);\n return _this;\n }\n MiniMap.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-minimap',\n viewportClassName: 'g6-minimap-viewport',\n // Minimap 中默认展示和主图一样的内容,KeyShape 只展示节点和边的 key shape 部分,delegate表示展示自定义的rect,用户可自定义样式\n type: 'default',\n padding: 50,\n size: [200, 120],\n delegateStyle: {\n fill: '#40a9ff',\n stroke: '#096dd9'\n },\n refresh: true,\n hideEdge: false\n };\n };\n MiniMap.prototype.getEvents = function () {\n return {\n beforepaint: 'updateViewport',\n beforeanimate: 'disableRefresh',\n afteranimate: 'enableRefresh',\n viewportchange: 'disableOneRefresh'\n };\n };\n // 若是正在进行动画,不刷新缩略图\n MiniMap.prototype.disableRefresh = function () {\n this.set('refresh', false);\n };\n MiniMap.prototype.enableRefresh = function () {\n this.set('refresh', true);\n this.updateCanvas();\n };\n MiniMap.prototype.disableOneRefresh = function () {\n this.set('viewportChange', true);\n };\n MiniMap.prototype.initViewport = function () {\n var _this = this;\n var cfgs = this._cfgs;\n var size = cfgs.size,\n graph = cfgs.graph;\n if (this.destroyed) return;\n var canvas = this.get('canvas');\n var containerDOM = canvas.get('container');\n var isFireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n var isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;\n var viewport = createDom(\"\\n \"));\n // 计算拖拽水平方向距离\n var x = 0;\n // 计算拖拽垂直方向距离\n var y = 0;\n // 是否在拖拽minimap的视口\n var dragging = false;\n // 缓存viewport当前对于画布的x\n var left = 0;\n // 缓存viewport当前对于画布的y\n var top = 0;\n // 缓存viewport当前宽度\n var width = 0;\n // 缓存viewport当前高度\n var height = 0;\n var ratio = 0;\n var zoom = 0;\n var dragstartevent = isSafari || isFireFox ? 'mousedown' : 'dragstart';\n viewport.addEventListener(dragstartevent, function (e) {\n var _a, _b;\n if (e.dataTransfer) {\n var img = new Image();\n img.src = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' %3E%3Cpath /%3E%3C/svg%3E\";\n (_b = (_a = e.dataTransfer).setDragImage) === null || _b === void 0 ? void 0 : _b.call(_a, img, 0, 0);\n try {\n e.dataTransfer.setData('text/html', 'view-port-minimap');\n } catch (_c) {\n // support IE\n e.dataTransfer.setData('text', 'view-port-minimap');\n }\n }\n cfgs.refresh = false;\n if (e.target !== viewport) {\n return;\n }\n // 如果视口已经最大了,不需要拖拽\n var style = viewport.style;\n left = parseInt(style.left, 10);\n top = parseInt(style.top, 10);\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n if (width > size[0] || height > size[1]) {\n return;\n }\n zoom = graph.getZoom();\n ratio = _this.get('ratio');\n dragging = true;\n x = e.clientX;\n y = e.clientY;\n }, false);\n var dragListener = function dragListener(e) {\n if (!dragging || isNil(e.clientX) || isNil(e.clientY)) {\n return;\n }\n var dx = x - e.clientX;\n var dy = y - e.clientY;\n // 若视口移动到最左边或最右边了,仅移动到边界\n if (left - dx < 0 || left - dx + width >= size[0]) {\n dx = 0;\n }\n // 若视口移动到最上或最下边了,仅移动到边界\n if (top - dy < 0 || top - dy + height >= size[1]) {\n dy = 0;\n }\n left -= dx;\n top -= dy;\n // 先移动视口,避免移动到边上以后出现视口闪烁\n modifyCSS(viewport, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\")\n });\n // graph 移动需要偏移量 dx/dy * 缩放比例才会得到正确的移动距离\n graph.translate(dx * zoom / ratio, dy * zoom / ratio);\n x = e.clientX;\n y = e.clientY;\n };\n if (!isSafari && !isFireFox) {\n viewport.addEventListener('drag', dragListener, false);\n }\n var dragendListener = function dragendListener() {\n dragging = false;\n cfgs.refresh = true;\n };\n var dragendevent = isSafari || isFireFox ? 'mouseup' : 'dragend';\n viewport.addEventListener(dragendevent, dragendListener, false);\n containerDOM.addEventListener('mouseleave', dragendListener);\n containerDOM.addEventListener('mouseup', dragendListener);\n if (isSafari || isFireFox) {\n containerDOM.addEventListener('mousemove', dragListener, false);\n }\n this.set('viewport', viewport);\n containerDOM.appendChild(viewport);\n };\n /**\n * 更新 viewport 视图\n */\n MiniMap.prototype.updateViewport = function () {\n if (this.destroyed) return;\n var ratio = this.get('ratio');\n var totaldx = this.get('totaldx');\n var totaldy = this.get('totaldy');\n var graph = this.get('graph');\n var size = this.get('size');\n var graphCanvasEl = graph.get('canvas').get('el');\n var graphWidth = graph.get('width') || graphCanvasEl.scrollWidth || 500;\n var graphHeight = graph.get('height') || graphCanvasEl.scrollHeight || 500;\n var topLeft = graph.getPointByCanvas(0, 0);\n var bottomRight = graph.getPointByCanvas(graphWidth, graphHeight);\n var viewport = this.get('viewport');\n if (!viewport) {\n this.initViewport();\n }\n // viewport宽高,左上角点的计算\n var width = (bottomRight.x - topLeft.x) * ratio;\n var height = (bottomRight.y - topLeft.y) * ratio;\n var left = topLeft.x * ratio + totaldx;\n var top = topLeft.y * ratio + totaldy;\n var right = left + width;\n var bottom = top + height;\n if (left < 0) {\n width += left;\n left = 0;\n }\n if (right > size[0]) {\n width = width - (right - size[0]);\n }\n if (top < 0) {\n height += top;\n top = 0;\n }\n if (bottom > size[1]) {\n height = height - (bottom - size[1]);\n }\n // 缓存目前缩放比,在移动 minimap 视窗时就不用再计算大图的移动量\n this.set('ratio', ratio);\n var correctLeft = \"\".concat(left, \"px\");\n var correctTop = \"\".concat(top, \"px\");\n modifyCSS(viewport, {\n left: correctLeft,\n top: correctTop,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n };\n /**\n * 将主图上的图形完全复制到小图\n */\n MiniMap.prototype.updateGraphShapes = function () {\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var graphGroup = graph.get('group');\n if (graphGroup.destroyed) return;\n canvas.clear();\n var clonedGroup;\n if (this.get('hideEdge')) {\n clonedGroup = canvas.addGroup();\n graphGroup.get('children').forEach(function (group) {\n if (group.get('id').includes('-edge')) return;\n clonedGroup.add(group.clone());\n });\n } else {\n clonedGroup = graphGroup.clone();\n clonedGroup.resetMatrix();\n canvas.add(clonedGroup);\n }\n // 当 renderer 是 svg,由于渲染引擎的 bug,这里需要将 visible 为 false 的元素手动隐藏\n var renderer = graph.get('renderer');\n if (renderer === SVG) {\n // 递归更新子元素\n this.updateVisible(clonedGroup);\n }\n };\n // svg 在 canvas.add(clonedGroup) 之后会出现 visible 为 false 的元素被展示出来,需要递归更新\n MiniMap.prototype.updateVisible = function (ele) {\n var _this = this;\n if (!ele.isGroup() && !ele.get('visible')) {\n ele.hide();\n } else {\n var children = ele.get('children');\n if (!children || !children.length) return;\n children.forEach(function (child) {\n if (!child.get('visible')) child.hide();\n _this.updateVisible(child);\n });\n }\n };\n // 仅在 minimap 上绘制 keyShape\n // FIXME 如果用户自定义绘制了其他内容,minimap上就无法画出\n MiniMap.prototype.updateKeyShapes = function () {\n var _this = this;\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var group = canvas.get('children')[0] || canvas.addGroup();\n if (!this.get('hideEdge')) {\n each(graph.getEdges(), function (edge) {\n _this.updateOneEdgeKeyShape(edge, group);\n });\n }\n each(graph.getNodes(), function (node) {\n _this.updateOneNodeKeyShape(node, group);\n });\n var combos = graph.getCombos();\n if (combos && combos.length) {\n var comboGroup_1 = group.find(function (e) {\n return e.get('name') === 'comboGroup';\n }) || group.addGroup({\n name: 'comboGroup'\n });\n setTimeout(function () {\n if (_this.destroyed) return;\n each(combos, function (combo) {\n _this.updateOneComboKeyShape(combo, comboGroup_1);\n });\n comboGroup_1 === null || comboGroup_1 === void 0 ? void 0 : comboGroup_1.sort();\n comboGroup_1 === null || comboGroup_1 === void 0 ? void 0 : comboGroup_1.toBack();\n _this.updateCanvas();\n }, 250);\n }\n this.clearDestroyedShapes();\n };\n /**\n * 增加/更新单个元素的 keyShape\n * @param item ICombo 实例\n */\n MiniMap.prototype.updateOneComboKeyShape = function (item, comboGroup) {\n if (this.destroyed) return;\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n var cKeyShape = item.get('keyShape').clone();\n var keyShapeStyle = cKeyShape.attr();\n var attrs = {\n x: bbox.centerX,\n y: bbox.centerY\n };\n if (!mappedItem) {\n mappedItem = cKeyShape;\n comboGroup.add(mappedItem);\n } else {\n attrs = Object.assign(keyShapeStyle, attrs);\n }\n var shapeType = mappedItem.get('type');\n if (shapeType === 'rect' || shapeType === 'image') {\n attrs.x = bbox.minX;\n attrs.y = bbox.minY;\n }\n mappedItem.attr(attrs);\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n var zIndex = item.getModel().depth;\n if (!isNaN(zIndex)) mappedItem.set('zIndex', zIndex);\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * 增加/更新单个元素的 keyShape\n * @param item INode 实例\n */\n MiniMap.prototype.updateOneNodeKeyShape = function (item, group) {\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n var cKeyShape = item.get('keyShape').clone();\n var keyShapeStyle = cKeyShape.attr();\n var attrs = {\n x: bbox.centerX,\n y: bbox.centerY\n };\n if (!mappedItem) {\n mappedItem = cKeyShape;\n group.add(mappedItem);\n } else {\n attrs = Object.assign(keyShapeStyle, attrs);\n mappedItem.toFront();\n }\n var shapeType = mappedItem.get('type');\n if (shapeType === 'rect' || shapeType === 'image') {\n attrs.x = bbox.minX;\n attrs.y = bbox.minY;\n }\n mappedItem.attr(attrs);\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n var zIndex = item.getModel().depth;\n if (!isNaN(zIndex)) mappedItem.set('zIndex', zIndex);\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * Minimap 中展示自定义的rect,支持用户自定义样式和节点大小\n */\n MiniMap.prototype.updateDelegateShapes = function () {\n var _this = this;\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var group = canvas.get('children')[0] || canvas.addGroup();\n // 差量更新 minimap 上的节点和边\n if (!this.get('hideEdge')) {\n each(graph.getEdges(), function (edge) {\n _this.updateOneEdgeKeyShape(edge, group);\n });\n }\n each(graph.getNodes(), function (node) {\n _this.updateOneNodeDelegateShape(node, group);\n });\n var combos = graph.getCombos();\n if (combos && combos.length) {\n var comboGroup_2 = group.find(function (e) {\n return e.get('name') === 'comboGroup';\n }) || group.addGroup({\n name: 'comboGroup'\n });\n setTimeout(function () {\n if (_this.destroyed) return;\n each(combos, function (combo) {\n _this.updateOneComboKeyShape(combo, comboGroup_2);\n });\n comboGroup_2 === null || comboGroup_2 === void 0 ? void 0 : comboGroup_2.sort();\n comboGroup_2 === null || comboGroup_2 === void 0 ? void 0 : comboGroup_2.toBack();\n _this.updateCanvas();\n }, 250);\n }\n this.clearDestroyedShapes();\n };\n MiniMap.prototype.clearDestroyedShapes = function () {\n var itemMap = this.get('itemMap') || {};\n var keys = Object.keys(itemMap);\n if (!keys || keys.length === 0) return;\n for (var i = keys.length - 1; i >= 0; i--) {\n var shape = itemMap[keys[i]];\n var exist = shape.exist;\n shape.exist = false;\n if (!exist) {\n shape.remove();\n delete itemMap[keys[i]];\n }\n }\n };\n /**\n * 设置只显示 edge 的 keyShape\n * @param item IEdge 实例\n */\n MiniMap.prototype.updateOneEdgeKeyShape = function (item, group) {\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n if (mappedItem) {\n var path = item.get('keyShape').attr('path');\n mappedItem.attr('path', path);\n } else {\n mappedItem = item.get('keyShape').clone();\n group.add(mappedItem);\n }\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * Minimap 中展示自定义的 rect,支持用户自定义样式和节点大小\n * 增加/更新单个元素\n * @param item INode 实例\n */\n MiniMap.prototype.updateOneNodeDelegateShape = function (item, group) {\n var delegateStyle = this.get('delegateStyle');\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n if (mappedItem) {\n var attrs = {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n };\n mappedItem.attr(attrs);\n mappedItem.toFront();\n } else {\n mappedItem = group.addShape('rect', {\n attrs: __assign({\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n }, delegateStyle),\n name: 'minimap-node-shape'\n });\n }\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n MiniMap.prototype.init = function () {\n this.initContainer();\n this.get('graph').on('afterupdateitem', this.handleUpdateCanvas);\n this.get('graph').on('afteritemstatechange', this.handleUpdateCanvas);\n this.get('graph').on('afteradditem', this.handleUpdateCanvas);\n this.get('graph').on('afterremoveitem', this.handleUpdateCanvas);\n this.get('graph').on('afterrender', this.handleUpdateCanvas);\n this.get('graph').on('afterlayout', this.handleUpdateCanvas);\n };\n /**\n * 初始化 Minimap 的容器\n */\n MiniMap.prototype.initContainer = function () {\n var self = this;\n var graph = self.get('graph');\n var size = self.get('size');\n var className = self.get('className');\n var parentNode = self.get('container');\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n if (parentNode) {\n parentNode.appendChild(container);\n } else {\n graph.get('container').appendChild(container);\n }\n self.set('container', container);\n var containerDOM = createDom('
');\n container.appendChild(containerDOM);\n containerDOM.addEventListener('dragenter', function (e) {\n e.preventDefault();\n });\n containerDOM.addEventListener('dragover', function (e) {\n e.preventDefault();\n });\n var canvas;\n var renderer = graph.get('renderer');\n if (renderer === SVG) {\n canvas = new GSVGCanvas({\n container: containerDOM,\n width: size[0],\n height: size[1]\n });\n } else {\n canvas = new GCanvas({\n container: containerDOM,\n width: size[0],\n height: size[1]\n });\n }\n self.set('canvas', canvas);\n self.updateCanvas();\n };\n MiniMap.prototype.updateCanvas = function () {\n if (this.destroyed) return;\n // 如果是在动画,则不刷新视图\n var isRefresh = this.get('refresh');\n if (!isRefresh) {\n return;\n }\n var graph = this.get('graph');\n if (graph.get('destroyed')) {\n return;\n }\n // 如果是视口变换,也不刷新视图,但是需要重置视口大小和位置\n if (this.get('viewportChange')) {\n this.set('viewportChange', false);\n this.updateViewport();\n }\n var size = this.get('size'); // 用户定义的 minimap size\n var canvas = this.get('canvas'); // minimap 的 canvas\n var type = this.get('type'); // minimap 的类型\n var padding = this.get('padding'); // 用户额定义的 minimap 的 padding\n if (canvas.destroyed) {\n return;\n }\n switch (type) {\n case DEFAULT_MODE:\n this.updateGraphShapes();\n break;\n case KEYSHAPE_MODE:\n this.updateKeyShapes();\n break;\n case DELEGATE_MODE:\n // 得到的节点直接带有 x 和 y,每个节点不存在父 group,即每个节点位置不由父 group 控制\n this.updateDelegateShapes();\n break;\n default:\n break;\n }\n var group = canvas.get('children')[0];\n if (!group) return;\n group.resetMatrix();\n // 该 bbox 是准确的,不计算 matrix 的包围盒\n var bbox = group.getCanvasBBox();\n var graphBBox = graph.get('canvas').getCanvasBBox(); // 主图的 bbox\n var graphZoom = graph.getZoom() || 1;\n var width = graphBBox.width / graphZoom;\n var height = graphBBox.height / graphZoom;\n if (Number.isFinite(bbox.width)) {\n // 刷新后bbox可能会变,需要重置画布矩阵以缩放到合适的大小\n width = max(bbox.width, width);\n height = max(bbox.height, height);\n }\n width += 2 * padding;\n height += 2 * padding;\n var ratio = Math.min(size[0] / width, size[1] / height);\n var matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var minX = 0;\n var minY = 0;\n // 平移到左上角\n if (Number.isFinite(bbox.minX)) {\n minX = -bbox.minX;\n }\n if (Number.isFinite(bbox.minY)) {\n minY = -bbox.minY;\n }\n // 缩放到适合视口后, 平移到画布中心\n var dx = (size[0] - (width - 2 * padding) * ratio) / 2;\n var dy = (size[1] - (height - 2 * padding) * ratio) / 2;\n matrix = transform(matrix, [['t', minX, minY], ['s', ratio, ratio], ['t', dx, dy] // 移动到画布中心\n ]);\n\n group.setMatrix(matrix);\n // 更新minimap视口\n this.set('ratio', ratio);\n this.set('totaldx', dx + minX * ratio);\n this.set('totaldy', dy + minY * ratio);\n this.set('dx', dx);\n this.set('dy', dy);\n this.updateViewport();\n };\n /**\n * 获取minimap的画布\n * @return {GCanvas} G的canvas实例\n */\n MiniMap.prototype.getCanvas = function () {\n return this.get('canvas');\n };\n /**\n * 获取minimap的窗口\n * @return {HTMLElement} 窗口的dom实例\n */\n MiniMap.prototype.getViewport = function () {\n return this.get('viewport');\n };\n /**\n * 获取minimap的容器dom\n * @return {HTMLElement} dom\n */\n MiniMap.prototype.getContainer = function () {\n return this.get('container');\n };\n MiniMap.prototype.destroy = function () {\n var _a;\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.destroy();\n var container = this.get('container');\n if (container === null || container === void 0 ? void 0 : container.parentNode) container.parentNode.removeChild(container);\n };\n return MiniMap;\n}(Base);\nexport default MiniMap;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport Base from '../base';\nfunction getEucliDis(pointA, pointB, eps) {\n var vx = pointA.x - pointB.x;\n var vy = pointA.y - pointB.y;\n if (!eps || Math.abs(vx) > eps || Math.abs(vy) > eps) {\n return Math.sqrt(vx * vx + vy * vy);\n }\n return eps;\n}\nfunction getDotProduct(ei, ej) {\n return ei.x * ej.x + ei.y * ej.y;\n}\nfunction projectPointToEdge(p, e) {\n var k = (e.source.y - e.target.y) / (e.source.x - e.target.x);\n var x = (k * k * e.source.x + k * (p.y - e.source.y) + p.x) / (k * k + 1);\n var y = k * (x - e.source.x) + e.source.y;\n return {\n x: x,\n y: y\n };\n}\nvar Bundling = /** @class */function (_super) {\n __extends(Bundling, _super);\n function Bundling(config) {\n return _super.call(this, config) || this;\n }\n Bundling.prototype.getDefaultCfgs = function () {\n return {\n edgeBundles: [],\n edgePoints: [],\n K: 0.1,\n lambda: 0.1,\n divisions: 1,\n divRate: 2,\n cycles: 6,\n iterations: 90,\n iterRate: 0.6666667,\n bundleThreshold: 0.6,\n eps: 1e-6,\n onLayoutEnd: function onLayoutEnd() {},\n onTick: function onTick() {}\n };\n };\n Bundling.prototype.init = function () {\n var graph = this.get('graph');\n var onTick = this.get('onTick');\n var tick = function tick() {\n if (onTick) {\n onTick();\n }\n graph.refreshPositions();\n };\n this.set('tick', tick);\n };\n Bundling.prototype.bundling = function (data) {\n var self = this;\n self.set('data', data);\n // 如果正在布局,忽略布局请求\n if (self.isTicking()) {\n return;\n }\n var edges = data.edges || [];\n var nodes = data.nodes || [];\n var nodeIdMap = {};\n var error = false;\n nodes.forEach(function (node) {\n if (node.x === null || !node.y === null || node.x === undefined || !node.y === undefined) {\n error = true;\n }\n nodeIdMap[node.id] = node;\n });\n if (error) throw new Error('please layout the graph or assign x and y for nodes first');\n self.set('nodeIdMap', nodeIdMap);\n // subdivide each edges\n var divisions = self.get('divisions');\n var divRate = self.get('divRate');\n var edgePoints = self.divideEdges(divisions);\n self.set('edgePoints', edgePoints);\n // compute the bundles\n var edgeBundles = self.getEdgeBundles();\n self.set('edgeBundles', edgeBundles);\n // iterations\n var C = self.get('cycles');\n var iterations = self.get('iterations');\n var iterRate = self.get('iterRate');\n var lambda = self.get('lambda');\n for (var i = 0; i < C; i++) {\n var _loop_1 = function _loop_1(j) {\n var forces = [];\n edges.forEach(function (e, k) {\n if (e.source === e.target) return;\n var source = nodeIdMap[e.source];\n var target = nodeIdMap[e.target];\n forces[k] = self.getEdgeForces({\n source: source,\n target: target\n }, k, divisions, lambda);\n for (var p = 0; p < divisions + 1; p++) {\n edgePoints[k][p].x += forces[k][p].x;\n edgePoints[k][p].y += forces[k][p].y;\n }\n });\n };\n for (var j = 0; j < iterations; j++) {\n _loop_1(j);\n }\n // parameters for nex cycle\n lambda = lambda / 2;\n divisions *= divRate;\n iterations *= iterRate;\n edgePoints = self.divideEdges(divisions);\n self.set('edgePoints', edgePoints);\n }\n // change the edges according to edgePoints\n edges.forEach(function (e, i) {\n if (e.source === e.target) return;\n e.type = 'polyline';\n e.controlPoints = edgePoints[i].slice(1, edgePoints[i].length - 1);\n });\n var graph = self.get('graph');\n graph.refresh();\n };\n Bundling.prototype.updateBundling = function (cfg) {\n var self = this;\n var data = cfg.data;\n if (data) {\n self.set('data', data);\n }\n if (self.get('ticking')) {\n self.set('ticking', false);\n }\n Object.keys(cfg).forEach(function (key) {\n self.set(key, cfg[key]);\n });\n if (cfg.onTick) {\n var graph_1 = this.get('graph');\n self.set('tick', function () {\n cfg.onTick();\n graph_1.refresh();\n });\n }\n self.bundling(data);\n };\n Bundling.prototype.divideEdges = function (divisions) {\n var self = this;\n var edges = self.get('data').edges;\n var nodeIdMap = self.get('nodeIdMap');\n var edgePoints = self.get('edgePoints');\n if (!edgePoints || edgePoints === undefined) edgePoints = [];\n edges.forEach(function (edge, i) {\n var _a;\n if (!edgePoints[i] || edgePoints[i] === undefined) {\n edgePoints[i] = [];\n }\n var source = nodeIdMap[edge.source];\n var target = nodeIdMap[edge.target];\n if (divisions === 1) {\n edgePoints[i].push({\n x: source.x,\n y: source.y\n }); // source\n edgePoints[i].push({\n x: 0.5 * (source.x + target.x),\n y: 0.5 * (source.y + target.y)\n }); // mid\n edgePoints[i].push({\n x: target.x,\n y: target.y\n }); // target\n } else {\n var edgeLength = 0;\n if (!((_a = edgePoints[i]) === null || _a === void 0 ? void 0 : _a.length)) {\n // it is a straight line\n edgeLength = getEucliDis({\n x: source.x,\n y: source.y\n }, {\n x: target.x,\n y: target.y\n });\n } else {\n edgeLength = self.getEdgeLength(edgePoints[i]);\n }\n var divisionLength_1 = edgeLength / (divisions + 1);\n var currentDivisonLength_1 = divisionLength_1;\n var newEdgePoints_1 = [{\n x: source.x,\n y: source.y\n }]; // source\n edgePoints[i].forEach(function (ep, j) {\n if (j === 0) return;\n var oriDivisionLength = getEucliDis(ep, edgePoints[i][j - 1]);\n while (oriDivisionLength > currentDivisonLength_1) {\n var ratio = currentDivisonLength_1 / oriDivisionLength;\n var edgePoint = {\n x: edgePoints[i][j - 1].x,\n y: edgePoints[i][j - 1].y\n };\n edgePoint.x += ratio * (ep.x - edgePoints[i][j - 1].x);\n edgePoint.y += ratio * (ep.y - edgePoints[i][j - 1].y);\n newEdgePoints_1.push(edgePoint);\n oriDivisionLength -= currentDivisonLength_1;\n currentDivisonLength_1 = divisionLength_1;\n }\n currentDivisonLength_1 -= oriDivisionLength;\n });\n newEdgePoints_1.push({\n x: target.x,\n y: target.y\n }); // target\n edgePoints[i] = newEdgePoints_1;\n }\n });\n return edgePoints;\n };\n /**\n * 计算边的长度\n * @param points\n */\n Bundling.prototype.getEdgeLength = function (points) {\n var length = 0;\n points.forEach(function (p, i) {\n if (i === 0) return;\n length += getEucliDis(p, points[i - 1]);\n });\n return length;\n };\n Bundling.prototype.getEdgeBundles = function () {\n var self = this;\n var data = self.get('data');\n var edges = data.edges || [];\n var bundleThreshold = self.get('bundleThreshold');\n var nodeIdMap = self.get('nodeIdMap');\n var edgeBundles = self.get('edgeBundles');\n if (!edgeBundles) edgeBundles = [];\n edges.forEach(function (e, i) {\n if (!edgeBundles[i] || edgeBundles[i] === undefined) {\n edgeBundles[i] = [];\n }\n });\n edges.forEach(function (ei, i) {\n var iSource = nodeIdMap[ei.source];\n var iTarget = nodeIdMap[ei.target];\n edges.forEach(function (ej, j) {\n if (j <= i) return;\n var jSource = nodeIdMap[ej.source];\n var jTarget = nodeIdMap[ej.target];\n var score = self.getBundleScore({\n source: iSource,\n target: iTarget\n }, {\n source: jSource,\n target: jTarget\n });\n if (score >= bundleThreshold) {\n edgeBundles[i].push(j);\n edgeBundles[j].push(i);\n }\n });\n });\n return edgeBundles;\n };\n Bundling.prototype.getBundleScore = function (ei, ej) {\n var self = this;\n ei.vx = ei.target.x - ei.source.x;\n ei.vy = ei.target.y - ei.source.y;\n ej.vx = ej.target.x - ej.source.x;\n ej.vy = ej.target.y - ej.source.y;\n ei.length = getEucliDis({\n x: ei.source.x,\n y: ei.source.y\n }, {\n x: ei.target.x,\n y: ei.target.y\n });\n ej.length = getEucliDis({\n x: ej.source.x,\n y: ej.source.y\n }, {\n x: ej.target.x,\n y: ej.target.y\n });\n // angle score\n var aScore = self.getAngleScore(ei, ej);\n // scale score\n var sScore = self.getScaleScore(ei, ej);\n // position score\n var pScore = self.getPositionScore(ei, ej);\n // visibility socre\n var vScore = self.getVisibilityScore(ei, ej);\n return aScore * sScore * pScore * vScore;\n };\n Bundling.prototype.getAngleScore = function (ei, ej) {\n var dotProduct = getDotProduct({\n x: ei.vx,\n y: ei.vy\n }, {\n x: ej.vx,\n y: ej.vy\n });\n return dotProduct / (ei.length * ej.length);\n };\n Bundling.prototype.getScaleScore = function (ei, ej) {\n var aLength = (ei.length + ej.length) / 2;\n var score = 2 / (aLength / Math.min(ei.length, ej.length) + Math.max(ei.length, ej.length) / aLength);\n return score;\n };\n Bundling.prototype.getPositionScore = function (ei, ej) {\n var aLength = (ei.length + ej.length) / 2;\n var iMid = {\n x: (ei.source.x + ei.target.x) / 2,\n y: (ei.source.y + ei.target.y) / 2\n };\n var jMid = {\n x: (ej.source.x + ej.target.x) / 2,\n y: (ej.source.y + ej.target.y) / 2\n };\n var distance = getEucliDis(iMid, jMid);\n return aLength / (aLength + distance);\n };\n Bundling.prototype.getVisibilityScore = function (ei, ej) {\n var vij = this.getEdgeVisibility(ei, ej);\n var vji = this.getEdgeVisibility(ej, ei);\n return vij < vji ? vij : vji;\n };\n Bundling.prototype.getEdgeVisibility = function (ei, ej) {\n var ps = projectPointToEdge(ej.source, ei);\n var pt = projectPointToEdge(ej.target, ei);\n var pMid = {\n x: (ps.x + pt.x) / 2,\n y: (ps.y + pt.y) / 2\n };\n var iMid = {\n x: (ei.source.x + ei.target.x) / 2,\n y: (ei.source.y + ei.target.y) / 2\n };\n return Math.max(0, 1 - 2 * getEucliDis(pMid, iMid) / getEucliDis(ps, pt));\n };\n Bundling.prototype.getEdgeForces = function (e, eidx, divisions, lambda) {\n var self = this;\n var edgePoints = self.get('edgePoints');\n var K = self.get('K');\n var kp = K / (getEucliDis(e.source, e.target) * (divisions + 1));\n var edgePointForces = [{\n x: 0,\n y: 0\n }];\n for (var i = 1; i < divisions; i++) {\n var force = {\n x: 0,\n y: 0\n };\n var spring = self.getSpringForce({\n pre: edgePoints[eidx][i - 1],\n cur: edgePoints[eidx][i],\n next: edgePoints[eidx][i + 1]\n }, kp);\n var electrostatic = self.getElectrostaticForce(i, eidx);\n force.x = lambda * (spring.x + electrostatic.x);\n force.y = lambda * (spring.y + electrostatic.y);\n edgePointForces.push(force);\n }\n edgePointForces.push({\n x: 0,\n y: 0\n });\n return edgePointForces;\n };\n Bundling.prototype.getSpringForce = function (divisions, kp) {\n var x = divisions.pre.x + divisions.next.x - 2 * divisions.cur.x;\n var y = divisions.pre.y + divisions.next.y - 2 * divisions.cur.y;\n x *= kp;\n y *= kp;\n return {\n x: x,\n y: y\n };\n };\n Bundling.prototype.getElectrostaticForce = function (pidx, eidx) {\n var self = this;\n var eps = self.get('eps');\n var edgeBundles = self.get('edgeBundles');\n var edgePoints = self.get('edgePoints');\n var edgeBundle = edgeBundles[eidx];\n var resForce = {\n x: 0,\n y: 0\n };\n edgeBundle.forEach(function (eb) {\n var force = {\n x: edgePoints[eb][pidx].x - edgePoints[eidx][pidx].x,\n y: edgePoints[eb][pidx].y - edgePoints[eidx][pidx].y\n };\n if (Math.abs(force.x) > eps || Math.abs(force.y) > eps) {\n var length_1 = getEucliDis(edgePoints[eb][pidx], edgePoints[eidx][pidx]);\n var diff = 1 / length_1;\n resForce.x += force.x * diff;\n resForce.y += force.y * diff;\n }\n });\n return resForce;\n };\n Bundling.prototype.isTicking = function () {\n return this.get('ticking');\n };\n Bundling.prototype.getSimulation = function () {\n return this.get('forceSimulation');\n };\n Bundling.prototype.destroy = function () {\n if (this.get('ticking')) {\n this.getSimulation().stop();\n }\n _super.prototype.destroy.call(this);\n };\n return Bundling;\n}(Base);\nexport default Bundling;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { clone } from '@antv/util';\nimport Base from '../base';\nvar DELTA = 0.05;\nvar lensDelegateStyle = {\n stroke: '#000',\n strokeOpacity: 0.8,\n lineWidth: 2,\n fillOpacity: 0.1,\n fill: '#ccc'\n};\nvar Fisheye = /** @class */function (_super) {\n __extends(Fisheye, _super);\n function Fisheye(config) {\n return _super.call(this, config) || this;\n }\n Fisheye.prototype.getDefaultCfgs = function () {\n return {\n trigger: 'mousemove',\n d: 1.5,\n r: 300,\n delegateStyle: clone(lensDelegateStyle),\n showLabel: false,\n maxD: 5,\n minD: 0,\n scaleRBy: 'unset',\n scaleDBy: 'unset',\n showDPercent: true\n };\n };\n // class-methods-use-this\n Fisheye.prototype.getEvents = function () {\n var events;\n switch (this.get('trigger')) {\n case 'click':\n events = {\n click: 'magnify'\n };\n break;\n case 'drag':\n events = {\n click: 'createDelegate'\n };\n break;\n default:\n events = {\n mousemove: 'magnify'\n };\n break;\n }\n return events;\n };\n Fisheye.prototype.init = function () {\n var self = this;\n var r = self.get('r');\n self.set('cachedMagnifiedModels', []);\n self.set('cachedOriginPositions', {});\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n };\n // Create the delegate when the trigger is drag\n Fisheye.prototype.createDelegate = function (e) {\n var _this = this;\n var self = this;\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n self.magnify(e);\n lensDelegate = self.get('delegate');\n // drag to move the lens\n lensDelegate.on('dragstart', function (evt) {\n self.set('delegateCenterDiff', {\n x: lensDelegate.attr('x') - evt.x,\n y: lensDelegate.attr('y') - evt.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n self.magnify(evt);\n });\n // 绑定调整范围(r)和缩放系数(d)的监听\n // 由于 drag 用于改变 lens 位置, 因此在此模式下, drag 不能用于调整 r 和 d\n // scaling d\n if (this.get('scaleDBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n _this.scaleDByWheel(evt);\n });\n }\n // scaling r\n if (this.get('scaleRBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n };\n /**\n * Scale the range by wheel\n * @param e mouse wheel event\n */\n Fisheye.prototype.scaleRByWheel = function (e) {\n var self = this;\n if (!e || !e.originalEvent) return;\n if (e.preventDefault) e.preventDefault();\n var graph = self.get('graph');\n var ratio;\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n var mousePos = lensCenter || graph.getPointByClient(e.clientX, e.clientY);\n if (e.originalEvent.wheelDelta < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n self.set('delegateCenterDiff', undefined);\n self.magnify(e, mousePos);\n };\n /**\n * Scale the range by dragging\n * @param e mouse event\n */\n Fisheye.prototype.scaleRByDrag = function (e) {\n var self = this;\n if (!e) return;\n var dragPrePos = self.get('dragPrePos');\n var graph = self.get('graph');\n var ratio;\n var mousePos = graph.getPointByClient(e.clientX, e.clientY);\n if (e.x - dragPrePos.x < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n self.magnify(e, mousePos);\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n };\n /**\n * Scale the magnifying factor by wheel\n * @param e mouse wheel event\n */\n Fisheye.prototype.scaleDByWheel = function (evt) {\n var self = this;\n if (!evt && !evt.originalEvent) return;\n if (evt.preventDefault) evt.preventDefault();\n var delta = 0;\n if (evt.originalEvent.wheelDelta < 0) {\n delta = -0.1;\n } else {\n delta = 0.1;\n }\n var d = self.get('d');\n var newD = d + delta;\n var maxD = self.get('maxD');\n var minD = self.get('minD');\n if (newD < maxD && newD > minD) {\n self.set('d', newD);\n var r = self.get('r');\n self.set('molecularParam', (newD + 1) * r);\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n self.set('delegateCenterDiff', undefined);\n self.magnify(evt, lensCenter);\n }\n };\n /**\n * Scale the magnifying factor by dragging\n * @param e mouse event\n */\n Fisheye.prototype.scaleDByDrag = function (e) {\n var self = this;\n var dragPrePos = self.get('dragPrePos');\n var delta = e.x - dragPrePos.x > 0 ? 0.1 : -0.1;\n var d = self.get('d');\n var newD = d + delta;\n var maxD = self.get('maxD');\n var minD = self.get('minD');\n if (newD < maxD && newD > minD) {\n self.set('d', newD);\n var r = self.get('r');\n self.set('molecularParam', (newD + 1) * r);\n self.magnify(e);\n }\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n };\n /**\n * Response function for mousemove, click, or drag to magnify\n * @param e mouse event\n */\n Fisheye.prototype.magnify = function (e, mousePos) {\n var self = this;\n self.restoreCache();\n var graph = self.get('graph');\n var cachedMagnifiedModels = self.get('cachedMagnifiedModels');\n var cachedOriginPositions = self.get('cachedOriginPositions');\n var showLabel = self.get('showLabel');\n var r = self.get('r');\n var r2 = self.get('r2');\n var d = self.get('d');\n var molecularParam = self.get('molecularParam');\n var nodes = graph.getNodes();\n var nodeLength = nodes.length;\n var mCenter = mousePos ? {\n x: mousePos.x,\n y: mousePos.y\n } : {\n x: e.x,\n y: e.y\n };\n if (self.get('dragging') && (self.get('trigger') === 'mousemove' || self.get('trigger') === 'click')) {\n mCenter = self.get('cacheCenter');\n }\n var delegateCenterDiff = self.get('delegateCenterDiff');\n if (delegateCenterDiff) {\n mCenter.x += delegateCenterDiff.x;\n mCenter.y += delegateCenterDiff.y;\n }\n self.updateDelegate(mCenter, r);\n for (var i = 0; i < nodeLength; i++) {\n var model = nodes[i].getModel();\n var x = model.x,\n y = model.y;\n if (isNaN(x) || isNaN(y)) continue;\n // the square of the distance between the node and the magnified center\n var dist2 = (x - mCenter.x) * (x - mCenter.x) + (y - mCenter.y) * (y - mCenter.y);\n if (!isNaN(dist2) && dist2 < r2 && dist2 !== 0) {\n var dist = Math.sqrt(dist2);\n // (r * (d + 1) * (dist / r)) / (d * (dist / r) + 1);\n var magnifiedDist = molecularParam * dist / (d * dist + r);\n var cos = (x - mCenter.x) / dist;\n var sin = (y - mCenter.y) / dist;\n model.x = cos * magnifiedDist + mCenter.x;\n model.y = sin * magnifiedDist + mCenter.y;\n if (!cachedOriginPositions[model.id]) {\n cachedOriginPositions[model.id] = {\n x: x,\n y: y,\n texts: []\n };\n }\n cachedMagnifiedModels.push(model);\n if (showLabel && 2 * dist < r) {\n var node = nodes[i];\n var nodeGroup = node.getContainer();\n var shapes = nodeGroup.getChildren();\n var shapeLength = shapes.length;\n for (var j = 0; j < shapeLength; j++) {\n var shape = shapes[j];\n if (shape.get('type') === 'text') {\n cachedOriginPositions[model.id].texts.push({\n visible: shape.get('visible'),\n shape: shape\n });\n shape.set('visible', true);\n }\n }\n }\n }\n }\n graph.refreshPositions();\n };\n /**\n * Restore the cache nodes while magnifying\n */\n Fisheye.prototype.restoreCache = function () {\n var self = this;\n var cachedMagnifiedModels = self.get('cachedMagnifiedModels');\n var cachedOriginPositions = self.get('cachedOriginPositions');\n var cacheLength = cachedMagnifiedModels.length;\n for (var i = 0; i < cacheLength; i++) {\n var node = cachedMagnifiedModels[i];\n var id = node.id;\n var ori = cachedOriginPositions[id];\n node.x = ori.x;\n node.y = ori.y;\n var textLength = ori.texts.length;\n for (var j = 0; j < textLength; j++) {\n var text = ori.texts[j];\n text.shape.set('visible', text.visible);\n }\n }\n self.set('cachedMagnifiedModels', []);\n self.set('cachedOriginPositions', {});\n };\n /**\n * Adjust part of the parameters, including trigger, d, r, maxR, minR, maxD, minD, scaleRBy, and scaleDBy\n * @param {FisheyeConfig} cfg\n */\n Fisheye.prototype.updateParams = function (cfg) {\n var self = this;\n var r = cfg.r,\n d = cfg.d,\n trigger = cfg.trigger,\n minD = cfg.minD,\n maxD = cfg.maxD,\n minR = cfg.minR,\n maxR = cfg.maxR,\n scaleDBy = cfg.scaleDBy,\n scaleRBy = cfg.scaleRBy;\n if (!isNaN(cfg.r)) {\n self.set('r', r);\n self.set('r2', r * r);\n }\n if (!isNaN(d)) {\n self.set('d', d);\n }\n if (!isNaN(maxD)) {\n self.set('maxD', maxD);\n }\n if (!isNaN(minD)) {\n self.set('minD', minD);\n }\n if (!isNaN(maxR)) {\n self.set('maxR', maxR);\n }\n if (!isNaN(minR)) {\n self.set('minR', minR);\n }\n var nd = self.get('d');\n var nr = self.get('r');\n self.set('molecularParam', (nd + 1) * nr);\n if (trigger === 'mousemove' || trigger === 'click' || trigger === 'drag') {\n self.set('trigger', trigger);\n }\n if (scaleDBy === 'drag' || scaleDBy === 'wheel' || scaleDBy === 'unset') {\n self.set('scaleDBy', scaleDBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n if (scaleRBy === 'drag' || scaleRBy === 'wheel' || scaleRBy === 'unset') {\n self.set('scaleRBy', scaleRBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n };\n /**\n * Update the delegate shape of the lens\n * @param {Point} mCenter the center of the shape\n * @param {number} r the radius of the shape\n */\n Fisheye.prototype.updateDelegate = function (mCenter, r) {\n var _this = this;\n var self = this;\n var graph = self.get('graph');\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = self.get('delegateStyle') || lensDelegateStyle;\n // model上的x, y是相对于图形中心的, delegateShape是g实例, x,y是绝对坐标\n lensDelegate = parent_1.addShape('circle', {\n attrs: __assign({\n r: r / 1.5,\n x: mCenter.x,\n y: mCenter.y\n }, attrs),\n name: 'lens-shape',\n draggable: true\n });\n if (this.get('trigger') !== 'drag') {\n // 调整范围 r 的监听\n if (this.get('scaleRBy') === 'wheel') {\n // 使用滚轮调整 r\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n } else if (this.get('scaleRBy') === 'drag') {\n // 使用拖拽调整 r\n lensDelegate.on('dragstart', function (e) {\n self.set('dragging', true);\n self.set('cacheCenter', {\n x: e.x,\n y: e.y\n });\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n self.scaleRByDrag(evt);\n });\n lensDelegate.on('dragend', function (e) {\n self.set('dragging', false);\n });\n }\n // 调整缩放系数 d 的监听\n if (this.get('scaleDBy') === 'wheel') {\n // 使用滚轮调整 d\n lensDelegate.on('mousewheel', function (evt) {\n _this.scaleDByWheel(evt);\n });\n } else if (this.get('scaleDBy') === 'drag') {\n // 使用拖拽调整 d\n lensDelegate.on('dragstart', function (evt) {\n self.set('dragging', true);\n self.set('cacheCenter', {\n x: evt.x,\n y: evt.y\n });\n self.set('dragPrePos', {\n x: evt.x,\n y: evt.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n _this.scaleDByDrag(evt);\n });\n lensDelegate.on('dragend', function (evt) {\n self.set('dragging', false);\n });\n }\n }\n } else {\n lensDelegate.attr({\n x: mCenter.x,\n y: mCenter.y,\n r: r / 1.5\n });\n }\n // 绘制缩放系数百分比文本\n if (self.get('showDPercent')) {\n var percent = Math.round((self.get('d') - self.get('minD')) / (self.get('maxD') - self.get('minD')) * 100);\n var dPercentText = self.get('dPercentText');\n var textY = mCenter.y + r / 1.5 + 16;\n if (!dPercentText || dPercentText.destroyed) {\n var parent_2 = graph.get('group');\n dPercentText = parent_2.addShape('text', {\n attrs: {\n text: \"\".concat(percent, \"%\"),\n x: mCenter.x,\n y: textY,\n fill: '#aaa',\n stroke: '#fff',\n lineWidth: 1,\n fontSize: 12\n }\n });\n self.set('dPercentText', dPercentText);\n } else {\n dPercentText.attr({\n text: \"\".concat(percent, \"%\"),\n x: mCenter.x,\n y: textY\n });\n }\n }\n self.set('delegate', lensDelegate);\n };\n /**\n * Clear the fisheye lens\n */\n Fisheye.prototype.clear = function () {\n var graph = this.get('graph');\n this.restoreCache();\n graph.refreshPositions();\n var lensDelegate = this.get('delegate');\n if (lensDelegate && !lensDelegate.destroyed) {\n lensDelegate.remove();\n lensDelegate.destroy();\n }\n var dPercentText = this.get('dPercentText');\n if (dPercentText && !dPercentText.destroyed) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n };\n /**\n * Destroy the component\n */\n Fisheye.prototype.destroy = function () {\n this.clear();\n };\n return Fisheye;\n}(Base);\nexport default Fisheye;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { clone, isString } from '@antv/util';\nimport Base from '../base';\nimport insertCss from 'insert-css';\nvar DELTA = 0.05;\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-toolbar {\\n position: absolute;\\n list-style-type: none;\\n padding: 6px;\\n left: 0px;\\n top: 0px;\\n background-color: rgba(255, 255, 255, 0.9);\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n margin: 0;\\n }\\n .g6-component-toolbar li {\\n float: left;\\n text-align: center;\\n width: 35px;\\n height: 24px;\\n cursor: pointer;\\n\\t\\tlist-style-type:none;\\n list-style: none;\\n margin-left: 0px;\\n }\\n .g6-component-toolbar li .icon {\\n opacity: 0.7;\\n }\\n .g6-component-toolbar li .icon:hover {\\n opacity: 1;\\n }\\n\");\nvar getEventPath = function getEventPath(evt) {\n if (!evt) {\n return [];\n }\n if (evt.composedPath) {\n return evt.composedPath();\n }\n var path = [];\n var el = evt.target;\n while (el) {\n path.push(el);\n if (el.tagName === 'HTML') {\n path.push(document, window);\n return path;\n }\n el = el.parentElement;\n }\n return path;\n};\nvar ToolBar = /** @class */function (_super) {\n __extends(ToolBar, _super);\n function ToolBar(config) {\n return _super.call(this, config) || this;\n }\n ToolBar.prototype.getDefaultCfgs = function () {\n return {\n handleClick: undefined,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(graph) {\n return \"\\n
    \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
\\n \";\n },\n zoomSensitivity: 2\n };\n };\n ToolBar.prototype.init = function () {\n var _this = this;\n var graph = this.get('graph');\n var getContent = this.get('getContent');\n var toolBar = getContent(graph);\n var toolBarDOM = toolBar;\n if (isString(toolBar)) {\n toolBarDOM = createDom(toolBar);\n }\n var className = this.get('className');\n toolBarDOM.setAttribute('class', className || 'g6-component-toolbar');\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.appendChild(toolBarDOM);\n this.set('toolBar', toolBarDOM);\n var handleClick = this.get('handleClick');\n toolBarDOM.addEventListener('click', function (evt) {\n var current = getEventPath(evt).filter(function (p) {\n return p.nodeName === 'LI';\n });\n if (current.length === 0) {\n return;\n }\n var code = current[0].getAttribute('code');\n if (!code) {\n return;\n }\n if (handleClick) {\n handleClick(code, graph);\n } else {\n _this.handleDefaultOperator(code);\n }\n });\n var pos = this.get('position');\n if (pos) {\n modifyCSS(toolBarDOM, {\n top: \"\".concat(pos.y, \"px\"),\n left: \"\".concat(pos.x, \"px\")\n });\n }\n this.bindUndoRedo();\n };\n ToolBar.prototype.bindUndoRedo = function () {\n var graph = this.get('graph');\n var undoDom = document.querySelector('.g6-component-toolbar li[code=\"undo\"]');\n var undoDomIcon = document.querySelector('.g6-component-toolbar li[code=\"undo\"] svg');\n var redoDom = document.querySelector('.g6-component-toolbar li[code=\"redo\"]');\n var redoDomIcon = document.querySelector('.g6-component-toolbar li[code=\"redo\"] svg');\n if (!undoDom || !undoDomIcon || !redoDom || !redoDomIcon) {\n return;\n }\n // initialy disabled redo and undo icons\n undoDom.setAttribute('style', 'cursor: not-allowed');\n undoDomIcon.setAttribute('style', 'opacity: 0.4');\n redoDom.setAttribute('style', 'cursor: not-allowed');\n redoDomIcon.setAttribute('style', 'opacity: 0.4');\n graph.on('stackchange', function (evt) {\n var undoStack = evt.undoStack,\n redoStack = evt.redoStack;\n var undoStackLen = undoStack.length;\n var redoStackLen = redoStack.length;\n // undo 不可用\n if (undoStackLen === 0) {\n undoDom.setAttribute('style', 'cursor: not-allowed');\n undoDomIcon.setAttribute('style', 'opacity: 0.4');\n } else {\n undoDom.removeAttribute('style');\n undoDomIcon.removeAttribute('style');\n }\n // redo 不可用\n if (redoStackLen === 0) {\n redoDom.setAttribute('style', 'cursor: not-allowed');\n redoDomIcon.setAttribute('style', 'opacity: 0.4');\n } else {\n redoDom.removeAttribute('style');\n redoDomIcon.removeAttribute('style');\n }\n });\n };\n /**\n * undo 操作\n */\n ToolBar.prototype.undo = function () {\n var graph = this.get('graph');\n var undoStack = graph.getUndoStack();\n if (!undoStack || undoStack.length === 0) {\n return;\n }\n var currentData = undoStack.pop();\n if (currentData) {\n var action = currentData.action;\n graph.pushStack(action, clone(currentData.data), 'redo');\n var data_1 = currentData.data.before;\n if (action === 'add') {\n data_1 = currentData.data.after;\n }\n if (!data_1) return;\n switch (action) {\n case 'visible':\n {\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n if (model.visible) {\n graph.showItem(item, false);\n } else {\n graph.hideItem(item, false);\n }\n });\n });\n break;\n }\n case 'render':\n case 'update':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n delete model.id;\n graph.updateItem(item, model, false);\n if (item.getType() === 'combo') graph.updateCombo(item);\n });\n });\n break;\n case 'changedata':\n graph.changeData(data_1, false);\n break;\n case 'delete':\n {\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var itemType = model.itemType;\n delete model.itemType;\n graph.addItem(itemType, model, false);\n });\n });\n break;\n }\n case 'add':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n });\n break;\n case 'updateComboTree':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n break;\n case 'createCombo':\n var afterCombos = currentData.data.after.combos;\n var createdCombo = afterCombos[afterCombos.length - 1];\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n graph.removeItem(createdCombo.id, false);\n break;\n case 'uncombo':\n var targetCombo_1 = data_1.combos[data_1.combos.length - 1];\n var childrenIds = data_1.nodes.concat(data_1.combos).map(function (child) {\n return child.id;\n }).filter(function (id) {\n return id !== targetCombo_1.id;\n });\n graph.createCombo(targetCombo_1, childrenIds, false);\n break;\n case 'layout':\n graph.updateLayout(data_1, undefined, undefined, false);\n break;\n default:\n }\n }\n };\n /**\n * redo 操作\n */\n ToolBar.prototype.redo = function () {\n var graph = this.get('graph');\n var redoStack = graph.getRedoStack();\n if (!redoStack || redoStack.length === 0) {\n return;\n }\n var currentData = redoStack.pop();\n if (currentData) {\n var action = currentData.action;\n var data_2 = currentData.data.after;\n graph.pushStack(action, clone(currentData.data));\n if (action === 'delete') {\n data_2 = currentData.data.before;\n }\n if (!data_2) return;\n switch (action) {\n case 'visible':\n {\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n if (model.visible) {\n graph.showItem(item, false);\n } else {\n graph.hideItem(item, false);\n }\n });\n });\n break;\n }\n case 'render':\n case 'update':\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n delete model.id;\n graph.updateItem(item, model, false);\n if (item.getType() === 'combo') graph.updateCombo(item);\n });\n });\n break;\n case 'changedata':\n graph.changeData(data_2, false);\n break;\n case 'delete':\n if (data_2.edges) {\n data_2.edges.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n if (data_2.nodes) {\n data_2.nodes.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n if (data_2.combos) {\n data_2.combos.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n break;\n case 'add':\n {\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var itemType = model.itemType;\n delete model.itemType;\n graph.addItem(itemType, model, false);\n });\n });\n break;\n }\n case 'updateComboTree':\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n break;\n case 'createCombo':\n var createdCombo = data_2.combos[data_2.combos.length - 1];\n graph.createCombo(createdCombo, createdCombo.children.map(function (child) {\n return child.id;\n }), false);\n break;\n case 'uncombo':\n var beforeCombos = currentData.data.before.combos;\n var targertCombo = beforeCombos[beforeCombos.length - 1];\n graph.uncombo(targertCombo.id, false);\n break;\n case 'layout':\n graph.updateLayout(data_2, undefined, undefined, false);\n break;\n default:\n }\n }\n };\n /**\n * zoomOut 操作\n */\n ToolBar.prototype.zoomOut = function () {\n var graph = this.get('graph');\n var currentZoom = graph.getZoom();\n var ratioOut = 1 / (1 - DELTA * this.get('zoomSensitivity'));\n var maxZoom = this.get('maxZoom') || graph.get('maxZoom');\n if (ratioOut * currentZoom > maxZoom) {\n return;\n }\n graph.zoomTo(currentZoom * ratioOut);\n };\n /**\n * zoomIn 操作\n */\n ToolBar.prototype.zoomIn = function () {\n var graph = this.get('graph');\n var currentZoom = graph.getZoom();\n var ratioIn = 1 - DELTA * this.get('zoomSensitivity');\n var minZoom = this.get('minZoom') || graph.get('minZoom');\n if (ratioIn * currentZoom < minZoom) {\n return;\n }\n graph.zoomTo(currentZoom * ratioIn);\n };\n /**\n * realZoom 操作\n */\n ToolBar.prototype.realZoom = function () {\n var graph = this.get('graph');\n graph.zoomTo(1);\n };\n /**\n * autoZoom 操作\n */\n ToolBar.prototype.autoZoom = function () {\n var graph = this.get('graph');\n graph.fitView([20, 20]);\n };\n /**\n * 根据 Toolbar 上不同类型对图进行操作\n * @param code 操作类型编码\n * @param graph Graph 实例\n */\n ToolBar.prototype.handleDefaultOperator = function (code) {\n switch (code) {\n case 'redo':\n this.redo();\n break;\n case 'undo':\n this.undo();\n break;\n case 'zoomOut':\n this.zoomOut();\n break;\n case 'zoomIn':\n this.zoomIn();\n break;\n case 'realZoom':\n this.realZoom();\n break;\n case 'autoZoom':\n this.autoZoom();\n break;\n default:\n }\n };\n ToolBar.prototype.destroy = function () {\n var toolBar = this.get('toolBar');\n if (toolBar) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(toolBar);\n }\n var handleClick = this.get('handleClick');\n if (handleClick) {\n toolBar.removeEventListener('click', handleClick);\n }\n };\n return ToolBar;\n}(Base);\nexport default ToolBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { isArray, isString } from '@antv/util';\nimport insertCss from 'insert-css';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-tooltip {\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n background-color: rgba(255, 255, 255, 0.9);\\n padding: 10px 8px;\\n box-shadow: rgb(174, 174, 174) 0px 0px 10px;\\n }\\n .tooltip-type {\\n padding: 0;\\n margin: 0;\\n }\\n .tooltip-id {\\n color: #531dab;\\n }\\n\");\nvar Tooltip = /** @class */function (_super) {\n __extends(Tooltip, _super);\n function Tooltip(config) {\n return _super.call(this, config) || this;\n }\n Tooltip.prototype.getDefaultCfgs = function () {\n return {\n offsetX: 6,\n offsetY: 6,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(e) {\n return \"\\n

\\u7C7B\\u578B\\uFF1A\".concat(e.item.getType(), \"

\\n ID\\uFF1A\").concat(e.item.getID(), \"\\n \");\n },\n shouldBegin: function shouldBegin(e) {\n return true;\n },\n itemTypes: ['node', 'edge', 'combo'],\n trigger: 'mouseenter',\n fixToNode: undefined\n };\n };\n // class-methods-use-this\n Tooltip.prototype.getEvents = function () {\n if (this.get('trigger') === 'click') {\n return {\n 'node:click': 'onClick',\n 'edge:click': 'onClick',\n 'combo:click': 'onClick',\n 'canvas:click': 'onMouseLeave',\n afterremoveitem: 'onMouseLeave',\n contextmenu: 'onMouseLeave',\n drag: 'onMouseLeave'\n };\n }\n return {\n 'node:mouseenter': 'onMouseEnter',\n 'node:mouseleave': 'onMouseLeave',\n 'node:mousemove': 'onMouseMove',\n 'edge:mouseenter': 'onMouseEnter',\n 'edge:mouseleave': 'onMouseLeave',\n 'edge:mousemove': 'onMouseMove',\n 'combo:mouseenter': 'onMouseEnter',\n 'combo:mouseleave': 'onMouseLeave',\n 'combo:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave',\n contextmenu: 'onMouseLeave',\n 'node:drag': 'onMouseLeave'\n };\n };\n Tooltip.prototype.init = function () {\n var self = this;\n var className = self.get('className') || 'g6-component-tooltip';\n var tooltip = createDom(\"
\"));\n var container = self.get('container');\n if (!container) {\n container = self.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n modifyCSS(tooltip, {\n position: 'absolute',\n visibility: 'hidden',\n display: 'none'\n });\n container.appendChild(tooltip);\n if (self.get('trigger') !== 'click') {\n tooltip.addEventListener('mouseenter', function (e) {\n modifyCSS(tooltip, {\n visibility: 'visible',\n display: 'unset'\n });\n });\n tooltip.addEventListener('mouseleave', function (e) {\n self.hideTooltip();\n });\n }\n self.set('tooltip', tooltip);\n };\n Tooltip.prototype.onClick = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var item = e.item;\n var graph = this.get('graph');\n // 若与上一次同一 item,隐藏该 tooltip\n if (this.currentTarget === item) {\n this.currentTarget = null;\n this.hideTooltip();\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'hide'\n });\n } else {\n this.currentTarget = item;\n this.showTooltip(e);\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n }\n };\n Tooltip.prototype.onMouseEnter = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var item = e.item;\n var graph = this.get('graph');\n this.currentTarget = item;\n this.showTooltip(e);\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n };\n Tooltip.prototype.onMouseMove = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n if (!this.currentTarget || e.item !== this.currentTarget) {\n return;\n }\n this.showTooltip(e);\n };\n Tooltip.prototype.onMouseLeave = function () {\n this.hideTooltip();\n var graph = this.get('graph');\n graph.emit('tooltipchange', {\n item: this.currentTarget,\n action: 'hide'\n });\n this.currentTarget = null;\n };\n Tooltip.prototype.clearContainer = function () {\n var container = this.get('tooltip');\n if (container) {\n container.innerHTML = '';\n }\n };\n Tooltip.prototype.showTooltip = function (e) {\n if (!e.item) {\n return;\n }\n var itemTypes = this.get('itemTypes');\n if (e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var container = this.get('tooltip');\n var getContent = this.get('getContent');\n var tooltip = getContent(e);\n if (isString(tooltip)) {\n container.innerHTML = tooltip;\n } else {\n this.clearContainer();\n container.appendChild(tooltip);\n }\n this.updatePosition(e);\n };\n Tooltip.prototype.hideTooltip = function () {\n var tooltip = this.get('tooltip');\n if (tooltip) {\n modifyCSS(tooltip, {\n visibility: 'hidden',\n display: 'none'\n });\n }\n };\n Tooltip.prototype.updatePosition = function (e) {\n var shouldBegin = this.get('shouldBegin');\n var tooltip = this.get('tooltip');\n if (!shouldBegin(e)) {\n modifyCSS(tooltip, {\n visibility: 'hidden',\n display: 'none'\n });\n return;\n }\n var graph = this.get('graph');\n var width = graph.get('width');\n var height = graph.get('height');\n var offsetX = this.get('offsetX') || 0;\n var offsetY = this.get('offsetY') || 0;\n var point = graph.getPointByClient(e.clientX, e.clientY);\n var fixToNode = this.get('fixToNode');\n var item = e.item;\n if (item.getType && item.getType() === 'node' && fixToNode && isArray(fixToNode) && fixToNode.length >= 2) {\n var itemBBox = item.getBBox();\n point = {\n x: itemBBox.minX + itemBBox.width * fixToNode[0],\n y: itemBBox.minY + itemBBox.height * fixToNode[1]\n };\n }\n var _a = graph.getCanvasByPoint(point.x, point.y),\n x = _a.x,\n y = _a.y;\n var graphContainer = graph.getContainer();\n var res = {\n x: x + graphContainer.offsetLeft + offsetX,\n y: y + graphContainer.offsetTop + offsetY\n };\n // 先修改为 visible 方可正确计算 bbox\n modifyCSS(tooltip, {\n visibility: 'visible',\n display: 'unset'\n });\n var bbox = tooltip.getBoundingClientRect();\n if (x + bbox.width + offsetX > width) {\n res.x -= bbox.width + offsetX;\n }\n if (y + bbox.height + offsetY > height) {\n res.y -= bbox.height + offsetY;\n if (res.y < 0) {\n res.y = 0;\n }\n }\n modifyCSS(tooltip, {\n left: \"\".concat(res.x, \"px\"),\n top: \"\".concat(res.y, \"px\")\n });\n };\n Tooltip.prototype.hide = function () {\n this.onMouseLeave();\n };\n Tooltip.prototype.destroy = function () {\n var tooltip = this.get('tooltip');\n if (tooltip) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(tooltip);\n }\n };\n return Tooltip;\n}(Base);\nexport default Tooltip;","export var TIMELINE_START = 'timebarstartplay';\nexport var TIMELINE_END = 'timebarendplay';\nexport var VALUE_CHANGE = 'valuechange';\nexport var TIMEBAR_CONFIG_CHANGE = 'timebarConfigChanged';\nexport var PLAY_PAUSE_BTN = 'playPauseBtn';\nexport var NEXT_STEP_BTN = 'nextStepBtn';\nexport var PRE_STEP_BTN = 'preStepBtn';","import { isString } from '@antv/util';\nimport { createDom, modifyCSS } from '@antv/dom-util';\nexport var BACKGROUND_STYLE = {\n opacity: 0.5,\n fill: '#000'\n};\nexport var ARROW_STYLE = {\n opacity: 0.5,\n fill: '#000',\n r: 5\n};\nexport var TEXT_STYLE = {\n fill: '#fff',\n fontSize: 12\n};\n/**\n * 缩略趋势图\n */\nvar TimeBarTooltip = /** @class */function () {\n function TimeBarTooltip(cfg) {\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n container = cfg.container,\n text = cfg.text,\n _c = cfg.padding,\n padding = _c === void 0 ? [4, 4, 4, 4] : _c,\n _d = cfg.className,\n className = _d === void 0 ? 'g6-component-timebar-tooltip' : _d,\n _e = cfg.backgroundColor,\n backgroundColor = _e === void 0 ? '#000' : _e,\n _f = cfg.textColor,\n textColor = _f === void 0 ? '#fff' : _f,\n _g = cfg.opacity,\n opacity = _g === void 0 ? 0.8 : _g,\n _h = cfg.fontSize,\n fontSize = _h === void 0 ? 12 : _h;\n this.container = container;\n this.className = className;\n this.backgroundColor = backgroundColor;\n this.textColor = textColor;\n this.x = x;\n this.y = y;\n this.text = text;\n this.padding = padding;\n this.opacity = opacity;\n this.fontSize = fontSize;\n this.render();\n }\n /**\n * 首次渲染\n * @private\n */\n TimeBarTooltip.prototype.render = function () {\n var self = this;\n var className = self.className,\n x = self.x,\n y = self.y,\n backgroundColor = self.backgroundColor,\n textColor = self.textColor,\n text = self.text,\n padding = self.padding,\n opacity = self.opacity,\n fontSize = self.fontSize;\n var parentNode = self.container;\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n parentNode.appendChild(container);\n self.parentHeight = parentNode.offsetHeight;\n self.parentWidth = parentNode.offsetWidth;\n modifyCSS(container, {\n visibility: 'hidden',\n top: 0,\n left: 0\n });\n var background = createDom(\"\\n
\"));\n background.innerHTML = text;\n container.appendChild(background);\n self.backgroundDOM = background;\n var arrow = createDom(\"
\"));\n container.appendChild(arrow);\n self.arrowDOM = arrow;\n self.container = container;\n };\n TimeBarTooltip.prototype.show = function (cfg) {\n var self = this;\n var text = cfg.text,\n x = cfg.x,\n y = cfg.y,\n clientX = cfg.clientX,\n clientY = cfg.clientY;\n self.backgroundDOM.innerHTML = text;\n var backgroundWidth = self.backgroundDOM.offsetWidth;\n var backgroundHeight = self.backgroundDOM.offsetHeight;\n var arrowWidth = self.arrowDOM.offsetWidth;\n var arrowHeight = self.arrowDOM.offsetHeight;\n modifyCSS(self.container, {\n top: \"\".concat(-backgroundHeight - arrowHeight, \"px\"),\n left: \"\".concat(x, \"px\"),\n visibility: 'visible'\n });\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2, \"px\")\n });\n modifyCSS(self.arrowDOM, {\n marginLeft: \"\".concat(-arrowWidth / 2, \"px\"),\n top: \"\".concat(backgroundHeight, \"px\")\n });\n var left = x - backgroundWidth / 2;\n var right = x + backgroundWidth / 2;\n if (left < 0) {\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2 - left, \"px\")\n });\n } else if (right > self.parentWidth) {\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2 - right + self.parentWidth + 12, \"px\")\n });\n }\n };\n TimeBarTooltip.prototype.hide = function () {\n modifyCSS(this.container, {\n top: 0,\n left: 0,\n visibility: 'hidden'\n });\n };\n return TimeBarTooltip;\n}();\nexport default TimeBarTooltip;","/**\n * 基于 G 的按钮组件\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { deepMix } from '@antv/util';\nimport { PLAY_PAUSE_BTN } from './constant';\nvar Button = /** @class */function () {\n function Button(cfg) {\n this.config = deepMix({}, cfg);\n this.init();\n }\n Button.prototype.update = function (cfg) {\n this.config = deepMix({}, this.config, cfg);\n this.updateElement();\n this.renderMarker();\n };\n Button.prototype.init = function () {\n this.initElement();\n this.renderMarker();\n };\n Button.prototype.initElement = function () {\n var _a = this.config,\n group = _a.group,\n style = _a.style;\n var _b = style.scale,\n scale = _b === void 0 ? 1 : _b,\n _c = style.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = style.offsetY,\n offsetY = _d === void 0 ? 0 : _d;\n var x = this.config.x + offsetX;\n var y = this.config.y + offsetY;\n var buttonGroup = group.addGroup({\n name: PLAY_PAUSE_BTN\n });\n this.startMarkerGroup = buttonGroup.addGroup({\n name: PLAY_PAUSE_BTN\n });\n this.circle = group.addShape('circle', {\n attrs: __assign({\n x: x,\n y: y,\n r: this.config.r * scale\n }, style),\n name: PLAY_PAUSE_BTN\n });\n this.startMarker = this.startMarkerGroup.addShape('path', {\n attrs: {\n path: this.getStartMarkerPath(x, y, scale),\n fill: style.stroke || '#aaa'\n },\n name: 'start-marker'\n });\n this.pauseMarkerGroup = buttonGroup.addGroup({\n name: PLAY_PAUSE_BTN\n });\n var width = 0.25 * this.config.r * scale;\n var height = 0.5 * this.config.r * Math.sqrt(3) * scale;\n this.pauseLeftMarker = this.pauseMarkerGroup.addShape('rect', {\n attrs: {\n x: x - 0.375 * this.config.r * scale,\n y: y - height / 2,\n width: width,\n height: height,\n fill: style.stroke || '#aaa',\n lineWidth: 0\n }\n });\n this.pauseRightMarker = this.pauseMarkerGroup.addShape('rect', {\n attrs: {\n x: x + 1 / 8 * this.config.r * scale,\n y: y - height / 2,\n width: width,\n height: height,\n fill: style.stroke || '#aaa',\n lineWidth: 0\n }\n });\n };\n Button.prototype.updateElement = function () {\n var _a = this.config.style,\n _b = _a.scale,\n scale = _b === void 0 ? 1 : _b,\n _c = _a.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = _a.offsetY,\n offsetY = _d === void 0 ? 0 : _d;\n var x = this.config.x + offsetX;\n var y = this.config.y + offsetY;\n this.circle.attr('x', x);\n this.circle.attr('y', y);\n this.circle.attr('r', this.config.r * scale);\n this.startMarker.attr('path', this.getStartMarkerPath(x, y, scale));\n var width = 0.25 * this.config.r * scale;\n var height = 0.5 * this.config.r * Math.sqrt(3) * scale;\n this.pauseLeftMarker.attr('x', x - (1 / 4 + 1 / 8) * this.config.r * scale);\n this.pauseLeftMarker.attr('y', y - height / 2);\n this.pauseLeftMarker.attr('width', width);\n this.pauseLeftMarker.attr('height', height);\n this.pauseRightMarker.attr('x', x + 1 / 8 * this.config.r * scale);\n this.pauseRightMarker.attr('y', y - height / 2);\n this.pauseRightMarker.attr('width', width);\n this.pauseRightMarker.attr('height', height);\n };\n Button.prototype.renderMarker = function () {\n if (this.config.isPlay) {\n this.startMarkerGroup.hide();\n this.pauseMarkerGroup.show();\n } else {\n this.startMarkerGroup.show();\n this.pauseMarkerGroup.hide();\n }\n };\n /** 获取播放键 marker path */\n Button.prototype.getStartMarkerPath = function (x, y, scale) {\n var sideLength = 0.5 * this.config.r * Math.sqrt(3) * scale;\n return [['M', x - sideLength / Math.sqrt(3) / 2, y - sideLength / 2], ['L', x + sideLength / Math.sqrt(3), y], ['L', x - sideLength / Math.sqrt(3) / 2, y + sideLength / 2]];\n };\n return Button;\n}();\nexport default Button;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { deepMix } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport Button from './timeButton';\nimport { TIMEBAR_CONFIG_CHANGE, PRE_STEP_BTN, NEXT_STEP_BTN } from './constant';\nvar transform = ext.transform;\nvar DEFAULT_RECT_FILL = '#aaa';\nvar DEFAULT_RECT_STROKE = 'green';\nvar DEFAULT_PLAYBTN_STYLE = {\n fill: '#aaa',\n fillOpacity: 0.35,\n stroke: '#aaa'\n};\nvar DEFAULT_PREBTN_STYLE = {\n fill: '#fff'\n};\nvar DEFAULT_NEXTBTN_STYLE = {\n fill: 'green'\n};\nvar DEFAULT_SPEED_CONTROLLER_STYLE = {\n pointer: {\n fill: '#aaa',\n lineWidth: 0\n },\n scroller: {\n stroke: '#aaa',\n fill: '#aaa',\n lineWidth: 1,\n lineAppendWidth: 5,\n cursor: 'pointer'\n },\n text: {\n fill: '#aaa',\n textBaseline: 'top'\n }\n};\nvar DEFAULT_TIMETYPE_CONTROLLER_STYLE = {\n check: {\n stroke: 'green',\n lineWidth: 3\n },\n box: {\n fill: '#fff',\n stroke: '#aaa',\n lineWidth: 2,\n radius: 3,\n width: 12,\n height: 12\n },\n text: {\n fill: '#aaa',\n fontSize: 12,\n textBaseline: 'top'\n }\n};\nvar DEFAULT_CONTROLLER_CONFIG = {\n speed: 1,\n loop: false,\n fill: '#fff',\n stroke: '#fff',\n hideTimeTypeController: false,\n preBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa'\n },\n nextBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa'\n },\n playBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa',\n fillOpacity: 0.05\n },\n speedControllerStyle: DEFAULT_SPEED_CONTROLLER_STYLE,\n timeTypeControllerStyle: DEFAULT_TIMETYPE_CONTROLLER_STYLE\n};\nvar SPEED_CONTROLLER_OFFSET = 110;\nvar TOGGLE_MODEL_OFFSET = 50;\nexport var TIME_TYPE = {\n SINGLE: 'single',\n RANGE: 'range'\n};\nvar ControllerBtn = /** @class */function () {\n function ControllerBtn(cfg) {\n this.controllerCfg = deepMix({}, DEFAULT_CONTROLLER_CONFIG, cfg);\n this.group = cfg.group;\n this.controllerGroup = this.group.addGroup({\n name: 'controller-group'\n });\n this.speedAxisY = [];\n this.currentSpeed = this.controllerCfg.speed;\n this.currentType = this.controllerCfg.defaultTimeType || TIME_TYPE.RANGE;\n this.fontFamily = cfg.fontFamily || 'Arial, sans-serif';\n this.init();\n }\n ControllerBtn.prototype.init = function () {\n this.renderPlayButton();\n };\n /** 获取播放键 marker path */\n ControllerBtn.prototype.getNextMarkerPath = function (x, y, len) {\n return [['M', x, y - len], ['L', x + len, y], ['L', x, y + len], ['Z', x, y - len], ['M', x, y], ['L', x - len, y - len], ['L', x - len, y + len], ['Z']];\n };\n ControllerBtn.prototype.getPreMarkerPath = function (x, y, len) {\n return [['M', x, y - len], ['L', x - len, y], ['L', x, y + len], ['L', x, y - len], ['M', x, y], ['L', x + len, y - len], ['L', x + len, y + len], ['Z']];\n };\n ControllerBtn.prototype.renderPlayButton = function () {\n var controllerCfg = this.controllerCfg;\n var width = controllerCfg.width,\n height = controllerCfg.height,\n x = controllerCfg.x,\n y = controllerCfg.y,\n hideTimeTypeController = controllerCfg.hideTimeTypeController,\n _a = controllerCfg.fill,\n fill = _a === void 0 ? DEFAULT_RECT_FILL : _a,\n _b = controllerCfg.stroke,\n stroke = _b === void 0 ? DEFAULT_RECT_STROKE : _b,\n _c = controllerCfg.containerStyle,\n containerStyle = _c === void 0 ? {} : _c;\n var playBtnStyle = __assign(__assign({}, DEFAULT_PLAYBTN_STYLE), controllerCfg.playBtnStyle || {});\n var preBtnStyle = __assign(__assign({}, DEFAULT_PREBTN_STYLE), controllerCfg.preBtnStyle || {});\n var nextBtnStyle = __assign(__assign({}, DEFAULT_NEXTBTN_STYLE), controllerCfg.nextBtnStyle || {});\n var r = height / 2 - 5;\n var realY = y + 10;\n // 绘制最外层的矩形包围框\n var container = this.controllerGroup.addShape('rect', {\n attrs: __assign({\n x: x,\n y: realY,\n width: width,\n height: height,\n stroke: stroke,\n fill: fill\n }, containerStyle),\n name: 'container-rect'\n });\n if (this.playButton) {\n this.playButton.update({\n x: width / 2,\n y: realY,\n r: r\n });\n } else {\n this.playButton = new Button({\n group: this.controllerGroup,\n x: width / 2,\n y: realY + r + 5,\n r: r,\n isPlay: this.isPlay,\n style: playBtnStyle\n });\n }\n // 后退按钮\n var prePaddingX = preBtnStyle.offsetX || 0;\n var prePaddingY = preBtnStyle.offsetY || 0;\n var preR = (preBtnStyle.scale || 1) * r;\n this.controllerGroup.addShape('path', {\n attrs: __assign({\n path: this.getPreMarkerPath(width / 2 - 5 * r + prePaddingX, realY + r + 5 + prePaddingY, preR * 0.5)\n }, preBtnStyle),\n name: PRE_STEP_BTN\n });\n // 前进按钮\n var nxtPaddingX = nextBtnStyle.offsetX || 0;\n var nxtPaddingY = nextBtnStyle.offsetY || 0;\n var nxtR = (nextBtnStyle.scale || 1) * r;\n this.controllerGroup.addShape('path', {\n attrs: __assign({\n path: this.getNextMarkerPath(width / 2 + 5 * r + nxtPaddingX, realY + r + 5 + nxtPaddingY, nxtR * 0.5)\n }, nextBtnStyle),\n name: NEXT_STEP_BTN\n });\n container.toBack();\n // 调节speed的按钮\n this.renderSpeedBtn();\n if (!hideTimeTypeController) {\n this.renderToggleTime();\n }\n this.bindEvent();\n // 根据配置的 scale、offsetX,offsetY 缩放和移动控制栏\n var _d = this.controllerCfg.scale,\n scale = _d === void 0 ? 1 : _d;\n var currentBBox = this.controllerGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX, centerY]]);\n this.controllerGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.renderSpeedBtn = function () {\n var _a = this.controllerCfg,\n y = _a.y,\n width = _a.width,\n hideTimeTypeController = _a.hideTimeTypeController;\n var speedControllerStyle = __assign(__assign({}, DEFAULT_SPEED_CONTROLLER_STYLE), this.controllerCfg.speedControllerStyle || {});\n var _b = speedControllerStyle.scroller,\n scroller = _b === void 0 ? {} : _b,\n _c = speedControllerStyle.text,\n text = _c === void 0 ? {} : _c,\n _d = speedControllerStyle.pointer,\n pointer = _d === void 0 ? {} : _d,\n _e = speedControllerStyle.scale,\n scale = _e === void 0 ? 1 : _e,\n _f = speedControllerStyle.offsetX,\n offsetX = _f === void 0 ? 0 : _f,\n _g = speedControllerStyle.offsetY,\n offsetY = _g === void 0 ? 0 : _g;\n var speedGroup = this.controllerGroup.addGroup({\n name: 'speed-group'\n });\n this.speedGroup = speedGroup;\n var speedNum = [];\n var maxSpeed = 5;\n this.speedAxisY = [19, 22, 26, 32, 39];\n // 增加speed刻度\n for (var i = 0; i < 5; i++) {\n var axisY = y + this.speedAxisY[i];\n // 灰色刻度\n var startX = width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET);\n speedGroup.addShape('line', {\n attrs: __assign({\n x1: startX,\n x2: startX + 15,\n y1: axisY,\n y2: axisY\n }, scroller),\n speed: maxSpeed,\n name: 'speed-rect'\n });\n this.speedAxisY[i] = axisY;\n speedNum.push(maxSpeed);\n maxSpeed = maxSpeed - 1;\n }\n // 速度文本\n this.speedText = speedGroup.addShape('text', {\n attrs: __assign({\n x: width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET) + 20,\n y: this.speedAxisY[0] + 4,\n text: \"1.0X\",\n fontFamily: this.fontFamily || 'Arial, sans-serif'\n }, text),\n name: 'speed-text'\n });\n this.speedPoint = speedGroup.addShape('path', {\n attrs: __assign({\n path: this.getPointerPath(width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET), 0),\n matrix: [1, 0, 0, 0, 1, 0, 0, this.speedAxisY[4], 1]\n }, pointer),\n name: 'speed-pointer'\n });\n // 根据配置在 speedControllerStyle 中的 scale offsetX offsetY 缩放和移动速度控制器\n var currentBBox = this.speedGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = this.speedGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n matrix = transform(matrix, [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX + offsetX * scale, centerY + offsetY * scale]]);\n this.speedGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.getPointerPath = function (x, y) {\n return [['M', x, y], ['L', x - 10, y - 4], ['L', x - 10, y + 4], ['Z']];\n };\n ControllerBtn.prototype.renderToggleTime = function () {\n var _a, _b;\n var _c = this.controllerCfg,\n width = _c.width,\n defaultTimeType = _c.defaultTimeType;\n var timeTypeControllerStyle = __assign(__assign({}, DEFAULT_TIMETYPE_CONTROLLER_STYLE), this.controllerCfg.timeTypeControllerStyle || {});\n var _d = timeTypeControllerStyle.scale,\n scale = _d === void 0 ? 1 : _d,\n _e = timeTypeControllerStyle.offsetX,\n offsetX = _e === void 0 ? 0 : _e,\n _f = timeTypeControllerStyle.offsetY,\n offsetY = _f === void 0 ? 0 : _f,\n _g = timeTypeControllerStyle.box,\n box = _g === void 0 ? {} : _g,\n _h = timeTypeControllerStyle.check,\n check = _h === void 0 ? {} : _h,\n _j = timeTypeControllerStyle.text,\n text = _j === void 0 ? {} : _j;\n this.toggleGroup = this.controllerGroup.addGroup({\n name: 'toggle-group'\n });\n var isChecked = defaultTimeType === TIME_TYPE.SINGLE;\n this.toggleGroup.addShape('rect', {\n attrs: __assign({\n x: width - TOGGLE_MODEL_OFFSET,\n y: this.speedAxisY[0] + 3.5\n }, box),\n isChecked: isChecked,\n name: 'toggle-model'\n });\n this.checkedIcon = this.toggleGroup.addShape('path', {\n attrs: __assign({\n path: [['M', width - TOGGLE_MODEL_OFFSET + 3, this.speedAxisY[1] + 6], ['L', width - TOGGLE_MODEL_OFFSET + 7, this.speedAxisY[1] + 10], ['L', width - TOGGLE_MODEL_OFFSET + 12, this.speedAxisY[1] + 4]]\n }, check),\n capture: false,\n name: 'check-icon'\n });\n if (!isChecked) this.checkedIcon.hide();\n this.checkedText = this.toggleGroup.addShape('text', {\n attrs: __assign({\n text: isChecked ? ((_a = this.controllerCfg) === null || _a === void 0 ? void 0 : _a.timeRangeControllerText) || '时间范围' : ((_b = this.controllerCfg) === null || _b === void 0 ? void 0 : _b.timePointControllerText) || '单一时间',\n x: width - TOGGLE_MODEL_OFFSET + 15,\n y: this.speedAxisY[0] + 4,\n fontFamily: typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif'\n }, text),\n name: 'checked-text'\n });\n // 根据配置在 timeTypeControllerStyle 中的 scale offsetX offsetY 缩放和移动速度控制器\n var currentBBox = this.toggleGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = this.toggleGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n matrix = transform(matrix, [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX + offsetX * scale, centerY + offsetY * scale]]);\n this.toggleGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.bindEvent = function () {\n var _this = this;\n this.speedGroup.on('speed-rect:click', function (evt) {\n var currentPointerY = evt.target.attr('y1');\n var pointerMatrix = _this.speedPoint.attr('matrix');\n var currentYIdx = _this.speedAxisY.indexOf(pointerMatrix[7] || 0);\n var targetYIdx = _this.speedAxisY.indexOf(currentPointerY);\n var yDiff = _this.speedAxisY[targetYIdx] - _this.speedAxisY[currentYIdx];\n pointerMatrix = transform(pointerMatrix, [['t', 0, yDiff]]);\n _this.speedPoint.setMatrix(pointerMatrix);\n _this.currentSpeed = _this.speedAxisY.length - targetYIdx;\n _this.speedText.attr('text', \"\".concat(_this.currentSpeed, \".0X\"));\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n speed: _this.currentSpeed,\n type: _this.currentType\n });\n });\n this.speedGroup.on('mousewheel', function (evt) {\n evt.preventDefault();\n var pointerMatrix = _this.speedPoint.attr('matrix') || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var currentPointerY = pointerMatrix[7];\n var currentYIdx = _this.speedAxisY.indexOf(currentPointerY);\n if (currentYIdx === -1) {\n // 找到最近的一个 y\n var minDist_1 = Infinity;\n _this.speedAxisY.forEach(function (y, idx) {\n var dist = Math.abs(y - currentPointerY);\n if (minDist_1 > dist) {\n minDist_1 = dist;\n currentYIdx = idx;\n }\n });\n }\n if (evt.originalEvent.deltaY > 0) currentYIdx = Math.max(0, currentYIdx - 1);else currentYIdx = Math.min(_this.speedAxisY.length - 1, currentYIdx + 1);\n var yDiff = _this.speedAxisY[currentYIdx] - currentPointerY;\n pointerMatrix = transform(pointerMatrix, [['t', 0, yDiff]]);\n _this.speedPoint.setMatrix(pointerMatrix);\n _this.currentSpeed = _this.speedAxisY.length - currentYIdx;\n _this.speedText.attr('text', \"\".concat(_this.currentSpeed, \".0X\"));\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n speed: _this.currentSpeed,\n type: _this.currentType\n });\n });\n if (this.toggleGroup) {\n this.toggleGroup.on('toggle-model:click', function (evt) {\n var _a, _b;\n var isChecked = evt.target.get('isChecked');\n if (!isChecked) {\n _this.checkedIcon.show();\n _this.checkedText.attr('text', ((_a = _this.controllerCfg) === null || _a === void 0 ? void 0 : _a.timeRangeControllerText) || '时间范围');\n _this.currentType = TIME_TYPE.SINGLE;\n } else {\n _this.checkedIcon.hide();\n _this.checkedText.attr('text', ((_b = _this.controllerCfg) === null || _b === void 0 ? void 0 : _b.timePointControllerText) || '单一时间');\n _this.currentType = TIME_TYPE.RANGE;\n }\n evt.target.set('isChecked', !isChecked);\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n type: _this.currentType,\n speed: _this.currentSpeed\n });\n });\n }\n };\n ControllerBtn.prototype.destroy = function () {\n this.speedGroup.off('speed-rect:click');\n if (this.toggleGroup) {\n this.toggleGroup.off('toggle-model:click');\n this.toggleGroup.destroy();\n }\n this.speedGroup.destroy();\n };\n return ControllerBtn;\n}();\nexport default ControllerBtn;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n/**\n * 基于 G 的刻度时间轴组件\n */\nimport { ext } from '@antv/matrix-util';\nimport { isNumber, isString } from '@antv/util';\nimport TimeBarTooltip from './timeBarTooltip';\nimport ControllerBtn from './controllerBtn';\nimport { VALUE_CHANGE, TIMELINE_START, TIMELINE_END, PLAY_PAUSE_BTN, NEXT_STEP_BTN, PRE_STEP_BTN, TIMEBAR_CONFIG_CHANGE } from './constant';\nvar transform = ext.transform;\nvar DEFAULT_SELECTEDTICK_STYLE = {\n fill: '#5B8FF9'\n};\nvar DEFAULT_UNSELECTEDTICK_STYLE = {\n fill: '#e6e8e9'\n};\nvar TimeBarSlice = /** @class */function () {\n function TimeBarSlice(cfgs) {\n this.frameCount = 0;\n this.fontFamily = 'Arial, sans-serif';\n var graph = cfgs.graph,\n canvas = cfgs.canvas,\n group = cfgs.group,\n width = cfgs.width,\n height = cfgs.height,\n padding = cfgs.padding,\n data = cfgs.data,\n start = cfgs.start,\n end = cfgs.end,\n _a = cfgs.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfgs.y,\n y = _b === void 0 ? 0 : _b,\n tickLabelFormatter = cfgs.tickLabelFormatter,\n _c = cfgs.selectedTickStyle,\n selectedTickStyle = _c === void 0 ? DEFAULT_SELECTEDTICK_STYLE : _c,\n _d = cfgs.unselectedTickStyle,\n unselectedTickStyle = _d === void 0 ? DEFAULT_UNSELECTEDTICK_STYLE : _d,\n tooltipBackgroundColor = cfgs.tooltipBackgroundColor,\n tooltipFomatter = cfgs.tooltipFomatter,\n tickLabelStyle = cfgs.tickLabelStyle,\n _e = cfgs.controllerCfg,\n controllerCfg = _e === void 0 ? {\n speed: 1\n } : _e;\n this.graph = graph;\n this.group = group;\n this.sliceGroup = group.addGroup({\n name: 'slice-group'\n });\n this.canvas = canvas;\n this.width = width;\n this.height = height;\n this.padding = padding;\n this.data = data;\n this.start = start;\n this.end = end;\n this.tickLabelFormatter = tickLabelFormatter;\n this.tickLabelStyle = tickLabelStyle || {};\n this.selectedTickStyle = selectedTickStyle;\n this.unselectedTickStyle = unselectedTickStyle;\n this.controllerCfg = controllerCfg;\n this.currentSpeed = controllerCfg.speed || 1;\n this.x = x;\n this.y = y;\n this.tooltipBackgroundColor = tooltipBackgroundColor;\n this.tooltipFomatter = tooltipFomatter;\n // 初始化 fontFamily,如果有浏览器,取 body 上的字体,防止文字更新时局部渲染造成的重影\n this.fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.renderSlices();\n this.initEvent();\n }\n TimeBarSlice.prototype.renderSlices = function () {\n var _this = this;\n var _a = this,\n width = _a.width,\n height = _a.height,\n padding = _a.padding,\n data = _a.data,\n start = _a.start,\n end = _a.end,\n tickLabelFormatter = _a.tickLabelFormatter,\n selectedTickStyle = _a.selectedTickStyle,\n unselectedTickStyle = _a.unselectedTickStyle,\n tickLabelStyle = _a.tickLabelStyle;\n var realWidth = width - 2 * padding;\n var fontSize = 10;\n var labelLineHeight = 4;\n var labelAreaHeight = 3 * padding + labelLineHeight + fontSize;\n var ticksAreaHeight = height - labelAreaHeight - 2 * padding;\n var gap = 2;\n var ticksLength = data.length;\n var tickWidth = (realWidth - gap * (ticksLength - 1)) / ticksLength;\n this.tickWidth = tickWidth;\n var sliceGroup = this.sliceGroup;\n var tickRects = [];\n var labels = [];\n var startTickId = Math.round(ticksLength * start);\n var endTickId = Math.round(ticksLength * end);\n this.startTickRectId = startTickId;\n this.endTickRectId = endTickId;\n var rotate = tickLabelStyle.rotate;\n delete tickLabelStyle.rotate;\n data.forEach(function (d, i) {\n // draw the tick rects\n var selected = i >= startTickId && i <= endTickId;\n var tickStyle = selected ? selectedTickStyle : unselectedTickStyle;\n var rect = sliceGroup.addShape('rect', {\n attrs: __assign({\n x: padding + i * (tickWidth + gap),\n y: padding,\n width: tickWidth,\n height: ticksAreaHeight\n }, tickStyle),\n draggable: true,\n name: \"tick-rect-\".concat(i)\n });\n // draw the pick tick rects\n var pickRect = sliceGroup.addShape('rect', {\n attrs: {\n x: padding + i * tickWidth + gap * (2 * i - 1) / 2,\n y: padding,\n width: i === 0 || i === ticksLength - 1 ? tickWidth + gap / 2 : tickWidth + gap,\n height: ticksAreaHeight,\n fill: '#fff',\n opacity: 0\n },\n draggable: true,\n name: \"pick-rect-\".concat(i)\n });\n pickRect.toFront();\n var rectBBox = rect.getBBox();\n var centerX = (rectBBox.minX + rectBBox.maxX) / 2;\n tickRects.push({\n rect: rect,\n pickRect: pickRect,\n value: d.date,\n x: centerX,\n y: rectBBox.minY\n });\n var label;\n if (tickLabelFormatter) {\n label = tickLabelFormatter(d);\n if (!isString(label) && label) {\n // return true\n label = d.date;\n }\n } else if (i % Math.round(ticksLength / 10) === 0) {\n label = d.date;\n }\n if (label) {\n labels.push(label);\n // draw tick lines\n var lineStartY = rectBBox.maxY + padding * 2;\n sliceGroup.addShape('line', {\n attrs: {\n stroke: '#BFBFBF',\n x1: centerX,\n y1: lineStartY,\n x2: centerX,\n y2: lineStartY + labelLineHeight\n },\n name: 'tick-line'\n });\n var labelStartY = lineStartY + labelLineHeight + padding;\n var text = sliceGroup.addShape('text', {\n attrs: __assign({\n fill: '#8c8c8c',\n stroke: '#fff',\n lineWidth: 1,\n x: centerX,\n y: labelStartY,\n textAlign: 'center',\n text: label,\n textBaseline: 'top',\n fontSize: 10,\n fontFamily: _this.fontFamily || 'Arial, sans-serif'\n }, tickLabelStyle),\n capture: false,\n name: 'tick-label'\n });\n var textBBox = text.getBBox();\n if (textBBox.maxX > width) {\n text.attr('textAlign', 'right');\n } else if (textBBox.minX < 0) {\n text.attr('textAlign', 'left');\n }\n if (isNumber(rotate) && labels.length !== 10) {\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -centerX, -labelStartY], ['r', rotate], ['t', centerX - 5, labelStartY + 2]]);\n text.attr({\n textAlign: 'left',\n matrix: matrix\n });\n }\n if (labels.length === 1) {\n text.attr({\n textAlign: 'left'\n });\n } else if (labels.length === 10) {\n text.attr({\n textAlign: 'right'\n });\n }\n // draw tick labels\n }\n });\n\n this.tickRects = tickRects;\n // 渲染播放、快进和后退的控制按钮\n var group = this.group;\n this.currentSpeed = 1;\n this.controllerBtnGroup = new ControllerBtn(__assign({\n group: group,\n x: this.x,\n y: this.y + height + 5,\n width: width,\n height: 40,\n hideTimeTypeController: true,\n speed: this.currentSpeed,\n fontFamily: this.fontFamily || 'Arial, sans-serif'\n }, this.controllerCfg));\n };\n TimeBarSlice.prototype.initEvent = function () {\n var _this = this;\n var sliceGroup = this.sliceGroup;\n sliceGroup.on('click', function (e) {\n var targetRect = e.target;\n if (targetRect.get('type') !== 'rect' || !targetRect.get('name')) return;\n var id = parseInt(targetRect.get('name').split('-')[2], 10);\n if (!isNaN(id)) {\n var tickRects_1 = _this.tickRects;\n // cancel the selected ticks\n var unselectedTickStyle_1 = _this.unselectedTickStyle;\n tickRects_1.forEach(function (tickRect) {\n tickRect.rect.attr(unselectedTickStyle_1);\n });\n var selectedTickStyle = _this.selectedTickStyle;\n tickRects_1[id].rect.attr(selectedTickStyle);\n _this.startTickRectId = id;\n _this.endTickRectId = id;\n var ticksLength = tickRects_1.length;\n var start = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, start]\n });\n }\n });\n sliceGroup.on('dragstart', function (e) {\n var tickRects = _this.tickRects;\n // cancel the selected ticks\n var unselectedTickStyle = _this.unselectedTickStyle;\n tickRects.forEach(function (tickRect) {\n tickRect.rect.attr(unselectedTickStyle);\n });\n var targetRect = e.target;\n var id = parseInt(targetRect.get('name').split('-')[2], 10);\n var selectedTickStyle = _this.selectedTickStyle;\n tickRects[id].rect.attr(selectedTickStyle);\n _this.startTickRectId = id;\n var ticksLength = tickRects.length;\n var start = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, start]\n });\n _this.dragging = true;\n });\n sliceGroup.on('dragover', function (e) {\n if (!_this.dragging) return;\n if (e.target.get('type') !== 'rect') return;\n var id = parseInt(e.target.get('name').split('-')[2], 10);\n var startTickRectId = _this.startTickRectId;\n var tickRects = _this.tickRects;\n var selectedTickStyle = _this.selectedTickStyle;\n var unselectedTickStyle = _this.unselectedTickStyle;\n for (var i = 0; i < tickRects.length; i++) {\n var style = i >= startTickRectId && i <= id ? selectedTickStyle : unselectedTickStyle;\n tickRects[i].rect.attr(style);\n }\n var ticksLength = tickRects.length;\n _this.endTickRectId = id;\n var start = startTickRectId / ticksLength;\n var end = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n });\n sliceGroup.on('drop', function (e) {\n if (!_this.dragging) return;\n _this.dragging = false;\n if (e.target.get('type') !== 'rect') return;\n var startTickRectId = _this.startTickRectId;\n var id = parseInt(e.target.get('name').split('-')[2], 10);\n if (id < startTickRectId) return;\n var selectedTickStyle = _this.selectedTickStyle;\n var tickRects = _this.tickRects;\n tickRects[id].rect.attr(selectedTickStyle);\n _this.endTickRectId = id;\n var ticksLength = tickRects.length;\n var start = startTickRectId / ticksLength;\n var end = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n });\n // tooltip\n var _a = this,\n tooltipBackgroundColor = _a.tooltipBackgroundColor,\n tooltipFomatter = _a.tooltipFomatter,\n canvas = _a.canvas;\n var tooltip = new TimeBarTooltip({\n container: canvas.get('container'),\n backgroundColor: tooltipBackgroundColor\n });\n var tickRects = this.tickRects;\n tickRects.forEach(function (tickRect) {\n var pickRect = tickRect.pickRect;\n pickRect.on('mouseenter', function (e) {\n var rect = e.target;\n if (rect.get('type') !== 'rect') return;\n var id = parseInt(rect.get('name').split('-')[2], 10);\n var clientPoint = canvas.getClientByPoint(tickRects[id].x, tickRects[id].y);\n tooltip.show({\n x: tickRects[id].x,\n y: tickRects[id].y,\n clientX: clientPoint.x,\n clientY: clientPoint.y,\n text: tooltipFomatter ? tooltipFomatter(tickRects[id].value) : tickRects[id].value\n });\n });\n pickRect.on('mouseleave', function (e) {\n tooltip.hide();\n });\n });\n // play controller events\n var group = this.group;\n // 播放区按钮控制\n /** 播放/暂停事件 */\n group.on(\"\".concat(PLAY_PAUSE_BTN, \":click\"), function () {\n _this.isPlay = !_this.isPlay;\n _this.changePlayStatus();\n });\n // 处理前进一步的事件\n group.on(\"\".concat(NEXT_STEP_BTN, \":click\"), function () {\n _this.updateStartEnd(1);\n });\n // 处理后退一步的事件\n group.on(\"\".concat(PRE_STEP_BTN, \":click\"), function () {\n _this.updateStartEnd(-1);\n });\n group.on(TIMEBAR_CONFIG_CHANGE, function (_a) {\n var type = _a.type,\n speed = _a.speed;\n _this.currentSpeed = speed;\n });\n };\n TimeBarSlice.prototype.changePlayStatus = function (isSync) {\n if (isSync === void 0) {\n isSync = true;\n }\n this.controllerBtnGroup.playButton.update({\n isPlay: this.isPlay\n });\n if (this.isPlay) {\n // 开始播放\n this.playHandler = this.startPlay();\n this.graph.emit(TIMELINE_START, null);\n } else {\n // 结束播放\n if (this.playHandler) {\n if (typeof window !== 'undefined') window.cancelAnimationFrame(this.playHandler);\n if (isSync) {\n this.graph.emit(TIMELINE_END, null);\n }\n }\n }\n };\n TimeBarSlice.prototype.startPlay = function () {\n var _this = this;\n return typeof window !== 'undefined' ? window.requestAnimationFrame(function () {\n var speed = _this.currentSpeed;\n // 一分钟刷新一次\n if (_this.frameCount % (60 / speed) === 0) {\n _this.frameCount = 0;\n _this.updateStartEnd(1);\n }\n _this.frameCount++;\n if (_this.isPlay) {\n _this.playHandler = _this.startPlay();\n }\n }) : undefined;\n };\n TimeBarSlice.prototype.updateStartEnd = function (sign) {\n var self = this;\n var tickRects = this.tickRects;\n var ticksLength = tickRects.length;\n var unselectedTickStyle = this.unselectedTickStyle;\n var selectedTickStyle = this.selectedTickStyle;\n var previousEndTickRectId = self.endTickRectId;\n if (sign > 0) {\n self.endTickRectId++;\n } else {\n tickRects[self.endTickRectId].rect.attr(unselectedTickStyle);\n self.endTickRectId--;\n }\n // 若此时 start 与 end 不同,范围前进/后退/播放\n if (previousEndTickRectId !== self.startTickRectId) {\n if (self.endTickRectId < self.startTickRectId) {\n self.startTickRectId = self.endTickRectId;\n }\n } else {\n // 否则是单帧的前进/后退/播放\n for (var i = self.startTickRectId; i <= self.endTickRectId - 1; i++) {\n tickRects[i].rect.attr(unselectedTickStyle);\n }\n self.startTickRectId = self.endTickRectId;\n }\n if (tickRects[self.endTickRectId]) {\n tickRects[self.endTickRectId].rect.attr(selectedTickStyle);\n var start = self.startTickRectId / ticksLength;\n var end = self.endTickRectId / ticksLength;\n this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n }\n };\n TimeBarSlice.prototype.destory = function () {\n var group = this.sliceGroup;\n group.off('click');\n group.off('dragstart');\n group.off('dragover');\n group.off('drop');\n this.tickRects.forEach(function (tickRect) {\n var pickRect = tickRect.pickRect;\n pickRect.off('mouseenter');\n pickRect.off('mouseleave');\n });\n this.tickRects.length = 0;\n group.off(\"\".concat(PLAY_PAUSE_BTN, \":click\"));\n group.off(\"\".concat(NEXT_STEP_BTN, \":click\"));\n group.off(\"\".concat(PRE_STEP_BTN, \":click\"));\n group.off(TIMEBAR_CONFIG_CHANGE);\n this.sliceGroup.destroy();\n };\n return TimeBarSlice;\n}();\nexport default TimeBarSlice;","var methodCache = {};\n/**\n * 获取计算 ticks 的方法\n * @param key 键值\n * @returns 计算 ticks 的方法\n */\nexport function getTickMethod(key) {\n return methodCache[key];\n}\n/**\n * 注册计算 ticks 的方法\n * @param key 键值\n * @param method 方法\n */\nexport function registerTickMethod(key, method) {\n methodCache[key] = method;\n}\n//# sourceMappingURL=register.js.map","import { assign, isEmpty, isFunction, isNil, isNumber, isObject, isString, map } from '@antv/util';\nimport { getTickMethod } from './tick-method/register';\nvar Scale = /** @class */ (function () {\n function Scale(cfg) {\n /**\n * 度量的类型\n */\n this.type = 'base';\n /**\n * 是否分类类型的度量\n */\n this.isCategory = false;\n /**\n * 是否线性度量,有linear, time 度量\n */\n this.isLinear = false;\n /**\n * 是否连续类型的度量,linear,time,log, pow, quantile, quantize 都支持\n */\n this.isContinuous = false;\n /**\n * 是否是常量的度量,传入和传出一致\n */\n this.isIdentity = false;\n this.values = [];\n this.range = [0, 1];\n this.ticks = [];\n this.__cfg__ = cfg;\n this.initCfg();\n this.init();\n }\n // 对于原始值的必要转换,如分类、时间字段需转换成数值,用transform/map命名可能更好\n Scale.prototype.translate = function (v) {\n return v;\n };\n /** 重新初始化 */\n Scale.prototype.change = function (cfg) {\n // 覆盖配置项,而不替代\n assign(this.__cfg__, cfg);\n this.init();\n };\n Scale.prototype.clone = function () {\n return this.constructor(this.__cfg__);\n };\n /** 获取坐标轴需要的ticks */\n Scale.prototype.getTicks = function () {\n var _this = this;\n return map(this.ticks, function (tick, idx) {\n if (isObject(tick)) {\n // 仅当符合Tick类型时才有意义\n return tick;\n }\n return {\n text: _this.getText(tick, idx),\n tickValue: tick,\n value: _this.scale(tick),\n };\n });\n };\n /** 获取Tick的格式化结果 */\n Scale.prototype.getText = function (value, key) {\n var formatter = this.formatter;\n var res = formatter ? formatter(value, key) : value;\n if (isNil(res) || !isFunction(res.toString)) {\n return '';\n }\n return res.toString();\n };\n // 获取配置项中的值,当前 scale 上的值可能会被修改\n Scale.prototype.getConfig = function (key) {\n return this.__cfg__[key];\n };\n // scale初始化\n Scale.prototype.init = function () {\n assign(this, this.__cfg__);\n this.setDomain();\n if (isEmpty(this.getConfig('ticks'))) {\n this.ticks = this.calculateTicks();\n }\n };\n // 子类上覆盖某些属性,不能直接在类上声明,否则会被覆盖\n Scale.prototype.initCfg = function () { };\n Scale.prototype.setDomain = function () { };\n Scale.prototype.calculateTicks = function () {\n var tickMethod = this.tickMethod;\n var ticks = [];\n if (isString(tickMethod)) {\n var method = getTickMethod(tickMethod);\n if (!method) {\n throw new Error('There is no method to to calculate ticks!');\n }\n ticks = method(this);\n }\n else if (isFunction(tickMethod)) {\n ticks = tickMethod(this);\n }\n return ticks;\n };\n // range 的最小值\n Scale.prototype.rangeMin = function () {\n return this.range[0];\n };\n // range 的最大值\n Scale.prototype.rangeMax = function () {\n return this.range[1];\n };\n /** 定义域转 0~1 */\n Scale.prototype.calcPercent = function (value, min, max) {\n if (isNumber(value)) {\n return (value - min) / (max - min);\n }\n return NaN;\n };\n /** 0~1转定义域 */\n Scale.prototype.calcValue = function (percent, min, max) {\n return min + percent * (max - min);\n };\n return Scale;\n}());\nexport default Scale;\n//# sourceMappingURL=base.js.map","import { __extends, __spreadArrays } from \"tslib\";\nimport { isNil, isNumber } from '@antv/util';\nimport Base from '../base';\n/**\n * 分类度量\n * @class\n */\nvar Category = /** @class */ (function (_super) {\n __extends(Category, _super);\n function Category() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cat';\n _this.isCategory = true;\n return _this;\n }\n Category.prototype.buildIndexMap = function () {\n if (!this.translateIndexMap) {\n this.translateIndexMap = new Map();\n // 重新构建缓存\n for (var i = 0; i < this.values.length; i++) {\n this.translateIndexMap.set(this.values[i], i);\n }\n }\n };\n Category.prototype.translate = function (value) {\n // 按需构建 map\n this.buildIndexMap();\n // 找得到\n var idx = this.translateIndexMap.get(value);\n if (idx === undefined) {\n idx = isNumber(value) ? value : NaN;\n }\n return idx;\n };\n Category.prototype.scale = function (value) {\n var order = this.translate(value);\n // 分类数据允许 0.5 范围内调整\n // if (order < this.min - 0.5 || order > this.max + 0.5) {\n // return NaN;\n // }\n var percent = this.calcPercent(order, this.min, this.max);\n return this.calcValue(percent, this.rangeMin(), this.rangeMax());\n };\n Category.prototype.invert = function (scaledValue) {\n var domainRange = this.max - this.min;\n var percent = this.calcPercent(scaledValue, this.rangeMin(), this.rangeMax());\n var idx = Math.round(domainRange * percent) + this.min;\n if (idx < this.min || idx > this.max) {\n return NaN;\n }\n return this.values[idx];\n };\n Category.prototype.getText = function (value) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var v = value;\n // value为index\n if (isNumber(value) && !this.values.includes(value)) {\n v = this.values[v];\n }\n return _super.prototype.getText.apply(this, __spreadArrays([v], args));\n };\n // 复写属性\n Category.prototype.initCfg = function () {\n this.tickMethod = 'cat';\n };\n // 设置 min, max\n Category.prototype.setDomain = function () {\n // 用户有可能设置 min\n if (isNil(this.getConfig('min'))) {\n this.min = 0;\n }\n if (isNil(this.getConfig('max'))) {\n var size = this.values.length;\n this.max = size > 1 ? size - 1 : size;\n }\n // scale.init 的时候清除缓存\n if (this.translateIndexMap) {\n this.translateIndexMap = undefined;\n }\n };\n return Category;\n}(Base));\nexport default Category;\n//# sourceMappingURL=base.js.map","var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nvar twoDigitsOptional = \"\\\\d\\\\d?\";\nvar twoDigits = \"\\\\d\\\\d\";\nvar threeDigits = \"\\\\d{3}\";\nvar fourDigits = \"\\\\d{4}\";\nvar word = \"[^\\\\s]+\";\nvar literal = /\\[([^]*?)\\]/gm;\nfunction shorten(arr, sLen) {\n var newArr = [];\n for (var i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\nvar monthUpdate = function (arrName) { return function (v, i18n) {\n var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); });\n var index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n}; };\nfunction assign(origObj) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var obj = args_1[_a];\n for (var key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\nvar dayNames = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nvar monthNames = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\nvar monthNamesShort = shorten(monthNames, 3);\nvar dayNamesShort = shorten(dayNames, 3);\nvar defaultI18n = {\n dayNamesShort: dayNamesShort,\n dayNames: dayNames,\n monthNamesShort: monthNamesShort,\n monthNames: monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn: function (dayOfMonth) {\n return (dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]);\n }\n};\nvar globalI18n = assign({}, defaultI18n);\nvar setGlobalDateI18n = function (i18n) {\n return (globalI18n = assign(globalI18n, i18n));\n};\nvar regexEscape = function (str) {\n return str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n};\nvar pad = function (val, len) {\n if (len === void 0) { len = 2; }\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\nvar formatFlags = {\n D: function (dateObj) { return String(dateObj.getDate()); },\n DD: function (dateObj) { return pad(dateObj.getDate()); },\n Do: function (dateObj, i18n) {\n return i18n.DoFn(dateObj.getDate());\n },\n d: function (dateObj) { return String(dateObj.getDay()); },\n dd: function (dateObj) { return pad(dateObj.getDay()); },\n ddd: function (dateObj, i18n) {\n return i18n.dayNamesShort[dateObj.getDay()];\n },\n dddd: function (dateObj, i18n) {\n return i18n.dayNames[dateObj.getDay()];\n },\n M: function (dateObj) { return String(dateObj.getMonth() + 1); },\n MM: function (dateObj) { return pad(dateObj.getMonth() + 1); },\n MMM: function (dateObj, i18n) {\n return i18n.monthNamesShort[dateObj.getMonth()];\n },\n MMMM: function (dateObj, i18n) {\n return i18n.monthNames[dateObj.getMonth()];\n },\n YY: function (dateObj) {\n return pad(String(dateObj.getFullYear()), 4).substr(2);\n },\n YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); },\n h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); },\n hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); },\n H: function (dateObj) { return String(dateObj.getHours()); },\n HH: function (dateObj) { return pad(dateObj.getHours()); },\n m: function (dateObj) { return String(dateObj.getMinutes()); },\n mm: function (dateObj) { return pad(dateObj.getMinutes()); },\n s: function (dateObj) { return String(dateObj.getSeconds()); },\n ss: function (dateObj) { return pad(dateObj.getSeconds()); },\n S: function (dateObj) {\n return String(Math.round(dateObj.getMilliseconds() / 100));\n },\n SS: function (dateObj) {\n return pad(Math.round(dateObj.getMilliseconds() / 10), 2);\n },\n SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); },\n a: function (dateObj, i18n) {\n return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];\n },\n A: function (dateObj, i18n) {\n return dateObj.getHours() < 12\n ? i18n.amPm[0].toUpperCase()\n : i18n.amPm[1].toUpperCase();\n },\n ZZ: function (dateObj) {\n var offset = dateObj.getTimezoneOffset();\n return ((offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4));\n },\n Z: function (dateObj) {\n var offset = dateObj.getTimezoneOffset();\n return ((offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60), 2) +\n \":\" +\n pad(Math.abs(offset) % 60, 2));\n }\n};\nvar monthParse = function (v) { return +v - 1; };\nvar emptyDigits = [null, twoDigitsOptional];\nvar emptyWord = [null, word];\nvar amPm = [\n \"isPm\",\n word,\n function (v, i18n) {\n var val = v.toLowerCase();\n if (val === i18n.amPm[0]) {\n return 0;\n }\n else if (val === i18n.amPm[1]) {\n return 1;\n }\n return null;\n }\n];\nvar timezoneOffset = [\n \"timezoneOffset\",\n \"[^\\\\s]*?[\\\\+\\\\-]\\\\d\\\\d:?\\\\d\\\\d|[^\\\\s]*?Z?\",\n function (v) {\n var parts = (v + \"\").match(/([+-]|\\d\\d)/gi);\n if (parts) {\n var minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n return parts[0] === \"+\" ? minutes : -minutes;\n }\n return 0;\n }\n];\nvar parseFlags = {\n D: [\"day\", twoDigitsOptional],\n DD: [\"day\", twoDigits],\n Do: [\"day\", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }],\n M: [\"month\", twoDigitsOptional, monthParse],\n MM: [\"month\", twoDigits, monthParse],\n YY: [\n \"year\",\n twoDigits,\n function (v) {\n var now = new Date();\n var cent = +(\"\" + now.getFullYear()).substr(0, 2);\n return +(\"\" + (+v > 68 ? cent - 1 : cent) + v);\n }\n ],\n h: [\"hour\", twoDigitsOptional, undefined, \"isPm\"],\n hh: [\"hour\", twoDigits, undefined, \"isPm\"],\n H: [\"hour\", twoDigitsOptional],\n HH: [\"hour\", twoDigits],\n m: [\"minute\", twoDigitsOptional],\n mm: [\"minute\", twoDigits],\n s: [\"second\", twoDigitsOptional],\n ss: [\"second\", twoDigits],\n YYYY: [\"year\", fourDigits],\n S: [\"millisecond\", \"\\\\d\", function (v) { return +v * 100; }],\n SS: [\"millisecond\", twoDigits, function (v) { return +v * 10; }],\n SSS: [\"millisecond\", threeDigits],\n d: emptyDigits,\n dd: emptyDigits,\n ddd: emptyWord,\n dddd: emptyWord,\n MMM: [\"month\", word, monthUpdate(\"monthNamesShort\")],\n MMMM: [\"month\", word, monthUpdate(\"monthNames\")],\n a: amPm,\n A: amPm,\n ZZ: timezoneOffset,\n Z: timezoneOffset\n};\n// Some common format strings\nvar globalMasks = {\n default: \"ddd MMM DD YYYY HH:mm:ss\",\n shortDate: \"M/D/YY\",\n mediumDate: \"MMM D, YYYY\",\n longDate: \"MMMM D, YYYY\",\n fullDate: \"dddd, MMMM D, YYYY\",\n isoDate: \"YYYY-MM-DD\",\n isoDateTime: \"YYYY-MM-DDTHH:mm:ssZ\",\n shortTime: \"HH:mm\",\n mediumTime: \"HH:mm:ss\",\n longTime: \"HH:mm:ss.SSS\"\n};\nvar setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); };\n/***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n * @returns {string} Formatted date string\n */\nvar format = function (dateObj, mask, i18n) {\n if (mask === void 0) { mask = globalMasks[\"default\"]; }\n if (i18n === void 0) { i18n = {}; }\n if (typeof dateObj === \"number\") {\n dateObj = new Date(dateObj);\n }\n if (Object.prototype.toString.call(dateObj) !== \"[object Date]\" ||\n isNaN(dateObj.getTime())) {\n throw new Error(\"Invalid Date pass to format\");\n }\n mask = globalMasks[mask] || mask;\n var literals = [];\n // Make literals inactive by replacing them with @@@\n mask = mask.replace(literal, function ($0, $1) {\n literals.push($1);\n return \"@@@\";\n });\n var combinedI18nSettings = assign(assign({}, globalI18n), i18n);\n // Apply formatting rules\n mask = mask.replace(token, function ($0) {\n return formatFlags[$0](dateObj, combinedI18nSettings);\n });\n // Inline literal values back into the formatted value\n return mask.replace(/@@@/g, function () { return literals.shift(); });\n};\n/**\n * Parse a date string into a Javascript Date object /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @param {i18n} I18nSettingsOptional Full or subset of I18N settings\n * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format\n */\nfunction parse(dateStr, format, i18n) {\n if (i18n === void 0) { i18n = {}; }\n if (typeof format !== \"string\") {\n throw new Error(\"Invalid format in fecha parse\");\n }\n // Check to see if the format is actually a mask\n format = globalMasks[format] || format;\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (dateStr.length > 1000) {\n return null;\n }\n // Default to the beginning of the year.\n var today = new Date();\n var dateInfo = {\n year: today.getFullYear(),\n month: 0,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n isPm: null,\n timezoneOffset: null\n };\n var parseInfo = [];\n var literals = [];\n // Replace all the literals with @@@. Hopefully a string that won't exist in the format\n var newFormat = format.replace(literal, function ($0, $1) {\n literals.push(regexEscape($1));\n return \"@@@\";\n });\n var specifiedFields = {};\n var requiredFields = {};\n // Change every token that we find into the correct regex\n newFormat = regexEscape(newFormat).replace(token, function ($0) {\n var info = parseFlags[$0];\n var field = info[0], regex = info[1], requiredField = info[3];\n // Check if the person has specified the same field twice. This will lead to confusing results.\n if (specifiedFields[field]) {\n throw new Error(\"Invalid format. \" + field + \" specified twice in format\");\n }\n specifiedFields[field] = true;\n // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified\n if (requiredField) {\n requiredFields[requiredField] = true;\n }\n parseInfo.push(info);\n return \"(\" + regex + \")\";\n });\n // Check all the required fields are present\n Object.keys(requiredFields).forEach(function (field) {\n if (!specifiedFields[field]) {\n throw new Error(\"Invalid format. \" + field + \" is required in specified format\");\n }\n });\n // Add back all the literals after\n newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); });\n // Check if the date string matches the format. If it doesn't return null\n var matches = dateStr.match(new RegExp(newFormat, \"i\"));\n if (!matches) {\n return null;\n }\n var combinedI18nSettings = assign(assign({}, globalI18n), i18n);\n // For each match, call the parser function for that date part\n for (var i = 1; i < matches.length; i++) {\n var _a = parseInfo[i - 1], field = _a[0], parser = _a[2];\n var value = parser\n ? parser(matches[i], combinedI18nSettings)\n : +matches[i];\n // If the parser can't make sense of the value, return null\n if (value == null) {\n return null;\n }\n dateInfo[field] = value;\n }\n if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n }\n else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n var dateTZ;\n if (dateInfo.timezoneOffset == null) {\n dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond);\n var validateFields = [\n [\"month\", \"getMonth\"],\n [\"day\", \"getDate\"],\n [\"hour\", \"getHours\"],\n [\"minute\", \"getMinutes\"],\n [\"second\", \"getSeconds\"]\n ];\n for (var i = 0, len = validateFields.length; i < len; i++) {\n // Check to make sure the date field is within the allowed range. Javascript dates allows values\n // outside the allowed range. If the values don't match the value was invalid\n if (specifiedFields[validateFields[i][0]] &&\n dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) {\n return null;\n }\n }\n }\n else {\n dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond));\n // We can't validate dates in another timezone unfortunately. Do a basic check instead\n if (dateInfo.month > 11 ||\n dateInfo.month < 0 ||\n dateInfo.day > 31 ||\n dateInfo.day < 1 ||\n dateInfo.hour > 23 ||\n dateInfo.hour < 0 ||\n dateInfo.minute > 59 ||\n dateInfo.minute < 0 ||\n dateInfo.second > 59 ||\n dateInfo.second < 0) {\n return null;\n }\n }\n // Don't allow invalid dates\n return dateTZ;\n}\nvar fecha = {\n format: format,\n parse: parse,\n defaultI18n: defaultI18n,\n setGlobalDateI18n: setGlobalDateI18n,\n setGlobalDateMasks: setGlobalDateMasks\n};\n\nexport default fecha;\nexport { assign, format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks };\n//# sourceMappingURL=fecha.js.map\n","import { isNil } from '@antv/util';\n/**\n * 二分右侧查找\n * https://github.com/d3/d3-array/blob/master/src/bisector.js\n */\nexport default function (getter) {\n /**\n * x: 目标值\n * lo: 起始位置\n * hi: 结束位置\n */\n return function (a, x, _lo, _hi) {\n var lo = isNil(_lo) ? 0 : _lo;\n var hi = isNil(_hi) ? a.length : _hi;\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (getter(a[mid]) > x) {\n hi = mid;\n }\n else {\n lo = mid + 1;\n }\n }\n return lo;\n };\n}\n//# sourceMappingURL=bisector.js.map","import { isDate, isString, last } from '@antv/util';\nimport fecha from 'fecha';\nimport * as fecha1 from 'fecha';\nimport bisector from './bisector';\nvar FORMAT_METHOD = 'format';\nexport function timeFormat(time, mask) {\n var method = fecha1[FORMAT_METHOD] || fecha[FORMAT_METHOD];\n return method(time, mask);\n}\n/**\n * 转换成时间戳\n * @param value 时间值\n */\nexport function toTimeStamp(value) {\n if (isString(value)) {\n if (value.indexOf('T') > 0) {\n value = new Date(value).getTime();\n }\n else {\n // new Date('2010/01/10') 和 new Date('2010-01-10') 的差别在于:\n // 如果仅有年月日时,前者是带有时区的: Fri Jan 10 2020 02:40:13 GMT+0800 (中国标准时间)\n // 后者会格式化成 Sun Jan 10 2010 08:00:00 GMT+0800 (中国标准时间)\n value = new Date(value.replace(/-/gi, '/')).getTime();\n }\n }\n if (isDate(value)) {\n value = value.getTime();\n }\n return value;\n}\nvar SECOND = 1000;\nvar MINUTE = 60 * SECOND;\nvar HOUR = 60 * MINUTE;\nvar DAY = 24 * HOUR;\nvar MONTH = DAY * 31;\nvar YEAR = DAY * 365;\nexport { SECOND, MINUTE, HOUR, DAY, MONTH, YEAR };\nvar intervals = [\n ['HH:mm:ss', SECOND],\n ['HH:mm:ss', SECOND * 10],\n ['HH:mm:ss', SECOND * 30],\n ['HH:mm', MINUTE],\n ['HH:mm', MINUTE * 10],\n ['HH:mm', MINUTE * 30],\n ['HH', HOUR],\n ['HH', HOUR * 6],\n ['HH', HOUR * 12],\n ['YYYY-MM-DD', DAY],\n ['YYYY-MM-DD', DAY * 4],\n ['YYYY-WW', DAY * 7],\n ['YYYY-MM', MONTH],\n ['YYYY-MM', MONTH * 4],\n ['YYYY-MM', MONTH * 6],\n ['YYYY', DAY * 380],\n];\nexport function getTickInterval(min, max, tickCount) {\n var target = (max - min) / tickCount;\n var idx = bisector(function (o) { return o[1]; })(intervals, target) - 1;\n var interval = intervals[idx];\n if (idx < 0) {\n interval = intervals[0];\n }\n else if (idx >= intervals.length) {\n interval = last(intervals);\n }\n return interval;\n}\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { each, isNumber } from '@antv/util';\nimport { timeFormat, toTimeStamp } from '../util/time';\nimport Category from './base';\n/**\n * 时间分类度量\n * @class\n */\nvar TimeCat = /** @class */ (function (_super) {\n __extends(TimeCat, _super);\n function TimeCat() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'timeCat';\n return _this;\n }\n /**\n * @override\n */\n TimeCat.prototype.translate = function (value) {\n value = toTimeStamp(value);\n var index = this.values.indexOf(value);\n if (index === -1) {\n if (isNumber(value) && value < this.values.length) {\n index = value;\n }\n else {\n index = NaN;\n }\n }\n return index;\n };\n /**\n * 由于时间类型数据需要转换一下,所以复写 getText\n * @override\n */\n TimeCat.prototype.getText = function (value, tickIndex) {\n var index = this.translate(value);\n if (index > -1) {\n var result = this.values[index];\n var formatter = this.formatter;\n result = formatter ? formatter(result, tickIndex) : timeFormat(result, this.mask);\n return result;\n }\n return value;\n };\n TimeCat.prototype.initCfg = function () {\n this.tickMethod = 'time-cat';\n this.mask = 'YYYY-MM-DD';\n this.tickCount = 7; // 一般时间数据会显示 7, 14, 30 天的数字\n };\n TimeCat.prototype.setDomain = function () {\n var values = this.values;\n // 针对时间分类类型,会将时间统一转换为时间戳\n each(values, function (v, i) {\n values[i] = toTimeStamp(v);\n });\n values.sort(function (v1, v2) {\n return v1 - v2;\n });\n _super.prototype.setDomain.call(this);\n };\n return TimeCat;\n}(Category));\nexport default TimeCat;\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { filter, getRange, head, isNil, last } from '@antv/util';\nimport Base from '../base';\n/**\n * 连续度量的基类\n * @class\n */\nvar Continuous = /** @class */ (function (_super) {\n __extends(Continuous, _super);\n function Continuous() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isContinuous = true;\n return _this;\n }\n Continuous.prototype.scale = function (value) {\n if (isNil(value)) {\n return NaN;\n }\n var rangeMin = this.rangeMin();\n var rangeMax = this.rangeMax();\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return rangeMin;\n }\n var percent = this.getScalePercent(value);\n return rangeMin + percent * (rangeMax - rangeMin);\n };\n Continuous.prototype.init = function () {\n _super.prototype.init.call(this);\n // init 完成后保证 min, max 包含 ticks 的范围\n var ticks = this.ticks;\n var firstTick = head(ticks);\n var lastTick = last(ticks);\n if (firstTick < this.min) {\n this.min = firstTick;\n }\n if (lastTick > this.max) {\n this.max = lastTick;\n }\n // strict-limit 方式\n if (!isNil(this.minLimit)) {\n this.min = firstTick;\n }\n if (!isNil(this.maxLimit)) {\n this.max = lastTick;\n }\n };\n Continuous.prototype.setDomain = function () {\n var _a = getRange(this.values), min = _a.min, max = _a.max;\n if (isNil(this.min)) {\n this.min = min;\n }\n if (isNil(this.max)) {\n this.max = max;\n }\n if (this.min > this.max) {\n this.min = min;\n this.max = max;\n }\n };\n Continuous.prototype.calculateTicks = function () {\n var _this = this;\n var ticks = _super.prototype.calculateTicks.call(this);\n if (!this.nice) {\n ticks = filter(ticks, function (tick) {\n return tick >= _this.min && tick <= _this.max;\n });\n }\n return ticks;\n };\n // 计算原始值值占的百分比\n Continuous.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n return (value - min) / (max - min);\n };\n Continuous.prototype.getInvertPercent = function (value) {\n return (value - this.rangeMin()) / (this.rangeMax() - this.rangeMin());\n };\n return Continuous;\n}(Base));\nexport default Continuous;\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport Continuous from './base';\n/**\n * 线性度量\n * @class\n */\nvar Linear = /** @class */ (function (_super) {\n __extends(Linear, _super);\n function Linear() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'linear';\n _this.isLinear = true;\n return _this;\n }\n Linear.prototype.invert = function (value) {\n var percent = this.getInvertPercent(value);\n return this.min + percent * (this.max - this.min);\n };\n Linear.prototype.initCfg = function () {\n this.tickMethod = 'wilkinson-extended';\n this.nice = false;\n };\n return Linear;\n}(Continuous));\nexport default Linear;\n//# sourceMappingURL=linear.js.map","import { each, isNil } from '@antv/util';\n// 求以a为次幂,结果为b的基数,如 x^^a = b;求x\n// 虽然数学上 b 不支持负数,但是这里需要支持 负数\nexport function calBase(a, b) {\n var e = Math.E;\n var value;\n if (b >= 0) {\n value = Math.pow(e, Math.log(b) / a); // 使用换底公式求底\n }\n else {\n value = Math.pow(e, Math.log(-b) / a) * -1; // 使用换底公式求底\n }\n return value;\n}\nexport function log(a, b) {\n if (a === 1) {\n return 1;\n }\n return Math.log(b) / Math.log(a);\n}\nexport function getLogPositiveMin(values, base, max) {\n if (isNil(max)) {\n max = Math.max.apply(null, values);\n }\n var positiveMin = max;\n each(values, function (value) {\n if (value > 0 && value < positiveMin) {\n positiveMin = value;\n }\n });\n if (positiveMin === max) {\n positiveMin = max / base;\n }\n if (positiveMin > 1) {\n positiveMin = 1;\n }\n return positiveMin;\n}\nfunction digitLength(num) {\n // Get digit length of e\n var eSplit = num.toString().split(/[eE]/);\n var len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);\n return len > 0 ? len : 0;\n}\n/**\n * 高精度加法,解决 0.1 + 0.2 !== 0.3 的经典问题\n *\n * @param num1 加数\n * @param num2 被加数\n * @return {number} 返回值\n */\nexport function precisionAdd(num1, num2) {\n var num1Digits = digitLength(num1);\n var num2Digits = digitLength(num2);\n var baseNum = Math.pow(10, Math.max(num1Digits, num2Digits));\n return (num1 * baseNum + num2 * baseNum) / baseNum;\n}\n//# sourceMappingURL=math.js.map","import { __extends } from \"tslib\";\nimport { getLogPositiveMin, log } from '../util/math';\nimport Continuous from './base';\n/**\n * Log 度量,处理非均匀分布\n */\nvar Log = /** @class */ (function (_super) {\n __extends(Log, _super);\n function Log() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'log';\n return _this;\n }\n /**\n * @override\n */\n Log.prototype.invert = function (value) {\n var base = this.base;\n var max = log(base, this.max);\n var rangeMin = this.rangeMin();\n var range = this.rangeMax() - rangeMin;\n var min;\n var positiveMin = this.positiveMin;\n if (positiveMin) {\n if (value === 0) {\n return 0;\n }\n min = log(base, positiveMin / base);\n var appendPercent = (1 / (max - min)) * range; // 0 到 positiveMin的占比\n if (value < appendPercent) {\n // 落到 0 - positiveMin 之间\n return (value / appendPercent) * positiveMin;\n }\n }\n else {\n min = log(base, this.min);\n }\n var percent = (value - rangeMin) / range;\n var tmp = percent * (max - min) + min;\n return Math.pow(base, tmp);\n };\n Log.prototype.initCfg = function () {\n this.tickMethod = 'log';\n this.base = 10;\n this.tickCount = 6;\n this.nice = true;\n };\n // 设置\n Log.prototype.setDomain = function () {\n _super.prototype.setDomain.call(this);\n var min = this.min;\n if (min < 0) {\n throw new Error('When you use log scale, the minimum value must be greater than zero!');\n }\n if (min === 0) {\n this.positiveMin = getLogPositiveMin(this.values, this.base, this.max);\n }\n };\n // 根据当前值获取占比\n Log.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return 0;\n }\n // 如果值小于等于0,则按照0处理\n if (value <= 0) {\n return 0;\n }\n var base = this.base;\n var positiveMin = this.positiveMin;\n // 如果min == 0, 则根据比0大的最小值,计算比例关系。这个最小值作为坐标轴上的第二个tick,第一个是0但是不显示\n if (positiveMin) {\n min = (positiveMin * 1) / base;\n }\n var percent;\n // 如果数值小于次小值,那么就计算 value / 次小值 占整体的比例\n if (value < positiveMin) {\n percent = value / positiveMin / (log(base, max) - log(base, min));\n }\n else {\n percent = (log(base, value) - log(base, min)) / (log(base, max) - log(base, min));\n }\n return percent;\n };\n return Log;\n}(Continuous));\nexport default Log;\n//# sourceMappingURL=log.js.map","import { __extends } from \"tslib\";\nimport { calBase } from '../util/math';\nimport Continuous from './base';\n/**\n * Pow 度量,处理非均匀分布\n */\nvar Pow = /** @class */ (function (_super) {\n __extends(Pow, _super);\n function Pow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'pow';\n return _this;\n }\n /**\n * @override\n */\n Pow.prototype.invert = function (value) {\n var percent = this.getInvertPercent(value);\n var exponent = this.exponent;\n var max = calBase(exponent, this.max);\n var min = calBase(exponent, this.min);\n var tmp = percent * (max - min) + min;\n var factor = tmp >= 0 ? 1 : -1;\n return Math.pow(tmp, exponent) * factor;\n };\n Pow.prototype.initCfg = function () {\n this.tickMethod = 'pow';\n this.exponent = 2;\n this.tickCount = 5;\n this.nice = true;\n };\n // 获取度量计算时,value占的定义域百分比\n Pow.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return 0;\n }\n var exponent = this.exponent;\n var percent = (calBase(exponent, value) - calBase(exponent, min)) / (calBase(exponent, max) - calBase(exponent, min));\n return percent;\n };\n return Pow;\n}(Continuous));\nexport default Pow;\n//# sourceMappingURL=pow.js.map","import { __extends } from \"tslib\";\nimport { each, isDate, isNil, isNumber, isString } from '@antv/util';\nimport { timeFormat, toTimeStamp } from '../util/time';\nimport Linear from './linear';\n/**\n * 时间度量\n * @class\n */\nvar Time = /** @class */ (function (_super) {\n __extends(Time, _super);\n function Time() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'time';\n return _this;\n }\n /**\n * @override\n */\n Time.prototype.getText = function (value, index) {\n var numberValue = this.translate(value);\n var formatter = this.formatter;\n return formatter ? formatter(numberValue, index) : timeFormat(numberValue, this.mask);\n };\n /**\n * @override\n */\n Time.prototype.scale = function (value) {\n var v = value;\n if (isString(v) || isDate(v)) {\n v = this.translate(v);\n }\n return _super.prototype.scale.call(this, v);\n };\n /**\n * 将时间转换成数字\n * @override\n */\n Time.prototype.translate = function (v) {\n return toTimeStamp(v);\n };\n Time.prototype.initCfg = function () {\n this.tickMethod = 'time-pretty';\n this.mask = 'YYYY-MM-DD';\n this.tickCount = 7;\n this.nice = false;\n };\n Time.prototype.setDomain = function () {\n var values = this.values;\n // 是否设置了 min, max,而不是直接取 this.min, this.max\n var minConfig = this.getConfig('min');\n var maxConfig = this.getConfig('max');\n // 如果设置了 min,max 则转换成时间戳\n if (!isNil(minConfig) || !isNumber(minConfig)) {\n this.min = this.translate(this.min);\n }\n if (!isNil(maxConfig) || !isNumber(maxConfig)) {\n this.max = this.translate(this.max);\n }\n // 没有设置 min, max 时\n if (values && values.length) {\n // 重新计算最大最小值\n var timeStamps_1 = [];\n var min_1 = Infinity; // 最小值\n var secondMin_1 = min_1; // 次小值\n var max_1 = 0;\n // 使用一个循环,计算min,max,secondMin\n each(values, function (v) {\n var timeStamp = toTimeStamp(v);\n if (isNaN(timeStamp)) {\n throw new TypeError(\"Invalid Time: \" + v + \" in time scale!\");\n }\n if (min_1 > timeStamp) {\n secondMin_1 = min_1;\n min_1 = timeStamp;\n }\n else if (secondMin_1 > timeStamp) {\n secondMin_1 = timeStamp;\n }\n if (max_1 < timeStamp) {\n max_1 = timeStamp;\n }\n timeStamps_1.push(timeStamp);\n });\n // 存在多个值时,设置最小间距\n if (values.length > 1) {\n this.minTickInterval = secondMin_1 - min_1;\n }\n if (isNil(minConfig)) {\n this.min = min_1;\n }\n if (isNil(maxConfig)) {\n this.max = max_1;\n }\n }\n };\n return Time;\n}(Linear));\nexport default Time;\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { each, head, last } from '@antv/util';\nimport Continuous from './base';\n/**\n * 分段度量\n */\nvar Quantize = /** @class */ (function (_super) {\n __extends(Quantize, _super);\n function Quantize() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'quantize';\n return _this;\n }\n Quantize.prototype.invert = function (value) {\n var ticks = this.ticks;\n var length = ticks.length;\n var percent = this.getInvertPercent(value);\n var minIndex = Math.floor(percent * (length - 1));\n // 最后一个\n if (minIndex >= length - 1) {\n return last(ticks);\n }\n // 超出左边界, 则取第一个\n if (minIndex < 0) {\n return head(ticks);\n }\n var minTick = ticks[minIndex];\n var nextTick = ticks[minIndex + 1];\n // 比当前值小的 tick 在度量上的占比\n var minIndexPercent = minIndex / (length - 1);\n var maxIndexPercent = (minIndex + 1) / (length - 1);\n return minTick + (percent - minIndexPercent) / (maxIndexPercent - minIndexPercent) * (nextTick - minTick);\n };\n Quantize.prototype.initCfg = function () {\n this.tickMethod = 'r-pretty';\n this.tickCount = 5;\n this.nice = true;\n };\n Quantize.prototype.calculateTicks = function () {\n var ticks = _super.prototype.calculateTicks.call(this);\n if (!this.nice) { // 如果 nice = false ,补充 min, max\n if (last(ticks) !== this.max) {\n ticks.push(this.max);\n }\n if (head(ticks) !== this.min) {\n ticks.unshift(this.min);\n }\n }\n return ticks;\n };\n // 计算当前值在刻度中的占比\n Quantize.prototype.getScalePercent = function (value) {\n var ticks = this.ticks;\n // 超出左边界\n if (value < head(ticks)) {\n return 0;\n }\n // 超出右边界\n if (value > last(ticks)) {\n return 1;\n }\n var minIndex = 0;\n each(ticks, function (tick, index) {\n if (value >= tick) {\n minIndex = index;\n }\n else {\n return false;\n }\n });\n return minIndex / (ticks.length - 1);\n };\n return Quantize;\n}(Continuous));\nexport default Quantize;\n//# sourceMappingURL=quantize.js.map","import { __extends } from \"tslib\";\nimport Quantize from './quantize';\nvar Quantile = /** @class */ (function (_super) {\n __extends(Quantile, _super);\n function Quantile() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'quantile';\n return _this;\n }\n Quantile.prototype.initCfg = function () {\n this.tickMethod = 'quantile';\n this.tickCount = 5;\n this.nice = true;\n };\n return Quantile;\n}(Quantize));\nexport default Quantile;\n//# sourceMappingURL=quantile.js.map","import Scale from './base';\nvar map = {};\nfunction getClass(key) {\n return map[key];\n}\nfunction registerClass(key, cls) {\n if (getClass(key)) {\n throw new Error(\"type '\" + key + \"' existed.\");\n }\n map[key] = cls;\n}\nexport { Scale, getClass as getScale, registerClass as registerScale };\n//# sourceMappingURL=factory.js.map","import { __extends } from \"tslib\";\nimport { isNumber } from '@antv/util';\nimport Base from '../base';\n/**\n * identity scale原则上是定义域和值域一致,scale/invert方法也是一致的\n * 参考R的实现:https://github.com/r-lib/scales/blob/master/R/pal-identity.r\n * 参考d3的实现(做了下转型):https://github.com/d3/d3-scale/blob/master/src/identity.js\n */\nvar Identity = /** @class */ (function (_super) {\n __extends(Identity, _super);\n function Identity() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'identity';\n _this.isIdentity = true;\n return _this;\n }\n Identity.prototype.calculateTicks = function () {\n return this.values;\n };\n Identity.prototype.scale = function (value) {\n // 如果传入的值不等于 identity 的值,则直接返回,用于一维图时的 dodge\n if (this.values[0] !== value && isNumber(value)) {\n return value;\n }\n return this.range[0];\n };\n Identity.prototype.invert = function (value) {\n var range = this.range;\n if (value < range[0] || value > range[1]) {\n return NaN;\n }\n return this.values[0];\n };\n return Identity;\n}(Base));\nexport default Identity;\n//# sourceMappingURL=index.js.map","import { filter, isNil, isNumber, last } from '@antv/util';\n/**\n * 计算分类 ticks\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculateCatTicks(cfg) {\n var values = cfg.values, tickInterval = cfg.tickInterval, tickCount = cfg.tickCount, showLast = cfg.showLast;\n if (isNumber(tickInterval)) {\n var ticks_1 = filter(values, function (__, i) { return i % tickInterval === 0; });\n var lastValue = last(values);\n if (showLast && last(ticks_1) !== lastValue) {\n ticks_1.push(lastValue);\n }\n return ticks_1;\n }\n var len = values.length;\n var min = cfg.min, max = cfg.max;\n if (isNil(min)) {\n min = 0;\n }\n if (isNil(max)) {\n max = values.length - 1;\n }\n if (!isNumber(tickCount) || tickCount >= len)\n return values.slice(min, max + 1);\n if (tickCount <= 0 || max <= 0)\n return [];\n var interval = tickCount === 1 ? len : Math.floor(len / (tickCount - 1));\n var ticks = [];\n var idx = min;\n for (var i = 0; i < tickCount; i++) {\n if (idx >= max)\n break;\n idx = Math.min(min + i * interval, max);\n if (i === tickCount - 1 && showLast)\n ticks.push(values[max]);\n else\n ticks.push(values[idx]);\n }\n return ticks;\n}\n//# sourceMappingURL=cat.js.map","export default function d3Linear(cfg) {\n var min = cfg.min, max = cfg.max, nice = cfg.nice, tickCount = cfg.tickCount;\n var linear = new D3Linear();\n linear.domain([min, max]);\n if (nice) {\n linear.nice(tickCount);\n }\n return linear.ticks(tickCount);\n}\nvar DEFAULT_COUNT = 5;\nvar e10 = Math.sqrt(50);\nvar e5 = Math.sqrt(10);\nvar e2 = Math.sqrt(2);\n// https://github.com/d3/d3-scale\nvar D3Linear = /** @class */ (function () {\n function D3Linear() {\n this._domain = [0, 1];\n }\n D3Linear.prototype.domain = function (domain) {\n if (domain) {\n this._domain = Array.from(domain, Number);\n return this;\n }\n return this._domain.slice();\n };\n D3Linear.prototype.nice = function (count) {\n var _a, _b;\n if (count === void 0) { count = DEFAULT_COUNT; }\n var d = this._domain.slice();\n var i0 = 0;\n var i1 = this._domain.length - 1;\n var start = this._domain[i0];\n var stop = this._domain[i1];\n var step;\n if (stop < start) {\n _a = [stop, start], start = _a[0], stop = _a[1];\n _b = [i1, i0], i0 = _b[0], i1 = _b[1];\n }\n step = tickIncrement(start, stop, count);\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n }\n else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n this.domain(d);\n }\n else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n this.domain(d);\n }\n return this;\n };\n D3Linear.prototype.ticks = function (count) {\n if (count === void 0) { count = DEFAULT_COUNT; }\n return d3ArrayTicks(this._domain[0], this._domain[this._domain.length - 1], count || DEFAULT_COUNT);\n };\n return D3Linear;\n}());\nexport { D3Linear };\nfunction d3ArrayTicks(start, stop, count) {\n var reverse;\n var i = -1;\n var n;\n var ticks;\n var step;\n (stop = +stop), (start = +start), (count = +count);\n if (start === stop && count > 0) {\n return [start];\n }\n // tslint:disable-next-line\n if ((reverse = stop < start)) {\n (n = start), (start = stop), (stop = n);\n }\n // tslint:disable-next-line\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) {\n return [];\n }\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array((n = Math.ceil(stop - start + 1)));\n while (++i < n) {\n ticks[i] = (start + i) * step;\n }\n }\n else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array((n = Math.ceil(start - stop + 1)));\n while (++i < n) {\n ticks[i] = (start - i) / step;\n }\n }\n if (reverse) {\n ticks.reverse();\n }\n return ticks;\n}\nfunction tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count);\n var power = Math.floor(Math.log(step) / Math.LN10);\n var error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n//# sourceMappingURL=d3-linear.js.map","import { fixedBase } from '@antv/util';\nfunction snapMultiple(v, base, snapType) {\n var div;\n if (snapType === 'ceil') {\n div = Math.ceil(v / base);\n }\n else if (snapType === 'floor') {\n div = Math.floor(v / base);\n }\n else {\n div = Math.round(v / base);\n }\n return div * base;\n}\nexport default function intervalTicks(min, max, interval) {\n // 变成 interval 的倍数\n var minTick = snapMultiple(min, interval, 'floor');\n var maxTick = snapMultiple(max, interval, 'ceil');\n // 统一小数位数\n minTick = fixedBase(minTick, interval);\n maxTick = fixedBase(maxTick, interval);\n var ticks = [];\n // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n var availableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);\n for (var i = minTick; i <= maxTick; i = i + availableInterval) {\n var tickValue = fixedBase(i, availableInterval); // 防止浮点数加法出现问题\n ticks.push(tickValue);\n }\n return {\n min: minTick,\n max: maxTick,\n ticks: ticks\n };\n}\n//# sourceMappingURL=interval.js.map","import { isNil } from '@antv/util';\n/**\n * 按照给定的 minLimit/maxLimit/tickCount 均匀计算出刻度 ticks\n *\n * @param cfg Scale 配置项\n * @return ticks\n */\nexport default function strictLimit(cfg, defaultMin, defaultMax) {\n var _a;\n var minLimit = cfg.minLimit, maxLimit = cfg.maxLimit, min = cfg.min, max = cfg.max, _b = cfg.tickCount, tickCount = _b === void 0 ? 5 : _b;\n var tickMin = isNil(minLimit) ? (isNil(defaultMin) ? min : defaultMin) : minLimit;\n var tickMax = isNil(maxLimit) ? (isNil(defaultMax) ? max : defaultMax) : maxLimit;\n if (tickMin > tickMax) {\n _a = [tickMin, tickMax], tickMax = _a[0], tickMin = _a[1];\n }\n if (tickCount <= 2) {\n return [tickMin, tickMax];\n }\n var step = (tickMax - tickMin) / (tickCount - 1);\n var ticks = [];\n for (var i = 0; i < tickCount; i++) {\n ticks.push(tickMin + step * i);\n }\n return ticks;\n}\n//# sourceMappingURL=strict-limit.js.map","import { head, isNil, last } from '@antv/util';\nimport d3Linear from '../util/d3-linear';\nimport interval from '../util/interval';\nimport strictLimit from '../util/strict-limit';\nexport default function d3LinearTickMethod(cfg) {\n var min = cfg.min, max = cfg.max, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = d3Linear(cfg);\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=d3-linear.js.map","// 为了解决 js 运算的精度问题\nexport function prettyNumber(n) {\n return Math.abs(n) < 1e-15 ? n : parseFloat(n.toFixed(15));\n}\n//# sourceMappingURL=pretty-number.js.map","import { head, indexOf, size, last } from '@antv/util';\nimport { prettyNumber } from './pretty-number';\nexport var DEFAULT_Q = [1, 5, 2, 2.5, 4, 3];\nexport var ALL_Q = [1, 5, 2, 2.5, 4, 3, 1.5, 7, 6, 8, 9];\nvar eps = Number.EPSILON * 100;\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\nfunction round(n) {\n return Math.round(n * 1e12) / 1e12;\n}\nfunction simplicity(q, Q, j, lmin, lmax, lstep) {\n var n = size(Q);\n var i = indexOf(Q, q);\n var v = 0;\n var m = mod(lmin, lstep);\n if ((m < eps || lstep - m < eps) && lmin <= 0 && lmax >= 0) {\n v = 1;\n }\n return 1 - i / (n - 1) - j + v;\n}\nfunction simplicityMax(q, Q, j) {\n var n = size(Q);\n var i = indexOf(Q, q);\n var v = 1;\n return 1 - i / (n - 1) - j + v;\n}\nfunction density(k, m, dMin, dMax, lMin, lMax) {\n var r = (k - 1) / (lMax - lMin);\n var rt = (m - 1) / (Math.max(lMax, dMax) - Math.min(dMin, lMin));\n return 2 - Math.max(r / rt, rt / r);\n}\nfunction densityMax(k, m) {\n if (k >= m) {\n return 2 - (k - 1) / (m - 1);\n }\n return 1;\n}\nfunction coverage(dMin, dMax, lMin, lMax) {\n var range = dMax - dMin;\n return 1 - (0.5 * (Math.pow((dMax - lMax), 2) + Math.pow((dMin - lMin), 2))) / Math.pow((0.1 * range), 2);\n}\nfunction coverageMax(dMin, dMax, span) {\n var range = dMax - dMin;\n if (span > range) {\n var half = (span - range) / 2;\n return 1 - Math.pow(half, 2) / Math.pow((0.1 * range), 2);\n }\n return 1;\n}\nfunction legibility() {\n return 1;\n}\n/**\n * An Extension of Wilkinson's Algorithm for Position Tick Labels on Axes\n * https://www.yuque.com/preview/yuque/0/2019/pdf/185317/1546999150858-45c3b9c2-4e86-4223-bf1a-8a732e8195ed.pdf\n * @param dMin 最小值\n * @param dMax 最大值\n * @param m tick个数\n * @param onlyLoose 是否允许扩展min、max,不绝对强制,例如[3, 97]\n * @param Q nice numbers集合\n * @param w 四个优化组件的权重\n */\nexport default function extended(dMin, dMax, n, onlyLoose, Q, w) {\n if (n === void 0) { n = 5; }\n if (onlyLoose === void 0) { onlyLoose = true; }\n if (Q === void 0) { Q = DEFAULT_Q; }\n if (w === void 0) { w = [0.25, 0.2, 0.5, 0.05]; }\n // 处理小于 0 和小数的 tickCount\n var m = n < 0 ? 0 : Math.round(n);\n // nan 也会导致异常\n if (Number.isNaN(dMin) || Number.isNaN(dMax) || typeof dMin !== 'number' || typeof dMax !== 'number' || !m) {\n return {\n min: 0,\n max: 0,\n ticks: [],\n };\n }\n // js 极大值极小值问题,差值小于 1e-15 会导致计算出错\n if (dMax - dMin < 1e-15 || m === 1) {\n return {\n min: dMin,\n max: dMax,\n ticks: [dMin],\n };\n }\n // js 超大值问题\n if (dMax - dMin > 1e148) {\n var count = n || 5;\n var step_1 = (dMax - dMin) / count;\n return {\n min: dMin,\n max: dMax,\n ticks: Array(count).fill(null).map(function (_, idx) {\n return prettyNumber(dMin + step_1 * idx);\n }),\n };\n }\n var best = {\n score: -2,\n lmin: 0,\n lmax: 0,\n lstep: 0,\n };\n var j = 1;\n while (j < Infinity) {\n for (var i = 0; i < Q.length; i += 1) {\n var q = Q[i];\n var sm = simplicityMax(q, Q, j);\n if (w[0] * sm + w[1] + w[2] + w[3] < best.score) {\n j = Infinity;\n break;\n }\n var k = 2;\n while (k < Infinity) {\n var dm = densityMax(k, m);\n if (w[0] * sm + w[1] + w[2] * dm + w[3] < best.score) {\n break;\n }\n var delta = (dMax - dMin) / (k + 1) / j / q;\n var z = Math.ceil(Math.log10(delta));\n while (z < Infinity) {\n var step = j * q * Math.pow(10, z);\n var cm = coverageMax(dMin, dMax, step * (k - 1));\n if (w[0] * sm + w[1] * cm + w[2] * dm + w[3] < best.score) {\n break;\n }\n var minStart = Math.floor(dMax / step) * j - (k - 1) * j;\n var maxStart = Math.ceil(dMin / step) * j;\n if (minStart <= maxStart) {\n var count = maxStart - minStart;\n for (var i_1 = 0; i_1 <= count; i_1 += 1) {\n var start = minStart + i_1;\n var lMin = start * (step / j);\n var lMax = lMin + step * (k - 1);\n var lStep = step;\n var s = simplicity(q, Q, j, lMin, lMax, lStep);\n var c = coverage(dMin, dMax, lMin, lMax);\n var g = density(k, m, dMin, dMax, lMin, lMax);\n var l = legibility();\n var score = w[0] * s + w[1] * c + w[2] * g + w[3] * l;\n if (score > best.score && (!onlyLoose || (lMin <= dMin && lMax >= dMax))) {\n best.lmin = lMin;\n best.lmax = lMax;\n best.lstep = lStep;\n best.score = score;\n }\n }\n }\n z += 1;\n }\n k += 1;\n }\n }\n j += 1;\n }\n // 处理精度问题,保证这三个数没有精度问题\n var lmax = prettyNumber(best.lmax);\n var lmin = prettyNumber(best.lmin);\n var lstep = prettyNumber(best.lstep);\n // 加 round 是为处理 extended(0.94, 1, 5)\n // 保证生成的 tickCount 没有精度问题\n var tickCount = Math.floor(round((lmax - lmin) / lstep)) + 1;\n var ticks = new Array(tickCount);\n // 少用乘法:防止出现 -1.2 + 1.2 * 3 = 2.3999999999999995 的情况\n ticks[0] = prettyNumber(lmin);\n for (var i = 1; i < tickCount; i++) {\n ticks[i] = prettyNumber(ticks[i - 1] + lstep);\n }\n return {\n min: Math.min(dMin, head(ticks)),\n max: Math.max(dMax, last(ticks)),\n ticks: ticks,\n };\n}\n//# sourceMappingURL=extended.js.map","import { head, isNil, last } from '@antv/util';\nimport extended from '../util/extended';\nimport interval from '../util/interval';\nimport strictLimit from '../util/strict-limit';\n/**\n * 计算线性的 ticks,使用 wilkinson extended 方法\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function linear(cfg) {\n var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, nice = cfg.nice, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = extended(min, max, tickCount, nice).ticks;\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=linear.js.map","import { getLogPositiveMin, log } from '../util/math';\n/**\n * 计算 log 的 ticks,考虑 min = 0 的场景\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculateLogTicks(cfg) {\n var base = cfg.base, tickCount = cfg.tickCount, min = cfg.min, max = cfg.max, values = cfg.values;\n var minTick;\n var maxTick = log(base, max);\n if (min > 0) {\n minTick = Math.floor(log(base, min));\n }\n else {\n var positiveMin = getLogPositiveMin(values, base, max);\n minTick = Math.floor(log(base, positiveMin));\n }\n var count = maxTick - minTick;\n var avg = Math.ceil(count / tickCount);\n var ticks = [];\n for (var i = minTick; i < maxTick + avg; i = i + avg) {\n ticks.push(Math.pow(base, i));\n }\n if (min <= 0) {\n // 最小值 <= 0 时显示 0\n ticks.unshift(0);\n }\n return ticks;\n}\n//# sourceMappingURL=log.js.map","import { prettyNumber } from './pretty-number';\nexport default function pretty(min, max, m) {\n if (m === void 0) { m = 5; }\n if (min === max) {\n return {\n max: max,\n min: min,\n ticks: [min],\n };\n }\n var n = m < 0 ? 0 : Math.round(m);\n if (n === 0)\n return { max: max, min: min, ticks: [] };\n /*\n R pretty:\n https://svn.r-project.org/R/trunk/src/appl/pretty.c\n https://www.rdocumentation.org/packages/base/versions/3.5.2/topics/pretty\n */\n var h = 1.5; // high.u.bias\n var h5 = 0.5 + 1.5 * h; // u5.bias\n // 反正我也不会调参,跳过所有判断步骤\n var d = max - min;\n var c = d / n;\n // 当d非常小的时候触发,但似乎没什么用\n // const min_n = Math.floor(n / 3);\n // const shrink_sml = Math.pow(2, 5);\n // if (Math.log10(d) < -2) {\n // c = (_.max([ Math.abs(max), Math.abs(min) ]) * shrink_sml) / min_n;\n // }\n var base = Math.pow(10, Math.floor(Math.log10(c)));\n var unit = base;\n if (2 * base - c < h * (c - unit)) {\n unit = 2 * base;\n if (5 * base - c < h5 * (c - unit)) {\n unit = 5 * base;\n if (10 * base - c < h * (c - unit)) {\n unit = 10 * base;\n }\n }\n }\n var nu = Math.ceil(max / unit);\n var ns = Math.floor(min / unit);\n var hi = Math.max(nu * unit, max);\n var lo = Math.min(ns * unit, min);\n var size = Math.floor((hi - lo) / unit) + 1;\n var ticks = new Array(size);\n for (var i = 0; i < size; i++) {\n ticks[i] = prettyNumber(lo + i * unit);\n }\n return {\n min: lo,\n max: hi,\n ticks: ticks,\n };\n}\n//# sourceMappingURL=pretty.js.map","import { calBase } from '../util/math';\nimport pretty from '../util/pretty';\n/**\n * 计算 Pow 的 ticks\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculatePowTicks(cfg) {\n var exponent = cfg.exponent, tickCount = cfg.tickCount;\n var max = Math.ceil(calBase(exponent, cfg.max));\n var min = Math.floor(calBase(exponent, cfg.min));\n var ticks = pretty(min, max, tickCount).ticks;\n return ticks.map(function (tick) {\n var factor = tick >= 0 ? 1 : -1;\n return Math.pow(tick, exponent) * factor;\n });\n}\n//# sourceMappingURL=pow.js.map","/**\n * 计算几分位 https://github.com/simple-statistics/simple-statistics/blob/master/src/quantile_sorted.js\n * @param x 数组\n * @param p 百分比\n */\nfunction quantileSorted(x, p) {\n var idx = x.length * p;\n /*if (x.length === 0) { // 当前场景这些条件不可能命中\n throw new Error('quantile requires at least one value.');\n } else if (p < 0 || p > 1) {\n throw new Error('quantiles must be between 0 and 1');\n } else */\n if (p === 1) {\n // If p is 1, directly return the last element\n return x[x.length - 1];\n }\n else if (p === 0) {\n // If p is 0, directly return the first element\n return x[0];\n }\n else if (idx % 1 !== 0) {\n // If p is not integer, return the next element in array\n return x[Math.ceil(idx) - 1];\n }\n else if (x.length % 2 === 0) {\n // If the list has even-length, we'll take the average of this number\n // and the next value, if there is one\n return (x[idx - 1] + x[idx]) / 2;\n }\n else {\n // Finally, in the simple case of an integer value\n // with an odd-length list, return the x value at the index.\n return x[idx];\n }\n}\nexport default function calculateTicks(cfg) {\n var tickCount = cfg.tickCount, values = cfg.values;\n if (!values || !values.length) {\n return [];\n }\n var sorted = values.slice().sort(function (a, b) {\n return a - b;\n });\n var ticks = [];\n for (var i = 0; i < tickCount; i++) {\n var p = i / (tickCount - 1);\n ticks.push(quantileSorted(sorted, p));\n }\n return ticks;\n}\n//# sourceMappingURL=quantile.js.map","import { head, isNil, last } from '@antv/util';\nimport interval from '../util/interval';\nimport pretty from '../util/pretty';\nimport strictLimit from '../util/strict-limit';\n/**\n * 计算线性的 ticks,使用 R's pretty 方法\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function linearPretty(cfg) {\n var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = pretty(min, max, tickCount).ticks;\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=r-prettry.js.map","import { getTickInterval } from '../util/time';\nexport default function calculateTimeTicks(cfg) {\n var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval;\n var tickInterval = cfg.tickInterval;\n var tickCount = cfg.tickCount;\n // 指定 tickInterval 后 tickCount 不生效,需要重新计算\n if (tickInterval) {\n tickCount = Math.ceil((max - min) / tickInterval);\n }\n else {\n tickInterval = getTickInterval(min, max, tickCount)[1];\n var count = (max - min) / tickInterval;\n var ratio = count / tickCount;\n if (ratio > 1) {\n tickInterval = tickInterval * Math.ceil(ratio);\n }\n // 如果设置了最小间距,则使用最小间距\n if (minTickInterval && tickInterval < minTickInterval) {\n tickInterval = minTickInterval;\n }\n }\n tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);\n var ticks = [];\n for (var i = min; i < max + tickInterval; i += tickInterval) {\n ticks.push(i);\n }\n return ticks;\n}\n//# sourceMappingURL=time.js.map","import { __assign } from \"tslib\";\nimport catTicks from './cat';\n/**\n * 计算时间分类的 ticks, 保头,保尾\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function timeCat(cfg) {\n // 默认保留最后一条\n var ticks = catTicks(__assign({ showLast: true }, cfg));\n return ticks;\n}\n//# sourceMappingURL=time-cat.js.map","import { DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } from '../util/time';\nfunction getYear(date) {\n return new Date(date).getFullYear();\n}\nfunction createYear(year) {\n return new Date(year, 0, 1).getTime();\n}\nfunction getMonth(date) {\n return new Date(date).getMonth();\n}\nfunction diffMonth(min, max) {\n var minYear = getYear(min);\n var maxYear = getYear(max);\n var minMonth = getMonth(min);\n var maxMonth = getMonth(max);\n return (maxYear - minYear) * 12 + ((maxMonth - minMonth) % 12);\n}\nfunction creatMonth(year, month) {\n return new Date(year, month, 1).getTime();\n}\nfunction diffDay(min, max) {\n return Math.ceil((max - min) / DAY);\n}\nfunction diffHour(min, max) {\n return Math.ceil((max - min) / HOUR);\n}\nfunction diffMinus(min, max) {\n return Math.ceil((max - min) / (60 * 1000));\n}\n/**\n * 计算 time 的 ticks,对 month, year 进行 pretty 处理\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function timePretty(cfg) {\n var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval, tickCount = cfg.tickCount;\n var tickInterval = cfg.tickInterval;\n var ticks = [];\n // 指定 tickInterval 后 tickCount 不生效,需要重新计算\n if (!tickInterval) {\n tickInterval = (max - min) / tickCount;\n // 如果设置了最小间距,则使用最小间距\n if (minTickInterval && tickInterval < minTickInterval) {\n tickInterval = minTickInterval;\n }\n }\n tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);\n var minYear = getYear(min);\n // 如果间距大于 1 年,则将开始日期从整年开始\n if (tickInterval > YEAR) {\n var maxYear = getYear(max);\n var yearInterval = Math.ceil(tickInterval / YEAR);\n for (var i = minYear; i <= maxYear + yearInterval; i = i + yearInterval) {\n ticks.push(createYear(i));\n }\n }\n else if (tickInterval > MONTH) {\n // 大于月时\n var monthInterval = Math.ceil(tickInterval / MONTH);\n var mmMoth = getMonth(min);\n var dMonths = diffMonth(min, max);\n for (var i = 0; i <= dMonths + monthInterval; i = i + monthInterval) {\n ticks.push(creatMonth(minYear, i + mmMoth));\n }\n }\n else if (tickInterval > DAY) {\n // 大于天\n var date = new Date(min);\n var year = date.getFullYear();\n var month = date.getMonth();\n var mday = date.getDate();\n var day = Math.ceil(tickInterval / DAY);\n var ddays = diffDay(min, max);\n for (var i = 0; i < ddays + day; i = i + day) {\n ticks.push(new Date(year, month, mday + i).getTime());\n }\n }\n else if (tickInterval > HOUR) {\n // 大于小时\n var date = new Date(min);\n var year = date.getFullYear();\n var month = date.getMonth();\n var day = date.getDate();\n var hour = date.getHours();\n var hours = Math.ceil(tickInterval / HOUR);\n var dHours = diffHour(min, max);\n for (var i = 0; i <= dHours + hours; i = i + hours) {\n ticks.push(new Date(year, month, day, hour + i).getTime());\n }\n }\n else if (tickInterval > MINUTE) {\n // 大于分钟\n var dMinus = diffMinus(min, max);\n var minutes = Math.ceil(tickInterval / MINUTE);\n for (var i = 0; i <= dMinus + minutes; i = i + minutes) {\n ticks.push(min + i * MINUTE);\n }\n }\n else {\n // 小于分钟\n var interval = tickInterval;\n if (interval < SECOND) {\n interval = SECOND;\n }\n var minSecond = Math.floor(min / SECOND) * SECOND;\n var dSeconds = Math.ceil((max - min) / SECOND);\n var seconds = Math.ceil(interval / SECOND);\n for (var i = 0; i < dSeconds + seconds; i = i + seconds) {\n ticks.push(minSecond + i * SECOND);\n }\n }\n // 最好是能从算法能解决这个问题,但是如果指定了 tickInterval,计算 ticks,也只能这么算,所以\n // 打印警告提示\n if (ticks.length >= 512) {\n console.warn(\"Notice: current ticks length(\" + ticks.length + \") >= 512, may cause performance issues, even out of memory. Because of the configure \\\"tickInterval\\\"(in milliseconds, current is \" + tickInterval + \") is too small, increase the value to solve the problem!\");\n }\n return ticks;\n}\n//# sourceMappingURL=time-pretty.js.map","import cat from './cat';\nimport d3Linear from './d3-linear';\nimport linear from './linear';\nimport log from './log';\nimport pow from './pow';\nimport quantile from './quantile';\nimport rPretty from './r-prettry';\nimport { getTickMethod, registerTickMethod } from './register';\nimport time from './time';\nimport timeCat from './time-cat';\nimport timePretty from './time-pretty';\nregisterTickMethod('cat', cat);\nregisterTickMethod('time-cat', timeCat);\nregisterTickMethod('wilkinson-extended', linear);\nregisterTickMethod('r-pretty', rPretty);\nregisterTickMethod('time', time);\nregisterTickMethod('time-pretty', timePretty);\nregisterTickMethod('log', log);\nregisterTickMethod('pow', pow);\nregisterTickMethod('quantile', quantile);\nregisterTickMethod('d3-linear', d3Linear);\nexport { getTickMethod, registerTickMethod };\n//# sourceMappingURL=index.js.map","import Scale from './base';\nimport Category from './category/base';\nimport TimeCat from './category/time';\nimport Linear from './continuous/linear';\nimport Log from './continuous/log';\nimport Pow from './continuous/pow';\nimport Time from './continuous/time';\nimport Quantize from './continuous/quantize';\nimport Quantile from './continuous/quantile';\nimport { getScale, registerScale } from './factory';\nimport Identity from './identity/index';\nimport { getTickMethod, registerTickMethod } from './tick-method/index';\nregisterScale('cat', Category);\nregisterScale('category', Category);\nregisterScale('identity', Identity);\nregisterScale('linear', Linear);\nregisterScale('log', Log);\nregisterScale('pow', Pow);\nregisterScale('time', Time);\nregisterScale('timeCat', TimeCat);\nregisterScale('quantize', Quantize);\nregisterScale('quantile', Quantile);\nexport { Category, Identity, Linear, Log, Pow, Time, TimeCat, Quantile, Quantize, Scale, getScale, registerScale, getTickMethod, registerTickMethod, };\n//# sourceMappingURL=index.js.map","var __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport * as pathUtil from '@antv/path-util';\nimport { Category, Linear } from '@antv/scale';\nimport { map, each, isEqual, head, isArray } from '@antv/util';\n/**\n * 点数组转 path\n * @param points\n */\nfunction pointsToPath(points) {\n return map(points, function (p, idx) {\n var command = idx === 0 ? 'M' : 'L';\n var x = p[0],\n y = p[1];\n return [command, x, y];\n });\n}\n/**\n * 将点连接成路径 path\n * @param points\n */\nexport function getLinePath(points) {\n return pointsToPath(points);\n}\n/**\n * 将点连成平滑的曲线\n * @param points\n */\nexport function getSmoothLinePath(points) {\n if (points.length <= 2) {\n // 两点以内直接绘制成路径\n return getLinePath(points);\n }\n var data = [];\n each(points, function (p) {\n // 当前点和上一个点一样的时候,忽略掉\n if (!isEqual(p, data.slice(data.length - 2))) {\n data.push(p[0], p[1]);\n }\n });\n var path = pathUtil.catmullRom2Bezier(data, false);\n var _a = head(points),\n x = _a[0],\n y = _a[1];\n path.unshift(['M', x, y]);\n return path;\n}\n/**\n * 将数据转成 path,利用 scale 的归一化能力\n * @param data\n * @param width\n * @param height\n * @param smooth\n */\nexport function dataToPath(data, width, height, smooth) {\n if (smooth === void 0) {\n smooth = true;\n }\n // 利用 scale 来获取 y 上的映射\n var y = new Linear({\n values: data\n });\n var x = new Category({\n values: map(data, function (v, idx) {\n return idx;\n })\n });\n var points = map(data, function (v, idx) {\n return [x.scale(idx) * width, height - y.scale(v) * height];\n });\n return smooth ? getSmoothLinePath(points) : getLinePath(points);\n}\nexport function dataToRectPath(data, width, height, barWidth) {\n if (barWidth === void 0) {\n barWidth = 5;\n }\n // 利用 scale 来获取 y 上的映射\n var y = new Linear({\n values: data\n });\n var x = new Category({\n values: map(data, function (v, idx) {\n return idx;\n })\n });\n var points = map(data, function (v, idx) {\n return [x.scale(idx) * width, height - y.scale(v) * height];\n });\n var rectPoints = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n var param = {\n x: point[0],\n y: point[1],\n y0: height,\n size: barWidth\n };\n var rectPoint = getRectPoints(param);\n rectPoints.push.apply(rectPoints, rectPoint);\n }\n return getRectPath(rectPoints);\n}\n/**\n * 获得 area 面积的横向连接线的 px 位置\n * @param data\n * @param width\n * @param height\n */\nexport function getAreaLineY(data, height) {\n var y = new Linear({\n values: data\n });\n var lineY = Math.max(0, y.min);\n return height - y.scale(lineY) * height;\n}\n/**\n * 线 path 转 area path\n * @param path\n * @param width\n * @param height\n */\nexport function linePathToAreaPath(path, width, height, data) {\n var areaPath = __spreadArray([], path, true);\n var lineYPx = getAreaLineY(data, height);\n areaPath.push(['L', width, lineYPx]);\n areaPath.push(['L', 0, lineYPx]);\n areaPath.push(['Z']);\n return areaPath;\n}\n/**\n * @ignore\n * 根据数据点生成矩形的四个关键点\n * @param pointInfo 数据点信息\n * @returns rect points 返回矩形四个顶点信息\n */\nexport function getRectPoints(pointInfo) {\n var x = pointInfo.x,\n y = pointInfo.y,\n y0 = pointInfo.y0,\n size = pointInfo.size;\n // 有 4 种情况,\n // 1. x, y 都不是数组\n // 2. y是数组,x不是\n // 3. x是数组,y不是\n // 4. x, y 都是数组\n var yMin;\n var yMax;\n if (isArray(y)) {\n yMin = y[0], yMax = y[1];\n } else {\n yMin = y0;\n yMax = y;\n }\n var xMin;\n var xMax;\n if (isArray(x)) {\n xMin = x[0], xMax = x[1];\n } else {\n xMin = x - size / 2;\n xMax = x + size / 2;\n }\n var points = [{\n x: xMin,\n y: yMin\n }, {\n x: xMin,\n y: yMax\n }];\n // 矩形的四个关键点,结构如下(左下角顺时针连接)\n // 1 ---- 2\n // | |\n // 0 ---- 3\n points.push({\n x: xMax,\n y: yMax\n }, {\n x: xMax,\n y: yMin\n });\n return points;\n}\n/**\n * @ignore\n * 根据矩形关键点绘制 path\n * @param points 关键点数组\n * @param isClosed path 是否需要闭合\n * @returns 返回矩形的 path\n */\nexport function getRectPath(points, isClosed) {\n if (isClosed === void 0) {\n isClosed = true;\n }\n var path = [];\n var firstPoint = points[0];\n path.push(['M', firstPoint.x, firstPoint.y]);\n for (var i = 1, len = points.length; i < len; i++) {\n path.push(['L', points[i].x, points[i].y]);\n }\n // 对于 shape=\"line\" path 不应该闭合,否则会造成 lineCap 绘图属性失效\n if (isClosed) {\n path.push(['L', firstPoint.x, firstPoint.y]); // 需要闭合\n path.push(['z']);\n }\n return path;\n}","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { dataToPath, linePathToAreaPath, dataToRectPath } from './path';\nexport var LINE_STYLE = {\n stroke: '#C5C5C5',\n strokeOpacity: 0.85\n};\nexport var AREA_STYLE = {\n fill: '#CACED4',\n opacity: 0.85\n};\n/**\n * 缩略趋势图\n */\nvar Trend = /** @class */function () {\n function Trend(cfg) {\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 200 : _c,\n _d = cfg.height,\n height = _d === void 0 ? 26 : _d,\n _e = cfg.smooth,\n smooth = _e === void 0 ? true : _e,\n _f = cfg.isArea,\n isArea = _f === void 0 ? false : _f,\n _g = cfg.data,\n data = _g === void 0 ? [] : _g,\n lineStyle = cfg.lineStyle,\n areaStyle = cfg.areaStyle,\n group = cfg.group,\n _h = cfg.interval,\n interval = _h === void 0 ? null : _h;\n this.group = group;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.data = data;\n this.smooth = smooth;\n this.isArea = isArea;\n this.lineStyle = Object.assign({}, LINE_STYLE, lineStyle);\n this.areaStyle = Object.assign({}, AREA_STYLE, areaStyle);\n this.intervalConfig = interval;\n this.renderLine();\n }\n /**\n * 构造\n * @private\n */\n Trend.prototype.renderLine = function () {\n var _a = this,\n x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height,\n barWidth = _a.barWidth,\n data = _a.data,\n smooth = _a.smooth,\n isArea = _a.isArea,\n lineStyle = _a.lineStyle,\n areaStyle = _a.areaStyle;\n var trendGroup = this.group.addGroup({\n name: 'trend-group'\n });\n if (data) {\n var path = dataToPath(data, width, height, smooth);\n // 线\n trendGroup.addShape('path', {\n attrs: __assign({\n path: path\n }, lineStyle),\n name: 'trend-line'\n });\n // 在 line 的基础上,绘制面积图\n if (isArea) {\n var areaPath = linePathToAreaPath(path, width, height, data);\n trendGroup.addShape('path', {\n attrs: __assign({\n path: areaPath\n }, areaStyle),\n name: 'trend-area'\n });\n }\n }\n // 绘制柱状图📊\n if (this.intervalConfig) {\n trendGroup.addShape('path', {\n attrs: __assign({\n path: dataToRectPath(this.intervalConfig.data, width, height, this.intervalConfig.style.barWidth)\n }, this.intervalConfig.style),\n name: 'trend-interval'\n });\n }\n // 统一移动到对应的位置\n trendGroup.move(x, y);\n };\n Trend.prototype.destory = function () {\n this.group.destroy();\n };\n return Trend;\n}();\nexport default Trend;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { isNumber } from '@antv/util';\nvar DEFAULT_STYLE = {\n fill: '#1890ff',\n stroke: '#1890ff',\n type: 'trend',\n radius: 2,\n opacity: 1,\n cursor: 'ew-resize',\n // 高亮的颜色\n highLightFill: '#0050b3'\n};\nvar SIMPLE_DEFAULT_STYLE = {\n fill: '#fff',\n stroke: '#1890ff',\n radius: 2,\n opacity: 1,\n cursor: 'ew-resize',\n // 高亮的颜色\n highLightFill: '#0050b3'\n};\nvar Handler = /** @class */function () {\n function Handler(cfg) {\n var group = cfg.group,\n name = cfg.name,\n type = cfg.type,\n _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 2 : _c,\n _d = cfg.height,\n height = _d === void 0 ? 24 : _d,\n _e = cfg.style,\n style = _e === void 0 ? {} : _e;\n this.group = group;\n this.name = name;\n this.handleType = type;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n if (type === 'trend') {\n this.style = __assign(__assign({}, DEFAULT_STYLE), style);\n } else if (type === 'simple') {\n this.style = __assign(__assign({}, SIMPLE_DEFAULT_STYLE), style);\n }\n this.renderHandle();\n }\n /**\n * 设置位置 x\n * @param x\n */\n Handler.prototype.setX = function (x) {\n this.setXY(x, undefined);\n };\n /**\n * 设置位置 y\n * @param y\n */\n Handler.prototype.setY = function (y) {\n this.setXY(undefined, y);\n };\n Handler.prototype.setXY = function (x, y) {\n if (isNumber(x)) {\n this.x = x;\n }\n if (isNumber(y)) {\n this.y = y;\n }\n this.updateXY();\n };\n /**\n * 初始化组件\n * @private\n */\n Handler.prototype.renderHandle = function () {\n var _a = this,\n width = _a.width,\n height = _a.height,\n style = _a.style,\n name = _a.name;\n var fill = style.fill,\n stroke = style.stroke,\n radius = style.radius,\n opacity = style.opacity,\n cursor = style.cursor;\n this.handleGroup = this.group.addGroup();\n // 趋势图时的 handle\n if (this.handleType === 'trend') {\n // 垂直线\n this.verticalLine = this.handleGroup.addShape('rect', {\n attrs: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor\n },\n name: \"\".concat(name, \"-handler\")\n });\n this.topCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: 0,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor,\n lineAppendWidth: 12\n },\n name: \"\".concat(name, \"-handler\")\n });\n this.bottomCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: height,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor\n },\n name: \"\".concat(name, \"-handler\")\n });\n } else if (this.handleType === 'simple') {\n this.topCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: height / 2,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor,\n lineWidth: 2\n },\n name: \"\".concat(name, \"-handler\")\n });\n }\n // 移动到对应的位置\n this.updateXY();\n if (this.handleType === 'trend') {\n this.bindTrendEvents();\n } else if (this.handleType === 'simple') {\n this.bindSimpleEvents();\n }\n };\n Handler.prototype.bindSimpleEvents = function () {\n var _this = this;\n var name = this.name;\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseenter\"), function () {\n var highLightFill = _this.style.highLightFill;\n _this.topCircle.attr('fill', highLightFill);\n });\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseleave\"), function () {\n var fill = _this.style.fill;\n _this.topCircle.attr('fill', fill);\n });\n };\n Handler.prototype.bindTrendEvents = function () {\n var _this = this;\n var name = this.name;\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseenter\"), function () {\n var highLightFill = _this.style.highLightFill;\n _this.verticalLine.attr('fill', highLightFill);\n _this.topCircle.attr('fill', highLightFill);\n _this.bottomCircle.attr('fill', highLightFill);\n });\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseleave\"), function () {\n var fill = _this.style.fill;\n _this.verticalLine.attr('fill', fill);\n _this.topCircle.attr('fill', fill);\n _this.bottomCircle.attr('fill', fill);\n });\n };\n Handler.prototype.show = function () {\n this.handleGroup.show();\n };\n Handler.prototype.hide = function () {\n this.handleGroup.hide();\n };\n Handler.prototype.updateXY = function () {\n this.handleGroup.setMatrix([1, 0, 0, 0, 1, 0, this.x, this.y, 1]);\n };\n return Handler;\n}();\nexport default Handler;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { get, size, assign, each, isNumber } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport Trend from './trend';\nimport Handler from './handler';\nimport { isString } from '@antv/util';\nimport ControllerBtn, { TIME_TYPE } from './controllerBtn';\nimport { VALUE_CHANGE, TIMELINE_START, TIMEBAR_CONFIG_CHANGE, PLAY_PAUSE_BTN, NEXT_STEP_BTN, PRE_STEP_BTN, TIMELINE_END } from './constant';\nvar transform = ext.transform;\n/**\n * 一些默认的样式配置\n */\nexport var BACKGROUND_STYLE = {\n fill: '#416180',\n opacity: 0.05\n};\nvar SIMPLE_BACKGROUND_STYLE = {\n fill: '#416180',\n opacity: 0.15,\n radius: 5\n};\nexport var FOREGROUND_STYLE = {\n fill: '#5B8FF9',\n opacity: 0.3,\n cursor: 'grab'\n};\nexport var DEFAULT_HANDLER_WIDTH = 2;\nexport var HANDLER_STYLE = {\n width: DEFAULT_HANDLER_WIDTH,\n height: 24\n};\nexport var TEXT_STYLE = {\n textBaseline: 'middle',\n fill: '#000',\n opacity: 0.45\n};\nexport var TICK_LABEL_STYLE = {\n textAlign: 'center',\n textBaseline: 'top',\n fill: '#607889',\n opacity: 0.35\n};\nexport var TICK_LINE_STYLE = {\n lineWidth: 1,\n stroke: '#ccc'\n};\nvar TrendTimeBar = /** @class */function () {\n function TrendTimeBar(cfg) {\n var _this = this;\n this.prevX = 0;\n this.onMouseDown = function (handler) {\n return function (e) {\n // 1. 记录点击的滑块\n _this.currentHandler = handler;\n var event = e.originalEvent;\n // 2. 存储当前点击位置\n event.stopPropagation();\n event.preventDefault();\n // 兼容移动端获取数据\n _this.prevX = get(event, 'touches.0.pageX', event.pageX);\n // 3. 开始滑动的时候,绑定 move 和 up 事件\n var containerDOM = _this.canvas.get('container');\n containerDOM.addEventListener('mousemove', _this.onMouseMove);\n containerDOM.addEventListener('mouseup', _this.onMouseUp);\n containerDOM.addEventListener('mouseleave', _this.onMouseUp);\n // 移动端事件\n containerDOM.addEventListener('touchmove', _this.onMouseMove);\n containerDOM.addEventListener('touchend', _this.onMouseUp);\n containerDOM.addEventListener('touchcancel', _this.onMouseUp);\n };\n };\n this.onMouseMove = function (e) {\n // 滑动过程中,计算偏移,更新滑块,然后 emit 数据出去\n e.stopPropagation();\n e.preventDefault();\n var x = get(e, 'touches.0.pageX', e.pageX);\n // 横向的 slider 只处理 x\n var offsetX = x - _this.prevX;\n var offsetXRange = _this.adjustOffsetRange(offsetX / _this.width);\n // 更新 start end range 范围\n _this.updateStartEnd(offsetXRange);\n // 更新 ui\n _this.updateUI();\n _this.prevX = x;\n };\n this.onMouseUp = function () {\n // 结束之后,取消绑定的事件\n if (_this.currentHandler) {\n _this.currentHandler = undefined;\n }\n var containerDOM = _this.canvas.get('container');\n if (containerDOM) {\n containerDOM.removeEventListener('mousemove', _this.onMouseMove);\n containerDOM.removeEventListener('mouseup', _this.onMouseUp);\n // 防止滑动到 canvas 外部之后,状态丢失\n containerDOM.removeEventListener('mouseleave', _this.onMouseUp);\n // 移动端事件\n containerDOM.removeEventListener('touchmove', _this.onMouseMove);\n containerDOM.removeEventListener('touchend', _this.onMouseUp);\n containerDOM.removeEventListener('touchcancel', _this.onMouseUp);\n }\n };\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 100 : _c,\n height = cfg.height,\n _d = cfg.padding,\n padding = _d === void 0 ? 10 : _d,\n trendCfg = cfg.trendCfg,\n _e = cfg.controllerCfg,\n controllerCfg = _e === void 0 ? {\n speed: 1\n } : _e,\n _f = cfg.backgroundStyle,\n backgroundStyle = _f === void 0 ? {} : _f,\n _g = cfg.foregroundStyle,\n foregroundStyle = _g === void 0 ? {} : _g,\n _h = cfg.handlerStyle,\n handlerStyle = _h === void 0 ? {} : _h,\n _j = cfg.textStyle,\n textStyle = _j === void 0 ? {} : _j,\n // 缩略轴的初始位置\n _k = cfg.start,\n // 缩略轴的初始位置\n start = _k === void 0 ? 0 : _k,\n _l = cfg.end,\n end = _l === void 0 ? 1 : _l,\n _m = cfg.minText,\n minText = _m === void 0 ? '' : _m,\n _o = cfg.maxText,\n maxText = _o === void 0 ? '' : _o,\n group = cfg.group,\n graph = cfg.graph,\n canvas = cfg.canvas,\n _p = cfg.tick,\n tick = _p === void 0 ? {\n tickLabelStyle: {},\n tickLineStyle: {},\n tickLabelFormatter: function tickLabelFormatter(d) {\n return d;\n },\n ticks: []\n } : _p,\n type = cfg.type;\n this.graph = graph;\n this.canvas = canvas;\n this.group = group;\n this.timeBarType = type;\n // position size\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.padding = padding;\n this.ticks = tick.ticks;\n this.trendCfg = trendCfg;\n this.controllerCfg = controllerCfg;\n this.currentSpeed = controllerCfg.speed || 1;\n this.tickLabelFormatter = tick.tickLabelFormatter;\n // style\n if (type === 'trend') {\n this.backgroundStyle = __assign(__assign({}, BACKGROUND_STYLE), backgroundStyle);\n } else if (type === 'simple') {\n this.backgroundStyle = __assign(__assign({}, SIMPLE_BACKGROUND_STYLE), backgroundStyle);\n }\n this.foregroundStyle = __assign(__assign({}, FOREGROUND_STYLE), foregroundStyle);\n this.handlerStyle = __assign(__assign({}, HANDLER_STYLE), handlerStyle);\n this.textStyle = __assign(__assign({}, TEXT_STYLE), textStyle);\n this.tickLabelStyle = __assign(__assign({}, TICK_LABEL_STYLE), tick.tickLabelStyle);\n this.tickLineStyle = __assign(__assign({}, TICK_LINE_STYLE), tick.tickLineStyle);\n this.currentMode = controllerCfg.defaultTimeType || TIME_TYPE.RANGE;\n // 初始信息\n this.start = start;\n this.end = end;\n this.minText = minText;\n this.maxText = maxText;\n // 初始化 fontFamily,如果有浏览器,取 body 上的字体,防止文字更新时局部渲染造成的重影\n this.fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.renderSlider();\n }\n /**\n * 更新配置\n * @param cfg\n */\n TrendTimeBar.prototype.update = function (cfg) {\n var x = cfg.x,\n y = cfg.y,\n width = cfg.width,\n height = cfg.height,\n minText = cfg.minText,\n maxText = cfg.maxText,\n start = cfg.start,\n end = cfg.end;\n // start、end 只能是 0~1 范围\n this.start = Math.min(1, Math.max(start, 0));\n this.end = Math.min(1, Math.max(end, 0));\n // 如果传了则更新,没有传则不更新\n // @ts-ignore\n assign(this, {\n x: x,\n y: y,\n width: width,\n height: height,\n minText: minText,\n maxText: maxText\n });\n // 更新 ui,不自动绘制\n this.updateUI();\n };\n TrendTimeBar.prototype.setText = function (minText, maxText) {\n this.minTextShape.attr('text', minText);\n this.maxTextShape.attr('text', maxText);\n };\n /**\n * 初始化组件结构\n * @private\n */\n TrendTimeBar.prototype.renderSlider = function () {\n var _this = this;\n var _a = this,\n width = _a.width,\n height = _a.height,\n timeBarType = _a.timeBarType;\n // 趋势图数据\n if (timeBarType === 'trend' && size(get(this.trendCfg, 'data'))) {\n var trendComponent = new Trend(__assign(__assign({\n x: this.x,\n y: this.y,\n width: width,\n height: height\n }, this.trendCfg), {\n group: this.group\n }));\n this.trendComponent = trendComponent;\n }\n var sliderGroup = this.group.addGroup({\n name: 'slider-group'\n });\n // 1. 背景\n sliderGroup.addShape('rect', {\n attrs: __assign({\n x: 0,\n y: 0,\n width: width,\n height: height\n }, this.backgroundStyle),\n name: 'background'\n });\n var textGroup = this.group.addGroup();\n // 2. 左右文字\n if (timeBarType === 'trend') {\n this.minTextShape = textGroup.addShape('text', {\n attrs: __assign({\n x: 0,\n y: height / 2 + this.y,\n textAlign: 'right',\n text: this.minText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'min-text-shape'\n });\n this.maxTextShape = textGroup.addShape('text', {\n attrs: __assign({\n y: height / 2 + this.y,\n textAlign: 'left',\n text: this.maxText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'max-text-shape'\n });\n } else {\n this.minTextShape = textGroup.addShape('text', {\n attrs: __assign({\n x: 0,\n y: this.y - 10,\n textAlign: 'center',\n text: this.minText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'min-text-shape'\n });\n this.maxTextShape = textGroup.addShape('text', {\n attrs: __assign({\n y: this.y - 10,\n textAlign: 'center',\n text: this.maxText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'max-text-shape'\n });\n }\n // 3. 前景 选中背景框\n this.foregroundShape = this.group.addGroup().addShape('rect', {\n attrs: __assign({\n x: 0,\n y: this.y,\n height: height\n }, this.foregroundStyle),\n name: 'foreground-shape'\n });\n this.foregroundShape.on('mousedown', function (e) {\n e.target.attr('cursor', 'grabbing');\n });\n this.foregroundShape.on('mouseup', function (e) {\n e.target.attr('cursor', _this.foregroundStyle.cursor || 'grab');\n });\n // 滑块相关的大小信息\n var handlerWidth = get(this.handlerStyle, 'width', 2);\n var handlerHeight = get(this.handlerStyle, 'height', 24);\n var minHandleGroup = this.group.addGroup({\n name: 'minHandlerShape'\n });\n // 4. 左右滑块\n this.minHandlerShape = new Handler({\n name: 'minHandlerShape',\n group: minHandleGroup,\n type: timeBarType,\n x: this.x,\n y: this.y,\n width: handlerWidth,\n height: handlerHeight,\n style: this.handlerStyle\n });\n var maxHandleGroup = this.group.addGroup({\n name: 'maxHandlerShape'\n });\n this.maxHandlerShape = new Handler({\n name: 'maxHandlerShape',\n group: maxHandleGroup,\n type: timeBarType,\n x: this.x,\n y: this.y,\n width: handlerWidth,\n height: handlerHeight,\n style: this.handlerStyle\n });\n // 缩略图下面的时间刻度\n var tickData = this.ticks;\n var interval = width / (tickData.length - 1);\n this.tickPosList = [];\n if (this.textList && this.textList.length) {\n this.textList.forEach(function (text) {\n text.destroy();\n });\n }\n var lastX = -Infinity;\n var rotate = this.tickLabelStyle.rotate;\n delete this.tickLabelStyle.rotate;\n this.textList = tickData.map(function (data, index) {\n _this.tickPosList.push(_this.x + index * interval);\n var label;\n if (_this.tickLabelFormatter) {\n label = _this.tickLabelFormatter(data);\n if (!isString(label) && label) {\n // return true\n label = data.date;\n }\n } else {\n label = data.date;\n }\n // 文本刻度\n var textX = _this.x + index * interval,\n textY = _this.y + height + 5;\n var text = _this.group.addShape('text', {\n attrs: __assign({\n x: textX,\n y: textY,\n text: label,\n fontFamily: _this.fontFamily || 'Arial, sans-serif'\n }, _this.tickLabelStyle),\n name: 'tick-label'\n });\n if (isNumber(rotate) && index !== tickData.length - 1) {\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -textX, -textY], ['r', rotate], ['t', textX - 5, textY + 2]]);\n text.attr({\n textAlign: 'left',\n matrix: matrix\n });\n }\n if (index === 0) {\n text.attr({\n textAlign: 'left'\n });\n } else if (index !== tickData.length - 1) {\n text.attr({\n textAlign: 'right'\n });\n }\n // 文本刻度上面的竖线\n var line = _this.group.addShape('line', {\n attrs: __assign({\n x1: _this.x + index * interval,\n y1: _this.y + height + 2,\n x2: _this.x + index * interval,\n y2: _this.y + height + 6\n }, _this.tickLineStyle),\n name: 'tick-line'\n });\n line.toBack();\n var bbox = text.getBBox();\n // 抽样,标签与标签间距不小于 10\n if (bbox.minX > lastX) {\n text.show();\n line.show();\n lastX = bbox.minX + bbox.width + 10;\n } else {\n text.hide();\n line.hide();\n }\n return text;\n });\n // 渲染播放、快进和后退的控制按钮\n this.controllerBtnGroup = new ControllerBtn(__assign({\n group: this.group,\n x: this.x,\n y: this.y + height + 25,\n width: width,\n height: 35\n }, this.controllerCfg));\n // 初始化 minText 和 maxText,方便计算它们的 bbox\n this.updateStartEnd(0);\n // 根据 start end 更新 ui 的位置信息\n this.updateUI();\n // 移动到对应的位置\n sliderGroup.move(this.x, this.y);\n // 绑定事件鼠标事件\n this.bindEvents();\n if (this.currentMode === TIME_TYPE.SINGLE) {\n this.minHandlerShape.hide();\n this.foregroundShape.hide();\n this.minTextShape.hide();\n }\n };\n /**\n * 绑定事件:\n * - 点击\n * - 滑动\n * - 拖拽\n * - 滚动\n * @private\n */\n TrendTimeBar.prototype.bindEvents = function () {\n var _this = this;\n // 1. 左滑块的滑动\n var minHandleShapeGroup = this.group.find(function (group) {\n return group.get('name') === 'minHandlerShape';\n });\n if (minHandleShapeGroup) {\n minHandleShapeGroup.on('minHandlerShape-handler:mousedown', this.onMouseDown(this.minHandlerShape));\n minHandleShapeGroup.on('minHandlerShape-handler:touchstart', this.onMouseDown(this.minHandlerShape));\n }\n var maxHandleShapeGroup = this.group.find(function (group) {\n return group.get('name') === 'maxHandlerShape';\n });\n // 2. 右滑块的滑动\n if (maxHandleShapeGroup) {\n maxHandleShapeGroup.on('maxHandlerShape-handler:mousedown', this.onMouseDown(this.maxHandlerShape));\n maxHandleShapeGroup.on('maxHandlerShape-handler:touchstart', this.onMouseDown(this.maxHandlerShape));\n }\n // 3. 前景选中区域\n this.foregroundShape.on('mousedown', this.onMouseDown(this.foregroundShape));\n this.foregroundShape.on('touchstart', this.onMouseDown(this.foregroundShape));\n // 播放区按钮控制\n /** 播放/暂停事件 */\n this.group.on(\"\".concat(PLAY_PAUSE_BTN, \":click\"), function () {\n _this.isPlay = !_this.isPlay;\n _this.currentHandler = _this.maxHandlerShape;\n _this.changePlayStatus();\n });\n // 处理前进一步的事件\n this.group.on(\"\".concat(NEXT_STEP_BTN, \":click\"), function () {\n _this.currentHandler = _this.maxHandlerShape;\n _this.updateStartEnd(0.01);\n _this.updateUI();\n });\n // 处理后退一步的事件\n this.group.on(\"\".concat(PRE_STEP_BTN, \":click\"), function () {\n _this.currentHandler = _this.maxHandlerShape;\n _this.updateStartEnd(-0.01);\n _this.updateUI();\n });\n this.group.on(TIMEBAR_CONFIG_CHANGE, function (_a) {\n var type = _a.type,\n speed = _a.speed;\n _this.currentSpeed = speed;\n _this.currentMode = type;\n if (type === TIME_TYPE.SINGLE) {\n _this.minHandlerShape.hide();\n _this.foregroundShape.hide();\n _this.minTextShape.hide();\n } else if (type === TIME_TYPE.RANGE) {\n _this.minHandlerShape.show();\n _this.foregroundShape.show();\n _this.minTextShape.show();\n }\n });\n };\n /** 输入当前圆点位置,输出离哪个 tick 的位置最近 */\n TrendTimeBar.prototype.adjustTickIndex = function (timeSelectX) {\n for (var i = 0; i < this.tickPosList.length - 1; i++) {\n if (this.tickPosList[i] <= timeSelectX && timeSelectX <= this.tickPosList[i + 1]) {\n return Math.abs(this.tickPosList[i] - timeSelectX) < Math.abs(timeSelectX - this.tickPosList[i + 1]) ? i : i + 1;\n }\n }\n return 0;\n };\n /**\n * 调整 offsetRange,因为一些范围的限制\n * @param offsetRange\n */\n TrendTimeBar.prototype.adjustOffsetRange = function (offsetRange) {\n // 针对不同的滑动组件,处理的方式不同\n switch (this.currentHandler) {\n case this.minHandlerShape:\n {\n var min = 0 - this.start;\n var max = 1 - this.start;\n return Math.min(max, Math.max(min, offsetRange));\n }\n case this.maxHandlerShape:\n {\n var min = 0 - this.end;\n var max = 1 - this.end;\n return Math.min(max, Math.max(min, offsetRange));\n }\n case this.foregroundShape:\n {\n var min = 0 - this.start;\n var max = 1 - this.end;\n return Math.min(max, Math.max(min, offsetRange));\n }\n default:\n return 0;\n }\n };\n /**\n * 更新起始、结束的控制块位置、文本、范围值(原始值)\n * @param offsetRange\n */\n TrendTimeBar.prototype.updateStartEnd = function (offsetRange) {\n var minData = this.ticks[this.adjustTickIndex(this.start * this.width)];\n var maxData = this.ticks[this.adjustTickIndex(this.end * this.width)];\n if (!this.currentHandler) {\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData === null || minData === void 0 ? void 0 : minData.date;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData === null || maxData === void 0 ? void 0 : maxData.date;\n return;\n }\n // 操作不同的组件,反馈不一样\n switch (this.currentHandler) {\n case this.minHandlerShape:\n // 拖动最小滑块时使用当前最大值设置最大值的文本,以便恢复到默认值\n this.maxText = this.maxTextShape.attr('text');\n this.start += offsetRange;\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData.date;\n break;\n case this.maxHandlerShape:\n // 拖动最大滑块时使用当前最小值设置最小值的文本,以便恢复到默认值\n this.minText = this.minTextShape.attr('text');\n this.end += offsetRange;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData.date;\n break;\n case this.foregroundShape:\n this.start += offsetRange;\n this.end += offsetRange;\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData.date;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData.date;\n break;\n default:\n break;\n }\n };\n /**\n * 根据移动的比例来更新 ui,更新范围(0-1 范围的比例值)\n * @private\n */\n TrendTimeBar.prototype.updateUI = function () {\n var _this = this;\n if (this.start < 0) {\n this.start = 0;\n }\n if (this.start > 1) {\n this.start = 1;\n }\n if (this.end > 1) {\n this.end = 1;\n }\n if (this.end < 0) {\n this.end = 0;\n }\n var min = this.x + this.start * this.width;\n var max = this.x + this.end * this.width;\n // 1. foreground\n this.foregroundShape.attr('x', min);\n this.foregroundShape.attr('width', max - min);\n // 滑块相关的大小信息\n var handlerWidth = get(this.handlerStyle, 'width', DEFAULT_HANDLER_WIDTH);\n // 设置文本\n this.setText(this.minText, this.maxText);\n var _a = this.dodgeText([min, max]),\n minAttrs = _a[0],\n maxAttrs = _a[1];\n // 2. 左侧滑块和文字位置\n this.minHandlerShape.setX(min - handlerWidth / 2);\n each(minAttrs, function (v, k) {\n return _this.minTextShape.attr(k, v);\n });\n // 3. 右侧滑块和文字位置\n this.maxHandlerShape.setX(max - handlerWidth / 2);\n each(maxAttrs, function (v, k) {\n return _this.maxTextShape.attr(k, v);\n });\n if (this.currentMode === TIME_TYPE.RANGE) {\n // 因为存储的 start、end 可能不一定是按大小存储的,所以排序一下,对外是 end >= start\n this.graph.emit(VALUE_CHANGE, {\n value: [this.start, this.end].sort()\n });\n } else if (this.currentMode === TIME_TYPE.SINGLE) {\n this.graph.emit(VALUE_CHANGE, {\n value: [this.end, this.end]\n });\n }\n };\n /**\n * 调整 text 的位置,自动躲避\n * 根据位置,调整返回新的位置\n * @param range\n */\n TrendTimeBar.prototype.dodgeText = function (range) {\n var _a, _b;\n var TEXTPADDING = 2;\n var handlerWidth = get(this.handlerStyle, 'width', DEFAULT_HANDLER_WIDTH);\n var minTextShape = this.minTextShape;\n var maxTextShape = this.maxTextShape;\n var min = range[0],\n max = range[1];\n var sorted = false;\n // 如果交换了位置,则对应的 min max 也交换\n if (min > max) {\n _a = [max, min], min = _a[0], max = _a[1];\n _b = [maxTextShape, minTextShape], minTextShape = _b[0], maxTextShape = _b[1];\n sorted = true;\n }\n // 避让规则,优先显示在两侧,只有显示不下的时候,才显示在中间\n var minBBox = minTextShape.getBBox();\n var maxBBox = maxTextShape.getBBox();\n var minAttrs = null;\n var maxAttrs = null;\n if (this.timeBarType === 'trend') {\n minAttrs = min - minBBox.width < this.x + TEXTPADDING ? {\n x: min + handlerWidth / 2 + TEXTPADDING,\n textAlign: 'left'\n } : {\n x: min - handlerWidth / 2 - TEXTPADDING,\n textAlign: 'right'\n };\n maxAttrs = max + maxBBox.width > this.x + this.width ? {\n x: max - handlerWidth / 2 - TEXTPADDING,\n textAlign: 'right'\n } : {\n x: max + handlerWidth / 2 + TEXTPADDING,\n textAlign: 'left'\n };\n } else if (this.timeBarType === 'simple') {\n minAttrs = minTextShape.attr('x') > minBBox.width // 左边滑块文本位置小于其宽度代表文字超过左边届\n ? {\n x: min,\n textAlign: 'center'\n } : {\n x: min,\n textAlign: 'left'\n };\n maxAttrs = maxTextShape.attr('x') > this.width - maxBBox.width // 有边滑块文本位置大于宽度代表文字超过右边界\n ? {\n x: max,\n textAlign: 'right'\n } : {\n x: max,\n textAlign: 'center'\n };\n }\n return !sorted ? [minAttrs, maxAttrs] : [maxAttrs, minAttrs];\n };\n TrendTimeBar.prototype.startPlay = function () {\n var _this = this;\n return typeof window !== 'undefined' ? window.requestAnimationFrame(function () {\n var _a = _this,\n ticks = _a.ticks,\n width = _a.width;\n var speed = _this.currentSpeed;\n var tickInterval = width / ticks.length;\n var offsetX = tickInterval / ((10 - speed) * 1000 / 60);\n var offsetXRange = _this.adjustOffsetRange(offsetX / _this.width);\n _this.updateStartEnd(offsetXRange);\n _this.updateUI();\n if (_this.isPlay) {\n _this.playHandler = _this.startPlay();\n }\n }) : undefined;\n };\n TrendTimeBar.prototype.changePlayStatus = function (isSync) {\n if (isSync === void 0) {\n isSync = true;\n }\n this.controllerBtnGroup.playButton.update({\n isPlay: this.isPlay\n });\n if (this.isPlay) {\n // 开始播放\n this.playHandler = this.startPlay();\n this.graph.emit(TIMELINE_START, null);\n } else {\n // 结束播放\n if (this.playHandler) {\n if (typeof window !== 'undefined') window.cancelAnimationFrame(this.playHandler);\n if (isSync) {\n this.graph.emit(TIMELINE_END, null);\n }\n }\n }\n };\n TrendTimeBar.prototype.destory = function () {\n this.graph.off(VALUE_CHANGE, function () {});\n var group = this.group;\n var minHandleShapeGroup = group.find(function (g) {\n return g.get('name') === 'minHandlerShape';\n });\n if (minHandleShapeGroup) {\n minHandleShapeGroup.off('minHandlerShape-handler:mousedown');\n minHandleShapeGroup.off('minHandlerShape-handler:touchstart');\n minHandleShapeGroup.destroy();\n }\n var maxHandleShapeGroup = group.find(function (g) {\n return g.get('name') === 'maxHandlerShape';\n });\n // 2. 右滑块的滑动\n if (maxHandleShapeGroup) {\n maxHandleShapeGroup.off('maxHandlerShape-handler:mousedown');\n maxHandleShapeGroup.off('maxHandlerShape-handler:touchstart');\n maxHandleShapeGroup.destroy();\n }\n // 3. 前景选中区域\n this.foregroundShape.off('mousedown');\n this.foregroundShape.off('touchstart');\n this.foregroundShape.destroy();\n group.off(\"\".concat(PLAY_PAUSE_BTN, \":click\"));\n group.off(\"\".concat(NEXT_STEP_BTN, \":click\"));\n group.off(\"\".concat(PRE_STEP_BTN, \":click\"));\n group.off(TIMEBAR_CONFIG_CHANGE);\n group.destroy();\n if (this.trendComponent) {\n this.trendComponent.destory();\n }\n };\n return TrendTimeBar;\n}();\nexport default TrendTimeBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * 基于 G 的时间轴组件\n */\nimport { createDom, modifyCSS } from '@antv/dom-util';\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { isString, throttle } from '@antv/util';\nimport Base from '../base';\nimport { VALUE_CHANGE } from './constant';\nimport TimeBarSlice from './timeBarSlice';\nimport TrendTimeBar from './trendTimeBar';\n// simple 版本默认高度\nvar DEFAULT_SIMPLE_HEIGHT = 4;\n// trend 版本默认高度\nvar DEFAULT_TREND_HEIGHT = 26;\nvar TimeBar = /** @class */function (_super) {\n __extends(TimeBar, _super);\n function TimeBar(config) {\n var _this = _super.call(this, config) || this;\n _this.afterrenderListener = function (e) {\n return _this.filterData({});\n };\n _this.valueChangeListener = throttle(function (e) {\n return _this.filterData(e);\n },\n // 不可简写,否则 filterData 中 this 指针不对\n 200, {\n trailing: true,\n leading: true\n });\n _this.changeData = function (e) {\n var graph = _this.get('graph');\n _this.cacheGraphData = graph.get('data');\n _this.filterData({});\n };\n return _this;\n }\n TimeBar.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-component-timebar',\n padding: 10,\n type: 'trend',\n trend: {\n data: [],\n isArea: false,\n smooth: true\n },\n controllerCfg: {\n speed: 1,\n loop: false\n },\n slider: {\n start: 0.1,\n end: 0.9,\n minText: 'min',\n maxText: 'max'\n },\n tick: {\n start: 0.1,\n end: 0.9,\n data: []\n },\n textStyle: {},\n filterEdge: false,\n filterItemTypes: ['node'],\n containerCSS: {},\n putInGraphContainer: true\n };\n };\n /**\n * 初始化 TimeBar 的容器\n */\n TimeBar.prototype.initContainer = function () {\n var graph = this.get('graph');\n var _a = this._cfgs,\n width = _a.width,\n height = _a.height,\n putInGraphContainer = _a.putInGraphContainer;\n var className = this.get('className') || 'g6-component-timebar';\n var container = this.get('container');\n var timeBarContainer;\n if (!container) {\n timeBarContainer = createDom(\"
\"));\n modifyCSS(timeBarContainer, {\n position: 'relative'\n });\n } else {\n if (isString(container)) {\n container = document.getElementById(container);\n }\n timeBarContainer = container;\n }\n if (putInGraphContainer) {\n var graphContainer = this.get('graph').get('container');\n graphContainer.appendChild(timeBarContainer);\n }\n this.set('timeBarContainer', timeBarContainer);\n var canvas;\n var renderer = graph.get('renderer');\n if (renderer === 'SVG') {\n canvas = new GSVGCanvas({\n container: timeBarContainer,\n width: width,\n height: height\n });\n } else {\n canvas = new GCanvas({\n container: timeBarContainer,\n width: width,\n height: height\n });\n }\n // 根据传入的参数修改容器 CSS 样式\n if (this.get('containerCSS')) modifyCSS(timeBarContainer, this.get('containerCSS'));\n this.set('canvas', canvas);\n };\n TimeBar.prototype.init = function () {\n this.initContainer();\n var canvas = this.get('canvas');\n var timeBarGroup = canvas.addGroup({\n name: 'timebar-group'\n });\n this.set('timeBarGroup', timeBarGroup);\n this.renderTrend();\n this.initEvent();\n var fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.set('fontFamily', fontFamily);\n };\n /**\n * 触发时间轴播放\n */\n TimeBar.prototype.play = function () {\n this.togglePlay(true);\n };\n /**\n * 触发时间轴暂停\n */\n TimeBar.prototype.pause = function () {\n this.togglePlay(false);\n };\n /**\n * 时间轴播放状态(播放/暂停)的切换\n */\n TimeBar.prototype.togglePlay = function (play) {\n var timebar = this.get('timebar');\n if (!timebar) return;\n timebar.isPlay = !!play;\n timebar.changePlayStatus();\n };\n TimeBar.prototype.renderTrend = function () {\n var _this = this;\n var _a = this._cfgs,\n width = _a.width,\n x = _a.x,\n y = _a.y,\n padding = _a.padding,\n type = _a.type,\n trend = _a.trend,\n slider = _a.slider,\n controllerCfg = _a.controllerCfg,\n textStyle = _a.textStyle,\n tick = _a.tick,\n backgroundStyle = _a.backgroundStyle,\n foregroundStyle = _a.foregroundStyle;\n var data = trend.data,\n other = __rest(trend, [\"data\"]);\n var realWidth = width - 2 * padding;\n var defaultHeight = type === 'trend' ? DEFAULT_TREND_HEIGHT : DEFAULT_SIMPLE_HEIGHT;\n var graph = this.get('graph');\n var group = this.get('timeBarGroup');\n var canvas = this.get('canvas');\n var timebar = null;\n if (type === 'trend' || type === 'simple') {\n var getValue_1 = this.get('getValue');\n timebar = new TrendTimeBar(__assign(__assign({\n graph: graph,\n canvas: canvas,\n group: group,\n type: type,\n x: x + padding,\n y: type === 'trend' ? y + padding : y + padding + 15,\n width: realWidth,\n height: defaultHeight,\n padding: padding,\n backgroundStyle: backgroundStyle,\n foregroundStyle: foregroundStyle,\n trendCfg: __assign(__assign({}, other), {\n data: data.map(function (d) {\n return (getValue_1 === null || getValue_1 === void 0 ? void 0 : getValue_1(d)) || d.value;\n })\n })\n }, slider), {\n tick: {\n ticks: data,\n tickLabelFormatter: tick.tickLabelFormatter,\n tickLabelStyle: tick.tickLabelStyle,\n tickLineStyle: tick.tickLineStyle\n },\n handlerStyle: __assign(__assign({}, slider.handlerStyle), {\n height: slider.height || defaultHeight\n }),\n controllerCfg: controllerCfg,\n textStyle: textStyle\n }));\n } else if (type === 'tick') {\n // 刻度时间轴\n timebar = new TimeBarSlice(__assign({\n graph: graph,\n canvas: canvas,\n group: group,\n x: x + padding,\n y: y + padding,\n width: width,\n height: 42,\n padding: 2,\n controllerCfg: controllerCfg\n }, tick));\n }\n // 鼠标按下左/右滑块或范围条后在任意地方释放,都触发暂停播放\n var handleMouseUp = function handleMouseUp() {\n var timebarInstance = _this.get('timebar');\n timebarInstance.draggingHandler = false;\n if (timebarInstance.isPlay) {\n timebarInstance.isPlay = false;\n timebarInstance.currentHandler = timebarInstance.maxHandlerShape;\n timebarInstance.changePlayStatus();\n }\n document.removeEventListener('mouseup', handleMouseUp);\n };\n canvas.on('mousedown', function (e) {\n if (e.target.get('name') === 'maxHandlerShape-handler' || e.target.get('name') === 'minHandlerShape-handler' || e.target === timebar.foregroundShape) {\n document.addEventListener('mouseup', handleMouseUp);\n }\n });\n this.set('timebar', timebar);\n };\n TimeBar.prototype.filterData = function (evt) {\n var _a;\n var value = evt.value;\n if (!value) {\n value = [];\n var type_1 = this._cfgs.type;\n if (!type_1 || type_1 === 'trend' || type_1 === 'simple') {\n value[0] = this._cfgs.slider.start;\n value[1] = this._cfgs.slider.end;\n } else if (type_1 === 'tick') {\n value[0] = this._cfgs.tick.start;\n value[1] = this._cfgs.tick.end;\n }\n }\n var trendData = null;\n var type = this._cfgs.type;\n if (type === 'trend' || type === 'simple') {\n trendData = this._cfgs.trend.data;\n } else if (type === 'tick') {\n trendData = this._cfgs.tick.data;\n }\n if (!trendData || trendData.length === 0) {\n console.warn('请配置 TimeBar 组件的数据');\n return;\n }\n var rangeChange = this.get('rangeChange');\n var graph = this.get('graph');\n var min = Math.round(trendData.length * value[0]);\n var max = Math.round(trendData.length * value[1]);\n max = max >= trendData.length ? trendData.length - 1 : max;\n min = min >= trendData.length ? trendData.length - 1 : min;\n var tickLabelFormatter = (_a = this._cfgs.tick) === null || _a === void 0 ? void 0 : _a.tickLabelFormatter;\n var minText = tickLabelFormatter ? tickLabelFormatter(trendData[min]) : trendData[min].date;\n var maxText = tickLabelFormatter ? tickLabelFormatter(trendData[max]) : trendData[max].date;\n if (type !== 'tick') {\n var timebar = this.get('timebar');\n timebar.setText(minText, maxText);\n }\n if (rangeChange) {\n rangeChange(graph, minText, maxText);\n } else {\n // 自动过滤数据,并渲染 graph\n if (!this.cacheGraphData || this.cacheGraphData.nodes && this.cacheGraphData.nodes.length === 0) {\n this.cacheGraphData = graph.get('data'); // graph.save() as GraphData;\n }\n\n var filterItemTypes = this.get('filterItemTypes');\n var changeData = this.get('changeData');\n // 过滤不在 min 和 max 范围内的节点\n var getDate_1 = this.get('getDate');\n var shouldIgnore_1 = this.get('shouldIgnore');\n var minDate_1 = trendData[min].date,\n maxDate_1 = trendData[max].date;\n if (changeData || changeData === undefined) {\n var originNodes = this.cacheGraphData.nodes;\n var originEdges = this.cacheGraphData.edges;\n var currentNodeExistMap_1 = {};\n var currentEdgeExistMap_1 = {};\n graph.getNodes().forEach(function (node) {\n return currentNodeExistMap_1[node.getID()] = true;\n });\n graph.getEdges().forEach(function (edge) {\n return currentEdgeExistMap_1[edge.getID()] = true;\n });\n if (filterItemTypes.includes('node')) {\n originNodes === null || originNodes === void 0 ? void 0 : originNodes.forEach(function (node) {\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(node)) || node.date);\n var hitRange = date >= minDate_1 && date <= maxDate_1 || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('node', node, {\n min: minDate_1,\n max: maxDate_1\n }));\n var exist = currentNodeExistMap_1[node.id];\n if (exist && !hitRange) {\n graph.removeItem(node.id);\n currentNodeExistMap_1[node.id] = false;\n } else if (!exist && hitRange) {\n graph.addItem('node', node);\n currentNodeExistMap_1[node.id] = true;\n }\n });\n // 过滤 source 或 target 不在 min 和 max 范围内的边\n originEdges === null || originEdges === void 0 ? void 0 : originEdges.forEach(function (edge) {\n var shouldShow = currentNodeExistMap_1[edge.source] && currentNodeExistMap_1[edge.target] || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', edge, {\n min: minDate_1,\n max: maxDate_1\n }));\n var exist = !!graph.findById(edge.id);\n if (exist && !shouldShow) {\n graph.removeItem(edge.id);\n currentEdgeExistMap_1[edge.id] = false;\n } else if (!exist && shouldShow) {\n graph.addItem('edge', edge);\n currentEdgeExistMap_1[edge.id] = true;\n } else if (!exist) {\n currentEdgeExistMap_1[edge.id] = false;\n }\n });\n }\n if (this.get('filterEdge') || filterItemTypes.includes('edge')) {\n originEdges === null || originEdges === void 0 ? void 0 : originEdges.filter(function (edge) {\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(edge)) || edge.date);\n var hitRange = date >= minDate_1 && date <= maxDate_1 || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', edge, {\n min: minDate_1,\n max: maxDate_1\n }));\n var endsExist = currentNodeExistMap_1[edge.source] && currentNodeExistMap_1[edge.target];\n var shouldShow = hitRange && endsExist;\n var exist = currentEdgeExistMap_1[edge.id];\n if (exist && !shouldShow) {\n currentEdgeExistMap_1[edge.id] = false;\n graph.removeItem(edge.id);\n } else if (!exist && shouldShow) {\n currentEdgeExistMap_1[edge.id] = true;\n graph.addItem('edge', edge);\n }\n });\n }\n } else {\n if (filterItemTypes.includes('node')) {\n graph.getNodes().forEach(function (node) {\n var model = node.getModel();\n if (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('node', model, {\n min: minDate_1,\n max: maxDate_1\n })) return;\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(model)) || model.date);\n if (date < minDate_1 || date > maxDate_1) {\n graph.hideItem(node);\n } else {\n graph.showItem(node);\n }\n });\n }\n if (this.get('filterEdge') || filterItemTypes.includes('edge')) {\n graph.getEdges().forEach(function (edge) {\n var model = edge.getModel();\n if (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', model, {\n min: trendData[min].date,\n max: trendData[max].date\n })) return;\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(model)) || model.date);\n if (date < trendData[min].date || date > trendData[max].date) {\n graph.hideItem(edge);\n } else {\n var sourceVisible = edge.getSource().isVisible();\n var targetVisible = edge.getTarget().isVisible();\n if (sourceVisible && targetVisible) graph.showItem(edge);\n }\n });\n }\n }\n }\n };\n TimeBar.prototype.initEvent = function () {\n var graph = this.get('graph');\n // 图数据变化,更新时间轴的原始数据\n graph.on('afterchangedata', this.changeData);\n // 图渲染,触发时间轴筛选\n graph.on('afterrender', this.afterrenderListener);\n // 时间轴的值发生改变的事件,触发筛选\n graph.on(VALUE_CHANGE, this.valueChangeListener);\n };\n TimeBar.prototype.destroy = function () {\n var graph = this.get('graph');\n graph.off('afterchangedata', this.changeData);\n graph.off('afterrender', this.afterrenderListener);\n graph.off(VALUE_CHANGE, this.valueChangeListener);\n var timebar = this.get('timebar');\n if (timebar && timebar.destory) {\n timebar.destory();\n }\n _super.prototype.destroy.call(this);\n var timeBarContainer = this.get('timeBarContainer');\n if (timeBarContainer) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (container === timeBarContainer) {\n container = container.parentElement;\n }\n container.removeChild(timeBarContainer);\n }\n };\n return TimeBar;\n}(Base);\nexport default TimeBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport Base from '../base';\nimport { isString, isNil } from '@antv/util';\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { Util } from '@antv/g6-core';\nimport { mat3 } from '@antv/matrix-util';\nvar applyMatrix = Util.applyMatrix;\nfunction getImgNaturalDimension(img, callback) {\n var nWidth, nHeight;\n if (img.naturalWidth) {\n // 现代浏览器\n nWidth = img.naturalWidth;\n nHeight = img.naturalHeight;\n } else {\n // IE6/7/8\n var image_1 = new Image();\n image_1.src = img.src;\n image_1.onload = function () {\n if (callback) callback(image_1.width, image_1.height);\n };\n }\n return [nWidth, nHeight];\n}\nvar ImageMiniMap = /** @class */function (_super) {\n __extends(ImageMiniMap, _super);\n function ImageMiniMap(config) {\n return _super.call(this, config) || this;\n }\n ImageMiniMap.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-minimap',\n viewportClassName: 'g6-minimap-viewport',\n width: 200,\n delegateStyle: {\n fill: '#40a9ff',\n stroke: '#096dd9'\n },\n refresh: true\n };\n };\n ImageMiniMap.prototype.getEvents = function () {\n return {\n beforepaint: 'updateViewport',\n beforeanimate: 'disableRefresh',\n afteranimate: 'enableRefresh',\n viewportchange: 'disableOneRefresh'\n };\n };\n // 若是正在进行动画,不刷新缩略图\n ImageMiniMap.prototype.disableRefresh = function () {\n this.set('refresh', false);\n };\n ImageMiniMap.prototype.enableRefresh = function () {\n this.set('refresh', true);\n this.updateCanvas();\n };\n ImageMiniMap.prototype.disableOneRefresh = function () {\n this.set('viewportChange', true);\n };\n ImageMiniMap.prototype.initViewport = function () {\n var _this = this;\n var cfgs = this._cfgs;\n // cWidth and cHeight are the width and height of the minimap's container\n var graph = cfgs.graph;\n if (this.destroyed) return;\n var containerDOM = this.get('container');\n if (isString(containerDOM)) {\n containerDOM = document.getElementById(containerDOM);\n }\n var viewport = createDom(\"
\"));\n // 计算拖拽水平方向距离\n var x = 0;\n // 计算拖拽垂直方向距离\n var y = 0;\n // 是否在拖拽minimap的视口\n var dragging = false;\n // 缓存viewport当前对于画布的x\n var left = 0;\n // 缓存viewport当前对于画布的y\n var top = 0;\n // 缓存viewport当前宽度\n var width = 0;\n // 缓存viewport当前高度\n var height = 0;\n var ratio = 0;\n var zoom = 0;\n containerDOM.addEventListener('mousedown', function (e) {\n cfgs.refresh = false;\n if (e.target !== viewport) {\n return;\n }\n // 如果视口已经最大了,不需要拖拽\n var style = viewport.style;\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n var cWidth = _this.get('width');\n var cHeight = _this.get('height');\n if (width > cWidth || height > cHeight) {\n return;\n }\n zoom = graph.getZoom();\n ratio = _this.get('ratio');\n dragging = true;\n x = e.clientX;\n y = e.clientY;\n }, false);\n containerDOM.addEventListener('mousemove', function (e) {\n if (!dragging || isNil(e.clientX) || isNil(e.clientY)) {\n return;\n }\n var cWidth = _this.get('width');\n var cHeight = _this.get('height');\n var style = viewport.style;\n left = parseInt(style.left, 10);\n top = parseInt(style.top, 10);\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n var dx = x - e.clientX;\n var dy = y - e.clientY;\n // 若视口移动到最左边或最右边了,仅移动到边界\n if (left - dx < 0) {\n dx = left;\n } else if (left - dx + width >= cWidth) {\n dx = 0;\n }\n // 若视口移动到最上或最下边了,仅移动到边界\n if (top - dy < 0) {\n dy = top;\n } else if (top - dy + height >= cHeight) {\n dy = 0;\n }\n left -= dx;\n top -= dy;\n // 先移动视口,避免移动到边上以后出现视口闪烁\n modifyCSS(viewport, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\")\n });\n // graph 移动需要偏移量 dx/dy * 缩放比例才会得到正确的移动距离\n graph.translate(dx * zoom / ratio, dy * zoom / ratio);\n x = e.clientX;\n y = e.clientY;\n }, false);\n containerDOM.addEventListener('mouseleave', function () {\n dragging = false;\n cfgs.refresh = true;\n }, false);\n containerDOM.addEventListener('mouseup', function () {\n dragging = false;\n cfgs.refresh = true;\n }, false);\n this.set('viewport', viewport);\n containerDOM.appendChild(viewport);\n };\n /**\n * 更新 viewport 视图\n */\n ImageMiniMap.prototype.updateViewport = function () {\n if (this.destroyed) return;\n var ratio = this.get('ratio');\n var cWidth = this.get('width');\n var cHeight = this.get('height');\n var graph = this.get('graph');\n var graphWidth = graph.get('width');\n var graphHeight = graph.get('height');\n var aspectRatio = graphWidth / graphHeight;\n var graphGroup = graph.getGroup();\n // 主图的 bbox(矩阵变换相关的 bbox)\n var graphCanvasBBox = graphGroup.getCanvasBBox();\n // 扩展 graphBBox 到和 graphWidth / graphHeight 等比\n var graphCanvasBBoxMean = [(graphCanvasBBox.minX + graphCanvasBBox.maxX) / 2, (graphCanvasBBox.minY + graphCanvasBBox.maxY) / 2];\n var graphCanvasBBoxSize = [graphCanvasBBox.maxX - graphCanvasBBox.minX, graphCanvasBBox.maxY - graphCanvasBBox.minY];\n var expandedGraphCanvasBBox = {\n centerX: graphCanvasBBoxMean[0],\n centerY: graphCanvasBBoxMean[1],\n width: 0,\n height: 0,\n minX: 0,\n minY: 0\n };\n if (graphCanvasBBox[0] / graphCanvasBBox[1] > aspectRatio) {\n expandedGraphCanvasBBox.width = graphCanvasBBoxSize[0];\n expandedGraphCanvasBBox.height = expandedGraphCanvasBBox.width / aspectRatio;\n } else {\n expandedGraphCanvasBBox.height = graphCanvasBBoxSize[1];\n expandedGraphCanvasBBox.width = expandedGraphCanvasBBox.height * aspectRatio;\n }\n expandedGraphCanvasBBox.minX = graphCanvasBBoxMean[0] - expandedGraphCanvasBBox.width / 2;\n expandedGraphCanvasBBox.minY = graphCanvasBBoxMean[1] - expandedGraphCanvasBBox.height / 2;\n var graphMatrix = graphGroup.getMatrix();\n if (!graphMatrix) graphMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var invertGraphMatrix = mat3.invert([1, 0, 0, 0, 1, 0, 0, 0, 1], graphMatrix);\n var minXY = applyMatrix({\n x: expandedGraphCanvasBBox.minX,\n y: expandedGraphCanvasBBox.minY\n }, invertGraphMatrix);\n // 扩展 graphBBox 后的 bbox 的左上角对应的 canvas container 坐标\n var topLeft = graph.getCanvasByPoint(minXY.x, minXY.y);\n var viewport = this.get('viewport');\n if (!viewport) {\n this.initViewport();\n }\n // Viewport 与 minimap container 的比例 = Graph container 与 expandedGraphBBox 比例\n var vpToMc = graphWidth / expandedGraphCanvasBBox.width;\n // viewport 宽高 = vpToMc * minimap container 宽高\n var width = vpToMc * cWidth;\n var height = vpToMc * cHeight;\n // vierport 左上角到 minimap container 的距离 / minimap container 宽高\n // = 主图 expandedBBox 左上角 canvas container 坐标距离 / expandedBBox 宽高\n var left = cWidth * -topLeft.x / expandedGraphCanvasBBox.width;\n var top = cHeight * -topLeft.y / expandedGraphCanvasBBox.height;\n var right = left + width;\n var bottom = top + height;\n if (left < 0) {\n width += left;\n left = 0;\n }\n if (right > cWidth) {\n width = width - (right - cWidth);\n }\n if (top < 0) {\n height += top;\n top = 0;\n }\n if (bottom > cHeight) {\n height = height - (bottom - cHeight);\n }\n // 缓存目前缩放比,在移动 minimap 视窗时就不用再计算大图的移动量\n this.set('ratio', ratio);\n var correctLeft = \"\".concat(left, \"px\");\n var correctTop = \"\".concat(top, \"px\");\n modifyCSS(viewport, {\n left: correctLeft,\n top: correctTop,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n };\n ImageMiniMap.prototype.init = function () {\n this.initContainer();\n };\n /**\n * 初始化 Minimap 的容器\n */\n ImageMiniMap.prototype.initContainer = function () {\n var self = this;\n var graph = self.get('graph');\n var graphWidth = graph.get('width');\n var graphHeight = graph.get('height');\n var aspectRatio = graphHeight / graphWidth;\n var className = self.get('className');\n var parentNode = self.get('container');\n // size of the minimap's container\n var cWidth = self.get('width');\n var cHeight = self.get('height');\n if (!cWidth && !cHeight) {\n cWidth = 200;\n }\n if (cWidth) {\n cHeight = aspectRatio * cWidth;\n self.set('height', cHeight);\n } else {\n cWidth = 1 / aspectRatio * cHeight;\n self.set('width', cWidth);\n }\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n if (parentNode) {\n parentNode.appendChild(container);\n } else {\n graph.get('container').appendChild(container);\n }\n self.set('container', container);\n var containerDOM = createDom(\"
\");\n container.appendChild(containerDOM);\n var span = createDom(\"\");\n containerDOM.appendChild(span);\n self.set('containerDOM', containerDOM);\n self.set('containerSpan', span);\n var img = createDom(\"\\\"\\\"\"));\n self.set('imgDOM', img);\n self.updateImgSize();\n span.appendChild(img);\n self.updateCanvas();\n };\n ImageMiniMap.prototype.updateImgSize = function () {\n var self = this;\n var imgDOM = self.get('imgDOM');\n var cWidth = self.get('width');\n var cHeight = self.get('height');\n imgDOM.onload = function () {\n var naturalSize = getImgNaturalDimension(imgDOM);\n if (naturalSize[0] > naturalSize[1]) {\n imgDOM.width = cWidth;\n } else {\n imgDOM.height = cHeight;\n }\n };\n };\n ImageMiniMap.prototype.updateCanvas = function () {\n // 如果是在动画,则不刷新视图\n var isRefresh = this.get('refresh');\n if (!isRefresh) {\n return;\n }\n var graph = this.get('graph');\n if (graph.get('destroyed')) {\n return;\n }\n // 如果是视口变换,也不刷新视图,但是需要重置视口大小和位置\n if (this.get('viewportChange')) {\n this.set('viewportChange', false);\n this.updateViewport();\n }\n var cWidth = this.get('width');\n var graphBBox = graph.get('canvas').getCanvasBBox();\n var width = graphBBox.width;\n var ratio = cWidth / width;\n // // 更新minimap视口\n this.set('ratio', ratio);\n this.updateViewport();\n };\n /**\n * 获取minimap的窗口\n * @return {HTMLElement} 窗口的dom实例\n */\n ImageMiniMap.prototype.getViewport = function () {\n return this.get('viewport');\n };\n /**\n * 获取minimap的容器dom\n * @return {HTMLElement} dom\n */\n ImageMiniMap.prototype.getContainer = function () {\n return this.get('container');\n };\n ImageMiniMap.prototype.updateGraphImg = function (img) {\n var self = this;\n var oriImgDOM = self.get('imgDOM');\n oriImgDOM.remove();\n self.set('graphImg', img);\n var imgDOM = createDom(\"\\\"\\\"\"));\n self.set('imgDOM', imgDOM);\n imgDOM.src = img;\n self.updateImgSize();\n var span = self.get('containerSpan');\n span.appendChild(imgDOM);\n self.updateCanvas();\n };\n ImageMiniMap.prototype.destroy = function () {\n var container = this.get('container');\n container.parentNode.removeChild(container);\n };\n return ImageMiniMap;\n}(Base);\nexport default ImageMiniMap;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { clone } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport Base from '../base';\nvar distance = Util.distance;\nvar DELTA = 0.05;\nvar lensDelegateStyle = {\n stroke: '#000',\n strokeOpacity: 0.8,\n lineWidth: 2,\n fillOpacity: 1,\n fill: '#fff'\n};\nvar EdgeFilterLens = /** @class */function (_super) {\n __extends(EdgeFilterLens, _super);\n function EdgeFilterLens(config) {\n return _super.call(this, config) || this;\n }\n EdgeFilterLens.prototype.getDefaultCfgs = function () {\n return {\n type: 'both',\n trigger: 'mousemove',\n r: 60,\n delegateStyle: clone(lensDelegateStyle),\n showLabel: 'edge',\n scaleRBy: 'wheel'\n };\n };\n // class-methods-use-this\n EdgeFilterLens.prototype.getEvents = function () {\n var events;\n switch (this.get('trigger')) {\n case 'click':\n events = {\n click: 'filter'\n };\n break;\n case 'drag':\n events = {\n click: 'createDelegate'\n };\n break;\n default:\n events = {\n mousemove: 'filter'\n };\n break;\n }\n return events;\n };\n EdgeFilterLens.prototype.init = function () {\n var self = this;\n var showLabel = self.get('showLabel');\n var showNodeLabel = showLabel === 'node' || showLabel === 'both';\n var showEdgeLabel = showLabel === 'edge' || showLabel === 'both';\n self.set('showNodeLabel', showNodeLabel);\n self.set('showEdgeLabel', showEdgeLabel);\n var shouldShow = self.get('shouldShow');\n if (!shouldShow) self.set('shouldShow', function () {\n return true;\n });\n };\n // Create the delegate when the trigger is drag\n EdgeFilterLens.prototype.createDelegate = function (e) {\n var self = this;\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n self.filter(e);\n lensDelegate = self.get('delegate');\n // drag to move the lens\n lensDelegate.on('dragstart', function (evt) {});\n lensDelegate.on('drag', function (evt) {\n self.filter(evt);\n });\n // 绑定调整范围(r)\n // 由于 drag 用于改变 lens 位置,因此在此模式下,drag 不能用于调整 r\n // scaling r\n if (this.get('scaleRBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n };\n /**\n * Scale the range by wheel\n * @param e mouse wheel event\n */\n EdgeFilterLens.prototype.scaleRByWheel = function (e) {\n var self = this;\n if (!e || !e.originalEvent) return;\n if (e.preventDefault) e.preventDefault();\n var graph = self.get('graph');\n var ratio;\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n var mousePos = lensCenter || graph.getPointByClient(e.clientX, e.clientY);\n if (e.originalEvent.wheelDelta < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.filter(e);\n };\n /**\n * Response function for mousemove, click, or drag to filter out the edges\n * @param e mouse event\n */\n EdgeFilterLens.prototype.filter = function (e) {\n var self = this;\n var graph = self.get('graph');\n var nodes = graph.getNodes();\n var hitNodesMap = {};\n var r = self.get('r');\n var type = self.get('type');\n var fCenter = {\n x: e.x,\n y: e.y\n };\n self.updateDelegate(fCenter, r);\n var shouldShow = self.get('shouldShow');\n var vShapes = self.get('vShapes');\n if (vShapes) {\n vShapes.forEach(function (shape) {\n shape.remove();\n shape.destroy();\n });\n }\n vShapes = [];\n nodes.forEach(function (node) {\n var model = node.getModel();\n var x = model.x,\n y = model.y;\n if (distance({\n x: x,\n y: y\n }, fCenter) < r) {\n hitNodesMap[model.id] = node;\n }\n });\n var edges = graph.getEdges();\n var hitEdges = [];\n edges.forEach(function (edge) {\n var model = edge.getModel();\n var sourceId = model.source;\n var targetId = model.target;\n if (shouldShow(model)) {\n if (type === 'only-source' || type === 'one') {\n if (hitNodesMap[sourceId] && !hitNodesMap[targetId]) hitEdges.push(edge);\n } else if (type === 'only-target' || type === 'one') {\n if (hitNodesMap[targetId] && !hitNodesMap[sourceId]) hitEdges.push(edge);\n } else if (type === 'both' && hitNodesMap[sourceId] && hitNodesMap[targetId]) {\n hitEdges.push(edge);\n }\n }\n });\n var showNodeLabel = self.get('showNodeLabel');\n var showEdgeLabel = self.get('showEdgelabel');\n // copy the shapes in hitEdges\n var group = graph.get('group');\n hitEdges.forEach(function (edge) {\n var shapes = edge.get('group').get('children');\n shapes.forEach(function (shape) {\n var shapeType = shape.get('type');\n var vShape = group.addShape(shapeType, {\n attrs: shape.attr()\n });\n vShapes.push(vShape);\n if (showNodeLabel && shapeType === 'text') {\n vShape.set('visible', true);\n }\n });\n });\n // copy the shape sof hitNodes\n Object.keys(hitNodesMap).forEach(function (key) {\n var node = hitNodesMap[key];\n var clonedGroup = node.get('group').clone();\n group.add(clonedGroup);\n vShapes.push(clonedGroup);\n if (showEdgeLabel) {\n var shapes = clonedGroup.get('children');\n for (var j = 0; j < shapes.length; j++) {\n var shape = shapes[j];\n if (shape.get('type') === 'text') {\n shape.set('visible', true);\n }\n }\n }\n });\n self.set('vShapes', vShapes);\n };\n /**\n * Adjust part of the parameters, including trigger, type, r, maxR, minR, shouldShow, showLabel, and scaleRBy\n * @param {EdgeFilterLensConfig} cfg\n */\n EdgeFilterLens.prototype.updateParams = function (cfg) {\n var self = this;\n var r = cfg.r,\n trigger = cfg.trigger,\n minR = cfg.minR,\n maxR = cfg.maxR,\n scaleRBy = cfg.scaleRBy,\n showLabel = cfg.showLabel,\n shouldShow = cfg.shouldShow;\n if (!isNaN(cfg.r)) {\n self.set('r', r);\n }\n if (!isNaN(maxR)) {\n self.set('maxR', maxR);\n }\n if (!isNaN(minR)) {\n self.set('minR', minR);\n }\n if (trigger === 'mousemove' || trigger === 'click') {\n self.set('trigger', trigger);\n }\n if (scaleRBy === 'wheel' || scaleRBy === 'unset') {\n self.set('scaleRBy', scaleRBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n if (showLabel === 'node' || showLabel === 'both') {\n self.set('showNodeLabel', true);\n }\n if (showLabel === 'edge' || showLabel === 'both') {\n self.set('showEdgeLabel', true);\n }\n if (shouldShow) {\n self.set('shouldShow', shouldShow);\n }\n };\n /**\n * Update the delegate shape of the lens\n * @param {Point} mCenter the center of the shape\n * @param {number} r the radius of the shape\n */\n EdgeFilterLens.prototype.updateDelegate = function (mCenter, r) {\n var self = this;\n var graph = self.get('graph');\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = self.get('delegateStyle') || lensDelegateStyle;\n // model上的x, y是相对于图形中心的,delegateShape是g实例,x,y是绝对坐标\n lensDelegate = parent_1.addShape('circle', {\n attrs: __assign({\n r: r,\n x: mCenter.x,\n y: mCenter.y\n }, attrs),\n name: 'lens-shape',\n draggable: true\n });\n if (this.get('trigger') !== 'drag') {\n // 调整范围 r 的监听\n if (this.get('scaleRBy') === 'wheel') {\n // 使用滚轮调整 r\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n } else {\n lensDelegate.attr({\n x: mCenter.x,\n y: mCenter.y,\n r: r\n });\n }\n self.set('delegate', lensDelegate);\n };\n /**\n * Clear the filtering\n */\n EdgeFilterLens.prototype.clear = function () {\n var self = this;\n var vShapes = self.get('vShapes');\n if (vShapes) {\n vShapes.forEach(function (shape) {\n shape.remove();\n shape.destroy();\n });\n }\n vShapes = [];\n self.set('vShapes', vShapes);\n var lensDelegate = self.get('delegate');\n if (lensDelegate && !lensDelegate.destroyed) {\n lensDelegate.remove();\n lensDelegate.destroy();\n }\n };\n /**\n * Destroy the component\n */\n EdgeFilterLens.prototype.destroy = function () {\n this.clear();\n };\n return EdgeFilterLens;\n}(Base);\nexport default EdgeFilterLens;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { each, mix } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport Base from '../base';\nvar pointLineDistance = Util.pointLineDistance;\n// 对齐线样式\nvar alignLineStyle = {\n stroke: '#FA8C16',\n lineWidth: 1\n};\nvar SnapLine = /** @class */function (_super) {\n __extends(SnapLine, _super);\n function SnapLine(props) {\n return _super.call(this, props) || this;\n }\n SnapLine.prototype.getDefaultCfgs = function () {\n return {\n line: alignLineStyle,\n /**\n * item align type\n * @type {String|True|False}\n */\n itemAlignType: 'center',\n /**\n * tolerance to item force align\n * @type {String|True|False}\n */\n tolerance: 5,\n horizontalLines: {},\n verticalLines: {},\n alignLines: []\n };\n };\n SnapLine.prototype.init = function () {};\n // class-methods-use-this\n SnapLine.prototype.getEvents = function () {\n return {\n 'node:dragstart': 'onDragStart',\n 'node:drag': 'onDrag',\n 'node:dragend': 'onDragEnd'\n };\n };\n SnapLine.prototype.onDragStart = function () {\n this.initBoxLine();\n };\n SnapLine.prototype.onDrag = function (e) {\n var item = e.item;\n // 计算辅助线位置,拖动过程中更新辅助线\n var delegateShape = item.get('delegateShape') || item;\n var bbox = delegateShape.getBBox();\n var model = item.getModel();\n var dx = model.x - bbox.x;\n var dy = model.y - bbox.y;\n this.show({\n x: bbox.minX + dx,\n y: bbox.minY + dy\n }, {\n width: bbox.width,\n height: bbox.height\n });\n };\n SnapLine.prototype.onDragEnd = function () {\n // 拖动结束时候删除辅助线\n this.destory();\n };\n /**\n * 每次开始拖动之前,计算出所有节点在水平和垂直方向上,左中右三条中线,并缓存起来\n *\n * @param {object} item Node节点\n * @memberof AlignLine\n */\n SnapLine.prototype.initBoxLine = function () {\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines,\n itemAlignType = _a.itemAlignType;\n var graph = this.get('graph');\n var nodes = graph.getNodes();\n nodes.forEach(function (item) {\n var bbox = item.getBBox();\n var nodeId = item.get('id');\n // 设置水平方向辅助线\n if (itemAlignType === true || itemAlignType === 'horizontal') {\n // tltr: top left top right\n // lcrc: left center right center\n // blbr: bottom left bottom right\n horizontalLines[\"\".concat(nodeId, \"tltr\")] = [bbox.minX, bbox.minY, bbox.maxX, bbox.minY, item];\n horizontalLines[\"\".concat(nodeId, \"lcrc\")] = [bbox.minX, bbox.centerY, bbox.maxX, bbox.centerY, item];\n horizontalLines[\"\".concat(nodeId, \"blbr\")] = [bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY, item];\n } else if (itemAlignType === 'center') {\n horizontalLines[\"\".concat(nodeId, \"lcrc\")] = [bbox.minX, bbox.centerY, bbox.maxX, bbox.centerY, item];\n }\n // 设置垂直方向辅助线\n if (itemAlignType === true || itemAlignType === 'vertical') {\n // tlbl: top left bottom left\n // tcbc: top center bottom center\n // trbr: top right bottom right\n verticalLines[\"\".concat(nodeId, \"tlbl\")] = [bbox.minX, bbox.minY, bbox.minX, bbox.maxY, item];\n verticalLines[\"\".concat(nodeId, \"tcbc\")] = [bbox.centerX, bbox.minY, bbox.centerX, bbox.maxY, item];\n verticalLines[\"\".concat(nodeId, \"trbr\")] = [bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY, item];\n } else if (itemAlignType === 'center') {\n verticalLines[\"\".concat(nodeId, \"tcbc\")] = [bbox.centerX, bbox.minY, bbox.centerX, bbox.maxY, item];\n }\n });\n };\n /**\n * 显示AlignLine\n *\n * @param {object} point 起始点\n * @param {object} bbox BBox\n * @returns\n * @memberof AlignLine\n */\n SnapLine.prototype.show = function (point, bbox) {\n var originPoint = mix({}, point);\n this.itemAlign(point, bbox, originPoint);\n return point;\n };\n /**\n * 拖动拖出中添加辅助线\n *\n * @param {object} point 起始点\n * @param {object} bbox 代理形状的bbox\n * @param {object} originPoint 原始点,同point\n * @memberof AlignLine\n */\n SnapLine.prototype.itemAlign = function (point, bbox, originPoint) {\n var _this = this;\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines,\n tolerance = _a.tolerance;\n var tc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y\n };\n var cc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y + bbox.height / 2\n };\n var bc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y + bbox.height\n };\n var lc = {\n x: originPoint.x,\n y: originPoint.y + bbox.height / 2\n };\n var rc = {\n x: originPoint.x + bbox.width,\n y: originPoint.y + bbox.height / 2\n };\n var horizontalDis = [];\n var verticalDis = [];\n var alignCfg = null;\n this.clearAlignLine();\n each(horizontalLines, function (line) {\n if (line[4].isVisible) {\n horizontalDis.push(_this.getLineDisObject(line, tc));\n horizontalDis.push(_this.getLineDisObject(line, cc));\n horizontalDis.push(_this.getLineDisObject(line, bc));\n }\n });\n each(verticalLines, function (line) {\n if (line[4].isVisible) {\n verticalDis.push(_this.getLineDisObject(line, lc));\n verticalDis.push(_this.getLineDisObject(line, cc));\n verticalDis.push(_this.getLineDisObject(line, rc));\n }\n });\n horizontalDis.sort(function (a, b) {\n return a.dis - b.dis;\n });\n verticalDis.sort(function (a, b) {\n return a.dis - b.dis;\n });\n if (horizontalDis.length !== 0 && horizontalDis[0].dis < tolerance) {\n point.y = horizontalDis[0].line[1] - horizontalDis[0].point.y + originPoint.y;\n alignCfg = {\n type: 'item',\n horizontals: [horizontalDis[0]]\n };\n for (var i = 1; i < 3; i++) {\n if (horizontalDis[0].dis === horizontalDis[i].dis) {\n alignCfg.horizontals.push(horizontalDis[i]);\n }\n }\n }\n if (verticalDis.length !== 0 && verticalDis[0].dis < tolerance) {\n point.x = verticalDis[0].line[0] - verticalDis[0].point.x + originPoint.x;\n if (!alignCfg) {\n alignCfg = {\n type: 'item',\n verticals: [verticalDis[0]]\n };\n } else {\n alignCfg.verticals = [verticalDis[0]];\n }\n for (var i = 1; i < 3; i++) {\n if (verticalDis[0].dis === verticalDis[i].dis) {\n alignCfg.verticals.push(verticalDis[i]);\n }\n }\n }\n if (alignCfg) {\n alignCfg.bbox = bbox;\n this.addAlignLine(alignCfg);\n }\n };\n /**\n * 根据配置项添加辅助线\n *\n * @param {object} cfg\n * @memberof AlignLine\n */\n SnapLine.prototype.addAlignLine = function (cfg) {\n var bbox = cfg.bbox,\n type = cfg.type,\n horizontals = cfg.horizontals,\n verticals = cfg.verticals;\n var _a = this._cfgs,\n lineStyle = _a.line,\n alignLines = _a.alignLines;\n var graph = this.get('graph');\n var group = graph.get('group');\n if (type === 'item') {\n if (horizontals) {\n each(horizontals, function (horizontal) {\n var refLine = horizontal.line,\n refPoint = horizontal.point;\n var lineCenterX = (refLine[0] + refLine[2]) / 2;\n var x1;\n var x2;\n if (refPoint.x < lineCenterX) {\n x1 = refPoint.x - bbox.width / 2;\n x2 = Math.max(refLine[0], refLine[2]);\n } else {\n x1 = refPoint.x + bbox.width / 2;\n x2 = Math.min(refLine[0], refLine[2]);\n }\n var lineAttrs = mix({\n x1: x1,\n y1: refLine[1],\n x2: x2,\n y2: refLine[1]\n }, lineStyle);\n var line = group.addShape('line', {\n attrs: lineAttrs,\n capture: false\n });\n alignLines.push(line);\n });\n }\n if (verticals) {\n each(verticals, function (vertical) {\n var refLine = vertical.line,\n refPoint = vertical.point;\n var lineCenterY = (refLine[1] + refLine[3]) / 2;\n var y1;\n var y2;\n if (refPoint.y < lineCenterY) {\n y1 = refPoint.y - bbox.height / 2;\n y2 = Math.max(refLine[1], refLine[3]);\n } else {\n y1 = refPoint.y + bbox.height / 2;\n y2 = Math.min(refLine[1], refLine[3]);\n }\n var lineAtts = mix({\n x1: refLine[0],\n y1: y1,\n x2: refLine[0],\n y2: y2\n }, lineStyle);\n var line = group.addShape('line', {\n attrs: lineAtts,\n capture: false\n });\n alignLines.push(line);\n });\n }\n }\n };\n /**\n * 获取点到线的距离\n *\n * @param {array} line [x1, y1, x2, y2] 线的四个点\n * @param {object} point 点的x和y坐标点 {x, y}\n * @returns\n * @memberof AlignLine\n */\n SnapLine.prototype.getLineDisObject = function (line, point) {\n return {\n line: line,\n point: point,\n dis: pointLineDistance(line, point)\n };\n };\n SnapLine.prototype.getContainer = function () {\n return this.get('container');\n };\n /**\n * 拖动过程中,清楚上次绘制的线\n *\n * @memberof AlignLine\n */\n SnapLine.prototype.clearAlignLine = function () {\n var alignLines = this._cfgs.alignLines;\n each(alignLines, function (line) {\n line.remove();\n });\n alignLines.length = 0;\n };\n /**\n * 拖动结束时候,情况缓存的节点的辅助线,同时删除绘制的线\n *\n * @memberof AlignLine\n */\n SnapLine.prototype.destory = function () {\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines;\n var graph = this.get('graph');\n var nodes = graph.getNodes();\n nodes.forEach(function (node) {\n var itemId = node.get('id');\n delete horizontalLines[\"\".concat(itemId, \"tltr\")];\n delete horizontalLines[\"\".concat(itemId, \"lcrc\")];\n delete horizontalLines[\"\".concat(itemId, \"blbr\")];\n delete verticalLines[\"\".concat(itemId, \"tlbl\")];\n delete verticalLines[\"\".concat(itemId, \"tcbc\")];\n delete verticalLines[\"\".concat(itemId, \"trbr\")];\n });\n this.clearAlignLine();\n };\n return SnapLine;\n}(Base);\nexport default SnapLine;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport Base from '../base';\nimport { isArray, isNumber, uniqueId } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport { Canvas } from '@antv/g-canvas';\nvar ALLOW_EVENTS = ['click', 'mouseenter'];\nvar Legend = /** @class */function (_super) {\n __extends(Legend, _super);\n function Legend(config) {\n return _super.call(this, config) || this;\n }\n Legend.prototype.getDefaultCfgs = function () {\n return {\n data: {},\n position: 'top',\n padding: 8,\n margin: 8,\n offsetX: 0,\n offsetY: 0,\n layout: 'horizontal',\n flipPage: false,\n containerStyle: {},\n align: undefined,\n horiSep: 8,\n vertiSep: 8,\n filter: {\n enable: false,\n trigger: 'click'\n }\n };\n };\n Legend.prototype.init = function () {\n this.formatArray('padding');\n this.formatArray('margin');\n var filter = this.get('filter') || {};\n var multiple = filter.multiple;\n if (multiple && filter.trigger === 'mouseenter') this.set('multiple', false);\n var align = this.get('align');\n if (!align) {\n var positions = this.get('position').split('-');\n if (positions.includes('left')) align = 'left';\n if (positions.includes('right')) align = 'right';else align = 'center';\n this.set('align', align);\n }\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = createDom(\"
\");\n graphContainer.appendChild(container);\n this.set('container', container);\n var size = this.render();\n modifyCSS(container, this.getContainerPos(size));\n this.bindEvents();\n };\n Legend.prototype.getContainerPos = function (size) {\n if (size === void 0) {\n size = [0, 0];\n }\n var self = this;\n var graph = self.get('graph');\n var offsetX = this.get('offsetX');\n var offsetY = this.get('offsetY');\n var margin = this.get('margin');\n var positions = this.get('position').split('-');\n var posIdxMap = {\n 'top': 0,\n 'right': 1,\n 'bottom': 2,\n 'left': 3\n };\n var x = 0,\n y = 0;\n var containerCSS = {\n left: (graph.getWidth() - size[0]) / 2 + x,\n top: (graph.getHeight() - size[1]) / 2 + y\n };\n positions.forEach(function (pos) {\n var marginValue = margin[posIdxMap[pos]];\n var key = pos;\n switch (pos) {\n case 'top':\n marginValue += y;\n break;\n case 'left':\n marginValue += x;\n break;\n case 'bottom':\n marginValue = graph.getHeight() - size[1] - marginValue + y;\n key = 'top';\n break;\n default:\n marginValue = graph.getWidth() - size[0] - marginValue + x;\n key = 'left';\n break;\n }\n containerCSS[key] = marginValue;\n });\n containerCSS.top += offsetY + graph.getContainer().offsetTop;\n containerCSS.left += offsetX + graph.getContainer().offsetLeft;\n Object.keys(containerCSS).forEach(function (key) {\n containerCSS[key] = \"\".concat(containerCSS[key], \"px\");\n });\n return containerCSS;\n };\n // class-methods-use-this\n Legend.prototype.bindEvents = function () {\n var self = this;\n var filter = self.get('filter');\n if (!filter || !filter.enable) return;\n var trigger = filter.trigger || 'click';\n if (!ALLOW_EVENTS.includes(trigger)) {\n console.warn('Trigger for legend filterling must be \\'click\\' or \\'mouseenter\\', \\'click\\' will take effect by default.');\n trigger = 'click';\n }\n var lc = self.get('legendCanvas');\n if (trigger === 'mouseenter') {\n lc.on('node-container:mouseenter', function (e) {\n return self.filterData(e);\n });\n lc.on('node-container:mouseleave', function (e) {\n self.clearFilter();\n self.clearActiveLegend();\n });\n } else {\n lc.on('node-container:click', function (e) {\n return self.filterData(e);\n });\n lc.on('click', function (e) {\n if (e.target && e.target.isCanvas && e.target.isCanvas()) {\n self.clearFilter();\n self.clearActiveLegend();\n }\n });\n }\n };\n /**\n * 更新 legend 数据,开放给用户控制\n * @param param\n */\n Legend.prototype.changeData = function (data) {\n this.set('data', data);\n var size = this.render();\n modifyCSS(this.get('container'), this.getContainerPos(size));\n };\n Legend.prototype.activateLegend = function (shape) {\n var filter = this.get('filter');\n var multiple = filter === null || filter === void 0 ? void 0 : filter.multiple;\n if (!multiple) this.clearActiveLegend();\n var shapeGroup = shape.get('parent');\n // 若被高亮元素已经处于 active 状态,则取消它的 active 状态\n // 并根据目前是否有其他 active 状态的元素决定是否要设置为 inactive 状态\n if (shapeGroup.get('active')) {\n shapeGroup.set('active', false);\n if (this.findLegendItemsByState('active').length) shapeGroup.set('inactive', true);\n } else {\n shapeGroup.set('inactive', false);\n shapeGroup.set('active', true);\n }\n // 当目前有元素为 active 状态时,将非 active 的元素设置为 inactive\n if (this.findLegendItemsByState('active').length) {\n this.findLegendItemsByState('active', 'all', false).forEach(function (subGroup) {\n subGroup.set('inactive', true);\n });\n } else {\n this.clearActiveLegend();\n }\n // 设置样式\n var stateStyles = (filter === null || filter === void 0 ? void 0 : filter.legendStateStyles) || {};\n var legendInactive = (stateStyles === null || stateStyles === void 0 ? void 0 : stateStyles.inactive) || {\n opacity: 0.5,\n 'text-shape': {\n opacity: 0.5\n }\n };\n var legendTextInactive = legendInactive['text-shape'] || {};\n this.findLegendItemsByState('inactive').forEach(function (subGroup) {\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(__assign(__assign({}, keyShape.get('oriAttrs')), legendInactive));\n text.attr(__assign(__assign({}, text.get('oriAttrs')), legendTextInactive));\n });\n var legendActive = (stateStyles === null || stateStyles === void 0 ? void 0 : stateStyles.active) || {\n stroke: '#000',\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 'bold'\n }\n };\n var legendTextActive = legendActive['text-shape'] || {};\n this.findLegendItemsByState('active').forEach(function (subGroup) {\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(__assign(__assign({}, keyShape.get('oriAttrs')), legendActive));\n text.attr(__assign(__assign({}, text.get('oriAttrs')), legendTextActive));\n });\n };\n Legend.prototype.findLegendItemsByState = function (stateName, type, value) {\n if (type === void 0) {\n type = 'all';\n }\n if (value === void 0) {\n value = true;\n }\n var group = this.get('legendCanvas').find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n if (type === 'node') return nodeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n });\n if (type === 'edge') return edgeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n });\n return nodeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n }).concat(edgeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n }));\n };\n Legend.prototype.clearActiveLegend = function () {\n var lg = this.get('legendCanvas');\n var group = lg.find(function (e) {\n return e.get('name') === 'root';\n });\n var groups = [group.find(function (e) {\n return e.get('name') === 'node-group';\n }), group.find(function (e) {\n return e.get('name') === 'edge-group';\n })];\n groups.forEach(function (itemGroup) {\n itemGroup.get('children').forEach(function (subGroup) {\n subGroup.set('active', false);\n subGroup.set('inactive', false);\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(keyShape.get('oriAttrs'));\n text.attr(text.get('oriAttrs'));\n });\n });\n };\n /**\n * 高亮和置灰图例,并过滤主图元素\n * @param param\n */\n Legend.prototype.filterData = function (e) {\n var filter = this.get('filter');\n var filterFunctions = filter === null || filter === void 0 ? void 0 : filter.filterFunctions;\n if (!filter || !filterFunctions) return;\n var lc = this.get('legendCanvas');\n var graph = this.get('graph');\n var activeState = filter.graphActiveState || 'active';\n var inactiveState = filter.graphInactiveState || 'inactive';\n var multiple = filter.multiple;\n this.clearFilter();\n if (!multiple) this.clearActiveLegend();\n // 设置 legend 的高亮状态\n this.activateLegend(e.target);\n var group = lc.find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n var activeNodeLegend = nodeGroup.get('children').filter(function (e) {\n return e.get('active');\n });\n var activeEdgeLegend = edgeGroup.get('children').filter(function (e) {\n return e.get('active');\n });\n var activeCount = 0;\n var typeFuncs = ['getNodes', 'getEdges'];\n typeFuncs.forEach(function (typeFunc) {\n graph[typeFunc]().forEach(function (graphItem) {\n var active = false;\n var activeLegend = typeFunc === 'getNodes' ? activeNodeLegend : activeEdgeLegend;\n activeLegend.forEach(function (itemGroup) {\n var func = filterFunctions[itemGroup.get('id')];\n active = active || func(graphItem.getModel());\n });\n if (active) {\n graph.setItemState(graphItem, inactiveState, false);\n graph.setItemState(graphItem, activeState, true);\n activeCount++;\n } else {\n graph.setItemState(graphItem, activeState, false);\n graph.setItemState(graphItem, inactiveState, true);\n }\n });\n });\n if (!activeCount) typeFuncs.forEach(function (typeFunc) {\n graph[typeFunc]().forEach(function (graphItem) {\n graph.clearItemStates(graphItem, [inactiveState]);\n });\n });\n };\n /**\n * 清除主图相关状态\n * @param param\n */\n Legend.prototype.clearFilter = function () {\n // 清除 legend 的高亮状态\n var graph = this.get('graph');\n var filter = this.get('filter');\n if (!filter) return;\n var activeState = filter.graphActiveState || 'active';\n var inactiveState = filter.graphInactiveState || 'inactive';\n graph.getNodes().forEach(function (node) {\n graph.clearItemStates(node, [activeState, inactiveState]);\n });\n graph.getEdges().forEach(function (edge) {\n graph.clearItemStates(edge, [activeState, inactiveState]);\n });\n };\n /**\n * 渲染 legend 图\n * @param param\n */\n Legend.prototype.render = function () {\n var _this = this;\n this.processData();\n var lc = this.get('legendCanvas');\n if (!lc) {\n lc = new Canvas({\n container: this.get('container'),\n width: 200,\n height: 200\n });\n } else {\n lc.clear();\n }\n var group = lc.addGroup({\n name: 'root'\n });\n var nodeGroup = group.addGroup({\n name: 'node-group'\n });\n var edgeGroup = group.addGroup({\n name: 'edge-group'\n });\n this.set('legendCanvas', lc);\n var itemsData = this.get('itemsData');\n var itemTypes = ['nodes', 'edges'];\n var itemGroup = [nodeGroup, edgeGroup];\n itemTypes.forEach(function (itemType, i) {\n itemsData[itemType].forEach(function (data) {\n var _a;\n var subGroup = itemGroup[i].addGroup({\n id: data.id,\n name: 'node-container'\n });\n var attrs;\n var shapeType = data.type;\n var _b = _this.getShapeSize(data),\n width = _b.width,\n height = _b.height,\n r = _b.r;\n var style = _this.getStyle(itemType.substr(0, 4), data);\n switch (data.type) {\n case 'circle':\n attrs = {\n r: r,\n x: 0,\n y: 0\n };\n break;\n case 'rect':\n attrs = {\n width: width,\n height: height,\n x: -width / 2,\n y: -height / 2\n };\n break;\n case 'ellipse':\n attrs = {\n rx: width,\n ry: height,\n x: 0,\n y: 0\n };\n shapeType = 'ellipse';\n break;\n case 'line':\n attrs = {\n x1: -width / 2,\n y1: 0,\n x2: width / 2,\n y2: 0\n };\n shapeType = 'line';\n break;\n case 'quadratic':\n attrs = {\n path: [['M', -width / 2, 0], ['Q', 0, width / 2, width / 2, 0]]\n };\n shapeType = 'path';\n break;\n case 'cubic':\n attrs = {\n path: [['M', -width / 2, 0], ['C', -width / 6, width / 2, width / 6, -width / 2, width / 2, 0]]\n };\n shapeType = 'path';\n break;\n case 'diamond':\n attrs = {\n path: [['M', 0, -height], ['L', width, 0], ['L', 0, height], ['L', -width, 0], ['Z']]\n };\n shapeType = 'path';\n break;\n case 'triangle':\n attrs = {\n path: [['M', -width, height], ['L', 0, -height], ['L', width, height], ['Z']]\n };\n shapeType = 'path';\n break;\n case 'star':\n attrs = {\n path: Util.getStarPath(r * 3, r * 1.2)\n };\n shapeType = 'path';\n break;\n default:\n attrs = {\n r: r,\n x: 0,\n y: 0\n };\n break;\n }\n var keyShape = subGroup.addShape(shapeType, {\n attrs: __assign(__assign({}, attrs), style),\n name: \"\".concat(data.type, \"-node-keyShape\"),\n oriAttrs: __assign({\n opacity: 1\n }, style)\n });\n if (data.label) {\n var keyShapeBBox = keyShape.getBBox();\n var labelStyle = ((_a = data.labelCfg) === null || _a === void 0 ? void 0 : _a.style) || {};\n var attrs_1 = __assign({\n textAlign: 'begin',\n fontSize: 12,\n textBaseline: 'middle',\n fill: '#000',\n opacity: 1,\n fontWeight: 'normal'\n }, labelStyle);\n subGroup.addShape('text', {\n attrs: __assign({\n x: keyShapeBBox.maxX + 4,\n y: 0,\n text: data.label\n }, attrs_1),\n className: 'legend-label',\n name: \"\".concat(data.type, \"-node-text\"),\n oriAttrs: attrs_1\n });\n }\n });\n });\n var padding = this.get('padding');\n var titleShape;\n var titleGroup = group.find(function (e) {\n return e.get('name') === 'title-container';\n });\n var titleGroupBBox = {\n height: 0,\n maxY: 0,\n width: 0\n };\n if (this.get('title')) {\n if (!titleGroup) {\n titleGroup = group.addGroup({\n name: 'title-container'\n });\n }\n var defaultTitleStyle = {\n fontSize: 20,\n fontFamily: 'Arial',\n fontWeight: 300,\n textBaseline: 'top',\n textAlign: 'center',\n fill: \"#000\",\n x: 0,\n y: padding[0]\n };\n var titleConfig = this.get('titleConfig') || {};\n var style = Object.assign(defaultTitleStyle, titleConfig.style || {});\n titleShape = titleGroup.addShape('text', {\n attrs: __assign({\n text: this.get('title')\n }, style)\n });\n titleGroupBBox = titleGroup.getCanvasBBox();\n titleGroup.setMatrix([1, 0, 0, 0, 1, 0, titleConfig.offsetX, titleConfig.offsetY, 1]);\n }\n this.layoutItems();\n var lcBBox = group.getCanvasBBox();\n var nodeGroupBBox = nodeGroup.getCanvasBBox();\n // 若有图形超过边界的情况,平移回来\n var nodeGroupBeginX = nodeGroupBBox.minX < 0 ? Math.abs(nodeGroupBBox.minX) + padding[3] : padding[3];\n var nodeGroupBeginY = titleGroupBBox.maxY < nodeGroupBBox.minY ? Math.abs(titleGroupBBox.maxY - nodeGroupBBox.minY) + padding[0] : titleGroupBBox.maxY + padding[0];\n var nodeGroupMatrix = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n nodeGroup.setMatrix(nodeGroupMatrix);\n lcBBox = group.getCanvasBBox();\n var size = [lcBBox.minX + lcBBox.width + padding[1], lcBBox.minY + lcBBox.height + padding[2]];\n // 根据 size 和 titleConfig 调整 title 位置,再调整 nodeGroup 位置\n if (titleShape) {\n var titleConfig = __assign({\n position: 'center',\n offsetX: 0,\n offsetY: 0\n }, this.get('titleConfig'));\n titleGroupBBox = titleGroup.getCanvasBBox();\n var titleGroupMatrix = titleGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (titleConfig.position === 'center') {\n titleGroupMatrix[6] = size[0] / 2 + titleConfig.offsetX;\n } else if (titleConfig.position === 'right') {\n titleGroupMatrix[6] = size[0] - padding[3] + titleConfig.offsetX;\n titleShape.attr({\n textAlign: 'right'\n });\n } else {\n titleGroupMatrix[6] = padding[3] + titleConfig.offsetX;\n titleShape.attr({\n textAlign: 'left'\n });\n }\n titleGroup.setMatrix(titleGroupMatrix);\n titleGroupBBox = titleGroup.getCanvasBBox();\n // 若有图形超过边界的情况,平移回来\n nodeGroupBeginX = nodeGroupBBox.minX < 0 ? Math.abs(nodeGroupBBox.minX) + padding[3] : padding[3];\n nodeGroupBeginY = nodeGroupBBox.minY < titleGroupBBox.maxY ? Math.abs(titleGroupBBox.maxY - nodeGroupBBox.minY) + padding[0] : titleGroupBBox.maxY + padding[0];\n nodeGroupMatrix = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n nodeGroup.setMatrix(nodeGroupMatrix);\n var edgeGroupMatrix_1 = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n if (this.get('layout') === 'vertical') edgeGroupMatrix_1[6] += nodeGroupBBox.maxX + this.get('horiSep');else edgeGroupMatrix_1[7] += nodeGroupBBox.maxY + this.get('vertiSep');\n edgeGroup.setMatrix(edgeGroupMatrix_1);\n } else {\n // 没有 title,也需要平移 edgeGroup\n nodeGroupBBox = nodeGroup.getCanvasBBox();\n var edgeGroupMatrix_2 = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (this.get('layout') === 'vertical') edgeGroupMatrix_2[6] += nodeGroupMatrix[6] + nodeGroupBBox.maxX + this.get('horiSep');else edgeGroupMatrix_2[7] += nodeGroupMatrix[7] + nodeGroupBBox.maxY + this.get('vertiSep');\n edgeGroup.setMatrix(edgeGroupMatrix_2);\n }\n lcBBox = group.getCanvasBBox();\n nodeGroupBBox = nodeGroup.getCanvasBBox();\n nodeGroupMatrix = nodeGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var edgeGroupMatrix = edgeGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var edgeGroupBBox = edgeGroup.getCanvasBBox();\n size = [Math.max(nodeGroupBBox.width + nodeGroupMatrix[6], edgeGroupBBox.width + edgeGroupMatrix[6]) + padding[1], Math.max(nodeGroupBBox.height + nodeGroupMatrix[7], edgeGroupBBox.height + edgeGroupMatrix[7]) + padding[2]];\n lc.changeSize(size[0], size[1]);\n // 更新容器背景样式\n var containerStyle = this.get('containerStyle');\n var viewportMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var beginPos = Util.invertMatrix({\n x: 0,\n y: 0\n }, viewportMatrix);\n var backRect = group.addShape('rect', {\n attrs: __assign({\n x: beginPos.x + (containerStyle.lineWidth || 1),\n y: beginPos.y + (containerStyle.lineWidth || 1),\n width: size[0] - 2 * (containerStyle.lineWidth || 1),\n height: size[1] - 2 * (containerStyle.lineWidth || 1),\n fill: \"#f00\",\n stroke: '#000',\n lineWidth: 1,\n opacity: 0.5\n }, containerStyle),\n name: 'legend-back-rect',\n capture: false\n });\n backRect.toBack();\n return size;\n };\n Legend.prototype.layoutItems = function () {\n var lc = this.get('legendCanvas');\n var horiSep = this.get('horiSep');\n var vertiSep = this.get('vertiSep');\n var layout = this.get('layout');\n var align = this.get('align');\n var begin = [0, 0];\n var group = lc.find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n var nodeLegendSize = {\n min: 0,\n max: -Infinity\n };\n var rowMaxY = -Infinity;\n nodeGroup.get('children').forEach(function (cNodeGroup, i) {\n if (i === 0) nodeLegendSize.min = begin[0];\n var keyShape = cNodeGroup.get('children')[0];\n var bbox = cNodeGroup.getCanvasBBox();\n var _a = keyShape.getBBox(),\n keyShapeWidth = _a.width,\n keyShapeHeight = _a.height;\n var curHeight = 0,\n x = 0,\n y = 0;\n if (layout === 'vertical') {\n x = begin[1];\n y = begin[0] + keyShapeWidth / 2;\n begin[0] = y + bbox.height + vertiSep;\n curHeight = bbox.maxX + x + keyShapeWidth / 2;\n } else {\n x = begin[0] + keyShapeWidth / 2;\n y = begin[1];\n begin[0] = x + bbox.width + horiSep;\n curHeight = bbox.maxY + y + keyShapeHeight / 2;\n }\n if (begin[0] > nodeLegendSize.max) nodeLegendSize.max = begin[0];\n if (curHeight > rowMaxY) rowMaxY = curHeight;\n cNodeGroup.setMatrix([1, 0, 0, 0, 1, 0, x, y, 1]);\n });\n var nw = nodeLegendSize.max - nodeLegendSize.min;\n var edgeLegendSize = {\n min: 0,\n max: -Infinity\n };\n var nodeGroupBBox = nodeGroup.getCanvasBBox();\n begin[0] = 0;\n begin[1] = layout === 'vertical' ? nodeGroupBBox.maxX + horiSep : nodeGroupBBox.maxY + vertiSep;\n edgeGroup.get('children').forEach(function (subGroup, i) {\n if (i === 0) edgeLegendSize.min = begin[0];\n var keyShape = subGroup.get('children')[0];\n var bbox = subGroup.getCanvasBBox();\n var _a = keyShape.getBBox(),\n keyShapeWidth = _a.width,\n keyShapeHeight = _a.height;\n var x = 0,\n y = 0;\n if (layout === 'vertical') {\n x = begin[1];\n y = begin[0];\n begin[0] = y + bbox.height + vertiSep;\n subGroup.setMatrix([1, 0, 0, 0, 1, 0, 0, y + keyShapeHeight / 2, 1]);\n } else {\n x = begin[0];\n y = begin[1];\n begin[0] = x + bbox.width + horiSep;\n subGroup.setMatrix([1, 0, 0, 0, 1, 0, x + keyShapeWidth / 2, 0, 1]);\n }\n if (begin[0] > edgeLegendSize.max) edgeLegendSize.max = begin[0];\n });\n var ew = edgeLegendSize.max - edgeLegendSize.min;\n if (align && align !== '' && align !== 'left') {\n var widthDiff = nw - ew;\n var movement_1 = align === 'center' ? Math.abs(widthDiff) / 2 : Math.abs(widthDiff);\n var shouldAdjustGroup = widthDiff < 0 ? nodeGroup : edgeGroup;\n shouldAdjustGroup.get('children').forEach(function (subGroup) {\n var matrix = subGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (layout === 'vertical') matrix[7] += movement_1;else matrix[6] += movement_1;\n subGroup.setMatrix(matrix);\n });\n }\n };\n Legend.prototype.processData = function () {\n var data = this.get('data');\n var itemsData = {\n nodes: [],\n edges: []\n };\n if (data.nodes) {\n data.nodes.sort(function (a, b) {\n return a.order - b.order;\n });\n data.nodes.forEach(function (node) {\n var _a, _b, _c, _d, _e;\n var size = node.size || [((_a = node.style) === null || _a === void 0 ? void 0 : _a.width) || ((_b = node.style) === null || _b === void 0 ? void 0 : _b.r) || 8, ((_c = node.style) === null || _c === void 0 ? void 0 : _c.height) || ((_d = node.style) === null || _d === void 0 ? void 0 : _d.r) || 8];\n var labelStyle = ((_e = node.labelCfg) === null || _e === void 0 ? void 0 : _e.style) || {};\n itemsData.nodes.push({\n id: node.id || uniqueId(),\n type: node.type || 'circle',\n style: __assign({}, node.style),\n order: node.order,\n label: node.label,\n itemType: 'node',\n size: size,\n labelCfg: {\n position: 'right',\n style: __assign({\n fontFamily: \"Arial\"\n }, labelStyle)\n }\n });\n });\n }\n if (data.edges) {\n data.edges.sort(function (a, b) {\n return a.order - b.order;\n });\n data.edges.forEach(function (edge) {\n var _a, _b;\n var type = edge.type || 'line';\n if (edge.type === 'cubic-horizontal') type = 'cubic';\n var labelStyle = ((_a = edge.labelCfg) === null || _a === void 0 ? void 0 : _a.style) || {};\n var size = edge.size || [((_b = edge.style) === null || _b === void 0 ? void 0 : _b.width) || 8, 1];\n itemsData.edges.push({\n id: edge.id || uniqueId(),\n type: type,\n size: size,\n style: __assign({\n lineWidth: isArray(size) ? size[1] : 1\n }, edge.style),\n order: edge.order,\n label: edge.label,\n itemType: 'edge',\n labelCfg: {\n position: 'right',\n style: __assign({\n fontFamily: \"Arial\"\n }, labelStyle)\n }\n });\n });\n }\n this.set('itemsData', itemsData);\n };\n Legend.prototype.getContainer = function () {\n return this.get('container');\n };\n Legend.prototype.formatArray = function (key) {\n var value = this.get(key);\n if (isNumber(value)) this.set(key, [value, value, value, value]);else if (isArray(value)) {\n switch (value.length) {\n case 0:\n this.set(key, [0, 0, 0, 0]);\n break;\n case 1:\n this.set(key, [value[0], value[0], value[0], value[0]]);\n break;\n case 2:\n this.set(key, [value[0], value[1], value[0], value[1]]);\n break;\n case 3:\n this.set(key, [value[0], value[1], value[2], value[1]]);\n break;\n default:\n break;\n }\n }\n return this.get(key);\n };\n Legend.prototype.getShapeSize = function (data) {\n var width, height, r;\n if (data.size) {\n if (isArray(data.size)) {\n width = data.size[0];\n height = data.size[1] || data.size[0];\n r = data.size[0] / 2;\n } else if (isNumber(data.size)) {\n width = data.size;\n height = data.size;\n r = data.size / 2;\n }\n }\n if (data.style) {\n if (data.style.width) width = data.style.width;\n if (data.style.height) height = data.style.height;\n if (data.style.r) r = data.style.r;\n }\n if (!r) r = 5;\n if (!width) width = r;\n if (!height) height = r;\n return {\n width: width,\n height: height,\n r: r\n };\n };\n Legend.prototype.getStyle = function (type, data) {\n var defaultStyle = type === 'node' ? {\n fill: '#ccc',\n lineWidth: 0\n } : {\n stroke: '#000',\n lineWidth: 1\n };\n return __assign(__assign({}, defaultStyle), data.style || {});\n };\n Legend.prototype.destroy = function () {\n var lc = this.get('legendCanvas');\n lc === null || lc === void 0 ? void 0 : lc.destroy();\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = this.get('container');\n graphContainer.removeChild(container);\n };\n return Legend;\n}(Base);\nexport default Legend;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isNumber, debounce } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport insertCss from 'insert-css';\nimport { Canvas } from '@antv/g-canvas';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-annotation-container {\\n background-color: rgba(255, 255, 255, 0.3);\\n padding: 8px;\\n }\\n .g6-annotation-wrapper {\\n background-color: #fff;\\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.85);\\n }\\n .g6-annotation-header-wapper {\\n height: fit-content;\\n width: 100%;\\n background-color: #5B8FF9;\\n display: inline-flex;\\n cursor: move;\\n }\\n .g6-annotation-title {\\n margin: 4px 40px 4px 8px;\\n cursor: text;\\n min-width: 32px;\\n }\\n .g6-annotation-collapse {\\n margin: 4px;\\n cursor: pointer;\\n }\\n .g6-annotation-expand {\\n margin: 4px;\\n cursor: pointer;\\n }\\n .g6-annotation-close {\\n margin: 4px 8px 4px 0;\\n cursor: pointer;\\n }\\n .g6-annotation-content {\\n padding: 8px;\\n width: fit-content;\\n cursor: text;\\n word-break: break-all;\\n min-width: 32px;\\n }\\n .g6-annotation-title-input-wrapper {\\n margin: 4px 40px 4px 8px;\\n }\\n .g6-annotation-content-input {\\n height: 100%;\\n word-break: break-all;\\n }\\n .g6-annotation-content-input-wrapper {\\n margin: 8px;\\n height: 100%;\\n }\\n\");\nvar CANVAS_ANNOTATION_ID = 'canvas-annotation';\nvar Annotation = /** @class */function (_super) {\n __extends(Annotation, _super);\n function Annotation(config) {\n return _super.call(this, config) || this;\n }\n Annotation.prototype.getDefaultCfgs = function () {\n return {\n trigger: 'click',\n editable: true,\n itemHighlightState: 'highlight',\n linkHighlightStyle: {\n shadowColor: '#5B8FF9',\n shadowBlur: 10\n },\n cardCfg: {\n minHeight: 60,\n width: 'fit-content',\n height: 'fit-content',\n collapseType: 'minimize',\n closeType: 'hide',\n borderRadius: 5,\n maxTitleLength: 20\n }\n };\n };\n // class-methods-use-this\n Annotation.prototype.getEvents = function () {\n var events = {\n 'viewportchange': 'updateLinks',\n 'afterlayout': 'updateLinks',\n 'aftergraphrefreshposition': 'updateLinks',\n 'afterupdateitem': 'updateLink',\n 'afterchangedata': 'onGraphDataChange',\n 'afteritemvisibilitychange': 'onGraphItemVisibilityChange'\n };\n switch (this.get('trigger')) {\n case 'click':\n events = __assign(__assign({}, events), {\n 'node:click': 'showAnnotation',\n 'edge:click': 'showAnnotation'\n });\n }\n return events;\n };\n Annotation.prototype.getDOMContent = function (cfg) {\n if (this.destroyed) return;\n var collapsed = cfg.collapsed,\n maxWidth = cfg.maxWidth,\n _a = cfg.title,\n title = _a === void 0 ? '' : _a,\n _b = cfg.content,\n content = _b === void 0 ? '' : _b,\n _c = cfg.borderRadius,\n r = _c === void 0 ? 5 : _c;\n var collapseExpandDOM = collapsed ? \"

+

\" : \"

-

\";\n var contentDOM = collapsed ? '' : \"

\".concat(content, \"

\");\n var closeDOM = \"

x

\";\n var borderRadius = collapsed ? \"\".concat(r, \"px\") : \"\".concat(r, \"px \").concat(r, \"px 0 0\");\n return \"
\\n \\n

\").concat(title, \"

\\n \").concat(collapseExpandDOM, \"\\n \").concat(closeDOM, \"\\n
\\n \").concat(contentDOM, \"\\n
\");\n };\n Annotation.prototype.init = function () {\n var self = this;\n if (self.destroyed) return;\n var graph = self.get('graph');\n var graphCantainer = graph.getContainer();\n var container = self.get('container');\n var containerCfg = this.get('containerCfg');\n if (containerCfg) {\n container = this.createContainer();\n graphCantainer.appendChild(container);\n } else {\n container = graphCantainer;\n }\n this.set('container', container);\n // 绘制连接 annotation 和元素的连线的画布\n var graphContainerBBox = graphCantainer.getBoundingClientRect();\n var linkCanvas = new Canvas({\n container: graphCantainer,\n width: graphContainerBBox.right - graphContainerBBox.left,\n height: graphContainerBBox.bottom - graphContainerBBox.top\n });\n modifyCSS(linkCanvas.get('el'), {\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none'\n });\n // 需要传入 self,无法 removeEventListener,只能在内部判断 self 被销毁则不继续\n window.addEventListener('resize', debounce(function () {\n return self.resizeCanvas(self);\n }, 100));\n var linkGroup = linkCanvas.addGroup({\n id: 'annotation-link-group'\n });\n self.set('linkGroup', linkGroup);\n self.set('canvas', linkCanvas);\n if (!self.get('getTitle')) {\n self.set('getTitle', function (item) {\n var _a;\n var _b = ((_a = item === null || item === void 0 ? void 0 : item.getModel) === null || _a === void 0 ? void 0 : _a.call(item)) || {},\n label = _b.label,\n id = _b.id;\n return label || id || '-';\n });\n }\n if (!self.get('getContent')) {\n self.set('getContent', function (item) {\n var _a, _b;\n if (!item) return '-';\n var _c = ((_a = item.getModel) === null || _a === void 0 ? void 0 : _a.call(item)) || {},\n label = _c.label,\n id = _c.id;\n var type = (_b = item.getType) === null || _b === void 0 ? void 0 : _b.call(item);\n var suffix = type ? \"\".concat(type, \": \") : '';\n return \"\".concat(suffix).concat(label || id || '');\n });\n }\n // init with defaultData\n var defaultData = self.get('defaultData');\n if (defaultData) this.readData(defaultData);\n };\n Annotation.prototype.createContainer = function () {\n var _this = this;\n if (this.destroyed) return;\n var containerCfg = this.get('containerCfg');\n var graph = this.get('graph');\n var graphContainer = graph.getContainer();\n var _a = graphContainer.getBoundingClientRect(),\n gLeft = _a.left,\n gRight = _a.right,\n gTop = _a.top,\n gBottom = _a.bottom;\n var graphContainerHeight = gBottom - gTop;\n var graphContainerWidth = gRight - gLeft;\n var _b = containerCfg.position,\n position = _b === void 0 ? 'top' : _b,\n _c = containerCfg.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = containerCfg.offsetY,\n offsetY = _d === void 0 ? 0 : _d,\n otherStyle = __rest(containerCfg, [\"position\", \"offsetX\", \"offsetY\"]);\n var _e = containerCfg.height,\n height = _e === void 0 ? 'fit-content' : _e,\n _f = containerCfg.width,\n width = _f === void 0 ? graph.getWidth() : _f;\n if (height === '100%') height = graphContainerHeight;\n if (width === '100%') width = graphContainerWidth;\n var maxHeight = 'unset',\n maxWidth = 'unset';\n var containerPosition = {};\n switch (position) {\n case 'right':\n maxHeight = \"\".concat(graphContainerHeight, \"px\");\n containerPosition = {\n top: 0,\n right: 0\n };\n containerPosition.right += gLeft + offsetX;\n containerPosition.top += gTop + offsetY;\n break;\n case 'bottom':\n maxWidth = \"\".concat(graphContainerWidth, \"px\");\n containerPosition = {\n bottom: 0,\n left: 0\n };\n containerPosition.left += gLeft + offsetX;\n containerPosition.bottom += gTop + offsetY;\n break;\n case 'top':\n maxWidth = \"\".concat(graphContainerWidth, \"px\");\n case 'left':\n maxHeight = \"\".concat(graphContainerHeight, \"px\");\n default:\n containerPosition = {\n top: 0,\n left: 0\n };\n containerPosition.left += gLeft + offsetX;\n containerPosition.top += gTop + offsetY;\n break;\n }\n Object.keys(containerPosition).forEach(function (key) {\n containerPosition[key] = \"\".concat(containerPosition[key], \"px\");\n });\n var container = createDom(\"
\"));\n modifyCSS(container, __assign(__assign({\n position: 'absolute',\n display: position === 'top' || position === 'bottom' ? 'inline-flex' : 'unset',\n width: isNumber(width) ? \"\".concat(width, \"px\") : width,\n height: isNumber(height) ? \"\".concat(height, \"px\") : height,\n maxHeight: maxHeight,\n maxWidth: maxWidth,\n overflow: 'scroll'\n }, containerPosition), otherStyle));\n graphContainer.appendChild(container);\n container.addEventListener('scroll', function (e) {\n _this.updateLinks();\n });\n return container;\n };\n Annotation.prototype.resizeCanvas = function (self) {\n // 仅在 resize 完成后进行调整\n clearTimeout(self.resizeTimer);\n self.resizeTimer = setTimeout(function () {\n if (!self || self.destroyed) return;\n var cBBox = self.get('container').getBoundingClientRect();\n var newWidth = cBBox.right - cBBox.left;\n var newHeight = cBBox.bottom - cBBox.top;\n self.get('canvas').changeSize(newWidth, newHeight);\n self.updateOutsideCards(self);\n }, 250);\n };\n /**\n * 更新超出视口范围的卡片位置\n * @param selfObj 当前 annotation 插件对象。外部调用不需要传入该参数\n */\n Annotation.prototype.updateOutsideCards = function (selfObj) {\n var self = selfObj || this;\n var cardInfoMap = self.get('cardInfoMap') || {};\n var graph = self.get('graph');\n var graphLeftTopCanvas = graph.getPointByCanvas(0, 0);\n var graphRightBottomCanvas = graph.getPointByCanvas(graph.getWidth(), graph.getHeight());\n var _a = graph.getClientByPoint(graphLeftTopCanvas.x, graphLeftTopCanvas.y),\n graphLeft = _a.x,\n graphTop = _a.y;\n var _b = graph.getClientByPoint(graphRightBottomCanvas.x, graphRightBottomCanvas.y),\n graphRight = _b.x,\n graphBottom = _b.y;\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var card = cardInfo.card;\n if (!card) return;\n var style = card.style;\n var left = px2Num(style.left);\n var top = px2Num(style.top);\n var _a = card.getBoundingClientRect(),\n width = _a.width,\n height = _a.height;\n var newLeft = left;\n var newTop = top;\n if (left + width > graphRight - graphLeft) {\n newLeft = graphRight - graphLeft - width;\n }\n if (left < 0) {\n newLeft = 0;\n }\n if (top + height > graphBottom - graphTop) {\n newTop = graphBottom - graphTop - height;\n }\n if (top < 0) {\n newTop = 0;\n }\n modifyCSS(card, {\n left: \"\".concat(newLeft, \"px\"),\n top: \"\".concat(newTop, \"px\")\n });\n });\n self.updateLinks();\n };\n Annotation.prototype.showAnnotation = function (evt) {\n if (this.destroyed) return;\n var item = evt.item;\n this.toggleAnnotation(item);\n };\n Annotation.prototype.hideCards = function () {\n var self = this;\n if (self.destroyed) return;\n var cardInfoMap = self.get('cardInfoMap') || {};\n Object.keys(cardInfoMap).forEach(function (itemId) {\n self.hideCard(itemId);\n });\n };\n Annotation.prototype.toggleAnnotation = function (item, cfg) {\n var _a, _b;\n if (cfg === void 0) {\n cfg = {};\n }\n var self = this;\n if (self.destroyed) return;\n var cardInfoMap = self.get('cardInfoMap') || {};\n var graph = self.get('graph');\n var container = self.get('container');\n var containerCfg = self.get('containerCfg');\n var _c = Object.assign({}, self.get('cardCfg') || {}, cfg),\n minHeight = _c.minHeight,\n minWidth = _c.minWidth,\n width = _c.width,\n height = _c.height,\n _d = _c.collapsed,\n collapsed = _d === void 0 ? false : _d,\n propsX = _c.x,\n propsY = _c.y,\n propsTitle = _c.title,\n propsContent = _c.content,\n maxTitleLength = _c.maxTitleLength,\n defaultBegin = _c.defaultBegin,\n otherCardCfg = __rest(_c, [\"minHeight\", \"minWidth\", \"width\", \"height\", \"collapsed\", \"x\", \"y\", \"title\", \"content\", \"maxTitleLength\", \"defaultBegin\"]);\n var linkGroup = self.get('linkGroup');\n var rows = this.get('rows') || [[]];\n var isCanvas = (_a = item.isCanvas) === null || _a === void 0 ? void 0 : _a.call(item);\n var itemId = isCanvas ? CANVAS_ANNOTATION_ID : item.getID();\n var _e = cardInfoMap[itemId] || {},\n card = _e.card,\n link = _e.link,\n x = _e.x,\n y = _e.y,\n title = _e.title,\n content = _e.content;\n var getTitle = this.get('getTitle');\n var getContent = this.get('getContent');\n var getContentPlaceholder = this.get('getContentPlaceholder') || function () {\n return '';\n };\n var getTitlePlaceHolder = this.get('getTitlePlaceHolder') || function () {\n return '';\n };\n var contentPlaceholder = getContentPlaceholder(item);\n var titlePlaceholder = getTitlePlaceHolder(item);\n var newCard = createDom(this.getDOMContent(__assign({\n itemId: itemId,\n collapsed: collapsed,\n title: ((_b = title || propsTitle || (getTitle === null || getTitle === void 0 ? void 0 : getTitle(item))) === null || _b === void 0 ? void 0 : _b.substr(0, maxTitleLength)) || titlePlaceholder,\n content: content || propsContent || (getContent === null || getContent === void 0 ? void 0 : getContent(item)) || contentPlaceholder\n }, otherCardCfg)));\n var minHeightPx = isNumber(minHeight) ? \"\".concat(minHeight, \"px\") : minHeight;\n modifyCSS(newCard, {\n minHeight: collapsed ? 'unset' : minHeightPx,\n minWidth: isNumber(minWidth) ? \"\".concat(minWidth, \"px\") : minWidth,\n height: height,\n width: width\n });\n var exist = !!card;\n if (exist) {\n // 移除相应连线\n link === null || link === void 0 ? void 0 : link.remove(true);\n // 替换原来的卡片\n container.replaceChild(newCard, card);\n } else {\n container.appendChild(newCard);\n }\n var containerBBox;\n if (!containerCfg) {\n containerBBox = container.getBoundingClientRect() || {};\n if (propsX !== undefined && propsY !== undefined) {\n // 使用配置的位置\n x = propsX;\n y = propsY;\n } else if (!exist && !isCanvas) {\n // 第一次创建,且无 conatiner,初始化位置\n var containerTop = containerBBox.top;\n var _f = defaultBegin || {},\n beginLeft = _f.left,\n _g = _f.right,\n propsBeginRight = _g === void 0 ? 16 : _g,\n _h = _f.top,\n propsBeginTop = _h === void 0 ? 8 : _h,\n beginBottom = _f.bottom;\n var beginRight = propsBeginRight;\n var beginTop = propsBeginTop;\n if (!isNaN(beginLeft)) {\n beginRight = container.scrollWidth - beginLeft;\n }\n if (!isNaN(beginBottom)) {\n beginTop = container.scrollHeight - beginBottom;\n }\n var cardWidth = isNumber(minWidth) ? minWidth : 100;\n x = container.scrollWidth - newCard.scrollWidth - (rows.length - 1) * cardWidth - beginRight;\n var currentRow = rows[rows.length - 1];\n var lastCardBBox = (currentRow[currentRow.length - 1] || {}).bbox;\n y = (lastCardBBox === null || lastCardBBox === void 0 ? void 0 : lastCardBBox.bottom) - containerTop || beginTop;\n }\n modifyCSS(newCard, {\n position: 'absolute',\n left: \"\".concat(x, \"px\"),\n top: \"\".concat(y, \"px\"),\n cusor: containerCfg ? 'unset' : 'move'\n });\n }\n this.bindListener(newCard, itemId);\n var cardBBox = newCard.getBoundingClientRect();\n if (!isCanvas) {\n // 创建相关连线\n var path = getPathItem2Card(item, cardBBox, graph, this.get('canvas'));\n var linkStyle = this.get('linkStyle');\n link = linkGroup.addShape('path', {\n attrs: __assign({\n lineWidth: 1,\n lineDash: [5, 5],\n stroke: '#ccc',\n path: path\n }, linkStyle)\n });\n }\n cardInfoMap[itemId] = __assign(__assign({}, cardInfoMap[itemId] || {}), {\n id: itemId,\n collapsed: collapsed,\n card: newCard,\n link: link,\n x: x,\n y: y,\n cardBBox: cardBBox,\n content: content || propsContent,\n title: title || propsTitle,\n contentPlaceholder: contentPlaceholder,\n titlePlaceholder: titlePlaceholder,\n isCanvas: isCanvas\n });\n self.set('cardInfoMap', cardInfoMap);\n if (containerCfg) {\n this.updateCardPositionsInConatainer();\n this.updateLinks();\n } else {\n var hasPropsPosition = !isNaN(propsX) && !isNaN(propsY);\n if (!exist && !isCanvas && !hasPropsPosition) {\n // 没有 container、新增 card 时,记录当前列中最下方位置,方便换行\n var _j = containerBBox.bottom,\n containerBottom = _j === void 0 ? 0 : _j,\n containerTop = containerBBox.top;\n rows[rows.length - 1].push({\n id: itemId,\n bbox: cardBBox\n });\n if (cardBBox.top > containerBottom - containerTop - cardBBox.height - 16) rows.push([]);\n this.set('rows', rows);\n }\n }\n this.updateCardSize(itemId);\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfoMap[itemId], exist ? 'update' : 'create');\n };\n Annotation.prototype.updateCardPositionsInConatainer = function () {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var container = this.get('container');\n var position = this.get('containerCfg').position;\n var containerWidth = container.getBoundingClientRect().width;\n var computeStyle = getComputedStyle(container);\n var sidePadding = px2Num(computeStyle['paddingLeft']) + px2Num(computeStyle['paddingRight']);\n containerWidth -= sidePadding;\n Object.values(cardInfoMap).forEach(function (_a) {\n var card = _a.card;\n var cardWidth = card.getBoundingClientRect().width;\n switch (position) {\n case 'right':\n modifyCSS(card, {\n marginLeft: containerWidth ? \"\".concat(containerWidth - cardWidth, \"px\") : '0px'\n });\n break;\n case 'top':\n case 'bottom':\n modifyCSS(card, {\n marginLeft: '8px'\n });\n default:\n break;\n }\n });\n };\n Annotation.prototype.handleExpandCollapseCard = function (id) {\n if (this.destroyed) return;\n var graph = this.get('graph');\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var collapsed = cardInfoMap[id].collapsed;\n var item = graph.findById(id);\n if (!item) return;\n var collapseType = this.get('cardCfg').collapseType;\n if (collapseType === 'hide' && !collapsed) {\n // collapse 行为被配置为隐藏\n this.hideCard(id);\n } else {\n this.toggleAnnotation(item, {\n collapsed: !collapsed\n });\n }\n cardInfoMap[id] = __assign(__assign({}, cardInfoMap[id]), {\n collapsed: !collapsed\n });\n };\n /**\n * 隐藏标注卡片,下次打开还保留隐藏前的配置,包括文本内容、位置等\n * @param id 卡片 id,即元素(节点/边)的 id\n * @returns\n */\n Annotation.prototype.hideCard = function (id) {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap || !cardInfoMap[id]) return;\n var _a = cardInfoMap[id],\n card = _a.card,\n link = _a.link;\n modifyCSS(card, {\n display: 'none'\n });\n link === null || link === void 0 ? void 0 : link.hide();\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange(cardInfoMap[id], 'hide');\n };\n /**\n * 移除标注卡片,下一次生成时将被初始化\n * @param id 卡片 id,即元素(节点/边)的 id\n * @returns\n */\n Annotation.prototype.removeCard = function (id) {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var cardInfo = cardInfoMap[id];\n var card = cardInfo.card,\n link = cardInfo.link;\n var container = this.get('container');\n container.removeChild(card);\n link === null || link === void 0 ? void 0 : link.remove(true);\n delete cardInfoMap[id];\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange(cardInfo, 'remove');\n };\n Annotation.prototype.bindListener = function (card, itemId) {\n var _this = this;\n if (this.destroyed) return;\n card.addEventListener('mousemove', function (e) {\n // icon 的鼠标进入监听,方便外部加 tooltip\n var iconType;\n if (e.target.className === 'g6-annotation-collapse') {\n iconType = 'collapse';\n } else if (e.target.className === 'g6-annotation-expand') {\n iconType = 'expand';\n } else if (e.target.className === 'g6-annotation-close') {\n iconType = 'close';\n }\n if (iconType) {\n var _a = _this.get('cardCfg').onMouseEnterIcon,\n onMouseEnterIcon = _a === void 0 ? function () {} : _a;\n onMouseEnterIcon(e, itemId, iconType);\n }\n });\n card.addEventListener('mouseout', function (e) {\n // icon 的鼠标移出监听,方便外部加 tooltip\n var iconType;\n if (e.target.className === 'g6-annotation-collapse') {\n iconType = 'collapse';\n } else if (e.target.className === 'g6-annotation-expand') {\n iconType = 'expand';\n } else if (e.target.className === 'g6-annotation-close') {\n iconType = 'close';\n }\n if (iconType) {\n var _a = _this.get('cardCfg').onMouseLeaveIcon,\n onMouseLeaveIcon = _a === void 0 ? function () {} : _a;\n onMouseLeaveIcon(e, itemId, iconType);\n }\n });\n // mouseenter and mouseleave to highlight the corresponding items\n card.addEventListener('mouseenter', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = _this.get('graph');\n var item = graph.findById(itemId);\n if (item) {\n var itemHighlightState = _this.get('itemHighlightState');\n graph.setItemState(item, itemHighlightState, true);\n }\n var link = cardInfoMap[itemId].link;\n if (link) {\n var linkHighlightStyle = _this.get('linkHighlightStyle') || {};\n link.attr(linkHighlightStyle);\n }\n });\n card.addEventListener('mouseleave', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = _this.get('graph');\n var item = graph.findById(itemId);\n if (item) {\n var itemHighlightState = _this.get('itemHighlightState');\n graph.setItemState(item, itemHighlightState, false);\n }\n var link = cardInfoMap[itemId].link;\n if (link) {\n var linkHighlightStyle = _this.get('linkHighlightStyle') || {};\n Object.keys(linkHighlightStyle).forEach(function (key) {\n link.attr(key, undefined);\n link.attr(key, undefined);\n });\n var linkStyle = _this.get('linkStyle');\n link.attr(linkStyle);\n }\n });\n card.addEventListener('click', function (e) {\n var onClickIcon = (_this.get('cardCfg') || {}).onClickIcon;\n if (e.target.className === 'g6-annotation-collapse' || e.target.className === 'g6-annotation-expand') {\n // collapse & expand\n var collapseType = _this.get('cardCfg').collapseType;\n if (collapseType === 'hide') {\n _this.hideCard(itemId);\n } else {\n _this.handleExpandCollapseCard(itemId);\n }\n onClickIcon === null || onClickIcon === void 0 ? void 0 : onClickIcon(e, itemId, e.target.className === 'g6-annotation-collapse' ? 'collapse' : 'expand');\n } else if (e.target.className === 'g6-annotation-close') {\n // close\n var closeType = _this.get('cardCfg').closeType;\n if (closeType === 'remove') {\n _this.removeCard(itemId);\n } else {\n _this.hideCard(itemId);\n }\n onClickIcon === null || onClickIcon === void 0 ? void 0 : onClickIcon(e, itemId, 'close');\n }\n });\n // dblclick to edit the title and content text\n var editable = this.get('editable');\n if (editable) {\n card.addEventListener('dblclick', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n var _a = (_this.get('cardCfg') || {}).maxTitleLength,\n maxTitleLength = _a === void 0 ? 20 : _a;\n if (!cardInfoMap) return;\n var target = e.target;\n var targetClass = target.className;\n if (targetClass !== 'g6-annotation-title' && targetClass !== 'g6-annotation-content') return;\n var _b = targetClass === 'g6-annotation-title' ? target.getBoundingClientRect() : target.parentNode.getBoundingClientRect(),\n width = _b.width,\n height = _b.height;\n var computeStyle = getComputedStyle(target);\n var inputTag = targetClass === 'g6-annotation-title' ? 'input' : 'textarea';\n var input = createDom(\"<\".concat(inputTag, \" class=\\\"\").concat(targetClass, \"-input\\\" type=\\\"textarea\\\" style=\\\"width:\").concat(width, \"px; height: \").concat(height, \"px; min-width: 16px;\\\"/>\"));\n var inputWrapper = createDom(\"
\"));\n inputWrapper.appendChild(input);\n target.parentNode.replaceChild(inputWrapper, target);\n var cardInfo = cardInfoMap[itemId];\n var contentPlaceholder = cardInfo.contentPlaceholder,\n titlePlaceholder = cardInfo.titlePlaceholder,\n content = cardInfo.content,\n title = cardInfo.title;\n var value = content;\n if (targetClass === 'g6-annotation-title') {\n input.name = 'title';\n input.maxLength = maxTitleLength;\n value = title;\n } else {\n input.name = 'content';\n }\n if (value) {\n input.innerHTML = target.innerHTML;\n input.value = target.innerHTML;\n } else {\n input.placeholder = targetClass === 'g6-annotation-title' ? titlePlaceholder : contentPlaceholder;\n }\n input.focus();\n input.addEventListener('blur', function (blurEvt) {\n if (input.value) {\n target.innerHTML = input.value;\n cardInfo[input.name || 'title'] = input.value;\n }\n inputWrapper.parentNode.replaceChild(target, inputWrapper);\n _this.updateCardSize(itemId);\n var onAnnotationChange = _this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfo, 'update');\n });\n });\n }\n var unmovableClasses = ['g6-annotation-title', 'g6-annotation-content', 'g6-annotation-title-input', 'g6-annotation-content-input'];\n card.draggable = true;\n card.addEventListener('dragstart', function (e) {\n var targetClass = e.target.className;\n if (unmovableClasses.includes(targetClass)) return;\n var style = card.style;\n _this.set('dragging', {\n card: card,\n x: e.clientX,\n y: e.clientY,\n left: px2Num(style.left),\n top: px2Num(style.top)\n });\n });\n card.addEventListener('drag', function (e) {\n e.preventDefault();\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var clientX = e.clientX,\n clientY = e.clientY;\n var dragging = _this.get('dragging');\n if (isNaN(clientX) || isNaN(clientY) || !dragging) return;\n var x = dragging.x,\n y = dragging.y,\n left = dragging.left,\n top = dragging.top,\n draggingCard = dragging.card;\n var dx = clientX - x;\n var dy = clientY - y;\n left += dx;\n top += dy;\n var graph = _this.get('graph');\n var graphLeftTopCanvas = graph.getPointByCanvas(0, 0);\n var graphRightBottomCanvas = graph.getPointByCanvas(graph.getWidth(), graph.getHeight());\n var _a = graph.getClientByPoint(graphLeftTopCanvas.x, graphLeftTopCanvas.y),\n graphLeft = _a.x,\n graphTop = _a.y;\n var _b = graph.getClientByPoint(graphRightBottomCanvas.x, graphRightBottomCanvas.y),\n graphRight = _b.x,\n graphBottom = _b.y;\n var cardBBox = draggingCard.getBoundingClientRect();\n var cardWidth = cardBBox.right - cardBBox.left;\n var cardHeight = cardBBox.bottom - cardBBox.top;\n if (left > graphRight - graphLeft - cardWidth && dx > 0 || left < 0 && dx < 0) left -= dx;\n if (top > graphBottom - graphTop - cardHeight && dy > 0 || top < 0 && dy < 0) top -= dy;\n // 更新卡片位置\n modifyCSS(draggingCard, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\"),\n visibility: 'hidden'\n });\n x = clientX;\n y = clientY;\n // 更新连线位置\n var link = (cardInfoMap[itemId] || {}).link;\n if (link) {\n var item = graph.findById(itemId);\n link.attr('path', getPathItem2Card(item, cardBBox, graph, _this.get('canvas')));\n }\n _this.set('dragging', {\n x: x,\n y: y,\n left: left,\n top: top,\n card: draggingCard\n });\n });\n var dragendListener = function dragendListener(e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var dragging = _this.get('dragging');\n if (dragging) {\n // = dragend\n var left = dragging.left,\n top_1 = dragging.top,\n draggingCard = dragging.card;\n cardInfoMap[itemId].x = left;\n cardInfoMap[itemId].y = top_1;\n modifyCSS(draggingCard, {\n visibility: 'visible'\n });\n _this.set('dragging', false);\n // 移动过的卡片从 rows 中移除,避免影响后续卡片出生位置\n var rows = _this.get(\"rows\");\n rows === null || rows === void 0 ? void 0 : rows.forEach(function (rowItems) {\n for (var i = rowItems.length - 1; i >= 0; i--) {\n if (rowItems[i].id === itemId) rowItems.splice(i, 1);\n }\n });\n var onAnnotationChange = _this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfoMap[itemId], 'update');\n }\n };\n card.addEventListener('dragend', dragendListener);\n };\n Annotation.prototype.updateCardSize = function (id) {\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var card = cardInfoMap[id].card;\n var width = card.getBoundingClientRect().width;\n var title = card.getElementsByClassName('g6-annotation-title')[0];\n if (title) {\n var computeStyle = getComputedStyle(title);\n var sideMargin = px2Num(computeStyle['marginLeft']);\n var titleWidth = title.getBoundingClientRect().width;\n modifyCSS(title, {\n marginRight: \"\".concat(width - sideMargin - 24 - 16 - titleWidth, \"px\")\n });\n }\n };\n Annotation.prototype.updateLink = function (_a) {\n var item = _a.item;\n if (!item) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var canvas = this.get('canvas');\n var graph = this.get('graph');\n var id = item.getID();\n var _b = cardInfoMap[id] || {},\n link = _b.link,\n card = _b.card;\n if (link) {\n var path = getPathItem2Card(item, card.getBoundingClientRect(), graph, canvas);\n link.attr('path', path);\n }\n };\n Annotation.prototype.updateLinks = function () {\n var _this = this;\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var id = cardInfo.id;\n var item = graph.findById(id);\n _this.updateLink({\n item: item\n });\n });\n };\n Annotation.prototype.onGraphDataChange = function () {\n var _this = this;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n Object.values(cardInfoMap).forEach(function (info) {\n var id = info.id,\n card = info.card,\n isCanvas = info.isCanvas;\n if (!card || isCanvas || card.style.display === 'none') return;\n var item = graph.findById(id);\n if (item && item.isVisible()) {\n _this.toggleAnnotation(item);\n } else {\n _this.hideCard(id);\n }\n });\n };\n Annotation.prototype.onGraphItemVisibilityChange = function (_a) {\n var item = _a.item,\n visible = _a.visible;\n if (!item || item.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var id = item.getID();\n if (!cardInfoMap[id]) return;\n if (!visible) this.hideCard(id);\n };\n Annotation.prototype.saveData = function (saveClosed) {\n if (saveClosed === void 0) {\n saveClosed = false;\n }\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n var getTitle = this.get('getTitle');\n var getContent = this.get('getContent');\n var data = [];\n Object.values(cardInfoMap).forEach(function (info) {\n var title = info.title,\n content = info.content,\n x = info.x,\n y = info.y,\n id = info.id,\n collapsed = info.collapsed,\n card = info.card;\n if (card && card.style.display === 'none' && !saveClosed) return;\n var item = graph.findById(id) || graph.get('canvas');\n data.push({\n id: id,\n x: x,\n y: y,\n collapsed: collapsed,\n title: title || (getTitle === null || getTitle === void 0 ? void 0 : getTitle(item)),\n content: content || (getContent === null || getContent === void 0 ? void 0 : getContent(item)),\n visible: card && card.style.display !== 'none'\n });\n });\n return data;\n };\n Annotation.prototype.readData = function (data) {\n var _this = this;\n var graph = this.get('graph');\n data.forEach(function (info) {\n var id = info.id,\n x = info.x,\n y = info.y,\n title = info.title,\n content = info.content,\n collapsed = info.collapsed,\n visible = info.visible;\n var item = graph.findById(id);\n if (!item && id === CANVAS_ANNOTATION_ID) {\n item = graph.get('canvas');\n }\n if (!item) {\n var cardInfoMap = _this.get('cardInfoMap') || {};\n cardInfoMap[id] = info;\n _this.set('cardInfoMap', cardInfoMap);\n return;\n }\n _this.toggleAnnotation(item, {\n x: x,\n y: y,\n title: title,\n content: content,\n collapsed: collapsed\n });\n if (!visible) _this.hideCard(id);\n });\n };\n /**\n * Clear the cards and links\n */\n Annotation.prototype.clear = function () {\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var container = this.get('container');\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var card = cardInfo.card,\n link = cardInfo.link;\n container.removeChild(card);\n link === null || link === void 0 ? void 0 : link.remove(true);\n });\n this.set('cardInfoMap', {});\n };\n /**\n * Destroy the component\n */\n Annotation.prototype.destroy = function () {\n var _a;\n this.clear();\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.destroy();\n var graph = this.get('graph');\n if (!graph || graph.destroyed) return;\n if (this.get('containerCfg')) {\n graph.getContainer().removeChild(this.get('container'));\n }\n this.destroyed = true;\n };\n return Annotation;\n}(Base);\nexport default Annotation;\nvar getPath = function getPath(startPoints, endPoints) {\n var startPoint,\n endPoint,\n posKeys,\n distance = Infinity;\n Object.keys(startPoints).forEach(function (skey) {\n var spos = startPoints[skey];\n Object.keys(endPoints).forEach(function (ekey) {\n var epos = endPoints[ekey];\n var xdist = spos.x - epos.x;\n var ydist = spos.y - epos.y;\n var dist = xdist * xdist + ydist * ydist;\n if (distance > dist) {\n distance = dist;\n startPoint = spos;\n endPoint = epos;\n posKeys = [skey, ekey];\n }\n });\n });\n var curveOffset = 20;\n var controlPoint = Util.getControlPoint(startPoint, endPoint, 0.5, curveOffset);\n return [['M', startPoint.x, startPoint.y], ['Q', controlPoint.x, controlPoint.y, endPoint.x, endPoint.y]];\n};\nvar getPathItem2Card = function getPathItem2Card(item, cardBBox, graph, annotationCanvas) {\n var _a;\n var itemLinkPoints;\n var itemType = item.getType();\n if (itemType === 'edge') {\n itemLinkPoints = [item.getKeyShape().getPoint(0.5)];\n } else {\n var _b = (_a = item.getKeyShape) === null || _a === void 0 ? void 0 : _a.call(item).getBBox(),\n minX = _b.minX,\n minY = _b.minY,\n maxX = _b.maxX,\n maxY = _b.maxY;\n var _c = item.getModel(),\n x = _c.x,\n y = _c.y;\n minX += x;\n minY += y;\n maxX += x;\n maxY += y;\n itemLinkPoints = {\n left: {\n x: minX,\n y: (minY + maxY) / 2\n },\n right: {\n x: maxX,\n y: (minY + maxY) / 2\n },\n top: {\n x: (minX + maxX) / 2,\n y: minY\n },\n bottom: {\n x: (minX + maxX) / 2,\n y: maxY\n }\n };\n }\n // 由 graph 所在 canvas 转换为 Client 坐标系,然后再由 annotation 所在 canvas 转换为绘制坐标系\n Object.keys(itemLinkPoints).forEach(function (key) {\n var _a = itemLinkPoints[key],\n x = _a.x,\n y = _a.y;\n var clientPos = graph.getClientByPoint(x, y);\n itemLinkPoints[key] = annotationCanvas.getPointByClient(clientPos.x, clientPos.y);\n });\n var _d = cardBBox.top,\n cardTop = _d === void 0 ? 0 : _d,\n _e = cardBBox.left,\n cardLeft = _e === void 0 ? 0 : _e,\n _f = cardBBox.right,\n cardRight = _f === void 0 ? 0 : _f,\n _g = cardBBox.bottom,\n cardBottom = _g === void 0 ? 0 : _g;\n var cardLinkPoints = {\n left: annotationCanvas.getPointByClient(cardLeft, (cardTop + cardBottom) / 2),\n right: annotationCanvas.getPointByClient(cardRight, (cardTop + cardBottom) / 2),\n top: annotationCanvas.getPointByClient((cardLeft + cardRight) / 2, cardTop),\n bottom: annotationCanvas.getPointByClient((cardLeft + cardRight) / 2, cardBottom)\n };\n return getPath(itemLinkPoints, cardLinkPoints);\n};\nvar px2Num = function px2Num(px) {\n return Number(px.replace(/\\s+|px/gi, \"\")) || 0;\n};","import Grid from './grid';\nimport Menu from './menu';\nimport Minimap from './minimap';\nimport Bundling from './bundling';\nimport Fisheye from './fisheye';\nimport ToolBar from './toolBar';\nimport Tooltip from './tooltip';\nimport TimeBar from './timeBar';\nimport ImageMinimap from './imageMinimap';\nimport EdgeFilterLens from './edgeFilterLens';\nimport SnapLine from './snapline';\nimport PluginBase from './base';\nimport Legend from './legend';\nimport Annotation from './annotation';\nexport { PluginBase, Menu, Grid, Minimap, Bundling, ToolBar, Tooltip, Fisheye, TimeBar, ImageMinimap, EdgeFilterLens, SnapLine, Legend, Annotation };\nvar Plugin = {\n PluginBase: PluginBase,\n Menu: Menu,\n Grid: Grid,\n Minimap: Minimap,\n Bundling: Bundling,\n ToolBar: ToolBar,\n Tooltip: Tooltip,\n Fisheye: Fisheye,\n TimeBar: TimeBar,\n ImageMinimap: ImageMinimap,\n EdgeFilterLens: EdgeFilterLens,\n SnapLine: SnapLine,\n Legend: Legend,\n Annotation: Annotation\n};\nexport default Plugin;","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\n// 带有图标的圆,可用于拓扑图中\nregisterNode('circle', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n defaultIcon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var icon = deepMix({}, defaultIcon, cfg.icon);\n var name = \"\".concat(this.type, \"-keyShape\");\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: name,\n name: name,\n draggable: true\n });\n group['shapeMap'][name] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n var iconName = \"\".concat(this.type, \"-icon\");\n if (text) {\n group['shapeMap'][iconName] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: iconName,\n name: iconName,\n draggable: true\n });\n } else {\n group['shapeMap'][iconName] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: iconName,\n name: iconName,\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var linkPoints = (this.mergeStyle || this.getOptions(cfg)).linkPoints;\n if (!linkPoints) return;\n var _a = linkPoints || {},\n top = _a.top,\n left = _a.left,\n right = _a.right,\n bottom = _a.bottom,\n markSize = _a.size,\n markR = _a.r,\n markStyle = __rest(_a, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n if (left) {\n // left circle\n var name_1 = 'link-point-left';\n group['shapeMap'][name_1] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -r,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: name_1,\n name: name_1,\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n var name_2 = 'link-point-right';\n group['shapeMap'][name_2] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: r,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: name_2,\n name: name_2,\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n var name_3 = 'link-point-top';\n group['shapeMap'][name_3] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -r,\n r: markSize / 2 || markR || 5\n }),\n className: name_3,\n name: name_3,\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n var name_4 = 'link-point-bottom';\n group['shapeMap'][name_4] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: r,\n r: markSize / 2 || markR || 5\n }),\n className: name_4,\n name: name_4,\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = deepMix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n r: r\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n var size = this.getSize(cfg);\n var style = __assign({}, cfg.style);\n if (cfg.style.stroke === undefined && cfg.color) {\n style.stroke = cfg.color;\n }\n if (cfg.style.r === undefined && !isNaN(size[0])) {\n style.r = size[0] / 2;\n }\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { mix } from '@antv/util';\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nregisterNode('rect', {\n // 自定义节点时的配置\n options: {\n size: [100, 30],\n style: {\n radius: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'rect',\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var size = this.getSize(cfg);\n var keyShape = item.get('keyShape');\n if (!cfg.size) {\n size[0] = keyShape.attr('width') || defaultStyle.width;\n size[1] = keyShape.attr('height') || defaultStyle.height;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n x: -size[0] / 2,\n y: -size[1] / 2,\n width: size[0],\n height: size[1]\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, false, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n/**\n * 基本的椭圆,可以添加文本,默认文本居中\n */\nregisterNode('ellipse', {\n // 自定义节点时的配置\n options: {\n size: [80, 40],\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'ellipse',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('ellipse', {\n attrs: style,\n className: 'ellipse-keyShape',\n name: 'ellipse-keyShape',\n draggable: true\n });\n group['shapeMap']['ellipse-keyShape'] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var rx = size[0] / 2;\n var ry = size[1] / 2;\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -rx,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: rx,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -ry,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: ry,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var rx = size[0] / 2;\n var ry = size[1] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n rx: rx,\n ry: ry\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var size = this.getSize(cfg);\n var strokeStyle = {\n stroke: cfg.color,\n rx: size[0] / 2,\n ry: size[1] / 2\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 菱形shape\nregisterNode('diamond', {\n // 自定义节点时的配置\n options: {\n size: [80, 80],\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'diamond',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -w / 2,\n y: -h / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n getPath: function getPath(cfg) {\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var path = [['M', 0, -height / 2], ['L', width / 2, 0], ['L', 0, height / 2], ['L', -width / 2, 0], ['Z'] // 封闭\n ];\n\n return path;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 三角形\nregisterNode('triangle', {\n // 自定义节点时的配置\n options: {\n size: 40,\n direction: 'up',\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize\n },\n offset: 15\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20,\n offset: 6\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'triangle',\n // 文本位置\n labelPosition: 'bottom',\n drawShape: function drawShape(cfg, group) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.icon,\n icon = _b === void 0 ? {} : _b,\n defaultDirection = _a.direction;\n var style = this.getShapeStyle(cfg);\n var direction = cfg.direction || defaultDirection;\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n offset = icon.offset,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n var iconW = -w / 2;\n var iconH = -h / 2;\n if (direction === 'up' || direction === 'down') {\n iconH += offset;\n }\n if (direction === 'left' || direction === 'right') {\n iconW += offset;\n }\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: iconW,\n y: iconH\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.linkPoints,\n linkPoints = _b === void 0 ? {} : _b,\n defaultDirection = _a.direction;\n var direction = cfg.direction || defaultDirection;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var len = size[0];\n if (left) {\n // up down left right 四个方向的坐标均不相同\n var leftPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n leftPos = [-r, diffY];\n } else if (direction === 'down') {\n leftPos = [-r, -diffY];\n } else if (direction === 'left') {\n leftPos = [-r, r - diffY];\n }\n if (leftPos) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: leftPos[0],\n y: leftPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left'\n });\n }\n }\n if (right) {\n // right circle\n // up down left right 四个方向的坐标均不相同\n var rightPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n rightPos = [r, diffY];\n } else if (direction === 'down') {\n rightPos = [r, -diffY];\n } else if (direction === 'right') {\n rightPos = [r, r - diffY];\n }\n if (rightPos) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: rightPos[0],\n y: rightPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right'\n });\n }\n }\n if (top) {\n // up down left right 四个方向的坐标均不相同\n var topPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n topPos = [r - diffY, -diffY];\n } else if (direction === 'left') {\n topPos = [r, -diffY];\n } else if (direction === 'right') {\n topPos = [-r, -diffY];\n }\n if (topPos) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: topPos[0],\n y: topPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top'\n });\n }\n }\n if (bottom) {\n // up down left right 四个方向的坐标均不相同\n var bottomPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'down') {\n bottomPos = [-r + diffY, diffY];\n } else if (direction === 'left') {\n bottomPos = [r, diffY];\n } else if (direction === 'right') {\n bottomPos = [-r, diffY];\n }\n if (bottomPos) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: bottomPos[0],\n y: bottomPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom'\n });\n }\n }\n },\n getPath: function getPath(cfg) {\n var defaultDirection = (this.mergeStyle || this.getOptions(cfg)).direction;\n var direction = cfg.direction || defaultDirection;\n var size = this.getSize(cfg);\n var len = size[0];\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n var path = [['M', -r, diffY], ['L', 0, -diffY], ['L', r, diffY], ['Z'] // 封闭\n ];\n\n if (direction === 'down') {\n path = [['M', -r, -diffY], ['L', r, -diffY], ['L', 0, diffY], ['Z'] // 封闭\n ];\n } else if (direction === 'left') {\n path = [['M', -r, r - diffY], ['L', r, -r], ['L', r, r], ['Z'] // 封闭\n ];\n } else if (direction === 'right') {\n path = [['M', r, r - diffY], ['L', -r, r], ['L', -r, -r], ['Z'] // 封闭\n ];\n }\n\n return path;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var _a = this.getOptions({}),\n defaultLinkPoints = _a.linkPoints,\n defaultDirection = _a.direction;\n var direction = cfg.direction || defaultDirection;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markBottom = group['shapeMap']['link-point-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-bottom';\n });\n var currentLinkPoints = defaultLinkPoints;\n var existLinkPoint = markLeft || markRight || markTop || markBottom;\n if (existLinkPoint) {\n currentLinkPoints = existLinkPoint.attr();\n }\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _b = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n bottom: undefined\n },\n left = _b.left,\n right = _b.right,\n top = _b.top,\n bottom = _b.bottom;\n var size = this.getSize(cfg);\n var len = size[0];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n var leftPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n leftPos = [-r, diffY];\n } else if (direction === 'down') {\n leftPos = [-r, -diffY];\n } else if (direction === 'left') {\n leftPos = [-r, r - diffY];\n }\n if (leftPos) {\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: leftPos[0],\n y: leftPos[1]\n }));\n }\n } else if (left) {\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: leftPos[0],\n y: leftPos[1]\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n }\n var rightPos = null;\n if (direction === 'up') {\n rightPos = [r, diffY];\n } else if (direction === 'down') {\n rightPos = [r, -diffY];\n } else if (direction === 'right') {\n rightPos = [r, r - diffY];\n }\n if (rightPos) {\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n } else {\n markRight.attr(__assign(__assign({}, styles), {\n x: rightPos[0],\n y: rightPos[1]\n }));\n }\n } else if (right) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: rightPos[0],\n y: rightPos[1]\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n }\n var topPos = null;\n if (direction === 'up') {\n topPos = [r - diffY, -diffY];\n } else if (direction === 'left') {\n topPos = [r, -diffY];\n } else if (direction === 'right') {\n topPos = [-r, -diffY];\n }\n if (topPos) {\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n } else {\n // top circle\n markTop.attr(__assign(__assign({}, styles), {\n x: topPos[0],\n y: topPos[1]\n }));\n }\n } else if (top) {\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: topPos[0],\n y: topPos[1]\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n }\n var bottomPos = null;\n if (direction === 'down') {\n bottomPos = [-r + diffY, diffY];\n } else if (direction === 'left') {\n bottomPos = [r, diffY];\n } else if (direction === 'right') {\n bottomPos = [-r, diffY];\n }\n if (bottomPos) {\n if (markBottom) {\n if (!bottom && bottom !== undefined) {\n markBottom.remove();\n delete group['shapeMap']['link-point-bottom'];\n } else {\n markBottom.attr(__assign(__assign({}, styles), {\n x: bottomPos[0],\n y: bottomPos[1]\n }));\n }\n } else if (bottom) {\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: bottomPos[0],\n y: bottomPos[1]\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n }\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { mix, isString, deepMix } from '@antv/util';\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nregisterNode('modelRect', {\n // 自定义节点时的配置\n options: {\n size: [185, 70],\n style: {\n radius: 5,\n stroke: '#69c0ff',\n fill: '#ffffff',\n lineWidth: Global.defaultNode.style.lineWidth,\n fillOpacity: 1\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: '#595959',\n fontSize: 14,\n fontFamily: Global.windowFontFamily\n },\n offset: 30 // 距离左侧的 offset,没有设置 y 轴上移动的配置\n },\n\n descriptionCfg: {\n style: {\n fontSize: 12,\n fill: '#bfbfbf',\n fontFamily: Global.windowFontFamily\n },\n paddingTop: 0\n },\n preRect: {\n show: true,\n width: 4,\n fill: '#40a9ff',\n radius: 2\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: 10,\n lineWidth: 1,\n fill: '#72CC4A',\n stroke: '#72CC4A'\n },\n // 节点中icon配置\n logoIcon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: true,\n x: 0,\n y: 0,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/basement_prod/4f81893c-1806-4de4-aff3-9a6b266bc8a2.svg',\n width: 16,\n height: 16,\n // 用于调整图标的左右位置\n offset: 0\n },\n // 节点中表示状态的icon配置\n stateIcon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: true,\n x: 0,\n y: 0,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/basement_prod/300a2523-67e0-4cbf-9d4a-67c077b40395.svg',\n width: 16,\n height: 16,\n // 用于调整图标的左右位置\n offset: -5\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]]\n },\n shapeType: 'modelRect',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).preRect,\n preRect = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var preRectShow = preRect.show,\n preRectStyle = __rest(preRect, [\"show\"]);\n if (preRectShow) {\n group['shapeMap']['pre-rect'] = group.addShape('rect', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2,\n height: height\n }, preRectStyle),\n className: 'pre-rect',\n name: 'pre-rect',\n draggable: true\n });\n }\n this.drawLogoIcon(cfg, group);\n this.drawStateIcon(cfg, group);\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制模型矩形左边的logo图标\n * @param {Object} cfg 数据配置项\n * @param {Group} group Group实例\n */\n drawLogoIcon: function drawLogoIcon(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).logoIcon,\n logoIcon = _a === void 0 ? {} : _a;\n var size = this.getSize(cfg);\n var width = size[0];\n if (logoIcon.show) {\n var w = logoIcon.width,\n h = logoIcon.height,\n x = logoIcon.x,\n y = logoIcon.y,\n offset = logoIcon.offset,\n text = logoIcon.text,\n logoIconStyle = __rest(logoIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\", \"text\"]);\n if (text) {\n group['shapeMap']['rect-logo-icon'] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, logoIconStyle),\n className: 'rect-logo-icon',\n name: 'rect-logo-icon',\n draggable: true\n });\n } else {\n group['shapeMap']['rect-logo-icon'] = group.addShape('image', {\n attrs: __assign(__assign({}, logoIconStyle), {\n x: x || -width / 2 + w + offset,\n y: y || -h / 2,\n width: w,\n height: h\n }),\n className: 'rect-logo-icon',\n name: 'rect-logo-icon',\n draggable: true\n });\n }\n }\n },\n /**\n * 绘制模型矩形右边的状态图标\n * @param {Object} cfg 数据配置项\n * @param {Group} group Group实例\n */\n drawStateIcon: function drawStateIcon(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).stateIcon,\n stateIcon = _a === void 0 ? {} : _a;\n var size = this.getSize(cfg);\n var width = size[0];\n if (stateIcon.show) {\n var w = stateIcon.width,\n h = stateIcon.height,\n x = stateIcon.x,\n y = stateIcon.y,\n offset = stateIcon.offset,\n text = stateIcon.text,\n iconStyle = __rest(stateIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\", \"text\"]);\n if (text) {\n group['shapeMap']['rect-state-icon'] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, iconStyle),\n className: 'rect-state-icon',\n name: 'rect-state-icon',\n draggable: true\n });\n } else {\n group['shapeMap']['rect-state-icon'] = group.addShape('image', {\n attrs: __assign(__assign({}, iconStyle), {\n x: x || width / 2 - w + offset,\n y: y || -h / 2,\n width: w,\n height: h\n }),\n className: 'rect-state-icon',\n name: 'rect-state-icon',\n draggable: true\n });\n }\n }\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n drawLabel: function drawLabel(cfg, group) {\n var _a = this.getOptions(cfg),\n _b = _a.labelCfg,\n labelCfg = _b === void 0 ? {} : _b,\n _c = _a.logoIcon,\n logoIcon = _c === void 0 ? {} : _c,\n _d = _a.descriptionCfg,\n descriptionCfg = _d === void 0 ? {} : _d;\n var size = this.getSize(cfg);\n var width = size[0];\n var label = null;\n var show = logoIcon.show,\n w = logoIcon.width;\n var offsetX = -width / 2 + labelCfg.offset;\n if (show) {\n offsetX = -width / 2 + w + labelCfg.offset;\n }\n var fontStyle = labelCfg.style;\n var descriptionStyle = descriptionCfg.style,\n descriptionPaddingTop = descriptionCfg.paddingTop;\n if (isString(cfg.description)) {\n label = group.addShape('text', {\n attrs: __assign(__assign({}, fontStyle), {\n x: offsetX,\n y: -5,\n text: cfg.label\n }),\n className: 'text-shape',\n name: 'text-shape',\n draggable: true,\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n group['shapeMap']['rect-description'] = group.addShape('text', {\n attrs: __assign(__assign({}, descriptionStyle), {\n x: offsetX,\n y: 17 + (descriptionPaddingTop || 0),\n text: cfg.description\n }),\n className: 'rect-description',\n name: 'rect-description',\n draggable: true,\n labelRelated: true\n });\n } else {\n label = group.addShape('text', {\n attrs: __assign(__assign({}, fontStyle), {\n x: offsetX,\n y: 7,\n text: cfg.label\n }),\n className: 'text-shape',\n name: 'text-shape',\n draggable: true,\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n }\n return label;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.style,\n style = _b === void 0 ? {} : _b,\n _c = _a.labelCfg,\n labelCfg = _c === void 0 ? {} : _c,\n _d = _a.descriptionCfg,\n descriptionCfg = _d === void 0 ? {} : _d;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign(__assign({}, style), {\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }));\n var group = item.getContainer();\n var logoIconShape = group['shapeMap']['rect-logo-icon'] || group.find(function (element) {\n return element.get('className') === 'rect-logo-icon';\n });\n var currentLogoIconAttr = logoIconShape ? logoIconShape.attr() : {};\n var logoIcon = mix({}, currentLogoIconAttr, cfg.logoIcon);\n var w = logoIcon.width;\n if (w === undefined) {\n w = this.options.logoIcon.width;\n }\n var show = cfg.logoIcon ? cfg.logoIcon.show : undefined;\n var offset = labelCfg.offset;\n var offsetX = -width / 2 + w + offset;\n if (!show && show !== undefined) {\n offsetX = -width / 2 + offset;\n }\n var label = group['shapeMap']['node-label'] || group.find(function (element) {\n return element.get('className') === 'node-label';\n });\n var description = group['shapeMap']['rect-description'] || group.find(function (element) {\n return element.get('className') === 'rect-description';\n });\n if (cfg.label) {\n if (!label) {\n group['shapeMap']['node-label'] = group.addShape('text', {\n attrs: __assign(__assign({}, labelCfg.style), {\n x: offsetX,\n y: cfg.description ? -5 : 7,\n text: cfg.label\n }),\n className: 'node-label',\n name: 'node-label',\n draggable: true,\n labelRelated: true\n });\n } else {\n var cfgStyle = cfg.labelCfg ? cfg.labelCfg.style : {};\n var labelStyle = mix({}, label.attr(), cfgStyle);\n if (cfg.label) labelStyle.text = cfg.label;\n labelStyle.x = offsetX;\n if (isString(cfg.description)) labelStyle.y = -5;\n if (description) {\n description.resetMatrix();\n description.attr({\n x: offsetX\n });\n }\n label.resetMatrix();\n label.attr(labelStyle);\n }\n }\n if (isString(cfg.description)) {\n var paddingTop = descriptionCfg.paddingTop;\n if (!description) {\n group['shapeMap']['rect-description'] = group.addShape('text', {\n attrs: __assign(__assign({}, descriptionCfg.style), {\n x: offsetX,\n y: 17 + (paddingTop || 0),\n text: cfg.description\n }),\n className: 'rect-description',\n name: 'rect-description',\n draggable: true,\n labelRelated: true\n });\n } else {\n var cfgStyle = cfg.descriptionCfg ? cfg.descriptionCfg.style : {};\n var descriptionStyle = mix({}, description.attr(), cfgStyle);\n if (isString(cfg.description)) descriptionStyle.text = cfg.description;\n descriptionStyle.x = offsetX;\n description.resetMatrix();\n description.attr(__assign(__assign({}, descriptionStyle), {\n y: 17 + (paddingTop || 0)\n }));\n }\n }\n var preRectShape = group['shapeMap']['pre-rect'] || group.find(function (element) {\n return element.get('className') === 'pre-rect';\n });\n if (preRectShape && !preRectShape.destroyed) {\n var preRect = mix({}, preRectShape.attr(), cfg.preRect);\n preRectShape.attr(__assign(__assign({}, preRect), {\n x: -width / 2,\n y: -height / 2,\n height: height\n }));\n }\n if (logoIconShape && !logoIconShape.destroyed) {\n if (!show && show !== undefined) {\n logoIconShape.remove();\n delete group['shapeMap']['pre-rect'];\n } else {\n var logoW = logoIcon.width,\n h = logoIcon.height,\n x = logoIcon.x,\n y = logoIcon.y,\n logoOffset = logoIcon.offset,\n logoIconStyle = __rest(logoIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\"]);\n logoIconShape.attr(__assign(__assign({}, logoIconStyle), {\n x: x || -width / 2 + logoW + logoOffset,\n y: y || -h / 2,\n width: logoW,\n height: h\n }));\n }\n } else if (show) {\n this.drawLogoIcon(cfg, group);\n }\n var stateIconShape = group['shapeMap']['rect-state-icon'] || group.find(function (element) {\n return element.get('className') === 'rect-state-icon';\n });\n var currentStateIconAttr = stateIconShape ? stateIconShape.attr() : {};\n var stateIcon = mix({}, currentStateIconAttr, cfg.stateIcon);\n if (stateIconShape) {\n if (!stateIcon.show && stateIcon.show !== undefined) {\n stateIconShape.remove();\n delete group['shapeMap']['rect-state-icon'];\n }\n var stateW = stateIcon.width,\n h = stateIcon.height,\n x = stateIcon.x,\n y = stateIcon.y,\n stateOffset = stateIcon.offset,\n stateIconStyle = __rest(stateIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\"]);\n stateIconShape.attr(__assign(__assign({}, stateIconStyle), {\n x: x || width / 2 - stateW + stateOffset,\n y: y || -h / 2,\n width: stateW,\n height: h\n }));\n } else if (stateIcon.show) {\n this.drawStateIcon(cfg, group);\n }\n this.updateLinkPoints(cfg, group);\n },\n getOptions: function getOptions(cfg, updateType) {\n if (updateType === 'move') return cfg;\n // different from baseShape, the config should be mixed when the updateType is not 'move'\n return deepMix({}, this.options, this.getCustomConfig(cfg) || {}, cfg);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global, Util } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 五角星shape\nregisterNode('star', {\n // 自定义节点时的配置\n options: {\n size: 60,\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'star',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -w / 2,\n y: -h / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n leftBottom = linkPoints.leftBottom,\n rightBottom = linkPoints.rightBottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"leftBottom\", \"rightBottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var outerR = size[0];\n if (right) {\n // right circle\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 0) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 0) / 180 * Math.PI) * outerR;\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right'\n });\n }\n if (top) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 1) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 1) / 180 * Math.PI) * outerR;\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top'\n });\n }\n if (left) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 2) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 2) / 180 * Math.PI) * outerR;\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left'\n });\n }\n if (leftBottom) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 3) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 3) / 180 * Math.PI) * outerR;\n // left bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left-bottom',\n name: 'link-point-left-bottom'\n });\n }\n if (rightBottom) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 4) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 4) / 180 * Math.PI) * outerR;\n // left bottom circle\n group['shapeMap']['link-point-right-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right-bottom',\n name: 'link-point-right-bottom'\n });\n }\n },\n getPath: function getPath(cfg) {\n var size = this.getSize(cfg);\n var outerR = size[0];\n var defaultInnerR = outerR * 3 / 8;\n var innerR = cfg.innerR || defaultInnerR;\n return Util.getStarPath(outerR, innerR);\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖原来默认的 stroke 属性。但 cfg 中但 stroke 属性优先级更高\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var defaultLinkPoints = this.getOptions({}).linkPoints;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markLeftBottom = group['shapeMap']['link-point-left-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-left-bottom';\n });\n var markRightBottom = group['shapeMap']['link-point-left-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-right-bottom';\n });\n var currentLinkPoints = defaultLinkPoints;\n var existLinkPoint = markLeft || markRight || markTop || markLeftBottom || markRightBottom;\n if (existLinkPoint) {\n currentLinkPoints = existLinkPoint.attr();\n }\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _a = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n leftBottom: undefined,\n rightBottom: undefined\n },\n left = _a.left,\n right = _a.right,\n top = _a.top,\n leftBottom = _a.leftBottom,\n rightBottom = _a.rightBottom;\n var size = this.getSize(cfg);\n var outerR = size[0];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n var x = Math.cos((18 + 72 * 0) / 180 * Math.PI) * outerR;\n var y = Math.sin((18 + 72 * 0) / 180 * Math.PI) * outerR;\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n } else {\n markRight.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (right) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 1) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 1) / 180 * Math.PI) * outerR;\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n } else {\n markTop.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (top) {\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 2) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 2) / 180 * Math.PI) * outerR;\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (left) {\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 3) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 3) / 180 * Math.PI) * outerR;\n if (markLeftBottom) {\n if (!leftBottom && leftBottom !== undefined) {\n markLeftBottom.remove();\n delete group['shapeMap']['link-point-left-bottom'];\n } else {\n markLeftBottom.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (leftBottom) {\n group['shapeMap']['link-point-left-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-left-bottom',\n name: 'link-point-left-bottom',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 4) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 4) / 180 * Math.PI) * outerR;\n if (markRightBottom) {\n if (!rightBottom && rightBottom !== undefined) {\n markRightBottom.remove();\n delete group['shapeMap']['link-point-right-bottom'];\n } else {\n markRightBottom.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (rightBottom) {\n group['shapeMap']['link-point-right-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-right-bottom',\n name: 'link-point-right-bottom',\n isAnchorPoint: true\n });\n }\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport { registerNode, BaseGlobal as Global, Util } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\nvar defaultSubjectColors = Util.defaultSubjectColors;\nvar FAN_NAME_PREFIX = 'fan-shape-';\n// 饼图节点\nregisterNode('donut', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n defaultIcon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var icon = deepMix({}, defaultIcon, cfg.icon);\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n draggable: true,\n name: \"\".concat(this.type, \"-keyShape\")\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n // draw the fan shapes\n drawFans(cfg, group, keyShape);\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle, hasIcon, updateType) {\n // here cfg is merged configure including old model and new configs\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign({}, keyShapeStyle));\n updateFans(cfg, item, keyShape);\n if (!undefined || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('label'))) {\n this.updateLabel(cfg, item, updateType);\n }\n if (hasIcon) {\n this.updateIcon(cfg, item);\n }\n }\n}, 'circle');\n/**\n * draws the fan shapes\n * @param cfg\n * @param group\n * @param keyShape\n * @returns\n */\nvar drawFans = function drawFans(cfg, group, keyShape) {\n var _a = cfg.donutAttrs,\n donutAttrs = _a === void 0 ? {} : _a,\n _b = cfg.donutColorMap,\n donutColorMap = _b === void 0 ? {} : _b;\n var attrNum = Object.keys(donutAttrs).length;\n if (donutAttrs && attrNum > 1) {\n var _c = getDonutConfig(donutAttrs, donutColorMap),\n configs = _c.configs,\n totalValue = _c.totalValue;\n if (totalValue) {\n var _d = getDonutSize(keyShape),\n lineWidth = _d.lineWidth,\n arcR = _d.arcR;\n var arcBegin = [arcR, 0];\n var beginAngle = 0;\n if (attrNum === 1) {\n // draw a path represents a circle\n drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[0],\n fanIndex: 0,\n lineWidth: lineWidth,\n totalValue: totalValue,\n drawWhole: true\n });\n return;\n }\n for (var i = 0; i < configs.length; i++) {\n var result = drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[i],\n fanIndex: i,\n lineWidth: lineWidth,\n totalValue: totalValue\n });\n if (result.shouldEnd) return;\n arcBegin = result.arcBegin;\n beginAngle = result.beginAngle;\n }\n }\n }\n};\n/**\n * draws one fan shape and returns the next position and angle\n * @param group\n * @param fanConfig\n * @returns\n */\nvar drawFan = function drawFan(group, fanConfig) {\n var arcR = fanConfig.arcR,\n arcBegin = fanConfig.arcBegin,\n beginAngle = fanConfig.beginAngle,\n config = fanConfig.config,\n fanIndex = fanConfig.fanIndex,\n lineWidth = fanConfig.lineWidth,\n totalValue = fanConfig.totalValue,\n _a = fanConfig.drawWhole,\n drawWhole = _a === void 0 ? false : _a,\n _b = fanConfig.updateShape,\n updateShape = _b === void 0 ? undefined : _b;\n var percent = config.value / totalValue;\n if (percent < 0.001) {\n // too small to add a fan\n return {\n beginAngle: beginAngle,\n arcBegin: arcBegin,\n shape: undefined,\n shouldEnd: false\n };\n }\n var arcEnd, endAngle, isBig;\n // draw a path represents the whole circle, or the percentage is close to 1\n if (drawWhole || percent > 0.999) {\n arcEnd = [arcR, 0.0001]; // [arcR * cos(2 * PI), -arcR * sin(2 * PI)]\n isBig = 1;\n } else {\n var angle = percent * Math.PI * 2;\n endAngle = beginAngle + angle;\n arcEnd = [arcR * Math.cos(endAngle), -arcR * Math.sin(endAngle)];\n isBig = angle > Math.PI ? 1 : 0;\n }\n var style = {\n path: [['M', arcBegin[0], arcBegin[1]], ['A', arcR, arcR, 0, isBig, 0, arcEnd[0], arcEnd[1]]],\n stroke: config.color || (updateShape === null || updateShape === void 0 ? void 0 : updateShape.attr('stroke')) || defaultSubjectColors[fanIndex % defaultSubjectColors.length],\n lineWidth: lineWidth\n };\n if (updateShape) {\n // update\n updateShape.attr(style);\n } else {\n // draw\n group['shapeMap'][\"\".concat(FAN_NAME_PREFIX).concat(fanIndex)] = group.addShape('path', {\n attrs: style,\n name: \"\".concat(FAN_NAME_PREFIX).concat(fanIndex),\n draggable: true\n });\n }\n return {\n beginAngle: endAngle,\n arcBegin: arcEnd,\n shape: group['shapeMap'][\"\".concat(FAN_NAME_PREFIX).concat(fanIndex)],\n shouldEnd: drawWhole || percent > 0.999\n };\n};\n/**\n * utilizes the existing fan shapes, update them with new configs\n * removes the redundent fan shapes\n * or adds more fan shapes\n * @param cfg\n * @param item\n * @param keyShape\n */\nvar updateFans = function updateFans(cfg, item, keyShape) {\n var donutAttrs = cfg.donutAttrs,\n _a = cfg.donutColorMap,\n donutColorMap = _a === void 0 ? {} : _a;\n var visitMap = {};\n var group = item.getContainer();\n if (donutAttrs) {\n var _b = getDonutConfig(donutAttrs, donutColorMap),\n configs = _b.configs,\n totalValue = _b.totalValue;\n if (totalValue) {\n var _c = getDonutSize(keyShape),\n lineWidth = _c.lineWidth,\n arcR = _c.arcR;\n var arcBegin = [arcR, 0];\n var beginAngle = 0;\n for (var i = 0; i < configs.length; i++) {\n var shapeName = \"\".concat(FAN_NAME_PREFIX).concat(i);\n var result = drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[i],\n fanIndex: i,\n lineWidth: lineWidth,\n totalValue: totalValue,\n drawWhole: configs.length === 1,\n updateShape: group['shapeMap'][shapeName]\n });\n if (result.shape) visitMap[shapeName] = true;\n if (result.shouldEnd) break;\n arcBegin = result.arcBegin;\n beginAngle = result.beginAngle;\n }\n }\n }\n // remove the old shapes which are not visited, including the situation taht donutAttrs is empty\n var fanKeys = Object.keys(group['shapeMap']).filter(function (key) {\n return key.includes(FAN_NAME_PREFIX);\n });\n fanKeys.forEach(function (key) {\n if (!visitMap[key]) {\n group['shapeMap'][key].remove(true);\n delete group['shapeMap'][key];\n }\n });\n};\n/**\n * calculate the total value and format single value for each fan\n * @param donutAttrs\n * @param donutColorMap\n * @returns\n */\nvar getDonutConfig = function getDonutConfig(donutAttrs, donutColorMap) {\n var totalValue = 0;\n var configs = [];\n Object.keys(donutAttrs).forEach(function (name) {\n var value = +donutAttrs[name];\n if (isNaN(value)) return;\n configs.push({\n key: name,\n value: value,\n color: donutColorMap[name]\n });\n totalValue += value;\n });\n return {\n totalValue: totalValue,\n configs: configs\n };\n};\n/**\n * calculate the lineWidth and radius for fan shapes according to the keyShape's radius\n * @param keyShape\n * @returns\n */\nvar getDonutSize = function getDonutSize(keyShape) {\n var keyShapeR = keyShape.attr('r');\n var innerR = 0.6 * keyShapeR; // 甜甜圈的内环半径\n var arcR = (keyShapeR + innerR) / 2; // 内环半径与外环半径的平均值\n var lineWidth = keyShapeR - innerR;\n return {\n lineWidth: lineWidth,\n arcR: arcR\n };\n};","export var getBBoxFromPoint = function getBBoxFromPoint(point) {\n var x = point.x,\n y = point.y;\n return {\n x: x,\n y: y,\n centerX: x,\n centerY: y,\n minX: x,\n minY: y,\n maxX: x,\n maxY: y,\n height: 0,\n width: 0\n };\n};\nexport var getBBoxFromPoints = function getBBoxFromPoints(points) {\n if (points === void 0) {\n points = [];\n }\n var xs = [];\n var ys = [];\n points.forEach(function (p) {\n xs.push(p.x);\n ys.push(p.y);\n });\n var minX = Math.min.apply(Math, xs);\n var maxX = Math.max.apply(Math, xs);\n var minY = Math.min.apply(Math, ys);\n var maxY = Math.max.apply(Math, ys);\n return {\n centerX: (minX + maxX) / 2,\n centerY: (minY + maxY) / 2,\n maxX: maxX,\n maxY: maxY,\n minX: minX,\n minY: minY,\n height: maxY - minY,\n width: maxX - minX\n };\n};\nexport var isBBoxesOverlapping = function isBBoxesOverlapping(b1, b2) {\n return Math.abs(b1.centerX - b2.centerX) * 2 < b1.width + b2.width && Math.abs(b1.centerY - b2.centerY) * 2 < b1.height + b2.height;\n};\nexport var filterConnectPoints = function filterConnectPoints(points) {\n // pre-process: remove duplicated points\n var result = [];\n var map = {};\n var pointsLength = points.length;\n for (var i = pointsLength - 1; i >= 0; i--) {\n var p = points[i];\n p.id = \"\".concat(p.x, \"|||\").concat(p.y);\n if (!map[p.id]) {\n map[p.id] = p;\n result.push(p);\n }\n }\n return result;\n};\nexport var simplifyPolyline = function simplifyPolyline(points) {\n return filterConnectPoints(points);\n};\nexport var getSimplePolyline = function getSimplePolyline(sPoint, tPoint) {\n return [sPoint, {\n x: sPoint.x,\n y: tPoint.y\n }, tPoint];\n};\nexport var getExpandedBBox = function getExpandedBBox(bbox, offset) {\n if (bbox.width || bbox.height) {\n return {\n centerX: bbox.centerX,\n centerY: bbox.centerY,\n minX: bbox.minX - offset,\n minY: bbox.minY - offset,\n maxX: bbox.maxX + offset,\n maxY: bbox.maxY + offset,\n height: bbox.height + 2 * offset,\n width: bbox.width + 2 * offset\n };\n }\n // when it is a point\n return bbox;\n};\nexport var isHorizontalPort = function isHorizontalPort(port, bbox) {\n var dx = Math.abs(port.x - bbox.centerX);\n var dy = Math.abs(port.y - bbox.centerY);\n if (dx === 0 && dy === 0) return 0;\n return dx / bbox.width > dy / bbox.height;\n};\nexport var getExpandedBBoxPoint = function getExpandedBBoxPoint(bbox,\n// 将原来节点 bbox 扩展了 offset 后的 bbox,且被 gridSize 格式化\npoint,\n// 被 gridSize 格式化后的位置(anchorPoint)\nanotherPoint) {\n var isHorizontal = isHorizontalPort(point, bbox);\n if (isHorizontal === 0) {\n // 说明锚点是节点中心,linkCenter: true。需要根据两个节点的相对关系决定方向\n var x = bbox.centerX;\n var y = bbox.centerY;\n if (anotherPoint.y < point.y) {\n // 另一端在左上/右上方时,总是从上方走\n y = bbox.minY;\n } else if (anotherPoint.x > point.x) {\n // 另一端在右下方,往右边走\n x = bbox.maxX;\n } else if (anotherPoint.x < point.x) {\n // 另一端在左下方,往左边走\n x = bbox.minX;\n } else if (anotherPoint.x === point.x) {\n // 另一段在正下方,往下走\n y = bbox.maxY;\n }\n return {\n x: x,\n y: y\n };\n }\n if (isHorizontal) {\n return {\n x: point.x > bbox.centerX ? bbox.maxX : bbox.minX,\n y: point.y\n };\n }\n return {\n x: point.x,\n y: point.y > bbox.centerY ? bbox.maxY : bbox.minY\n };\n};\n/**\n *\n * @param b1\n * @param b2\n */\nexport var mergeBBox = function mergeBBox(b1, b2) {\n var minX = Math.min(b1.minX, b2.minX);\n var minY = Math.min(b1.minY, b2.minY);\n var maxX = Math.max(b1.maxX, b2.maxX);\n var maxY = Math.max(b1.maxY, b2.maxY);\n return {\n centerX: (minX + maxX) / 2,\n centerY: (minY + maxY) / 2,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n height: maxY - minY,\n width: maxX - minX\n };\n};\nexport var getPointsFromBBox = function getPointsFromBBox(bbox) {\n // anticlockwise\n return [{\n x: bbox.minX,\n y: bbox.minY\n }, {\n x: bbox.maxX,\n y: bbox.minY\n }, {\n x: bbox.maxX,\n y: bbox.maxY\n }, {\n x: bbox.minX,\n y: bbox.maxY\n }];\n};\nexport var isPointOutsideBBox = function isPointOutsideBBox(point, bbox) {\n var x = point.x,\n y = point.y;\n return x < bbox.minX || x > bbox.maxX || y < bbox.minY || y > bbox.maxY;\n};\nexport var getBBoxXCrossPoints = function getBBoxXCrossPoints(bbox, x) {\n if (x < bbox.minX || x > bbox.maxX) {\n return [];\n }\n return [{\n x: x,\n y: bbox.minY\n }, {\n x: x,\n y: bbox.maxY\n }];\n};\nexport var getBBoxYCrossPoints = function getBBoxYCrossPoints(bbox, y) {\n if (y < bbox.minY || y > bbox.maxY) {\n return [];\n }\n return [{\n x: bbox.minX,\n y: y\n }, {\n x: bbox.maxX,\n y: y\n }];\n};\nexport var getBBoxCrossPointsByPoint = function getBBoxCrossPointsByPoint(bbox, point) {\n return getBBoxXCrossPoints(bbox, point.x).concat(getBBoxYCrossPoints(bbox, point.y));\n};\n/**\n * 曼哈顿距离\n */\nexport var distance = function distance(p1, p2) {\n return Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n};\n/**\n * 如果 points 中的一个节点 x 与 p 相等,则消耗 -2。y 同\n * 即优先选择和 points 在同一水平线 / 垂直线上的点\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport var _costByPoints = function _costByPoints(p, points) {\n var offset = -2;\n var result = 0;\n points.forEach(function (point) {\n if (point) {\n if (p.x === point.x) {\n result += offset;\n }\n if (p.y === point.y) {\n result += offset;\n }\n }\n });\n return result;\n};\n/**\n * ps 经过 p 到 pt 的距离,减去其他路过节点造成的消耗\n */\nexport var heuristicCostEstimate = function heuristicCostEstimate(p, ps, pt, source, target) {\n return distance(p, ps) + distance(p, pt) + _costByPoints(p, [ps, pt, source, target]);\n};\nexport var reconstructPath = function reconstructPath(pathPoints, pointById, cameFrom, currentId, iterator) {\n if (iterator === void 0) {\n iterator = 0;\n }\n pathPoints.unshift(pointById[currentId]);\n if (cameFrom[currentId] && cameFrom[currentId] !== currentId && iterator <= 100) {\n reconstructPath(pathPoints, pointById, cameFrom, cameFrom[currentId], iterator + 1);\n }\n};\n/**\n * 从 arr 中删去 item\n */\nexport var removeFrom = function removeFrom(arr, item) {\n var index = arr.indexOf(item);\n if (index > -1) {\n arr.splice(index, 1);\n }\n};\nexport var isSegmentsIntersected = function isSegmentsIntersected(p0, p1, p2, p3) {\n var v1x = p2.x - p0.x;\n var v1y = p2.y - p0.y;\n var v2x = p3.x - p0.x;\n var v2y = p3.y - p0.y;\n var v3x = p2.x - p1.x;\n var v3y = p2.y - p1.y;\n var v4x = p3.x - p1.x;\n var v4y = p3.y - p1.y;\n var pd1 = v1x * v2y - v1y * v2x;\n var pd2 = v3x * v4y - v3y * v4x;\n var pd3 = v1x * v3y - v1y * v3x;\n var pd4 = v2x * v4y - v2y * v4x;\n return pd1 * pd2 <= 0 && pd3 * pd4 <= 0;\n};\nexport var isSegmentCrossingBBox = function isSegmentCrossingBBox(p1, p2, bbox) {\n if (bbox.width || bbox.height) {\n var _a = getPointsFromBBox(bbox),\n pa = _a[0],\n pb = _a[1],\n pc = _a[2],\n pd = _a[3];\n return isSegmentsIntersected(p1, p2, pa, pb) || isSegmentsIntersected(p1, p2, pa, pd) || isSegmentsIntersected(p1, p2, pb, pc) || isSegmentsIntersected(p1, p2, pc, pd);\n }\n return false;\n};\n/**\n * 在 points 中找到满足 x 或 y 和 point 的 x 或 y 相等,且与 point 连线不经过 bbox1 与 bbox2 的点\n */\nexport var getNeighborPoints = function getNeighborPoints(points, point, bbox1, bbox2) {\n var neighbors = [];\n points.forEach(function (p) {\n if (p === point) return;\n if (p.x === point.x || p.y === point.y) {\n if (isSegmentCrossingBBox(p, point, bbox1) || isSegmentCrossingBBox(p, point, bbox2)) return;\n neighbors.push(p);\n }\n });\n return filterConnectPoints(neighbors);\n};\nexport var pathFinder = function pathFinder(points, start, goal, sBBox, tBBox, os, ot) {\n var _a;\n // A-Star Algorithm\n var closedSet = [];\n var openSet = (_a = {}, _a[start.id] = start, _a);\n var cameFrom = {};\n var gScore = {}; // all default values are Infinity\n var fScore = {}; // all default values are Infinity\n gScore[start.id] = 0;\n fScore[start.id] = heuristicCostEstimate(start, goal, start);\n var sortedOpenSet = new SortedArray();\n sortedOpenSet.add({\n id: start.id,\n value: fScore[start.id]\n });\n var pointById = {};\n points.forEach(function (p) {\n pointById[p.id] = p;\n });\n var current;\n while (Object.keys(openSet).length) {\n var minId = sortedOpenSet.minId(false);\n if (minId) {\n current = openSet[minId];\n } else {\n break;\n }\n // 若 openSet 中 fScore 最小的点就是终点\n if (current === goal) {\n // ending condition\n var pathPoints = [];\n reconstructPath(pathPoints, pointById, cameFrom, goal.id);\n return pathPoints;\n }\n delete openSet[current.id];\n sortedOpenSet.remove(current.id);\n closedSet.push(current);\n var neighborPoints = getNeighborPoints(points, current, sBBox, tBBox);\n var iterateNeighbors = function iterateNeighbors(items) {\n items.forEach(function (neighbor) {\n if (closedSet.indexOf(neighbor) !== -1) {\n return;\n }\n var neighborId = neighbor.id;\n if (!openSet[neighborId]) {\n openSet[neighborId] = neighbor;\n }\n var tentativeGScore = fScore[current.id] + distance(current, neighbor); // + distance(neighbor, goal);\n if (gScore[neighborId] && tentativeGScore >= gScore[neighborId]) {\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n return;\n }\n cameFrom[neighborId] = current.id;\n gScore[neighborId] = tentativeGScore;\n fScore[neighborId] = gScore[neighborId] + heuristicCostEstimate(neighbor, goal, start, os, ot);\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n });\n };\n iterateNeighbors(neighborPoints);\n }\n // throw new Error('Cannot find path');\n return [start, goal];\n};\nexport var isBending = function isBending(p0, p1, p2) {\n return !(p0.x === p1.x && p1.x === p2.x || p0.y === p1.y && p1.y === p2.y);\n};\nexport var getBorderRadiusPoints = function getBorderRadiusPoints(p0, p1, p2, r) {\n var d0 = distance(p0, p1);\n var d1 = distance(p2, p1);\n if (d0 < r) {\n r = d0;\n }\n if (d1 < r) {\n r = d1;\n }\n var ps = {\n x: p1.x - r / d0 * (p1.x - p0.x),\n y: p1.y - r / d0 * (p1.y - p0.y)\n };\n var pt = {\n x: p1.x - r / d1 * (p1.x - p2.x),\n y: p1.y - r / d1 * (p1.y - p2.y)\n };\n return [ps, pt];\n};\nexport var getPathWithBorderRadiusByPolyline = function getPathWithBorderRadiusByPolyline(points, borderRadius) {\n var pathSegments = [];\n var startPoint = points[0];\n pathSegments.push(\"M\".concat(startPoint.x, \" \").concat(startPoint.y));\n points.forEach(function (p, i) {\n var p1 = points[i + 1];\n var p2 = points[i + 2];\n if (p1 && p2) {\n if (isBending(p, p1, p2)) {\n var _a = getBorderRadiusPoints(p, p1, p2, borderRadius),\n ps = _a[0],\n pt = _a[1];\n pathSegments.push(\"L\".concat(ps.x, \" \").concat(ps.y));\n pathSegments.push(\"Q\".concat(p1.x, \" \").concat(p1.y, \" \").concat(pt.x, \" \").concat(pt.y));\n pathSegments.push(\"L\".concat(pt.x, \" \").concat(pt.y));\n } else {\n pathSegments.push(\"L\".concat(p1.x, \" \").concat(p1.y));\n }\n } else if (p1) {\n pathSegments.push(\"L\".concat(p1.x, \" \").concat(p1.y));\n }\n });\n return pathSegments.join('');\n};\nexport var getPolylinePoints = function getPolylinePoints(start, end, sNode, tNode, offset) {\n var sBBox, tBBox;\n if (!sNode || !sNode.getType()) {\n sBBox = getBBoxFromPoint(start);\n } else if (sNode.getType() === 'combo') {\n var sKeyShapeBBox = sNode.getKeyShape().getBBox();\n if (sKeyShapeBBox) {\n var _a = sNode.getModel(),\n sx = _a.x,\n sy = _a.y;\n sBBox = {\n x: sx,\n y: sy,\n width: sKeyShapeBBox.width,\n height: sKeyShapeBBox.height,\n minX: sKeyShapeBBox.minX + sx,\n maxX: sKeyShapeBBox.maxX + sx,\n minY: sKeyShapeBBox.minY + sy,\n maxY: sKeyShapeBBox.maxY + sy\n };\n sBBox.centerX = (sBBox.minX + sBBox.maxX) / 2;\n sBBox.centerY = (sBBox.minY + sBBox.maxY) / 2;\n } else {\n sBBox = getBBoxFromPoint(start);\n }\n } else {\n sBBox = sNode && sNode.getBBox();\n }\n if (!tNode || !tNode.getType()) {\n tBBox = getBBoxFromPoint(end);\n } else if (tNode.getType() === 'combo') {\n var tKeyShapeBBox = tNode.getKeyShape().getBBox();\n if (tKeyShapeBBox) {\n var _b = tNode.getModel(),\n tx = _b.x,\n ty = _b.y;\n tBBox = {\n x: tx,\n y: ty,\n width: tKeyShapeBBox.width,\n height: tKeyShapeBBox.height,\n minX: tKeyShapeBBox.minX + tx,\n maxX: tKeyShapeBBox.maxX + tx,\n minY: tKeyShapeBBox.minY + ty,\n maxY: tKeyShapeBBox.maxY + ty\n };\n tBBox.centerX = (tBBox.minX + tBBox.maxX) / 2;\n tBBox.centerY = (tBBox.minY + tBBox.maxY) / 2;\n } else {\n tBBox = getBBoxFromPoint(end);\n }\n } else {\n tBBox = tNode && tNode.getBBox();\n }\n // if (isBBoxesOverlapping(sBBox, tBBox)) {\n // // source and target nodes are overlapping\n // return simplifyPolyline(getSimplePolyline(start, end));\n // }\n var sxBBox = getExpandedBBox(sBBox, offset);\n var txBBox = getExpandedBBox(tBBox, offset);\n // if (isBBoxesOverlapping(sxBBox, txBBox)) {\n // // the expanded bounding boxes of source and target nodes are overlapping\n // return simplifyPolyline(getSimplePolyline(start, end));\n // }\n var sPoint = getExpandedBBoxPoint(sxBBox, start, end);\n var tPoint = getExpandedBBoxPoint(txBBox, end, start);\n var lineBBox = getBBoxFromPoints([sPoint, tPoint]);\n var sMixBBox = mergeBBox(sxBBox, lineBBox);\n var tMixBBox = mergeBBox(txBBox, lineBBox);\n var connectPoints = [];\n connectPoints = connectPoints.concat(getPointsFromBBox(sMixBBox)).concat(getPointsFromBBox(tMixBBox));\n var centerPoint = {\n x: (start.x + end.x) / 2,\n y: (start.y + end.y) / 2\n };\n [lineBBox, sMixBBox, tMixBBox].forEach(function (bbox) {\n connectPoints = connectPoints.concat(getBBoxCrossPointsByPoint(bbox, centerPoint).filter(function (p) {\n return isPointOutsideBBox(p, sxBBox) && isPointOutsideBBox(p, txBBox);\n }));\n });\n [{\n x: sPoint.x,\n y: tPoint.y\n }, {\n x: tPoint.x,\n y: sPoint.y\n }].forEach(function (p) {\n // impossible!!\n if (isPointOutsideBBox(p, sxBBox) && isPointOutsideBBox(p, txBBox) // &&\n // isPointInsideBBox(p, sMixBBox) && isPointInsideBBox(p, tMixBBox)\n ) {\n connectPoints.push(p);\n }\n });\n connectPoints.unshift(sPoint);\n connectPoints.push(tPoint);\n // filter out dulplicated points in connectPoints\n connectPoints = filterConnectPoints(connectPoints); // , sxBBox, txBBox, outerBBox\n var pathPoints = pathFinder(connectPoints, sPoint, tPoint, sBBox, tBBox, start, end);\n pathPoints.unshift(start);\n pathPoints.push(end);\n return simplifyPolyline(pathPoints);\n};\n/**\n * 去除连续同 x 不同 y 的中间点;去除连续同 y 不同 x 的中间点\n * @param points 坐标集合 { x: number, y: number, id: string }[]\n * @returns\n */\nexport var removeRedundantPoint = function removeRedundantPoint(points) {\n if (!(points === null || points === void 0 ? void 0 : points.length)) return points;\n var beginPoint = points[points.length - 1];\n var current = {\n x: beginPoint.x,\n y: beginPoint.y\n };\n var continueSameX = [beginPoint];\n var continueSameY = [beginPoint];\n for (var i = points.length - 2; i >= 0; i--) {\n var point = points[i];\n if (point.x === current.x) {\n continueSameX.push(point);\n } else {\n continueSameX = [point];\n current.x = point.x;\n }\n if (point.y === current.y) {\n continueSameY.push(point);\n } else {\n continueSameY = [point];\n current.y = point.y;\n }\n if (continueSameX.length > 2) {\n var removeIdx = points.indexOf(continueSameX[1]);\n if (removeIdx > -1) points.splice(removeIdx, 1);\n continue;\n }\n if (continueSameY.length > 2) {\n var removeIdx = points.indexOf(continueSameY[1]);\n if (removeIdx > -1) points.splice(removeIdx, 1);\n }\n }\n return points;\n};\n/**\n * sorted array ascendly\n * add new item to proper index when calling add\n */\nvar SortedArray = /** @class */function () {\n function SortedArray() {\n this.arr = [];\n this.map = {};\n this.arr = [];\n this.map = {};\n }\n SortedArray.prototype._innerAdd = function (item, length) {\n var idxRange = [0, length - 1];\n while (idxRange[1] - idxRange[0] > 1) {\n var midIdx = Math.floor((idxRange[0] + idxRange[1]) / 2);\n if (this.arr[midIdx].value > item.value) {\n idxRange[1] = midIdx;\n } else if (this.arr[midIdx].value < item.value) {\n idxRange[0] = midIdx;\n } else {\n this.arr.splice(midIdx, 0, item);\n this.map[item.id] = true;\n return;\n }\n }\n this.arr.splice(idxRange[1], 0, item);\n this.map[item.id] = true;\n };\n SortedArray.prototype.add = function (item) {\n // 已经存在,先移除\n delete this.map[item.id];\n var length = this.arr.length;\n if (!length) {\n this.arr.push(item);\n this.map[item.id] = true;\n return;\n }\n // 比最后一个大,加入尾部\n if (this.arr[length - 1].value < item.value) {\n this.arr.push(item);\n this.map[item.id] = true;\n return;\n }\n this._innerAdd(item, length);\n };\n // only remove from the map to avoid cost\n // clear the invalid (not in the map) item when calling minId(true)\n SortedArray.prototype.remove = function (id) {\n if (!this.map[id]) return;\n delete this.map[id];\n };\n SortedArray.prototype._clearAndGetMinId = function () {\n var res;\n for (var i = this.arr.length - 1; i >= 0; i--) {\n if (this.map[this.arr[i].id]) res = this.arr[i].id;else this.arr.splice(i, 1);\n }\n return res;\n };\n SortedArray.prototype._findFirstId = function () {\n while (this.arr.length) {\n var first = this.arr.shift();\n if (this.map[first.id]) return first.id;\n }\n };\n SortedArray.prototype.minId = function (clear) {\n if (clear) {\n return this._clearAndGetMinId();\n } else {\n return this._findFirstId();\n }\n };\n return SortedArray;\n}();\nexport { SortedArray };","/**\n * 通过配置不同的 costFunc, distFunc, constraints 可以得到不同效果的 router\n * generalRouter: 不限制搜索时的移动方向,避开障碍即可\n * orthogonal: 线必须沿着竖直或水平方向(4个方向)\n * octolinearRouter: 线沿着竖直、水平、对角线方向(8个方向)\n */\nimport { Util } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\nimport { getExpandedBBox, getExpandedBBoxPoint, getPolylinePoints, simplifyPolyline, isSegmentCrossingBBox, SortedArray } from './polyline-util';\nvar manhattanDist = function manhattanDist(p1, p2) {\n return Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n};\nvar eucliDist = function eucliDist(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n};\nvar straightPath = function straightPath(start, end) {\n // console.warn('fallbackRoute: straight path');\n return [start, end];\n};\nvar simplePolyline = function simplePolyline(start, end, startNode, endNode, cfg) {\n return simplifyPolyline(getPolylinePoints(start, end, startNode, endNode, cfg.offset));\n};\n// getPolylinePoints\nvar defaultCfg = {\n offset: 20,\n maxAllowedDirectionChange: Math.PI / 2,\n maximumLoops: 2000,\n gridSize: 10,\n directions: [{\n stepX: 1,\n stepY: 0\n }, {\n stepX: -1,\n stepY: 0\n }, {\n stepX: 0,\n stepY: 1\n }, {\n stepX: 0,\n stepY: -1\n } // top\n ],\n\n get penalties() {\n return {\n 0: 0,\n 45: this.gridSize / 2,\n 90: this.gridSize / 2\n };\n },\n distFunc: manhattanDist,\n fallbackRoute: simplePolyline\n};\nexport var octolinearCfg = {\n maxAllowedDirectionChange: Math.PI / 4,\n // 8 个方向: 上下左右 + 45度斜线方向\n directions: [{\n stepX: 1,\n stepY: 0\n }, {\n stepX: 1,\n stepY: 1\n }, {\n stepX: 0,\n stepY: 1\n }, {\n stepX: -1,\n stepY: 1\n }, {\n stepX: -1,\n stepY: 0\n }, {\n stepX: -1,\n stepY: -1\n }, {\n stepX: 0,\n stepY: -1\n }, {\n stepX: 1,\n stepY: -1\n }],\n distFunc: eucliDist,\n fallbackRoute: straightPath\n};\nvar pos2GridIx = function pos2GridIx(pos, gridSize) {\n var gridIx = Math.round(Math.abs(pos / gridSize));\n var sign = pos < 0 ? -1 : 1;\n return gridIx < 0 ? 0 : sign * gridIx;\n};\nvar getObstacleMap = function getObstacleMap(items, gridSize, offset) {\n var map = {};\n items.forEach(function (item) {\n // create-edge 时,当边类型为 polyline 时 endNode 为 null\n if (!item) return;\n var bbox = getExpandedBBox(item.getBBox(), offset);\n for (var x = pos2GridIx(bbox.minX, gridSize); x <= pos2GridIx(bbox.maxX, gridSize); x += 1) {\n for (var y = pos2GridIx(bbox.minY, gridSize); y <= pos2GridIx(bbox.maxY, gridSize); y += 1) {\n map[\"\".concat(x, \"|||\").concat(y)] = true;\n }\n }\n });\n return map;\n};\n/**\n * 方向角:计算从 p1 到 p2 的射线与水平线形成的夹角度数(顺时针从右侧0°转到该射线的角度)\n * @param p1 PolyPoint\n * @param p2 PolyPoint\n */\nvar getDirectionAngle = function getDirectionAngle(p1, p2) {\n var deltaX = p2.x - p1.x;\n var deltaY = p2.y - p1.y;\n if (deltaX || deltaY) {\n return Math.atan2(deltaY, deltaX);\n }\n return 0;\n};\n/**\n * 方向角的改变,取小于180度角\n * @param angle1\n * @param angle2\n */\nvar getAngleDiff = function getAngleDiff(angle1, angle2) {\n var directionChange = Math.abs(angle1 - angle2);\n return directionChange > Math.PI ? 2 * Math.PI - directionChange : directionChange;\n // return directionChange > 180 ? 360 - directionChange : directionChange;\n};\n// Path finder //\nvar estimateCost = function estimateCost(from, endPoints, distFunc) {\n var min = Infinity;\n for (var i = 0, len = endPoints.length; i < len; i++) {\n var cost = distFunc(from, endPoints[i]);\n if (cost < min) {\n min = cost;\n }\n }\n return min;\n};\n// 计算考虑 offset 后的 BBox 上的连接点\nvar getBoxPoints = function getBoxPoints(point,\n// 被 gridSize 格式化后的位置(anchorPoint)\noriPoint,\n// 未被 gridSize 格式化的位置(anchorPoint)\nnode,\n// 原始节点,用于获取 bbox\nanotherPoint,\n// 另一端被 gridSize 格式化后的位置\ncfg) {\n var points = [];\n // create-edge 生成边的过程中,endNode 为 null\n if (!node) {\n return [point];\n }\n var directions = cfg.directions,\n offset = cfg.offset;\n var bbox = node.getBBox();\n var isInside = oriPoint.x > bbox.minX && oriPoint.x < bbox.maxX && oriPoint.y > bbox.minY && oriPoint.y < bbox.maxY;\n var expandBBox = getExpandedBBox(bbox, offset);\n for (var i in expandBBox) {\n expandBBox[i] = pos2GridIx(expandBBox[i], cfg.gridSize);\n }\n if (isInside) {\n // 如果 anchorPoint 在节点内部,允许第一段线穿过节点\n for (var _i = 0, directions_1 = directions; _i < directions_1.length; _i++) {\n var dir = directions_1[_i];\n var bounds = [[{\n x: expandBBox.minX,\n y: expandBBox.minY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.minY\n }], [{\n x: expandBBox.minX,\n y: expandBBox.minY\n }, {\n x: expandBBox.minX,\n y: expandBBox.maxY\n }], [{\n x: expandBBox.maxX,\n y: expandBBox.minY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.maxY\n }], [{\n x: expandBBox.minX,\n y: expandBBox.maxY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.maxY\n }]];\n for (var i = 0; i < 4; i++) {\n var boundLine = bounds[i];\n var insterctP_1 = Util.getLineIntersect(point, {\n x: point.x + dir.stepX * expandBBox.width,\n y: point.y + dir.stepY * expandBBox.height\n }, boundLine[0], boundLine[1]);\n if (insterctP_1 && !isSegmentCrossingBBox(point, insterctP_1, bbox)) {\n insterctP_1.id = \"\".concat(insterctP_1.x, \"|||\").concat(insterctP_1.y);\n points.push(insterctP_1);\n }\n }\n }\n return points;\n }\n // 如果 anchorPoint 在节点上,只有一个可选方向\n var insterctP = getExpandedBBoxPoint(expandBBox, point, anotherPoint);\n insterctP.id = \"\".concat(insterctP.x, \"|||\").concat(insterctP.y);\n return [insterctP];\n};\nvar getDirectionChange = function getDirectionChange(current, neighbor, cameFrom, scaleStartPoint) {\n var directionAngle = getDirectionAngle(current, neighbor);\n var currentCameFrom = cameFrom[current.id];\n if (!currentCameFrom) {\n var startAngle = getDirectionAngle(scaleStartPoint, current);\n return getAngleDiff(startAngle, directionAngle);\n }\n var prevDirectionAngle = getDirectionAngle({\n x: currentCameFrom.x,\n y: currentCameFrom.y\n }, current);\n return getAngleDiff(prevDirectionAngle, directionAngle);\n};\nvar getControlPoints = function getControlPoints(current, cameFrom, scaleStartPoint, endPoint, startPoint, scaleEndPoint, gridSize) {\n var controlPoints = [endPoint];\n var pointZero = endPoint;\n var currentId = current.id;\n var currentX = current.x;\n var currentY = current.y;\n var lastPoint = {\n x: currentX,\n y: currentY,\n id: currentId\n };\n if (getDirectionChange(lastPoint, scaleEndPoint, cameFrom, scaleStartPoint)) {\n pointZero = {\n x: scaleEndPoint.x === endPoint.x ? endPoint.x : lastPoint.x * gridSize,\n y: scaleEndPoint.y === endPoint.y ? endPoint.y : lastPoint.y * gridSize\n };\n controlPoints.unshift(pointZero);\n }\n var currentCameFrom = cameFrom[currentId];\n while (currentCameFrom && currentCameFrom.id !== currentId) {\n var point = {\n x: currentX,\n y: currentY,\n id: currentId\n };\n var prePoint = {\n x: currentCameFrom.x,\n y: currentCameFrom.y,\n id: currentCameFrom.id\n };\n var directionChange = getDirectionChange(prePoint, point, cameFrom, scaleStartPoint);\n if (directionChange) {\n pointZero = {\n x: prePoint.x === point.x ? pointZero.x : prePoint.x * gridSize,\n y: prePoint.y === point.y ? pointZero.y : prePoint.y * gridSize\n };\n controlPoints.unshift(pointZero);\n }\n currentId = prePoint.id;\n currentX = prePoint.x;\n currentY = prePoint.y;\n currentCameFrom = cameFrom[currentId];\n }\n // 和startNode对齐\n controlPoints[0].x = currentX === scaleStartPoint.x ? startPoint.x : pointZero.x;\n controlPoints[0].y = currentY === scaleStartPoint.y ? startPoint.y : pointZero.y;\n controlPoints.unshift(startPoint);\n return controlPoints;\n};\nexport var pathFinder = function pathFinder(startPoint, endPoint, startNode, endNode, routerCfg) {\n if (isNaN(startPoint.x) || isNaN(endPoint.x)) return [];\n var cfg = deepMix(defaultCfg, routerCfg);\n cfg.obstacles = cfg.obstacles || [];\n var penalties = cfg.penalties,\n gridSize = cfg.gridSize;\n var map = getObstacleMap(cfg.obstacles.concat([startNode, endNode]), gridSize, cfg.offset);\n var scaleStartPoint = {\n x: pos2GridIx(startPoint.x, gridSize),\n y: pos2GridIx(startPoint.y, gridSize)\n };\n var scaleEndPoint = {\n x: pos2GridIx(endPoint.x, gridSize),\n y: pos2GridIx(endPoint.y, gridSize)\n };\n startPoint.id = \"\".concat(scaleStartPoint.x, \"|||\").concat(scaleStartPoint.y);\n endPoint.id = \"\".concat(scaleEndPoint.x, \"|||\").concat(scaleEndPoint.y);\n var startPoints = getBoxPoints(scaleStartPoint, startPoint, startNode, scaleEndPoint, cfg);\n var endPoints = getBoxPoints(scaleEndPoint, endPoint, endNode, scaleStartPoint, cfg);\n startPoints.forEach(function (point) {\n delete map[point.id];\n });\n endPoints.forEach(function (point) {\n delete map[point.id];\n });\n var openSet = {};\n var closedSet = {};\n var cameFrom = {};\n // 从起点到当前点已产生的 cost, default: Infinity\n var gScore = {};\n // 起点经过当前点到达终点预估的 cost, default: Infinity\n var fScore = {};\n var sortedOpenSet = new SortedArray();\n // initialize\n for (var i = 0; i < startPoints.length; i++) {\n var firstStep = startPoints[i];\n openSet[firstStep.id] = firstStep;\n gScore[firstStep.id] = 0;\n fScore[firstStep.id] = estimateCost(firstStep, endPoints, cfg.distFunc);\n sortedOpenSet.add({\n id: firstStep.id,\n value: fScore[firstStep.id]\n });\n }\n var remainLoops = cfg.maximumLoops;\n var current, direction, neighbor, neighborCost, costFromStart, directionChange;\n var curCost = Infinity;\n var endPointMap = {};\n endPoints.forEach(function (point) {\n endPointMap[\"\".concat(point.x, \"|||\").concat(point.y)] = true;\n });\n Object.keys(openSet).forEach(function (key) {\n var id = openSet[key].id;\n if (fScore[id] <= curCost) {\n curCost = fScore[id];\n current = openSet[id];\n }\n });\n while (Object.keys(openSet).length > 0 && remainLoops > 0) {\n var minId = sortedOpenSet.minId((remainLoops + 1) % 30 === 0);\n if (minId) {\n current = openSet[minId];\n } else {\n break;\n }\n // 如果 fScore 最小的点就是终点\n if (endPointMap[\"\".concat(current.x, \"|||\").concat(current.y)]) {\n return getControlPoints(current, cameFrom, scaleStartPoint, endPoint, startPoint, scaleEndPoint, gridSize);\n }\n delete openSet[current.id];\n sortedOpenSet.remove(current.id);\n closedSet[current.id] = true;\n // 获取符合条件的下一步的候选连接点\n // 沿候选方向走一步\n for (var i = 0; i < cfg.directions.length; i++) {\n direction = cfg.directions[i];\n var neighborId = \"\".concat(Math.round(current.x) + direction.stepX, \"|||\").concat(Math.round(current.y) + direction.stepY);\n neighbor = {\n x: current.x + direction.stepX,\n y: current.y + direction.stepY,\n id: neighborId\n };\n if (closedSet[neighborId]) continue;\n directionChange = getDirectionChange(current, neighbor, cameFrom, scaleStartPoint);\n if (directionChange > cfg.maxAllowedDirectionChange) continue;\n if (map[neighborId]) continue; // 如果交叉则跳过\n // 将候选点加入 openSet, 并计算每个候选点的 cost\n if (!openSet[neighborId]) {\n openSet[neighborId] = neighbor;\n }\n var directionPenalties = penalties[directionChange];\n neighborCost = cfg.distFunc(current, neighbor) + (isNaN(directionPenalties) ? gridSize : directionPenalties);\n costFromStart = gScore[current.id] + neighborCost;\n var neighborGScore = gScore[neighborId];\n if (neighborGScore && costFromStart >= neighborGScore) {\n continue;\n }\n cameFrom[neighborId] = current;\n gScore[neighborId] = costFromStart;\n fScore[neighborId] = costFromStart + estimateCost(neighbor, endPoints, cfg.distFunc);\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n }\n remainLoops -= 1;\n }\n return cfg.fallbackRoute(startPoint, endPoint, startNode, endNode, cfg);\n};","import { __assign } from \"tslib\";\nimport { mix, each, isArray, isString } from '@antv/util';\nimport { registerEdge, Util, BaseGlobal as Global } from '@antv/g6-core';\nimport { getPathWithBorderRadiusByPolyline, getPolylinePoints, removeRedundantPoint } from './polyline-util';\nimport { pathFinder } from './router';\n// 折线\nregisterEdge('polyline', {\n options: {\n color: Global.defaultEdge.color,\n size: Global.defaultEdge.size,\n style: {\n radius: 0,\n offset: 15,\n x: 0,\n y: 0,\n stroke: Global.defaultEdge.style.stroke,\n lineAppendWidth: Global.defaultEdge.style.lineAppendWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.edgeLabel.style.fill,\n fontSize: Global.edgeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n routeCfg: {\n obstacles: [],\n maxAllowedDirectionChange: Math.PI,\n maximumLoops: 500,\n gridSize: 10 // 指定精度\n },\n\n stateStyles: __assign({}, Global.edgeStateStyles)\n },\n shapeType: 'polyline',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var shapeStyle = this.getShapeStyle(cfg);\n if (shapeStyle.radius === 0) delete shapeStyle.radius;\n var keyShape = group.addShape('path', {\n className: 'edge-shape',\n name: 'edge-shape',\n attrs: shapeStyle\n });\n group['shapeMap']['edge-shape'] = keyShape;\n return keyShape;\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var strokeStyle = {\n stroke: cfg.color\n };\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n cfg = this.getPathPoints(cfg);\n this.radius = style.radius;\n this.offset = style.offset;\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg);\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var radius = style.radius;\n var defaultRouteCfg = this.options.routeCfg;\n var routeCfg = mix({}, defaultRouteCfg, cfg.routeCfg);\n routeCfg.offset = style.offset;\n var path = this.getPath(points, source, target, radius, routeCfg, !Boolean(controlPoints));\n if (isArray(path) && path.length <= 1 || isString(path) && path.indexOf('L') === -1) {\n path = 'M0 0, L0 0';\n }\n if (isNaN(startPoint.x) || isNaN(startPoint.y) || isNaN(endPoint.x) || isNaN(endPoint.y)) {\n path = 'M0 0, L0 0';\n }\n var attrs = mix({}, Global.defaultEdge.style, style, {\n lineWidth: cfg.size,\n path: path\n });\n return attrs;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item) {\n var group = item.getContainer();\n if (!item.isVisible()) return;\n var strokeStyle = {\n stroke: cfg.color\n };\n var shape = group['shapeMap']['edge-shape'] || group.find(function (element) {\n return element.get('className') === 'edge-shape';\n }) || item.getKeyShape();\n var size = cfg.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg); // || cfg.controlPoints;\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var currentAttr = shape.attr();\n var previousStyle = mix({}, strokeStyle, currentAttr, cfg.style);\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var radius = previousStyle.radius;\n var defaultRouteCfg = this.options.routeCfg;\n var routeCfg = mix({}, defaultRouteCfg, cfg.routeCfg);\n routeCfg.offset = previousStyle.offset;\n var path = this.getPath(points, source, target, radius, routeCfg, !Boolean(controlPoints));\n if (isArray(path) && path.length <= 1 || isString(path) && path.indexOf('L') === -1) {\n path = 'M0 0, L0 0';\n }\n if (isNaN(startPoint.x) || isNaN(startPoint.y) || isNaN(endPoint.x) || isNaN(endPoint.y)) {\n path = 'M0 0, L0 0';\n }\n if (currentAttr.endArrow && previousStyle.endArrow === false) {\n cfg.style.endArrow = {\n path: ''\n };\n }\n if (currentAttr.startArrow && previousStyle.startArrow === false) {\n cfg.style.startArrow = {\n path: ''\n };\n }\n var style = mix(strokeStyle, shape.attr(), {\n lineWidth: size,\n path: path\n }, cfg.style);\n if (shape) {\n shape.attr(style);\n }\n },\n getPath: function getPath(points, source, target, radius, routeCfg, auto) {\n var offset = routeCfg.offset,\n obstacles = routeCfg.obstacles;\n var simple = routeCfg.simple;\n // 指定了控制点\n if (!offset || points.length > 2 || auto === false) {\n if (radius) {\n return getPathWithBorderRadiusByPolyline(points, radius);\n }\n var pathArray_1 = [];\n each(points, function (point, index) {\n if (index === 0) {\n pathArray_1.push(['M', point.x, point.y]);\n } else {\n pathArray_1.push(['L', point.x, point.y]);\n }\n });\n return pathArray_1;\n }\n // 未指定控制点\n if (simple !== false && !(obstacles === null || obstacles === void 0 ? void 0 : obstacles.length)) simple = true;\n var polylinePoints = simple ? getPolylinePoints(points[points.length - 1], points[0], target, source, offset) : pathFinder(points[0], points[points.length - 1], source, target, routeCfg);\n if (!polylinePoints || !polylinePoints.length) return 'M0 0, L0 0';\n if (radius) {\n var res_1 = getPathWithBorderRadiusByPolyline(polylinePoints, radius);\n return res_1;\n }\n // 去除连续同 x 不同 y 的中间点;去除连续同 y 不同 x 的中间点\n polylinePoints = removeRedundantPoint(polylinePoints);\n var res = Util.pointsToPolygon(polylinePoints);\n return res;\n }\n}, 'single-edge');","import { isBoolean, isObject } from '@antv/util';\nimport Util from '../util';\nvar cloneEvent = Util.cloneEvent,\n isNaN = Util.isNaN;\nvar abs = Math.abs;\nvar DRAG_OFFSET = 10;\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n direction: 'both',\n enableOptimize: false,\n // drag-canvas 可拖动的扩展范围,默认为 0,即最多可以拖动一屏的位置\n // 当设置的值大于 0 时,即拖动可以超过一屏\n // 当设置的值小于 0 时,相当于缩小了可拖动范围\n // 具体实例可参考:https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IFfoS67_HssAAAAAAAAAAAAAARQnAQ\n scalableRange: 0,\n allowDragOnItem: false\n };\n },\n getEvents: function getEvents() {\n return {\n 'mousedown': 'onMouseDown',\n 'drag': 'onDragMove',\n 'dragend': 'onMouseUp',\n 'canvas:click': 'onMouseUp',\n 'keyup': 'onKeyUp',\n 'focus': 'onKeyUp',\n 'keydown': 'onKeyDown',\n 'touchstart': 'onTouchStart',\n 'touchmove': 'onTouchMove',\n 'touchend': 'onMouseUp'\n };\n },\n updateViewport: function updateViewport(e) {\n var origin = this.origin;\n var clientX = +e.clientX;\n var clientY = +e.clientY;\n if (isNaN(clientX) || isNaN(clientY)) {\n return;\n }\n var dx = clientX - origin.x;\n var dy = clientY - origin.y;\n if (this.get('direction') === 'x') {\n dy = 0;\n } else if (this.get('direction') === 'y') {\n dx = 0;\n }\n this.origin = {\n x: clientX,\n y: clientY\n };\n var width = this.graph.get('width');\n var height = this.graph.get('height');\n var graphCanvasBBox = this.graph.get('canvas').getCanvasBBox();\n var expandWidth = this.scalableRange;\n var expandHeight = this.scalableRange;\n // 若 scalableRange 是 0~1 的小数,则作为比例考虑\n if (expandWidth < 1 && expandWidth > -1) {\n expandWidth = width * expandWidth;\n expandHeight = height * expandHeight;\n }\n if (graphCanvasBBox.minX <= width + expandWidth && graphCanvasBBox.minX + dx > width + expandWidth || graphCanvasBBox.maxX + expandWidth >= 0 && graphCanvasBBox.maxX + expandWidth + dx < 0) {\n dx = 0;\n }\n if (graphCanvasBBox.minY <= height + expandHeight && graphCanvasBBox.minY + dy > height + expandHeight || graphCanvasBBox.maxY + expandHeight >= 0 && graphCanvasBBox.maxY + expandHeight + dy < 0) {\n dy = 0;\n }\n this.graph.translate(dx, dy);\n },\n onTouchStart: function onTouchStart(e) {\n var self = this;\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n // 如果是双指操作,不允许拖拽画布\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n this.mousedown = true;\n self.onDragStart(e);\n },\n onMouseDown: function onMouseDown(e) {\n this.mousedown = true;\n },\n onDragMove: function onDragMove(evt) {\n if (!this.mousedown) return;\n if (!this.dragstart) {\n // dragstart\n this.dragstart = true;\n this.onDragStart(evt);\n } else {\n // drag\n this.onDrag(evt);\n }\n },\n onDragStart: function onDragStart(e) {\n var self = this;\n var event = e.originalEvent;\n // TODO: 'name' doesn't exist on `IG6GraphEvent`, we should consider typing it so users get autocomplete and other benefits\n if (event && e.name !== 'touchstart' && event.button !== 0) {\n return;\n }\n if (e.name !== 'touchstart' && typeof window !== 'undefined' && window.event && !window.event.buttons && !window.event.button) {\n return;\n }\n if (!this.shouldBegin(e, this)) {\n return;\n }\n if (self.keydown) return;\n if (!this.allowDrag(e)) return;\n self.origin = {\n x: e.clientX,\n y: e.clientY\n };\n self.dragging = false;\n if (this.enableOptimize) {\n // 拖动 canvas 过程中隐藏所有的边及label\n var graph = this.graph;\n var edges = graph.getEdges();\n for (var i = 0, len = edges.length; i < len; i++) {\n var shapes = edges[i].get('group').get('children');\n if (!shapes) continue;\n shapes.forEach(function (shape) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n });\n }\n var nodes = graph.getNodes();\n for (var j = 0, nodeLen = nodes.length; j < nodeLen; j++) {\n var container = nodes[j].getContainer();\n var children = container.get('children');\n for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {\n var child = children_1[_i];\n var isKeyShape = child.get('isKeyShape');\n if (!isKeyShape) {\n child.set('ori-visibility', child.get('ori-visibility') || child.get('visible'));\n child.hide();\n }\n }\n }\n }\n // 绑定浏览器右键监听,触发拖拽结束,结束拖拽时移除\n if (typeof window !== 'undefined') {\n var self_1 = this;\n this.handleDOMContextMenu = function (e) {\n return self_1.onMouseUp(e);\n };\n document.body.addEventListener('contextmenu', this.handleDOMContextMenu);\n }\n },\n onTouchMove: function onTouchMove(e) {\n var self = this;\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n // 如果是双指操作,不允许拖拽画布,结束拖拽\n if (event1 && event2) {\n this.onMouseUp(e);\n return;\n }\n e.preventDefault();\n self.onDrag(e);\n },\n onDrag: function onDrag(e) {\n if (!this.mousedown) return;\n var graph = this.graph;\n if (this.keydown) return;\n if (!this.allowDrag(e)) return;\n e = cloneEvent(e);\n if (!this.origin) {\n return;\n }\n if (!this.dragging) {\n if (abs(this.origin.x - e.clientX) + abs(this.origin.y - e.clientY) < DRAG_OFFSET) {\n return;\n }\n if (this.shouldBegin(e, this)) {\n e.type = 'dragstart';\n graph.emit('canvas:dragstart', e);\n this.originPosition = {\n x: e.clientX,\n y: e.clientY\n };\n this.dragging = true;\n }\n } else {\n e.type = 'drag';\n graph.emit('canvas:drag', e);\n }\n if (this.shouldUpdate(e, this)) {\n this.updateViewport(e);\n }\n },\n onMouseUp: function onMouseUp(e) {\n var _a, _b;\n this.mousedown = false;\n this.dragstart = false;\n var graph = this.graph;\n if (this.keydown) return;\n var currentZoom = graph.getZoom();\n var modeController = graph.get('modeController');\n var zoomCanvas = (_b = (_a = modeController === null || modeController === void 0 ? void 0 : modeController.modes[modeController.mode]) === null || _a === void 0 ? void 0 : _a.filter(function (behavior) {\n return behavior.type === 'zoom-canvas';\n })) === null || _b === void 0 ? void 0 : _b[0];\n var optimizeZoom = zoomCanvas ? zoomCanvas.optimizeZoom || 0.1 : 0;\n if (this.enableOptimize) {\n // 拖动结束后显示所有的边\n var edges = graph.getEdges();\n for (var i = 0, len = edges.length; i < len; i++) {\n var shapes = edges[i].get('group').get('children');\n if (!shapes) continue;\n shapes.forEach(function (shape) {\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (oriVis) shape.show();\n });\n }\n if (currentZoom > optimizeZoom) {\n var nodes = graph.getNodes();\n for (var j = 0, nodeLen = nodes.length; j < nodeLen; j++) {\n var container = nodes[j].getContainer();\n var children = container.get('children');\n for (var _i = 0, children_2 = children; _i < children_2.length; _i++) {\n var child = children_2[_i];\n var isKeyShape = child.get('isKeyShape');\n if (!isKeyShape) {\n var oriVis = child.get('ori-visibility');\n child.set('ori-visibility', undefined);\n if (oriVis) child.show();\n }\n }\n }\n }\n }\n if (!this.dragging) {\n this.origin = null;\n return;\n }\n e = cloneEvent(e);\n if (this.shouldEnd(e, this)) {\n this.updateViewport(e);\n }\n e.type = 'dragend';\n e.dx = e.clientX - this.originPosition.x;\n e.dy = e.clientY - this.originPosition.y;\n graph.emit('canvas:dragend', e);\n this.endDrag();\n // 结束拖拽时移除浏览器右键监听\n if (typeof window !== 'undefined') {\n document.body.removeEventListener('contextmenu', this.handleDOMContextMenu);\n }\n },\n endDrag: function endDrag() {\n this.origin = null;\n this.dragging = false;\n this.dragbegin = false;\n this.mousedown = false;\n this.dragstart = false;\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (ALLOW_EVENTS.indexOf(code.toLowerCase()) > -1) {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n this.keydown = false;\n this.origin = null;\n this.dragging = false;\n this.dragbegin = false;\n },\n allowDrag: function allowDrag(evt) {\n var _a, _b;\n var target = evt.target;\n var targetIsCanvas = target && target.isCanvas && target.isCanvas();\n if (isBoolean(this.allowDragOnItem) && !this.allowDragOnItem && !targetIsCanvas) return false;\n if (isObject(this.allowDragOnItem)) {\n var _c = this.allowDragOnItem,\n node = _c.node,\n edge = _c.edge,\n combo = _c.combo;\n var itemType = (_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (!node && itemType === 'node') return false;\n if (!edge && itemType === 'edge') return false;\n if (!combo && itemType === 'combo') return false;\n }\n return true;\n }\n};","import { __assign } from \"tslib\";\nimport { clone, debounce, deepMix } from '@antv/util';\nimport Global from '../global';\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n updateEdge: true,\n delegateStyle: {},\n // 是否开启delegate\n enableDelegate: false,\n // 拖动节点过程中是否只改变 Combo 的大小,而不改变其结构\n onlyChangeComboSize: false,\n // 拖动过程中目标 combo 状态样式\n comboActiveState: '',\n selectedState: 'selected',\n enableOptimize: false,\n enableDebounce: false,\n enableStack: true\n };\n },\n getEvents: function getEvents() {\n return {\n 'node:mousedown': 'onMouseDown',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n 'combo:dragenter': 'onDragEnter',\n 'combo:dragleave': 'onDragLeave',\n 'combo:drop': 'onDropCombo',\n 'node:drop': 'onDropNode',\n 'canvas:drop': 'onDropCanvas',\n touchstart: 'onTouchStart',\n touchmove: 'onTouchMove',\n touchend: 'onDragEnd',\n afterchangedata: 'onDragEnd'\n };\n },\n validationCombo: function validationCombo(item) {\n if (!this.origin || !item || item.destroyed) {\n return false;\n }\n var type = item.getType();\n if (type !== 'combo') {\n return false;\n }\n return true;\n },\n onTouchStart: function onTouchStart(evt) {\n if (!evt.item) return;\n var self = this;\n try {\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n evt.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n this.mousedown = {\n item: evt.item,\n target: evt.target,\n origin: {\n x: evt.x,\n y: evt.y\n }\n };\n this.dragstart = true;\n self.onDragStart(evt);\n },\n onTouchMove: function onTouchMove(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n self.onDragEnd(e);\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.onDrag(e);\n },\n /**\n * cache the manipulated item and target, since drag and dragend are global events but not node:*\n * @param evt event param\n */\n onMouseDown: function onMouseDown(evt) {\n this.mousedown = {\n item: evt.item,\n target: evt.target,\n origin: {\n x: evt.x,\n y: evt.y\n }\n };\n // 绑定浏览器监听,触发拖拽结束,结束拖拽时移除\n if (typeof window !== 'undefined' && !this.windowEventBinded) {\n this.windowEventBinded = true;\n document.body.addEventListener('contextmenu', this.onDragEnd.bind(this));\n document.body.addEventListener('mouseup', this.onDragEnd.bind(this));\n }\n },\n /**\n * trigger dragstart/drag by mousedown and drag events\n * @param evt event param\n */\n onDragMove: function onDragMove(evt) {\n var _a, _b;\n if (((_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a)) !== 'node') {\n this.onDragEnd();\n return;\n }\n if (!this.mousedown) return;\n if (!this.dragstart) {\n // dragstart\n this.dragstart = true;\n this.onDragStart(evt);\n } else {\n // drag\n this.onDrag(__assign(__assign({}, evt), this.mousedown));\n }\n },\n /**\n * 开始拖动节点\n * @param evt\n */\n onDragStart: function onDragStart(evt) {\n var _this = this;\n this.currentShouldEnd = true;\n if (!this.shouldBegin(__assign(__assign({}, evt), this.mousedown), this)) {\n return;\n }\n var _a = this.mousedown,\n item = _a.item,\n target = _a.target;\n if (!item || item.destroyed || item.hasLocked()) {\n return;\n }\n // 拖动时,设置拖动元素的 capture 为false,则不拾取拖动的元素\n var group = item.getContainer();\n group.set('capture', false);\n if (!this.cachedCaptureItems) this.cachedCaptureItems = [];\n this.cachedCaptureItems.push(item);\n // 如果拖动的target 是linkPoints / anchorPoints 则不允许拖动\n if (target) {\n var isAnchorPoint = target.get('isAnchorPoint');\n if (isAnchorPoint) {\n return;\n }\n }\n var graph = this.graph;\n this.targets = [];\n // 将节点拖入到指定的 Combo\n this.targetCombo = null;\n // 获取所有选中的元素\n var nodes = graph.findAllByState('node', this.selectedState);\n var currentNodeId = item.get('id');\n // 当前拖动的节点是否是选中的节点\n var dragNodes = nodes.filter(function (node) {\n var nodeId = node.get('id');\n return currentNodeId === nodeId;\n });\n // 只拖动当前节点\n if (dragNodes.length === 0) {\n this.targets.push(item);\n } else if (nodes.length > 1) {\n // 拖动多个节点\n nodes.forEach(function (node) {\n var locked = node.hasLocked();\n if (!locked) {\n _this.targets.push(node);\n }\n });\n } else {\n this.targets.push(item);\n }\n if (this.graph.get('enabledStack') && this.enableStack) {\n var beforeDragNodes_1 = [];\n this.targets.forEach(function (t) {\n var _a = t.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n beforeDragNodes_1.push({\n x: x,\n y: y,\n id: id\n });\n });\n this.set('beforeDragNodes', beforeDragNodes_1);\n }\n this.hidenEdge = {};\n if (this.get('updateEdge') && this.enableOptimize && !this.enableDelegate) {\n this.targets.forEach(function (node) {\n var edges = node.getEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return;\n _this.hidenEdge[edge.getID()] = true;\n edge.hide();\n });\n });\n }\n this.origin = this.mousedown.origin;\n this.point = {};\n this.originPoint = {};\n },\n /**\n * 持续拖动节点\n * @param evt\n */\n onDrag: function onDrag(evt) {\n var _this = this;\n if (!this.mousedown || !this.origin) return;\n if (!this.shouldUpdate(evt, this)) return;\n if (this.get('enableDelegate')) {\n this.updateDelegate(evt);\n } else {\n if (this.enableDebounce) {\n this.debounceUpdate({\n targets: this.targets,\n graph: this.graph,\n point: this.point,\n origin: this.origin,\n evt: evt,\n updateEdge: this.get('updateEdge'),\n onlyChangeComboSize: this.onlyChangeComboSize,\n updateParentCombos: this.updateParentCombos\n });\n } else {\n var parentComboMap_1 = {};\n this.targets.map(function (target) {\n _this.update(target, evt);\n var parentComboId = target.getModel().comboId;\n if (parentComboId) parentComboMap_1[parentComboId] = _this.graph.findById(parentComboId);\n });\n if (this.onlyChangeComboSize) {\n // 拖动节点过程中,动态改变 Combo 的大小\n this.updateParentCombos();\n }\n }\n }\n },\n /**\n * 拖动结束,设置拖动元素capture为true,更新元素位置,如果是拖动涉及到 combo,则更新 combo 结构\n * @param evt\n */\n onDragEnd: function onDragEnd(evt) {\n var _this = this;\n var _a;\n this.mousedown = false;\n this.dragstart = false;\n // 移除浏览器监听\n if (typeof window !== 'undefined' && this.windowEventBinded) {\n this.windowEventBinded = false;\n document.body.removeEventListener('contextmenu', this.onDragEnd.bind(this));\n document.body.removeEventListener('mouseup', this.onDragEnd.bind(this));\n }\n if (!this.origin) {\n return;\n }\n // 拖动结束后,设置拖动元素 group 的 capture 为 true,允许拾取拖动元素\n (_a = this.cachedCaptureItems) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {\n var group = item.getContainer();\n group.set('capture', true);\n });\n this.cachedCaptureItems = [];\n if (this.delegateRect) {\n this.delegateRect.remove();\n this.delegateRect = null;\n }\n if (this.get('updateEdge') && this.enableOptimize && !this.enableDelegate) {\n this.targets.forEach(function (node) {\n var edges = node.getEdges();\n edges.forEach(function (edge) {\n if (_this.hidenEdge[edge.getID()]) edge.show();\n edge.refresh();\n });\n });\n }\n this.hidenEdge = {};\n var graph = this.graph;\n // 拖动结束后,入栈\n if (graph.get('enabledStack') && this.enableStack) {\n var stackData_1 = {\n before: {\n nodes: [],\n edges: [],\n combos: []\n },\n after: {\n nodes: [],\n edges: [],\n combos: []\n }\n };\n this.get('beforeDragNodes').forEach(function (model) {\n stackData_1.before.nodes.push(model);\n });\n this.targets.forEach(function (target) {\n var _a = target.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n stackData_1.after.nodes.push({\n x: x,\n y: y,\n id: id\n });\n });\n graph.pushStack('update', clone(stackData_1));\n }\n // 拖动结束后emit事件,将当前操作的节点抛出去,目标节点为null\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: null\n });\n this.point = {};\n this.origin = null;\n this.originPoint = {};\n this.targets.length = 0;\n this.targetCombo = null;\n },\n /**\n * 拖动过程中将节点放置到 combo 上\n * @param evt\n */\n onDropCombo: function onDropCombo(evt) {\n var item = evt.item;\n this.currentShouldEnd = this.shouldEnd(evt, item, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd || !this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, false);\n }\n this.targetCombo = item;\n // 拖动结束后是动态改变 Combo 大小还是将节点从 Combo 中删除\n if (this.onlyChangeComboSize) {\n // 拖动节点结束后,动态改变 Combo 的大小\n graph.updateCombos();\n } else {\n var targetComboModel_1 = item.getModel();\n this.targets.map(function (node) {\n var nodeModel = node.getModel();\n if (nodeModel.comboId !== targetComboModel_1.id) {\n graph.updateComboTree(node, targetComboModel_1.id);\n }\n });\n graph.updateCombo(item);\n }\n // 将节点拖动到 combo 上面,emit事件抛出当前操作的节点及目标 combo\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: this.targetCombo\n });\n },\n onDropCanvas: function onDropCanvas(evt) {\n var graph = this.graph;\n this.currentShouldEnd = this.shouldEnd(evt, undefined, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.targets || this.targets.length === 0 || !this.currentShouldEnd) return;\n if (this.onlyChangeComboSize) {\n this.updateParentCombos();\n } else {\n this.targets.map(function (node) {\n // 拖动的节点有 comboId,即是从其他 combo 中拖出时才处理\n var model = node.getModel();\n if (model.comboId) {\n graph.updateComboTree(node);\n }\n });\n }\n },\n /**\n * 拖动放置到某个 combo 中的子 node 上\n * @param evt\n */\n onDropNode: function onDropNode(evt) {\n if (!this.targets || this.targets.length === 0) return;\n var self = this;\n var item = evt.item;\n var graph = self.graph;\n var comboId = item.getModel().comboId;\n var newParentCombo = comboId ? graph.findById(comboId) : undefined;\n this.currentShouldEnd = this.shouldEnd(evt, newParentCombo, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd) return;\n if (this.onlyChangeComboSize) {\n this.updateParentCombos();\n } else if (comboId) {\n var combo = graph.findById(comboId);\n if (self.comboActiveState) {\n graph.setItemState(combo, self.comboActiveState, false);\n }\n this.targets.map(function (node) {\n var nodeModel = node.getModel();\n if (comboId !== nodeModel.comboId) {\n graph.updateComboTree(node, comboId);\n }\n });\n graph.updateCombo(combo);\n } else {\n this.targets.map(function (node) {\n var model = node.getModel();\n if (model.comboId) {\n graph.updateComboTree(node);\n }\n });\n }\n // 将节点拖动到另外个节点上面,emit 事件抛出当前操作的节点及目标节点\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: item\n });\n },\n /**\n * 将节点拖入到 Combo 中\n * @param evt\n */\n onDragEnter: function onDragEnter(evt) {\n var item = evt.item;\n if (!this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, true);\n }\n },\n /**\n * 将节点从 Combo 中拖出\n * @param evt\n */\n onDragLeave: function onDragLeave(evt) {\n var item = evt.item;\n if (!this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, false);\n }\n },\n updatePositions: function updatePositions(evt, restore) {\n var _this = this;\n if (!this.targets || this.targets.length === 0) return;\n // 当开启 delegate 时,拖动结束后需要更新所有已选中节点的位置\n if (this.get('enableDelegate')) {\n if (this.enableDebounce) this.debounceUpdate({\n targets: this.targets,\n graph: this.graph,\n point: this.point,\n origin: this.origin,\n evt: evt,\n updateEdge: this.get('updateEdge'),\n onlyChangeComboSize: this.onlyChangeComboSize,\n updateParentCombos: this.updateParentCombos\n });else if (!restore) this.targets.map(function (node) {\n return _this.update(node, evt);\n });\n } else this.targets.map(function (node) {\n return _this.update(node, evt, restore);\n });\n },\n /**\n * 更新节点\n * @param item 拖动的节点实例\n * @param evt\n */\n update: function update(item, evt, restore) {\n var origin = this.origin;\n var model = item.get('model');\n var nodeId = item.get('id');\n if (!this.point[nodeId]) {\n this.point[nodeId] = {\n x: model.x || 0,\n y: model.y || 0\n };\n }\n var x = evt.x - origin.x + this.point[nodeId].x;\n var y = evt.y - origin.y + this.point[nodeId].y;\n if (restore) {\n x += origin.x - evt.x;\n y += origin.y - evt.y;\n }\n var pos = {\n x: x,\n y: y\n };\n if (this.get('updateEdge')) {\n this.graph.updateItem(item, pos, false);\n } else {\n item.updatePosition(pos);\n }\n },\n /**\n * 限流更新节点\n * @param item 拖动的节点实例\n * @param evt\n */\n debounceUpdate: debounce(function (event) {\n var targets = event.targets,\n graph = event.graph,\n point = event.point,\n origin = event.origin,\n evt = event.evt,\n updateEdge = event.updateEdge,\n onlyChangeComboSize = event.onlyChangeComboSize,\n updateParentCombos = event.updateParentCombos;\n targets.map(function (item) {\n var model = item.get('model');\n var nodeId = item.get('id');\n if (!point[nodeId]) {\n point[nodeId] = {\n x: model.x || 0,\n y: model.y || 0\n };\n }\n var x = evt.x - origin.x + point[nodeId].x;\n var y = evt.y - origin.y + point[nodeId].y;\n var pos = {\n x: x,\n y: y\n };\n if (updateEdge) {\n graph.updateItem(item, pos, false);\n } else {\n item.updatePosition(pos);\n }\n });\n if (onlyChangeComboSize) {\n updateParentCombos(graph, targets);\n }\n }, 50, true),\n /**\n * 更新拖动元素时的delegate\n * @param {Event} evt 事件句柄\n * @param {number} x 拖动单个元素时候的x坐标\n * @param {number} y 拖动单个元素时候的y坐标\n */\n updateDelegate: function updateDelegate(evt) {\n var graph = this.graph;\n if (!this.delegateRect) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = deepMix({}, Global.delegateStyle, this.delegateStyle);\n var _a = this.calculationGroupPosition(evt),\n cx = _a.x,\n cy = _a.y,\n width = _a.width,\n height = _a.height,\n minX = _a.minX,\n minY = _a.minY;\n this.originPoint = {\n x: cx,\n y: cy,\n width: width,\n height: height,\n minX: minX,\n minY: minY\n };\n // model上的x, y是相对于图形中心的,delegateShape是g实例,x,y是绝对坐标\n this.delegateRect = parent_1.addShape('rect', {\n attrs: __assign({\n width: width,\n height: height,\n x: cx,\n y: cy\n }, attrs),\n name: 'rect-delegate-shape'\n });\n this.delegate = this.delegateRect;\n this.delegateRect.set('capture', false);\n } else {\n var clientX = evt.x - this.origin.x + this.originPoint.minX;\n var clientY = evt.y - this.origin.y + this.originPoint.minY;\n this.delegateRect.attr({\n x: clientX,\n y: clientY\n });\n }\n },\n /**\n * 计算delegate位置,包括左上角左边及宽度和高度\n * @memberof ItemGroup\n * @return {object} 计算出来的delegate坐标信息及宽高\n */\n calculationGroupPosition: function calculationGroupPosition(evt) {\n var nodes = this.targets;\n if (nodes.length === 0) {\n nodes.push(evt.item);\n }\n var minx = Infinity;\n var maxx = -Infinity;\n var miny = Infinity;\n var maxy = -Infinity;\n // 获取已节点的所有最大最小x y值\n for (var i = 0; i < nodes.length; i++) {\n var element = nodes[i];\n var bbox = element.getBBox();\n var minX = bbox.minX,\n minY = bbox.minY,\n maxX = bbox.maxX,\n maxY = bbox.maxY;\n if (minX < minx) {\n minx = minX;\n }\n if (minY < miny) {\n miny = minY;\n }\n if (maxX > maxx) {\n maxx = maxX;\n }\n if (maxY > maxy) {\n maxy = maxY;\n }\n }\n var x = Math.floor(minx);\n var y = Math.floor(miny);\n var width = Math.ceil(maxx) - Math.floor(minx);\n var height = Math.ceil(maxy) - Math.floor(miny);\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minx,\n minY: miny\n };\n },\n /**\n * updates the parent combos' size and position\n * @param paramGraph param for debounce function, where 'this' is not available\n * @param paramTargets param for debounce function, where 'this' is not available\n */\n updateParentCombos: function updateParentCombos(paramGraph, paramTargets) {\n var graph = paramGraph || this.graph;\n var targets = paramTargets || this.targets;\n var comboParentMap = {};\n targets === null || targets === void 0 ? void 0 : targets.forEach(function (target) {\n var comboId = target.getModel().comboId;\n if (comboId) comboParentMap[comboId] = graph.findById(comboId);\n });\n Object.values(comboParentMap).forEach(function (combo) {\n if (combo) graph.updateCombo(combo);\n });\n }\n};","import { throttle } from '@antv/util';\nvar clickNodeId = null;\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n // 可选 mouseenter || click\n // 选择 click 会监听 touch,mouseenter 不会监听\n trigger: 'mouseenter',\n activeState: 'active',\n inactiveState: 'inactive',\n resetSelected: false,\n shouldClearStatusOnSecond: false,\n shouldUpdate: function shouldUpdate() {\n return true;\n }\n };\n },\n getEvents: function getEvents() {\n if (this.get('trigger') === 'mouseenter') {\n return {\n 'node:mouseenter': 'setAllItemStates',\n 'combo:mouseenter': 'setAllItemStates',\n 'node:mouseleave': 'clearActiveState',\n 'combo:mouseleave': 'clearActiveState'\n };\n }\n return {\n 'node:click': 'setAllItemStates',\n 'combo:click': 'setAllItemStates',\n 'canvas:click': 'clearActiveState',\n 'node:touchstart': 'setOnTouchStart',\n 'combo:touchstart': 'setOnTouchStart',\n 'canvas:touchstart': 'clearOnTouchStart'\n };\n },\n setOnTouchStart: function setOnTouchStart(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.setAllItemStates(e);\n },\n clearOnTouchStart: function clearOnTouchStart(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.clearActiveState(e);\n },\n setAllItemStates: function setAllItemStates(e) {\n clearTimeout(this.timer);\n this.throttleSetAllItemStates(e, this);\n },\n clearActiveState: function clearActiveState(e) {\n var _this = this;\n // avoid clear state frequently, it costs a lot since all the items' states on the graph need to be cleared\n var shouldClearStatusOnSecond = this.shouldClearStatusOnSecond;\n if (shouldClearStatusOnSecond) {\n clickNodeId = null;\n }\n this.timer = setTimeout(function () {\n _this.throttleClearActiveState(e, _this);\n }, 50);\n },\n throttleSetAllItemStates: throttle(function (e, self) {\n var item = e.item;\n var graph = self.graph;\n if (!graph || graph.destroyed) return;\n self.item = item;\n if (!self.shouldUpdate(e.item, {\n event: e,\n action: 'activate'\n }, self)) {\n return;\n }\n var shouldClearStatusOnSecond = self.shouldClearStatusOnSecond;\n var currentNodeId = item.getModel().id;\n if (clickNodeId === currentNodeId && shouldClearStatusOnSecond) {\n self.throttleClearActiveState(e, self);\n clickNodeId = null;\n return;\n }\n var activeState = self.activeState;\n var inactiveState = self.inactiveState;\n var nodes = graph.getNodes();\n var combos = graph.getCombos();\n var edges = graph.getEdges();\n var vEdges = graph.get('vedges');\n var nodeLength = nodes.length;\n var comboLength = combos.length;\n var edgeLength = edges.length;\n var vEdgeLength = vEdges.length;\n var inactiveItems = self.inactiveItems || {};\n var activeItems = self.activeItems || {};\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var nodeId = node.getID();\n var hasSelected = node.hasState('selected');\n if (self.resetSelected) {\n if (hasSelected) {\n graph.setItemState(node, 'selected', false);\n }\n }\n if (activeItems[nodeId]) {\n graph.setItemState(node, activeState, false);\n delete activeItems[nodeId];\n }\n if (inactiveState && !inactiveItems[nodeId]) {\n graph.setItemState(node, inactiveState, true);\n inactiveItems[nodeId] = node;\n }\n }\n for (var i = 0; i < comboLength; i++) {\n var combo = combos[i];\n var comboId = combo.getID();\n var hasSelected = combo.hasState('selected');\n if (self.resetSelected) {\n if (hasSelected) {\n graph.setItemState(combo, 'selected', false);\n }\n }\n if (activeItems[comboId]) {\n graph.setItemState(combo, activeState, false);\n delete activeItems[comboId];\n }\n if (inactiveState && !inactiveItems[comboId]) {\n graph.setItemState(combo, inactiveState, true);\n inactiveItems[comboId] = combo;\n }\n }\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var edgeId = edge.getID();\n if (activeItems[edgeId]) {\n graph.setItemState(edge, activeState, false);\n delete activeItems[edgeId];\n }\n if (inactiveState && !inactiveItems[edgeId]) {\n graph.setItemState(edge, inactiveState, true);\n inactiveItems[edgeId] = edge;\n }\n }\n for (var i = 0; i < vEdgeLength; i++) {\n var vEdge = vEdges[i];\n var vEdgeId = vEdge.getID();\n if (activeItems[vEdgeId]) {\n graph.setItemState(vEdge, activeState, false);\n delete activeItems[vEdgeId];\n }\n if (inactiveState && !inactiveItems[vEdgeId]) {\n graph.setItemState(vEdge, inactiveState, true);\n inactiveItems[vEdgeId] = vEdge;\n }\n }\n if (item && !item.destroyed) {\n if (inactiveState) {\n graph.setItemState(item, inactiveState, false);\n delete inactiveItems[item.getID()];\n }\n if (!activeItems[item.getID()]) {\n graph.setItemState(item, activeState, true);\n activeItems[item.getID()] = item;\n }\n var rEdges = item.getEdges();\n var rEdgeLegnth = rEdges.length;\n for (var i = 0; i < rEdgeLegnth; i++) {\n var edge = rEdges[i];\n var edgeId = edge.getID();\n var otherEnd = void 0;\n if (edge.getSource() === item) {\n otherEnd = edge.getTarget();\n } else {\n otherEnd = edge.getSource();\n }\n var otherEndId = otherEnd.getID();\n if (inactiveState && inactiveItems[otherEndId]) {\n graph.setItemState(otherEnd, inactiveState, false);\n delete inactiveItems[otherEndId];\n }\n if (!activeItems[otherEndId]) {\n graph.setItemState(otherEnd, activeState, true);\n activeItems[otherEndId] = otherEnd;\n }\n if (inactiveItems[edgeId]) {\n graph.setItemState(edge, inactiveState, false);\n delete inactiveItems[edgeId];\n }\n if (!activeItems[edgeId]) {\n graph.setItemState(edge, activeState, true);\n activeItems[edgeId] = edge;\n }\n edge.toFront();\n }\n }\n self.activeItems = activeItems;\n self.inactiveItems = inactiveItems;\n if (shouldClearStatusOnSecond) {\n clickNodeId = item.getModel().id;\n }\n graph.emit('afteractivaterelations', {\n item: e.item,\n action: 'activate'\n });\n }, 50, {\n trailing: true,\n leading: true\n }),\n throttleClearActiveState: throttle(function (e, self) {\n var graph = self.get('graph');\n if (!graph || graph.destroyed) return;\n if (!self.shouldUpdate(e.item, {\n event: e,\n action: 'deactivate'\n }, self)) return;\n var activeState = self.activeState;\n var inactiveState = self.inactiveState;\n var activeItems = self.activeItems || {};\n var inactiveItems = self.inactiveItems || {};\n Object.values(activeItems).filter(function (item) {\n return !item.destroyed;\n }).forEach(function (item) {\n graph.clearItemStates(item, activeState);\n });\n Object.values(inactiveItems).filter(function (item) {\n return !item.destroyed;\n }).forEach(function (item) {\n graph.clearItemStates(item, inactiveState);\n });\n self.activeItems = {};\n self.inactiveItems = {};\n graph.emit('afteractivaterelations', {\n item: e.item || self.get('item'),\n action: 'deactivate'\n });\n }, 50, {\n trailing: true,\n leading: true\n })\n};","var min = Math.min,\n max = Math.max,\n abs = Math.abs;\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['drag', 'shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n brushStyle: {\n fill: '#EEF6FF',\n fillOpacity: 0.4,\n stroke: '#DDEEFE',\n lineWidth: 1\n },\n onSelect: function onSelect() {},\n onDeselect: function onDeselect() {},\n selectedState: 'selected',\n trigger: DEFAULT_TRIGGER,\n includeEdges: true,\n includeCombos: false,\n selectOnCombo: false,\n selectedEdges: [],\n selectedNodes: [],\n selectedCombos: []\n };\n },\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (this.trigger === 'drag') {\n return {\n dragstart: 'onMouseDown',\n drag: 'onMouseMove',\n dragend: 'onMouseUp',\n 'canvas:click': 'clearStates'\n };\n }\n return {\n dragstart: 'onMouseDown',\n drag: 'onMouseMove',\n dragend: 'onMouseUp',\n 'canvas:click': 'clearStates',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onMouseDown: function onMouseDown(e) {\n // 按在node上面拖动时候不应该是框选\n var item = e.item;\n var brush = this.brush;\n var selectOnCombo = this.selectOnCombo;\n var isCombo = (item === null || item === void 0 ? void 0 : item.getType()) === 'combo';\n // 若在 combo 上操作,且不允许在 combo 上选择,则不继续\n if (isCombo && !selectOnCombo) {\n return;\n }\n // 若不在 combo 上操作,而是其他的 item ,则不继续\n if (!isCombo && item) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n if (this.selectedNodes && this.selectedNodes.length !== 0) {\n this.clearStates();\n }\n if (!brush) {\n brush = this.createBrush();\n }\n this.originPoint = {\n x: e.canvasX,\n y: e.canvasY\n };\n brush.attr({\n width: 0,\n height: 0\n });\n brush.show();\n this.dragging = true;\n },\n onMouseMove: function onMouseMove(e) {\n if (!this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.updateBrush(e);\n },\n onMouseUp: function onMouseUp(e) {\n var graph = this.graph;\n // TODO: 触发了 canvas:click 导致 clearStates\n if (!this.brush && !this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.brush.remove(true); // remove and destroy\n this.brush = null;\n this.getSelectedNodes(e);\n this.dragging = false;\n },\n clearStates: function clearStates() {\n var _a = this,\n graph = _a.graph,\n selectedState = _a.selectedState;\n var nodes = graph.findAllByState('node', selectedState);\n var edges = graph.findAllByState('edge', selectedState);\n var combos = graph.findAllByState('combo', selectedState);\n nodes.forEach(function (node) {\n return graph.setItemState(node, selectedState, false);\n });\n edges.forEach(function (edge) {\n return graph.setItemState(edge, selectedState, false);\n });\n combos.forEach(function (combo) {\n return graph.setItemState(combo, selectedState, false);\n });\n this.selectedNodes = [];\n this.selectedEdges = [];\n this.selectedCombos = [];\n if (this.onDeselect) {\n this.onDeselect(this.selectedNodes, this.selectedEdges, this.selectedCombos);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: [],\n combos: []\n },\n select: false\n });\n },\n isBBoxCenterInRect: function isBBoxCenterInRect(item, left, right, top, bottom) {\n var bbox = item.getBBox();\n return bbox.centerX >= left && bbox.centerX <= right && bbox.centerY >= top && bbox.centerY <= bottom;\n },\n getSelectedNodes: function getSelectedNodes(e) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n originPoint = _a.originPoint,\n shouldUpdate = _a.shouldUpdate,\n isBBoxCenterInRect = _a.isBBoxCenterInRect;\n var state = this.selectedState;\n var p1 = {\n x: e.x,\n y: e.y\n };\n var p2 = graph.getPointByCanvas(originPoint.x, originPoint.y);\n var left = min(p1.x, p2.x);\n var right = max(p1.x, p2.x);\n var top = min(p1.y, p2.y);\n var bottom = max(p1.y, p2.y);\n var selectedNodes = [];\n var selectedIds = [];\n graph.getNodes().forEach(function (node) {\n if (node.isVisible() &&\n // 隐藏节点不能被选中\n isBBoxCenterInRect(node, left, right, top, bottom) && shouldUpdate(node, 'select', _this)) {\n selectedNodes.push(node);\n var model = node.getModel();\n selectedIds.push(model.id);\n graph.setItemState(node, state, true);\n }\n });\n var selectedEdges = [];\n if (this.includeEdges) {\n // 选中边,边的source和target都在选中的节点中时才选中\n selectedNodes.forEach(function (node) {\n var edges = node.getOutEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return; // 隐藏边不能够被选中\n var model = edge.getModel();\n var source = model.source,\n target = model.target;\n if (selectedIds.includes(source) && selectedIds.includes(target) && shouldUpdate(edge, 'select', _this)) {\n selectedEdges.push(edge);\n graph.setItemState(edge, _this.selectedState, true);\n }\n });\n });\n }\n var selectedCombos = [];\n if (this.includeCombos) {\n graph.getCombos().forEach(function (combo) {\n if (combo.isVisible() &&\n // 隐藏节点不能被选中\n isBBoxCenterInRect(combo, left, right, top, bottom) && shouldUpdate(combo, 'select', _this)) {\n selectedCombos.push(combo);\n var model = combo.getModel();\n selectedIds.push(model.id);\n graph.setItemState(combo, state, true);\n }\n });\n }\n this.selectedEdges = selectedEdges;\n this.selectedNodes = selectedNodes;\n this.selectedCombos = selectedCombos;\n if (this.onSelect) {\n this.onSelect(selectedNodes, selectedEdges, selectedCombos);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: true\n });\n },\n createBrush: function createBrush() {\n var self = this;\n var brush = self.graph.get('canvas').addShape('rect', {\n attrs: self.brushStyle,\n capture: false,\n name: 'brush-shape'\n });\n this.brush = brush;\n this.delegate = brush;\n return brush;\n },\n updateBrush: function updateBrush(e) {\n var originPoint = this.originPoint;\n this.brush.attr({\n width: abs(e.canvasX - originPoint.x),\n height: abs(e.canvasY - originPoint.y),\n x: min(e.canvasX, originPoint.x),\n y: min(e.canvasY, originPoint.y)\n });\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n var triggerLowerCase = this.trigger.toLowerCase();\n var codeLowerCase = code.toLowerCase();\n // 按住 control 键时,允许用户设置 trigger 为 ctrl\n if (codeLowerCase === triggerLowerCase || codeLowerCase === 'control' && triggerLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && triggerLowerCase === 'control') {\n this.keydown = true;\n } else {\n this.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.brush) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的brush\n this.brush.remove(true);\n this.brush = null;\n this.dragging = false;\n }\n this.keydown = false;\n }\n};","import { each } from '@antv/util';\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n multiple: true,\n trigger: DEFAULT_TRIGGER,\n selectedState: 'selected',\n selectNode: true,\n selectEdge: false,\n selectCombo: true\n };\n },\n getEvents: function getEvents() {\n var self = this;\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(self.trigger.toLowerCase()) > -1)) {\n self.trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior click-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (!self.multiple) {\n return {\n 'node:click': 'onClick',\n 'combo:click': 'onClick',\n 'edge:click': 'onClick',\n 'canvas:click': 'onCanvasClick'\n };\n }\n return {\n 'node:click': 'onClick',\n 'combo:click': 'onClick',\n 'edge:click': 'onClick',\n 'canvas:click': 'onCanvasClick',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onClick: function onClick(evt) {\n var self = this;\n var item = evt.item;\n if (!item || item.destroyed) {\n return;\n }\n var type = item.getType();\n var graph = self.graph,\n keydown = self.keydown,\n multiple = self.multiple,\n shouldUpdate = self.shouldUpdate,\n shouldBegin = self.shouldBegin;\n if (!shouldBegin(evt, self)) {\n return;\n }\n // allow to select multiple nodes but did not press a key || do not allow the select multiple nodes\n if (!keydown || !multiple) {\n var selected = graph.findAllByState('node', self.selectedState).concat(graph.findAllByState('edge', self.selectedState)).concat(graph.findAllByState('combo', self.selectedState));\n each(selected, function (selectedItem) {\n if (selectedItem !== item) {\n graph.setItemState(selectedItem, self.selectedState, false);\n }\n });\n }\n // check if the item could be selected, given the current cfg\n var itemSelectable = function () {\n switch (type) {\n case 'node':\n return self.selectNode;\n case 'edge':\n return self.selectEdge;\n case 'combo':\n return self.selectCombo;\n default:\n return false;\n }\n }();\n if (!itemSelectable) {\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: false\n });\n return;\n }\n if (item.hasState(self.selectedState)) {\n if (shouldUpdate(evt, self)) {\n graph.setItemState(item, self.selectedState, false);\n }\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n target: item,\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: false\n });\n } else {\n if (shouldUpdate(evt, self)) {\n graph.setItemState(item, self.selectedState, true);\n }\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n target: item,\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: true\n });\n }\n },\n onCanvasClick: function onCanvasClick(evt) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n shouldBegin = _a.shouldBegin;\n if (!shouldBegin(evt, this)) {\n return;\n }\n var selected = graph.findAllByState('node', this.selectedState);\n each(selected, function (node) {\n graph.setItemState(node, _this.selectedState, false);\n });\n var selectedEdges = graph.findAllByState('edge', this.selectedState);\n each(selectedEdges, function (edge) {\n graph.setItemState(edge, _this.selectedState, false);\n });\n var selectedCombos = graph.findAllByState('combo', this.selectedState);\n each(selectedCombos, function (combo) {\n graph.setItemState(combo, _this.selectedState, false);\n });\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: [],\n combos: []\n },\n select: false\n });\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (code.toLowerCase() === this.trigger.toLowerCase() || code.toLowerCase() === 'control') {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n var self = this;\n self.keydown = false;\n }\n};","import { ext } from '@antv/matrix-util';\nimport { clone } from '@antv/util';\nimport { getBrowserName } from '../util/browser';\nvar transform = ext.transform;\nvar DELTA = 0.05;\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n this.isFireFox = getBrowserName() === 'firefox';\n return {\n sensitivity: 2,\n minZoom: undefined,\n maxZoom: undefined,\n enableOptimize: false,\n optimizeZoom: 0.1,\n fixSelectedItems: {\n fixAll: false,\n fixLineWidth: false,\n fixLabel: false,\n fixState: 'selected'\n },\n animate: false,\n animateCfg: {\n duration: 500\n }\n };\n },\n getEvents: function getEvents() {\n var fixSelectedItems = this.fixSelectedItems;\n if (!fixSelectedItems.fixState) fixSelectedItems.fixState = 'selected';\n if (fixSelectedItems.fixAll) {\n fixSelectedItems.fixLineWidth = true;\n fixSelectedItems.fixLabel = true;\n }\n return {\n wheel: 'onWheel',\n touchstart: 'onTouchStart',\n touchmove: 'onTouchMove',\n touchend: 'onTouchEnd'\n };\n },\n onTouchStart: function onTouchStart(evt) {\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n evt.preventDefault();\n // 如果不是缩放事件则禁止继续执行\n if (!event2) {\n return;\n }\n if (this.shouldBegin && !this.shouldBegin(evt, this)) {\n return;\n }\n // 第一个触摸点位置\n this.startPoint = {\n pageX: event1.pageX,\n pageY: event1.pageY\n };\n this.moveable = true;\n if (event2) {\n this.endPoint = {\n pageX: event2.pageX,\n pageY: event2.pageY\n };\n }\n this.originScale = this.graph.getZoom() || this.currentScale || 1;\n },\n onTouchMove: function onTouchMove(evt) {\n if (!this.moveable) {\n return;\n }\n evt.preventDefault();\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (!event2) {\n return;\n }\n if (!this.endPoint) {\n this.endPoint = {\n pageX: event2.pageX,\n pageY: event2.pageY\n };\n }\n // 获取坐标之间的距离\n var getDistance = function getDistance(start, end) {\n return Math.hypot(end.x - start.x, end.y - start.y);\n };\n // 双指缩放比例\n var scale = getDistance({\n x: event1.pageX,\n y: event1.pageY\n }, {\n x: event2.pageX,\n y: event2.pageY\n }) / getDistance({\n x: this.startPoint.pageX,\n y: this.startPoint.pageY\n }, {\n x: this.endPoint.pageX,\n y: this.endPoint.pageY\n });\n // 应用到画布上的缩放比例\n var zoom = this.originScale * scale;\n // 缓存当前的缩放比例\n this.currentScale = zoom;\n var minZoom = this.get('minZoom') || this.graph.get('minZoom');\n var maxZoom = this.get('maxZoom') || this.graph.get('maxZoom');\n if (zoom > maxZoom || zoom < minZoom) {\n return;\n }\n var animate = this.get('animate');\n var animateCfg = this.get('animateCfg');\n var canvas = this.graph.get('canvas');\n var point = canvas.getPointByClient(evt.clientX, evt.clientY);\n this.graph.zoomTo(zoom, {\n x: point.x,\n y: point.y\n }, animate, animateCfg);\n this.graph.emit('wheelzoom', evt);\n },\n onTouchEnd: function onTouchEnd() {\n this.moveable = false;\n this.endPoint = null;\n },\n onWheel: function onWheel(e) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n fixSelectedItems = _a.fixSelectedItems;\n if (this.shouldBegin && !this.shouldBegin(e, this)) {\n return;\n }\n if (!this.shouldUpdate(e, this)) {\n return;\n }\n e.preventDefault();\n var canvas = graph.get('canvas');\n var point = canvas.getPointByClient(e.clientX, e.clientY);\n var sensitivity = this.get('sensitivity');\n var graphZoom = graph.getZoom();\n var ratio = graphZoom;\n var zoom = graphZoom;\n // 兼容IE、Firefox及Chrome\n if (this.isFireFox) {\n if (e.deltaY > 0 || e.wheelDelta < 0) {\n ratio = 1 - DELTA * sensitivity;\n } else {\n ratio = 1 / (1 - DELTA * sensitivity);\n }\n } else {\n if (e.wheelDelta < 0) {\n ratio = 1 - DELTA * sensitivity;\n } else {\n ratio = 1 / (1 - DELTA * sensitivity);\n }\n }\n zoom = graphZoom * ratio;\n var minZoom = this.get('minZoom') || graph.get('minZoom');\n var maxZoom = this.get('maxZoom') || graph.get('maxZoom');\n if (zoom > maxZoom) {\n zoom = maxZoom;\n } else if (zoom < minZoom) {\n zoom = minZoom;\n }\n // hide the shapes when the zoom ratio is smaller than optimizeZoom\n // hide the shapes when zoomming\n var enableOptimize = this.get('enableOptimize');\n if (enableOptimize) {\n var optimizeZoom_1 = this.get('optimizeZoom');\n var optimized = this.get('optimized');\n var nodes_1 = graph.getNodes();\n var edges_1 = graph.getEdges();\n var nodesLength_1 = nodes_1.length;\n var edgesLength_1 = edges_1.length;\n // hiding\n if (!optimized) {\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n if (!node.destroyed) {\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.destoryed && !shape.get('isKeyShape')) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n this.set('optimized', true);\n }\n // showing after 100ms\n clearTimeout(this.get('timeout'));\n var timeout = setTimeout(function () {\n var currentZoom = graph.getZoom();\n var curOptimized = _this.get('optimized');\n if (curOptimized) {\n _this.set('optimized', false);\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = node.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n keyShape.set('ori-visibility', undefined);\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (!shape.get('visible') && oriVis) {\n if (oriVis) shape.show();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = edge.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n keyShape.set('ori-visibility', undefined);\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.get('visible')) {\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (oriVis) shape.show();\n }\n }\n }\n }\n }\n }, 100);\n this.set('timeout', timeout);\n }\n // fix the items when zooming\n if (graphZoom <= 1) {\n var fixNodes = void 0,\n fixEdges = void 0;\n if (fixSelectedItems.fixAll || fixSelectedItems.fixLineWidth || fixSelectedItems.fixLabel) {\n fixNodes = graph.findAllByState('node', fixSelectedItems.fixState);\n fixEdges = graph.findAllByState('edge', fixSelectedItems.fixState);\n var scale = graphZoom / zoom;\n var fixNodesLength = fixNodes.length;\n for (var fn = 0; fn < fixNodesLength; fn++) {\n var node = fixNodes[fn];\n var group = node.getContainer();\n var nodeModel = node.getModel();\n var originStyle = node.getOriginStyle();\n var itemStateStyle = node.getStateStyle(fixSelectedItems.fixState);\n var shapeStateStyle = node.get('shapeFactory').getShape(nodeModel.type).getStateStyle(fixSelectedItems.fixState, node)[fixSelectedItems.fixState];\n if (fixSelectedItems.fixAll) {\n if (zoom <= 1) {\n var groupMatrix = clone(group.getMatrix());\n if (!groupMatrix) groupMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var _b = node.getModel(),\n x = _b.x,\n y = _b.y;\n groupMatrix = transform(groupMatrix, [['t', -x, -y], ['s', scale, scale], ['t', x, y]]);\n group.setMatrix(groupMatrix);\n }\n } else {\n var children = group.get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var fontSize = void 0,\n lineWidth = void 0;\n if (fixSelectedItems.fixLabel) {\n var shapeType = shape.get('type');\n if (shapeType === 'text') {\n fontSize = shape.attr('fontSize') || 12;\n var itemStyle = itemStateStyle[shape.get('name')];\n var shapeStyle = shapeStateStyle[shape.get('name')];\n var itemFontSize = itemStyle ? itemStyle.fontSize : 12;\n var shapeFontSize = shapeStyle ? shapeStyle.fontSize : 12;\n var oriFontSize = itemFontSize || shapeFontSize || 12;\n if (zoom <= 1) shape.attr('fontSize', oriFontSize / zoom); // * graphZoom / zoom\n if (lineWidth) break;\n }\n }\n if (fixSelectedItems.fixLineWidth) {\n if (shape.get('isKeyShape')) {\n lineWidth = shape.attr('lineWidth') || 0;\n var oriLineWidth = itemStateStyle.lineWidth || shapeStateStyle.lineWidth || originStyle.lineWidth || 0;\n if (zoom <= 1) shape.attr('lineWidth', oriLineWidth / zoom); // * graphZoom / zoom\n if (fontSize) break;\n }\n }\n }\n }\n }\n var fixEdgesLength = fixEdges.length;\n for (var fe = 0; fe < fixEdgesLength; fe++) {\n var edge = fixEdges[fe];\n var group = edge.getContainer();\n var children = group.get('children');\n var nodeModel = edge.getModel();\n var itemStateStyle = edge.getStateStyle(fixSelectedItems.fixState);\n var shapeStateStyle = edge.get('shapeFactory').getShape(nodeModel.type).getStateStyle(fixSelectedItems.fixState, edge)[fixSelectedItems.fixState];\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var fontSize = void 0,\n lineWidth = void 0;\n if (fixSelectedItems.fixLabel || fixSelectedItems.fixAll) {\n var shapeType = shape.get('type');\n if (shapeType === 'text') {\n fontSize = shape.attr('fontSize') || 12;\n var itemStyle = itemStateStyle[shape.get('name')];\n var shapeStyle = shapeStateStyle[shape.get('name')];\n var itemFontSize = itemStyle ? itemStyle.fontSize : 12;\n var shapeFontSize = shapeStyle ? shapeStyle.fontSize : 12;\n var oriFontSize = itemFontSize || shapeFontSize || 12;\n if (zoom <= 1) shape.attr('fontSize', oriFontSize / zoom);\n if (lineWidth) break;\n }\n }\n if (fixSelectedItems.fixLineWidth || fixSelectedItems.fixAll) {\n if (shape.get('isKeyShape')) {\n lineWidth = shape.attr('lineWidth') || 0;\n var oriLineWidth = itemStateStyle.lineWidth || shapeStateStyle.lineWidth || 1;\n if (zoom <= 1) shape.attr('lineWidth', oriLineWidth / zoom);\n if (fontSize) break;\n }\n }\n }\n }\n }\n }\n var animate = this.get('animate');\n var animateCfg = this.get('animateCfg');\n graph.zoomTo(zoom, {\n x: point.x,\n y: point.y\n }, animate, animateCfg);\n graph.emit('wheelzoom', e);\n }\n};","import { modifyCSS, createDom } from '@antv/dom-util';\nexport default {\n onMouseEnter: function onMouseEnter(e) {\n var item = e.item;\n this.currentTarget = item;\n this.showTooltip(e);\n this.graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n },\n onMouseMove: function onMouseMove(e) {\n if (!this.shouldUpdate(e, this)) {\n this.hideTooltip();\n return;\n }\n if (!this.currentTarget || e.item !== this.currentTarget) {\n return;\n }\n this.updatePosition(e);\n },\n onMouseLeave: function onMouseLeave(e) {\n if (!this.shouldEnd(e, this)) {\n return;\n }\n this.hideTooltip();\n this.graph.emit('tooltipchange', {\n item: this.currentTarget,\n action: 'hide'\n });\n this.currentTarget = null;\n },\n showTooltip: function showTooltip(e) {\n var container = this.container;\n if (!e.item || e.item.destroyed) {\n return;\n }\n if (!container) {\n container = this.createTooltip(this.graph.get('canvas'));\n this.container = container;\n }\n var text = this.formatText(e.item.get('model'), e);\n container.innerHTML = text;\n modifyCSS(this.container, {\n visibility: 'visible'\n });\n this.updatePosition(e);\n },\n hideTooltip: function hideTooltip() {\n modifyCSS(this.container, {\n visibility: 'hidden'\n });\n },\n updatePosition: function updatePosition(e) {\n var shouldBegin = this.get('shouldBegin');\n var _a = this,\n width = _a.width,\n height = _a.height,\n container = _a.container,\n graph = _a.graph;\n if (!shouldBegin(e, this)) {\n modifyCSS(container, {\n visibility: 'hidden'\n });\n return;\n }\n var point = graph.getPointByClient(e.clientX, e.clientY);\n var _b = graph.getCanvasByPoint(point.x, point.y),\n x = _b.x,\n y = _b.y;\n var bbox = container.getBoundingClientRect();\n if (x > width / 2) {\n x -= bbox.width;\n } else {\n x += this.offset;\n }\n if (y > height / 2) {\n y -= bbox.height;\n } else {\n y += this.offset;\n }\n var left = \"\".concat(x, \"px\");\n var top = \"\".concat(y, \"px\");\n modifyCSS(this.container, {\n left: left,\n top: top,\n visibility: 'visible'\n });\n },\n createTooltip: function createTooltip(canvas) {\n var el = canvas.get('el');\n el.style.position = 'relative';\n var container = createDom(\"
\"));\n el.parentNode.appendChild(container);\n modifyCSS(container, {\n position: 'absolute',\n visibility: 'visible'\n });\n this.width = canvas.get('width');\n this.height = canvas.get('height');\n this.container = container;\n this.graph.get('tooltips').push(container);\n return container;\n }\n};","import { __assign } from \"tslib\";\nimport base from './tooltip-base';\nexport default __assign({\n getDefaultCfg: function getDefaultCfg() {\n return {\n item: 'node',\n offset: 12,\n formatText: function formatText(model) {\n return model.label;\n }\n };\n },\n getEvents: function getEvents() {\n return {\n 'node:mouseenter': 'onMouseEnter',\n 'node:mouseleave': 'onMouseLeave',\n 'node:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave'\n };\n }\n}, base);","import { __assign } from \"tslib\";\nimport base from './tooltip-base';\nexport default __assign({\n getDefaultCfg: function getDefaultCfg() {\n return {\n item: 'edge',\n offset: 12,\n formatText: function formatText(model) {\n return \"source: \".concat(model.source, \" target: \").concat(model.target);\n }\n };\n },\n getEvents: function getEvents() {\n return {\n 'edge:mouseenter': 'onMouseEnter',\n 'edge:mouseleave': 'onMouseLeave',\n 'edge:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave'\n };\n }\n}, base);","var DEFAULT_TRIGGER = 'click';\nvar ALLOW_EVENTS = ['click', 'dblclick'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n /**\n * 发生收缩/扩展变化时的回调\n */\n trigger: DEFAULT_TRIGGER,\n onChange: function onChange() {}\n };\n },\n getEvents: function getEvents() {\n var _a;\n var trigger;\n // 检测输入是否合法\n if (ALLOW_EVENTS.includes(this.trigger)) {\n trigger = this.trigger;\n } else {\n trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior collapse-expand 的 trigger 参数不合法,请输入 'click' 或 'dblclick'\");\n }\n return _a = {}, _a[\"node:\".concat(trigger)] = 'onNodeClick',\n // 支持移动端事件\n _a.touchstart = 'onNodeClick', _a;\n },\n onNodeClick: function onNodeClick(e) {\n var _this = this;\n // avoid click being triggered on dblclick\n if (this.trigger === 'click') {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = 0;\n return;\n }\n this.timer = setTimeout(function () {\n _this.toggle(e);\n clearTimeout(_this.timer);\n _this.timer = 0;\n }, 200);\n } else {\n this.toggle(e);\n }\n },\n toggle: function toggle(e) {\n var item = e.item;\n if (!item) return;\n // 如果节点进行过更新,model 会进行 merge,直接改 model 就不能改布局,所以需要去改源数据\n var sourceData = this.graph.findDataById(item.get('id'));\n if (!sourceData) {\n return;\n }\n var children = sourceData.children;\n // 叶子节点的收缩和展开没有意义\n if (!children || children.length === 0) {\n return;\n }\n var collapsed = !sourceData.collapsed;\n if (!this.shouldBegin(e, collapsed, this)) {\n return;\n }\n sourceData.collapsed = collapsed;\n item.getModel().collapsed = collapsed;\n this.graph.emit('itemcollapsed', {\n item: e.item,\n collapsed: collapsed\n });\n if (!this.shouldUpdate(e, collapsed, this)) {\n return;\n }\n this.onChange(item, collapsed, this);\n this.graph.layout();\n }\n};","import { __assign } from \"tslib\";\n/*\n * @Author: moyee\n * @LastEditors: moyee\n * @Description: 拖动 Combo\n */\nimport { each } from '@antv/util';\nimport Util from '../util';\nimport Global from '../global';\nvar calculationItemsBBox = Util.calculationItemsBBox;\n/**\n * 遍历拖动的 Combo 下的所有 Combo\n * @param data 拖动的 Combo\n * @param fn\n */\nvar traverseCombo = function traverseCombo(data, fn) {\n if (fn(data) === false) {\n return;\n }\n if (data) {\n var combos = data.get('combos');\n if (combos.length === 0) {\n return false;\n }\n each(combos, function (child) {\n traverseCombo(child, fn);\n });\n }\n};\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n enableDelegate: false,\n delegateStyle: {},\n // 拖动节点过程中是否只改变 Combo 的大小,而不改变其结构\n onlyChangeComboSize: false,\n // 拖动过程中目标 combo 状态样式\n activeState: '',\n selectedState: 'selected',\n enableStack: true\n };\n },\n getEvents: function getEvents() {\n return {\n 'combo:mousedown': 'onMouseDown',\n 'combo:dragstart': 'onDragStart',\n 'combo:drag': 'onDrag',\n 'combo:dragend': 'onDragEnd',\n 'combo:drop': 'onDrop',\n 'node:drop': 'onNodeDrop',\n 'combo:dragenter': 'onDragEnter',\n 'combo:dragleave': 'onDragLeave'\n };\n },\n validationCombo: function validationCombo(evt) {\n var item = evt.item;\n if (!item || item.destroyed) {\n return false;\n }\n if (!this.shouldUpdate(evt, this)) {\n return false;\n }\n var type = item.getType();\n if (type !== 'combo') {\n return false;\n }\n return true;\n },\n onMouseDown: function onMouseDown(evt) {\n this.origin = {\n x: evt.x,\n y: evt.y\n };\n },\n onDragStart: function onDragStart(evt) {\n var _this = this;\n var graph = this.graph;\n var item = evt.item;\n this.currentShouldEnd = true;\n if (!this.validationCombo(evt)) return;\n this.targets = [];\n // 获取所有选中的 Combo\n var combos = graph.findAllByState('combo', this.selectedState);\n var currentCombo = item.get('id');\n var dragCombos = combos.filter(function (combo) {\n var comboId = combo.get('id');\n return currentCombo === comboId;\n });\n if (dragCombos.length === 0) {\n this.targets.push(item);\n } else {\n this.targets = combos;\n }\n var beforeDragItems = [];\n this.targets.forEach(function (t) {\n var _a = t.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n beforeDragItems.push({\n x: x,\n y: y,\n id: id\n });\n });\n this.set('beforeDragItems', beforeDragItems);\n if (this.activeState) {\n this.targets.map(function (combo) {\n var model = combo.getModel();\n if (model.parentId) {\n var parentCombo = graph.findById(model.parentId);\n if (parentCombo) {\n graph.setItemState(parentCombo, _this.activeState, true);\n }\n }\n });\n }\n this.point = {};\n this.originPoint = {};\n this.currentItemChildCombos = [];\n traverseCombo(item, function (param) {\n if (param.destroyed) {\n return false;\n }\n var model = param.getModel();\n _this.currentItemChildCombos.push(model.id);\n return true;\n });\n },\n onDrag: function onDrag(evt) {\n var _this = this;\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n if (this.enableDelegate) {\n this.updateDelegate(evt);\n } else {\n if (this.activeState) {\n var graph_1 = this.graph;\n var item = evt.item;\n var model_1 = item.getModel();\n // 拖动过程中实时计算距离\n var combos = graph_1.getCombos();\n var sourceBBox = item.getBBox();\n var centerX_1 = sourceBBox.centerX,\n centerY_1 = sourceBBox.centerY,\n width_1 = sourceBBox.width;\n // 参与计算的 Combo,需要排除掉:\n // 1、拖动 combo 自己\n // 2、拖动 combo 的 parent\n // 3、拖动 Combo 的 children\n var calcCombos = combos.filter(function (combo) {\n var cmodel = combo.getModel();\n // 被拖动的是最外层的 Combo,无 parent,排除自身和子元素\n if (!model_1.parentId) {\n return cmodel.id !== model_1.id && !_this.currentItemChildCombos.includes(cmodel.id);\n }\n return cmodel.id !== model_1.id && !_this.currentItemChildCombos.includes(cmodel.id);\n });\n calcCombos.map(function (combo) {\n var _a = combo.getBBox(),\n cx = _a.centerX,\n cy = _a.centerY,\n w = _a.width;\n // 拖动的 combo 和要进入的 combo 之间的距离\n var disX = centerX_1 - cx;\n var disY = centerY_1 - cy;\n // 圆心距离\n var distance = 2 * Math.sqrt(disX * disX + disY * disY);\n if (width_1 + w - distance > 0.8 * width_1) {\n graph_1.setItemState(combo, _this.activeState, true);\n } else {\n graph_1.setItemState(combo, _this.activeState, false);\n }\n });\n }\n each(this.targets, function (item) {\n _this.updateCombo(item, evt);\n });\n if (this.onlyChangeComboSize) {\n // 拖动节点过程中,动态改变 Combo 的大小\n this.updateParentCombos();\n }\n }\n },\n updatePositions: function updatePositions(evt, restore) {\n var _this = this;\n // 当启用 delegate 时,拖动结束时需要更新 combo\n if (this.enableDelegate || restore) {\n each(this.targets, function (item) {\n _this.updateCombo(item, evt, restore);\n });\n }\n },\n onDrop: function onDrop(evt) {\n var _this = this;\n // 被放下的目标 combo\n var item = evt.item;\n this.currentShouldEnd = this.shouldEnd(evt, item, this);\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd || !item || !this.targets || item.destroyed) return;\n var graph = this.graph;\n var targetModel = item.getModel();\n this.targets.map(function (combo) {\n var model = combo.getModel();\n if (model.parentId !== targetModel.id) {\n if (_this.activeState) {\n graph.setItemState(item, _this.activeState, false);\n }\n // 将 Combo 放置到某个 Combo 上面时,只有当 onlyChangeComboSize 为 false 时候才更新 Combo 结构\n if (!_this.onlyChangeComboSize) {\n graph.updateComboTree(combo, targetModel.id, false);\n } else {\n graph.updateCombo(combo);\n }\n } else {\n graph.updateCombo(item);\n }\n });\n this.end(item, evt);\n // 如果已经拖放下了,则不需要再通过距离判断了\n this.endComparison = true;\n },\n onNodeDrop: function onNodeDrop(evt) {\n var _this = this;\n if (!this.targets || this.targets.length === 0) return;\n var graph = this.graph;\n var item = evt.item;\n var comboId = item.getModel().comboId;\n var newParentCombo = comboId ? graph.findById(comboId) : undefined;\n this.currentShouldEnd = this.shouldEnd(evt, newParentCombo, this);\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd) return;\n var droppedCombo;\n // 如果被放置的的节点有 comboId,且这个 comboId 与正在被拖拽的 combo 的父 id 不相同,则更新父亲为 comboId\n if (comboId) {\n if (this.activeState) {\n var combo = graph.findById(comboId);\n graph.setItemState(combo, this.activeState, false);\n }\n this.targets.map(function (combo) {\n if (!_this.onlyChangeComboSize) {\n if (comboId !== combo.getID()) {\n droppedCombo = graph.findById(comboId);\n if (comboId !== combo.getModel().parentId) graph.updateComboTree(combo, comboId, false);\n }\n } else {\n graph.updateCombo(combo);\n }\n });\n } else {\n // 如果被放置的节点没有 comboId,且正在被拖拽的 combo 有父 id,则更新父亲为 undefined\n this.targets.map(function (combo) {\n if (!_this.onlyChangeComboSize) {\n var model = combo.getModel();\n if (model.comboId) {\n graph.updateComboTree(combo, undefined, false);\n }\n } else {\n graph.updateCombo(combo);\n }\n });\n }\n // 如果已经拖放下了,则不需要再通过距离判断了\n this.endComparison = true;\n this.end(droppedCombo, evt);\n },\n onDragEnter: function onDragEnter(evt) {\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n var item = evt.item;\n var graph = this.graph;\n if (this.activeState) {\n graph.setItemState(item, this.activeState, true);\n }\n },\n onDragLeave: function onDragLeave(evt) {\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n var item = evt.item;\n var graph = this.graph;\n if (this.activeState) {\n graph.setItemState(item, this.activeState, false);\n }\n },\n onDragEnd: function onDragEnd(evt) {\n if (!this.targets || this.targets.length === 0) return;\n var item = evt.item;\n if (this.currentShouldEnd) {\n this.updatePositions(evt);\n }\n var parentCombo = this.getParentCombo(item.getModel().parentId);\n var graph = this.graph;\n if (parentCombo && this.activeState) {\n graph.setItemState(parentCombo, this.activeState, false);\n }\n this.end(undefined, evt);\n },\n end: function end(comboDropedOn, evt) {\n var _this = this;\n if (!this.origin) return;\n var graph = this.graph;\n // 删除delegate shape\n if (this.delegateShape) {\n var delegateGroup = graph.get('delegateGroup');\n delegateGroup.clear();\n this.delegateShape = null;\n }\n if (comboDropedOn && this.activeState) {\n graph.setItemState(comboDropedOn, this.activeState, false);\n }\n // 若没有被放置的 combo,则是被放置在画布上\n if (!comboDropedOn) {\n var stack_1 = graph.get('enabledStack') && this.enableStack;\n var stackData_1 = {\n before: {\n nodes: [],\n edges: [],\n combos: [].concat(this.get('beforeDragItems'))\n },\n after: {\n nodes: [],\n edges: [],\n combos: []\n }\n };\n this.targets.map(function (combo) {\n // 将 Combo 放置到某个 Combo 上面时,只有当 onlyChangeComboSize 为 false 时候才更新 Combo 结构\n if (!_this.onlyChangeComboSize) {\n graph.updateComboTree(combo, undefined, stack_1);\n } else {\n graph.updateCombo(combo);\n var _a = combo.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n stackData_1.after.combos.push({\n x: x,\n y: y,\n id: id\n });\n graph.pushStack('update', stackData_1);\n }\n });\n }\n this.point = [];\n this.origin = null;\n this.originPoint = null;\n this.targets.length = 0;\n },\n /**\n * 遍历 comboTree,分别更新 node 和 combo\n * @param data\n * @param fn\n */\n traverse: function traverse(data, fn, edgesToBeUpdate) {\n var _this = this;\n if (edgesToBeUpdate === void 0) {\n edgesToBeUpdate = {};\n }\n if (fn(data, edgesToBeUpdate) === false) {\n return;\n }\n if (data) {\n var combos = data.get('combos');\n each(combos, function (child) {\n _this.traverse(child, fn, edgesToBeUpdate);\n });\n var nodes = data.get('nodes');\n each(nodes, function (child) {\n _this.traverse(child, fn, edgesToBeUpdate);\n });\n }\n },\n updateCombo: function updateCombo(item, evt, restore) {\n this.updateSingleItem(item, evt, restore);\n var edgesToBeUpdate = {};\n this.traverse(item, function (paramItem, paramEdgesMap) {\n if (paramItem.destroyed) {\n return false;\n }\n paramItem.getEdges().forEach(function (edge) {\n return paramEdgesMap[edge.getID()] = edge;\n });\n return true;\n }, edgesToBeUpdate);\n Object.values(edgesToBeUpdate).forEach(function (edge) {\n return edge.refresh();\n });\n },\n /**\n *\n * @param item 当前正在拖动的元素\n * @param evt\n */\n updateSingleItem: function updateSingleItem(item, evt, restore) {\n var origin = this.origin;\n var graph = this.graph;\n var model = item.getModel();\n var itemId = item.get('id');\n if (!this.point[itemId]) {\n this.point[itemId] = {\n x: model.x,\n y: model.y\n };\n }\n var x = evt.x - origin.x + this.point[itemId].x;\n var y = evt.y - origin.y + this.point[itemId].y;\n if (restore) {\n x += origin.x - evt.x;\n y += origin.y - evt.y;\n }\n graph.updateItem(item, {\n x: x,\n y: y\n }, false);\n // item.getEdges()?.forEach(edge => edge.refresh());\n },\n\n /**\n * 根据 ID 获取父 Combo\n * @param parentId 父 Combo ID\n */\n getParentCombo: function getParentCombo(parentId) {\n var graph = this.graph;\n if (!parentId) {\n return undefined;\n }\n var parentCombo = graph.findById(parentId);\n if (!parentCombo) {\n return undefined;\n }\n return parentCombo;\n },\n updateDelegate: function updateDelegate(evt) {\n var graph = this.graph;\n // 当没有 delegate shape 时创建\n if (!this.delegateShape) {\n var delegateGroup = graph.get('delegateGroup');\n var bbox = null;\n if (this.targets.length > 1) {\n bbox = calculationItemsBBox(this.targets);\n } else {\n bbox = this.targets[0].getBBox();\n }\n var x = bbox.x,\n y = bbox.y,\n width = bbox.width,\n height = bbox.height,\n minX = bbox.minX,\n minY = bbox.minY;\n this.originPoint = {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minX,\n minY: minY\n };\n var attrs = __assign(__assign({}, Global.delegateStyle), this.delegateStyle);\n this.delegateShape = delegateGroup.addShape('rect', {\n attrs: __assign({\n width: bbox.width,\n height: bbox.height,\n x: bbox.x,\n y: bbox.y\n }, attrs),\n name: 'combo-delegate-shape'\n });\n this.delegateShape.set('capture', false);\n this.delegate = this.delegateShape;\n } else {\n var clientX = evt.x - this.origin.x + this.originPoint.minX;\n var clientY = evt.y - this.origin.y + this.originPoint.minY;\n this.delegateShape.attr({\n x: clientX,\n y: clientY\n });\n }\n },\n /**\n * updates the parent combos' size and position\n */\n updateParentCombos: function updateParentCombos() {\n var _a = this,\n graph = _a.graph,\n targets = _a.targets;\n var comboParentMap = {};\n targets === null || targets === void 0 ? void 0 : targets.forEach(function (target) {\n var comboId = target.getModel().parentId;\n if (comboId) comboParentMap[comboId] = graph.findById(comboId);\n });\n Object.values(comboParentMap).forEach(function (combo) {\n if (combo) graph.updateCombo(combo);\n });\n }\n};","/*\n * @Author: Shiwu\n * @Description: 收起和展开 Combo\n */\nvar DEFAULT_TRIGGER = 'dblclick';\nvar ALLOW_EVENTS = ['click', 'dblclick'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n relayout: true\n };\n },\n getEvents: function getEvents() {\n var _a;\n var trigger;\n // 检测输入是否合法\n if (ALLOW_EVENTS.includes(this.trigger)) {\n trigger = this.trigger;\n } else {\n trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior collapse-expand-group 的 trigger 参数不合法,请输入 'click' 或 'dblclick'\");\n }\n return _a = {}, _a[\"combo:\".concat(trigger)] = 'onComboClick', _a;\n },\n onComboClick: function onComboClick(evt) {\n var item = evt.item;\n var _a = this,\n graph = _a.graph,\n relayout = _a.relayout;\n if (!item || item.destroyed || item.getType() !== 'combo') return;\n var model = item.getModel();\n var comboId = model.id;\n if (!comboId) {\n return;\n }\n graph.collapseExpandCombo(comboId);\n if (relayout && graph.get('layout')) graph.layout();else graph.refreshPositions();\n }\n};","import { __assign } from \"tslib\";\nimport Util from '../util';\nvar isPolygonsIntersect = Util.isPolygonsIntersect,\n pathToPoints = Util.pathToPoints;\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['drag', 'shift', 'ctrl', 'alt', 'control'];\nvar isItemIntersecPolygon = function isItemIntersecPolygon(item, polyPoints) {\n var shapePoints;\n var shape = item.getKeyShape();\n if (item.get('type') === 'path') {\n shapePoints = pathToPoints(shape.attr('path'));\n } else {\n var shapeBBox = shape.getCanvasBBox();\n shapePoints = [[shapeBBox.minX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.maxY], [shapeBBox.minX, shapeBBox.maxY]];\n }\n return isPolygonsIntersect(polyPoints, shapePoints);\n};\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n delegateStyle: {\n fill: '#EEF6FF',\n fillOpacity: 0.4,\n stroke: '#DDEEFE',\n lineWidth: 1\n },\n onSelect: function onSelect() {},\n onDeselect: function onDeselect() {},\n shouldDeselect: undefined,\n selectedState: 'selected',\n trigger: DEFAULT_TRIGGER,\n includeEdges: true,\n selectedEdges: [],\n selectedNodes: []\n // multiple: false,\n };\n },\n\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior lasso-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (this.trigger === 'drag') {\n return {\n dragstart: 'onDragStart',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n 'canvas:click': 'clearStates'\n };\n }\n return {\n dragstart: 'onDragStart',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown',\n 'canvas:click': 'clearStates'\n };\n },\n onDragStart: function onDragStart(e) {\n var lasso = this.lasso;\n var item = e.item;\n // 排除在节点上拖动\n if (item) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n if (this.selectedNodes && this.selectedNodes.length !== 0) {\n this.clearStates('dragstart');\n }\n if (!lasso) {\n lasso = this.createLasso();\n }\n this.dragging = true;\n this.originPoint = {\n x: e.x,\n y: e.y\n };\n this.points.push(this.originPoint);\n lasso.show();\n },\n onDragMove: function onDragMove(e) {\n if (!this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.points.push({\n x: e.x,\n y: e.y\n });\n this.updateLasso(e);\n },\n onDragEnd: function onDragEnd(e) {\n if (!this.lasso && !this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.points.push(this.originPoint);\n this.getSelectedItems();\n this.lasso.remove(true);\n this.lasso = null;\n this.points = [];\n this.dragging = false;\n },\n getLassoPath: function getLassoPath() {\n var points = this.points;\n var path = [];\n if (points.length) {\n points.forEach(function (point, index) {\n if (index === 0) {\n path.push(['M', point.x, point.y]);\n } else {\n path.push(['L', point.x, point.y]);\n }\n });\n path.push(['L', points[0].x, points[0].y]);\n }\n return path;\n },\n clearStates: function clearStates(action) {\n if (action === void 0) {\n action = 'canvas:click';\n }\n var _a = this,\n graph = _a.graph,\n selectedState = _a.selectedState,\n shouldDeselect = _a.shouldDeselect;\n var nodes = graph.findAllByState('node', selectedState);\n var edges = graph.findAllByState('edge', selectedState);\n if (!shouldDeselect || shouldDeselect({\n action: action,\n nodes: nodes,\n edges: edges\n })) {\n nodes.forEach(function (node) {\n return graph.setItemState(node, selectedState, false);\n });\n edges.forEach(function (edge) {\n return graph.setItemState(edge, selectedState, false);\n });\n }\n if (this.onDeselect) {\n this.onDeselect(this.selectedNodes, this.selectedEdges);\n }\n this.selectedNodes = [];\n this.selectedEdges = [];\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: []\n },\n select: false\n });\n },\n getSelectedItems: function getSelectedItems() {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n shouldUpdate = _a.shouldUpdate;\n var lassoContour = this.points.map(function (point) {\n return [graph.getCanvasByPoint(point.x, point.y).x, graph.getCanvasByPoint(point.x, point.y).y];\n });\n var state = this.selectedState;\n var selectedNodes = [];\n var selectedIds = [];\n graph.getNodes().forEach(function (node) {\n if (!node.isVisible()) return; // 隐藏节点不能被选中\n if (isItemIntersecPolygon(node, lassoContour)) {\n if (shouldUpdate(node, 'select', _this)) {\n selectedNodes.push(node);\n var model = node.getModel();\n selectedIds.push(model.id);\n graph.setItemState(node, state, true);\n }\n }\n });\n var selectedEdges = [];\n if (this.includeEdges) {\n // 选中边,边的source和target都在选中的节点中时才选中\n selectedNodes.forEach(function (node) {\n var edges = node.getOutEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return; // 隐藏边不能够被选中\n var model = edge.getModel();\n var source = model.source,\n target = model.target;\n if (selectedIds.includes(source) && selectedIds.includes(target) && shouldUpdate(edge, 'select', _this)) {\n selectedEdges.push(edge);\n graph.setItemState(edge, _this.selectedState, true);\n }\n });\n });\n }\n this.selectedEdges = selectedEdges;\n this.selectedNodes = selectedNodes;\n if (this.onSelect) {\n this.onSelect(selectedNodes, selectedEdges);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges\n },\n select: true\n });\n },\n createLasso: function createLasso() {\n var self = this;\n var lasso = self.graph.get('delegateGroup').addShape('path', {\n attrs: __assign({\n path: []\n }, self.delegateStyle),\n capture: false,\n name: 'lasso-shape'\n });\n this.lasso = lasso;\n this.delegate = lasso;\n this.points = [];\n return lasso;\n },\n updateLasso: function updateLasso(e) {\n var self = this;\n this.lasso.attr({\n path: self.getLassoPath()\n });\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n // if (this.selectedNodes && this.selectedNodes.length !== 0) {\n // this.clearStates();\n // }\n if (code.toLowerCase() === this.trigger.toLowerCase()) {\n this.keydown = true;\n } else {\n this.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.lasso) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的lasso\n this.lasso.remove(true);\n this.lasso = null;\n this.points = [];\n this.dragging = false;\n }\n this.keydown = false;\n }\n};","import { __assign } from \"tslib\";\nimport { isFunction } from '@antv/util';\nvar DEFAULT_TRIGGER = 'click';\nvar ALLOW_EVENTS = ['click', 'drag'];\nvar DEFAULT_KEY = undefined;\nvar ALLOW_KEYS = ['shift', 'ctrl', 'control', 'alt', 'meta', undefined];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n key: DEFAULT_KEY,\n edgeConfig: {},\n getEdgeConfig: undefined\n };\n },\n getEvents: function getEvents() {\n var self = this;\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(self.trigger.toLowerCase()) > -1)) {\n self.trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior create-edge 的 trigger 参数不合法,请输入 'click','drag'\");\n }\n if (self.key && ALLOW_KEYS.indexOf(self.key.toLowerCase()) === -1) {\n self.trigger = DEFAULT_KEY;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior create-edge 的 key 参数不合法,请输入 'shift','ctrl','alt','control',或 undefined\");\n }\n var events;\n if (self.trigger === 'drag') {\n events = {\n 'node:dragstart': 'onClick',\n 'combo:dragstart': 'onClick',\n drag: 'updateEndPoint',\n 'node:drop': 'onClick',\n 'combo:drop': 'onClick',\n dragend: 'onDragEnd'\n };\n } else if (self.trigger === 'click') {\n events = {\n 'node:click': 'onClick',\n mousemove: 'updateEndPoint',\n 'edge:click': 'cancelCreating',\n 'canvas:click': 'cancelCreating',\n 'combo:click': 'onClick'\n };\n }\n if (self.key) {\n events.keydown = 'onKeyDown';\n events.keyup = 'onKeyUp';\n }\n return events;\n },\n onDragEnd: function onDragEnd(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n var item = ev.item;\n if (!item || item.getID() === self.source || item.getType() !== 'node') self.cancelCreating({\n item: self.edge,\n x: ev.x,\n y: ev.y\n });\n },\n // 如果边的起点没有指定,则根据起点创建新边;如果起点已经指定而终点未指定,则指定终点\n onClick: function onClick(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n var node = ev.item;\n var graph = self.graph;\n var model = node.getModel();\n var getEdgeConfig = self.getEdgeConfig;\n // 如果起点已经指定而终点未指定,则指定终点\n if (self.addingEdge && self.edge) {\n if (!self.shouldEnd(ev, self)) return;\n var edgeConfig = void 0;\n if (getEdgeConfig && isFunction(getEdgeConfig)) {\n edgeConfig = getEdgeConfig({\n source: self.source,\n target: model.id\n }, self);\n } else {\n edgeConfig = self.edgeConfig;\n }\n var updateCfg = __assign({\n target: model.id\n }, edgeConfig);\n if (self.source === model.id) {\n updateCfg.type = 'loop';\n }\n graph.emit('beforecreateedge', {});\n graph.updateItem(self.edge, updateCfg, false);\n if (graph.get('enabledStack')) {\n var addedModel = __assign(__assign({}, self.edge.getModel()), {\n itemType: 'edge'\n });\n var after = {};\n after.edges = [addedModel];\n graph.pushStack('add', {\n before: {},\n after: after\n });\n }\n graph.emit('aftercreateedge', {\n edge: self.edge\n });\n // 暂时将该边的 capture 恢复为 true\n self.edge.getKeyShape().set('capture', true);\n self.edge = null;\n self.addingEdge = false;\n } else {\n // 如果边的起点没有指定,则根据起点创建新边\n if (!self.shouldBegin(ev, self)) return;\n // 获取自定义 edge 配置\n var edgeConfig = void 0;\n if (getEdgeConfig && isFunction(getEdgeConfig)) {\n edgeConfig = getEdgeConfig({\n source: model.id,\n target: model.id\n }, self);\n } else {\n edgeConfig = self.edgeConfig;\n }\n self.edge = graph.addItem('edge', __assign({\n source: model.id,\n target: model.id\n }, edgeConfig), false);\n self.source = model.id;\n self.addingEdge = true;\n // 暂时将该边的 capture 设置为 false,这样可以拾取到后面的元素\n self.edge.getKeyShape().set('capture', false);\n }\n },\n // 边的起点已经确定,边的末端跟随鼠标移动\n updateEndPoint: function updateEndPoint(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n if (self.edge && self.edge.destroyed) self.cancelCreating({\n item: self.edge\n });\n var point = {\n x: ev.x,\n y: ev.y\n };\n // 若此时 source 节点已经被移除,结束添加边\n if (!self.graph.findById(self.source)) {\n self.addingEdge = false;\n return;\n }\n if (self.addingEdge && self.edge) {\n // 更新边的终点为鼠标位置\n self.graph.updateItem(self.edge, {\n target: point\n }, false);\n }\n },\n // 取消增加边,删除该边;或指定终点\n cancelCreating: function cancelCreating(ev) {\n var _a, _b;\n var self = this;\n if (self.key && !self.keydown) return;\n var graph = self.graph;\n var currentEdge = ev.item;\n if (self.addingEdge && (self.edge === currentEdge || ((_b = (_a = ev.target) === null || _a === void 0 ? void 0 : _a.isCanvas) === null || _b === void 0 ? void 0 : _b.call(_a)))) {\n if (self.edge && !self.edge.destroyed) graph.removeItem(self.edge, false);\n self.edge = null;\n self.addingEdge = false;\n return;\n }\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (code.toLowerCase() === self.key.toLowerCase()) {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n var self = this;\n if (self.addingEdge && self.edge) {\n // 清除正在增加的边\n self.graph.removeItem(self.edge, false);\n self.addingEdge = false;\n self.edge = null;\n }\n this.keydown = false;\n }\n};","var DEFAULT_TRIGGER = 'ctrl';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nvar DEFAULT_COMBINED_KEY = '1';\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n combinedKey: DEFAULT_COMBINED_KEY,\n functionName: 'fitView',\n functionParams: []\n };\n },\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior shortcuts-fit-view \\u7684 trigger \\u53C2\\u6570 '\".concat(this.trigger, \"' \\u4E0D\\u5408\\u6CD5\\uFF0C\\u8BF7\\u8F93\\u5165 'drag'\\u3001'shift'\\u3001'ctrl' \\u6216 'alt'\"));\n }\n if (this.combinedKey === this.trigger) {\n this.combinedKey = undefined;\n }\n return {\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n var triggerLowerCase = this.trigger.toLowerCase();\n var codeLowerCase = code.toLowerCase();\n // 按住 control 键时,允许用户设置 trigger 为 ctrl\n if (!this.triggerKeydown) {\n if (codeLowerCase === triggerLowerCase || codeLowerCase === 'control' && triggerLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && triggerLowerCase === 'control') {\n this.triggerKeydown = true;\n } else {\n this.triggerKeydown = false;\n }\n }\n var graph = this.graph;\n if (!graph[this.functionName]) {\n console.warn(\"Behavior shortcuts-fit-view \\u7684 functionName \\u53C2\\u6570 '\".concat(this.functionName, \"' \\u4E0D\\u5408\\u6CD5\\uFF0C\\u5B83\\u4E0D\\u662F Graph \\u7684\\u4E00\\u4E2A\\u51FD\\u6570\\u540D\"));\n return {};\n }\n // 未配置 combinedKey,直接 fitView\n if (this.triggerKeydown && !this.combinedKey) {\n if (this.functionParams && this.functionParams.length) graph[this.functionName].apply(graph, this.functionParams);else graph[this.functionName]();\n return;\n }\n var combinedKeyLowerCase = this.combinedKey.toLowerCase();\n if (this.triggerKeydown) {\n if (codeLowerCase === combinedKeyLowerCase || codeLowerCase === 'control' && combinedKeyLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && combinedKeyLowerCase === 'control') {\n if (this.functionParams && this.functionParams.length) graph[this.functionName].apply(graph, this.functionParams);else graph[this.functionName]();\n }\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.brush) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的brush\n this.brush.remove(true);\n this.brush = null;\n this.dragging = false;\n }\n this.triggerKeydown = false;\n }\n};","import { isBoolean, isObject } from '@antv/util';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control', 'meta'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n direction: 'both',\n enableOptimize: false,\n zoomKey: 'ctrl',\n // scroll-canvas 可滚动的扩展范围,默认为 0,即最多可以滚动一屏的位置\n // 当设置的值大于 0 时,即滚动可以超过一屏\n // 当设置的值小于 0 时,相当于缩小了可滚动范围\n // 具体实例可参考:https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IFfoS67_HssAAAAAAAAAAAAAARQnAQ\n scalableRange: 0,\n allowDragOnItem: true\n };\n },\n getEvents: function getEvents() {\n if (!this.zoomKey || ALLOW_EVENTS.indexOf(this.zoomKey) === -1) this.zoomKey = 'ctrl';\n return {\n wheel: 'onWheel'\n };\n },\n onWheel: function onWheel(ev) {\n var _this = this;\n if (!this.allowDrag(ev)) return;\n var graph = this.graph;\n var zoomKeys = Array.isArray(this.zoomKey) ? [].concat(this.zoomKey) : [this.zoomKey];\n if (zoomKeys.includes('control')) zoomKeys.push('ctrl');\n var keyDown = zoomKeys.some(function (ele) {\n return ev[\"\".concat(ele, \"Key\")];\n });\n if (keyDown) {\n var canvas = graph.get('canvas');\n var point = canvas.getPointByClient(ev.clientX, ev.clientY);\n var ratio = graph.getZoom();\n if (ev.wheelDelta > 0) {\n ratio = ratio + ratio * 0.05;\n } else {\n ratio = ratio - ratio * 0.05;\n }\n graph.zoomTo(ratio, {\n x: point.x,\n y: point.y\n });\n } else {\n var dx = ev.deltaX || ev.movementX;\n var dy = ev.deltaY || ev.movementY;\n if (!dy && navigator.userAgent.indexOf('Firefox') > -1) dy = -ev.wheelDelta * 125 / 3;\n var width = this.graph.get('width');\n var height = this.graph.get('height');\n var graphCanvasBBox = this.graph.get('canvas').getCanvasBBox();\n var expandWidth = this.scalableRange;\n var expandHeight = this.scalableRange;\n // 若 scalableRange 是 0~1 的小数,则作为比例考虑\n if (expandWidth < 1 && expandWidth > -1) {\n expandWidth = width * expandWidth;\n expandHeight = height * expandHeight;\n }\n var minX = graphCanvasBBox.minX,\n maxX = graphCanvasBBox.maxX,\n minY = graphCanvasBBox.minY,\n maxY = graphCanvasBBox.maxY;\n if (dx > 0) {\n if (maxX < -expandWidth) {\n dx = 0;\n } else if (maxX - dx < -expandWidth) {\n dx = maxX + expandWidth;\n }\n } else if (dx < 0) {\n if (minX > width + expandWidth) {\n dx = 0;\n } else if (minX - dx > width + expandWidth) {\n dx = minX - (width + expandWidth);\n }\n }\n if (dy > 0) {\n if (maxY < -expandHeight) {\n dy = 0;\n } else if (maxY - dy < -expandHeight) {\n dy = maxY + expandHeight;\n }\n } else if (dy < 0) {\n if (minY > height + expandHeight) {\n dy = 0;\n } else if (minY - dy > height + expandHeight) {\n dy = minY - (height + expandHeight);\n }\n }\n if (this.get('direction') === 'x') {\n dy = 0;\n } else if (this.get('direction') === 'y') {\n dx = 0;\n }\n graph.translate(-dx, -dy);\n }\n ev.preventDefault();\n // hide the shapes when the zoom ratio is smaller than optimizeZoom\n // hide the shapes when zoomming\n var enableOptimize = this.get('enableOptimize');\n if (enableOptimize) {\n var optimizeZoom_1 = this.get('optimizeZoom');\n var optimized = this.get('optimized');\n var nodes_1 = graph.getNodes();\n var edges_1 = graph.getEdges();\n var nodesLength_1 = nodes_1.length;\n var edgesLength_1 = edges_1.length;\n // hiding\n if (!optimized) {\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n if (!node.destroyed) {\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.destoryed && !shape.get('isKeyShape')) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n this.set('optimized', true);\n }\n // showing after 100ms\n clearTimeout(this.get('timeout'));\n var timeout = setTimeout(function () {\n var currentZoom = graph.getZoom();\n var curOptimized = _this.get('optimized');\n if (curOptimized) {\n _this.set('optimized', false);\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = node.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var oriVis = shape.get('ori-visibility');\n if (!shape.get('visible') && oriVis) {\n if (oriVis) shape.show();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = edge.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.get('visible')) {\n var oriVis = shape.get('ori-visibility');\n if (oriVis) shape.show();\n }\n }\n }\n }\n }\n }, 100);\n this.set('timeout', timeout);\n }\n },\n allowDrag: function allowDrag(evt) {\n var _a, _b;\n var target = evt.target;\n var targetIsCanvas = target && target.isCanvas && target.isCanvas();\n if (isBoolean(this.allowDragOnItem) && !this.allowDragOnItem && !targetIsCanvas) return false;\n if (isObject(this.allowDragOnItem)) {\n var _c = this.allowDragOnItem,\n node = _c.node,\n edge = _c.edge,\n combo = _c.combo;\n var itemType = (_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (!node && itemType === 'node') return false;\n if (!edge && itemType === 'edge') return false;\n if (!combo && itemType === 'combo') return false;\n }\n return true;\n }\n};","import { each } from '@antv/util';\nimport { registerBehavior } from '@antv/g6-core';\n// import Behavior from './behavior';\nimport DragCanvas from './drag-canvas';\nimport DragNode from './drag-node';\nimport ActivateRelations from './activate-relations';\nimport BrushSelect from './brush-select';\nimport ClickSelect from './click-select';\nimport ZoomCanvas from './zoom-canvas';\nimport Tooltip from './tooltip';\nimport EdgeTooltip from './edge-tooltip';\nimport CollapseExpand from './collapse-expand';\nimport DragCombo from './drag-combo';\nimport CollapseExpandCombo from './collapse-expand-combo';\nimport LassoSelect from './lasso-select';\nimport CreateEdge from './create-edge';\nimport ShortcutsCall from './shortcuts-call';\nimport ScrollCanvas from './scroll-canvas';\nvar behaviors = {\n 'drag-canvas': DragCanvas,\n 'zoom-canvas': ZoomCanvas,\n 'drag-node': DragNode,\n 'activate-relations': ActivateRelations,\n 'brush-select': BrushSelect,\n 'click-select': ClickSelect,\n 'lasso-select': LassoSelect,\n tooltip: Tooltip,\n 'edge-tooltip': EdgeTooltip,\n 'collapse-expand': CollapseExpand,\n 'drag-combo': DragCombo,\n 'collapse-expand-combo': CollapseExpandCombo,\n 'create-edge': CreateEdge,\n 'shortcuts-call': ShortcutsCall,\n 'scroll-canvas': ScrollCanvas\n};\neach(behaviors, function (behavior, type) {\n registerBehavior(type, behavior);\n});\n// export default Behavior;","import { __assign } from \"tslib\";\nimport { registerBehavior, registerCombo, registerEdge, registerNode, Arrow, Marker, Shape } from '@antv/g6-core';\nimport * as AlgorithmSync from '@antv/algorithm';\nimport * as AlgorithmAsync from '@antv/algorithm/lib/asyncIndex';\nimport Graph from './graph/graph';\nimport TreeGraph from './graph/tree-graph';\nimport { TreeLayout, Layout, registerLayout } from './layout';\nimport Global from './global';\nimport Util from './util';\nimport Plugin from './plugin';\nimport './element';\nimport './behavior';\nvar Algorithm = __assign(__assign({}, AlgorithmSync), AlgorithmAsync);\nvar Grid = Plugin.Grid;\nvar Minimap = Plugin.Minimap;\nvar Bundling = Plugin.Bundling;\nvar Menu = Plugin.Menu;\nvar Fisheye = Plugin.Fisheye;\nvar ToolBar = Plugin.ToolBar;\nvar Tooltip = Plugin.Tooltip;\nvar TimeBar = Plugin.TimeBar;\nvar ImageMinimap = Plugin.ImageMinimap;\nvar EdgeFilterLens = Plugin.EdgeFilterLens;\nvar SnapLine = Plugin.SnapLine;\nvar Legend = Plugin.Legend;\nvar Annotation = Plugin.Annotation;\nexport * from '@antv/g6-core';\nexport * from './types';\nexport * from './interface/graph';\nexport { Graph, TreeGraph, Util, Layout, TreeLayout, registerLayout, Global, Minimap, Grid, Bundling, Menu, Fisheye, Algorithm, ToolBar, Tooltip, TimeBar, ImageMinimap, EdgeFilterLens, SnapLine, Legend, Annotation, Arrow, Marker, Shape };\nexport default {\n version: Global.version,\n Graph: Graph,\n TreeGraph: TreeGraph,\n Util: Util,\n Layout: Layout,\n TreeLayout: TreeLayout,\n registerLayout: registerLayout,\n Global: Global,\n registerBehavior: registerBehavior,\n registerCombo: registerCombo,\n registerEdge: registerEdge,\n registerNode: registerNode,\n Minimap: Plugin.Minimap,\n Grid: Plugin.Grid,\n Bundling: Plugin.Bundling,\n Menu: Plugin.Menu,\n ToolBar: Plugin.ToolBar,\n Tooltip: Plugin.Tooltip,\n Legend: Plugin.Legend,\n TimeBar: TimeBar,\n SnapLine: SnapLine,\n Fisheye: Fisheye,\n ImageMinimap: ImageMinimap,\n EdgeFilterLens: EdgeFilterLens,\n Annotation: Annotation,\n Algorithm: Algorithm,\n Arrow: Arrow,\n Marker: Marker,\n Shape: Shape\n};","import G6 from '@antv/g6-pc';\nG6.version = '4.8.23';\nexport * from '@antv/g6-pc';\nexport default G6;\nexport var version = '4.8.23';","import G6 from '@antv/g6';\n\nG6.registerNode('file-node', {\n draw(cfg, group) {\n const keyShape = group.addShape('rect', {\n name: 'rect-shape',\n attrs: {\n x: 0,\n y: 0,\n fill: '#fff',\n stroke: null,\n },\n });\n let isLeaf = (cfg.children as []).length == 0;\n if (!isLeaf) {\n group.addShape('marker', {\n name: 'marker-shape',\n attrs: {\n symbol: 'triangle-down',\n x: 0,\n y: 0,\n r: 4,\n fill: '#767c82',\n },\n });\n }\n const shape = group.addShape('text', {\n name: 'text-shape',\n attrs: {\n x: 6,\n y: 8,\n fontSize: 16,\n text: cfg.label,\n fill: cfg.tracked ? `#00f` : '#333639',\n textAlign: 'left',\n fontFamily: window\n .getComputedStyle(document.body, null)\n .getPropertyValue('font-family'),\n },\n });\n return keyShape;\n },\n});\nG6.registerEdge(\n 'step-line',\n {\n getControlPoints(cfg) {\n const startPoint = cfg.startPoint!;\n const endPoint = cfg.endPoint!;\n return [\n startPoint,\n {\n x: startPoint?.x,\n y: endPoint?.y,\n },\n endPoint,\n ];\n },\n },\n 'polyline',\n);\n","\n\n","\n\n"],"names":["createDataKey","key","_arrayLikeToArray","arr","len","i","arr2","_unsupportedIterableToArray","o","minLen","arrayLikeToArray","n","_classCallCheck","instance","Constructor","_toPrimitive","input","hint","_typeof","prim","res","_toPropertyKey","arg","toPrimitive","_defineProperties","target","props","descriptor","toPropertyKey","_createClass","protoProps","staticProps","_defineProperty","obj","value","ChevronLeftIcon","defineComponent","h","SwitcherIcon","zero","n1","createLeftBorderStyle","type","cM","c","cB","cE","createTopBorderStyle","style$3","cNotM","buttonGroupProps","NButtonGroup","mergedClsPrefixRef","mergedRtlRef","useConfig","useStyle","style","provide","buttonGroupInjectionKey","useRtl","mergedClsPrefix","self","vars","fontWeight","textColor1","textColor2","textColorDisabled","dividerColor","fontSize","collapseLight","commonLight","collapseLight$1","style$2","fadeInHeightExpandTransition","collapseProps","useTheme","collapseInjectionKey","createInjectionKey","NCollapse","slots","inlineThemeDisabled","uncontrolledExpandedNamesRef","ref","controlledExpandedNamesRef","computed","mergedExpandedNamesRef","useMergedState","themeRef","doUpdateExpandedNames","names","_onUpdateExpandedNames","onUpdateExpandedNames","onExpandedNamesChange","call","doItemHeaderClick","info","onItemHeaderClick","toggleItem","collapse","name","event","accordion","expandedNames","activeNames","index","activeName","rtlEnabledRef","cssVarsRef","cubicBezierEaseInOut","titleFontWeight","titlePadding","titleTextColor","titleTextColorDisabled","textColor","arrowColor","titleFontSize","arrowColorDisabled","itemMargin","themeClassHandle","useThemeClass","_a","NCollapseItemContent","useFalseUntilTruthy","toRef","NFadeInExpandTransition","show","displayDirective","onceTrue","clsPrefix","useVShow","contentNode","withDirectives","vShow","collapseItemProps","NCollapseItem","randomName","createId","mergedNameRef","useMemo","inject","throwError","expandedNamesRef","collapseSlots","collapsedRef","expandedName","e","happensInArea","happensIn","$slots","arrowPlacement","collapsed","mergedDisplayDirective","disabled","triggerAreas","headerNode","resolveSlotWithProps","headerExtraSlot","arrowSlot","area","NBaseIcon","ArrowLeftIcon","ArrowRightIcon","resolveWrappedSlotWithProps","children","module","sizeVariables","cardColor","modalColor","popoverColor","tableHeaderColor","tableColorStriped","borderRadius","fontWeightStrong","lineHeight","fontSizeSmall","fontSizeMedium","fontSizeLarge","composite","tableLight","tableLight$1","borderRadiusSmall","hoverColor","pressedColor","primaryColor","textColor3","changeColor","treeLight","createTheme","checkboxLight","scrollbarLight","emptyLight","treeLight$1","style$1","insideModal","insidePopover","tableProps","NTable","size","borderColor","tdColor","tdColorModal","tdColorPopover","thColor","thColorModal","thColorPopover","thTextColor","tdTextColor","thFontWeight","borderColorModal","borderColorPopover","tdColorStriped","tdColorStripedModal","tdColorStripedPopover","createKey","tdPadding","thPadding","NTh","NTr","NTd","NThead","NTbody","treeSelectInjectionKey","treeInjectionKey","NTreeNodeSwitcher","renderSwitcherIconRef","expanded","hide","indent","onClick","NIconSwitchTransition","NBaseLoading","renderSwitcherIcon","NTreeNodeCheckbox","NTree","doCheck","onCheck","handleUpdateValue","mergedTheme","checked","indeterminate","focusable","NCheckbox","NTreeNodeContent","renderLabelRef","renderPrefixRef","renderSuffixRef","labelFieldRef","selfRef","doClick","handleClick","labelField","nodeProps","selected","renderLabel","renderPrefix","renderSuffix","onDragstart","rawNode","prefix","suffix","label","render","renderDropMark","position","offsetLevel","el","cssPosition","defaultAllowDrop","dropPosition","node","useMergedCheckStrategy","isNodeDisabled","disabledField","traverse","nodes","childrenField","callback","callbackAfter","keysWithFilter","pattern","keyField","filter","keys","highlightKeySet","path","isBrowser","emptyImage","filterTree","tree","visitedTailKeys","visitedNonTailKeys","expandedKeys","filteredTree","visit","t","build","sibs","isVisitedTail","isVisitedNonTail","clonedNode","TreeNode","droppingNodeParentRef","droppingMouseNodeRef","draggingNodeRef","droppingPositionRef","droppingOffsetLevelRef","nodePropsRef","indentRef","blockLineRef","checkboxPlacementRef","checkOnClickRef","disabledFieldRef","showLineRef","overrideDefaultNodeClickBehaviorRef","checkboxDisabledRef","nodeIsDisabledRef","disabledRef","resolvedNodePropsRef","contentInstRef","contentElRef","onMounted","handleSwitcherClick","tmNode","onLoad","selectableRef","checkableRef","checkedRef","mergedCheckOnClickRef","checkable","checkOnClick","_handleClick","expandOnClick","selectable","mergedCheckOnClick","handleCheck","handleNodeClick","_b","overrideDefaultNodeClickBehavior","shouldOverride","handleContentClick","handleLineClick","handleDragStart","handleDragEnter","handleDragOver","handleDragEnd","handleDragLeave","handleDrop","indentNodes","cursor","repeat","draggingNode","droppingPosition","droppingMouseNode","droppingNodeParent","highlight","draggable","blockLine","pending","internalScrollable","checkboxPlacement","dragEventHandlers","dataKey","checkboxOnRight","checkboxNode","NTreeNode","useKeyboard","fNodesRef","mergedExpandedKeysRef","mergedSelectedKeysRef","mergedCheckedKeysRef","handleSelect","mergedSelectedKeys","treeSelectInjection","pendingNodeKeyRef","handleKeydown","pendingNodeKey","enterBehavior","fNodes","fIndex","pendingNode","parentTmNode","MotionWrapper","FadeInExpandTransition","pxfy","iconSwitchTransitionNode","iconSwitchTransition","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","reject","fulfilled","step","rejected","result","createTreeMateOptions","getChildren","treeSharedProps","treeProps","selfElRef","scrollbarInstRef","virtualListInstRef","getScrollContainer","getScrollContent","mergedFilterRef","filteredTreeInfoRef","displayTreeMateRef","createTreeMate","dataTreeMateRef","watchProps","uncontrolledCheckedKeysRef","watchEffect","controlledCheckedKeysRef","checkedStatusRef","mergedCheckStrategyRef","displayedCheckedKeysRef","displayedIndeterminateKeysRef","indeterminateKeys","uncontrolledSelectedKeysRef","controlledSelectedKeysRef","uncontrolledExpandedKeysRef","initUncontrolledExpandedKeys","controlledExpandedKeysRef","expandTimerId","nodeKeyToBeExpanded","uncontrolledHighlightKeySetRef","controlledHighlightKeySetRef","mergedHighlightKeySetRef","loadingKeysRef","expandedNonLoadingKeysRef","dragStartX","droppingNodeRef","droppingNode","isDataReset","watch","nextTick","resetDndState","expandAnimationDisabled","disableExpandAnimationForOneTick","memoizedExpandedKeys","oldValue","expandedKeysAfterChange","doUpdateExpandedKeys","getOptionsByKeys","triggerLoading","loadingKeys","resetDragExpandState","loadError","displayTreeMate","getNode","aipRef","afNodesRef","prevValue","syncScrollbar","nodeHeight","depx","prevVSet","addedKey","removedKey","expandedKey","currentVSet","virtualScroll","viewportHeight","viewportItemCount","baseExpandedKeys","expandedNodeIndex","expandedChildren","flatten","collapsedNodeIndex","collapsedNodeChildren","collapsedChildren","getFIndexRef","createIndexGetter","mergedFNodesRef","scrollbarInst","handleAfterEnter","option","meta","_onUpdateExpandedKeys","onUpdateExpandedKeys","doUpdateCheckedKeys","_onUpdateCheckedKeys","onUpdateCheckedKeys","doUpdateIndeterminateKeys","_onUpdateIndeterminateKeys","onUpdateIndeterminateKeys","doUpdateSelectedKeys","_onUpdateSelectedKeys","onUpdateSelectedKeys","doDragEnter","onDragenter","doDragLeave","onDragleave","doDragEnd","onDragend","doDragStart","doDragOver","onDragover","doDrop","onDrop","resetDragState","resetDropState","checkedAction","checkedKeys","toggleExpand","mergedExpandedKeys","expandNodeId","nodeToBeExpanded","nextKeys","siblingKeySet","selectedKeys","expandDragEnterNode","expand","handleDragLeaveTree","emit","allowDrop","elOffsetHeight","elClientTop","eventOffsetY","mousePosition","getFindex","finalDropNode","finalDropPosition","hoverNodeFIndex","mouseAtExpandedNonLeafNode","offset","nextNode","prevNode","handleScroll","handleResize","handleFocusout","selfEl","targetEl","scrollTo","options","y","exposedMethods","nodeBorderRadius","nodeColorHover","nodeColorPressed","nodeColorActive","loadingColor","nodeTextColor","nodeTextColorDisabled","dropMarkColor","nodeWrapperPadding","lineColor","lineOffsetTop","getPadding","lineOffsetBottom","nodeContentHeight","internalRenderEmpty","blockNode","internalFocusable","rtlEnabled","scrollbarProps","mergedFocusable","tabindex","treeClass","createNode","internalScrollablePadding","padding","NxScrollbar","VVirtualList","item","resolveSlot","NEmpty","__props","isLeft","isTop","prevOffset","shallowReactive","currentStyle","xStyle","yStyle","prevEv","startMove","ev","move","dx","dy","endMove","box","shallowRef","preventSelection","transitions","windowEndMove","top","bottom","left","right","boxDiv","onUnmounted","newValue","oldvalue","updateTarget","lenAttrNames","attrs","attr","attrDesc","qfAttrs","imgRef","clickImg","img","imgRect","innerHeight","offsetTop","ox","oy","childNode","findNodeByXy","percent","positionStyle","imgHover","hoverPosition","imgMove","hoverPositionStyle","router","useRouter","selectorText","selectorResults","searchBySelector","errorTry","message","text","enableSearchBySelector","selector","errorWrap","parseSelector","s","results","stack","getNodeLabel","allKeys","newKeys","k","generateRules","jpgUrl","githubJpgStorage","githubUrlToSelfUrl","zipUrl","githubZipStorage","rule","dayjs","copy","JSON5","_1vw","focusNode","focusCount","id","then","delay","treeRef","behavior","debounce","parent","Set","add","length","every","v","has","treeFilter","treeNodeProps","onUpdateFocusNode","color","extendStatics","d","b","p","__extends","__","__assign","__rest","__decorate","decorators","desc","r","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","f","kind","_","done","context","__runInitializers","useValue","__propKey","x","__setFunctionName","__metadata","metadataKey","metadataValue","__generator","body","g","verb","op","__createBinding","m","k2","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","j","jl","__spreadArray","to","from","pack","l","__await","__asyncGenerator","q","a","resume","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","state","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","env","async","dispose","_SuppressedError","suppressed","__disposeResources","fail","next","rec","tslib_es6","isArrayLike","contains","func","difference","values","toString","isType","isFunction$2","isNil","isArray$2","isObject$1","each","elements","rst","isArray","isObject","isFunction","isMatch","_keys","isObjectLike","isPlainObject","proto","find","predicate","_predicate","findIndex","fromIndex","firstValue","data","flattenDeep","max$6","prev","curr","min$5","getRange","filterValues","tmp","max","getMax","min","getMin","arrPrototype","splice","indexOf","pull","_i","pullAt","indexes","last","previous","reduce","fn","init","remove","isString$2","str","sortBy","comparer","keys_1","isString","prop","uniq","cache","union","sources","valuesOfKey$1","tmpMap","val","head","startsWith","endsWith","some","hasOwnProperty","groupBy","condition","groupToMap","paramscondition_1","row","unique","group$1","groups","array","getWrapBehavior","action","wrapBehavior","method","numColorCache","numberToColor","num","parseRadius","radius","r1","r2","r3","r4","clamp","fixedBase","base","isNumber","isDecimal","isEven","isInteger","isNegative","PRECISION","isNumberEqual","precision","isOdd","isPositive","maxBy$1","maxItem","minBy$1","minItem","DEGREE","toDegree","radian","parseInt$2","RADIAN","toRadian","degree","has$1","hasValue$1","toString$5","lowerCase","lowerFirst","substitute","match","upperCase","upperFirst","getType","isArguments","isBoolean","isDate","isError","isFinite$2","isNull","objectProto","isPrototype","Ctor","isRegExp","isUndefined","isElement","requestAnimationFrame","cancelAnimationFrame","handler","_mix","dist","mix","src1","src2","src3","augment","args","clone","wait","immediate","timeout","later","callNow","memoize$1","resolver","memoized","MAX_MIX_LEVEL","_deepMix","src","level","maxLevel","deepMix","extend","subclass","superclass","overrides","staticOverrides","create","Tmp","superObj","isEmpty","isEqual","other","valueKeys","otherKeys","isEqualWith$1","map","identity","mapValues$1","object","get$2","defaultValue","keyArr","set$b","idx","pick$1","omit$1","throttle$1","throttled","now","remaining","toArray$1","uniqueId$4","noop$2","identity$8","isArraylike","ctx","measureTextWidth","memoize","font","fontFamily","fontStyle","fontVariant","getEllipsisText","maxWidth","STEP","PLACEHOLDER_WIDTH","leftText","leftWidth","currentText","currentWidth","default_1","def","behaviorOption","cfg","graph","_this","events","Behavior","prototype","eventsToBind","handle","WILDCARD","EventEmitter","evt","once","wildcardEvents","doEmit","es","length_1","EPSILON","ARRAY_TYPE","RANDOM","setMatrixArrayType","equals","out","glMatrix.ARRAY_TYPE","fromValues","m00","m01","m10","m11","set","transpose","a1","invert","a0","a2","a3","det","adjoint","determinant","multiply","b0","b1","b2","b3","rotate","rad","scale","v0","v1","fromRotation","fromScaling","frob","LDU","L","D","U","subtract","exactEquals","glMatrix.EPSILON","multiplyScalar","multiplyScalarAndAdd","mul","sub","tx","ty","aa","ab","ac","ad","atx","aty","a4","a5","b4","b5","translate","fromTranslation","fromMat4","m02","m12","m20","m21","m22","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","b00","b02","b10","b12","b20","b22","fromMat2d","fromQuat","z","w","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","projection","width","height","a6","a7","a8","b6","b7","b8","m03","m13","m23","m30","m31","m32","m33","axis","rotateX","rotateY","rotateZ","fromXRotation","fromYRotation","fromZRotation","fromRotationTranslation","xy","xz","yz","fromQuat2","translation","bx","by","bz","bw","ax","ay","az","aw","magnitude","getTranslation","mat","getScaling","getRotation","scaling","is1","is2","is3","sm11","sm12","sm13","sm21","sm22","sm23","sm31","sm32","sm33","trace","S","fromRotationTranslationScale","sx","sy","sz","fromRotationTranslationScaleOrigin","oz","out0","out1","out2","out4","out5","out6","out8","out9","out10","frustum","near","far","rl","tb","nf","perspectiveNO","fovy","aspect","perspective","perspectiveZO","perspectiveFromFieldOfView","fov","upTan","downTan","leftTan","rightTan","xScale","yScale","orthoNO","lr","bt","ortho","orthoZO","lookAt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","targetTo","a9","a14","a15","b9","b13","b14","b15","divide","ceil","floor","round","scaleAndAdd","distance","squaredDistance","squaredLength","negate","inverse","normalize","dot","cross","lerp","hermite","factorTimes2","factor1","factor2","factor3","factor4","bezier","inverseFactor","inverseFactorTimesTwo","random","glMatrix.RANDOM","zScale","transformMat4","transformMat3","transformQuat","qx","qy","qz","qw","uvx","uvy","uvz","uuvx","uuvy","uuvz","w2","angle","mag1","mag2","mag","cosine","div","sqrDist","sqrLen","forEach","vec","stride","count","u","A","B","C","E","F","G","H","I","J","v2","v3","v4","s1","s2","ix","iy","iz","iw","setAxisAngle","getAxisAngle","out_axis","getAngle","dotproduct","calculateW","exp","et","ln","pow","slerp","omega","cosom","sinom","scale0","scale1","u1","u2","u3","sqrt1MinusU1","sqrtU1","invDot","conjugate","fromMat3","fTrace","fRoot","fromEuler","halfToRad","cx","cy","cz","vec4.clone","vec4.fromValues","vec4.copy","vec4.set","vec4.add","vec4.scale","vec4.dot","vec4.lerp","vec4.length","vec4.squaredLength","vec4.normalize","vec4.exactEquals","vec4.equals","rotationTo","tmpvec3","vec3.create","xUnitVec3","vec3.fromValues","yUnitVec3","vec3.dot","vec3.cross","vec3.len","vec3.normalize","sqlerp","temp1","temp2","setAxes","matr","mat3.create","view","dq","w1","fromRotationTranslationValues","outer","quat.create","mat4.getRotation","mat4.getTranslation","getReal","quat.copy","getDual","setReal","setDual","ax1","ay1","az1","aw1","bx1","by1","bz1","ax2","ay2","az2","aw2","quat.rotateX","quat.rotateY","quat.rotateZ","rotateByQuatAppend","rotateByQuatPrepend","rotateAroundAxis","axisLength","ax0","ay0","az0","aw0","bw1","bx0","by0","bz0","bw0","quat.dot","mt","sqlen","quat.length","quat.squaredLength","a_dot_b","transformMat2","transformMat2d","p0","p1","sinC","cosC","leftTranslate","transMat","mat3.fromTranslation","mat3.multiply","leftRotate","rotateMat","mat3.fromRotation","leftScale","scaleMat","mat3.fromScaling","leftMultiply","transform","actions","matrix","adjMatrix","graphData","directed","edges","nodeMap","edge","source","sIndex","tIndex","defaultComparator","LinkedListNode","LinkedList","comparator","newNode","deleteNode","currentNode","_c","deletedTail","deletedHead","Queue","removeHead","getNeighbors","nodeId","currentEdges","neighhborsConverter_1","neighhborsConverter_2","neighhborsConverter","getOutEdgesNodeId","getEdgesByNodeId","uniqueId","random1","random2","initCallbacks","callbacks","initiatedCallback","stubCallback","allowTraversalCallback","seen","breadthFirstSearch","startNodeId","originalCallbacks","nodeQueue","previousNode","_loop_1","detectConnectedComponents","allComponents","visited","nodeStack","getComponent","neighbors","neighbor","targetNode","component","detectStrongConnectComponents","inStack","indices","lowLink","_loop_2","targetNodeID","tmpNode","nodes_1","getConnectedComponents","degrees","getInDegree","nodeDegree","getOutDegree","depthFirstSearchRecursive","depthFirstSearch","detectDirectedCycle","cycle","dfsParentMap","unvisitedSet","visitingSet","visitedSet","currentCycleNode","previousCycleNode","firsetUnVisitedKey","dfs","detectAllUndirectedCycle","nodeIds","include","allCycles","components","components_1","root","rootId","parent_1","used","curNode","curNodeId","neighborId","cycleValid","cyclePath","detectAllDirectedCycle","blocked","idx2Node","node2Idx","unblock","thisNode","circuit","start","adjList","closed","getMinComponentAdj","minCompIdx","minIdx","comp","nodeIdx_1","nodeIdx","subgraphNodes","sccs","scc","startNode","detectAllCycles","minVertex","marks","minDis","minNode","dijkstra","weightPropertyName","prevs","nodeNum","minNodeId","relatedEdges","edgeTarget","edgeSource","weight","paths","findAllPaths","foundPaths","prevPaths","prevPaths_1","prePath","findShortestPath","end","allPath","findAllPath","isVisited","child","floydWarshall","adjacentMatrix","getAdjMatrix","labelPropagation","maxIteration","clusters","cid","iid","entry","jid","iter","changed","neighborClusters","neighborWeight","neighborNode","neighborClusterId","maxWeight","bestClusterIds","clusterId","selfClusterIdx","selfCluster","nodeInSelfClusterIdx","randomIdx","bestCluster","state_1","cluster","clusterEdges","clusterEdgeMap","sourceClusterId","targetClusterId","newEdgeId","newEdge","clustersArray","Vector","otherVector","otherArr","cloneArr","getAllProperties","allProperties","DistanceType","getAllKeyValueMap","dataList","involvedKeys","uninvolvedKeys","allKeyValueMap","oneHot","oneHotCode","allValue","isAllNumber","code","keyValue","allKeyValue","valueIndex","subCode","getDistance","otherItem","distanceType","getModularity","ks","param","modularity","clusteri","clusterj","ki","kj","getInertialModularity","allPropertiesWeight","totalProperties","avgProperties","variance","propertiesi","squareEuclideanDistance","squareEuclideanDistanceInfo","propertiesj","inertialModularity","inertial","louvain","threshold","propertyKey","inertialWeight","nodeTypeInfo_1","nodeType","properties","totalModularity","previousModularity","finalNodes","finalClusters","increaseWithinThreshold","sumTot","bestIncrease","commonParam","kiin","selfClusterNodes","scNode","scNodeIdx","removeModurarity","selfClusterNodesAfterRemove","nodeRemove","removeInertialModularity","nodeNeighborIds","neighborNodeId","neighborCluster","clusterNodes","neighborClusterKiin","cNode","cNodeIdx","addModurarity","clusterNodesAfterAdd","nodeAdd","addInertialModularity","increase","previousClusterId_1","neighborClusterSumTot_1","selfClusterSumTot_1","newClusterIdMap","clusterIdx","newId","nodeInfo","iLouvain","kCore","minIndexId","originIndex","getCentroid","centroid","kMeans","defaultClusterInfo","allPropertiesWeightUniq","finalK","centroids","centroidIndexList","randomIndex","maxDistance","maxDistanceNodeIndex","totalDistance","avgDistance","iterations","minDistanceIndex","minDistance","centroidsEqualAvg","totalVector","avgVector","cosineSimilarity","targetItem","targetItemVector","targetNodeNorm2","itemVector","itemNorm2","norm2Product","nodesCosineSimilarity","seedNode","similarNodes","seedNodeIndex","seedNodeProperties","allCosineSimilarity","nodeProperties","cosineSimilarityValue","UnionFind","items","items_1","rootA","rootB","defaultCompare","MinBinaryHeap","compareFn","element","primMST","selectedEdges","currNode","compareWeight","edgeQueue","currEdge","kruskalMST","weightEdges","disjointSet","curEdge","minimumSpanningTree","algo","algos","pageRank","epsilon","linkProb","leakedRank","maxIterations","nodesCount","currentRank","curRanks","prevRanks","outDegree","VACANT_EDGE_ID","VACANT_NODE_ID","VACANT_EDGE_LABEL","VACANT_NODE_LABEL","VACANT_GRAPH_ID","Edge","Node","Graph","edgeIdAutoIncrease","rEdge","DFSedge","fromNode","toNode","fromNodeLabel","edgeLabel","toNodeLabel","DFScode","aLength","bLength","graphId","dfsEdge","fromNodeId","toNodeId","nodeLabel1","nodeLabel2","oldFrom","selfLength","fromNodeIdx","toNodeIdx","History","pdfs","GSpan","graphs","minSupport","minNodeNum","_d","maxNodeNum","_e","_f","_g","verbose","edge1","edge2","history","edge2To","edge2ToEdges","edgeLength","rightmostEdge","minNodeLabel","rightmostEdgeToId","newToNodeLabel","projected","graphMap","pro","minLabel","nodeEdgeNodeLabel","dfsCode","dfsCodeMin","forwardEdges","otherNode","projectIsMin","rmpath","maxToC","backwardRoot","flag","newTo","backwardEdge","minBackwardEdgeLabel","idx_1","forwardRoot","newFrom","forwardPureEdges","pathLength","forwardRmpathEdges","state_2","forwardMinEdgeNodeLabel","support","_loop_3","frequentSize1Subgraphs","nodeLabelCounter","nodeEdgeNodeCounter","nodeLableCounted","nodeLabel","graphNodeKey","counter","nodeEdgeNodeKey","forwardRootEdges","formatGraphs","nodeLabelProp","edgeLabelProp","fGraph","nodeIdxMap","sourceIdx","targetIdx","toGraphDatas","DEFAULT_LABEL_NAME","gSpan","params","formattedGraphs","algoParams","calculator","findKNeighborUnits","spm","units","findKNeighborUnit","unitNodeIdxs","labelCountMap","findNodePairsRandomly","maxNodePairNum","kNeighborUnits","nodePairNumEachNode","nodePairMap","foundNodePairCount","unit","nodePairForICount","outerLoopCount","neighborNum","oidx","innerLoopCount","gap","getIntersectNeighborInducedGraph","neighborUnits","cachedInducedGraphMap","pair","startUnitNodeIds","endUnitNodeIds","endSet","intersect","intersectIdMap","intersectLength","getMatchedCount","structure","sourceLabel","targetLabel","strNodeLabel1","strNodeLabel2","strEdgeLabel","findRepresentStructure","matchedCountMap","structureNum","structures","maxOffset","representClusterType","countMapI","sortedGraphKeys","groupNum","aveIntraDist","aveCounts","graphsInCluster","aveCount","aveIntraPerCluster","graphsNum","graphKey1","graph1Count","graphKey2","aveInterDist","aveCount1","aveCount2","getNodeMaps","nodeLabelMap","getEdgeMaps","edgeMap","edgeLabelMap","sourceNode","getSpmMap","iId","jId","getNDSDist","node1","node2","spDist","cachedNDSMap","cachedInterInducedGraph","interInducedGraph","pairMap","stashPatternNodeLabelDegreeMap","minPatternNodeLabelDegreeMap","neighborLabel","patternNodeMap","patternNodeLabelMap","minPatternNodeLabelDegree","minPatternNodeLabelInDegree","minPatternNodeLabelOutDegree","patternNodeWithLabel","patternNodeDegree","patternNodeInDegree","patternNodeOutDegree","GADDI","patternSpm","spmMap","patternSpmMap","patternEdgeLabelMap","patternSpmSpread","patternKNeighborUnits","nodePairsMap","intGMap","freStructures","subStructureCount","dsG","ndsDist","beginPNode","candidates","maxNodeNumWithSameLabel","pLabel","nodesWithSameLabel","patternIntGraphMap","patternNDSDist","patternNDSDistMap","patternSpDist","patternSpDistBack","label2","patternNodesWithLabel2","patternNodePairMap","nodeWithLabel2","distBack","currentPatternNDSDistArray","patternIntGraph","candidatesNum","_loop_4","graphNeighborUnit","graphNeighborUnitCountMap","patternLabel2Num","prune2Invalid","cNodePairMap","currentNDSDistArray","intGraph","prune3Invalid","candidateGraphs","candidate","lengthNeighborUnit","neighborNodes","unmatched","distToCandidate","maxDistWithLabelInPattern","keyBack","distFromCandidate","maxBackDistWithLabelInPattern","ndsToCandidate","patternKey","minNdsWithLabelInPattern","undirectedLengthsToBeginPNode","undirectedLengthsToBeginPNodeLabelMap","candidateGraphNum","candidateGraph","candidateNodeLabelCountMap","candidateNodeMap","cNodeLabel","candidateEdges","edgeLabelCountMap","pattenrEdgeLabelNum","prunedByEdgeLabel","label_1","candidateEdgeNum","candidateGraphInvalid","_loop_5","patternEdgesWithLabel","edgeMatched","patternEdge","patternSource","patternTarget","lengthsToCandidate","targetId","targetNodeLabel","nLabel","degreeChanged","loopCount","currentCandidateNodeNum","cgNode","nodeInDegree","nodeOutDegree","deleteCondition","cedge","currentLength","cg1","cg1EdgeMap","_loop_6","cg2","cg2EdgeMap","same","Stack","maxStep","detectCycle","index$5","connectedComponent","getDegree","ext.transform","compare","attributeName","isBetween","getLineIntersect","p2","p3","tolerance","D0","D1","kross","sqrKross","invertKross","sqrLen0","sqrLen1","getRectIntersectByPoint","rect","point","points","getCircleIntersectByPoint","circle","getEllipseIntersectByPoint","ellipse","applyMatrix","tag","vector","vec3.transformMat3","invertMatrix","inversedMatrix","mat3.invert","getCircleCenterByPoints","denominator","vx","vy","scaleMatrix","ratio","newRow","group","animate","animateCfg","bbox","dx_1","dy_1","lastX_1","lastY_1","newX_1","newY_1","movedMatrix","scaleXY","onSegment","isPointInPolygon","isHit","dcmp","xValue","intersectBBox","box1","box2","lineIntersectPolygon","lines","line","isIntersect","isPolygonsIntersect","points1","points2","getBBox","xArr","yArr","parseToLines","first","bbox1","bbox2","isIn","lines1","lines2","Line","minX","minY","maxX","maxY","getBBoxBoundLine","direction","bounds","fractionAlongLineA","la","lb","uaT","ubT","uB","ua","ub","itemIntersectByLine","directions","countIntersections","intersections","fractionToLine","testDistance","getPointsCenter","centerX","centerY","points_1","squareDist","pointLineSquareDist","px","py","dotprod","projlenSq","lenSq","isPointsOverlap","pointRectSquareDist","isRight","isBottom","isPointOutside","pointLineDistance","vec2.exactEquals","vec2.normalize","vec2.dot","alpha","lerpArray","subjectColor","backColor","activeFill","nodeMainFill","comboFill","disabledFill","edgeMainStroke","edgeInactiveStroke","edgeDisablesStroke","inactiveStroke","highlightStroke","highlightFill","colorSet","Global$1","letterAspectRatio","PI","sin","cos","SELF_LINK_SIN","SELF_LINK_COS","leftTop","rightBottom","lx","ly","rx","ry","getLoopCfgs","container","containerMatrix","keyShape","loopCfg","Global","startPoint","endPoint","halfOfHeight","halfOfWidth","rstart","rend","sinDeltaStart","cosDeltaStart","sinDeltaEnd","cosDeltaEnd","shapeType","defaultPointPadding","maxPointPadding","pointPadding","swap","startVec","scaleRateStart","scaleRateEnd","startExtendVec","vec2.scale","controlPoint1","endVec","endExtendVec","controlPoint2","getLabelPosition","pathShape","refX","refY","TAN_OFFSET","offsetPoint","normal","traverseUp","traverseTree","traverseTreeUp","getLetterWidth","letter","getTextSize","truncateLabelByLength","plainCombosToTrees","addedMap","modelMap","cd","mappedObj","mappedParent","parent_2","pa","combo","cnode","maxDepth","itemType","oriNodeModel","reconstructTree","trees","subtreeId","newParentId","brothers","subtree","comboChildsMap","foundSubTree","oldParentId","found_1","newParentDepth_1","currentDepth_1","getComboBBox","comboBBox","comboModel","fixSize","fixCollapseSize","useFixSize","halfSize","childItem","childBBox","shouldRefreshEdge","refreshEdge","cloneBesidesImg","clonedObj","key1","obj2","clonedObj2_1","key2","getAnimateCfgWithCallback","animateConfig","animateCfgCallback_1","dataValidation","combos","validated_1","nonNode","comboIds","ids","nonEdges","singleDataValidation","ModeController","modes","mode","behaviors","behaves","behave","BehaviorInstance","modeBehaviors","current","isAdd","currentMode","newCfg","behaviorSet","length_2","SPACES","PATH_COMMAND","PATH_VALUES","parsePathString","pathString","paramCounts","catmullRomToBezier","crp","iLen","ellipsePath","pathToAbsolute","pathArray","mx","my","pa0","dots","crz","ii","jj","kk","l2c","q2c","_13","_23","a2c","large_arc_flag","sweep_flag","recursive","_120","f1","f2","X","Y","rx2","ry2","df","f2old","x2old","y2old","c1","c2","hx","hy","m1","m2","m3","m4","newres","pathToCurve","path2","attrs2","pcoms1","pcoms2","pfirst","pcom","processPath","nx","ny","fixArc","pp","pi","fixM","path1","seg","seg2","seglen","seg2len","p2s","parsePathArray","base3","p4","t1","t2","bezlen","x3","y3","x4","y4","Tvalues","Cvalues","sum","ct","xbase","ybase","comb","curveDim","tvalues","b2ac","sqrtb2ac","jlen","px2","py2","isPointInsideBBox","rectPath","isBBoxIntersect","bezierBBox","p1x","p1y","c1x","c1y","c2x","c2y","p2x","p2y","findDotsAtSegment","t13","t12","t3","interHelper","bez1","bez2","justCount","l1","l2","n2","dots1","dots2","di","di1","dj","dj1","ci","cj","is","interPathHelper","x1m","y1m","x2m","y2m","pj","intr","intersection","decasteljau","recurse","middlePoints","splitCurve","segments","leftSegments","rt","split","segment","cmd","splitSegment","temp","fillPath","sourceLen","targetLen","segmentsToFill","filled","obj1","getMinDiff","del","modify","levenshteinDistance","sourceSegment","targetSegment","fillPathByDiff","diffMatrix","changes","minPos","diff","_splitPoints","former","formerEnd","_getSegmentPoints","formatPath","fromPath","toPath","GraphEvent","removeFromArray","isParent","shape","isAllowCapture","Base","_super","defaultCfg","EE","BrowserInfo","version","os","NodeInfo","SearchBotDeviceInfo","bot","BotInfo","ReactNativeInfo","SEARCHBOX_UA_REGEX","SEARCHBOT_OS_REGEX","REQUIRED_VERSION_PARTS","userAgentRules","operatingSystemRules","detect","userAgent","parseUserAgent","getNodeVersion","matchUserAgent","matched","browser","regex","uaMatch","matchedRule","versionParts","createVersionParts","detectOS","searchBotMatch","isNode","output","multiplyMatrix","multiplyVec2","MATRIX","CLONE_CFGS","RESERVED_PORPS","DELEGATION_SPLIT","_cloneArrayAttr","getFormatFromAttrs","toAttrs","fromAttrs","getFormatToAttrs","checkExistedAttrs","animations","animation","startTime","duration","Element","changeType","clip","originValue","targetAttrs","applyTo","zIndex","destroy","totalMatrix","currentMatrix","parentMatrix","clipCfg","canvas","clipShape","ShapeBase","Cons","originAttrs","cons","cfgName","destroyed","timeline","easing","noop","onFrame","pauseCallback","resumeCallback","formatToAttrs","toEnd","pauseTime","eventObj","relativeShape","name_1","subName","this_1","eventName","translateX","translateY","newMatrix","targetX","targetY","ratioX","ratioY","SHAPE_MAP","INDEX","setCanvas","setTimeline","removeChild","getComparer","Container","childMinX","childMaxX","childMinY","childMaxY","preTotalMatrix","groupClass","tmpCfg","TmpGroupClass","preParent","className","frame","interval","pokeDelay","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","setFrame","clearNow","Timer","timer","time","sleep","timerFlush","wake","nap","poke","t0","define","constructor","factory","definition","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","channels","color_formatHex","color_formatHsl","color_formatRgb","hslConvert","format","rgbn","Rgb","rgba","hsla","rgbConvert","rgb","opacity","rgb_formatHex","rgb_formatRgb","hex","Hsl","hsl","hsl2rgb","constant$2","linear","exponential","gamma","nogamma","constant","rgbGamma","colorRgb","numberArray","isNumberArray","interpolateArray","genericArray","nb","na","date","number$1","object$1","reA","reB","one","string$1","bi","am","bm","bs","number","interpolate","string","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","exponent","polyIn","custom","polyOut","polyInOut","halfPi","sinIn","sinOut","sinInOut","tpmt","expIn","expOut","expInOut","circleIn","circleOut","circleInOut","bounceIn","bounceOut","bounceInOut","overshoot","backIn","backOut","backInOut","tau","amplitude","period","elasticIn","elasticOut","elasticInOut","EASING_MAP","getEasing","d3Ease","isColorProp","isGradientColor","IDENTITY_MATRIX","_update","cProps","interf","PathUtil.parsePathString","PathUtil.fillPathByDiff","PathUtil.formatPath","toPathPoint","fromPathPoint","cPathPoint","matrixFn","update","elapsed","easeFn","Timeline","isFinished","d3Timer.timer","autoDraw","animator","CLICK_OFFSET","LEFT_BTN_CODE","EVENTS","emitTargetEvent","bubbleEvent","isOverEvent","EventController","pointInfo","fromShape","toShape","clientPoint","leaveCanvas","preShape","isCanvasEmit","draggingShape","mousedownPoint","mousedownShape","timeWindow","PX_SUFFIX","isFirefox","Canvas","eventController","supportCSSTransform","clientX","clientY","clientInfo","AbstractGroup","AbstractShape","canvasBBox","topLeft","topRight","bottomLeft","bottomRight","shadowBlur","shadowOffsetX","shadowOffsetY","shadowLeft","shadowRight","shadowTop","shadowBottom","startArrowShape","endArrowShape","inBBox","register","getMethod","getBBoxByArray","piMod","LineUtil","lengthSquare","nearestPoint","tCallback","segNum","increaseRate","_t","d1","d2","snapLength","totalLength","nextX","nextY","quadraticAt","onet","extrema","derivativeAt","divideQuadratic","xt","yt","quadraticLength","iterationCount","quadratics","QuadUtil","xExtrema","yExtrema","cubicAt","extremas","discSqrt","disc","divideCubic","c3","c12","c23","cubicLength","cubics","CubicUtil","copysign","absv","ellipse$1","relativeX","relativeY","squareA","squareB","nearestX","nearestY","ex","ey","rx1","ry1","delta_c","delta_t","tangentAngle","derivativeXAt","xRotation","startAngle","endAngle","derivativeYAt","xAt","yAt","getPoint","EllipseArcUtil","xDim","xs","xAngle","yDim","ys","yAngle","relativeVector","relativePoint","analyzePoints","lengthOfSegment","pointAtSegments","startRatio","currentRatio","localRatio","angleAtSegments","distanceAtSegment","nextPoint","distance_1","PolylineUtil","mergeBBox","mergeArrowBBox","startArrowBBox","endArrowBBox","polyline","Util.getBBoxByArray","polygon","offScreenCtx","getOffScreenContext","getTextHeight","lineCount","spaceingY","getLineSpaceing","getTextWidth","textArr","subText","measureWidth","assembleFont","textAlign","textBaseline","regexTags","regexDot","parsePath","smoothBezier","smooth","isLoop","constraint","cps","hasConstraint","prevPoint","nextCp0","cp1","cp0","vec2.min","vec2.max","prevIdx","vec2.sub","d0","vec2.distance","vec2.add","catmullRom2Bezier","pointList","controlPointList","cp2","REGEX_MD","toSymmetry","needProcess","preParams","upCmd","symetricT","symetricS","vMag","vRatio","vAngle","isSamePoint","point1","point2","getArcParams","arcFlag","sweepFlag","xp","yp","lambda","cxp","cyp","theta","dTheta","getSegments","currentPoint","nextParams","startMovePoint","lastStartMovePointIndex","command","arcParams","prePoint","cp","preSegment","_h","dx1","dy1","dx2","dy2","getPathBox","lineWidth","segmentsWithAngle","extra","getExtraFromSegmentWithAngle","currentAndPre","currentAndNext","preAndNext","currentAngle","stroke","path2Segments","G6GraphEvent","formatPadding","intPadding","cloneEvent","isViewportChanged","MATRIX_LEN","ORIGIN_MATRIX","isNaN","calculationItemsBBox","minx","maxx","miny","maxy","processParallelEdges","offsetDiff","multiEdgeType","singleEdgeType","loopEdgeType","cod","loopPosition","tags","reverses","sourceTarget","sedge","dst","arcEdges","sign","ext","gl_matrix_1","require$$0","transform_1","angleTo","direct","ang","angleLargeThanPI","vertical","ViewController","minX_1","minY_1","maxX_1","maxY_1","transMinX","transMinY","transMaxX","transMaxY","viewCenter","groupCenter","startMatrix","zoomToFit","translatedMatrix","animationConfig_1","minZoom","maxZoom","realRatio","zoomedMatrix","animationConfig","minX_2","minY_2","maxX_2","maxY_2","rules","onlyOutOfViewPort","ratioRule","minX_3","minY_3","maxX_3","maxY_3","wRatio","hRatio","initZoomRatio","endZoom","modelCenter","viewportMatrix","canvasX","canvasY","canvasPoint","sourceMatrix","targetMatrix","itemBBox","plugins","plugin","looseJSONParse","safeParse","firstAttempt","tail","objectStack","syntaxStack","isLastPair","syntaxes","syntax","getValueStore","nowChar","isInString","isLastTranslate","isInObject","isInArray","isWaitingValue","tempArr","keyConvert","xmlDataRenderer","xml","get","parseXML","tagName","childrenBBox","shapeHeight","shapeWidth","generateTarget","lastOffset","defaultBbox","marginTop","compareTwoTarget","nowTarget","formerTarget","formerChildren","nowChildren","formerKeys","nowKeys","createNodeFromXML","gen","compileXML","rawStr","xmlParser","resultTarget","keyshape","renderTarget","rest","newTarget","lastTarget","diffResult","addShape","delShape","targetShape","originAttr","ucfirst","ShapeFactoryBase","updateType","ShapeFramework","defaultAnchorPoints","anchorPoints","Shape","factoryType","factoryBase","shapeFactory","nodeDefinition","extendShapeType","shapeObj","autoNodeDefinition","jsx","extendShape","edgeDefinition","comboDefinition","CACHE_BBOX","CACHE_CANVAS_BBOX","ItemBase","model","styles","visible","keyShapeName","styles_1","currentStatesStyle_1","name_2","shapeAttrs","shapeStateStyle_1","shapeAttrs_1","keyShapeStateStyles_1","styleKey","subStyle","originStyles","keyShapeStyle","shapeName","states","currentShape","styles_2","newModel","stateStyle","stateName","filterStateName","newStates","filterStates","originStates","enableOptimize","oriVisible","cfgVisible","originPosition","stateStyles","updateCfg","enable","END_MAP","ITEM_NAME_SUFFIX","POINT_NAME_SUFFIX","ANCHOR_NAME_SUFFIX","pointName","itemName","preItem","controlPoints","anchorName","anchorIndex","oppositeName","sourcePoint","targetPoint","linkCenter","sourceItem","Item","CACHE_ANCHOR_POINTS","curPoint","dis","neighborsConverter_1","neighborsConverter_2","neighborsConverter","intersectPoint","linkPoint","bbox_1","shapeCfg","pointArr","existX","existY","updateLabel","bboxAffectedStyleKeys","beforeAttrs","bboxAffectedStyleBefore","afterAttrs","CACHE_SIZE","Combo","modelSize","modelFixSize","useModelSize","cacheBBox","oriX","oriY","cacheSize","NODE","EDGE","VEDGE","COMBO","CFG_PREFIX","MAPPER_SUFFIX","STATE_SUFFIX","ItemController","throttle","edgeToBeUpdateMap","edgeValues","vType","upperType","defaultModel","mapper","mappedModel_1","bboxX","bboxY","comboGroup","comboModel_1","mappedModel","edges_1","comboAnimate","followCombo","comboX","comboY","combEdges","comboId","kids","comboTrees","subTree","childModel","edgeSet","itemModel","vitems","vindex","itemId","itemMap","brothers_1","ctree","bidx","parentId","comboInTree_1","found_2","currentItem","comboModels","id_1","children_1","found_3","StateController","enabled","graphStates","itemInState","stateNames","getSpline","spliePath","getControlPoint","tangent","perpendicular","pointsToPolygon","pathToPoints","getClosedSpline","second","lastSecond","closedPath","cp1x","cp1y","cp2x","cp2y","vecScaleTo","unitNormal","nLength","vecFrom","roundedHull","polyPoints","roundedHull1","roundedHull2","offsetVector","invOffsetVector","segmentIndex","arcData","pathFragment","paddedHull","pointCount","smoothHull1","smoothHull2","extensionVec","extension0","extension1","tangentHalfLength","controlDelta","invControlDelta","control0","control1","control3","hullPoints","pNext","priorIndex","getStarPath","outerR","innerR","genConvexHull","pointMap","lower","upper","strictHull","defaultOps","MarchingSquares","contour","potentialArea","marched","getVal","getState","squareVal","doMarch","xPos","yPos","prevX","prevY","initGridCells","pixelGroupSize","scaleWidth","scaleHeight","gridCells","pickBestNeighbor","nonMembers","closestNeighbour","minCost","neighbourItem","itemP","neighbourItemP","directLine","numberObstacles","_item","getIntersectItem","closestItem","computeRoute","maxRoutingIterations","morphBuffer","checkedLines","linesToCheck","hasIntersection","pointExists","isPointInNonMembers","_nonMembers","_nonMembers_1","itemContour","intersections_1","testReroute","isFirst","tempMorphBuffer","virtualNode","rerouteLine","exist","pointInside","getRoute","optimalNeighbor","mergeLines","finalRoute","line1","line2","mergeLine","genBubbleSet","members","ops","virtualEdges","activeRegion","getActiveRregion","hull","fillPotentialArea","marchedPath","isContourValid","members_1","bboxes","bboxes_1","pos2GridIx","gridIx","gridIx2Pos","nodeInfA","edgeInfA","getAffectedRegion","thresholdR","startX","startY","endX","endY","addItemInfluence","influenceFactor","tempX","tempY","distanceSq","dr","addEdgeInfluence","minDistanceSq","mdr","buffer","wrapNormal","topIntersect","leftIntersect","bottomIntersect","rightIntersect","cornerPos","totalArea","calcHalfArea","intersect1","intersect2","topArea","leftArea","Hull","nodeSize","nodeItem","shapePoints","shapeBBox","AbstractGraph","comboSorted","depthMap","dataDepthMap","cTree","edgeItem","sourceDepth","targetDepth","depth","viewController","modeController","itemController","stateController","edgeGroup","nodeGroup","delegateGroup","nodeFn","edgeFn","comboFn","additionalFilter","currentZoom","targetZoom","finalRatio","failed","aniMatrix_1","initialRatio_1","targetRatio_1","toRatio","isAnimate","curAniamteCfg","before","after","auto","deletedModel","newComboTrees","itemMap_1","foundParent_1","newCombo","parentCombo","itemMap_2","foundParent_2","foundNode_1","cloneNode","sortCombo","currentComboSorted","addedModel","returnItems","returnItem","stackEnabled","unupdatedModel","afterModel","layoutController","success","nodesArr","edgesArr","models","propsData","localRefresh","combosData","comboItems","combosLength","relayoutAtChangeData","childrenIds","comboConfig","shouldStack","childrenParentCache","childId","childType","childrenIdsSet","pulledComboTreesById","treeNode","parentTreeNode","parentItem","newChildrenParent","elementId","cItem","comboItem","treeToBeUncombo","edgeIds","edgeId","childrenParentCache_1","childNewParent_1","uItem","valid_1","itemSubTree_1","beforeData","afterData","vedges","vedge","referComboModel","toNodes","updatedNodes","updateItems","sourceModel","targetModel","avoidEmit","align","alignPoint","toPoint_1","forceTypes","bboxPoint","oriLayoutCfg","layoutCfg","cNodesCombos","found","addedVEdgeMap","isVEdge","otherEnd","otherEndIsSource","otherEndModel","otherEndPId","otherEndCId","otherEndParentId","otherEndId","vEdgeInfo","edgeInfo","sourceId","selfEnd","selfEndModel","selfEndPId","selfEndCId","selfEndParentId","selfEndId","vedgeId","parentModel","refresh","nodeDegrees","stackType","stackData","currentAdjMatrix","getAdjacentMatrix","currentShourtestPathMatrix","hullMap","hullId","hullInstance","hulls","CLS_SHAPE_SUFFIX","CLS_LABEL_SUFFIX","ARROWS","SHAPE_DEFAULT_ATTRS","PATH_SHAPE_DEFAULT_ATTRS","SHAPES_DEFAULT_ATTRS","CLS_LABEL_BG_SUFFIX","shapeBase","defaultLabelCfg","labelCfg","labelStyle","labelBBox","labelMatrix","labelBgClassname","calculateStyle","attrName","defaultStyle","shapeStyle","subShape","labelClassName","ele","labelBg","cfgStyle","rotateMatrix","calculateBgStyle","newLabel","shapeStateStyle","itemStateStyle","keptAttrs","enableStatesStyle","originStyle_1","keyShapeName_1","keyShapeStyles_1","filtetDisableStatesStyle","subShape_1","subShapeStyles_1","value_1","value_2","value_3","enableStyle","originstyles","keyShapeSetted","originKey","value_4","modelStateStyle","singleNode","labelMaxLength","labelPosition","backgroundStyle","backgroundWidth","backgroundHeight","defaultLinkPoints","markLeft","markRight","markTop","markBottom","currentLinkPoints","linkPoints","markFill","markStroke","borderWidth","markSize","name_3","name_4","hasIcon","icon","iconShape","iconConfig","name_5","labelShape","singleNodeDef","CLS_SHAPE","revertAlign","singleEdge","strokeStyle","currentAttr","previousStyle","routeCfg","pointPercent","offsetX","offsetY","autoRotate","offsetStyle","singleEdgeDef","midPoint","arcPoint","edgeAngle","innerPoint","innerPoint1","innerPoint2","yDist","curveOffset","xDist","singleCombo","collapsedSubstituteIcon","substituteIconConfig","collapsedIconShape","iconShapeExist","sizeAttr","itemAnimate","singleComboDef","itemCacheSize","rectX","rectY","shapeClassName","Arrow$1","begin","tWidth","tLength","rWidth","rLength","rectBegin","Marker$2","defaultSubjectColors","isForce","layoutType","Util","BaseUtil","GraphicUtil","PathUtil","MathUtil","ColorUtil","LayoutUtil","mat3","LayoutController","pipes","pipe","preHasPipes","currentHasPipes","isDefaultAnimateLayout","forceAnimate","disableTriggerLayout","otherCfgs","layoutMethods","destroyedLayoutTypes","layoutMethod","hiddenNodes","hiddenEdges","comboEdges","hiddenCombos","nodeItems","edgeItems","nodeLength","comboLength","reloadData","currentCfg","relayoutPromise","nodesFilter","edegsFilter","nodesMap_1","acc","cur","graphGroupNodes","layoutNodes","groupNodes","meanCenter","nodesToInit","horiNum","vertiNum","horiGap","vertiGap","beginX","beginY","registerNode","registerEdge","registerCombo","registerBehavior","BaseGlobal","ALGORITHM","MESSAGE","_default","linkedList","queue","_linkedList","_interopRequireDefault","util","bfs","_queue","_util","require$$1","degree_1","_dfs","_connectedComponent","_interopRequireWildcard","require$$2","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","newObj","hasPropertyDescriptor","dijkstra_1","_tslib","_util2","findPath","_dijkstra","floydWarshall_1","_adjacentMatrix","labelPropagation_1","secondReg","dateReg","_time","getAllSortProperties","propertyKeyInfo","sortKeys","processProperty","propertyKeys","getPropertyWeight","types","dataPreprocessing","_types","_vector","louvain_1","_nodeProperties","require$$3","_dataPreprocessing","require$$4","unionFind","binaryHeap","mts","_unionFind","_binaryHeap","pageRank_1","_degree","struct","AUTO_EDGE_ID","gSpan_1","_struct","gaddi","_floydWarshall","_gSpan","exports","_gaddi","_bfs","_detectCycle","_findPath","_labelPropagation","_louvain","_mts","_pageRank","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","index_worker","algorithm","_constant","_algorithmType","createWorker_1","_index","createWorker","worker","workers","_createWorker","getAdjMatrixAsync","connectedComponentAsync","getDegreeAsync","getInDegreeAsync","getOutDegreeAsync","detectCycleAsync","detectAllCyclesAsync","detectAllDirectedCycleAsync","detectAllUndirectedCycleAsync","dijkstraAsync","findAllPathAsync","findShortestPathAsync","floydWarshallAsync","labelPropagationAsync","louvainAsync","minimumSpanningTreeAsync","pageRankAsync","getNeighborsAsync","GADDIAsync","detectDirectedCycleAsync","getPixelRatio","inBox","intersectRect","mergeRegion","region1","region2","regexLG","regexRG","regexPR","regexColorStop","addStop","steps","gradient","itemArr","parseLineGradient","gradientStr","tanTheta","tanTheta2","parseRadialGradient","fx","fy","fr","colors","parsePattern","patternStr","onload","parseStyle","atan2","_addDefaultArrow","isStart","arrowShape","Path","_addCustomizedArrow","startArrow","endArrow","arrowAttrs","arrowFill","arrowStroke","arrowLineWidth","restAttrs","getShortenOffset","addStartArrow","addEndArrow","SHAPE_ATTRS_MAP","applyAttrsToContext","drawChildren","region","checkRefresh","refreshElements","setChildrenRefresh","checkChildrenRefresh","checkElementRefresh","clearChanged","isAllow","drawPath","arcParamsCache","ArrowUtil.getShortenOffset","lastPath","scaleX","scaleY","refreshElement","getRefreshRegion","cacheBox","validCache","validBBox","getMergedRegion","minXArr","minYArr","maxXArr","maxYArr","mergeView","viewRegion","Group","viewRange","allowDraw","bboxMethod","getBBoxMethod","halfLineWidth","isInView","strokeOpacity","fillOpacity","isStroke","isFill","Circle","absDistance","ellipseDistance","squareX","squareY","Ellipse","halfLineWith","isCanvas","dom","ImageShape","image_1","swidth","sheight","inLine","halfWidth","ArrowUtil.addStartArrow","ArrowUtil.addEndArrow","startArrowDistance","endArrowDistance","Symbols","diffY","Marker","symbol","path2Absolute","paramsCache","isPointInPath","isInPolygon","arc","hasArc","isPointInStroke","qDistance","cDistance","inArc","extractPolygons","polygons","polylines","isInPolygons","extractResutl","tCache","subt","curve","nextSeg","tempLength","segmentT","segmentL","segmentN","inPolyline","isClose","Polygon","PolyLine","inRect","rectWithRadius","Rect","inRectWithRadius","Text","subY","invertFromMatrix","getRefXY","preTest","getShape","curShape","pixelRatio","clipView","drawFrame","clearAnimationFrame","AbstractCanvas","SHAPE_TO_TAGS","SVG_ATTR_MAP","createSVGElement","createDom","parentNode","sortDom","sorter","childList","toArray","fragment","moveTo","targetIndex","siblings","currentIndex","targetNext","setShadow","setTransform","setClip","parentChildren","isClipShape","clipPathEl","defsEl","fill","fillStyle","shadowColor","lineAppendWidth","Dom","Image","symbolsFactory","Polyline","completed","pathRelatedAttrs","LETTER_SPACING","BASELINE_MAP","BASELINE_MAP_FOR_FIREFOX","ANCHOR_MAP","baseline","textLen_1","arr_1","stops","Gradient","ATTR_MAP","SHADOW_DIMENSION","Shadow","config","Arrow","Clip","shapeEl","Pattern","Defs","arrow","shadow","addEventListener","eventType","TABLE","TABLE_TR","FRAGMENT_REG","CONTAINERS","initConstants","modifyCSS","css","colorName","isArrayish","concat","slice","swizzle","simpleSwizzleModule","colorNames","reverseNames","cs","colorStringModule","abbr","per","keyword","hexAlpha","i2","hwb","hexDouble","hwba","cssKeywords","reverseKeywords","convert","conversionsModule","labels","delta","rdif","gdif","bdif","diffc","comparativeDistance","reversed","currentClosestDistance","currentClosestKeyword","xyz","smin","lmin","sv","hsv","hi","vmin","sl","wh","bl","cmyk","lab","hr","lch","ansi","mult","rem","integer","colorString","char","chroma","grayscale","hue","hcg","pure","mg","apple","gray","conversions","buildGraph","deriveBFS","fromModel","adjacents","adjacent","link","wrapConversion","toModel","route","conversion","wrapRaw","wrappedFn","wrapRounded","routes","routeModels","colorConvert","_slice","skippedModels","hashedModelKeys","limiters","newArr","zeroArray","hashedKeys","limit","places","roundToPlace","getset","maxfn","lum","chan","color2","lum1","lum2","contrastRatio","yiq","mixinColor","color1","newAlpha","assertArray","roundTo","channel","modifier","trimLeft","trimRight","tinycolor","opts","inputToRGB","RsRGB","GsRGB","BsRGB","R","boundAlpha","rgbToHsv","rgbToHsl","allow3Char","rgbToHex","allow4Char","rgbaToHex","bound01","hexNames","secondColor","hex8String","rgbaToArgbHex","secondHex8String","gradientType","formatSet","formattedString","hasAlpha","needsAlphaFormat","_lighten","_brighten","_darken","_desaturate","_saturate","_greyscale","_spin","_analogous","_complement","_monochromatic","_splitcomplement","polyad","newColor","convertToPercentage","ok","stringInputToObject","isValidCSSUnit","rgbToRgb","hsvToRgb","hslToRgb","hue2rgb","pad2","convertDecimalToHex","amount","clamp01","slices","part","ret","modification","rgb1","rgb2","wcag2","readability","wcag2Parms","validateWCAG2Parms","baseColor","colorList","bestColor","bestScore","includeFallbackColors","flip","flipped","isOnePointZero","processPercent","isPercentage","parseIntFromHex","convertHexToDecimal","matchers","CSS_INTEGER","CSS_NUMBER","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","parms","hueStep","saturationStep","saturationStep2","brightnessStep1","brightnessStep2","lightColorCount","darkColorCount","darkColorMap","getHue","light","getSaturation","saturation","getValue","generate","patterns","pColor","_hsv","_colorString","_ref","darkColorString","presetPrimaryColors","presetPalettes","presetDarkPalettes","mixColor","frontColor","frontAlpha","bc","fc","getColorsWithDefaultTheme","disableColor","subjectColor005","subjectColor01","subjectColor02","subjectColor04","disableColor002","disableColor005","disableColor01","disableColor02","disableColor03","paletteFromSubject","subjectHex","subjectIdx","deeperSubject","getColorsWithDarkTheme","subjectColor03","subjectColor06","subjectColor08","disableColor025","disableColor04","disableColor05","getColorsWithSubjectColor","theme","getColorSetsBySubjectColors","subjectColors","sets","sColor","cloneGElement","vElement","applyCloneClip","clonedElement","clonedChild","clonedType","extendEvents","canvasHandler","originHandler","wheelHandler","itemShape","AbstractEvent","cacheStringFunction","hit","camelizeRE","toNumber","this","cp_1","cp_2","array_1","number_1","object_1","getEdgeTerminal","terminal","getDegreeMap","degreesMap","getLayoutBBox","getAvgNodePosition","totalNodes","getCoreNode","getRelativeNodeIds","coreNode","relativeNodes","getSameTypeNodes","nodeClusterBy","typeName","sameTypeNodes","getCoreNodeAndRelativeLeafNodes","inDegree","relativeLeafNodes","sameTypeLeafNodes","_1","getFunc","resultFunc","getFuncByUnknownType","resultIsNumber","registy","base_1","util_1","registerLayout","layoutOverride","GLayout","unRegisterLayout","getLayoutByName","grid","GridLayout","condense","preventOverlapPadding","preventOverlap","paramNodeSpacing","paramNodeSize","values_1","oRows","oCols","sm","lg","nodeSpacing_1","nodeSize_1","nodeW","nodeH","rcPos","pos","rows","cols","col","cellWidth","cellHeight","RandomLayout","layoutScale","gForce","proccessToFunc","defaultV","GForceLayout","nodeSizeFunc","nodeSpacingFunc_1","mass","workerEnabled","minMovement","previousPos","iter_1","movement","accArray","velArray","stepInterval","getMass","factor","coulombDisScale","collideStrength","nodeStrength","ni","massi","nj","vecX","vecY","lengthSqr","vecLength","nVecLength","direX","direY","massj","paramOverlap","linkDistance","edgeStrength","massSource","massTarget","defaultGravity","gravity","customCenterOpt","vLength","param2","distX","distY","tree_add","leaf","xm","ym","addAll","tree_cover","tree_data","tree_extent","Quad$1","tree_find","quads","Quad","tree_remove","retainer","removeAll","tree_root","tree_size","tree_visit","tree_visitAfter","defaultX","tree_x","defaultY","tree_y","quadtree","Quadtree","leaf_copy","treeProto","tree_addAll","tree_removeAll","ForceNBody","d3_quadtree_1","theta2","forceNBody","coulombDisScale2","weightParam","mappedNode","nodeData","accumulate","computeForce","quad","accWeight","accX","accY","apply","len2","len3","force2","ForceNBody_1","Force2Layout","leafCluster","clustering","propsClusterNodeStrength","getClusterNodeStrength","centripetalOptions","sameTypeLeafMap","relativeNodesType_1","centerNode","centerNodeInfo_1","single","others","defSpringLen","massWeight","relatedEdges_1","maxIter","silence","monitor","energy","speed2","edgeInfos","sourceMassRatio","targetMassRatio","disX","disY","forceCenter","strength","centriCenter","centriX","centriY","centerStrength","singleStrength","leafStrength","othersStrength","defSideCoe","currentMinY","currentMaxY","sideCoe","damping","maxSpeed","distanceThresholdMode","distanceMagnitude","force","jiggle","collide","radii","xi","yi","ri","ri2","prepare","rj","initialize","_nodes","_random","nodeById","links","defaultStrength","strengths","distances","bias","initializeStrength","initializeDistance","dispatch","Dispatch","parseTypenames","typenames","typename","T","that","lcg","initialRadius","initialAngle","simulation","alphaMin","alphaDecay","alphaTarget","velocityDecay","forces","stepper","tick","initializeNodes","initializeForce","closest","manyBody","distanceMin2","distanceMax2","radial$2","radiuses","x$1","y$1","forceInABox_1","d3Force","forceInABox","forceNodeSize","forceCharge","forceLinkDistance","forceLinkStrength","nodesMap","foci","templateNodes","templateForce","template","enableGrouping","getFocisFromTemplate","initializeWithForce","net","getGroupsGraph","gnodes","glinks","dNodes","clustersList","clustersCounts","clustersLinks","computeClustersNodeCounts","computeClustersLinkCounts","sourceTerminal","targetTerminal","tmpCount","dClusterLinks","clusterLinks","getLinkKey","entries","sourceID","targetID","genNodesMap","setTemplate","setGroupBy","setEnableGrouping","setStrength","setCenterX","setCenterY","setNodes","setLinks","setForceNodeSize","setForceCharge","setForceLinkDistance","setForceLinkStrength","setOffset","constants","force_in_a_box_1","constants_1","ForceLayout","expectKeys","edgeForce","nodeForce","clusterForce","isInWorker","totalTicks","getSimulationTicks","currentTick","nodeSpacing","nodeSpacingFunc","larger","radius_1","radius_2","totalTicksFloat","circular","initHierarchy","sourceChildren","targetChildren","connect","compareDegree","aDegree","bDegree","CircularLayout","startRadius","endRadius","divisions","angleRatio","ordering","clockwise","angleStep","maxNodeSize_1","nSize","astep","divN","cnodes","orderedCNodes","resNodes","pickFlags","foundChild","childIdx","orderedNodes","list","filterOutLinks","unlink","List","shortcut","strs","sentinel","GraphEnum","incrementOrInitEntry","decrementOrRemoveEntry","edgeArgsToId","isDirected","v_","w_","edgeArgsToObj","strV","strW","edgeObj","edgeObjToId","nodeToJSON","edgeToJSON","write","json","read","ownKeys","enumerableOnly","symbols","sym","_objectSpread","defaultOption","newDefault","_this$inEdgesMap$get","_this$outEdgesMap$get","_this$parentMap","targetParent","_this$parentMap2","_this$childrenMap","realParent","checkNode","realParentChilren","_this$childrenMap2","preds","succs","_this$predecessors","_this$neighbors","_this$successors","multigraph","compound","copyGraph","findParent","inV","outW","_this$inEdges","inEdges","outEdges","resultOptions","nodesLabelMap","defaultNodeLabelFn","isCompound","parentMap","childrenMap","inEdgesMap","outEdgesMap","predecessorsMap","successorsMap","_childrenMap$get","_this2","cleanEdge","_this$parentMap3","_this$children","_this$childrenMap3","inE","outE","_this$inEdgesMap$get2","_this$outEdgesMap$get2","_edgeArgsToObj","_get","property","_superPropBase","_getPrototypeOf","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","_assertThisInitialized","GraphWithEvent","_Graph","_len","_key","_len2","_key2","PriorityQueue","keyIndice","originI","originJ","priority","_arr$parent","largest","weightFn","parents","pq","updateNeighbors","pri","edgeWeight","_graph$nodeEdges","resultComponents","componentsArr","waitingList","_graph$successors","_graph$predecessors","doDFS","postorder","navigator","order","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arr","_n","_s","err","DEFAULT_WEIGHT_FUNC","runDijkstra","vEntry","wEntry","_ref2","dijkstraAll","tarjan","_visited$get","_wEntry","cmpt","findCycles","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","Parent","CycleException","_Error","topsort","isAcyclic","preorder","runFloydWarshall","nodek","rowK","nodei","rowI","nodej","ik","ij","altDistance","containSameNodes","aGraph","bGraph","aNodes","aNode","containSameEdges","aEdges","aEdge","getSameNodes","sameNodes","getSameEdges","sameEdges","isGraphOptionSame","containAllSameNodes","containAllSameEdges","isGraphSame","isGraphContainsAnother","originGraph","targetGraph","isGraph","isSimpleGraph","edgeStack","_sort","_sort2","isNullGraph","hasSelfLoop","isGraphComplement","nodeCount","getGraphComplement","complementGraph","greedyFas","list_1","graphlib_1","StateGraph","DEFAULT_WEIGHT_FN","greedyFAS","buildState","doGreedyFAS","buckets","zeroIdx","sinks","removeNode","collectPredecessors","uEntry","assignBucket","fasGraph","maxIn","maxOut","prevWeight","rangeMax","acyclic","greedy_fas_1","run","fas","dfsFAS","undo","forwardName","graph_1","safeSort","valueA","valueB","addDummyNode","simplify","simplified","simpleLabel","asNonCompoundGraph","zipObject","successorWeights","weightsMap","sucs","predecessorWeights","weightMap","buildLayerMatrix","layeringNodes","rankMax","rank","va","vb","normalizeRanks","nodeRanks","removeEmptyRanks","layers","nodeRankFactor","vs","addBorderNode","maxRank","partition","collection","notime","minBy","valA","valB","normalizeEdge","vRank","wRank","labelRank","dummy","origLabel","currentV","longestPath","longestPathWithLayer","minRank","forwardVisited","dfsForward","nextRank","currRank","slack","feasibleTree_1","util_2","feasibleTree","tightTree","findMinSlackEdge","shiftRanks","edgeV","feasibleTreeWithLayer","tightTreeWithLayer","feasible_tree_1","networkSimplex","og","initCutValues","assignCutValue","childLab","calcCutValue","childIsTail","graphEdge","cutValue","isOutEdge","pointsToHead","otherWeight","isTreeEdge","otherCutValue","initLowLimValues","dfsAssignLowLim","nextLim","low","useNextLim","leaveEdge","enterEdge","vLabel","wLabel","tailLabel","isDescendant","exchangeEdges","updateRanks","rootLabel","rank_1","network_simplex_1","networkSimplexRanker","tightTreeRanker","longestPathRanker","parentDummyChains_1","dfsBothOrder","lim","postorderNums","vPath","wPath","lca","parentDummyChains","startV","pathData","pathIdx","pathV","ascending","nestingGraph","depths","treeDepths","nodeSep","sumWeights","childTop","childBottom","thisWeight","minlen","cleanup","graphLabel","addBorderSegments_1","addBorderSegments","sg","sgNode","coordinateSystem","adjust","rankDir","swapWidthHeight","reverseY","swapXY","swapWidthHeightOne","reverseYOne","swapXYOne","rgb2arr","toHex","x16Value","arr2rgb","contains$1","difference$1","isArray$1","keys$1","isObjectLike$5","isPlainObject$2","firstValue$1","flatten$1","flattenDeep$1","getRange$1","pull$1","pullAt$1","reduce$1","remove$1","union$1","valuesOfKey","every$1","some$1","clamp$1","fixedBase$1","isDecimal$1","isEven$1","isInteger$1","isNegative$1","isOdd$1","isPositive$1","maxBy","mod$2","toDegree$1","parseInt$1","toRadian$1","hasValue","toString$2","lowerCase$1","lowerFirst$1","upperCase$1","upperFirst$1","getType$1","isArguments$1","isBoolean$1","isDate$1","isError$1","isFinite$1","isNull$1","isPrototype$1","isRegExp$1","isUndefined$1","isElement$1","augment$1","clone$1","flru","keep","reset","isPartial","maxSize","hasOwn","deepMix$1","extend$1","indexOf$1","isEqual$1","isEqualWith","map$3","mapValues","pick","omit","default_1$1","RGB_REG","createTmp","iEl","toRGBString","matches","cArray","toRGB","calColor","fixedPercent","colorArray","toCSSGradient","gradientColor","cssColor_1","colorStops_1","vec2.angle","roundPath","path2String","paramsParser","allPathCommands","paramsCount","isPathArray","lk","isAbsoluteArray","isNormalizedArray","pc","finalizeSegment","pathCommand","LK","scanFlag","pathValue","isDigitStart","isDigit","scanParam","zeroFirst","hasCeiling","hasDecimal","hasDot","ch","isSpace","specialSpaces","skipSpaces","isPathCommand","isArcCommand","scanSegment","cmdCode","reqParams","PathParser","pathInput","absCommand","absoluteSegment","absValues","segLength","normalizeSegment","px1","py1","nqx","nqy","normalizePath","isCurveArray","rotateVector","arcToCubic","X1","Y1","RX","RY","LAF","SF","X2","Y2","d120","quadToCubic","r13","r23","lineToCubic","mid","segmentToCubic","path2Curve","needZCommandIndexes","cloned","zCommandIndexes","curveSegment","clonePath","reverseCurve","rotatedCurve","curveOnly","distanceSquareRoot","segmentLineFactory","angleBetween","v0x","v0y","v1x","v1y","getPointAtArcSegmentLength","abs","sqrt","xRot","xRotRad","transformedPoint","radiiCheck","cSquareNumerator","cSquareRootDenom","cRadicand","cCoef","transformedCenter","startVector","endVector","sweepAngle","ellipseComponentX","ellipseComponentY","segmentArcFactory","sampleSize","distanceIsNumber","LENGTH","POINT","POINTS","dv","getPointAtCubicSegmentLength","segmentCubicFactory","getPointAtQuadSegmentLength","segmentQuadFactory","pathLengthFactory","isM","MIN","MAX","ll","getPathBBox","xMin","yMin","xMax","yMax","getTotalLength","getPathBBoxTotalLength","getRotations","segCount","oldSegIdx","getRotatedCurve","lineLengths","computedIndex","sumLensSqrd","rotations","getCubicSegArea","getPathArea","getDrawDirection","getPointAtLength","getPropertiesAtLength","pathTemp","lengthAtSegment","getPropertiesAtPoint","normalPath","distanceTo","scan","scanDistance","bestLength","bestDistance","scanLength","beforeLength","afterLength","beforeDistance","afterDistance","splitCubic","pts","p5","p6","p7","p8","p9","getCurveArray","segmentData","curveLength","subsegs","equalizeSegments","TL","L1","L2","tl","mm","dif","canSplit","createDOM","initOrder_1","initOrder","simpleNodes","orderedVs","beforeSort","fixOrderNodes","crossCount_1","twoLayerCrossCount","northLayer","southLayer","southPos","unflat","unsort","southEntries","firstIndex","treeSize","cc","weightSum","crossCount","layering","buildLayerGraph_1","buildLayerGraph","relationship","createRootNode","addSubgraphConstraints_1","addSubgraphConstraints","cg","rootPrev","prevChild","barycenter_1","barycenter","movable","result_1","nodeU","resolveConflicts_1","resolveConflicts","mappedEntries","entryV","entryW","sourceSet","doResolveConflicts","handleIn","mergeEntries","handleOut","filtered","picked","sort_1","sort","biasRight","usePrev","keepNodeOrder","parts","hasFixOrder","sortable","unsortable","vsIndex","compareWithBias","consumeUnsortable","iindex","sortSubgraph_1","resolve_conflicts_1","sortSubgraph","br","subgraphs","barycenters","subgraphResult","mergeBarycenters","expandSubgraphs","blPred","brPred","vss","order_1","init_order_1","cross_count_1","build_layer_graph_1","add_subgraph_constraints_1","sort_subgraph_1","mxRank","range1","range2","downLayerGraphs","buildLayerGraphs","upLayerGraphs","assignOrder","bestCC","best","lastBest","sweepLayerGraphs","ranks","layerGraphs","sorted","lnode","layer","BlockGraph","findType1Conflicts","conflicts","visitLayer","prevLayer","k0","scanPos","prevLayerLength","lastNode","k1","scanNode","uLabel","uPos","findType2Conflicts","south","southEnd","prevNorthBorder","nextNorthBorder","uNode","getScannedKey","scanIfNeeded","scanCache","cacheKey","north","prevNorthPos","nextNorthPos","scanned","southLookahead","predecessors","findOtherInnerSegmentNode","addConflict","vv","ww","conflictsV","hasConflict","verticalAlignment","neighborFn","ws","mp","horizontalCompaction","reverseSep","blockG","borderType","iterate","setXsFunc","nextNodesFunc","elem","pass1","pass2","buildBlockGraph","blockGraph","sepFn","vRoot","uRoot","prevMax","findSmallestWidthAlignment","xss","alignCoordinates","alignTo","alignToVals","alignToMin","alignToMax","vert","horiz","alignment","xsVals","balance","positionX","adjustedLayering","inner","smallestWidth","sep","edgeSep","position_1","bk_1","positionY","rankSep","heights","maxHeight","xsKey","ng","initDataOrder_1","initDataOrder","nodeOrder","layout_1","acyclic_1","normalize_1","parent_dummy_chains_1","nesting_graph_1","add_border_segments_1","coordinate_system_1","init_data_order_1","layout","inheritOrder","layoutGraph","buildLayoutGraph","makeSpaceForEdgeLabels","runLayout","updateInputGraph","removeSelfEdges","injectEdgeLabelProxies","assignRankMinMax","removeEdgeLabelProxies","insertSelfEdges","positionSelfEdges","removeBorderNodes","fixupEdgeLabelCoords","translateGraph","assignNodeIntersects","reversePointsForReversedEdges","currG","prevG","inputGraph","inputLabel","layoutLabel","graphNumAttrs","graphDefaults","graphAttrs","nodeNumAttrs","nodeDefaults","edgeNumAttrs","edgeDefaults","edgeAttrs","canonicalize","pickedProperties","selectNumberAttrs","defaultNode","defaultAttrs","marginX","marginY","getExtremes","nodeV","orderShift","selfEdge","selfNode","newAttrs","dagre","index_1","DagreLayout","rankdir","radial","nodeComboMap","sortedNodes","visitedMap","ranksepfunc","nodesepfunc","horisep","vertisep","comboMap","verti","hori","comboEdge","targets","prevGraph","dBegin","coord","isHorizontal","ranksep","getRadialPos_1","focusId","focusLayer_1","layers_1","dim_1","sizeDim_1","min_1","max_1","currentNodesep","diffLayer","diffLayerAbs","leftPos","rightPos","radiusMap_1","rangeLength_1","range_1","processNodes_1","layerNodes","propsMaxRanksep","arcRange","maxRanksep","newX","newY","currentNodeRanksep","isFirstLevel_1","lastLayerMaxNodeSize_1","leftRatio","it","otherDim_1","newControlPoints_1","sourceOtherDimValue_1","otherDimDist_1","sourceRadius_1","radiusDist_1","cRadius","newPos","layerCoords_1","isInvert","layerCoordSort","ndata","layerCoordsArr_1","isDifferentLayer_1","filterControlPointsOutOfBoundary_1","ps","getControlPoints","dimValue","range","rangeLength","dimRatio","layerCoordsArr","isDifferentLayer","filterControlPointsOutOfBoundary","sourceX","sourceY","sourceLayer","sourceNextLayerCoord","firstControlPoint","insertStartControlPoint","targetLayer","layerDiff","targetLastLayerCoord","lastControlPoints","insertEndControlPoint","N","O","M","V","$","W","K","Q","Z","ee","ne","te","re","oe","ie","ae","ue","ce","se","de","fe","he","le","ve","pe","ge","ye","be","me","we","Ee","je","xe","Ne","Oe","ke","Ie","Se","Me","Ce","Ge","Be","Ae","Le","Re","Te","De","Pe","ze","Fe","Ue","Ve","$e","He","We","qe","Ye","Je","Xe","Ke","Qe","Ze","en","nn","tn","rn","on","an","un","cn","sn","dn","hn","vn","pn","gn","yn","bn","mn","wn","En","jn","xn","Nn","On","kn","In","Sn","Mn","Cn","Gn","Bn","An","Ln","Rn","Tn","Dn","Pn","zn","Fn","Un","Vn","$n","Hn","Wn","qn","Yn","Jn","Xn","Kn","Qn","Zn","nt","tt","ot","at","ut","st","dt","ft","ht","lt","vt","pt","gt","wt","Et","jt","Nt","Ot","kt","It","St","Mt","Ct","Gt","Bt","At","Lt","Rt","Tt","Dt","Pt","zt","Ft","Ut","Vt","$t","Ht","Wt","qt","Yt","Jt","Xt","Kt","Qt","Zt","er","nr","tr","rr","or","ir","ur","cr","sr","vr","pr","gr","yr","mr","wr","Er","_r","jr","xr","Nr","Or","kr","Ir","Sr","Mr","Cr","Gr","Br","Ar","Lr","Rr","Tr","Dr","Pr","zr","Fr","Ur","Vr","$r","Hr","Wr","qr","Yr","Jr","Xr","Kr","Qr","Zr","eo","no","ro","oo","io","ao","uo","co","so","fo","ho","lo","vo","po","go","yo","bo","mo","wo","Eo","_o","jo","xo","No","Oo","ko","Io","So","Mo","Co","Go","Bo","Ao","Lo","Ro","To","Do","Po","zo","Fo","Uo","Vo","$o","Ho","Wo","qo","Yo","Jo","Xo","Ko","Qo","Zo","ei","ti","oi","ai","ui","si","fi","li","vi","gi","mi","wi","Ei","ji","Ni","Oi","Ii","Si","Mi","Ci","Gi","Bi","Ai","Li","Ri","Ti","Di","Pi","zi","Fi","Ui","Vi","$i","Hi","Wi","qi","Yi","Ji","Xi","Ki","ea","Qi","Zi","ta","ra","oa","ia","ca","sa","da","fa","ha","ga","ya","ba","ma","wa","Ea","xa","Oa","Ia","ka","ja","Na","Sa","Ma","Ca","Ba","Ga","Aa","La","Ra","Ta","Da","Pa","za","Ua","Va","Fa","$a","Ha","Wa","qa","Ya","Ja","Xa","Ka","Qa","Za","eu","nu","tu","ru","iu","ou","au","uu","cu","su","hu","lu","vu","pu","gu","du","fu","yu","bu","mu","wu","Eu","_u","ju","Bu","Nu","Gu","xu","Ou","ku","Iu","Mu","Su","Cu","Au","Lu","Ru","Tu","Du","Pu","zu","Fu","Hu","Uu","Vu","$u","Wu","Yu","qu","Ju","Qu","Ku","Xu","Zu","ec","nc","tc","rc","oc","ic","uc","dagreCompound","dagre_compound_1","DagreCompoundLayout","hc","graphDef","graphOption","graphSettings","renderInfo","flattenedRenderInfo","fullPath","edgesep","nodesep","settings","pre","matchedNodes","matchedCombos","comboSizeFunc","metaWidth","metaHeight","subSceneMeta","paddingTop","paddingRight","paddingBottom","paddingLeft","graphMetaConfig","flattenedGraph","flattenedNodes","flattenedEdges","anchorPoint","coreBox","anchorPoints_1","outEdge","firstPoint","anchorPointX","anchorPointY","baseEdge","inEdge","lastPoint","sourceEdge","sortedEdges","sourceNodePath","targetNodePath","lastExistingSource_1","fNode","lastExistingTarget_1","oedge","isAnyArray","_options$fromIndex","_options$toIndex","toIndex","maxValue","minValue","rescale","currentMin","currentMax","_options$min","_options$max","indentData","inspectMatrix","inspectMatrixWithOptions","maxRows","maxColumns","maxNumSize","inspectData","columns","maxI","maxJ","formatNumber","numStr","precise","eIndex","installMathOperations","AbstractMatrix","Matrix","arg0","checkRowIndex","checkColumnIndex","checkRowVector","checkColumnVector","checkIndices","rowIndices","columnIndices","checkRowIndices","checkColumnIndices","checkRange","startRow","endRow","startColumn","endColumn","checkNumber","newArray","sumByRow","sumByColumn","sumAll","productByRow","productByColumn","productAll","varianceByRow","unbiased","mean","sum1","sum2","varianceByColumn","varianceAll","centerByRow","centerByColumn","centerAll","getScaleByRow","scaleByRow","getScaleByColumn","scaleByColumn","getScaleAll","divider","scaleAll","newRows","newColumns","newData","column","matrix1","matrix2","previousColumn","isEchelonForm","isReducedEchelonForm","iMax","pivot","row1","row2","column1","column2","diag","vector2","vector1","Bcolj","m5","m6","m7","c00","c01","c10","c11","m8","m9","m14","m15","m16","m17","m18","m19","c02","c20","c21","c22","embed","resultat","blockMult","halfRows","halfCols","middle","compareFunction","compareNumbers","rowIndex","columnIndex","nRows","nColumns","arrayData","BaseView","MatrixColumnView","MatrixColumnSelectionView","MatrixFlipColumnView","MatrixFlipRowView","MatrixRowView","MatrixRowSelectionView","MatrixSelectionView","MatrixSubView","MatrixTransposeView","WrapperMatrix1D","WrapperMatrix2D","wrap","LuDecomposition","pivotVector","pivotSign","LUcolj","kmax","hypotenuse","QrDecomposition","rdiag","nrm","SingularValueDecomposition","computeLeftSingularVectors","computeRightSingularVectors","autoTranspose","wantu","wantv","swapped","aux","work","nct","nrt","mrc","eps","kase","sp","spm1","epm1","sk","ek","shift","scols","Ls","VL","vrows","urows","VLU","vcols","ucols","tol","useSVD","solve","leftHandSide","rightHandSide","subMatrix0","subMatrix1","subMatrix2","xrange","exception","dependenciesOneRow","thresholdValue","thresholdError","returnArray","linearDependencies","Abis","pseudoInverse","svdSolution","SVD","covariance","xMatrix","yMatrix","yIsSame","cov","correlation","sdx","sdy","corr","EigenvalueDecomposition","assumeSymmetric","isSymmetric","tred2","tql2","ort","orthes","hqr2","hh","dl1","el1","tst1","high","exshift","norm","notlast","cdivres","cdiv","CholeskyDecomposition","dimension","positiveDefinite","nipals","scaleScores","terminationCriteria","tOld","xResidual","residual","yResidual","mds","ml_matrix_1","MDS","rowMeans","colMeans","totalMean","eigenValues_1","radialNonoverlapForce","SPEED_DIVISOR","RadialNonoverlapForce","positions","disp","maxDisplace","vecx","vecy","common","speed","strictRadial","vpx","vpy","diLength","tdispLength","distLength","limitedDist","nfDis","mds_1","radialNonoverlapForce_1","getWeightMatrix","getIndexById","getEDistance","RadialLayout","focusIndex","focusNodeD","semiWidth","semiHeight","maxRadius","maxD","eIdealD","nonoverlapForceParams","nonoverlapForce","eIdealDis","vparam","originDis","reciODis","xMolecule","yMolecule","edis","reciEdis","idealDis","reciR","linkDis","unitRadius","iValue","jValue","minus","concentric","ConcentricLayout","maxNodeSize","maxNodeSpacing","indexMap","levels","currentLevel","minDist","firstLvlHasMulti","maxR","rStep","sweep","dcos","dsin","rMin","rDeltaMax_1","rr_1","rDelta","MDSLayout","scaledD","eigenValues","fruchterman","FruchtermanLayout","clusterMap","displacements","clusterGravity_1","gravityForce","vecLengthSqr","uIndex","vIndex","asyncGeneratorStep","_next","_throw","_asyncToGenerator","freeGlobal","global","_freeGlobal","freeSelf","_root","Symbol","_Symbol","nativeObjectToString","symToStringTag","getRawTag","isOwn","unmasked","_getRawTag","objectToString","_objectToString","nullTag","undefinedTag","baseGetTag","_baseGetTag","MAX_SAFE_INTEGER","isLength","isLength_1","isObjectLike_1","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","_baseIsTypedArray","baseUnary","_baseUnary","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsTypedArray","isTypedArray","isTypedArray_1","isNumber_1","isArray_1","_regeneratorRuntime","Generator","Context","makeInvokeMethod","tryCatch","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","AsyncIterator","invoke","callInvokeWithMethodAndArg","maybeInvokeDelegate","pushTryEntry","resetTryEntry","runtime","regenerator","entitySequence","createEntity","gl","ConfigService","AST_TOKEN_TYPES","AST_NODE_TYPES","STORAGE_CLASS","Target","DefineValuePlaceholder","createCanvas","Kernel","engine","configService","_this$configService$g","engineOptions","bundle","isNumberLikeData","_isNumber","_isTypedArray","_isArray","existedDefine","existedBinding","_execute","_callee","iteration","_args","_context","isReferer","execute","_getOutput","_callee2","_context2","getOutput","_compile","_callee3","shader","_context3","valuePlaceHolder","uniform","sizePerElement","compile","endl","decodeB64","raise","check","pred","encolon","checkParameter","possibilities","checkIsTypedArray","standardTypeEh","checkTypeOf","checkNonNegativeInt","checkOneOf","constructorKeys","checkConstructor","leftPad","ShaderFile","ShaderLine","ShaderError","fileNumber","lineNumber","guessCommand","pat","pat2","guessCallSite","parseSource","files","lineNumberInfo","nameInfo","file","parseErrorLog","errLog","errMsg","annotateFiles","errors","checkShaderError","checkCommandType","strings","push","token","tokenPat","checkLinkError","program","fragShader","vertShader","fragParse","vertParse","header","saveCommandRef","saveDrawCommandInfo","uniforms","attributes","stringStore","addProps","dict","uniformSet","attributeSet","commandRaise","callSite","checkCommand","checkParameterCommand","checkOptional","block","checkFramebufferFormat","attachment","texFormats","rbFormats","GL_CLAMP_TO_EDGE","GL_NEAREST","GL_NEAREST_MIPMAP_NEAREST","GL_LINEAR_MIPMAP_NEAREST","GL_NEAREST_MIPMAP_LINEAR","GL_LINEAR_MIPMAP_LINEAR","GL_BYTE","GL_UNSIGNED_BYTE","GL_SHORT","GL_UNSIGNED_SHORT","GL_INT","GL_UNSIGNED_INT","GL_FLOAT","GL_UNSIGNED_SHORT_4_4_4_4","GL_UNSIGNED_SHORT_5_5_5_1","GL_UNSIGNED_SHORT_5_6_5","GL_UNSIGNED_INT_24_8_WEBGL","GL_HALF_FLOAT_OES","TYPE_SIZE","pixelSize","isPow2","checkTexture2D","mipData","limits","mipimages","mw","mh","rowSize","checkTextureCube","texture","faces","face","mipmaps","check$1","VARIABLE_COUNTER","DYN_FUNC","DYN_CONSTANT","DYN_ARRAY","DynamicVariable","escapeStr","splitParts","firstChar","lastChar","subparts","toAccessorString","defineDynamic","isDynamic","unbox","dynamic","raf","cb","createStringStore","stringIds","stringValues","onDone","resize","resizeObserver","onDestroy","createContext","contextAttributes","isHTMLElement","isWebGLContext","parseExtensions","getElement","parseArgs","args_","extensions","optionalExtensions","profile","createExtensionCache","tryLoadExtension","name_","loop","GL_BYTE$1","GL_UNSIGNED_BYTE$2","GL_SHORT$1","GL_UNSIGNED_SHORT$1","GL_INT$1","GL_UNSIGNED_INT$1","GL_FLOAT$2","nextPow16","log2","createPool","bufferPool","alloc","bin","free","buf","allocType","freeType","pool","GL_SUBPIXEL_BITS","GL_RED_BITS","GL_GREEN_BITS","GL_BLUE_BITS","GL_ALPHA_BITS","GL_DEPTH_BITS","GL_STENCIL_BITS","GL_ALIASED_POINT_SIZE_RANGE","GL_ALIASED_LINE_WIDTH_RANGE","GL_MAX_TEXTURE_SIZE","GL_MAX_VIEWPORT_DIMS","GL_MAX_VERTEX_ATTRIBS","GL_MAX_VERTEX_UNIFORM_VECTORS","GL_MAX_VARYING_VECTORS","GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS","GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS","GL_MAX_TEXTURE_IMAGE_UNITS","GL_MAX_FRAGMENT_UNIFORM_VECTORS","GL_MAX_CUBE_MAP_TEXTURE_SIZE","GL_MAX_RENDERBUFFER_SIZE","GL_VENDOR","GL_RENDERER","GL_VERSION","GL_SHADING_LANGUAGE_VERSION","GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT","GL_MAX_COLOR_ATTACHMENTS_WEBGL","GL_MAX_DRAW_BUFFERS_WEBGL","GL_TEXTURE_2D","GL_TEXTURE_CUBE_MAP","GL_TEXTURE_CUBE_MAP_POSITIVE_X","GL_TEXTURE0","GL_RGBA","GL_FLOAT$1","GL_UNSIGNED_BYTE$1","GL_FRAMEBUFFER","GL_FRAMEBUFFER_COMPLETE","GL_COLOR_ATTACHMENT0","GL_COLOR_BUFFER_BIT$1","wrapLimits","maxAnisotropic","maxDrawbuffers","maxColorAttachments","readFloat","readFloatTexture","fbo","pixels","isIE","npotTextureCube","cubeTexture","isNDArrayLike","flattenUtils","arrayShape$1","flattenArray","flatten1D","flatten2D","ptr","flatten3D","nz","ptr_","flattenRec","out_","array_","arrayTypes","int8","int16","int32","uint8","uint16","uint32","float","float32","glTypes","dynamic$1","stream","usageTypes","arrayFlatten","arrayShape","GL_STATIC_DRAW","GL_STREAM_DRAW","GL_UNSIGNED_BYTE$3","GL_FLOAT$3","DTYPES_SIZES","typedArrayCode","copyArray","inp","shapeX","shapeY","strideX","strideY","wrapBufferState","stats","destroyBuffer","bufferCount","bufferSet","REGLBuffer","streamPool","createStream","initBufferFromData","destroyStream","stream$$1","initBufferFromTypedArray","usage","dtype","persist","flatData","dim","typedData","transposeData","createBuffer","deferInit","persistent","reglBuffer","byteLength","setSubData","subdata","offset_","converted","restoreBuffers","total","wrapper","triangles","triangle","primTypes","GL_POINTS","GL_LINES","GL_TRIANGLES","GL_BYTE$2","GL_UNSIGNED_BYTE$4","GL_SHORT$2","GL_UNSIGNED_SHORT$2","GL_INT$2","GL_UNSIGNED_INT$2","GL_ELEMENT_ARRAY_BUFFER","GL_STREAM_DRAW$1","GL_STATIC_DRAW$1","wrapElementsState","bufferState","elementSet","elementCount","elementTypes","REGLElementBuffer","createElementStream","initElements","destroyElementStream","predictedType","vertCount","primType","destroyElements","createElements","reglElements","FLOAT","INT","GL_UNSIGNED_SHORT$4","convertToHalfFloat","ushorts","sgn","frac","isPow2$1","GL_COMPRESSED_TEXTURE_FORMATS","GL_TEXTURE_2D$1","GL_TEXTURE_CUBE_MAP$1","GL_TEXTURE_CUBE_MAP_POSITIVE_X$1","GL_RGBA$1","GL_ALPHA","GL_RGB","GL_LUMINANCE","GL_LUMINANCE_ALPHA","GL_RGBA4","GL_RGB5_A1","GL_RGB565","GL_UNSIGNED_SHORT_4_4_4_4$1","GL_UNSIGNED_SHORT_5_5_5_1$1","GL_UNSIGNED_SHORT_5_6_5$1","GL_UNSIGNED_INT_24_8_WEBGL$1","GL_DEPTH_COMPONENT","GL_DEPTH_STENCIL","GL_SRGB_EXT","GL_SRGB_ALPHA_EXT","GL_HALF_FLOAT_OES$1","GL_COMPRESSED_RGB_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT3_EXT","GL_COMPRESSED_RGBA_S3TC_DXT5_EXT","GL_COMPRESSED_RGB_ATC_WEBGL","GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL","GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL","GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGB_ETC1_WEBGL","GL_UNSIGNED_BYTE$5","GL_UNSIGNED_SHORT$3","GL_UNSIGNED_INT$3","GL_FLOAT$4","GL_TEXTURE_WRAP_S","GL_TEXTURE_WRAP_T","GL_REPEAT","GL_CLAMP_TO_EDGE$1","GL_MIRRORED_REPEAT","GL_TEXTURE_MAG_FILTER","GL_TEXTURE_MIN_FILTER","GL_NEAREST$1","GL_LINEAR","GL_NEAREST_MIPMAP_NEAREST$1","GL_LINEAR_MIPMAP_NEAREST$1","GL_NEAREST_MIPMAP_LINEAR$1","GL_LINEAR_MIPMAP_LINEAR$1","GL_GENERATE_MIPMAP_HINT","GL_DONT_CARE","GL_FASTEST","GL_NICEST","GL_TEXTURE_MAX_ANISOTROPY_EXT","GL_UNPACK_ALIGNMENT","GL_UNPACK_FLIP_Y_WEBGL","GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL","GL_UNPACK_COLORSPACE_CONVERSION_WEBGL","GL_BROWSER_DEFAULT_WEBGL","GL_TEXTURE0$1","MIPMAP_FILTERS","CHANNELS_FORMAT","FORMAT_CHANNELS","objectName","CANVAS_CLASS","OFFSCREENCANVAS_CLASS","CONTEXT2D_CLASS","BITMAP_CLASS","IMAGE_CLASS","VIDEO_CLASS","PIXEL_CLASSES","TYPE_SIZES","FORMAT_SIZES_SPECIAL","isNumericArray","isRectArray","classString","isCanvasElement","isOffscreenCanvas","isContext2D","isBitmap","isImageElement","isVideoElement","isPixelData","typedArrayCode$1","convertData","preConvert","image","postConvert","strideC","getTextureSize","isMipmap","isCube","createTextureSet","reglPoll","contextState","mipmapHint","wrapModes","magFilters","minFilters","colorSpace","textureTypes","textureFormats","compressedTextureFormats","supportedCompressedFormats","supportedFormats","textureFormatsInvert","textureTypesInvert","magFiltersInvert","minFiltersInvert","wrapModesInvert","colorFormats","glenum","TexFlags","copyFlags","parseFlags","flags","hasChannels","hasFormat","formatStr","internalformat","setFlags","TexImage","parseImage","viewW","viewH","shapeC","dd","allocData","setImage","miplevel","setSubImage","imagePool","allocImage","freeImage","MipMap","parseMipMapFromShape","mipmap","parseMipMapFromObject","imgData","setMipMap","images","mipPool","allocMipMap","freeMipMap","TexInfo","parseTexInfo","minFilter","magFilter","wrapS","wrapT","optWrapS","optWrapT","anisotropic","hasMipMap","setTexInfo","textureCount","textureSet","numTexUnits","textureUnits","REGLTexture","tempBind","tempRestore","createTexture2D","reglTexture2D","texInfo","subimage","x_","y_","level_","imageData","h_","_w","createTextureCube","reglTextureCube","faceInput","radius_","destroyTextures","restoreTextures","tex","refreshTextures","GL_RENDERBUFFER","GL_RGBA4$1","GL_RGB5_A1$1","GL_RGB565$1","GL_DEPTH_COMPONENT16","GL_STENCIL_INDEX8","GL_DEPTH_STENCIL$1","GL_SRGB8_ALPHA8_EXT","GL_RGBA32F_EXT","GL_RGBA16F_EXT","GL_RGB16F_EXT","FORMAT_SIZES","getRenderbufferSize","wrapRenderbuffers","formatTypes","formatTypesInvert","renderbufferCount","renderbufferSet","REGLRenderbuffer","renderbuffer","rb","createRenderbuffer","reglRenderbuffer","restoreRenderbuffers","GL_FRAMEBUFFER$1","GL_RENDERBUFFER$1","GL_TEXTURE_2D$2","GL_TEXTURE_CUBE_MAP_POSITIVE_X$2","GL_COLOR_ATTACHMENT0$1","GL_DEPTH_ATTACHMENT","GL_STENCIL_ATTACHMENT","GL_DEPTH_STENCIL_ATTACHMENT","GL_FRAMEBUFFER_COMPLETE$1","GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT","GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT","GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS","GL_FRAMEBUFFER_UNSUPPORTED","GL_HALF_FLOAT_OES$2","GL_UNSIGNED_BYTE$6","GL_FLOAT$5","GL_RGB$1","GL_RGBA$2","GL_DEPTH_COMPONENT$1","colorTextureFormatEnums","textureFormatChannels","textureTypeSizes","GL_RGBA4$2","GL_RGB5_A1$2","GL_RGB565$2","GL_DEPTH_COMPONENT16$1","GL_STENCIL_INDEX8$1","GL_DEPTH_STENCIL$2","GL_SRGB8_ALPHA8_EXT$1","GL_RGBA32F_EXT$1","GL_RGBA16F_EXT$1","GL_RGB16F_EXT$1","colorRenderbufferFormatEnums","statusCode","wrapFBOState","textureState","renderbufferState","framebufferState","colorTextureFormats","colorRenderbufferFormats","colorTypes","FramebufferAttachment","decRef","incRefAndCheckShape","tw","th","attach","location","parseAttachment","allocAttachment","isTexture","unwrapAttachment","resizeAttachment","framebufferCount","framebufferSet","REGLFramebuffer","decFBORefs","framebuffer","updateFramebuffer","colorAttachments","status","createFBO","reglFramebuffer","needsDepth","needsStencil","colorBuffer","colorTexture","colorFormat","colorType","colorCount","depthBuffer","stencilBuffer","depthStencilBuffer","depthStencilTexture","depthAttachment","stencilAttachment","depthStencilAttachment","commonColorAttachmentSize","colorAttachmentSize","createCubeFBO","reglFramebufferCube","colorCubes","cubeMapParams","cube","restoreFramebuffers","fb","GL_FLOAT$6","GL_ARRAY_BUFFER$1","AttributeRecord","wrapAttributeState","NUM_ATTRIBUTES","attributeBindings","vaoCount","vaoSet","extVAO","restoreVAO","createVAO","getVAO","setVAOEXT","setVAOEmulated","destroyVAOEXT","record","extInstanced","vao","exti","binding","REGLVAO","extension","_attr","updateVAO","bufUpdated","nattributes","spec","GL_FRAGMENT_SHADER","GL_VERTEX_SHADER","GL_ACTIVE_UNIFORMS","GL_ACTIVE_ATTRIBUTES","wrapShaderState","fragShaders","vertShaders","ActiveInfo","insertActiveInfo","getShader","programCache","programList","PROGRAM_COUNTER","REGLProgram","fragId","vertId","linkProgram","attributeLocations","numUniforms","numAttributes","restoreShaders","deleteShader","attribLocations","prevProgram","GL_RGBA$3","GL_UNSIGNED_BYTE$7","GL_PACK_ALIGNMENT","GL_FLOAT$7","wrapReadPixels","glAttributes","readPixelsImpl","readPixelsFBO","readPixels","join","createEnvironment","varCounter","linkedNames","linkedValues","scope","exit","entryToString","exitToString","save","conditional","thenBlock","elseBlock","thenToString","elseToString","elseClause","globalBlock","procedures","proc","bodyToString","CUTE_COMPONENTS","GL_UNSIGNED_BYTE$8","ATTRIB_STATE_POINTER","ATTRIB_STATE_CONSTANT","DYN_FUNC$1","DYN_PROP$1","DYN_CONTEXT$1","DYN_STATE$1","DYN_THUNK","DYN_CONSTANT$1","DYN_ARRAY$1","S_DITHER","S_BLEND_ENABLE","S_BLEND_COLOR","S_BLEND_EQUATION","S_BLEND_FUNC","S_DEPTH_ENABLE","S_DEPTH_FUNC","S_DEPTH_RANGE","S_DEPTH_MASK","S_COLOR_MASK","S_CULL_ENABLE","S_CULL_FACE","S_FRONT_FACE","S_LINE_WIDTH","S_POLYGON_OFFSET_ENABLE","S_POLYGON_OFFSET_OFFSET","S_SAMPLE_ALPHA","S_SAMPLE_ENABLE","S_SAMPLE_COVERAGE","S_STENCIL_ENABLE","S_STENCIL_MASK","S_STENCIL_FUNC","S_STENCIL_OPFRONT","S_STENCIL_OPBACK","S_SCISSOR_ENABLE","S_SCISSOR_BOX","S_VIEWPORT","S_PROFILE","S_FRAMEBUFFER","S_VERT","S_FRAG","S_ELEMENTS","S_PRIMITIVE","S_COUNT","S_OFFSET","S_INSTANCES","S_VAO","SUFFIX_WIDTH","SUFFIX_HEIGHT","S_FRAMEBUFFER_WIDTH","S_FRAMEBUFFER_HEIGHT","S_VIEWPORT_WIDTH","S_VIEWPORT_HEIGHT","S_DRAWINGBUFFER","S_DRAWINGBUFFER_WIDTH","S_DRAWINGBUFFER_HEIGHT","NESTED_OPTIONS","GL_ARRAY_BUFFER$2","GL_ELEMENT_ARRAY_BUFFER$1","GL_FRAGMENT_SHADER$1","GL_VERTEX_SHADER$1","GL_TEXTURE_2D$3","GL_TEXTURE_CUBE_MAP$2","GL_CULL_FACE","GL_BLEND","GL_DITHER","GL_STENCIL_TEST","GL_DEPTH_TEST","GL_SCISSOR_TEST","GL_POLYGON_OFFSET_FILL","GL_SAMPLE_ALPHA_TO_COVERAGE","GL_SAMPLE_COVERAGE","GL_FLOAT$8","GL_FLOAT_VEC2","GL_FLOAT_VEC3","GL_FLOAT_VEC4","GL_INT$3","GL_INT_VEC2","GL_INT_VEC3","GL_INT_VEC4","GL_BOOL","GL_BOOL_VEC2","GL_BOOL_VEC3","GL_BOOL_VEC4","GL_FLOAT_MAT2","GL_FLOAT_MAT3","GL_FLOAT_MAT4","GL_SAMPLER_2D","GL_SAMPLER_CUBE","GL_TRIANGLES$1","GL_FRONT","GL_BACK","GL_CW","GL_CCW","GL_MIN_EXT","GL_MAX_EXT","GL_ALWAYS","GL_KEEP","GL_ZERO","GL_ONE","GL_FUNC_ADD","GL_LESS","GL_FRAMEBUFFER$2","GL_COLOR_ATTACHMENT0$2","blendFuncs","invalidBlendCombinations","compareFuncs","stencilOps","shaderType","orientationType","isBufferArgs","sortState","Declaration","thisDep","contextDep","propDep","append","isStatic","decl","createStaticDecl","createDynamicDecl","dyn","numArgs","subDyn","subArgs","SCOPE_DECL","reglCore","elementState","uniformState","attributeState","shaderState","drawState","blendEquations","extInstancing","extDrawBuffers","currentState","nextState","GL_STATE_NAMES","GL_FLAGS","GL_VARIABLES","propName","stateFlag","sname","cap","stateVariable","sharedState","sharedConstants","drawCallCounter","createREGLEnvironment","SHARED","shared","nextVars","currentVars","variable","argList","scopeAttribs","parseProfile","staticOptions","dynamicOptions","profileEnable","parseFramebuffer","FRAMEBUFFER","CONTEXT","FRAMEBUFFER_FUNC","FRAMEBUFFER_STATE","parseViewportScissor","parseBox","BOX_W","BOX_H","dynBox","BOX","BOX_X","BOX_Y","viewport","prevViewport","VIEWPORT","parseAttribLocations","staticProgram","staticAttributes","sAttributes","bindings","parseProgram","parseShader","frag","progVar","SHADER_STATE","progDef","parseDraw","parseElements","IS_BUFFER_ARGS","ELEMENT_STATE","elementDefn","elementStream","ifte","parsePrimitive","primitive","dynPrimitive","PRIM_TYPES","parseParam","isOffset","dynValue","OFFSET","parseVertCount","dynCount","parseGLState","STATE","parseStatic","parseDynamic","COMPARE_FUNCS","Z_NEAR","Z_FAR","srcRGB","srcAlpha","dstRGB","dstAlpha","BLEND_FUNCS","INVALID_BLEND_COMBINATIONS","SRC_RGB","SRC_ALPHA","DST_RGB","DST_ALPHA","BLEND_EQUATIONS","RGB","ALPHA","checkProp","cmp","mask","assert","zfail","zpass","STENCIL_OPS","FACTOR","UNITS","sampleValue","sampleInvert","VALUE","INVERT","parseUniforms","staticUniforms","dynamicUniforms","UNIFORMS","reglType","ITEM","parseAttributes","dynamicAttributes","attributeDefs","attribute","normalized","divisor","VALID_KEYS","appendAttributeCode","BUFFER_STATE","defaultRecord","BUFFER","TYPE","emitReadRecord","parseVAO","vaoRef","parseContext","staticContext","dynamicContext","parseArguments","KEY_NAMES","checkKeys","viewportAndScissor","draw","copyBox","defn","dirty","useVAO","staticBindings","emitContext","contextEnter","emitPollFramebuffer","skipCheck","GL","EXT_DRAW_BUFFERS","DRAW_BUFFERS","BACK_BUFFER","NEXT","emitPollState","CURRENT_VARS","NEXT_VARS","CURRENT_STATE","NEXT_STATE","CURRENT","emitSetOptions","injectExtensions","emitProfile","useScope","incrementCounter","STATS","TIMER","profileArg","perfCounter","CPU_START","QUERY_COUNTER","emitProfileStart","emitProfileEnd","scopeProfile","USE_PROFILE","emitAttributes","typeLength","emitBindAttribute","ATTRIBUTE","LOCATION","BINDING","CONST_COMPONENTS","COMMON_KEYS","emitBuffer","SIZE","DIVISOR","emitConstant","scopeAttrib","emitUniforms","infix","UNIFORM","TEX_VALUE","MAT_VALUE","emitCheck","checkType","checkVector","checkTexture","unroll","TEX","matSize","STORAGE","emitDraw","DRAW_STATE","drawOptions","emitElements","ELEMENTS","emitCount","COUNT","emitValue","PRIMITIVE","INSTANCES","EXT_INSTANCING","ELEMENT_TYPE","elementsStatic","emitInstancing","drawElements","drawArrays","emitRegular","createBody","emitBody","parentEnv","emitDrawBody","emitDrawProc","drawCache","PROG_ID","CACHED_PROC","emitBatchDynamicShaderBody","all","emitBatchBody","contextDynamic","BATCH_ID","PROP_LIST","NUM_PROPS","PROPS","isInnerDefn","isOuterDefn","progCache","PROGRAM","emitBatchProc","batch","needsContext","needsFramebuffer","progDefn","batchCache","emitScopeProc","opt","saveShader","isDynamicObject","splatObject","globals","objectRef","deps","appendBlock","compileCommand","poll","INSTANCING","GL_QUERY_RESULT_EXT","GL_QUERY_RESULT_AVAILABLE_EXT","GL_TIME_ELAPSED_EXT","createTimer","queryPool","allocQuery","freeQuery","query","pendingQueries","beginQuery","pushScopeStats","endQuery","PendingStats","pendingStatsPool","allocPendingStats","freePendingStats","pendingStats","timeSum","queryPtr","queryTime","startPtr","endPtr","GL_COLOR_BUFFER_BIT","GL_DEPTH_BUFFER_BIT","GL_STENCIL_BUFFER_BIT","GL_ARRAY_BUFFER","CONTEXT_LOST_EVENT","CONTEXT_RESTORED_EVENT","DYN_PROP","DYN_CONTEXT","DYN_STATE","haystack","needle","wrapREGL","contextLost","extensionState","stats$$1","START_TIME","WIDTH","HEIGHT","core","rafCallbacks","lossCallbacks","restoreCallbacks","destroyCallbacks","activeRAF","handleRAF","startRAF","stopRAF","handleContextLoss","handleContextRestored","compileProcedure","flattenNestedOptions","merge","separateDynamic","useArrays","staticItems","dynamicItems","compiled","EMPTY_ARRAY","reserve","REGLCommand","setFBO","clearImpl","clearFlags","clear","cancel","pendingCancel","pollViewport","scissorBox","addListener","regl","ReglAttribute","_primitiveMap","_usageMap","_dataTypeMap","_formatMap","_mipmapMap","_filterMap","_wrapModeMap","_colorSpaceMap","_depthFuncMap","_blendEquationMap","_blendFuncMap","_stencilFuncMap","_stencilOpMap","_cullFaceMap","primitiveMap","usageMap","dataTypeMap","formatMap","mipmapMap","filterMap","wrapModeMap","colorSpaceMap","depthFuncMap","blendEquationMap","blendFuncMap","stencilFuncMap","stencilOpMap","cullFaceMap","ReglBuffer","reGl","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","quadVert","textureId","ReglComputeModel","storageClass","_this$textureCache$na","isOutput","_this$getOuputDataTex","textureWidth","texelCount","drawParams","_readData","_this3","_this$getOuputDataTex2","originalDataLength","elementsPerTexel","_this$getOuputDataTex3","typedArrayConstructor","formattedPixels","readData","inputName","inputModel","bufferName","_this$calcDataTexture","paddingData","outputTextureUniformName","paddingTexelCount","ReglElements","ReglFramebuffer","framebufferOptions","overArg","_overArg","getPrototype","_getPrototype","funcProto","funcToString","objectCtorString","isPlainObject_1","extractUniforms","extractedUniforms","uniformName","extractUniformsRecursively","uniformValue","_isPlainObject","childName","ReglModel","fs","defines","blend","stencil","cull","instances","scissor","reglUniforms","reglAttributes","defineStmts","reglDrawProps","equation","_blend$color","_ref3","_stencil$mask","_stencil$func","_stencil$opFront","opFront","_stencil$opBack","opBack","_ref4","_cull$face","ReglTexture2D","_options$type","_options$flipY","flipY","_options$format","_options$mipmap","_options$wrapS","_options$wrapT","_options$aniso","aniso","_options$alignment","_options$premultiplyA","premultiplyAlpha","_options$mag","_options$colorSpace","textureOptions","WebGLEngine","_x2","_x","drawCommands","_x3","_options$framebuffer","reglClearOptions","readPixelsOptions","_init","_callee4","_context4","_x4","World","_createEntity","precompiledBundle","kernel","world","gpu","math_1","buildTextureData","dataArray","nodeDict","mapIdPos","maxEdgePerVetex","dests","dest","buildTextureDataWithTwoEdgeAttr","attrs1","attributesToTextureData","attributeNames","attributeNum","attributteStringMap","arrayToTextureData","valueArrays","itemNum","valueArray","fruchtermanShader","g_webgpu_1","gpu_1","fruchtermanShader_1","FruchtermanGPULayout","attributeArray","clusterCount","numParticles","nodesEdgesArray","onLayoutEnd","clusterCenters","kernelFruchterman","kernelCluster","finalParticleData","gForceShader","gForceShader_1","GForceGPULayout","masses","nodeStrengths","centerXs","centerYs","centerGravities","fxs","fys","nodeAttributeArray1","nodeAttributeArray2","initPreviousData","kernelGForce","kernelAveMovement","nodeGravity","customCenter","comboForce","ComboForceLayout","centerOffset","mapped","oriComboMap","comboSpacing","comboSpacingFunc","comboPadding","comboPaddingFunc","linkDistanceFunc","edgeStrengthFunc","nodeStrengthFunc","treeChildren","oriCombo","childCombo","comboGravity","gravityScale","vecMap","vl2","vl","preventComboOverlap","nodeMinX","nodeMinY","nodeMaxX","nodeMaxY","minSize","maxLength","comboTree","comboCollideStrength","cv","rv","ru2","rv2","vnodes","unodes_1","sqrtl","xl_1","yl_1","rratio_1","irratio_1","uindex","nodeCollideStrength","preventNodeOverlap","depthDiff","depthParam","rj2","rratio","xl","yl","comboCombined","ComboCombinedLayout","innerGraphs","outerNodeIds","outerNodes","nodeAncestorIdMap","allHaveNoPosition","innerNode","oNode","outerEdges","sourceAncestorId","targetAncestorId","outerData","outerLayout","outerLayoutType","outerLayoutPreset","outerNode","innerGraph","innerGraphIds","spacing","innerGraphLayout","innerGraphNodes","oriNode","innerGraphNodeIds_1","innerGraphData","minNodeSize_1","center_1","innerGraphWidth","innerGraphHeight","treeNodeSize","spacingFunc","Body","nenwMass","dg","halfLen","NW","NE","SW","SE","quadTree","QuadTree","forceAtlas2","body_1","quad_1","quadTree_1","ForceAtlas2Layout","prune","sizes","nodeWidth","nonLoopEdges","esize","idMap","edgeEndsIdMap","Es","sIdx","tIdx","barnesHut","krPrime","prevoIter","preForces","bodies","dissuadeHubs","dir","eucliDis","Fa1","Fa2","kg","dir_1","eucliDis_1","Fg","quadParams","tao","ksmax","swgns","trans","swgG","traG","minusNorm","addNorm","preSG","absForce","dnx","dny","Grid","gridSize","cell","forceGrid","grid_1","nodeMinGap","CELL_W","CELL_H","gridpoint","addGridSize","realAdd","hasColumn","mysqlWorkbench","graphWidth","graphHeight","OVERLAP_QUOT","MIN_DIST","M_PI","M_PI_2","PI_38","PI_58","nodeEdgeMap","T_MIN","distanceToNode","isHoriz","x11","y11","x12","y12","x21","y21","x22","y22","cx1","cy1","cx2","cy2","dcx","aqr","newHoriz","calcNodePair","nodeA","nodeB","isLinked","areaA","areaB","isoverlap","sx1","sy1","sx2","sy2","dsx","dsy","sov","calcEnergy","isCorrectPosition","newPosition","relateEdges","relateNodes","otherNodeId","newDelta","isHor","newIsHor","isVer","newIsVer","shuffle","foundSmallerEnergy","wstep","hstep","wsteps","hsteps","nodeEnergy","calcNodeEnergy","ns","rdm","relateEdge","minEnergy","deSameCount","prevEnergy","MAX_COUNT","forceGrid_1","mysqlWorkbench_1","dagre_1","noLeafNodes","noLeafEdge","graphLayout","nodesTmp","copyNodes","copyEdges","layoutPromise","scalex","scaley","core_1","ERLayout","registy_1","random_1","force2_1","gForce_1","force_1","circular_1","radial_1","concentric_1","fruchterman_1","fruchterman_2","gForce_2","comboForce_1","comboCombined_1","require$$15","forceAtlas2_1","require$$16","er_1","require$$17","dagreCompound_1","require$$18","require$$19","Layout","layoutClass","minLayer","hasLayerNodes","layerOffset_1","modules","installedModules","__webpack_require__","moduleId","getter","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__is_type__","_require","getHeight","preNode","heightField","__WEBPACK_IMPORTED_MODULE_0__is_array__","__WEBPACK_IMPORTED_MODULE_1__is_object__","__WEBPACK_IMPORTED_MODULE_0__is_nil__","__WEBPACK_IMPORTED_MODULE_0__is_object_like__","__WEBPACK_IMPORTED_MODULE_1__is_type__","hierarchy","_proto","__WEBPACK_IMPORTED_MODULE_0__is_array_like__","__WEBPACK_IMPORTED_MODULE_0__each__","__WEBPACK_IMPORTED_MODULE_1__is_function__","separateTree","VALID_DIRECTIONS","HORIZONTAL_DIRECTIONS","DEFAULT_DIRECTION","layoutAlgrithm","_separateTree","bb","fixedRoot","PEM","DEFAULT_HEIGHT","DEFAULT_GAP","DEFAULT_OPTIONS","hgap","vgap","isolated","__WEBPACK_IMPORTED_MODULE_1__keys__","__WEBPACK_IMPORTED_MODULE_1__is_array__","__WEBPACK_IMPORTED_MODULE_2__is_plain_object__","__WEBPACK_IMPORTED_MODULE_2__group_by__","__WEBPACK_IMPORTED_MODULE_0__is_function__","__WEBPACK_IMPORTED_MODULE_1__is_array_like__","__WEBPACK_IMPORTED_MODULE_2__is_string__","__WEBPACK_IMPORTED_MODULE_0_tslib__","__WEBPACK_IMPORTED_MODULE_1__values__","__WEBPACK_IMPORTED_MODULE_2__memoize__","__WEBPACK_IMPORTED_MODULE_3__is_string__","rightTreeSize","getSide","side","_inheritsLoose","TreeLayout","nonLayeredTidyTree","doTreeLayout","CompactBoxTreeLayout","_TreeLayout","compactBoxLayout","__WEBPACK_IMPORTED_MODULE_0__contains__","__WEBPACK_IMPORTED_MODULE_1__difference__","__WEBPACK_IMPORTED_MODULE_2__find__","__WEBPACK_IMPORTED_MODULE_3__find_index__","__WEBPACK_IMPORTED_MODULE_4__first_value__","__WEBPACK_IMPORTED_MODULE_5__flatten__","__WEBPACK_IMPORTED_MODULE_6__flatten_deep__","__WEBPACK_IMPORTED_MODULE_7__get_range__","__WEBPACK_IMPORTED_MODULE_8__pull__","__WEBPACK_IMPORTED_MODULE_9__pull_at__","__WEBPACK_IMPORTED_MODULE_10__reduce__","__WEBPACK_IMPORTED_MODULE_11__remove__","__WEBPACK_IMPORTED_MODULE_12__sort_by__","__WEBPACK_IMPORTED_MODULE_13__union__","__WEBPACK_IMPORTED_MODULE_14__uniq__","__WEBPACK_IMPORTED_MODULE_15__values_of_key__","__WEBPACK_IMPORTED_MODULE_16__head__","__WEBPACK_IMPORTED_MODULE_17__last__","__WEBPACK_IMPORTED_MODULE_18__starts_with__","__WEBPACK_IMPORTED_MODULE_19__ends_with__","__WEBPACK_IMPORTED_MODULE_20__filter__","__WEBPACK_IMPORTED_MODULE_21__every__","__WEBPACK_IMPORTED_MODULE_22__some__","__WEBPACK_IMPORTED_MODULE_23__group__","__WEBPACK_IMPORTED_MODULE_24__group_by__","__WEBPACK_IMPORTED_MODULE_25__group_to_map__","__WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__","__WEBPACK_IMPORTED_MODULE_27__wrap_behavior__","__WEBPACK_IMPORTED_MODULE_28__number2color__","__WEBPACK_IMPORTED_MODULE_29__parse_radius__","__WEBPACK_IMPORTED_MODULE_30__clamp__","__WEBPACK_IMPORTED_MODULE_31__fixed_base__","__WEBPACK_IMPORTED_MODULE_32__is_decimal__","__WEBPACK_IMPORTED_MODULE_33__is_even__","__WEBPACK_IMPORTED_MODULE_34__is_integer__","__WEBPACK_IMPORTED_MODULE_35__is_negative__","__WEBPACK_IMPORTED_MODULE_36__is_number_equal__","__WEBPACK_IMPORTED_MODULE_37__is_odd__","__WEBPACK_IMPORTED_MODULE_38__is_positive__","__WEBPACK_IMPORTED_MODULE_39__max__","__WEBPACK_IMPORTED_MODULE_40__max_by__","__WEBPACK_IMPORTED_MODULE_41__min__","__WEBPACK_IMPORTED_MODULE_42__min_by__","__WEBPACK_IMPORTED_MODULE_43__mod__","__WEBPACK_IMPORTED_MODULE_44__to_degree__","__WEBPACK_IMPORTED_MODULE_45__to_integer__","__WEBPACK_IMPORTED_MODULE_46__to_radian__","__WEBPACK_IMPORTED_MODULE_47__for_in__","__WEBPACK_IMPORTED_MODULE_48__has__","__WEBPACK_IMPORTED_MODULE_49__has_key__","__WEBPACK_IMPORTED_MODULE_50__has_value__","__WEBPACK_IMPORTED_MODULE_51__keys__","__WEBPACK_IMPORTED_MODULE_52__is_match__","__WEBPACK_IMPORTED_MODULE_53__values__","__WEBPACK_IMPORTED_MODULE_54__lower_case__","__WEBPACK_IMPORTED_MODULE_55__lower_first__","__WEBPACK_IMPORTED_MODULE_56__substitute__","__WEBPACK_IMPORTED_MODULE_57__upper_case__","__WEBPACK_IMPORTED_MODULE_58__upper_first__","__WEBPACK_IMPORTED_MODULE_59__get_type__","__WEBPACK_IMPORTED_MODULE_60__is_arguments__","__WEBPACK_IMPORTED_MODULE_61__is_array__","__WEBPACK_IMPORTED_MODULE_62__is_array_like__","__WEBPACK_IMPORTED_MODULE_63__is_boolean__","__WEBPACK_IMPORTED_MODULE_64__is_date__","__WEBPACK_IMPORTED_MODULE_65__is_error__","__WEBPACK_IMPORTED_MODULE_66__is_function__","__WEBPACK_IMPORTED_MODULE_67__is_finite__","__WEBPACK_IMPORTED_MODULE_68__is_nil__","__WEBPACK_IMPORTED_MODULE_69__is_null__","__WEBPACK_IMPORTED_MODULE_70__is_number__","__WEBPACK_IMPORTED_MODULE_71__is_object__","__WEBPACK_IMPORTED_MODULE_72__is_object_like__","__WEBPACK_IMPORTED_MODULE_73__is_plain_object__","__WEBPACK_IMPORTED_MODULE_74__is_prototype__","__WEBPACK_IMPORTED_MODULE_75__is_reg_exp__","__WEBPACK_IMPORTED_MODULE_76__is_string__","__WEBPACK_IMPORTED_MODULE_77__is_type__","__WEBPACK_IMPORTED_MODULE_78__is_undefined__","__WEBPACK_IMPORTED_MODULE_79__is_element__","__WEBPACK_IMPORTED_MODULE_80__request_animation_frame__","__WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__","__WEBPACK_IMPORTED_MODULE_82__augment__","__WEBPACK_IMPORTED_MODULE_83__clone__","__WEBPACK_IMPORTED_MODULE_84__debounce__","__WEBPACK_IMPORTED_MODULE_85__memoize__","__WEBPACK_IMPORTED_MODULE_86__deep_mix__","__WEBPACK_IMPORTED_MODULE_87__each__","__WEBPACK_IMPORTED_MODULE_88__extend__","__WEBPACK_IMPORTED_MODULE_89__index_of__","__WEBPACK_IMPORTED_MODULE_90__is_empty__","__WEBPACK_IMPORTED_MODULE_91__is_equal__","__WEBPACK_IMPORTED_MODULE_92__is_equal_with__","__WEBPACK_IMPORTED_MODULE_93__map__","__WEBPACK_IMPORTED_MODULE_94__map_values__","__WEBPACK_IMPORTED_MODULE_95__mix__","__WEBPACK_IMPORTED_MODULE_96__get__","__WEBPACK_IMPORTED_MODULE_97__set__","__WEBPACK_IMPORTED_MODULE_98__pick__","__WEBPACK_IMPORTED_MODULE_99__omit__","__WEBPACK_IMPORTED_MODULE_100__throttle__","__WEBPACK_IMPORTED_MODULE_101__to_array__","__WEBPACK_IMPORTED_MODULE_102__to_string__","__WEBPACK_IMPORTED_MODULE_103__unique_id__","__WEBPACK_IMPORTED_MODULE_104__noop__","__WEBPACK_IMPORTED_MODULE_105__identity__","__WEBPACK_IMPORTED_MODULE_106__size__","__WEBPACK_IMPORTED_MODULE_107__measure_text_width__","__WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__","__WEBPACK_IMPORTED_MODULE_109__cache__","__WEBPACK_IMPORTED_MODULE_0__filter__","__WEBPACK_IMPORTED_MODULE_1__contains__","__WEBPACK_IMPORTED_MODULE_1__is_match__","__WEBPACK_IMPORTED_MODULE_2__is_array__","__WEBPACK_IMPORTED_MODULE_3__is_plain_object__","__WEBPACK_IMPORTED_MODULE_1__max__","__WEBPACK_IMPORTED_MODULE_2__min__","__WEBPACK_IMPORTED_MODULE_1__pull_at__","__WEBPACK_IMPORTED_MODULE_1__is_string__","__WEBPACK_IMPORTED_MODULE_2__is_function__","__WEBPACK_IMPORTED_MODULE_0__uniq__","__WEBPACK_IMPORTED_MODULE_1__is_nil__","__WEBPACK_IMPORTED_MODULE_0__group_to_map__","__WEBPACK_IMPORTED_MODULE_0__is_number__","__WEBPACK_IMPORTED_MODULE_0__has__","__WEBPACK_IMPORTED_MODULE_0__to_string__","__WEBPACK_IMPORTED_MODULE_0__mix__","__WEBPACK_IMPORTED_MODULE_1__is_plain_object__","__WEBPACK_IMPORTED_MODULE_2__get_type__","__WEBPACK_IMPORTED_MODULE_3__is_prototype__","__WEBPACK_IMPORTED_MODULE_1__is_equal__","__WEBPACK_IMPORTED_MODULE_0__is_string__","__WEBPACK_IMPORTED_MODULE_0__is_object__","__WEBPACK_IMPORTED_MODULE_2__is_number__","__WEBPACK_IMPORTED_MODULE_0__reduce__","__WEBPACK_IMPORTED_MODULE_1__to_string__","__WEBPACK_IMPORTED_MODULE_2__measure_text_width__","WrappedTree","moveRight","convertBack","firstWalk","setExtremes","ih","updateIYL","separate","positionRoot","mssr","cl","mscl","moveSubtree","nextRightContour","nextLeftContour","setLeftThread","setRightThread","distributeExtra","modsumcl","modsumsr","secondWalk","modsum","addChildSpacing","modsumdelta","dendrogram","DendrogramLayout","dendrogramLayout","wrappedTreeFromNode","childrenCount","childWT","getDrawingDepth","minChildDepth","prevLeaf","indentedTree","IndentedLayout","_options$indent","_options$dropCap","dropCap","_options$direction","indentedLayout","positionNode","displacementX","prevParent","preY","mindmap","MindmapLayout","mindmapLayout","totalHeight","thirdWalk","childrenHeight","childrenTotalHeight","buildTextureDataWithOneEdgeAttr","attributeStringMap","radialLayout","VERTICAL_LAYOUTS","rScale","radScale","avgRad","radDiff","gpuDetector","parameters","getBrowserName","G6Util","GpuUtil","BrowserUtil","layoutData","Hierarchy","oRegisterLayout","WebWorker","workerScirptURL","blob","LayoutWorker","workerScriptURL","workerCode","LAYOUT_MESSAGE","isLayoutMessage","handleLayoutMessage","LayoutClass","layoutMethod_1","layoutWorker","mockRaf","mockCaf","reqId","helper","requestId","GPU_LAYOUT_NAMES","LAYOUT_PIPES_ADJUST_NAMES","workerData","reslove","onTick_1","animate_1","isDefaultAnimateLayout_1","enableTick","onTick_2","hasGPUVersion","addLayoutOrder","onTick_3","animate_2","isDefaultAnimateLayout_2","prevHasNodes","preLayoutTypes","initHiddenPromise","getGPUEnabled","layoutEndFormatted","hasLayout","positionMap","sourcePosition","targetPosition","hasPresetCallback","noPresetCallback","preset","isGPU","presetLayout","allData","offScreenCanvas","gpuWorkerAbility","filteredLayoutCfg","filterObject","offscreen","eventData","onTick","updateLayoutPosition","updateGPUWorkerLayoutPosition","otherCfg","preNodes","AbstractLayout","vertexEdgeData","layoutName","enableGPU","SVG","clientWidth","clientHeight","renderer","GSVGCanvas","canvasCfg","GCanvas","watermarker","watermarkStr","watermarkbase64","backgroundColor","widths","vCanvasEl","canvasDom","dataURL","svgDocType","svgDoc","svgData","compositeOperation","imageConfig","vContainerDOM","vHeight","vWidth","canvasOptions","vCanvas","vGroup","wmWidth","wmHeight","fileName","mime","bstr","u8arr","blobObj_1","imgURL","waterMarkerConfig","compatible","texts","displayTexts","tooltipDOMs","traverseClone","hash","cloneObj","deepClone","TreeGraph","treeData","origin_1","childrenList","toPoint","fitView","layoutConfig","cacheChidMap_1","isHidden","cachedItems","parentData","origin_2","clearStack","PluginBase","cfgs","bindEvents","PluginBase$1","_extendStatics","GRID_PNG","graphContainer","gridContainer","gridContainerWidth","gridContainerHeight","isFollow","Grid$1","containers","styleElements","insertCss","containerId","styleElement","createStyleElement","insertCssModule","Menu","menu","itemTypes","shouldBegin","menuDom","getContent","handleMenuClick","handleMenuClickWrapper","graphTop","graphLeft","triggeredByFirstClick","Menu$1","DEFAULT_MODE","KEYSHAPE_MODE","DELEGATE_MODE","MiniMap","containerDOM","isFireFox","isSafari","dragging","zoom","dragstartevent","dragListener","dragendListener","dragendevent","totaldx","totaldy","graphCanvasEl","correctLeft","correctTop","graphGroup","clonedGroup","comboGroup_1","mappedItem","cKeyShape","comboGroup_2","delegateStyle","isRefresh","graphBBox","graphZoom","Minimap","getEucliDis","pointA","pointB","getDotProduct","ej","projectPointToEdge","Bundling","nodeIdMap","divRate","edgePoints","edgeBundles","iterRate","divisionLength_1","currentDivisonLength_1","newEdgePoints_1","ep","oriDivisionLength","edgePoint","bundleThreshold","iSource","iTarget","jSource","jTarget","score","aScore","sScore","pScore","vScore","dotProduct","iMid","jMid","vij","vji","pMid","eidx","kp","edgePointForces","spring","electrostatic","pidx","edgeBundle","resForce","eb","Bundling$1","DELTA","lensDelegateStyle","Fisheye","lensDelegate","lensCenter","mousePos","minR","dragPrePos","newD","minD","cachedMagnifiedModels","cachedOriginPositions","showLabel","molecularParam","mCenter","delegateCenterDiff","dist2","magnifiedDist","shapes","shapeLength","cacheLength","ori","textLength","trigger","scaleDBy","scaleRBy","nd","dPercentText","textY","Fisheye$2","getEventPath","ToolBar","toolBar","toolBarDOM","undoDom","undoDomIcon","redoDom","redoDomIcon","undoStack","redoStack","undoStackLen","redoStackLen","currentData","data_1","afterCombos","createdCombo","targetCombo_1","data_2","beforeCombos","targertCombo","ratioOut","ratioIn","ToolBar$1","Tooltip","tooltip","fixToNode","Tooltip$2","TIMELINE_START","TIMELINE_END","VALUE_CHANGE","TIMEBAR_CONFIG_CHANGE","PLAY_PAUSE_BTN","NEXT_STEP_BTN","PRE_STEP_BTN","TimeBarTooltip","background","arrowWidth","arrowHeight","TimeBarTooltip$1","Button","buttonGroup","sideLength","Button$1","DEFAULT_RECT_FILL","DEFAULT_RECT_STROKE","DEFAULT_PLAYBTN_STYLE","DEFAULT_PREBTN_STYLE","DEFAULT_NEXTBTN_STYLE","DEFAULT_SPEED_CONTROLLER_STYLE","DEFAULT_TIMETYPE_CONTROLLER_STYLE","DEFAULT_CONTROLLER_CONFIG","SPEED_CONTROLLER_OFFSET","TOGGLE_MODEL_OFFSET","TIME_TYPE","ControllerBtn","controllerCfg","hideTimeTypeController","containerStyle","playBtnStyle","preBtnStyle","nextBtnStyle","realY","prePaddingX","prePaddingY","preR","nxtPaddingX","nxtPaddingY","nxtR","currentBBox","speedControllerStyle","scroller","pointer","speedGroup","axisY","defaultTimeType","timeTypeControllerStyle","_j","isChecked","currentPointerY","pointerMatrix","currentYIdx","targetYIdx","yDiff","minDist_1","ControllerBtn$1","DEFAULT_SELECTEDTICK_STYLE","DEFAULT_UNSELECTEDTICK_STYLE","TimeBarSlice","tickLabelFormatter","selectedTickStyle","unselectedTickStyle","tooltipBackgroundColor","tooltipFomatter","tickLabelStyle","realWidth","labelLineHeight","labelAreaHeight","ticksAreaHeight","ticksLength","tickWidth","sliceGroup","tickRects","startTickId","endTickId","tickStyle","pickRect","rectBBox","lineStartY","labelStartY","textBBox","targetRect","tickRects_1","unselectedTickStyle_1","tickRect","startTickRectId","isSync","previousEndTickRectId","TimeBarSlice$1","methodCache","getTickMethod","registerTickMethod","Scale","assign","formatter","tickMethod","ticks","Category","scaledValue","domainRange","twoDigitsOptional","twoDigits","threeDigits","fourDigits","word","literal","shorten","sLen","monthUpdate","arrName","i18n","lowerCaseArr","origObj","args_1","dayNames","monthNames","monthNamesShort","dayNamesShort","defaultI18n","dayOfMonth","globalI18n","setGlobalDateI18n","regexEscape","pad","formatFlags","dateObj","monthParse","emptyDigits","emptyWord","amPm","timezoneOffset","minutes","cent","globalMasks","setGlobalDateMasks","masks","literals","$0","$1","combinedI18nSettings","parse","dateStr","today","dateInfo","parseInfo","newFormat","specifiedFields","requiredFields","field","requiredField","parser","dateTZ","validateFields","fecha","bisector","_lo","_hi","FORMAT_METHOD","timeFormat","fecha1","toTimeStamp","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","intervals","getTickInterval","tickCount","TimeCat","tickIndex","Continuous","rangeMin","firstTick","lastTick","Linear","calBase","log","getLogPositiveMin","positiveMin","Log","appendPercent","Pow","Time","numberValue","minConfig","maxConfig","timeStamps_1","secondMin_1","timeStamp","Quantize","minIndex","minTick","minIndexPercent","maxIndexPercent","Quantile","getClass","registerClass","cls","Identity","calculateCatTicks","tickInterval","showLast","ticks_1","lastValue","d3Linear","nice","D3Linear","DEFAULT_COUNT","e10","e5","e2","domain","i0","i1","stop","tickIncrement","d3ArrayTicks","reverse","power","snapMultiple","snapType","intervalTicks","maxTick","availableInterval","tickValue","strictLimit","defaultMin","defaultMax","minLimit","maxLimit","tickMin","tickMax","d3LinearTickMethod","prettyNumber","DEFAULT_Q","simplicity","lmax","lstep","simplicityMax","density","dMin","dMax","lMin","lMax","densityMax","coverage","coverageMax","span","half","legibility","extended","onlyLoose","step_1","dm","cm","minStart","maxStart","i_1","lStep","calculateLogTicks","avg","pretty","h5","calculatePowTicks","quantileSorted","calculateTicks","linearPretty","calculateTimeTicks","minTickInterval","timeCat","catTicks","getYear","createYear","year","getMonth","diffMonth","minYear","maxYear","minMonth","maxMonth","creatMonth","month","diffDay","diffHour","diffMinus","timePretty","yearInterval","monthInterval","mmMoth","dMonths","mday","day","ddays","hour","hours","dHours","dMinus","minSecond","dSeconds","seconds","cat","rPretty","quantile","registerScale","pointsToPath","getLinePath","getSmoothLinePath","pathUtil.catmullRom2Bezier","dataToPath","dataToRectPath","barWidth","rectPoints","rectPoint","getRectPoints","getRectPath","getAreaLineY","lineY","linePathToAreaPath","areaPath","lineYPx","isClosed","LINE_STYLE","AREA_STYLE","Trend","isArea","lineStyle","areaStyle","trendGroup","Trend$1","DEFAULT_STYLE","SIMPLE_DEFAULT_STYLE","Handler","highLightFill","Handler$1","BACKGROUND_STYLE","SIMPLE_BACKGROUND_STYLE","FOREGROUND_STYLE","DEFAULT_HANDLER_WIDTH","HANDLER_STYLE","TEXT_STYLE","TICK_LABEL_STYLE","TICK_LINE_STYLE","TrendTimeBar","offsetXRange","trendCfg","foregroundStyle","handlerStyle","textStyle","_k","_l","_m","minText","maxText","_p","timeBarType","trendComponent","sliderGroup","textGroup","handlerWidth","handlerHeight","minHandleGroup","maxHandleGroup","tickData","lastX","textX","minHandleShapeGroup","maxHandleShapeGroup","timeSelectX","offsetRange","minData","maxData","minAttrs","maxAttrs","TEXTPADDING","minTextShape","maxTextShape","minBBox","maxBBox","TrendTimeBar$1","DEFAULT_SIMPLE_HEIGHT","DEFAULT_TREND_HEIGHT","TimeBar","putInGraphContainer","timeBarContainer","timeBarGroup","play","timebar","trend","slider","defaultHeight","getValue_1","handleMouseUp","timebarInstance","type_1","trendData","rangeChange","filterItemTypes","changeData","getDate_1","shouldIgnore_1","minDate_1","maxDate_1","originNodes","originEdges","currentNodeExistMap_1","currentEdgeExistMap_1","hitRange","shouldShow","endsExist","sourceVisible","targetVisible","TimeBar$2","getImgNaturalDimension","nWidth","nHeight","ImageMiniMap","cWidth","cHeight","aspectRatio","graphCanvasBBox","graphCanvasBBoxMean","graphCanvasBBoxSize","expandedGraphCanvasBBox","graphMatrix","invertGraphMatrix","minXY","vpToMc","imgDOM","naturalSize","oriImgDOM","ImageMinimap$1","EdgeFilterLens","showNodeLabel","showEdgeLabel","hitNodesMap","fCenter","vShapes","hitEdges","vShape","EdgeFilterLens$2","alignLineStyle","SnapLine","delegateShape","horizontalLines","verticalLines","itemAlignType","originPoint","lc","horizontalDis","verticalDis","alignCfg","horizontals","verticals","alignLines","horizontal","refLine","refPoint","lineCenterX","lineAttrs","lineCenterY","lineAtts","SnapLine$2","ALLOW_EVENTS","Legend","multiple","margin","posIdxMap","containerCSS","marginValue","shapeGroup","subGroup","legendInactive","legendTextInactive","legendActive","legendTextActive","itemGroup","filterFunctions","activeState","inactiveState","activeNodeLegend","activeEdgeLegend","activeCount","typeFuncs","typeFunc","graphItem","active","activeLegend","itemsData","keyShapeBBox","attrs_1","titleShape","titleGroup","titleGroupBBox","defaultTitleStyle","titleConfig","lcBBox","nodeGroupBBox","nodeGroupBeginX","nodeGroupBeginY","nodeGroupMatrix","titleGroupMatrix","edgeGroupMatrix_1","edgeGroupMatrix_2","edgeGroupMatrix","edgeGroupBBox","beginPos","backRect","horiSep","vertiSep","nodeLegendSize","cNodeGroup","keyShapeWidth","keyShapeHeight","nw","edgeLegendSize","ew","widthDiff","movement_1","shouldAdjustGroup","Legend$1","CANVAS_ANNOTATION_ID","Annotation","title","content","collapseExpandDOM","contentDOM","closeDOM","graphCantainer","containerCfg","graphContainerBBox","linkCanvas","linkGroup","defaultData","gLeft","gRight","gTop","gBottom","graphContainerHeight","graphContainerWidth","otherStyle","containerPosition","cBBox","newWidth","newHeight","selfObj","cardInfoMap","graphLeftTopCanvas","graphRightBottomCanvas","graphRight","graphBottom","cardInfo","card","px2Num","newLeft","newTop","minHeight","minWidth","propsX","propsY","propsTitle","propsContent","maxTitleLength","defaultBegin","otherCardCfg","getTitle","getContentPlaceholder","getTitlePlaceHolder","contentPlaceholder","titlePlaceholder","newCard","minHeightPx","containerBBox","containerTop","beginLeft","propsBeginRight","propsBeginTop","beginBottom","beginRight","beginTop","cardWidth","currentRow","lastCardBBox","cardBBox","getPathItem2Card","linkStyle","hasPropsPosition","containerBottom","onAnnotationChange","containerWidth","computeStyle","sidePadding","collapseType","iconType","onMouseEnterIcon","onMouseLeaveIcon","itemHighlightState","linkHighlightStyle","onClickIcon","closeType","editable","targetClass","inputTag","inputWrapper","blurEvt","unmovableClasses","draggingCard","cardHeight","top_1","rowItems","sideMargin","titleWidth","saveClosed","Annotation$2","getPath","startPoints","endPoints","skey","spos","ekey","epos","xdist","ydist","controlPoint","annotationCanvas","itemLinkPoints","clientPos","cardTop","cardLeft","cardRight","cardBottom","cardLinkPoints","Plugin","ImageMinimap","defaultIcon","iconName","markR","markStyle","defaultDirection","iconW","iconH","topPos","bottomPos","existLinkPoint","preRect","preRectShow","preRectStyle","logoIcon","logoIconStyle","stateIcon","iconStyle","descriptionCfg","descriptionStyle","descriptionPaddingTop","logoIconShape","currentLogoIconAttr","description","preRectShape","logoW","logoOffset","stateIconShape","currentStateIconAttr","stateW","stateOffset","stateIconStyle","leftBottom","defaultInnerR","markLeftBottom","markRightBottom","FAN_NAME_PREFIX","drawFans","updateFans","donutAttrs","donutColorMap","attrNum","getDonutConfig","configs","totalValue","getDonutSize","arcR","arcBegin","beginAngle","drawFan","fanConfig","fanIndex","drawWhole","updateShape","arcEnd","isBig","visitMap","fanKeys","keyShapeR","getBBoxFromPoint","getBBoxFromPoints","filterConnectPoints","pointsLength","simplifyPolyline","getExpandedBBox","isHorizontalPort","port","getExpandedBBoxPoint","anotherPoint","getPointsFromBBox","isPointOutsideBBox","getBBoxXCrossPoints","getBBoxYCrossPoints","getBBoxCrossPointsByPoint","_costByPoints","heuristicCostEstimate","reconstructPath","pathPoints","pointById","cameFrom","currentId","iterator","isSegmentsIntersected","v2x","v2y","v3x","v3y","v4x","v4y","pd1","pd2","pd3","pd4","isSegmentCrossingBBox","pb","pd","getNeighborPoints","pathFinder","goal","sBBox","tBBox","closedSet","openSet","gScore","fScore","sortedOpenSet","SortedArray","minId","neighborPoints","iterateNeighbors","tentativeGScore","isBending","getBorderRadiusPoints","getPathWithBorderRadiusByPolyline","pathSegments","getPolylinePoints","sNode","tNode","sKeyShapeBBox","tKeyShapeBBox","sxBBox","txBBox","sPoint","tPoint","lineBBox","sMixBBox","tMixBBox","connectPoints","centerPoint","removeRedundantPoint","beginPoint","continueSameX","continueSameY","removeIdx","idxRange","midIdx","manhattanDist","simplePolyline","endNode","getObstacleMap","getDirectionAngle","deltaX","deltaY","getAngleDiff","angle1","angle2","directionChange","estimateCost","distFunc","cost","getBoxPoints","oriPoint","isInside","expandBBox","directions_1","boundLine","insterctP_1","insterctP","getDirectionChange","scaleStartPoint","directionAngle","currentCameFrom","prevDirectionAngle","scaleEndPoint","pointZero","currentX","currentY","routerCfg","penalties","firstStep","remainLoops","neighborCost","costFromStart","curCost","endPointMap","directionPenalties","neighborGScore","defaultRouteCfg","obstacles","simple","pathArray_1","polylinePoints","res_1","DRAG_OFFSET","DragCanvas","origin","expandWidth","expandHeight","touches","event1","event2","nodeLen","isKeyShape","self_1","zoomCanvas","optimizeZoom","oriVis","children_2","targetIsCanvas","DragNode","isAnchorPoint","currentNodeId","dragNodes","locked","beforeDragNodes_1","parentComboMap_1","parentComboId","stackData_1","targetComboModel_1","nodeModel","newParentCombo","restore","updateEdge","onlyChangeComboSize","updateParentCombos","paramGraph","paramTargets","comboParentMap","clickNodeId","ActivateRelations","shouldClearStatusOnSecond","vEdges","vEdgeLength","inactiveItems","activeItems","hasSelected","vEdge","vEdgeId","rEdges","rEdgeLegnth","DEFAULT_TRIGGER","BrushSelect","brush","selectOnCombo","isCombo","selectedState","shouldUpdate","isBBoxCenterInRect","selectedNodes","selectedIds","selectedCombos","triggerLowerCase","codeLowerCase","ClickSelect","keydown","selectedItem","itemSelectable","ZoomCanvas","fixSelectedItems","sensitivity","optimizeZoom_1","optimized","nodesLength_1","edgesLength_1","childrenLength","edgeIndex","curOptimized","fixNodes","fixEdges","fixNodesLength","originStyle","groupMatrix","itemStyle","itemFontSize","shapeFontSize","oriFontSize","oriLineWidth","fixEdgesLength","EdgeTooltip","CollapseExpand","sourceData","traverseCombo","DragCombo","currentCombo","dragCombos","beforeDragItems","model_1","sourceBBox","centerX_1","centerY_1","width_1","calcCombos","cmodel","droppedCombo","comboDropedOn","stack_1","edgesToBeUpdate","paramItem","paramEdgesMap","CollapseExpandCombo","relayout","isItemIntersecPolygon","LassoSelect","lasso","shouldDeselect","lassoContour","DEFAULT_KEY","ALLOW_KEYS","CreateEdge","getEdgeConfig","edgeConfig","currentEdge","DEFAULT_COMBINED_KEY","ShortcutsCall","combinedKeyLowerCase","ScrollCanvas","zoomKeys","keyDown","Algorithm","AlgorithmSync","AlgorithmAsync","G6","visibleNodes","trackId","topNode","tempNode","subNodes","selfIndex","broIndex","graphNodes","getLimitLabel","rawGroup","insert","connectKeys","edgeCountMap","tempId","useRoute","useTitle","snapshotId","showSize","screenshotUrl","snapshot","localSnapshot","snapshotStorage","gmOk","exportSnapshotAsJpgUrl","exportSnapshotAsZipUrl","bf","screenshotStorage","rootNode","listToTree","onDelete","track","trackVisible"],"mappings":"myEAAO,SAASA,GAAcC,EAAK,CACjC,OAAO,OAAOA,GAAQ,SAAW,KAAKA,CAAG,GAAK,KAAKA,CAAG,EACxD,CCFe,SAASC,GAAkBC,EAAKC,EAAK,EAC9CA,GAAO,MAAQA,EAAMD,EAAI,UAAQC,EAAMD,EAAI,QAC/C,QAASE,EAAI,EAAGC,EAAO,IAAI,MAAMF,CAAG,EAAGC,EAAID,EAAKC,IAAKC,EAAKD,CAAC,EAAIF,EAAIE,CAAC,EACpE,OAAOC,CACT,CCHe,SAASC,GAA4BC,EAAGC,EAAQ,CAC7D,GAAKD,EACL,IAAI,OAAOA,GAAM,SAAU,OAAOE,GAAiBF,EAAGC,CAAM,EAC5D,IAAIE,EAAI,OAAO,UAAU,SAAS,KAAKH,CAAC,EAAE,MAAM,EAAG,EAAE,EAErD,GADIG,IAAM,UAAYH,EAAE,cAAaG,EAAIH,EAAE,YAAY,MACnDG,IAAM,OAASA,IAAM,MAAO,OAAO,MAAM,KAAKH,CAAC,EACnD,GAAIG,IAAM,aAAe,2CAA2C,KAAKA,CAAC,EAAG,OAAOD,GAAiBF,EAAGC,CAAM,EAChH,CCRe,SAASG,GAAgBC,EAAUC,EAAa,CAC7D,GAAI,EAAED,aAAoBC,GACxB,MAAM,IAAI,UAAU,mCAAmC,CAE3D,CCHe,SAASC,GAAaC,EAAOC,EAAM,CAChD,GAAIC,GAAQF,CAAK,IAAM,UAAYA,IAAU,KAAM,OAAOA,EAC1D,IAAIG,EAAOH,EAAM,OAAO,WAAW,EACnC,GAAIG,IAA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,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885]} \ No newline at end of file +{"version":3,"file":"SnapshotPage-owac59Kk.js","sources":["../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/create-data-key.mjs","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/ChevronLeft.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Switcher.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button-group/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button-group/src/ButtonGroup.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/Collapse.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/CollapseItemContent.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/collapse/src/CollapseItem.mjs","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/styles/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Table.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Th.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Tr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Td.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Thead.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/table/src/Tbody.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree-select/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeSwitcher.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeCheckbox.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNodeContent.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/dnd.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/utils.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/TreeNode.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/keyboard.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/MotionWrapper.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/tree/src/Tree.mjs","../../src/components/DraggableCard.vue","../../src/components/AttrCard.vue","../../src/components/ScreenshotCard.vue","../../src/components/SearchCard.vue","../../src/components/WindowCard.vue","../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-array-like.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/contains.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/filter.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/difference.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-type.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-function.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-nil.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-array.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-object.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/each.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/keys.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-match.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-object-like.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-plain-object.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/find.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/find-index.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/first-value.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/flatten.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/flatten-deep.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/max.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/min.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-range.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pull.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pull-at.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/reduce.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/remove.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-string.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/sort-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/uniq.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/union.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/values-of-key.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/head.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/last.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/starts-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/ends-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/every.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/some.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group-to-map.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/group.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-wrap-behavior.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/wrap-behavior.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/number2color.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/parse-radius.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clamp.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/fixed-base.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-number.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-decimal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-even.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-integer.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-negative.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-number-equal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-odd.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-positive.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/max-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/min-by.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/mod.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-degree.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-integer.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-radian.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/has.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/values.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/has-value.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-string.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/lower-case.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/lower-first.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/substitute.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/upper-case.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/upper-first.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-type.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-arguments.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-boolean.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-date.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-error.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-finite.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-null.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-prototype.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-reg-exp.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-undefined.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-element.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/request-animation-frame.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clear-animation-frame.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/mix.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/augment.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/clone.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/debounce.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/memoize.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/deep-mix.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/extend.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/index-of.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-empty.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-equal.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/is-equal-with.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/map.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/map-values.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/set.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/pick.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/omit.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/throttle.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/to-array.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/unique-id.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/noop.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/identity.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/size.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/measure-text-width.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/get-ellipsis-text.js","../../node_modules/.pnpm/@antv+util@2.0.17/node_modules/@antv/util/esm/cache.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/behavior/behaviorOption.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/behavior/behavior.js","../../node_modules/.pnpm/@antv+event-emitter@0.1.3/node_modules/@antv/event-emitter/esm/index.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/common.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat2.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat2d.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat3.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/mat4.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec3.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec4.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/quat.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/quat2.js","../../node_modules/.pnpm/gl-matrix@3.4.3/node_modules/gl-matrix/esm/vec2.js","../../node_modules/.pnpm/@antv+matrix-util@3.1.0-beta.3/node_modules/@antv/matrix-util/esm/ext.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/adjacent-matrix.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/linked-list.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/queue.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/util.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/bfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/connected-component.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/degree.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/dfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/detect-cycle.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/dijkstra.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/find-path.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/floydWarshall.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/label-propagation.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/vector.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/node-properties.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/types.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/utils/data-preprocessing.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/i-louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/k-core.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/k-means.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/cosine-similarity.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/nodes-cosine-similarity.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/union-find.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/binary-heap.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/mts.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/pageRank.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gSpan/struct.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gSpan/gSpan.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/gaddi.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/structs/stack.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/es/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/math.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/global.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/letterAspectRatio.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/graphic.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/validation.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/mode.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/path.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/event/graph-event.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/util.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/base.js","../../node_modules/.pnpm/detect-browser@5.3.0/node_modules/detect-browser/es/index.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/matrix.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/element.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/container.js","../../node_modules/.pnpm/d3-timer@1.0.10/node_modules/d3-timer/src/timer.js","../../node_modules/.pnpm/d3-color@1.4.1/node_modules/d3-color/src/define.js","../../node_modules/.pnpm/d3-color@1.4.1/node_modules/d3-color/src/color.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js","../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/linear.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/quad.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/cubic.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/poly.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/sin.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/math.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/exp.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/circle.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/bounce.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/back.js","../../node_modules/.pnpm/d3-ease@1.0.7/node_modules/d3-ease/src/elastic.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/animate/register.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/color.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/animate/timeline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/event/event-contoller.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/canvas.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/group.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/abstract/shape.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/register.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/rect.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/circle.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/util.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/line.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/bezier.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/quadratic.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/cubic.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/ellipse.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/arc.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/segments.js","../../node_modules/.pnpm/@antv+g-math@0.1.9/node_modules/@antv/g-math/esm/polyline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/util.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/polyline.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/polygon.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/offscreen.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/util/text.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/text.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/parse-path.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/catmull-rom-2-bezier.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/parse-path-string.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/path-2-absolute.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/get-arc-params.js","../../node_modules/.pnpm/@antv+path-util@2.0.15/node_modules/@antv/path-util/esm/path-2-segments.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/path.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/line.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/ellipse.js","../../node_modules/.pnpm/@antv+g-base@0.5.15/node_modules/@antv/g-base/esm/bbox/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/interface/behavior.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/base.js","../../node_modules/.pnpm/@antv+matrix-util@3.1.0-beta.3/node_modules/@antv/matrix-util/lib/ext.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/view.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/xml.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/shape.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/item.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/edge.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/node.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/combo.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/item.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/state.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/path.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/hull/convexHull.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/hull/bubbleset.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/item/hull.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/graph.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/shapeBase.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/node.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/edge.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combo.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combos/circle.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/combos/rect.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/simple-circle.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/simple-rect.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/nodes/image.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/arrow.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/element/marker.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/color.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/layout.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/util/index.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/layout.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/graph/controller/event.js","../../node_modules/.pnpm/@antv+g6-core@0.8.24/node_modules/@antv/g6-core/es/index.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/constant.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/adjacent-matrix.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/linked-list.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/queue.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/util.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/bfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/connected-component.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/degree.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/dfs.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/detect-cycle.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/dijkstra.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/find-path.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/floydWarshall.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/label-propagation.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/vector.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/constants/time.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/node-properties.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/types.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/utils/data-preprocessing.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/louvain.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/union-find.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/structs/binary-heap.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/mts.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/pageRank.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gSpan/struct.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gSpan/gSpan.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/gaddi.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/algorithm.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/index.worker.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/createWorker.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/workers/index.js","../../node_modules/.pnpm/@antv+algorithm@0.1.26/node_modules/@antv/algorithm/lib/asyncIndex.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/util.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/parse.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/arc-params.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/arrow.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/draw.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/group.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/base.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/circle.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/ellipse.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/image.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/line.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/line.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/marker.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-path/point-in-path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-path/polygon.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/arc.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/path.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/polyline.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/polygon.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/polyline.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/rect.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/in-stroke/rect-radius.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/rect.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/shape/text.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/util/hit.js","../../node_modules/.pnpm/@antv+g-canvas@0.5.14/node_modules/@antv/g-canvas/esm/canvas.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/constant.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/dom.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/svg.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/draw.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/group.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/base.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/circle.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/dom.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/ellipse.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/image.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/line.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/marker/symbols.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/marker/index.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/path.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/polygon.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/polyline.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/util/format.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/rect.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/shape/text.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/gradient.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/shadow.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/arrow.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/clip.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/pattern.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/defs/index.js","../../node_modules/.pnpm/@antv+g-svg@0.5.7/node_modules/@antv/g-svg/esm/canvas.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/add-event-listener.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/create-dom.js","../../node_modules/.pnpm/@antv+dom-util@2.0.4/node_modules/@antv/dom-util/esm/modify-css.js","../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js","../../node_modules/.pnpm/is-arrayish@0.3.2/node_modules/is-arrayish/index.js","../../node_modules/.pnpm/simple-swizzle@0.2.2/node_modules/simple-swizzle/index.js","../../node_modules/.pnpm/color-string@1.9.1/node_modules/color-string/index.js","../../node_modules/.pnpm/color-name@1.1.3/node_modules/color-name/index.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/conversions.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/route.js","../../node_modules/.pnpm/color-convert@1.9.3/node_modules/color-convert/index.js","../../node_modules/.pnpm/color@3.2.1/node_modules/color/index.js","../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js","../../node_modules/.pnpm/@ant-design+colors@4.0.5/node_modules/@ant-design/colors/dist/index.esm.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/color.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/global.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/image.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/controller/event.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/base.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/string.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/array.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/number.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/object.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/math.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/function.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/registy/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/grid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/random.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gForce.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/add.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/cover.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/data.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/extent.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/quad.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/find.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/remove.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/root.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/size.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/visit.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/visitAfter.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/x.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/y.js","../../node_modules/.pnpm/d3-quadtree@2.0.0/node_modules/d3-quadtree/src/quadtree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force2/ForceNBody.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force2/index.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/center.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/constant.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/jiggle.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/collide.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/link.js","../../node_modules/.pnpm/d3-dispatch@2.0.0/node_modules/d3-dispatch/src/dispatch.js","../../node_modules/.pnpm/d3-timer@2.0.0/node_modules/d3-timer/src/timer.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/lcg.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/simulation.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/manyBody.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/radial.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/x.js","../../node_modules/.pnpm/d3-force@2.1.1/node_modules/d3-force/src/y.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/force-in-a-box.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/constants.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/force.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/force/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/circular.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/data/list.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/enum.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/util.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/toJSON.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/Graph/event.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/PriorityQueue/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/prim.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/components.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dfs.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dijkstra.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/dijkstra-all.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/tarjan.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/find-cycles.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/topsort.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/is-acyclic.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/postorder.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/preorder.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/algorithm/floyd-warshall.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/comparision/contain.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/essence/index.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/comparision/complement.js","../../node_modules/.pnpm/@antv+graphlib@1.2.0/node_modules/@antv/graphlib/es/generate/compelement.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/greedy-fas.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/acyclic.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/util.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/normalize.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/util.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/feasible-tree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/network-simplex.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/rank/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/parent-dummy-chains.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/nesting-graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/add-border-segments.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/coordinate-system.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/rgb2arr.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/arr2rgb.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-array-like.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/contains.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/filter.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/difference.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-function.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-nil.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-type.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-object.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/each.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/keys.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-match.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-object-like.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-plain-object.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/find.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/find-index.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/first-value.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/flatten.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/flatten-deep.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/max.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/min.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-range.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pull.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pull-at.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/reduce.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/remove.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/sort-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/uniq.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/union.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/values-of-key.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/head.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/last.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/starts-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/ends-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/every.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/some.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group-to-map.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/group.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-wrap-behavior.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/wrap-behavior.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/number2color.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/parse-radius.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clamp.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/fixed-base.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-number.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-decimal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-even.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-integer.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-negative.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-number-equal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-odd.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-positive.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/max-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/min-by.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/mod.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-degree.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-integer.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-radian.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/has.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/values.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/has-value.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/lower-case.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/lower-first.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/substitute.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/upper-case.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/upper-first.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get-type.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-arguments.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-boolean.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-date.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-error.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-finite.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-null.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-prototype.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-reg-exp.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-undefined.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-element.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/request-animation-frame.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clear-animation-frame.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/mix.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/augment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/clone.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/debounce.js","../../node_modules/.pnpm/flru@1.0.2/node_modules/flru/dist/flru.mjs","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/memoize.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/deep-mix.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/extend.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/index-of.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-empty.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-equal.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/is-equal-with.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/map.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/map-values.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/get.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/set.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/pick.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/omit.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/throttle.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/to-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/unique-id.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/noop.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/identity.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/size.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/lodash/cache.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/torgb.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/gradient.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/color/tocssgradient.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/transform.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/direction.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/angle-to.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/matrix/vertical.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/round-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/params-parser.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/fix-arc.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/params-count.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-path-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-absolute-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-normalized-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/finalize-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-flag.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-digit-start.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-param.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-space.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/skip-spaces.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-path-command.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/is-arc-command.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/scan-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/path-parser.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/parser/parse-path-string.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-absolute.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/normalize-segment.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/normalize-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-curve-array.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/rotate-vector.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/arc-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/quad-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/mid-point.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/line-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/segment-2-cubic.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/convert/path-2-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/clone-path.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/process/reverse-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/distance-square-root.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-line-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-arc-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-cubic-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/segment-quad-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/path-length-factory.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-bbox.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-total-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-bbox-total-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-rotated-curve.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-path-area.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-draw-direction.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-point-at-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-properties-at-length.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/get-properties-at-point.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/is-point-in-stroke.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/path/util/equalize-segments.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/math/is-point-in-polygon.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/math/is-polygons-intersect.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/dom/create-dom.js","../../node_modules/.pnpm/@antv+util@3.3.5/node_modules/@antv/util/esm/dom/modify-css.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/init-order.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/cross-count.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/build-layer-graph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/add-subgraph-constraints.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/barycenter.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/resolve-conflicts.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/sort.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/sort-subgraph.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/position/bk.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/position/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/order/init-data-order.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/src/layout.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagre.js","../../node_modules/.pnpm/dagre-compound@0.0.11_dagre@0.8.5/node_modules/dagre-compound/dist/dagre-compound.es5.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/dagreCompound.js","../../node_modules/.pnpm/is-any-array@2.0.1/node_modules/is-any-array/lib-esm/index.js","../../node_modules/.pnpm/ml-array-max@1.2.4/node_modules/ml-array-max/lib-es6/index.js","../../node_modules/.pnpm/ml-array-min@1.2.3/node_modules/ml-array-min/lib-es6/index.js","../../node_modules/.pnpm/ml-array-rescale@1.3.7/node_modules/ml-array-rescale/lib-es6/index.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/inspect.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/mathOperations.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/util.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/stat.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/matrix.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/base.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/column.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/columnSelection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/flipColumn.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/flipRow.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/row.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/rowSelection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/selection.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/sub.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/views/transpose.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/WrapperMatrix1D.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/WrapperMatrix2D.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/wrap/wrap.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/lu.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/util.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/qr.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/svd.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/decompositions.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/determinant.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/linearDependencies.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/pseudoInverse.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/covariance.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/correlation.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/evd.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/cholesky.js","../../node_modules/.pnpm/ml-matrix@6.5.0/node_modules/ml-matrix/src/dc/nipals.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/mds.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/radialNonoverlapForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/radial.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/radial/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/concentric.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/mds.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/fruchterman.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/regenerator/index.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/Entity.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/components/renderer/gl.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/services/config/ConfigService.js","../../node_modules/.pnpm/@antv+g-webgpu-core@0.7.2/node_modules/@antv/g-webgpu-core/es/index.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/utils/canvas.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/Kernel.js","../../node_modules/.pnpm/regl@1.7.0/node_modules/regl/dist/regl.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglAttribute.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/constants.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglBuffer.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglComputeModel.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglElements.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglFramebuffer.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/utils/uniform.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglModel.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/ReglTexture2D.js","../../node_modules/.pnpm/@antv+g-webgpu-engine@0.7.2/node_modules/@antv/g-webgpu-engine/es/webgl/index.js","../../node_modules/.pnpm/@antv+g-webgpu@0.7.2/node_modules/@antv/g-webgpu/es/World.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/util/gpu.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/fruchtermanShader.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/fruchterman.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/gForceShader.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/gpu/gForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/comboForce.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/comboCombined.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/body.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/quad.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/quadTree.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/forceAtlas2/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/grid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/forceGrid.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/mysqlWorkbench.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/core.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/er/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/layout.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/types.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/layout/index.js","../../node_modules/.pnpm/@antv+layout@0.3.25_dagre@0.8.5/node_modules/@antv/layout/lib/index.js","../../node_modules/.pnpm/@antv+hierarchy@0.6.11/node_modules/@antv/hierarchy/build/hierarchy.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/gpu.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/browser.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/tree-layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/work.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/layout/worker/layoutConst.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/controller/layout.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/graph.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/util/deepClone.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/graph/tree-graph.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/base.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/grid/index.js","../../node_modules/.pnpm/insert-css@2.0.0/node_modules/insert-css/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/menu/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/minimap/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/bundling/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/fisheye/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/toolBar/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/tooltip/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/constant.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeBarTooltip.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeButton.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/controllerBtn.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/timeBarSlice.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/register.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/base.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/category/base.js","../../node_modules/.pnpm/fecha@4.2.3/node_modules/fecha/lib/fecha.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/bisector.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/category/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/base.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/math.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/log.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/pow.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/quantize.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/continuous/quantile.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/factory.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/identity/index.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/cat.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/d3-linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/interval.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/strict-limit.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/d3-linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/pretty-number.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/extended.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/linear.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/log.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/util/pretty.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/pow.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/quantile.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/r-prettry.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time-cat.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/time-pretty.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/tick-method/index.js","../../node_modules/.pnpm/@antv+scale@0.3.18/node_modules/@antv/scale/esm/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/path.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/trend.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/handler.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/trendTimeBar.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/timeBar/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/imageMinimap/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/edgeFilterLens/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/snapline/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/legend/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/annotation/index.js","../../node_modules/.pnpm/@antv+g6-plugin@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-plugin/es/index.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/circle.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/rect.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/ellipse.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/diamond.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/triangle.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/modelRect.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/star.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/nodes/donut.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/polyline-util.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/router.js","../../node_modules/.pnpm/@antv+g6-element@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-element/es/edges/polyline.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-node.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/activate-relations.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/brush-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/click-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/zoom-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/tooltip-base.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/tooltip.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/edge-tooltip.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/collapse-expand.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/drag-combo.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/collapse-expand-combo.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/lasso-select.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/create-edge.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/shortcuts-call.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/scroll-canvas.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/behavior/index.js","../../node_modules/.pnpm/@antv+g6-pc@0.8.24_@antv+g6@4.8.24/node_modules/@antv/g6-pc/es/index.js","../../node_modules/.pnpm/@antv+g6@4.8.24/node_modules/@antv/g6/es/index.js","../../src/utils/g6.ts","../../src/components/TrackGraph.vue","../../src/views/SnapshotPage.vue"],"sourcesContent":["export function createDataKey(key) {\n return typeof key === 'string' ? `s-${key}` : `n-${key}`;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import { h, defineComponent } from 'vue';\nexport default defineComponent({\n name: 'ChevronLeft',\n render() {\n return h(\"svg\", {\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, h(\"path\", {\n d: \"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z\",\n fill: \"currentColor\"\n }));\n }\n});","import { h, defineComponent } from 'vue';\nexport default defineComponent({\n name: 'Switcher',\n render() {\n return h(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 32 32\"\n }, h(\"path\", {\n d: \"M12 8l10 8l-10 8z\"\n }));\n }\n});","import { c, cB, cM, cE, cNotM } from \"../../../_utils/cssr/index.mjs\";\nexport const zero = '0!important';\nexport const n1 = '-1px!important';\nfunction createLeftBorderStyle(type) {\n return cM(type + '-type', [c('& +', [cB('button', {}, [cM(type + '-type', [cE('border', {\n borderLeftWidth: zero\n }), cE('state-border', {\n left: n1\n })])])])]);\n}\nfunction createTopBorderStyle(type) {\n return cM(type + '-type', [c('& +', [cB('button', [cM(type + '-type', [cE('border', {\n borderTopWidth: zero\n }), cE('state-border', {\n top: n1\n })])])])]);\n}\nexport default cB('button-group', `\n flex-wrap: nowrap;\n display: inline-flex;\n position: relative;\n`, [cNotM('vertical', {\n flexDirection: 'row'\n}, [cNotM('rtl', [cB('button', [c('&:first-child:not(:last-child)', `\n margin-right: ${zero};\n border-top-right-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-left: ${zero};\n border-top-left-radius: ${zero};\n border-bottom-left-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin-left: ${zero};\n margin-right: ${zero};\n border-radius: ${zero};\n `), createLeftBorderStyle('default'), cM('ghost', [createLeftBorderStyle('primary'), createLeftBorderStyle('info'), createLeftBorderStyle('success'), createLeftBorderStyle('warning'), createLeftBorderStyle('error')])])])]), cM('vertical', {\n flexDirection: 'column'\n}, [cB('button', [c('&:first-child:not(:last-child)', `\n margin-bottom: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-bottom-left-radius: ${zero};\n border-bottom-right-radius: ${zero};\n `), c('&:last-child:not(:first-child)', `\n margin-top: ${zero};\n margin-left: ${zero};\n margin-right: ${zero};\n border-top-left-radius: ${zero};\n border-top-right-radius: ${zero};\n `), c('&:not(:first-child):not(:last-child)', `\n margin: ${zero};\n border-radius: ${zero};\n `), createTopBorderStyle('default'), cM('ghost', [createTopBorderStyle('primary'), createTopBorderStyle('info'), createTopBorderStyle('success'), createTopBorderStyle('warning'), createTopBorderStyle('error')])])])]);","import { h, defineComponent, provide } from 'vue';\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { useConfig, useStyle } from \"../../_mixins/index.mjs\";\nimport { buttonGroupInjectionKey } from \"./context.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const buttonGroupProps = {\n size: {\n type: String,\n default: undefined\n },\n vertical: Boolean\n};\nexport default defineComponent({\n name: 'ButtonGroup',\n props: buttonGroupProps,\n setup(props) {\n const {\n mergedClsPrefixRef,\n mergedRtlRef\n } = useConfig(props);\n useStyle('-button-group', style, mergedClsPrefixRef);\n provide(buttonGroupInjectionKey, props);\n const rtlEnabledRef = useRtl('ButtonGroup', mergedRtlRef, mergedClsPrefixRef);\n return {\n rtlEnabled: rtlEnabledRef,\n mergedClsPrefix: mergedClsPrefixRef\n };\n },\n render() {\n const {\n mergedClsPrefix\n } = this;\n return h(\"div\", {\n class: [`${mergedClsPrefix}-button-group`, this.rtlEnabled && `${mergedClsPrefix}-button-group--rtl`, this.vertical && `${mergedClsPrefix}-button-group--vertical`],\n role: \"group\"\n }, this.$slots);\n }\n});","import { commonLight } from \"../../_styles/common/index.mjs\";\nexport const self = vars => {\n const {\n fontWeight,\n textColor1,\n textColor2,\n textColorDisabled,\n dividerColor,\n fontSize\n } = vars;\n return {\n titleFontSize: fontSize,\n titleFontWeight: fontWeight,\n dividerColor,\n titleTextColor: textColor1,\n titleTextColorDisabled: textColorDisabled,\n fontSize,\n textColor: textColor2,\n arrowColor: textColor2,\n arrowColorDisabled: textColorDisabled,\n itemMargin: '16px 0 0 0',\n titlePadding: '16px 0 0 0'\n };\n};\nconst collapseLight = {\n name: 'Collapse',\n common: commonLight,\n self\n};\nexport default collapseLight;","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nimport { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\n// vars:\n// --n-font-size\n// --n-bezier\n// --n-text-color\n// --n-divider-color\n// --n-title-padding\n// --n-title-font-size\n// --n-title-text-color\n// --n-title-font-weight\n// --n-arrow-color\n// --n-arrow-color-disabled\n// --n-title-text-color-disabled\n// --n-item-margin\nexport default cB('collapse', 'width: 100%;', [cB('collapse-item', `\n font-size: var(--n-font-size);\n color: var(--n-text-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n margin: var(--n-item-margin);\n `, [cM('disabled', [cE('header', 'cursor: not-allowed;', [cE('header-main', `\n color: var(--n-title-text-color-disabled);\n `), cB('collapse-item-arrow', `\n color: var(--n-arrow-color-disabled);\n `)])]), cB('collapse-item', 'margin-left: 32px;'), c('&:first-child', 'margin-top: 0;'), c('&:first-child >', [cE('header', 'padding-top: 0;')]), cM('left-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-right: 4px;')])]), cM('right-arrow-placement', [cE('header', [cB('collapse-item-arrow', 'margin-left: 4px;')])]), cE('content-wrapper', [cE('content-inner', 'padding-top: 16px;'), fadeInHeightExpandTransition({\n duration: '0.15s'\n})]), cM('active', [cE('header', [cM('active', [cB('collapse-item-arrow', 'transform: rotate(90deg);')])])]), c('&:not(:first-child)', 'border-top: 1px solid var(--n-divider-color);'), cNotM('disabled', [cM('trigger-area-main', [cE('header', [cE('header-main', 'cursor: pointer;'), cB('collapse-item-arrow', 'cursor: default;')])]), cM('trigger-area-arrow', [cE('header', [cB('collapse-item-arrow', 'cursor: pointer;')])]), cM('trigger-area-extra', [cE('header', [cE('header-extra', 'cursor: pointer;')])])]), cE('header', `\n font-size: var(--n-title-font-size);\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n transition: color .3s var(--n-bezier);\n position: relative;\n padding: var(--n-title-padding);\n color: var(--n-title-text-color);\n `, [cE('header-main', `\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n font-weight: var(--n-title-font-weight);\n transition: color .3s var(--n-bezier);\n flex: 1;\n color: var(--n-title-text-color);\n `), cE('header-extra', `\n display: flex;\n align-items: center;\n transition: color .3s var(--n-bezier);\n color: var(--n-text-color);\n `), cB('collapse-item-arrow', `\n display: flex;\n transition:\n transform .15s var(--n-bezier),\n color .3s var(--n-bezier);\n font-size: 18px;\n color: var(--n-arrow-color);\n `)])])]);","import { computed, h, defineComponent, provide, ref } from 'vue';\nimport { useMergedState } from 'vooks';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { call, createInjectionKey, warn } from \"../../_utils/index.mjs\";\nimport { collapseLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nexport const collapseProps = Object.assign(Object.assign({}, useTheme.props), {\n defaultExpandedNames: {\n type: [Array, String],\n default: null\n },\n expandedNames: [Array, String],\n arrowPlacement: {\n type: String,\n default: 'left'\n },\n accordion: {\n type: Boolean,\n default: false\n },\n displayDirective: {\n type: String,\n default: 'if'\n },\n triggerAreas: {\n type: Array,\n default: () => ['main', 'extra', 'arrow']\n },\n onItemHeaderClick: [Function, Array],\n 'onUpdate:expandedNames': [Function, Array],\n onUpdateExpandedNames: [Function, Array],\n // deprecated\n onExpandedNamesChange: {\n type: [Function, Array],\n validator: () => {\n if (process.env.NODE_ENV !== 'production') {\n warn('collapse', '`on-expanded-names-change` is deprecated, please use `on-update:expanded-names` instead.');\n }\n return true;\n },\n default: undefined\n }\n});\nexport const collapseInjectionKey = createInjectionKey('n-collapse');\nexport default defineComponent({\n name: 'Collapse',\n props: collapseProps,\n setup(props, {\n slots\n }) {\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const uncontrolledExpandedNamesRef = ref(props.defaultExpandedNames);\n const controlledExpandedNamesRef = computed(() => props.expandedNames);\n const mergedExpandedNamesRef = useMergedState(controlledExpandedNamesRef, uncontrolledExpandedNamesRef);\n const themeRef = useTheme('Collapse', '-collapse', style, collapseLight, props, mergedClsPrefixRef);\n function doUpdateExpandedNames(names) {\n const {\n 'onUpdate:expandedNames': _onUpdateExpandedNames,\n onUpdateExpandedNames,\n onExpandedNamesChange\n } = props;\n if (onUpdateExpandedNames) {\n call(onUpdateExpandedNames, names);\n }\n if (_onUpdateExpandedNames) {\n call(_onUpdateExpandedNames, names);\n }\n if (onExpandedNamesChange) {\n call(onExpandedNamesChange, names);\n }\n uncontrolledExpandedNamesRef.value = names;\n }\n function doItemHeaderClick(info) {\n const {\n onItemHeaderClick\n } = props;\n if (onItemHeaderClick) {\n call(onItemHeaderClick, info);\n }\n }\n function toggleItem(collapse, name, event) {\n const {\n accordion\n } = props;\n const {\n value: expandedNames\n } = mergedExpandedNamesRef;\n if (accordion) {\n if (collapse) {\n doUpdateExpandedNames([name]);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n } else {\n doUpdateExpandedNames([]);\n doItemHeaderClick({\n name,\n expanded: false,\n event\n });\n }\n } else {\n if (!Array.isArray(expandedNames)) {\n doUpdateExpandedNames([name]);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n } else {\n const activeNames = expandedNames.slice();\n const index = activeNames.findIndex(activeName => name === activeName);\n if (~index) {\n activeNames.splice(index, 1);\n doUpdateExpandedNames(activeNames);\n doItemHeaderClick({\n name,\n expanded: false,\n event\n });\n } else {\n activeNames.push(name);\n doUpdateExpandedNames(activeNames);\n doItemHeaderClick({\n name,\n expanded: true,\n event\n });\n }\n }\n }\n }\n provide(collapseInjectionKey, {\n props,\n mergedClsPrefixRef,\n expandedNamesRef: mergedExpandedNamesRef,\n slots,\n toggleItem\n });\n const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);\n const cssVarsRef = computed(() => {\n const {\n common: {\n cubicBezierEaseInOut\n },\n self: {\n titleFontWeight,\n dividerColor,\n titlePadding,\n titleTextColor,\n titleTextColorDisabled,\n textColor,\n arrowColor,\n fontSize,\n titleFontSize,\n arrowColorDisabled,\n itemMargin\n }\n } = themeRef.value;\n return {\n '--n-font-size': fontSize,\n '--n-bezier': cubicBezierEaseInOut,\n '--n-text-color': textColor,\n '--n-divider-color': dividerColor,\n '--n-title-padding': titlePadding,\n '--n-title-font-size': titleFontSize,\n '--n-title-text-color': titleTextColor,\n '--n-title-text-color-disabled': titleTextColorDisabled,\n '--n-title-font-weight': titleFontWeight,\n '--n-arrow-color': arrowColor,\n '--n-arrow-color-disabled': arrowColorDisabled,\n '--n-item-margin': itemMargin\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('collapse', undefined, cssVarsRef, props) : undefined;\n return {\n rtlEnabled: rtlEnabledRef,\n mergedTheme: themeRef,\n mergedClsPrefix: mergedClsPrefixRef,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n };\n },\n render() {\n var _a;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return h(\"div\", {\n class: [`${this.mergedClsPrefix}-collapse`, this.rtlEnabled && `${this.mergedClsPrefix}-collapse--rtl`, this.themeClass],\n style: this.cssVars\n }, this.$slots);\n }\n});","import { h, withDirectives, vShow, defineComponent, toRef } from 'vue';\nimport { useFalseUntilTruthy } from 'vooks';\nimport { NFadeInExpandTransition } from \"../../_internal/index.mjs\";\nexport default defineComponent({\n name: 'CollapseItemContent',\n props: {\n displayDirective: {\n type: String,\n required: true\n },\n show: Boolean,\n clsPrefix: {\n type: String,\n required: true\n }\n },\n setup(props) {\n const onceTrueRef = useFalseUntilTruthy(toRef(props, 'show'));\n return {\n onceTrue: onceTrueRef\n };\n },\n render() {\n return h(NFadeInExpandTransition, null, {\n default: () => {\n const {\n show,\n displayDirective,\n onceTrue,\n clsPrefix\n } = this;\n const useVShow = displayDirective === 'show' && onceTrue;\n const contentNode = h(\"div\", {\n class: `${clsPrefix}-collapse-item__content-wrapper`\n }, h(\"div\", {\n class: `${clsPrefix}-collapse-item__content-inner`\n }, this.$slots));\n return useVShow ? withDirectives(contentNode, [[vShow, show]]) : show ? contentNode : null;\n }\n });\n }\n});","import { h, defineComponent, inject, computed, toRef } from 'vue';\nimport { createId, happensIn } from 'seemly';\nimport { useMemo } from 'vooks';\nimport { ChevronRightIcon as ArrowRightIcon, ChevronLeftIcon as ArrowLeftIcon } from \"../../_internal/icons/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { useConfig } from \"../../_mixins/index.mjs\";\nimport { NBaseIcon } from \"../../_internal/index.mjs\";\nimport { throwError, resolveSlotWithProps, resolveWrappedSlotWithProps } from \"../../_utils/index.mjs\";\nimport { collapseInjectionKey } from \"./Collapse.mjs\";\nimport NCollapseItemContent from \"./CollapseItemContent.mjs\";\nexport const collapseItemProps = {\n title: String,\n name: [String, Number],\n disabled: Boolean,\n displayDirective: String\n};\nexport default defineComponent({\n name: 'CollapseItem',\n props: collapseItemProps,\n setup(props) {\n const {\n mergedRtlRef\n } = useConfig(props);\n const randomName = createId();\n const mergedNameRef = useMemo(() => {\n var _a;\n return (_a = props.name) !== null && _a !== void 0 ? _a : randomName;\n });\n const NCollapse = inject(collapseInjectionKey);\n if (!NCollapse) {\n throwError('collapse-item', '`n-collapse-item` must be placed inside `n-collapse`.');\n }\n const {\n expandedNamesRef,\n props: collapseProps,\n mergedClsPrefixRef,\n slots: collapseSlots\n } = NCollapse;\n const collapsedRef = computed(() => {\n const {\n value: expandedNames\n } = expandedNamesRef;\n if (Array.isArray(expandedNames)) {\n const {\n value: name\n } = mergedNameRef;\n return !~expandedNames.findIndex(expandedName => expandedName === name);\n } else if (expandedNames) {\n const {\n value: name\n } = mergedNameRef;\n return name !== expandedNames;\n }\n return true;\n });\n const rtlEnabledRef = useRtl('Collapse', mergedRtlRef, mergedClsPrefixRef);\n return {\n rtlEnabled: rtlEnabledRef,\n collapseSlots,\n randomName,\n mergedClsPrefix: mergedClsPrefixRef,\n collapsed: collapsedRef,\n triggerAreas: toRef(collapseProps, 'triggerAreas'),\n mergedDisplayDirective: computed(() => {\n const {\n displayDirective\n } = props;\n if (displayDirective) {\n return displayDirective;\n } else {\n return collapseProps.displayDirective;\n }\n }),\n arrowPlacement: computed(() => {\n return collapseProps.arrowPlacement;\n }),\n handleClick(e) {\n let happensInArea = 'main';\n if (happensIn(e, 'arrow')) happensInArea = 'arrow';\n if (happensIn(e, 'extra')) happensInArea = 'extra';\n if (!collapseProps.triggerAreas.includes(happensInArea)) {\n return;\n }\n if (NCollapse && !props.disabled) {\n NCollapse.toggleItem(collapsedRef.value, mergedNameRef.value, e);\n }\n }\n };\n },\n render() {\n const {\n collapseSlots,\n $slots,\n arrowPlacement,\n collapsed,\n mergedDisplayDirective,\n mergedClsPrefix,\n disabled,\n triggerAreas\n } = this;\n const headerNode = resolveSlotWithProps($slots.header, {\n collapsed\n }, () => [this.title]);\n const headerExtraSlot = $slots['header-extra'] || collapseSlots['header-extra'];\n const arrowSlot = $slots.arrow || collapseSlots.arrow;\n return h(\"div\", {\n class: [`${mergedClsPrefix}-collapse-item`, `${mergedClsPrefix}-collapse-item--${arrowPlacement}-arrow-placement`, disabled && `${mergedClsPrefix}-collapse-item--disabled`, !collapsed && `${mergedClsPrefix}-collapse-item--active`, triggerAreas.map(area => {\n return `${mergedClsPrefix}-collapse-item--trigger-area-${area}`;\n })]\n }, h(\"div\", {\n class: [`${mergedClsPrefix}-collapse-item__header`, !collapsed && `${mergedClsPrefix}-collapse-item__header--active`]\n }, h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item__header-main`,\n onClick: this.handleClick\n }, arrowPlacement === 'right' && headerNode, h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item-arrow`,\n key: this.rtlEnabled ? 0 : 1,\n \"data-arrow\": true\n }, resolveSlotWithProps(arrowSlot, {\n collapsed\n }, () => {\n var _a;\n return [h(NBaseIcon, {\n clsPrefix: mergedClsPrefix\n }, {\n default: (_a = collapseSlots.expandIcon) !== null && _a !== void 0 ? _a : () => this.rtlEnabled ? h(ArrowLeftIcon, null) : h(ArrowRightIcon, null)\n })];\n })), arrowPlacement === 'left' && headerNode), resolveWrappedSlotWithProps(headerExtraSlot, {\n collapsed\n }, children => h(\"div\", {\n class: `${mergedClsPrefix}-collapse-item__header-extra`,\n onClick: this.handleClick,\n \"data-extra\": true\n }, children))), h(NCollapseItemContent, {\n clsPrefix: mergedClsPrefix,\n displayDirective: mergedDisplayDirective,\n show: !collapsed\n }, $slots));\n }\n});","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default {\n thPaddingSmall: '6px',\n thPaddingMedium: '12px',\n thPaddingLarge: '12px',\n tdPaddingSmall: '6px',\n tdPaddingMedium: '12px',\n tdPaddingLarge: '12px'\n};","import { composite } from 'seemly';\nimport sizeVariables from \"./_common.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nexport const self = vars => {\n const {\n dividerColor,\n cardColor,\n modalColor,\n popoverColor,\n tableHeaderColor,\n tableColorStriped,\n textColor1,\n textColor2,\n borderRadius,\n fontWeightStrong,\n lineHeight,\n fontSizeSmall,\n fontSizeMedium,\n fontSizeLarge\n } = vars;\n return Object.assign(Object.assign({}, sizeVariables), {\n fontSizeSmall,\n fontSizeMedium,\n fontSizeLarge,\n lineHeight,\n borderRadius,\n borderColor: composite(cardColor, dividerColor),\n borderColorModal: composite(modalColor, dividerColor),\n borderColorPopover: composite(popoverColor, dividerColor),\n tdColor: cardColor,\n tdColorModal: modalColor,\n tdColorPopover: popoverColor,\n tdColorStriped: composite(cardColor, tableColorStriped),\n tdColorStripedModal: composite(modalColor, tableColorStriped),\n tdColorStripedPopover: composite(popoverColor, tableColorStriped),\n thColor: composite(cardColor, tableHeaderColor),\n thColorModal: composite(modalColor, tableHeaderColor),\n thColorPopover: composite(popoverColor, tableHeaderColor),\n thTextColor: textColor1,\n tdTextColor: textColor2,\n thFontWeight: fontWeightStrong\n });\n};\nconst tableLight = {\n name: 'Table',\n common: commonLight,\n self\n};\nexport default tableLight;","import { changeColor } from 'seemly';\nimport { checkboxLight } from \"../../checkbox/styles/index.mjs\";\nimport { emptyLight } from \"../../empty/styles/index.mjs\";\nimport { scrollbarLight } from \"../../_internal/scrollbar/styles/index.mjs\";\nimport { commonLight } from \"../../_styles/common/index.mjs\";\nimport { createTheme } from \"../../_mixins/use-theme.mjs\";\nexport const self = vars => {\n const {\n borderRadiusSmall,\n dividerColor,\n hoverColor,\n pressedColor,\n primaryColor,\n textColor3,\n textColor2,\n textColorDisabled,\n fontSize\n } = vars;\n return {\n fontSize,\n lineHeight: '1.5',\n nodeHeight: '30px',\n nodeWrapperPadding: '3px 0',\n nodeBorderRadius: borderRadiusSmall,\n nodeColorHover: hoverColor,\n nodeColorPressed: pressedColor,\n nodeColorActive: changeColor(primaryColor, {\n alpha: 0.1\n }),\n arrowColor: textColor3,\n nodeTextColor: textColor2,\n nodeTextColorDisabled: textColorDisabled,\n loadingColor: primaryColor,\n dropMarkColor: primaryColor,\n lineColor: dividerColor\n };\n};\nconst treeLight = createTheme({\n name: 'Tree',\n common: commonLight,\n peers: {\n Checkbox: checkboxLight,\n Scrollbar: scrollbarLight,\n Empty: emptyLight\n },\n self\n});\nexport default treeLight;","import { c, cB, cM, cNotM, insideModal, insidePopover } from \"../../../_utils/cssr/index.mjs\";\n// vars:\n// --n-bezier\n// --n-td-color\n// --n-td-color-modal\n// --n-td-color-popover\n// --n-td-text-color\n// --n-border-color\n// --n-border-color-modal\n// --n-border-color-popover\n// --n-border-radius\n// --n-font-size\n// --n-th-color\n// --n-th-color-modal\n// --n-th-color-popover\n// --n-th-font-weight\n// --n-th-text-color\n// --n-line-height\n// --n-td-padding\n// --n-th-padding\nexport default c([cB('table', `\n font-size: var(--n-font-size);\n font-variant-numeric: tabular-nums;\n line-height: var(--n-line-height);\n width: 100%;\n border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;\n text-align: left;\n border-collapse: separate;\n border-spacing: 0;\n overflow: hidden;\n background-color: var(--n-td-color);\n border-color: var(--n-merged-border-color);\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n --n-merged-border-color: var(--n-border-color);\n `, [c('th', `\n white-space: nowrap;\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n text-align: inherit;\n padding: var(--n-th-padding);\n vertical-align: inherit;\n text-transform: none;\n border: 0px solid var(--n-merged-border-color);\n font-weight: var(--n-th-font-weight);\n color: var(--n-th-text-color);\n background-color: var(--n-th-color);\n border-bottom: 1px solid var(--n-merged-border-color);\n border-right: 1px solid var(--n-merged-border-color);\n `, [c('&:last-child', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), c('td', `\n transition:\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n padding: var(--n-td-padding);\n color: var(--n-td-text-color);\n background-color: var(--n-td-color);\n border: 0px solid var(--n-merged-border-color);\n border-right: 1px solid var(--n-merged-border-color);\n border-bottom: 1px solid var(--n-merged-border-color);\n `, [c('&:last-child', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), cM('bordered', `\n border: 1px solid var(--n-merged-border-color);\n border-radius: var(--n-border-radius);\n `, [c('tr', [c('&:last-child', [c('td', `\n border-bottom: 0 solid var(--n-merged-border-color);\n `)])])]), cM('single-line', [c('th', `\n border-right: 0px solid var(--n-merged-border-color);\n `), c('td', `\n border-right: 0px solid var(--n-merged-border-color);\n `)]), cM('single-column', [c('tr', [c('&:not(:last-child)', [c('td', `\n border-bottom: 0px solid var(--n-merged-border-color);\n `)])])]), cM('striped', [c('tr:nth-of-type(even)', [c('td', 'background-color: var(--n-td-color-striped)')])]), cNotM('bottom-bordered', [c('tr', [c('&:last-child', [c('td', `\n border-bottom: 0px solid var(--n-merged-border-color);\n `)])])])]), insideModal(cB('table', `\n background-color: var(--n-td-color-modal);\n --n-merged-border-color: var(--n-border-color-modal);\n `, [c('th', `\n background-color: var(--n-th-color-modal);\n `), c('td', `\n background-color: var(--n-td-color-modal);\n `)])), insidePopover(cB('table', `\n background-color: var(--n-td-color-popover);\n --n-merged-border-color: var(--n-border-color-popover);\n `, [c('th', `\n background-color: var(--n-th-color-popover);\n `), c('td', `\n background-color: var(--n-td-color-popover);\n `)]))]);","import { defineComponent, computed, h } from 'vue';\nimport { useConfig, useTheme, useThemeClass } from \"../../_mixins/index.mjs\";\nimport { useRtl } from \"../../_mixins/use-rtl.mjs\";\nimport { createKey } from \"../../_utils/index.mjs\";\nimport { tableLight } from \"../styles/index.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport const tableProps = Object.assign(Object.assign({}, useTheme.props), {\n bordered: {\n type: Boolean,\n default: true\n },\n bottomBordered: {\n type: Boolean,\n default: true\n },\n singleLine: {\n type: Boolean,\n default: true\n },\n striped: Boolean,\n singleColumn: Boolean,\n size: {\n type: String,\n default: 'medium'\n }\n});\nexport default defineComponent({\n name: 'Table',\n props: tableProps,\n setup(props) {\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const themeRef = useTheme('Table', '-table', style, tableLight, props, mergedClsPrefixRef);\n const rtlEnabledRef = useRtl('Table', mergedRtlRef, mergedClsPrefixRef);\n const cssVarsRef = computed(() => {\n const {\n size\n } = props;\n const {\n self: {\n borderColor,\n tdColor,\n tdColorModal,\n tdColorPopover,\n thColor,\n thColorModal,\n thColorPopover,\n thTextColor,\n tdTextColor,\n borderRadius,\n thFontWeight,\n lineHeight,\n borderColorModal,\n borderColorPopover,\n tdColorStriped,\n tdColorStripedModal,\n tdColorStripedPopover,\n [createKey('fontSize', size)]: fontSize,\n [createKey('tdPadding', size)]: tdPadding,\n [createKey('thPadding', size)]: thPadding\n },\n common: {\n cubicBezierEaseInOut\n }\n } = themeRef.value;\n return {\n '--n-bezier': cubicBezierEaseInOut,\n '--n-td-color': tdColor,\n '--n-td-color-modal': tdColorModal,\n '--n-td-color-popover': tdColorPopover,\n '--n-td-text-color': tdTextColor,\n '--n-border-color': borderColor,\n '--n-border-color-modal': borderColorModal,\n '--n-border-color-popover': borderColorPopover,\n '--n-border-radius': borderRadius,\n '--n-font-size': fontSize,\n '--n-th-color': thColor,\n '--n-th-color-modal': thColorModal,\n '--n-th-color-popover': thColorPopover,\n '--n-th-font-weight': thFontWeight,\n '--n-th-text-color': thTextColor,\n '--n-line-height': lineHeight,\n '--n-td-padding': tdPadding,\n '--n-th-padding': thPadding,\n '--n-td-color-striped': tdColorStriped,\n '--n-td-color-striped-modal': tdColorStripedModal,\n '--n-td-color-striped-popover': tdColorStripedPopover\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('table', computed(() => {\n return props.size[0];\n }), cssVarsRef, props) : undefined;\n return {\n rtlEnabled: rtlEnabledRef,\n mergedClsPrefix: mergedClsPrefixRef,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n };\n },\n render() {\n var _a;\n const {\n mergedClsPrefix\n } = this;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return h(\"table\", {\n class: [`${mergedClsPrefix}-table`, this.themeClass, {\n [`${mergedClsPrefix}-table--rtl`]: this.rtlEnabled,\n [`${mergedClsPrefix}-table--bottom-bordered`]: this.bottomBordered,\n [`${mergedClsPrefix}-table--bordered`]: this.bordered,\n [`${mergedClsPrefix}-table--single-line`]: this.singleLine,\n [`${mergedClsPrefix}-table--single-column`]: this.singleColumn,\n [`${mergedClsPrefix}-table--striped`]: this.striped\n }],\n style: this.cssVars\n }, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Th',\n render() {\n return h(\"th\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Tr',\n render() {\n return h(\"tr\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Td',\n render() {\n return h(\"td\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Thead',\n render() {\n return h(\"thead\", null, this.$slots);\n }\n});","import { defineComponent, h } from 'vue';\nexport default defineComponent({\n name: 'Tbody',\n render() {\n return h(\"tbody\", null, this.$slots);\n }\n});","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const treeSelectInjectionKey = createInjectionKey('n-tree-select');","import { createInjectionKey } from \"../../_utils/index.mjs\";\nexport const treeInjectionKey = createInjectionKey('n-tree');","import { h, defineComponent, inject } from 'vue';\nimport { SwitcherIcon } from \"../../_internal/icons/index.mjs\";\nimport { NIconSwitchTransition, NBaseLoading, NBaseIcon } from \"../../_internal/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'NTreeSwitcher',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n indent: {\n type: Number,\n required: true\n },\n expanded: Boolean,\n selected: Boolean,\n hide: Boolean,\n loading: Boolean,\n onClick: Function,\n tmNode: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const {\n renderSwitcherIconRef\n } = inject(treeInjectionKey, null);\n return () => {\n const {\n clsPrefix,\n expanded,\n hide,\n indent,\n onClick\n } = props;\n return h(\"span\", {\n \"data-switcher\": true,\n class: [`${clsPrefix}-tree-node-switcher`, expanded && `${clsPrefix}-tree-node-switcher--expanded`, hide && `${clsPrefix}-tree-node-switcher--hide`],\n style: {\n width: `${indent}px`\n },\n onClick: onClick\n }, h(\"div\", {\n class: `${clsPrefix}-tree-node-switcher__icon`\n }, h(NIconSwitchTransition, null, {\n default: () => {\n if (props.loading) {\n return h(NBaseLoading, {\n clsPrefix: clsPrefix,\n key: \"loading\",\n radius: 85,\n strokeWidth: 20\n });\n }\n const {\n value: renderSwitcherIcon\n } = renderSwitcherIconRef;\n return renderSwitcherIcon ? renderSwitcherIcon({\n expanded: props.expanded,\n selected: props.selected,\n option: props.tmNode.rawNode\n }) : h(NBaseIcon, {\n clsPrefix: clsPrefix,\n key: \"switcher\"\n }, {\n default: () => h(SwitcherIcon, null)\n });\n }\n })));\n };\n }\n});","import { h, defineComponent, inject } from 'vue';\nimport { NCheckbox } from \"../../checkbox/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'NTreeNodeCheckbox',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n indent: {\n type: Number,\n required: true\n },\n right: Boolean,\n focusable: Boolean,\n disabled: Boolean,\n checked: Boolean,\n indeterminate: Boolean,\n onCheck: Function\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const NTree = inject(treeInjectionKey);\n function doCheck(value) {\n const {\n onCheck\n } = props;\n if (onCheck) {\n onCheck(value);\n }\n }\n function handleUpdateValue(value) {\n doCheck(value);\n }\n return {\n handleUpdateValue,\n mergedTheme: NTree.mergedThemeRef\n };\n },\n render() {\n const {\n clsPrefix,\n mergedTheme,\n checked,\n indeterminate,\n disabled,\n focusable,\n indent,\n handleUpdateValue\n } = this;\n return h(\"span\", {\n class: [`${clsPrefix}-tree-node-checkbox`, this.right && `${clsPrefix}-tree-node-checkbox--right`],\n style: {\n width: `${indent}px`\n },\n \"data-checkbox\": true\n }, h(NCheckbox, {\n focusable: focusable,\n disabled: disabled,\n theme: mergedTheme.peers.Checkbox,\n themeOverrides: mergedTheme.peerOverrides.Checkbox,\n checked: checked,\n indeterminate: indeterminate,\n onUpdateChecked: handleUpdateValue\n }));\n }\n});","import { h, defineComponent, ref, inject } from 'vue';\nimport { render } from \"../../_utils/index.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nexport default defineComponent({\n name: 'TreeNodeContent',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n disabled: Boolean,\n checked: Boolean,\n selected: Boolean,\n onClick: Function,\n onDragstart: Function,\n tmNode: {\n type: Object,\n required: true\n },\n nodeProps: Object\n },\n setup(props) {\n const {\n renderLabelRef,\n renderPrefixRef,\n renderSuffixRef,\n labelFieldRef\n } =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n inject(treeInjectionKey);\n const selfRef = ref(null);\n function doClick(e) {\n const {\n onClick\n } = props;\n if (onClick) onClick(e);\n }\n function handleClick(e) {\n doClick(e);\n }\n return {\n selfRef,\n renderLabel: renderLabelRef,\n renderPrefix: renderPrefixRef,\n renderSuffix: renderSuffixRef,\n labelField: labelFieldRef,\n handleClick\n };\n },\n render() {\n const {\n clsPrefix,\n labelField,\n nodeProps,\n checked = false,\n selected = false,\n renderLabel,\n renderPrefix,\n renderSuffix,\n handleClick,\n onDragstart,\n tmNode: {\n rawNode,\n rawNode: {\n prefix,\n suffix,\n [labelField]: label\n }\n }\n } = this;\n return h(\"span\", Object.assign({}, nodeProps, {\n ref: \"selfRef\",\n class: [`${clsPrefix}-tree-node-content`, nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps.class],\n onClick: handleClick,\n draggable: onDragstart === undefined ? undefined : true,\n onDragstart: onDragstart\n }), renderPrefix || prefix ? h(\"div\", {\n class: `${clsPrefix}-tree-node-content__prefix`\n }, renderPrefix ? renderPrefix({\n option: rawNode,\n selected,\n checked\n }) : render(prefix)) : null, h(\"div\", {\n class: `${clsPrefix}-tree-node-content__text`\n }, renderLabel ? renderLabel({\n option: rawNode,\n selected,\n checked\n }) : render(label)), renderSuffix || suffix ? h(\"div\", {\n class: `${clsPrefix}-tree-node-content__suffix`\n }, renderSuffix ? renderSuffix({\n option: rawNode,\n selected,\n checked\n }) : render(suffix)) : null);\n }\n});","import { h } from 'vue';\nexport function renderDropMark({\n position,\n offsetLevel,\n indent,\n el\n}) {\n const style = {\n position: 'absolute',\n boxSizing: 'border-box',\n right: 0\n };\n if (position === 'inside') {\n style.left = 0;\n style.top = 0;\n style.bottom = 0;\n style.borderRadius = 'inherit';\n style.boxShadow = 'inset 0 0 0 2px var(--n-drop-mark-color)';\n } else {\n const cssPosition = position === 'before' ? 'top' : 'bottom';\n style[cssPosition] = 0;\n // The left prop should be modified when tree's style is changed\n // Maybe it is possible to use content left\n style.left = `${el.offsetLeft + 6 - offsetLevel * indent}px`;\n style.height = '2px';\n style.backgroundColor = 'var(--n-drop-mark-color)';\n style.transformOrigin = cssPosition;\n style.borderRadius = '1px';\n style.transform = position === 'before' ? 'translateY(-4px)' : 'translateY(4px)';\n }\n return h(\"div\", {\n style: style\n });\n}\nexport function defaultAllowDrop({\n dropPosition,\n node\n}) {\n if (node.isLeaf === false) return true;\n if (node.children) {\n return true;\n }\n return dropPosition !== 'inside';\n}","import { computed } from 'vue';\nimport { isBrowser } from \"../../_utils/index.mjs\";\nimport { happensIn } from 'seemly';\nexport function useMergedCheckStrategy(props) {\n return computed(() => props.leafOnly ? 'child' : props.checkStrategy);\n}\nexport function isNodeDisabled(node, disabledField) {\n return !!node.rawNode[disabledField];\n}\nfunction traverse(nodes, childrenField, callback, callbackAfter) {\n nodes === null || nodes === void 0 ? void 0 : nodes.forEach(node => {\n callback(node);\n traverse(node[childrenField], childrenField, callback, callbackAfter);\n callbackAfter(node);\n });\n}\nexport function keysWithFilter(nodes, pattern, keyField, childrenField, filter) {\n const keys = new Set();\n const highlightKeySet = new Set();\n const path = [];\n traverse(nodes, childrenField, node => {\n path.push(node);\n if (filter(pattern, node)) {\n highlightKeySet.add(node[keyField]);\n for (let i = path.length - 2; i >= 0; --i) {\n if (!keys.has(path[i][keyField])) {\n keys.add(path[i][keyField]);\n } else {\n return;\n }\n }\n }\n }, () => {\n path.pop();\n });\n return {\n expandedKeys: Array.from(keys),\n highlightKeySet\n };\n}\nconst emptyImage = null;\nif (isBrowser && Image) {\n const emptyImage = new Image();\n emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n}\nexport { emptyImage };\nexport function filterTree(tree, filter, pattern, keyField, childrenField) {\n const visitedTailKeys = new Set();\n const visitedNonTailKeys = new Set();\n const highlightKeySet = new Set();\n const expandedKeys = [];\n const filteredTree = [];\n const path = [];\n function visit(t) {\n t.forEach(n => {\n path.push(n);\n if (filter(pattern, n)) {\n visitedTailKeys.add(n[keyField]);\n highlightKeySet.add(n[keyField]);\n for (let i = path.length - 2; i >= 0; --i) {\n const key = path[i][keyField];\n if (!visitedNonTailKeys.has(key)) {\n visitedNonTailKeys.add(key);\n if (visitedTailKeys.has(key)) {\n visitedTailKeys.delete(key);\n }\n } else {\n break;\n }\n }\n }\n const children = n[childrenField];\n if (children) {\n visit(children);\n }\n path.pop();\n });\n }\n visit(tree);\n function build(t, sibs) {\n t.forEach(n => {\n const key = n[keyField];\n const isVisitedTail = visitedTailKeys.has(key);\n const isVisitedNonTail = visitedNonTailKeys.has(key);\n if (!isVisitedTail && !isVisitedNonTail) return;\n const children = n[childrenField];\n if (children) {\n if (isVisitedTail) {\n // If it is visited path tail, use origin node\n sibs.push(n);\n } else {\n // It it is not visited path tail, use cloned node\n expandedKeys.push(key);\n const clonedNode = Object.assign(Object.assign({}, n), {\n [childrenField]: []\n });\n sibs.push(clonedNode);\n build(children, clonedNode[childrenField]);\n }\n } else {\n sibs.push(n);\n }\n });\n }\n build(tree, filteredTree);\n return {\n filteredTree,\n highlightKeySet,\n expandedKeys\n };\n}\nexport function treeGetClickTarget(e) {\n if (happensIn(e, 'checkbox')) {\n return 'checkbox';\n } else if (happensIn(e, 'switcher')) {\n return 'switcher';\n } else {\n return 'node';\n }\n}","import { h, inject, computed, defineComponent, ref, onMounted } from 'vue';\nimport { useMemo } from 'vooks';\nimport { happensIn, repeat } from 'seemly';\nimport { createDataKey } from \"../../_utils/index.mjs\";\nimport NTreeNodeSwitcher from \"./TreeNodeSwitcher.mjs\";\nimport NTreeNodeCheckbox from \"./TreeNodeCheckbox.mjs\";\nimport NTreeNodeContent from \"./TreeNodeContent.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nimport { renderDropMark } from \"./dnd.mjs\";\nimport { isNodeDisabled } from \"./utils.mjs\";\nconst TreeNode = defineComponent({\n name: 'TreeNode',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n tmNode: {\n type: Object,\n required: true\n }\n },\n setup(props) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const NTree = inject(treeInjectionKey);\n const {\n droppingNodeParentRef,\n droppingMouseNodeRef,\n draggingNodeRef,\n droppingPositionRef,\n droppingOffsetLevelRef,\n nodePropsRef,\n indentRef,\n blockLineRef,\n checkboxPlacementRef,\n checkOnClickRef,\n disabledFieldRef,\n showLineRef,\n renderSwitcherIconRef,\n overrideDefaultNodeClickBehaviorRef\n } = NTree;\n const checkboxDisabledRef = useMemo(() => !!props.tmNode.rawNode.checkboxDisabled);\n const nodeIsDisabledRef = useMemo(() => {\n return isNodeDisabled(props.tmNode, disabledFieldRef.value);\n });\n const disabledRef = useMemo(() => NTree.disabledRef.value || nodeIsDisabledRef.value);\n const resolvedNodePropsRef = computed(() => {\n const {\n value: nodeProps\n } = nodePropsRef;\n if (!nodeProps) return undefined;\n return nodeProps({\n option: props.tmNode.rawNode\n });\n });\n // used for drag and drop\n const contentInstRef = ref(null);\n // must be non-reactive\n const contentElRef = {\n value: null\n };\n onMounted(() => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n contentElRef.value = contentInstRef.value.$el;\n });\n function handleSwitcherClick() {\n const callback = () => {\n const {\n tmNode\n } = props;\n if (!tmNode.isLeaf && !tmNode.shallowLoaded) {\n if (!NTree.loadingKeysRef.value.has(tmNode.key)) {\n NTree.loadingKeysRef.value.add(tmNode.key);\n } else {\n return;\n }\n const {\n onLoadRef: {\n value: onLoad\n }\n } = NTree;\n if (onLoad) {\n void onLoad(tmNode.rawNode).then(value => {\n if (value !== false) {\n NTree.handleSwitcherClick(tmNode);\n }\n }).finally(() => {\n NTree.loadingKeysRef.value.delete(tmNode.key);\n });\n }\n } else {\n NTree.handleSwitcherClick(tmNode);\n }\n };\n if (renderSwitcherIconRef.value) {\n // if renderSwitcherIcon is set, icon dom may be altered before event\n // bubbles to parent dom, so that target check fails. Call it in next\n // event loop so that event bubble phase is finishes.\n setTimeout(callback, 0);\n } else {\n callback();\n }\n }\n const selectableRef = useMemo(() => !nodeIsDisabledRef.value && NTree.selectableRef.value && (NTree.internalTreeSelect ? NTree.mergedCheckStrategyRef.value !== 'child' || NTree.multipleRef.value && NTree.cascadeRef.value || props.tmNode.isLeaf : true));\n const checkableRef = useMemo(() => NTree.checkableRef.value && (NTree.cascadeRef.value || NTree.mergedCheckStrategyRef.value !== 'child' || props.tmNode.isLeaf));\n const checkedRef = useMemo(() => NTree.displayedCheckedKeysRef.value.includes(props.tmNode.key));\n const mergedCheckOnClickRef = useMemo(() => {\n const {\n value: checkable\n } = checkableRef;\n if (!checkable) return false;\n const {\n value: checkOnClick\n } = checkOnClickRef;\n const {\n tmNode\n } = props;\n if (typeof checkOnClick === 'boolean') {\n return !tmNode.disabled && checkOnClick;\n }\n return checkOnClick(props.tmNode.rawNode);\n });\n function _handleClick(e) {\n const {\n value: expandOnClick\n } = NTree.expandOnClickRef;\n const {\n value: selectable\n } = selectableRef;\n const {\n value: mergedCheckOnClick\n } = mergedCheckOnClickRef;\n if (!selectable && !expandOnClick && !mergedCheckOnClick) return;\n if (happensIn(e, 'checkbox') || happensIn(e, 'switcher')) return;\n const {\n tmNode\n } = props;\n if (selectable) {\n NTree.handleSelect(tmNode);\n }\n if (expandOnClick && !tmNode.isLeaf) {\n handleSwitcherClick();\n }\n if (mergedCheckOnClick) {\n handleCheck(!checkedRef.value);\n }\n }\n function handleNodeClick(e) {\n var _a, _b;\n if (!disabledRef.value) {\n const overrideDefaultNodeClickBehavior = overrideDefaultNodeClickBehaviorRef.value;\n let shouldOverride = false;\n if (overrideDefaultNodeClickBehavior) {\n switch (overrideDefaultNodeClickBehavior({\n option: props.tmNode.rawNode\n })) {\n case 'toggleCheck':\n shouldOverride = true;\n handleCheck(!checkedRef.value);\n break;\n case 'toggleSelect':\n shouldOverride = true;\n NTree.handleSelect(props.tmNode);\n break;\n case 'toggleExpand':\n shouldOverride = true;\n handleSwitcherClick();\n shouldOverride = true;\n break;\n case 'none':\n shouldOverride = true;\n shouldOverride = true;\n return;\n case 'default':\n default:\n break;\n }\n }\n if (!shouldOverride) {\n _handleClick(e);\n }\n }\n (_b = (_a = resolvedNodePropsRef.value) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);\n }\n function handleContentClick(e) {\n if (blockLineRef.value) return;\n handleNodeClick(e);\n }\n function handleLineClick(e) {\n if (!blockLineRef.value) return;\n handleNodeClick(e);\n }\n function handleCheck(checked) {\n NTree.handleCheck(props.tmNode, checked);\n }\n // Dnd\n function handleDragStart(e) {\n NTree.handleDragStart({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragEnter(e) {\n if (e.currentTarget !== e.target) {\n return;\n }\n NTree.handleDragEnter({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragOver(e) {\n e.preventDefault(); // if not prevent, drop event won't be fired...\n NTree.handleDragOver({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragEnd(e) {\n NTree.handleDragEnd({\n event: e,\n node: props.tmNode\n });\n }\n function handleDragLeave(e) {\n if (e.currentTarget !== e.target) {\n return;\n }\n NTree.handleDragLeave({\n event: e,\n node: props.tmNode\n });\n }\n function handleDrop(e) {\n e.preventDefault();\n if (droppingPositionRef.value !== null) {\n NTree.handleDrop({\n event: e,\n node: props.tmNode,\n dropPosition: droppingPositionRef.value\n });\n }\n }\n const indentNodes = computed(() => {\n const {\n clsPrefix\n } = props;\n const {\n value: indent\n } = indentRef;\n if (showLineRef.value) {\n const indentNodes = [];\n let cursor = props.tmNode.parent;\n while (cursor) {\n if (cursor.isLastChild) {\n indentNodes.push(h(\"div\", {\n class: `${clsPrefix}-tree-node-indent`\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n } else {\n indentNodes.push(h(\"div\", {\n class: [`${clsPrefix}-tree-node-indent`, `${clsPrefix}-tree-node-indent--show-line`]\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n }\n cursor = cursor.parent;\n }\n return indentNodes.reverse();\n } else {\n return repeat(props.tmNode.level, h(\"div\", {\n class: `${props.clsPrefix}-tree-node-indent`\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })));\n }\n });\n return {\n showDropMark: useMemo(() => {\n const {\n value: draggingNode\n } = draggingNodeRef;\n if (!draggingNode) return;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (!droppingPosition) return;\n const {\n value: droppingMouseNode\n } = droppingMouseNodeRef;\n if (!droppingMouseNode) {\n return;\n }\n const {\n tmNode\n } = props;\n if (tmNode.key === droppingMouseNode.key) return true;\n return false;\n }),\n showDropMarkAsParent: useMemo(() => {\n const {\n value: droppingNodeParent\n } = droppingNodeParentRef;\n if (!droppingNodeParent) return false;\n const {\n tmNode\n } = props;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (droppingPosition === 'before' || droppingPosition === 'after') {\n return droppingNodeParent.key === tmNode.key;\n }\n return false;\n }),\n pending: useMemo(() => NTree.pendingNodeKeyRef.value === props.tmNode.key),\n loading: useMemo(() => NTree.loadingKeysRef.value.has(props.tmNode.key)),\n highlight: useMemo(() => {\n var _a;\n return (_a = NTree.highlightKeySetRef.value) === null || _a === void 0 ? void 0 : _a.has(props.tmNode.key);\n }),\n checked: checkedRef,\n indeterminate: useMemo(() => NTree.displayedIndeterminateKeysRef.value.includes(props.tmNode.key)),\n selected: useMemo(() => NTree.mergedSelectedKeysRef.value.includes(props.tmNode.key)),\n expanded: useMemo(() => NTree.mergedExpandedKeysRef.value.includes(props.tmNode.key)),\n disabled: disabledRef,\n checkable: checkableRef,\n mergedCheckOnClick: mergedCheckOnClickRef,\n checkboxDisabled: checkboxDisabledRef,\n selectable: selectableRef,\n expandOnClick: NTree.expandOnClickRef,\n internalScrollable: NTree.internalScrollableRef,\n draggable: NTree.draggableRef,\n blockLine: blockLineRef,\n nodeProps: resolvedNodePropsRef,\n checkboxFocusable: NTree.internalCheckboxFocusableRef,\n droppingPosition: droppingPositionRef,\n droppingOffsetLevel: droppingOffsetLevelRef,\n indent: indentRef,\n checkboxPlacement: checkboxPlacementRef,\n showLine: showLineRef,\n contentInstRef,\n contentElRef,\n indentNodes,\n handleCheck,\n handleDrop,\n handleDragStart,\n handleDragEnter,\n handleDragOver,\n handleDragEnd,\n handleDragLeave,\n handleLineClick,\n handleContentClick,\n handleSwitcherClick\n };\n },\n render() {\n const {\n tmNode,\n clsPrefix,\n checkable,\n expandOnClick,\n selectable,\n selected,\n checked,\n highlight,\n draggable,\n blockLine,\n indent,\n indentNodes,\n disabled,\n pending,\n internalScrollable,\n nodeProps,\n checkboxPlacement\n } = this;\n // drag start not inside\n // it need to be append to node itself, not wrapper\n const dragEventHandlers = draggable && !disabled ? {\n onDragenter: this.handleDragEnter,\n onDragleave: this.handleDragLeave,\n onDragend: this.handleDragEnd,\n onDrop: this.handleDrop,\n onDragover: this.handleDragOver\n } : undefined;\n // In non virtual mode, there's no evidence that which element should be\n // scrolled to, so we need data-key to query the target element.\n const dataKey = internalScrollable ? createDataKey(tmNode.key) : undefined;\n const checkboxOnRight = checkboxPlacement === 'right';\n const checkboxNode = checkable ? h(NTreeNodeCheckbox, {\n indent: indent,\n right: checkboxOnRight,\n focusable: this.checkboxFocusable,\n disabled: disabled || this.checkboxDisabled,\n clsPrefix: clsPrefix,\n checked: this.checked,\n indeterminate: this.indeterminate,\n onCheck: this.handleCheck\n }) : null;\n return h(\"div\", Object.assign({\n class: `${clsPrefix}-tree-node-wrapper`\n }, dragEventHandlers), h(\"div\", Object.assign({}, blockLine ? nodeProps : undefined, {\n class: [`${clsPrefix}-tree-node`, {\n [`${clsPrefix}-tree-node--selected`]: selected,\n [`${clsPrefix}-tree-node--checkable`]: checkable,\n [`${clsPrefix}-tree-node--highlight`]: highlight,\n [`${clsPrefix}-tree-node--pending`]: pending,\n [`${clsPrefix}-tree-node--disabled`]: disabled,\n [`${clsPrefix}-tree-node--selectable`]: selectable,\n [`${clsPrefix}-tree-node--clickable`]: selectable || expandOnClick || this.mergedCheckOnClick\n }, nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps.class],\n \"data-key\": dataKey,\n draggable: draggable && blockLine,\n onClick: this.handleLineClick,\n onDragstart: draggable && blockLine && !disabled ? this.handleDragStart : undefined\n }), indentNodes, tmNode.isLeaf && this.showLine ? h(\"div\", {\n class: [`${clsPrefix}-tree-node-indent`, `${clsPrefix}-tree-node-indent--show-line`, tmNode.isLeaf && `${clsPrefix}-tree-node-indent--is-leaf`, tmNode.isLastChild && `${clsPrefix}-tree-node-indent--last-child`]\n }, h(\"div\", {\n style: {\n width: `${indent}px`\n }\n })) : h(NTreeNodeSwitcher, {\n clsPrefix: clsPrefix,\n expanded: this.expanded,\n selected: selected,\n loading: this.loading,\n hide: tmNode.isLeaf,\n tmNode: this.tmNode,\n indent: indent,\n onClick: this.handleSwitcherClick\n }), !checkboxOnRight ? checkboxNode : null, h(NTreeNodeContent, {\n ref: \"contentInstRef\",\n clsPrefix: clsPrefix,\n checked: checked,\n selected: selected,\n onClick: this.handleContentClick,\n nodeProps: blockLine ? undefined : nodeProps,\n onDragstart: draggable && !blockLine && !disabled ? this.handleDragStart : undefined,\n tmNode: tmNode\n }), draggable ? this.showDropMark ? renderDropMark({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n el: this.contentElRef.value,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n position: this.droppingPosition,\n offsetLevel: this.droppingOffsetLevel,\n indent\n }) : this.showDropMarkAsParent ? renderDropMark({\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n el: this.contentElRef.value,\n position: 'inside',\n offsetLevel: this.droppingOffsetLevel,\n indent\n }) : null : null, checkboxOnRight ? checkboxNode : null));\n }\n});\nexport default TreeNode;","import { inject, ref } from 'vue';\nimport { treeSelectInjectionKey } from \"../../tree-select/src/interface.mjs\";\nexport function useKeyboard({\n props,\n fNodesRef,\n mergedExpandedKeysRef,\n mergedSelectedKeysRef,\n mergedCheckedKeysRef,\n handleCheck,\n handleSelect,\n handleSwitcherClick\n}) {\n const {\n value: mergedSelectedKeys\n } = mergedSelectedKeysRef;\n // If it's used in tree-select, make it take over pending state\n const treeSelectInjection = inject(treeSelectInjectionKey, null);\n const pendingNodeKeyRef = treeSelectInjection ? treeSelectInjection.pendingNodeKeyRef : ref(mergedSelectedKeys.length ? mergedSelectedKeys[mergedSelectedKeys.length - 1] : null);\n function handleKeydown(e) {\n var _a;\n if (!props.keyboard) return {\n enterBehavior: null\n };\n const {\n value: pendingNodeKey\n } = pendingNodeKeyRef;\n let enterBehavior = null;\n if (pendingNodeKey === null) {\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n }\n if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(e.key)) {\n if (pendingNodeKey === null) {\n const {\n value: fNodes\n } = fNodesRef;\n let fIndex = 0;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n }\n }\n } else {\n const {\n value: fNodes\n } = fNodesRef;\n let fIndex = fNodes.findIndex(tmNode => tmNode.key === pendingNodeKey);\n if (!~fIndex) return {\n enterBehavior: null\n };\n if (e.key === 'Enter') {\n const tmNode = fNodes[fIndex];\n enterBehavior = ((_a = props.overrideDefaultNodeClickBehavior) === null || _a === void 0 ? void 0 : _a.call(props, {\n option: tmNode.rawNode\n })) || null;\n switch (enterBehavior) {\n case 'toggleCheck':\n handleCheck(tmNode, !mergedCheckedKeysRef.value.includes(tmNode.key));\n break;\n case 'toggleSelect':\n handleSelect(tmNode);\n break;\n case 'toggleExpand':\n handleSwitcherClick(tmNode);\n break;\n case 'none':\n break;\n case 'default':\n default:\n enterBehavior = 'default';\n handleSelect(tmNode);\n }\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n fIndex += 1;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n fIndex -= 1;\n while (fIndex >= 0) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex -= 1;\n }\n } else if (e.key === 'ArrowLeft') {\n const pendingNode = fNodes[fIndex];\n if (pendingNode.isLeaf || !mergedExpandedKeysRef.value.includes(pendingNodeKey)) {\n const parentTmNode = pendingNode.getParent();\n if (parentTmNode) {\n pendingNodeKeyRef.value = parentTmNode.key;\n }\n } else {\n handleSwitcherClick(pendingNode);\n }\n } else if (e.key === 'ArrowRight') {\n const pendingNode = fNodes[fIndex];\n if (pendingNode.isLeaf) return {\n enterBehavior: null\n };\n if (!mergedExpandedKeysRef.value.includes(pendingNodeKey)) {\n handleSwitcherClick(pendingNode);\n } else {\n // Tha same as ArrowDown\n fIndex += 1;\n while (fIndex < fNodes.length) {\n if (!fNodes[fIndex].disabled) {\n pendingNodeKeyRef.value = fNodes[fIndex].key;\n break;\n }\n fIndex += 1;\n }\n }\n }\n }\n return {\n enterBehavior\n };\n }\n return {\n pendingNodeKeyRef,\n handleKeydown\n };\n}","import { h, defineComponent } from 'vue';\nimport { pxfy } from 'seemly';\nimport FadeInExpandTransition from \"../../_internal/fade-in-expand-transition/index.mjs\";\nimport TreeNode from \"./TreeNode.mjs\";\nexport default defineComponent({\n name: 'TreeMotionWrapper',\n props: {\n clsPrefix: {\n type: String,\n required: true\n },\n height: Number,\n nodes: {\n type: Array,\n required: true\n },\n mode: {\n type: String,\n required: true\n },\n onAfterEnter: {\n type: Function,\n required: true\n }\n },\n render() {\n const {\n clsPrefix\n } = this;\n return h(FadeInExpandTransition, {\n onAfterEnter: this.onAfterEnter,\n appear: true,\n reverse: this.mode === 'collapse'\n }, {\n default: () => h(\"div\", {\n class: [`${clsPrefix}-tree-motion-wrapper`, `${clsPrefix}-tree-motion-wrapper--${this.mode}`],\n style: {\n height: pxfy(this.height)\n }\n }, this.nodes.map(node => h(TreeNode, {\n clsPrefix: clsPrefix,\n tmNode: node\n })))\n });\n }\n});","import { c, cB, cE, cM, cNotM } from \"../../../_utils/cssr/index.mjs\";\nimport { iconSwitchTransition } from \"../../../_styles/transitions/icon-switch.cssr.mjs\";\nimport { fadeInHeightExpandTransition } from \"../../../_styles/transitions/fade-in-height-expand.cssr.mjs\";\nconst iconSwitchTransitionNode = iconSwitchTransition();\n// vars:\n// --n-arrow-color\n// --n-bezier\n// --n-font-size\n// --n-node-border-radius\n// --n-node-color-active\n// --n-node-color-hover\n// --n-node-color-pressed\n// --n-node-text-color\n// --n-node-text-color-disabled\n// --n-node-wrapper-padding\n// --n-line-offset-top\n// --n-line-offset-bottom\n// --n-node-content-height\n// --n-line-height\n// --n-line-color\nexport default cB('tree', `\n font-size: var(--n-font-size);\n outline: none;\n`, [c('ul, li', `\n margin: 0;\n padding: 0;\n list-style: none;\n `), c('>', [cB('tree-node', [c('&:first-child', 'margin-top: 0;')])]), cB('tree-motion-wrapper', [cM('expand', [fadeInHeightExpandTransition({\n duration: '0.2s'\n})]), cM('collapse', [fadeInHeightExpandTransition({\n duration: '0.2s',\n reverse: true\n})])]), cB('tree-node-wrapper', `\n box-sizing: border-box;\n padding: var(--n-node-wrapper-padding);\n `), cB('tree-node', `\n transform: translate3d(0,0,0);\n position: relative;\n display: flex;\n border-radius: var(--n-node-border-radius);\n transition: background-color .3s var(--n-bezier);\n `, [cM('highlight', [cB('tree-node-content', [cE('text', 'border-bottom-color: var(--n-node-text-color-disabled);')])]), cM('disabled', [cB('tree-node-content', `\n color: var(--n-node-text-color-disabled);\n cursor: not-allowed;\n `)]), cNotM('disabled', [cM('clickable', [cB('tree-node-content', `\n cursor: pointer;\n `)])])]), cM('block-node', [cB('tree-node-content', `\n flex: 1;\n min-width: 0;\n `)]), cNotM('block-line', [cB('tree-node', [cNotM('disabled', [cB('tree-node-content', [c('&:hover', 'background: var(--n-node-color-hover);')]), cM('selectable', [cB('tree-node-content', [c('&:active', 'background: var(--n-node-color-pressed);')])]), cM('pending', [cB('tree-node-content', `\n background: var(--n-node-color-hover);\n `)]), cM('selected', [cB('tree-node-content', 'background: var(--n-node-color-active);')])]), cM('selected', [cB('tree-node-content', 'background: var(--n-node-color-active);')])])]), cM('block-line', [cB('tree-node', [cNotM('disabled', [c('&:hover', 'background: var(--n-node-color-hover);'), cM('pending', `\n background: var(--n-node-color-hover);\n `), cM('selectable', [cNotM('selected', [c('&:active', 'background: var(--n-node-color-pressed);')])]), cM('selected', 'background: var(--n-node-color-active);')]), cM('selected', 'background: var(--n-node-color-active);'), cM('disabled', `\n cursor: not-allowed;\n `)])]), cB('tree-node-indent', `\n flex-grow: 0;\n flex-shrink: 0;\n `, [cM('show-line', 'position: relative', [c('&::before', `\n position: absolute;\n left: 50%;\n border-left: 1px solid var(--n-line-color);\n transition: border-color .3s var(--n-bezier);\n transform: translate(-50%);\n content: \"\";\n top: var(--n-line-offset-top);\n bottom: var(--n-line-offset-bottom);\n `), cM('last-child', [c('&::before', `\n bottom: 50%;\n `)]), cM('is-leaf', [c('&::after', `\n position: absolute;\n content: \"\";\n left: calc(50% + 0.5px);\n right: 0;\n bottom: 50%;\n transition: border-color .3s var(--n-bezier);\n border-bottom: 1px solid var(--n-line-color);\n `)])]), cNotM('show-line', 'height: 0;')]), cB('tree-node-switcher', `\n cursor: pointer;\n display: inline-flex;\n flex-shrink: 0;\n height: var(--n-node-content-height);\n align-items: center;\n justify-content: center;\n transition: transform .15s var(--n-bezier);\n vertical-align: bottom;\n `, [cE('icon', `\n position: relative;\n height: 14px;\n width: 14px;\n display: flex;\n color: var(--n-arrow-color);\n transition: color .3s var(--n-bezier);\n font-size: 14px;\n `, [cB('icon', [iconSwitchTransitionNode]), cB('base-loading', `\n color: var(--n-loading-color);\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n `, [iconSwitchTransitionNode]), cB('base-icon', [iconSwitchTransitionNode])]), cM('hide', 'visibility: hidden;'), cM('expanded', 'transform: rotate(90deg);')]), cB('tree-node-checkbox', `\n display: inline-flex;\n height: var(--n-node-content-height);\n vertical-align: bottom;\n align-items: center;\n justify-content: center;\n `), cB('tree-node-content', `\n user-select: none;\n position: relative;\n display: inline-flex;\n align-items: center;\n min-height: var(--n-node-content-height);\n box-sizing: border-box;\n line-height: var(--n-line-height);\n vertical-align: bottom;\n padding: 0 6px 0 4px;\n cursor: default;\n border-radius: var(--n-node-border-radius);\n color: var(--n-node-text-color);\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n `, [c('&:last-child', 'margin-bottom: 0;'), cE('prefix', `\n display: inline-flex;\n margin-right: 8px;\n `), cE('text', `\n border-bottom: 1px solid #0000;\n transition: border-color .3s var(--n-bezier);\n flex-grow: 1;\n max-width: 100%;\n `), cE('suffix', `\n display: inline-flex;\n `)]), cE('empty', 'margin: auto;')]);","var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { h, ref, toRef, computed, defineComponent, provide, watch, nextTick, watchEffect, inject } from 'vue';\nimport { createTreeMate, flatten, createIndexGetter } from 'treemate';\nimport { useMergedState } from 'vooks';\nimport { VVirtualList } from 'vueuc';\nimport { depx, getPadding, pxfy } from 'seemly';\nimport { treeSelectInjectionKey } from \"../../tree-select/src/interface.mjs\";\nimport { useConfig, useTheme, useThemeClass, useRtl } from \"../../_mixins/index.mjs\";\nimport { call, createDataKey, resolveSlot, warn, warnOnce } from \"../../_utils/index.mjs\";\nimport { NxScrollbar } from \"../../_internal/index.mjs\";\nimport { treeLight } from \"../styles/index.mjs\";\nimport { NEmpty } from \"../../empty/index.mjs\";\nimport NTreeNode from \"./TreeNode.mjs\";\nimport { keysWithFilter, emptyImage, filterTree, isNodeDisabled, useMergedCheckStrategy } from \"./utils.mjs\";\nimport { useKeyboard } from \"./keyboard.mjs\";\nimport { treeInjectionKey } from \"./interface.mjs\";\nimport MotionWrapper from \"./MotionWrapper.mjs\";\nimport { defaultAllowDrop } from \"./dnd.mjs\";\nimport style from \"./styles/index.cssr.mjs\";\nexport function createTreeMateOptions(keyField, childrenField, disabledField, getChildren) {\n const settledGetChildren = getChildren || (node => {\n return node[childrenField];\n });\n return {\n getIsGroup() {\n return false;\n },\n getKey(node) {\n return node[keyField];\n },\n getChildren: settledGetChildren,\n getDisabled(node) {\n return !!(node[disabledField] || node.checkboxDisabled);\n }\n };\n}\nexport const treeSharedProps = {\n allowCheckingNotLoaded: Boolean,\n filter: Function,\n defaultExpandAll: Boolean,\n expandedKeys: Array,\n keyField: {\n type: String,\n default: 'key'\n },\n labelField: {\n type: String,\n default: 'label'\n },\n childrenField: {\n type: String,\n default: 'children'\n },\n disabledField: {\n type: String,\n default: 'disabled'\n },\n defaultExpandedKeys: {\n type: Array,\n default: () => []\n },\n indeterminateKeys: Array,\n renderSwitcherIcon: Function,\n onUpdateIndeterminateKeys: [Function, Array],\n 'onUpdate:indeterminateKeys': [Function, Array],\n onUpdateExpandedKeys: [Function, Array],\n 'onUpdate:expandedKeys': [Function, Array],\n overrideDefaultNodeClickBehavior: Function\n};\nexport const treeProps = Object.assign(Object.assign(Object.assign(Object.assign({}, useTheme.props), {\n accordion: Boolean,\n showIrrelevantNodes: {\n type: Boolean,\n default: true\n },\n data: {\n type: Array,\n default: () => []\n },\n expandOnDragenter: {\n type: Boolean,\n default: true\n },\n expandOnClick: Boolean,\n checkOnClick: {\n type: [Boolean, Function],\n default: false\n },\n cancelable: {\n type: Boolean,\n default: true\n },\n checkable: Boolean,\n draggable: Boolean,\n blockNode: Boolean,\n blockLine: Boolean,\n showLine: Boolean,\n disabled: Boolean,\n checkedKeys: Array,\n defaultCheckedKeys: {\n type: Array,\n default: () => []\n },\n selectedKeys: Array,\n defaultSelectedKeys: {\n type: Array,\n default: () => []\n },\n multiple: Boolean,\n pattern: {\n type: String,\n default: ''\n },\n onLoad: Function,\n cascade: Boolean,\n selectable: {\n type: Boolean,\n default: true\n },\n scrollbarProps: Object,\n indent: {\n type: Number,\n default: 24\n },\n allowDrop: {\n type: Function,\n default: defaultAllowDrop\n },\n animated: {\n type: Boolean,\n default: true\n },\n checkboxPlacement: {\n type: String,\n default: 'left'\n },\n virtualScroll: Boolean,\n watchProps: Array,\n renderLabel: Function,\n renderPrefix: Function,\n renderSuffix: Function,\n nodeProps: Function,\n keyboard: {\n type: Boolean,\n default: true\n },\n getChildren: Function,\n onDragenter: [Function, Array],\n onDragleave: [Function, Array],\n onDragend: [Function, Array],\n onDragstart: [Function, Array],\n onDragover: [Function, Array],\n onDrop: [Function, Array],\n onUpdateCheckedKeys: [Function, Array],\n 'onUpdate:checkedKeys': [Function, Array],\n onUpdateSelectedKeys: [Function, Array],\n 'onUpdate:selectedKeys': [Function, Array]\n}), treeSharedProps), {\n // internal props for tree-select\n internalTreeSelect: Boolean,\n internalScrollable: Boolean,\n internalScrollablePadding: String,\n // use it to display\n internalRenderEmpty: Function,\n internalHighlightKeySet: Object,\n internalUnifySelectCheck: Boolean,\n internalCheckboxFocusable: {\n type: Boolean,\n default: true\n },\n internalFocusable: {\n // Make tree-select take over keyboard operations\n type: Boolean,\n default: true\n },\n checkStrategy: {\n type: String,\n default: 'all'\n },\n /**\n * @deprecated\n */\n leafOnly: Boolean\n});\nexport default defineComponent({\n name: 'Tree',\n props: treeProps,\n setup(props) {\n if (process.env.NODE_ENV !== 'production') {\n watchEffect(() => {\n if (props.leafOnly) {\n warnOnce('tree', '`leaf-only` is deprecated, please use `check-strategy=\"child\"` instead');\n }\n });\n }\n const {\n mergedClsPrefixRef,\n inlineThemeDisabled,\n mergedRtlRef\n } = useConfig(props);\n const rtlEnabledRef = useRtl('Tree', mergedRtlRef, mergedClsPrefixRef);\n const themeRef = useTheme('Tree', '-tree', style, treeLight, props, mergedClsPrefixRef);\n const selfElRef = ref(null);\n const scrollbarInstRef = ref(null);\n const virtualListInstRef = ref(null);\n function getScrollContainer() {\n var _a;\n return (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.listElRef;\n }\n function getScrollContent() {\n var _a;\n return (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.itemsElRef;\n }\n const mergedFilterRef = computed(() => {\n const {\n filter\n } = props;\n if (filter) return filter;\n const {\n labelField\n } = props;\n return (pattern, node) => {\n if (!pattern.length) return true;\n const label = node[labelField];\n if (typeof label === 'string') {\n return label.toLowerCase().includes(pattern.toLowerCase());\n }\n return false;\n };\n });\n const filteredTreeInfoRef = computed(() => {\n const {\n pattern\n } = props;\n if (!pattern) {\n return {\n filteredTree: props.data,\n highlightKeySet: null,\n expandedKeys: undefined\n };\n }\n if (!pattern.length || !mergedFilterRef.value) {\n return {\n filteredTree: props.data,\n highlightKeySet: null,\n expandedKeys: undefined\n };\n }\n return filterTree(props.data, mergedFilterRef.value, pattern, props.keyField, props.childrenField);\n });\n // We don't expect data source to change so we just determine it once\n const displayTreeMateRef = computed(() => createTreeMate(props.showIrrelevantNodes ? props.data : filteredTreeInfoRef.value.filteredTree, createTreeMateOptions(props.keyField, props.childrenField, props.disabledField, props.getChildren)));\n const treeSelectInjection = inject(treeSelectInjectionKey, null);\n const dataTreeMateRef = props.internalTreeSelect ? treeSelectInjection.dataTreeMate : displayTreeMateRef;\n const {\n watchProps\n } = props;\n const uncontrolledCheckedKeysRef = ref([]);\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultCheckedKeys')) {\n watchEffect(() => {\n uncontrolledCheckedKeysRef.value = props.defaultCheckedKeys;\n });\n } else {\n uncontrolledCheckedKeysRef.value = props.defaultCheckedKeys;\n }\n const controlledCheckedKeysRef = toRef(props, 'checkedKeys');\n const mergedCheckedKeysRef = useMergedState(controlledCheckedKeysRef, uncontrolledCheckedKeysRef);\n const checkedStatusRef = computed(() => {\n const value = dataTreeMateRef.value.getCheckedKeys(mergedCheckedKeysRef.value, {\n cascade: props.cascade,\n allowNotLoaded: props.allowCheckingNotLoaded\n });\n return value;\n });\n const mergedCheckStrategyRef = useMergedCheckStrategy(props);\n const displayedCheckedKeysRef = computed(() => {\n return checkedStatusRef.value.checkedKeys;\n });\n const displayedIndeterminateKeysRef = computed(() => {\n const {\n indeterminateKeys\n } = props;\n if (indeterminateKeys !== undefined) return indeterminateKeys;\n return checkedStatusRef.value.indeterminateKeys;\n });\n const uncontrolledSelectedKeysRef = ref([]);\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultSelectedKeys')) {\n watchEffect(() => {\n uncontrolledSelectedKeysRef.value = props.defaultSelectedKeys;\n });\n } else {\n uncontrolledSelectedKeysRef.value = props.defaultSelectedKeys;\n }\n const controlledSelectedKeysRef = toRef(props, 'selectedKeys');\n const mergedSelectedKeysRef = useMergedState(controlledSelectedKeysRef, uncontrolledSelectedKeysRef);\n const uncontrolledExpandedKeysRef = ref([]);\n const initUncontrolledExpandedKeys = keys => {\n uncontrolledExpandedKeysRef.value = props.defaultExpandAll ? dataTreeMateRef.value.getNonLeafKeys() : keys === undefined ? props.defaultExpandedKeys : keys;\n };\n if (watchProps === null || watchProps === void 0 ? void 0 : watchProps.includes('defaultExpandedKeys')) {\n // if watching defaultExpandedKeys, we use access props.defaultExpandedKeys inside initiator\n watchEffect(() => {\n initUncontrolledExpandedKeys(undefined);\n });\n } else {\n // We by default watchEffect since if defaultExpandAll is true, we should remain tree expand if data changes\n watchEffect(() => {\n initUncontrolledExpandedKeys(props.defaultExpandedKeys);\n });\n }\n const controlledExpandedKeysRef = toRef(props, 'expandedKeys');\n const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);\n const fNodesRef = computed(() => displayTreeMateRef.value.getFlattenedNodes(mergedExpandedKeysRef.value));\n const {\n pendingNodeKeyRef,\n handleKeydown\n } = useKeyboard({\n props,\n mergedCheckedKeysRef,\n mergedSelectedKeysRef,\n fNodesRef,\n mergedExpandedKeysRef,\n handleCheck,\n handleSelect,\n handleSwitcherClick\n });\n let expandTimerId = null;\n let nodeKeyToBeExpanded = null;\n const uncontrolledHighlightKeySetRef = ref(new Set());\n const controlledHighlightKeySetRef = computed(() => {\n return props.internalHighlightKeySet || filteredTreeInfoRef.value.highlightKeySet;\n });\n const mergedHighlightKeySetRef = useMergedState(controlledHighlightKeySetRef, uncontrolledHighlightKeySetRef);\n const loadingKeysRef = ref(new Set());\n const expandedNonLoadingKeysRef = computed(() => {\n return mergedExpandedKeysRef.value.filter(key => !loadingKeysRef.value.has(key));\n });\n let dragStartX = 0;\n const draggingNodeRef = ref(null);\n const droppingNodeRef = ref(null);\n const droppingMouseNodeRef = ref(null);\n const droppingPositionRef = ref(null);\n const droppingOffsetLevelRef = ref(0);\n const droppingNodeParentRef = computed(() => {\n const {\n value: droppingNode\n } = droppingNodeRef;\n if (!droppingNode) return null;\n // May avoid overlap between line mark of first child & rect mark of parent\n // if (droppingNode.isFirstChild && droppingPositionRef.value === 'before') {\n // return null\n // }\n return droppingNode.parent;\n });\n // shallow watch data\n let isDataReset = false;\n watch(toRef(props, 'data'), () => {\n isDataReset = true;\n void nextTick(() => {\n isDataReset = false;\n });\n loadingKeysRef.value.clear();\n pendingNodeKeyRef.value = null;\n resetDndState();\n }, {\n deep: false\n });\n let expandAnimationDisabled = false;\n const disableExpandAnimationForOneTick = () => {\n expandAnimationDisabled = true;\n void nextTick(() => {\n expandAnimationDisabled = false;\n });\n };\n let memoizedExpandedKeys;\n watch(toRef(props, 'pattern'), (value, oldValue) => {\n if (props.showIrrelevantNodes) {\n memoizedExpandedKeys = undefined;\n if (value) {\n const {\n expandedKeys: expandedKeysAfterChange,\n highlightKeySet\n } = keysWithFilter(props.data, props.pattern, props.keyField, props.childrenField, mergedFilterRef.value);\n uncontrolledHighlightKeySetRef.value = highlightKeySet;\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(expandedKeysAfterChange, getOptionsByKeys(expandedKeysAfterChange), {\n node: null,\n action: 'filter'\n });\n } else {\n uncontrolledHighlightKeySetRef.value = new Set();\n }\n } else {\n if (!value.length) {\n if (memoizedExpandedKeys !== undefined) {\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(memoizedExpandedKeys, getOptionsByKeys(memoizedExpandedKeys), {\n node: null,\n action: 'filter'\n });\n }\n } else {\n if (!oldValue.length) {\n memoizedExpandedKeys = mergedExpandedKeysRef.value;\n }\n const {\n expandedKeys\n } = filteredTreeInfoRef.value;\n if (expandedKeys !== undefined) {\n disableExpandAnimationForOneTick();\n doUpdateExpandedKeys(expandedKeys, getOptionsByKeys(expandedKeys), {\n node: null,\n action: 'filter'\n });\n }\n }\n }\n });\n function triggerLoading(node) {\n return __awaiter(this, void 0, void 0, function* () {\n const {\n onLoad\n } = props;\n if (!onLoad) {\n if (process.env.NODE_ENV !== 'production') {\n warn('tree', 'There is unloaded node in data but props.onLoad is not specified.');\n }\n yield Promise.resolve();\n return;\n }\n const {\n value: loadingKeys\n } = loadingKeysRef;\n if (!loadingKeys.has(node.key)) {\n loadingKeys.add(node.key);\n try {\n const loadResult = yield onLoad(node.rawNode);\n if (loadResult === false) {\n resetDragExpandState();\n }\n } catch (loadError) {\n console.error(loadError);\n resetDragExpandState();\n }\n loadingKeys.delete(node.key);\n }\n });\n }\n watchEffect(() => {\n var _a;\n const {\n value: displayTreeMate\n } = displayTreeMateRef;\n if (!displayTreeMate) return;\n const {\n getNode\n } = displayTreeMate;\n (_a = mergedExpandedKeysRef.value) === null || _a === void 0 ? void 0 : _a.forEach(key => {\n const node = getNode(key);\n if (node && !node.shallowLoaded) {\n void triggerLoading(node);\n }\n });\n });\n // animation in progress\n const aipRef = ref(false);\n // animation flattened nodes\n const afNodesRef = ref([]);\n // Note: Since the virtual list depends on min height, if there's a node\n // whose height starts from 0, the virtual list will have a wrong height\n // during animation. This will seldom cause wired scrollbar status. It is\n // fixable and need some changes in vueuc, I've no time so I just leave it\n // here. Maybe the bug won't be fixed during the life time of the project.\n watch(expandedNonLoadingKeysRef, (value, prevValue) => {\n if (!props.animated || expandAnimationDisabled) {\n void nextTick(syncScrollbar);\n return;\n }\n if (isDataReset) {\n return;\n }\n const nodeHeight = depx(themeRef.value.self.nodeHeight);\n const prevVSet = new Set(prevValue);\n let addedKey = null;\n let removedKey = null;\n for (const expandedKey of value) {\n if (!prevVSet.has(expandedKey)) {\n if (addedKey !== null) return; // multi expand, not triggered by click\n addedKey = expandedKey;\n }\n }\n const currentVSet = new Set(value);\n for (const expandedKey of prevValue) {\n if (!currentVSet.has(expandedKey)) {\n if (removedKey !== null) return; // multi collapse, not triggered by click\n removedKey = expandedKey;\n }\n }\n if (addedKey === null && removedKey === null) {\n // 1. multi action, not triggered by click\n // 2. no action, don't know what happened\n return;\n }\n const {\n virtualScroll\n } = props;\n const viewportHeight = (virtualScroll ? virtualListInstRef.value.listElRef : selfElRef.value).offsetHeight;\n const viewportItemCount = Math.ceil(viewportHeight / nodeHeight) + 1;\n // play add animation\n let baseExpandedKeys;\n if (addedKey !== null) {\n baseExpandedKeys = prevValue;\n }\n if (removedKey !== null) {\n if (baseExpandedKeys === undefined) {\n baseExpandedKeys = value;\n } else {\n baseExpandedKeys = baseExpandedKeys.filter(key => key !== removedKey);\n }\n }\n aipRef.value = true;\n afNodesRef.value = displayTreeMateRef.value.getFlattenedNodes(baseExpandedKeys);\n if (addedKey !== null) {\n const expandedNodeIndex = afNodesRef.value.findIndex(node => node.key === addedKey);\n if (~expandedNodeIndex) {\n const children =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n afNodesRef.value[expandedNodeIndex].children;\n // sometimes user will pass leaf keys in\n if (children) {\n const expandedChildren = flatten(children, value);\n afNodesRef.value.splice(expandedNodeIndex + 1, 0, {\n __motion: true,\n mode: 'expand',\n height: virtualScroll ? expandedChildren.length * nodeHeight : undefined,\n nodes: virtualScroll ? expandedChildren.slice(0, viewportItemCount) : expandedChildren\n });\n }\n }\n }\n if (removedKey !== null) {\n const collapsedNodeIndex = afNodesRef.value.findIndex(node => node.key === removedKey);\n if (~collapsedNodeIndex) {\n const collapsedNodeChildren = afNodesRef.value[collapsedNodeIndex].children;\n // Sometime the whole tree is change, remove a key doesn't mean it is collapsed,\n // but maybe children removed\n if (!collapsedNodeChildren) return;\n // play remove animation\n aipRef.value = true;\n const collapsedChildren = flatten(collapsedNodeChildren, value);\n afNodesRef.value.splice(collapsedNodeIndex + 1, 0, {\n __motion: true,\n mode: 'collapse',\n height: virtualScroll ? collapsedChildren.length * nodeHeight : undefined,\n nodes: virtualScroll ? collapsedChildren.slice(0, viewportItemCount) : collapsedChildren\n });\n }\n }\n });\n const getFIndexRef = computed(() => {\n return createIndexGetter(fNodesRef.value);\n });\n const mergedFNodesRef = computed(() => {\n if (aipRef.value) return afNodesRef.value;else return fNodesRef.value;\n });\n function syncScrollbar() {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if (scrollbarInst) scrollbarInst.sync();\n }\n function handleAfterEnter() {\n aipRef.value = false;\n if (props.virtualScroll) {\n // If virtual scroll, we won't listen to resize during animation, so\n // resize callback of virtual list won't be called and as a result\n // scrollbar won't sync. We need to sync scrollbar manually.\n void nextTick(syncScrollbar);\n }\n }\n function getOptionsByKeys(keys) {\n const {\n getNode\n } = dataTreeMateRef.value;\n return keys.map(key => {\n var _a;\n return ((_a = getNode(key)) === null || _a === void 0 ? void 0 : _a.rawNode) || null;\n });\n }\n function doUpdateExpandedKeys(value, option, meta) {\n const {\n 'onUpdate:expandedKeys': _onUpdateExpandedKeys,\n onUpdateExpandedKeys\n } = props;\n uncontrolledExpandedKeysRef.value = value;\n if (_onUpdateExpandedKeys) {\n call(_onUpdateExpandedKeys, value, option, meta);\n }\n if (onUpdateExpandedKeys) {\n call(onUpdateExpandedKeys, value, option, meta);\n }\n }\n function doUpdateCheckedKeys(value, option, meta) {\n const {\n 'onUpdate:checkedKeys': _onUpdateCheckedKeys,\n onUpdateCheckedKeys\n } = props;\n uncontrolledCheckedKeysRef.value = value;\n if (onUpdateCheckedKeys) {\n call(onUpdateCheckedKeys, value, option, meta);\n }\n if (_onUpdateCheckedKeys) {\n call(_onUpdateCheckedKeys, value, option, meta);\n }\n }\n function doUpdateIndeterminateKeys(value, option) {\n const {\n 'onUpdate:indeterminateKeys': _onUpdateIndeterminateKeys,\n onUpdateIndeterminateKeys\n } = props;\n if (_onUpdateIndeterminateKeys) {\n call(_onUpdateIndeterminateKeys, value, option);\n }\n if (onUpdateIndeterminateKeys) {\n call(onUpdateIndeterminateKeys, value, option);\n }\n }\n function doUpdateSelectedKeys(value, option, meta) {\n const {\n 'onUpdate:selectedKeys': _onUpdateSelectedKeys,\n onUpdateSelectedKeys\n } = props;\n uncontrolledSelectedKeysRef.value = value;\n if (onUpdateSelectedKeys) {\n call(onUpdateSelectedKeys, value, option, meta);\n }\n if (_onUpdateSelectedKeys) {\n call(_onUpdateSelectedKeys, value, option, meta);\n }\n }\n // Drag & Drop\n function doDragEnter(info) {\n const {\n onDragenter\n } = props;\n if (onDragenter) call(onDragenter, info);\n }\n function doDragLeave(info) {\n const {\n onDragleave\n } = props;\n if (onDragleave) call(onDragleave, info);\n }\n function doDragEnd(info) {\n const {\n onDragend\n } = props;\n if (onDragend) call(onDragend, info);\n }\n function doDragStart(info) {\n const {\n onDragstart\n } = props;\n if (onDragstart) call(onDragstart, info);\n }\n function doDragOver(info) {\n const {\n onDragover\n } = props;\n if (onDragover) call(onDragover, info);\n }\n function doDrop(info) {\n const {\n onDrop\n } = props;\n if (onDrop) call(onDrop, info);\n }\n function resetDndState() {\n resetDragState();\n resetDropState();\n }\n function resetDragState() {\n draggingNodeRef.value = null;\n }\n function resetDropState() {\n droppingOffsetLevelRef.value = 0;\n droppingNodeRef.value = null;\n droppingMouseNodeRef.value = null;\n droppingPositionRef.value = null;\n resetDragExpandState();\n }\n function resetDragExpandState() {\n if (expandTimerId) {\n window.clearTimeout(expandTimerId);\n expandTimerId = null;\n }\n nodeKeyToBeExpanded = null;\n }\n function handleCheck(node, checked) {\n // We don't guard for leaf only since we have done it in view layer\n if (props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n if (props.internalUnifySelectCheck && !props.multiple) {\n handleSelect(node);\n return;\n }\n const checkedAction = checked ? 'check' : 'uncheck';\n const {\n checkedKeys,\n indeterminateKeys\n } = dataTreeMateRef.value[checkedAction](node.key, displayedCheckedKeysRef.value, {\n cascade: props.cascade,\n checkStrategy: mergedCheckStrategyRef.value,\n allowNotLoaded: props.allowCheckingNotLoaded\n });\n doUpdateCheckedKeys(checkedKeys, getOptionsByKeys(checkedKeys), {\n node: node.rawNode,\n action: checkedAction\n });\n doUpdateIndeterminateKeys(indeterminateKeys, getOptionsByKeys(indeterminateKeys));\n }\n function toggleExpand(node) {\n if (props.disabled) return;\n const {\n key\n } = node;\n const {\n value: mergedExpandedKeys\n } = mergedExpandedKeysRef;\n const index = mergedExpandedKeys.findIndex(expandNodeId => expandNodeId === key);\n if (~index) {\n const expandedKeysAfterChange = Array.from(mergedExpandedKeys);\n expandedKeysAfterChange.splice(index, 1);\n doUpdateExpandedKeys(expandedKeysAfterChange, getOptionsByKeys(expandedKeysAfterChange), {\n node: node.rawNode,\n action: 'collapse'\n });\n } else {\n const nodeToBeExpanded = displayTreeMateRef.value.getNode(key);\n if (!nodeToBeExpanded || nodeToBeExpanded.isLeaf) {\n return;\n }\n let nextKeys;\n if (props.accordion) {\n const siblingKeySet = new Set(node.siblings.map(({\n key\n }) => key));\n nextKeys = mergedExpandedKeys.filter(expandedKey => {\n return !siblingKeySet.has(expandedKey);\n });\n nextKeys.push(key);\n } else {\n nextKeys = mergedExpandedKeys.concat(key);\n }\n doUpdateExpandedKeys(nextKeys, getOptionsByKeys(nextKeys), {\n node: node.rawNode,\n action: 'expand'\n });\n }\n }\n function handleSwitcherClick(node) {\n if (props.disabled || aipRef.value) return;\n toggleExpand(node);\n }\n function handleSelect(node) {\n if (props.disabled || !props.selectable) {\n return;\n }\n pendingNodeKeyRef.value = node.key;\n if (props.internalUnifySelectCheck) {\n const {\n value: {\n checkedKeys,\n indeterminateKeys\n }\n } = checkedStatusRef;\n if (props.multiple) {\n handleCheck(node, !(checkedKeys.includes(node.key) || indeterminateKeys.includes(node.key)));\n } else {\n doUpdateCheckedKeys([node.key], getOptionsByKeys([node.key]), {\n node: node.rawNode,\n action: 'check'\n });\n }\n }\n if (props.multiple) {\n const selectedKeys = Array.from(mergedSelectedKeysRef.value);\n const index = selectedKeys.findIndex(key => key === node.key);\n if (~index) {\n if (props.cancelable) {\n selectedKeys.splice(index, 1);\n }\n } else if (!~index) {\n selectedKeys.push(node.key);\n }\n doUpdateSelectedKeys(selectedKeys, getOptionsByKeys(selectedKeys), {\n node: node.rawNode,\n action: ~index ? 'unselect' : 'select'\n });\n } else {\n const selectedKeys = mergedSelectedKeysRef.value;\n if (selectedKeys.includes(node.key)) {\n if (props.cancelable) {\n doUpdateSelectedKeys([], [], {\n node: node.rawNode,\n action: 'unselect'\n });\n }\n } else {\n doUpdateSelectedKeys([node.key], getOptionsByKeys([node.key]), {\n node: node.rawNode,\n action: 'select'\n });\n }\n }\n }\n function expandDragEnterNode(node) {\n if (expandTimerId) {\n window.clearTimeout(expandTimerId);\n expandTimerId = null;\n }\n // Don't expand leaf node.\n if (node.isLeaf) return;\n nodeKeyToBeExpanded = node.key;\n const expand = () => {\n if (nodeKeyToBeExpanded !== node.key) return;\n const {\n value: droppingMouseNode\n } = droppingMouseNodeRef;\n if (droppingMouseNode && droppingMouseNode.key === node.key && !mergedExpandedKeysRef.value.includes(node.key)) {\n const nextKeys = mergedExpandedKeysRef.value.concat(node.key);\n doUpdateExpandedKeys(nextKeys, getOptionsByKeys(nextKeys), {\n node: node.rawNode,\n action: 'expand'\n });\n }\n expandTimerId = null;\n nodeKeyToBeExpanded = null;\n };\n if (!node.shallowLoaded) {\n expandTimerId = window.setTimeout(() => {\n void triggerLoading(node).then(() => {\n expand();\n });\n }, 1000);\n } else {\n expandTimerId = window.setTimeout(() => {\n expand();\n }, 1000);\n }\n }\n // Dnd\n function handleDragEnter({\n event,\n node\n }) {\n // node should be a tmNode\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n handleDragOver({\n event,\n node\n }, false);\n doDragEnter({\n event,\n node: node.rawNode\n });\n }\n function handleDragLeave({\n event,\n node\n }) {\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n doDragLeave({\n event,\n node: node.rawNode\n });\n }\n function handleDragLeaveTree(e) {\n if (e.target !== e.currentTarget) return;\n resetDropState();\n }\n // Dragend is ok, we don't need to add global listener to reset drag status\n function handleDragEnd({\n event,\n node\n }) {\n resetDndState();\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n doDragEnd({\n event,\n node: node.rawNode\n });\n }\n function handleDragStart({\n event,\n node\n }) {\n var _a;\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n // Most of time, the image will block user's view\n emptyImage && ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.setDragImage(emptyImage, 0, 0));\n dragStartX = event.clientX;\n draggingNodeRef.value = node;\n doDragStart({\n event,\n node: node.rawNode\n });\n }\n function handleDragOver({\n event,\n node\n }, emit = true) {\n var _a;\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n const {\n value: draggingNode\n } = draggingNodeRef;\n if (!draggingNode) return;\n const {\n allowDrop,\n indent\n } = props;\n if (emit) doDragOver({\n event,\n node: node.rawNode\n });\n // Update dropping node\n const el = event.currentTarget;\n const {\n height: elOffsetHeight,\n top: elClientTop\n } = el.getBoundingClientRect();\n const eventOffsetY = event.clientY - elClientTop;\n let mousePosition;\n const allowDropInside = allowDrop({\n node: node.rawNode,\n dropPosition: 'inside',\n phase: 'drag'\n });\n if (allowDropInside) {\n if (eventOffsetY <= 8) {\n mousePosition = 'before';\n } else if (eventOffsetY >= elOffsetHeight - 8) {\n mousePosition = 'after';\n } else {\n mousePosition = 'inside';\n }\n } else {\n if (eventOffsetY <= elOffsetHeight / 2) {\n mousePosition = 'before';\n } else {\n mousePosition = 'after';\n }\n }\n const {\n value: getFindex\n } = getFIndexRef;\n /** determine the drop position and drop node */\n /** the dropping node needn't to be the mouse hovering node! */\n /**\n * if there is something i've learned from implementing a complex\n * drag & drop. that is never write unit test before you really figure\n * out what behavior is exactly you want.\n */\n let finalDropNode;\n let finalDropPosition;\n const hoverNodeFIndex = getFindex(node.key);\n if (hoverNodeFIndex === null) {\n resetDropState();\n return;\n }\n let mouseAtExpandedNonLeafNode = false;\n if (mousePosition === 'inside') {\n finalDropNode = node;\n finalDropPosition = 'inside';\n } else {\n if (mousePosition === 'before') {\n if (node.isFirstChild) {\n finalDropNode = node;\n finalDropPosition = 'before';\n } else {\n finalDropNode = fNodesRef.value[hoverNodeFIndex - 1];\n finalDropPosition = 'after';\n }\n } else {\n finalDropNode = node;\n finalDropPosition = 'after';\n }\n }\n // If the node is non-leaf and it is expanded, we don't allow it to\n // drop after it and change it to drop before its next view sibling\n if (!finalDropNode.isLeaf && mergedExpandedKeysRef.value.includes(finalDropNode.key)) {\n mouseAtExpandedNonLeafNode = true;\n if (finalDropPosition === 'after') {\n finalDropNode = fNodesRef.value[hoverNodeFIndex + 1];\n if (!finalDropNode) {\n // maybe there is no next view sibling when non-leaf node has no\n // children and it is the last node in the tree\n finalDropNode = node;\n finalDropPosition = 'inside';\n } else {\n finalDropPosition = 'before';\n }\n }\n }\n const droppingMouseNode = finalDropNode;\n droppingMouseNodeRef.value = droppingMouseNode;\n // This is a speacial case, user is dragging a last child itself, so we\n // only view it as they are trying to drop after it.\n // There are some relevant codes in bailout 1's child branch.\n // Also, the expand bailout should have a high priority. If it's non-leaf\n // node and expanded, keep its origin drop position\n if (!mouseAtExpandedNonLeafNode && draggingNode.isLastChild && draggingNode.key === finalDropNode.key) {\n finalDropPosition = 'after';\n }\n if (finalDropPosition === 'after') {\n let offset = dragStartX - event.clientX; // drag left => > 0\n let offsetLevel = 0;\n while (offset >= indent / 2 &&\n // divide by 2 to make it easier to trigger\n finalDropNode.parent !== null && finalDropNode.isLastChild && offsetLevel < 1) {\n offset -= indent;\n offsetLevel += 1;\n finalDropNode = finalDropNode.parent;\n }\n droppingOffsetLevelRef.value = offsetLevel;\n } else {\n droppingOffsetLevelRef.value = 0;\n }\n // Bailout 1\n // Drag self into self\n // Drag it into direct parent\n if (draggingNode.contains(finalDropNode) || finalDropPosition === 'inside' && ((_a = draggingNode.parent) === null || _a === void 0 ? void 0 : _a.key) === finalDropNode.key) {\n if (draggingNode.key === droppingMouseNode.key && draggingNode.key === finalDropNode.key) {\n // This is special case that we want ui to show a mark to guide user\n // to start dragging. Nor they will think nothing happens.\n // However this is an invalid drop, we need to guard it inside\n // handleDrop\n } else {\n resetDropState();\n return;\n }\n }\n // Bailout 3\n if (!allowDrop({\n node: finalDropNode.rawNode,\n dropPosition: finalDropPosition,\n phase: 'drag'\n })) {\n resetDropState();\n return;\n }\n if (draggingNode.key === finalDropNode.key) {\n // don't expand when drag on itself\n resetDragExpandState();\n } else {\n if (nodeKeyToBeExpanded !== finalDropNode.key) {\n if (finalDropPosition === 'inside') {\n if (props.expandOnDragenter) {\n expandDragEnterNode(finalDropNode);\n // Bailout 4\n // not try to loading\n if (!finalDropNode.shallowLoaded && nodeKeyToBeExpanded !== finalDropNode.key) {\n resetDndState();\n return;\n }\n } else {\n // Bailout 5\n // never expands on drag\n if (!finalDropNode.shallowLoaded) {\n resetDndState();\n return;\n }\n }\n } else {\n resetDragExpandState();\n }\n } else {\n if (finalDropPosition !== 'inside') {\n resetDragExpandState();\n }\n }\n }\n droppingPositionRef.value = finalDropPosition;\n droppingNodeRef.value = finalDropNode;\n }\n function handleDrop({\n event,\n node,\n dropPosition\n }) {\n if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {\n return;\n }\n const {\n value: draggingNode\n } = draggingNodeRef;\n const {\n value: droppingNode\n } = droppingNodeRef;\n const {\n value: droppingPosition\n } = droppingPositionRef;\n if (!draggingNode || !droppingNode || !droppingPosition) {\n return;\n }\n // Bailout 1\n if (!props.allowDrop({\n node: droppingNode.rawNode,\n dropPosition: droppingPosition,\n phase: 'drag'\n })) {\n return;\n }\n // Bailout 2\n // This is a special case to guard since we want ui to show the status\n // but not to emit a event\n if (draggingNode.key === droppingNode.key) {\n return;\n }\n // Bailout 3\n // insert before its next node\n // insert after its prev node\n if (droppingPosition === 'before') {\n const nextNode = draggingNode.getNext({\n includeDisabled: true\n });\n if (nextNode) {\n if (nextNode.key === droppingNode.key) {\n resetDropState();\n return;\n }\n }\n }\n if (droppingPosition === 'after') {\n const prevNode = draggingNode.getPrev({\n includeDisabled: true\n });\n if (prevNode) {\n if (prevNode.key === droppingNode.key) {\n resetDropState();\n return;\n }\n }\n }\n doDrop({\n event,\n node: droppingNode.rawNode,\n dragNode: draggingNode.rawNode,\n dropPosition\n });\n resetDndState();\n }\n function handleScroll() {\n syncScrollbar();\n }\n function handleResize() {\n syncScrollbar();\n }\n function handleFocusout(e) {\n var _a;\n if (props.virtualScroll || props.internalScrollable) {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if ((_a = scrollbarInst === null || scrollbarInst === void 0 ? void 0 : scrollbarInst.containerRef) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) {\n return;\n }\n pendingNodeKeyRef.value = null;\n } else {\n const {\n value: selfEl\n } = selfElRef;\n if (selfEl === null || selfEl === void 0 ? void 0 : selfEl.contains(e.relatedTarget)) return;\n pendingNodeKeyRef.value = null;\n }\n }\n watch(pendingNodeKeyRef, value => {\n var _a, _b;\n if (value === null) return;\n if (props.virtualScroll) {\n (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo({\n key: value\n });\n } else if (props.internalScrollable) {\n const {\n value: scrollbarInst\n } = scrollbarInstRef;\n if (scrollbarInst === null) return;\n const targetEl = (_b = scrollbarInst.contentRef) === null || _b === void 0 ? void 0 : _b.querySelector(`[data-key=\"${createDataKey(value)}\"]`);\n if (!targetEl) return;\n scrollbarInst.scrollTo({\n el: targetEl\n });\n }\n });\n provide(treeInjectionKey, {\n loadingKeysRef,\n highlightKeySetRef: mergedHighlightKeySetRef,\n displayedCheckedKeysRef,\n displayedIndeterminateKeysRef,\n mergedSelectedKeysRef,\n mergedExpandedKeysRef,\n mergedThemeRef: themeRef,\n mergedCheckStrategyRef,\n nodePropsRef: toRef(props, 'nodeProps'),\n disabledRef: toRef(props, 'disabled'),\n checkableRef: toRef(props, 'checkable'),\n selectableRef: toRef(props, 'selectable'),\n expandOnClickRef: toRef(props, 'expandOnClick'),\n onLoadRef: toRef(props, 'onLoad'),\n draggableRef: toRef(props, 'draggable'),\n blockLineRef: toRef(props, 'blockLine'),\n indentRef: toRef(props, 'indent'),\n cascadeRef: toRef(props, 'cascade'),\n checkOnClickRef: toRef(props, 'checkOnClick'),\n checkboxPlacementRef: props.checkboxPlacement,\n droppingMouseNodeRef,\n droppingNodeParentRef,\n draggingNodeRef,\n droppingPositionRef,\n droppingOffsetLevelRef,\n fNodesRef,\n pendingNodeKeyRef,\n showLineRef: toRef(props, 'showLine'),\n disabledFieldRef: toRef(props, 'disabledField'),\n internalScrollableRef: toRef(props, 'internalScrollable'),\n internalCheckboxFocusableRef: toRef(props, 'internalCheckboxFocusable'),\n internalTreeSelect: props.internalTreeSelect,\n renderLabelRef: toRef(props, 'renderLabel'),\n renderPrefixRef: toRef(props, 'renderPrefix'),\n renderSuffixRef: toRef(props, 'renderSuffix'),\n renderSwitcherIconRef: toRef(props, 'renderSwitcherIcon'),\n labelFieldRef: toRef(props, 'labelField'),\n multipleRef: toRef(props, 'multiple'),\n overrideDefaultNodeClickBehaviorRef: toRef(props, 'overrideDefaultNodeClickBehavior'),\n handleSwitcherClick,\n handleDragEnd,\n handleDragEnter,\n handleDragLeave,\n handleDragStart,\n handleDrop,\n handleDragOver,\n handleSelect,\n handleCheck\n });\n function scrollTo(options, y) {\n var _a, _b;\n if (typeof options === 'number') {\n (_a = virtualListInstRef.value) === null || _a === void 0 ? void 0 : _a.scrollTo(options, y || 0);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n (_b = virtualListInstRef.value) === null || _b === void 0 ? void 0 : _b.scrollTo(options);\n }\n }\n const exposedMethods = {\n handleKeydown,\n scrollTo,\n getCheckedData: () => {\n if (!props.checkable) return {\n keys: [],\n options: []\n };\n const {\n checkedKeys\n } = checkedStatusRef.value;\n return {\n keys: checkedKeys,\n options: getOptionsByKeys(checkedKeys)\n };\n },\n getIndeterminateData: () => {\n if (!props.checkable) return {\n keys: [],\n options: []\n };\n const {\n indeterminateKeys\n } = checkedStatusRef.value;\n return {\n keys: indeterminateKeys,\n options: getOptionsByKeys(indeterminateKeys)\n };\n }\n };\n const cssVarsRef = computed(() => {\n const {\n common: {\n cubicBezierEaseInOut\n },\n self: {\n fontSize,\n nodeBorderRadius,\n nodeColorHover,\n nodeColorPressed,\n nodeColorActive,\n arrowColor,\n loadingColor,\n nodeTextColor,\n nodeTextColorDisabled,\n dropMarkColor,\n nodeWrapperPadding,\n nodeHeight,\n lineHeight,\n lineColor\n }\n } = themeRef.value;\n const lineOffsetTop = getPadding(nodeWrapperPadding, 'top');\n const lineOffsetBottom = getPadding(nodeWrapperPadding, 'bottom');\n const nodeContentHeight = pxfy(depx(nodeHeight) - depx(lineOffsetTop) - depx(lineOffsetBottom));\n return {\n '--n-arrow-color': arrowColor,\n '--n-loading-color': loadingColor,\n '--n-bezier': cubicBezierEaseInOut,\n '--n-font-size': fontSize,\n '--n-node-border-radius': nodeBorderRadius,\n '--n-node-color-active': nodeColorActive,\n '--n-node-color-hover': nodeColorHover,\n '--n-node-color-pressed': nodeColorPressed,\n '--n-node-text-color': nodeTextColor,\n '--n-node-text-color-disabled': nodeTextColorDisabled,\n '--n-drop-mark-color': dropMarkColor,\n '--n-node-wrapper-padding': nodeWrapperPadding,\n '--n-line-offset-top': `-${lineOffsetTop}`,\n '--n-line-offset-bottom': `-${lineOffsetBottom}`,\n '--n-node-content-height': nodeContentHeight,\n '--n-line-height': lineHeight,\n '--n-line-color': lineColor\n };\n });\n const themeClassHandle = inlineThemeDisabled ? useThemeClass('tree', undefined, cssVarsRef, props) : undefined;\n return Object.assign(Object.assign({}, exposedMethods), {\n mergedClsPrefix: mergedClsPrefixRef,\n mergedTheme: themeRef,\n rtlEnabled: rtlEnabledRef,\n fNodes: mergedFNodesRef,\n aip: aipRef,\n selfElRef,\n virtualListInstRef,\n scrollbarInstRef,\n handleFocusout,\n handleDragLeaveTree,\n handleScroll,\n getScrollContainer,\n getScrollContent,\n handleAfterEnter,\n handleResize,\n cssVars: inlineThemeDisabled ? undefined : cssVarsRef,\n themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,\n onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender\n });\n },\n render() {\n var _a;\n const {\n fNodes,\n internalRenderEmpty\n } = this;\n if (!fNodes.length && internalRenderEmpty) {\n return internalRenderEmpty();\n }\n const {\n mergedClsPrefix,\n blockNode,\n blockLine,\n draggable,\n disabled,\n internalFocusable,\n checkable,\n handleKeydown,\n rtlEnabled,\n handleFocusout,\n scrollbarProps\n } = this;\n const mergedFocusable = internalFocusable && !disabled;\n const tabindex = mergedFocusable ? '0' : undefined;\n const treeClass = [`${mergedClsPrefix}-tree`, rtlEnabled && `${mergedClsPrefix}-tree--rtl`, checkable && `${mergedClsPrefix}-tree--checkable`, (blockLine || blockNode) && `${mergedClsPrefix}-tree--block-node`, blockLine && `${mergedClsPrefix}-tree--block-line`];\n const createNode = tmNode => {\n return '__motion' in tmNode ? h(MotionWrapper, {\n height: tmNode.height,\n nodes: tmNode.nodes,\n clsPrefix: mergedClsPrefix,\n mode: tmNode.mode,\n onAfterEnter: this.handleAfterEnter\n }) : h(NTreeNode, {\n key: tmNode.key,\n tmNode: tmNode,\n clsPrefix: mergedClsPrefix\n });\n };\n if (this.virtualScroll) {\n const {\n mergedTheme,\n internalScrollablePadding\n } = this;\n const padding = getPadding(internalScrollablePadding || '0');\n return h(NxScrollbar, Object.assign({}, scrollbarProps, {\n ref: \"scrollbarInstRef\",\n onDragleave: draggable ? this.handleDragLeaveTree : undefined,\n container: this.getScrollContainer,\n content: this.getScrollContent,\n class: treeClass,\n theme: mergedTheme.peers.Scrollbar,\n themeOverrides: mergedTheme.peerOverrides.Scrollbar,\n tabindex: tabindex,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined\n }), {\n default: () => {\n var _a;\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n return !fNodes.length ? resolveSlot(this.$slots.empty, () => [h(NEmpty, {\n class: `${mergedClsPrefix}-tree__empty`,\n theme: this.mergedTheme.peers.Empty,\n themeOverrides: this.mergedTheme.peerOverrides.Empty\n })]) : h(VVirtualList, {\n ref: \"virtualListInstRef\",\n items: this.fNodes,\n itemSize: depx(mergedTheme.self.nodeHeight),\n ignoreItemResize: this.aip,\n paddingTop: padding.top,\n paddingBottom: padding.bottom,\n class: this.themeClass,\n style: [this.cssVars, {\n paddingLeft: padding.left,\n paddingRight: padding.right\n }],\n onScroll: this.handleScroll,\n onResize: this.handleResize,\n showScrollbar: false,\n itemResizable: true\n }, {\n default: ({\n item\n }) => createNode(item)\n });\n }\n });\n }\n const {\n internalScrollable\n } = this;\n treeClass.push(this.themeClass);\n (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this);\n if (internalScrollable) {\n return h(NxScrollbar, Object.assign({}, scrollbarProps, {\n class: treeClass,\n tabindex: tabindex,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined,\n style: this.cssVars,\n contentStyle: {\n padding: this.internalScrollablePadding\n }\n }), {\n default: () => h(\"div\", {\n onDragleave: draggable ? this.handleDragLeaveTree : undefined,\n ref: \"selfElRef\"\n }, this.fNodes.map(createNode))\n });\n } else {\n return h(\"div\", {\n class: treeClass,\n tabindex: tabindex,\n ref: \"selfElRef\",\n style: this.cssVars,\n onKeydown: mergedFocusable ? handleKeydown : undefined,\n onFocusout: mergedFocusable ? handleFocusout : undefined,\n onDragleave: draggable ? this.handleDragLeaveTree : undefined\n }, !fNodes.length ? resolveSlot(this.$slots.empty, () => [h(NEmpty, {\n class: `${mergedClsPrefix}-tree__empty`,\n theme: this.mergedTheme.peers.Empty,\n themeOverrides: this.mergedTheme.peerOverrides.Empty\n })]) : fNodes.map(createNode));\n }\n }\n});","\n\n","\n\n\n","\n\n\n","\n\n \n \n \n \n
\n \n\n","\n\n\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","var isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\nexport default isArrayLike;\n//# sourceMappingURL=is-array-like.js.map","import isArrayLike from './is-array-like';\nvar contains = function (arr, value) {\n if (!isArrayLike(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\nexport default contains;\n//# sourceMappingURL=contains.js.map","import isArrayLike from './is-array-like';\nvar filter = function (arr, func) {\n if (!isArrayLike(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\nexport default filter;\n//# sourceMappingURL=filter.js.map","import filter from './filter';\nimport contains from './contains';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) { values = []; }\n return filter(arr, function (value) { return !contains(values, value); });\n};\nexport default difference;\n//# sourceMappingURL=difference.js.map","var toString = {}.toString;\nvar isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };\nexport default isType;\n//# sourceMappingURL=is-type.js.map","/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\nimport isType from './is-type';\nexport default (function (value) {\n return isType(value, 'Function');\n});\n//# sourceMappingURL=is-function.js.map","// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\nexport default isNil;\n//# sourceMappingURL=is-nil.js.map","import isType from './is-type';\nexport default (function (value) {\n return Array.isArray ?\n Array.isArray(value) :\n isType(value, 'Array');\n});\n//# sourceMappingURL=is-array.js.map","export default (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return value !== null && type === 'object' || type === 'function';\n});\n//# sourceMappingURL=is-object.js.map","import isArray from './is-array';\nimport isObject from './is-object';\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (isArray(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n }\n else if (isObject(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\nexport default each;\n//# sourceMappingURL=each.js.map","import each from './each';\nimport isFunction from './is-function';\nvar keys = Object.keys ? function (obj) { return Object.keys(obj); } : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\nexport default keys;\n//# sourceMappingURL=keys.js.map","import isNil from './is-nil';\nimport keys from './keys';\nfunction isMatch(obj, attrs) {\n var _keys = keys(attrs);\n var length = _keys.length;\n if (isNil(obj))\n return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\nexport default isMatch;\n//# sourceMappingURL=is-match.js.map","var isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\nexport default isObjectLike;\n//# sourceMappingURL=is-object-like.js.map","import isObjectLike from './is-object-like';\nimport isType from './is-type';\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\nexport default isPlainObject;\n//# sourceMappingURL=is-plain-object.js.map","import isFunction from './is-function';\nimport isMatch from './is-match';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nfunction find(arr, predicate) {\n if (!isArray(arr))\n return null;\n var _predicate;\n if (isFunction(predicate)) {\n _predicate = predicate;\n }\n if (isPlainObject(predicate)) {\n _predicate = function (a) { return isMatch(a, predicate); };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\nexport default find;\n//# sourceMappingURL=find.js.map","function findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\nexport default findIndex;\n//# sourceMappingURL=find-index.js.map","import isNil from './is-nil';\nimport isArray from './is-array';\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n if (isArray(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n }\n else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\nexport default firstValue;\n//# sourceMappingURL=first-value.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!isArray(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\nexport default flatten;\n//# sourceMappingURL=flatten.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) { result = []; }\n if (!isArray(arr)) {\n result.push(arr);\n }\n else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\nexport default flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=max.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=min.js.map","import isArray from './is-array';\nimport { default as getMax } from './max';\nimport { default as getMin } from './min';\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) { return !isNaN(v); });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0,\n };\n }\n if (isArray(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = getMax(filterValues);\n var min = getMin(filterValues);\n return {\n min: min,\n max: max,\n };\n};\nexport default getRange;\n//# sourceMappingURL=get-range.js.map","var arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\nexport default pull;\n//# sourceMappingURL=pull.js.map","import isArrayLike from './is-array-like';\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!isArrayLike(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\nexport default pullAt;\n//# sourceMappingURL=pull-at.js.map","import each from './each';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar reduce = function (arr, fn, init) {\n if (!isArray(arr) && !isPlainObject(arr)) {\n return arr;\n }\n var result = init;\n each(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\nexport default reduce;\n//# sourceMappingURL=reduce.js.map","import isArrayLike from './is-array-like';\nimport pullAt from './pull-at';\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!isArrayLike(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n pullAt(arr, indexes);\n return result;\n};\nexport default remove;\n//# sourceMappingURL=remove.js.map","import isType from './is-type';\nexport default (function (str) {\n return isType(str, 'String');\n});\n//# sourceMappingURL=is-string.js.map","import isArray from './is-array';\nimport isString from './is-string';\nimport isFunction from './is-function';\nfunction sortBy(arr, key) {\n var comparer;\n if (isFunction(key)) {\n comparer = function (a, b) { return key(a) - key(b); };\n }\n else {\n var keys_1 = [];\n if (isString(key)) {\n keys_1.push(key);\n }\n else if (isArray(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\nexport default sortBy;\n//# sourceMappingURL=sort-by.js.map","export default function uniq(arr, cache) {\n if (cache === void 0) { cache = new Map(); }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n//# sourceMappingURL=uniq.js.map","import uniq from './uniq';\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return uniq([].concat.apply([], sources));\n};\nexport default union;\n//# sourceMappingURL=union.js.map","import isArray from './is-array';\nimport isNil from './is-nil';\nexport default (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n // flatten\n if (!isArray(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n//# sourceMappingURL=values-of-key.js.map","import isArrayLike from './is-array-like';\nexport default function head(o) {\n if (isArrayLike(o)) {\n return o[0];\n }\n return undefined;\n}\n//# sourceMappingURL=head.js.map","import isArrayLike from './is-array-like';\nexport default function last(o) {\n if (isArrayLike(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n//# sourceMappingURL=last.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction startsWith(arr, e) {\n return (isArray(arr) || isString(arr)) ? arr[0] === e : false;\n}\nexport default startsWith;\n//# sourceMappingURL=starts-with.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction endsWith(arr, e) {\n return (isArray(arr) || isString(arr)) ? arr[arr.length - 1] === e : false;\n}\nexport default endsWith;\n//# sourceMappingURL=ends-with.js.map","/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i))\n return false;\n }\n return true;\n};\nexport default every;\n//# sourceMappingURL=every.js.map","/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i))\n return true;\n }\n return false;\n};\nexport default some;\n//# sourceMappingURL=some.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !isArray(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = isFunction(condition) ? condition : function (item) { return item[condition]; };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n }\n else {\n result[key] = [item];\n }\n }\n return result;\n}\nexport default groupBy;\n//# sourceMappingURL=group-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nimport groupBy from './group-by';\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nexport default function groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data,\n };\n }\n if (!isFunction(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = isArray(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return groupBy(data, condition);\n}\n//# sourceMappingURL=group-to-map.js.map","import groupToMap from './group-to-map';\nexport default (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = groupToMap(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n//# sourceMappingURL=group.js.map","/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\nexport default getWrapBehavior;\n//# sourceMappingURL=get-wrap-behavior.js.map","/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\nexport default wrapBehavior;\n//# sourceMappingURL=wrap-behavior.js.map","var numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\nexport default numberToColor;\n//# sourceMappingURL=number2color.js.map","import isArray from './is-array';\nfunction parseRadius(radius) {\n var r1 = 0, r2 = 0, r3 = 0, r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n}\nexport default parseRadius;\n//# sourceMappingURL=parse-radius.js.map","var clamp = function (a, min, max) {\n if (a < min) {\n return min;\n }\n else if (a > max) {\n return max;\n }\n return a;\n};\nexport default clamp;\n//# sourceMappingURL=clamp.js.map","var fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\nexport default fixedBase;\n//# sourceMappingURL=fixed-base.js.map","/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\nimport isType from './is-type';\nvar isNumber = function (value) {\n return isType(value, 'Number');\n};\nexport default isNumber;\n//# sourceMappingURL=is-number.js.map","import isNumber from './is-number';\nvar isDecimal = function (num) {\n return isNumber(num) && num % 1 !== 0;\n};\nexport default isDecimal;\n//# sourceMappingURL=is-decimal.js.map","import isNumber from './is-number';\nvar isEven = function (num) {\n return isNumber(num) && num % 2 === 0;\n};\nexport default isEven;\n//# sourceMappingURL=is-even.js.map","import isNumber from './is-number';\nvar isInteger = Number.isInteger ? Number.isInteger : function (num) {\n return isNumber(num) && num % 1 === 0;\n};\nexport default isInteger;\n//# sourceMappingURL=is-integer.js.map","import isNumber from './is-number';\nvar isNegative = function (num) {\n return isNumber(num) && num < 0;\n};\nexport default isNegative;\n//# sourceMappingURL=is-negative.js.map","var PRECISION = 0.00001; // numbers less than this is considered as 0\nexport default function isNumberEqual(a, b, precision) {\n if (precision === void 0) { precision = PRECISION; }\n return Math.abs((a - b)) < precision;\n}\n;\n//# sourceMappingURL=is-number-equal.js.map","import isNumber from './is-number';\nvar isOdd = function (num) {\n return isNumber(num) && num % 2 !== 0;\n};\nexport default isOdd;\n//# sourceMappingURL=is-odd.js.map","import isNumber from './is-number';\nvar isPositive = function (num) {\n return isNumber(num) && num > 0;\n};\nexport default isPositive;\n//# sourceMappingURL=is-positive.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n//# sourceMappingURL=max-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n//# sourceMappingURL=min-by.js.map","var mod = function (n, m) {\n return ((n % m) + m) % m;\n};\nexport default mod;\n//# sourceMappingURL=mod.js.map","var DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\nexport default toDegree;\n//# sourceMappingURL=to-degree.js.map","export default parseInt;\n//# sourceMappingURL=to-integer.js.map","var RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\nexport default toRadian;\n//# sourceMappingURL=to-radian.js.map","export default (function (obj, key) { return obj.hasOwnProperty(key); });\n//# sourceMappingURL=has.js.map","import each from './each';\nimport isFunction from './is-function';\n// @ts-ignore\nvar values = Object.values ? function (obj) { return Object.values(obj); } : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\nexport default values;\n//# sourceMappingURL=values.js.map","import contains from './contains';\nimport values from './values';\nexport default (function (obj, value) { return contains(values(obj), value); });\n//# sourceMappingURL=has-value.js.map","import isNil from './is-nil';\nexport default (function (value) {\n if (isNil(value))\n return '';\n return value.toString();\n});\n//# sourceMappingURL=to-string.js.map","import toString from './to-string';\nvar lowerCase = function (str) {\n return toString(str).toLowerCase();\n};\nexport default lowerCase;\n//# sourceMappingURL=lower-case.js.map","import toString from './to-string';\nvar lowerFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\nexport default lowerFirst;\n//# sourceMappingURL=lower-first.js.map","function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return (o[name] === undefined) ? '' : o[name];\n });\n}\nexport default substitute;\n//# sourceMappingURL=substitute.js.map","import toString from './to-string';\nvar upperCase = function (str) {\n return toString(str).toUpperCase();\n};\nexport default upperCase;\n//# sourceMappingURL=upper-case.js.map","import toString from './to-string';\nvar upperFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\nexport default upperFirst;\n//# sourceMappingURL=upper-first.js.map","var toString = {}.toString;\nvar getType = function (value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/]$/, '');\n};\nexport default getType;\n//# sourceMappingURL=get-type.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isArguments = function (value) {\n return isType(value, 'Arguments');\n};\nexport default isArguments;\n//# sourceMappingURL=is-arguments.js.map","/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isBoolean = function (value) {\n return isType(value, 'Boolean');\n};\nexport default isBoolean;\n//# sourceMappingURL=is-boolean.js.map","import isType from './is-type';\nvar isDate = function (value) {\n return isType(value, 'Date');\n};\nexport default isDate;\n//# sourceMappingURL=is-date.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isError = function (value) {\n return isType(value, 'Error');\n};\nexport default isError;\n//# sourceMappingURL=is-error.js.map","/**\n * 判断是否为有限数\n * @return {Boolean}\n */\nimport isNumber from './is-number';\nexport default function (value) {\n return isNumber(value) && isFinite(value);\n}\n//# sourceMappingURL=is-finite.js.map","var isNull = function (value) {\n return value === null;\n};\nexport default isNull;\n//# sourceMappingURL=is-null.js.map","var objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\nexport default isPrototype;\n//# sourceMappingURL=is-prototype.js.map","import isType from './is-type';\nvar isRegExp = function (str) {\n return isType(str, 'RegExp');\n};\nexport default isRegExp;\n//# sourceMappingURL=is-reg-exp.js.map","var isUndefined = function (value) {\n return value === undefined;\n};\nexport default isUndefined;\n//# sourceMappingURL=is-undefined.js.map","/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof HTMLDocument;\n};\nexport default isElement;\n//# sourceMappingURL=is-element.js.map","export default function requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame ||\n function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n;\n//# sourceMappingURL=request-animation-frame.js.map","export default function cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame ||\n window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame ||\n clearTimeout;\n method(handler);\n}\n;\n//# sourceMappingURL=clear-animation-frame.js.map","// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nexport default function mix(dist, src1, src2, src3) {\n if (src1)\n _mix(dist, src1);\n if (src2)\n _mix(dist, src2);\n if (src3)\n _mix(dist, src3);\n return dist;\n}\n//# sourceMappingURL=mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (isFunction(obj)) {\n obj = obj.prototype;\n }\n mix(c.prototype, obj);\n }\n};\nexport default augment;\n//# sourceMappingURL=augment.js.map","import isArray from './is-array';\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (isArray(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n }\n else {\n rst[i] = obj[i];\n }\n }\n }\n else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n }\n else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\nexport default clone;\n//# sourceMappingURL=clone.js.map","function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\nexport default debounce;\n//# sourceMappingURL=debounce.js.map","import isFunction from './is-function';\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n */\nexport default (function (f, resolver) {\n if (!isFunction(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = new Map();\n return memoized;\n});\n//# sourceMappingURL=memoize.js.map","import isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar MAX_MIX_LEVEL = 5;\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n if (value !== null && isPlainObject(value)) {\n if (!isPlainObject(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n }\n else {\n dist[key] = src[key];\n }\n }\n else if (isArray(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n }\n else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\nexport default deepMix;\n//# sourceMappingURL=deep-mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!isFunction(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () { };\n }\n var create = Object.create ?\n function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } :\n function (proto, c) {\n function Tmp() { }\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = mix(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n mix(superObj, overrides);\n mix(subclass, staticOverrides);\n return subclass;\n};\nexport default extend;\n//# sourceMappingURL=extend.js.map","import isArrayLike from './is-array-like';\nvar indexOf = function (arr, obj) {\n if (!isArrayLike(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\nexport default indexOf;\n//# sourceMappingURL=index-of.js.map","import isNil from './is-nil';\nimport isArrayLike from './is-array-like';\nimport getType from './get-type';\nimport isPrototype from './is-prototype';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n var type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\nexport default isEmpty;\n//# sourceMappingURL=is-empty.js.map","import isObjectLike from './is-object-like';\nimport isArrayLike from './is-array-like';\nimport isString from './is-string';\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (isString(value) || isString(other)) {\n return false;\n }\n if (isArrayLike(value) || isArrayLike(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (isObjectLike(value) || isObjectLike(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\nexport default isEqual;\n//# sourceMappingURL=is-equal.js.map","import isFunction from './is-function';\nimport isEqual from './is-equal';\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\nexport default (function (value, other, fn) {\n if (!isFunction(fn)) {\n return isEqual(value, other);\n }\n return !!fn(value, other);\n});\n//# sourceMappingURL=is-equal-with.js.map","import isArrayLike from './is-array-like';\nvar map = function (arr, func) {\n if (!isArrayLike(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\nexport default map;\n//# sourceMappingURL=map.js.map","import isNil from './is-nil';\nimport isObject from './is-object';\nvar identity = function (v) { return v; };\nexport default (function (object, func) {\n if (func === void 0) { func = identity; }\n var r = {};\n if (isObject(object) && !isNil(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n//# sourceMappingURL=map-values.js.map","import isString from './is-string';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\nexport default (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = isString(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return (obj === undefined || p < keyArr.length) ? defaultValue : obj;\n});\n//# sourceMappingURL=get.js.map","import isObject from './is-object';\nimport isString from './is-string';\nimport isNumber from './is-number';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\nexport default (function (obj, path, value) {\n var o = obj;\n var keyArr = isString(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!isObject(o[key])) {\n o[key] = isNumber(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n }\n else {\n o[key] = value;\n }\n });\n return obj;\n});\n//# sourceMappingURL=set.js.map","import each from './each';\nimport isPlainObject from './is-plain-object';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport default (function (object, keys) {\n if (object === null || !isPlainObject(object)) {\n return {};\n }\n var result = {};\n each(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n//# sourceMappingURL=pick.js.map","import reduce from './reduce';\nexport default (function (obj, keys) {\n return reduce(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n//# sourceMappingURL=omit.js.map","export default (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options)\n options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false)\n previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n//# sourceMappingURL=throttle.js.map","import isArrayLike from './is-array-like';\nexport default (function (value) {\n return isArrayLike(value) ? Array.prototype.slice.call(value) : [];\n});\n//# sourceMappingURL=to-array.js.map","var map = {};\nexport default (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n }\n else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n//# sourceMappingURL=unique-id.js.map","export default (function () { });\n//# sourceMappingURL=noop.js.map","export default (function (v) { return v; });\n//# sourceMappingURL=identity.js.map","import isNil from './is-nil';\nimport isArraylike from './is-array-like';\nexport default function size(o) {\n if (isNil(o)) {\n return 0;\n }\n if (isArraylike(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n//# sourceMappingURL=size.js.map","import { __spreadArrays } from \"tslib\";\nimport values from './values';\nimport memoize from './memoize';\nimport isString from './is-string';\nvar ctx;\n/**\n * 计算文本的宽度\n */\nexport default memoize(function (text, font) {\n if (font === void 0) { font = {}; }\n var fontSize = font.fontSize, fontFamily = font.fontFamily, fontWeight = font.fontWeight, fontStyle = font.fontStyle, fontVariant = font.fontVariant;\n if (!ctx) {\n ctx = document.createElement('canvas').getContext('2d');\n }\n ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ');\n return ctx.measureText(isString(text) ? text : '').width;\n}, function (text, font) {\n if (font === void 0) { font = {}; }\n return __spreadArrays([text], values(font)).join('');\n});\n//# sourceMappingURL=measure-text-width.js.map","import isString from './is-string';\nimport toString from './to-string';\nimport { default as measureTextWidth } from './measure-text-width';\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth 最大宽度\n * @param font 字体\n * @param str 要替换的文本\n */\nexport default (function (text, maxWidth, font, str) {\n if (str === void 0) { str = '...'; }\n var STEP = 16; // 每次 16,调参工程师\n var PLACEHOLDER_WIDTH = measureTextWidth(str, font);\n var leftText = !isString(text) ? toString(text) : text;\n var leftWidth = maxWidth;\n var r = []; // 最终的分段字符串\n var currentText;\n var currentWidth;\n if (measureTextWidth(text, font) <= maxWidth) {\n return text;\n }\n // 首先通过 step 计算,找出最大的未超出长度的\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n // 计算宽度\n currentWidth = measureTextWidth(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n break;\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n if (!leftText) {\n return r.join('');\n }\n }\n return \"\" + r.join('') + str;\n});\n//# sourceMappingURL=get-ellipsis-text.js.map","/**\n * k-v 存储\n */\nvar default_1 = /** @class */ (function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}());\nexport default default_1;\n//# sourceMappingURL=cache.js.map","import { each } from '@antv/util';\n// 自定义 Behavior 时候共有的方法\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {};\n },\n /**\n * register event handler, behavior will auto bind events\n * for example:\n * return {\n * click: 'onClick'\n * }\n */\n getEvents: function getEvents() {\n return {};\n },\n updateCfg: function updateCfg(cfg) {\n Object.assign(this, cfg);\n return true;\n },\n shouldBegin: function shouldBegin() {\n return true;\n },\n shouldUpdate: function shouldUpdate() {\n return true;\n },\n shouldEnd: function shouldEnd() {\n return true;\n },\n /**\n * auto bind events when register behavior\n * @param graph Graph instance\n */\n bind: function bind(graph) {\n var _this = this;\n var events = this.events;\n this.graph = graph;\n if (this.type === 'drag-canvas' || this.type === 'brush-select' || this.type === 'lasso-select') {\n graph.get('canvas').set('draggable', true);\n }\n each(events, function (handler, event) {\n graph.on(event, handler);\n });\n // To avoid the tabs switching makes the keydown related behaviors disable\n document.addEventListener('visibilitychange', function () {\n _this.keydown = false;\n });\n },\n unbind: function unbind(graph) {\n var events = this.events;\n var draggable = graph.get('canvas').get('draggable');\n if (this.type === 'drag-canvas' || this.type === 'brush-select' || this.type === 'lasso-select') {\n graph.get('canvas').set('draggable', false);\n }\n each(events, function (handler, event) {\n graph.off(event, handler);\n });\n graph.get('canvas').set('draggable', draggable);\n },\n get: function get(val) {\n return this[val];\n },\n set: function set(key, val) {\n this[key] = val;\n return this;\n }\n};","import { clone, each, wrapBehavior } from '@antv/util';\nimport behaviorOption from './behaviorOption';\nvar Behavior = /** @class */function () {\n function Behavior() {}\n /**\n * 自定义 Behavior\n * @param type Behavior 名称\n * @param behavior Behavior 定义的方法集合\n */\n Behavior.registerBehavior = function (type, behavior) {\n if (!behavior) {\n throw new Error(\"please specify handler for this behavior: \".concat(type));\n }\n var prototype = clone(behaviorOption);\n Object.assign(prototype, behavior);\n // eslint-disable-next-line func-names\n var base = function base(cfg) {\n var _this = this;\n Object.assign(this, this.getDefaultCfg(), cfg);\n var events = this.getEvents();\n this.events = null;\n var eventsToBind = {};\n if (events) {\n each(events, function (handle, event) {\n eventsToBind[event] = wrapBehavior(_this, handle);\n });\n this.events = eventsToBind;\n }\n };\n base.prototype = prototype;\n Behavior.types[type] = base;\n };\n Behavior.hasBehavior = function (type) {\n return !!Behavior.types[type];\n };\n Behavior.getBehavior = function (type) {\n return Behavior.types[type];\n };\n // 所有自定义的 Behavior 的实例\n Behavior.types = {};\n return Behavior;\n}();\nexport default Behavior;","var WILDCARD = '*';\n/* event-emitter */\nvar EventEmitter = /** @class */ (function () {\n function EventEmitter() {\n this._events = {};\n }\n /**\n * 监听一个事件\n * @param evt\n * @param callback\n * @param once\n */\n EventEmitter.prototype.on = function (evt, callback, once) {\n if (!this._events[evt]) {\n this._events[evt] = [];\n }\n this._events[evt].push({\n callback: callback,\n once: !!once,\n });\n return this;\n };\n /**\n * 监听一个事件一次\n * @param evt\n * @param callback\n */\n EventEmitter.prototype.once = function (evt, callback) {\n return this.on(evt, callback, true);\n };\n /**\n * 触发一个事件\n * @param evt\n * @param args\n */\n EventEmitter.prototype.emit = function (evt) {\n var _this = this;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var events = this._events[evt] || [];\n var wildcardEvents = this._events[WILDCARD] || [];\n // 实际的处理 emit 方法\n var doEmit = function (es) {\n var length = es.length;\n for (var i = 0; i < length; i++) {\n if (!es[i]) {\n continue;\n }\n var _a = es[i], callback = _a.callback, once = _a.once;\n if (once) {\n es.splice(i, 1);\n if (es.length === 0) {\n delete _this._events[evt];\n }\n length--;\n i--;\n }\n callback.apply(_this, args);\n }\n };\n doEmit(events);\n doEmit(wildcardEvents);\n };\n /**\n * 取消监听一个事件,或者一个channel\n * @param evt\n * @param callback\n */\n EventEmitter.prototype.off = function (evt, callback) {\n if (!evt) {\n // evt 为空全部清除\n this._events = {};\n }\n else {\n if (!callback) {\n // evt 存在,callback 为空,清除事件所有方法\n delete this._events[evt];\n }\n else {\n // evt 存在,callback 存在,清除匹配的\n var events = this._events[evt] || [];\n var length_1 = events.length;\n for (var i = 0; i < length_1; i++) {\n if (events[i].callback === callback) {\n events.splice(i, 1);\n length_1--;\n i--;\n }\n }\n if (events.length === 0) {\n delete this._events[evt];\n }\n }\n }\n return this;\n };\n /* 当前所有的事件 */\n EventEmitter.prototype.getEvents = function () {\n return this._events;\n };\n return EventEmitter;\n}());\nexport default EventEmitter;\n//# sourceMappingURL=index.js.map","/**\n * Common utilities\n * @module glMatrix\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\n * 2x2 Matrix\n * @module mat2\n */\n\n/**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\n\nexport function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\n\nexport function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n}\n/**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n } else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n\n return out;\n}\n/**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3]; // Calculate the determinant\n\n var det = a0 * a3 - a2 * a1;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the source matrix\n * @returns {mat2} out\n */\n\nexport function adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n}\n/**\n * Calculates the determinant of a mat2\n *\n * @param {ReadonlyMat2} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n}\n/**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n}\n/**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n}\n/**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2\n *\n * @param {ReadonlyMat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2\n *\n * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n}\n/**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {ReadonlyMat2} L the lower triangular matrix\n * @param {ReadonlyMat2} D the diagonal matrix\n * @param {ReadonlyMat2} U the upper triangular matrix\n * @param {ReadonlyMat2} a the input matrix to factorize\n */\n\nexport function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n}\n/**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @returns {mat2} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2} a The first matrix.\n * @param {ReadonlyMat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {ReadonlyMat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {ReadonlyMat2} a the first operand\n * @param {ReadonlyMat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Alias for {@link mat2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat2.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 2x3 Matrix\n * @module mat2d\n * @description\n * A mat2d contains six elements defined as:\n *
\n * [a, b,\n *  c, d,\n *  tx, ty]\n * 
\n * This is a short form for the 3x3 matrix:\n *
\n * [a, b, 0,\n *  c, d, 0,\n *  tx, ty, 1]\n * 
\n * The last column is ignored so the array is shorter and operations are faster.\n */\n\n/**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n\n out[0] = 1;\n out[3] = 1;\n return out;\n}\n/**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {ReadonlyMat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n}\n/**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Create a new mat2d with the given values\n *\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} A new mat2d\n */\n\nexport function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Set the components of a mat2d to the given values\n *\n * @param {mat2d} out the receiving matrix\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} out\n */\n\nexport function set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n}\n/**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {mat2d} out\n */\n\nexport function invert(out, a) {\n var aa = a[0],\n ab = a[1],\n ac = a[2],\n ad = a[3];\n var atx = a[4],\n aty = a[5];\n var det = aa * ad - ab * ac;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n}\n/**\n * Calculates the determinant of a mat2d\n *\n * @param {ReadonlyMat2d} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n}\n/**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function multiply(out, a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n}\n/**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nexport function rotate(out, a, rad) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\n\nexport function scale(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n}\n/**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to translate\n * @param {ReadonlyVec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\n\nexport function translate(out, a, v) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var v0 = v[0],\n v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.rotate(dest, dest, rad);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.scale(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat2d} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.translate(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat2d} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n}\n/**\n * Returns a string representation of a mat2d\n *\n * @param {ReadonlyMat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat2d\n *\n * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n}\n/**\n * Adds two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @returns {mat2d} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2d} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2d} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n}\n/**\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2d} out the receiving vector\n * @param {ReadonlyMat2d} a the first operand\n * @param {ReadonlyMat2d} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2d} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat2d} a The first matrix.\n * @param {ReadonlyMat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n}\n/**\n * Alias for {@link mat2d.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat2d.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 3x3 Matrix\n * @module mat3\n */\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {ReadonlyMat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\n\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\n\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\n * Calculates the determinant of a mat3\n *\n * @param {ReadonlyMat3} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to translate\n * @param {ReadonlyVec2} v vector to translate by\n * @returns {mat3} out\n */\n\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat3} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat3} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to copy\n * @returns {mat3} out\n **/\n\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\n\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\n\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat3\n *\n * @param {ReadonlyMat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat3.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\n * @module mat4\n */\n\n/**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\n * Calculates the determinant of a mat4\n *\n * @param {ReadonlyMat4} a the source matrix\n * @returns {Number} determinant of a\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {mat4} out\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Scaling vector\n * @returns {mat4} out\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nexport function perspectiveNO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\n * Alias for {@link mat4.perspectiveNO}\n * @function\n */\n\nexport var perspective = perspectiveNO;\n/**\n * Generates a perspective projection matrix suitable for WebGPU with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n\nexport function perspectiveZO(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = far * nf;\n out[14] = far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -near;\n }\n\n return out;\n}\n/**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function orthoNO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Alias for {@link mat4.orthoNO}\n * @function\n */\n\nexport var ortho = orthoNO;\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n\nexport function orthoZO(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = near * nf;\n out[15] = 1;\n return out;\n}\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\n * Returns a string representation of a mat4\n *\n * @param {ReadonlyMat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link mat4.subtract}\n * @function\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\n * 3 Dimensional Vector\n * @module vec3\n */\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {ReadonlyVec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Calculates the length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the source vector\n * @returns {vec3} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to ceil\n * @returns {vec3} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to floor\n * @returns {vec3} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to round\n * @returns {vec3} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Calculates the squared length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to negate\n * @returns {vec3} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to invert\n * @returns {vec3} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to normalize\n * @returns {vec3} out\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec3} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec3} out\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\n * Get the angle between two 3D vectors\n * @param {ReadonlyVec3} a The first operand\n * @param {ReadonlyVec3} b The second operand\n * @returns {Number} The angle in radians\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec3.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\n * 4 Dimensional Vector\n * @module vec4\n */\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {ReadonlyVec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the source vector\n * @returns {vec4} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to ceil\n * @returns {vec4} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to floor\n * @returns {vec4} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\n * Math.round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to round\n * @returns {vec4} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Calculates the length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\n * Calculates the squared length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to negate\n * @returns {vec4} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to invert\n * @returns {vec4} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to normalize\n * @returns {vec4} out\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {ReadonlyVec4} result the receiving vector\n * @param {ReadonlyVec4} U the first vector\n * @param {ReadonlyVec4} V the second vector\n * @param {ReadonlyVec4} W the third vector\n * @returns {vec4} result\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec4} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec4} out\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec4.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n/**\n * Quaternion\n * @module quat\n */\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyVec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\n\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {ReadonlyQuat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\n\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\n * Gets the angular distance between two unit quaternions\n *\n * @param {ReadonlyQuat} a Origin unit quaternion\n * @param {ReadonlyQuat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\n\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n */\n\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate W component of\n * @returns {quat} out\n */\n\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\n\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate inverse of\n * @returns {quat} out\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate conjugate of\n * @returns {quat} out\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyMat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\n\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\n * Creates a quaternion from the given euler angle x, y, z.\n *\n * @param {quat} out the receiving quaternion\n * @param {x} Angle to rotate around X axis in degrees.\n * @param {y} Angle to rotate around Y axis in degrees.\n * @param {z} Angle to rotate around Z axis in degrees.\n * @returns {quat} out\n * @function\n */\n\nexport function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\n * Returns a string representation of a quatenion\n *\n * @param {ReadonlyQuat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\n\nexport var clone = vec4.clone;\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\n\nexport var fromValues = vec4.fromValues;\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the source quaternion\n * @returns {quat} out\n * @function\n */\n\nexport var copy = vec4.copy;\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\n\nexport var set = vec4.set;\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n * @function\n */\n\nexport var add = vec4.add;\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {ReadonlyQuat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\n\nexport var scale = vec4.scale;\n/**\n * Calculates the dot product of two quat's\n *\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nexport var dot = vec4.dot;\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\n\nexport var lerp = vec4.lerp;\n/**\n * Calculates the length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport var length = vec4.length;\n/**\n * Alias for {@link quat.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Calculates the squared length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nexport var squaredLength = vec4.squaredLength;\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\n\nexport var normalize = vec4.normalize;\n/**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat} a The first quaternion.\n * @param {ReadonlyQuat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport var exactEquals = vec4.exactEquals;\n/**\n * Returns whether or not the quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat} a The first vector.\n * @param {ReadonlyQuat} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport var equals = vec4.equals;\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {ReadonlyVec3} a the initial vector\n * @param {ReadonlyVec3} b the destination vector\n * @returns {quat} out\n */\n\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {ReadonlyQuat} c the third operand\n * @param {ReadonlyQuat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {ReadonlyVec3} view the vector representing the viewing direction\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\n\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","import * as glMatrix from \"./common.js\";\nimport * as quat from \"./quat.js\";\nimport * as mat4 from \"./mat4.js\";\n/**\n * Dual Quaternion
\n * Format: [real, dual]
\n * Quaternion format: XYZW
\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.
\n * @module quat2\n */\n\n/**\n * Creates a new identity dual quat\n *\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\n */\n\nexport function create() {\n var dq = new glMatrix.ARRAY_TYPE(8);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n\n dq[3] = 1;\n return dq;\n}\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat2} a dual quaternion to clone\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function clone(a) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n}\n/**\n * Creates a new dual quat initialized with the given values\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n}\n/**\n * Creates a new dual quat from the given values (quat and translation)\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component (translation)\n * @param {Number} y2 Y component (translation)\n * @param {Number} z2 Z component (translation)\n * @returns {quat2} new dual quaternion\n * @function\n */\n\nexport function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5,\n ay = y2 * 0.5,\n az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n}\n/**\n * Creates a dual quat from a quaternion and a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q a normalized quaternion\n * @param {ReadonlyVec3} t tranlation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5,\n ay = t[1] * 0.5,\n az = t[2] * 0.5,\n bx = q[0],\n by = q[1],\n bz = q[2],\n bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Creates a dual quat from a translation\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyVec3} t translation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a dual quat from a quaternion\n *\n * @param {ReadonlyQuat2} dual quaternion receiving operation result\n * @param {ReadonlyQuat} q the quaternion\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n\nexport function fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Creates a new dual quat from a matrix (4x4)\n *\n * @param {quat2} out the dual quaternion\n * @param {ReadonlyMat4} a the matrix\n * @returns {quat2} dual quat receiving operation result\n * @function\n */\n\nexport function fromMat4(out, a) {\n //TODO Optimize this\n var outer = quat.create();\n mat4.getRotation(outer, a);\n var t = new glMatrix.ARRAY_TYPE(3);\n mat4.getTranslation(t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n}\n/**\n * Copy the values from one dual quat to another\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the source dual quaternion\n * @returns {quat2} out\n * @function\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Set a dual quat to the identity dual quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @returns {quat2} out\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n}\n/**\n * Set the components of a dual quat to the given values\n *\n * @param {quat2} out the receiving quaternion\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} out\n * @function\n */\n\nexport function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n}\n/**\n * Gets the real part of a dual quat\n * @param {quat} out real part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} real part\n */\n\nexport var getReal = quat.copy;\n/**\n * Gets the dual part of a dual quat\n * @param {quat} out dual part\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @return {quat} dual part\n */\n\nexport function getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n}\n/**\n * Set the real component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the real part\n * @returns {quat2} out\n * @function\n */\n\nexport var setReal = quat.copy;\n/**\n * Set the dual component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat} q a quaternion representing the dual part\n * @returns {quat2} out\n * @function\n */\n\nexport function setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n}\n/**\n * Gets the translation of a normalized dual quat\n * @param {vec3} out translation\n * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed\n * @return {vec3} translation\n */\n\nexport function getTranslation(out, a) {\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n}\n/**\n * Translates a dual quat by the given vector\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {quat2} out\n */\n\nexport function translate(out, a, v) {\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3],\n bx1 = v[0] * 0.5,\n by1 = v[1] * 0.5,\n bz1 = v[2] * 0.5,\n ax2 = a[4],\n ay2 = a[5],\n az2 = a[6],\n aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n}\n/**\n * Rotates a dual quat around the X axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateX(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Y axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateY(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat around the Z axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n\nexport function rotateZ(out, a, rad) {\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7],\n ax1 = ax * bw + aw * bx + ay * bz - az * by,\n ay1 = ay * bw + aw * by + az * bx - ax * bz,\n az1 = az * bw + aw * bz + ax * by - ay * bx,\n aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (a * q)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @returns {quat2} out\n */\n\nexport function rotateByQuatAppend(out, a, q) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n}\n/**\n * Rotates a dual quat by a given quaternion (q * a)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat} q quaternion to rotate by\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @returns {quat2} out\n */\n\nexport function rotateByQuatPrepend(out, q, a) {\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3],\n bx = a[0],\n by = a[1],\n bz = a[2],\n bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n}\n/**\n * Rotates a dual quat around a given axis. Does the normalisation automatically\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the dual quaternion to rotate\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @param {Number} rad how far the rotation should be\n * @returns {quat2} out\n */\n\nexport function rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < glMatrix.EPSILON) {\n return copy(out, a);\n }\n\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0],\n ay1 = a[1],\n az1 = a[2],\n aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\n * Adds two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n * @function\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n}\n/**\n * Multiplies two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {quat2} out\n */\n\nexport function multiply(out, a, b) {\n var ax0 = a[0],\n ay0 = a[1],\n az0 = a[2],\n aw0 = a[3],\n bx1 = b[4],\n by1 = b[5],\n bz1 = b[6],\n bw1 = b[7],\n ax1 = a[4],\n ay1 = a[5],\n az1 = a[6],\n aw1 = a[7],\n bx0 = b[0],\n by0 = b[1],\n bz0 = b[2],\n bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n}\n/**\n * Alias for {@link quat2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Scales a dual quat by a scalar number\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the dual quat to scale\n * @param {Number} b amount to scale the dual quat by\n * @returns {quat2} out\n * @function\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n}\n/**\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\n *\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n\nexport var dot = quat.dot;\n/**\n * Performs a linear interpolation between two dual quats's\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\n *\n * @param {quat2} out the receiving dual quat\n * @param {ReadonlyQuat2} a the first operand\n * @param {ReadonlyQuat2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat2} out\n */\n\nexport function lerp(out, a, b, t) {\n var mt = 1 - t;\n if (dot(a, b) < 0) t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n}\n/**\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quat to calculate inverse of\n * @returns {quat2} out\n */\n\nexport function invert(out, a) {\n var sqlen = squaredLength(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n}\n/**\n * Calculates the conjugate of a dual quat\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\n *\n * @param {quat2} out the receiving quaternion\n * @param {ReadonlyQuat2} a quat to calculate conjugate of\n * @returns {quat2} out\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n}\n/**\n * Calculates the length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate length of\n * @returns {Number} length of a\n * @function\n */\n\nexport var length = quat.length;\n/**\n * Alias for {@link quat2.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Calculates the squared length of a dual quat\n *\n * @param {ReadonlyQuat2} a dual quat to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n\nexport var squaredLength = quat.squaredLength;\n/**\n * Alias for {@link quat2.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Normalize a dual quat\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {ReadonlyQuat2} a dual quaternion to normalize\n * @returns {quat2} out\n * @function\n */\n\nexport function normalize(out, a) {\n var magnitude = squaredLength(a);\n\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n\n return out;\n}\n/**\n * Returns a string representation of a dual quatenion\n *\n * @param {ReadonlyQuat2} a dual quaternion to represent as a string\n * @returns {String} string representation of the dual quat\n */\n\nexport function str(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n}\n/**\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat2} a the first dual quaternion.\n * @param {ReadonlyQuat2} b the second dual quaternion.\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n}\n/**\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\n *\n * @param {ReadonlyQuat2} a the first dual quat.\n * @param {ReadonlyQuat2} b the second dual quat.\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n}","import * as glMatrix from \"./common.js\";\n/**\n * 2 Dimensional Vector\n * @module vec2\n */\n\n/**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {ReadonlyVec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the source vector\n * @returns {vec2} out\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to ceil\n * @returns {vec2} out\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to floor\n * @returns {vec2} out\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec2} out\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\n * Math.round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to round\n * @returns {vec2} out\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} distance between a and b\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\n * Calculates the length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate length of\n * @returns {Number} length of a\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\n * Calculates the squared length of a vec2\n *\n * @param {ReadonlyVec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to negate\n * @returns {vec2} out\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to invert\n * @returns {vec2} out\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a vector to normalize\n * @returns {vec2} out\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {Number} dot product of a and b\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @returns {vec3} out\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the first operand\n * @param {ReadonlyVec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat2d} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat3} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {ReadonlyVec2} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec2} out\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {ReadonlyVec2} a The vec2 point to rotate\n * @param {ReadonlyVec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\n * Get the angle between two 2D vectors\n * @param {ReadonlyVec2} a The first operand\n * @param {ReadonlyVec2} b The second operand\n * @returns {Number} The angle in radians\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec2} a The first vector.\n * @param {ReadonlyVec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\n * Alias for {@link vec2.length}\n * @function\n */\n\nexport var len = length;\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\n\nexport var sub = subtract;\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\n\nexport var mul = multiply;\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\n\nexport var div = divide;\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\n\nexport var dist = distance;\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\n\nexport var sqrDist = squaredDistance;\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\n\nexport var sqrLen = squaredLength;\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","/**\n * @description 扩展方法,提供 gl-matrix 为提供的方法\n * */\nimport { mat3, vec2 } from 'gl-matrix';\nexport function leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromTranslation(transMat, v);\n return mat3.multiply(out, transMat, a);\n}\nexport function leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromRotation(rotateMat, rad);\n return mat3.multiply(out, rotateMat, a);\n}\nexport function leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromScaling(scaleMat, v);\n return mat3.multiply(out, scaleMat, a);\n}\nfunction leftMultiply(out, a, a1) {\n return mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nexport function transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\n/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nexport function direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nexport function angleTo(v1, v2, direct) {\n var ang = vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\n/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nexport function vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\n//# sourceMappingURL=ext.js.map","var adjMatrix = function adjMatrix(graphData, directed) {\n var nodes = graphData.nodes,\n edges = graphData.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error(\"invalid nodes data!\");\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (!sIndex && sIndex !== 0 || !tIndex && tIndex !== 0) return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\nexport default adjMatrix;","var defaultComparator = function defaultComparator(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n};\n/**\n * 链表中单个元素节点\n */\nvar LinkedListNode = /** @class */function () {\n function LinkedListNode(value, next) {\n if (next === void 0) {\n next = null;\n }\n this.value = value;\n this.next = next;\n }\n LinkedListNode.prototype.toString = function (callback) {\n return callback ? callback(this.value) : \"\".concat(this.value);\n };\n return LinkedListNode;\n}();\nexport { LinkedListNode };\nvar LinkedList = /** @class */function () {\n function LinkedList(comparator) {\n if (comparator === void 0) {\n comparator = defaultComparator;\n }\n this.head = null;\n this.tail = null;\n this.compare = comparator;\n }\n /**\n * 将指定元素添加到链表头部\n * @param value\n */\n LinkedList.prototype.prepend = function (value) {\n // 在头部添加一个节点\n var newNode = new LinkedListNode(value, this.head);\n this.head = newNode;\n if (!this.tail) {\n this.tail = newNode;\n }\n return this;\n };\n /**\n * 将指定元素添加到链表中\n * @param value\n */\n LinkedList.prototype.append = function (value) {\n var newNode = new LinkedListNode(value);\n // 如果不存在头节点,则将创建的新节点作为头节点\n if (!this.head) {\n this.head = newNode;\n this.tail = newNode;\n return this;\n }\n // 将新节点附加到链表末尾\n this.tail.next = newNode;\n this.tail = newNode;\n return this;\n };\n /**\n * 删除指定元素\n * @param value 要删除的元素\n */\n LinkedList.prototype.delete = function (value) {\n if (!this.head) {\n return null;\n }\n var deleteNode = null;\n // 如果删除的是头部元素,则将next作为头元素\n while (this.head && this.compare(this.head.value, value)) {\n deleteNode = this.head;\n this.head = this.head.next;\n }\n var currentNode = this.head;\n if (currentNode !== null) {\n // 如果删除了节点以后,将next节点前移\n while (currentNode.next) {\n if (this.compare(currentNode.next.value, value)) {\n deleteNode = currentNode.next;\n currentNode.next = currentNode.next.next;\n } else {\n currentNode = currentNode.next;\n }\n }\n }\n // 检查尾部节点是否被删除\n if (this.compare(this.tail.value, value)) {\n this.tail = currentNode;\n }\n return deleteNode;\n };\n /**\n * 查找指定的元素\n * @param param0\n */\n LinkedList.prototype.find = function (_a) {\n var _b = _a.value,\n value = _b === void 0 ? undefined : _b,\n _c = _a.callback,\n callback = _c === void 0 ? undefined : _c;\n if (!this.head) {\n return null;\n }\n var currentNode = this.head;\n while (currentNode) {\n // 如果指定了 callback,则按指定的 callback 查找\n if (callback && callback(currentNode.value)) {\n return currentNode;\n }\n // 如果指定了 value,则按 value 查找\n if (value !== undefined && this.compare(currentNode.value, value)) {\n return currentNode;\n }\n currentNode = currentNode.next;\n }\n return null;\n };\n /**\n * 删除尾部节点\n */\n LinkedList.prototype.deleteTail = function () {\n var deletedTail = this.tail;\n if (this.head === this.tail) {\n // 链表中只有一个元素\n this.head = null;\n this.tail = null;\n return deletedTail;\n }\n var currentNode = this.head;\n while (currentNode.next) {\n if (!currentNode.next.next) {\n currentNode.next = null;\n } else {\n currentNode = currentNode.next;\n }\n }\n this.tail = currentNode;\n return deletedTail;\n };\n /**\n * 删除头部节点\n */\n LinkedList.prototype.deleteHead = function () {\n if (!this.head) {\n return null;\n }\n var deletedHead = this.head;\n if (this.head.next) {\n this.head = this.head.next;\n } else {\n this.head = null;\n this.tail = null;\n }\n return deletedHead;\n };\n /**\n * 将一组元素转成链表中的节点\n * @param values 链表中的元素\n */\n LinkedList.prototype.fromArray = function (values) {\n var _this = this;\n values.forEach(function (value) {\n return _this.append(value);\n });\n return this;\n };\n /**\n * 将链表中的节点转成数组元素\n */\n LinkedList.prototype.toArray = function () {\n var nodes = [];\n var currentNode = this.head;\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n };\n /**\n * 反转链表中的元素节点\n */\n LinkedList.prototype.reverse = function () {\n var currentNode = this.head;\n var prevNode = null;\n var nextNode = null;\n while (currentNode) {\n // 存储下一个元素节点\n nextNode = currentNode.next;\n // 更改当前节点的下一个节点,以便将它连接到上一个节点上\n currentNode.next = prevNode;\n // 将 prevNode 和 currentNode 向前移动一步\n prevNode = currentNode;\n currentNode = nextNode;\n }\n this.tail = this.head;\n this.head = prevNode;\n };\n LinkedList.prototype.toString = function (callback) {\n if (callback === void 0) {\n callback = undefined;\n }\n return this.toArray().map(function (node) {\n return node.toString(callback);\n }).toString();\n };\n return LinkedList;\n}();\nexport default LinkedList;","import LinkedList from './linked-list';\nvar Queue = /** @class */function () {\n function Queue() {\n this.linkedList = new LinkedList();\n }\n /**\n * 队列是否为空\n */\n Queue.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 读取队列头部的元素, 不删除队列中的元素\n */\n Queue.prototype.peek = function () {\n if (!this.linkedList.head) {\n return null;\n }\n return this.linkedList.head.value;\n };\n /**\n * 在队列的尾部新增一个元素\n * @param value\n */\n Queue.prototype.enqueue = function (value) {\n this.linkedList.append(value);\n };\n /**\n * 删除队列中的头部元素,如果队列为空,则返回 null\n */\n Queue.prototype.dequeue = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Queue.prototype.toString = function (callback) {\n return this.linkedList.toString(callback);\n };\n return Queue;\n}();\nexport default Queue;","/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nexport var getNeighbors = function getNeighbors(nodeId, edges, type) {\n if (edges === void 0) {\n edges = [];\n }\n var currentEdges = edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighhborsConverter_1 = function neighhborsConverter_1(edge) {\n return edge.source === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_1).map(function (edge) {\n return edge.target;\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighhborsConverter_2 = function neighhborsConverter_2(edge) {\n return edge.target === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_2).map(function (edge) {\n return edge.source;\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighhborsConverter = function neighhborsConverter(edge) {\n return edge.source === nodeId ? edge.target : edge.source;\n };\n return currentEdges.map(neighhborsConverter);\n};\n/**\n * 获取指定节点的出边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexport var getOutEdgesNodeId = function getOutEdgesNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId;\n });\n};\n/**\n * 获取指定节点的边,包括出边和入边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexport var getEdgesByNodeId = function getEdgesByNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n};\n/**\n * 生成唯一的 ID,规则是序号 + 时间戳\n * @param index 序号\n */\nexport var uniqueId = function uniqueId(index) {\n if (index === void 0) {\n index = 0;\n }\n var random1 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n var random2 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n return \"\".concat(index, \"-\").concat(random1).concat(random2);\n};","import Queue from './structs/queue';\nimport { getNeighbors } from './util';\n/**\n *\n * @param callbacks\n * allowTraversal: 确定 BFS 是否从顶点沿着边遍历到其邻居,默认情况下,同一个节点只能遍历一次\n * enterNode: 当 BFS 访问某个节点时调用\n * leaveNode: 当 BFS 访问访问结束某个节点时调用\n */\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n var id = next;\n if (!seen[id]) {\n seen[id] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * 广度优先遍历图\n * @param graph Graph 图实例\n * @param startNode 开始遍历的节点\n * @param originalCallbacks 回调\n */\nvar breadthFirstSearch = function breadthFirstSearch(graphData, startNodeId, originalCallbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n var callbacks = initCallbacks(originalCallbacks);\n var nodeQueue = new Queue();\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n // 初始化队列元素\n nodeQueue.enqueue(startNodeId);\n var previousNode = '';\n var _loop_1 = function _loop_1() {\n var currentNode = nodeQueue.dequeue();\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n // 将所有邻居添加到队列中以便遍历\n getNeighbors(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n nodeQueue.enqueue(nextNode);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n // 下一次循环之前存储当前顶点\n previousNode = currentNode;\n };\n // 遍历队列中的所有顶点\n while (!nodeQueue.isEmpty()) {\n _loop_1();\n }\n};\nexport default breadthFirstSearch;","import { getNeighbors } from \"./util\";\n/**\n * Generate all connected components for an undirected graph\n * @param graph\n */\nexport var detectConnectedComponents = function detectConnectedComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allComponents = [];\n var visited = {};\n var nodeStack = [];\n var getComponent = function getComponent(node) {\n nodeStack.push(node);\n visited[node.id] = true;\n var neighbors = getNeighbors(node.id, edges);\n var _loop_1 = function _loop_1(i) {\n var neighbor = neighbors[i];\n if (!visited[neighbor]) {\n var targetNode = nodes.filter(function (node) {\n return node.id === neighbor;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n }\n };\n for (var i = 0; i < neighbors.length; ++i) {\n _loop_1(i);\n }\n };\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (!visited[node.id]) {\n // 对于无向图进行dfs遍历,每一次调用后都得到一个连通分量\n getComponent(node);\n var component = [];\n while (nodeStack.length > 0) {\n component.push(nodeStack.pop());\n }\n allComponents.push(component);\n }\n }\n return allComponents;\n};\n/**\n * Tarjan's Algorithm 复杂度 O(|V|+|E|)\n * For directed graph only\n * a directed graph is said to be strongly connected if \"every vertex is reachable from every other vertex\".\n * refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @param graph\n * @return a list of strongly connected components\n */\nexport var detectStrongConnectComponents = function detectStrongConnectComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeStack = [];\n var inStack = {}; // 辅助判断是否已经在stack中,减少查找开销\n var indices = {};\n var lowLink = {};\n var allComponents = [];\n var index = 0;\n var getComponent = function getComponent(node) {\n // Set the depth index for v to the smallest unused index\n indices[node.id] = index;\n lowLink[node.id] = index;\n index += 1;\n nodeStack.push(node);\n inStack[node.id] = true;\n // 考虑每个邻接点\n var neighbors = getNeighbors(node.id, edges, 'target').filter(function (n) {\n return nodes.map(function (node) {\n return node.id;\n }).indexOf(n) > -1;\n });\n var _loop_2 = function _loop_2(i) {\n var targetNodeID = neighbors[i];\n if (!indices[targetNodeID] && indices[targetNodeID] !== 0) {\n var targetNode = nodes.filter(function (node) {\n return node.id === targetNodeID;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n // tree edge\n lowLink[node.id] = Math.min(lowLink[node.id], lowLink[targetNodeID]);\n } else if (inStack[targetNodeID]) {\n // back edge, target node is in the current SCC\n lowLink[node.id] = Math.min(lowLink[node.id], indices[targetNodeID]);\n }\n };\n for (var i = 0; i < neighbors.length; i++) {\n _loop_2(i);\n }\n // If node is a root node, generate an SCC\n if (lowLink[node.id] === indices[node.id]) {\n var component = [];\n while (nodeStack.length > 0) {\n var tmpNode = nodeStack.pop();\n inStack[tmpNode.id] = false;\n component.push(tmpNode);\n if (tmpNode === node) break;\n }\n if (component.length > 0) {\n allComponents.push(component);\n }\n }\n };\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (!indices[node.id] && indices[node.id] !== 0) {\n getComponent(node);\n }\n }\n return allComponents;\n};\nexport default function getConnectedComponents(graphData, directed) {\n if (directed) return detectStrongConnectComponents(graphData);\n return detectConnectedComponents(graphData);\n}","var degree = function degree(graphData) {\n var degrees = {};\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n nodes.forEach(function (node) {\n degrees[node.id] = {\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n });\n edges.forEach(function (edge) {\n degrees[edge.source].degree++;\n degrees[edge.source].outDegree++;\n degrees[edge.target].degree++;\n degrees[edge.target].inDegree++;\n });\n return degrees;\n};\nexport default degree;\n/**\n * 获取指定节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexport var getInDegree = function getInDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].inDegree;\n }\n return 0;\n};\n/**\n * 获取指定节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexport var getOutDegree = function getOutDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].outDegree;\n }\n return 0;\n};","import { getNeighbors } from './util';\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n if (!seen[next]) {\n seen[next] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * @param {Graph} graph\n * @param {GraphNode} currentNode\n * @param {GraphNode} previousNode\n * @param {Callbacks} callbacks\n */\nfunction depthFirstSearchRecursive(graphData, currentNode, previousNode, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n getNeighbors(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n depthFirstSearchRecursive(graphData, nextNode, currentNode, callbacks, directed);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n}\n/**\n * 深度优先遍历图\n * @param data GraphData 图数据\n * @param startNodeId 开始遍历的节点的 ID\n * @param originalCallbacks 回调\n */\nexport default function depthFirstSearch(graphData, startNodeId, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n depthFirstSearchRecursive(graphData, startNodeId, '', initCallbacks(callbacks), directed);\n}","import dfs from './dfs';\nimport getConnectedComponents, { detectStrongConnectComponents } from './connected-component';\nimport { getNeighbors } from './util';\nvar detectDirectedCycle = function detectDirectedCycle(graphData) {\n var cycle = null;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n var dfsParentMap = {};\n // 所有没有被访问的节点集合\n var unvisitedSet = {};\n // 正在被访问的节点集合\n var visitingSet = {};\n // 所有已经被访问过的节点集合\n var visitedSet = {};\n // 初始化 unvisitedSet\n nodes.forEach(function (node) {\n unvisitedSet[node.id] = node;\n });\n var callbacks = {\n enter: function enter(_a) {\n var currentNode = _a.current,\n previousNode = _a.previous;\n if (visitingSet[currentNode]) {\n // 如果当前节点正在访问中,则说明检测到环路了\n cycle = {};\n var currentCycleNode = currentNode;\n var previousCycleNode = previousNode;\n while (previousCycleNode !== currentNode) {\n cycle[currentCycleNode] = previousCycleNode;\n currentCycleNode = previousCycleNode;\n previousCycleNode = dfsParentMap[previousCycleNode];\n }\n cycle[currentCycleNode] = previousCycleNode;\n } else {\n // 如果不存在正在访问集合中,则将其放入正在访问集合,并从未访问集合中删除\n visitingSet[currentNode] = currentNode;\n delete unvisitedSet[currentNode];\n // 更新 DSF parents 列表\n dfsParentMap[currentNode] = previousNode;\n }\n },\n leave: function leave(_a) {\n var currentNode = _a.current;\n // 如果所有的节点的子节点都已经访问过了,则从正在访问集合中删除掉,并将其移入到已访问集合中,\n // 同时也意味着当前节点的所有邻居节点都被访问过了\n visitedSet[currentNode] = currentNode;\n delete visitingSet[currentNode];\n },\n allowTraversal: function allowTraversal(_a) {\n var nextNode = _a.next;\n // 如果检测到环路则需要终止所有进一步的遍历,否则会导致无限循环遍历\n if (cycle) {\n return false;\n }\n // 仅允许遍历没有访问的节点,visitedSet 中的都已经访问过了\n return !visitedSet[nextNode];\n }\n };\n // 开始遍历节点\n while (Object.keys(unvisitedSet).length) {\n // 从第一个节点开始进行 DFS 遍历\n var firsetUnVisitedKey = Object.keys(unvisitedSet)[0];\n dfs(graphData, firsetUnVisitedKey, callbacks);\n }\n return cycle;\n};\n/**\n * 检测无向图中的所有Base cycles\n * refer: https://www.codeproject.com/Articles/1158232/Enumerating-All-Cycles-in-an-Undirected-Graph\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回一组base cycles\n */\nexport var detectAllUndirectedCycle = function detectAllUndirectedCycle(graphData, nodeIds, include) {\n var _a, _b;\n if (include === void 0) {\n include = true;\n }\n var allCycles = [];\n var components = getConnectedComponents(graphData, false);\n // loop through all connected components\n for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {\n var component = components_1[_i];\n if (!component.length) continue;\n var root = component[0];\n var rootId = root.id;\n var stack = [root];\n var parent_1 = (_a = {}, _a[rootId] = root, _a);\n var used = (_b = {}, _b[rootId] = new Set(), _b);\n // walk a spanning tree to find cycles\n while (stack.length > 0) {\n var curNode = stack.pop();\n var curNodeId = curNode.id;\n var neighbors = getNeighbors(curNodeId, graphData.edges);\n var _loop_1 = function _loop_1(i) {\n var _c;\n var neighborId = neighbors[i];\n var neighbor = graphData.nodes.find(function (node) {\n return node.id === neighborId;\n });\n // const neighborId = neighbor.get('id');\n if (neighborId === curNodeId) {\n // 自环\n allCycles.push((_c = {}, _c[neighborId] = curNode, _c));\n } else if (!(neighborId in used)) {\n // visit a new node\n parent_1[neighborId] = curNode;\n stack.push(neighbor);\n used[neighborId] = new Set([curNode]);\n } else if (!used[curNodeId].has(neighbor)) {\n // a cycle found\n var cycleValid = true;\n var cyclePath = [neighbor, curNode];\n var p = parent_1[curNodeId];\n while (used[neighborId].size && !used[neighborId].has(p)) {\n cyclePath.push(p);\n if (p === parent_1[p.id]) break;else p = parent_1[p.id];\n }\n cyclePath.push(p);\n if (nodeIds && include) {\n // 如果有指定包含的节点\n cycleValid = false;\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = true;\n }\n } else if (nodeIds && !include) {\n // 如果有指定不包含的节点\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = false;\n }\n }\n // 把 node list 形式转换为 cycle 的格式\n if (cycleValid) {\n var cycle = {};\n for (var index = 1; index < cyclePath.length; index += 1) {\n cycle[cyclePath[index - 1].id] = cyclePath[index];\n }\n if (cyclePath.length) {\n cycle[cyclePath[cyclePath.length - 1].id] = cyclePath[0];\n }\n allCycles.push(cycle);\n }\n used[neighborId].add(curNode);\n }\n };\n for (var i = 0; i < neighbors.length; i += 1) {\n _loop_1(i);\n }\n }\n }\n return allCycles;\n};\n/**\n * Johnson's algorithm, 时间复杂度 O((V + E)(C + 1))$ and space bounded by O(V + E)\n * refer: https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF\n * refer: https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/cycles.html#simple_cycles\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回所有的 simple cycles\n */\nexport var detectAllDirectedCycle = function detectAllDirectedCycle(graphData, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n var path = []; // stack of nodes in current path\n var blocked = new Set();\n var B = []; // remember portions of the graph that yield no elementary circuit\n var allCycles = [];\n var idx2Node = {};\n var node2Idx = {};\n // 辅助函数: unblock all blocked nodes\n var unblock = function unblock(thisNode) {\n var stack = [thisNode];\n while (stack.length > 0) {\n var node = stack.pop();\n if (blocked.has(node)) {\n blocked.delete(node);\n B[node.id].forEach(function (n) {\n stack.push(n);\n });\n B[node.id].clear();\n }\n }\n };\n var circuit = function circuit(node, start, adjList) {\n var closed = false; // whether a path is closed\n if (nodeIds && include === false && nodeIds.indexOf(node.id) > -1) return closed;\n path.push(node);\n blocked.add(node);\n var neighbors = adjList[node.id];\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (neighbor === start) {\n var cycle = {};\n for (var index = 1; index < path.length; index += 1) {\n cycle[path[index - 1].id] = path[index];\n }\n if (path.length) {\n cycle[path[path.length - 1].id] = path[0];\n }\n allCycles.push(cycle);\n closed = true;\n } else if (!blocked.has(neighbor)) {\n if (circuit(neighbor, start, adjList)) {\n closed = true;\n }\n }\n }\n if (closed) {\n unblock(node);\n } else {\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (!B[neighbor.id].has(node)) {\n B[neighbor.id].add(node);\n }\n }\n }\n path.pop();\n return closed;\n };\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n // Johnson's algorithm 要求给节点赋顺序,先按节点在数组中的顺序\n for (var i = 0; i < nodes.length; i += 1) {\n var node = nodes[i];\n var nodeId = node.id;\n node2Idx[nodeId] = i;\n idx2Node[i] = node;\n }\n // 如果有指定包含的节点,则把指定节点排序在前,以便提早结束搜索\n if (nodeIds && include) {\n var _loop_2 = function _loop_2(i) {\n var nodeId = nodeIds[i];\n node2Idx[nodes[i].id] = node2Idx[nodeId];\n node2Idx[nodeId] = 0;\n idx2Node[0] = nodes.find(function (node) {\n return node.id === nodeId;\n });\n idx2Node[node2Idx[nodes[i].id]] = nodes[i];\n };\n for (var i = 0; i < nodeIds.length; i++) {\n _loop_2(i);\n }\n }\n // 返回 节点顺序 >= nodeOrder 的强连通分量的adjList\n var getMinComponentAdj = function getMinComponentAdj(components) {\n var _a;\n var minCompIdx;\n var minIdx = Infinity;\n // Find least component and the lowest node\n for (var i = 0; i < components.length; i += 1) {\n var comp = components[i];\n for (var j = 0; j < comp.length; j++) {\n var nodeIdx_1 = node2Idx[comp[j].id];\n if (nodeIdx_1 < minIdx) {\n minIdx = nodeIdx_1;\n minCompIdx = i;\n }\n }\n }\n var component = components[minCompIdx];\n var adjList = [];\n for (var i = 0; i < component.length; i += 1) {\n var node = component[i];\n adjList[node.id] = [];\n for (var _i = 0, _b = getNeighbors(node.id, graphData.edges, 'target').filter(function (n) {\n return component.map(function (c) {\n return c.id;\n }).indexOf(n) > -1;\n }); _i < _b.length; _i++) {\n var neighbor = _b[_i];\n // 对自环情况 (点连向自身) 特殊处理:记录自环,但不加入adjList\n if (neighbor === node.id && !(include === false && nodeIds.indexOf(node.id) > -1)) {\n allCycles.push((_a = {}, _a[node.id] = node, _a));\n } else {\n adjList[node.id].push(node2Idx[neighbor]);\n }\n }\n }\n return {\n component: component,\n adjList: adjList,\n minIdx: minIdx\n };\n };\n var nodeIdx = 0;\n while (nodeIdx < nodes.length) {\n var subgraphNodes = nodes.filter(function (n) {\n return node2Idx[n.id] >= nodeIdx;\n });\n var sccs = detectStrongConnectComponents({\n nodes: subgraphNodes,\n edges: graphData.edges\n }).filter(function (component) {\n return component.length > 1;\n });\n if (sccs.length === 0) break;\n var scc = getMinComponentAdj(sccs);\n var minIdx = scc.minIdx,\n adjList = scc.adjList,\n component = scc.component;\n if (component.length > 1) {\n component.forEach(function (node) {\n B[node.id] = new Set();\n });\n var startNode = idx2Node[minIdx];\n // startNode 不在指定要包含的节点中,提前结束搜索\n if (nodeIds && include && nodeIds.indexOf(startNode.id) === -1) return allCycles;\n circuit(startNode, startNode, adjList);\n nodeIdx = minIdx + 1;\n } else {\n break;\n }\n }\n return allCycles;\n};\n/**\n * 查找图中所有满足要求的圈\n * @param graph\n * @param directed 是否为有向图\n * @param nodeIds 节点 ID 的数组,若不指定,则返回图中所有的圈\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: Node}] 包含所有环的数组,每个环用一个Object表示,其中key为节点id,value为该节点在环中指向的下一个节点\n */\nexport var detectAllCycles = function detectAllCycles(graphData, directed, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n if (directed) return detectAllDirectedCycle(graphData, nodeIds, include);\n return detectAllUndirectedCycle(graphData, nodeIds, include);\n};\nexport default detectDirectedCycle;","import { __spreadArray } from \"tslib\";\nimport { isArray } from '@antv/util';\nimport { getOutEdgesNodeId, getEdgesByNodeId } from './util';\nvar minVertex = function minVertex(D, nodes, marks) {\n // 找出最小的点\n var minDis = Infinity;\n var minNode;\n for (var i = 0; i < nodes.length; i++) {\n var nodeId = nodes[i].id;\n if (!marks[nodeId] && D[nodeId] <= minDis) {\n minDis = D[nodeId];\n minNode = nodes[i];\n }\n }\n return minNode;\n};\nvar dijkstra = function dijkstra(graphData, source, directed, weightPropertyName) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeIds = [];\n var marks = {};\n var D = {};\n var prevs = {}; // key: 顶点, value: 顶点的前驱点数组(可能有多条等长的最短路径)\n nodes.forEach(function (node, i) {\n var id = node.id;\n nodeIds.push(id);\n D[id] = Infinity;\n if (id === source) D[id] = 0;\n });\n var nodeNum = nodes.length;\n var _loop_1 = function _loop_1(i) {\n // Process the vertices\n var minNode = minVertex(D, nodes, marks);\n var minNodeId = minNode.id;\n marks[minNodeId] = true;\n if (D[minNodeId] === Infinity) return \"continue\"; // Unreachable vertices cannot be the intermediate point\n var relatedEdges = [];\n if (directed) relatedEdges = getOutEdgesNodeId(minNodeId, edges);else relatedEdges = getEdgesByNodeId(minNodeId, edges);\n relatedEdges.forEach(function (edge) {\n var edgeTarget = edge.target;\n var edgeSource = edge.source;\n var w = edgeTarget === minNodeId ? edgeSource : edgeTarget;\n var weight = weightPropertyName && edge[weightPropertyName] ? edge[weightPropertyName] : 1;\n if (D[w] > D[minNode.id] + weight) {\n D[w] = D[minNode.id] + weight;\n prevs[w] = [minNode.id];\n } else if (D[w] === D[minNode.id] + weight) {\n prevs[w].push(minNode.id);\n }\n });\n };\n for (var i = 0; i < nodeNum; i++) {\n _loop_1(i);\n }\n prevs[source] = [source];\n // 每个节点存可能存在多条最短路径\n var paths = {};\n for (var target in D) {\n if (D[target] !== Infinity) {\n findAllPaths(source, target, prevs, paths);\n }\n }\n // 兼容之前单路径\n var path = {};\n for (var target in paths) {\n path[target] = paths[target][0];\n }\n return {\n length: D,\n path: path,\n allPath: paths\n };\n};\nexport default dijkstra;\nfunction findAllPaths(source, target, prevs, foundPaths) {\n if (source === target) {\n return [source];\n }\n if (foundPaths[target]) {\n return foundPaths[target];\n }\n var paths = [];\n for (var _i = 0, _a = prevs[target]; _i < _a.length; _i++) {\n var prev = _a[_i];\n var prevPaths = findAllPaths(source, prev, prevs, foundPaths);\n if (!prevPaths) return;\n for (var _b = 0, prevPaths_1 = prevPaths; _b < prevPaths_1.length; _b++) {\n var prePath = prevPaths_1[_b];\n if (isArray(prePath)) paths.push(__spreadArray(__spreadArray([], prePath, true), [target], false));else paths.push([prePath, target]);\n }\n }\n foundPaths[target] = paths;\n return foundPaths[target];\n}","import dijkstra from './dijkstra';\nimport { getNeighbors } from './util';\nexport var findShortestPath = function findShortestPath(graphData, start, end, directed, weightPropertyName) {\n var _a = dijkstra(graphData, start, directed, weightPropertyName),\n length = _a.length,\n path = _a.path,\n allPath = _a.allPath;\n return {\n length: length[end],\n path: path[end],\n allPath: allPath[end]\n };\n};\nexport var findAllPath = function findAllPath(graphData, start, end, directed) {\n var _a;\n if (start === end) return [[start]];\n var _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var visited = [start];\n var isVisited = (_a = {}, _a[start] = true, _a);\n var stack = []; // 辅助栈,用于存储访问过的节点的邻居节点\n var allPath = [];\n var neighbors = directed ? getNeighbors(start, edges, 'target') : getNeighbors(start, edges);\n stack.push(neighbors);\n while (visited.length > 0 && stack.length > 0) {\n var children = stack[stack.length - 1];\n if (children.length) {\n var child = children.shift();\n if (child) {\n visited.push(child);\n isVisited[child] = true;\n neighbors = directed ? getNeighbors(child, edges, 'target') : getNeighbors(child, edges);\n stack.push(neighbors.filter(function (neighbor) {\n return !isVisited[neighbor];\n }));\n }\n } else {\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n continue;\n }\n if (visited[visited.length - 1] === end) {\n var path = visited.map(function (node) {\n return node;\n });\n allPath.push(path);\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n }\n }\n return allPath;\n};","import getAdjMatrix from \"./adjacent-matrix\";\nvar floydWarshall = function floydWarshall(graphData, directed) {\n var adjacentMatrix = getAdjMatrix(graphData, directed);\n var dist = [];\n var size = adjacentMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjacentMatrix[i][j] === 0 || !adjacentMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjacentMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nexport default floydWarshall;","import getAdjMatrix from './adjacent-matrix';\nimport { uniqueId } from './util';\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nvar labelPropagation = function labelPropagation(graphData, directed, weightPropertyName, maxIteration) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = uniqueId();\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = getAdjMatrix(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n });\n ks.push(k);\n });\n var iter = 0;\n var _loop_1 = function _loop_1() {\n var changed = false;\n nodes.forEach(function (node) {\n var neighborClusters = {};\n Object.keys(neighbors[node.id]).forEach(function (neighborId) {\n var neighborWeight = neighbors[node.id][neighborId];\n var neighborNode = nodeMap[neighborId].node;\n var neighborClusterId = neighborNode.clusterId;\n if (!neighborClusters[neighborClusterId]) neighborClusters[neighborClusterId] = 0;\n neighborClusters[neighborClusterId] += neighborWeight;\n });\n // find the cluster with max weight\n var maxWeight = -Infinity;\n var bestClusterIds = [];\n Object.keys(neighborClusters).forEach(function (clusterId) {\n if (maxWeight < neighborClusters[clusterId]) {\n maxWeight = neighborClusters[clusterId];\n bestClusterIds = [clusterId];\n } else if (maxWeight === neighborClusters[clusterId]) {\n bestClusterIds.push(clusterId);\n }\n });\n if (bestClusterIds.length === 1 && bestClusterIds[0] === node.clusterId) return;\n var selfClusterIdx = bestClusterIds.indexOf(node.clusterId);\n if (selfClusterIdx >= 0) bestClusterIds.splice(selfClusterIdx, 1);\n if (bestClusterIds && bestClusterIds.length) {\n changed = true;\n // remove from origin cluster\n var selfCluster = clusters[node.clusterId];\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // move the node to the best cluster\n var randomIdx = Math.floor(Math.random() * bestClusterIds.length);\n var bestCluster = clusters[bestClusterIds[randomIdx]];\n bestCluster.nodes.push(node);\n node.clusterId = bestCluster.id;\n }\n });\n if (!changed) return \"break\";\n iter++;\n };\n while (iter < maxIteration) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n // delete the empty clusters\n Object.keys(clusters).forEach(function (clusterId) {\n var cluster = clusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete clusters[clusterId];\n }\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(clusters).forEach(function (clusterId) {\n clustersArray.push(clusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nexport default labelPropagation;","/**\n * 向量运算\n */\nimport { clone } from '@antv/util';\nvar Vector = /** @class */function () {\n function Vector(arr) {\n this.arr = arr;\n }\n Vector.prototype.getArr = function () {\n return this.arr || [];\n };\n Vector.prototype.add = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] + otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.subtract = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] - otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.avg = function (length) {\n var res = [];\n if (length !== 0) {\n for (var index in this.arr) {\n res[index] = this.arr[index] / length;\n }\n }\n return new Vector(res);\n };\n Vector.prototype.negate = function () {\n var res = [];\n for (var index in this.arr) {\n res[index] = -this.arr[index];\n }\n return new Vector(res);\n };\n // 平方欧式距离\n Vector.prototype.squareEuclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return res;\n }\n };\n // 欧式距离\n Vector.prototype.euclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return Math.sqrt(res);\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 归一化处理\n Vector.prototype.normalize = function () {\n var res = [];\n var cloneArr = clone(this.arr);\n cloneArr.sort(function (a, b) {\n return a - b;\n });\n var max = cloneArr[cloneArr.length - 1];\n var min = cloneArr[0];\n for (var index in this.arr) {\n res[index] = (this.arr[index] - min) / (max - min);\n }\n return new Vector(res);\n };\n // 2范数 or 模长\n Vector.prototype.norm2 = function () {\n var _a;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return 0;\n }\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index], 2);\n }\n return Math.sqrt(res);\n };\n // 两个向量的点积\n Vector.prototype.dot = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += this.arr[index] * otherVector.arr[index];\n }\n return res;\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 两个向量比较\n Vector.prototype.equal = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) !== (otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return false;\n }\n for (var index in this.arr) {\n if (this.arr[index] !== otherArr[index]) {\n return false;\n }\n }\n return true;\n };\n return Vector;\n}();\nexport default Vector;","import { secondReg, dateReg } from '../constants/time';\n// 获取所有属性并排序\nexport var getAllSortProperties = function getAllSortProperties(nodes, n) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (n === void 0) {\n n = 100;\n }\n var propertyKeyInfo = {};\n nodes.forEach(function (node) {\n if (!node.properties) {\n return;\n }\n Object.keys(node.properties).forEach(function (propertyKey) {\n // 目前过滤只保留可以转成数值型的或日期型的, todo: 统一转成one-hot特征向量或者embedding\n if (propertyKey === 'id' || !\"\".concat(node.properties[propertyKey]).match(secondReg) && !\"\".concat(node.properties[propertyKey]).match(dateReg) && isNaN(Number(node.properties[propertyKey]))) {\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n delete propertyKeyInfo[propertyKey];\n }\n return;\n }\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n propertyKeyInfo[propertyKey] += 1;\n } else {\n propertyKeyInfo[propertyKey] = 1;\n }\n });\n });\n // 取top50的属性\n var sortKeys = Object.keys(propertyKeyInfo).sort(function (a, b) {\n return propertyKeyInfo[b] - propertyKeyInfo[a];\n });\n return sortKeys.length < n ? sortKeys : sortKeys.slice(0, n);\n};\nvar processProperty = function processProperty(properties, propertyKeys) {\n return propertyKeys.map(function (key) {\n if (properties.hasOwnProperty(key)) {\n // // 可以转成数值的直接转成数值\n // if (!isNaN(Number(properties[key]))) {\n // return Number(properties[key]);\n // }\n // // 时间型的转成时间戳\n // if (properties[key].match(secondReg) || properties[key].match(dateReg)) {\n // // @ts-ignore\n // return Number(Date.parse(new Date(properties[key]))) / 1000;\n // }\n return properties[key];\n }\n return 0;\n });\n};\n// 获取属性特征权重\nexport var getPropertyWeight = function getPropertyWeight(nodes) {\n var propertyKeys = getAllSortProperties(nodes);\n var allPropertiesWeight = [];\n for (var i = 0; i < nodes.length; i++) {\n allPropertiesWeight[i] = processProperty(nodes[i].properties, propertyKeys);\n }\n return allPropertiesWeight;\n};\n// 获取所有节点的属性集合\nexport var getAllProperties = function getAllProperties(nodes, key) {\n if (key === void 0) {\n key = undefined;\n }\n var allProperties = [];\n nodes.forEach(function (node) {\n if (key === undefined) {\n allProperties.push(node);\n }\n if (node[key] !== undefined) {\n allProperties.push(node[key]);\n }\n });\n return allProperties;\n};\nexport default {\n getAllSortProperties: getAllSortProperties,\n getPropertyWeight: getPropertyWeight,\n getAllProperties: getAllProperties\n};","export var DistanceType;\n(function (DistanceType) {\n DistanceType[\"EuclideanDistance\"] = \"euclideanDistance\";\n})(DistanceType || (DistanceType = {}));","import { uniq } from '@antv/util';\nimport { DistanceType } from '../types';\nimport Vector from './vector';\n/**\n * 获取数据中所有的属性及其对应的值\n * @param dataList 数据集\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexport var getAllKeyValueMap = function getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys) {\n var keys = [];\n // 指定了参与计算的keys时,使用指定的keys\n if (involvedKeys === null || involvedKeys === void 0 ? void 0 : involvedKeys.length) {\n keys = involvedKeys;\n } else {\n // 未指定抽取的keys时,提取数据中所有的key\n dataList.forEach(function (data) {\n keys = keys.concat(Object.keys(data));\n });\n keys = uniq(keys);\n }\n // 获取所有值非空的key的value数组\n var allKeyValueMap = {};\n keys.forEach(function (key) {\n var value = [];\n dataList.forEach(function (data) {\n if (data[key] !== undefined && data[key] !== '') {\n value.push(data[key]);\n }\n });\n if (value.length && !(uninvolvedKeys === null || uninvolvedKeys === void 0 ? void 0 : uninvolvedKeys.includes(key))) {\n allKeyValueMap[key] = uniq(value);\n }\n });\n return allKeyValueMap;\n};\n/**\n * one-hot编码:数据特征提取\n * @param dataList 数据集\n * @param involvedKeys 参与计算的的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexport var oneHot = function oneHot(dataList, involvedKeys, uninvolvedKeys) {\n // 获取数据中所有的属性/特征及其对应的值\n var allKeyValueMap = getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys);\n var oneHotCode = [];\n if (!Object.keys(allKeyValueMap).length) {\n return oneHotCode;\n }\n // 获取所有的属性/特征值\n var allValue = Object.values(allKeyValueMap);\n // 是否所有属性/特征的值都是数值型\n var isAllNumber = allValue.every(function (value) {\n return value.every(function (item) {\n return typeof item === 'number';\n });\n });\n // 对数据进行one-hot编码\n dataList.forEach(function (data, index) {\n var code = [];\n Object.keys(allKeyValueMap).forEach(function (key) {\n var keyValue = data[key];\n var allKeyValue = allKeyValueMap[key];\n var valueIndex = allKeyValue.findIndex(function (value) {\n return keyValue === value;\n });\n var subCode = [];\n // 如果属性/特征所有的值都能转成数值型,不满足分箱,则直接用值(todo: 为了收敛更快,需做归一化处理)\n if (isAllNumber) {\n subCode.push(keyValue);\n } else {\n // 进行one-hot编码\n for (var i = 0; i < allKeyValue.length; i++) {\n if (i === valueIndex) {\n subCode.push(1);\n } else {\n subCode.push(0);\n }\n }\n }\n code = code.concat(subCode);\n });\n oneHotCode[index] = code;\n });\n return oneHotCode;\n};\n/**\n * getDistance:获取两个元素之间的距离\n * @param item\n * @param otherItem\n * @param distanceType 距离类型\n * @param graphData 图数据\n */\nexport var getDistance = function getDistance(item, otherItem, distanceType, graphData) {\n if (distanceType === void 0) {\n distanceType = DistanceType.EuclideanDistance;\n }\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = new Vector(item).euclideanDistance(new Vector(otherItem));\n break;\n default:\n break;\n }\n return distance;\n};\nexport default {\n getAllKeyValueMap: getAllKeyValueMap,\n oneHot: oneHot,\n getDistance: getDistance\n};","import { clone } from '@antv/util';\nimport getAdjMatrix from './adjacent-matrix';\nimport Vector from './utils/vector';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot } from './utils/data-preprocessing';\nvar getModularity = function getModularity(nodes, adjMatrix, ks, m) {\n var length = adjMatrix.length;\n var param = 2 * m;\n var modularity = 0;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (clusteri !== clusterj) continue;\n var entry = adjMatrix[i][j] || 0;\n var ki = ks[i] || 0;\n var kj = ks[j] || 0;\n modularity += entry - ki * kj / param;\n }\n }\n modularity *= 1 / param;\n return modularity;\n};\n// 模块惯性度,衡量属性相似度\nvar getInertialModularity = function getInertialModularity(nodes, allPropertiesWeight) {\n if (nodes === void 0) {\n nodes = [];\n }\n var length = nodes.length;\n var totalProperties = new Vector([]);\n for (var i = 0; i < length; i++) {\n totalProperties = totalProperties.add(new Vector(allPropertiesWeight[i]));\n }\n // 均值向量\n var avgProperties = totalProperties.avg(length);\n avgProperties.normalize();\n // 节点集合的方差: 节点v与均值向量的平方欧式距离之和\n var variance = 0;\n for (var i = 0; i < length; i++) {\n var propertiesi = new Vector(allPropertiesWeight[i]);\n var squareEuclideanDistance = propertiesi.squareEuclideanDistance(avgProperties);\n variance += squareEuclideanDistance;\n }\n // 任意两点间的欧式平方距离\n var squareEuclideanDistanceInfo = [];\n nodes.forEach(function () {\n squareEuclideanDistanceInfo.push([]);\n });\n for (var i = 0; i < length; i++) {\n var propertiesi = new Vector(allPropertiesWeight[i]);\n nodes[i]['clusterInertial'] = 0;\n for (var j = 0; j < length; j++) {\n if (i === j) {\n squareEuclideanDistanceInfo[i][j] = 0;\n continue;\n }\n var propertiesj = new Vector(allPropertiesWeight[j]);\n squareEuclideanDistanceInfo[i][j] = propertiesi.squareEuclideanDistance(propertiesj);\n nodes[i]['clusterInertial'] += squareEuclideanDistanceInfo[i][j];\n }\n }\n // 计算模块惯性度\n var inertialModularity = 0;\n var param = 2 * length * variance;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (i === j || clusteri !== clusterj) continue;\n var inertial = nodes[i].clusterInertial * nodes[j].clusterInertial / Math.pow(param, 2) - squareEuclideanDistanceInfo[i][j] / param;\n inertialModularity += inertial;\n }\n }\n return Number(inertialModularity.toFixed(4));\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param inertialModularity 是否使用惯性模块度(即节点属性相似性)\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar louvain = function louvain(graphData, directed, weightPropertyName, threshold, inertialModularity, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (inertialModularity === void 0) {\n inertialModularity = false;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allPropertiesWeight = [];\n if (inertialModularity) {\n nodes.forEach(function (node, index) {\n node.properties = node.properties || {};\n node.originIndex = index;\n });\n var nodeTypeInfo_1 = [];\n if (nodes.every(function (node) {\n return node.hasOwnProperty('nodeType');\n })) {\n nodeTypeInfo_1 = Array.from(new Set(nodes.map(function (node) {\n return node.nodeType;\n })));\n nodes.forEach(function (node) {\n node.properties.nodeType = nodeTypeInfo_1.findIndex(function (nodeType) {\n return nodeType === node.nodeType;\n });\n });\n }\n // 所有节点属性集合\n var properties = getAllProperties(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n }\n var uniqueId = 1;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = String(uniqueId++);\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = getAdjMatrix(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n // the sum of the weights of all edges in the graph\n var m = 0;\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n m += entry;\n });\n ks.push(k);\n });\n m /= 2;\n var totalModularity = Infinity;\n var previousModularity = Infinity;\n var iter = 0;\n var finalNodes = [];\n var finalClusters = {};\n while (true) {\n if (inertialModularity && nodes.every(function (node) {\n return node.hasOwnProperty('properties');\n })) {\n totalModularity = getModularity(nodes, adjMatrix, ks, m) + getInertialModularity(nodes, allPropertiesWeight) * inertialWeight;\n } else {\n totalModularity = getModularity(nodes, adjMatrix, ks, m);\n }\n // 第一次迭代previousModularity直接赋值\n if (iter === 0) {\n previousModularity = totalModularity;\n finalNodes = nodes;\n finalClusters = clusters;\n }\n var increaseWithinThreshold = totalModularity > 0 && totalModularity > previousModularity && totalModularity - previousModularity < threshold;\n // 总模块度增加才更新最优解\n if (totalModularity > previousModularity) {\n finalNodes = nodes.map(function (node) {\n return {\n node: node,\n clusterId: node.clusterId\n };\n });\n finalClusters = clone(clusters);\n previousModularity = totalModularity;\n }\n // whether to terminate the iterations\n if (increaseWithinThreshold || iter > 100) {\n break;\n }\n ;\n iter++;\n // pre compute some values for current clusters\n Object.keys(clusters).forEach(function (clusterId) {\n // sum of weights of edges to nodes in cluster\n var sumTot = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === clusterId && targetClusterId !== clusterId || targetClusterId === clusterId && sourceClusterId !== clusterId) {\n sumTot = sumTot + (edge[weightPropertyName] || 1);\n }\n });\n clusters[clusterId].sumTot = sumTot;\n });\n // move the nodes to increase the delta modularity\n nodes.forEach(function (node, i) {\n var selfCluster = clusters[node.clusterId];\n var bestIncrease = 0;\n var bestCluster;\n var commonParam = ks[i] / (2 * m);\n // sum of weights of edges from node to nodes in cluster\n var kiin = 0;\n var selfClusterNodes = selfCluster.nodes;\n selfClusterNodes.forEach(function (scNode) {\n var scNodeIdx = nodeMap[scNode.id].idx;\n kiin += adjMatrix[i][scNodeIdx] || 0;\n });\n // the modurarity for **removing** the node i from the origin cluster of node i\n var removeModurarity = kiin - selfCluster.sumTot * commonParam;\n // nodes for **removing** node i into this neighbor cluster\n var selfClusterNodesAfterRemove = selfClusterNodes.filter(function (scNode) {\n return scNode.id !== node.id;\n });\n var propertiesWeightRemove = [];\n selfClusterNodesAfterRemove.forEach(function (nodeRemove, index) {\n propertiesWeightRemove[index] = allPropertiesWeight[nodeRemove.originIndex];\n });\n // the inertialModularity for **removing** the node i from the origin cluster of node i\n var removeInertialModularity = getInertialModularity(selfClusterNodesAfterRemove, allPropertiesWeight) * inertialWeight;\n // the neightbors of the node\n var nodeNeighborIds = neighbors[node.id];\n Object.keys(nodeNeighborIds).forEach(function (neighborNodeId) {\n var neighborNode = nodeMap[neighborNodeId].node;\n var neighborClusterId = neighborNode.clusterId;\n // if the node and the neighbor of node are in the same cluster, reutrn\n if (neighborClusterId === node.clusterId) return;\n var neighborCluster = clusters[neighborClusterId];\n var clusterNodes = neighborCluster.nodes;\n // if the cluster is empty, remove the cluster and return\n if (!clusterNodes || !clusterNodes.length) return;\n // sum of weights of edges from node to nodes in cluster\n var neighborClusterKiin = 0;\n clusterNodes.forEach(function (cNode) {\n var cNodeIdx = nodeMap[cNode.id].idx;\n neighborClusterKiin += adjMatrix[i][cNodeIdx] || 0;\n });\n // the modurarity for **adding** node i into this neighbor cluster\n var addModurarity = neighborClusterKiin - neighborCluster.sumTot * commonParam;\n // nodes for **adding** node i into this neighbor cluster\n var clusterNodesAfterAdd = clusterNodes.concat([node]);\n var propertiesWeightAdd = [];\n clusterNodesAfterAdd.forEach(function (nodeAdd, index) {\n propertiesWeightAdd[index] = allPropertiesWeight[nodeAdd.originIndex];\n });\n // the inertialModularity for **adding** node i into this neighbor cluster\n var addInertialModularity = getInertialModularity(clusterNodesAfterAdd, allPropertiesWeight) * inertialWeight;\n // the increase modurarity is the difference between addModurarity and removeModurarity\n var increase = addModurarity - removeModurarity;\n if (inertialModularity) {\n increase = addModurarity + addInertialModularity - (removeModurarity + removeInertialModularity);\n }\n // find the best cluster to move node i into\n if (increase > bestIncrease) {\n bestIncrease = increase;\n bestCluster = neighborCluster;\n }\n });\n // if found a best cluster to move into\n if (bestIncrease > 0) {\n bestCluster.nodes.push(node);\n var previousClusterId_1 = node.clusterId;\n node.clusterId = bestCluster.id;\n // move the node to the best cluster\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n // remove from origin cluster\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // update sumTot for clusters\n // sum of weights of edges to nodes in cluster\n var neighborClusterSumTot_1 = 0;\n var selfClusterSumTot_1 = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === bestCluster.id && targetClusterId !== bestCluster.id || targetClusterId === bestCluster.id && sourceClusterId !== bestCluster.id) {\n neighborClusterSumTot_1 = neighborClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n if (sourceClusterId === previousClusterId_1 && targetClusterId !== previousClusterId_1 || targetClusterId === previousClusterId_1 && sourceClusterId !== previousClusterId_1) {\n selfClusterSumTot_1 = selfClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n });\n // the nodes of the clusters to move into and remove are changed, update their sumTot\n bestCluster.sumTot = neighborClusterSumTot_1;\n selfCluster.sumTot = selfClusterSumTot_1;\n }\n });\n }\n // delete the empty clusters, assign increasing clusterId\n var newClusterIdMap = {};\n var clusterIdx = 0;\n Object.keys(finalClusters).forEach(function (clusterId) {\n var cluster = finalClusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete finalClusters[clusterId];\n return;\n }\n var newId = String(clusterIdx + 1);\n if (newId === clusterId) {\n return;\n }\n cluster.id = newId;\n cluster.nodes = cluster.nodes.map(function (item) {\n return {\n id: item.id,\n clusterId: newId\n };\n });\n finalClusters[newId] = cluster;\n newClusterIdMap[clusterId] = newId;\n delete finalClusters[clusterId];\n clusterIdx++;\n });\n // restore node clusterId\n finalNodes.forEach(function (nodeInfo) {\n var node = nodeInfo.node,\n clusterId = nodeInfo.clusterId;\n if (!node) return;\n node.clusterId = clusterId;\n if (node.clusterId && newClusterIdMap[node.clusterId]) node.clusterId = newClusterIdMap[node.clusterId];\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (!sourceClusterId || !targetClusterId) return;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(finalClusters).forEach(function (clusterId) {\n clustersArray.push(finalClusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nexport default louvain;","import louvain from './louvain';\n/**\n * 社区发现 i-louvain 算法:模块度 + 惯性模块度(即节点属性相似性)\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar iLouvain = function iLouvain(graphData, directed, weightPropertyName, threshold, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n return louvain(graphData, directed, weightPropertyName, threshold, true, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight);\n};\nexport default iLouvain;","import { clone } from '@antv/util';\nimport degree from './degree';\n/**\n * k-core算法 找出符合指定核心度的紧密关联的子图结构\n * @param graphData 图数据\n * @param k 核心度数\n */\nvar kCore = function kCore(graphData, k) {\n var _a;\n if (k === void 0) {\n k = 1;\n }\n var data = clone(graphData);\n var _b = data.nodes,\n nodes = _b === void 0 ? [] : _b;\n var _c = data.edges,\n edges = _c === void 0 ? [] : _c;\n var _loop_1 = function _loop_1() {\n // 获取图中节点的度数\n var degrees = degree({\n nodes: nodes,\n edges: edges\n });\n var nodeIds = Object.keys(degrees);\n // 按照度数进行排序\n nodeIds.sort(function (a, b) {\n var _a, _b;\n return ((_a = degrees[a]) === null || _a === void 0 ? void 0 : _a.degree) - ((_b = degrees[b]) === null || _b === void 0 ? void 0 : _b.degree);\n });\n var minIndexId = nodeIds[0];\n if (!nodes.length || ((_a = degrees[minIndexId]) === null || _a === void 0 ? void 0 : _a.degree) >= k) {\n return \"break\";\n }\n var originIndex = nodes.findIndex(function (node) {\n return node.id === minIndexId;\n });\n // 移除度数小于k的节点\n nodes.splice(originIndex, 1);\n // 移除度数小于k的节点相关的边\n edges = edges.filter(function (edge) {\n return !(edge.source === minIndexId || edge.target === minIndexId);\n });\n };\n while (true) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n return {\n nodes: nodes,\n edges: edges\n };\n};\nexport default kCore;","import { isEqual, uniq } from '@antv/util';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot, getDistance } from './utils/data-preprocessing';\nimport Vector from './utils/vector';\nimport { DistanceType } from './types';\n// 获取质心\nvar getCentroid = function getCentroid(distanceType, allPropertiesWeight, index) {\n var centroid = [];\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n centroid = allPropertiesWeight[index];\n break;\n default:\n centroid = [];\n break;\n }\n return centroid;\n};\n/**\n * k-means算法 根据节点之间的距离将节点聚类为K个簇\n * @param data 图数据\n * @param k 质心(聚类中心)个数\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param distanceType 距离类型 默认节点属性的欧式距离\n */\nvar kMeans = function kMeans(data, k, propertyKey, involvedKeys, uninvolvedKeys, distanceType) {\n if (k === void 0) {\n k = 3;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (distanceType === void 0) {\n distanceType = DistanceType.EuclideanDistance;\n }\n var _a = data.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = data.edges,\n edges = _b === void 0 ? [] : _b;\n var defaultClusterInfo = {\n clusters: [{\n id: \"0\",\n nodes: nodes\n }],\n clusterEdges: []\n };\n // 距离类型为欧式距离且没有属性时,直接return\n if (distanceType === DistanceType.EuclideanDistance && !nodes.every(function (node) {\n return node.hasOwnProperty(propertyKey);\n })) {\n return defaultClusterInfo;\n }\n // 所有节点属性集合\n var properties = [];\n // 所有节点属性one-hot特征向量集合\n var allPropertiesWeight = [];\n if (distanceType === DistanceType.EuclideanDistance) {\n properties = getAllProperties(nodes, propertyKey);\n allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n }\n if (!allPropertiesWeight.length) {\n return defaultClusterInfo;\n }\n var allPropertiesWeightUniq = uniq(allPropertiesWeight.map(function (item) {\n return item.join('');\n }));\n // 当输入节点数量或者属性集合的长度小于k时,k调整为其中最小的值\n var finalK = Math.min(k, nodes.length, allPropertiesWeightUniq.length);\n // 记录节点的原始index,与allPropertiesWeight对应\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].originIndex = i;\n }\n // 初始化质心(聚类中心)\n var centroids = [];\n var centroidIndexList = [];\n var clusters = [];\n for (var i = 0; i < finalK; i++) {\n if (i === 0) {\n // 随机选取质心(聚类中心)\n var randomIndex = Math.floor(Math.random() * nodes.length);\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n centroids[i] = allPropertiesWeight[randomIndex];\n break;\n default:\n centroids[i] = [];\n break;\n }\n centroidIndexList.push(randomIndex);\n clusters[i] = [nodes[randomIndex]];\n nodes[randomIndex].clusterId = String(i);\n } else {\n var maxDistance = -Infinity;\n var maxDistanceNodeIndex = 0;\n var _loop_1 = function _loop_1(m) {\n if (!centroidIndexList.includes(m)) {\n var totalDistance = 0;\n for (var j = 0; j < centroids.length; j++) {\n // 求节点到质心的距离(默认节点属性的欧式距离)\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = getDistance(allPropertiesWeight[nodes[m].originIndex], centroids[j], distanceType);\n break;\n default:\n break;\n }\n totalDistance += distance;\n }\n // 节点到各质心的平均距离(默认欧式距离)\n var avgDistance = totalDistance / centroids.length;\n // 记录到已有质心最远的的距离和节点索引\n if (avgDistance > maxDistance && !centroids.find(function (centroid) {\n return isEqual(centroid, getCentroid(distanceType, allPropertiesWeight, nodes[m].originIndex));\n })) {\n maxDistance = avgDistance;\n maxDistanceNodeIndex = m;\n }\n }\n };\n // 选取与已有质心平均距离最远的点做为新的质心\n for (var m = 0; m < nodes.length; m++) {\n _loop_1(m);\n }\n centroids[i] = getCentroid(distanceType, allPropertiesWeight, maxDistanceNodeIndex);\n centroidIndexList.push(maxDistanceNodeIndex);\n clusters[i] = [nodes[maxDistanceNodeIndex]];\n nodes[maxDistanceNodeIndex].clusterId = String(i);\n }\n }\n var iterations = 0;\n while (true) {\n for (var i = 0; i < nodes.length; i++) {\n var minDistanceIndex = 0;\n var minDistance = Infinity;\n if (!(iterations === 0 && centroidIndexList.includes(i))) {\n for (var j = 0; j < centroids.length; j++) {\n // 求节点到质心的距离(默认节点属性的欧式距离)\n var distance = 0;\n switch (distanceType) {\n case DistanceType.EuclideanDistance:\n distance = getDistance(allPropertiesWeight[i], centroids[j], distanceType);\n break;\n default:\n break;\n }\n // 记录节点最近的质心的索引\n if (distance < minDistance) {\n minDistance = distance;\n minDistanceIndex = j;\n }\n }\n // 从原来的类别删除节点\n if (nodes[i].clusterId !== undefined) {\n for (var n = clusters[Number(nodes[i].clusterId)].length - 1; n >= 0; n--) {\n if (clusters[Number(nodes[i].clusterId)][n].id === nodes[i].id) {\n clusters[Number(nodes[i].clusterId)].splice(n, 1);\n }\n }\n }\n // 将节点划分到距离最小的质心(聚类中心)所对应的类中\n nodes[i].clusterId = String(minDistanceIndex);\n clusters[minDistanceIndex].push(nodes[i]);\n }\n }\n // 是否存在质心(聚类中心)移动\n var centroidsEqualAvg = false;\n for (var i = 0; i < clusters.length; i++) {\n var clusterNodes = clusters[i];\n var totalVector = new Vector([]);\n for (var j = 0; j < clusterNodes.length; j++) {\n totalVector = totalVector.add(new Vector(allPropertiesWeight[clusterNodes[j].originIndex]));\n }\n // 计算每个类别的均值向量\n var avgVector = totalVector.avg(clusterNodes.length);\n // 如果均值向量不等于质心向量\n if (!avgVector.equal(new Vector(centroids[i]))) {\n centroidsEqualAvg = true;\n // 移动/更新每个类别的质心(聚类中心)到该均值向量\n centroids[i] = avgVector.getArr();\n }\n }\n iterations++;\n // 如果每个节点都归属了类别,且不存在质心(聚类中心)移动或者迭代次数超过1000,则停止\n if (nodes.every(function (node) {\n return node.clusterId !== undefined;\n }) && centroidsEqualAvg || iterations >= 1000) {\n break;\n }\n }\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var _a, _b;\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = (_a = nodes.find(function (node) {\n return node.id === source;\n })) === null || _a === void 0 ? void 0 : _a.clusterId;\n var targetClusterId = (_b = nodes.find(function (node) {\n return node.id === target;\n })) === null || _b === void 0 ? void 0 : _b.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n return {\n clusters: clusters,\n clusterEdges: clusterEdges\n };\n};\nexport default kMeans;","import Vector from './utils/vector';\n/**\n * cosine-similarity算法 计算余弦相似度\n * @param item 元素\n * @param targetItem 目标元素\n */\nvar cosineSimilarity = function cosineSimilarity(item, targetItem) {\n // 目标元素向量\n var targetItemVector = new Vector(targetItem);\n // 目标元素向量的模长\n var targetNodeNorm2 = targetItemVector.norm2();\n // 元素向量\n var itemVector = new Vector(item);\n // 元素向量的模长\n var itemNorm2 = itemVector.norm2();\n // 计算元素向量和目标元素向量的点积\n var dot = targetItemVector.dot(itemVector);\n var norm2Product = targetNodeNorm2 * itemNorm2;\n // 计算元素向量和目标元素向量的余弦相似度\n var cosineSimilarity = norm2Product ? dot / norm2Product : 0;\n return cosineSimilarity;\n};\nexport default cosineSimilarity;","import { clone } from '@antv/util';\nimport { getAllProperties } from './utils/node-properties';\nimport { oneHot } from './utils/data-preprocessing';\nimport cosineSimilarity from './cosine-similarity';\n/**\n * nodes-cosine-similarity算法 基于节点属性计算余弦相似度(基于种子节点寻找相似节点)\n * @param nodes 图节点数据\n * @param seedNode 种子节点\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nvar nodesCosineSimilarity = function nodesCosineSimilarity(nodes, seedNode, propertyKey, involvedKeys, uninvolvedKeys) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = [];\n }\n var similarNodes = clone(nodes.filter(function (node) {\n return node.id !== seedNode.id;\n }));\n var seedNodeIndex = nodes.findIndex(function (node) {\n return node.id === seedNode.id;\n });\n // 所有节点属性集合\n var properties = getAllProperties(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n var allPropertiesWeight = oneHot(properties, involvedKeys, uninvolvedKeys);\n // 种子节点属性\n var seedNodeProperties = allPropertiesWeight[seedNodeIndex];\n var allCosineSimilarity = [];\n similarNodes.forEach(function (node, index) {\n if (node.id !== seedNode.id) {\n // 节点属性\n var nodeProperties = allPropertiesWeight[index];\n // 计算节点向量和种子节点向量的余弦相似度\n var cosineSimilarityValue = cosineSimilarity(nodeProperties, seedNodeProperties);\n allCosineSimilarity.push(cosineSimilarityValue);\n node.cosineSimilarity = cosineSimilarityValue;\n }\n });\n // 将返回的节点按照余弦相似度大小排序\n similarNodes.sort(function (a, b) {\n return b.cosineSimilarity - a.cosineSimilarity;\n });\n return {\n allCosineSimilarity: allCosineSimilarity,\n similarNodes: similarNodes\n };\n};\nexport default nodesCosineSimilarity;","/**\n * 并查集 Disjoint set to support quick union\n */\nvar UnionFind = /** @class */function () {\n function UnionFind(items) {\n this.count = items.length;\n this.parent = {};\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var i = items_1[_i];\n this.parent[i] = i;\n }\n }\n // find the root of the item\n UnionFind.prototype.find = function (item) {\n while (this.parent[item] !== item) {\n item = this.parent[item];\n }\n return item;\n };\n UnionFind.prototype.union = function (a, b) {\n var rootA = this.find(a);\n var rootB = this.find(b);\n if (rootA === rootB) return;\n // make the element with smaller root the parent\n if (rootA < rootB) {\n if (this.parent[b] !== b) this.union(this.parent[b], a);\n this.parent[b] = this.parent[a];\n } else {\n if (this.parent[a] !== a) this.union(this.parent[a], b);\n this.parent[a] = this.parent[b];\n }\n };\n // whether a and b are connected, i.e. a and b have the same root\n UnionFind.prototype.connected = function (a, b) {\n return this.find(a) === this.find(b);\n };\n return UnionFind;\n}();\nexport default UnionFind;","var defaultCompare = function defaultCompare(a, b) {\n return a - b;\n};\nvar MinBinaryHeap = /** @class */function () {\n function MinBinaryHeap(compareFn) {\n if (compareFn === void 0) {\n compareFn = defaultCompare;\n }\n this.compareFn = compareFn;\n this.list = [];\n }\n MinBinaryHeap.prototype.getLeft = function (index) {\n return 2 * index + 1;\n };\n MinBinaryHeap.prototype.getRight = function (index) {\n return 2 * index + 2;\n };\n MinBinaryHeap.prototype.getParent = function (index) {\n if (index === 0) {\n return null;\n }\n return Math.floor((index - 1) / 2);\n };\n MinBinaryHeap.prototype.isEmpty = function () {\n return this.list.length <= 0;\n };\n MinBinaryHeap.prototype.top = function () {\n return this.isEmpty() ? undefined : this.list[0];\n };\n MinBinaryHeap.prototype.delMin = function () {\n var top = this.top();\n var bottom = this.list.pop();\n if (this.list.length > 0) {\n this.list[0] = bottom;\n this.moveDown(0);\n }\n return top;\n };\n MinBinaryHeap.prototype.insert = function (value) {\n if (value !== null) {\n this.list.push(value);\n var index = this.list.length - 1;\n this.moveUp(index);\n return true;\n }\n return false;\n };\n MinBinaryHeap.prototype.moveUp = function (index) {\n var parent = this.getParent(index);\n while (index && index > 0 && this.compareFn(this.list[parent], this.list[index]) > 0) {\n // swap\n var tmp = this.list[parent];\n this.list[parent] = this.list[index];\n this.list[index] = tmp;\n // [this.list[index], this.list[parent]] = [this.list[parent], this.list[index]]\n index = parent;\n parent = this.getParent(index);\n }\n };\n MinBinaryHeap.prototype.moveDown = function (index) {\n var _a;\n var element = index;\n var left = this.getLeft(index);\n var right = this.getRight(index);\n var size = this.list.length;\n if (left !== null && left < size && this.compareFn(this.list[element], this.list[left]) > 0) {\n element = left;\n } else if (right !== null && right < size && this.compareFn(this.list[element], this.list[right]) > 0) {\n element = right;\n }\n if (index !== element) {\n _a = [this.list[element], this.list[index]], this.list[index] = _a[0], this.list[element] = _a[1];\n this.moveDown(element);\n }\n };\n return MinBinaryHeap;\n}();\nexport default MinBinaryHeap;","import UnionFind from './structs/union-find';\nimport MinBinaryHeap from './structs/binary-heap';\nimport { getEdgesByNodeId } from './util';\n/**\n * Prim algorithm,use priority queue,复杂度 O(E+V*logV), V: 节点数量,E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Prim%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n */\nvar primMST = function primMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 从nodes[0]开始\n var currNode = nodes[0];\n var visited = new Set();\n visited.add(currNode);\n // 用二叉堆维护距已加入节点的其他节点的边的权值\n var compareWeight = function compareWeight(a, b) {\n if (weight) {\n return a.weight - b.weight;\n }\n return 0;\n };\n var edgeQueue = new MinBinaryHeap(compareWeight);\n getEdgesByNodeId(currNode.id, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n while (!edgeQueue.isEmpty()) {\n // 选取与已加入的结点之间边权最小的结点\n var currEdge = edgeQueue.delMin();\n var source = currEdge.source;\n var target = currEdge.target;\n if (visited.has(source) && visited.has(target)) continue;\n selectedEdges.push(currEdge);\n if (!visited.has(source)) {\n visited.add(source);\n getEdgesByNodeId(source, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n if (!visited.has(target)) {\n visited.add(target);\n getEdgesByNodeId(target, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n }\n return selectedEdges;\n};\n/**\n * Kruskal algorithm,复杂度 O(E*logE), E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @return IEdge[] 返回构成MST的边的数组\n */\nvar kruskalMST = function kruskalMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 若指定weight,则将所有的边按权值从小到大排序\n var weightEdges = edges.map(function (edge) {\n return edge;\n });\n if (weight) {\n weightEdges.sort(function (a, b) {\n return a.weight - b.weight;\n });\n }\n var disjointSet = new UnionFind(nodes.map(function (n) {\n return n.id;\n }));\n // 从权值最小的边开始,如果这条边连接的两个节点于图G中不在同一个连通分量中,则添加这条边\n // 直到遍历完所有点或边\n while (weightEdges.length > 0) {\n var curEdge = weightEdges.shift();\n var source = curEdge.source;\n var target = curEdge.target;\n if (!disjointSet.connected(source, target)) {\n selectedEdges.push(curEdge);\n disjointSet.union(source, target);\n }\n }\n return selectedEdges;\n};\n/**\n * 最小生成树\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nvar minimumSpanningTree = function minimumSpanningTree(graphData, weight, algo) {\n var algos = {\n prim: primMST,\n kruskal: kruskalMST\n };\n if (!algo) return kruskalMST(graphData, weight);\n return algos[algo](graphData, weight);\n};\nexport default minimumSpanningTree;","import degree from './degree';\nimport { getNeighbors } from \"./util\";\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nvar pageRank = function pageRank(graphData, epsilon, linkProb) {\n if (typeof epsilon !== 'number') epsilon = 0.000001;\n if (typeof linkProb !== 'number') linkProb = 0.85;\n var distance = 1;\n var leakedRank = 0;\n var maxIterations = 1000;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodesCount = nodes.length;\n var currentRank;\n var curRanks = {};\n var prevRanks = {};\n // Initialize pageranks 初始化\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n curRanks[nodeId] = 1 / nodesCount;\n prevRanks[nodeId] = 1 / nodesCount;\n }\n var nodeDegree = degree(graphData);\n while (maxIterations > 0 && distance > epsilon) {\n leakedRank = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = 0;\n if (nodeDegree[node.id].inDegree === 0) {\n curRanks[nodeId] = 0;\n } else {\n var neighbors = getNeighbors(nodeId, edges, 'source');\n for (var i = 0; i < neighbors.length; ++i) {\n var neighbor = neighbors[i];\n var outDegree = nodeDegree[neighbor].outDegree;\n if (outDegree > 0) currentRank += prevRanks[neighbor] / outDegree;\n }\n curRanks[nodeId] = linkProb * currentRank;\n leakedRank += curRanks[nodeId];\n }\n }\n leakedRank = (1 - leakedRank) / nodesCount;\n distance = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = curRanks[nodeId] + leakedRank;\n distance += Math.abs(currentRank - prevRanks[nodeId]);\n prevRanks[nodeId] = currentRank;\n }\n maxIterations -= 1;\n }\n return prevRanks;\n};\nexport default pageRank;","export var VACANT_EDGE_ID = -1;\nexport var VACANT_NODE_ID = -1;\nexport var VACANT_EDGE_LABEL = \"-1\";\nexport var VACANT_NODE_LABEL = \"-1\";\nexport var VACANT_GRAPH_ID = -1;\nexport var AUTO_EDGE_ID = \"-1\";\nvar Edge = /** @class */function () {\n function Edge(id, from, to, label) {\n if (id === void 0) {\n id = VACANT_EDGE_ID;\n }\n if (from === void 0) {\n from = VACANT_NODE_ID;\n }\n if (to === void 0) {\n to = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_EDGE_LABEL;\n }\n this.id = id;\n this.from = from;\n this.to = to;\n this.label = label;\n }\n return Edge;\n}();\nexport { Edge };\nvar Node = /** @class */function () {\n function Node(id, label) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_NODE_LABEL;\n }\n this.id = id;\n this.label = label;\n this.edges = [];\n this.edgeMap = {};\n }\n Node.prototype.addEdge = function (edge) {\n this.edges.push(edge);\n this.edgeMap[edge.id] = edge;\n };\n return Node;\n}();\nexport { Node };\nvar Graph = /** @class */function () {\n function Graph(id, edgeIdAutoIncrease, directed) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (edgeIdAutoIncrease === void 0) {\n edgeIdAutoIncrease = true;\n }\n if (directed === void 0) {\n directed = false;\n }\n this.id = id;\n this.edgeIdAutoIncrease = edgeIdAutoIncrease;\n this.edges = [];\n this.nodes = [];\n this.nodeMap = {};\n this.edgeMap = {};\n this.nodeLabelMap = {};\n this.edgeLabelMap = {};\n this.counter = 0;\n this.directed = directed;\n }\n Graph.prototype.getNodeNum = function () {\n return this.nodes.length;\n };\n Graph.prototype.addNode = function (id, label) {\n if (this.nodeMap[id]) return;\n var node = new Node(id, label);\n this.nodes.push(node);\n this.nodeMap[id] = node;\n if (!this.nodeLabelMap[label]) this.nodeLabelMap[label] = [];\n this.nodeLabelMap[label].push(id);\n };\n Graph.prototype.addEdge = function (id, from, to, label) {\n if (this.edgeIdAutoIncrease || id === undefined) id = this.counter++;\n if (this.nodeMap[from] && this.nodeMap[to] && this.nodeMap[to].edgeMap[id]) return;\n var edge = new Edge(id, from, to, label);\n this.edges.push(edge);\n this.edgeMap[id] = edge;\n this.nodeMap[from].addEdge(edge);\n if (!this.edgeLabelMap[label]) this.edgeLabelMap[label] = [];\n this.edgeLabelMap[label].push(edge);\n if (!this.directed) {\n var rEdge = new Edge(id, to, from, label);\n this.nodeMap[to].addEdge(rEdge);\n this.edgeLabelMap[label].push(rEdge);\n }\n };\n return Graph;\n}();\nexport { Graph };","import { clone } from \"@antv/util\";\nimport { Graph, VACANT_NODE_LABEL, VACANT_GRAPH_ID, VACANT_EDGE_LABEL } from \"./struct\";\nvar DFSedge = /** @class */function () {\n function DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.fromNode = fromNode;\n this.toNode = toNode;\n this.nodeEdgeNodeLabel = {\n nodeLabel1: fromNodeLabel || VACANT_NODE_LABEL,\n edgeLabel: edgeLabel || VACANT_EDGE_LABEL,\n nodeLabel2: toNodeLabel || VACANT_NODE_LABEL\n };\n }\n DFSedge.prototype.equalTo = function (other) {\n return this.fromNode === other.formNode && this.toNode === other.toNode && this.nodeEdgeNodeLabel === other.nodeEdgeNodeLabel;\n };\n DFSedge.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n return DFSedge;\n}();\n// DFScode 是 DESedge 的数组\nvar DFScode = /** @class */function () {\n function DFScode() {\n this.rmpath = [];\n this.dfsEdgeList = [];\n }\n DFScode.prototype.equalTo = function (other) {\n var aLength = this.dfsEdgeList.length;\n var bLength = other.length;\n if (aLength !== bLength) return false;\n for (var i = 0; i < aLength; i++) {\n if (this.dfsEdgeList[i] !== other[i]) return false;\n }\n return true;\n };\n DFScode.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n /** 增加一条 edge 到 DFScode */\n DFScode.prototype.pushBack = function (fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.dfsEdgeList.push(new DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel));\n return this.dfsEdgeList;\n };\n /** 根据 dfs 构建图 */\n DFScode.prototype.toGraph = function (graphId, directed) {\n if (graphId === void 0) {\n graphId = VACANT_GRAPH_ID;\n }\n if (directed === void 0) {\n directed = false;\n }\n var graph = new Graph(graphId, true, directed);\n this.dfsEdgeList.forEach(function (dfsEdge) {\n var fromNodeId = dfsEdge.fromNode;\n var toNodeId = dfsEdge.toNode;\n var _a = dfsEdge.nodeEdgeNodeLabel,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (nodeLabel1 !== VACANT_NODE_LABEL) graph.addNode(fromNodeId, nodeLabel1);\n if (nodeLabel2 !== VACANT_NODE_LABEL) graph.addNode(toNodeId, nodeLabel2);\n if (nodeLabel1 !== VACANT_NODE_LABEL && nodeLabel2 !== nodeLabel1) graph.addEdge(undefined, fromNodeId, toNodeId, edgeLabel);\n });\n return graph;\n };\n // 建立 rightmost path\n DFScode.prototype.buildRmpath = function () {\n this.rmpath = [];\n var oldFrom = undefined;\n var selfLength = this.dfsEdgeList.length;\n for (var i = selfLength - 1; i >= 0; i--) {\n var dfsEdge = this.dfsEdgeList[i];\n var fromNodeIdx = dfsEdge.fromNode;\n var toNodeIdx = dfsEdge.toNode;\n if (fromNodeIdx < toNodeIdx && (oldFrom === undefined || toNodeIdx === oldFrom)) {\n this.rmpath.push(i);\n oldFrom = fromNodeIdx;\n }\n }\n return this.rmpath;\n };\n DFScode.prototype.getNodeNum = function () {\n var nodeMap = {};\n this.dfsEdgeList.forEach(function (dfsEdge) {\n if (!nodeMap[dfsEdge.fromNode]) nodeMap[dfsEdge.fromNode] = true;\n if (!nodeMap[dfsEdge.toNode]) nodeMap[dfsEdge.toNode] = true;\n });\n return Object.keys(nodeMap).length;\n };\n return DFScode;\n}();\nvar History = /** @class */function () {\n function History(pdfs) {\n this.his = {};\n this.nodesUsed = {};\n this.edgesUsed = {};\n this.edges = [];\n if (!pdfs) return;\n while (pdfs) {\n var e = pdfs.edge;\n this.edges.push(e);\n this.nodesUsed[e.from] = 1;\n this.nodesUsed[e.to] = 1;\n this.edgesUsed[e.id] = 1;\n pdfs = pdfs.preNode;\n }\n // 倒序\n this.edges = this.edges.reverse();\n }\n History.prototype.hasNode = function (node) {\n return this.nodesUsed[node.id] === 1;\n };\n History.prototype.hasEdge = function (edge) {\n return this.edgesUsed[edge.id] === 1;\n };\n return History;\n}();\nvar GSpan = /** @class */function () {\n function GSpan(_a) {\n var graphs = _a.graphs,\n _b = _a.minSupport,\n minSupport = _b === void 0 ? 2 : _b,\n _c = _a.minNodeNum,\n minNodeNum = _c === void 0 ? 1 : _c,\n _d = _a.maxNodeNum,\n maxNodeNum = _d === void 0 ? 4 : _d,\n _e = _a.top,\n top = _e === void 0 ? 10 : _e,\n _f = _a.directed,\n directed = _f === void 0 ? false : _f,\n _g = _a.verbose,\n verbose = _g === void 0 ? false : _g;\n // -------- 第零步,初始化-------\n this.graphs = graphs;\n this.dfsCode = new DFScode();\n this.support = 0;\n this.frequentSize1Subgraphs = [];\n this.frequentSubgraphs = [];\n this.minSupport = minSupport;\n this.top = top;\n this.directed = directed;\n this.counter = 0;\n // TODO? timestamp = {}\n this.maxNodeNum = maxNodeNum;\n this.minNodeNum = minNodeNum;\n this.verbose = verbose;\n if (this.maxNodeNum < this.minNodeNum) this.maxNodeNum = this.minNodeNum;\n this.reportDF = []; // matrix\n }\n // Line 352\n GSpan.prototype.findForwardRootEdges = function (graph, fromNode) {\n var _this = this;\n var result = [];\n var nodeMap = graph.nodeMap;\n fromNode.edges.forEach(function (edge) {\n if (_this.directed || fromNode.label <= nodeMap[edge.to].label) result.push(edge);\n });\n return result;\n };\n GSpan.prototype.findBackwardEdge = function (graph, edge1, edge2, history) {\n if (!this.directed && edge1 === edge2) return null;\n var nodeMap = graph.nodeMap;\n var edge2To = nodeMap[edge2.to];\n var edge2ToEdges = edge2To.edges;\n var edgeLength = edge2ToEdges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edge2ToEdges[i];\n if (history.hasEdge(edge) || edge.to !== edge1.from) continue;\n if (!this.directed) {\n if (edge1.label < edge.label || edge1.label === edge.label && nodeMap[edge1.to].label <= nodeMap[edge2.to].label) {\n return edge;\n }\n } else {\n if (nodeMap[edge1.from].label < nodeMap[edge2.to].label || nodeMap[edge1.from].label === nodeMap[edge2.to].label && edge1.label <= edge.label) {\n return edge;\n }\n }\n }\n return null;\n };\n GSpan.prototype.findForwardPureEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var rightmostEdgeToId = rightmostEdge.to;\n var edges = graph.nodeMap[rightmostEdgeToId].edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var toNode = graph.nodeMap[edge.to];\n if (minNodeLabel <= toNode.label && !history.hasNode(toNode)) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.findForwardRmpathEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var nodeMap = graph.nodeMap;\n var toNodeLabel = nodeMap[rightmostEdge.to].label;\n var fromNode = nodeMap[rightmostEdge.from];\n var edges = fromNode.edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var newToNodeLabel = nodeMap[edge.to].label;\n if (rightmostEdge.to === edge.to || minNodeLabel > newToNodeLabel || history.hasNode(nodeMap[edge.to])) {\n continue;\n }\n if (rightmostEdge.label < edge.label || rightmostEdge.label === edge.label && toNodeLabel <= newToNodeLabel) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.getSupport = function (projected) {\n var graphMap = {};\n projected.forEach(function (pro) {\n if (!graphMap[pro.graphId]) graphMap[pro.graphId] = true;\n });\n return Object.keys(graphMap).length;\n };\n GSpan.prototype.findMinLabel = function (obj) {\n var minLabel = undefined;\n Object.keys(obj).forEach(function (nodeEdgeNodeLabel) {\n var _a = obj[nodeEdgeNodeLabel],\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (!minLabel) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n return;\n }\n if (nodeLabel1 < minLabel.nodeLabel1 || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel < minLabel.edgeLabel || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel === minLabel.edgeLabel && nodeLabel2 < minLabel.nodeLabel2) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n }\n });\n return minLabel;\n };\n GSpan.prototype.isMin = function () {\n var _this = this;\n var dfsCode = this.dfsCode;\n if (this.verbose) console.log(\"isMin checking\", dfsCode);\n if (dfsCode.dfsEdgeList.length === 1) return true;\n var directed = this.directed;\n var graph = dfsCode.toGraph(VACANT_GRAPH_ID, directed);\n var nodeMap = graph.nodeMap;\n var dfsCodeMin = new DFScode();\n var root = {};\n graph.nodes.forEach(function (node) {\n var forwardEdges = _this.findForwardRootEdges(graph, node);\n forwardEdges.forEach(function (edge) {\n var otherNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(otherNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: otherNode.label\n };\n var pdfs = {\n graphId: graph.id,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n // 比较 root 中每一项的 nodeEdgeNodeLabel 大小,按照 nodeLabel1、edgeLabe、nodeLabel2 的顺序比较\n var minLabel = this.findMinLabel(root); // line 419\n if (!minLabel) return;\n dfsCodeMin.dfsEdgeList.push(new DFSedge(0, 1, minLabel.nodeLabel1, minLabel.edgeLabel, minLabel.nodeLabel2));\n // line 423\n var projectIsMin = function projectIsMin(projected) {\n // right most path\n var rmpath = dfsCodeMin.buildRmpath();\n var minNodeLabel = dfsCodeMin.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var maxToC = dfsCodeMin.dfsEdgeList[rmpath[0]].toNode; // node id\n var backwardRoot = {};\n var flag = false,\n newTo = 0;\n var end = directed ? -1 : 0; // 遍历到 1 还是到 0\n var _loop_1 = function _loop_1(i) {\n if (flag) return \"break\";\n // line 435\n projected.forEach(function (p) {\n var history = new History(p);\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n // Line 441\n if (!backwardRoot[backwardEdge.label]) {\n backwardRoot[backwardEdge.label] = {\n projected: [],\n edgeLabel: backwardEdge.label\n };\n }\n backwardRoot[backwardEdge.label].projected.push({\n graphId: graph.id,\n edge: backwardRoot,\n preNode: p\n });\n newTo = dfsCodeMin.dfsEdgeList[rmpath[i]].fromNode;\n flag = true;\n }\n });\n };\n for (var i = rmpath.length - 1; i > end; i--) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\") break;\n }\n if (flag) {\n var minBackwardEdgeLabel = _this.findMinLabel(backwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(maxToC, newTo, VACANT_NODE_LABEL, minBackwardEdgeLabel.edgeLabel, VACANT_NODE_LABEL));\n var idx_1 = dfsCodeMin.dfsEdgeList.length - 1;\n if (_this.dfsCode.dfsEdgeList[idx_1] !== dfsCodeMin.dfsEdgeList[idx_1]) return false;\n return projectIsMin(backwardRoot[minBackwardEdgeLabel.edgeLabel].projected);\n }\n var forwardRoot = {};\n flag = false;\n var newFrom = 0;\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n if (forwardPureEdges.length > 0) {\n flag = true;\n newFrom = maxToC;\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n var pathLength = rmpath.length;\n var _loop_2 = function _loop_2(i) {\n if (flag) return \"break\";\n var value = rmpath[i];\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[value], minNodeLabel, history);\n if (forwardRmpathEdges.length > 0) {\n flag = true;\n newFrom = dfsCodeMin.dfsEdgeList[value].fromNode;\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n };\n for (var i = 0; i < pathLength; i++) {\n var state_2 = _loop_2(i);\n if (state_2 === \"break\") break;\n }\n if (!flag) return true;\n var forwardMinEdgeNodeLabel = _this.findMinLabel(forwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(newFrom, maxToC + 1, VACANT_NODE_LABEL, forwardMinEdgeNodeLabel.edgeLabel, forwardMinEdgeNodeLabel.nodeLabel2));\n var idx = dfsCodeMin.dfsEdgeList.length - 1;\n if (dfsCode.dfsEdgeList[idx] !== dfsCodeMin.dfsEdgeList[idx]) return false;\n return projectIsMin(forwardRoot[\"\".concat(forwardMinEdgeNodeLabel.edgeLabel, \"-\").concat(forwardMinEdgeNodeLabel.nodeLabel2)].projected);\n };\n var key = \"\".concat(minLabel.nodeLabel1, \"-\").concat(minLabel.edgeLabel, \"-\").concat(minLabel.nodeLabel2);\n return projectIsMin(root[key].projected);\n };\n GSpan.prototype.report = function () {\n if (this.dfsCode.getNodeNum() < this.minNodeNum) return;\n this.counter++;\n var graph = this.dfsCode.toGraph(this.counter, this.directed);\n this.frequentSubgraphs.push(clone(graph));\n };\n GSpan.prototype.subGraphMining = function (projected) {\n var _this = this;\n var support = this.getSupport(projected);\n if (support < this.minSupport) return;\n if (!this.isMin()) return;\n this.report();\n var nodeNum = this.dfsCode.getNodeNum();\n var rmpath = this.dfsCode.buildRmpath();\n var maxToC = this.dfsCode.dfsEdgeList[rmpath[0]].toNode;\n var minNodeLabel = this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var forwardRoot = {};\n var backwardRoot = {};\n projected.forEach(function (p) {\n var graph = _this.graphs[p.graphId];\n var nodeMap = graph.nodeMap;\n var history = new History(p);\n // backward Line 526\n for (var i = rmpath.length - 1; i >= 0; i--) {\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(backwardEdge.label);\n if (!backwardRoot[key]) backwardRoot[key] = {\n projected: [],\n toNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: backwardEdge.label\n };\n backwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: backwardEdge,\n preNode: p\n });\n }\n }\n // pure forward\n if (nodeNum >= _this.maxNodeNum) return;\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(maxToC, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: maxToC,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n var _loop_3 = function _loop_3(i) {\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[rmpath[i]], minNodeLabel, history);\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n };\n // rmpath forward\n for (var i = 0; i < rmpath.length; i++) {\n _loop_3(i);\n }\n });\n // backward\n Object.keys(backwardRoot).forEach(function (key) {\n var _a = backwardRoot[key],\n toNodeId = _a.toNodeId,\n edgeLabel = _a.edgeLabel;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(maxToC, toNodeId, \"-1\", edgeLabel, \"-1\"));\n _this.subGraphMining(backwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n // forward\n Object.keys(forwardRoot).forEach(function (key) {\n var _a = forwardRoot[key],\n fromNodeId = _a.fromNodeId,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(fromNodeId, maxToC + 1, VACANT_NODE_LABEL, edgeLabel, nodeLabel2));\n _this.subGraphMining(forwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n GSpan.prototype.generate1EdgeFrequentSubGraphs = function () {\n var graphs = this.graphs;\n var directed = this.directed;\n var minSupport = this.minSupport;\n var frequentSize1Subgraphs = this.frequentSize1Subgraphs;\n var nodeLabelCounter = {},\n nodeEdgeNodeCounter = {};\n // 保存各个图和各自节点的关系 map,key 格式为 graphKey-node类型\n var nodeLableCounted = {};\n // 保存各个图和各自边的关系 map,key 格式为 graphKey-fromNode类型-edge类型-toNode类型\n var nodeEdgeNodeLabelCounted = {};\n Object.keys(graphs).forEach(function (key) {\n // Line 271\n var graph = graphs[key];\n var nodeMap = graph.nodeMap;\n // 遍历节点,记录对应图 与 每个节点的 label 到 nodeLableCounted\n graph.nodes.forEach(function (node, i) {\n // Line 272\n var nodeLabel = node.label;\n var graphNodeKey = \"\".concat(key, \"-\").concat(nodeLabel);\n if (!nodeLableCounted[graphNodeKey]) {\n var counter = nodeLabelCounter[nodeLabel] || 0;\n counter++;\n nodeLabelCounter[nodeLabel] = counter;\n }\n nodeLableCounted[graphNodeKey] = {\n graphKey: key,\n label: nodeLabel\n };\n // 遍历该节点的所有边,记录各个图和各自边的关系到 nodeEdgeNodeLabelCounted. Line 276\n node.edges.forEach(function (edge) {\n var nodeLabel1 = nodeLabel;\n var nodeLabel2 = nodeMap[edge.to].label;\n if (!directed && nodeLabel1 > nodeLabel2) {\n var tmp = nodeLabel2;\n nodeLabel2 = nodeLabel1;\n nodeLabel1 = tmp;\n }\n var edgeLabel = edge.label;\n var graphNodeEdgeNodeKey = \"\".concat(key, \"-\").concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n var nodeEdgeNodeKey = \"\".concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n if (!nodeEdgeNodeCounter[nodeEdgeNodeKey]) {\n var counter = nodeEdgeNodeCounter[nodeEdgeNodeKey] || 0;\n counter++;\n nodeEdgeNodeCounter[nodeEdgeNodeKey] = counter; // Line281\n }\n\n nodeEdgeNodeLabelCounted[graphNodeEdgeNodeKey] = {\n graphId: key,\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n });\n });\n });\n // 计算频繁的节点\n Object.keys(nodeLabelCounter).forEach(function (label) {\n var count = nodeLabelCounter[label];\n if (count < minSupport) return;\n var g = {\n nodes: [],\n edges: []\n };\n g.nodes.push({\n id: \"0\",\n label: label\n });\n frequentSize1Subgraphs.push(g);\n // if (minNodeNum <= 1) reportSize1 TODO\n });\n\n return frequentSize1Subgraphs;\n };\n GSpan.prototype.run = function () {\n var _this = this;\n // -------- 第一步, _generate_1edge_frequent_subgraphs:频繁的单个节点-------\n this.frequentSize1Subgraphs = this.generate1EdgeFrequentSubGraphs();\n if (this.maxNodeNum < 2) return;\n var graphs = this.graphs;\n var directed = this.directed;\n // PDFS 数组的 map Line 304\n var root = {};\n Object.keys(graphs).forEach(function (graphId) {\n var graph = graphs[graphId];\n var nodeMap = graph.nodeMap;\n // Line 306\n graph.nodes.forEach(function (node) {\n var forwardRootEdges = _this.findForwardRootEdges(graph, node);\n // Line 308\n forwardRootEdges.forEach(function (edge) {\n var toNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(toNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: toNode.label\n };\n var pdfs = {\n graphId: graphId,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n });\n // Line 313\n Object.keys(root).forEach(function (nodeEdgeNodeLabel) {\n var _a = root[nodeEdgeNodeLabel],\n projected = _a.projected,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(0, 1, nodeLabel1, edgeLabel, nodeLabel2));\n _this.subGraphMining(projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n return GSpan;\n}();\nvar formatGraphs = function formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp) {\n var result = {};\n Object.keys(graphs).forEach(function (key, i) {\n var graph = graphs[key];\n var fGraph = new Graph(i, true, directed);\n var nodeIdxMap = {};\n graph.nodes.forEach(function (node, j) {\n fGraph.addNode(j, node[nodeLabelProp]);\n nodeIdxMap[node.id] = j;\n });\n graph.edges.forEach(function (edge, k) {\n var sourceIdx = nodeIdxMap[edge.source];\n var targetIdx = nodeIdxMap[edge.target];\n fGraph.addEdge(-1, sourceIdx, targetIdx, edge[edgeLabelProp]);\n });\n if (fGraph && fGraph.getNodeNum()) result[fGraph.id] = fGraph;\n });\n return result;\n};\nvar toGraphDatas = function toGraphDatas(graphs, nodeLabelProp, edgeLabelProp) {\n var result = [];\n graphs.forEach(function (graph) {\n var graphData = {\n nodes: [],\n edges: []\n };\n graph.nodes.forEach(function (node) {\n var _a;\n graphData.nodes.push((_a = {\n id: \"\".concat(node.id)\n }, _a[nodeLabelProp] = node.label, _a));\n });\n graph.edges.forEach(function (edge) {\n var _a;\n graphData.edges.push((_a = {\n source: \"\".concat(edge.from),\n target: \"\".concat(edge.to)\n }, _a[edgeLabelProp] = edge.label, _a));\n });\n result.push(graphData);\n });\n return result;\n};\nvar DEFAULT_LABEL_NAME = \"cluster\";\n/**\n * gSpan 频繁子图计算算法(frequent graph mining)\n * @param params 参数\n */\nvar gSpan = function gSpan(params) {\n // ------- 将图数据 GraphData 的 map 转换为格式 -------\n var graphs = params.graphs,\n _a = params.directed,\n directed = _a === void 0 ? false : _a,\n _b = params.nodeLabelProp,\n nodeLabelProp = _b === void 0 ? DEFAULT_LABEL_NAME : _b,\n _c = params.edgeLabelProp,\n edgeLabelProp = _c === void 0 ? DEFAULT_LABEL_NAME : _c;\n var formattedGraphs = formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp);\n var minSupport = params.minSupport,\n maxNodeNum = params.maxNodeNum,\n minNodeNum = params.minNodeNum,\n verbose = params.verbose,\n top = params.top;\n // ------- 初始化与执行算法 -------\n var algoParams = {\n graphs: formattedGraphs,\n minSupport: minSupport,\n maxNodeNum: maxNodeNum,\n minNodeNum: minNodeNum,\n top: top,\n verbose: verbose,\n directed: directed\n };\n var calculator = new GSpan(algoParams);\n calculator.run();\n var result = toGraphDatas(calculator.frequentSubgraphs, nodeLabelProp, edgeLabelProp);\n return result;\n};\nexport default gSpan;","import { __spreadArray } from \"tslib\";\nimport floydWarshall from './floydWarshall';\nimport gSpan from './gSpan/gSpan';\nimport dijkstra from './dijkstra';\nimport { uniqueId } from './util';\n/**\n * 为 graphData 中每个节点生成邻居单元数组\n * @param graphData\n * @param spm\n * @param nodeLabelProp\n * @param k k-近邻\n */\nvar findKNeighborUnits = function findKNeighborUnits(graphData, spm, nodeLabelProp, k) {\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (k === void 0) {\n k = 2;\n }\n var units = [];\n var nodes = graphData.nodes;\n spm.forEach(function (row, i) {\n units.push(findKNeighborUnit(nodes, row, i, nodeLabelProp, k));\n });\n return units;\n};\nvar findKNeighborUnit = function findKNeighborUnit(nodes, row, i, nodeLabelProp, k) {\n var unitNodeIdxs = [i];\n var neighbors = [];\n var labelCountMap = {};\n row.forEach(function (v, j) {\n if (v <= k && i !== j) {\n unitNodeIdxs.push(j);\n neighbors.push(nodes[j]);\n var label = nodes[j][nodeLabelProp];\n if (!labelCountMap[label]) labelCountMap[label] = {\n count: 1,\n dists: [v]\n };else {\n labelCountMap[label].count++;\n labelCountMap[label].dists.push(v);\n }\n }\n });\n // 将 labelCountMap 中的 dists 按照从小到大排序,方便后面使用\n Object.keys(labelCountMap).forEach(function (label) {\n labelCountMap[label].dists = labelCountMap[label].dists.sort(function (a, b) {\n return a - b;\n });\n });\n return {\n nodeIdx: i,\n nodeId: nodes[i].id,\n nodeIdxs: unitNodeIdxs,\n neighbors: neighbors,\n neighborNum: unitNodeIdxs.length - 1,\n nodeLabelCountMap: labelCountMap\n };\n};\n/**\n * 随机寻找点对,满足距离小于 k\n * @param k 参数 k,表示 k-近邻\n * @param nodeNum 参数 length\n * @param maxNodePairNum 寻找点对的数量不超过 maxNodePairNum\n * @param spm 最短路径矩阵\n */\nvar findNodePairsRandomly = function findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm) {\n // 每个节点需要随机找出的点对数\n var nodePairNumEachNode = Math.ceil(maxNodePairNum / nodeNum);\n var nodePairMap = {};\n var foundNodePairCount = 0;\n // 遍历节点,为每个节点随机找出 nodePairNumEachNode 个点对,满足距离小于 k。找到的点对数量超过 maxNodePairNum 或所有节点遍历结束时终止\n kNeighborUnits.forEach(function (unit, i) {\n // 若未达到 nodePairNumEachNode,或循环次数小于最大循环次数(2 * nodeNum),继续循环\n var nodePairForICount = 0;\n var outerLoopCount = 0;\n var neighbors = unit.nodeIdxs; // the first one is the center node\n var neighborNum = unit.neighborNum - 1;\n while (nodePairForICount < nodePairNumEachNode) {\n // 另一端节点在节点数组中的的 index\n var oidx = neighbors[1 + Math.floor(Math.random() * neighborNum)];\n var innerLoopCount = 0;\n // 若随机得到的另一端 idx 不符合条件,则继续 random。条件是不是同一个节点、这个点对没有被记录过、距离小于 k\n while (nodePairMap[\"\".concat(i, \"-\").concat(oidx)] || nodePairMap[\"\".concat(oidx, \"-\").concat(i)]) {\n oidx = Math.floor(Math.random() * nodeNum);\n innerLoopCount++;\n if (innerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n\n if (innerLoopCount < 2 * nodeNum) {\n // 未达到最大循环次数,说明找到了合适的另一端\n nodePairMap[\"\".concat(i, \"-\").concat(oidx)] = {\n start: i,\n end: oidx,\n distance: spm[i][oidx]\n };\n nodePairForICount++;\n foundNodePairCount++;\n // 如果当前找到的点对数量达到了上限,返回结果\n if (foundNodePairCount >= maxNodePairNum) return nodePairMap;\n }\n outerLoopCount++;\n if (outerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n // 这个节点没有找到足够 nodePairNumEachNode 的点对。更新 nodePairNumEachNode,让后续节点找更多的点对\n if (nodePairForICount < nodePairNumEachNode) {\n var gap = nodePairNumEachNode - nodePairForICount;\n nodePairNumEachNode = (nodePairNumEachNode + gap) / (nodeNum - i - 1);\n }\n });\n return nodePairMap;\n};\n/**\n * 计算所有 nodePairMap 中节点对的相交邻居诱导子图\n * @param nodePairMap 节点对 map,key 为 node1.id-node2.id,value 为 { startNodeIdx, endNodeIdx, distance }\n * @param neighborUnits 每个节点的邻居元数组\n * @param graphData 原图数据\n * @param edgeMap 边的 map,方便检索\n * @param cachedInducedGraphMap 缓存的结果,下次进入该函数将继续更新该缓存,若 key 在缓存中存在则不需要重复计算\n */\nvar getIntersectNeighborInducedGraph = function getIntersectNeighborInducedGraph(nodePairMap, neighborUnits, graphData, cachedInducedGraphMap) {\n var nodes = graphData.nodes;\n if (!cachedInducedGraphMap) cachedInducedGraphMap = {};\n Object.keys(nodePairMap).forEach(function (key) {\n var _a, _b;\n if (cachedInducedGraphMap && cachedInducedGraphMap[key]) return;\n cachedInducedGraphMap[key] = {\n nodes: [],\n edges: []\n };\n var pair = nodePairMap[key];\n var startUnitNodeIds = (_a = neighborUnits[pair.start]) === null || _a === void 0 ? void 0 : _a.nodeIdxs;\n var endUnitNodeIds = (_b = neighborUnits[pair.end]) === null || _b === void 0 ? void 0 : _b.nodeIdxs;\n if (!startUnitNodeIds || !endUnitNodeIds) return; // 不存在邻元,返回空图\n var endSet = new Set(endUnitNodeIds);\n var intersect = startUnitNodeIds.filter(function (x) {\n return endSet.has(x);\n }); // 可能会爆栈(在 1580 + 6 nodes full-connected 时出现)\n if (!intersect || !intersect.length) return; // 没有交集,返回空图\n var intersectIdMap = {};\n var intersectLength = intersect.length;\n for (var i = 0; i < intersectLength; i++) {\n var node = nodes[intersect[i]];\n cachedInducedGraphMap[key].nodes.push(node); // 将交集中的点加入诱导子图\n intersectIdMap[node.id] = true;\n }\n // 遍历所有边数据,如果边的两端都在交集中,将该边加入诱导子图\n graphData.edges.forEach(function (edge) {\n if (intersectIdMap[edge.source] && intersectIdMap[edge.target]) cachedInducedGraphMap[key].edges.push(edge);\n });\n });\n return cachedInducedGraphMap;\n};\n/**\n * 计算 strcutre 在 graph 上的匹配数量\n * @param graph 图数据\n * @param structure 目前支持只有两个节点一条边的最简单结构\n * @param nodeLabelProp 节点类型字段名\n * @param edgeLabelProp 边类型字段名\n */\nvar getMatchedCount = function getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp) {\n var _a, _b;\n var nodeMap = {};\n graph.nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var count = 0;\n if (!((_a = structure === null || structure === void 0 ? void 0 : structure.edges) === null || _a === void 0 ? void 0 : _a.length) || ((_b = structure === null || structure === void 0 ? void 0 : structure.nodes) === null || _b === void 0 ? void 0 : _b.length) < 2) return 0;\n graph.edges.forEach(function (e) {\n var sourceLabel = nodeMap[e.source][nodeLabelProp];\n var targetLabel = nodeMap[e.target][nodeLabelProp];\n var strNodeLabel1 = structure === null || structure === void 0 ? void 0 : structure.nodes[0][nodeLabelProp];\n var strNodeLabel2 = structure === null || structure === void 0 ? void 0 : structure.nodes[1][nodeLabelProp];\n var strEdgeLabel = structure === null || structure === void 0 ? void 0 : structure.edges[0][edgeLabelProp];\n if (e[edgeLabelProp] !== strEdgeLabel) return;\n if (sourceLabel === strNodeLabel1 && targetLabel === strNodeLabel2 || sourceLabel === strNodeLabel2 && targetLabel === strNodeLabel1) {\n count++;\n }\n });\n return count;\n};\n/**\n * structures 中寻找最具有代表性的一个。这个结构是使得 matchedCountMap 的分组方式类内间距最小,类间间距最大\n * @param matchedCountMap 每个 structure 分类后的各图匹配数量,格式 { [strcture.idx]: { [interInducedGraphKey]: count } }\n * @param structureNum strcuture 个数,与 matchedCountMap.length 对应\n * @param structures\n */\nvar findRepresentStructure = function findRepresentStructure(matchedCountMap, structureNum, structures) {\n var maxOffset = Infinity,\n representClusterType = 0;\n var _loop_1 = function _loop_1(i) {\n // 一种分组的 map,key 是 intGraph 的 key,value 是 structures[i] 的匹配个数\n var countMapI = matchedCountMap[i];\n // 按照 value 为该组排序,生成 keys 的数组:\n var sortedGraphKeys = Object.keys(countMapI).sort(function (a, b) {\n return countMapI[a] - countMapI[b];\n });\n // 共 100 个 graphKeys,将 graphKeys 按顺序分为 groupNum 组\n var groupNum = 10;\n var clusters = []; // 总共有 groupNum 个项\n sortedGraphKeys.forEach(function (key, j) {\n if (!clusters[j % groupNum]) clusters[j % groupNum] = {\n graphs: [],\n totalCount: 0,\n aveCount: 0\n };\n clusters[j % groupNum].graphs.push(key);\n clusters[j % groupNum].totalCount += countMapI[key];\n });\n // 计算 cluster 与 cluster 之间的距离 innerDist,每个 cluster 内部的距离 intraDist\n var aveIntraDist = 0; // 该类的类内平均值\n var aveCounts = []; // 类内平均匹配数量,将用于计算类间距离\n clusters.forEach(function (graphsInCluster) {\n // 类内均值\n var aveCount = graphsInCluster.totalCount / graphsInCluster.graphs.length;\n graphsInCluster.aveCount = aveCount;\n aveCounts.push(aveCount);\n // 对于每类,计算类内间距平均值\n var aveIntraPerCluster = 0;\n var graphsNum = graphsInCluster.length;\n graphsInCluster.graphs.forEach(function (graphKey1, j) {\n var graph1Count = countMapI[graphKey1];\n graphsInCluster.graphs.forEach(function (graphKey2, k) {\n if (j === k) return;\n aveIntraPerCluster += Math.abs(graph1Count - countMapI[graphKey2]);\n });\n });\n aveIntraPerCluster /= graphsNum * (graphsNum - 1) / 2;\n aveIntraDist += aveIntraPerCluster;\n });\n aveIntraDist /= clusters.length;\n // 用类内均值计算类间距\n var aveInterDist = 0; // 类间间距平均值\n aveCounts.forEach(function (aveCount1, j) {\n aveCounts.forEach(function (aveCount2, k) {\n if (j === k) return;\n aveInterDist += Math.abs(aveCount1 - aveCount2);\n });\n aveInterDist /= aveCounts.length * (aveCounts.length - 1) / 2;\n });\n // 寻找 (类间间距均值-类内间距均值) 最大的一种分组方式(对应的 structure 就是最终要找的唯一 DS(G))\n var offset = aveInterDist - aveIntraDist;\n if (maxOffset < offset) {\n maxOffset = offset;\n representClusterType = i;\n }\n };\n for (var i = 0; i < structureNum; i++) {\n _loop_1(i);\n }\n return {\n structure: structures[representClusterType],\n structureCountMap: matchedCountMap[representClusterType]\n };\n};\nvar getNodeMaps = function getNodeMaps(nodes, nodeLabelProp) {\n var nodeMap = {},\n nodeLabelMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = {\n idx: i,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var label = node[nodeLabelProp];\n if (!nodeLabelMap[label]) nodeLabelMap[label] = [];\n nodeLabelMap[label].push(node);\n });\n return {\n nodeMap: nodeMap,\n nodeLabelMap: nodeLabelMap\n };\n};\nvar getEdgeMaps = function getEdgeMaps(edges, edgeLabelProp, nodeMap) {\n var edgeMap = {},\n edgeLabelMap = {};\n edges.forEach(function (edge, i) {\n edgeMap[\"\".concat(uniqueId)] = {\n idx: i,\n edge: edge\n };\n var label = edge[edgeLabelProp];\n if (!edgeLabelMap[label]) edgeLabelMap[label] = [];\n edgeLabelMap[label].push(edge);\n var sourceNode = nodeMap[edge.source];\n if (sourceNode) {\n sourceNode.degree++;\n sourceNode.outDegree++;\n }\n var targetNode = nodeMap[edge.target];\n if (targetNode) {\n targetNode.degree++;\n targetNode.inDegree++;\n }\n });\n return {\n edgeMap: edgeMap,\n edgeLabelMap: edgeLabelMap\n };\n};\n/**\n * 输出最短路径的 map,key 为 sourceNode.id-targetNode.id,value 为这两个节点的最短路径长度\n * @param nodes\n * @param spm\n * @param directed\n */\nvar getSpmMap = function getSpmMap(nodes, spm, directed) {\n var length = spm.length;\n var map = {};\n spm.forEach(function (row, i) {\n var start = directed ? 0 : i + 1;\n var iId = nodes[i].id;\n for (var j = start; j < length; j++) {\n if (i === j) continue;\n var jId = nodes[j].id;\n var dist = row[j];\n map[\"\".concat(iId, \"-\").concat(jId)] = dist;\n if (!directed) map[\"\".concat(jId, \"-\").concat(iId)] = dist;\n }\n });\n return map;\n};\n/**\n * 计算一对节点(node1,node2)的 NDS 距离\n * @param graph 原图数据\n * @param node1\n * @param node2\n */\nvar getNDSDist = function getNDSDist(graph, node1, node2, nodeMap, spDist, kNeighborUnits, structure, nodeLabelProp, edgeLabelProp, cachedNDSMap, cachedInterInducedGraph) {\n var _a;\n var key = \"\".concat(node1.id, \"-\").concat(node2.id);\n if (cachedNDSMap && cachedNDSMap[key]) return cachedNDSMap[key];\n var interInducedGraph = cachedInterInducedGraph ? cachedInterInducedGraph[key] : undefined;\n // 若没有缓存相交邻居诱导子图,计算\n if (!interInducedGraph) {\n var pairMap = (_a = {}, _a[key] = {\n start: nodeMap[node1.id].idx,\n end: nodeMap[node2.id].idx,\n distance: spDist\n }, _a);\n cachedInterInducedGraph = getIntersectNeighborInducedGraph(pairMap, kNeighborUnits, graph, cachedInterInducedGraph);\n interInducedGraph = cachedInterInducedGraph[key];\n }\n return getMatchedCount(interInducedGraph, structure, nodeLabelProp, edgeLabelProp);\n};\n/**\n * 计算 pattern 上绩点的度数并存储到 minPatternNodeLabelDegreeMap\n */\nvar stashPatternNodeLabelDegreeMap = function stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap) {\n var _a, _b, _c;\n var minPatternNodeLabelDegree = (_a = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _a === void 0 ? void 0 : _a.degree;\n var minPatternNodeLabelInDegree = (_b = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _b === void 0 ? void 0 : _b.inDegree;\n var minPatternNodeLabelOutDegree = (_c = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _c === void 0 ? void 0 : _c.outDegree;\n if (minPatternNodeLabelDegreeMap[neighborLabel] === undefined) {\n minPatternNodeLabelDegree = Infinity;\n minPatternNodeLabelInDegree = Infinity;\n minPatternNodeLabelOutDegree = Infinity;\n patternNodeLabelMap[neighborLabel].forEach(function (patternNodeWithLabel) {\n var patternNodeDegree = patternNodeMap[patternNodeWithLabel.id].degree;\n if (minPatternNodeLabelDegree > patternNodeDegree) minPatternNodeLabelDegree = patternNodeDegree;\n var patternNodeInDegree = patternNodeMap[patternNodeWithLabel.id].inDegree;\n if (minPatternNodeLabelInDegree > patternNodeInDegree) minPatternNodeLabelInDegree = patternNodeInDegree;\n var patternNodeOutDegree = patternNodeMap[patternNodeWithLabel.id].outDegree;\n if (minPatternNodeLabelOutDegree > patternNodeOutDegree) minPatternNodeLabelOutDegree = patternNodeOutDegree;\n });\n minPatternNodeLabelDegreeMap[neighborLabel] = {\n degree: minPatternNodeLabelDegree,\n inDegree: minPatternNodeLabelInDegree,\n outDegree: minPatternNodeLabelOutDegree\n };\n }\n return {\n minPatternNodeLabelDegree: minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree: minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree: minPatternNodeLabelOutDegree\n };\n};\n/**\n * GADDI 模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nvar GADDI = function GADDI(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n var _a;\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n if (!graphData || !graphData.nodes) return;\n // 分为三步:\n // 0. 预计算:节点/边数,邻接矩阵、最短路径矩阵\n // 1. 处理原图 graphData。再分为 1~5 小步\n // 2. 匹配\n // console.log(\"----- stage-pre: preprocessing -------\");\n // -------- 第零步,预计算:节点/边数,邻接矩阵、最短路径矩阵-------\n var nodeNum = graphData.nodes.length;\n if (!nodeNum) return;\n // console.log(\"----- stage-pre.1: calc shortest path matrix for graph -------\");\n var spm = floydWarshall(graphData, directed);\n // console.log(\n // \"----- stage-pre.2: calc shortest path matrix for pattern -------\"\n // );\n var patternSpm = floydWarshall(pattern, directed);\n // console.log(\n // \"----- stage-pre.3: calc shortest path matrix map for graph -------\"\n // );\n var spmMap = getSpmMap(graphData.nodes, spm, directed);\n // console.log(\n // \"----- stage-pre.4: calc shortest path matrix map for pattern -------\"\n // );\n var patternSpmMap = getSpmMap(pattern.nodes, patternSpm, directed);\n // console.log(\"----- stage-pre.5: establish maps -------\");\n // 节点的 map,以 id 为 id 映射,方便后续快速检索\n var _b = getNodeMaps(graphData.nodes, nodeLabelProp),\n nodeMap = _b.nodeMap,\n nodeLabelMap = _b.nodeLabelMap;\n var _c = getNodeMaps(pattern.nodes, nodeLabelProp),\n patternNodeMap = _c.nodeMap,\n patternNodeLabelMap = _c.nodeLabelMap;\n // 计算节点度数\n getEdgeMaps(graphData.edges, edgeLabelProp, nodeMap);\n var patternEdgeLabelMap = getEdgeMaps(pattern.edges, edgeLabelProp, patternNodeMap).edgeLabelMap;\n // 若未指定 length,自动计算 pattern 半径(最短路径最大值)\n var patternSpmSpread = [];\n patternSpm === null || patternSpm === void 0 ? void 0 : patternSpm.forEach(function (row) {\n patternSpmSpread = patternSpmSpread.concat(row);\n });\n if (!length) length = Math.max.apply(Math, __spreadArray(__spreadArray([], patternSpmSpread, false), [2], false));\n if (!k) k = length;\n // console.log(\"params\", directed, length, k);\n // console.log(\"----- stage-pre.6: calc k neighbor units -------\");\n // 计算每个节点的 k 邻元集合\n var kNeighborUnits = findKNeighborUnits(graphData, spm, nodeLabelProp, k);\n var patternKNeighborUnits = findKNeighborUnits(pattern, patternSpm, nodeLabelProp, k);\n // console.log(\n // \"----- stage0: going to processing graph and find intersect neighbor induced graphs -------\"\n // );\n // console.log(\"----- stage0.1: going to select random node pairs -------\");\n // -------- 第一步,处理原图 graphData-------\n // 1.1. 随机选择最多 100 个点对,满足距离小于 Length 和 k\n // 当 graphData 少于 20 个节点,则不能找出 100 个点对,只找出不多于 n(n-1)/2 个点对\n var maxNodePairNum = Math.min(100, nodeNum * (nodeNum - 1) / 2);\n var nodePairsMap = findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm);\n // console.log(\n // \"----- stage0.2: going to calculate intersect neighbor induced graphs -------\"\n // );\n // 1.2. 生成上面节点对的相应相交邻居诱导子图。格式为 {'beginNodeIdx-endNodeIdx': {nodes: [], edges: []}}\n var intGMap = getIntersectNeighborInducedGraph(nodePairsMap, kNeighborUnits, graphData);\n // 1.3. 使用 gSpan 算法(frequent graph mining)计算 ISIntG 的前 10 个频率最高的子结构(3-4条边)\n var top = 10,\n minSupport = 1,\n minNodeNum = 1,\n maxNodeNum = 4;\n var params = {\n graphs: intGMap,\n nodeLabelProp: nodeLabelProp,\n edgeLabelProp: edgeLabelProp,\n minSupport: minSupport,\n minNodeNum: minNodeNum,\n maxNodeNum: maxNodeNum,\n directed: directed\n };\n // console.log(\n // \"----- stage1: (gSpan) going to find frequent structure dsG -------\"\n // );\n // console.log(\"----- stage1.1: going to run gSpan -------\");\n // 暂时假设生成的 sub structure 都只有一条边\n var freStructures = gSpan(params).slice(0, top);\n // structureNum 可能小于 top\n var structureNum = freStructures.length;\n // 1.4. 计算上述 10 个子结构在 intGMap 中每个诱导子图的匹配个数\n var matchedCountMap = [];\n freStructures.forEach(function (structure, i) {\n matchedCountMap[i] = {};\n Object.keys(intGMap).forEach(function (key) {\n var graph = intGMap[key];\n var subStructureCount = getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp);\n matchedCountMap[i][key] = subStructureCount;\n });\n });\n // console.log(\n // \"----- stage1.1: going to find the most represent strucutre -------\"\n // );\n // 1.5. 对于每个子结构,根据匹配个数为 intGMap 中的诱导子图分组,生成 structureNum 种分组\n // 计算每种分组的类间距和类内间距,找到类间距最大、类内间距最小的一种分组,这种分组对应的子结构被选为唯一代表性子结构 DS(G)\n var _d = findRepresentStructure(matchedCountMap, structureNum, freStructures),\n dsG = _d.structure,\n ndsDist = _d.structureCountMap;\n // -------- 第二步,匹配-------\n // 2.1 找到从 Q 中的一个节点作为起始节点,寻找 G 中的匹配。这个其实节点的标签可以在 G 中找到最多的节点\n var beginPNode = pattern.nodes[0],\n candidates = [],\n label = (_a = pattern.nodes[0]) === null || _a === void 0 ? void 0 : _a[nodeLabelProp],\n maxNodeNumWithSameLabel = -Infinity;\n pattern.nodes.forEach(function (node) {\n var pLabel = node[nodeLabelProp];\n var nodesWithSameLabel = nodeLabelMap[pLabel];\n if ((nodesWithSameLabel === null || nodesWithSameLabel === void 0 ? void 0 : nodesWithSameLabel.length) > maxNodeNumWithSameLabel) {\n maxNodeNumWithSameLabel = nodesWithSameLabel.length;\n candidates = nodesWithSameLabel;\n label = pLabel;\n beginPNode = node;\n }\n });\n // console.log(\"----- stage2: going to find candidates -------\");\n // 全局缓存,避免重复计算\n var minPatternNodeLabelDegreeMap = {}; // key 是 label,value 是该 label 节点的最小度数\n var patternIntGraphMap = {},\n patternNDSDist = {},\n // key 为 node.id-node.id\n patternNDSDistMap = {}; // key 为 node.id-label2,value nds距离值数组(按从大到小排序,无需关心具体对应哪个 node2)\n // 2.2.2 对于 Q 中的另一个标签的 k 个节点,计算它们到 node 的最短路径以及 NDS 距离\n var patternSpDist = {};\n var patternSpDistBack = {};\n Object.keys(patternNodeLabelMap).forEach(function (label2, j) {\n patternSpDist[label2] = [];\n if (directed) {\n patternSpDistBack[label2] = [];\n }\n var maxDist = -Infinity;\n var patternNodesWithLabel2 = patternNodeLabelMap[label2];\n var patternNodePairMap = {};\n patternNodesWithLabel2.forEach(function (nodeWithLabel2) {\n var dist = patternSpmMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)];\n dist && patternSpDist[label2].push(dist);\n if (maxDist < dist) maxDist = dist;\n patternNodePairMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)] = {\n start: 0,\n end: patternNodeMap[nodeWithLabel2.id].idx,\n distance: dist\n };\n if (directed) {\n var distBack = patternSpmMap[\"\".concat(nodeWithLabel2.id, \"-\").concat(beginPNode.id)];\n distBack && patternSpDistBack[label2].push(distBack);\n }\n });\n // spDist[label2] 按照从小到大排序\n patternSpDist[label2] = patternSpDist[label2].sort(function (a, b) {\n return a - b;\n });\n if (directed) patternSpDistBack[label2] = patternSpDistBack[label2].sort(function (a, b) {\n return a - b;\n });\n // 计算 Q 中所有 label2 节点到 beginPNode 的 NDS 距离\n // 所有 label2 节点到 beginPNode 的邻居相交诱导子图:\n // key: node1.id-node2.id\n patternIntGraphMap = getIntersectNeighborInducedGraph(patternNodePairMap, patternKNeighborUnits, pattern, patternIntGraphMap);\n // pattern 中 beginNode 到当前 label2 节点 的 NDS 距离(数组,无需关心具体对应到哪个节点)\n var currentPatternNDSDistArray = [];\n Object.keys(patternNodePairMap).forEach(function (key) {\n if (patternNDSDist[key]) {\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var patternIntGraph = patternIntGraphMap[key];\n patternNDSDist[key] = getMatchedCount(patternIntGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n });\n // 根据值为 currentPatternNDSDist 从大到小排序\n currentPatternNDSDistArray = currentPatternNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n patternNDSDistMap[\"\".concat(beginPNode.id, \"-\").concat(label2)] = currentPatternNDSDistArray;\n if (label2 === label) return;\n var candidatesNum = (candidates === null || candidates === void 0 ? void 0 : candidates.length) || 0;\n var _loop_4 = function _loop_4(m) {\n var cNode = candidates[m];\n // prune1:若 candidates 中节点 cNode 的 kNeighborUnits 中标签为 label2 的节点个数少于 pattern 中 label2 个数,删去它\n var graphNeighborUnit = kNeighborUnits[nodeMap[cNode.id].idx];\n var graphNeighborUnitCountMap = graphNeighborUnit.nodeLabelCountMap[label2];\n var patternLabel2Num = patternNodeLabelMap[label2].length;\n if (!graphNeighborUnitCountMap || graphNeighborUnitCountMap.count < patternLabel2Num) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune2:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点最短路径大于 patternSpDist[label2],删去它\n // (prune2 规则即:candidate 相关的最短路径的最大 spDist[label2].length 个,按照大小顺序依次和 patternSpDist[label2] 中的值比较,只要遇到一个是 G > Q 的,就删去这个 candidate)\n var prune2Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (graphNeighborUnitCountMap.dists[n] > patternSpDist[label2][n]) {\n prune2Invalid = true;\n break;\n }\n }\n if (prune2Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune3:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点 NDS 距离小于 patternNDSDist[beginNode.id-label2],删去它\n // TODO:prune3,currentPatternNDSDistArray 与 currentNDSDist 的比较\n // 计算 G 中所有 label2 节点到 cNode 的 NDS 距离\n // 所有 label2 节点到 cNode 的邻居相交诱导子图:\n var cNodePairMap = {};\n graphNeighborUnit.neighbors.forEach(function (neighborNode) {\n var dist = spmMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)];\n cNodePairMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)] = {\n start: nodeMap[cNode.id].idx,\n end: nodeMap[neighborNode.id].idx,\n distance: dist\n };\n });\n // 更新 intGMap\n intGMap = getIntersectNeighborInducedGraph(cNodePairMap, kNeighborUnits, graphData, intGMap);\n // candidate 到它周围 label2 节点的 NDS 距离, key 是 node.id-node.id\n var currentNDSDistArray = [];\n Object.keys(cNodePairMap).forEach(function (key) {\n if (ndsDist[key]) {\n currentNDSDistArray.push(ndsDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var intGraph = intGMap[key];\n ndsDist[key] = getMatchedCount(intGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentNDSDistArray.push(ndsDist[key]);\n });\n // 根据值为 currentNDSDistArray 从大到小排序\n currentNDSDistArray = currentNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n var prune3Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (currentNDSDistArray[n] < currentPatternNDSDistArray[n]) {\n prune3Invalid = true;\n break;\n }\n }\n if (prune3Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n };\n for (var m = candidatesNum - 1; m >= 0; m--) {\n _loop_4(m);\n }\n });\n var candidateGraphs = [];\n // console.log(\n // \"----- stage3: going to splice neighbors for each candidate graph -------\"\n // );\n // candidates 经过筛选后,以每个 candidate 为中心,生成 Length-neighbor 的邻居诱导子图\n // 并在诱导子图中去除不可能在 Q 上找到匹配的点:在 Q 上不存在的 label,其他 label 到 candidate 的最大最短距离符合 Q、NDS 距离符合 Q\n candidates === null || candidates === void 0 ? void 0 : candidates.forEach(function (candidate) {\n var nodeIdx = nodeMap[candidate.id].idx;\n var lengthNeighborUnit = findKNeighborUnit(graphData.nodes, spm[nodeIdx], nodeIdx, nodeLabelProp, length);\n var neighborNodes = lengthNeighborUnit.neighbors;\n // 删除不可能找到匹配的邻居点\n var neighborNum = neighborNodes.length;\n var unmatched = false;\n for (var i = neighborNum - 1; i >= 0; i--) {\n // 如果通过裁剪,符合条件的节点数量已过少,说明不能匹配这个 candidate 相关的图\n if (neighborNodes.length + 1 < pattern.nodes.length) {\n unmatched = true;\n return;\n }\n var neighborNode = neighborNodes[i];\n var neighborLabel = neighborNode[nodeLabelProp];\n // prune1: 若该邻居点的 label 不存在于 pattern 中,移除这个点\n if (!patternNodeLabelMap[neighborLabel] || !patternNodeLabelMap[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune2: 若该邻居点到 candidate 的最短路径比和它有相同 label 的节点到 beginPNode 的最大最短路径长度长,移除这个点\n // prune2.1: 如果没有这个标签到 beginPNode 的距离记录,说明 pattern 上(可能 beginPNode 是这个 label)没有其他这个 label 的节点\n if (!patternSpDist[neighborLabel] || !patternSpDist[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n var key = \"\".concat(candidate.id, \"-\").concat(neighborNode.id);\n // prune2.2\n var distToCandidate = spmMap[key];\n var idx = patternSpDist[neighborLabel].length - 1;\n var maxDistWithLabelInPattern = patternSpDist[neighborLabel][idx]; // patternSpDist[neighborLabel] 已经按照从小到大排序\n if (distToCandidate > maxDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n if (directed) {\n var keyBack = \"\".concat(neighborNode.id, \"-\").concat(candidate.id);\n var distFromCandidate = spmMap[keyBack];\n idx = patternSpDistBack[neighborLabel].length - 1;\n var maxBackDistWithLabelInPattern = patternSpDistBack[neighborLabel][idx];\n if (distFromCandidate > maxBackDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // prune3: 若该邻居点到 candidate 的 NDS 距离比和它有相同 label 的节点到 beginPNode 的最小 NDS 距离小,移除这个点\n var ndsToCandidate = ndsDist[key] ? ndsDist[key] : getNDSDist(graphData, candidate, neighborNode, nodeMap, distToCandidate, kNeighborUnits, dsG, nodeLabelProp, edgeLabelProp, ndsDist, intGMap);\n var patternKey = \"\".concat(beginPNode.id, \"-\").concat(neighborLabel);\n var minNdsWithLabelInPattern = patternNDSDistMap[patternKey][patternNDSDistMap[patternKey].length - 1]; // patternNDSDist[key] 一定存在\n if (ndsToCandidate < minNdsWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune4: 若该邻居点的度数小于 pattern 同 label 节点最小度数,删去该点\n var _a = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _a.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _a.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _a.minPatternNodeLabelOutDegree;\n if (nodeMap[neighborNode.id].degree < minPatternNodeLabelDegree) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // 节点在个数上符合匹配(不少于 pattern 的节点个数),现在筛选相关边\n if (!unmatched) {\n candidateGraphs.push({\n nodes: [candidate].concat(neighborNodes)\n });\n }\n });\n // console.log(\n // \"----- stage4: going to splice edges and neighbors for each candidate graph -------\"\n // );\n var undirectedLengthsToBeginPNode = dijkstra(pattern, beginPNode.id, false).length;\n var undirectedLengthsToBeginPNodeLabelMap = {};\n if (directed) {\n Object.keys(undirectedLengthsToBeginPNode).forEach(function (nodeId) {\n var nodeLabel = patternNodeMap[nodeId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nodeLabel]) undirectedLengthsToBeginPNodeLabelMap[nodeLabel] = [undirectedLengthsToBeginPNode[nodeId]];else undirectedLengthsToBeginPNodeLabelMap[nodeLabel].push(undirectedLengthsToBeginPNode[nodeId]);\n });\n Object.keys(undirectedLengthsToBeginPNodeLabelMap).forEach(function (pLabel) {\n undirectedLengthsToBeginPNodeLabelMap[pLabel].sort(function (a, b) {\n return a - b;\n });\n });\n } else {\n undirectedLengthsToBeginPNodeLabelMap = patternSpDist;\n }\n // 现在 candidateGraphs 里面只有节点,进行边的筛选\n var candidateGraphNum = candidateGraphs.length;\n var _loop_2 = function _loop_2(i) {\n var candidateGraph = candidateGraphs[i];\n var candidate = candidateGraph.nodes[0];\n var candidateNodeLabelCountMap = {};\n var candidateNodeMap = {};\n candidateGraph.nodes.forEach(function (node, q) {\n candidateNodeMap[node.id] = {\n idx: q,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var cNodeLabel = node[nodeLabelProp];\n if (!candidateNodeLabelCountMap[cNodeLabel]) candidateNodeLabelCountMap[cNodeLabel] = 1;else candidateNodeLabelCountMap[cNodeLabel]++;\n });\n // 根据 candidate 和 neighborNodes 中的节点生成 G 的诱导子图\n // 即,将 graphData 上两端都在 candidateGraph.nodes 中的边放入 candidateEdges\n var candidateEdges = [];\n var edgeLabelCountMap = {};\n graphData.edges.forEach(function (edge) {\n if (candidateNodeMap[edge.source] && candidateNodeMap[edge.target]) {\n candidateEdges.push(edge);\n if (!edgeLabelCountMap[edge[edgeLabelProp]]) edgeLabelCountMap[edge[edgeLabelProp]] = 1;else edgeLabelCountMap[edge[edgeLabelProp]]++;\n candidateNodeMap[edge.source].degree++;\n candidateNodeMap[edge.target].degree++;\n candidateNodeMap[edge.source].outDegree++;\n candidateNodeMap[edge.target].inDegree++;\n }\n });\n // prune:若有一个 edgeLabel 在 candidateGraph 上的个数少于 pattern,去除该图\n var pattenrEdgeLabelNum = Object.keys(patternEdgeLabelMap).length;\n var prunedByEdgeLabel = false;\n for (var e = 0; e < pattenrEdgeLabelNum; e++) {\n var label_1 = Object.keys(patternEdgeLabelMap)[e];\n if (!edgeLabelCountMap[label_1] || edgeLabelCountMap[label_1] < patternEdgeLabelMap[label_1].length) {\n prunedByEdgeLabel = true;\n break;\n }\n }\n if (prunedByEdgeLabel) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // 遍历 candidateEdges,进行边的筛选\n var candidateEdgeNum = candidateEdges.length;\n // prune:若边数过少,去除该图\n if (candidateEdgeNum < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"break\";\n }\n var candidateGraphInvalid = false;\n var _loop_5 = function _loop_5(e) {\n var edge = candidateEdges[e];\n var edgeLabel = edge[edgeLabelProp];\n var patternEdgesWithLabel = patternEdgeLabelMap[edgeLabel];\n // prune 1: 若边的 label 不存在于 pattern 边 label 中,去除该边\n if (!patternEdgesWithLabel || !patternEdgesWithLabel.length) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n // prune 2: 若边的 label +两端 label 的三元组关系不能在 pattern 中找到,去除该边\n var sourceLabel = candidateNodeMap[edge.source].node[nodeLabelProp];\n var targetLabel = candidateNodeMap[edge.target].node[nodeLabelProp];\n var edgeMatched = false;\n patternEdgesWithLabel.forEach(function (patternEdge) {\n var patternSource = patternNodeMap[patternEdge.source].node;\n var patternTarget = patternNodeMap[patternEdge.target].node;\n if (patternSource[nodeLabelProp] === sourceLabel && patternTarget[nodeLabelProp] === targetLabel) edgeMatched = true;\n if (!directed && patternSource[nodeLabelProp] === targetLabel && patternTarget[nodeLabelProp] === sourceLabel) edgeMatched = true;\n });\n if (!edgeMatched) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n };\n for (var e = candidateEdgeNum - 1; e >= 0; e--) {\n var state_2 = _loop_5(e);\n if (state_2 === \"break\") break;\n }\n // prune2: 删除边的过程中,发现边数过少/边 label 数过少时,去除该图\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n candidateGraph.edges = candidateEdges;\n var lengthsToCandidate = dijkstra(candidateGraph, candidateGraph.nodes[0].id, false).length;\n Object.keys(lengthsToCandidate).reverse().forEach(function (targetId) {\n if (targetId === candidateGraph.nodes[0].id || candidateGraphInvalid) return;\n // prune4: 通过上述裁剪,可能导致该邻居子图变为不连通。裁剪掉目前在这个邻居子图中和 candidate(第一个节点)不连通的节点\n if (lengthsToCandidate[targetId] === Infinity) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n return;\n }\n // prune5: 经过边裁剪后,可能又出现了最短路径过长的节点 (比 pattern 中同 label 的节点到 beginNode 最大最短距离远),删去这些节点\n var nLabel = nodeMap[targetId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nLabel] || !undirectedLengthsToBeginPNodeLabelMap[nLabel].length || lengthsToCandidate[targetId] > undirectedLengthsToBeginPNodeLabelMap[nLabel][undirectedLengthsToBeginPNodeLabelMap[nLabel].length - 1]) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n }\n });\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n var degreeChanged = true;\n var loopCount = 0;\n while (degreeChanged && !candidateGraphInvalid) {\n degreeChanged = false;\n // candidate 度数不足,删去该图\n var condition = directed ? candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree || candidateNodeMap[candidate.id].inDegree < patternNodeMap[beginPNode.id].inDegree || candidateNodeMap[candidate.id].outDegree < patternNodeMap[beginPNode.id].outDegree : candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree;\n if (condition) {\n candidateGraphInvalid = true;\n break;\n }\n // candidate label 个数不足,删去该图\n if (candidateNodeLabelCountMap[candidate[nodeLabelProp]] < patternNodeLabelMap[candidate[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n // prune6:去除度数过小的节点\n var currentCandidateNodeNum = candidateGraph.nodes.length;\n for (var o = currentCandidateNodeNum - 1; o >= 0; o--) {\n var cgNode = candidateGraph.nodes[o];\n var nodeDegree = candidateNodeMap[cgNode.id].degree;\n var nodeInDegree = candidateNodeMap[cgNode.id].inDegree;\n var nodeOutDegree = candidateNodeMap[cgNode.id].outDegree;\n var cNodeLabel = cgNode[nodeLabelProp];\n var _e = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, cNodeLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _e.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _e.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _e.minPatternNodeLabelOutDegree;\n var deleteCondition = directed ? nodeDegree < minPatternNodeLabelDegree || nodeInDegree < minPatternNodeLabelInDegree || nodeOutDegree < minPatternNodeLabelOutDegree : nodeDegree < minPatternNodeLabelDegree;\n if (deleteCondition) {\n candidateNodeLabelCountMap[cgNode[nodeLabelProp]]--;\n // 节点 label 个数不足\n if (candidateNodeLabelCountMap[cgNode[nodeLabelProp]] < patternNodeLabelMap[cgNode[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n candidateGraph.nodes.splice(o, 1);\n candidateNodeMap[cgNode.id] = undefined;\n degreeChanged = true;\n }\n }\n if (candidateGraphInvalid || !degreeChanged && loopCount !== 0) break;\n // 经过 prune5 节点裁剪,删去端点已经不在 candidateGraph 中的边\n candidateEdgeNum = candidateEdges.length;\n for (var y = candidateEdgeNum - 1; y >= 0; y--) {\n var cedge = candidateEdges[y];\n if (!candidateNodeMap[cedge.source] || !candidateNodeMap[cedge.target]) {\n candidateEdges.splice(y, 1);\n var edgeLabel = cedge[edgeLabelProp];\n edgeLabelCountMap[edgeLabel]--;\n if (candidateNodeMap[cedge.source]) {\n candidateNodeMap[cedge.source].degree--;\n candidateNodeMap[cedge.source].outDegree--;\n }\n if (candidateNodeMap[cedge.target]) {\n candidateNodeMap[cedge.target].degree--;\n candidateNodeMap[cedge.target].inDegree--;\n }\n // 边 label 数量不足\n if (patternEdgeLabelMap[edgeLabel] && edgeLabelCountMap[edgeLabel] < patternEdgeLabelMap[edgeLabel].length) {\n candidateGraphInvalid = true;\n break;\n }\n degreeChanged = true;\n }\n }\n loopCount++;\n }\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // prune: 若节点/边数过少,节点/边 label 过少,去掉这个图\n if (candidateGraphInvalid || candidateGraph.nodes.length < pattern.nodes.length || candidateEdges.length < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n };\n for (var i = candidateGraphNum - 1; i >= 0; i--) {\n var state_1 = _loop_2(i);\n if (state_1 === \"break\") break;\n }\n // 此时已经生成的多个 candidateGraphs,可能有重复\n // console.log(\n // \"----- stage5: going to splice dulplicated candidate graphs -------\"\n // );\n // 删去 candidateGraphs 中一模一样的子图,通过边的 node-node-edgeLabel 作为 key,这类边个数作为 value,进行匹配\n var currentLength = candidateGraphs.length;\n var _loop_3 = function _loop_3(i) {\n var cg1 = candidateGraphs[i];\n var cg1EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg1.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg1EdgeMap[key]) cg1EdgeMap[key] = 1;else cg1EdgeMap[key]++;\n });\n var _loop_6 = function _loop_6(j) {\n var cg2 = candidateGraphs[j];\n var cg2EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg2.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg2EdgeMap[key]) cg2EdgeMap[key] = 1;else cg2EdgeMap[key]++;\n });\n var same = true;\n if (Object.keys(cg2EdgeMap).length !== Object.keys(cg1EdgeMap).length) {\n same = false;\n } else {\n Object.keys(cg1EdgeMap).forEach(function (key) {\n if (cg2EdgeMap[key] !== cg1EdgeMap[key]) same = false;\n });\n }\n if (same) {\n candidateGraphs.splice(j, 1);\n }\n };\n for (var j = currentLength - 1; j > i; j--) {\n _loop_6(j);\n }\n currentLength = candidateGraphs.length;\n };\n for (var i = 0; i <= currentLength - 1; i++) {\n _loop_3(i);\n }\n return candidateGraphs;\n};\nexport default GADDI;","import LinkedList from './linked-list';\nvar Stack = /** @class */function () {\n function Stack(maxStep) {\n if (maxStep === void 0) {\n maxStep = 10;\n }\n this.linkedList = new LinkedList();\n this.maxStep = maxStep;\n }\n Object.defineProperty(Stack.prototype, \"length\", {\n get: function get() {\n return this.linkedList.toArray().length;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * 判断栈是否为空,如果链表中没有头部元素,则栈为空\n */\n Stack.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 是否到定义的栈的最大长度,如果达到最大长度后,不再允许入栈\n */\n Stack.prototype.isMaxStack = function () {\n return this.toArray().length >= this.maxStep;\n };\n /**\n * 访问顶端元素\n */\n Stack.prototype.peek = function () {\n if (this.isEmpty()) {\n return null;\n }\n // 返回头部元素,不删除元素\n return this.linkedList.head.value;\n };\n Stack.prototype.push = function (value) {\n this.linkedList.prepend(value);\n if (this.length > this.maxStep) {\n this.linkedList.deleteTail();\n }\n };\n Stack.prototype.pop = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Stack.prototype.toArray = function () {\n return this.linkedList.toArray().map(function (node) {\n return node.value;\n });\n };\n Stack.prototype.clear = function () {\n while (!this.isEmpty()) {\n this.pop();\n }\n };\n return Stack;\n}();\nexport default Stack;","import getAdjMatrix from './adjacent-matrix';\nimport breadthFirstSearch from './bfs';\nimport connectedComponent from './connected-component';\nimport getDegree from './degree';\nimport { getInDegree, getOutDegree } from './degree';\nimport detectCycle, { detectAllCycles, detectAllDirectedCycle, detectAllUndirectedCycle } from './detect-cycle';\nimport depthFirstSearch from './dfs';\nimport dijkstra from './dijkstra';\nimport { findAllPath, findShortestPath } from './find-path';\nimport floydWarshall from './floydWarshall';\nimport labelPropagation from './label-propagation';\nimport louvain from './louvain';\nimport iLouvain from './i-louvain';\nimport kCore from './k-core';\nimport kMeans from './k-means';\nimport cosineSimilarity from './cosine-similarity';\nimport nodesCosineSimilarity from './nodes-cosine-similarity';\nimport minimumSpanningTree from './mts';\nimport pageRank from './pageRank';\nimport GADDI from './gaddi';\nimport Stack from './structs/stack';\nimport { getNeighbors } from './util';\nvar detectDirectedCycle = detectCycle;\nexport { getAdjMatrix, breadthFirstSearch, connectedComponent, getDegree, getInDegree, getOutDegree, detectCycle, detectDirectedCycle, detectAllCycles, detectAllDirectedCycle, detectAllUndirectedCycle, depthFirstSearch, dijkstra, findAllPath, findShortestPath, floydWarshall, labelPropagation, louvain, iLouvain, kCore, kMeans, cosineSimilarity, nodesCosineSimilarity, minimumSpanningTree, pageRank, getNeighbors, Stack, GADDI };\nexport default {\n getAdjMatrix: getAdjMatrix,\n breadthFirstSearch: breadthFirstSearch,\n connectedComponent: connectedComponent,\n getDegree: getDegree,\n getInDegree: getInDegree,\n getOutDegree: getOutDegree,\n detectCycle: detectCycle,\n detectDirectedCycle: detectDirectedCycle,\n detectAllCycles: detectAllCycles,\n detectAllDirectedCycle: detectAllDirectedCycle,\n detectAllUndirectedCycle: detectAllUndirectedCycle,\n depthFirstSearch: depthFirstSearch,\n dijkstra: dijkstra,\n findAllPath: findAllPath,\n findShortestPath: findShortestPath,\n floydWarshall: floydWarshall,\n labelPropagation: labelPropagation,\n louvain: louvain,\n iLouvain: iLouvain,\n kCore: kCore,\n kMeans: kMeans,\n cosineSimilarity: cosineSimilarity,\n nodesCosineSimilarity: nodesCosineSimilarity,\n minimumSpanningTree: minimumSpanningTree,\n pageRank: pageRank,\n getNeighbors: getNeighbors,\n Stack: Stack,\n GADDI: GADDI\n};","import { mat3, vec3, ext, vec2 } from '@antv/matrix-util';\nimport { isArray, each } from '@antv/util';\nvar transform = ext.transform;\n/**\n * 对比对象,用于对象数组排序\n * @param {string} attributeName 排序依据的字段名称\n * @param {number} min 最小值\n * @param {number} max 最大值\n * @return {boolean} bool 布尔\n */\nexport var compare = function compare(attributeName) {\n return function (m, n) {\n return m[attributeName] - n[attributeName];\n };\n};\n/**\n * 是否在区间内\n * @param {number} value 值\n * @param {number} min 最小值\n * @param {number} max 最大值\n * @return {boolean} bool 布尔\n */\nvar isBetween = function isBetween(value, min, max) {\n return value >= min && value <= max;\n};\n/**\n * 获取两条线段的交点\n * @param {Point} p0 第一条线段起点\n * @param {Point} p1 第一条线段终点\n * @param {Point} p2 第二条线段起点\n * @param {Point} p3 第二条线段终点\n * @return {Point} 交点\n */\nexport var getLineIntersect = function getLineIntersect(p0, p1, p2, p3) {\n var tolerance = 0.0001;\n var E = {\n x: p2.x - p0.x,\n y: p2.y - p0.y\n };\n var D0 = {\n x: p1.x - p0.x,\n y: p1.y - p0.y\n };\n var D1 = {\n x: p3.x - p2.x,\n y: p3.y - p2.y\n };\n var kross = D0.x * D1.y - D0.y * D1.x;\n var sqrKross = kross * kross;\n var invertKross = 1 / kross;\n var sqrLen0 = D0.x * D0.x + D0.y * D0.y;\n var sqrLen1 = D1.x * D1.x + D1.y * D1.y;\n if (sqrKross > tolerance * sqrLen0 * sqrLen1) {\n var s = (E.x * D1.y - E.y * D1.x) * invertKross;\n var t = (E.x * D0.y - E.y * D0.x) * invertKross;\n if (!isBetween(s, 0, 1) || !isBetween(t, 0, 1)) return null;\n return {\n x: p0.x + s * D0.x,\n y: p0.y + s * D0.y\n };\n }\n return null;\n};\n/**\n * point and rectangular intersection point\n * @param {IRect} rect rect\n * @param {Point} point point\n * @return {PointPoint} rst;\n */\nexport var getRectIntersectByPoint = function getRectIntersectByPoint(rect, point) {\n var x = rect.x,\n y = rect.y,\n width = rect.width,\n height = rect.height;\n var cx = x + width / 2;\n var cy = y + height / 2;\n var points = [];\n var center = {\n x: cx,\n y: cy\n };\n points.push({\n x: x,\n y: y\n });\n points.push({\n x: x + width,\n y: y\n });\n points.push({\n x: x + width,\n y: y + height\n });\n points.push({\n x: x,\n y: y + height\n });\n points.push({\n x: x,\n y: y\n });\n var rst = null;\n for (var i = 1; i < points.length; i++) {\n rst = getLineIntersect(points[i - 1], points[i], center, point);\n if (rst) {\n break;\n }\n }\n return rst;\n};\n/**\n * get point and circle inIntersect\n * @param {ICircle} circle 圆点,x,y,r\n * @param {Point} point 点 x,y\n * @return {Point} applied point\n */\nexport var getCircleIntersectByPoint = function getCircleIntersectByPoint(circle, point) {\n var cx = circle.x,\n cy = circle.y,\n r = circle.r;\n var x = point.x,\n y = point.y;\n var dx = x - cx;\n var dy = y - cy;\n if (dx * dx + dy * dy < r * r) {\n return null;\n }\n var angle = Math.atan(dy / dx);\n return {\n x: cx + Math.abs(r * Math.cos(angle)) * Math.sign(dx),\n y: cy + Math.abs(r * Math.sin(angle)) * Math.sign(dy)\n };\n};\n/**\n * get point and ellipse inIntersect\n * @param {Object} ellipse 椭圆 x,y,rx,ry\n * @param {Object} point 点 x,y\n * @return {object} applied point\n */\nexport var getEllipseIntersectByPoint = function getEllipseIntersectByPoint(ellipse, point) {\n var a = ellipse.rx;\n var b = ellipse.ry;\n var cx = ellipse.x;\n var cy = ellipse.y;\n var dx = point.x - cx;\n var dy = point.y - cy;\n // 直接通过 x,y 求夹角,求出来的范围是 -PI, PI\n var angle = Math.atan2(dy / b, dx / a);\n if (angle < 0) {\n angle += 2 * Math.PI; // 转换到 0,2PI\n }\n\n return {\n x: cx + a * Math.cos(angle),\n y: cy + b * Math.sin(angle)\n };\n};\n/**\n * coordinate matrix transformation\n * @param {number} point coordinate\n * @param {Matrix} matrix matrix\n * @param {number} tag could be 0 or 1\n * @return {Point} transformed point\n */\nexport var applyMatrix = function applyMatrix(point, matrix, tag) {\n if (tag === void 0) {\n tag = 1;\n }\n var vector = [point.x, point.y, tag];\n if (!matrix || isNaN(matrix[0])) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n vec3.transformMat3(vector, vector, matrix);\n return {\n x: vector[0],\n y: vector[1]\n };\n};\n/**\n * coordinate matrix invert transformation\n * @param {number} point coordinate\n * @param {number} matrix matrix\n * @param {number} tag could be 0 or 1\n * @return {object} transformed point\n */\nexport var invertMatrix = function invertMatrix(point, matrix, tag) {\n if (tag === void 0) {\n tag = 1;\n }\n if (!matrix || isNaN(matrix[0])) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var inversedMatrix = mat3.invert([1, 0, 0, 0, 1, 0, 0, 0, 1], matrix);\n if (!inversedMatrix) {\n inversedMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var vector = [point.x, point.y, tag];\n vec3.transformMat3(vector, vector, inversedMatrix);\n return {\n x: vector[0],\n y: vector[1]\n };\n};\n/**\n *\n * @param p1 First coordinate\n * @param p2 second coordinate\n * @param p3 three coordinate\n */\nexport var getCircleCenterByPoints = function getCircleCenterByPoints(p1, p2, p3) {\n var a = p1.x - p2.x;\n var b = p1.y - p2.y;\n var c = p1.x - p3.x;\n var d = p1.y - p3.y;\n var e = (p1.x * p1.x - p2.x * p2.x - p2.y * p2.y + p1.y * p1.y) / 2;\n var f = (p1.x * p1.x - p3.x * p3.x - p3.y * p3.y + p1.y * p1.y) / 2;\n var denominator = b * c - a * d;\n return {\n x: -(d * e - b * f) / denominator,\n y: -(a * f - c * e) / denominator\n };\n};\n/**\n * get distance by two points\n * @param p1 first point\n * @param p2 second point\n */\nexport var distance = function distance(p1, p2) {\n var vx = p1.x - p2.x;\n var vy = p1.y - p2.y;\n return Math.sqrt(vx * vx + vy * vy);\n};\n/**\n * scale matrix\n * @param matrix [ [], [], [] ]\n * @param ratio\n */\nexport var scaleMatrix = function scaleMatrix(matrix, ratio) {\n var result = [];\n matrix.forEach(function (row) {\n var newRow = [];\n row.forEach(function (v) {\n newRow.push(v * ratio);\n });\n result.push(newRow);\n });\n return result;\n};\n/**\n * Floyd Warshall algorithm for shortest path distances matrix\n * @param {array} adjMatrix adjacency matrix\n * @return {array} distances shortest path distances matrix\n */\nexport var floydWarshall = function floydWarshall(adjMatrix) {\n // initialize\n var dist = [];\n var size = adjMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjMatrix[i][j] === 0 || !adjMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\n/**\n * get adjacency matrix\n * @param data graph data\n * @param directed whether it's a directed graph\n */\nexport var getAdjMatrix = function getAdjMatrix(data, directed) {\n var nodes = data.nodes,\n edges = data.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error('invalid nodes data!');\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (e) {\n var source = e.source,\n target = e.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\n/**\n * 平移group\n * @param group Group 实例\n * @param vec 移动向量\n */\nexport var translate = function translate(group, vec) {\n group.translate(vec.x, vec.y);\n};\n/**\n * 移动到指定坐标点\n * @param group Group 实例\n * @param point 移动到的坐标点\n */\nexport var move = function move(group, point, animate, animateCfg) {\n if (animateCfg === void 0) {\n animateCfg = {\n duration: 500\n };\n }\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var bbox = group.getCanvasBBox();\n var vx = point.x - bbox.minX;\n var vy = point.y - bbox.minY;\n if (animate) {\n var dx_1 = vx * matrix[0];\n var dy_1 = vy * matrix[4];\n var lastX_1 = 0;\n var lastY_1 = 0;\n var newX_1 = 0;\n var newY_1 = 0;\n group.animate(function (ratio) {\n newX_1 = dx_1 * ratio;\n newY_1 = dy_1 * ratio;\n matrix = transform(matrix, [['t', newX_1 - lastX_1, newY_1 - lastY_1]]);\n lastX_1 = newX_1;\n lastY_1 = newY_1;\n return {\n matrix: matrix\n };\n }, animateCfg);\n } else {\n var movedMatrix = transform(matrix, [['t', vx, vy]]);\n group.setMatrix(movedMatrix);\n }\n};\n/**\n * 缩放 group\n * @param group Group 实例\n * @param point 在x 和 y 方向上的缩放比例\n */\nexport var scale = function scale(group, ratio) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var scaleXY = ratio;\n if (!isArray(ratio)) {\n scaleXY = [ratio, ratio];\n }\n if (isArray(ratio) && ratio.length === 1) {\n scaleXY = [ratio[0], ratio[0]];\n }\n matrix = transform(matrix, [['s', scaleXY[0], scaleXY[1]]]);\n group.setMatrix(matrix);\n};\n/**\n *\n * @param group Group 实例\n * @param ratio 选择角度\n */\nexport var rotate = function rotate(group, angle) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n matrix = transform(matrix, [['r', angle]]);\n group.setMatrix(matrix);\n};\nexport var getDegree = function getDegree(n, nodeIdxMap, edges) {\n var degrees = [];\n for (var i = 0; i < n; i++) {\n degrees[i] = 0;\n }\n edges.forEach(function (e) {\n if (e.source) {\n degrees[nodeIdxMap[e.source]] += 1;\n }\n if (e.target) {\n degrees[nodeIdxMap[e.target]] += 1;\n }\n });\n return degrees;\n};\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) && Math.min(p1[0], p2[0]) <= q[0] && q[0] <= Math.max(p1[0], p2[0]) && Math.min(p1[1], p2[1]) <= q[1] && q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n/**\n * 判断点P在多边形内-射线法. Borrow from https://github.com/antvis/util/blob/master/packages/path-util/src/point-in-polygon.ts\n * @param points\n * @param x\n * @param y\n */\nexport var isPointInPolygon = function isPointInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n // 判断两个double在eps精度下的大小关系\n var tolerance = 1e-6;\n function dcmp(xValue) {\n if (Math.abs(xValue) < tolerance) {\n return 0;\n }\n return xValue < 0 ? -1 : 1;\n }\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 && dcmp(x - (y - p1[1]) * (p1[0] - p2[0]) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n};\n// 判断两个BBox是否相交\nexport var intersectBBox = function intersectBBox(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n};\nvar lineIntersectPolygon = function lineIntersectPolygon(lines, line) {\n var isIntersect = false;\n each(lines, function (l) {\n if (getLineIntersect(l.from, l.to, line.from, line.to)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n};\n/**\n * 判断两个polygon是否相交。\n * borrow from @antv/path-util\n * @param points1 polygon1的顶点数组\n * @param points2 polygon2的顶点数组\n */\nexport var isPolygonsIntersect = function isPolygonsIntersect(points1, points2) {\n var getBBox = function getBBox(points) {\n var xArr = points.map(function (p) {\n return p[0];\n });\n var yArr = points.map(function (p) {\n return p[1];\n });\n return {\n minX: Math.min.apply(null, xArr),\n maxX: Math.max.apply(null, xArr),\n minY: Math.min.apply(null, yArr),\n maxY: Math.max.apply(null, yArr)\n };\n };\n var parseToLines = function parseToLines(points) {\n var lines = [];\n var count = points.length;\n for (var i = 0; i < count - 1; i++) {\n var point = points[i];\n var next = points[i + 1];\n lines.push({\n from: {\n x: point[0],\n y: point[1]\n },\n to: {\n x: next[0],\n y: next[1]\n }\n });\n }\n if (lines.length > 1) {\n var first = points[0];\n var last = points[count - 1];\n lines.push({\n from: {\n x: last[0],\n y: last[1]\n },\n to: {\n x: first[0],\n y: first[1]\n }\n });\n }\n return lines;\n };\n // 空数组,或者一个点返回 false\n if (points1.length < 2 || points2.length < 2) {\n return false;\n }\n var bbox1 = getBBox(points1);\n var bbox2 = getBBox(points2);\n // 判定包围盒是否相交,比判定点是否在多边形内要快的多,可以筛选掉大多数情况\n if (!intersectBBox(bbox1, bbox2)) {\n return false;\n }\n var isIn = false;\n // 判定点是否在多边形内部,一旦有一个点在另一个多边形内,则返回\n each(points2, function (point) {\n if (isPointInPolygon(points1, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n each(points1, function (point) {\n if (isPointInPolygon(points2, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n var lines1 = parseToLines(points1);\n var lines2 = parseToLines(points2);\n var isIntersect = false;\n each(lines2, function (line) {\n if (lineIntersectPolygon(lines1, line)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n};\nvar Line = /** @class */function () {\n function Line(x1, y1, x2, y2) {\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n }\n Line.prototype.getBBox = function () {\n var minX = Math.min(this.x1, this.x2);\n var minY = Math.min(this.y1, this.y2);\n var maxX = Math.max(this.x1, this.x2);\n var maxY = Math.max(this.y1, this.y2);\n var res = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY\n };\n return res;\n };\n return Line;\n}();\nexport { Line };\nexport var getBBoxBoundLine = function getBBoxBoundLine(bbox, direction) {\n var bounds = {\n top: [bbox.minX, bbox.minY, bbox.maxX, bbox.minY],\n left: [bbox.minX, bbox.minY, bbox.minX, bbox.maxY],\n bottom: [bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY],\n right: [bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY]\n };\n return bounds[direction];\n};\n/**\n * 计算两条线段相交时,相交点对第一条线段上的分割比例\n */\nvar fractionAlongLineA = function fractionAlongLineA(la, lb) {\n var uaT = (lb.x2 - lb.x1) * (la.y1 - lb.y1) - (lb.y2 - lb.y1) * (la.x1 - lb.x1);\n var ubT = (la.x2 - la.x1) * (la.y1 - lb.y1) - (la.y2 - la.y1) * (la.x1 - lb.x1);\n var uB = (lb.y2 - lb.y1) * (la.x2 - la.x1) - (lb.x2 - lb.x1) * (la.y2 - la.y1);\n if (uB) {\n var ua = uaT / uB;\n var ub = ubT / uB;\n if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n return ua;\n }\n }\n return Number.POSITIVE_INFINITY;\n};\nexport var itemIntersectByLine = function itemIntersectByLine(item, line) {\n var directions = ['top', 'left', 'bottom', 'right'];\n var bbox = item.getBBox();\n var countIntersections = 0;\n var intersections = [];\n for (var i = 0; i < 4; i++) {\n var _a = getBBoxBoundLine(bbox, directions[i]),\n x1 = _a[0],\n y1 = _a[1],\n x2 = _a[2],\n y2 = _a[3];\n intersections[i] = getLineIntersect({\n x: line.x1,\n y: line.y1\n }, {\n x: line.x2,\n y: line.y2\n }, {\n x: x1,\n y: y1\n }, {\n x: x2,\n y: y2\n });\n if (intersections[i]) {\n countIntersections += 1;\n }\n }\n return [intersections, countIntersections];\n};\nexport var fractionToLine = function fractionToLine(item, line) {\n var directions = ['top', 'left', 'bottom', 'right'];\n var bbox = item.getBBox();\n var minDistance = Number.POSITIVE_INFINITY;\n var countIntersections = 0;\n for (var i = 0; i < 4; i++) {\n var _a = getBBoxBoundLine(bbox, directions[i]),\n x1 = _a[0],\n y1 = _a[1],\n x2 = _a[2],\n y2 = _a[3];\n var testDistance = fractionAlongLineA(line, new Line(x1, y1, x2, y2));\n testDistance = Math.abs(testDistance - 0.5);\n if (testDistance >= 0 && testDistance <= 1) {\n countIntersections += 1;\n minDistance = testDistance < minDistance ? testDistance : minDistance;\n }\n }\n if (countIntersections === 0) return -1;\n return minDistance;\n};\nexport var getPointsCenter = function getPointsCenter(points) {\n var centerX = 0;\n var centerY = 0;\n if (points.length > 0) {\n for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {\n var point = points_1[_i];\n centerX += point.x;\n centerY += point.y;\n }\n centerX /= points.length;\n centerY /= points.length;\n }\n return {\n x: centerX,\n y: centerY\n };\n};\nexport var squareDist = function squareDist(a, b) {\n return Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2);\n};\nexport var pointLineSquareDist = function pointLineSquareDist(point, line) {\n var x1 = line.x1;\n var y1 = line.y1;\n var x2 = line.x2 - x1;\n var y2 = line.y2 - y1;\n var px = point.x - x1;\n var py = point.y - y1;\n var dotprod = px * x2 + py * y2;\n var projlenSq;\n if (dotprod <= 0) {\n projlenSq = 0;\n } else {\n px = x2 - px;\n py = y2 - py;\n dotprod = px * x2 + py * y2;\n if (dotprod <= 0) {\n projlenSq = 0;\n } else {\n projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);\n }\n }\n var lenSq = px * px + py * py - projlenSq;\n if (lenSq < 0) {\n lenSq = 0;\n }\n return lenSq;\n};\nexport var isPointsOverlap = function isPointsOverlap(p1, p2, e) {\n if (e === void 0) {\n e = 1e-3;\n }\n return Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2) < Math.pow(e, 2);\n};\n/**\n * 点到矩形的距离的平方:矩形内部点视作距离为0,外部的点若投影落在矩形边上则为点到矩形边的最近的垂直距离,否则为点到矩形顶点的距离,\n * @param point IPoint\n * @param rect IRect\n */\nexport var pointRectSquareDist = function pointRectSquareDist(point, rect) {\n var isLeft = point.x < rect.x;\n var isRight = point.x > rect.x + rect.width;\n var isTop = point.y > rect.y + rect.height;\n var isBottom = point.y < rect.y;\n var isPointOutside = isLeft || isRight || isTop || isBottom;\n if (!isPointOutside) {\n return 0;\n }\n if (isTop && !isLeft && !isRight) {\n return Math.pow(rect.y + rect.height - point.y, 2);\n }\n if (isBottom && !isLeft && !isRight) {\n return Math.pow(point.y - rect.y, 2);\n }\n if (isLeft && !isTop && !isBottom) {\n return Math.pow(rect.x - point.x, 2);\n }\n if (isRight && !isTop && !isBottom) {\n return Math.pow(rect.x + rect.width - point.x, 2);\n }\n var dx = Math.min(Math.abs(rect.x - point.x), Math.abs(rect.x + rect.width - point.x));\n var dy = Math.min(Math.abs(rect.y - point.y), Math.abs(rect.y + rect.height - point.y));\n return dx * dx + dy * dy;\n};\n/**\n * point to line distance\n * @param {array} line 线的四个顶点 [x1, y1, x2, y2]\n * @param {object} point 坐标点 {x, y}\n * @return {Number|NaN} distance\n */\nexport var pointLineDistance = function pointLineDistance(line, point) {\n var x1 = line[0],\n y1 = line[1],\n x2 = line[2],\n y2 = line[3];\n var x = point.x,\n y = point.y;\n var d = [x2 - x1, y2 - y1];\n if (vec2.exactEquals(d, [0, 0])) {\n return NaN;\n }\n var u = [-d[1], d[0]];\n // @ts-ignore\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n // @ts-ignore\n return Math.abs(vec2.dot(a, u));\n};\n/**\n * Linearly interpolate between start and end, where alpha is the percent distance along the line.\n * alpha = 0 will be start, and alpha = 1 will be end.\n * @param {number} start\n * @param {number} end\n * @param {number} alpha interpolation factor, typically in the closed interval [0, 1]\n * @returns {number}\n */\nexport var lerp = function lerp(start, end, alpha) {\n return start + (end - start) * alpha;\n};\n/**\n * Linearly interpolate between start and end arrays, where alpha is the percent distance along the line.\n * alpha = 0 will be start, and alpha = 1 will be end.\n * @param {number[]} start\n * @param {number[]} end\n * @param {number} alpha interpolation factor, typically in the closed interval [0, 1]\n * @returns {number[]}\n */\nexport var lerpArray = function lerpArray(start, end, alpha) {\n var len = Math.min(start.length, end.length);\n var out = new Array(len);\n for (var i = 0; i < len; i++) {\n out[i] = lerp(start[i], end[i], alpha);\n }\n return out;\n};","var subjectColor = 'rgb(95, 149, 255)';\nvar backColor = 'rgb(255, 255, 255)';\nvar textColor = 'rgb(0, 0, 0)';\nvar activeFill = 'rgb(247, 250, 255)';\nvar nodeMainFill = 'rgb(239, 244, 255)';\nvar comboFill = 'rgb(253, 253, 253)';\nvar disabledFill = 'rgb(250, 250, 250)';\nvar edgeMainStroke = 'rgb(224, 224, 224)';\nvar edgeInactiveStroke = 'rgb(234, 234, 234)';\nvar edgeDisablesStroke = 'rgb(245, 245, 245)';\nvar inactiveStroke = 'rgb(191, 213, 255)';\nvar highlightStroke = '#4572d9';\nvar highlightFill = 'rgb(223, 234, 255)';\nvar colorSet = {\n // for nodes\n mainStroke: subjectColor,\n mainFill: nodeMainFill,\n activeStroke: subjectColor,\n activeFill: activeFill,\n inactiveStroke: inactiveStroke,\n inactiveFill: activeFill,\n selectedStroke: subjectColor,\n selectedFill: backColor,\n highlightStroke: highlightStroke,\n highlightFill: highlightFill,\n disableStroke: edgeMainStroke,\n disableFill: disabledFill,\n // for edges\n edgeMainStroke: edgeMainStroke,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: edgeInactiveStroke,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: edgeDisablesStroke,\n // for combos\n comboMainStroke: edgeMainStroke,\n comboMainFill: comboFill,\n comboActiveStroke: subjectColor,\n comboActiveFill: activeFill,\n comboInactiveStroke: edgeMainStroke,\n comboInactiveFill: comboFill,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: comboFill,\n comboHighlightStroke: highlightStroke,\n comboHighlightFill: comboFill,\n comboDisableStroke: edgeInactiveStroke,\n comboDisableFill: disabledFill\n};\nexport default {\n version: '0.8.23',\n rootContainerClassName: 'root-container',\n nodeContainerClassName: 'node-container',\n edgeContainerClassName: 'edge-container',\n comboContainerClassName: 'combo-container',\n delegateContainerClassName: 'delegate-container',\n defaultLoopPosition: 'top',\n nodeLabel: {\n style: {\n fill: '#000',\n fontSize: 12,\n textAlign: 'center',\n textBaseline: 'middle'\n },\n offset: 4 // 节点的默认文本不居中时的偏移量\n },\n\n defaultNode: {\n type: 'circle',\n style: {\n lineWidth: 1,\n stroke: colorSet.mainStroke,\n fill: nodeMainFill\n },\n size: 20,\n color: colorSet.mainStroke,\n linkPoints: {\n size: 8,\n lineWidth: 1,\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke\n }\n },\n // 节点应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n nodeStateStyles: {\n active: {\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke,\n lineWidth: 2,\n shadowColor: colorSet.mainStroke,\n shadowBlur: 10\n },\n selected: {\n fill: colorSet.selectedFill,\n stroke: colorSet.selectedStroke,\n lineWidth: 4,\n shadowColor: colorSet.selectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n fill: colorSet.highlightFill,\n stroke: colorSet.highlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n fill: colorSet.inactiveFill,\n stroke: colorSet.inactiveStroke,\n lineWidth: 1\n },\n disable: {\n fill: colorSet.disableFill,\n stroke: colorSet.disableStroke,\n lineWidth: 1\n }\n },\n edgeLabel: {\n style: {\n fill: textColor,\n textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n }\n },\n defaultEdge: {\n type: 'line',\n size: 1,\n style: {\n stroke: colorSet.edgeMainStroke,\n lineAppendWidth: 2\n },\n color: colorSet.edgeMainStroke\n },\n // 边应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n edgeStateStyles: {\n active: {\n stroke: colorSet.edgeActiveStroke,\n lineWidth: 1\n },\n selected: {\n stroke: colorSet.edgeSelectedStroke,\n lineWidth: 2,\n shadowColor: colorSet.edgeSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.edgeHighlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.edgeInactiveStroke,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.edgeDisableStroke,\n lineWidth: 1\n }\n },\n comboLabel: {\n style: {\n fill: textColor,\n // textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n },\n refY: 10,\n refX: 10 // Combo 的默认文本不居中时的偏移量\n },\n\n defaultCombo: {\n type: 'circle',\n style: {\n fill: colorSet.comboMainFill,\n lineWidth: 1,\n stroke: colorSet.comboMainStroke,\n r: 5,\n width: 20,\n height: 10\n },\n size: [20, 5],\n color: colorSet.comboMainStroke,\n padding: [25, 20, 15, 20]\n },\n // combo 应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n comboStateStyles: {\n active: {\n stroke: colorSet.comboActiveStroke,\n lineWidth: 1,\n fill: colorSet.comboActiveFill\n },\n selected: {\n stroke: colorSet.comboSelectedStroke,\n lineWidth: 2,\n fill: colorSet.comboSelectedFill,\n shadowColor: colorSet.comboSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.comboHighlightStroke,\n lineWidth: 2,\n fill: colorSet.comboHighlightFill,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.comboInactiveStroke,\n fill: colorSet.comboInactiveFill,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.comboDisableStroke,\n fill: colorSet.comboDisableFill,\n lineWidth: 1\n }\n },\n delegateStyle: {\n fill: '#F3F9FF',\n fillOpacity: 0.5,\n stroke: '#1890FF',\n strokeOpacity: 0.9,\n lineDash: [5, 5]\n },\n windowFontFamily: typeof window !== 'undefined' && window.getComputedStyle && document.body ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif'\n};","export default {\n ' ': 0.3329986572265625,\n a: 0.5589996337890625,\n A: 0.6569992065429687,\n b: 0.58599853515625,\n B: 0.6769989013671875,\n c: 0.5469985961914062,\n C: 0.7279998779296875,\n d: 0.58599853515625,\n D: 0.705999755859375,\n e: 0.554998779296875,\n E: 0.63699951171875,\n f: 0.37299957275390627,\n F: 0.5769989013671875,\n g: 0.5909988403320312,\n G: 0.7479995727539063,\n h: 0.555999755859375,\n H: 0.7199996948242188,\n i: 0.255999755859375,\n I: 0.23699951171875,\n j: 0.26699981689453123,\n J: 0.5169998168945312,\n k: 0.5289993286132812,\n K: 0.6899993896484375,\n l: 0.23499908447265624,\n L: 0.5879989624023437,\n m: 0.854998779296875,\n M: 0.8819992065429687,\n n: 0.5589996337890625,\n N: 0.7189987182617188,\n o: 0.58599853515625,\n O: 0.7669998168945312,\n p: 0.58599853515625,\n P: 0.6419998168945312,\n q: 0.58599853515625,\n Q: 0.7669998168945312,\n r: 0.3649993896484375,\n R: 0.6759994506835938,\n s: 0.504998779296875,\n S: 0.6319992065429687,\n t: 0.354998779296875,\n T: 0.6189987182617187,\n u: 0.5599990844726562,\n U: 0.7139999389648437,\n v: 0.48199920654296874,\n V: 0.6389999389648438,\n w: 0.754998779296875,\n W: 0.929998779296875,\n x: 0.5089996337890625,\n X: 0.63699951171875,\n y: 0.4959991455078125,\n Y: 0.66199951171875,\n z: 0.48699951171875,\n Z: 0.6239990234375,\n '0': 0.6,\n '1': 0.40099945068359377,\n '2': 0.6,\n '3': 0.6,\n '4': 0.6,\n '5': 0.6,\n '6': 0.6,\n '7': 0.5469985961914062,\n '8': 0.6,\n '9': 0.6,\n '[': 0.3329986572265625,\n ']': 0.3329986572265625,\n ',': 0.26399993896484375,\n '.': 0.26399993896484375,\n ';': 0.26399993896484375,\n ':': 0.26399993896484375,\n '{': 0.3329986572265625,\n '}': 0.3329986572265625,\n '\\\\': 0.5,\n '|': 0.19499969482421875,\n '=': 0.604998779296875,\n '+': 0.604998779296875,\n '-': 0.604998779296875,\n _: 0.5,\n '`': 0.3329986572265625,\n ' ~': 0.8329986572265625,\n '!': 0.3329986572265625,\n '@': 0.8579986572265625,\n '#': 0.6,\n $: 0.6,\n '%': 0.9699996948242188,\n '^': 0.517999267578125,\n '&': 0.7259994506835937,\n '*': 0.505999755859375,\n '(': 0.3329986572265625,\n ')': 0.3329986572265625,\n '<': 0.604998779296875,\n '>': 0.604998779296875,\n '/': 0.5,\n '?': 0.53699951171875\n};","import { __assign } from \"tslib\";\nimport { vec2 } from '@antv/matrix-util';\nimport { clone, isArray, isNumber, isObject, isString } from '@antv/util';\nimport Global from '../global';\nimport letterAspectRatio from './letterAspectRatio';\nimport { applyMatrix } from './math';\nvar PI = Math.PI,\n sin = Math.sin,\n cos = Math.cos;\n// 一共支持8个方向的自环,每个环占的角度是45度,在计算时再二分,为22.5度\nvar SELF_LINK_SIN = sin(PI / 8);\nvar SELF_LINK_COS = cos(PI / 8);\nexport var getBBox = function getBBox(element, group) {\n var bbox = element.getBBox();\n var leftTop = {\n x: bbox.minX,\n y: bbox.minY\n };\n var rightBottom = {\n x: bbox.maxX,\n y: bbox.maxY\n };\n // 根据父元素变换矩阵\n if (group) {\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n leftTop = applyMatrix(leftTop, matrix);\n rightBottom = applyMatrix(rightBottom, matrix);\n }\n var lx = leftTop.x,\n ly = leftTop.y;\n var rx = rightBottom.x,\n ry = rightBottom.y;\n return {\n x: lx,\n y: ly,\n minX: lx,\n minY: ly,\n maxX: rx,\n maxY: ry,\n width: rx - lx,\n height: ry - ly\n };\n};\n/**\n * get loop edge config\n * @param cfg edge config\n */\nexport var getLoopCfgs = function getLoopCfgs(cfg) {\n var item = cfg.sourceNode || cfg.targetNode;\n var container = item.get('group');\n var containerMatrix = container.getMatrix();\n if (!containerMatrix) containerMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var keyShape = item.getKeyShape();\n var bbox = keyShape.getBBox();\n var loopCfg = cfg.loopCfg || {};\n // 距离keyShape边的最高距离\n var dist = loopCfg.dist || Math.max(bbox.width, bbox.height) * 2;\n // 自环边与keyShape的相对位置关系\n var position = loopCfg.position || Global.defaultLoopPosition;\n // 中心取节点 keyShape bbox 的中心位置 + 节点位置坐标\n var center = [(bbox.minX + bbox.maxX) / 2 + containerMatrix[6], (bbox.minY + bbox.maxY) / 2 + containerMatrix[7]];\n var startPoint = [cfg.startPoint.x, cfg.startPoint.y];\n var endPoint = [cfg.endPoint.x, cfg.endPoint.y];\n var halfOfHeight = bbox.height / 2;\n var halfOfWidth = bbox.width / 2;\n var rstart = halfOfHeight;\n var rend = halfOfHeight;\n var sinDeltaStart = rstart * SELF_LINK_SIN;\n var cosDeltaStart = rstart * SELF_LINK_COS;\n var sinDeltaEnd = rend * SELF_LINK_SIN;\n var cosDeltaEnd = rend * SELF_LINK_COS;\n var shapeType = keyShape.get('type');\n // 美观考虑,pointPadding 默认取宽高中最小的1/4\n var defaultPointPadding = Math.min(halfOfHeight / 2, halfOfWidth / 2);\n var maxPointPadding = Math.min(halfOfHeight, halfOfWidth);\n // 对于非圆形节点设置的连接点与节点中心坐标(`top-right`,`bottom-right`,`top-left`,`bottom-left`较特殊,为四个角坐标)在 x 轴或 y 轴方向的偏移量,默认为  `节点宽高中最小值的1/4`\n var pointPadding = (loopCfg === null || loopCfg === void 0 ? void 0 : loopCfg.pointPadding) ? Math.min(maxPointPadding, loopCfg === null || loopCfg === void 0 ? void 0 : loopCfg.pointPadding) : defaultPointPadding;\n // 如果定义了锚点的,直接用锚点坐标,否则,根据自环的 cfg 计算\n if (startPoint[0] === endPoint[0] && startPoint[1] === endPoint[1]) {\n switch (position) {\n case 'top':\n if (shapeType === 'circle') {\n startPoint = [center[0] - sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] - cosDeltaEnd];\n } else {\n startPoint = [center[0] - pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] + pointPadding, center[1] - halfOfHeight];\n }\n break;\n case 'top-right':\n rstart = halfOfHeight;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + cosDeltaEnd, center[1] - sinDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth - pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] + halfOfWidth, center[1] - halfOfHeight + pointPadding];\n }\n break;\n case 'right':\n rstart = halfOfWidth;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + cosDeltaStart, center[1] - sinDeltaStart];\n endPoint = [center[0] + cosDeltaEnd, center[1] + sinDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth, center[1] - pointPadding];\n endPoint = [center[0] + halfOfWidth, center[1] + pointPadding];\n }\n break;\n case 'bottom-right':\n rstart = halfOfWidth;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + cosDeltaStart, center[1] + sinDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] + cosDeltaEnd];\n } else {\n startPoint = [center[0] + halfOfWidth, center[1] + halfOfHeight - pointPadding];\n endPoint = [center[0] + halfOfWidth - pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'bottom':\n rstart = halfOfHeight;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] + sinDeltaStart, center[1] + cosDeltaStart];\n endPoint = [center[0] - sinDeltaEnd, center[1] + cosDeltaEnd];\n } else {\n startPoint = [center[0] - pointPadding, center[1] + halfOfHeight];\n endPoint = [center[0] + pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'bottom-left':\n rstart = halfOfHeight;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - sinDeltaStart, center[1] + cosDeltaStart];\n endPoint = [center[0] - cosDeltaEnd, center[1] + sinDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth, center[1] + halfOfHeight - pointPadding];\n endPoint = [center[0] - halfOfWidth + pointPadding, center[1] + halfOfHeight];\n }\n break;\n case 'left':\n rstart = halfOfWidth;\n rend = halfOfWidth;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - cosDeltaStart, center[1] + sinDeltaStart];\n endPoint = [center[0] - cosDeltaEnd, center[1] - sinDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth, center[1] - pointPadding];\n endPoint = [center[0] - halfOfWidth, center[1] + pointPadding];\n }\n break;\n case 'top-left':\n rstart = halfOfWidth;\n rend = halfOfHeight;\n if (shapeType === 'circle') {\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - cosDeltaStart, center[1] - sinDeltaStart];\n endPoint = [center[0] - sinDeltaEnd, center[1] - cosDeltaEnd];\n } else {\n startPoint = [center[0] - halfOfWidth + pointPadding, center[1] - halfOfHeight];\n endPoint = [center[0] - halfOfWidth, center[1] - halfOfHeight + pointPadding];\n }\n break;\n default:\n rstart = halfOfWidth;\n rend = halfOfWidth;\n sinDeltaStart = rstart * SELF_LINK_SIN;\n cosDeltaStart = rstart * SELF_LINK_COS;\n sinDeltaEnd = rend * SELF_LINK_SIN;\n cosDeltaEnd = rend * SELF_LINK_COS;\n startPoint = [center[0] - sinDeltaStart, center[1] - cosDeltaStart];\n endPoint = [center[0] + sinDeltaEnd, center[1] - cosDeltaEnd];\n }\n // 如果逆时针画,交换起点和终点\n if (loopCfg.clockwise === false) {\n var swap = [startPoint[0], startPoint[1]];\n startPoint = [endPoint[0], endPoint[1]];\n endPoint = [swap[0], swap[1]];\n }\n }\n var startVec = [startPoint[0] - center[0], startPoint[1] - center[1]];\n var scaleRateStart = (rstart + dist) / rstart;\n var scaleRateEnd = (rend + dist) / rend;\n if (loopCfg.clockwise === false) {\n scaleRateStart = (rend + dist) / rend;\n scaleRateEnd = (rstart + dist) / rstart;\n }\n var startExtendVec = vec2.scale([0, 0], startVec, scaleRateStart);\n var controlPoint1 = [center[0] + startExtendVec[0], center[1] + startExtendVec[1]];\n var endVec = [endPoint[0] - center[0], endPoint[1] - center[1]];\n var endExtendVec = vec2.scale([0, 0], endVec, scaleRateEnd);\n var controlPoint2 = [center[0] + endExtendVec[0], center[1] + endExtendVec[1]];\n cfg.startPoint = {\n x: startPoint[0],\n y: startPoint[1]\n };\n cfg.endPoint = {\n x: endPoint[0],\n y: endPoint[1]\n };\n cfg.controlPoints = [{\n x: controlPoint1[0],\n y: controlPoint1[1]\n }, {\n x: controlPoint2[0],\n y: controlPoint2[1]\n }];\n return cfg;\n};\n/**\n * 根据 label 所在线条的位置百分比,计算 label 坐标\n * @param {object} pathShape G 的 path 实例,一般是 Edge 实例的 keyShape\n * @param {number} percent 范围 0 - 1 的线条百分比\n * @param {number} refX x 轴正方向为基准的 label 偏移\n * @param {number} refY y 轴正方向为基准的 label 偏移\n * @param {boolean} rotate 是否根据线条斜率旋转文本\n * @return {object} 文本的 x, y, 文本的旋转角度\n */\nexport var getLabelPosition = function getLabelPosition(pathShape, percent, refX, refY, rotate) {\n var TAN_OFFSET = 0.0001;\n var vector = [];\n var point = pathShape === null || pathShape === void 0 ? void 0 : pathShape.getPoint(percent);\n if (!point) {\n return {\n x: 0,\n y: 0,\n angle: 0\n };\n }\n // 头尾最可能,放在最前面,使用 g path 上封装的方法\n if (percent < TAN_OFFSET) {\n vector = pathShape.getStartTangent().reverse();\n } else if (percent > 1 - TAN_OFFSET) {\n vector = pathShape.getEndTangent();\n } else {\n // 否则取指定位置的点,与少量偏移的点,做微分向量\n var offsetPoint = pathShape === null || pathShape === void 0 ? void 0 : pathShape.getPoint(percent + TAN_OFFSET);\n vector.push([point.x, point.y]);\n vector.push([offsetPoint.x, offsetPoint.y]);\n }\n var rad = Math.atan2(vector[1][1] - vector[0][1], vector[1][0] - vector[0][0]);\n if (rad < 0) {\n rad += PI * 2;\n }\n if (refX) {\n point.x += cos(rad) * refX;\n point.y += sin(rad) * refX;\n }\n if (refY) {\n // 默认方向是 x 轴正方向,法线是 求出角度 - 90°\n var normal = rad - PI / 2;\n // 若法线角度在 y 轴负方向,切到正方向,保证 refY 相对于 y 轴正方向\n if (rad > 1 / 2 * PI && rad < 3 * 1 / 2 * PI) {\n normal -= PI;\n }\n point.x += cos(normal) * refY;\n point.y += sin(normal) * refY;\n }\n var result = {\n x: point.x,\n y: point.y,\n angle: rad\n };\n if (rotate) {\n if (rad > 0.5 * PI && rad < 1.5 * PI) {\n rad -= PI;\n }\n return __assign({\n rotate: rad\n }, result);\n }\n return result;\n};\n/**\n * depth first traverse, from root to leaves, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverse = function traverse(data, parent, index, fn) {\n if (fn(data, parent, index) === false) {\n return false;\n }\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverse(data.children[i], data, i, fn)) return false;\n }\n }\n return true;\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseUp = function traverseUp(data, parent, index, fn) {\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverseUp(data.children[i], data, i, fn)) return;\n }\n }\n if (fn(data, parent, index) === false) {\n return false;\n }\n return true;\n};\n/**\n * depth first traverse, from root to leaves, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nexport var traverseTree = function traverseTree(data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverse(data, null, -1, fn);\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nexport var traverseTreeUp = function traverseTreeUp(data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverseUp(data, null, -1, fn);\n};\n/**\n *\n * @param letter the letter\n * @param fontSize\n * @return the letter's width\n */\nexport var getLetterWidth = function getLetterWidth(letter, fontSize) {\n return fontSize * (letterAspectRatio[letter] || 1);\n};\n/**\n *\n * @param text the text\n * @param fontSize\n * @return the text's size\n */\nexport var getTextSize = function getTextSize(text, fontSize) {\n var width = 0;\n var pattern = new RegExp(\"[\\u4E00-\\u9FA5]+\");\n text.split('').forEach(function (letter) {\n if (pattern.test(letter)) {\n // 中文字符\n width += fontSize;\n } else {\n width += getLetterWidth(letter, fontSize);\n }\n });\n return [width, fontSize];\n};\nexport var truncateLabelByLength = function truncateLabelByLength(text, length) {\n if (typeof length !== 'number' || length <= 0 || length >= text.length) {\n return text;\n }\n return text.substring(0, length) + '...';\n};\n/**\n * construct the trees from combos data\n * @param array the combos array\n * @param nodes the nodes array\n * @return the tree\n */\nexport var plainCombosToTrees = function plainCombosToTrees(array, nodes) {\n var result = [];\n var addedMap = {};\n var modelMap = {};\n array.forEach(function (d) {\n modelMap[d.id] = d;\n });\n array.forEach(function (d, i) {\n var cd = clone(d);\n cd.itemType = 'combo';\n cd.children = undefined;\n if (cd.parentId === cd.id) {\n console.warn(\"The parentId for combo \".concat(cd.id, \" can not be the same as the combo's id\"));\n delete cd.parentId;\n } else if (cd.parentId && !modelMap[cd.parentId]) {\n console.warn(\"The parent combo for combo \".concat(cd.id, \" does not exist!\"));\n delete cd.parentId;\n }\n var mappedObj = addedMap[cd.id];\n if (mappedObj) {\n cd.children = mappedObj.children;\n addedMap[cd.id] = cd;\n mappedObj = cd;\n if (!mappedObj.parentId) {\n result.push(mappedObj);\n return;\n }\n var mappedParent = addedMap[mappedObj.parentId];\n if (mappedParent) {\n if (mappedParent.children) mappedParent.children.push(cd);else mappedParent.children = [cd];\n } else {\n var parent_1 = {\n id: mappedObj.parentId,\n children: [mappedObj]\n };\n addedMap[mappedObj.parentId] = parent_1;\n addedMap[cd.id] = cd;\n }\n return;\n }\n if (isString(d.parentId)) {\n var parent_2 = addedMap[d.parentId];\n if (parent_2) {\n if (parent_2.children) parent_2.children.push(cd);else parent_2.children = [cd];\n addedMap[cd.id] = cd;\n } else {\n var pa = {\n id: d.parentId,\n children: [cd]\n };\n addedMap[pa.id] = pa;\n addedMap[cd.id] = cd;\n }\n } else {\n result.push(cd);\n addedMap[cd.id] = cd;\n }\n });\n // proccess the nodes\n var nodeMap = {};\n (nodes || []).forEach(function (node) {\n nodeMap[node.id] = node;\n var combo = addedMap[node.comboId];\n if (combo) {\n var cnode = {\n id: node.id,\n comboId: node.comboId\n };\n if (combo.children) combo.children.push(cnode);else combo.children = [cnode];\n cnode.itemType = 'node';\n addedMap[node.id] = cnode;\n }\n });\n // assign the depth for each element\n var maxDepth = 0;\n result.forEach(function (tree) {\n tree.depth = maxDepth + 10;\n traverseTree(tree, function (child) {\n var parent;\n var itemType = addedMap[child.id].itemType;\n if (itemType === 'node') {\n parent = addedMap[child.comboId];\n } else {\n parent = addedMap[child.parentId];\n }\n if (parent) {\n if (itemType === 'node') child.depth = maxDepth + 1;else child.depth = maxDepth + 10;\n } else {\n child.depth = maxDepth + 10;\n }\n if (maxDepth < child.depth) maxDepth = child.depth;\n var oriNodeModel = nodeMap[child.id];\n if (oriNodeModel) {\n oriNodeModel.depth = child.depth;\n }\n return true;\n });\n });\n return result;\n};\nexport var reconstructTree = function reconstructTree(trees, subtreeId, newParentId) {\n var _a;\n var brothers = trees;\n var subtree;\n var comboChildsMap = {\n root: {\n children: trees\n }\n };\n var foundSubTree = false;\n var oldParentId = 'root';\n (trees || []).forEach(function (tree) {\n if (foundSubTree) return;\n if (tree.id === subtreeId) {\n subtree = tree;\n if (tree.itemType === 'combo') {\n subtree.parentId = newParentId;\n } else {\n subtree.comboId = newParentId;\n }\n foundSubTree = true;\n return;\n }\n traverseTree(tree, function (child) {\n var _a;\n comboChildsMap[child.id] = {\n children: (child === null || child === void 0 ? void 0 : child.children) || []\n };\n // store the old parent id to delete the subtree from the old parent's children in next recursion\n brothers = (_a = comboChildsMap[child.parentId || child.comboId || 'root']) === null || _a === void 0 ? void 0 : _a.children;\n if (child && (child.removed || subtreeId === child.id) && brothers) {\n oldParentId = child.parentId || child.comboId || 'root';\n subtree = child;\n // re-assign the parentId or comboId for the moved subtree\n if (child.itemType === 'combo') {\n subtree.parentId = newParentId;\n } else {\n subtree.comboId = newParentId;\n }\n foundSubTree = true;\n return false;\n }\n return true;\n });\n });\n brothers = (_a = comboChildsMap[oldParentId]) === null || _a === void 0 ? void 0 : _a.children;\n var index = brothers ? brothers.indexOf(subtree) : -1;\n if (index > -1) brothers.splice(index, 1);\n // 如果遍历完整棵树还没有找到,说明之前就不在树中\n if (!foundSubTree) {\n subtree = {\n id: subtreeId,\n itemType: 'node',\n comboId: newParentId\n };\n comboChildsMap[subtreeId] = {\n children: undefined\n };\n }\n // append to new parent\n if (subtreeId) {\n var found_1 = false;\n // newParentId is undefined means the subtree will have no parent\n if (newParentId) {\n var newParentDepth_1 = 0;\n (trees || []).forEach(function (tree) {\n if (found_1) return; // terminate\n traverseTree(tree, function (child) {\n // append subtree to the new parent ans assign the depth to the subtree\n if (newParentId === child.id) {\n found_1 = true;\n if (child.children) child.children.push(subtree);else child.children = [subtree];\n newParentDepth_1 = child.depth;\n if (subtree.itemType === 'node') subtree.depth = newParentDepth_1 + 2;else subtree.depth = newParentDepth_1 + 1;\n return false; // terminate\n }\n\n return true;\n });\n });\n } else if ((!newParentId || !found_1) && subtree.itemType !== 'node') {\n // if the newParentId is undefined or it is not found in the tree, add the subTree to the root\n trees.push(subtree);\n }\n // update the depth of the subtree and its children from the subtree\n var currentDepth_1 = subtree.depth;\n traverseTree(subtree, function (child) {\n if (child.itemType === 'node') currentDepth_1 += 2;else currentDepth_1 += 1;\n child.depth = currentDepth_1;\n return true;\n });\n }\n return trees;\n};\nexport var getComboBBox = function getComboBBox(children, graph, combo) {\n var comboBBox = {\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity,\n x: undefined,\n y: undefined,\n width: undefined,\n height: undefined,\n centerX: undefined,\n centerY: undefined\n };\n if (!children || children.length === 0) {\n var comboModel = combo === null || combo === void 0 ? void 0 : combo.getModel();\n var _a = comboModel || {},\n x = _a.x,\n y = _a.y,\n fixSize = _a.fixSize,\n collapsed = _a.collapsed,\n fixCollapseSize = _a.fixCollapseSize;\n var useFixSize = collapsed ? fixCollapseSize : fixSize;\n var _b = isArray(useFixSize) ? useFixSize : [useFixSize, useFixSize],\n width = _b[0],\n height = _b[1];\n var halfSize = [width / 2, height / 2];\n return {\n minX: x - halfSize[0],\n minY: y - halfSize[1],\n maxX: x + halfSize[0],\n maxY: y + halfSize[1],\n x: x,\n y: y,\n width: width,\n height: height\n };\n }\n children.forEach(function (child) {\n var childItem = graph.findById(child.id);\n if (!childItem || !childItem.isVisible()) return; // ignore hidden children\n childItem.set('bboxCanvasCache', undefined);\n var childBBox = childItem.getCanvasBBox();\n if (childBBox.x && comboBBox.minX > childBBox.minX) comboBBox.minX = childBBox.minX;\n if (childBBox.y && comboBBox.minY > childBBox.minY) comboBBox.minY = childBBox.minY;\n if (childBBox.x && comboBBox.maxX < childBBox.maxX) comboBBox.maxX = childBBox.maxX;\n if (childBBox.y && comboBBox.maxY < childBBox.maxY) comboBBox.maxY = childBBox.maxY;\n });\n comboBBox.x = (comboBBox.minX + comboBBox.maxX) / 2;\n comboBBox.y = (comboBBox.minY + comboBBox.maxY) / 2;\n comboBBox.width = comboBBox.maxX - comboBBox.minX;\n comboBBox.height = comboBBox.maxY - comboBBox.minY;\n comboBBox.centerX = (comboBBox.minX + comboBBox.maxX) / 2;\n comboBBox.centerY = (comboBBox.minY + comboBBox.maxY) / 2;\n // if it is a circle combo, diagnal length of the children's bbox should be the diameter of the combo's bbox\n if ((combo === null || combo === void 0 ? void 0 : combo.getKeyShape().get('type')) === 'circle') {\n comboBBox.width = Math.hypot(comboBBox.height, comboBBox.width);\n comboBBox.height = comboBBox.width;\n }\n Object.keys(comboBBox).forEach(function (key) {\n if (comboBBox[key] === Infinity || comboBBox[key] === -Infinity) {\n comboBBox[key] = undefined;\n }\n });\n return comboBBox;\n};\nexport var shouldRefreshEdge = function shouldRefreshEdge(cfg) {\n var refreshEdge = isNumber(cfg.x) || isNumber(cfg.y) || cfg.type || cfg.anchorPoints || cfg.size;\n if (cfg.style) refreshEdge = refreshEdge || isNumber(cfg.style.r) || isNumber(cfg.style.width) || isNumber(cfg.style.height) || isNumber(cfg.style.rx) || isNumber(cfg.style.ry);\n return refreshEdge;\n};\nexport var cloneBesidesImg = function cloneBesidesImg(obj) {\n var clonedObj = {};\n Object.keys(obj).forEach(function (key1) {\n var obj2 = obj[key1];\n if (key1 === 'img' && !isString(obj2)) return;\n if (isObject(obj2) && !isArray(obj2)) {\n var clonedObj2_1 = {};\n Object.keys(obj2).forEach(function (key2) {\n var v = obj2[key2];\n if (key2 === 'img' && !isString(v)) return;\n clonedObj2_1[key2] = clone(v);\n });\n clonedObj[key1] = clonedObj2_1;\n } else {\n clonedObj[key1] = clone(obj2);\n }\n });\n return clonedObj;\n};\nexport var getAnimateCfgWithCallback = function getAnimateCfgWithCallback(_a) {\n var animateCfg = _a.animateCfg,\n callback = _a.callback;\n var animateConfig;\n if (!animateCfg) {\n animateConfig = {\n duration: 500,\n callback: callback\n };\n } else {\n animateConfig = clone(animateCfg);\n if (animateCfg.callback) {\n var animateCfgCallback_1 = animateCfg.callback;\n animateConfig.callback = function () {\n callback();\n animateCfgCallback_1();\n };\n } else {\n animateConfig.callback = callback;\n }\n }\n return animateConfig;\n};","import { __spreadArray } from \"tslib\";\nimport { isString } from '@antv/util';\nimport { traverseTree } from './graphic';\n/**\n * 验证关系图或树图数据的合法性,必须符合以下规则才会渲染图:\n * 1. 必须传入数据\n * 2. 节点的 ID 必须为字符串,暂不支持数字类型,如果支持数字类型,会出现类似 123 与 '123' 是否相等的问题\n * 3. 边的 source 和 target 值必须在节点 ID 中存在\n * @param data 关系图或树图数据\n * @return boolean 全部验证通过返回 true,否则返回 false\n */\nexport var dataValidation = function dataValidation(data) {\n // 1. 必须传入数据\n if (!data) {\n console.error('G6 Error Tips: the data must be defined');\n return false;\n }\n // 2. 节点的 ID 必须为字符串或数字类型\n var nodes = data.nodes,\n edges = data.edges,\n _a = data.combos,\n combos = _a === void 0 ? [] : _a;\n if (!nodes && !edges) {\n var validated_1 = true;\n // 不存在 nodes 和 edges,则说明是 TreeGraphData,按 TreeGraphData 规则验证\n traverseTree(data, function (param) {\n if (!isString(param.id)) {\n validated_1 = false;\n return false;\n }\n return true;\n });\n return validated_1;\n }\n var nonNode = (nodes || []).find(function (node) {\n return !isString(node.id);\n });\n if (nonNode) {\n console.warn(\"G6 Warning Tips: missing 'id' property, or %c\".concat(nonNode.id, \"%c is not a string.\"), 'font-size: 20px; color: red;', '');\n return false;\n }\n // 3. 边的 source 和 target 必须存在于节点 或 Combo中\n var nodeIds = (nodes || []).map(function (node) {\n return node.id;\n });\n var comboIds = combos === null || combos === void 0 ? void 0 : combos.map(function (combo) {\n return combo.id;\n });\n var ids = __spreadArray(__spreadArray([], nodeIds, true), comboIds, true);\n var nonEdges = (edges || []).find(function (edge) {\n return !ids.includes(edge.source) || !ids.includes(edge.target);\n });\n if (nonEdges) {\n console.warn(\"G6 Warning Tips: The source %c\".concat(nonEdges.source, \"%c or the target %c\").concat(nonEdges.target, \"%c of the edge do not exist in the nodes or combos.\"), 'font-size: 20px; color: red;', '', 'font-size: 20px; color: red;', '');\n return false;\n }\n return true;\n};\n/**\n * 验证添加节点、边或从combo时的数据\n * @param type 节点、边或从combo\n * @param data 添加的单条数据\n * @return boolean 全部验证通过返回 true,否则返回 false\n */\nexport var singleDataValidation = function singleDataValidation(type, data) {\n if (type === 'node' || type === 'combo') {\n // 必须有 id 字段,且id必须为字符串类型\n if (data.id && !isString(data.id)) {\n console.warn(\"G6 Warning Tips: missing 'id' property, or the 'id' %c\".concat(data.id, \"%c is not a string.\"), 'font-size: 20px; color: red;', '');\n return false;\n }\n } else if (type === 'edge') {\n // 必须有 source 和 target 字段\n if (!data.source || !data.target) {\n console.warn(\"G6 Warning Tips: missing 'source' or 'target' for the edge.\");\n return false;\n }\n }\n return true;\n};","import { each, isArray, isString } from '@antv/util';\nimport Behavior from '../../behavior/behavior';\nvar ModeController = /** @class */function () {\n function ModeController(graph) {\n this.graph = graph;\n this.destroyed = false;\n this.modes = graph.get('modes') || {\n default: []\n };\n this.formatModes();\n this.mode = graph.get('defaultMode') || 'default';\n this.currentBehaves = [];\n this.setMode(this.mode);\n }\n ModeController.prototype.formatModes = function () {\n var modes = this.modes;\n each(modes, function (mode) {\n each(mode, function (behavior, i) {\n if (isString(behavior)) {\n mode[i] = {\n type: behavior\n };\n }\n });\n });\n };\n ModeController.prototype.setBehaviors = function (mode) {\n var graph = this.graph;\n var behaviors = this.modes[mode];\n var behaves = [];\n var behave;\n each(behaviors || [], function (behavior) {\n var BehaviorInstance = Behavior.getBehavior(behavior.type || behavior);\n if (!BehaviorInstance) {\n return;\n }\n behave = new BehaviorInstance(behavior);\n if (behave) {\n behave.bind(graph);\n behaves.push(behave);\n }\n });\n this.currentBehaves = behaves;\n };\n ModeController.mergeBehaviors = function (modeBehaviors, behaviors) {\n each(behaviors, function (behavior) {\n if (modeBehaviors.indexOf(behavior) < 0) {\n if (isString(behavior)) {\n behavior = {\n type: behavior\n };\n }\n modeBehaviors.push(behavior);\n }\n });\n return modeBehaviors;\n };\n ModeController.filterBehaviors = function (modeBehaviors, behaviors) {\n var result = [];\n modeBehaviors.forEach(function (behavior) {\n var type = '';\n if (isString(behavior)) {\n type = behavior;\n } else {\n // eslint-disable-next-line prefer-destructuring\n type = behavior.type;\n }\n if (behaviors.indexOf(type) < 0) {\n result.push(behavior);\n }\n });\n return result;\n };\n ModeController.prototype.setMode = function (mode) {\n var _a = this,\n modes = _a.modes,\n graph = _a.graph;\n var current = mode;\n var behaviors = modes[current];\n if (!behaviors) {\n return;\n }\n graph.emit('beforemodechange', {\n mode: mode\n });\n each(this.currentBehaves, function (behave) {\n if (behave.delegate) behave.delegate.remove();\n behave.unbind(graph);\n });\n this.setBehaviors(current);\n graph.emit('aftermodechange', {\n mode: mode\n });\n this.mode = mode;\n };\n ModeController.prototype.getMode = function () {\n return this.mode;\n };\n /**\n * 动态增加或删除 Behavior\n *\n * @param {ModeType[]} behaviors\n * @param {(ModeType[] | ModeType)} modes\n * @param {boolean} isAdd\n * @returns {Mode}\n * @memberof Mode\n */\n ModeController.prototype.manipulateBehaviors = function (behaviors, modes, isAdd) {\n var _this = this;\n var behaves;\n if (!isArray(behaviors)) {\n behaves = [behaviors];\n } else {\n behaves = behaviors;\n }\n if (isArray(modes)) {\n each(modes, function (mode) {\n if (!_this.modes[mode]) {\n if (isAdd) {\n _this.modes[mode] = behaves;\n }\n } else if (isAdd) {\n _this.modes[mode] = ModeController.mergeBehaviors(_this.modes[mode] || [], behaves);\n } else {\n _this.modes[mode] = ModeController.filterBehaviors(_this.modes[mode] || [], behaves);\n }\n });\n return this;\n }\n var currentMode = modes;\n if (!modes) {\n currentMode = this.mode; // isString(this.mode) ? this.mode : this.mode.type\n }\n\n if (!this.modes[currentMode]) {\n if (isAdd) {\n this.modes[currentMode] = behaves;\n }\n }\n if (isAdd) {\n this.modes[currentMode] = ModeController.mergeBehaviors(this.modes[currentMode] || [], behaves);\n } else {\n this.modes[currentMode] = ModeController.filterBehaviors(this.modes[currentMode] || [], behaves);\n }\n this.formatModes();\n this.setMode(this.mode);\n return this;\n };\n /**\n * 更新行为参数\n * @param {string | ModeOption | ModeType} behavior 需要更新的行为\n * @param {string | string[]} modes 指定的模式中的行为,不指定则为 default\n * @return {Graph} Graph\n */\n ModeController.prototype.updateBehavior = function (behavior, newCfg, mode) {\n if (isString(behavior)) {\n behavior = {\n type: behavior\n };\n }\n var behaviorSet = [];\n if (!mode || mode === this.mode || mode === 'default') {\n behaviorSet = this.currentBehaves;\n if (!behaviorSet || !behaviorSet.length) {\n console.warn('Update behavior failed! There is no behaviors in this mode on the graph.');\n return this;\n }\n var length_1 = behaviorSet.length;\n for (var i = 0; i < length_1; i++) {\n var behave = behaviorSet[i];\n if (behave.type === behavior.type) {\n behave.updateCfg(newCfg);\n return this;\n }\n if (i === length_1 - 1) console.warn('Update behavior failed! There is no such behavior in the mode');\n }\n } else {\n behaviorSet = this.modes[mode];\n if (!behaviorSet || !behaviorSet.length) {\n console.warn('Update behavior failed! There is no behaviors in this mode on the graph.');\n return this;\n }\n var length_2 = behaviorSet.length;\n for (var i = 0; i < length_2; i++) {\n var behave = behaviorSet[i];\n if (behave.type === behavior.type || behave === behavior.type) {\n if (behave === behavior.type) behave = {\n type: behave\n };\n Object.assign(behave, newCfg);\n behaviorSet[i] = behave;\n return this;\n }\n if (i === length_2 - 1) console.warn('Update behavior failed! There is no such behavior in the mode');\n }\n }\n return this;\n };\n ModeController.prototype.destroy = function () {\n this.graph = null;\n this.modes = null;\n this.currentBehaves = null;\n this.destroyed = true;\n };\n return ModeController;\n}();\nexport default ModeController;","import { each, isArray } from '@antv/util';\nvar SPACES = '\\x09\\x0a\\x0b\\x0c\\x0d\\x20\\xa0\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u2028\\u2029';\nvar PATH_COMMAND = new RegExp(\"([a-z])[\" + SPACES + \",]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\" + SPACES + \"]*,?[\" + SPACES + \"]*)+)\", 'ig');\nvar PATH_VALUES = new RegExp(\"(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[\" + SPACES + \"]*,?[\" + SPACES + \"]*\", 'ig');\n// Parse given path string into an array of arrays of path segments\nvar parsePathString = function (pathString) {\n if (!pathString) {\n return null;\n }\n if (isArray(pathString)) {\n return pathString;\n }\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0,\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n if (name === 'r') {\n data.push([b].concat(params));\n }\n else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n return pathString;\n });\n return data;\n};\n// http://schepers.cc/getting-to-the-point\nvar catmullRomToBezier = function (crp, z) {\n var d = [];\n // @ts-ignore\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [\n {\n x: +crp[i - 2],\n y: +crp[i - 1],\n },\n {\n x: +crp[i],\n y: +crp[i + 1],\n },\n {\n x: +crp[i + 2],\n y: +crp[i + 3],\n },\n {\n x: +crp[i + 4],\n y: +crp[i + 5],\n },\n ];\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1],\n };\n }\n else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1],\n };\n }\n else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1],\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3],\n };\n }\n }\n else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n }\n else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1],\n };\n }\n }\n d.push([\n 'C',\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\n (p[1].y + 6 * p[2].y - p[3].y) / 6,\n p[2].x,\n p[2].y,\n ]);\n }\n return d;\n};\nvar ellipsePath = function (x, y, rx, ry, a) {\n var res = [];\n if (a === null && ry === null) {\n ry = rx;\n }\n x = +x;\n y = +y;\n rx = +rx;\n ry = +ry;\n if (a !== null) {\n var rad = Math.PI / 180;\n var x1 = x + rx * Math.cos(-ry * rad);\n var x2 = x + rx * Math.cos(-a * rad);\n var y1 = y + rx * Math.sin(-ry * rad);\n var y2 = y + rx * Math.sin(-a * rad);\n res = [\n ['M', x1, y1],\n ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2],\n ];\n }\n else {\n res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']];\n }\n return res;\n};\nvar pathToAbsolute = function (pathArray) {\n pathArray = parsePathString(pathArray);\n if (!pathArray || !pathArray.length) {\n return [['M', 0, 0]];\n }\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n var crz = pathArray.length === 3 &&\n pathArray[0][0] === 'M' &&\n pathArray[1][0].toUpperCase() === 'R' &&\n pathArray[2][0].toUpperCase() === 'Z';\n for (var r = void 0, pa = void 0, i = start, ii = pathArray.length; i < ii; i++) {\n res.push((r = []));\n pa = pathArray[i];\n pa0 = pa[0];\n if (pa0 !== pa0.toUpperCase()) {\n r[0] = pa0.toUpperCase();\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n case 'V':\n r[1] = +pa[1] + y;\n break;\n case 'H':\n r[1] = +pa[1] + x;\n break;\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n res.pop();\n res = res.concat(catmullRomToBezier(dots, crz));\n break;\n case 'O':\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n break;\n case 'U':\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n break;\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break; // for lint\n default:\n for (var j = 1, jj = pa.length; j < jj; j++) {\n r[j] = +pa[j] + (j % 2 ? x : y);\n }\n }\n }\n else if (pa0 === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRomToBezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n }\n else if (pa0 === 'O') {\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n }\n else if (pa0 === 'U') {\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n }\n else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n pa0 = pa0.toUpperCase();\n if (pa0 !== 'O') {\n switch (r[0]) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n case 'H':\n x = r[1];\n break;\n case 'V':\n y = r[1];\n break;\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break; // for lint\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n }\n return res;\n};\nvar l2c = function (x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n};\nvar q2c = function (x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3;\n var _23 = 2 / 3;\n return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2];\n};\nvar a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n // for more information of where this math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n if (rx === ry) {\n rx += 1;\n }\n var _120 = (Math.PI * 120) / 180;\n var rad = (Math.PI / 180) * (+angle || 0);\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n var rotate = function (x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return {\n x: X,\n y: Y,\n };\n };\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n if (x1 === x2 && y1 === y2) {\n // 若弧的起始点和终点重叠则错开一点\n x2 += 1;\n y2 += 1;\n }\n // const cos = Math.cos(Math.PI / 180 * angle);\n // const sin = Math.sin(Math.PI / 180 * angle);\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (large_arc_flag === sweep_flag ? -1 : 1) *\n Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = (k * rx * y) / ry + (x1 + x2) / 2;\n cy = (k * -ry * x) / rx + (y1 + y2) / 2;\n // @ts-ignore\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n // @ts-ignore\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n f1 < 0 && (f1 = Math.PI * 2 + f1);\n f2 < 0 && (f2 = Math.PI * 2 + f2);\n if (sweep_flag && f1 > f2) {\n f1 = f1 - Math.PI * 2;\n }\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - Math.PI * 2;\n }\n }\n else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n var df = f2 - f1;\n if (Math.abs(df) > _120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\n }\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = (4 / 3) * rx * t;\n var hy = (4 / 3) * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return [m2, m3, m4].concat(res);\n }\n res = [m2, m3, m4].concat(res).join().split(',');\n var newres = [];\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\n }\n return newres;\n};\nvar pathToCurve = function (path, path2) {\n var p = pathToAbsolute(path);\n var p2 = path2 && pathToAbsolute(path2);\n var attrs = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null,\n };\n var attrs2 = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null,\n };\n var pcoms1 = []; // path commands of original path p\n var pcoms2 = []; // path commands of original path p2\n var pfirst = ''; // temporary holder for original path command\n var pcom = ''; // holder for previous path command of original path\n var ii;\n var processPath = function (path, d, pcom) {\n var nx;\n var ny;\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n !(path[0] in\n {\n T: 1,\n Q: 1,\n }) && (d.qx = d.qy = null);\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n // In \"S\" case we have to take into account, if the previous command is C/S.\n nx = d.x * 2 - d.bx; // And reflect the previous\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\n }\n else {\n // or some else or nothing\n nx = d.x;\n ny = d.y;\n }\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n // In \"T\" case we have to take into account, if the previous command is Q/T.\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\n d.qy = d.y * 2 - d.qy; // to case \"S\".\n }\n else {\n // or something else or nothing\n d.qx = d.x;\n d.qy = d.y;\n }\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\n break;\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n default:\n break;\n }\n return path;\n };\n var fixArc = function (pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n while (pi.length) {\n pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved\n p2 && (pcoms2[i] = 'A'); // the same as above\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n pp.splice(i, 1);\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n };\n var fixM = function (path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n };\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n for (var i = 0; i < ii; i++) {\n p[i] && (pfirst = p[i][0]); // save current path command\n if (pfirst !== 'C') {\n // C is not saved yet, because it may be result of conversion\n pcoms1[i] = pfirst; // Save current path command\n i && (pcom = pcoms1[i - 1]); // Get previous path command pcom\n }\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\n if (pcoms1[i] !== 'A' && pfirst === 'C')\n pcoms1[i] = 'C'; // A is the only command\n // which may produce multiple C:s\n // so we have to make sure that C is also C in original path\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n if (p2) {\n // the same procedures is done to p2\n p2[i] && (pfirst = p2[i][0]);\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n i && (pcom = pcoms2[i - 1]);\n }\n p2[i] = processPath(p2[i], attrs2, pcom);\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n fixArc(p2, i);\n }\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i];\n var seg2 = p2 && p2[i];\n var seglen = seg.length;\n var seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n return p2 ? [p, p2] : p;\n};\nvar p2s = /,?([a-z]),?/gi;\nvar parsePathArray = function (path) {\n return path.join(',').replace(p2s, '$1');\n};\nvar base3 = function (t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n};\nvar bezlen = function (x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (z === null) {\n z = 1;\n }\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [\n -0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816,\n ];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n return z2 * sum;\n};\nvar curveDim = function (x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [];\n var bounds = [[], []];\n var a;\n var b;\n var c;\n var t;\n for (var i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n }\n else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (t > 0 && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n var b2ac = b * b - 4 * c * a;\n var sqrtb2ac = Math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n var t1 = (-b + sqrtb2ac) / (2 * a);\n if (t1 > 0 && t1 < 1) {\n tvalues.push(t1);\n }\n var t2 = (-b - sqrtb2ac) / (2 * a);\n if (t2 > 0 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n var j = tvalues.length;\n var jlen = j;\n var mt;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return {\n min: {\n x: Math.min.apply(0, bounds[0]),\n y: Math.min.apply(0, bounds[1]),\n },\n max: {\n x: Math.max.apply(0, bounds[0]),\n y: Math.max.apply(0, bounds[1]),\n },\n };\n};\nvar intersect = function (x1, y1, x2, y2, x3, y3, x4, y4) {\n if (Math.max(x1, x2) < Math.min(x3, x4) ||\n Math.min(x1, x2) > Math.max(x3, x4) ||\n Math.max(y1, y2) < Math.min(y3, y4) ||\n Math.min(y1, y2) > Math.max(y3, y4)) {\n return;\n }\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4);\n var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4);\n var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n if (!denominator) {\n return;\n }\n var px = nx / denominator;\n var py = ny / denominator;\n var px2 = +px.toFixed(2);\n var py2 = +py.toFixed(2);\n if (px2 < +Math.min(x1, x2).toFixed(2) ||\n px2 > +Math.max(x1, x2).toFixed(2) ||\n px2 < +Math.min(x3, x4).toFixed(2) ||\n px2 > +Math.max(x3, x4).toFixed(2) ||\n py2 < +Math.min(y1, y2).toFixed(2) ||\n py2 > +Math.max(y1, y2).toFixed(2) ||\n py2 < +Math.min(y3, y4).toFixed(2) ||\n py2 > +Math.max(y3, y4).toFixed(2)) {\n return;\n }\n return {\n x: px,\n y: py,\n };\n};\nvar isPointInsideBBox = function (bbox, x, y) {\n return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;\n};\nvar rectPath = function (x, y, w, h, r) {\n if (r) {\n return [\n ['M', +x + +r, y],\n ['l', w - r * 2, 0],\n ['a', r, r, 0, 0, 1, r, r],\n ['l', 0, h - r * 2],\n ['a', r, r, 0, 0, 1, -r, r],\n ['l', r * 2 - w, 0],\n ['a', r, r, 0, 0, 1, -r, -r],\n ['l', 0, r * 2 - h],\n ['a', r, r, 0, 0, 1, r, -r],\n ['z'],\n ];\n }\n var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];\n // @ts-ignore\n res.parsePathArray = parsePathArray;\n return res;\n};\nvar box = function (x, y, width, height) {\n if (x === null) {\n x = y = width = height = 0;\n }\n if (y === null) {\n y = x.y;\n width = x.width;\n height = x.height;\n x = x.x;\n }\n return {\n x: x,\n y: y,\n width: width,\n w: width,\n height: height,\n h: height,\n x2: x + width,\n y2: y + height,\n cx: x + width / 2,\n cy: y + height / 2,\n r1: Math.min(width, height) / 2,\n r2: Math.max(width, height) / 2,\n r0: Math.sqrt(width * width + height * height) / 2,\n path: rectPath(x, y, width, height),\n vb: [x, y, width, height].join(' '),\n };\n};\nvar isBBoxIntersect = function (bbox1, bbox2) {\n bbox1 = box(bbox1);\n bbox2 = box(bbox2);\n return (isPointInsideBBox(bbox2, bbox1.x, bbox1.y) ||\n isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) ||\n isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) ||\n isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) ||\n isPointInsideBBox(bbox1, bbox2.x, bbox2.y) ||\n isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) ||\n isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) ||\n isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) ||\n (((bbox1.x < bbox2.x2 && bbox1.x > bbox2.x) || (bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)) &&\n ((bbox1.y < bbox2.y2 && bbox1.y > bbox2.y) || (bbox2.y < bbox1.y2 && bbox2.y > bbox1.y))));\n};\nvar bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\n if (!isArray(p1x)) {\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\n }\n var bbox = curveDim.apply(null, p1x);\n return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y);\n};\nvar findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t;\n var t13 = Math.pow(t1, 3);\n var t12 = Math.pow(t1, 2);\n var t2 = t * t;\n var t3 = t2 * t;\n var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x;\n var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y;\n var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x);\n var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y);\n var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x);\n var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y);\n var ax = t1 * p1x + t * c1x;\n var ay = t1 * p1y + t * c1y;\n var cx = t1 * c2x + t * p2x;\n var cy = t1 * c2y + t * p2y;\n var alpha = 90 - (Math.atan2(mx - nx, my - ny) * 180) / Math.PI;\n // (mx > nx || my < ny) && (alpha += 180);\n return {\n x: x,\n y: y,\n m: {\n x: mx,\n y: my,\n },\n n: {\n x: nx,\n y: ny,\n },\n start: {\n x: ax,\n y: ay,\n },\n end: {\n x: cx,\n y: cy,\n },\n alpha: alpha,\n };\n};\nvar interHelper = function (bez1, bez2, justCount) {\n var bbox1 = bezierBBox(bez1);\n var bbox2 = bezierBBox(bez2);\n if (!isBBoxIntersect(bbox1, bbox2)) {\n return justCount ? 0 : [];\n }\n var l1 = bezlen.apply(0, bez1);\n var l2 = bezlen.apply(0, bez2);\n var n1 = ~~(l1 / 8);\n var n2 = ~~(l2 / 8);\n var dots1 = [];\n var dots2 = [];\n var xy = {};\n var res = justCount ? 0 : [];\n for (var i = 0; i < n1 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez1.concat(i / n1));\n dots1.push({\n x: d.x,\n y: d.y,\n t: i / n1,\n });\n }\n for (var i = 0; i < n2 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez2.concat(i / n2));\n dots2.push({\n x: d.x,\n y: d.y,\n t: i / n2,\n });\n }\n for (var i = 0; i < n1; i++) {\n for (var j = 0; j < n2; j++) {\n var di = dots1[i];\n var di1 = dots1[i + 1];\n var dj = dots2[j];\n var dj1 = dots2[j + 1];\n var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x';\n var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x';\n var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\n if (is) {\n if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) {\n continue;\n }\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\n var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t);\n var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\n if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) {\n if (justCount) {\n // @ts-ignore\n res += 1;\n }\n else {\n // @ts-ignore\n res.push({\n x: is.x,\n y: is.y,\n t1: t1,\n t2: t2,\n });\n }\n }\n }\n }\n }\n return res;\n};\nvar interPathHelper = function (path1, path2, justCount) {\n path1 = pathToCurve(path1);\n path2 = pathToCurve(path2);\n var x1;\n var y1;\n var x2;\n var y2;\n var x1m;\n var y1m;\n var x2m;\n var y2m;\n var bez1;\n var bez2;\n var res = justCount ? 0 : [];\n for (var i = 0, ii = path1.length; i < ii; i++) {\n var pi = path1[i];\n if (pi[0] === 'M') {\n x1 = x1m = pi[1];\n y1 = y1m = pi[2];\n }\n else {\n if (pi[0] === 'C') {\n bez1 = [x1, y1].concat(pi.slice(1));\n x1 = bez1[6];\n y1 = bez1[7];\n }\n else {\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\n x1 = x1m;\n y1 = y1m;\n }\n for (var j = 0, jj = path2.length; j < jj; j++) {\n var pj = path2[j];\n if (pj[0] === 'M') {\n x2 = x2m = pj[1];\n y2 = y2m = pj[2];\n }\n else {\n if (pj[0] === 'C') {\n bez2 = [x2, y2].concat(pj.slice(1));\n x2 = bez2[6];\n y2 = bez2[7];\n }\n else {\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\n x2 = x2m;\n y2 = y2m;\n }\n var intr = interHelper(bez1, bez2, justCount);\n if (justCount) {\n // @ts-ignore\n res += intr;\n }\n else {\n // @ts-ignore\n for (var k = 0, kk = intr.length; k < kk; k++) {\n intr[k].segment1 = i;\n intr[k].segment2 = j;\n intr[k].bez1 = bez1;\n intr[k].bez2 = bez2;\n }\n // @ts-ignore\n res = res.concat(intr);\n }\n }\n }\n }\n }\n return res;\n};\nvar intersection = function (path1, path2) {\n return interPathHelper(path1, path2);\n};\nfunction decasteljau(points, t) {\n var left = [];\n var right = [];\n function recurse(points, t) {\n if (points.length === 1) {\n left.push(points[0]);\n right.push(points[0]);\n }\n else {\n var middlePoints = [];\n for (var i = 0; i < points.length - 1; i++) {\n if (i === 0) {\n left.push(points[0]);\n }\n if (i === points.length - 2) {\n right.push(points[i + 1]);\n }\n middlePoints[i] = [\n (1 - t) * points[i][0] + t * points[i + 1][0],\n (1 - t) * points[i][1] + t * points[i + 1][1],\n ];\n }\n recurse(middlePoints, t);\n }\n }\n if (points.length) {\n recurse(points, t);\n }\n return { left: left, right: right.reverse() };\n}\nfunction splitCurve(start, end, count) {\n var points = [[start[1], start[2]]];\n count = count || 2;\n var segments = [];\n if (end[0] === 'A') {\n points.push(end[6]);\n points.push(end[7]);\n }\n else if (end[0] === 'C') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n points.push([end[5], end[6]]);\n }\n else if (end[0] === 'S' || end[0] === 'Q') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n }\n else {\n points.push([end[1], end[2]]);\n }\n var leftSegments = points;\n var t = 1 / count;\n for (var i = 0; i < count - 1; i++) {\n var rt = t / (1 - t * i);\n var split = decasteljau(leftSegments, rt);\n segments.push(split.left);\n leftSegments = split.right;\n }\n segments.push(leftSegments);\n var result = segments.map(function (segment) {\n var cmd = [];\n if (segment.length === 4) {\n cmd.push('C');\n cmd = cmd.concat(segment[2]);\n }\n if (segment.length >= 3) {\n if (segment.length === 3) {\n cmd.push('Q');\n }\n cmd = cmd.concat(segment[1]);\n }\n if (segment.length === 2) {\n cmd.push('L');\n }\n cmd = cmd.concat(segment[segment.length - 1]);\n return cmd;\n });\n return result;\n}\nvar splitSegment = function (start, end, count) {\n if (count === 1) {\n return [[].concat(start)];\n }\n var segments = [];\n if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') {\n segments = segments.concat(splitCurve(start, end, count));\n }\n else {\n var temp = [].concat(start);\n if (temp[0] === 'M') {\n temp[0] = 'L';\n }\n for (var i = 0; i <= count - 1; i++) {\n segments.push(temp);\n }\n }\n return segments;\n};\nvar fillPath = function (source, target) {\n if (source.length === 1) {\n return source;\n }\n var sourceLen = source.length - 1;\n var targetLen = target.length - 1;\n var ratio = sourceLen / targetLen;\n var segmentsToFill = [];\n if (source.length === 1 && source[0][0] === 'M') {\n for (var i = 0; i < targetLen - sourceLen; i++) {\n source.push(source[0]);\n }\n return source;\n }\n for (var i = 0; i < targetLen; i++) {\n var index = Math.floor(ratio * i);\n segmentsToFill[index] = (segmentsToFill[index] || 0) + 1;\n }\n var filled = segmentsToFill.reduce(function (filled, count, i) {\n if (i === sourceLen) {\n return filled.concat(source[sourceLen]);\n }\n return filled.concat(splitSegment(source[i], source[i + 1], count));\n }, []);\n filled.unshift(source[0]);\n if (target[targetLen] === 'Z' || target[targetLen] === 'z') {\n filled.push('Z');\n }\n return filled;\n};\nvar isEqual = function (obj1, obj2) {\n if (obj1.length !== obj2.length) {\n return false;\n }\n var result = true;\n each(obj1, function (item, i) {\n if (item !== obj2[i]) {\n result = false;\n return false;\n }\n });\n return result;\n};\nfunction getMinDiff(del, add, modify) {\n var type = null;\n var min = modify;\n if (add < min) {\n min = add;\n type = 'add';\n }\n if (del < min) {\n min = del;\n type = 'del';\n }\n return {\n type: type,\n min: min,\n };\n}\n/*\n * https://en.wikipedia.org/wiki/Levenshtein_distance\n * 计算两条path的编辑距离\n */\nvar levenshteinDistance = function (source, target) {\n var sourceLen = source.length;\n var targetLen = target.length;\n var sourceSegment;\n var targetSegment;\n var temp = 0;\n if (sourceLen === 0 || targetLen === 0) {\n return null;\n }\n var dist = [];\n for (var i = 0; i <= sourceLen; i++) {\n dist[i] = [];\n dist[i][0] = { min: i };\n }\n for (var j = 0; j <= targetLen; j++) {\n dist[0][j] = { min: j };\n }\n for (var i = 1; i <= sourceLen; i++) {\n sourceSegment = source[i - 1];\n for (var j = 1; j <= targetLen; j++) {\n targetSegment = target[j - 1];\n if (isEqual(sourceSegment, targetSegment)) {\n temp = 0;\n }\n else {\n temp = 1;\n }\n var del = dist[i - 1][j].min + 1;\n var add = dist[i][j - 1].min + 1;\n var modify = dist[i - 1][j - 1].min + temp;\n dist[i][j] = getMinDiff(del, add, modify);\n }\n }\n return dist;\n};\nvar fillPathByDiff = function (source, target) {\n var diffMatrix = levenshteinDistance(source, target);\n var sourceLen = source.length;\n var targetLen = target.length;\n var changes = [];\n var index = 1;\n var minPos = 1;\n // 如果source和target不是完全不相等\n if (diffMatrix[sourceLen][targetLen].min !== sourceLen) {\n // 获取从source到target所需改动\n for (var i = 1; i <= sourceLen; i++) {\n var min = diffMatrix[i][i].min;\n minPos = i;\n for (var j = index; j <= targetLen; j++) {\n if (diffMatrix[i][j].min < min) {\n min = diffMatrix[i][j].min;\n minPos = j;\n }\n }\n index = minPos;\n if (diffMatrix[i][index].type) {\n changes.push({ index: i - 1, type: diffMatrix[i][index].type });\n }\n }\n // 对source进行增删path\n for (var i = changes.length - 1; i >= 0; i--) {\n index = changes[i].index;\n if (changes[i].type === 'add') {\n source.splice(index, 0, [].concat(source[index]));\n }\n else {\n source.splice(index, 1);\n }\n }\n }\n // source尾部补齐\n sourceLen = source.length;\n var diff = targetLen - sourceLen;\n if (sourceLen < targetLen) {\n for (var i = 0; i < diff; i++) {\n if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') {\n source.splice(sourceLen - 2, 0, source[sourceLen - 2]);\n }\n else {\n source.push(source[sourceLen - 1]);\n }\n sourceLen += 1;\n }\n }\n return source;\n};\n// 将两个点均分成count个点\nfunction _splitPoints(points, former, count) {\n var result = [].concat(points);\n var index;\n var t = 1 / (count + 1);\n var formerEnd = _getSegmentPoints(former)[0];\n for (var i = 1; i <= count; i++) {\n t *= i;\n index = Math.floor(points.length * t);\n if (index === 0) {\n result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n }\n else {\n result.splice(index, 0, [\n formerEnd[0] * t + points[index][0] * (1 - t),\n formerEnd[1] * t + points[index][1] * (1 - t),\n ]);\n }\n }\n return result;\n}\n/*\n * 抽取pathSegment中的关键点\n * M,L,A,Q,H,V一个端点\n * Q, S抽取一个端点,一个控制点\n * C抽取一个端点,两个控制点\n */\nfunction _getSegmentPoints(segment) {\n var points = [];\n switch (segment[0]) {\n case 'M':\n points.push([segment[1], segment[2]]);\n break;\n case 'L':\n points.push([segment[1], segment[2]]);\n break;\n case 'A':\n points.push([segment[6], segment[7]]);\n break;\n case 'Q':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n case 'T':\n points.push([segment[1], segment[2]]);\n break;\n case 'C':\n points.push([segment[5], segment[6]]);\n points.push([segment[1], segment[2]]);\n points.push([segment[3], segment[4]]);\n break;\n case 'S':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n case 'H':\n points.push([segment[1], segment[1]]);\n break;\n case 'V':\n points.push([segment[1], segment[1]]);\n break;\n default:\n }\n return points;\n}\nvar formatPath = function (fromPath, toPath) {\n if (fromPath.length <= 1) {\n return fromPath;\n }\n var points;\n for (var i = 0; i < toPath.length; i++) {\n if (fromPath[i][0] !== toPath[i][0]) {\n // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造\n points = _getSegmentPoints(fromPath[i]);\n switch (toPath[i][0]) {\n case 'M':\n fromPath[i] = ['M'].concat(points[0]);\n break;\n case 'L':\n fromPath[i] = ['L'].concat(points[0]);\n break;\n case 'A':\n fromPath[i] = [].concat(toPath[i]);\n fromPath[i][6] = points[0][0];\n fromPath[i][7] = points[0][1];\n break;\n case 'Q':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n case 'T':\n fromPath[i] = ['T'].concat(points[0]);\n break;\n case 'C':\n if (points.length < 3) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 2);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['C'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n case 'S':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n }\n else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n fromPath[i] = ['S'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n default:\n fromPath[i] = toPath[i];\n }\n }\n }\n return fromPath;\n};\nexport { catmullRomToBezier, fillPath, fillPathByDiff, formatPath, intersection, parsePathArray, parsePathString, pathToAbsolute, pathToCurve, rectPath, };\n//# sourceMappingURL=path.js.map","var GraphEvent = /** @class */ (function () {\n function GraphEvent(type, event) {\n /**\n * 是否允许冒泡\n * @type {boolean}\n */\n this.bubbles = true;\n /**\n * 触发对象\n * @type {object}\n */\n this.target = null;\n /**\n * 监听对象\n * @type {object}\n */\n this.currentTarget = null;\n /**\n * 委托对象\n * @type {object}\n */\n this.delegateTarget = null;\n /**\n * 委托事件监听对象的代理对象,即 ev.delegateObject = ev.currentTarget.get('delegateObject')\n * @type {object}\n */\n this.delegateObject = null;\n /**\n * 是否阻止了原生事件\n * @type {boolean}\n */\n this.defaultPrevented = false;\n /**\n * 是否阻止传播(向上冒泡)\n * @type {boolean}\n */\n this.propagationStopped = false;\n /**\n * 触发事件的图形\n * @type {IShape}\n */\n this.shape = null;\n /**\n * 开始触发事件的图形\n * @type {IShape}\n */\n this.fromShape = null;\n /**\n * 事件结束时的触发图形\n * @type {IShape}\n */\n this.toShape = null;\n // 触发事件的路径\n this.propagationPath = [];\n this.type = type;\n this.name = type;\n this.originalEvent = event;\n this.timeStamp = event.timeStamp;\n }\n /**\n * 阻止浏览器默认的行为\n */\n GraphEvent.prototype.preventDefault = function () {\n this.defaultPrevented = true;\n if (this.originalEvent.preventDefault) {\n this.originalEvent.preventDefault();\n }\n };\n /**\n * 阻止冒泡\n */\n GraphEvent.prototype.stopPropagation = function () {\n this.propagationStopped = true;\n };\n GraphEvent.prototype.toString = function () {\n var type = this.type;\n return \"[Event (type=\" + type + \")]\";\n };\n GraphEvent.prototype.save = function () { };\n GraphEvent.prototype.restore = function () { };\n return GraphEvent;\n}());\nexport default GraphEvent;\n//# sourceMappingURL=graph-event.js.map","export function removeFromArray(arr, obj) {\n var index = arr.indexOf(obj);\n if (index !== -1) {\n arr.splice(index, 1);\n }\n}\nexport var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nexport { isNil, isFunction, isString, isObject, isArray, mix, each, upperFirst } from '@antv/util';\n// 是否元素的父容器\nexport function isParent(container, shape) {\n // 所有 shape 都是 canvas 的子元素\n if (container.isCanvas()) {\n return true;\n }\n var parent = shape.getParent();\n var isParent = false;\n while (parent) {\n if (parent === container) {\n isParent = true;\n break;\n }\n parent = parent.getParent();\n }\n return isParent;\n}\nexport function isAllowCapture(element) {\n // @ts-ignore\n return element.cfg.visible && element.cfg.capture;\n}\n//# sourceMappingURL=util.js.map","import { __extends } from \"tslib\";\nimport EE from '@antv/event-emitter';\nimport { mix } from '../util/util';\nvar Base = /** @class */ (function (_super) {\n __extends(Base, _super);\n function Base(cfg) {\n var _this = _super.call(this) || this;\n /**\n * 是否被销毁\n * @type {boolean}\n */\n _this.destroyed = false;\n var defaultCfg = _this.getDefaultCfg();\n _this.cfg = mix(defaultCfg, cfg);\n return _this;\n }\n /**\n * @protected\n * 默认的配置项\n * @returns {object} 默认的配置项\n */\n Base.prototype.getDefaultCfg = function () {\n return {};\n };\n // 实现接口的方法\n Base.prototype.get = function (name) {\n return this.cfg[name];\n };\n // 实现接口的方法\n Base.prototype.set = function (name, value) {\n this.cfg[name] = value;\n };\n // 实现接口的方法\n Base.prototype.destroy = function () {\n this.cfg = {\n destroyed: true,\n };\n this.off();\n this.destroyed = true;\n };\n return Base;\n}(EE));\nexport default Base;\n//# sourceMappingURL=base.js.map","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['pie', /^Microsoft Pocket Internet Explorer\\/(\\d+\\.\\d+)$/],\n ['pie', /^Mozilla\\/\\d\\.\\d+\\s\\(compatible;\\s(?:MSP?IE|MSInternet Explorer) (\\d+\\.\\d+);.*Windows CE.*\\)$/],\n ['netfront', /^Mozilla\\/\\d\\.\\d+.*NetFront\\/(\\d.\\d)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FB[AS]V\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['curl', /^curl\\/([0-9\\.]+)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Windows CE', /Windows CE|WinCE|Microsoft Pocket Internet Explorer/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n // Do not use RegExp for split operation as some browser do not support it (See: http://blog.stevenlevithan.com/archives/cross-browser-split)\n var versionParts = match[1] && match[1].split('.').join('_').split('_').slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArray(__spreadArray([], versionParts, true), createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length), true);\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/**\n * @fileoverview 矩阵运算,本来是要引入 gl-matrix, 但是考虑到 g-mobile 对大小有限制,同时 g-webgl 使用的 matrix 不一致\n * 所以,这里仅实现 2D 几个运算,上层自己引入 gl-matrix\n * @author dxq613@gmail.com\n */\n/**\n * 3阶矩阵相乘\n * @param {number[]} a 矩阵1\n * @param {number[]} b 矩阵2\n */\nexport function multiplyMatrix(a, b) {\n var out = [];\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\n * 3阶矩阵同2阶向量相乘\n * @param {number[]} m 矩阵\n * @param {number[]} v 二阶向量\n */\nexport function multiplyVec2(m, v) {\n var out = [];\n var x = v[0];\n var y = v[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\n * 矩阵的逆\n * @param {number[]} a 矩阵\n */\nexport function invert(a) {\n var out = [];\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n//# sourceMappingURL=matrix.js.map","import { __extends } from \"tslib\";\nimport { each, isEqual, isFunction, isNumber, isObject, isArray, noop, mix, upperFirst, uniqueId } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport { removeFromArray, isParent } from '../util/util';\nimport { multiplyMatrix, multiplyVec2, invert } from '../util/matrix';\nimport Base from './base';\nvar transform = ext.transform;\nvar MATRIX = 'matrix';\nvar CLONE_CFGS = ['zIndex', 'capture', 'visible', 'type'];\n// 可以在 toAttrs 中设置,但不属于绘图属性的字段\nvar RESERVED_PORPS = ['repeat'];\nvar DELEGATION_SPLIT = ':';\nvar WILDCARD = '*';\n// 需要考虑数组嵌套数组的场景\n// 数组嵌套对象的场景不考虑\nfunction _cloneArrayAttr(arr) {\n var result = [];\n for (var i = 0; i < arr.length; i++) {\n if (isArray(arr[i])) {\n result.push([].concat(arr[i]));\n }\n else {\n result.push(arr[i]);\n }\n }\n return result;\n}\nfunction getFormatFromAttrs(toAttrs, shape) {\n var fromAttrs = {};\n var attrs = shape.attrs;\n for (var k in toAttrs) {\n fromAttrs[k] = attrs[k];\n }\n return fromAttrs;\n}\nfunction getFormatToAttrs(props, shape) {\n var toAttrs = {};\n var attrs = shape.attr();\n each(props, function (v, k) {\n if (RESERVED_PORPS.indexOf(k) === -1 && !isEqual(attrs[k], v)) {\n toAttrs[k] = v;\n }\n });\n return toAttrs;\n}\nfunction checkExistedAttrs(animations, animation) {\n if (animation.onFrame) {\n return animations;\n }\n var startTime = animation.startTime, delay = animation.delay, duration = animation.duration;\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n each(animations, function (item) {\n // 后一个动画开始执行的时间 < 前一个动画的结束时间 && 后一个动画的执行时间 > 前一个动画的延迟\n if (startTime + delay < item.startTime + item.delay + item.duration && duration > item.delay) {\n each(animation.toAttrs, function (v, k) {\n if (hasOwnProperty.call(item.toAttrs, k)) {\n delete item.toAttrs[k];\n delete item.fromAttrs[k];\n }\n });\n }\n });\n return animations;\n}\nvar Element = /** @class */ (function (_super) {\n __extends(Element, _super);\n function Element(cfg) {\n var _this = _super.call(this, cfg) || this;\n /**\n * @protected\n * 图形属性\n * @type {ShapeAttrs}\n */\n _this.attrs = {};\n var attrs = _this.getDefaultAttrs();\n mix(attrs, cfg.attrs);\n _this.attrs = attrs;\n _this.initAttrs(attrs);\n _this.initAnimate(); // 初始化动画\n return _this;\n }\n // override\n Element.prototype.getDefaultCfg = function () {\n return {\n visible: true,\n capture: true,\n zIndex: 0,\n };\n };\n /**\n * @protected\n * 获取默认的属相\n */\n Element.prototype.getDefaultAttrs = function () {\n return {\n matrix: this.getDefaultMatrix(),\n opacity: 1,\n };\n };\n /**\n * @protected\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Element.prototype.onCanvasChange = function (changeType) { };\n /**\n * @protected\n * 初始化属性,有些属性需要加工\n * @param {object} attrs 属性值\n */\n Element.prototype.initAttrs = function (attrs) { };\n /**\n * @protected\n * 初始化动画\n */\n Element.prototype.initAnimate = function () {\n this.set('animable', true);\n this.set('animating', false);\n };\n Element.prototype.isGroup = function () {\n return false;\n };\n Element.prototype.getParent = function () {\n return this.get('parent');\n };\n Element.prototype.getCanvas = function () {\n return this.get('canvas');\n };\n Element.prototype.attr = function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = args[0], value = args[1];\n if (!name)\n return this.attrs;\n if (isObject(name)) {\n for (var k in name) {\n this.setAttr(k, name[k]);\n }\n this.afterAttrsChange(name);\n return this;\n }\n if (args.length === 2) {\n this.setAttr(name, value);\n this.afterAttrsChange((_a = {},\n _a[name] = value,\n _a));\n return this;\n }\n return this.attrs[name];\n };\n // 是否被裁剪,被裁剪则不显示,不参与拾取\n Element.prototype.isClipped = function (refX, refY) {\n var clip = this.getClip();\n return clip && !clip.isHit(refX, refY);\n };\n /**\n * 内部设置属性值的接口\n * @param {string} name 属性名\n * @param {any} value 属性值\n */\n Element.prototype.setAttr = function (name, value) {\n var originValue = this.attrs[name];\n if (originValue !== value) {\n this.attrs[name] = value;\n this.onAttrChange(name, value, originValue);\n }\n };\n /**\n * @protected\n * 属性值发生改变\n * @param {string} name 属性名\n * @param {any} value 属性值\n * @param {any} originValue 属性值\n */\n Element.prototype.onAttrChange = function (name, value, originValue) {\n if (name === 'matrix') {\n this.set('totalMatrix', null);\n }\n };\n /**\n * 属性更改后需要做的事情\n * @protected\n */\n Element.prototype.afterAttrsChange = function (targetAttrs) {\n if (this.cfg.isClipShape) {\n var applyTo = this.cfg.applyTo;\n if (applyTo) {\n applyTo.onCanvasChange('clip');\n }\n }\n else {\n this.onCanvasChange('attr');\n }\n };\n Element.prototype.show = function () {\n // 不是高频操作直接使用 set\n this.set('visible', true);\n this.onCanvasChange('show');\n return this;\n };\n Element.prototype.hide = function () {\n // 不是高频操作直接使用 set\n this.set('visible', false);\n this.onCanvasChange('hide');\n return this;\n };\n Element.prototype.setZIndex = function (zIndex) {\n this.set('zIndex', zIndex);\n var parent = this.getParent();\n if (parent) {\n // 改变 zIndex 不应该立即触发渲染 (调用 onCanvasChange('zIndex')),需要经过 sort 再触发\n parent.sort();\n }\n return this;\n };\n Element.prototype.toFront = function () {\n var parent = this.getParent();\n if (!parent) {\n return;\n }\n var children = parent.getChildren();\n var el = this.get('el');\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.push(this);\n this.onCanvasChange('zIndex');\n };\n Element.prototype.toBack = function () {\n var parent = this.getParent();\n if (!parent) {\n return;\n }\n var children = parent.getChildren();\n var el = this.get('el');\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.unshift(this);\n this.onCanvasChange('zIndex');\n };\n Element.prototype.remove = function (destroy) {\n if (destroy === void 0) { destroy = true; }\n var parent = this.getParent();\n if (parent) {\n removeFromArray(parent.getChildren(), this);\n if (!parent.get('clearing')) {\n // 如果父元素正在清理,当前元素不触发 remove\n this.onCanvasChange('remove');\n }\n }\n else {\n this.onCanvasChange('remove');\n }\n if (destroy) {\n this.destroy();\n }\n };\n Element.prototype.resetMatrix = function () {\n this.attr(MATRIX, this.getDefaultMatrix());\n this.onCanvasChange('matrix');\n };\n Element.prototype.getMatrix = function () {\n return this.attr(MATRIX);\n };\n Element.prototype.setMatrix = function (m) {\n this.attr(MATRIX, m);\n this.onCanvasChange('matrix');\n };\n // 获取总的 matrix\n Element.prototype.getTotalMatrix = function () {\n var totalMatrix = this.cfg.totalMatrix;\n if (!totalMatrix) {\n var currentMatrix = this.attr('matrix');\n var parentMatrix = this.cfg.parentMatrix;\n if (parentMatrix && currentMatrix) {\n totalMatrix = multiplyMatrix(parentMatrix, currentMatrix);\n }\n else {\n totalMatrix = currentMatrix || parentMatrix;\n }\n this.set('totalMatrix', totalMatrix);\n }\n return totalMatrix;\n };\n // 上层分组设置 matrix\n Element.prototype.applyMatrix = function (matrix) {\n var currentMatrix = this.attr('matrix');\n var totalMatrix = null;\n if (matrix && currentMatrix) {\n totalMatrix = multiplyMatrix(matrix, currentMatrix);\n }\n else {\n totalMatrix = currentMatrix || matrix;\n }\n this.set('totalMatrix', totalMatrix);\n this.set('parentMatrix', matrix);\n };\n /**\n * @protected\n * 获取默认的矩阵\n * @returns {number[]|null} 默认的矩阵\n */\n Element.prototype.getDefaultMatrix = function () {\n return null;\n };\n // 将向量应用设置的矩阵\n Element.prototype.applyToMatrix = function (v) {\n var matrix = this.attr('matrix');\n if (matrix) {\n return multiplyVec2(matrix, v);\n }\n return v;\n };\n // 根据设置的矩阵,将向量转换相对于图形/分组的位置\n Element.prototype.invertFromMatrix = function (v) {\n var matrix = this.attr('matrix');\n if (matrix) {\n var invertMatrix = invert(matrix);\n if (invertMatrix) {\n return multiplyVec2(invertMatrix, v);\n }\n }\n return v;\n };\n // 设置 clip\n Element.prototype.setClip = function (clipCfg) {\n var canvas = this.getCanvas();\n // 应该只设置当前元素的 clip,不应该去修改 clip 本身,方便 clip 被复用\n // TODO: setClip 的传参既 shape 配置,也支持 shape 对象\n // const preShape = this.get('clipShape');\n // if (preShape) {\n // // 将之前的 clipShape 销毁\n // preShape.destroy();\n // }\n var clipShape = null;\n // 如果配置项为 null,则不移除 clipShape\n if (clipCfg) {\n var ShapeBase = this.getShapeBase();\n var shapeType = upperFirst(clipCfg.type);\n var Cons = ShapeBase[shapeType];\n if (Cons) {\n clipShape = new Cons({\n type: clipCfg.type,\n isClipShape: true,\n applyTo: this,\n attrs: clipCfg.attrs,\n canvas: canvas,\n });\n }\n }\n this.set('clipShape', clipShape);\n this.onCanvasChange('clip');\n return clipShape;\n };\n Element.prototype.getClip = function () {\n // 高频率调用的地方直接使用 this.cfg.xxx\n var clipShape = this.cfg.clipShape;\n // 未设置时返回 Null,保证一致性\n if (!clipShape) {\n return null;\n }\n return clipShape;\n };\n Element.prototype.clone = function () {\n var _this = this;\n var originAttrs = this.attrs;\n var attrs = {};\n each(originAttrs, function (i, k) {\n if (isArray(originAttrs[k])) {\n attrs[k] = _cloneArrayAttr(originAttrs[k]);\n }\n else {\n attrs[k] = originAttrs[k];\n }\n });\n var cons = this.constructor;\n // @ts-ignore\n var clone = new cons({ attrs: attrs });\n each(CLONE_CFGS, function (cfgName) {\n clone.set(cfgName, _this.get(cfgName));\n });\n return clone;\n };\n Element.prototype.destroy = function () {\n var destroyed = this.destroyed;\n if (destroyed) {\n return;\n }\n this.attrs = {};\n _super.prototype.destroy.call(this);\n // this.onCanvasChange('destroy');\n };\n /**\n * 是否处于动画暂停状态\n * @return {boolean} 是否处于动画暂停状态\n */\n Element.prototype.isAnimatePaused = function () {\n return this.get('_pause').isPaused;\n };\n /**\n * 执行动画,支持多种函数签名\n * 1. animate(toAttrs: ElementAttrs, duration: number, easing?: string, callback?: () => void, delay?: number)\n * 2. animate(onFrame: OnFrame, duration: number, easing?: string, callback?: () => void, delay?: number)\n * 3. animate(toAttrs: ElementAttrs, cfg: AnimateCfg)\n * 4. animate(onFrame: OnFrame, cfg: AnimateCfg)\n * 各个参数的含义为:\n * toAttrs 动画最终状态\n * onFrame 自定义帧动画函数\n * duration 动画执行时间\n * easing 动画缓动效果\n * callback 动画执行后的回调\n * delay 动画延迟时间\n */\n Element.prototype.animate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this.get('timeline') && !this.get('canvas')) {\n return;\n }\n this.set('animating', true);\n var timeline = this.get('timeline');\n if (!timeline) {\n timeline = this.get('canvas').get('timeline');\n this.set('timeline', timeline);\n }\n var animations = this.get('animations') || [];\n // 初始化 tick\n if (!timeline.timer) {\n timeline.initTimer();\n }\n var toAttrs = args[0], duration = args[1], _a = args[2], easing = _a === void 0 ? 'easeLinear' : _a, _b = args[3], callback = _b === void 0 ? noop : _b, _c = args[4], delay = _c === void 0 ? 0 : _c;\n var onFrame;\n var repeat;\n var pauseCallback;\n var resumeCallback;\n var animateCfg;\n // 第二个参数,既可以是动画最终状态 toAttrs,也可以是自定义帧动画函数 onFrame\n if (isFunction(toAttrs)) {\n onFrame = toAttrs;\n toAttrs = {};\n }\n else if (isObject(toAttrs) && toAttrs.onFrame) {\n // 兼容 3.0 中的写法,onFrame 和 repeat 可在 toAttrs 中设置\n onFrame = toAttrs.onFrame;\n repeat = toAttrs.repeat;\n }\n // 第二个参数,既可以是执行时间 duration,也可以是动画参数 animateCfg\n if (isObject(duration)) {\n animateCfg = duration;\n duration = animateCfg.duration;\n easing = animateCfg.easing || 'easeLinear';\n delay = animateCfg.delay || 0;\n // animateCfg 中的设置优先级更高\n repeat = animateCfg.repeat || repeat || false;\n callback = animateCfg.callback || noop;\n pauseCallback = animateCfg.pauseCallback || noop;\n resumeCallback = animateCfg.resumeCallback || noop;\n }\n else {\n // 第四个参数,既可以是回调函数 callback,也可以是延迟时间 delay\n if (isNumber(callback)) {\n delay = callback;\n callback = null;\n }\n // 第三个参数,既可以是缓动参数 easing,也可以是回调函数 callback\n if (isFunction(easing)) {\n callback = easing;\n easing = 'easeLinear';\n }\n else {\n easing = easing || 'easeLinear';\n }\n }\n var formatToAttrs = getFormatToAttrs(toAttrs, this);\n var animation = {\n fromAttrs: getFormatFromAttrs(formatToAttrs, this),\n toAttrs: formatToAttrs,\n duration: duration,\n easing: easing,\n repeat: repeat,\n callback: callback,\n pauseCallback: pauseCallback,\n resumeCallback: resumeCallback,\n delay: delay,\n startTime: timeline.getTime(),\n id: uniqueId(),\n onFrame: onFrame,\n pathFormatted: false,\n };\n // 如果动画元素队列中已经有这个图形了\n if (animations.length > 0) {\n // 先检查是否需要合并属性。若有相同的动画,将该属性从前一个动画中删除,直接用后一个动画中\n animations = checkExistedAttrs(animations, animation);\n }\n else {\n // 否则将图形添加到动画元素队列\n timeline.addAnimator(this);\n }\n animations.push(animation);\n this.set('animations', animations);\n this.set('_pause', { isPaused: false });\n };\n /**\n * 停止动画\n * @param {boolean} toEnd 是否到动画的最终状态\n */\n Element.prototype.stopAnimate = function (toEnd) {\n var _this = this;\n if (toEnd === void 0) { toEnd = true; }\n var animations = this.get('animations');\n each(animations, function (animation) {\n // 将动画执行到最后一帧\n if (toEnd) {\n if (animation.onFrame) {\n _this.attr(animation.onFrame(1));\n }\n else {\n _this.attr(animation.toAttrs);\n }\n }\n if (animation.callback) {\n // 动画停止时的回调\n animation.callback();\n }\n });\n this.set('animating', false);\n this.set('animations', []);\n };\n /**\n * 暂停动画\n */\n Element.prototype.pauseAnimate = function () {\n var timeline = this.get('timeline');\n var animations = this.get('animations');\n var pauseTime = timeline.getTime();\n each(animations, function (animation) {\n animation._paused = true;\n animation._pauseTime = pauseTime;\n if (animation.pauseCallback) {\n // 动画暂停时的回调\n animation.pauseCallback();\n }\n });\n // 记录下是在什么时候暂停的\n this.set('_pause', {\n isPaused: true,\n pauseTime: pauseTime,\n });\n return this;\n };\n /**\n * 恢复动画\n */\n Element.prototype.resumeAnimate = function () {\n var timeline = this.get('timeline');\n var current = timeline.getTime();\n var animations = this.get('animations');\n var pauseTime = this.get('_pause').pauseTime;\n // 之后更新属性需要计算动画已经执行的时长,如果暂停了,就把初始时间调后\n each(animations, function (animation) {\n animation.startTime = animation.startTime + (current - pauseTime);\n animation._paused = false;\n animation._pauseTime = null;\n if (animation.resumeCallback) {\n animation.resumeCallback();\n }\n });\n this.set('_pause', {\n isPaused: false,\n });\n this.set('animations', animations);\n return this;\n };\n /**\n * 触发委托事件\n * @param {string} type 事件类型\n * @param {GraphEvent} eventObj 事件对象\n */\n Element.prototype.emitDelegation = function (type, eventObj) {\n var _this = this;\n var paths = eventObj.propagationPath;\n var events = this.getEvents();\n var relativeShape;\n if (type === 'mouseenter') {\n relativeShape = eventObj.fromShape;\n }\n else if (type === 'mouseleave') {\n relativeShape = eventObj.toShape;\n }\n var _loop_1 = function (i) {\n var element = paths[i];\n // 暂定跟 name 绑定\n var name_1 = element.get('name');\n if (name_1) {\n // 第一个 mouseenter 和 mouseleave 的停止即可,因为后面的都是前面的 Parent\n if (\n // 只有 element 是 Group 或者 Canvas 的时候,才需要判断 isParent\n (element.isGroup() || (element.isCanvas && element.isCanvas())) &&\n relativeShape &&\n isParent(element, relativeShape)) {\n return \"break\";\n }\n if (isArray(name_1)) {\n each(name_1, function (subName) {\n _this.emitDelegateEvent(element, subName, eventObj);\n });\n }\n else {\n this_1.emitDelegateEvent(element, name_1, eventObj);\n }\n }\n };\n var this_1 = this;\n // 至少有一个对象,且第一个对象为 shape\n for (var i = 0; i < paths.length; i++) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\")\n break;\n }\n };\n Element.prototype.emitDelegateEvent = function (element, name, eventObj) {\n var events = this.getEvents();\n // 事件委托的形式 name:type\n var eventName = name + DELEGATION_SPLIT + eventObj.type;\n if (events[eventName] || events[WILDCARD]) {\n // 对于通配符 *,事件名称 = 委托事件名称\n eventObj.name = eventName;\n eventObj.currentTarget = element;\n eventObj.delegateTarget = this;\n // 将委托事件的监听对象 delegateObject 挂载到事件对象上\n eventObj.delegateObject = element.get('delegateObject');\n this.emit(eventName, eventObj);\n }\n };\n /**\n * 移动元素\n * @param {number} translateX 水平移动距离\n * @param {number} translateY 垂直移动距离\n * @return {IElement} 元素\n */\n Element.prototype.translate = function (translateX, translateY) {\n if (translateX === void 0) { translateX = 0; }\n if (translateY === void 0) { translateY = 0; }\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['t', translateX, translateY]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 移动元素到目标位置\n * @param {number} targetX 目标位置的水平坐标\n * @param {number} targetX 目标位置的垂直坐标\n * @return {IElement} 元素\n */\n Element.prototype.move = function (targetX, targetY) {\n var x = this.attr('x') || 0;\n var y = this.attr('y') || 0;\n this.translate(targetX - x, targetY - y);\n return this;\n };\n /**\n * 移动元素到目标位置,等价于 move 方法。由于 moveTo 的语义性更强,因此在文档中推荐使用 moveTo 方法\n * @param {number} targetX 目标位置的 x 轴坐标\n * @param {number} targetY 目标位置的 y 轴坐标\n * @return {IElement} 元素\n */\n Element.prototype.moveTo = function (targetX, targetY) {\n return this.move(targetX, targetY);\n };\n /**\n * 缩放元素\n * @param {number} ratioX 水平缩放比例\n * @param {number} ratioY 垂直缩放比例\n * @return {IElement} 元素\n */\n Element.prototype.scale = function (ratioX, ratioY) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['s', ratioX, ratioY || ratioX]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以画布左上角 (0, 0) 为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotate = function (radian) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [['r', radian]]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以起始点为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotateAtStart = function (rotate) {\n var _a = this.attr(), x = _a.x, y = _a.y;\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [\n ['t', -x, -y],\n ['r', rotate],\n ['t', x, y],\n ]);\n this.setMatrix(newMatrix);\n return this;\n };\n /**\n * 以任意点 (x, y) 为中心旋转元素\n * @param {number} radian 旋转角度(弧度值)\n * @return {IElement} 元素\n */\n Element.prototype.rotateAtPoint = function (x, y, rotate) {\n var matrix = this.getMatrix();\n var newMatrix = transform(matrix, [\n ['t', -x, -y],\n ['r', rotate],\n ['t', x, y],\n ]);\n this.setMatrix(newMatrix);\n return this;\n };\n return Element;\n}(Base));\nexport default Element;\n//# sourceMappingURL=element.js.map","import { __extends } from \"tslib\";\nimport Element from './element';\nimport { isFunction, isObject, each, removeFromArray, upperFirst, isAllowCapture } from '../util/util';\nvar SHAPE_MAP = {};\nvar INDEX = '_INDEX';\n/**\n * 设置 canvas\n * @param {IElement} element 元素\n * @param {ICanvas} canvas 画布\n */\nfunction setCanvas(element, canvas) {\n element.set('canvas', canvas);\n if (element.isGroup()) {\n var children = element.get('children');\n if (children.length) {\n children.forEach(function (child) {\n setCanvas(child, canvas);\n });\n }\n }\n}\n/**\n * 设置 timeline\n * @param {IElement} element 元素\n * @param {Timeline} timeline 时间轴\n */\nfunction setTimeline(element, timeline) {\n element.set('timeline', timeline);\n if (element.isGroup()) {\n var children = element.get('children');\n if (children.length) {\n children.forEach(function (child) {\n setTimeline(child, timeline);\n });\n }\n }\n}\nfunction contains(container, element) {\n var children = container.getChildren();\n return children.indexOf(element) >= 0;\n}\nfunction removeChild(container, element, destroy) {\n if (destroy === void 0) { destroy = true; }\n // 不再调用 element.remove() 方法,会出现循环调用\n if (destroy) {\n element.destroy();\n }\n else {\n element.set('parent', null);\n element.set('canvas', null);\n }\n removeFromArray(container.getChildren(), element);\n}\nfunction getComparer(compare) {\n return function (left, right) {\n var result = compare(left, right);\n return result === 0 ? left[INDEX] - right[INDEX] : result;\n };\n}\nvar Container = /** @class */ (function (_super) {\n __extends(Container, _super);\n function Container() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Container.prototype.isCanvas = function () {\n return false;\n };\n // 根据子节点确定 BBox\n Container.prototype.getBBox = function () {\n // 所有的值可能在画布的可视区外\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并\n var children = this.getChildren().filter(function (child) {\n return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0));\n });\n if (children.length > 0) {\n each(children, function (child) {\n var _a = child.getBBox(), childMinX = _a.minX, childMaxX = _a.maxX, childMinY = _a.minY, childMaxY = _a.maxY;\n if (childMinX < minX) {\n minX = childMinX;\n }\n if (childMaxX > maxX) {\n maxX = childMaxX;\n }\n if (childMinY < minY) {\n minY = childMinY;\n }\n if (childMaxY > maxY) {\n maxY = childMaxY;\n }\n });\n }\n else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n var box = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n return box;\n };\n // 获取画布的包围盒\n Container.prototype.getCanvasBBox = function () {\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n // 将可见元素、图形以及不为空的图形分组筛选出来,用于包围盒合并\n var children = this.getChildren().filter(function (child) {\n return child.get('visible') && (!child.isGroup() || (child.isGroup() && child.getChildren().length > 0));\n });\n if (children.length > 0) {\n each(children, function (child) {\n var _a = child.getCanvasBBox(), childMinX = _a.minX, childMaxX = _a.maxX, childMinY = _a.minY, childMaxY = _a.maxY;\n if (childMinX < minX) {\n minX = childMinX;\n }\n if (childMaxX > maxX) {\n maxX = childMaxX;\n }\n if (childMinY < minY) {\n minY = childMinY;\n }\n if (childMaxY > maxY) {\n maxY = childMaxY;\n }\n });\n }\n else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n var box = {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n return box;\n };\n Container.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n cfg['children'] = [];\n return cfg;\n };\n Container.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name === 'matrix') {\n var totalMatrix = this.getTotalMatrix();\n this._applyChildrenMarix(totalMatrix);\n }\n };\n // 不但应用到自己身上还要应用于子元素\n Container.prototype.applyMatrix = function (matrix) {\n var preTotalMatrix = this.getTotalMatrix();\n _super.prototype.applyMatrix.call(this, matrix);\n var totalMatrix = this.getTotalMatrix();\n // totalMatrix 没有发生变化时,这里仅考虑两者都为 null 时\n // 不继续向下传递矩阵\n if (totalMatrix === preTotalMatrix) {\n return;\n }\n this._applyChildrenMarix(totalMatrix);\n };\n // 在子元素上设置矩阵\n Container.prototype._applyChildrenMarix = function (totalMatrix) {\n var children = this.getChildren();\n each(children, function (child) {\n child.applyMatrix(totalMatrix);\n });\n };\n // 兼容老版本的接口\n Container.prototype.addShape = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var type = args[0];\n var cfg = args[1];\n if (isObject(type)) {\n cfg = type;\n }\n else {\n cfg['type'] = type;\n }\n var shapeType = SHAPE_MAP[cfg.type];\n if (!shapeType) {\n shapeType = upperFirst(cfg.type);\n SHAPE_MAP[cfg.type] = shapeType;\n }\n var ShapeBase = this.getShapeBase();\n var shape = new ShapeBase[shapeType](cfg);\n this.add(shape);\n return shape;\n };\n Container.prototype.addGroup = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var groupClass = args[0], cfg = args[1];\n var group;\n if (isFunction(groupClass)) {\n if (cfg) {\n group = new groupClass(cfg);\n }\n else {\n group = new groupClass({\n // canvas,\n parent: this,\n });\n }\n }\n else {\n var tmpCfg = groupClass || {};\n var TmpGroupClass = this.getGroupBase();\n group = new TmpGroupClass(tmpCfg);\n }\n this.add(group);\n return group;\n };\n Container.prototype.getCanvas = function () {\n var canvas;\n if (this.isCanvas()) {\n canvas = this;\n }\n else {\n canvas = this.get('canvas');\n }\n return canvas;\n };\n Container.prototype.getShape = function (x, y, ev) {\n // 如果不支持拾取,则直接返回\n if (!isAllowCapture(this)) {\n return null;\n }\n var children = this.getChildren();\n var shape;\n // 如果容器是 group\n if (!this.isCanvas()) {\n var v = [x, y, 1];\n // 将 x, y 转换成对应于 group 的局部坐标\n v = this.invertFromMatrix(v);\n if (!this.isClipped(v[0], v[1])) {\n shape = this._findShape(children, v[0], v[1], ev);\n }\n }\n else {\n shape = this._findShape(children, x, y, ev);\n }\n return shape;\n };\n Container.prototype._findShape = function (children, x, y, ev) {\n var shape = null;\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i];\n if (isAllowCapture(child)) {\n if (child.isGroup()) {\n shape = child.getShape(x, y, ev);\n }\n else if (child.isHit(x, y)) {\n shape = child;\n }\n }\n if (shape) {\n break;\n }\n }\n return shape;\n };\n Container.prototype.add = function (element) {\n var canvas = this.getCanvas();\n var children = this.getChildren();\n var timeline = this.get('timeline');\n var preParent = element.getParent();\n if (preParent) {\n removeChild(preParent, element, false);\n }\n element.set('parent', this);\n if (canvas) {\n setCanvas(element, canvas);\n }\n if (timeline) {\n setTimeline(element, timeline);\n }\n children.push(element);\n element.onCanvasChange('add');\n this._applyElementMatrix(element);\n };\n // 将当前容器的矩阵应用到子元素\n Container.prototype._applyElementMatrix = function (element) {\n var totalMatrix = this.getTotalMatrix();\n // 添加图形或者分组时,需要把当前图元的矩阵设置进去\n if (totalMatrix) {\n element.applyMatrix(totalMatrix);\n }\n };\n Container.prototype.getChildren = function () {\n return this.get('children');\n };\n Container.prototype.sort = function () {\n var children = this.getChildren();\n // 稳定排序\n each(children, function (child, index) {\n child[INDEX] = index;\n return child;\n });\n children.sort(getComparer(function (obj1, obj2) {\n return obj1.get('zIndex') - obj2.get('zIndex');\n }));\n this.onCanvasChange('sort');\n };\n Container.prototype.clear = function () {\n this.set('clearing', true);\n if (this.destroyed) {\n return;\n }\n var children = this.getChildren();\n for (var i = children.length - 1; i >= 0; i--) {\n children[i].destroy(); // 销毁子元素\n }\n this.set('children', []);\n this.onCanvasChange('clear');\n this.set('clearing', false);\n };\n Container.prototype.destroy = function () {\n if (this.get('destroyed')) {\n return;\n }\n this.clear();\n _super.prototype.destroy.call(this);\n };\n /**\n * 获取第一个子元素\n * @return {IElement} 第一个元素\n */\n Container.prototype.getFirst = function () {\n return this.getChildByIndex(0);\n };\n /**\n * 获取最后一个子元素\n * @return {IElement} 元素\n */\n Container.prototype.getLast = function () {\n var children = this.getChildren();\n return this.getChildByIndex(children.length - 1);\n };\n /**\n * 根据索引获取子元素\n * @return {IElement} 第一个元素\n */\n Container.prototype.getChildByIndex = function (index) {\n var children = this.getChildren();\n return children[index];\n };\n /**\n * 子元素的数量\n * @return {number} 子元素数量\n */\n Container.prototype.getCount = function () {\n var children = this.getChildren();\n return children.length;\n };\n /**\n * 是否包含对应元素\n * @param {IElement} element 元素\n * @return {boolean}\n */\n Container.prototype.contain = function (element) {\n var children = this.getChildren();\n return children.indexOf(element) > -1;\n };\n /**\n * 移除对应子元素\n * @param {IElement} element 子元素\n * @param {boolean} destroy 是否销毁子元素,默认为 true\n */\n Container.prototype.removeChild = function (element, destroy) {\n if (destroy === void 0) { destroy = true; }\n if (this.contain(element)) {\n element.remove(destroy);\n }\n };\n /**\n * 查找所有匹配的元素\n * @param {ElementFilterFn} fn 匹配函数\n * @return {IElement[]} 元素数组\n */\n Container.prototype.findAll = function (fn) {\n var rst = [];\n var children = this.getChildren();\n each(children, function (element) {\n if (fn(element)) {\n rst.push(element);\n }\n if (element.isGroup()) {\n rst = rst.concat(element.findAll(fn));\n }\n });\n return rst;\n };\n /**\n * 查找元素,找到第一个返回\n * @param {ElementFilterFn} fn 匹配函数\n * @return {IElement|null} 元素,可以为空\n */\n Container.prototype.find = function (fn) {\n var rst = null;\n var children = this.getChildren();\n each(children, function (element) {\n if (fn(element)) {\n rst = element;\n }\n else if (element.isGroup()) {\n rst = element.find(fn);\n }\n if (rst) {\n return false;\n }\n });\n return rst;\n };\n /**\n * 根据 ID 查找元素\n * @param {string} id 元素 id\n * @return {IElement|null} 元素\n */\n Container.prototype.findById = function (id) {\n return this.find(function (element) {\n return element.get('id') === id;\n });\n };\n /**\n * 该方法即将废弃,不建议使用\n * 根据 className 查找元素\n * TODO: 该方式定义暂时只给 G6 3.3 以后的版本使用,待 G6 中的 findByClassName 方法移除后,G 也需要同步移除\n * @param {string} className 元素 className\n * @return {IElement | null} 元素\n */\n Container.prototype.findByClassName = function (className) {\n return this.find(function (element) {\n return element.get('className') === className;\n });\n };\n /**\n * 根据 name 查找元素列表\n * @param {string} name 元素名称\n * @return {IElement[]} 元素\n */\n Container.prototype.findAllByName = function (name) {\n return this.findAll(function (element) {\n return element.get('name') === name;\n });\n };\n return Container;\n}(Element));\nexport default Container;\n//# sourceMappingURL=container.js.map","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export function linear(t) {\n return +t;\n}\n","export function quadIn(t) {\n return t * t;\n}\n\nexport function quadOut(t) {\n return t * (2 - t);\n}\n\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n","var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n","import {tpmt} from \"./math.js\";\n\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\n\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\n\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}\n","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n","import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n","import * as d3Ease from 'd3-ease';\nvar EASING_MAP = {};\n/**\n * 根据名称获取对应的动画缓动函数\n * @param type 动画缓动函数名称\n */\nexport function getEasing(type) {\n // 默认从 d3-ease 中获取\n return EASING_MAP[type.toLowerCase()] || d3Ease[type];\n}\n/**\n * 注册动画缓动函数\n * @param type 动画缓动函数名称\n * @param easeFn 动画缓动函数\n */\nexport function registerEasing(type, easeFn) {\n EASING_MAP[type.toLowerCase()] = easeFn;\n}\n//# sourceMappingURL=register.js.map","export var isColorProp = function (prop) { return ['fill', 'stroke', 'fillStyle', 'strokeStyle'].includes(prop); };\nexport var isGradientColor = function (val) { return /^[r,R,L,l]{1}[\\s]*\\(/.test(val); };\n//# sourceMappingURL=color.js.map","import { isEqual, isNumber, isFunction } from '@antv/util';\nimport * as d3Timer from 'd3-timer';\nimport { interpolate, interpolateArray } from 'd3-interpolate'; // 目前整体动画只需要数值和数组的差值计算\nimport { getEasing } from './register';\nimport * as PathUtil from '../util/path';\nimport { isColorProp, isGradientColor } from '../util/color';\nvar IDENTITY_MATRIX = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n/**\n * 使用 ratio 进行插值计算来更新属性\n * @param {IElement} shape 元素\n * @param {Animation} animation 动画\n * @param {number} ratio 比例\n * @return {boolean} 动画是否执行完成\n */\nfunction _update(shape, animation, ratio) {\n var cProps = {}; // 此刻属性\n var fromAttrs = animation.fromAttrs, toAttrs = animation.toAttrs;\n if (shape.destroyed) {\n return;\n }\n var interf; // 差值函数\n for (var k in toAttrs) {\n if (!isEqual(fromAttrs[k], toAttrs[k])) {\n if (k === 'path') {\n var toPath = toAttrs[k];\n var fromPath = fromAttrs[k];\n if (toPath.length > fromPath.length) {\n toPath = PathUtil.parsePathString(toAttrs[k]); // 终点状态\n fromPath = PathUtil.parsePathString(fromAttrs[k]); // 起始状态\n fromPath = PathUtil.fillPathByDiff(fromPath, toPath);\n fromPath = PathUtil.formatPath(fromPath, toPath);\n animation.fromAttrs.path = fromPath;\n animation.toAttrs.path = toPath;\n }\n else if (!animation.pathFormatted) {\n toPath = PathUtil.parsePathString(toAttrs[k]);\n fromPath = PathUtil.parsePathString(fromAttrs[k]);\n fromPath = PathUtil.formatPath(fromPath, toPath);\n animation.fromAttrs.path = fromPath;\n animation.toAttrs.path = toPath;\n animation.pathFormatted = true;\n }\n cProps[k] = [];\n for (var i = 0; i < toPath.length; i++) {\n var toPathPoint = toPath[i];\n var fromPathPoint = fromPath[i];\n var cPathPoint = [];\n for (var j = 0; j < toPathPoint.length; j++) {\n if (isNumber(toPathPoint[j]) && fromPathPoint && isNumber(fromPathPoint[j])) {\n interf = interpolate(fromPathPoint[j], toPathPoint[j]);\n cPathPoint.push(interf(ratio));\n }\n else {\n cPathPoint.push(toPathPoint[j]);\n }\n }\n cProps[k].push(cPathPoint);\n }\n }\n else if (k === 'matrix') {\n /*\n 对矩阵进行插值时,需要保证矩阵不为空,为空则使用单位矩阵\n TODO: 二维和三维场景下单位矩阵不同,之后 WebGL 版需要做进一步处理\n */\n var matrixFn = interpolateArray(fromAttrs[k] || IDENTITY_MATRIX, toAttrs[k] || IDENTITY_MATRIX);\n var currentMatrix = matrixFn(ratio);\n cProps[k] = currentMatrix;\n }\n else if (isColorProp(k) && isGradientColor(toAttrs[k])) {\n cProps[k] = toAttrs[k];\n }\n else if (!isFunction(toAttrs[k])) {\n // 非函数类型的值才能做插值\n interf = interpolate(fromAttrs[k], toAttrs[k]);\n cProps[k] = interf(ratio);\n }\n }\n }\n shape.attr(cProps);\n}\n/**\n * 根据自定义帧动画函数 onFrame 来更新属性\n * @param {IElement} shape 元素\n * @param {Animation} animation 动画\n * @param {number} elapsed 动画执行时间(毫秒)\n * @return {boolean} 动画是否执行完成\n */\nfunction update(shape, animation, elapsed) {\n var startTime = animation.startTime, delay = animation.delay;\n // 如果还没有开始执行或暂停,先不更新\n if (elapsed < startTime + delay || animation._paused) {\n return false;\n }\n var ratio;\n var duration = animation.duration;\n var easing = animation.easing;\n var easeFn = getEasing(easing);\n // 已执行时间\n elapsed = elapsed - startTime - animation.delay;\n if (animation.repeat) {\n // 如果动画重复执行,则 elapsed > duration,计算 ratio 时需取模\n ratio = (elapsed % duration) / duration;\n ratio = easeFn(ratio);\n }\n else {\n ratio = elapsed / duration;\n if (ratio < 1) {\n // 动画未执行完\n ratio = easeFn(ratio);\n }\n else {\n // 动画已执行完\n if (animation.onFrame) {\n shape.attr(animation.onFrame(1));\n }\n else {\n shape.attr(animation.toAttrs);\n }\n return true;\n }\n }\n if (animation.onFrame) {\n var attrs = animation.onFrame(ratio);\n shape.attr(attrs);\n }\n else {\n _update(shape, animation, ratio);\n }\n return false;\n}\nvar Timeline = /** @class */ (function () {\n /**\n * 时间轴构造函数,依赖于画布\n * @param {}\n */\n function Timeline(canvas) {\n /**\n * 执行动画的元素列表\n * @type {IElement[]}\n */\n this.animators = [];\n /**\n * 当前时间\n * @type {number}\n */\n this.current = 0;\n /**\n * 定时器\n * @type {d3Timer.Timer}\n */\n this.timer = null;\n this.canvas = canvas;\n }\n /**\n * 初始化定时器\n */\n Timeline.prototype.initTimer = function () {\n var _this = this;\n var isFinished = false;\n var shape;\n var animations;\n var animation;\n this.timer = d3Timer.timer(function (elapsed) {\n _this.current = elapsed;\n if (_this.animators.length > 0) {\n for (var i = _this.animators.length - 1; i >= 0; i--) {\n shape = _this.animators[i];\n if (shape.destroyed) {\n // 如果已经被销毁,直接移出队列\n _this.removeAnimator(i);\n continue;\n }\n if (!shape.isAnimatePaused()) {\n animations = shape.get('animations');\n for (var j = animations.length - 1; j >= 0; j--) {\n animation = animations[j];\n isFinished = update(shape, animation, elapsed);\n if (isFinished) {\n animations.splice(j, 1);\n isFinished = false;\n if (animation.callback) {\n animation.callback();\n }\n }\n }\n }\n if (animations.length === 0) {\n _this.removeAnimator(i);\n }\n }\n var autoDraw = _this.canvas.get('autoDraw');\n // 非自动渲染模式下,手动调用 canvas.draw() 重新渲染\n if (!autoDraw) {\n _this.canvas.draw();\n }\n }\n });\n };\n /**\n * 增加动画元素\n */\n Timeline.prototype.addAnimator = function (shape) {\n this.animators.push(shape);\n };\n /**\n * 移除动画元素\n */\n Timeline.prototype.removeAnimator = function (index) {\n this.animators.splice(index, 1);\n };\n /**\n * 是否有动画在执行\n */\n Timeline.prototype.isAnimating = function () {\n return !!this.animators.length;\n };\n /**\n * 停止定时器\n */\n Timeline.prototype.stop = function () {\n if (this.timer) {\n this.timer.stop();\n }\n };\n /**\n * 停止时间轴上所有元素的动画,并置空动画元素列表\n * @param {boolean} toEnd 是否到动画的最终状态,用来透传给动画元素的 stopAnimate 方法\n */\n Timeline.prototype.stopAllAnimations = function (toEnd) {\n if (toEnd === void 0) { toEnd = true; }\n this.animators.forEach(function (animator) {\n animator.stopAnimate(toEnd);\n });\n this.animators = [];\n this.canvas.draw();\n };\n /**\n * 获取当前时间\n */\n Timeline.prototype.getTime = function () {\n return this.current;\n };\n return Timeline;\n}());\nexport default Timeline;\n//# sourceMappingURL=timeline.js.map","/**\n * @fileoverview 事件处理器\n * @author dxq613@gmail.com\n */\nimport GraphEvent from './graph-event';\nimport { each, isParent } from '../util/util';\nvar CLICK_OFFSET = 40;\nvar LEFT_BTN_CODE = 0;\nvar DELEGATION_SPLIT = ':';\nvar EVENTS = [\n 'mousedown',\n 'mouseup',\n 'dblclick',\n 'mouseout',\n 'mouseover',\n 'mousemove',\n 'mouseleave',\n 'mouseenter',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'dragenter',\n 'dragover',\n 'dragleave',\n 'drop',\n 'contextmenu',\n 'mousewheel',\n];\n// 是否有委托事件监听\nfunction hasDelegation(events, type) {\n for (var key in events) {\n if (events.hasOwnProperty(key) && key.indexOf(DELEGATION_SPLIT + type) >= 0) {\n return true;\n }\n }\n return false;\n}\n// 触发目标事件,目标只能是 shape 或 canvas\nfunction emitTargetEvent(target, type, eventObj) {\n eventObj.name = type;\n eventObj.target = target;\n eventObj.currentTarget = target;\n eventObj.delegateTarget = target;\n target.emit(type, eventObj);\n}\n// 事件冒泡, enter 和 leave 需要对 fromShape 和 toShape 进行判同\nfunction bubbleEvent(container, type, eventObj) {\n if (eventObj.bubbles) {\n var relativeShape = void 0;\n var isOverEvent = false;\n if (type === 'mouseenter') {\n relativeShape = eventObj.fromShape;\n isOverEvent = true;\n }\n else if (type === 'mouseleave') {\n isOverEvent = true;\n relativeShape = eventObj.toShape;\n }\n // canvas 上的 mouseenter, mouseleave 事件,仅当进入或者移出 canvas 时触发\n if (container.isCanvas() && isOverEvent) {\n return;\n }\n // 如果相关图形同当前图形在同一个容器内,不触发事件\n if (relativeShape && isParent(container, relativeShape)) {\n // 阻止继续向上冒泡\n eventObj.bubbles = false;\n return;\n }\n // 事件名称可能在委托过程中被修改,因此事件冒泡时需要重新设置事件名称\n eventObj.name = type;\n eventObj.currentTarget = container;\n eventObj.delegateTarget = container;\n container.emit(type, eventObj);\n }\n}\nvar EventController = /** @class */ (function () {\n function EventController(cfg) {\n var _this = this;\n // 正在被拖拽的图形\n this.draggingShape = null;\n this.dragging = false;\n // 当前鼠标/touch所在位置的图形\n this.currentShape = null;\n this.mousedownShape = null;\n this.mousedownPoint = null;\n // 统一处理所有的回调\n this._eventCallback = function (ev) {\n var type = ev.type;\n _this._triggerEvent(type, ev);\n };\n // 在 document 处理拖拽到画布外的事件,处理从图形上移除画布未被捕捉的问题\n this._onDocumentMove = function (ev) {\n var canvas = _this.canvas;\n var el = canvas.get('el');\n if (el !== ev.target) {\n // 不在 canvas 上移动\n if (_this.dragging || _this.currentShape) {\n var pointInfo = _this._getPointInfo(ev);\n // 还在拖拽过程中\n if (_this.dragging) {\n _this._emitEvent('drag', ev, pointInfo, _this.draggingShape);\n }\n // 说明从某个图形直接移动到了画布外面,\n // 修复了 mouseleave 的 bug 后不再出现这种情况\n // if (this.currentShape) {\n // this._emitEvent('mouseleave', ev, pointInfo, this.currentShape, this.currentShape, null);\n // this.currentShape = null;\n // }\n }\n }\n };\n // 在 document 上处理拖拽到外面,释放鼠标时触发 dragend\n this._onDocumentMouseUp = function (ev) {\n var canvas = _this.canvas;\n var el = canvas.get('el');\n if (el !== ev.target) {\n // 不在 canvas 上移动\n if (_this.dragging) {\n var pointInfo = _this._getPointInfo(ev);\n if (_this.draggingShape) {\n // 如果存在拖拽的图形,则也触发 drop 事件\n _this._emitEvent('drop', ev, pointInfo, null);\n }\n _this._emitEvent('dragend', ev, pointInfo, _this.draggingShape);\n _this._afterDrag(_this.draggingShape, pointInfo, ev);\n }\n }\n };\n this.canvas = cfg.canvas;\n }\n EventController.prototype.init = function () {\n this._bindEvents();\n };\n // 注册事件\n EventController.prototype._bindEvents = function () {\n var _this = this;\n var el = this.canvas.get('el');\n each(EVENTS, function (eventName) {\n el.addEventListener(eventName, _this._eventCallback);\n });\n if (document) {\n // 处理移动到外面没有触发 shape mouse leave 的事件\n // 处理拖拽到外部的问题\n document.addEventListener('mousemove', this._onDocumentMove);\n // 处理拖拽过程中在外部释放鼠标的问题\n document.addEventListener('mouseup', this._onDocumentMouseUp);\n }\n };\n // 清理事件\n EventController.prototype._clearEvents = function () {\n var _this = this;\n var el = this.canvas.get('el');\n each(EVENTS, function (eventName) {\n el.removeEventListener(eventName, _this._eventCallback);\n });\n if (document) {\n document.removeEventListener('mousemove', this._onDocumentMove);\n document.removeEventListener('mouseup', this._onDocumentMouseUp);\n }\n };\n EventController.prototype._getEventObj = function (type, event, point, target, fromShape, toShape) {\n var eventObj = new GraphEvent(type, event);\n eventObj.fromShape = fromShape;\n eventObj.toShape = toShape;\n eventObj.x = point.x;\n eventObj.y = point.y;\n eventObj.clientX = point.clientX;\n eventObj.clientY = point.clientY;\n eventObj.propagationPath.push(target);\n // 事件的x,y应该是基于画布左上角的,与canvas的matrix无关\n return eventObj;\n };\n // 根据点获取图形,提取成独立方法,便于后续优化\n EventController.prototype._getShape = function (point, ev) {\n return this.canvas.getShape(point.x, point.y, ev);\n };\n // 获取事件的当前点的信息\n EventController.prototype._getPointInfo = function (ev) {\n var canvas = this.canvas;\n var clientPoint = canvas.getClientByEvent(ev);\n var point = canvas.getPointByEvent(ev);\n return {\n x: point.x,\n y: point.y,\n clientX: clientPoint.x,\n clientY: clientPoint.y,\n };\n };\n // 触发事件\n EventController.prototype._triggerEvent = function (type, ev) {\n var pointInfo = this._getPointInfo(ev);\n // 每次都获取图形有一定成本,后期可以考虑进行缓存策略\n var shape = this._getShape(pointInfo, ev);\n var method = this[\"_on\" + type];\n var leaveCanvas = false;\n if (method) {\n method.call(this, pointInfo, shape, ev);\n }\n else {\n var preShape = this.currentShape;\n // 如果进入、移出画布时存在图形,则要分别触发事件\n if (type === 'mouseenter' || type === 'dragenter' || type === 'mouseover') {\n this._emitEvent(type, ev, pointInfo, null, null, shape); // 先进入画布\n if (shape) {\n this._emitEvent(type, ev, pointInfo, shape, null, shape); // 再触发图形的事件\n }\n if (type === 'mouseenter' && this.draggingShape) {\n // 如果正在拖拽图形, 则触发 dragleave\n this._emitEvent('dragenter', ev, pointInfo, null);\n }\n }\n else if (type === 'mouseleave' || type === 'dragleave' || type === 'mouseout') {\n leaveCanvas = true;\n if (preShape) {\n this._emitEvent(type, ev, pointInfo, preShape, preShape, null); // 先触发图形的事件\n }\n this._emitEvent(type, ev, pointInfo, null, preShape, null); // 再触发离开画布事件\n if (type === 'mouseleave' && this.draggingShape) {\n this._emitEvent('dragleave', ev, pointInfo, null);\n }\n }\n else {\n this._emitEvent(type, ev, pointInfo, shape, null, null); // 一般事件中不需要考虑 from, to\n }\n }\n if (!leaveCanvas) {\n this.currentShape = shape;\n }\n // 当鼠标从画布移动到 shape 或者从 preShape 移动到 shape 时,应用 shape 上的鼠标样式\n if (shape && !shape.get('destroyed')) {\n var canvas = this.canvas;\n var el = canvas.get('el');\n el.style.cursor = shape.attr('cursor') || canvas.get('cursor');\n }\n };\n // 记录下点击的位置、图形,便于拖拽事件、click 事件的判定\n EventController.prototype._onmousedown = function (pointInfo, shape, event) {\n // 只有鼠标左键的 mousedown 事件才会设置 mousedownShape 等属性,避免鼠标右键的 mousedown 事件引起其他事件发生\n if (event.button === LEFT_BTN_CODE) {\n this.mousedownShape = shape;\n this.mousedownPoint = pointInfo;\n this.mousedownTimeStamp = event.timeStamp;\n }\n this._emitEvent('mousedown', event, pointInfo, shape, null, null); // mousedown 不考虑fromShape, toShape\n };\n // mouseleave 和 mouseenter 都是成对存在的\n // mouseenter 和 mouseover 同时触发\n EventController.prototype._emitMouseoverEvents = function (event, pointInfo, fromShape, toShape) {\n var el = this.canvas.get('el');\n if (fromShape !== toShape) {\n if (fromShape) {\n this._emitEvent('mouseout', event, pointInfo, fromShape, fromShape, toShape);\n this._emitEvent('mouseleave', event, pointInfo, fromShape, fromShape, toShape);\n // 当鼠标从 fromShape 移动到画布上时,重置鼠标样式\n if (!toShape || toShape.get('destroyed')) {\n el.style.cursor = this.canvas.get('cursor');\n }\n }\n if (toShape) {\n this._emitEvent('mouseover', event, pointInfo, toShape, fromShape, toShape);\n this._emitEvent('mouseenter', event, pointInfo, toShape, fromShape, toShape);\n }\n }\n };\n // dragover 不等同于 mouseover,而等同于 mousemove\n EventController.prototype._emitDragoverEvents = function (event, pointInfo, fromShape, toShape, isCanvasEmit) {\n if (toShape) {\n if (toShape !== fromShape) {\n if (fromShape) {\n this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape);\n }\n this._emitEvent('dragenter', event, pointInfo, toShape, fromShape, toShape);\n }\n if (!isCanvasEmit) {\n this._emitEvent('dragover', event, pointInfo, toShape);\n }\n }\n else if (fromShape) {\n // TODO: 此处判断有问题,当 drag 图形时,也会触发一次 dragleave 事件,因为此时 toShape 为 null,这不是所期望的\n // 经过空白区域\n this._emitEvent('dragleave', event, pointInfo, fromShape, fromShape, toShape);\n }\n if (isCanvasEmit) {\n this._emitEvent('dragover', event, pointInfo, toShape);\n }\n };\n // drag 完成后,需要做一些清理工作\n EventController.prototype._afterDrag = function (draggingShape, pointInfo, event) {\n if (draggingShape) {\n draggingShape.set('capture', true); // 恢复可以拾取\n this.draggingShape = null;\n }\n this.dragging = false;\n // drag 完成后,有可能 draggingShape 已经移动到了当前位置,所以不能直接取当前图形\n var shape = this._getShape(pointInfo, event);\n // 拖拽完成后,进行 enter,leave 的判定\n if (shape !== draggingShape) {\n this._emitMouseoverEvents(event, pointInfo, draggingShape, shape);\n }\n this.currentShape = shape; // 更新当前 shape,如果不处理当前图形的 mouseleave 事件可能会出问题\n };\n // 按键抬起时,会终止拖拽、触发点击\n EventController.prototype._onmouseup = function (pointInfo, shape, event) {\n // eevent.button === 0 表示鼠标左键事件,此处加上判断主要是为了避免右键鼠标会触发 mouseup 和 click 事件\n // ref: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button === LEFT_BTN_CODE) {\n var draggingShape = this.draggingShape;\n if (this.dragging) {\n // 存在可以拖拽的图形,同时拖拽到其他图形上时触发 drag 事件\n if (draggingShape) {\n this._emitEvent('drop', event, pointInfo, shape);\n }\n this._emitEvent('dragend', event, pointInfo, draggingShape);\n this._afterDrag(draggingShape, pointInfo, event);\n }\n else {\n this._emitEvent('mouseup', event, pointInfo, shape); // 先触发 mouseup 再触发 click\n if (shape === this.mousedownShape) {\n this._emitEvent('click', event, pointInfo, shape);\n }\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n }\n };\n // 当触发浏览器的 dragover 事件时,不会再触发 mousemove ,所以这时候的 dragenter, dragleave 事件需要重新处理\n EventController.prototype._ondragover = function (pointInfo, shape, event) {\n event.preventDefault(); // 如果不对 dragover 进行 preventDefault,则不会在 canvas 上触发 drop 事件\n var preShape = this.currentShape;\n this._emitDragoverEvents(event, pointInfo, preShape, shape, true);\n };\n // 大量的图形事件,都通过 mousemove 模拟\n EventController.prototype._onmousemove = function (pointInfo, shape, event) {\n var canvas = this.canvas;\n var preShape = this.currentShape;\n var draggingShape = this.draggingShape;\n // 正在拖拽时\n if (this.dragging) {\n // 正在拖拽中\n if (draggingShape) {\n // 如果拖拽了 shape 会触发 dragenter, dragleave, dragover 和 drag 事件\n this._emitDragoverEvents(event, pointInfo, preShape, shape, false);\n }\n // 如果存在 draggingShape 则会在 draggingShape 上触发 drag 事件,冒泡到 canvas 上\n // 否则在 canvas 上触发 drag 事件\n this._emitEvent('drag', event, pointInfo, draggingShape);\n }\n else {\n var mousedownPoint = this.mousedownPoint;\n if (mousedownPoint) {\n // 当鼠标点击下去,同时移动时,进行 drag 判定\n var mousedownShape = this.mousedownShape;\n var now = event.timeStamp;\n var timeWindow = now - this.mousedownTimeStamp;\n var dx = mousedownPoint.clientX - pointInfo.clientX;\n var dy = mousedownPoint.clientY - pointInfo.clientY;\n var dist = dx * dx + dy * dy;\n if (timeWindow > 120 || dist > CLICK_OFFSET) {\n if (mousedownShape && mousedownShape.get('draggable')) {\n // 设置了 draggable 的 shape 才能触发 drag 相关的事件\n draggingShape = this.mousedownShape; // 拖动鼠标点下时的 shape\n draggingShape.set('capture', false); // 禁止继续拾取,否则无法进行 dragover,dragenter,dragleave,drop的判定\n this.draggingShape = draggingShape;\n this.dragging = true;\n this._emitEvent('dragstart', event, pointInfo, draggingShape);\n // 清理按下鼠标时缓存的值\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n else if (!mousedownShape && canvas.get('draggable')) {\n // 设置了 draggable 的 canvas 才能触发 drag 相关的事件\n this.dragging = true;\n this._emitEvent('dragstart', event, pointInfo, null);\n // 清理按下鼠标时缓存的值\n this.mousedownShape = null;\n this.mousedownPoint = null;\n }\n else {\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n else {\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n else {\n // 没有按键按下时,则直接触发 mouse over 相关的各种事件\n this._emitMouseoverEvents(event, pointInfo, preShape, shape);\n // 始终触发移动\n this._emitEvent('mousemove', event, pointInfo, shape);\n }\n }\n };\n // 触发事件\n EventController.prototype._emitEvent = function (type, event, pointInfo, shape, fromShape, toShape) {\n var eventObj = this._getEventObj(type, event, pointInfo, shape, fromShape, toShape);\n // 存在 shape 触发,则进行冒泡处理\n if (shape) {\n eventObj.shape = shape;\n // 触发 shape 上的事件\n emitTargetEvent(shape, type, eventObj);\n var parent_1 = shape.getParent();\n // 执行冒泡\n while (parent_1) {\n // 委托事件要先触发\n parent_1.emitDelegation(type, eventObj);\n // 事件冒泡停止,不能妨碍委托事件\n if (!eventObj.propagationStopped) {\n bubbleEvent(parent_1, type, eventObj);\n }\n eventObj.propagationPath.push(parent_1);\n parent_1 = parent_1.getParent();\n }\n }\n else {\n // 如果没有 shape 直接在 canvas 上触发\n var canvas = this.canvas;\n // 直接触发 canvas 上的事件\n emitTargetEvent(canvas, type, eventObj);\n }\n };\n EventController.prototype.destroy = function () {\n // 清理事件\n this._clearEvents();\n // 清理缓存的对象\n this.canvas = null;\n this.currentShape = null;\n this.draggingShape = null;\n this.mousedownPoint = null;\n this.mousedownShape = null;\n this.mousedownTimeStamp = null;\n };\n return EventController;\n}());\nexport default EventController;\n//# sourceMappingURL=event-contoller.js.map","import { __extends } from \"tslib\";\nimport { detect } from 'detect-browser';\nimport Container from './container';\nimport { isBrowser, isNil, isString } from '../util/util';\nimport Timeline from '../animate/timeline';\nimport EventController from '../event/event-contoller';\nvar PX_SUFFIX = 'px';\nvar browser = detect();\nvar isFirefox = browser && browser.name === 'firefox';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas(cfg) {\n var _this = _super.call(this, cfg) || this;\n _this.initContainer();\n _this.initDom();\n _this.initEvents();\n _this.initTimeline();\n return _this;\n }\n Canvas.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // set default cursor style for canvas\n cfg['cursor'] = 'default';\n // CSS transform 目前尚未经过长时间验证,为了避免影响上层业务,默认关闭,上层按需开启\n cfg['supportCSSTransform'] = false;\n return cfg;\n };\n /**\n * @protected\n * 初始化容器\n */\n Canvas.prototype.initContainer = function () {\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n this.set('container', container);\n }\n };\n /**\n * @protected\n * 初始化 DOM\n */\n Canvas.prototype.initDom = function () {\n var el = this.createDom();\n this.set('el', el);\n // 附加到容器\n var container = this.get('container');\n container.appendChild(el);\n // 设置初始宽度\n this.setDOMSize(this.get('width'), this.get('height'));\n };\n /**\n * @protected\n * 初始化绑定的事件\n */\n Canvas.prototype.initEvents = function () {\n var eventController = new EventController({\n canvas: this,\n });\n eventController.init();\n this.set('eventController', eventController);\n };\n /**\n * @protected\n * 初始化时间轴\n */\n Canvas.prototype.initTimeline = function () {\n var timeline = new Timeline(this);\n this.set('timeline', timeline);\n };\n /**\n * @protected\n * 修改画布对应的 DOM 的大小\n * @param {number} width 宽度\n * @param {number} height 高度\n */\n Canvas.prototype.setDOMSize = function (width, height) {\n var el = this.get('el');\n if (isBrowser) {\n el.style.width = width + PX_SUFFIX;\n el.style.height = height + PX_SUFFIX;\n }\n };\n // 实现接口\n Canvas.prototype.changeSize = function (width, height) {\n this.setDOMSize(width, height);\n this.set('width', width);\n this.set('height', height);\n this.onCanvasChange('changeSize');\n };\n /**\n * 获取当前的渲染引擎\n * @return {Renderer} 返回当前的渲染引擎\n */\n Canvas.prototype.getRenderer = function () {\n return this.get('renderer');\n };\n /**\n * 获取画布的 cursor 样式\n * @return {Cursor}\n */\n Canvas.prototype.getCursor = function () {\n return this.get('cursor');\n };\n /**\n * 设置画布的 cursor 样式\n * @param {Cursor} cursor cursor 样式\n */\n Canvas.prototype.setCursor = function (cursor) {\n this.set('cursor', cursor);\n var el = this.get('el');\n if (isBrowser && el) {\n // 直接设置样式,不等待鼠标移动时再设置\n el.style.cursor = cursor;\n }\n };\n // 实现接口\n Canvas.prototype.getPointByEvent = function (ev) {\n var supportCSSTransform = this.get('supportCSSTransform');\n if (supportCSSTransform) {\n // For Firefox <= 38\n if (isFirefox && !isNil(ev.layerX) && ev.layerX !== ev.offsetX) {\n return {\n x: ev.layerX,\n y: ev.layerY,\n };\n }\n if (!isNil(ev.offsetX)) {\n // For IE6+, Firefox >= 39, Chrome, Safari, Opera\n return {\n x: ev.offsetX,\n y: ev.offsetY,\n };\n }\n }\n // should calculate by self for other cases, like Safari in ios\n // TODO: support CSS transform\n var _a = this.getClientByEvent(ev), clientX = _a.x, clientY = _a.y;\n return this.getPointByClient(clientX, clientY);\n };\n // 获取 touch 事件的 clientX 和 clientY 需要单独处理\n Canvas.prototype.getClientByEvent = function (ev) {\n var clientInfo = ev;\n if (ev.touches) {\n if (ev.type === 'touchend') {\n clientInfo = ev.changedTouches[0];\n }\n else {\n clientInfo = ev.touches[0];\n }\n }\n return {\n x: clientInfo.clientX,\n y: clientInfo.clientY,\n };\n };\n // 实现接口\n Canvas.prototype.getPointByClient = function (clientX, clientY) {\n var el = this.get('el');\n var bbox = el.getBoundingClientRect();\n return {\n x: clientX - bbox.left,\n y: clientY - bbox.top,\n };\n };\n // 实现接口\n Canvas.prototype.getClientByPoint = function (x, y) {\n var el = this.get('el');\n var bbox = el.getBoundingClientRect();\n return {\n x: x + bbox.left,\n y: y + bbox.top,\n };\n };\n // 实现接口\n Canvas.prototype.draw = function () { };\n /**\n * @protected\n * 销毁 DOM 容器\n */\n Canvas.prototype.removeDom = function () {\n var el = this.get('el');\n el.parentNode.removeChild(el);\n };\n /**\n * @protected\n * 清理所有的事件\n */\n Canvas.prototype.clearEvents = function () {\n var eventController = this.get('eventController');\n eventController.destroy();\n };\n Canvas.prototype.isCanvas = function () {\n return true;\n };\n Canvas.prototype.getParent = function () {\n return null;\n };\n Canvas.prototype.destroy = function () {\n var timeline = this.get('timeline');\n if (this.get('destroyed')) {\n return;\n }\n this.clear();\n // 同初始化时相反顺序调用\n if (timeline) {\n // 画布销毁时自动停止动画\n timeline.stop();\n }\n this.clearEvents();\n this.removeDom();\n _super.prototype.destroy.call(this);\n };\n return Canvas;\n}(Container));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","import { __extends } from \"tslib\";\nimport Container from './container';\nvar AbstractGroup = /** @class */ (function (_super) {\n __extends(AbstractGroup, _super);\n function AbstractGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractGroup.prototype.isGroup = function () {\n return true;\n };\n AbstractGroup.prototype.isEntityGroup = function () {\n return false;\n };\n AbstractGroup.prototype.clone = function () {\n var clone = _super.prototype.clone.call(this);\n // 获取构造函数\n var children = this.getChildren();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n clone.add(child.clone());\n }\n return clone;\n };\n return AbstractGroup;\n}(Container));\nexport default AbstractGroup;\n//# sourceMappingURL=group.js.map","import { __extends } from \"tslib\";\nimport Element from './element';\nimport { multiplyVec2 } from '../util/matrix';\nvar AbstractShape = /** @class */ (function (_super) {\n __extends(AbstractShape, _super);\n function AbstractShape(cfg) {\n return _super.call(this, cfg) || this;\n }\n // 是否在包围盒内\n AbstractShape.prototype._isInBBox = function (refX, refY) {\n var bbox = this.getBBox();\n return bbox.minX <= refX && bbox.maxX >= refX && bbox.minY <= refY && bbox.maxY >= refY;\n };\n /**\n * 属性更改后需要做的事情\n * @protected\n * @param {ShapeAttrs} targetAttrs 渲染的图像属性\n */\n AbstractShape.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n this.clearCacheBBox();\n };\n // 计算包围盒时,需要缓存,这是一个高频的操作\n AbstractShape.prototype.getBBox = function () {\n var bbox = this.cfg.bbox;\n if (!bbox) {\n bbox = this.calculateBBox();\n this.set('bbox', bbox);\n }\n return bbox;\n };\n // 计算相对于画布的包围盒\n AbstractShape.prototype.getCanvasBBox = function () {\n var canvasBBox = this.cfg.canvasBBox;\n if (!canvasBBox) {\n canvasBBox = this.calculateCanvasBBox();\n this.set('canvasBBox', canvasBBox);\n }\n return canvasBBox;\n };\n AbstractShape.prototype.applyMatrix = function (matrix) {\n _super.prototype.applyMatrix.call(this, matrix);\n // 清理掉缓存的包围盒\n this.set('canvasBBox', null);\n };\n /**\n * 计算相对于画布的包围盒,默认等同于 bbox\n * @return {BBox} 包围盒\n */\n AbstractShape.prototype.calculateCanvasBBox = function () {\n var bbox = this.getBBox();\n var totalMatrix = this.getTotalMatrix();\n var minX = bbox.minX, minY = bbox.minY, maxX = bbox.maxX, maxY = bbox.maxY;\n if (totalMatrix) {\n var topLeft = multiplyVec2(totalMatrix, [bbox.minX, bbox.minY]);\n var topRight = multiplyVec2(totalMatrix, [bbox.maxX, bbox.minY]);\n var bottomLeft = multiplyVec2(totalMatrix, [bbox.minX, bbox.maxY]);\n var bottomRight = multiplyVec2(totalMatrix, [bbox.maxX, bbox.maxY]);\n minX = Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);\n maxX = Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]);\n minY = Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);\n maxY = Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]);\n }\n var attrs = this.attrs;\n // 如果存在 shadow 则计算 shadow\n if (attrs.shadowColor) {\n var _a = attrs.shadowBlur, shadowBlur = _a === void 0 ? 0 : _a, _b = attrs.shadowOffsetX, shadowOffsetX = _b === void 0 ? 0 : _b, _c = attrs.shadowOffsetY, shadowOffsetY = _c === void 0 ? 0 : _c;\n var shadowLeft = minX - shadowBlur + shadowOffsetX;\n var shadowRight = maxX + shadowBlur + shadowOffsetX;\n var shadowTop = minY - shadowBlur + shadowOffsetY;\n var shadowBottom = maxY + shadowBlur + shadowOffsetY;\n minX = Math.min(minX, shadowLeft);\n maxX = Math.max(maxX, shadowRight);\n minY = Math.min(minY, shadowTop);\n maxY = Math.max(maxY, shadowBottom);\n }\n return {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n };\n /**\n * @protected\n * 清理缓存的 bbox\n */\n AbstractShape.prototype.clearCacheBBox = function () {\n this.set('bbox', null);\n this.set('canvasBBox', null);\n };\n // 实现接口\n AbstractShape.prototype.isClipShape = function () {\n return this.get('isClipShape');\n };\n /**\n * @protected\n * 不同的图形自己实现是否在图形内部的逻辑,要判断边和填充区域\n * @param {number} refX 相对于图形的坐标 x\n * @param {number} refY 相对于图形的坐标 Y\n * @return {boolean} 点是否在图形内部\n */\n AbstractShape.prototype.isInShape = function (refX, refY) {\n return false;\n };\n /**\n * 是否仅仅使用 BBox 检测就可以判定拾取到图形\n * 默认是 false,但是有些图形例如 image、marker 等都可直接使用 BBox 的检测而不需要使用图形拾取\n * @return {Boolean} 仅仅使用 BBox 进行拾取\n */\n AbstractShape.prototype.isOnlyHitBox = function () {\n return false;\n };\n // 不同的 Shape 各自实现\n AbstractShape.prototype.isHit = function (x, y) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n var vec = [x, y, 1];\n vec = this.invertFromMatrix(vec);\n var refX = vec[0], refY = vec[1];\n var inBBox = this._isInBBox(refX, refY);\n // 跳过图形的拾取,在某些图形中可以省略一倍的检测成本\n if (this.isOnlyHitBox()) {\n return inBBox;\n }\n // 被裁减掉的和不在包围盒内的不进行计算\n if (inBBox && !this.isClipped(refX, refY)) {\n // 对图形进行拾取判断\n if (this.isInShape(refX, refY)) {\n return true;\n }\n // 对起始箭头进行拾取判断\n if (startArrowShape && startArrowShape.isHit(refX, refY)) {\n return true;\n }\n // 对结束箭头进行拾取判断\n if (endArrowShape && endArrowShape.isHit(refX, refY)) {\n return true;\n }\n }\n return false;\n };\n return AbstractShape;\n}(Element));\nexport default AbstractShape;\n//# sourceMappingURL=shape.js.map","var cache = new Map();\n/**\n * 注册计算包围盒的算法\n * @param type 方法名\n * @param method 方法\n */\nexport function register(type, method) {\n cache.set(type, method);\n}\n/**\n * 获取计算包围盒的算法\n * @param type 方法名\n */\nexport function getMethod(type) {\n return cache.get(type);\n}\n//# sourceMappingURL=register.js.map","export default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, width = attrs.width, height = attrs.height;\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n };\n}\n//# sourceMappingURL=rect.js.map","export default function (shape) {\n var _a = shape.attr(), x = _a.x, y = _a.y, r = _a.r;\n return {\n x: x - r,\n y: y - r,\n width: r * 2,\n height: r * 2,\n };\n}\n//# sourceMappingURL=circle.js.map","import { max, min } from '@antv/util';\n/**\n * 两点之间的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\nexport function distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\nexport function isNumberEqual(v1, v2) {\n return Math.abs(v1 - v2) < 0.001;\n}\nexport function getBBoxByArray(xArr, yArr) {\n var minX = min(xArr);\n var minY = min(yArr);\n var maxX = max(xArr);\n var maxY = max(yArr);\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\nexport function getBBoxRange(x1, y1, x2, y2) {\n return {\n minX: min([x1, x2]),\n maxX: max([x1, x2]),\n minY: min([y1, y2]),\n maxY: max([y1, y2]),\n };\n}\nexport function piMod(angle) {\n return (angle + Math.PI * 2) % (Math.PI * 2);\n}\n//# sourceMappingURL=util.js.map","import { distance, getBBoxByArray } from './util';\nimport * as vec2 from 'gl-matrix/vec2';\nexport default {\n /**\n * 计算线段的包围盒\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {object} 包围盒对象\n */\n box: function (x1, y1, x2, y2) {\n return getBBoxByArray([x1, x2], [y1, y2]);\n },\n /**\n * 线段的长度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 距离\n */\n length: function (x1, y1, x2, y2) {\n return distance(x1, y1, x2, y2);\n },\n /**\n * 根据比例获取点\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} t 指定比例\n * @return {object} 包含 x, y 的点\n */\n pointAt: function (x1, y1, x2, y2, t) {\n return {\n x: (1 - t) * x1 + t * x2,\n y: (1 - t) * y1 + t * y2,\n };\n },\n /**\n * 点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointDistance: function (x1, y1, x2, y2, x, y) {\n // 投影距离 x1, y1 的向量,假设 p, p1, p2 三个点,投影点为 a\n // p1a = p1p.p1p2/|p1p2| * (p1p 的单位向量)\n var cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1);\n if (cross < 0) {\n return distance(x1, y1, x, y);\n }\n var lengthSquare = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);\n if (cross > lengthSquare) {\n return distance(x2, y2, x, y);\n }\n return this.pointToLine(x1, y1, x2, y2, x, y);\n },\n /**\n * 点到直线的距离,而不是点到线段的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @param {number} x 测试点 x\n * @param {number} y 测试点 y\n * @return {number} 距离\n */\n pointToLine: function (x1, y1, x2, y2, x, y) {\n var d = [x2 - x1, y2 - y1];\n // 如果端点相等,则判定点到点的距离\n if (vec2.exactEquals(d, [0, 0])) {\n return Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n }\n var u = [-d[1], d[0]];\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n return Math.abs(vec2.dot(a, u));\n },\n /**\n * 线段的角度\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n * @return {number} 导数\n */\n tangentAngle: function (x1, y1, x2, y2) {\n return Math.atan2(y2 - y1, x2 - x1);\n },\n};\n//# sourceMappingURL=line.js.map","import { distance } from './util';\nvar EPSILON = 0.0001;\n/**\n * 使用牛顿切割法求最近的点\n * @param {number[]} xArr 点的 x 数组\n * @param {number[]} yArr 点的 y 数组\n * @param {number} x 指定的点 x\n * @param {number} y 指定的点 y\n * @param {Function} tCallback 差值函数\n */\nexport function nearestPoint(xArr, yArr, x, y, tCallback, length) {\n var t;\n var d = Infinity;\n var v0 = [x, y];\n var segNum = 20;\n if (length && length > 200) {\n segNum = length / 10;\n }\n var increaseRate = 1 / segNum;\n var interval = increaseRate / 10;\n for (var i = 0; i <= segNum; i++) {\n var _t = i * increaseRate;\n var v1 = [tCallback.apply(null, xArr.concat([_t])), tCallback.apply(null, yArr.concat([_t]))];\n var d1 = distance(v0[0], v0[1], v1[0], v1[1]);\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n // 提前终止\n if (t === 0) {\n return {\n x: xArr[0],\n y: yArr[0],\n };\n }\n if (t === 1) {\n var count = xArr.length;\n return {\n x: xArr[count - 1],\n y: yArr[count - 1],\n };\n }\n d = Infinity;\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n var prev = t - interval;\n var next = t + interval;\n var v1 = [tCallback.apply(null, xArr.concat([prev])), tCallback.apply(null, yArr.concat([prev]))];\n var d1 = distance(v0[0], v0[1], v1[0], v1[1]);\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n }\n else {\n var v2 = [tCallback.apply(null, xArr.concat([next])), tCallback.apply(null, yArr.concat([next]))];\n var d2 = distance(v0[0], v0[1], v2[0], v2[1]);\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n }\n else {\n interval *= 0.5;\n }\n }\n }\n return {\n x: tCallback.apply(null, xArr.concat([t])),\n y: tCallback.apply(null, yArr.concat([t])),\n };\n}\n// 近似求解 https://community.khronos.org/t/3d-cubic-bezier-segment-length/62363/2\nexport function snapLength(xArr, yArr) {\n var totalLength = 0;\n var count = xArr.length;\n for (var i = 0; i < count; i++) {\n var x = xArr[i];\n var y = yArr[i];\n var nextX = xArr[(i + 1) % count];\n var nextY = yArr[(i + 1) % count];\n totalLength += distance(x, y, nextX, nextY);\n }\n return totalLength / 2;\n}\n//# sourceMappingURL=bezier.js.map","import line from './line';\nimport { distance, isNumberEqual, getBBoxByArray, piMod } from './util';\nimport { nearestPoint } from './bezier';\n// 差值公式\nfunction quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * onet * p0 + 2 * t * onet * p1 + t * t * p2;\n}\n// 求极值\nfunction extrema(p0, p1, p2) {\n var a = p0 + p2 - 2 * p1;\n if (isNumberEqual(a, 0)) {\n return [0.5];\n }\n var rst = (p0 - p1) / a;\n if (rst <= 1 && rst >= 0) {\n return [rst];\n }\n return [];\n}\nfunction derivativeAt(p0, p1, p2, t) {\n return 2 * (1 - t) * (p1 - p0) + 2 * t * (p2 - p1);\n}\n// 分割贝塞尔曲线\nfunction divideQuadratic(x1, y1, x2, y2, x3, y3, t) {\n // 划分点\n var xt = quadraticAt(x1, x2, x3, t);\n var yt = quadraticAt(y1, y2, y3, t);\n // 分割的第一条曲线的控制点\n var controlPoint1 = line.pointAt(x1, y1, x2, y2, t);\n // 分割的第二条曲线的控制点\n var controlPoint2 = line.pointAt(x2, y2, x3, y3, t);\n return [\n [x1, y1, controlPoint1.x, controlPoint1.y, xt, yt],\n [xt, yt, controlPoint2.x, controlPoint2.y, x3, y3],\n ];\n}\n// 使用迭代法取贝塞尔曲线的长度\nfunction quadraticLength(x1, y1, x2, y2, x3, y3, iterationCount) {\n if (iterationCount === 0) {\n return (distance(x1, y1, x2, y2) + distance(x2, y2, x3, y3) + distance(x1, y1, x3, y3)) / 2;\n }\n var quadratics = divideQuadratic(x1, y1, x2, y2, x3, y3, 0.5);\n var left = quadratics[0];\n var right = quadratics[1];\n left.push(iterationCount - 1);\n right.push(iterationCount - 1);\n return quadraticLength.apply(null, left) + quadraticLength.apply(null, right);\n}\nexport default {\n box: function (x1, y1, x2, y2, x3, y3) {\n var xExtrema = extrema(x1, x2, x3)[0];\n var yExtrema = extrema(y1, y2, y3)[0];\n // 控制点不加入 box 的计算\n var xArr = [x1, x3];\n var yArr = [y1, y3];\n if (xExtrema !== undefined) {\n xArr.push(quadraticAt(x1, x2, x3, xExtrema));\n }\n if (yExtrema !== undefined) {\n yArr.push(quadraticAt(y1, y2, y3, yExtrema));\n }\n return getBBoxByArray(xArr, yArr);\n },\n length: function (x1, y1, x2, y2, x3, y3) {\n return quadraticLength(x1, y1, x2, y2, x3, y3, 3);\n },\n nearestPoint: function (x1, y1, x2, y2, x3, y3, x0, y0) {\n return nearestPoint([x1, x2, x3], [y1, y2, y3], x0, y0, quadraticAt);\n },\n pointDistance: function (x1, y1, x2, y2, x3, y3, x0, y0) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x0, y0);\n return distance(point.x, point.y, x0, y0);\n },\n interpolationAt: quadraticAt,\n pointAt: function (x1, y1, x2, y2, x3, y3, t) {\n return {\n x: quadraticAt(x1, x2, x3, t),\n y: quadraticAt(y1, y2, y3, t),\n };\n },\n divide: function (x1, y1, x2, y2, x3, y3, t) {\n return divideQuadratic(x1, y1, x2, y2, x3, y3, t);\n },\n tangentAngle: function (x1, y1, x2, y2, x3, y3, t) {\n var dx = derivativeAt(x1, x2, x3, t);\n var dy = derivativeAt(y1, y2, y3, t);\n var angle = Math.atan2(dy, dx);\n return piMod(angle);\n },\n};\n//# sourceMappingURL=quadratic.js.map","import { distance, isNumberEqual, getBBoxByArray, piMod } from './util';\nimport line from './line';\nimport { snapLength, nearestPoint } from './bezier';\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t; // t * t * t 的性能大概是 Math.pow(t, 3) 的三倍\n return onet * onet * onet * p0 + 3 * p1 * t * onet * onet + 3 * p2 * t * t * onet + p3 * t * t * t;\n}\nfunction derivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (onet * onet * (p1 - p0) + 2 * onet * t * (p2 - p1) + t * t * (p3 - p2));\n}\nfunction extrema(p0, p1, p2, p3) {\n var a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n var b = 6 * p0 - 12 * p1 + 6 * p2;\n var c = 3 * p1 - 3 * p0;\n var extremas = [];\n var t1;\n var t2;\n var discSqrt;\n if (isNumberEqual(a, 0)) {\n if (!isNumberEqual(b, 0)) {\n t1 = -c / b;\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n }\n }\n else {\n var disc = b * b - 4 * a * c;\n if (isNumberEqual(disc, 0)) {\n extremas.push(-b / (2 * a));\n }\n else if (disc > 0) {\n discSqrt = Math.sqrt(disc);\n t1 = (-b + discSqrt) / (2 * a);\n t2 = (-b - discSqrt) / (2 * a);\n if (t1 >= 0 && t1 <= 1) {\n extremas.push(t1);\n }\n if (t2 >= 0 && t2 <= 1) {\n extremas.push(t2);\n }\n }\n }\n return extremas;\n}\n// 分割贝塞尔曲线\nfunction divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t) {\n // 划分点\n var xt = cubicAt(x1, x2, x3, x4, t);\n var yt = cubicAt(y1, y2, y3, y4, t);\n // 计算两点之间的差值点\n var c1 = line.pointAt(x1, y1, x2, y2, t);\n var c2 = line.pointAt(x2, y2, x3, y3, t);\n var c3 = line.pointAt(x3, y3, x4, y4, t);\n var c12 = line.pointAt(c1.x, c1.y, c2.x, c2.y, t);\n var c23 = line.pointAt(c2.x, c2.y, c3.x, c3.y, t);\n return [\n [x1, y1, c1.x, c1.y, c12.x, c12.y, xt, yt],\n [xt, yt, c23.x, c23.y, c3.x, c3.y, x4, y4],\n ];\n}\n// 使用迭代法取贝塞尔曲线的长度,二阶和三阶分开写,更清晰和便于调试\nfunction cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, iterationCount) {\n if (iterationCount === 0) {\n return snapLength([x1, x2, x3, x4], [y1, y2, y3, y4]);\n }\n var cubics = divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, 0.5);\n var left = cubics[0];\n var right = cubics[1];\n left.push(iterationCount - 1);\n right.push(iterationCount - 1);\n return cubicLength.apply(null, left) + cubicLength.apply(null, right);\n}\nexport default {\n extrema: extrema,\n box: function (x1, y1, x2, y2, x3, y3, x4, y4) {\n var xArr = [x1, x4];\n var yArr = [y1, y4];\n var xExtrema = extrema(x1, x2, x3, x4);\n var yExtrema = extrema(y1, y2, y3, y4);\n for (var i = 0; i < xExtrema.length; i++) {\n xArr.push(cubicAt(x1, x2, x3, x4, xExtrema[i]));\n }\n for (var i = 0; i < yExtrema.length; i++) {\n yArr.push(cubicAt(y1, y2, y3, y4, yExtrema[i]));\n }\n return getBBoxByArray(xArr, yArr);\n },\n length: function (x1, y1, x2, y2, x3, y3, x4, y4) {\n // 迭代三次,划分成 8 段求长度\n return cubicLength(x1, y1, x2, y2, x3, y3, x4, y4, 3);\n },\n nearestPoint: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n return nearestPoint([x1, x2, x3, x4], [y1, y2, y3, y4], x0, y0, cubicAt, length);\n },\n pointDistance: function (x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length) {\n var point = this.nearestPoint(x1, y1, x2, y2, x3, y3, x4, y4, x0, y0, length);\n return distance(point.x, point.y, x0, y0);\n },\n interpolationAt: cubicAt,\n pointAt: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return {\n x: cubicAt(x1, x2, x3, x4, t),\n y: cubicAt(y1, y2, y3, y4, t),\n };\n },\n divide: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n return divideCubic(x1, y1, x2, y2, x3, y3, x4, y4, t);\n },\n tangentAngle: function (x1, y1, x2, y2, x3, y3, x4, y4, t) {\n var dx = derivativeAt(x1, x2, x3, x4, t);\n var dy = derivativeAt(y1, y2, y3, y4, t);\n return piMod(Math.atan2(dy, dx));\n },\n};\n//# sourceMappingURL=cubic.js.map","/**\n * @fileoverview 椭圆的一些计算,\n * - 周长计算参考:https://www.mathsisfun.com/geometry/ellipse-perimeter.html\n * - 距离计算参考:https://wet-robots.ghost.io/simple-method-for-distance-to-ellipse/\n * @author dxq613@gmail.com\n */\nimport { distance, piMod } from './util';\nfunction copysign(v1, v2) {\n var absv = Math.abs(v1);\n return v2 > 0 ? absv : absv * -1;\n}\nexport default {\n /**\n * 包围盒计算\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {object} 包围盒\n */\n box: function (x, y, rx, ry) {\n return {\n x: x - rx,\n y: y - ry,\n width: rx * 2,\n height: ry * 2,\n };\n },\n /**\n * 计算周长,使用近似法\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @return {number} 椭圆周长\n */\n length: function (x, y, rx, ry) {\n return Math.PI * (3 * (rx + ry) - Math.sqrt((3 * rx + ry) * (rx + 3 * ry)));\n },\n /**\n * 距离椭圆最近的点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {object} 椭圆上距离指定点最近的点\n */\n nearestPoint: function (x, y, rx, ry, x0, y0) {\n var a = rx;\n var b = ry;\n // 假如椭圆半径为0则返回圆心\n if (a === 0 || b === 0) {\n return {\n x: x,\n y: y,\n };\n }\n // 转换成 0, 0 为中心的椭圆计算\n var relativeX = x0 - x;\n var relativeY = y0 - y;\n var px = Math.abs(relativeX);\n var py = Math.abs(relativeY);\n var squareA = a * a;\n var squareB = b * b;\n // const angle0 = Math.atan2(relativeY, relativeX);\n var t = Math.PI / 4;\n var nearestX; // 椭圆上的任一点\n var nearestY;\n // 迭代 4 次\n for (var i = 0; i < 4; i++) {\n nearestX = a * Math.cos(t);\n nearestY = b * Math.sin(t);\n var ex = ((squareA - squareB) * Math.pow(Math.cos(t), 3)) / a;\n var ey = ((squareB - squareA) * Math.pow(Math.sin(t), 3)) / b;\n var rx1 = nearestX - ex;\n var ry1 = nearestY - ey;\n var qx = px - ex;\n var qy = py - ey;\n var r = Math.hypot(ry1, rx1);\n var q = Math.hypot(qy, qx);\n var delta_c = r * Math.asin((rx1 * qy - ry1 * qx) / (r * q));\n var delta_t = delta_c / Math.sqrt(squareA + squareB - nearestX * nearestX - nearestY * nearestY);\n t += delta_t;\n t = Math.min(Math.PI / 2, Math.max(0, t));\n }\n return {\n x: x + copysign(nearestX, relativeX),\n y: y + copysign(nearestY, relativeY),\n };\n },\n /**\n * 点到椭圆最近的距离\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} x0 指定的点 x\n * @param {number} y0 指定的点 y\n * @return {number} 点到椭圆的距离\n */\n pointDistance: function (x, y, rx, ry, x0, y0) {\n var nearestPoint = this.nearestPoint(x, y, rx, ry, x0, y0);\n return distance(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n /**\n * 根据比例获取点\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例,x轴方向为 0\n * @return {object} 点\n */\n pointAt: function (x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n return {\n x: x + rx * Math.cos(angle),\n y: y + ry * Math.sin(angle),\n };\n },\n /**\n * 根据比例计算切线角度\n * @param {number} x 椭圆中心 x\n * @param {number} y 椭圆中心 y\n * @param {number} rx 椭圆 x 方向半径\n * @param {number} ry 椭圆 y 方向半径\n * @param {number} t 指定比例 0 - 1 之间,x轴方向为 0。在 0-1 范围之外是循环还是返回 null,还需要调整\n * @return {number} 角度,在 0 - 2PI 之间\n */\n tangentAngle: function (x, y, rx, ry, t) {\n var angle = 2 * Math.PI * t; // 按照角度进行计算,而不按照周长计算\n // 直接使用 x,y 的导数计算, x' = -rx * sin(t); y' = ry * cos(t);\n var tangentAngle = Math.atan2(ry * Math.cos(angle), -rx * Math.sin(angle));\n // 也可以使用指定点的切线方程计算,成本有些高\n // const point = this.pointAt(0, 0, rx, ry, t); // 椭圆的切线同椭圆的中心不相关\n // let tangentAngle = -1 * Math.atan((ry * ry * point.x) / (rx * rx * point.y));\n // if (angle >= 0 && angle <= Math.PI) {\n // tangentAngle += Math.PI;\n // }\n return piMod(tangentAngle);\n },\n};\n//# sourceMappingURL=ellipse.js.map","import { distance, piMod } from './util';\nimport ellipse from './ellipse';\n// 偏导数 x\nfunction derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.cos(xRotation) * Math.sin(angle) - ry * Math.sin(xRotation) * Math.cos(angle);\n}\n// 偏导数 y\nfunction derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle) {\n return -1 * rx * Math.sin(xRotation) * Math.sin(angle) + ry * Math.cos(xRotation) * Math.cos(angle);\n}\n// x 的极值\nfunction xExtrema(rx, ry, xRotation) {\n return Math.atan((-ry / rx) * Math.tan(xRotation));\n}\n// y 的极值\nfunction yExtrema(rx, ry, xRotation) {\n return Math.atan(ry / (rx * Math.tan(xRotation)));\n}\n// 根据角度求 x 坐标\nfunction xAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.cos(xRotation) * Math.cos(angle) - ry * Math.sin(xRotation) * Math.sin(angle) + cx;\n}\n// 根据角度求 y 坐标\nfunction yAt(cx, cy, rx, ry, xRotation, angle) {\n return rx * Math.sin(xRotation) * Math.cos(angle) + ry * Math.cos(xRotation) * Math.sin(angle) + cy;\n}\n// 获取点在椭圆上的角度\nfunction getAngle(rx, ry, x0, y0) {\n var angle = Math.atan2(y0 * rx, x0 * ry);\n // 转换到 0 - 2PI 内\n return (angle + Math.PI * 2) % (Math.PI * 2);\n}\n// 根据角度获取,x,y\nfunction getPoint(rx, ry, angle) {\n return {\n x: rx * Math.cos(angle),\n y: ry * Math.sin(angle),\n };\n}\n// 旋转\nfunction rotate(x, y, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n return [x * cos - y * sin, x * sin + y * cos];\n}\nexport default {\n /**\n * 计算包围盒\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @return {object} 包围盒对象\n */\n box: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) {\n var xDim = xExtrema(rx, ry, xRotation);\n var minX = Infinity;\n var maxX = -Infinity;\n var xs = [startAngle, endAngle];\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var xAngle = xDim + i;\n if (startAngle < endAngle) {\n if (startAngle < xAngle && xAngle < endAngle) {\n xs.push(xAngle);\n }\n }\n else {\n if (endAngle < xAngle && xAngle < startAngle) {\n xs.push(xAngle);\n }\n }\n }\n for (var i = 0; i < xs.length; i++) {\n var x = xAt(cx, cy, rx, ry, xRotation, xs[i]);\n if (x < minX) {\n minX = x;\n }\n if (x > maxX) {\n maxX = x;\n }\n }\n var yDim = yExtrema(rx, ry, xRotation);\n var minY = Infinity;\n var maxY = -Infinity;\n var ys = [startAngle, endAngle];\n for (var i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var yAngle = yDim + i;\n if (startAngle < endAngle) {\n if (startAngle < yAngle && yAngle < endAngle) {\n ys.push(yAngle);\n }\n }\n else {\n if (endAngle < yAngle && yAngle < startAngle) {\n ys.push(yAngle);\n }\n }\n }\n for (var i = 0; i < ys.length; i++) {\n var y = yAt(cx, cy, rx, ry, xRotation, ys[i]);\n if (y < minY) {\n minY = y;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n },\n /**\n * 获取圆弧的长度,计算圆弧长度时不考虑旋转角度,\n * 仅跟 rx, ry, startAngle, endAngle 相关\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n */\n length: function (cx, cy, rx, ry, xRotation, startAngle, endAngle) { },\n /**\n * 获取指定点到圆弧的最近距离的点\n * @param {number} cx 圆心 x\n * @param {number} cy 圆心 y\n * @param {number} rx x 轴方向的半径\n * @param {number} ry y 轴方向的半径\n * @param {number} xRotation 旋转角度\n * @param {number} startAngle 起始角度\n * @param {number} endAngle 结束角度\n * @param {number} x0 指定点的 x\n * @param {number} y0 指定点的 y\n * @return {object} 到指定点最近距离的点\n */\n nearestPoint: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n // 将最近距离问题转换成到椭圆中心 0,0 没有旋转的椭圆问题\n var relativeVector = rotate(x0 - cx, y0 - cy, -xRotation);\n var x1 = relativeVector[0], y1 = relativeVector[1];\n // 计算点到椭圆的最近的点\n var relativePoint = ellipse.nearestPoint(0, 0, rx, ry, x1, y1);\n // 获取点在椭圆上的角度\n var angle = getAngle(rx, ry, relativePoint.x, relativePoint.y);\n // 点没有在圆弧上\n if (angle < startAngle) {\n // 小于起始圆弧\n relativePoint = getPoint(rx, ry, startAngle);\n }\n else if (angle > endAngle) {\n // 大于结束圆弧\n relativePoint = getPoint(rx, ry, endAngle);\n }\n // 旋转到 xRotation 的角度\n var vector = rotate(relativePoint.x, relativePoint.y, xRotation);\n return {\n x: vector[0] + cx,\n y: vector[1] + cy,\n };\n },\n pointDistance: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, x0, y0) {\n var nearestPoint = this.nearestPoint(cx, cy, rx, ry, x0, y0);\n return distance(nearestPoint.x, nearestPoint.y, x0, y0);\n },\n pointAt: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n return {\n x: xAt(cx, cy, rx, ry, xRotation, angle),\n y: yAt(cx, cy, rx, ry, xRotation, angle),\n };\n },\n tangentAngle: function (cx, cy, rx, ry, xRotation, startAngle, endAngle, t) {\n var angle = (endAngle - startAngle) * t + startAngle;\n var dx = derivativeXAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n var dy = derivativeYAt(cx, cy, rx, ry, xRotation, startAngle, endAngle, angle);\n return piMod(Math.atan2(dy, dx));\n },\n};\n//# sourceMappingURL=arc.js.map","import line from './line';\nimport { distance } from './util';\nfunction analyzePoints(points) {\n // 计算每段的长度和总的长度\n var totalLength = 0;\n var segments = [];\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n var length_1 = distance(from[0], from[1], to[0], to[1]);\n var seg = {\n from: from,\n to: to,\n length: length_1,\n };\n segments.push(seg);\n totalLength += length_1;\n }\n return { segments: segments, totalLength: totalLength };\n}\nexport function lengthOfSegment(points) {\n if (points.length < 2) {\n return 0;\n }\n var totalLength = 0;\n for (var i = 0; i < points.length - 1; i++) {\n var from = points[i];\n var to = points[i + 1];\n totalLength += distance(from[0], from[1], to[0], to[1]);\n }\n return totalLength;\n}\n/**\n * 按照比例在数据片段中获取点\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n * @return {object} 点的坐标\n */\nexport function pointAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return null;\n }\n var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength;\n // 多个点有可能重合\n if (totalLength === 0) {\n return {\n x: points[0][0],\n y: points[0][1],\n };\n }\n // 计算比例\n var startRatio = 0;\n var point = null;\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from, to = seg.to;\n var currentRatio = seg.length / totalLength;\n if (t >= startRatio && t <= startRatio + currentRatio) {\n var localRatio = (t - startRatio) / currentRatio;\n point = line.pointAt(from[0], from[1], to[0], to[1], localRatio);\n break;\n }\n startRatio += currentRatio;\n }\n return point;\n}\n/**\n * 按照比例在数据片段中获取切线的角度\n * @param {array} points 点的集合\n * @param {number} t 百分比 0-1\n */\nexport function angleAtSegments(points, t) {\n // 边界判断\n if (t > 1 || t < 0 || points.length < 2) {\n return 0;\n }\n var _a = analyzePoints(points), segments = _a.segments, totalLength = _a.totalLength;\n // 计算比例\n var startRatio = 0;\n var angle = 0;\n for (var i = 0; i < segments.length; i++) {\n var seg = segments[i];\n var from = seg.from, to = seg.to;\n var currentRatio = seg.length / totalLength;\n if (t >= startRatio && t <= startRatio + currentRatio) {\n angle = Math.atan2(to[1] - from[1], to[0] - from[0]);\n break;\n }\n startRatio += currentRatio;\n }\n return angle;\n}\nexport function distanceAtSegment(points, x, y) {\n var minDistance = Infinity;\n for (var i = 0; i < points.length - 1; i++) {\n var point = points[i];\n var nextPoint = points[i + 1];\n var distance_1 = line.pointDistance(point[0], point[1], nextPoint[0], nextPoint[1], x, y);\n if (distance_1 < minDistance) {\n minDistance = distance_1;\n }\n }\n return minDistance;\n}\n//# sourceMappingURL=segments.js.map","import { pointAtSegments, angleAtSegments, distanceAtSegment, lengthOfSegment } from './segments';\nimport { getBBoxByArray } from './util';\nexport default {\n /**\n * 计算多折线的包围盒\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 包围盒\n */\n box: function (points) {\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n return getBBoxByArray(xArr, yArr);\n },\n /**\n * 计算多折线的长度\n * @param {array} points 点的集合 [x,y] 的形式\n * @return {object} 多条边的长度\n */\n length: function (points) {\n return lengthOfSegment(points);\n },\n /**\n * 根据比例获取多折线的点\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的点\n */\n pointAt: function (points, t) {\n return pointAtSegments(points, t);\n },\n /**\n * 指定点到多折线的距离\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} x 指定点的 x\n * @param {number} y 指定点的 y\n * @return {number} 点到多折线的距离\n */\n pointDistance: function (points, x, y) {\n return distanceAtSegment(points, x, y);\n },\n /**\n * 根据比例获取多折线的切线角度\n * @param {array} points 点的集合 [x,y] 的形式\n * @param {number} t 在多折线的长度上的比例\n * @return {object} 根据比例值计算出来的角度\n */\n tangentAngle: function (points, t) {\n return angleAtSegments(points, t);\n },\n};\n//# sourceMappingURL=polyline.js.map","// 合并包围盒\nexport function mergeBBox(bbox1, bbox2) {\n if (!bbox1 || !bbox2) {\n return bbox1 || bbox2;\n }\n return {\n minX: Math.min(bbox1.minX, bbox2.minX),\n minY: Math.min(bbox1.minY, bbox2.minY),\n maxX: Math.max(bbox1.maxX, bbox2.maxX),\n maxY: Math.max(bbox1.maxY, bbox2.maxY),\n };\n}\n// 合并箭头的包围盒\nexport function mergeArrowBBox(shape, bbox) {\n var startArrowShape = shape.get('startArrowShape');\n var endArrowShape = shape.get('endArrowShape');\n var startArrowBBox = null;\n var endArrowBBox = null;\n if (startArrowShape) {\n startArrowBBox = startArrowShape.getCanvasBBox();\n bbox = mergeBBox(bbox, startArrowBBox);\n }\n if (endArrowShape) {\n endArrowBBox = endArrowShape.getCanvasBBox();\n bbox = mergeBBox(bbox, endArrowBBox);\n }\n return bbox;\n}\n//# sourceMappingURL=util.js.map","import { Util } from '@antv/g-math';\nimport { mergeArrowBBox } from './util';\nexport default function (shape) {\n var attrs = shape.attr();\n var points = attrs.points;\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n var _a = Util.getBBoxByArray(xArr, yArr), x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n var bbox = {\n minX: x,\n minY: y,\n maxX: x + width,\n maxY: y + height,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=polyline.js.map","import { Util } from '@antv/g-math';\nexport default function (shape) {\n var attrs = shape.attr();\n var points = attrs.points;\n var xArr = [];\n var yArr = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n xArr.push(point[0]);\n yArr.push(point[1]);\n }\n return Util.getBBoxByArray(xArr, yArr);\n}\n//# sourceMappingURL=polygon.js.map","// 全局设置一个唯一离屏的 ctx,用于计算 isPointInPath\nvar offScreenCtx = null;\nexport function getOffScreenContext() {\n if (!offScreenCtx) {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n offScreenCtx = canvas.getContext('2d');\n }\n return offScreenCtx;\n}\n//# sourceMappingURL=offscreen.js.map","import { isNil, each, isString } from './util';\nimport { getOffScreenContext } from './offscreen';\n/**\n * 获取文本的高度\n * @param text 文本\n * @param fontSize 字体大小\n * @param lineHeight 行高,可以为空\n */\nexport function getTextHeight(text, fontSize, lineHeight) {\n var lineCount = 1;\n if (isString(text)) {\n lineCount = text.split('\\n').length;\n }\n if (lineCount > 1) {\n var spaceingY = getLineSpaceing(fontSize, lineHeight);\n return fontSize * lineCount + spaceingY * (lineCount - 1);\n }\n return fontSize;\n}\n/**\n * 获取行间距如果文本多行,需要获取文本间距\n * @param fontSize 字体大小\n * @param lineHeight 行高\n */\nexport function getLineSpaceing(fontSize, lineHeight) {\n return lineHeight ? lineHeight - fontSize : fontSize * 0.14;\n}\n/**\n * 字体宽度\n * @param text 文本\n * @param font 字体\n */\nexport function getTextWidth(text, font) {\n var context = getOffScreenContext(); // 获取离屏的 ctx 进行计算\n var width = 0;\n // null 或者 undefined 时,宽度为 0\n if (isNil(text) || text === '') {\n return width;\n }\n context.save();\n context.font = font;\n if (isString(text) && text.includes('\\n')) {\n var textArr = text.split('\\n');\n each(textArr, function (subText) {\n var measureWidth = context.measureText(subText).width;\n if (width < measureWidth) {\n width = measureWidth;\n }\n });\n }\n else {\n width = context.measureText(text).width;\n }\n context.restore();\n return width;\n}\nexport function assembleFont(attrs) {\n var fontSize = attrs.fontSize, fontFamily = attrs.fontFamily, fontWeight = attrs.fontWeight, fontStyle = attrs.fontStyle, fontVariant = attrs.fontVariant;\n return [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ').trim();\n}\n//# sourceMappingURL=text.js.map","import { getTextWidth, getTextHeight, assembleFont } from '../util/text';\nexport default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, text = attrs.text, fontSize = attrs.fontSize, lineHeight = attrs.lineHeight;\n var font = attrs.font;\n if (!font) {\n // 如果未组装 font\n font = assembleFont(attrs);\n }\n var width = getTextWidth(text, font);\n var bbox;\n if (!width) {\n // 如果width不存在,四点共其实点\n bbox = {\n x: x,\n y: y,\n width: 0,\n height: 0,\n };\n }\n else {\n var textAlign = attrs.textAlign, textBaseline = attrs.textBaseline;\n var height = getTextHeight(text, fontSize, lineHeight); // attrs.height\n // 默认左右对齐:left, 默认上下对齐 bottom\n var point = {\n x: x,\n y: y - height,\n };\n if (textAlign) {\n if (textAlign === 'end' || textAlign === 'right') {\n point.x -= width;\n }\n else if (textAlign === 'center') {\n point.x -= width / 2;\n }\n }\n if (textBaseline) {\n if (textBaseline === 'top') {\n point.y += height;\n }\n else if (textBaseline === 'middle') {\n point.y += height / 2;\n }\n }\n bbox = {\n x: point.x,\n y: point.y,\n width: width,\n height: height,\n };\n }\n return bbox;\n}\n//# sourceMappingURL=text.js.map","import { each, isArray, isString } from '@antv/util';\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig;\nvar regexDot = /[^\\s\\,]+/ig;\nfunction parsePath(p) {\n var path = p || [];\n if (isArray(path)) {\n return path;\n }\n if (isString(path)) {\n path = path.match(regexTags);\n each(path, function (item, index) {\n // @ts-ignore\n item = item.match(regexDot);\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n // @ts-ignore\n item.splice(1, 0, item[0].substr(1));\n // @ts-ignore\n item[0] = tag;\n }\n // @ts-ignore\n each(item, function (sub, i) {\n if (!isNaN(sub)) {\n // @ts-ignore\n item[i] = +sub;\n }\n });\n // @ts-ignore\n path[index] = item;\n });\n return path;\n }\n}\nexport default parsePath;\n//# sourceMappingURL=parse-path.js.map","import { vec2 } from '@antv/matrix-util';\nfunction smoothBezier(points, smooth, isLoop, constraint) {\n var cps = [];\n var hasConstraint = !!constraint;\n var prevPoint;\n var nextPoint;\n var min;\n var max;\n var nextCp0;\n var cp1;\n var cp0;\n if (hasConstraint) {\n min = constraint[0], max = constraint[1];\n for (var i = 0, l = points.length; i < l; i += 1) {\n var point = points[i];\n min = vec2.min([0, 0], min, point);\n max = vec2.max([0, 0], max, point);\n }\n }\n for (var i = 0, len = points.length; i < len; i += 1) {\n var point = points[i];\n if (i === 0 && !isLoop) {\n cp0 = point;\n }\n else if (i === len - 1 && !isLoop) {\n cp1 = point;\n cps.push(cp0);\n cps.push(cp1);\n }\n else {\n var prevIdx = [i ? i - 1 : len - 1, i - 1][isLoop ? 0 : 1];\n prevPoint = points[prevIdx];\n nextPoint = points[isLoop ? (i + 1) % len : i + 1];\n var v = [0, 0];\n v = vec2.sub(v, nextPoint, prevPoint);\n v = vec2.scale(v, v, smooth);\n var d0 = vec2.distance(point, prevPoint);\n var d1 = vec2.distance(point, nextPoint);\n var sum = d0 + d1;\n if (sum !== 0) {\n d0 /= sum;\n d1 /= sum;\n }\n var v1 = vec2.scale([0, 0], v, -d0);\n var v2 = vec2.scale([0, 0], v, d1);\n cp1 = vec2.add([0, 0], point, v1);\n nextCp0 = vec2.add([0, 0], point, v2);\n // 下一个控制点必须在这个点和下一个点之间\n nextCp0 = vec2.min([0, 0], nextCp0, vec2.max([0, 0], nextPoint, point));\n nextCp0 = vec2.max([0, 0], nextCp0, vec2.min([0, 0], nextPoint, point));\n // 重新计算 cp1 的值\n v1 = vec2.sub([0, 0], nextCp0, point);\n v1 = vec2.scale([0, 0], v1, -d0 / d1);\n cp1 = vec2.add([0, 0], point, v1);\n // 上一个控制点必须要在上一个点和这一个点之间\n cp1 = vec2.min([0, 0], cp1, vec2.max([0, 0], prevPoint, point));\n cp1 = vec2.max([0, 0], cp1, vec2.min([0, 0], prevPoint, point));\n // 重新计算 nextCp0 的值\n v2 = vec2.sub([0, 0], point, cp1);\n v2 = vec2.scale([0, 0], v2, d1 / d0);\n nextCp0 = vec2.add([0, 0], point, v2);\n if (hasConstraint) {\n cp1 = vec2.max([0, 0], cp1, min);\n cp1 = vec2.min([0, 0], cp1, max);\n nextCp0 = vec2.max([0, 0], nextCp0, min);\n nextCp0 = vec2.min([0, 0], nextCp0, max);\n }\n cps.push(cp0);\n cps.push(cp1);\n cp0 = nextCp0;\n }\n }\n if (isLoop) {\n cps.push(cps.shift());\n }\n return cps;\n}\n/**\n * create bezier spline from catmull rom spline\n * @param {Array} crp Catmull Rom Points\n * @param {boolean} z Spline is loop\n * @param {Array} constraint Constraint\n */\nfunction catmullRom2Bezier(crp, z, constraint) {\n if (z === void 0) { z = false; }\n if (constraint === void 0) { constraint = [\n [0, 0],\n [1, 1],\n ]; }\n var isLoop = !!z;\n var pointList = [];\n for (var i = 0, l = crp.length; i < l; i += 2) {\n pointList.push([crp[i], crp[i + 1]]);\n }\n var controlPointList = smoothBezier(pointList, 0.4, isLoop, constraint);\n var len = pointList.length;\n var d1 = [];\n var cp1;\n var cp2;\n var p;\n for (var i = 0; i < len - 1; i += 1) {\n cp1 = controlPointList[i * 2];\n cp2 = controlPointList[i * 2 + 1];\n p = pointList[i + 1];\n d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]);\n }\n if (isLoop) {\n cp1 = controlPointList[len];\n cp2 = controlPointList[len + 1];\n p = pointList[0];\n d1.push(['C', cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]]);\n }\n return d1;\n}\nexport default catmullRom2Bezier;\n//# sourceMappingURL=catmull-rom-2-bezier.js.map","import { isArray } from '@antv/util';\nvar SPACES = '\\x09\\x0a\\x0b\\x0c\\x0d\\x20\\xa0\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\u2028\\u2029';\nvar PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig');\nvar PATH_VALUES = new RegExp('(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig');\n// Parses given path string into an array of arrays of path segments\nexport default function parsePathString(pathString) {\n if (!pathString) {\n return null;\n }\n if (isArray(pathString)) {\n return pathString;\n }\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0,\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n if (name === 'r') {\n data.push([b].concat(params));\n }\n else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n return '';\n });\n return data;\n}\n//# sourceMappingURL=parse-path-string.js.map","import parsePathString from './parse-path-string';\nvar REGEX_MD = /[a-z]/;\nfunction toSymmetry(p, c) {\n return [\n c[0] + (c[0] - p[0]),\n c[1] + (c[1] - p[1]),\n ];\n}\nexport default function pathToAbsolute(pathString) {\n var pathArray = parsePathString(pathString);\n if (!pathArray || !pathArray.length) {\n return [\n ['M', 0, 0],\n ];\n }\n var needProcess = false; // 如果存在小写的命令或者 V,H,T,S 则需要处理\n for (var i = 0; i < pathArray.length; i++) {\n var cmd = pathArray[i][0];\n // 如果存在相对位置的命令,则中断返回\n if (REGEX_MD.test(cmd) || ['V', 'H', 'T', 'S'].indexOf(cmd) >= 0) {\n needProcess = true;\n break;\n }\n }\n // 如果不存在相对命令,则直接返回\n // 如果在业务上都写绝对路径,这种方式最快,仅做了一次检测\n if (!needProcess) {\n return pathArray;\n }\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n var first = pathArray[0];\n if (first[0] === 'M' || first[0] === 'm') {\n x = +first[1];\n y = +first[2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n for (var i = start, ii = pathArray.length; i < ii; i++) {\n var pa = pathArray[i];\n var preParams = res[i - 1]; // 取前一个已经处理后的节点,否则会出现问题\n var r = [];\n var cmd = pa[0];\n var upCmd = cmd.toUpperCase();\n if (cmd !== upCmd) {\n r[0] = upCmd;\n switch (upCmd) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n case 'V':\n r[1] = +pa[1] + y;\n break;\n case 'H':\n r[1] = +pa[1] + x;\n break;\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n r[1] = mx;\n r[2] = my;\n break; // for lint\n default:\n for (var j = 1, jj = pa.length; j < jj; j++) {\n r[j] = +pa[j] + ((j % 2) ? x : y);\n }\n }\n }\n else { // 如果本来已经大写,则不处理\n r = pathArray[i];\n }\n // 需要在外面统一做,同时处理 V,H,S,T 等特殊指令\n switch (upCmd) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n case 'H':\n x = r[1];\n r = ['L', x, y];\n break;\n case 'V':\n y = r[1];\n r = ['L', x, y];\n break;\n case 'T':\n x = r[1];\n y = r[2];\n // 以 x, y 为中心的,上一个控制点的对称点\n // 需要假设上一个节点的命令为 Q\n var symetricT = toSymmetry([preParams[1], preParams[2]], [preParams[3], preParams[4]]);\n r = ['Q', symetricT[0], symetricT[1], x, y];\n break;\n case 'S':\n x = r[r.length - 2];\n y = r[r.length - 1];\n // 以 x,y 为中心,取上一个控制点,\n // 需要假设上一个线段为 C 或者 S\n var length_1 = preParams.length;\n var symetricS = toSymmetry([preParams[length_1 - 4], preParams[length_1 - 3]], [preParams[length_1 - 2], preParams[length_1 - 1]]);\n r = ['C', symetricS[0], symetricS[1], r[1], r[2], x, y];\n break;\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break; // for lint\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n res.push(r);\n }\n return res;\n}\n//# sourceMappingURL=path-2-absolute.js.map","import { mod, toRadian } from '@antv/util';\n// 向量长度\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n// u.v/|u||v|,计算夹角的余弦值\nfunction vRatio(u, v) {\n // 当存在一个向量的长度为 0 时,夹角也为 0,即夹角的余弦值为 1\n return vMag(u) * vMag(v) ? (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)) : 1;\n}\n// 向量角度\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n/**\n * 判断两个点是否重合,点坐标的格式为 [x, y]\n * @param {Array} point1 第一个点\n * @param {Array} point2 第二个点\n */\nexport function isSamePoint(point1, point2) {\n return point1[0] === point2[0] && point1[1] === point2[1];\n}\n// A 0:rx 1:ry 2:x-axis-rotation 3:large-arc-flag 4:sweep-flag 5: x 6: y\nexport default function getArcParams(startPoint, params) {\n var rx = params[1];\n var ry = params[2];\n var xRotation = mod(toRadian(params[3]), Math.PI * 2);\n var arcFlag = params[4];\n var sweepFlag = params[5];\n // 弧形起点坐标\n var x1 = startPoint[0];\n var y1 = startPoint[1];\n // 弧形终点坐标\n var x2 = params[6];\n var y2 = params[7];\n var xp = (Math.cos(xRotation) * (x1 - x2)) / 2.0 + (Math.sin(xRotation) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(xRotation) * (x1 - x2)) / 2.0 + (Math.cos(xRotation) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = diff ? Math.sqrt((rx * rx * (ry * ry) - diff) / diff) : 1;\n if (arcFlag === sweepFlag) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n // 旋转前的起点坐标,且当长半轴和短半轴的长度为 0 时,坐标按 (0, 0) 处理\n var cxp = ry ? (f * rx * yp) / ry : 0;\n var cyp = rx ? (f * -ry * xp) / rx : 0;\n // 椭圆圆心坐标\n var cx = (x1 + x2) / 2.0 + Math.cos(xRotation) * cxp - Math.sin(xRotation) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(xRotation) * cxp + Math.cos(xRotation) * cyp;\n // 起始点的单位向量\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n // 终止点的单位向量\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n // 计算起始点和圆心的连线,与 x 轴正方向的夹角\n var theta = vAngle([1, 0], u);\n // 计算圆弧起始点和终止点与椭圆圆心连线的夹角\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (sweepFlag === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (sweepFlag === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return {\n cx: cx,\n cy: cy,\n // 弧形的起点和终点相同时,长轴和短轴的长度按 0 处理\n rx: isSamePoint(startPoint, [x2, y2]) ? 0 : rx,\n ry: isSamePoint(startPoint, [x2, y2]) ? 0 : ry,\n startAngle: theta,\n endAngle: theta + dTheta,\n xRotation: xRotation,\n arcFlag: arcFlag,\n sweepFlag: sweepFlag,\n };\n}\n//# sourceMappingURL=get-arc-params.js.map","import getArcParams from './get-arc-params';\nimport { isSamePoint } from './get-arc-params';\nimport parsePath from './parse-path';\n// 点对称\nfunction toSymmetry(point, center) {\n return [center[0] + (center[0] - point[0]), center[1] + (center[1] - point[1])];\n}\nexport default function getSegments(path) {\n path = parsePath(path);\n var segments = [];\n var currentPoint = null; // 当前图形\n var nextParams = null; // 下一节点的 path 参数\n var startMovePoint = null; // 开始 M 的点,可能会有多个\n var lastStartMovePointIndex = 0; // 最近一个开始点 M 的索引\n var count = path.length;\n for (var i = 0; i < count; i++) {\n var params = path[i];\n nextParams = path[i + 1];\n var command = params[0];\n // 数学定义上的参数,便于后面的计算\n var segment = {\n command: command,\n prePoint: currentPoint,\n params: params,\n startTangent: null,\n endTangent: null,\n };\n switch (command) {\n case 'M':\n startMovePoint = [params[1], params[2]];\n lastStartMovePointIndex = i;\n break;\n case 'A':\n var arcParams = getArcParams(currentPoint, params);\n segment['arcParams'] = arcParams;\n break;\n default:\n break;\n }\n if (command === 'Z') {\n // 有了 Z 后,当前节点从开始 M 的点开始\n currentPoint = startMovePoint;\n // 如果当前点的命令为 Z,相当于当前点为最近一个 M 点,则下一个点直接指向最近一个 M 点的下一个点\n nextParams = path[lastStartMovePointIndex + 1];\n }\n else {\n var len = params.length;\n currentPoint = [params[len - 2], params[len - 1]];\n }\n if (nextParams && nextParams[0] === 'Z') {\n // 如果下一个点的命令为 Z,则下一个点直接指向最近一个 M 点\n nextParams = path[lastStartMovePointIndex];\n if (segments[lastStartMovePointIndex]) {\n // 如果下一个点的命令为 Z,则最近一个 M 点的前一个点为当前点\n segments[lastStartMovePointIndex].prePoint = currentPoint;\n }\n }\n segment['currentPoint'] = currentPoint;\n // 如果当前点与最近一个 M 点相同,则最近一个 M 点的前一个点为当前点的前一个点\n if (segments[lastStartMovePointIndex] &&\n isSamePoint(currentPoint, segments[lastStartMovePointIndex].currentPoint)) {\n segments[lastStartMovePointIndex].prePoint = segment.prePoint;\n }\n var nextPoint = nextParams ? [nextParams[nextParams.length - 2], nextParams[nextParams.length - 1]] : null;\n segment['nextPoint'] = nextPoint;\n // Add startTangent and endTangent\n var prePoint = segment.prePoint;\n if (['L', 'H', 'V'].includes(command)) {\n segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]];\n segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]];\n }\n else if (command === 'Q') {\n // 二次贝塞尔曲线只有一个控制点\n var cp = [params[1], params[2]];\n // 二次贝塞尔曲线的终点为 currentPoint\n segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]];\n segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]];\n }\n else if (command === 'T') {\n var preSegment = segments[i - 1];\n var cp = toSymmetry(preSegment.currentPoint, prePoint);\n if (preSegment.command === 'Q') {\n segment.command = 'Q';\n segment.startTangent = [prePoint[0] - cp[0], prePoint[1] - cp[1]];\n segment.endTangent = [currentPoint[0] - cp[0], currentPoint[1] - cp[1]];\n }\n else {\n segment.command = 'TL';\n segment.startTangent = [prePoint[0] - currentPoint[0], prePoint[1] - currentPoint[1]];\n segment.endTangent = [currentPoint[0] - prePoint[0], currentPoint[1] - prePoint[1]];\n }\n }\n else if (command === 'C') {\n // 三次贝塞尔曲线有两个控制点\n var cp1 = [params[1], params[2]];\n var cp2 = [params[3], params[4]];\n segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n // horizontal line, eg. ['C', 100, 100, 100, 100, 200, 200]\n if (segment.startTangent[0] === 0 && segment.startTangent[1] === 0) {\n segment.startTangent = [cp1[0] - cp2[0], cp1[1] - cp2[1]];\n }\n if (segment.endTangent[0] === 0 && segment.endTangent[1] === 0) {\n segment.endTangent = [cp2[0] - cp1[0], cp2[1] - cp1[1]];\n }\n }\n else if (command === 'S') {\n var preSegment = segments[i - 1];\n var cp1 = toSymmetry(preSegment.currentPoint, prePoint);\n var cp2 = [params[1], params[2]];\n if (preSegment.command === 'C') {\n segment.command = 'C'; // 将 S 命令变换为 C 命令\n segment.startTangent = [prePoint[0] - cp1[0], prePoint[1] - cp1[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n }\n else {\n segment.command = 'SQ'; // 将 S 命令变换为 SQ 命令\n segment.startTangent = [prePoint[0] - cp2[0], prePoint[1] - cp2[1]];\n segment.endTangent = [currentPoint[0] - cp2[0], currentPoint[1] - cp2[1]];\n }\n }\n else if (command === 'A') {\n var d = 0.001;\n var _a = segment['arcParams'] || {}, _b = _a.cx, cx = _b === void 0 ? 0 : _b, _c = _a.cy, cy = _c === void 0 ? 0 : _c, _d = _a.rx, rx = _d === void 0 ? 0 : _d, _e = _a.ry, ry = _e === void 0 ? 0 : _e, _f = _a.sweepFlag, sweepFlag = _f === void 0 ? 0 : _f, _g = _a.startAngle, startAngle = _g === void 0 ? 0 : _g, _h = _a.endAngle, endAngle = _h === void 0 ? 0 : _h;\n if (sweepFlag === 0) {\n d *= -1;\n }\n var dx1 = rx * Math.cos(startAngle - d) + cx;\n var dy1 = ry * Math.sin(startAngle - d) + cy;\n segment.startTangent = [dx1 - startMovePoint[0], dy1 - startMovePoint[1]];\n var dx2 = rx * Math.cos(startAngle + endAngle + d) + cx;\n var dy2 = ry * Math.sin(startAngle + endAngle - d) + cy;\n segment.endTangent = [prePoint[0] - dx2, prePoint[1] - dy2];\n }\n segments.push(segment);\n }\n return segments;\n}\n//# sourceMappingURL=path-2-segments.js.map","import { Quad as QuadUtil, Cubic as CubicUtil, Arc as EllipseArcUtil } from '@antv/g-math';\nimport { path2Segments } from '@antv/path-util';\nimport { isNumberEqual, max, min } from '@antv/util';\nimport { mergeArrowBBox } from './util';\nfunction getPathBox(segments, lineWidth) {\n var xArr = [];\n var yArr = [];\n var segmentsWithAngle = [];\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n var currentPoint = segment.currentPoint, params = segment.params, prePoint = segment.prePoint;\n var box = void 0;\n switch (segment.command) {\n case 'Q':\n box = QuadUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4]);\n break;\n case 'C':\n box = CubicUtil.box(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], params[5], params[6]);\n break;\n case 'A':\n var arcParams = segment.arcParams;\n box = EllipseArcUtil.box(arcParams.cx, arcParams.cy, arcParams.rx, arcParams.ry, arcParams.xRotation, arcParams.startAngle, arcParams.endAngle);\n break;\n default:\n xArr.push(currentPoint[0]);\n yArr.push(currentPoint[1]);\n break;\n }\n if (box) {\n segment.box = box;\n xArr.push(box.x, box.x + box.width);\n yArr.push(box.y, box.y + box.height);\n }\n if (lineWidth && (segment.command === 'L' || segment.command === 'M') && segment.prePoint && segment.nextPoint) {\n segmentsWithAngle.push(segment);\n }\n }\n // bbox calculation should ignore NaN for path attribute\n // ref: https://github.com/antvis/g/issues/210\n // ref: https://github.com/antvis/G2/issues/3109\n xArr = xArr.filter(function (item) { return !Number.isNaN(item) && item !== Infinity && item !== -Infinity; });\n yArr = yArr.filter(function (item) { return !Number.isNaN(item) && item !== Infinity && item !== -Infinity; });\n var minX = min(xArr);\n var minY = min(yArr);\n var maxX = max(xArr);\n var maxY = max(yArr);\n if (segmentsWithAngle.length === 0) {\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n for (var i = 0; i < segmentsWithAngle.length; i++) {\n var segment = segmentsWithAngle[i];\n var currentPoint = segment.currentPoint;\n var extra = void 0;\n if (currentPoint[0] === minX) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n minX = minX - extra.xExtra;\n }\n else if (currentPoint[0] === maxX) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n maxX = maxX + extra.xExtra;\n }\n if (currentPoint[1] === minY) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n minY = minY - extra.yExtra;\n }\n else if (currentPoint[1] === maxY) {\n extra = getExtraFromSegmentWithAngle(segment, lineWidth);\n maxY = maxY + extra.yExtra;\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\nfunction getExtraFromSegmentWithAngle(segment, lineWidth) {\n var prePoint = segment.prePoint, currentPoint = segment.currentPoint, nextPoint = segment.nextPoint;\n var currentAndPre = Math.pow(currentPoint[0] - prePoint[0], 2) + Math.pow(currentPoint[1] - prePoint[1], 2);\n var currentAndNext = Math.pow(currentPoint[0] - nextPoint[0], 2) + Math.pow(currentPoint[1] - nextPoint[1], 2);\n var preAndNext = Math.pow(prePoint[0] - nextPoint[0], 2) + Math.pow(prePoint[1] - nextPoint[1], 2);\n // 以 currentPoint 为顶点的夹角\n var currentAngle = Math.acos((currentAndPre + currentAndNext - preAndNext) / (2 * Math.sqrt(currentAndPre) * Math.sqrt(currentAndNext)));\n // 夹角为空、 0 或 PI 时,不需要计算夹角处的额外宽度\n // 注意: 由于计算精度问题,夹角为 0 的情况计算出来的角度可能是一个很小的值,还需要判断其与 0 是否近似相等\n if (!currentAngle || Math.sin(currentAngle) === 0 || isNumberEqual(currentAngle, 0)) {\n return {\n xExtra: 0,\n yExtra: 0,\n };\n }\n var xAngle = Math.abs(Math.atan2(nextPoint[1] - currentPoint[1], nextPoint[0] - currentPoint[0]));\n var yAngle = Math.abs(Math.atan2(nextPoint[0] - currentPoint[0], nextPoint[1] - currentPoint[1]));\n // 将夹角转为锐角\n xAngle = xAngle > Math.PI / 2 ? Math.PI - xAngle : xAngle;\n yAngle = yAngle > Math.PI / 2 ? Math.PI - yAngle : yAngle;\n // 这里不考虑在水平和垂直方向的投影,直接使用最大差值\n // 由于上层统一加减了二分之一线宽,这里需要进行弥补\n var extra = {\n // 水平方向投影\n xExtra: Math.cos(currentAngle / 2 - xAngle) * ((lineWidth / 2) * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0,\n // 垂直方向投影\n yExtra: Math.cos(yAngle - currentAngle / 2) * ((lineWidth / 2) * (1 / Math.sin(currentAngle / 2))) - lineWidth / 2 || 0,\n };\n return extra;\n}\nexport default function (shape) {\n var attrs = shape.attr();\n var path = attrs.path, stroke = attrs.stroke;\n var lineWidth = stroke ? attrs.lineWidth : 0; // 只有有 stroke 时,lineWidth 才生效\n var segments = shape.get('segments') || path2Segments(path);\n var _a = getPathBox(segments, lineWidth), x = _a.x, y = _a.y, width = _a.width, height = _a.height;\n var bbox = {\n minX: x,\n minY: y,\n maxX: x + width,\n maxY: y + height,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=path.js.map","import { mergeArrowBBox } from './util';\nexport default function (shape) {\n var attrs = shape.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2;\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n var bbox = {\n minX: minX,\n maxX: maxX,\n minY: minY,\n maxY: maxY,\n };\n bbox = mergeArrowBBox(shape, bbox);\n return {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.maxX - bbox.minX,\n height: bbox.maxY - bbox.minY,\n };\n}\n//# sourceMappingURL=line.js.map","export default function (shape) {\n var attrs = shape.attr();\n var x = attrs.x, y = attrs.y, rx = attrs.rx, ry = attrs.ry;\n return {\n x: x - rx,\n y: y - ry,\n width: rx * 2,\n height: ry * 2,\n };\n}\n//# sourceMappingURL=ellipse.js.map","import { register, getMethod } from './register';\nimport rect from './rect';\nimport circle from './circle';\nimport polyline from './polyline';\nimport polygon from './polygon';\nimport text from './text';\nimport path from './path';\nimport line from './line';\nimport ellipse from './ellipse';\nregister('rect', rect);\nregister('image', rect); // image 使用 rect 的包围盒计算\nregister('circle', circle);\nregister('marker', circle); // marker 使用 circle 的计算方案\nregister('polyline', polyline);\nregister('polygon', polygon);\nregister('text', text);\nregister('path', path);\nregister('line', line);\nregister('ellipse', ellipse);\nexport { getMethod as getBBoxMethod, register as registerBBox };\n//# sourceMappingURL=index.js.map","import { __extends } from \"tslib\";\nimport { Event as GraphEvent } from '@antv/g-base';\nvar G6GraphEvent = /** @class */function (_super) {\n __extends(G6GraphEvent, _super);\n function G6GraphEvent(type, event) {\n var _this = _super.call(this, type, event) || this;\n _this.item = event.item;\n _this.canvasX = event.canvasX;\n _this.canvasY = event.canvasY;\n _this.wheelDelta = event.wheelDelta;\n _this.detail = event.detail;\n return _this;\n }\n return G6GraphEvent;\n}(GraphEvent);\nexport { G6GraphEvent };","import { isString, isNumber, isArray } from '@antv/util';\nimport { G6GraphEvent } from '../interface/behavior';\nexport var uniqueId = function uniqueId(type) {\n return \"\".concat(type, \"-\").concat(Math.random()).concat(Date.now());\n};\n/**\n * turn padding into [top, right, bottom, right]\n * @param {Number|Array} padding input padding\n * @return {array} output\n */\nexport var formatPadding = function formatPadding(padding) {\n if (isArray(padding)) {\n switch (padding.length) {\n case 4:\n return padding;\n case 3:\n padding.push(padding[1]);\n return padding;\n case 2:\n return padding.concat(padding);\n case 1:\n return [padding[0], padding[0], padding[0], padding[0]];\n default:\n return [0, 0, 0, 0];\n }\n }\n if (isNumber(padding)) {\n return [padding, padding, padding, padding];\n } else if (isString(padding)) {\n var intPadding = parseInt(padding, 10);\n return [intPadding, intPadding, intPadding, intPadding];\n }\n return [0, 0, 0, 0];\n};\n/**\n * clone event\n * @param e\n */\nexport var cloneEvent = function cloneEvent(e) {\n var event = new G6GraphEvent(e.type, e);\n event.clientX = e.clientX;\n event.clientY = e.clientY;\n event.x = e.x;\n event.y = e.y;\n event.target = e.target;\n event.currentTarget = e.currentTarget;\n event.bubbles = true;\n event.item = e.item;\n return event;\n};\n/**\n * 判断 viewport 是否改变,通过和单位矩阵对比\n * @param matrix Viewport 的 Matrix\n */\nexport var isViewportChanged = function isViewportChanged(matrix) {\n // matrix 为 null, 则说明没有变化\n if (!matrix) {\n return false;\n }\n var MATRIX_LEN = 9;\n var ORIGIN_MATRIX = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0; i < MATRIX_LEN; i++) {\n if (matrix[i] !== ORIGIN_MATRIX[i]) {\n return true;\n }\n }\n return false;\n};\nexport var isNaN = function isNaN(input) {\n return Number.isNaN(Number(input));\n};\n/**\n * 计算一组 Item 的 BBox\n * @param items 选中的一组Item,可以是 node 或 combo\n */\nexport var calculationItemsBBox = function calculationItemsBBox(items) {\n var minx = Infinity;\n var maxx = -Infinity;\n var miny = Infinity;\n var maxy = -Infinity;\n // 获取已节点的所有最大最小x y值\n for (var i = 0; i < items.length; i++) {\n var element = items[i];\n var bbox = element.getBBox();\n var minX = bbox.minX,\n minY = bbox.minY,\n maxX = bbox.maxX,\n maxY = bbox.maxY;\n if (minX < minx) {\n minx = minX;\n }\n if (minY < miny) {\n miny = minY;\n }\n if (maxX > maxx) {\n maxx = maxX;\n }\n if (maxY > maxy) {\n maxy = maxY;\n }\n }\n var x = Math.floor(minx);\n var y = Math.floor(miny);\n var width = Math.ceil(maxx) - Math.floor(minx);\n var height = Math.ceil(maxy) - Math.floor(miny);\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minx,\n minY: miny,\n maxX: maxx,\n maxY: maxy\n };\n};\n/**\n * 若 edges 中存在两端点相同的边,使用 quadratic 边并自动计算 curveOffset 使它们不相互重叠\n * 文档: https://g6.antv.antgroup.com/en/api/Util\n * @param edges 边数据集合\n * @param offsetDiff 相邻两边的 offset 之差\n * @param multiEdgeType\n * @param singleEdgeType\n * @param loopEdgeType\n */\nexport var processParallelEdges = function processParallelEdges(edges, offsetDiff, multiEdgeType, singleEdgeType, loopEdgeType) {\n if (offsetDiff === void 0) {\n offsetDiff = 15;\n }\n if (multiEdgeType === void 0) {\n multiEdgeType = 'quadratic';\n }\n if (singleEdgeType === void 0) {\n singleEdgeType = undefined;\n }\n if (loopEdgeType === void 0) {\n loopEdgeType = undefined;\n }\n var len = edges.length;\n var cod = offsetDiff * 2;\n var loopPosition = ['top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left'];\n var edgeMap = {};\n var tags = [];\n var reverses = {};\n for (var i = 0; i < len; i++) {\n var edge = edges[i];\n var source = edge.source,\n target = edge.target;\n var sourceTarget = \"\".concat(source, \"-\").concat(target);\n if (tags[i]) continue;\n if (!edgeMap[sourceTarget]) {\n edgeMap[sourceTarget] = [];\n }\n tags[i] = true;\n edgeMap[sourceTarget].push(edge);\n for (var j = 0; j < len; j++) {\n if (i === j) continue;\n var sedge = edges[j];\n var src = sedge.source;\n var dst = sedge.target;\n // 两个节点之间共同的边\n // 第一条的source = 第二条的target\n // 第一条的target = 第二条的source\n if (!tags[j]) {\n if (source === dst && target === src) {\n edgeMap[sourceTarget].push(sedge);\n tags[j] = true;\n reverses[\"\".concat(src, \"|\").concat(dst, \"|\").concat(edgeMap[sourceTarget].length - 1)] = true;\n } else if (source === src && target === dst) {\n edgeMap[sourceTarget].push(sedge);\n tags[j] = true;\n }\n }\n }\n }\n for (var key in edgeMap) {\n var arcEdges = edgeMap[key];\n var length_1 = arcEdges.length;\n for (var k = 0; k < length_1; k++) {\n var current = arcEdges[k];\n if (current.source === current.target) {\n if (loopEdgeType) current.type = loopEdgeType;\n // 超过8条自环边,则需要重新处理\n current.loopCfg = {\n position: loopPosition[k % 8],\n dist: Math.floor(k / 8) * 20 + 50\n };\n continue;\n }\n if (length_1 === 1 && singleEdgeType && current.source !== current.target) {\n current.type = singleEdgeType;\n continue;\n }\n current.type = multiEdgeType;\n var sign = (k % 2 === 0 ? 1 : -1) * (reverses[\"\".concat(current.source, \"|\").concat(current.target, \"|\").concat(k)] ? -1 : 1);\n if (length_1 % 2 === 1) {\n current.curveOffset = sign * Math.ceil(k / 2) * cod;\n } else {\n current.curveOffset = sign * (Math.floor(k / 2) * cod + offsetDiff);\n }\n }\n }\n return edges;\n};","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @description 扩展方法,提供 gl-matrix 为提供的方法\n * */\nvar gl_matrix_1 = require(\"gl-matrix\");\nfunction leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromTranslation(transMat, v);\n return gl_matrix_1.mat3.multiply(out, transMat, a);\n}\nexports.leftTranslate = leftTranslate;\nfunction leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromRotation(rotateMat, rad);\n return gl_matrix_1.mat3.multiply(out, rotateMat, a);\n}\nexports.leftRotate = leftRotate;\nfunction leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n gl_matrix_1.mat3.fromScaling(scaleMat, v);\n return gl_matrix_1.mat3.multiply(out, scaleMat, a);\n}\nexports.leftScale = leftScale;\nfunction leftMultiply(out, a, a1) {\n return gl_matrix_1.mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nfunction transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\nexports.transform = transform;\n/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nfunction direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\nexports.direction = direction;\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nfunction angleTo(v1, v2, direct) {\n var ang = gl_matrix_1.vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\nexports.angleTo = angleTo;\n/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nfunction vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\nexports.vertical = vertical;\n//# sourceMappingURL=ext.js.map","import { __assign } from \"tslib\";\nimport { isNumber, isString } from '@antv/util';\nimport { formatPadding, isNaN } from '../../util/base';\nimport { applyMatrix, invertMatrix, lerpArray } from '../../util/math';\nimport { transform } from '@antv/matrix-util/lib/ext';\nimport { getAnimateCfgWithCallback } from '../../util/graphic';\nvar ViewController = /** @class */function () {\n function ViewController(graph) {\n this.destroyed = false;\n this.graph = graph;\n this.destroyed = false;\n }\n // get view center coordinate\n ViewController.prototype.getViewCenter = function () {\n var padding = this.getFormatPadding();\n var graph = this.graph;\n var width = this.graph.get('width');\n var height = graph.get('height');\n return {\n x: (width - padding[1] - padding[3]) / 2 + padding[3],\n y: (height - padding[0] - padding[2]) / 2 + padding[0]\n };\n };\n ViewController.prototype.fitCenter = function (animate, animateCfg) {\n var graph = this.graph;\n var group = graph.get('group');\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n var maxX_1 = -Infinity;\n var maxY_1 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_1 > x) minX_1 = x;\n if (minY_1 > y) minY_1 = y;\n if (maxX_1 < x) maxX_1 = x;\n if (maxY_1 < y) maxY_1 = y;\n });\n var matrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var _a = applyMatrix({\n x: minX_1,\n y: minY_1\n }, matrix),\n transMinX = _a.x,\n transMinY = _a.y;\n var _b = applyMatrix({\n x: maxX_1,\n y: maxY_1\n }, matrix),\n transMaxX = _b.x,\n transMaxY = _b.y;\n bbox = {\n minX: transMinX,\n maxX: transMaxX,\n minY: transMinY,\n maxY: transMaxY,\n width: transMaxX - transMinX,\n height: transMaxY - transMinY,\n x: transMinX,\n y: transMinY\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y, animate, animateCfg);\n };\n ViewController.prototype.animatedFitView = function (group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, zoomToFit) {\n var graph = this.graph;\n animateCfg = animateCfg ? animateCfg : {\n duration: 500,\n easing: 'easeCubic'\n };\n // start from the default matrix\n var matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n // Translate\n var vx = bbox.x + viewCenter.x - groupCenter.x - bbox.minX;\n var vy = bbox.y + viewCenter.y - groupCenter.y - bbox.minY;\n if (isNaN(vx) || isNaN(vy)) return;\n var translatedMatrix = transform(matrix, [['t', vx, vy]]);\n if (!zoomToFit) {\n // If zooming is not needed just animate the current translated matrix and return\n var animationConfig_1 = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n graph.emit('viewportchange', {\n action: 'translate',\n matrix: translatedMatrix\n });\n }\n });\n group.animate(function (ratio) {\n return {\n matrix: lerpArray(startMatrix, translatedMatrix, ratio)\n };\n }, animationConfig_1);\n return;\n }\n // Zoom\n var minZoom = graph.get('minZoom');\n var maxZoom = graph.get('maxZoom');\n var realRatio = ratio;\n if (minZoom && ratio < minZoom) {\n realRatio = minZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph minzoom has been used instead');\n } else if (maxZoom && ratio > maxZoom) {\n realRatio = maxZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph maxzoom has been used instead');\n }\n var zoomedMatrix = transform(translatedMatrix, [['t', -viewCenter.x, -viewCenter.y], ['s', realRatio, realRatio], ['t', viewCenter.x, viewCenter.y]]);\n // Animation\n var animationConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n group.setMatrix(zoomedMatrix);\n graph.emit('viewportchange', {\n action: 'translate',\n matrix: translatedMatrix\n });\n graph.emit('viewportchange', {\n action: 'zoom',\n matrix: zoomedMatrix\n });\n }\n });\n group.stopAnimate();\n group.setMatrix(startMatrix);\n group.animate(function (ratio) {\n return {\n matrix: lerpArray(startMatrix, zoomedMatrix, ratio)\n };\n }, animationConfig);\n };\n // fit view graph\n ViewController.prototype.fitView = function (animate, animateCfg) {\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_2 = Infinity;\n var minY_2 = Infinity;\n var maxX_2 = -Infinity;\n var maxY_2 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_2 > x) minX_2 = x;\n if (minY_2 > y) minY_2 = y;\n if (maxX_2 < x) maxX_2 = x;\n if (maxY_2 < y) maxY_2 = y;\n });\n bbox = {\n minX: minX_2,\n maxX: maxX_2,\n minY: minY_2,\n maxY: maxY_2,\n width: maxX_2 - minX_2,\n height: maxY_2 - minY_2,\n x: minX_2,\n y: minY_2\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var w = (width - padding[1] - padding[3]) / bbox.width;\n var h = (height - padding[0] - padding[2]) / bbox.height;\n var ratio = w;\n if (w > h) {\n ratio = h;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, true);\n } else {\n var dx = viewCenter.x - groupCenter.x;\n var dy = viewCenter.y - groupCenter.y;\n if (isNaN(dx) || isNaN(dy)) return;\n graph.translate(dx, dy);\n if (!graph.zoom(ratio, viewCenter)) {\n console.warn('zoom failed, ratio out of range, ratio: %f', ratio);\n }\n }\n };\n // fit view graph by rule\n ViewController.prototype.fitViewByRules = function (rules, animate, animateCfg) {\n var _a = rules.onlyOutOfViewPort,\n onlyOutOfViewPort = _a === void 0 ? false : _a,\n _b = rules.direction,\n direction = _b === void 0 ? 'both' : _b,\n _c = rules.ratioRule,\n ratioRule = _c === void 0 ? 'min' : _c;\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox;\n // if reaches optimizeThreshold, fitView according to the 4 corner nodes\n var nodes = graph.getNodes();\n if (nodes.length > graph.get('optimizeThreshold')) {\n var minX_3 = Infinity;\n var minY_3 = Infinity;\n var maxX_3 = -Infinity;\n var maxY_3 = -Infinity;\n nodes.forEach(function (node) {\n var _a = node.getModel(),\n x = _a.x,\n y = _a.y;\n if (minX_3 > x) minX_3 = x;\n if (minY_3 > y) minY_3 = y;\n if (maxX_3 < x) maxX_3 = x;\n if (maxY_3 < y) maxY_3 = y;\n });\n bbox = {\n minX: minX_3,\n maxX: maxX_3,\n minY: minY_3,\n maxY: maxY_3,\n width: maxX_3 - minX_3,\n height: maxY_3 - minY_3,\n x: minX_3,\n y: minY_3\n };\n } else {\n bbox = group.getCanvasBBox();\n }\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var wRatio = (width - padding[1] - padding[3]) / bbox.width;\n var hRatio = (height - padding[0] - padding[2]) / bbox.height;\n var ratio;\n if (direction === 'x') {\n ratio = wRatio;\n } else if (direction === 'y') {\n ratio = hRatio;\n } else {\n // ratioRule\n ratio = ratioRule === 'max' ? Math.max(wRatio, hRatio) : Math.min(wRatio, hRatio);\n }\n // 如果设置了仅对超出视口宽高的场景进行fitview,则没超出的场景zoom取1\n if (onlyOutOfViewPort) {\n ratio = ratio < 1 ? ratio : 1;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, true);\n } else {\n var initZoomRatio = graph.getZoom();\n var endZoom = initZoomRatio * ratio;\n var minZoom = graph.get('minZoom');\n // 如果zoom小于最小zoom, 则以最小zoom为准\n if (endZoom < minZoom) {\n endZoom = minZoom;\n console.warn('fitview failed, ratio out of range, ratio: %f', ratio, 'graph minzoom has been used instead');\n }\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y);\n graph.zoomTo(endZoom, viewCenter);\n }\n };\n ViewController.prototype.getFormatPadding = function () {\n var padding = this.graph.get('fitViewPadding');\n return formatPadding(padding);\n };\n ViewController.prototype.focusPoint = function (point, animate, animateCfg) {\n var _this = this;\n var viewCenter = this.getViewCenter();\n var modelCenter = this.getPointByCanvas(viewCenter.x, viewCenter.y);\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (animate) {\n var dx_1 = (modelCenter.x - point.x) * viewportMatrix[0];\n var dy_1 = (modelCenter.y - point.y) * viewportMatrix[4];\n var lastX_1 = 0;\n var lastY_1 = 0;\n var newX_1 = 0;\n var newY_1 = 0;\n // 动画每次平移一点,直到目标位置\n this.graph.get('canvas').animate(function (ratio) {\n newX_1 = dx_1 * ratio;\n newY_1 = dy_1 * ratio;\n _this.graph.translate(newX_1 - lastX_1, newY_1 - lastY_1);\n lastX_1 = newX_1;\n lastY_1 = newY_1;\n }, __assign({}, animateCfg));\n } else {\n this.graph.translate((modelCenter.x - point.x) * viewportMatrix[0], (modelCenter.y - point.y) * viewportMatrix[4]);\n }\n };\n /**\n * 将 Canvas 坐标转成视口坐标\n * @param canvasX canvas x 坐标\n * @param canvasY canvas y 坐标\n */\n ViewController.prototype.getPointByCanvas = function (canvasX, canvasY) {\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) {\n viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var point = invertMatrix({\n x: canvasX,\n y: canvasY\n }, viewportMatrix);\n return point;\n };\n /**\n * 将页面坐标转成视口坐标\n * @param clientX 页面 x 坐标\n * @param clientY 页面 y 坐标\n */\n ViewController.prototype.getPointByClient = function (clientX, clientY) {\n var canvas = this.graph.get('canvas');\n var canvasPoint = canvas.getPointByClient(clientX, clientY);\n return this.getPointByCanvas(canvasPoint.x, canvasPoint.y);\n };\n /**\n * 将视口坐标转成页面坐标\n * @param x 视口 x 坐标\n * @param y 视口 y 坐标\n */\n ViewController.prototype.getClientByPoint = function (x, y) {\n var canvas = this.graph.get('canvas');\n var canvasPoint = this.getCanvasByPoint(x, y);\n var point = canvas.getClientByPoint(canvasPoint.x, canvasPoint.y);\n return {\n x: point.x,\n y: point.y\n };\n };\n /**\n * 将视口坐标转成 Canvas 坐标\n * @param x 视口 x 坐标\n * @param y 视口 y 坐标\n */\n ViewController.prototype.getCanvasByPoint = function (x, y) {\n var viewportMatrix = this.graph.get('group').getMatrix();\n if (!viewportMatrix) {\n viewportMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n return applyMatrix({\n x: x,\n y: y\n }, viewportMatrix);\n };\n /**\n * 将元素移动到画布中心\n * @param item Item 实例或 id\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n ViewController.prototype.focus = function (item, animate, animateCfg) {\n if (isString(item)) {\n item = this.graph.findById(item);\n }\n if (item) {\n var x = 0,\n y = 0;\n if (item.getType && item.getType() === 'edge') {\n var sourceMatrix = item.getSource().get('group').getMatrix();\n var targetMatrix = item.getTarget().get('group').getMatrix();\n if (sourceMatrix && targetMatrix) {\n x = (sourceMatrix[6] + targetMatrix[6]) / 2;\n y = (sourceMatrix[7] + targetMatrix[7]) / 2;\n } else if (sourceMatrix || targetMatrix) {\n x = sourceMatrix ? sourceMatrix[6] : targetMatrix[6];\n y = sourceMatrix ? sourceMatrix[7] : targetMatrix[7];\n }\n } else {\n var group = item.get('group');\n var matrix = group.getMatrix();\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n x = matrix[6];\n y = matrix[7];\n }\n // 用实际位置而不是model中的x,y,防止由于拖拽等的交互导致model的x,y并不是当前的x,y\n this.focusPoint({\n x: x,\n y: y\n }, animate, animateCfg);\n }\n };\n ViewController.prototype.focusItems = function (items, zoomToFit, animate, animateCfg) {\n if (!items.length) {\n return;\n }\n var graph = this.graph;\n var padding = this.getFormatPadding();\n var width = graph.get('width');\n var height = graph.get('height');\n var group = graph.get('group');\n var startMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n group.resetMatrix();\n var bbox = {\n x: 0,\n y: 0,\n minX: Number.MAX_SAFE_INTEGER,\n minY: Number.MAX_SAFE_INTEGER,\n maxX: Number.MIN_SAFE_INTEGER,\n maxY: Number.MIN_SAFE_INTEGER,\n width: 0,\n height: 0\n };\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n var itemBBox = item.getBBox();\n if (itemBBox.minX < bbox.minX) {\n bbox.minX = itemBBox.minX;\n }\n if (itemBBox.minY < bbox.minY) {\n bbox.minY = itemBBox.minY;\n }\n if (itemBBox.maxX > bbox.maxX) {\n bbox.maxX = itemBBox.maxX;\n }\n if (itemBBox.maxY > bbox.maxY) {\n bbox.maxY = itemBBox.maxY;\n }\n }\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n if (bbox.width === 0 || bbox.height === 0) return;\n var viewCenter = this.getViewCenter();\n var groupCenter = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2\n };\n // Compute ratio\n var w = (width - padding[1] - padding[3]) / bbox.width;\n var h = (height - padding[0] - padding[2]) / bbox.height;\n var ratio = w;\n if (w > h) {\n ratio = h;\n }\n if (animate) {\n this.animatedFitView(group, startMatrix, animateCfg, bbox, viewCenter, groupCenter, ratio, zoomToFit);\n } else {\n graph.translate(viewCenter.x - groupCenter.x, viewCenter.y - groupCenter.y);\n if (zoomToFit && !graph.zoom(ratio, viewCenter)) {\n console.warn('zoom failed, ratio out of range, ratio: %f', ratio);\n }\n }\n };\n /**\n * 改变 canvas 画布的宽度和高度\n * @param width canvas 宽度\n * @param height canvas 高度\n */\n ViewController.prototype.changeSize = function (width, height) {\n var graph = this.graph;\n if (!isNumber(width) || !isNumber(height)) {\n throw Error('invalid canvas width & height, please make sure width & height type is number');\n }\n graph.set({\n width: width,\n height: height\n });\n var canvas = graph.get('canvas');\n canvas.changeSize(width, height);\n // change the size of grid plugin if it exists on graph\n var plugins = graph.get('plugins');\n plugins.forEach(function (plugin) {\n if (plugin.get('gridContainer')) {\n // 网格定位信息初始化\n plugin.positionInit();\n }\n });\n };\n ViewController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = false;\n };\n return ViewController;\n}();\nexport default ViewController;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * @fileOverview 从xml建立自定义Node,包含update\n * @author xuzhi.mxz@antfin.com\n */\nimport { __assign, __rest } from \"tslib\";\nimport { get } from '@antv/util';\nimport { getTextSize } from '../util/graphic';\n/**\n * 一种更宽松的JSON 解析,如果遇到不符合规范的字段会直接转为字符串\n * @param text json 内容\n */\nfunction looseJSONParse(text) {\n if (typeof text !== 'string') {\n return text;\n }\n var safeParse = function safeParse(str) {\n if (typeof str !== 'string') {\n return str;\n }\n try {\n return JSON.parse(str.trim());\n } catch (e) {\n return str.trim();\n }\n };\n var firstAttempt = safeParse(text);\n if (typeof firstAttempt !== 'string') {\n return firstAttempt;\n }\n var tail = function tail(arr) {\n return arr[arr.length - 1];\n };\n var str = text.trim();\n var objectStack = [];\n var syntaxStack = [];\n var isLastPair = function isLastPair() {\n var syntaxes = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n syntaxes[_i] = arguments[_i];\n }\n return syntaxes.some(function (syntax) {\n return tail(syntaxStack) === syntax;\n });\n };\n var getValueStore = function getValueStore() {\n return tail(objectStack);\n };\n var rst = null;\n var i = 0;\n var temp = '';\n while (i < str.length) {\n var nowChar = str[i];\n var isInString = isLastPair('\"', \"'\");\n if (!isInString && !nowChar.trim()) {\n i += 1;\n continue;\n }\n var isLastTranslate = str[i - 1] === '\\\\';\n var isInObject = isLastPair('}');\n var isInArray = isLastPair(']');\n var isWaitingValue = isLastPair(',');\n var tempArr = getValueStore();\n if (isInString) {\n if (tail(syntaxStack) === nowChar && !isLastTranslate) {\n syntaxStack.pop();\n var value = safeParse(temp);\n tempArr.push(value);\n rst = value;\n temp = '';\n } else {\n temp += nowChar;\n }\n } else if (isInArray && nowChar === ',') {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n } else if (isInObject && nowChar === ':') {\n syntaxStack.push(',');\n if (temp) {\n tempArr.push(temp);\n temp = '';\n }\n } else if (isWaitingValue && nowChar === ',') {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n syntaxStack.pop();\n } else if (nowChar === '}' && (isInObject || isWaitingValue)) {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n if (isWaitingValue) {\n syntaxStack.pop();\n }\n var obj = {};\n for (var c = 1; c < tempArr.length; c += 2) {\n obj[tempArr[c - 1]] = tempArr[c];\n }\n objectStack.pop();\n if (objectStack.length) {\n tail(objectStack).push(obj);\n }\n syntaxStack.pop();\n rst = obj;\n } else if (nowChar === ']' && isInArray) {\n if (temp) {\n tempArr.push(safeParse(temp));\n temp = '';\n }\n objectStack.pop();\n if (objectStack.length) {\n tail(objectStack).push(tempArr);\n }\n syntaxStack.pop();\n rst = tempArr;\n } else if (nowChar === '{') {\n objectStack.push([]);\n syntaxStack.push('}');\n } else if (nowChar === '[') {\n objectStack.push([]);\n syntaxStack.push(']');\n } else if (nowChar === '\"') {\n syntaxStack.push('\"');\n } else if (nowChar === \"'\") {\n syntaxStack.push(\"'\");\n } else {\n temp += nowChar;\n }\n i += 1;\n }\n return rst || temp;\n}\nvar keyConvert = function keyConvert(str) {\n return str.split('-').reduce(function (a, b) {\n return a + b.charAt(0).toUpperCase() + b.slice(1);\n });\n};\n/**\n * 简单的一个{{}}模板渲染,不包含任何复杂语法\n * @param xml\n */\nexport var xmlDataRenderer = function xmlDataRenderer(xml) {\n return function (data) {\n var len = xml.length;\n var arr = [];\n var i = 0;\n var tmp = '';\n while (i < len) {\n if (xml[i] === '{' && xml[i + 1] === '{') {\n arr.push(tmp);\n tmp = '';\n i += 2;\n } else if (xml[i] === '}' && xml[i + 1] === '}') {\n if (arr.length) {\n var last = arr.pop();\n tmp = get(data, tmp, last.endsWith('=') ? \"\\\"{\".concat(tmp, \"}\\\"\") : tmp);\n arr.push(last + tmp);\n }\n i += 2;\n tmp = '';\n } else {\n tmp += xml[i];\n i += 1;\n }\n }\n arr.push(tmp);\n return arr.map(function (e, index) {\n return arr[index - 1] && arr[index - 1].endsWith('=') ? \"\\\"{\".concat(e, \"}\\\"\") : e;\n }).join('');\n };\n};\n/**\n * 解析XML,并转化为相应的JSON结构\n * @param xml xml解析后的节点\n */\nexport function parseXML(xml, cfg) {\n var attrs = {};\n var keys = xml.getAttributeNames && xml.getAttributeNames() || [];\n var children = xml.children && Array.from(xml.children).map(function (e) {\n return parseXML(e, cfg);\n });\n var rst = {};\n var tagName = xml.tagName ? xml.tagName.toLowerCase() : 'group';\n if (tagName === 'text') {\n attrs.text = xml.innerText;\n }\n rst.type = tagName;\n if (tagName === 'img') {\n rst.type = 'image';\n }\n Array.from(keys).forEach(function (k) {\n var key = keyConvert(k);\n var val = xml.getAttribute(k);\n try {\n if (key === 'style' || key === 'attrs') {\n var style = looseJSONParse(val);\n attrs = __assign(__assign({}, attrs), style);\n } else {\n rst[key] = looseJSONParse(val);\n }\n } catch (e) {\n if (key === 'style') {\n throw e;\n }\n rst[key] = val;\n }\n });\n rst.attrs = attrs;\n if (cfg && cfg.style && rst.name && _typeof(cfg.style[rst.name]) === 'object') {\n rst.attrs = __assign(__assign({}, rst.attrs), cfg.style[rst.name]);\n }\n if (cfg && cfg.style && rst.keyshape) {\n rst.attrs = __assign(__assign({}, rst.attrs), cfg.style);\n }\n if (children.length) {\n rst.children = children;\n }\n return rst;\n}\n/**\n * 根据偏移量和内部节点最终的bounding box来得出该shape最终的bbox\n */\nexport function getBBox(node, offset, childrenBBox) {\n var _a = node.attrs,\n attrs = _a === void 0 ? {} : _a;\n var bbox = {\n x: offset.x || 0,\n y: offset.y || 0,\n width: childrenBBox.width || 0,\n height: childrenBBox.height || 0\n };\n var shapeHeight, shapeWidth;\n switch (node.type) {\n case 'maker':\n case 'circle':\n if (attrs.r) {\n shapeWidth = 2 * attrs.r;\n shapeHeight = 2 * attrs.r;\n }\n break;\n case 'text':\n if (attrs.text) {\n shapeWidth = getTextSize(attrs.text, attrs.fontSize || 12)[0];\n shapeHeight = 16;\n bbox.y += shapeHeight;\n bbox.height = shapeHeight;\n bbox.width = shapeWidth;\n node.attrs = __assign({\n fontSize: 12,\n fill: '#000'\n }, attrs);\n }\n break;\n default:\n if (attrs.width) {\n shapeWidth = attrs.width;\n }\n if (attrs.height) {\n shapeHeight = attrs.height;\n }\n }\n if (shapeHeight >= 0) {\n bbox.height = shapeHeight;\n }\n if (shapeWidth >= 0) {\n bbox.width = shapeWidth;\n }\n if (attrs.marginTop) {\n bbox.y += attrs.marginTop;\n }\n if (attrs.marginLeft) {\n bbox.x += attrs.marginLeft;\n }\n return bbox;\n}\n/**\n * 把从xml计算出的结构填上位置信息,补全attrs\n * @param target\n * @param lastOffset\n */\nexport function generateTarget(target, lastOffset) {\n var _a;\n if (lastOffset === void 0) {\n lastOffset = {\n x: 0,\n y: 0\n };\n }\n var defaultBbox = __assign({\n x: 0,\n y: 0,\n width: 0,\n height: 0\n }, lastOffset);\n if ((_a = target.children) === null || _a === void 0 ? void 0 : _a.length) {\n var _b = target.attrs,\n attrs = _b === void 0 ? {} : _b;\n var marginTop = attrs.marginTop;\n var offset = __assign({}, lastOffset);\n if (marginTop) {\n offset.y += marginTop;\n }\n for (var index = 0; index < target.children.length; index++) {\n target.children[index].attrs.key = \"\".concat(attrs.key || 'root', \" -\").concat(index, \" \");\n var node = generateTarget(target.children[index], offset);\n if (node.bbox) {\n var bbox = node.bbox;\n if (node.attrs.next === 'inline') {\n offset.x += node.bbox.width;\n } else {\n offset.y += node.bbox.height;\n }\n if (bbox.width + bbox.x > defaultBbox.width) {\n defaultBbox.width = bbox.width + bbox.x;\n }\n if (bbox.height + bbox.y > defaultBbox.height) {\n defaultBbox.height = bbox.height + bbox.y;\n }\n }\n }\n }\n target.bbox = getBBox(target, lastOffset, defaultBbox);\n target.attrs = __assign(__assign({}, target.attrs), target.bbox);\n return target;\n}\n/**\n * 对比前后两个最终计算出来的node,并对比出最小改动,\n * 动作: 'add' 添加节点 | ’delete‘ 删除节点 | ’change‘ 改变节点attrs | 'restructure' 重构节点\n * @param nowTarget\n * @param formerTarget\n */\nexport function compareTwoTarget(nowTarget, formerTarget) {\n var _a, _b, _c, _d;\n var type = (nowTarget || {}).type;\n var key = ((formerTarget === null || formerTarget === void 0 ? void 0 : formerTarget.attrs) || {}).key;\n if (key && nowTarget) {\n nowTarget.attrs.key = key;\n }\n if (!nowTarget && formerTarget) {\n return {\n action: 'delete',\n val: formerTarget,\n type: type,\n key: key\n };\n }\n if (nowTarget && !formerTarget) {\n return {\n action: 'add',\n val: nowTarget,\n type: type\n };\n }\n if (!nowTarget && !formerTarget) {\n return {\n action: 'same',\n type: type\n };\n }\n var children = [];\n if (((_a = nowTarget.children) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_b = formerTarget.children) === null || _b === void 0 ? void 0 : _b.length) > 0) {\n var length_1 = Math.max((_c = nowTarget.children) === null || _c === void 0 ? void 0 : _c.length, (_d = formerTarget.children) === null || _d === void 0 ? void 0 : _d.length);\n var formerChildren = formerTarget.children || [];\n var nowChildren = nowTarget.children || [];\n for (var index = 0; index < length_1; index += 1) {\n children.push(compareTwoTarget(nowChildren[index], formerChildren[index]));\n }\n }\n var formerKeys = Object.keys(formerTarget.attrs);\n var nowKeys = Object.keys(nowTarget.attrs);\n if (formerTarget.type !== nowTarget.type) {\n return {\n action: 'restructure',\n nowTarget: nowTarget,\n formerTarget: formerTarget,\n key: key,\n children: children\n };\n }\n if (formerKeys.filter(function (e) {\n return e !== 'children';\n }).some(function (e) {\n return nowTarget.attrs[e] !== formerTarget.attrs[e] || !nowKeys.includes(e);\n })) {\n return {\n action: 'change',\n val: nowTarget,\n children: children,\n type: type,\n key: key\n };\n }\n return {\n action: 'same',\n children: children,\n type: type,\n key: key\n };\n}\n/**\n * 根据xml或者返回xml的函数构建自定义节点的结构\n * @param gen\n */\nexport function createNodeFromXML(gen) {\n var structures = {};\n var compileXML = function compileXML(cfg) {\n var rawStr = typeof gen === 'function' ? gen(cfg) : gen;\n var target = xmlDataRenderer(rawStr)(cfg);\n var xmlParser = document.createElement('div');\n xmlParser.innerHTML = target;\n var xml = xmlParser.children[0];\n var result = generateTarget(parseXML(xml, cfg));\n xmlParser.remove();\n return result;\n };\n return {\n draw: function draw(cfg, group) {\n var resultTarget = compileXML(cfg);\n var keyshape = group;\n var renderTarget = function renderTarget(target) {\n var _a = target.attrs,\n attrs = _a === void 0 ? {} : _a,\n bbox = target.bbox,\n type = target.type,\n children = target.children,\n rest = __rest(target, [\"attrs\", \"bbox\", \"type\", \"children\"]);\n if (target.type !== 'group') {\n var shape = group.addShape(target.type, __assign({\n attrs: attrs,\n origin: {\n bbox: bbox,\n type: type,\n children: children\n }\n }, rest));\n if (target.keyshape) {\n keyshape = shape;\n }\n }\n if (target.children) {\n target.children.forEach(function (n) {\n return renderTarget(n);\n });\n }\n };\n renderTarget(resultTarget);\n structures[cfg.id] = [resultTarget];\n return keyshape;\n },\n update: function update(cfg, node) {\n if (!structures[cfg.id]) {\n structures[cfg.id] = [];\n }\n var container = node.getContainer();\n var children = container.get('children');\n var newTarget = compileXML(cfg);\n var lastTarget = structures[cfg.id].pop();\n var diffResult = compareTwoTarget(newTarget, lastTarget);\n var addShape = function addShape(shape) {\n var _a;\n if (shape.type !== 'group') {\n container.addShape(shape.type, {\n attrs: shape.attrs\n });\n }\n if ((_a = shape.children) === null || _a === void 0 ? void 0 : _a.length) {\n shape.children.map(function (e) {\n return addShape(e);\n });\n }\n };\n var delShape = function delShape(shape) {\n var _a;\n var targetShape = children.find(function (e) {\n return e.attrs.key === shape.attrs.key;\n });\n if (targetShape) {\n container.removeChild(targetShape);\n }\n if ((_a = shape.children) === null || _a === void 0 ? void 0 : _a.length) {\n shape.children.map(function (e) {\n return delShape(e);\n });\n }\n };\n var updateTarget = function updateTarget(target) {\n var key = target.key;\n if (target.type !== 'group') {\n var targetShape = children.find(function (e) {\n return e.attrs.key === key;\n });\n switch (target.action) {\n case 'change':\n if (targetShape) {\n var originAttr = target.val.keyshape ? node.getOriginStyle() : {};\n targetShape.attr(__assign(__assign({}, originAttr), target.val.attrs));\n }\n break;\n case 'add':\n addShape(target.val);\n break;\n case 'delete':\n delShape(target.val);\n break;\n case 'restructure':\n delShape(target.formerTarget);\n addShape(target.nowTarget);\n break;\n default:\n break;\n }\n }\n if (target.children) {\n target.children.forEach(function (n) {\n return updateTarget(n);\n });\n }\n };\n updateTarget(diffResult);\n structures[cfg.id].push(newTarget);\n },\n getAnchorPoints: function getAnchorPoints() {\n return [[0, 0.5], [1, 0.5], [0.5, 1], [0.5, 0]];\n }\n };\n}","import { __assign } from \"tslib\";\nimport { upperFirst } from '@antv/util';\nimport { createNodeFromXML } from './xml';\nvar cache = {}; // ucfirst 开销过大,进行缓存\n// 首字母大写\nfunction ucfirst(str) {\n if (!cache[str]) {\n cache[str] = upperFirst(str);\n }\n return cache[str];\n}\n/**\n * 工厂方法的基类\n * @type Shape.FactoryBase\n */\nexport var ShapeFactoryBase = {\n /**\n * 默认的形状,当没有指定/匹配 shapeType 时,使用默认的\n * @type {String}\n */\n defaultShapeType: 'defaultType',\n /**\n * 形状的 className,用于搜索\n * @type {String}\n */\n className: null,\n /**\n * 获取绘制 Shape 的工具类,无状态\n * @param {String} type 类型\n * @return {Shape} 工具类\n */\n getShape: function getShape(type) {\n var self = this;\n var shape = self[type] || self[self.defaultShapeType] || self['simple-circle'];\n return shape;\n },\n /**\n * 绘制图形\n * @param {String} type 类型\n * @param {Object} cfg 配置项\n * @param {G.Group} group 图形的分组\n * @return {IShape} 图形对象\n */\n draw: function draw(type, cfg, group) {\n var shape = this.getShape(type);\n group['shapeMap'] = {};\n var rst = shape.draw(cfg, group);\n if (shape.afterDraw) {\n shape.afterDraw(cfg, group, rst);\n }\n return rst;\n },\n /**\n * 更新\n * @param {String} type 类型\n * @param {Object} cfg 配置项\n * @param {G6.Item} item 节点、边、分组等\n */\n baseUpdate: function baseUpdate(type, cfg, item, updateType) {\n var _a, _b;\n var shape = this.getShape(type);\n // 防止没定义 update 函数\n if (shape.update) {\n // shape.mergeStyle = updateType === 'move' || updateType === 'bbox' ? {} : shape.getOptions?.(cfg);\n shape.mergeStyle = (_a = shape.getOptions) === null || _a === void 0 ? void 0 : _a.call(shape, cfg, updateType);\n (_b = shape.update) === null || _b === void 0 ? void 0 : _b.call(shape, cfg, item, updateType);\n }\n if (shape.afterUpdate) {\n shape.afterUpdate(cfg, item);\n }\n },\n /**\n * 设置状态\n * @param {String} type 类型\n * @param {String} name 状态名\n * @param {String | Boolean} value 状态值\n * @param {G6.Item} item 节点、边、分组等\n */\n setState: function setState(type, name, value, item) {\n var shape = this.getShape(type);\n // 调用 shape/shapeBase.ts 中的 setState 方法\n shape.setState(name, value, item);\n },\n /**\n * 是否允许更新,不重新绘制图形\n * @param {String} type 类型\n * @return {Boolean} 是否允许使用更新\n */\n shouldUpdate: function shouldUpdate(type) {\n var shape = this.getShape(type);\n return !!shape.update;\n },\n getControlPoints: function getControlPoints(type, cfg) {\n var shape = this.getShape(type);\n return shape.getControlPoints(cfg);\n },\n /**\n * 获取控制点\n * @param {String} type 节点、边类型\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getAnchorPoints: function getAnchorPoints(type, cfg) {\n var shape = this.getShape(type);\n return shape.getAnchorPoints(cfg);\n }\n};\n/**\n * 元素的框架\n */\nvar ShapeFramework = {\n // 默认样式及配置\n options: {},\n /**\n * 绘制\n */\n draw: function draw(cfg, group) {\n return this.drawShape(cfg, group);\n },\n /**\n * 绘制\n */\n drawShape: function drawShape( /* cfg, group */) {},\n /**\n * 绘制完成后的操作,便于用户继承现有的节点、边\n */\n afterDraw: function afterDraw( /* cfg, group */) {},\n // update(cfg, item) // 默认不定义\n afterUpdate: function afterUpdate( /* cfg, item */) {},\n /**\n * 设置节点、边状态\n */\n setState: function setState( /* name, value, item */) {},\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getAnchorPoints: function getAnchorPoints(cfg) {\n var defaultAnchorPoints = this.options.anchorPoints;\n var anchorPoints = cfg.anchorPoints || defaultAnchorPoints;\n return anchorPoints;\n }\n /* 如果没定义 update 方法,每次都调用 draw 方法\n update(cfg, item) {\n }\n */\n};\n\nvar Shape = /** @class */function () {\n function Shape() {}\n Shape.registerFactory = function (factoryType, cfg) {\n var className = ucfirst(factoryType);\n var factoryBase = ShapeFactoryBase;\n var shapeFactory = __assign(__assign({}, factoryBase), cfg);\n Shape[className] = shapeFactory;\n shapeFactory.className = className;\n return shapeFactory;\n };\n Shape.getFactory = function (factoryType) {\n var className = ucfirst(factoryType);\n return Shape[className];\n };\n Shape.registerNode = function (shapeType, nodeDefinition, extendShapeType) {\n var shapeFactory = Shape.Node;\n var shapeObj;\n if (typeof nodeDefinition === 'string' || typeof nodeDefinition === 'function') {\n var autoNodeDefinition = createNodeFromXML(nodeDefinition);\n shapeObj = __assign(__assign({}, shapeFactory.getShape('single-node')), autoNodeDefinition);\n } else if (nodeDefinition.jsx) {\n var jsx = nodeDefinition.jsx;\n var autoNodeDefinition = createNodeFromXML(jsx);\n shapeObj = __assign(__assign(__assign({}, shapeFactory.getShape('single-node')), autoNodeDefinition), nodeDefinition);\n } else {\n shapeFactory.getShape(extendShapeType);\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n shapeObj = __assign(__assign({}, extendShape), nodeDefinition);\n }\n shapeObj.type = shapeType;\n shapeObj.itemType = 'node';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n Shape.registerEdge = function (shapeType, edgeDefinition, extendShapeType) {\n var shapeFactory = Shape.Edge;\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n var shapeObj = __assign(__assign({}, extendShape), edgeDefinition);\n shapeObj.type = shapeType;\n shapeObj.itemType = 'edge';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n Shape.registerCombo = function (shapeType, comboDefinition, extendShapeType) {\n var shapeFactory = Shape.Combo;\n var extendShape = extendShapeType ? shapeFactory.getShape(extendShapeType) : ShapeFramework;\n var shapeObj = __assign(__assign({}, extendShape), comboDefinition);\n shapeObj.type = shapeType;\n shapeObj.itemType = 'combo';\n shapeFactory[shapeType] = shapeObj;\n return shapeObj;\n };\n return Shape;\n}();\nexport default Shape;\n// 注册 Node 的工厂方法\nShape.registerFactory('node', {\n defaultShapeType: 'circle'\n});\n// 注册 Edge 的工厂方法\nShape.registerFactory('edge', {\n defaultShapeType: 'line'\n});\n// 注册 Combo 的工厂方法\nShape.registerFactory('combo', {\n defaultShapeType: 'circle'\n});","import { __assign } from \"tslib\";\nimport { each, isPlainObject, isString, isBoolean, mix, deepMix, clone } from '@antv/util';\nimport Shape from '../element/shape';\nimport { getBBox } from '../util/graphic';\nimport { translate } from '../util/math';\nimport { uniqueId } from '../util/base';\nvar CACHE_BBOX = 'bboxCache';\nvar CACHE_CANVAS_BBOX = 'bboxCanvasCache';\nvar ARROWS = ['startArrow', 'endArrow'];\nvar ItemBase = /** @class */function () {\n function ItemBase(cfg) {\n this._cfg = {};\n this.destroyed = false;\n // 是否开启优化,由 graph 根据当前图上节点数量来控制\n this.optimize = false;\n var defaultCfg = {\n /**\n * id\n * @type {string}\n */\n id: undefined,\n /**\n * 类型\n * @type {string}\n */\n type: 'item',\n /**\n * data model\n * @type {object}\n */\n model: {},\n /**\n * g group\n * @type {G.Group}\n */\n group: undefined,\n /**\n * is open animate\n * @type {boolean}\n */\n animate: false,\n /**\n * visible - not group visible\n * @type {boolean}\n */\n visible: true,\n /**\n * locked - lock node\n * @type {boolean}\n */\n locked: false,\n /**\n * capture event\n * @type {boolean}\n */\n event: true,\n /**\n * key shape to calculate item's bbox\n * @type object\n */\n keyShape: undefined,\n /**\n * item's states, such as selected or active\n * @type Array\n */\n states: []\n };\n this._cfg = Object.assign(defaultCfg, this.getDefaultCfg(), cfg);\n var model = this.get('model');\n var id = model.id;\n var itemType = this.get('type');\n if (typeof id === 'undefined') {\n id = uniqueId(itemType);\n } else if (typeof id !== 'string') {\n id = String(id);\n }\n this.get('model').id = id;\n this.set('id', id);\n var group = cfg.group;\n if (group) {\n group.set('item', this);\n group.set('id', id);\n }\n this.init();\n this.draw();\n var shapeType = model.shape || model.type || (itemType === 'edge' ? 'line' : 'circle');\n var shapeFactory = this.get('shapeFactory');\n if (shapeFactory && shapeFactory[shapeType]) {\n var options = shapeFactory[shapeType].options;\n // merge the stateStyles from item and shape\n if (options && options.stateStyles) {\n var styles = this.get('styles') || model.stateStyles;\n styles = deepMix({}, options.stateStyles, styles);\n this.set('styles', styles);\n }\n }\n }\n /**\n * 根据 keyshape 计算包围盒\n */\n ItemBase.prototype.calculateBBox = function () {\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n return bbox;\n };\n /**\n * 根据 keyshape 计算包围盒\n */\n ItemBase.prototype.calculateCanvasBBox = function () {\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n return bbox;\n };\n /**\n * draw shape\n */\n ItemBase.prototype.drawInner = function () {\n var self = this;\n var shapeFactory = self.get('shapeFactory');\n var group = self.get('group');\n var model = self.get('model');\n group.clear();\n var visible = model.visible;\n if (visible !== undefined && !visible) self.changeVisibility(visible);\n if (!shapeFactory) {\n return;\n }\n self.updatePosition(model);\n var cfg = self.getShapeCfg(model); // 可能会附加额外信息\n var shapeType = cfg.type;\n var keyShape = shapeFactory.draw(shapeType, cfg, group);\n if (keyShape) {\n self.set('keyShape', keyShape);\n keyShape.set('isKeyShape', true);\n keyShape.set('draggable', true);\n }\n this.setOriginStyle();\n // 防止由于用户外部修改 model 中的 shape 导致 shape 不更新\n this.set('currentShape', shapeType);\n this.restoreStates(shapeFactory, shapeType);\n };\n /**\n * 设置图元素原始样式\n * @param keyShape 图元素 keyShape\n * @param group Group 容器\n */\n ItemBase.prototype.setOriginStyle = function () {\n var group = this.get('group');\n var children = group.get('children');\n var keyShape = this.getKeyShape();\n var self = this;\n var keyShapeName = keyShape.get('name');\n if (!this.get('originStyle')) {\n // 第一次 set originStyle,直接拿首次渲染所有图形的 attrs\n var originStyles = {};\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var shapeType = child.get('type');\n var name_1 = child.get('name');\n if (name_1 && name_1 !== keyShapeName) {\n originStyles[name_1] = shapeType !== 'image' ? clone(child.attr()) : self.getShapeStyleByName(name_1);\n // The text's position and matrix is not allowed to be affected by states\n if (shapeType === 'text' && originStyles[name_1]) {\n delete originStyles[name_1].x;\n delete originStyles[name_1].y;\n delete originStyles[name_1].matrix;\n }\n } else {\n var keyShapeStyle = self.getShapeStyleByName(); // 可优化,需要去除 child.attr 中其他 shape 名的对象\n delete keyShapeStyle.path;\n delete keyShapeStyle.matrix;\n if (!keyShapeName) {\n Object.assign(originStyles, keyShapeStyle);\n } else {\n // 若 keyShape 有 name 且 !name,这个图形不是 keyShape,给这个图形一个 name\n if (!name_1) {\n var shapeName = uniqueId('shape');\n child.set('name', shapeName);\n group['shapeMap'][shapeName] = child;\n originStyles[shapeName] = shapeType !== 'image' ? clone(child.attr()) : self.getShapeStyleByName(name_1);\n } else {\n originStyles[keyShapeName] = keyShapeStyle;\n }\n }\n }\n }\n self.set('originStyle', originStyles);\n } else {\n // 第二次 set originStyles,需要找到不是 stateStyles 的样式,更新到 originStyles 中\n // 上一次设置的 originStyle,是初始的 shape attrs\n var styles_1 = this.get('originStyle');\n // let styles: ShapeStyle = {};\n if (keyShapeName && !styles_1[keyShapeName]) styles_1[keyShapeName] = {};\n // 获取当前状态样式\n var currentStatesStyle_1 = this.getCurrentStatesStyle();\n var _loop_1 = function _loop_1(i) {\n var child = children[i];\n var name_2 = child.get('name');\n var shapeAttrs = child.attr();\n if (name_2 && name_2 !== keyShapeName) {\n // 有 name 的非 keyShape 图形\n var shapeStateStyle_1 = currentStatesStyle_1[name_2];\n if (!styles_1[name_2]) styles_1[name_2] = {};\n if (shapeStateStyle_1) {\n Object.keys(shapeAttrs).forEach(function (key) {\n var value = shapeAttrs[key];\n if (value !== shapeStateStyle_1[key]) styles_1[name_2][key] = value;\n });\n } else {\n styles_1[name_2] = child.get('type') !== 'image' ? clone(shapeAttrs) : self.getShapeStyleByName(name_2);\n }\n } else {\n var shapeAttrs_1 = child.attr();\n var keyShapeStateStyles_1 = {};\n Object.keys(currentStatesStyle_1).forEach(function (styleKey) {\n var subStyle = currentStatesStyle_1[styleKey];\n if (styleKey === keyShapeName || !isPlainObject(subStyle)) {\n keyShapeStateStyles_1[styleKey] = subStyle;\n }\n });\n Object.keys(shapeAttrs_1).forEach(function (key) {\n var value = shapeAttrs_1[key];\n // 如果是对象且不是 arrow,则是其他 shape 的样式\n // if (isPlainObject(value) && ARROWS.indexOf(name) === -1) return;\n if (keyShapeStateStyles_1[key] !== value) {\n if (keyShapeName) styles_1[keyShapeName][key] = value;else styles_1[key] = value;\n }\n });\n }\n };\n // 遍历当前所有图形的 attrs,找到不是 stateStyles 的样式更新到 originStyles 中\n for (var i = 0; i < children.length; i++) {\n _loop_1(i);\n }\n delete styles_1.path;\n delete styles_1.matrix;\n delete styles_1.x;\n delete styles_1.y;\n if (styles_1[keyShapeName]) {\n delete styles_1[keyShapeName].x;\n delete styles_1[keyShapeName].y;\n delete styles_1[keyShapeName].matrix;\n delete styles_1[keyShapeName].path;\n }\n self.set('originStyle', styles_1);\n }\n };\n /**\n * restore shape states\n * @param shapeFactory\n * @param shapeType\n */\n ItemBase.prototype.restoreStates = function (shapeFactory, shapeType) {\n var self = this;\n var states = self.get('states');\n each(states, function (state) {\n shapeFactory.setState(shapeType, state, true, self);\n });\n };\n ItemBase.prototype.init = function () {\n var shapeFactory = Shape.getFactory(this.get('type'));\n this.set('shapeFactory', shapeFactory);\n };\n /**\n * 获取属性\n * @internal 仅内部类使用\n * @param {String} key 属性名\n * @return {object | string | number} 属性值\n */\n ItemBase.prototype.get = function (key) {\n return this._cfg[key];\n };\n /**\n * 设置属性\n * @internal 仅内部类使用\n * @param {String|Object} key 属性名,也可以是对象\n * @param {object | string | number} val 属性值\n */\n ItemBase.prototype.set = function (key, val) {\n if (isPlainObject(key)) {\n this._cfg = __assign(__assign({}, this._cfg), key);\n } else {\n this._cfg[key] = val;\n }\n };\n ItemBase.prototype.getDefaultCfg = function () {\n return {};\n };\n /**\n * 更新/刷新等操作后,清除 cache\n */\n ItemBase.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null);\n this.set(CACHE_CANVAS_BBOX, null);\n };\n /**\n * 渲染前的逻辑,提供给子类复写\n */\n ItemBase.prototype.beforeDraw = function () {};\n /**\n * 渲染后的逻辑,提供给子类复写\n */\n ItemBase.prototype.afterDraw = function () {};\n /**\n * 更新后做一些工作\n */\n ItemBase.prototype.afterUpdate = function () {};\n /**\n * draw shape\n */\n ItemBase.prototype.draw = function () {\n this.beforeDraw();\n this.drawInner();\n this.afterDraw();\n };\n ItemBase.prototype.getShapeStyleByName = function (name) {\n var group = this.get('group');\n var currentShape;\n if (name) {\n currentShape = group['shapeMap'][name] || group.find(function (element) {\n return element.get('name') === name;\n });\n } else {\n currentShape = this.getKeyShape();\n }\n if (currentShape) {\n var styles_2 = {};\n each(currentShape.attr(), function (val, key) {\n // 修改 img 通过 updateItem 实现\n if (key !== 'img' || isString(val)) {\n styles_2[key] = val;\n }\n });\n return styles_2;\n }\n return {};\n };\n ItemBase.prototype.getShapeCfg = function (model, updateType) {\n var styles = this.get('styles');\n if (styles) {\n // merge graph的item样式与数据模型中的样式\n var newModel = model;\n newModel.style = __assign(__assign({}, styles), model.style);\n return newModel;\n }\n return model;\n };\n /**\n * 获取指定状态的样式,去除了全局样式\n * @param state 状态名称\n */\n ItemBase.prototype.getStateStyle = function (state) {\n var styles = this.get('styles');\n var stateStyle = styles && styles[state];\n return stateStyle;\n };\n /**\n * get keyshape style\n */\n ItemBase.prototype.getOriginStyle = function () {\n return this.get('originStyle');\n };\n ItemBase.prototype.getCurrentStatesStyle = function () {\n var self = this;\n var styles = {};\n var states = self.getStates();\n if (!states || !states.length) {\n return this.get('originStyle');\n }\n each(self.getStates(), function (state) {\n styles = Object.assign(styles, self.getStateStyle(state));\n });\n return styles;\n };\n /**\n * 更改元素状态, visible 不属于这个范畴\n * @internal 仅提供内部类 graph 使用\n * @param {String} state 状态名\n * @param {Boolean} value 节点状态值\n */\n ItemBase.prototype.setState = function (state, value) {\n var states = this.get('states');\n var shapeFactory = this.get('shapeFactory');\n var stateName = state;\n var filterStateName = state;\n if (isString(value)) {\n stateName = \"\".concat(state, \":\").concat(value);\n filterStateName = \"\".concat(state, \":\");\n }\n var newStates = states;\n if (isBoolean(value)) {\n var index = states.indexOf(filterStateName);\n if (value) {\n if (index > -1) {\n return;\n }\n states.push(stateName);\n } else if (index > -1) {\n states.splice(index, 1);\n }\n } else if (isString(value)) {\n // 过滤掉 states 中 filterStateName 相关的状态\n var filterStates = states.filter(function (name) {\n return name.includes(filterStateName);\n });\n if (filterStates.length > 0) {\n this.clearStates(filterStates);\n }\n newStates = newStates.filter(function (name) {\n return !name.includes(filterStateName);\n });\n newStates.push(stateName);\n this.set('states', newStates);\n }\n if (shapeFactory) {\n var model = this.get('model');\n var type = model.type;\n // 调用 shape/shape.ts 中的 setState\n shapeFactory.setState(type, state, value, this);\n }\n };\n /**\n * 清除指定的状态,如果参数为空,则不做任务处理\n * @param states 状态名称\n */\n ItemBase.prototype.clearStates = function (states) {\n var self = this;\n var originStates = self.getStates();\n var shapeFactory = self.get('shapeFactory');\n var model = self.get('model');\n var shape = model.type;\n if (!states) {\n states = originStates;\n }\n if (isString(states)) {\n states = [states];\n }\n var newStates = originStates.filter(function (state) {\n return states.indexOf(state) === -1;\n });\n self.set('states', newStates);\n states.forEach(function (state) {\n shapeFactory.setState(shape, state, false, self);\n });\n };\n /**\n * 设置是否开启性能优化模式\n * 目前影响:节点的状态样式更新是否影响相关边的更新\n * @param {Boolean} enableOptimize 是否开启\n */\n ItemBase.prototype.setOptimize = function (enableOptimize) {\n this.optimize = enableOptimize;\n };\n /**\n * 节点的图形容器\n * @return {G.Group} 图形容器\n */\n ItemBase.prototype.getContainer = function () {\n return this.get('group');\n };\n /**\n * 节点的关键形状,用于计算节点大小,连线截距等\n * @return {IShapeBase} 关键形状\n */\n ItemBase.prototype.getKeyShape = function () {\n return this.get('keyShape');\n };\n /**\n * 节点数据模型\n * @return {Object} 数据模型\n */\n ItemBase.prototype.getModel = function () {\n return this.get('model');\n };\n /**\n * 节点类型\n * @return {string} 节点的类型\n */\n ItemBase.prototype.getType = function () {\n return this.get('type');\n };\n /**\n * 获取 Item 的ID\n */\n ItemBase.prototype.getID = function () {\n return this.get('id');\n };\n /**\n * 是否是 Item 对象,悬空边情况下进行判定\n */\n ItemBase.prototype.isItem = function () {\n return true;\n };\n /**\n * 获取当前元素的所有状态\n * @return {Array} 元素的所有状态\n */\n ItemBase.prototype.getStates = function () {\n return this.get('states');\n };\n /**\n * 当前元素是否处于某状态\n * @param {String} state 状态名\n * @return {Boolean} 是否处于某状态\n */\n ItemBase.prototype.hasState = function (state) {\n var states = this.getStates();\n return states.indexOf(state) >= 0;\n };\n /**\n * 刷新一般用于处理几种情况\n * 1. item model 在外部被改变\n * 2. 边的节点位置发生改变,需要重新计算边\n *\n * 因为数据从外部被修改无法判断一些属性是否被修改,直接走位置和 shape 的更新\n */\n ItemBase.prototype.refresh = function (updateType) {\n var model = this.get('model');\n // 更新元素位置\n this.updatePosition(model);\n // 更新元素内容,样式\n this.updateShape(updateType);\n // 做一些更新之后的操作\n this.afterUpdate();\n // 清除缓存\n this.clearCache();\n };\n ItemBase.prototype.getUpdateType = function (cfg) {\n return undefined;\n };\n /**\n * 将更新应用到 model 上,刷新属性\n * @internal 仅提供给 Graph 使用,外部直接调用 graph.update 接口\n * @param {Object} cfg 配置项,可以是增量信息\n */\n ItemBase.prototype.update = function (cfg, updateType) {\n if (updateType === void 0) {\n updateType = undefined;\n }\n var model = this.get('model');\n // 仅仅移动位置时,既不更新,也不重绘\n if (updateType === 'move') {\n this.updatePosition(cfg);\n } else {\n var oriVisible = model.visible;\n var cfgVisible = cfg.visible;\n if (oriVisible !== cfgVisible && cfgVisible !== undefined) this.changeVisibility(cfgVisible);\n var originPosition = {\n x: model.x,\n y: model.y\n };\n cfg.x = isNaN(+cfg.x) ? model.x : +cfg.x;\n cfg.y = isNaN(+cfg.y) ? model.y : +cfg.y;\n var styles = this.get('styles');\n if (cfg.stateStyles) {\n // 更新 item 时更新 this.get('styles') 中的值\n var stateStyles = cfg.stateStyles;\n mix(styles, stateStyles);\n delete cfg.stateStyles;\n }\n // 直接将更新合到原数据模型上,可以保证用户在外部修改源数据然后刷新时的样式符合期待。\n Object.assign(model, cfg);\n // 如果 x,y 有变化,先重置位置\n if (originPosition.x !== cfg.x || originPosition.y !== cfg.y) {\n this.updatePosition(cfg);\n }\n this.updateShape(updateType);\n }\n this.afterUpdate();\n this.clearCache();\n };\n /**\n * 更新元素内容,样式\n */\n ItemBase.prototype.updateShape = function (updateType) {\n var shapeFactory = this.get('shapeFactory');\n var model = this.get('model');\n var shape = model.type;\n // 判定是否允许更新\n // 1. 注册的节点允许更新(即有继承的/复写的 update 方法,即 update 方法没有被复写为 undefined)\n // 2. 更新后的 shape 等于原先的 shape\n if (shapeFactory.shouldUpdate(shape) && shape === this.get('currentShape')) {\n var updateCfg = this.getShapeCfg(model, updateType);\n shapeFactory.baseUpdate(shape, updateCfg, this, updateType);\n // 更新完以后重新设置原始样式\n if (updateType !== 'move') this.setOriginStyle();\n } else {\n // 如果不满足上面两种状态,重新绘制\n this.draw();\n }\n // 更新后重置节点状态\n this.restoreStates(shapeFactory, shape);\n };\n /**\n * 更新位置,避免整体重绘\n * @param {object} cfg 待更新数据\n */\n ItemBase.prototype.updatePosition = function (cfg) {\n var model = this.get('model');\n var x = isNaN(+cfg.x) ? +model.x : +cfg.x;\n var y = isNaN(+cfg.y) ? +model.y : +cfg.y;\n var group = this.get('group');\n if (isNaN(x) || isNaN(y)) {\n return false;\n }\n model.x = x;\n model.y = y;\n var matrix = group.getMatrix();\n if (matrix && matrix[6] === x && matrix[7] === y) return false;\n group.resetMatrix();\n // G 4.0 element 中移除了矩阵相关方法,详见https://www.yuque.com/antv/blog/kxzk9g#4rMMV\n translate(group, {\n x: x,\n y: y\n });\n this.clearCache(); // 位置更新后需要清除缓存\n return true;\n };\n /**\n * 获取 item 的包围盒,这个包围盒是相对于 item 自己,不会将 matrix 计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n ItemBase.prototype.getBBox = function () {\n // 计算 bbox 开销有些大,缓存\n var bbox = this.get(CACHE_BBOX);\n if (!bbox) {\n bbox = this.calculateBBox();\n this.set(CACHE_BBOX, bbox);\n }\n return bbox;\n };\n /**\n * 获取 item 相对于画布的包围盒,会将从顶层到当前元素的 matrix 都计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n ItemBase.prototype.getCanvasBBox = function () {\n // 计算 bbox 开销大,缓存\n var bbox = this.get(CACHE_CANVAS_BBOX);\n if (!bbox) {\n bbox = this.calculateCanvasBBox();\n this.set(CACHE_CANVAS_BBOX, bbox);\n }\n return bbox;\n };\n /**\n * 将元素放到最前面\n */\n ItemBase.prototype.toFront = function () {\n var group = this.get('group');\n group.toFront();\n };\n /**\n * 将元素放到最后面\n */\n ItemBase.prototype.toBack = function () {\n var group = this.get('group');\n group.toBack();\n };\n /**\n * 显示元素\n */\n ItemBase.prototype.show = function () {\n this.changeVisibility(true);\n };\n /**\n * 隐藏元素\n */\n ItemBase.prototype.hide = function () {\n this.changeVisibility(false);\n };\n /**\n * 更改是否显示\n * @param {Boolean} visible 是否显示\n */\n ItemBase.prototype.changeVisibility = function (visible) {\n var group = this.get('group');\n if (visible) {\n group.show();\n } else {\n group.hide();\n }\n this.set('visible', visible);\n };\n /**\n * 元素是否可见\n * @return {Boolean} 返回该元素是否可见\n */\n ItemBase.prototype.isVisible = function () {\n return this.get('visible');\n };\n /**\n * 是否拾取及出发该元素的交互事件\n * @param {Boolean} enable 标识位\n */\n ItemBase.prototype.enableCapture = function (enable) {\n var group = this.get('group');\n if (group) {\n group.set('capture', enable);\n }\n };\n ItemBase.prototype.destroy = function () {\n if (!this.destroyed) {\n var animate = this.get('animate');\n var group = this.get('group');\n if (animate) {\n group.stopAnimate();\n }\n group['shapeMap'] = {};\n this.clearCache();\n group.remove();\n this._cfg = null;\n this.destroyed = true;\n }\n };\n return ItemBase;\n}();\nexport default ItemBase;","import { __extends } from \"tslib\";\nimport { isString, isPlainObject, isNil, mix } from '@antv/util';\nimport Item from './item';\nvar END_MAP = {\n source: 'start',\n target: 'end'\n};\nvar ITEM_NAME_SUFFIX = 'Node'; // 端点的后缀,如 sourceNode, targetNode\nvar POINT_NAME_SUFFIX = 'Point'; // 起点或者结束点的后缀,如 startPoint, endPoint\nvar ANCHOR_NAME_SUFFIX = 'Anchor';\nvar Edge = /** @class */function (_super) {\n __extends(Edge, _super);\n function Edge() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Edge.prototype.getDefaultCfg = function () {\n return {\n type: 'edge',\n sourceNode: null,\n targetNode: null,\n startPoint: null,\n endPoint: null,\n linkCenter: false\n };\n };\n Edge.prototype.setEnd = function (name, value) {\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var itemName = name + ITEM_NAME_SUFFIX;\n var preItem = this.get(itemName);\n if (preItem && !preItem.destroyed) {\n // 如果之前存在节点,则移除掉边\n preItem.removeEdge(this);\n }\n if (isPlainObject(value)) {\n // 如果设置成具体的点,则清理节点\n this.set(pointName, value);\n this.set(itemName, null);\n } else if (value) {\n value.addEdge(this);\n this.set(itemName, value);\n this.set(pointName, null);\n }\n };\n /**\n * 获取连接点的坐标\n * @param name source | target\n * @param model 边的数据模型\n * @param controlPoints 控制点\n */\n Edge.prototype.getLinkPoint = function (name, model, controlPoints) {\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var itemName = name + ITEM_NAME_SUFFIX;\n var point = this.get(pointName);\n if (!point) {\n var item = this.get(itemName);\n var anchorName = name + ANCHOR_NAME_SUFFIX;\n var prePoint = this.getPrePoint(name, controlPoints);\n var anchorIndex = model[anchorName];\n if (!isNil(anchorIndex)) {\n // 如果有锚点,则使用锚点索引获取连接点\n point = item.getLinkPointByAnchor(anchorIndex);\n }\n // 如果锚点没有对应的点或者没有锚点,则直接计算连接点\n point = point || item.getLinkPoint(prePoint);\n if (!isNil(point.index)) {\n this.set(\"\".concat(name, \"AnchorIndex\"), point.index);\n }\n }\n return point;\n };\n /**\n * 获取同端点进行连接的点,计算交汇点\n * @param name\n * @param controlPoints\n */\n Edge.prototype.getPrePoint = function (name, controlPoints) {\n if (controlPoints && controlPoints.length) {\n var index = name === 'source' ? 0 : controlPoints.length - 1;\n return controlPoints[index];\n }\n var oppositeName = name === 'source' ? 'target' : 'source'; // 取另一个节点的位置\n return this.getEndPoint(oppositeName);\n };\n /**\n * 获取端点的位置\n * @param name\n */\n Edge.prototype.getEndPoint = function (name) {\n var itemName = name + ITEM_NAME_SUFFIX;\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var item = this.get(itemName);\n // 如果有端点,直接使用 model\n if (item && !item.destroyed) {\n return item.get('model');\n } // 否则直接使用点\n return this.get(pointName);\n };\n /**\n * 通过端点的中心获取控制点\n * @param model\n */\n Edge.prototype.getControlPointsByCenter = function (model) {\n var sourcePoint = this.getEndPoint('source');\n var targetPoint = this.getEndPoint('target');\n var shapeFactory = this.get('shapeFactory');\n var type = model.type;\n return shapeFactory.getControlPoints(type, {\n startPoint: sourcePoint,\n endPoint: targetPoint\n });\n };\n Edge.prototype.getEndCenter = function (name) {\n var itemName = name + ITEM_NAME_SUFFIX;\n var pointName = END_MAP[name] + POINT_NAME_SUFFIX;\n var item = this.get(itemName);\n // 如果有端点,直接使用 model\n if (item) {\n var bbox = item.getBBox();\n return {\n x: bbox.centerX,\n y: bbox.centerY\n };\n } // 否则直接使用点\n return this.get(pointName);\n };\n Edge.prototype.init = function () {\n _super.prototype.init.call(this);\n // 初始化两个端点\n this.setSource(this.get('source'));\n this.setTarget(this.get('target'));\n };\n Edge.prototype.getShapeCfg = function (model, updateType) {\n var self = this;\n var linkCenter = self.get('linkCenter'); // 如果连接到中心,忽视锚点、忽视控制点\n var cfg = (updateType === null || updateType === void 0 ? void 0 : updateType.includes('move')) ? model : _super.prototype.getShapeCfg.call(this, model);\n if (linkCenter) {\n cfg.startPoint = self.getEndCenter('source');\n cfg.endPoint = self.getEndCenter('target');\n } else {\n var controlPoints = cfg.controlPoints || self.getControlPointsByCenter(cfg);\n cfg.startPoint = self.getLinkPoint('source', model, controlPoints);\n cfg.endPoint = self.getLinkPoint('target', model, controlPoints);\n }\n cfg.sourceNode = self.get('sourceNode');\n cfg.targetNode = self.get('targetNode');\n return cfg;\n };\n /**\n * 获取边的数据模型\n */\n Edge.prototype.getModel = function () {\n var out = this.get('model');\n var sourceItem = this.get(\"source\".concat(ITEM_NAME_SUFFIX));\n var targetItem = this.get(\"target\".concat(ITEM_NAME_SUFFIX));\n if (sourceItem) {\n delete out[\"source\".concat(ITEM_NAME_SUFFIX)];\n } else {\n out.source = this.get(\"start\".concat(POINT_NAME_SUFFIX));\n }\n if (targetItem) {\n delete out[\"target\".concat(ITEM_NAME_SUFFIX)];\n } else {\n out.target = this.get(\"end\".concat(POINT_NAME_SUFFIX));\n }\n if (!isString(out.source) && !isPlainObject(out.source)) {\n out.source = out.source.getID();\n }\n if (!isString(out.target) && !isPlainObject(out.target)) {\n out.target = out.target.getID();\n }\n return out;\n };\n Edge.prototype.setSource = function (source) {\n this.setEnd('source', source);\n this.set('source', source);\n };\n Edge.prototype.setTarget = function (target) {\n this.setEnd('target', target);\n this.set('target', target);\n };\n Edge.prototype.getSource = function () {\n return this.get('source');\n };\n Edge.prototype.getTarget = function () {\n return this.get('target');\n };\n Edge.prototype.updatePosition = function () {\n return false;\n };\n /**\n * 边不需要重计算容器位置,直接重新计算 path 位置\n * @param {object} cfg 待更新数据\n */\n Edge.prototype.update = function (cfg, updateType) {\n if (updateType === void 0) {\n updateType = undefined;\n }\n var model = this.get('model');\n var oriVisible = model.visible;\n var cfgVisible = cfg.visible;\n if (oriVisible !== cfgVisible && cfgVisible !== undefined) this.changeVisibility(cfgVisible);\n var sourceItem = this.get('source');\n var targetItem = this.get('target');\n if (!sourceItem || sourceItem.destroyed || !targetItem || targetItem.destroyed) return;\n var styles = this.get('styles');\n if (cfg.stateStyles) {\n // 更新 item 时更新 this.get('styles') 中的值\n var stateStyles = cfg.stateStyles;\n mix(styles, stateStyles);\n delete cfg.stateStyles;\n }\n Object.assign(model, cfg);\n this.updateShape(updateType);\n this.afterUpdate();\n this.clearCache();\n };\n Edge.prototype.destroy = function () {\n var sourceItem = this.get(\"source\".concat(ITEM_NAME_SUFFIX));\n var targetItem = this.get(\"target\".concat(ITEM_NAME_SUFFIX));\n if (sourceItem && !sourceItem.destroyed) {\n sourceItem.removeEdge(this);\n }\n if (targetItem && !targetItem.destroyed) {\n targetItem.removeEdge(this);\n }\n _super.prototype.destroy.call(this);\n };\n return Edge;\n}(Item);\nexport default Edge;","import { __extends } from \"tslib\";\nimport { each, isNil, isNumber } from '@antv/util';\nimport { distance, getCircleIntersectByPoint, getEllipseIntersectByPoint, getRectIntersectByPoint } from '../util/math';\nimport Item from './item';\nvar CACHE_ANCHOR_POINTS = 'anchorPointsCache';\nvar CACHE_BBOX = 'bboxCache';\nvar Node = /** @class */function (_super) {\n __extends(Node, _super);\n function Node() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Node.prototype.getNearestPoint = function (points, curPoint) {\n var index = 0;\n var nearestPoint = points[0];\n var minDistance = distance(points[0], curPoint);\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n var dis = distance(point, curPoint);\n if (dis < minDistance) {\n nearestPoint = point;\n minDistance = dis;\n index = i;\n }\n }\n nearestPoint.anchorIndex = index;\n return nearestPoint;\n };\n Node.prototype.getDefaultCfg = function () {\n return {\n type: 'node',\n edges: []\n };\n };\n /**\n * 获取从节点关联的所有边\n */\n Node.prototype.getEdges = function () {\n return this.get('edges');\n };\n /**\n * 获取所有的入边\n */\n Node.prototype.getInEdges = function () {\n var self = this;\n return this.get('edges').filter(function (edge) {\n return edge.get('target') === self;\n });\n };\n /**\n * 获取所有的出边\n */\n Node.prototype.getOutEdges = function () {\n var self = this;\n return this.get('edges').filter(function (edge) {\n return edge.get('source') === self;\n });\n };\n /**\n * 获取节点的邻居节点\n *\n * @returns {INode[]}\n * @memberof Node\n */\n Node.prototype.getNeighbors = function (type) {\n var _this = this;\n var edges = this.get('edges');\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighborsConverter_1 = function neighborsConverter_1(edge) {\n return edge.getSource() === _this;\n };\n return edges.filter(neighborsConverter_1).map(function (edge) {\n return edge.getTarget();\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighborsConverter_2 = function neighborsConverter_2(edge) {\n return edge.getTarget() === _this;\n };\n return edges.filter(neighborsConverter_2).map(function (edge) {\n return edge.getSource();\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighborsConverter = function neighborsConverter(edge) {\n return edge.getSource() === _this ? edge.getTarget() : edge.getSource();\n };\n return edges.map(neighborsConverter);\n };\n /**\n * 根据锚点的索引获取连接点\n * @param {Number} index 索引\n */\n Node.prototype.getLinkPointByAnchor = function (index) {\n var anchorPoints = this.getAnchorPoints();\n return anchorPoints[index];\n };\n /**\n * 获取连接点\n * @param point\n */\n Node.prototype.getLinkPoint = function (point) {\n var keyShape = this.get('keyShape');\n var type = keyShape.get('type');\n var itemType = this.get('type');\n var centerX;\n var centerY;\n var bbox = this.getBBox();\n if (itemType === 'combo') {\n centerX = bbox.centerX || (bbox.maxX + bbox.minX) / 2;\n centerY = bbox.centerY || (bbox.maxY + bbox.minY) / 2;\n } else {\n centerX = bbox.centerX;\n centerY = bbox.centerY;\n }\n var anchorPoints = this.getAnchorPoints();\n var intersectPoint;\n switch (type) {\n case 'circle':\n intersectPoint = getCircleIntersectByPoint({\n x: centerX,\n y: centerY,\n r: bbox.width / 2\n }, point);\n break;\n case 'ellipse':\n intersectPoint = getEllipseIntersectByPoint({\n x: centerX,\n y: centerY,\n rx: bbox.width / 2,\n ry: bbox.height / 2\n }, point);\n break;\n default:\n intersectPoint = getRectIntersectByPoint(bbox, point);\n }\n var linkPoint = intersectPoint;\n // 如果存在锚点,则使用交点计算最近的锚点\n if (anchorPoints.length) {\n if (!linkPoint) {\n // 如果计算不出交点\n linkPoint = point;\n }\n linkPoint = this.getNearestPoint(anchorPoints, linkPoint);\n }\n if (!linkPoint) {\n // 如果最终依然没法找到锚点和连接点,直接返回中心点\n linkPoint = {\n x: centerX,\n y: centerY\n };\n }\n return linkPoint;\n };\n /**\n * 获取锚点的定义\n * @return {array} anchorPoints\n */\n Node.prototype.getAnchorPoints = function () {\n var anchorPoints = this.get(CACHE_ANCHOR_POINTS);\n if (!anchorPoints) {\n anchorPoints = [];\n var shapeFactory = this.get('shapeFactory');\n var bbox_1 = this.getBBox();\n var model = this.get('model');\n var shapeCfg = this.getShapeCfg(model);\n var type = model.type;\n var points = shapeFactory.getAnchorPoints(type, shapeCfg) || [];\n each(points, function (pointArr, index) {\n var point = {\n x: bbox_1.minX + pointArr[0] * bbox_1.width,\n y: bbox_1.minY + pointArr[1] * bbox_1.height,\n anchorIndex: index\n };\n anchorPoints.push(point);\n });\n this.set(CACHE_ANCHOR_POINTS, anchorPoints);\n }\n return anchorPoints;\n };\n /**\n * add edge\n * @param edge Edge instance\n */\n Node.prototype.addEdge = function (edge) {\n this.get('edges').push(edge);\n };\n /**\n * 锁定节点\n */\n Node.prototype.lock = function () {\n this.set('locked', true);\n };\n /**\n * 解锁锁定的节点\n */\n Node.prototype.unlock = function () {\n this.set('locked', false);\n };\n Node.prototype.hasLocked = function () {\n return this.get('locked');\n };\n /**\n * 移除边\n * @param {Edge} edge 边\n */\n Node.prototype.removeEdge = function (edge) {\n var edges = this.getEdges();\n var index = edges.indexOf(edge);\n if (index > -1) edges.splice(index, 1);\n };\n Node.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null); // 清理缓存的 bbox\n this.set(CACHE_ANCHOR_POINTS, null);\n };\n /**\n * 判断更新的种类,move 表示仅移动,bbox 表示大小有变化,style 表示仅与大小无关的参数变化\n * @param cfg 节点数据模型\n */\n Node.prototype.getUpdateType = function (cfg) {\n var _a, _b, _c, _d, _e;\n if (!cfg) return undefined;\n var existX = !isNil(cfg.x);\n var existY = !isNil(cfg.y);\n var keys = Object.keys(cfg);\n // 仅有一个字段,包含 x 或者 包含 y\n // 两个字段,同时有 x,同时有 y\n if (keys.length === 1 && (existX || existY) || keys.length === 2 && existX && existY) return 'move';\n if (isNumber(cfg.x) || isNumber(cfg.y) || cfg.type || cfg.anchorPoints || cfg.size || (cfg === null || cfg === void 0 ? void 0 : cfg.style) && (((_a = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _a === void 0 ? void 0 : _a.r) || ((_b = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _b === void 0 ? void 0 : _b.width) || ((_c = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _c === void 0 ? void 0 : _c.height) || ((_d = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _d === void 0 ? void 0 : _d.rx) || ((_e = cfg === null || cfg === void 0 ? void 0 : cfg.style) === null || _e === void 0 ? void 0 : _e.ry))) return 'bbox|label';\n var updateLabel = keys.includes('label') || keys.includes('labelCfg');\n return updateLabel ? 'style|label' : 'style';\n };\n Node.prototype.setState = function (state, value) {\n var _this = this;\n if (this.optimize) {\n _super.prototype.setState.call(this, state, value);\n return;\n }\n this.runWithBBoxAffected(function () {\n return _super.prototype.setState.call(_this, state, value);\n });\n };\n Node.prototype.clearStates = function (states) {\n var _this = this;\n if (this.optimize) {\n _super.prototype.clearStates.call(this, states);\n return;\n }\n this.runWithBBoxAffected(function () {\n return _super.prototype.clearStates.call(_this, states);\n });\n };\n Node.prototype.runWithBBoxAffected = function (fn) {\n var bboxAffectedStyleKeys = ['r', 'width', 'height', 'rx', 'ry', 'lineWidth'];\n var beforeAttrs = this.getKeyShape().attr();\n var bboxAffectedStyleBefore = {};\n Object.keys(this.getKeyShape().attr()).forEach(function (key) {\n if (bboxAffectedStyleKeys.includes(key)) bboxAffectedStyleBefore[key] = beforeAttrs[key];\n });\n fn();\n // if the state styles affect the bbox, the bbox cache should be cleared to get correct edge connecting points\n var afterAttrs = this.getKeyShape().attr();\n for (var i = 0; i < bboxAffectedStyleKeys.length; i++) {\n var key = bboxAffectedStyleKeys[i];\n if (afterAttrs[key] !== bboxAffectedStyleBefore[key]) {\n this.clearCache();\n this.getEdges().forEach(function (edge) {\n return edge.refresh();\n });\n break;\n }\n }\n };\n return Node;\n}(Item);\nexport default Node;","import { __assign, __extends } from \"tslib\";\nimport Node from './node';\nimport Global from '../global';\nimport { getBBox } from '../util/graphic';\nimport { isNumber } from '@antv/util';\nvar CACHE_BBOX = 'bboxCache';\nvar CACHE_CANVAS_BBOX = 'bboxCanvasCache';\nvar CACHE_SIZE = 'sizeCache';\nvar CACHE_ANCHOR_POINTS = 'anchorPointsCache';\nvar Combo = /** @class */function (_super) {\n __extends(Combo, _super);\n function Combo() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Combo.prototype.getDefaultCfg = function () {\n return {\n type: 'combo',\n nodes: [],\n edges: [],\n combos: []\n };\n };\n Combo.prototype.getShapeCfg = function (model) {\n var styles = this.get('styles');\n var bbox = this.get('bbox');\n if (styles && bbox) {\n // merge graph的item样式与数据模型中的样式\n var newModel = model;\n var modelSize = isNumber(model.size) ? [model.size, model.size] : model.size;\n var modelFixSize = isNumber(model.fixSize) ? [model.fixSize, model.fixSize] : model.fixSize;\n var useModelSize = modelSize || modelFixSize || Global.defaultCombo.size;\n var size = {\n r: (Math.max(bbox.width, bbox.height) || Math.max(useModelSize[0], useModelSize[1])) / 2,\n width: bbox.width || useModelSize[0],\n height: bbox.height || useModelSize[1]\n };\n newModel.style = __assign(__assign(__assign({}, styles), model.style), size);\n var padding = model.padding || Global.defaultCombo.padding;\n if (isNumber(padding)) {\n size.r += padding;\n size.width += padding * 2;\n size.height += padding * 2;\n } else {\n size.r = size.r + Math.max.apply(Math, padding);\n size.width += padding[1] + padding[3] || padding[1] * 2;\n size.height += padding[0] + padding[2] || padding[0] * 2;\n }\n this.set(CACHE_SIZE, size);\n return newModel;\n }\n return model;\n };\n /**\n * 根据 keyshape 计算包围盒\n */\n Combo.prototype.calculateCanvasBBox = function () {\n if (this.destroyed) return;\n var keyShape = this.get('keyShape');\n var group = this.get('group');\n var cacheBBox = this.get(CACHE_BBOX) || {};\n var oriX = cacheBBox.x;\n var oriY = cacheBBox.x;\n var cacheSize = this.get(CACHE_SIZE);\n // 因为 group 可能会移动,所以必须通过父元素计算才能计算出正确的包围盒\n var bbox = getBBox(keyShape, group);\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n if (cacheSize) {\n cacheSize.width = Math.max(cacheSize.width, bbox.width);\n cacheSize.height = Math.max(cacheSize.height, bbox.height);\n this.set(CACHE_SIZE, cacheSize);\n var type = keyShape.get('type');\n if (type === 'circle') {\n bbox.width = cacheSize.r * 2;\n bbox.height = cacheSize.r * 2;\n } else {\n bbox.width = cacheSize.width;\n bbox.height = cacheSize.height;\n }\n bbox.minX = bbox.centerX - bbox.width / 2;\n bbox.minY = bbox.centerY - bbox.height / 2;\n bbox.maxX = bbox.centerX + bbox.width / 2;\n bbox.maxY = bbox.centerY + bbox.height / 2;\n } else {\n bbox.width = bbox.maxX - bbox.minX;\n bbox.height = bbox.maxY - bbox.minY;\n bbox.centerX = (bbox.minX + bbox.maxX) / 2;\n bbox.centerY = (bbox.minY + bbox.maxY) / 2;\n }\n bbox.x = bbox.minX;\n bbox.y = bbox.minY;\n if (bbox.x !== oriX || bbox.y !== oriY) this.set(CACHE_ANCHOR_POINTS, null);\n return bbox;\n };\n /**\n * 获取 Combo 中所有的子元素,包括 Combo、Node 及 Edge\n */\n Combo.prototype.getChildren = function () {\n var self = this;\n return {\n nodes: self.getNodes(),\n combos: self.getCombos()\n };\n };\n /**\n * 获取 Combo 中所有子节点\n */\n Combo.prototype.getNodes = function () {\n var self = this;\n return self.get('nodes');\n };\n /**\n * 获取 Combo 中所有子 combo\n */\n Combo.prototype.getCombos = function () {\n var self = this;\n return self.get('combos');\n };\n /**\n * 向 Combo 中增加子 combo 或 node\n * @param item Combo 或节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addChild = function (item) {\n var self = this;\n var itemType = item.getType();\n switch (itemType) {\n case 'node':\n self.addNode(item);\n break;\n case 'combo':\n self.addCombo(item);\n break;\n default:\n console.warn('Only node or combo items are allowed to be added into a combo');\n return false;\n }\n return true;\n };\n /**\n * 向 Combo 中增加 combo\n * @param combo Combo 实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addCombo = function (combo) {\n var self = this;\n self.get('combos').push(combo);\n return true;\n };\n /**\n * 向 Combo 中添加节点\n * @param node 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.addNode = function (node) {\n var self = this;\n self.get('nodes').push(node);\n return true;\n };\n /**\n * 向 Combo 中增加子 combo 或 node\n * @param item Combo 或节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Combo.prototype.removeChild = function (item) {\n var self = this;\n var itemType = item.getType();\n switch (itemType) {\n case 'node':\n self.removeNode(item);\n break;\n case 'combo':\n self.removeCombo(item);\n break;\n default:\n console.warn('Only node or combo items are allowed to be added into a combo');\n return false;\n }\n return true;\n };\n /**\n * 从 Combo 中移除指定的 combo\n * @param combo Combo 实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Combo.prototype.removeCombo = function (combo) {\n if (!combo) return;\n var combos = this.getCombos();\n var index = combos.indexOf(combo);\n if (index > -1) {\n combos.splice(index, 1);\n return true;\n }\n return false;\n };\n /**\n * 向 Combo 中移除指定的节点\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Combo.prototype.removeNode = function (node) {\n if (!node) return;\n var nodes = this.getNodes();\n var index = nodes.indexOf(node);\n if (index > -1) {\n nodes.splice(index, 1);\n return true;\n }\n return false;\n };\n Combo.prototype.getUpdateType = function (cfg) {\n return undefined;\n };\n /**\n * 获取 item 的包围盒,这个包围盒是相对于 item 自己,不会将 matrix 计算在内\n * @return {Object} 包含 x,y,width,height, centerX, centerY\n */\n Combo.prototype.getBBox = function () {\n this.set(CACHE_CANVAS_BBOX, null);\n var bbox = this.calculateCanvasBBox();\n return bbox;\n };\n Combo.prototype.clearCache = function () {\n this.set(CACHE_BBOX, null); // 清理缓存的 bbox\n this.set(CACHE_CANVAS_BBOX, null);\n this.set(CACHE_ANCHOR_POINTS, null);\n };\n Combo.prototype.destroy = function () {\n if (!this.destroyed) {\n var animate = this.get('animate');\n var group = this.get('group');\n if (animate) {\n group.stopAnimate();\n }\n group['shapeMap'] = {};\n this.clearCache();\n this.set(CACHE_SIZE, null);\n this.set('bbox', null);\n group.remove();\n this._cfg = null;\n this.destroyed = true;\n }\n };\n return Combo;\n}(Node);\nexport default Combo;","import { __assign } from \"tslib\";\nimport { clone, deepMix, each, isArray, isObject, isString, upperFirst, throttle } from '@antv/util';\nimport Edge from '../../item/edge';\nimport Node from '../../item/node';\nimport Combo from '../../item/combo';\nimport { traverseTreeUp, traverseTree, getComboBBox } from '../../util/graphic';\nvar NODE = 'node';\nvar EDGE = 'edge';\nvar VEDGE = 'vedge';\nvar COMBO = 'combo';\nvar CFG_PREFIX = 'default';\nvar MAPPER_SUFFIX = 'Mapper';\nvar STATE_SUFFIX = 'stateStyles';\nvar ItemController = /** @class */function () {\n function ItemController(graph) {\n var _this = this;\n this.edgeToBeUpdateMap = {};\n /**\n * 更新边限流,同时可以防止相同的边频繁重复更新\n * */\n this.throttleRefresh = throttle(function (_) {\n var graph = _this.graph;\n if (!graph || graph.get('destroyed')) return;\n var edgeToBeUpdateMap = _this.edgeToBeUpdateMap;\n if (!edgeToBeUpdateMap) return;\n var edgeValues = Object.values(edgeToBeUpdateMap);\n if (!edgeValues.length) return;\n edgeValues.forEach(function (obj) {\n var edge = obj.edge;\n if (!edge || edge.destroyed) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n if (!source || source.destroyed || !target || target.destroyed) return;\n edge.refresh(obj.updateType);\n });\n _this.edgeToBeUpdateMap = {};\n }, 16, {\n trailing: true,\n leading: true\n });\n this.graph = graph;\n this.destroyed = false;\n }\n /**\n * 增加 Item 实例\n *\n * @param {ITEM_TYPE} type 实例类型,node 或 edge\n * @param {(NodeConfig & EdgeConfig)} model 数据模型\n * @returns {(Item)}\n * @memberof ItemController\n */\n ItemController.prototype.addItem = function (type, model) {\n var graph = this.graph;\n var vType = type === VEDGE ? EDGE : type;\n var parent = graph.get(\"\".concat(vType, \"Group\")) || graph.get('group');\n var upperType = upperFirst(vType);\n var item = null;\n // 获取 this.get('styles') 中的值\n var styles = graph.get(vType + upperFirst(STATE_SUFFIX)) || {};\n var defaultModel = graph.get(CFG_PREFIX + upperType);\n if (model[STATE_SUFFIX]) {\n // 设置 this.get('styles') 中的值\n styles = model[STATE_SUFFIX];\n }\n if (defaultModel) {\n // 很多布局会直接修改原数据模型,所以不能用 merge 的形式,逐个写入原 model 中\n each(defaultModel, function (val, cfg) {\n if (isObject(val) && !isArray(val)) {\n model[cfg] = deepMix({}, val, model[cfg]);\n } else if (isArray(val)) {\n model[cfg] = model[cfg] || clone(defaultModel[cfg]);\n } else {\n model[cfg] = model[cfg] || defaultModel[cfg];\n }\n });\n }\n var mapper = graph.get(vType + MAPPER_SUFFIX);\n if (mapper) {\n var mappedModel_1 = mapper(model);\n if (mappedModel_1[STATE_SUFFIX]) {\n // 设置 this.get('styles') 中的值\n styles = mappedModel_1[STATE_SUFFIX];\n delete mappedModel_1[STATE_SUFFIX];\n }\n // 如果配置了 defaultEdge 或 defaultNode,则将默认配置的数据也合并进去\n each(mappedModel_1, function (val, cfg) {\n if (isObject(val) && !isArray(val)) {\n model[cfg] = deepMix({}, model[cfg], val);\n } else {\n model[cfg] = mappedModel_1[cfg] || model[cfg];\n }\n });\n }\n graph.emit('beforeadditem', {\n type: type,\n model: model\n });\n if (type === EDGE || type === VEDGE) {\n var source = void 0;\n var target = void 0;\n source = model.source; // eslint-disable-line prefer-destructuring\n target = model.target; // eslint-disable-line prefer-destructuring\n if (source && isString(source)) {\n source = graph.findById(source);\n }\n if (target && isString(target)) {\n target = graph.findById(target);\n }\n if (!source || !target) {\n console.warn(\"The source or target node of edge \".concat(model.id, \" does not exist!\"));\n return;\n }\n if (source.getType && source.getType() === 'combo') {\n model.isComboEdge = true;\n // graph.updateCombo(source as ICombo);\n }\n\n if (target.getType && target.getType() === 'combo') {\n model.isComboEdge = true;\n // graph.updateCombo(target as ICombo);\n }\n\n item = new Edge({\n model: model,\n source: source,\n target: target,\n styles: styles,\n linkCenter: graph.get('linkCenter'),\n group: parent.addGroup()\n });\n } else if (type === NODE) {\n item = new Node({\n model: model,\n styles: styles,\n group: parent.addGroup()\n });\n } else if (type === COMBO) {\n var children = model.children;\n var comboBBox = getComboBBox(children, graph);\n var bboxX = void 0,\n bboxY = void 0;\n if (!isNaN(comboBBox.x)) bboxX = comboBBox.x;else if (isNaN(model.x)) bboxX = Math.random() * 100;\n if (!isNaN(comboBBox.y)) bboxY = comboBBox.y;else if (isNaN(model.y)) bboxY = Math.random() * 100;\n if (isNaN(model.x) || isNaN(model.y)) {\n model.x = bboxX;\n model.y = bboxY;\n } else {\n // if there is x y in model, place the combo according to it and move its succeed items. that means, the priority of the combo's position is higher than succeed items'\n var dx = model.x - bboxX;\n var dy = model.y - bboxY;\n // In the same time, adjust the children's positions\n this.updateComboSucceeds(model.id, dx, dy, children);\n }\n var comboGroup = parent.addGroup();\n comboGroup.setZIndex(model.depth);\n item = new Combo({\n model: model,\n styles: styles,\n animate: graph.get('animate'),\n bbox: model.collapsed ? getComboBBox([], graph) : comboBBox,\n group: comboGroup\n });\n // if it is a circle combo, diagonal length of the children's bbox should be the diameter of the combo's bbox\n if (!model.collapsed && item.getKeyShape().get('type') === 'circle') {\n comboBBox.width = Math.hypot(comboBBox.height, comboBBox.width);\n comboBBox.height = comboBBox.width;\n item.set('bbox', comboBBox);\n item.refresh();\n }\n var comboModel_1 = item.getModel();\n (children || []).forEach(function (child) {\n var childItem = graph.findById(child.id);\n item.addChild(childItem);\n child.depth = comboModel_1.depth + 2;\n });\n }\n if (item) {\n item.setOptimize(graph.getNodes().length > graph.get('optimizeThreshold'));\n graph.get(\"\".concat(type, \"s\")).push(item);\n graph.get('itemMap')[item.get('id')] = item;\n graph.emit('afteradditem', {\n item: item,\n model: model\n });\n // eslint-disable-next-line consistent-return\n return item;\n }\n };\n /**\n * 更新节点或边\n *\n * @param {Item} item ID 或 实例\n * @param {(EdgeConfig | Partial)} cfg 数据模型\n * @returns\n * @memberof ItemController\n */\n ItemController.prototype.updateItem = function (item, cfg) {\n var _this = this;\n var _a, _b;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item || item.destroyed) {\n return;\n }\n // 更新的 item 的类型\n var type = '';\n if (item.getType) type = item.getType();\n var mapper = graph.get(type + MAPPER_SUFFIX);\n var model = item.getModel();\n var oriX = model.x,\n oriY = model.y;\n var updateType = item.getUpdateType(cfg);\n if (mapper) {\n var result = deepMix({}, model, cfg);\n var mappedModel = mapper(result);\n // 将 update 时候用户传入的参数与mapperModel做deepMix,以便复用之前设置的参数值\n var newModel = deepMix({}, model, mappedModel, cfg);\n if (mappedModel[STATE_SUFFIX]) {\n item.set('styles', newModel[STATE_SUFFIX]);\n delete newModel[STATE_SUFFIX];\n }\n each(newModel, function (val, key) {\n cfg[key] = val;\n });\n } else {\n // merge update传进来的对象参数,model中没有的数据不做处理,对象和字符串值也不做处理,直接替换原来的\n each(cfg, function (val, key) {\n if (model[key]) {\n if (isObject(val) && !isArray(val)) {\n cfg[key] = __assign(__assign({}, model[key]), cfg[key]);\n }\n }\n });\n }\n // emit beforeupdateitem 事件\n graph.emit('beforeupdateitem', {\n item: item,\n cfg: cfg\n });\n if (type === EDGE) {\n // 若是边要更新source || target, 为了不影响示例内部model,并且重新计算startPoint和endPoint,手动设置\n if (cfg.source) {\n var source = cfg.source;\n if (isString(source)) {\n source = graph.findById(source);\n }\n item.setSource(source);\n }\n if (cfg.target) {\n var target = cfg.target;\n if (isString(target)) {\n target = graph.findById(target);\n }\n item.setTarget(target);\n }\n item.update(cfg);\n } else if (type === NODE) {\n item.update(cfg, updateType);\n var edges = item.getEdges();\n if (updateType === 'move') {\n each(edges, function (edge) {\n _this.edgeToBeUpdateMap[edge.getID()] = {\n edge: edge,\n updateType: updateType\n };\n _this.throttleRefresh();\n });\n } else if (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox')) {\n each(edges, function (edge) {\n edge.refresh(updateType);\n });\n }\n } else if (type === COMBO) {\n item.update(cfg, updateType);\n if (!isNaN(cfg.x) || !isNaN(cfg.y)) {\n // if there is x y in model, place the combo according to it and move its succeed items. that means, the priority of the combo's position is higher than succeed items'\n var dx = cfg.x - oriX || 0;\n var dy = cfg.y - oriY || 0;\n // In the same time, adjust the children's positions\n this.updateComboSucceeds(model.id, dx, dy);\n }\n var edges_1 = item.getEdges();\n var refreshEdge = (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox')) || updateType === 'move';\n if (refreshEdge && type === COMBO) {\n var shapeFactory = item.get('shapeFactory');\n var shapeType = model.type || 'circle';\n var comboAnimate = model.animate === undefined || cfg.animate === undefined ? (_b = (_a = shapeFactory[shapeType]) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.animate : model.animate || cfg.animate;\n if (comboAnimate) {\n setTimeout(function () {\n if (!item || item.destroyed) return;\n var keyShape = item.getKeyShape();\n if (!keyShape || keyShape.destroyed) return;\n each(edges_1, function (edge) {\n if (edge && !edge.destroyed) edge.refresh();\n });\n }, 201);\n } else {\n each(edges_1, function (edge) {\n edge.refresh();\n });\n }\n }\n }\n item.setOptimize(graph.getNodes().length > graph.get('optimizeThreshold'));\n graph.emit('afterupdateitem', {\n item: item,\n cfg: cfg\n });\n };\n /**\n * 根据 combo 的子元素更新 combo 的位置及大小\n *\n * @param {ICombo} combo ID 或 实例\n * @returns\n * @memberof ItemController\n */\n ItemController.prototype.updateCombo = function (combo, children, followCombo) {\n var _this = this;\n var _a, _b;\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n if (!combo || combo.destroyed) {\n return;\n }\n var model = combo.getModel();\n var comboBBox = getComboBBox(children, graph, combo);\n var comboX = comboBBox.x,\n comboY = comboBBox.y;\n combo.set('bbox', comboBBox);\n var x = comboX,\n y = comboY;\n if (followCombo) {\n // position of combo model first\n x = isNaN(model.x) ? comboX : model.x;\n y = isNaN(model.y) ? comboY : model.y;\n } else {\n // position of succeed items first\n x = isNaN(comboX) ? model.x : comboX;\n y = isNaN(comboY) ? model.y : comboY;\n }\n combo.update({\n x: x,\n y: y\n });\n var shapeFactory = combo.get('shapeFactory');\n var shapeType = model.type || 'circle';\n var comboAnimate = model.animate === undefined ? (_b = (_a = shapeFactory[shapeType]) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.animate : model.animate;\n if (comboAnimate) {\n setTimeout(function () {\n if (!combo || combo.destroyed) return;\n var keyShape = combo.getKeyShape();\n if (!keyShape || keyShape.destroyed) return;\n combo.getShapeCfg(model); // 更新 combo 缓存的 size\n _this.updateComboEdges(combo);\n }, 201);\n } else {\n this.updateComboEdges(combo);\n }\n };\n ItemController.prototype.updateComboEdges = function (combo) {\n var _a, _b;\n var combEdges = combo.getEdges() || [];\n for (var i = 0; i < combEdges.length; i++) {\n var edge = combEdges[i];\n if (!(edge === null || edge === void 0 ? void 0 : edge.destroyed) && !((_a = edge === null || edge === void 0 ? void 0 : edge.getSource()) === null || _a === void 0 ? void 0 : _a.destroyed) && !((_b = edge === null || edge === void 0 ? void 0 : edge.getTarget()) === null || _b === void 0 ? void 0 : _b.destroyed)) {\n edge.refresh();\n }\n }\n };\n /**\n * 收起 combo,隐藏相关元素\n */\n ItemController.prototype.collapseCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n var children = combo.getChildren();\n children.nodes.forEach(function (node) {\n graph.hideItem(node, stack);\n });\n children.combos.forEach(function (c) {\n graph.hideItem(c, stack);\n });\n };\n /**\n * 根据位置差量 dx dy,更新 comboId 后继元素的位置\n * */\n ItemController.prototype.updateComboSucceeds = function (comboId, dx, dy, children) {\n var _this = this;\n if (children === void 0) {\n children = [];\n }\n var graph = this.graph;\n if (!dx && !dy) return;\n var kids = children;\n if (!(kids === null || kids === void 0 ? void 0 : kids.length)) {\n var comboTrees = graph.get('comboTrees');\n comboTrees === null || comboTrees === void 0 ? void 0 : comboTrees.forEach(function (child) {\n traverseTree(child, function (subTree) {\n if (subTree.id === comboId) {\n kids = subTree.children;\n return false;\n }\n return true;\n });\n });\n }\n kids === null || kids === void 0 ? void 0 : kids.forEach(function (child) {\n var childItem = graph.findById(child.id);\n if (childItem) {\n var childModel = childItem.getModel();\n _this.updateItem(child.id, {\n x: (childModel.x || 0) + dx,\n y: (childModel.y || 0) + dy\n });\n }\n });\n };\n /**\n * 展开 combo,相关元素出现\n * 若子 combo 原先是收起状态,则保持它的收起状态\n */\n ItemController.prototype.expandCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var graph = this.graph;\n if (isString(combo)) {\n combo = graph.findById(combo);\n }\n var children = combo.getChildren();\n var edgeSet = new Set();\n children.nodes.forEach(function (node) {\n graph.showItem(node, stack);\n node.getEdges().forEach(function (edge) {\n return edgeSet.add(edge);\n });\n });\n children.combos.forEach(function (c) {\n if (c.getModel().collapsed) {\n c.show();\n } else {\n graph.showItem(c, stack);\n }\n c.getEdges().forEach(function (edge) {\n return edgeSet.add(edge);\n });\n });\n edgeSet.forEach(function (edge) {\n return edge.refresh();\n });\n };\n /**\n * 删除指定的节点或边\n *\n * @param {Item} item item ID 或实例\n * @returns {void}\n * @memberof ItemController\n */\n ItemController.prototype.removeItem = function (item) {\n var _this = this;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item || item.destroyed) {\n return;\n }\n var itemModel = clone(item.getModel());\n var type = '';\n if (item.getType) type = item.getType();\n graph.emit('beforeremoveitem', {\n item: itemModel,\n type: type\n });\n var items = graph.get(\"\".concat(type, \"s\"));\n var index = items.indexOf(item);\n if (index > -1) items.splice(index, 1);\n if (type === EDGE) {\n var vitems = graph.get(\"v\".concat(type, \"s\"));\n var vindex = vitems.indexOf(item);\n if (vindex > -1) vitems.splice(vindex, 1);\n }\n var itemId = item.get('id');\n var itemMap = graph.get('itemMap');\n delete itemMap[itemId];\n var comboTrees = graph.get('comboTrees');\n var id = item.get('id');\n if (type === NODE) {\n var comboId = item.getModel().comboId;\n if (comboTrees && comboId) {\n var brothers_1 = comboTrees;\n var found_1 = false; // the flag to terminate the forEach circulation\n // remove the node from the children array of its parent fromt he tree\n comboTrees.forEach(function (ctree) {\n if (found_1) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id && brothers_1) {\n var bidx = brothers_1.indexOf(combo);\n brothers_1.splice(bidx, 1);\n found_1 = true;\n return false; // terminate the traverse\n }\n\n brothers_1 = combo.children;\n return true;\n });\n });\n }\n // 若移除的是节点,需要将与之相连的边一同删除\n var edges = item.getEdges();\n for (var i = edges.length - 1; i >= 0; i--) {\n graph.removeItem(edges[i], false);\n }\n if (comboId) graph.updateCombo(comboId);\n } else if (type === COMBO) {\n var parentId = item.getModel().parentId;\n var comboInTree_1;\n // find the subtree rooted at the item to be removed\n var found_2 = false; // the flag to terminate the forEach circulation\n (comboTrees || []).forEach(function (ctree) {\n if (found_2) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id) {\n comboInTree_1 = combo;\n found_2 = true;\n return false; // terminate the traverse\n }\n\n return true;\n });\n });\n comboInTree_1.removed = true;\n if (comboInTree_1 && comboInTree_1.children) {\n comboInTree_1.children.forEach(function (child) {\n _this.removeItem(child.id);\n });\n }\n // 若移除的是 combo,需要将与之相连的边一同删除\n var edges = item.getEdges();\n for (var i = edges.length; i >= 0; i--) {\n graph.removeItem(edges[i], false);\n }\n if (parentId) graph.updateCombo(parentId);\n }\n item.destroy();\n graph.emit('afterremoveitem', {\n item: itemModel,\n type: type\n });\n };\n /**\n * 更新 item 状态\n *\n * @param {Item} item Item 实例\n * @param {string} state 状态名称\n * @param {boolean} value 是否启用状态或状态值\n * @returns {void}\n * @memberof ItemController\n */\n ItemController.prototype.setItemState = function (item, state, value) {\n var graph = this.graph;\n var stateName = state;\n if (isString(value)) {\n stateName = \"\".concat(state, \":\").concat(value);\n }\n // 已经存在要设置的 state,或不存在 state 的样式为 undefined\n if (item.hasState(stateName) === value && value ||\n // 当该状态已经存在且现在需要设置为 true 时,不需要继续。当该状态不存在,且设置为 false 时,需要继续\n isString(value) && item.hasState(stateName)) {\n // 当该状态 value 是字符串,且已经存在该状态,不需要继续\n return;\n }\n graph.emit('beforeitemstatechange', {\n item: item,\n state: stateName,\n enabled: value\n });\n item.setState(state, value);\n graph.autoPaint();\n graph.emit('afteritemstatechange', {\n item: item,\n state: stateName,\n enabled: value\n });\n };\n /**\n * 将指定状态的优先级提升为最高优先级\n * @param {Item} item 元素id或元素实例\n * @param state 状态名称\n */\n ItemController.prototype.priorityState = function (item, state) {\n var graph = this.graph;\n var currentItem = item;\n if (isString(item)) {\n currentItem = graph.findById(item);\n }\n // 先取消已有的 state\n this.setItemState(currentItem, state, false);\n // 再设置state,则此时该优先级为最高\n this.setItemState(currentItem, state, true);\n };\n /**\n * 清除所有指定的状态\n *\n * @param {Item} item Item 实例\n * @param {string[]} states 状态名称集合\n * @memberof ItemController\n */\n ItemController.prototype.clearItemStates = function (item, states) {\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n graph.emit('beforeitemstatesclear', {\n item: item,\n states: states\n });\n item.clearStates(states);\n graph.emit('afteritemstatesclear', {\n item: item,\n states: states\n });\n };\n /**\n * 刷新指定的 Item\n *\n * @param {Item} item Item ID 或 实例\n * @memberof ItemController\n */\n ItemController.prototype.refreshItem = function (item) {\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n graph.emit('beforeitemrefresh', {\n item: item\n });\n // 调用 Item 的 refresh 方法,实现刷新功能\n item.refresh();\n graph.emit('afteritemrefresh', {\n item: item\n });\n };\n /**\n * 根据 graph 上用 combos 数据生成的 comboTree 来增加所有 combos\n *\n * @param {ComboTree[]} comboTrees graph 上用 combos 数据生成的 comboTree\n * @param {ComboConfig[]} comboModels combos 数据\n * @memberof ItemController\n */\n ItemController.prototype.addCombos = function (comboTrees, comboModels) {\n var _this = this;\n var graph = this.graph;\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var comboModel;\n comboModels.forEach(function (model) {\n if (model.id === child.id) {\n model.children = child.children;\n model.depth = child.depth;\n comboModel = model;\n }\n });\n if (comboModel) {\n _this.addItem('combo', comboModel);\n }\n return true;\n });\n });\n var comboGroup = graph.get('comboGroup');\n if (comboGroup) comboGroup.sort();\n };\n /**\n * 改变Item的显示状态\n *\n * @param {Item} item Item ID 或 实例\n * @param {boolean} visible 是否显示\n * @memberof ItemController\n */\n ItemController.prototype.changeItemVisibility = function (item, visible) {\n var _this = this;\n var graph = this.graph;\n if (isString(item)) {\n item = graph.findById(item);\n }\n if (!item) {\n console.warn('The item to be shown or hidden does not exist!');\n return;\n }\n graph.emit('beforeitemvisibilitychange', {\n item: item,\n visible: visible\n });\n item.changeVisibility(visible);\n if (item.getType && item.getType() === NODE) {\n var edges = item.getEdges();\n each(edges, function (edge) {\n // 若隐藏节点,则将与之关联的边也隐藏\n // 若显示节点,则将与之关联的边也显示,但是需要判断边两端的节点都是可见的\n if (visible && !(edge.get('source').isVisible() && edge.get('target').isVisible())) {\n return;\n }\n _this.changeItemVisibility(edge, visible);\n });\n } else if (item.getType && item.getType() === COMBO) {\n var comboTrees = graph.get('comboTrees');\n var id_1 = item.get('id');\n var children_1 = [];\n var found_3 = false; // flag the terminate the forEach\n (comboTrees || []).forEach(function (ctree) {\n if (found_3) return;\n if (!ctree.children || ctree.children.length === 0) return;\n traverseTree(ctree, function (combo) {\n if (combo.id === id_1) {\n children_1 = combo.children;\n found_3 = true;\n return false; // terminate the traverse\n }\n\n return true;\n });\n });\n if (children_1 && (!visible || visible && !item.getModel().collapsed)) {\n children_1.forEach(function (child) {\n var childItem = graph.findById(child.id);\n _this.changeItemVisibility(childItem, visible);\n });\n }\n var edges = item.getEdges();\n each(edges, function (edge) {\n // 若隐藏 combo,则将与 combo 本身关联的边也隐藏\n // 若显示 combo,则将与 combo 本身关联的边也显示,但是需要判断边两端的节点都是可见的\n if (visible && !(edge.get('source').isVisible() && edge.get('target').isVisible())) {\n return;\n }\n _this.changeItemVisibility(edge, visible);\n });\n }\n graph.emit('afteritemvisibilitychange', {\n item: item,\n visible: visible\n });\n return item;\n };\n ItemController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = true;\n };\n return ItemController;\n}();\nexport default ItemController;","import { isString } from '@antv/util';\nvar StateController = /** @class */function () {\n function StateController(graph) {\n this.graph = graph;\n this.destroyed = false;\n }\n /**\n * 更新 Item 的状态\n *\n * @param {Item} item Item实例\n * @param {string} state 状态名称\n * @param {boolean} enabled 状态是否可用\n * @memberof State\n */\n StateController.prototype.updateState = function (item, state, enabled) {\n var graphStates = this.graph.get('states');\n var key = state;\n if (isString(enabled)) key = \"\".concat(state, \":\").concat(enabled);\n if (!graphStates[key]) graphStates[key] = [];\n if (enabled) graphStates[key].push(item);else graphStates[key] = graphStates[key].filter(function (itemInState) {\n return itemInState !== item;\n });\n this.graph.set('states', graphStates);\n this.graph.emit('graphstatechange', {\n states: graphStates\n });\n };\n /**\n * 批量更新 states,兼容 updateState,支持更新一个 state\n *\n * @param {Item} item\n * @param {(string | string[])} states\n * @param {boolean} enabled\n * @memberof State\n */\n StateController.prototype.updateStates = function (item, states, enabled) {\n var graphStates = this.graph.get('states');\n var stateNames = isString(states) ? [states] : states;\n stateNames.forEach(function (stateName) {\n var key = stateName;\n if (!graphStates[key]) graphStates[key] = [];\n if (isString(enabled)) key = \"\".concat(stateName, \":\").concat(enabled);\n if (enabled) graphStates[key].push(item);else graphStates[key] = graphStates[key].filter(function (itemInState) {\n return itemInState !== item;\n });\n });\n this.graph.set('states', graphStates);\n this.graph.emit('graphstatechange', {\n states: states\n });\n };\n StateController.prototype.destroy = function () {\n this.graph = null;\n this.destroyed = true;\n };\n return StateController;\n}();\nexport default StateController;","import { vec2 } from '@antv/matrix-util';\nimport { catmullRom2Bezier } from '@antv/path-util';\n/**\n * 替换字符串中的字段\n * @param {String} str 模版字符串\n * @param {Object} o json data\n */\nvar substitute = function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n var res = o[name];\n if (res === 0) res = '0';\n return res || '';\n });\n};\n/**\n * 给定坐标获取三次贝塞尔曲线的 M 及 C 值\n * @param points coordinate set\n */\nexport var getSpline = function getSpline(points) {\n var data = [];\n if (points.length < 2) {\n throw new Error(\"point length must largn than 2, now it's \".concat(points.length));\n }\n for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {\n var point = points_1[_i];\n var x = point.x,\n y = point.y;\n data.push(x);\n data.push(y);\n }\n var spliePath = catmullRom2Bezier(data);\n spliePath.unshift(['M', points[0].x, points[0].y]);\n return spliePath;\n};\n/**\n * 根据起始点、相对位置、偏移量计算控制点\n * @param {IPoint} startPoint 起始点,包含 x,y\n * @param {IPoint} endPoint 结束点, 包含 x,y\n * @param {Number} percent 相对位置,范围 0-1\n * @param {Number} offset 偏移量\n * @return {IPoint} 控制点,包含 x,y\n */\nexport var getControlPoint = function getControlPoint(startPoint, endPoint, percent, offset) {\n if (percent === void 0) {\n percent = 0;\n }\n if (offset === void 0) {\n offset = 0;\n }\n var point = {\n x: (1 - percent) * startPoint.x + percent * endPoint.x,\n y: (1 - percent) * startPoint.y + percent * endPoint.y\n };\n var tangent = [0, 0];\n vec2.normalize(tangent, [endPoint.x - startPoint.x, endPoint.y - startPoint.y]);\n if (!tangent || !tangent[0] && !tangent[1]) {\n tangent = [0, 0];\n }\n var perpendicular = [-tangent[1] * offset, tangent[0] * offset]; // 垂直向量\n point.x += perpendicular[0];\n point.y += perpendicular[1];\n return point;\n};\n/**\n * 点集转化为Path多边形\n * @param {Array} points 点集\n * @param {Boolen} z 是否封闭\n * @return {Array} Path\n */\nexport var pointsToPolygon = function pointsToPolygon(points, z) {\n var length = points.length;\n if (!length) {\n return '';\n }\n var path = '';\n var str = '';\n for (var i = 0; i < length; i++) {\n var item = points[i];\n if (i === 0) {\n str = 'M{x} {y}';\n } else {\n str = 'L{x} {y}';\n }\n path += substitute(str, item);\n }\n if (z) {\n path += 'Z';\n }\n return path;\n};\nexport var pathToPoints = function pathToPoints(path) {\n var points = [];\n path.forEach(function (seg) {\n var command = seg[0];\n if (command !== 'A') {\n for (var i = 1; i < seg.length; i = i + 2) {\n points.push([seg[i], seg[i + 1]]);\n }\n } else {\n var length_1 = seg.length;\n points.push([seg[length_1 - 2], seg[length_1 - 1]]);\n }\n });\n return points;\n};\n/**\n * 生成平滑的闭合曲线\n * @param points\n */\nexport var getClosedSpline = function getClosedSpline(points) {\n if (points.length < 2) {\n throw new Error(\"point length must larger than 2, now it's \".concat(points.length));\n }\n var first = points[0];\n var second = points[1];\n var last = points[points.length - 1];\n var lastSecond = points[points.length - 2];\n points.unshift(last);\n points.unshift(lastSecond);\n points.push(first);\n points.push(second);\n var closedPath = [];\n for (var i = 1; i < points.length - 2; i += 1) {\n var x0 = points[i - 1].x;\n var y0 = points[i - 1].y;\n var x1 = points[i].x;\n var y1 = points[i].y;\n var x2 = points[i + 1].x;\n var y2 = points[i + 1].y;\n var x3 = i !== points.length - 2 ? points[i + 2].x : x2;\n var y3 = i !== points.length - 2 ? points[i + 2].y : y2;\n var cp1x = x1 + (x2 - x0) / 6;\n var cp1y = y1 + (y2 - y0) / 6;\n var cp2x = x2 - (x3 - x1) / 6;\n var cp2y = y2 - (y3 - y1) / 6;\n closedPath.push(['C', cp1x, cp1y, cp2x, cp2y, x2, y2]);\n }\n closedPath.unshift(['M', last.x, last.y]);\n return closedPath;\n};\nvar vecScaleTo = function vecScaleTo(v, length) {\n // Vector with direction of v with specified length\n return vec2.scale([0, 0], vec2.normalize([0, 0], v), length);\n};\nvar unitNormal = function unitNormal(p0, p1) {\n // Returns the unit normal to the line segment from p0 to p1.\n var n = [p0[1] - p1[1], p1[0] - p0[0]];\n var nLength = Math.sqrt(n[0] * n[0] + n[1] * n[1]);\n if (nLength === 0) {\n throw new Error('p0 should not be equal to p1');\n }\n return [n[0] / nLength, n[1] / nLength];\n};\nvar vecFrom = function vecFrom(p0, p1) {\n // Vector from p0 to p1\n return [p1[0] - p0[0], p1[1] - p0[1]];\n};\n/**\n * 传入的节点作为多边形顶点,生成有圆角的多边形\n * @param polyPoints 多边形顶点\n * @param padding 在原多边形基础上增加最终轮廓和原多边形的空白间隔\n */\nexport function roundedHull(polyPoints, padding) {\n // The rounded hull path around a single point\n var roundedHull1 = function roundedHull1(points) {\n var p1 = [points[0][0], points[0][1] - padding];\n var p2 = [points[0][0], points[0][1] + padding];\n return \"M \".concat(p1, \" A \").concat(padding, \",\").concat(padding, \",0,0,0,\").concat(p2, \" A \").concat(padding, \",\").concat(padding, \",0,0,0,\").concat(p1);\n };\n // The rounded hull path around two points\n var roundedHull2 = function roundedHull2(points) {\n var offsetVector = vec2.scale([0, 0], unitNormal(points[0], points[1]), padding);\n var invOffsetVector = vec2.scale([0, 0], offsetVector, -1);\n var p0 = vec2.add([0, 0], points[0], offsetVector);\n var p1 = vec2.add([0, 0], points[1], offsetVector);\n var p2 = vec2.add([0, 0], points[1], invOffsetVector);\n var p3 = vec2.add([0, 0], points[0], invOffsetVector);\n return \"M \".concat(p0, \" L \").concat(p1, \" A \").concat([padding, padding, '0,0,0', p2].join(','), \" L \").concat(p3, \" A \").concat([padding, padding, '0,0,0', p0].join(','));\n };\n // 特殊情况处理:节点数小于等于2\n if (!polyPoints || polyPoints.length < 1) return '';\n if (polyPoints.length === 1) return roundedHull1(polyPoints);\n if (polyPoints.length === 2) return roundedHull2(polyPoints);\n var segments = new Array(polyPoints.length);\n // Calculate each offset (outwards) segment of the convex hull.\n for (var segmentIndex = 0; segmentIndex < segments.length; ++segmentIndex) {\n var p0 = segmentIndex === 0 ? polyPoints[polyPoints.length - 1] : polyPoints[segmentIndex - 1];\n var p1 = polyPoints[segmentIndex];\n // Compute the offset vector for the line segment, with length = padding.\n var offset = vec2.scale([0, 0], unitNormal(p0, p1), padding);\n segments[segmentIndex] = [vec2.add([0, 0], p0, offset), vec2.add([0, 0], p1, offset)];\n }\n var arcData = \"A \".concat([padding, padding, '0,0,0,'].join(','));\n segments = segments.map(function (segment, index) {\n var pathFragment = '';\n if (index === 0) {\n pathFragment = \"M \".concat(segments[segments.length - 1][1], \" \");\n }\n pathFragment += \"\".concat(arcData + segment[0], \" L \").concat(segment[1]);\n return pathFragment;\n });\n return segments.join(' ');\n}\n/**\n * 传入的节点作为多边形顶点,生成平滑的闭合多边形\n * @param polyPoints\n * @param padding\n */\nexport function paddedHull(polyPoints, padding) {\n var pointCount = polyPoints.length;\n var smoothHull1 = function smoothHull1(points) {\n // Returns the path for a circular hull around a single point.\n var p1 = [points[0][0], points[0][1] - padding];\n var p2 = [points[0][0], points[0][1] + padding];\n return \"M \".concat(p1, \" A \").concat([padding, padding, '0,0,0', p2].join(','), \" A \").concat([padding, padding, '0,0,0', p1].join(','));\n };\n // Returns the path for a rounded hull around two points.\n var smoothHull2 = function smoothHull2(points) {\n var v = vecFrom(points[0], points[1]);\n var extensionVec = vecScaleTo(v, padding);\n var extension0 = vec2.add([0, 0], points[0], vec2.scale([0, 0], extensionVec, -1));\n var extension1 = vec2.add([0, 0], points[1], extensionVec);\n var tangentHalfLength = 1.2 * padding;\n var controlDelta = vecScaleTo(vec2.normalize([0, 0], v), tangentHalfLength);\n var invControlDelta = vec2.scale([0, 0], controlDelta, -1);\n var control0 = vec2.add([0, 0], extension0, invControlDelta);\n var control1 = vec2.add([0, 0], extension1, invControlDelta);\n var control3 = vec2.add([0, 0], extension0, controlDelta);\n // return [\n // ['M', extension0[0], extension0[1]],\n // ['C', control0, control1, extension1],\n // ['S', control3, extension0],\n // 'Z',\n // ];\n return \"M \".concat(extension0, \" C \").concat([control0, control1, extension1].join(','), \" S \").concat([control3, extension0].join(','), \" Z\");\n };\n // Handle special cases\n if (!polyPoints || pointCount < 1) return '';\n if (pointCount === 1) return smoothHull1(polyPoints);\n if (pointCount === 2) return smoothHull2(polyPoints);\n var hullPoints = polyPoints.map(function (point, index) {\n var pNext = polyPoints[(index + 1) % pointCount];\n return {\n p: point,\n v: vec2.normalize([0, 0], vecFrom(point, pNext))\n };\n });\n // Compute the expanded hull points, and the nearest prior control point for each.\n for (var i = 0; i < hullPoints.length; ++i) {\n var priorIndex = i > 0 ? i - 1 : pointCount - 1;\n var extensionVec = vec2.normalize([0, 0], vec2.add([0, 0], hullPoints[priorIndex].v, vec2.scale([0, 0], hullPoints[i].v, -1)));\n hullPoints[i].p = vec2.add([0, 0], hullPoints[i].p, vec2.scale([0, 0], extensionVec, padding));\n }\n return hullPoints.map(function (obj) {\n var point = obj.p;\n return {\n x: point[0],\n y: point[1]\n };\n });\n}\n/**\n * get a path of a star with outer radius and inner radius\n * @param outerR\n * @param innerR\n * @returns\n */\nexport var getStarPath = function getStarPath(outerR, innerR) {\n var path = [];\n for (var i = 0; i < 5; i++) {\n var x1 = Math.cos((18 + 72 * i) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * i) / 180 * Math.PI) * outerR;\n var x2 = Math.cos((54 + 72 * i) / 180 * Math.PI) * innerR;\n var y2 = Math.sin((54 + 72 * i) / 180 * Math.PI) * innerR;\n if (i === 0) {\n path.push(['M', x1, -y1]);\n } else {\n path.push(['L', x1, -y1]);\n }\n path.push(['L', x2, -y2]);\n }\n path.push(['Z']);\n return path;\n};","/**\n * Use cross product to judge the direction of the turn.\n * Returns a positive value, if OAB makes a clockwise turn,\n * negative for counter-clockwise turn, and zero if the points are collinear.\n */\nexport var cross = function cross(a, b, o) {\n return (a.y - o.y) * (b.x - o.x) - (a.x - o.x) * (b.y - o.y);\n};\n/**\n * Generate a convex hull of given points. Andrew's monotone chain algorithm.\n * @param points An array of [x, y] representing the coordinates of points.\n * @return a list of vertices of the convex hull in counter-clockwise order,\n */\nexport var genConvexHull = function genConvexHull(items) {\n var points = items.map(function (item) {\n return {\n x: item.getModel().x,\n y: item.getModel().y\n };\n });\n points.sort(function (a, b) {\n return a.x === b.x ? a.y - b.y : a.x - b.x;\n });\n // remove duplicate points\n var pointMap = {};\n for (var i = points.length - 1; i >= 0; i--) {\n var _a = points[i],\n x = _a.x,\n y = _a.y;\n if (pointMap[\"\".concat(x, \"-\").concat(y)]) points.splice(i, 1);\n pointMap[\"\".concat(x, \"-\").concat(y)] = true;\n }\n if (points.length === 1) {\n return points;\n }\n // build the lower hull\n var lower = [];\n for (var i = 0; i < points.length; i++) {\n while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {\n lower.pop();\n }\n lower.push(points[i]);\n }\n // build the upper hull\n var upper = [];\n for (var i = points.length - 1; i >= 0; i--) {\n while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[i]) <= 0) {\n upper.pop();\n }\n upper.push(points[i]);\n }\n upper.pop();\n lower.pop();\n var strictHull = lower.concat(upper);\n return strictHull;\n};","import { squareDist, pointLineSquareDist, itemIntersectByLine, getPointsCenter, fractionToLine, isPointsOverlap, pointRectSquareDist, Line, isPointInPolygon } from '../../util/math';\nvar defaultOps = {\n maxRoutingIterations: 100,\n maxMarchingIterations: 100,\n pixelGroupSize: 2,\n edgeR0: 10,\n edgeR1: 10,\n nodeR0: 5,\n nodeR1: 10,\n morphBuffer: 5,\n threshold: 0.001,\n skip: 16,\n nodeInfluenceFactor: 1,\n edgeInfluenceFactor: 1,\n negativeNodeInfluenceFactor: -0.5\n};\n/**\n * Marching square algorithm for traching the contour of a pixel group\n * https://www.emanueleferonato.com/2013/03/01/using-marching-squares-algorithm-to-trace-the-contour-of-an-image/\n * @param potentialArea\n * @param threshold\n */\nfunction MarchingSquares(contour, potentialArea, threshold) {\n var marched = false;\n var getVal = function getVal(x, y) {\n return potentialArea.cells[x + y * potentialArea.width];\n };\n var getState = function getState(x, y) {\n var squareVal = 0;\n if (getVal(x - 1, y - 1) >= threshold) {\n squareVal += 1;\n }\n if (getVal(x, y - 1) > threshold) {\n squareVal += 2;\n }\n if (getVal(x - 1, y) > threshold) {\n squareVal += 4;\n }\n if (getVal(x, y) > threshold) {\n squareVal += 8;\n }\n return squareVal;\n };\n var doMarch = function doMarch(xPos, yPos) {\n var x = xPos;\n var y = yPos;\n var prevX;\n var prevY;\n for (var i = 0; i < potentialArea.width * potentialArea.height; i++) {\n prevX = x;\n prevY = y;\n if (contour.findIndex(function (item) {\n return item.x === x && item.y === y;\n }) > -1) {\n if (contour[0].x !== x || contour[0].y !== y) {\n // encountered a loop but haven't returned to start: change direction using conditionals and continue back to start\n } else {\n return true;\n }\n } else {\n contour.push({\n x: x,\n y: y\n });\n }\n var state = getState(x, y);\n // assign the move direction according to state of the square\n switch (state) {\n case -1:\n console.warn('Marched out of bounds');\n return true;\n case 0:\n case 3:\n case 2:\n case 7:\n x++; // go right\n break;\n case 12:\n case 14:\n case 4:\n x--; // go left\n break;\n case 6:\n // go left if come from up else go right\n if (prevX === 0) {\n if (prevY === -1) {\n x -= 1;\n } else {\n x += 1;\n }\n }\n break;\n case 1:\n case 13:\n case 5:\n y--; // go up\n break;\n case 9:\n // go up if come from right else go down\n if (prevX === 1) {\n if (prevY === 0) {\n y -= 1;\n } else {\n y += 1;\n }\n }\n break;\n case 10:\n case 8:\n case 11:\n y++; // go down\n break;\n default:\n console.warn(\"Marching squares invalid state: \".concat(state));\n return true;\n }\n }\n };\n this.march = function () {\n for (var x = 0; x < potentialArea.width && !marched; x += 1) {\n for (var y = 0; y < potentialArea.height && !marched; y += 1) {\n if (getVal(x, y) > threshold && getState(x, y) !== 15) {\n marched = doMarch(x, y);\n }\n }\n }\n return marched;\n };\n}\n/**\n * Space partition & assign value to each cell\n * @param points\n */\nvar initGridCells = function initGridCells(width, height, pixelGroupSize) {\n var scaleWidth = Math.ceil(width / pixelGroupSize);\n var scaleHeight = Math.ceil(height / pixelGroupSize);\n var gridCells = new Float32Array(Math.max(0, scaleWidth * scaleHeight)).fill(0);\n return {\n cells: gridCells,\n width: scaleWidth,\n height: scaleHeight\n };\n};\n/**\n * Find the optimal already visited member to item;\n Optimal: minimize cost(j) = distance(i,j) ∗ countObstacles(i,j)\n * @param item\n * @param visited\n */\nvar pickBestNeighbor = function pickBestNeighbor(item, visited, nonMembers) {\n var closestNeighbour = null;\n var minCost = Number.POSITIVE_INFINITY;\n visited.forEach(function (neighbourItem) {\n var itemP = {\n x: item.getModel().x,\n y: item.getModel().y\n };\n var neighbourItemP = {\n x: neighbourItem.getModel().x,\n y: neighbourItem.getModel().y\n };\n var dist = squareDist(itemP, neighbourItemP);\n var directLine = new Line(itemP.x, itemP.y, neighbourItemP.x, neighbourItemP.y);\n var numberObstacles = nonMembers.reduce(function (count, _item) {\n if (fractionToLine(_item, directLine) > 0) {\n return count + 1;\n }\n return count;\n }, 0);\n if (dist * Math.pow(numberObstacles + 1, 2) < minCost) {\n closestNeighbour = neighbourItem;\n minCost = dist * Math.pow(numberObstacles + 1, 2);\n }\n });\n return closestNeighbour;\n};\n/**\n * 返回和线相交的item中,离边的起点最近的item\n * @param items\n * @param line\n */\nvar getIntersectItem = function getIntersectItem(items, line) {\n var minDistance = Number.POSITIVE_INFINITY;\n var closestItem = null;\n items.forEach(function (item) {\n var distance = fractionToLine(item, line);\n // find closest intersection\n if (distance >= 0 && distance < minDistance) {\n closestItem = item;\n minDistance = distance;\n }\n });\n return closestItem;\n};\n/**\n * Modify the directLine and Route virtual edges around obstacles\n */\nvar computeRoute = function computeRoute(directLine, nonMembers, maxRoutingIterations, morphBuffer) {\n var checkedLines = [];\n var linesToCheck = [];\n linesToCheck.push(directLine);\n var hasIntersection = true;\n var iterations = 0;\n var pointExists = function pointExists(point, lines) {\n var flag = false;\n lines.forEach(function (line) {\n if (flag) return;\n if (isPointsOverlap(point, {\n x: line.x1,\n y: line.y1\n }) || isPointsOverlap(point, {\n x: line.x2,\n y: line.y2\n })) {\n flag = true;\n }\n });\n return flag;\n };\n var isPointInNonMembers = function isPointInNonMembers(point, _nonMembers) {\n for (var _i = 0, _nonMembers_1 = _nonMembers; _i < _nonMembers_1.length; _i++) {\n var item = _nonMembers_1[_i];\n var bbox = item.getBBox();\n var itemContour = [[bbox.x, bbox.y], [bbox.x + bbox.width, bbox.y], [bbox.x, bbox.y + bbox.height], [bbox.x + bbox.width, bbox.y + bbox.height]];\n if (isPointInPolygon(itemContour, point.x, point.y)) {\n return true;\n }\n }\n return false;\n };\n // outer loop end when no more intersections or out of iterations\n while (hasIntersection && iterations < maxRoutingIterations) {\n hasIntersection = false;\n var _loop_1 = function _loop_1() {\n var line = linesToCheck.pop();\n var closestItem = getIntersectItem(nonMembers, line);\n if (closestItem) {\n var _a = itemIntersectByLine(closestItem, line),\n intersections_1 = _a[0],\n countIntersections = _a[1];\n // if line passes through item\n if (countIntersections === 2) {\n var testReroute = function testReroute(isFirst) {\n var tempMorphBuffer = morphBuffer;\n var virtualNode = rerouteLine(closestItem, tempMorphBuffer, intersections_1, isFirst);\n // test the virtualNode already exists\n var exist = pointExists(virtualNode, linesToCheck) || pointExists(virtualNode, checkedLines);\n var pointInside = isPointInNonMembers(virtualNode, nonMembers);\n while (!exist && pointInside && tempMorphBuffer >= 1) {\n // try a smaller buffer\n tempMorphBuffer /= 1.5;\n virtualNode = rerouteLine(closestItem, tempMorphBuffer, intersections_1, isFirst);\n exist = pointExists(virtualNode, linesToCheck) || pointExists(virtualNode, checkedLines);\n pointInside = isPointInNonMembers(virtualNode, nonMembers);\n }\n // 第二次route时不要求pointInside\n if (virtualNode && !exist && (!isFirst || !pointInside)) {\n // add 2 rerouted lines to check\n linesToCheck.push(new Line(line.x1, line.y1, virtualNode.x, virtualNode.y));\n linesToCheck.push(new Line(virtualNode.x, virtualNode.y, line.x2, line.y2));\n hasIntersection = true;\n }\n };\n testReroute(true);\n if (!hasIntersection) {\n // if we didn't find a valid point around the first corner, try the second\n testReroute(false);\n }\n }\n }\n // no intersection found, mark this line as completed\n if (!hasIntersection) {\n checkedLines.push(line);\n }\n iterations += 1;\n };\n // inner loop end when out of lines or found an intersection\n while (!hasIntersection && linesToCheck.length) {\n _loop_1();\n }\n }\n // 加入剩余的线\n while (linesToCheck.length) {\n checkedLines.push(linesToCheck.pop());\n }\n return checkedLines;\n};\n/**\n * Connect item with visited members using direct line or virtual edges\n */\nfunction getRoute(item, nonMembers, visited, maxRoutingIterations, morphBuffer) {\n var optimalNeighbor = pickBestNeighbor(item, visited, nonMembers);\n if (optimalNeighbor === null) {\n return [];\n }\n // merge the consecutive lines\n var mergeLines = function mergeLines(checkedLines) {\n var finalRoute = [];\n while (checkedLines.length > 0) {\n var line1 = checkedLines.pop();\n if (checkedLines.length === 0) {\n finalRoute.push(line1);\n break;\n }\n var line2 = checkedLines.pop();\n var mergeLine = new Line(line1.x1, line1.y1, line2.x2, line2.y2);\n var closestItem = getIntersectItem(nonMembers, mergeLine);\n // merge most recent line and previous line\n if (!closestItem) {\n checkedLines.push(mergeLine);\n } else {\n finalRoute.push(line1);\n checkedLines.push(line2);\n }\n }\n return finalRoute;\n };\n var directLine = new Line(item.getModel().x, item.getModel().y, optimalNeighbor.getModel().x, optimalNeighbor.getModel().y);\n var checkedLines = computeRoute(directLine, nonMembers, maxRoutingIterations, morphBuffer);\n var finalRoute = mergeLines(checkedLines);\n return finalRoute;\n}\n/**\n * Calculate the counter that includes the selected items and exclues the non-selected items\n * @param graph\n * @param members\n * @param nonMembers\n * @param options\n */\nexport var genBubbleSet = function genBubbleSet(members, nonMembers, ops) {\n // eslint-disable-next-line no-redeclare\n var options = Object.assign(defaultOps, ops);\n var centroid = getPointsCenter(members.map(function (item) {\n return {\n x: item.getModel().x,\n y: item.getModel().y\n };\n }));\n // 按照到中心距离远近排序\n members = members.sort(function (a, b) {\n return squareDist({\n x: a.getModel().x,\n y: a.getModel().y\n }, centroid) - squareDist({\n x: b.getModel().x,\n y: b.getModel().y\n }, centroid);\n });\n var visited = [];\n var virtualEdges = [];\n members.forEach(function (item) {\n var lines = getRoute(item, nonMembers, visited, options.maxRoutingIterations, options.morphBuffer);\n lines.forEach(function (l) {\n virtualEdges.push(l);\n });\n visited.push(item);\n });\n // 由于edge也可以作为member和nonMember传入,暂时不考虑把edges作为参数传入genBubbleSet\n // edges && edges.forEach(e => {\n // virtualEdges.push(new Line(e.getSource().getModel().x, e.getSource().getModel().y, e.getTarget().getModel().x, e.getTarget().getModel().y));\n // });\n var activeRegion = getActiveRregion(members, virtualEdges, options.nodeR0);\n var potentialArea = initGridCells(activeRegion.width, activeRegion.height, options.pixelGroupSize);\n // Use march squares to generate contour\n var contour = [];\n var hull = [];\n for (var iterations = 0; iterations < options.maxMarchingIterations; iterations++) {\n fillPotentialArea(members, nonMembers, virtualEdges, activeRegion, potentialArea, options);\n contour = [];\n hull = [];\n if (!new MarchingSquares(contour, potentialArea, options.threshold).march()) continue;\n var marchedPath = contour.map(function (point) {\n return {\n x: Math.round(point.x * options.pixelGroupSize + activeRegion.minX),\n y: Math.round(point.y * options.pixelGroupSize + activeRegion.minY)\n };\n });\n // const marchedPath = marchingSquares(potentialArea, options.threshold).map(point => ({ x: Math.round(point.x * options.pixelGroupSize + activeRegion.minX), y: Math.round(point.y * options.pixelGroupSize + activeRegion.minY) }))\n if (marchedPath) {\n var size = marchedPath.length;\n if (options.skip > 1) {\n size = Math.floor(marchedPath.length / options.skip);\n // if we reduced too much (fewer than three points in reduced surface) reduce skip and try again\n while (size < 3 && options.skip > 1) {\n options.skip -= 1;\n size = Math.floor(marchedPath.length / options.skip);\n }\n }\n // copy hull values\n for (var i = 0, j = 0; j < size; j += 1, i += options.skip) {\n hull.push({\n x: marchedPath[i].x,\n y: marchedPath[i].y\n });\n }\n }\n var isContourValid = function isContourValid() {\n for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {\n var item = members_1[_i];\n var hullPoints = hull.map(function (point) {\n return [point.x, point.y];\n });\n if (!isPointInPolygon(hullPoints, item.getBBox().centerX, item.getBBox().centerY)) return false;\n }\n // 不强制要求所有nonMembers都没有包含在内\n // for (const item of nonMembers) {\n // if (isPointInPolygon({ x: item.getBBox().centerX, y: item.getBBox().centerY }, contour)) return false\n // }\n return true;\n };\n if (hull && isContourValid()) {\n return hull;\n }\n // update parameters for next iteration\n options.threshold *= 0.9;\n if (iterations <= options.maxMarchingIterations * 0.5) {\n options.memberInfluenceFactor *= 1.2;\n options.edgeInfluenceFactor *= 1.2;\n } else if (options.nonMemberInfluenceFactor !== 0 && nonMembers.length > 0) {\n // after half the iterations, start increasing positive energy and lowering the threshold\n options.nonMemberInfluenceFactor *= 0.8;\n } else {\n break;\n }\n }\n return hull;\n};\n/**\n * unionboundingbox\n * @param members\n * @param edges\n */\nfunction getActiveRregion(members, edges, offset) {\n var activeRegion = {\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n var bboxes = [];\n members.forEach(function (item) {\n bboxes.push(item.getBBox());\n });\n edges.forEach(function (l) {\n bboxes.push(l.getBBox());\n });\n for (var _i = 0, bboxes_1 = bboxes; _i < bboxes_1.length; _i++) {\n var bbox = bboxes_1[_i];\n activeRegion.minX = (bbox.minX < activeRegion.minX ? bbox.minX : activeRegion.minX) - offset;\n activeRegion.minY = (bbox.minY < activeRegion.minY ? bbox.minY : activeRegion.minY) - offset;\n activeRegion.maxX = (bbox.maxX > activeRegion.maxX ? bbox.maxX : activeRegion.maxX) + offset;\n activeRegion.maxY = (bbox.maxY > activeRegion.maxY ? bbox.maxY : activeRegion.maxY) + offset;\n }\n activeRegion.width = activeRegion.maxX - activeRegion.minX;\n activeRegion.height = activeRegion.maxY - activeRegion.minY;\n activeRegion.x = activeRegion.minX;\n activeRegion.y = activeRegion.minY;\n return activeRegion;\n}\nfunction fillPotentialArea(members, nonMembers, edges, activeRegion, potentialArea, options) {\n function pos2GridIx(x, offset) {\n var gridIx = Math.floor((x - offset) / options.pixelGroupSize);\n return gridIx < 0 ? 0 : gridIx;\n }\n function gridIx2Pos(x, offset) {\n return x * options.pixelGroupSize + offset;\n }\n // using inverse a for numerical stability\n var nodeInfA = (options.nodeR0 - options.nodeR1) * (options.nodeR0 - options.nodeR1);\n var edgeInfA = (options.edgeR0 - options.edgeR1) * (options.edgeR0 - options.edgeR1);\n var getAffectedRegion = function getAffectedRegion(bbox, thresholdR) {\n var startX = Math.min(pos2GridIx(bbox.minX, thresholdR + activeRegion.minX), potentialArea.width);\n var startY = Math.min(pos2GridIx(bbox.minY, thresholdR + activeRegion.minY), potentialArea.height);\n var endX = Math.min(pos2GridIx(bbox.maxX, -thresholdR + activeRegion.minX), potentialArea.width);\n var endY = Math.min(pos2GridIx(bbox.maxY, -thresholdR + activeRegion.minY), potentialArea.height);\n return [startX, startY, endX, endY];\n };\n var addItemInfluence = function addItemInfluence(item, influenceFactor) {\n var bbox = item.getBBox();\n var _a = getAffectedRegion(bbox, options.nodeR1),\n startX = _a[0],\n startY = _a[1],\n endX = _a[2],\n endY = _a[3];\n // calculate item influence for each cell\n for (var y = startY; y < endY; y += 1) {\n for (var x = startX; x < endX; x += 1) {\n if (influenceFactor < 0 && potentialArea[x + y * potentialArea.width] <= 0) {\n continue;\n }\n var tempX = gridIx2Pos(x, activeRegion.minX);\n var tempY = gridIx2Pos(y, activeRegion.minY);\n var distanceSq = pointRectSquareDist({\n x: tempX,\n y: tempY\n }, {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n });\n if (distanceSq < Math.pow(options.nodeR1, 2)) {\n var dr = Math.sqrt(distanceSq) - options.nodeR1;\n potentialArea.cells[x + y * potentialArea.width] += influenceFactor * dr * dr;\n }\n }\n }\n };\n var addEdgeInfluence = function addEdgeInfluence(line, influenceFactor) {\n var bbox = line.getBBox();\n var _a = getAffectedRegion(bbox, options.edgeR1),\n startX = _a[0],\n startY = _a[1],\n endX = _a[2],\n endY = _a[3];\n // for every point in active part of potentialArea, calculate distance to nearest point on line and add influence\n for (var y = startY; y < endY; y += 1) {\n for (var x = startX; x < endX; x += 1) {\n if (influenceFactor < 0 && potentialArea.cells[x + y * potentialArea.width] <= 0) {\n continue;\n }\n var tempX = gridIx2Pos(x, activeRegion.minX);\n var tempY = gridIx2Pos(y, activeRegion.minY);\n var minDistanceSq = pointLineSquareDist({\n x: tempX,\n y: tempY\n }, line);\n // only influence if less than r1\n if (minDistanceSq < Math.pow(options.edgeR1, 2)) {\n var mdr = Math.sqrt(minDistanceSq) - options.edgeR1;\n potentialArea.cells[x + y * potentialArea.width] += influenceFactor * mdr * mdr;\n }\n }\n }\n };\n if (options.nodeInfluenceFactor) {\n members.forEach(function (item) {\n addItemInfluence(item, options.nodeInfluenceFactor / nodeInfA);\n });\n }\n if (options.edgeInfluenceFactor) {\n edges.forEach(function (edge) {\n addEdgeInfluence(edge, options.edgeInfluenceFactor / edgeInfA);\n });\n }\n if (options.negativeNodeInfluenceFactor) {\n nonMembers.forEach(function (item) {\n addItemInfluence(item, options.negativeNodeInfluenceFactor / nodeInfA);\n });\n }\n}\nfunction rerouteLine(item, buffer, intersections, wrapNormal) {\n var bbox = item.getBBox();\n var topIntersect = intersections[0],\n leftIntersect = intersections[1],\n bottomIntersect = intersections[2],\n rightIntersect = intersections[3];\n var cornerPos = {\n topLeft: {\n x: bbox.minX - buffer,\n y: bbox.minY - buffer\n },\n topRight: {\n x: bbox.maxX + buffer,\n y: bbox.minY - buffer\n },\n bottomLeft: {\n x: bbox.minX - buffer,\n y: bbox.maxY + buffer\n },\n bottomRight: {\n x: bbox.maxX + buffer,\n y: bbox.maxY + buffer\n }\n };\n var totalArea = bbox.height * bbox.width;\n function calcHalfArea(intersect1, intersect2) {\n return bbox.width * ((intersect1.y - bbox.minY + (intersect2.y - bbox.minY)) * 0.5);\n }\n // 根据线和boundingbox相交的情况,确定control point的位置\n if (leftIntersect) {\n // 相交区域有三角形\n if (topIntersect) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n if (bottomIntersect) return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n // 相交区域分成上下两个梯形,比较面积\n var topArea = calcHalfArea(leftIntersect, rightIntersect);\n if (topArea < totalArea * 0.5) {\n if (leftIntersect.y > rightIntersect.y) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n }\n if (leftIntersect.y < rightIntersect.y) return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n }\n if (rightIntersect) {\n if (topIntersect) return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n if (bottomIntersect) return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n }\n // 相交区域分成左右两个梯形\n var leftArea = calcHalfArea(topIntersect, bottomIntersect);\n if (leftArea < totalArea * 0.5) {\n if (topIntersect.x > bottomIntersect.x) return wrapNormal ? cornerPos.topLeft : cornerPos.bottomRight;\n return wrapNormal ? cornerPos.bottomLeft : cornerPos.topRight;\n }\n if (topIntersect.x < bottomIntersect.x) return wrapNormal ? cornerPos.topRight : cornerPos.bottomLeft;\n return wrapNormal ? cornerPos.bottomRight : cornerPos.topLeft;\n}","import { __assign } from \"tslib\";\nimport { deepMix, isString } from '@antv/util';\nimport { parsePathString } from '@antv/path-util';\nimport { pathToPoints, getClosedSpline, roundedHull, paddedHull } from '../util/path';\nimport { isPolygonsIntersect } from '../util/math';\nimport { genConvexHull } from '../element/hull/convexHull';\nimport { genBubbleSet } from '../element/hull/bubbleset';\n/**\n * 用于包裹内部的成员的轮廓。\n * convex hull(凸包):http://geomalgorithms.com/a10-_hull-1.html#Monotone%20Chain\n * bubble: 使用 bubbleset算法,refer: http://vialab.science.uoit.ca/wp-content/papercite-data/pdf/col2009c.pdf\n * 通过配置 padding 可以调节包裹轮廓对节点的松紧程度\n */\nvar Hull = /** @class */function () {\n function Hull(graph, cfg) {\n this.cfg = deepMix(this.getDefaultCfg(), cfg);\n this.graph = graph;\n this.id = this.cfg.id;\n this.group = this.cfg.group;\n this.members = this.cfg.members.map(function (item) {\n return isString(item) ? graph.findById(item) : item;\n });\n this.nonMembers = this.cfg.nonMembers.map(function (item) {\n return isString(item) ? graph.findById(item) : item;\n });\n this.setPadding();\n this.setType();\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n }\n Hull.prototype.getDefaultCfg = function () {\n return {\n id: 'g6-hull',\n type: 'round-convex',\n members: [],\n nonMembers: [],\n style: {\n fill: 'lightblue',\n stroke: 'blue',\n opacity: 0.2\n },\n padding: 10\n };\n };\n Hull.prototype.setPadding = function () {\n var nodeSize = this.members.length && this.members[0].getKeyShape().getCanvasBBox().width / 2;\n this.padding = this.cfg.padding > 0 ? this.cfg.padding + nodeSize : 10 + nodeSize;\n this.cfg.bubbleCfg = {\n nodeR0: this.padding - nodeSize,\n nodeR1: this.padding - nodeSize,\n morphBuffer: this.padding - nodeSize\n };\n };\n Hull.prototype.setType = function () {\n this.type = this.cfg.type;\n if (this.members.length < 3) {\n this.type = 'round-convex';\n }\n if (this.type !== 'round-convex' && this.type !== 'smooth-convex' && this.type !== 'bubble') {\n console.warn('The hull type should be either round-convex, smooth-convex or bubble, round-convex is used by default.');\n this.type = 'round-convex';\n }\n };\n Hull.prototype.calcPath = function (members, nonMembers) {\n var contour, path, hull;\n switch (this.type) {\n case 'round-convex':\n contour = genConvexHull(members);\n hull = roundedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = parsePathString(hull);\n break;\n case 'smooth-convex':\n contour = genConvexHull(members);\n if (contour.length === 2) {\n hull = roundedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = parsePathString(hull);\n } else if (contour.length > 2) {\n hull = paddedHull(contour.map(function (p) {\n return [p.x, p.y];\n }), this.padding);\n path = getClosedSpline(hull);\n }\n break;\n case 'bubble':\n contour = genBubbleSet(members, nonMembers, this.cfg.bubbleCfg);\n path = contour.length >= 2 && getClosedSpline(contour);\n break;\n default:\n }\n return path;\n };\n Hull.prototype.render = function () {\n this.group.addShape('path', {\n attrs: __assign({\n path: this.path\n }, this.cfg.style),\n id: this.id,\n name: this.cfg.id,\n capture: false\n });\n this.group.toBack();\n };\n /**\n * 增加hull的成员,同时如果该成员原先在nonMembers中,则从nonMembers中去掉\n * @param item 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Hull.prototype.addMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n this.members.push(item);\n var index = this.nonMembers.indexOf(item);\n if (index > -1) {\n this.nonMembers.splice(index, 1);\n }\n this.updateData(this.members, this.nonMembers);\n return true;\n };\n /**\n * 增加hull需要排除的节点,同时如果该成员原先在members中,则从members中去掉\n * @param item 节点实例\n * @return boolean 添加成功返回 true,否则返回 false\n */\n Hull.prototype.addNonMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n this.nonMembers.push(item);\n var index = this.members.indexOf(item);\n if (index > -1) {\n this.members.splice(index, 1);\n }\n this.updateData(this.members, this.nonMembers);\n return true;\n };\n /**\n * 移除hull中的成员\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Hull.prototype.removeMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n var index = this.members.indexOf(item);\n if (index > -1) {\n this.members.splice(index, 1);\n this.updateData(this.members, this.nonMembers);\n return true;\n }\n return false;\n };\n /**\n * @param node 节点实例\n * @return boolean 移除成功返回 true,否则返回 false\n */\n Hull.prototype.removeNonMember = function (item) {\n if (!item) return;\n if (isString(item)) item = this.graph.findById(item);\n var index = this.nonMembers.indexOf(item);\n if (index > -1) {\n this.nonMembers.splice(index, 1);\n this.updateData(this.members, this.nonMembers);\n return true;\n }\n return false;\n };\n Hull.prototype.updateData = function (members, nonMembers) {\n var _this = this;\n this.group.findById(this.id).remove();\n if (members) this.members = members.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n if (nonMembers) this.nonMembers = nonMembers.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n };\n Hull.prototype.updateStyle = function (cfg) {\n var path = this.group.findById(this.id);\n path.attr(__assign({}, cfg));\n };\n /**\n * 更新 hull\n * @param cfg hull 配置项\n */\n Hull.prototype.updateCfg = function (cfg) {\n var _this = this;\n this.cfg = deepMix(this.cfg, cfg);\n this.id = this.cfg.id;\n this.group = this.cfg.group;\n if (cfg.members) {\n this.members = this.cfg.members.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n }\n if (cfg.nonMembers) {\n this.nonMembers = this.cfg.nonMembers.map(function (item) {\n return isString(item) ? _this.graph.findById(item) : item;\n });\n }\n // TODO padding 设置太大,会影响到 contain 结果\n this.setPadding();\n this.setType();\n this.path = this.calcPath(this.members, this.nonMembers);\n this.render();\n };\n /**\n * 判断是否在hull内部\n * @param item\n */\n Hull.prototype.contain = function (item) {\n var _this = this;\n var nodeItem;\n if (isString(item)) {\n nodeItem = this.graph.findById(item);\n } else {\n nodeItem = item;\n }\n var shapePoints;\n var shape = nodeItem.getKeyShape();\n if (nodeItem.get('type') === 'path') {\n shapePoints = pathToPoints(shape.attr('path'));\n } else {\n var shapeBBox = shape.getCanvasBBox();\n shapePoints = [[shapeBBox.minX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.maxY], [shapeBBox.minX, shapeBBox.maxY]];\n }\n shapePoints = shapePoints.map(function (canvasPoint) {\n var point = _this.graph.getPointByCanvas(canvasPoint[0], canvasPoint[1]);\n return [point.x, point.y];\n });\n return isPolygonsIntersect(shapePoints, pathToPoints(this.path));\n };\n Hull.prototype.destroy = function () {\n this.group.remove();\n this.cfg = null;\n };\n return Hull;\n}();\nexport default Hull;","import { __assign, __extends, __spreadArray } from \"tslib\";\nimport EventEmitter from '@antv/event-emitter';\nimport { ext } from '@antv/matrix-util';\nimport { clone, deepMix, each, isPlainObject, isString, debounce } from '@antv/util';\nimport { getDegree, getAdjMatrix as getAdjacentMatrix, Stack, floydWarshall } from '@antv/algorithm';\nimport { lerp, move } from '../util/math';\nimport { dataValidation, singleDataValidation } from '../util/validation';\nimport Global from '../global';\nimport { ItemController, ModeController, StateController, ViewController } from './controller';\nimport { plainCombosToTrees, traverseTree, reconstructTree, traverseTreeUp, getAnimateCfgWithCallback } from '../util/graphic';\nimport Hull from '../item/hull';\nvar transform = ext.transform;\nvar NODE = 'node';\nvar AbstractGraph = /** @class */function (_super) {\n __extends(AbstractGraph, _super);\n function AbstractGraph(cfg) {\n var _this = _super.call(this) || this;\n /**\n * 根据 comboTree 结构整理 Combo 相关的图形绘制层级,包括 Combo 本身、节点、边\n * @param {GraphData} data 数据\n */\n _this.sortCombos = debounce(function () {\n var comboSorted = _this.get('comboSorted');\n if (!_this || _this.destroyed || comboSorted) return;\n _this.set('comboSorted', true);\n var depthMap = [];\n var dataDepthMap = {};\n var comboTrees = _this.get('comboTrees');\n (comboTrees || []).forEach(function (cTree) {\n traverseTree(cTree, function (child) {\n if (depthMap[child.depth]) depthMap[child.depth].push(child.id);else depthMap[child.depth] = [child.id];\n dataDepthMap[child.id] = child.depth;\n return true;\n });\n });\n var edges = _this.getEdges().concat(_this.get('vedges'));\n (edges || []).forEach(function (edgeItem) {\n var edge = edgeItem.getModel();\n var sourceDepth = dataDepthMap[edge.source] || 0;\n var targetDepth = dataDepthMap[edge.target] || 0;\n var depth = Math.max(sourceDepth, targetDepth);\n if (depthMap[depth]) depthMap[depth].push(edge.id);else depthMap[depth] = [edge.id];\n });\n depthMap.forEach(function (array) {\n if (!array || !array.length) return;\n for (var i = array.length - 1; i >= 0; i--) {\n var item = _this.findById(array[i]);\n if (item) item.toFront();\n }\n });\n }, 500, false);\n _this.cfg = deepMix(_this.getDefaultCfg(), cfg);\n _this.init();\n _this.animating = false;\n _this.destroyed = false;\n // 启用 stack 后,实例化 undoStack 和 redoStack\n if (_this.cfg.enabledStack) {\n // 实例化 undo 和 redo 栈\n _this.undoStack = new Stack(_this.cfg.maxStep);\n _this.redoStack = new Stack(_this.cfg.maxStep);\n }\n return _this;\n }\n AbstractGraph.prototype.init = function () {\n this.initCanvas();\n // instance controller\n var viewController = new ViewController(this);\n var modeController = new ModeController(this);\n var itemController = new ItemController(this);\n var stateController = new StateController(this);\n this.set({\n viewController: viewController,\n modeController: modeController,\n itemController: itemController,\n stateController: stateController\n });\n // 初始化布局机制\n this.initLayoutController();\n // 初始化事件机制\n this.initEventController();\n this.initGroups();\n /** 初始化插件 */\n this.initPlugins();\n };\n // 初始化所有 Group\n AbstractGraph.prototype.initGroups = function () {\n var canvas = this.get('canvas');\n if (!canvas) return;\n var el = canvas.get('el');\n var _a = (el || {}).id,\n id = _a === void 0 ? 'g6' : _a;\n var group = canvas.addGroup({\n id: \"\".concat(id, \"-root\"),\n className: Global.rootContainerClassName\n });\n if (this.get('groupByTypes')) {\n var edgeGroup = group.addGroup({\n id: \"\".concat(id, \"-edge\"),\n className: Global.edgeContainerClassName\n });\n var nodeGroup = group.addGroup({\n id: \"\".concat(id, \"-node\"),\n className: Global.nodeContainerClassName\n });\n var comboGroup = group.addGroup({\n id: \"\".concat(id, \"-combo\"),\n className: Global.comboContainerClassName\n });\n // 用于存储自定义的群组\n comboGroup.toBack();\n this.set({\n nodeGroup: nodeGroup,\n edgeGroup: edgeGroup,\n comboGroup: comboGroup\n });\n }\n var delegateGroup = group.addGroup({\n id: \"\".concat(id, \"-delegate\"),\n className: Global.delegateContainerClassName\n });\n this.set({\n delegateGroup: delegateGroup\n });\n this.set('group', group);\n };\n // eslint-disable-next-line class-methods-use-this\n AbstractGraph.prototype.getDefaultCfg = function () {\n return {\n /**\n * Container could be dom object or dom id\n */\n container: undefined,\n /**\n * Canvas width\n * unit pixel if undefined force fit width\n */\n width: undefined,\n /**\n * Canvas height\n * unit pixel if undefined force fit height\n */\n height: undefined,\n /**\n * renderer canvas or svg\n * @type {string}\n */\n renderer: 'canvas',\n /**\n * control graph behaviors\n */\n modes: {},\n /**\n * 注册插件\n */\n plugins: [],\n /**\n * source data\n */\n data: {},\n /**\n * Fit view padding (client scale)\n */\n fitViewPadding: 10,\n /**\n * Minimum scale size\n */\n minZoom: 0.02,\n /**\n * Maxmum scale size\n */\n maxZoom: 10,\n /**\n * capture events\n */\n event: true,\n /**\n * group node & edges into different graphic groups\n */\n groupByTypes: true,\n /**\n * determine if it's a directed graph\n */\n directed: false,\n /**\n * when data or shape changed, should canvas draw automatically\n */\n autoPaint: true,\n /**\n * store all the node instances\n */\n nodes: [],\n /**\n * store all the edge instances\n */\n edges: [],\n /**\n * store all the combo instances\n */\n combos: [],\n /**\n * store all the edge instances which are virtual edges related to collapsed combo\n */\n vedges: [],\n /**\n * all the instances indexed by id\n */\n itemMap: {},\n /**\n * 边直接连接到节点的中心,不再考虑锚点\n */\n linkCenter: false,\n /**\n * 默认的节点配置,data 上定义的配置会覆盖这些配置。例如:\n * defaultNode: {\n * type: 'rect',\n * size: [60, 40],\n * style: {\n * //... 样式配置项\n * }\n * }\n * 若数据项为 { id: 'node', x: 100, y: 100 }\n * 实际创建的节点模型是 { id: 'node', x: 100, y: 100, type: 'rect', size: [60, 40] }\n * 若数据项为 { id: 'node', x: 100, y: 100, type: 'circle' }\n * 实际创建的节点模型是 { id: 'node', x: 100, y: 100, type: 'circle', size: [60, 40] }\n */\n defaultNode: {},\n /**\n * 默认边配置,data 上定义的配置会覆盖这些配置。用法同 defaultNode\n */\n defaultEdge: {},\n /**\n * 节点默认样式,也可以添加状态样式\n * 例如:\n * const graph = new G6.Graph({\n * nodeStateStyles: {\n * selected: { fill: '#ccc', stroke: '#666' },\n * active: { lineWidth: 2 }\n * },\n * ...\n * });\n *\n */\n nodeStateStyles: {},\n /**\n * 边默认样式,用法同nodeStateStyle\n */\n edgeStateStyles: {},\n /**\n * graph 状态\n */\n states: {},\n /**\n * 是否启用全局动画\n */\n animate: false,\n /**\n * 动画设置,仅在 animate 为 true 时有效\n */\n animateCfg: {\n /**\n * 帧回调函数,用于自定义节点运动路径,为空时线性运动\n */\n onFrame: undefined,\n /**\n * 动画时长(ms)\n */\n duration: 500,\n /**\n * 指定动画动效\n */\n easing: 'easeLinear'\n },\n callback: undefined,\n // 默认不启用 undo & redo 功能\n enabledStack: false,\n // 只有当 enabledStack 为 true 时才起作用\n maxStep: 10,\n // 存储图上的 tooltip dom,方便销毁\n tooltips: [],\n // 达到这一节点数量(默认值 1000),将开启性能优化模式。目前包括:节点状态样式变更是否影响相关边的更新\n optimizeThreshold: 1000\n };\n };\n /**\n * 将值设置到 this.cfg 变量上面\n * @param key 键 或 对象值\n * @param val 值\n */\n AbstractGraph.prototype.set = function (key, val) {\n if (isPlainObject(key)) {\n this.cfg = __assign(__assign({}, this.cfg), key);\n } else {\n this.cfg[key] = val;\n }\n if (key === 'enabledStack' && val && !this.undoStack && !this.redoStack) {\n this.undoStack = new Stack(this.cfg.maxStep);\n this.redoStack = new Stack(this.cfg.maxStep);\n }\n return this;\n };\n /**\n * 获取 this.cfg 中的值\n * @param key 键\n */\n AbstractGraph.prototype.get = function (key) {\n var _a;\n return (_a = this.cfg) === null || _a === void 0 ? void 0 : _a[key];\n };\n /**\n * 获取 graph 的根图形分组\n * @return 根 group\n */\n AbstractGraph.prototype.getGroup = function () {\n return this.get('group');\n };\n /**\n * 获取 graph 的 DOM 容器\n * @return DOM 容器\n */\n AbstractGraph.prototype.getContainer = function () {\n return this.get('container');\n };\n /**\n * 获取 graph 的最小缩放比例\n * @return minZoom\n */\n AbstractGraph.prototype.getMinZoom = function () {\n return this.get('minZoom');\n };\n /**\n * 设置 graph 的最小缩放比例\n * @return minZoom\n */\n AbstractGraph.prototype.setMinZoom = function (ratio) {\n return this.set('minZoom', ratio);\n };\n /**\n * 获取 graph 的最大缩放比例\n * @param maxZoom\n */\n AbstractGraph.prototype.getMaxZoom = function () {\n return this.get('maxZoom');\n };\n /**\n * 设置 graph 的最大缩放比例\n * @param maxZoom\n */\n AbstractGraph.prototype.setMaxZoom = function (ratio) {\n return this.set('maxZoom', ratio);\n };\n /**\n * 获取 graph 的宽度\n * @return width\n */\n AbstractGraph.prototype.getWidth = function () {\n return this.get('width');\n };\n /**\n * 获取 graph 的高度\n * @return width\n */\n AbstractGraph.prototype.getHeight = function () {\n return this.get('height');\n };\n /**\n * 清理元素多个状态\n * @param {string|Item} item 元素id或元素实例\n * @param {string[]} states 状态\n */\n AbstractGraph.prototype.clearItemStates = function (item, states) {\n if (isString(item)) {\n item = this.findById(item);\n }\n var itemController = this.get('itemController');\n if (!states) {\n states = item.get('states');\n }\n itemController.clearItemStates(item, states);\n var stateController = this.get('stateController');\n stateController.updateStates(item, states, false);\n };\n /**\n * 设置各个节点样式,以及在各种状态下节点 keyShape 的样式。\n * 若是自定义节点切在各种状态下\n * graph.node(node => {\n * return {\n * type: 'rect',\n * label: node.id,\n * style: { fill: '#666' },\n * stateStyles: {\n * selected: { fill: 'blue' },\n * custom: { fill: 'green' }\n * }\n * }\n * });\n * @param {function} nodeFn 指定每个节点样式\n */\n AbstractGraph.prototype.node = function (nodeFn) {\n if (typeof nodeFn === 'function') {\n this.set('nodeMapper', nodeFn);\n }\n };\n /**\n * 设置各个边样式\n * @param {function} edgeFn 指定每个边的样式,用法同 node\n */\n AbstractGraph.prototype.edge = function (edgeFn) {\n if (typeof edgeFn === 'function') {\n this.set('edgeMapper', edgeFn);\n }\n };\n /**\n * 设置各个 combo 的配置\n * @param comboFn\n */\n AbstractGraph.prototype.combo = function (comboFn) {\n if (typeof comboFn === 'function') {\n this.set('comboMapper', comboFn);\n }\n };\n /**\n * 根据 ID 查询图元素实例\n * @param id 图元素 ID\n */\n AbstractGraph.prototype.findById = function (id) {\n return this.get('itemMap')[id];\n };\n /**\n * 根据对应规则查找单个元素\n * @param {ITEM_TYPE} type 元素类型(node | edge | group)\n * @param {(item: T, index: number) => T} fn 指定规则\n * @return {T} 元素实例\n */\n AbstractGraph.prototype.find = function (type, fn) {\n var result;\n var items = this.get(\"\".concat(type, \"s\"));\n // eslint-disable-next-line consistent-return\n each(items, function (item, i) {\n if (fn(item, i)) {\n result = item;\n return result;\n }\n });\n return result;\n };\n /**\n * 查找所有满足规则的元素\n * @param {string} type 元素类型(node|edge)\n * @param {string} fn 指定规则\n * @return {array} 元素实例\n */\n AbstractGraph.prototype.findAll = function (type, fn) {\n var result = [];\n each(this.get(\"\".concat(type, \"s\")), function (item, i) {\n if (fn(item, i)) {\n result.push(item);\n }\n });\n return result;\n };\n /**\n * 查找所有处于指定状态的元素\n * @param {string} type 元素类型(node|edge)\n * @param {string} state 状态\n * @return {object} 元素实例\n */\n AbstractGraph.prototype.findAllByState = function (type, state, additionalFilter) {\n if (additionalFilter) {\n return this.findAll(type, function (item) {\n return item.hasState(state) && additionalFilter(item);\n });\n } else {\n return this.findAll(type, function (item) {\n return item.hasState(state);\n });\n }\n };\n /**\n * 平移画布\n * @param dx 水平方向位移\n * @param dy 垂直方向位移\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.translate = function (dx, dy, animate, animateCfg) {\n var _this = this;\n var group = this.get('group');\n var matrix = clone(group.getMatrix());\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n if (animate) {\n var animateConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n return _this.emit('viewportchange', {\n action: 'translate',\n matrix: group.getMatrix()\n });\n }\n });\n move(group, {\n x: group.getCanvasBBox().x + dx,\n y: group.getCanvasBBox().y + dy\n }, animate, animateConfig || {\n duration: 500,\n easing: 'easeCubic'\n });\n } else {\n matrix = transform(matrix, [['t', dx, dy]]);\n group.setMatrix(matrix);\n this.emit('viewportchange', {\n action: 'translate',\n matrix: matrix\n });\n this.autoPaint();\n }\n };\n /**\n * 平移画布到某点\n * @param {number} x 水平坐标\n * @param {number} y 垂直坐标\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.moveTo = function (x, y, animate, animateCfg) {\n var group = this.get('group');\n move(group, {\n x: x,\n y: y\n }, animate, animateCfg || {\n duration: 500,\n easing: 'easeCubic'\n });\n this.emit('viewportchange', {\n action: 'move',\n matrix: group.getMatrix()\n });\n };\n /**\n * 调整视口适应视图\n * @param {object} padding 四周围边距\n * @param {FitViewRules} rules fitView的规则\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.fitView = function (padding, rules, animate, animateCfg) {\n if (padding) {\n this.set('fitViewPadding', padding);\n }\n var viewController = this.get('viewController');\n if (rules) {\n viewController.fitViewByRules(rules, animate, animateCfg);\n } else {\n viewController.fitView(animate, animateCfg);\n }\n this.autoPaint();\n };\n /**\n * 调整视口适应视图,不缩放,仅将图 bbox 中心对齐到画布中心\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.fitCenter = function (animate, animateCfg) {\n var viewController = this.get('viewController');\n viewController.fitCenter(animate, animateCfg);\n this.autoPaint();\n };\n /**\n * 新增行为\n * @param {string | ModeOption | ModeType[]} behaviors 添加的行为\n * @param {string | string[]} modes 添加到对应的模式\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.addBehaviors = function (behaviors, modes) {\n var modeController = this.get('modeController');\n modeController.manipulateBehaviors(behaviors, modes, true);\n return this;\n };\n /**\n * 移除行为\n * @param {string | ModeOption | ModeType[]} behaviors 移除的行为\n * @param {string | string[]} modes 从指定的模式中移除\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.removeBehaviors = function (behaviors, modes) {\n var modeController = this.get('modeController');\n modeController.manipulateBehaviors(behaviors, modes, false);\n return this;\n };\n /**\n * 更新行为参数\n * @param {string | ModeOption | ModeType} behavior 需要更新的行为\n * @param {string | string[]} modes 指定的模式中的行为,不指定则为 default\n * @return {Graph} Graph\n */\n AbstractGraph.prototype.updateBehavior = function (behavior, newCfg, mode) {\n var modeController = this.get('modeController');\n modeController.updateBehavior(behavior, newCfg, mode);\n return this;\n };\n /**\n * 伸缩窗口\n * @param ratio 伸缩比例\n * @param center 以center的x, y坐标为中心缩放\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n * @return {boolean} 缩放是否成功\n */\n AbstractGraph.prototype.zoom = function (ratio, center, animate, animateCfg) {\n var _this = this;\n var group = this.get('group');\n var matrix = clone(group.getMatrix()) || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var minZoom = this.get('minZoom');\n var maxZoom = this.get('maxZoom');\n var currentZoom = this.getZoom() || 1;\n var targetZoom = currentZoom * ratio;\n var finalRatio = ratio;\n var failed = false;\n if (minZoom && targetZoom < minZoom) {\n finalRatio = minZoom / currentZoom;\n failed = true;\n } else if (maxZoom && targetZoom > maxZoom) {\n finalRatio = maxZoom / currentZoom;\n failed = true;\n }\n if (center) {\n matrix = transform(matrix, [['t', -center.x, -center.y], ['s', finalRatio, finalRatio], ['t', center.x, center.y]]);\n } else {\n matrix = transform(matrix, [['s', finalRatio, finalRatio]]);\n }\n if (animate) {\n // Clone the original matrix to perform the animation\n var aniMatrix_1 = clone(group.getMatrix());\n if (!aniMatrix_1) {\n aniMatrix_1 = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n var initialRatio_1 = aniMatrix_1[0];\n var targetRatio_1 = initialRatio_1 * finalRatio;\n var animateConfig = getAnimateCfgWithCallback({\n animateCfg: animateCfg,\n callback: function callback() {\n return _this.emit('viewportchange', {\n action: 'zoom',\n matrix: group.getMatrix()\n });\n }\n });\n group.animate(function (ratio) {\n if (ratio === 1) {\n // Reuse the first transformation\n aniMatrix_1 = matrix;\n } else {\n var scale = lerp(initialRatio_1, targetRatio_1, ratio) / aniMatrix_1[0];\n if (center) {\n aniMatrix_1 = transform(aniMatrix_1, [['t', -center.x, -center.y], ['s', scale, scale], ['t', center.x, center.y]]);\n } else {\n aniMatrix_1 = transform(aniMatrix_1, [['s', scale, scale]]);\n }\n }\n return {\n matrix: aniMatrix_1\n };\n }, animateConfig);\n } else {\n group.setMatrix(matrix);\n this.emit('viewportchange', {\n action: 'zoom',\n matrix: matrix\n });\n this.autoPaint();\n }\n return !failed;\n };\n /**\n * 伸缩视口到一固定比例\n * @param {number} toRatio 伸缩比例\n * @param {Point} center 以center的x, y坐标为中心缩放\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n * @return {boolean} 缩放是否成功\n */\n AbstractGraph.prototype.zoomTo = function (toRatio, center, animate, animateCfg) {\n var ratio = toRatio / this.getZoom();\n return this.zoom(ratio, center, animate, animateCfg);\n };\n /**\n * 将元素移动到视口中心\n * @param {Item} item 指定元素\n * @param {boolean} animate 是否带有动画地移动\n * @param {GraphAnimateConfig} animateCfg 若带有动画,动画的配置项\n */\n AbstractGraph.prototype.focusItem = function (item, animate, animateCfg) {\n var viewController = this.get('viewController');\n var isAnimate = false;\n if (animate) isAnimate = true;else if (animate === undefined) isAnimate = this.get('animate');\n var curAniamteCfg = {};\n if (animateCfg) curAniamteCfg = animateCfg;else if (animateCfg === undefined) curAniamteCfg = this.get('animateCfg');\n viewController.focus(item, isAnimate, curAniamteCfg);\n this.autoPaint();\n };\n /**\n * Focus on the passed items\n * @param {Item[]} items Items you want to focus on\n * @param {boolean} zoomToFit Wether to zoom on the passed items\n * @param {boolean} animate Wether to animate the transition\n * @param {GraphAnimateConfig} animateCfg Animation configuration\n */\n AbstractGraph.prototype.focusItems = function (items, zoomToFit, animate, animateCfg) {\n var viewController = this.get('viewController');\n viewController.focusItems(items, zoomToFit, animate, animateCfg);\n };\n /**\n * 自动重绘\n * @internal 仅供内部更新机制调用,外部根据需求调用 render 或 paint 接口\n */\n AbstractGraph.prototype.autoPaint = function () {\n if (this.get('autoPaint')) {\n this.paint();\n }\n };\n /**\n * 仅画布重新绘制\n */\n AbstractGraph.prototype.paint = function () {\n this.emit('beforepaint');\n this.get('canvas').draw();\n this.emit('afterpaint');\n };\n /**\n * 将屏幕坐标转换为视口坐标\n * @param {number} clientX 屏幕x坐标\n * @param {number} clientY 屏幕y坐标\n * @return {Point} 视口坐标\n */\n AbstractGraph.prototype.getPointByClient = function (clientX, clientY) {\n var viewController = this.get('viewController');\n return viewController.getPointByClient(clientX, clientY);\n };\n /**\n * 将绘制坐标转换为屏幕坐标\n * @param {number} x 绘制坐标 x\n * @param {number} y 绘制坐标 y\n * @return {Point} 绘制坐标\n */\n AbstractGraph.prototype.getClientByPoint = function (x, y) {\n var viewController = this.get('viewController');\n return viewController.getClientByPoint(x, y);\n };\n /**\n * 将画布坐标转换为绘制坐标\n * @param {number} canvasX 画布 x 坐标\n * @param {number} canvasY 画布 y 坐标\n * @return {object} 绘制坐标\n */\n AbstractGraph.prototype.getPointByCanvas = function (canvasX, canvasY) {\n var viewController = this.get('viewController');\n return viewController.getPointByCanvas(canvasX, canvasY);\n };\n /**\n * 将绘制坐标转换为画布坐标\n * @param {number} x 绘制坐标 x\n * @param {number} y 绘制坐标 y\n * @return {object} 画布坐标\n */\n AbstractGraph.prototype.getCanvasByPoint = function (x, y) {\n var viewController = this.get('viewController');\n return viewController.getCanvasByPoint(x, y);\n };\n /**\n * 获取图内容的中心绘制坐标\n * @return {object} 中心绘制坐标\n */\n AbstractGraph.prototype.getGraphCenterPoint = function () {\n var bbox = this.get('group').getCanvasBBox();\n return {\n x: (bbox.minX + bbox.maxX) / 2,\n y: (bbox.minY + bbox.maxY) / 2\n };\n };\n /**\n * 获取视口中心绘制坐标\n * @return {object} 视口中心绘制坐标\n */\n AbstractGraph.prototype.getViewPortCenterPoint = function () {\n return this.getPointByCanvas(this.get('width') / 2, this.get('height') / 2);\n };\n /**\n * 显示元素\n * @param {Item} item 指定元素\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.showItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var object = itemController.changeItemVisibility(item, true);\n if (stack && this.get('enabledStack')) {\n var id = object.getID();\n var type = object.getType();\n var before = {};\n var after = {};\n switch (type) {\n case 'node':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.nodes = [{\n id: id,\n visible: true\n }];\n break;\n case 'edge':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.edges = [{\n id: id,\n visible: true\n }];\n break;\n case 'combo':\n before.nodes = [{\n id: id,\n visible: false\n }];\n after.combos = [{\n id: id,\n visible: true\n }];\n break;\n default:\n break;\n }\n this.pushStack('visible', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 隐藏元素\n * @param {Item} item 指定元素\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.hideItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var object = itemController.changeItemVisibility(item, false);\n if (stack && this.get('enabledStack')) {\n var id = object.getID();\n var type = object.getType();\n var before = {};\n var after = {};\n switch (type) {\n case 'node':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.nodes = [{\n id: id,\n visible: false\n }];\n break;\n case 'edge':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.edges = [{\n id: id,\n visible: false\n }];\n break;\n case 'combo':\n before.nodes = [{\n id: id,\n visible: true\n }];\n after.combos = [{\n id: id,\n visible: false\n }];\n break;\n default:\n break;\n }\n this.pushStack('visible', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 刷新元素\n * @param {string|object} item 元素id或元素实例\n */\n AbstractGraph.prototype.refreshItem = function (item) {\n var itemController = this.get('itemController');\n itemController.refreshItem(item);\n };\n /**\n * 设置是否在更新/刷新后自动重绘\n * @param {boolean} auto 自动重绘\n */\n AbstractGraph.prototype.setAutoPaint = function (auto) {\n var self = this;\n self.set('autoPaint', auto);\n var canvas = self.get('canvas');\n canvas.set('autoDraw', auto);\n };\n /**\n * 删除元素\n * @param {Item} item 元素id或元素实例\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.remove = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n this.removeItem(item, stack);\n };\n /**\n * 删除元素\n * @param {Item} item 元素id或元素实例\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.removeItem = function (item, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var nodeItem = item;\n if (isString(item)) nodeItem = this.findById(item);\n if (!nodeItem && isString(item)) {\n console.warn(\"The item \".concat(item, \" to be removed does not exist!\"));\n } else if (nodeItem) {\n var type = '';\n if (nodeItem.getType) type = nodeItem.getType();\n // 将删除的元素入栈\n if (stack && this.get('enabledStack')) {\n var deletedModel = __assign(__assign({}, nodeItem.getModel()), {\n itemType: type\n });\n var before = {};\n switch (type) {\n case 'node':\n {\n before.nodes = [deletedModel];\n before.edges = [];\n var edges = nodeItem.getEdges();\n for (var i = edges.length - 1; i >= 0; i--) {\n before.edges.push(__assign(__assign({}, edges[i].getModel()), {\n itemType: 'edge'\n }));\n }\n break;\n }\n case 'edge':\n before.edges = [deletedModel];\n break;\n case 'combo':\n before.combos = [deletedModel];\n break;\n default:\n break;\n }\n this.pushStack('delete', {\n before: before,\n after: {}\n });\n }\n if (type === 'node') {\n var model = nodeItem.getModel();\n // 如果删除的是节点,且该节点存在于某个 Combo 中,则需要先将 node 从 combo 中移除,否则删除节点后,操作 combo 会出错\n if (model.comboId) {\n this.updateComboTree(nodeItem, undefined, false);\n }\n }\n var itemController = this.get('itemController');\n itemController.removeItem(nodeItem);\n if (type === 'combo') {\n var newComboTrees = reconstructTree(this.get('comboTrees'));\n this.set('comboTrees', newComboTrees);\n }\n }\n };\n AbstractGraph.prototype.innerAddItem = function (type, model, itemController) {\n // 添加节点、边或combo之前,先验证数据是否符合规范\n if (!singleDataValidation(type, model)) {\n return false;\n }\n if (model.id && this.findById(model.id)) {\n console.warn(\"This item exists already. Be sure the id %c\".concat(model.id, \"%c is unique.\"), 'font-size: 20px; color: red;', '');\n return;\n }\n var item;\n var comboTrees = this.get('comboTrees') || [];\n if (type === 'combo') {\n var itemMap_1 = this.get('itemMap');\n var foundParent_1 = false;\n comboTrees.forEach(function (ctree) {\n if (foundParent_1) return; // terminate the forEach after the tree containing the item is done\n traverseTreeUp(ctree, function (child) {\n // find the parent\n if (model.parentId === child.id) {\n foundParent_1 = true;\n var newCombo = __assign({\n id: model.id,\n depth: child.depth + 2\n }, model);\n if (child.children) child.children.push(newCombo);else child.children = [newCombo];\n model.depth = newCombo.depth;\n item = itemController.addItem(type, model);\n }\n var childItem = itemMap_1[child.id];\n // after the parent is found, update all the ancestors\n if (foundParent_1 && childItem && childItem.getType && childItem.getType() === 'combo') {\n itemController.updateCombo(childItem, child.children);\n }\n return true;\n });\n });\n // if the parent is not found, add it to the root\n if (!foundParent_1) {\n var newCombo = __assign({\n id: model.id,\n depth: 0\n }, model);\n model.depth = newCombo.depth;\n comboTrees.push(newCombo);\n item = itemController.addItem(type, model);\n }\n this.set('comboTrees', comboTrees);\n if (model.collapsed) {\n this.collapseCombo(item, false);\n this.updateCombo(item);\n }\n } else if (type === 'node' && isString(model.comboId) && comboTrees) {\n var parentCombo = this.findById(model.comboId);\n if (parentCombo && parentCombo.getType && parentCombo.getType() !== 'combo') {\n console.warn(\"'\".concat(model.comboId, \"' is not a id of a combo in the graph, the node will be added without combo.\"));\n }\n item = itemController.addItem(type, model);\n var itemMap_2 = this.get('itemMap');\n var foundParent_2 = false,\n foundNode_1 = false;\n comboTrees.forEach(function (ctree) {\n if (foundNode_1 || foundParent_2) return; // terminate the forEach\n traverseTreeUp(ctree, function (child) {\n if (child.id === model.id) {\n // if the item exists in the tree already, terminate\n foundNode_1 = true;\n return false;\n }\n if (model.comboId === child.id && !foundNode_1) {\n // found the parent, add the item to the children of its parent in the tree\n foundParent_2 = true;\n var cloneNode = clone(model);\n cloneNode.itemType = 'node';\n if (child.children) child.children.push(cloneNode);else child.children = [cloneNode];\n cloneNode.depth = child.depth + 1;\n }\n // update the size of all the ancestors\n if (foundParent_2 && itemMap_2[child.id].getType && itemMap_2[child.id].getType() === 'combo') {\n itemController.updateCombo(itemMap_2[child.id], child.children);\n }\n return true;\n });\n });\n } else {\n item = itemController.addItem(type, model);\n }\n if (type === 'node' && model.comboId || type === 'combo' && model.parentId) {\n // add the combo to the parent's children array\n var parentCombo = this.findById(model.comboId || model.parentId);\n if (parentCombo && parentCombo.getType && parentCombo.getType() === 'combo') parentCombo.addChild(item);\n }\n return item;\n };\n /**\n * 新增元素\n * @param {ITEM_TYPE} type 元素类型(node | edge)\n * @param {ModelConfig} model 元素数据模型\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n * @param {boolean} sortCombo 本次操作是否需要更新 combo 层级顺序,内部参数,用户在外部使用 addItem 时始终时需要更新\n * @return {Item} 元素实例\n */\n AbstractGraph.prototype.addItem = function (type, model, stack, sortCombo) {\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n var currentComboSorted = this.get('comboSorted');\n this.set('comboSorted', currentComboSorted && !sortCombo);\n var itemController = this.get('itemController');\n var item = this.innerAddItem(type, model, itemController);\n if (item === false || item === true) {\n return item;\n }\n var combos = this.get('combos');\n if (combos && combos.length > 0) {\n this.sortCombos();\n }\n this.autoPaint();\n if (stack && this.get('enabledStack')) {\n var addedModel = __assign(__assign({}, item.getModel()), {\n itemType: type\n });\n var after = {};\n switch (type) {\n case 'node':\n after.nodes = [addedModel];\n break;\n case 'edge':\n after.edges = [addedModel];\n break;\n case 'combo':\n after.combos = [addedModel];\n break;\n default:\n break;\n }\n this.pushStack('add', {\n before: {},\n after: after\n });\n }\n return item;\n };\n AbstractGraph.prototype.addItems = function (items, stack, sortCombo) {\n if (items === void 0) {\n items = [];\n }\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n var currentComboSorted = this.get('comboSorted');\n this.set('comboSorted', currentComboSorted && !sortCombo);\n var itemController = this.get('itemController');\n var returnItems = [];\n // 1. add anything that is not an edge.\n // Add undefined as a placeholder for the next cycle. This way we return items matching the input order\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n if (item.type !== 'edge' && item.type !== 'vedge') {\n returnItems.push(this.innerAddItem(item.type, item.model, itemController));\n } else {\n returnItems.push(undefined);\n }\n }\n // 2. add all the edges\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n if (item.type === 'edge' || item.type === 'vedge') {\n returnItems[i] = this.innerAddItem(item.type, item.model, itemController);\n }\n }\n if (sortCombo) {\n var combos = this.get('combos');\n if (combos && combos.length > 0) {\n this.sortCombos();\n }\n }\n this.autoPaint();\n if (stack && this.get('enabledStack')) {\n var after = {\n nodes: [],\n edges: [],\n combos: []\n };\n for (var i = 0; i < items.length; i++) {\n var type = items[i].type;\n var returnItem = returnItems[i];\n if (!!returnItem && returnItem !== true) {\n var addedModel = __assign(__assign({}, returnItem.getModel()), {\n itemType: type\n });\n switch (type) {\n case 'node':\n after.nodes.push(addedModel);\n break;\n case 'edge':\n after.edges.push(addedModel);\n break;\n case 'combo':\n after.combos.push(addedModel);\n break;\n default:\n break;\n }\n }\n }\n this.pushStack('addItems', {\n before: {},\n after: after\n });\n }\n return returnItems;\n };\n /**\n * 新增元素\n * @param {ITEM_TYPE} type 元素类型(node | edge)\n * @param {ModelConfig} model 元素数据模型\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n * @param {boolean} sortCombo 本次操作是否需要更新 combo 层级顺序,内部参数,用户在外部使用 addItem 时始终时需要更新\n * @return {Item} 元素实例\n */\n AbstractGraph.prototype.add = function (type, model, stack, sortCombo) {\n if (stack === void 0) {\n stack = true;\n }\n if (sortCombo === void 0) {\n sortCombo = true;\n }\n return this.addItem(type, model, stack, sortCombo);\n };\n /**\n * 更新元素\n * @param {Item} item 元素id或元素实例\n * @param {Partial | EdgeConfig} cfg 需要更新的数据\n */\n AbstractGraph.prototype.updateItem = function (item, cfg, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n var currentItem;\n if (isString(item)) {\n currentItem = this.findById(item);\n } else {\n currentItem = item;\n }\n var stackEnabled = stack && this.get('enabledStack');\n var unupdatedModel;\n if (stackEnabled) {\n unupdatedModel = clone(currentItem.getModel());\n }\n var type = '';\n if (currentItem.getType) type = currentItem.getType();\n var states = __spreadArray([], currentItem.getStates(), true);\n if (type === 'combo') {\n each(states, function (state) {\n return _this.setItemState(currentItem, state, false);\n });\n }\n itemController.updateItem(currentItem, cfg);\n if (type === 'combo') {\n each(states, function (state) {\n return _this.setItemState(currentItem, state, true);\n });\n }\n if (stackEnabled) {\n var before = {\n nodes: [],\n edges: [],\n combos: []\n };\n var after = {\n nodes: [],\n edges: [],\n combos: []\n };\n var afterModel = __assign({\n id: unupdatedModel.id\n }, cfg);\n switch (type) {\n case 'node':\n before.nodes.push(unupdatedModel);\n after.nodes.push(afterModel);\n break;\n case 'edge':\n before.edges.push(unupdatedModel);\n after.edges.push(afterModel);\n break;\n case 'combo':\n before.combos.push(unupdatedModel);\n after.combos.push(afterModel);\n break;\n default:\n break;\n }\n this.pushStack('update', {\n before: before,\n after: after\n });\n }\n };\n /**\n * 更新元素\n * @param {Item} item 元素id或元素实例\n * @param {Partial | EdgeConfig} cfg 需要更新的数据\n * @param {boolean} stack 本次操作是否入栈,默认为 true\n */\n AbstractGraph.prototype.update = function (item, cfg, stack) {\n if (stack === void 0) {\n stack = true;\n }\n this.updateItem(item, cfg, stack);\n };\n /**\n * 设置元素状态\n * @param {Item} item 元素id或元素实例\n * @param {string} state 状态名称\n * @param {string | boolean} value 是否启用状态 或 状态值\n */\n AbstractGraph.prototype.setItemState = function (item, state, value) {\n if (isString(item)) {\n item = this.findById(item);\n }\n var itemController = this.get('itemController');\n itemController.setItemState(item, state, value);\n var stateController = this.get('stateController');\n stateController.updateState(item, state, value);\n };\n /**\n * 将指定状态的优先级提升为最高优先级\n * @param {Item} item 元素id或元素实例\n * @param state 状态名称\n */\n AbstractGraph.prototype.priorityState = function (item, state) {\n var itemController = this.get('itemController');\n itemController.priorityState(item, state);\n };\n /**\n * 设置视图初始化数据\n * @param {GraphData} data 初始化数据\n */\n AbstractGraph.prototype.data = function (data) {\n dataValidation(data);\n this.set('data', data);\n };\n /**\n * 根据data接口的数据渲染视图\n */\n AbstractGraph.prototype.render = function () {\n var self = this;\n this.set('comboSorted', false);\n var data = this.get('data');\n if (this.get('enabledStack')) {\n // render 之前清空 redo 和 undo 栈\n this.clearStack();\n }\n if (!data) {\n throw new Error('data must be defined first');\n }\n var _a = data.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = data.edges,\n edges = _b === void 0 ? [] : _b,\n _c = data.combos,\n combos = _c === void 0 ? [] : _c;\n this.clear(true);\n this.emit('beforerender');\n self.addItems(nodes.map(function (node) {\n return {\n type: 'node',\n model: node\n };\n }), false, false);\n // process the data to tree structure\n if ((combos === null || combos === void 0 ? void 0 : combos.length) !== 0) {\n var comboTrees = plainCombosToTrees(combos, nodes);\n this.set('comboTrees', comboTrees);\n // add combos\n self.addCombos(combos);\n }\n self.addItems(edges.map(function (edge) {\n return {\n type: 'edge',\n model: edge\n };\n }), false, false);\n var animate = self.get('animate');\n if (self.get('fitView') || self.get('fitCenter')) {\n self.set('animate', false);\n }\n // layout\n var layoutController = self.get('layoutController');\n if (layoutController) {\n layoutController.layout(success);\n if (this.destroyed) return;\n } else {\n success();\n }\n // 将在 onLayoutEnd 中被调用\n function success() {\n // 自底向上将 collapsed 的 combo 合起\n (self.get('comboTrees') || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var item = self.findById(child.id);\n if (item.getType() === 'combo' && child.collapsed) {\n self.collapseCombo(child.id, false);\n self.updateCombo(item);\n }\n return true;\n });\n });\n // fitView 与 fitCenter 共存时,fitView 优先,fitCenter 不再执行\n if (self.get('fitView')) {\n self.fitView();\n } else if (self.get('fitCenter')) {\n self.fitCenter();\n }\n self.autoPaint();\n self.emit('afterrender');\n if (self.get('fitView') || self.get('fitCenter')) {\n self.set('animate', animate);\n }\n setTimeout(function () {\n var _a;\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n combo.set('animate', true);\n });\n }, 0);\n }\n if (!this.get('groupByTypes')) {\n if (combos && combos.length !== 0) {\n this.sortCombos();\n } else {\n // 为提升性能,选择数量少的进行操作\n if (data.nodes && data.edges && data.nodes.length < data.edges.length) {\n var nodesArr = this.getNodes();\n // 遍历节点实例,将所有节点提前。\n nodesArr.forEach(function (node) {\n node.toFront();\n });\n } else {\n var edgesArr = this.getEdges();\n // 遍历节点实例,将所有节点提前。\n edgesArr.forEach(function (edge) {\n edge.toBack();\n });\n }\n }\n }\n };\n /**\n * 接收数据进行渲染\n * @Param {Object} data 初始化数据\n */\n AbstractGraph.prototype.read = function (data) {\n this.data(data);\n this.render();\n };\n // 比较item\n AbstractGraph.prototype.diffItems = function (type, items, models) {\n var self = this;\n var item;\n var itemMap = this.get('itemMap');\n each(models, function (model) {\n item = itemMap[model.id];\n if (item) {\n if (self.get('animate') && type === NODE) {\n var containerMatrix = item.getContainer().getMatrix();\n if (!containerMatrix) containerMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n item.set('originAttrs', {\n x: containerMatrix[6],\n y: containerMatrix[7]\n });\n }\n self.updateItem(item, model, false);\n } else {\n item = self.addItem(type, model, false);\n }\n if (item) items[\"\".concat(type, \"s\")].push(item);\n });\n };\n /**\n * 更改源数据,根据新数据重新渲染视图\n * @param {GraphData | TreeGraphData} data 源数据\n * @param {boolean} 是否入栈,默认为true\n * @return {object} this\n */\n AbstractGraph.prototype.changeData = function (propsData, stack) {\n var _this = this;\n var _a;\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var data = propsData || self.get('data');\n if (!dataValidation(data)) {\n return this;\n }\n this.emit('beforechangedata');\n if (stack && this.get('enabledStack')) {\n this.pushStack('changedata', {\n before: self.save(),\n after: data\n });\n }\n this.set('comboSorted', false);\n // 删除 hulls\n this.removeHulls();\n // 更改数据源后,取消所有状态\n this.getNodes().map(function (node) {\n return self.clearItemStates(node);\n });\n this.getEdges().map(function (edge) {\n return self.clearItemStates(edge);\n });\n var canvas = this.get('canvas');\n var localRefresh = canvas.get('localRefresh');\n canvas.set('localRefresh', false);\n if (!self.get('data')) {\n self.data(data);\n self.render();\n }\n var itemMap = this.get('itemMap');\n var items = {\n nodes: [],\n edges: []\n };\n var combosData = data.combos;\n if (combosData) {\n var comboTrees = plainCombosToTrees(combosData, data.nodes);\n this.set('comboTrees', comboTrees);\n } else {\n this.set('comboTrees', []);\n }\n this.diffItems('node', items, data.nodes);\n each(itemMap, function (item, id) {\n itemMap[id].getModel().depth = 0;\n if (item.getType && item.getType() === 'edge') return;\n if (item.getType && item.getType() === 'combo') {\n delete itemMap[id];\n item.destroy();\n } else if (items.nodes.indexOf(item) < 0) {\n delete itemMap[id];\n self.remove(item, false);\n }\n });\n // clear the destroyed combos here to avoid removing sub nodes before removing the parent combo\n var comboItems = this.getCombos();\n var combosLength = comboItems.length;\n for (var i = combosLength - 1; i >= 0; i--) {\n if (comboItems[i].destroyed) {\n comboItems.splice(i, 1);\n }\n }\n // process the data to tree structure\n if (combosData) {\n // add combos\n self.addCombos(combosData);\n if (!this.get('groupByTypes')) {\n this.sortCombos();\n }\n }\n this.diffItems('edge', items, data.edges);\n each(itemMap, function (item, id) {\n if (item.getType && (item.getType() === 'node' || item.getType() === 'combo')) return;\n if (items.edges.indexOf(item) < 0) {\n delete itemMap[id];\n self.remove(item, false);\n }\n });\n // 自底向上将 collapsed 的 combo 合起\n (this.get('comboTrees') || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var item = _this.findById(child.id);\n if (item.getType() === 'combo' && child.collapsed) {\n _this.collapseCombo(child.id, false);\n }\n return true;\n });\n });\n this.set({\n nodes: items.nodes,\n edges: items.edges\n });\n var _b = (this.get('layout') || {}).relayoutAtChangeData,\n relayoutAtChangeData = _b === void 0 ? true : _b;\n var layoutController = this.get('layoutController');\n if (relayoutAtChangeData && layoutController) {\n layoutController.changeData(function () {\n setTimeout(function () {\n var _a;\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n combo.set('animate', true);\n });\n }, 0);\n });\n if (self.get('animate') && !layoutController.getLayoutType()) {\n // 如果没有指定布局\n self.positionsAnimate();\n (_a = self.getCombos()) === null || _a === void 0 ? void 0 : _a.forEach(function (combo) {\n return combo.set('animate', true);\n });\n } else {\n self.autoPaint();\n }\n }\n setTimeout(function () {\n canvas.set('localRefresh', localRefresh);\n }, 16);\n this.set('data', data);\n this.emit('afterchangedata');\n return this;\n };\n /**\n * 私有方法,在 render 和 changeData 的时候批量添加数据中所有平铺的 combos\n * @param {ComboConfig[]} combos 平铺的 combos 数据\n */\n AbstractGraph.prototype.addCombos = function (combos) {\n var self = this;\n var comboTrees = self.get('comboTrees');\n var itemController = this.get('itemController');\n itemController.addCombos(comboTrees, combos);\n };\n /**\n * 根据已经存在的节点或 combo 创建新的 combo\n * @param combo combo ID 或 Combo 配置\n * @param childrenIds 添加到 Combo 中的元素,包括节点和 combo\n */\n AbstractGraph.prototype.createCombo = function (combo, childrenIds, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n var itemController = this.get('itemController');\n this.set('comboSorted', false);\n // step 1: 创建新的 Combo\n var comboId = '';\n var comboConfig;\n if (!combo) return;\n if (isString(combo)) {\n comboId = combo;\n comboConfig = {\n id: combo\n };\n } else {\n comboId = combo.id;\n if (!comboId) {\n console.warn('Create combo failed. Please assign a unique string id for the adding combo.');\n return;\n }\n comboConfig = combo;\n }\n var shouldStack = stack && this.get('enabledStack');\n // cache the children's old parent for stack\n var childrenParentCache = {\n nodes: [],\n combos: []\n };\n if (shouldStack) {\n childrenIds.forEach(function (childId) {\n var childItem = _this.findById(childId);\n var childType = childItem.getType();\n if (childType !== 'node' && childType !== 'combo') return;\n var childModel = childItem.getModel();\n childrenParentCache[\"\".concat(childType, \"s\")].push({\n id: childId,\n parentId: childType === 'node' ? childModel.comboId : childModel.parentId\n });\n });\n }\n // step 2: Pull children out of their parents\n var comboTrees = this.get('comboTrees');\n var childrenIdsSet = new Set(childrenIds);\n var pulledComboTreesById = new Map();\n if (comboTrees) {\n comboTrees.forEach(function (ctree) {\n traverseTreeUp(ctree, function (treeNode, parentTreeNode, index) {\n if (childrenIdsSet.has(treeNode.id)) {\n if (parentTreeNode) {\n var parentItem = _this.findById(parentTreeNode.id);\n var item = _this.findById(treeNode.id);\n // Removing current item from the tree during the traversal is ok because children traversal is done\n // in an *inverse order* - indices of the next-traversed items are not disturbed by the removal.\n parentTreeNode.children.splice(index, 1);\n parentItem.removeChild(item);\n // We have to update the parent node geometry since nodes were removed from them, _while they are still visible_\n // (combos may be moved inside the new combo and become hidden)\n itemController.updateCombo(parentItem, parentTreeNode.children);\n }\n if (treeNode.itemType === 'combo') {\n pulledComboTreesById.set(treeNode.id, treeNode);\n }\n }\n return true;\n });\n });\n comboTrees = comboTrees.filter(function (ctree) {\n return !childrenIdsSet.has(ctree.id);\n });\n this.set('comboTrees', comboTrees);\n }\n // step 3: 更新 children,根据类型添加 comboId 或 parentId\n var newChildrenParent = {\n nodes: [],\n combos: []\n };\n var trees = childrenIds.map(function (elementId) {\n var item = _this.findById(elementId);\n var model = item.getModel();\n var type = '';\n if (item.getType) type = item.getType();\n // Combos will be just moved around, so their children can be preserved\n var cItem = pulledComboTreesById.get(elementId) || {\n id: item.getID(),\n itemType: type\n };\n if (type === 'combo') {\n cItem.parentId = comboId;\n model.parentId = comboId;\n } else if (type === 'node') {\n cItem.comboId = comboId;\n model.comboId = comboId;\n }\n if (shouldStack) {\n newChildrenParent[\"\".concat(type, \"s\")].push({\n id: model.id,\n parentId: comboId\n });\n }\n return cItem;\n });\n comboConfig.children = trees;\n // step 4: 添加 Combo,addItem 时会将子将元素添加到 Combo 中\n this.addItem('combo', comboConfig, false);\n this.set('comboSorted', false);\n // step 5: 更新 comboTrees 结构\n if (comboTrees) {\n comboTrees.forEach(function (ctree) {\n traverseTree(ctree, function (treeNode) {\n // Set the children to the newly created combo\n if (treeNode.id === comboId) {\n treeNode.itemType = 'combo';\n treeNode.children = trees;\n return false;\n }\n return true;\n });\n });\n this.sortCombos();\n }\n if (shouldStack) {\n newChildrenParent.combos.push(comboConfig);\n this.pushStack('createCombo', {\n before: childrenParentCache,\n after: newChildrenParent\n });\n }\n // Fixes issue of nested child combos not being interactive (under parent on graph).\n var comboItem = this.findById(comboId);\n if (!comboItem.getModel().parentId && comboItem.getChildren().combos.length) {\n this.updateComboTree(comboItem, undefined, false);\n }\n setTimeout(function () {\n comboItem.set('animate', true);\n }, 0);\n };\n /**\n * 解散 combo\n * @param {String | INode | ICombo} combo 需要被解散的 Combo item 或 id\n */\n AbstractGraph.prototype.uncombo = function (combo, stack) {\n var _this = this;\n var _a, _b;\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var comboItem = combo;\n if (isString(combo)) {\n comboItem = this.findById(combo);\n }\n if (!comboItem || comboItem.getType && comboItem.getType() !== 'combo') {\n console.warn('The item is not a combo!');\n return;\n }\n var comboModel = comboItem.getModel();\n var parentId = comboItem.getModel().parentId;\n var comboTrees = self.get('comboTrees');\n if (!comboTrees) comboTrees = [];\n var itemMap = this.get('itemMap');\n var comboId = comboItem.get('id');\n var treeToBeUncombo;\n var brothers = [];\n var comboItems = this.get('combos');\n var parentItem = this.findById(parentId);\n var shouldStack = stack && this.get('enabledStack');\n var comboConfig = {};\n if (shouldStack) {\n comboConfig = clone(comboModel);\n comboConfig.children = [];\n }\n comboTrees.forEach(function (ctree) {\n if (treeToBeUncombo) return; // terminate the forEach\n traverseTreeUp(ctree, function (subtree) {\n var _a;\n // find the combo to be uncomboed, delete the combo from map and cache\n if (subtree.id === comboId) {\n treeToBeUncombo = subtree;\n // delete the related edges\n var edgeIds = comboItem.getEdges().map(function (edge) {\n return edge.getID();\n });\n edgeIds.forEach(function (edgeId) {\n _this.removeItem(edgeId, false);\n });\n var index = comboItems.indexOf(comboItem);\n comboItems.splice(index, 1);\n delete itemMap[comboId];\n var itemModel = clone(comboItem.getModel());\n comboItem.destroy();\n _this.emit('afterremoveitem', {\n item: itemModel,\n type: 'combo'\n });\n }\n // find the parent to remove the combo from the combo's brothers array and add the combo's children to the combo's brothers array in the tree\n if (parentId && treeToBeUncombo && subtree.id === parentId) {\n parentItem.removeCombo(comboItem);\n brothers = subtree.children; // the combo's brothers\n // remove the combo from its brothers array\n var index = brothers.indexOf(treeToBeUncombo);\n if (index !== -1) {\n brothers.splice(index, 1);\n }\n // append the combo's children to the combo's brothers array\n (_a = treeToBeUncombo.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n var item = _this.findById(child.id);\n var childModel = item.getModel();\n if (item.getType && item.getType() === 'combo') {\n child.parentId = parentId;\n delete child.comboId;\n childModel.parentId = parentId; // update the parentId of the model\n delete childModel.comboId;\n } else if (item.getType && item.getType() === 'node') {\n child.comboId = parentId;\n childModel.comboId = parentId; // update the parentId of the model\n }\n\n parentItem.addChild(item);\n brothers.push(child);\n });\n _this.updateCombo(parentItem);\n return false;\n }\n return true;\n });\n });\n // if the parentId is not found, remove the combo from the roots\n if (!parentId && treeToBeUncombo) {\n var index = comboTrees.indexOf(treeToBeUncombo);\n comboTrees.splice(index, 1);\n // modify the parentId of the children\n (_a = treeToBeUncombo.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n child.parentId = undefined;\n var childModel = _this.findById(child.id).getModel();\n delete childModel.parentId; // update the parentId of the model\n delete childModel.comboId; // update the comboId of the model\n if (child.itemType !== 'node') comboTrees.push(child);\n });\n }\n if (shouldStack) {\n // cache the children's old parent and combo model for stack\n var childrenParentCache_1 = {\n nodes: [],\n combos: []\n };\n var childNewParent_1 = {\n nodes: [],\n combos: []\n };\n (_b = treeToBeUncombo.children) === null || _b === void 0 ? void 0 : _b.forEach(function (child) {\n var childItem = _this.findById(child.id);\n var childType = childItem.getType();\n if (childType !== 'node' && childType !== 'combo') return;\n childrenParentCache_1[\"\".concat(childType, \"s\")].push({\n id: child.id,\n parentId: comboId\n });\n childNewParent_1[\"\".concat(childType, \"s\")].push({\n id: child.id,\n parentId: parentId\n });\n });\n childrenParentCache_1.combos.push(comboConfig);\n this.pushStack('uncombo', {\n before: childrenParentCache_1,\n after: childNewParent_1\n });\n }\n };\n /**\n * 根据 combo 位置更新内部节点位置 followCombo = true\n * 或根据内部元素的 bbox 更新所有 combos 的绘制,包括 combos 的位置和范围,followCombo = false\n */\n AbstractGraph.prototype.updateCombos = function (followCombo) {\n var _this = this;\n if (followCombo === void 0) {\n followCombo = false;\n }\n var self = this;\n var comboTrees = this.get('comboTrees');\n var itemController = self.get('itemController');\n var itemMap = self.get('itemMap');\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n var _a;\n if (!child) {\n return true;\n }\n var childItem = itemMap[child.id];\n if (((_a = childItem === null || childItem === void 0 ? void 0 : childItem.getType) === null || _a === void 0 ? void 0 : _a.call(childItem)) === 'combo') {\n // 更新具体的 Combo 之前先清除所有的已有状态,以免将 state 中的样式更新为 Combo 的样式\n var states = __spreadArray([], childItem.getStates(), true);\n each(states, function (state) {\n return _this.setItemState(childItem, state, false);\n });\n // 更新具体的 Combo\n itemController.updateCombo(childItem, child.children, followCombo);\n // 更新 Combo 后,还原已有的状态\n each(states, function (state) {\n return _this.setItemState(childItem, state, true);\n });\n }\n return true;\n });\n });\n self.sortCombos();\n };\n /**\n * 根据节点的 bbox 更新 combo 及其祖先 combos 的绘制,包括 combos 的位置和范围\n * @param {String | ICombo} combo 需要被更新的 Combo 或 id,若指定,则该 Combo 及所有祖先 Combod 都会被更新\n */\n AbstractGraph.prototype.updateCombo = function (combo) {\n var _this = this;\n var self = this;\n var comboItem = combo;\n var comboId;\n if (isString(combo)) {\n comboItem = this.findById(combo);\n }\n if (!comboItem || comboItem.getType && comboItem.getType() !== 'combo') {\n console.warn('The item to be updated is not a combo!');\n return;\n }\n comboId = comboItem.get('id');\n var comboTrees = this.get('comboTrees');\n var itemController = self.get('itemController');\n var itemMap = self.get('itemMap');\n (comboTrees || []).forEach(function (ctree) {\n traverseTreeUp(ctree, function (child) {\n if (!child) {\n return true;\n }\n var childItem = itemMap[child.id];\n if (comboId === child.id && childItem && childItem.getType && childItem.getType() === 'combo') {\n // 更新具体的 Combo 之前先清除所有的已有状态,以免将 state 中的样式更新为 Combo 的样式\n var states = __spreadArray([], childItem.getStates(), true);\n // || !item.getStateStyle(stateName)\n each(states, function (state) {\n if (childItem.getStateStyle(state)) {\n _this.setItemState(childItem, state, false);\n }\n });\n // 更新具体的 Combo\n itemController.updateCombo(childItem, child.children);\n // 更新 Combo 后,还原已有的状态\n each(states, function (state) {\n if (childItem.getStateStyle(state)) {\n _this.setItemState(childItem, state, true);\n }\n });\n if (comboId) comboId = child.parentId;\n }\n return true;\n });\n });\n };\n /**\n * 更新树结构,例如移动子树等\n * @param {String | INode | ICombo} item 需要被更新的 Combo 或 节点 id\n * @param {string | undefined} parentId 新的父 combo id,undefined 代表没有父 combo\n */\n AbstractGraph.prototype.updateComboTree = function (item, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n this.set('comboSorted', false);\n var uItem;\n if (isString(item)) {\n uItem = self.findById(item);\n } else {\n uItem = item;\n }\n var model = uItem.getModel();\n var oldParentId = model.comboId || model.parentId;\n var type = '';\n if (uItem.getType) type = uItem.getType();\n // 若 item 是 Combo,且 parentId 是其子孙 combo 的 id,则警告并终止\n if (parentId && type === 'combo') {\n var comboTrees = this.get('comboTrees');\n var valid_1 = true;\n var itemSubTree_1;\n (comboTrees || []).forEach(function (ctree) {\n if (itemSubTree_1) return;\n traverseTree(ctree, function (subTree) {\n if (itemSubTree_1) return;\n // 找到从 item 开始的子树\n if (subTree.id === uItem.getID()) {\n itemSubTree_1 = subTree;\n }\n return true;\n });\n });\n // 在以 item 为根的子树中寻找与 parentId 相同的后继元素\n traverseTree(itemSubTree_1, function (subTree) {\n if (subTree.id === parentId) {\n valid_1 = false;\n return false;\n }\n return true;\n });\n // parentId 是 item 的一个后继元素,不能进行更新\n if (!valid_1) {\n console.warn('Failed to update the combo tree! The parentId points to a descendant of the combo!');\n return;\n }\n }\n if (stack && this.get('enabledStack')) {\n var beforeData = {},\n afterData = {};\n if (type === 'combo') {\n beforeData.combos = [{\n id: model.id,\n parentId: model.parentId\n }];\n afterData.combos = [{\n id: model.id,\n parentId: parentId\n }];\n } else if (type === 'node') {\n beforeData.nodes = [{\n id: model.id,\n parentId: model.comboId\n }];\n afterData.nodes = [{\n id: model.id,\n parentId: parentId\n }];\n }\n this.pushStack('updateComboTree', {\n before: beforeData,\n after: afterData\n });\n }\n // 当 combo 存在 parentId 或 comboId 时,才将其移除\n if (model.parentId || model.comboId) {\n var combo = this.findById(model.parentId || model.comboId);\n if (combo) {\n combo.removeChild(uItem);\n }\n }\n if (type === 'combo') {\n model.parentId = parentId;\n } else if (type === 'node') {\n model.comboId = parentId;\n }\n // 只有当移入到指定 combo 时才添加\n if (parentId) {\n var parentCombo = this.findById(parentId);\n if (parentCombo) {\n // 将元素添加到 parentCombo 中\n parentCombo.addChild(uItem);\n }\n }\n // 如果原先有父亲 combo,则从原父 combo 的子元素数组中删除\n if (oldParentId) {\n var parentCombo = this.findById(oldParentId);\n if (parentCombo) {\n // 将元素从 parentCombo 中移除\n parentCombo.removeChild(uItem);\n }\n }\n var newComboTrees = reconstructTree(this.get('comboTrees'), model.id, parentId);\n this.set('comboTrees', newComboTrees);\n this.updateCombos();\n };\n /**\n * 导出图数据\n * @return {object} data\n */\n AbstractGraph.prototype.save = function () {\n var nodes = [];\n var edges = [];\n var combos = [];\n each(this.get('nodes'), function (node) {\n nodes.push(node.getModel());\n });\n each(this.get('edges'), function (edge) {\n edges.push(edge.getModel());\n });\n each(this.get('combos'), function (combo) {\n combos.push(combo.getModel());\n });\n return {\n nodes: nodes,\n edges: edges,\n combos: combos\n };\n };\n /**\n * 改变画布大小\n * @param {number} width 画布宽度\n * @param {number} height 画布高度\n * @return {object} this\n */\n AbstractGraph.prototype.changeSize = function (width, height) {\n var viewController = this.get('viewController');\n viewController.changeSize(width, height);\n return this;\n };\n /**\n * 当源数据在外部发生变更时,根据新数据刷新视图。但是不刷新节点位置\n */\n AbstractGraph.prototype.refresh = function () {\n var self = this;\n self.emit('beforegraphrefresh');\n if (self.get('animate')) {\n self.positionsAnimate();\n } else {\n var nodes = self.get('nodes');\n var edges = self.get('edges');\n var vedges = self.get('edges');\n each(nodes, function (node) {\n node.refresh();\n });\n each(edges, function (edge) {\n edge.refresh();\n });\n each(vedges, function (vedge) {\n vedge.refresh();\n });\n }\n self.emit('aftergraphrefresh');\n self.autoPaint();\n };\n /**\n * 获取当前图中所有节点的item实例\n * @return {INode} item数组\n */\n AbstractGraph.prototype.getNodes = function () {\n return this.get('nodes');\n };\n /**\n * 获取当前图中所有边的item实例\n * @return {IEdge} item数组\n */\n AbstractGraph.prototype.getEdges = function () {\n return this.get('edges');\n };\n /**\n * 获取图中所有的 combo 实例\n */\n AbstractGraph.prototype.getCombos = function () {\n return this.get('combos');\n };\n /**\n * 获取指定 Combo 中所有的节点\n * @param comboId combo ID\n */\n AbstractGraph.prototype.getComboChildren = function (combo) {\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') {\n console.warn('The combo does not exist!');\n return;\n }\n return combo.getChildren();\n };\n /**\n * 根据 graph 上的 animateCfg 进行视图中节点位置动画接口\n */\n AbstractGraph.prototype.positionsAnimate = function (referComboModel) {\n var self = this;\n self.emit('beforeanimate');\n var animateCfg = self.get('animateCfg');\n var onFrame = animateCfg.onFrame;\n var nodes = referComboModel ? self.getNodes().concat(self.getCombos()) : self.getNodes();\n var toNodes = nodes.map(function (node) {\n var model = node.getModel();\n return {\n id: model.id,\n x: model.x,\n y: model.y\n };\n });\n self.stopAnimate();\n var canvas = self.get('canvas');\n self.animating = true;\n setTimeout(function () {\n canvas.animate(function (ratio) {\n each(toNodes, function (data) {\n var node = self.findById(data.id);\n if (!node || node.destroyed) {\n return;\n }\n var originAttrs = node.get('originAttrs');\n var model = node.get('model');\n var containerMatrix = node.getContainer().getMatrix();\n if (originAttrs === undefined || originAttrs === null) {\n // 变换前存在位置,设置到 originAttrs 上。否则标记 0 表示变换前不存在位置,不需要计算动画\n if (containerMatrix) {\n originAttrs = {\n x: containerMatrix[6],\n y: containerMatrix[7]\n };\n }\n node.set('originAttrs', originAttrs || 0);\n }\n if (onFrame) {\n var attrs = onFrame(node, ratio, data, originAttrs || {\n x: 0,\n y: 0\n });\n node.set('model', Object.assign(model, attrs));\n } else if (originAttrs) {\n // 变换前存在位置,进行动画\n model.x = originAttrs.x + (data.x - originAttrs.x) * ratio;\n model.y = originAttrs.y + (data.y - originAttrs.y) * ratio;\n } else {\n // 若在变换前不存在位置信息,则直接放到最终位置上\n model.x = data.x;\n model.y = data.y;\n }\n });\n self.refreshPositions(referComboModel);\n }, {\n duration: animateCfg.duration,\n easing: animateCfg.easing,\n callback: function callback() {\n each(nodes, function (node) {\n node.set('originAttrs', null);\n });\n if (animateCfg.callback) {\n animateCfg.callback();\n }\n self.emit('afteranimate');\n self.animating = false;\n }\n });\n }, 0);\n };\n /**\n * 当节点位置在外部发生改变时,刷新所有节点位置,重计算边\n */\n AbstractGraph.prototype.refreshPositions = function (referComboModel) {\n var self = this;\n self.emit('beforegraphrefreshposition');\n var nodes = self.get('nodes');\n var edges = self.get('edges');\n var vedges = self.get('vedges');\n var combos = self.get('combos');\n var model;\n var updatedNodes = {};\n var updateItems = function updateItems(items) {\n each(items, function (item) {\n model = item.getModel();\n var originAttrs = item.get('originAttrs');\n if (originAttrs && model.x === originAttrs.x && model.y === originAttrs.y) {\n return;\n }\n var changed = item.updatePosition({\n x: model.x,\n y: model.y\n });\n updatedNodes[model.id] = changed;\n if (model.comboId) updatedNodes[model.comboId] = updatedNodes[model.comboId] || changed;\n if (model.parentId) updatedNodes[model.parentId] = updatedNodes[model.parentId] || changed;\n });\n };\n updateItems(combos);\n updateItems(nodes);\n if (combos && combos.length !== 0) {\n if (referComboModel) {\n updateItems(combos);\n self.updateCombos();\n } else {\n self.updateCombos();\n }\n }\n each(edges, function (edge) {\n var sourceModel = edge.getSource().getModel();\n var target = edge.getTarget();\n // 避免 target 是纯对象的情况下调用 getModel 方法\n // 拖动生成边的时候 target 会是纯对象\n if (!isPlainObject(target)) {\n var targetModel = target.getModel();\n if (updatedNodes[sourceModel.id] || updatedNodes[targetModel.id] || edge.getModel().isComboEdge) {\n edge.refresh();\n }\n }\n });\n each(vedges, function (vedge) {\n vedge.refresh();\n });\n self.emit('aftergraphrefreshposition');\n self.autoPaint();\n };\n AbstractGraph.prototype.stopAnimate = function () {\n var canvas = this.get('canvas');\n var timeline = canvas.cfg.timeline;\n if (timeline) {\n timeline.stopAllAnimations();\n }\n };\n AbstractGraph.prototype.isAnimating = function () {\n return this.animating;\n };\n /**\n * 获取当前视口伸缩比例\n * @return {number} 比例\n */\n AbstractGraph.prototype.getZoom = function () {\n var matrix = this.get('group').getMatrix();\n return matrix ? matrix[0] : 1;\n };\n /**\n * 获取当前的行为模式\n * @return {string} 当前行为模式\n */\n AbstractGraph.prototype.getCurrentMode = function () {\n var modeController = this.get('modeController');\n return modeController.getMode();\n };\n /**\n * 切换行为模式\n * @param {string} mode 指定模式\n * @return {object} this\n */\n AbstractGraph.prototype.setMode = function (mode) {\n var modeController = this.get('modeController');\n modeController.setMode(mode);\n return this;\n };\n /**\n * 清除画布元素\n * @return {object} this\n */\n AbstractGraph.prototype.clear = function (avoidEmit) {\n var _a;\n if (avoidEmit === void 0) {\n avoidEmit = false;\n }\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.clear();\n this.initGroups();\n // 清空画布时同时清除数据\n this.set({\n itemMap: {},\n nodes: [],\n edges: [],\n vedges: [],\n groups: [],\n combos: [],\n comboTrees: []\n });\n if (!avoidEmit) this.emit('afterrender');\n return this;\n };\n /**\n * 更换布局配置项\n * @param {object} cfg 新布局配置项\n * @param {'center' | 'begin'} align 对齐方式,可选中心(center)对齐到对齐点,或左上角(begin)对齐到对齐点\n * @param {IPoint} alignPoint 画布上的对齐点,为 Canvas 坐标系(Canvas DOM)\n * 若 cfg 含有 type 字段或为 String 类型,且与现有布局方法不同,则更换布局\n * 若 cfg 不包括 type ,则保持原有布局方法,仅更新布局配置项\n */\n AbstractGraph.prototype.updateLayout = function (cfg, align, alignPoint, stack) {\n var _this = this;\n if (cfg === void 0) {\n cfg = {};\n }\n if (stack === void 0) {\n stack = true;\n }\n var layoutController = this.get('layoutController');\n if (isString(cfg)) {\n cfg = {\n type: cfg\n };\n }\n // align the graph after layout\n if (align) {\n var toPoint_1 = alignPoint;\n if (!toPoint_1) {\n if (align === 'begin') toPoint_1 = {\n x: 0,\n y: 0\n };else toPoint_1 = {\n x: this.getWidth() / 2,\n y: this.getHeight() / 2\n };\n }\n // translate to point coordinate system\n toPoint_1 = this.getPointByCanvas(toPoint_1.x, toPoint_1.y);\n var forceTypes = ['force', 'gForce', 'fruchterman', 'force2'];\n // if it is force layout, only center takes effect, and assign center force\n if (forceTypes.includes(cfg.type) || !cfg.type && forceTypes.includes(layoutController === null || layoutController === void 0 ? void 0 : layoutController.layoutType)) {\n cfg.center = [toPoint_1.x, toPoint_1.y];\n } else {\n this.once('afterlayout', function (e) {\n var matrix = _this.getGroup().getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n toPoint_1.x = toPoint_1.x * matrix[0] + matrix[6];\n toPoint_1.y = toPoint_1.y * matrix[0] + matrix[7];\n var _a = _this.getGroup().getCanvasBBox(),\n minX = _a.minX,\n maxX = _a.maxX,\n minY = _a.minY,\n maxY = _a.maxY;\n var bboxPoint = {\n x: (minX + maxX) / 2,\n y: (minY + maxY) / 2\n };\n if (align === 'begin') {\n bboxPoint.x = minX;\n bboxPoint.y = minY;\n }\n _this.translate(toPoint_1.x - bboxPoint.x, toPoint_1.y - bboxPoint.y);\n });\n }\n }\n var oriLayoutCfg = __assign({}, this.get('layout'));\n var layoutCfg = {};\n Object.assign(layoutCfg, oriLayoutCfg, cfg);\n if (cfg.pipes && !cfg.type) delete layoutCfg.type;else if (!cfg.pipes && layoutCfg.type) delete layoutCfg.pipes;\n this.set('layout', layoutCfg);\n if (!layoutController) return;\n if (layoutController.isLayoutTypeSame(layoutCfg) && layoutCfg.gpuEnabled === oriLayoutCfg.gpuEnabled) {\n // no type or same type, or switch the gpu and cpu, update layout\n layoutController.updateLayoutCfg(layoutCfg);\n } else {\n // has different type, change layout\n layoutController.changeLayout(layoutCfg);\n }\n if (stack && this.get('enabledStack')) {\n this.pushStack('layout', {\n before: oriLayoutCfg,\n after: layoutCfg\n });\n }\n };\n /**\n * 销毁布局,changeData 时不会再使用原来的布局方法对新数据进行布局\n */\n AbstractGraph.prototype.destroyLayout = function () {\n var layoutController = this.get('layoutController');\n layoutController === null || layoutController === void 0 ? void 0 : layoutController.destroyLayout();\n };\n /**\n * 重新以当前示例中配置的属性进行一次布局\n */\n AbstractGraph.prototype.layout = function () {\n var _a;\n var layoutController = this.get('layoutController');\n var layoutCfg = this.get('layout');\n if (!layoutCfg || !layoutController) return;\n if (layoutCfg.workerEnabled) {\n // 如果使用web worker布局\n layoutController.layout();\n return;\n }\n if ((_a = layoutController.layoutMethods) === null || _a === void 0 ? void 0 : _a.length) {\n layoutController.relayout(true);\n } else {\n layoutController.layout();\n }\n };\n /**\n * 收起指定的 combo\n * @param {string | ICombo} combo combo ID 或 combo item\n */\n AbstractGraph.prototype.collapseCombo = function (combo, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n if (this.destroyed) return;\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo) {\n console.warn('The combo to be collapsed does not exist!');\n return;\n }\n this.emit('beforecollapseexpandcombo', {\n action: 'collapse',\n item: combo\n });\n var comboModel = combo.getModel();\n var itemController = this.get('itemController');\n itemController.collapseCombo(combo, stack);\n comboModel.collapsed = true;\n // add virtual edges\n var edges = this.getEdges().concat(this.get('vedges'));\n // find all the descendant nodes and combos\n var cNodesCombos = [];\n var comboTrees = this.get('comboTrees');\n var found = false;\n (comboTrees || []).forEach(function (ctree) {\n if (found) return; // if the combo is found, terminate the forEach\n traverseTree(ctree, function (subTree) {\n // if the combo is found and it is traversing the other branches, terminate\n if (found && subTree.depth <= comboModel.depth) return false;\n // if the combo is found\n if (comboModel.id === subTree.id) found = true;\n if (found) {\n // if the combo is found, concat the descendant nodes and combos\n var item = _this.findById(subTree.id);\n if (item && item.getType && item.getType() === 'combo') {\n cNodesCombos = cNodesCombos.concat(item.getNodes());\n cNodesCombos = cNodesCombos.concat(item.getCombos());\n }\n }\n return true;\n });\n });\n var addedVEdgeMap = {};\n edges.forEach(function (edge) {\n var _a = edge.getModel(),\n isVEdge = _a.isVEdge,\n _b = _a.size,\n size = _b === void 0 ? 1 : _b;\n if (edge.isVisible() && !isVEdge) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n var otherEnd = null;\n var otherEndIsSource;\n if (source.getModel().id === comboModel.id || cNodesCombos.includes(source) && !cNodesCombos.includes(target)) {\n // source is the current combo, or descent node/combo is the source but not the target)\n otherEnd = target;\n otherEndIsSource = false;\n } else if (target.getModel().id === comboModel.id || !cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // target is the current combo, or descent node/combo is the target but not the source)\n otherEnd = source;\n otherEndIsSource = true;\n }\n if (otherEnd) {\n if (isVEdge) {\n _this.removeItem(edge, false);\n return;\n }\n var otherEndModel = otherEnd.getModel();\n while (!otherEnd.isVisible()) {\n var otherEndPId = otherEndModel.parentId,\n otherEndCId = otherEndModel.comboId;\n var otherEndParentId = otherEndPId || otherEndCId;\n otherEnd = _this.findById(otherEndParentId);\n if (!otherEnd || !otherEndParentId) return; // all the ancestors are hidden, then ignore the edge\n otherEndModel = otherEnd.getModel();\n }\n var otherEndId = otherEndModel.id;\n var vEdgeInfo = otherEndIsSource ? {\n source: otherEndId,\n target: comboModel.id,\n size: size,\n isVEdge: true\n } : {\n source: comboModel.id,\n target: otherEndId,\n size: size,\n isVEdge: true\n };\n var key = \"\".concat(vEdgeInfo.source, \"-\").concat(vEdgeInfo.target);\n if (addedVEdgeMap[key]) {\n addedVEdgeMap[key].size += size;\n return;\n }\n addedVEdgeMap[key] = vEdgeInfo;\n }\n });\n // update the width of the virtual edges, which is the sum of merged actual edges\n // be attention that the actual edges with same endpoints but different directions will be represented by two different virtual edges\n this.addItems(Object.values(addedVEdgeMap).map(function (edgeInfo) {\n return {\n type: 'vedge',\n model: edgeInfo\n };\n }), false);\n this.emit('aftercollapseexpandcombo', {\n action: 'collapse',\n item: combo\n });\n };\n /**\n * 展开指定的 combo\n * @param {string | ICombo} combo combo ID 或 combo item\n */\n AbstractGraph.prototype.expandCombo = function (combo, stack) {\n var _this = this;\n if (stack === void 0) {\n stack = true;\n }\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') {\n console.warn('The combo to be collapsed does not exist!');\n return;\n }\n this.emit('beforecollapseexpandcombo', {\n action: 'expand',\n item: combo\n });\n var comboModel = combo.getModel();\n var itemController = this.get('itemController');\n itemController.expandCombo(combo, stack);\n comboModel.collapsed = false;\n // add virtual edges\n var edges = this.getEdges().concat(this.get('vedges'));\n // find all the descendant nodes and combos\n var cNodesCombos = [];\n var comboTrees = this.get('comboTrees');\n var found = false;\n (comboTrees || []).forEach(function (ctree) {\n if (found) return; // if the combo is found, terminate\n traverseTree(ctree, function (subTree) {\n // if the combo is found and it is traversing the other branches, terminate\n if (found && subTree.depth <= comboModel.depth) return false;\n if (comboModel.id === subTree.id) found = true;\n if (found) {\n var item = _this.findById(subTree.id);\n if (item && item.getType && item.getType() === 'combo') {\n cNodesCombos = cNodesCombos.concat(item.getNodes());\n cNodesCombos = cNodesCombos.concat(item.getCombos());\n }\n }\n return true;\n });\n });\n var addedVEdgeMap = {};\n edges.forEach(function (edge) {\n if (edge.isVisible() && !edge.getModel().isVEdge) return;\n var source = edge.getSource();\n var target = edge.getTarget();\n var sourceId = source.get('id');\n var targetId = target.get('id');\n var otherEnd = null;\n var otherEndIsSource;\n if (sourceId === comboModel.id || cNodesCombos.includes(source) && !cNodesCombos.includes(target)) {\n // the source is in the combo, the target is not\n otherEnd = target;\n otherEndIsSource = false;\n } else if (targetId === comboModel.id || !cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // the target is in the combo, the source is not\n otherEnd = source;\n otherEndIsSource = true;\n } else if (cNodesCombos.includes(source) && cNodesCombos.includes(target)) {\n // both source and target are in the combo, if the target and source are both visible, show the edge\n if (source.isVisible() && target.isVisible()) {\n edge.show();\n }\n }\n if (otherEnd) {\n var _a = edge.getModel(),\n isVEdge = _a.isVEdge,\n _b = _a.size,\n size = _b === void 0 ? 1 : _b;\n // ignore the virtual edges\n if (isVEdge) {\n _this.removeItem(edge, false);\n return;\n }\n var otherEndModel = otherEnd.getModel();\n // find the nearest visible ancestor\n while (!otherEnd.isVisible()) {\n var otherEndPId = otherEndModel.parentId,\n otherEndCId = otherEndModel.comboId;\n var otherEndParentId = otherEndPId || otherEndCId;\n otherEnd = _this.findById(otherEndParentId);\n if (!otherEnd || !otherEndParentId) {\n return; // if all the ancestors of the oppsite are all hidden, ignore the edge\n }\n\n otherEndModel = otherEnd.getModel();\n }\n var otherEndId = otherEndModel.id;\n var selfEnd = otherEndIsSource ? target : source;\n var selfEndModel = selfEnd.getModel();\n // find the nearest visible ancestor\n while (!selfEnd.isVisible()) {\n var selfEndPId = selfEndModel.parentId,\n selfEndCId = selfEndModel.comboId;\n var selfEndParentId = selfEndPId || selfEndCId;\n selfEnd = _this.findById(selfEndParentId);\n if (!selfEnd || !selfEndParentId) {\n return; // if all the ancestors of the oppsite are all hidden, ignore the edge\n }\n\n if (selfEndModel.comboId === comboModel.id || selfEndModel.parentId === comboModel.id) {\n break; // if the next ancestor is the combo, break the while\n }\n\n selfEndModel = selfEnd.getModel();\n }\n var selfEndId = selfEndModel.id;\n if (otherEndId) {\n var vEdgeInfo = otherEndIsSource ? {\n source: otherEndId,\n target: selfEndId,\n isVEdge: true,\n size: size\n } : {\n source: selfEndId,\n target: otherEndId,\n isVEdge: true,\n size: size\n };\n var vedgeId = \"\".concat(vEdgeInfo.source, \"-\").concat(vEdgeInfo.target);\n // update the width of the virtual edges, which is the sum of merged actual edges\n // be attention that the actual edges with same endpoints but different directions will be represented by two different virtual edges\n if (addedVEdgeMap[vedgeId]) {\n addedVEdgeMap[vedgeId].size += size;\n return;\n }\n addedVEdgeMap[vedgeId] = vEdgeInfo;\n }\n }\n });\n this.addItems(Object.values(addedVEdgeMap).map(function (edgeInfo) {\n return {\n type: 'vedge',\n model: edgeInfo\n };\n }), false);\n this.emit('aftercollapseexpandcombo', {\n action: 'expand',\n item: combo\n });\n };\n AbstractGraph.prototype.collapseExpandCombo = function (combo, stack) {\n if (stack === void 0) {\n stack = true;\n }\n if (isString(combo)) {\n combo = this.findById(combo);\n }\n if (!combo || combo.getType && combo.getType() !== 'combo') return;\n var comboModel = combo.getModel();\n // if one ancestor combo of the combo is collapsed, it should not be collapsed or expanded\n var parentItem = this.findById(comboModel.parentId);\n while (parentItem) {\n var parentModel = parentItem.getModel();\n if (parentModel.collapsed) {\n console.warn(\"Fail to expand the combo since it's ancestor combo is collapsed.\");\n parentItem = undefined;\n return;\n }\n parentItem = this.findById(parentModel.parentId);\n }\n var collapsed = comboModel.collapsed;\n // 该群组已经处于收起状态,需要展开\n if (collapsed) {\n this.expandCombo(combo, stack);\n } else {\n this.collapseCombo(combo, stack);\n }\n this.updateCombo(combo);\n };\n /**\n * 获取节点所有的邻居节点\n *\n * @param {(string | INode)} node 节点 ID 或实例\n * @returns {INode[]}\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getNeighbors = function (node, type) {\n var item = node;\n if (isString(node)) {\n item = this.findById(node);\n }\n return item.getNeighbors(type);\n };\n /**\n * 获取 node 的度数\n *\n * @param {(string | INode)} node 节点 ID 或实例\n * @param {('in' | 'out' | 'total' | 'all' | undefined)} 度数类型,in 入度,out 出度,total 总度数,all 返回三种类型度数的对象\n * @returns {Number | Object} 该节点的度数\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getNodeDegree = function (node, type, refresh) {\n if (type === void 0) {\n type = undefined;\n }\n if (refresh === void 0) {\n refresh = false;\n }\n var item = node;\n if (isString(node)) {\n item = this.findById(node);\n }\n var degrees = this.get('degrees');\n if (!degrees || refresh) {\n degrees = getDegree(this.save());\n this.set('degrees', degrees);\n }\n var nodeDegrees = degrees[item.getID()];\n var res = 0;\n // 如果是通过 addItem 后面新增加的节点,此时它的所有度数都为 0\n if (!nodeDegrees) {\n return 0;\n }\n switch (type) {\n case 'in':\n res = nodeDegrees.inDegree;\n break;\n case 'out':\n res = nodeDegrees.outDegree;\n break;\n case 'all':\n res = nodeDegrees;\n break;\n default:\n res = nodeDegrees.degree;\n break;\n }\n return res;\n };\n AbstractGraph.prototype.getUndoStack = function () {\n return this.undoStack;\n };\n AbstractGraph.prototype.getRedoStack = function () {\n return this.redoStack;\n };\n /**\n * 获取 undo 和 redo 栈的数据\n */\n AbstractGraph.prototype.getStackData = function () {\n if (!this.get('enabledStack')) {\n return null;\n }\n return {\n undoStack: this.undoStack.toArray(),\n redoStack: this.redoStack.toArray()\n };\n };\n /**\n * 清空 undo stack & redo stack\n */\n AbstractGraph.prototype.clearStack = function () {\n if (this.get('enabledStack')) {\n this.undoStack.clear();\n this.redoStack.clear();\n this.emit('stackchange', {\n undoStack: this.undoStack,\n redoStack: this.redoStack\n });\n }\n };\n /**\n * 将操作类型和操作数据入栈\n * @param action 操作类型\n * @param data 入栈的数据\n * @param stackType 栈的类型\n */\n AbstractGraph.prototype.pushStack = function (action, data, stackType) {\n if (action === void 0) {\n action = 'update';\n }\n if (stackType === void 0) {\n stackType = 'undo';\n }\n if (!this.get('enabledStack')) {\n console.warn('请先启用 undo & redo 功能,在实例化 Graph 时候配置 enabledStack: true !');\n return;\n }\n var stackData = data ? clone(data) : {\n before: {},\n after: clone(this.save())\n };\n if (stackType === 'redo') {\n this.redoStack.push({\n action: action,\n data: stackData\n });\n } else {\n this.undoStack.push({\n action: action,\n data: stackData\n });\n }\n this.emit('stackchange', {\n action: action,\n stackType: stackType,\n undoStack: this.undoStack,\n redoStack: this.redoStack\n });\n };\n /**\n * 获取邻接矩阵\n *\n * @param {boolean} cache 是否使用缓存的\n * @param {boolean} directed 是否是有向图,默认取 graph.directed\n * @returns {Matrix} 邻接矩阵\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getAdjMatrix = function (cache, directed) {\n if (cache === void 0) {\n cache = true;\n }\n if (directed === undefined) directed = this.get('directed');\n var currentAdjMatrix = this.get('adjMatrix');\n if (!currentAdjMatrix || !cache) {\n currentAdjMatrix = getAdjacentMatrix(this.save(), directed);\n this.set('adjMatrix', currentAdjMatrix);\n }\n return currentAdjMatrix;\n };\n /**\n * 获取最短路径矩阵\n *\n * @param {boolean} cache 是否使用缓存的\n * @param {boolean} directed 是否是有向图,默认取 graph.directed\n * @returns {Matrix} 最短路径矩阵\n * @memberof IAbstractGraph\n */\n AbstractGraph.prototype.getShortestPathMatrix = function (cache, directed) {\n if (cache === void 0) {\n cache = true;\n }\n if (directed === undefined) directed = this.get('directed');\n var currentAdjMatrix = this.get('adjMatrix');\n var currentShourtestPathMatrix = this.get('shortestPathMatrix');\n if (!currentAdjMatrix || !cache) {\n currentAdjMatrix = getAdjacentMatrix(this.save(), directed);\n this.set('adjMatrix', currentAdjMatrix);\n }\n if (!currentShourtestPathMatrix || !cache) {\n currentShourtestPathMatrix = floydWarshall(this.save(), directed);\n this.set('shortestPathMatrix', currentShourtestPathMatrix);\n }\n return currentShourtestPathMatrix;\n };\n /**\n * 重新定义监听函数,复写参数类型\n */\n AbstractGraph.prototype.on = function (eventName, callback, once) {\n return _super.prototype.on.call(this, eventName, callback, once);\n };\n /**\n * 销毁画布\n */\n AbstractGraph.prototype.destroy = function () {\n var _a, _b, _c, _d, _e;\n this.emit('beforedestroy');\n this.clear();\n // 清空栈数据\n this.clearStack();\n (_a = this.get('itemController')) === null || _a === void 0 ? void 0 : _a.destroy();\n (_b = this.get('modeController')) === null || _b === void 0 ? void 0 : _b.destroy();\n (_c = this.get('viewController')) === null || _c === void 0 ? void 0 : _c.destroy();\n (_d = this.get('stateController')) === null || _d === void 0 ? void 0 : _d.destroy();\n (_e = this.get('canvas')) === null || _e === void 0 ? void 0 : _e.destroy();\n this.cfg = null;\n this.destroyed = true;\n this.redoStack = null;\n this.undoStack = null;\n this.emit('afterdestroy');\n };\n /**\n * 创建凸包或凹包轮廓\n * @param cfg HullCfg 轮廓配置项\n */\n AbstractGraph.prototype.createHull = function (cfg) {\n if (!cfg.members || cfg.members.length < 1) {\n console.warn('Create hull failed! The members is empty.');\n return;\n }\n var parent = this.get('hullGroup');\n var hullMap = this.get('hullMap');\n if (!hullMap) {\n hullMap = {};\n this.set('hullMap', hullMap);\n }\n if (!parent || parent.get('destroyed')) {\n parent = this.get('group').addGroup({\n id: 'hullGroup'\n });\n parent.toBack();\n this.set('hullGroup', parent);\n }\n if (hullMap[cfg.id]) {\n console.warn('Existed hull id.');\n return hullMap[cfg.id];\n }\n var group = parent.addGroup({\n id: \"\".concat(cfg.id, \"-container\")\n });\n var hull = new Hull(this, __assign(__assign({}, cfg), {\n group: group\n }));\n var hullId = hull.id;\n hullMap[hullId] = hull;\n return hull;\n };\n /**\n * 获取当前 graph 中存在的包裹轮廓\n * @return {[key: string]: Hull} Hull 的 map,hullId 对应的 hull 实例\n */\n AbstractGraph.prototype.getHulls = function () {\n return this.get('hullMap');\n };\n /**\n * 根据 hullId 获取对应的 hull\n * @return Hull\n */\n AbstractGraph.prototype.getHullById = function (hullId) {\n return this.get('hullMap')[hullId];\n };\n AbstractGraph.prototype.removeHull = function (hull) {\n var _a;\n var hullInstance;\n if (isString(hull)) {\n hullInstance = this.getHullById(hull);\n } else {\n hullInstance = hull;\n }\n (_a = this.get('hullMap')) === null || _a === void 0 ? true : delete _a[hullInstance.id];\n hullInstance.destroy();\n };\n AbstractGraph.prototype.removeHulls = function () {\n var hulls = this.getHulls();\n if (!hulls || !Object.keys(hulls).length) return;\n Object.keys(hulls).forEach(function (key) {\n var hull = hulls[key];\n hull.destroy();\n });\n this.set('hullMap', {});\n };\n return AbstractGraph;\n}(EventEmitter);\nexport default AbstractGraph;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport { __assign } from \"tslib\";\nimport Global from '../global';\nimport { ext } from '@antv/matrix-util';\nimport { deepMix, each, mix, isBoolean, isPlainObject, clone } from '@antv/util';\nimport { cloneBesidesImg } from '../util/graphic';\nvar transform = ext.transform;\nvar CLS_SHAPE_SUFFIX = '-shape';\nvar CLS_LABEL_SUFFIX = '-label';\nvar ARROWS = ['startArrow', 'endArrow'];\nvar SHAPE_DEFAULT_ATTRS = {\n lineWidth: 1,\n stroke: undefined,\n fill: undefined,\n lineAppendWidth: 1,\n opacity: undefined,\n strokeOpacity: undefined,\n fillOpacity: undefined,\n x: 0,\n y: 0,\n r: 10,\n width: 20,\n height: 20,\n shadowColor: undefined,\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\nvar PATH_SHAPE_DEFAULT_ATTRS = {\n lineWidth: 1,\n stroke: '#000',\n lineDash: undefined,\n startArrow: false,\n endArrow: false,\n opacity: undefined,\n strokeOpacity: undefined,\n fillOpacity: undefined,\n shadowColor: undefined,\n shadowBlur: 0,\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\nvar SHAPES_DEFAULT_ATTRS = {\n edge: PATH_SHAPE_DEFAULT_ATTRS,\n node: SHAPE_DEFAULT_ATTRS,\n combo: SHAPE_DEFAULT_ATTRS\n};\nexport var CLS_LABEL_BG_SUFFIX = '-label-bg';\n// 单个 shape 带有一个 label,共用这段代码\nexport var shapeBase = {\n // 默认样式及配置\n options: {\n labelCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n },\n descriptionCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n }\n },\n itemType: '',\n /**\n * 形状的类型,例如 circle,ellipse,polyline...\n */\n type: '',\n getCustomConfig: function getCustomConfig(cfg) {\n return {};\n },\n getOptions: function getOptions(cfg, updateType) {\n if (updateType === 'move' || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('bbox'))) return cfg;\n return deepMix({}, this.options, this.getCustomConfig(cfg) || {}, cfg);\n },\n /**\n * 绘制节点/边,包含文本\n * @override\n * @param {Object} cfg 节点的配置项\n * @param {G.Group} group 节点的容器\n * @return {IShape} 绘制的图形\n */\n draw: function draw(cfg, group) {\n group['shapeMap'] = {};\n this.mergeStyle = this.getOptions(cfg);\n var shape = this.drawShape(cfg, group);\n shape.set('className', this.itemType + CLS_SHAPE_SUFFIX);\n group['shapeMap'][this.itemType + CLS_SHAPE_SUFFIX] = shape;\n if (cfg.label) {\n var label = this.drawLabel(cfg, group);\n label.set('className', this.itemType + CLS_LABEL_SUFFIX);\n group['shapeMap'][this.itemType + CLS_LABEL_SUFFIX] = label;\n }\n return shape;\n },\n /**\n * 绘制完成后的操作,便于用户继承现有的节点、边\n * @param cfg\n * @param group\n * @param keyShape\n */\n afterDraw: function afterDraw(cfg, group, keyShape) {},\n drawShape: function drawShape(cfg, group) {\n return null;\n },\n drawLabel: function drawLabel(cfg, group) {\n var defaultLabelCfg = (this.mergeStyle || this.getOptions(cfg) || {}).labelCfg;\n // image的情况下有可能为null\n var labelCfg = defaultLabelCfg || {};\n var labelStyle = this.getLabelStyle(cfg, labelCfg, group);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n var label = group.addShape('text', {\n attrs: labelStyle,\n draggable: true,\n className: 'text-shape',\n name: 'text-shape',\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n if (!isNaN(rotate) && rotate !== '') {\n var labelBBox = label.getBBox();\n var labelMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (labelStyle.rotateCenter) {\n switch (labelStyle.rotateCenter) {\n case 'center':\n labelMatrix = transform(labelMatrix, [['t', -labelBBox.width / 2, -labelBBox.height / 2], ['r', rotate], ['t', labelBBox.width / 2, labelBBox.height / 2]]);\n break;\n case 'lefttop':\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y], ['r', rotate], ['t', labelStyle.x, labelStyle.y]]);\n break;\n case 'leftcenter':\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y - labelBBox.height / 2], ['r', rotate], ['t', labelStyle.x, labelStyle.y + labelBBox.height / 2]]);\n break;\n default:\n labelMatrix = transform(labelMatrix, [['t', -labelBBox.width / 2, -labelBBox.height / 2], ['r', rotate], ['t', labelBBox.width / 2, labelBBox.height / 2]]);\n break;\n }\n } else {\n labelMatrix = transform(labelMatrix, [['t', -labelStyle.x, -labelStyle.y - labelBBox.height / 2], ['r', rotate], ['t', labelStyle.x, labelStyle.y + labelBBox.height / 2]]);\n }\n label.setMatrix(labelMatrix);\n }\n if (labelStyle.background) {\n var rect = this.drawLabelBg(cfg, group, label);\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n rect.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = rect;\n label.toFront();\n }\n return label;\n },\n drawLabelBg: function drawLabelBg(cfg, group, label) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = mix({}, defaultLabelCfg, cfg.labelCfg);\n var style = this.getLabelBgStyleByPosition(label, labelCfg);\n var rect = group.addShape('rect', {\n name: 'text-bg-shape',\n attrs: style,\n labelRelated: true\n });\n group['shapeMap']['text-bg-shape'] = rect;\n return rect;\n },\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg, group) {\n return {\n text: cfg.label\n };\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n return {};\n },\n /**\n * 获取文本的配置项\n * @param cfg 节点的配置项\n * @param labelCfg 文本的配置项\n * @param group 父容器,label 的定位可能与图形相关\n */\n getLabelStyle: function getLabelStyle(cfg, labelCfg, group) {\n var calculateStyle = this.getLabelStyleByPosition(cfg, labelCfg, group);\n var attrName = \"\".concat(this.itemType, \"Label\"); // 取 nodeLabel,edgeLabel 的配置项\n var defaultStyle = Global[attrName] ? Global[attrName].style : null;\n return __assign(__assign(__assign({}, defaultStyle), calculateStyle), labelCfg.style);\n },\n /**\n * 获取图形的配置项\n * @param cfg\n */\n getShapeStyle: function getShapeStyle(cfg) {\n return cfg.style;\n },\n /**\n * 更新节点,包含文本\n * @override\n * @param {Object} cfg 节点/边的配置项\n * @param {G6.Item} item 节点/边\n */\n update: function update(cfg, item, updateType) {\n this.updateShapeStyle(cfg, item, updateType);\n this.updateLabel(cfg, item, updateType);\n },\n updateShapeStyle: function updateShapeStyle(cfg, item, updateType) {\n var _a;\n var group = item.getContainer();\n var shape = item.getKeyShape();\n var shapeStyle = mix({}, shape.attr(), cfg.style);\n var _loop_1 = function _loop_1(key) {\n var _b;\n var style = shapeStyle[key];\n if (isPlainObject(style)) {\n // 更新图元素样式,支持更新子元素\n var subShape = ((_a = group['shapeMap']) === null || _a === void 0 ? void 0 : _a[key]) || group.find(function (element) {\n return element.get('name') === key;\n });\n subShape === null || subShape === void 0 ? void 0 : subShape.attr(style);\n } else {\n shape.attr((_b = {}, _b[key] = style, _b));\n }\n };\n for (var key in shapeStyle) {\n _loop_1(key);\n }\n },\n updateLabel: function updateLabel(cfg, item, updateType) {\n var _a, _b;\n var group = item.getContainer();\n var _c = (this.mergeStyle || this.getOptions({}, updateType) || {}).labelCfg,\n labelCfg = _c === void 0 ? {} : _c;\n var labelClassName = this.itemType + CLS_LABEL_SUFFIX;\n var label = group['shapeMap'][labelClassName] || group.find(function (ele) {\n return ele.get('className') === labelClassName;\n });\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n var labelBg = group['shapeMap'][labelBgClassname] || group.find(function (ele) {\n return ele.get('className') === labelBgClassname;\n });\n if (label && cfg.label === undefined) {\n group.removeChild(label);\n delete group['shapeMap'][labelClassName];\n if (labelBg) {\n group.removeChild(labelBg);\n delete group['shapeMap'][labelBgClassname];\n }\n }\n // 防止 cfg.label = \"\" 的情况\n if (cfg.label || cfg.label === '') {\n // 若传入的新配置中有 label,(用户没传入但原先有 label,label 也会有值)\n if (!label) {\n // 若原先不存在 label,则绘制一个新的 label\n var newLabel = this.drawLabel(cfg, group);\n newLabel.set('className', labelClassName);\n group['shapeMap'][labelClassName] = newLabel;\n } else {\n // 若原先存在 label,则更新样式。与 getLabelStyle 不同在于这里需要融合当前 label 的样式\n // 融合 style 以外的属性:position, offset, ...\n if (!updateType || updateType === 'bbox|label' || this.itemType === 'edge' && updateType !== 'style') {\n labelCfg = deepMix(labelCfg, cfg.labelCfg);\n }\n // 获取位置信息\n var calculateStyle = this.getLabelStyleByPosition(cfg, labelCfg, group);\n // 取 nodeLabel,edgeLabel 的配置项\n var cfgStyle = (_a = cfg.labelCfg) === null || _a === void 0 ? void 0 : _a.style;\n // const cfgBgStyle = labelCfg.style?.background;\n // 需要融合当前\b label 的样式 label.attr()。不再需要全局/默认样式,因为已经应用在当前的 label 上\n var labelStyle = __assign(__assign({}, calculateStyle), cfgStyle);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n // 计算 label 的旋转矩阵\n if (!isNaN(rotate) && rotate !== '') {\n // if G 4.x define the rotateAtStart, use it directly instead of using the following codes\n var rotateMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n rotateMatrix = transform(rotateMatrix, [['t', -labelStyle.x, -labelStyle.y], ['r', rotate], ['t', labelStyle.x, labelStyle.y]]);\n labelStyle.matrix = rotateMatrix;\n label.attr(labelStyle);\n } else {\n if (((_b = label.getMatrix()) === null || _b === void 0 ? void 0 : _b[4]) !== 1) {\n label.resetMatrix();\n }\n label.attr(labelStyle);\n }\n if (!labelBg) {\n if (labelStyle.background) {\n labelBg = this.drawLabelBg(cfg, group, label);\n labelBg.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = labelBg;\n label.toFront();\n }\n } else if (labelStyle.background) {\n var calculateBgStyle = this.getLabelBgStyleByPosition(label, labelCfg);\n labelBg.attr(calculateBgStyle);\n } else {\n group.removeChild(labelBg);\n }\n }\n }\n },\n // update(cfg, item) // 默认不定义\n afterUpdate: function afterUpdate(cfg, item) {},\n /**\n * 设置节点的状态,主要是交互状态,业务状态请在 draw 方法中实现\n * 单图形的节点仅考虑 selected、active 状态,有其他状态需求的用户自己复写这个方法\n * @override\n * @param {String} name 状态名称\n * @param {String | Boolean} value 状态值\n * @param {G6.Item} item 节点\n */\n setState: function setState(name, value, item) {\n var _a, _b;\n var _c;\n var shape = item.get('keyShape');\n if (!shape || shape.destroyed) return;\n var type = item.getType();\n var stateName = isBoolean(value) ? name : \"\".concat(name, \":\").concat(value);\n var shapeStateStyle = this.getStateStyle(stateName, item);\n var itemStateStyle = item.getStateStyle(stateName);\n // const originStyle = item.getOriginStyle();\n // 不允许设置一个不存在的状态\n if (!itemStateStyle && !shapeStateStyle) {\n return;\n }\n // 要设置或取消的状态的样式\n // 当没有 state 状态时,默认使用 model.stateStyles 中的样式\n var styles = mix({}, itemStateStyle || shapeStateStyle);\n var group = item.getContainer();\n // 从图元素现有的样式中删除本次要取消的 states 中存在的属性值。使用对象检索更快\n var keptAttrs = {\n x: 1,\n y: 1,\n cx: 1,\n cy: 1,\n matrix: 1\n };\n if (type === 'combo') {\n keptAttrs.r = 1;\n keptAttrs.width = 1;\n keptAttrs.height = 1;\n }\n if (value) {\n var _loop_2 = function _loop_2(key) {\n var _d;\n var style = styles[key];\n if (isPlainObject(style) && !ARROWS.includes(key)) {\n var subShape = ((_c = group['shapeMap']) === null || _c === void 0 ? void 0 : _c[key]) || group.find(function (element) {\n return element.get('name') === key;\n });\n subShape === null || subShape === void 0 ? void 0 : subShape.attr(style);\n } else {\n // 非纯对象,则认为是设置到 keyShape 上面的\n shape.attr((_d = {}, _d[key] = style, _d));\n }\n };\n // style 为要设置的状态的样式\n for (var key in styles) {\n _loop_2(key);\n }\n } else {\n // 所有生效的 state 的样式\n var enableStatesStyle = cloneBesidesImg(item.getCurrentStatesStyle());\n var model = item.getModel();\n // 原始样式\n var originStyle_1 = mix({}, model.style, cloneBesidesImg(item.getOriginStyle()));\n var keyShapeName_1 = shape.get('name');\n // cloning shape.attr(), keys.forEach to avoid cloning the img attr, which leads to maximum clone heap #2383\n // const keyShapeStyles = clone(shape.attr())\n var shapeAttrs_1 = shape.attr();\n var keyShapeStyles_1 = {};\n Object.keys(shapeAttrs_1).forEach(function (key) {\n if (key === 'img') return;\n var attr = shapeAttrs_1[key];\n if (attr && _typeof(attr) === 'object') {\n keyShapeStyles_1[key] = clone(attr);\n } else {\n keyShapeStyles_1[key] = attr;\n }\n });\n // 已有样式 - 要取消的状态的样式\n var filtetDisableStatesStyle = {};\n var _loop_3 = function _loop_3(p) {\n var style = styles[p];\n if (isPlainObject(style) && !ARROWS.includes(p)) {\n var subShape_1 = group['shapeMap'][p] || group.find(function (ele) {\n return ele.get('name') === p;\n });\n if (subShape_1) {\n var subShapeStyles_1 = cloneBesidesImg(subShape_1.attr());\n each(style, function (v, key) {\n if (p === keyShapeName_1 && keyShapeStyles_1[key] && !keptAttrs[key]) {\n delete keyShapeStyles_1[key];\n var value_1 = originStyle_1[p][key] || SHAPES_DEFAULT_ATTRS[type][key];\n shape.attr(key, value_1);\n } else if (subShapeStyles_1[key] || subShapeStyles_1[key] === 0) {\n delete subShapeStyles_1[key];\n var value_2 = originStyle_1[p][key] || SHAPES_DEFAULT_ATTRS[type][key];\n subShape_1.attr(key, value_2);\n }\n });\n filtetDisableStatesStyle[p] = subShapeStyles_1;\n }\n } else {\n if (keyShapeStyles_1[p] && !keptAttrs[p]) {\n delete keyShapeStyles_1[p];\n var value_3 = originStyle_1[p] || (originStyle_1[keyShapeName_1] ? originStyle_1[keyShapeName_1][p] : undefined) || SHAPES_DEFAULT_ATTRS[type][p];\n shape.attr(p, value_3);\n }\n }\n };\n // styles 为要取消的状态的样式\n for (var p in styles) {\n _loop_3(p);\n }\n // 从图元素现有的样式中删除本次要取消的 states 中存在的属性值后,\n // 如果 keyShape 有 name 属性,则 filtetDisableStatesStyle 的格式为 { keyShapeName: {} }\n // 否则为普通对象\n if (!keyShapeName_1) {\n mix(filtetDisableStatesStyle, keyShapeStyles_1);\n } else {\n filtetDisableStatesStyle[keyShapeName_1] = keyShapeStyles_1;\n }\n for (var key in enableStatesStyle) {\n if (keptAttrs[key]) continue;\n var enableStyle = enableStatesStyle[key];\n if (!isPlainObject(enableStyle) || ARROWS.includes(key)) {\n // 把样式属性merge到keyShape中\n if (!keyShapeName_1) {\n mix(originStyle_1, (_a = {}, _a[key] = enableStyle, _a));\n } else {\n mix(originStyle_1[keyShapeName_1], (_b = {}, _b[key] = enableStyle, _b));\n delete originStyle_1[key];\n }\n delete enableStatesStyle[key];\n }\n }\n var originstyles = {};\n deepMix(originstyles, originStyle_1, filtetDisableStatesStyle, enableStatesStyle);\n var keyShapeSetted = false;\n var _loop_4 = function _loop_4(originKey) {\n var _e, _f;\n var style = originstyles[originKey];\n if (isPlainObject(style) && !ARROWS.includes(originKey)) {\n var subShape = group['shapeMap'][originKey] || group.find(function (ele) {\n return ele.get('name') === originKey;\n });\n if (subShape) {\n // The text's position and matrix is not allowed to be affected by states\n if (subShape.get('type') === 'text' || subShape.get('labelRelated')) {\n delete style.x;\n delete style.y;\n delete style.matrix;\n }\n if (originKey === keyShapeName_1) {\n if (type === 'combo') {\n delete style.r;\n delete style.width;\n delete style.height;\n }\n keyShapeSetted = true;\n }\n subShape.attr(style);\n }\n } else if (!keyShapeSetted) {\n var value_4 = style || SHAPES_DEFAULT_ATTRS[type][originKey];\n // 当更新 combo 状态时,当不存在 keyShapeName 时候,则认为是设置到 keyShape 上面的\n if (type === 'combo') {\n if (!keyShapeName_1) {\n shape.attr((_e = {}, _e[originKey] = value_4, _e));\n }\n } else {\n shape.attr((_f = {}, _f[originKey] = value_4, _f));\n }\n }\n };\n for (var originKey in originstyles) {\n _loop_4(originKey);\n }\n }\n },\n /**\n * 获取不同状态下的样式\n *\n * @param {string} name 状态名称\n * @param {Item} item Node或Edge的实例\n * @return {object} 样式\n */\n getStateStyle: function getStateStyle(name, item) {\n var model = item.getModel();\n var type = item.getType();\n var _a = this.getOptions(model),\n stateStyles = _a.stateStyles,\n _b = _a.style,\n style = _b === void 0 ? {} : _b;\n var modelStateStyle = model.stateStyles ? model.stateStyles[name] : stateStyles && stateStyles[name];\n if (type === 'combo') {\n return clone(modelStateStyle);\n }\n return mix({}, style, modelStateStyle);\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 控制点的数组,如果为 null,则没有控制点\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * 获取控制点\n * @param {Object} cfg 节点、边的配置项\n * @return {Array|null} 锚点的数组,如果为 null,则没有锚点\n */\n getAnchorPoints: function getAnchorPoints(cfg) {\n var _a, _b;\n var anchorPoints = (cfg === null || cfg === void 0 ? void 0 : cfg.anchorPoints) || ((_a = this.getCustomConfig(cfg)) === null || _a === void 0 ? void 0 : _a.anchorPoints) || ((_b = this.options) === null || _b === void 0 ? void 0 : _b.anchorPoints);\n return anchorPoints;\n }\n};","import { __assign } from \"tslib\";\nimport { isArray, isNil, mix } from '@antv/util';\nimport { formatPadding } from '../util/base';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase } from './shapeBase';\nimport { truncateLabelByLength } from '../util/graphic';\nvar singleNode = {\n itemType: 'node',\n // 单个图形的类型\n shapeType: 'single-node',\n /**\n * 文本相对图形的位置,默认以中心点\n * 位置包括: top, bottom, left, right, center\n * @type {String}\n */\n labelPosition: 'center',\n /**\n * 文本相对偏移,当 labelPosition 不为 center 时有效\n * @type {Number}\n */\n offset: Global.nodeLabel.offset,\n /**\n * 获取节点宽高\n * @internal 返回节点的大小,以 [width, height] 的方式维护\n * @param {Object} cfg 节点的配置项\n * @return {Array} 宽高\n */\n getSize: function getSize(cfg) {\n var _a;\n var size = ((_a = this.mergeStyle) === null || _a === void 0 ? void 0 : _a.size) || cfg.size || this.getOptions({}).size || Global.defaultNode.size; // Global.defaultNode.size; // \n // size 是数组,但长度为1,则补长度为2\n if (isArray(size) && size.length === 1) {\n size = [size[0], size[0]];\n }\n // size 为数字,则转换为数组\n if (!isArray(size)) {\n size = [size, size];\n }\n return size;\n },\n // 私有方法,不希望扩展的节点复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelMaxLength = labelCfg.maxLength;\n var text = cfg.label;\n if (labelMaxLength) {\n text = truncateLabelByLength(text, labelMaxLength);\n }\n var labelPosition = labelCfg.position || this.labelPosition;\n // 默认的位置(最可能的情形),所以放在最上面\n if (labelPosition === 'center') {\n return {\n x: 0,\n y: 0,\n text: text,\n textBaseline: 'middle',\n textAlign: 'center'\n };\n }\n var offset = labelCfg.offset;\n if (isNil(offset)) {\n // 考虑 offset = 0 的场景,不用用 labelCfg.offset || Global.nodeLabel.offset\n offset = this.offset; // 不居中时的偏移量\n }\n\n var size = this.getSize(cfg);\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: 0,\n y: -size[1] / 2 - offset,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: size[1] / 2 + offset,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: -size[0] / 2 - offset,\n y: 0,\n textBaseline: 'middle',\n textAlign: 'right'\n };\n break;\n default:\n style = {\n x: size[0] / 2 + offset,\n y: 0,\n textBaseline: 'middle',\n textAlign: 'left'\n };\n break;\n }\n style.text = text;\n return style;\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n var _a;\n if (!label) return {};\n var backgroundStyle = (_a = labelCfg.style) === null || _a === void 0 ? void 0 : _a.background;\n if (!backgroundStyle) return {};\n var bbox = label.getBBox();\n var padding = formatPadding(backgroundStyle.padding);\n var backgroundWidth = bbox.width + padding[1] + padding[3];\n var backgroundHeight = bbox.height + padding[0] + padding[2];\n return __assign(__assign({\n x: bbox.minX - padding[3],\n y: bbox.minY - padding[0]\n }, backgroundStyle), {\n width: backgroundWidth,\n height: backgroundHeight\n });\n },\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType; // || this.type,都已经加了 shapeType\n var style = this.getShapeStyle(cfg);\n var shape = group.addShape(shapeType, {\n attrs: style,\n draggable: true,\n name: 'node-shape'\n });\n group['shapeMap']['node-shape'] = shape;\n return shape;\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var defaultLinkPoints = (this.mergeStyle || this.getOptions(cfg)).linkPoints;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markBottom = group['shapeMap']['link-point-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-bottom';\n });\n var currentLinkPoints;\n if (markLeft) {\n currentLinkPoints = markLeft.attr();\n }\n if (markRight && !currentLinkPoints) {\n currentLinkPoints = markRight.attr();\n }\n if (markTop && !currentLinkPoints) {\n currentLinkPoints = markTop.attr();\n }\n if (markBottom && !currentLinkPoints) {\n currentLinkPoints = markBottom.attr();\n }\n if (!currentLinkPoints) currentLinkPoints = defaultLinkPoints;\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _a = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n bottom: undefined\n },\n left = _a.left,\n right = _a.right,\n top = _a.top,\n bottom = _a.bottom;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: -width / 2,\n y: 0\n }));\n }\n } else if (left) {\n var name_1 = 'link-point-left';\n group['shapeMap'][name_1] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: -width / 2,\n y: 0\n }),\n className: name_1,\n name: name_1,\n isAnchorPoint: true\n });\n }\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n }\n markRight.attr(__assign(__assign({}, styles), {\n x: width / 2,\n y: 0\n }));\n } else if (right) {\n var name_2 = 'link-point-right';\n group['shapeMap'][name_2] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: width / 2,\n y: 0\n }),\n className: name_2,\n name: name_2,\n isAnchorPoint: true\n });\n }\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n }\n markTop.attr(__assign(__assign({}, styles), {\n x: 0,\n y: -height / 2\n }));\n } else if (top) {\n var name_3 = 'link-point-top';\n group['shapeMap'][name_3] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: 0,\n y: -height / 2\n }),\n className: name_3,\n name: name_3,\n isAnchorPoint: true\n });\n }\n if (markBottom) {\n if (!bottom && bottom !== undefined) {\n markBottom.remove();\n delete group['shapeMap']['link-point-bottom'];\n } else {\n markBottom.attr(__assign(__assign({}, styles), {\n x: 0,\n y: height / 2\n }));\n }\n } else if (bottom) {\n var name_4 = 'link-point-bottom';\n group['shapeMap'][name_4] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: 0,\n y: height / 2\n }),\n className: name_4,\n name: name_4,\n isAnchorPoint: true\n });\n }\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle, hasIcon, updateType) {\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign({}, keyShapeStyle));\n if (!undefined || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('label'))) {\n this.updateLabel(cfg, item, updateType);\n }\n if (hasIcon) {\n this.updateIcon(cfg, item);\n }\n },\n updateIcon: function updateIcon(cfg, item) {\n var _this = this;\n var group = item.getContainer();\n var icon = (this.mergeStyle || this.getOptions(cfg)).icon;\n var _a = cfg.icon ? cfg.icon : {\n show: undefined,\n text: undefined\n },\n show = _a.show,\n text = _a.text;\n var iconShape = group['shapeMap'][\"\".concat(this.type, \"-icon\")] || group.find(function (ele) {\n return ele.get('name') === \"\".concat(_this.type, \"-icon\");\n });\n if (iconShape) {\n // 若原先存在 icon\n if (show || show === undefined) {\n // 若传入 show: true, 或没有设置,则更新原有的 icon 样式\n var iconConfig = mix({}, iconShape.attr(), icon);\n var _b = iconConfig.width,\n w = _b === void 0 ? 20 : _b,\n _c = iconConfig.height,\n h = _c === void 0 ? 20 : _c;\n if (iconConfig.fontFamily === 'iconfont' || iconConfig.hasOwnProperty('text')) {\n w = 0;\n h = 0;\n }\n iconShape.attr(__assign(__assign({}, iconConfig), {\n x: -w / 2,\n y: -h / 2\n }));\n } else {\n // 若传入了 show: false 则删除原先的 icon\n iconShape.remove();\n delete group['shapeMap'][\"\".concat(this.type, \"-icon\")];\n }\n } else if (show) {\n // 如果原先不存在 icon,但传入了 show: true,则新增 icon\n var name_5 = \"\".concat(this.type, \"-icon\");\n if (text) {\n group['shapeMap'][name_5] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: name_5,\n name: name_5\n });\n } else {\n var w = icon.width,\n h = icon.height;\n group['shapeMap'][name_5] = group.addShape('image', {\n attrs: __assign(__assign({}, icon), {\n x: -w / 2,\n y: -h / 2\n }),\n className: name_5,\n name: name_5\n });\n }\n // to ensure the label is on the top of all the shapes\n var labelShape = group['shapeMap']['node-label'] || group.find(function (ele) {\n return ele.get('name') === 'node-label';\n });\n if (labelShape) {\n labelShape.toFront();\n }\n }\n }\n};\nvar singleNodeDef = __assign(__assign({}, shapeBase), singleNode);\nShape.registerNode('single-node', singleNodeDef);","/**\n * @fileOverview 自定义边\n * @description 自定义边中有大量逻辑同自定义节点重复,虽然可以提取成为 mixin ,但是考虑到代码的可读性,还是单独实现。\n */\nimport { __assign } from \"tslib\";\nimport { deepMix, mix, each, isNil, isNumber, isArray } from '@antv/util';\nimport { getLabelPosition, getLoopCfgs } from '../util/graphic';\nimport { distance, getCircleCenterByPoints } from '../util/math';\nimport { getControlPoint, getSpline } from '../util/path';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase, CLS_LABEL_BG_SUFFIX } from './shapeBase';\nvar CLS_SHAPE = 'edge-shape';\n// start,end 倒置,center 不变\nfunction revertAlign(labelPosition) {\n var textAlign = labelPosition;\n if (labelPosition === 'start') {\n textAlign = 'end';\n } else if (labelPosition === 'end') {\n textAlign = 'start';\n }\n return textAlign;\n}\nvar singleEdge = {\n itemType: 'edge',\n /**\n * 文本的位置\n * @type {String}\n */\n labelPosition: 'center',\n /**\n * 文本的 x 偏移\n * @type {Number}\n */\n refX: 0,\n /**\n * 文本的 y 偏移\n * @type {Number}\n */\n refY: 0,\n /**\n * 文本是否跟着线自动旋转,默认 false\n * @type {Boolean}\n */\n labelAutoRotate: false,\n // 自定义边时的配置\n options: {\n size: Global.defaultEdge.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultEdge.style.stroke,\n lineAppendWidth: Global.defaultEdge.style.lineAppendWidth\n },\n labelCfg: {\n style: {\n fill: Global.edgeLabel.style.fill,\n fontSize: Global.edgeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.edgeStateStyles)\n },\n /**\n * 获取边的 path\n * @internal 供扩展的边覆盖\n * @param {Array} points 构成边的点的集合\n * @return {Array} 构成 path 的数组\n */\n getPath: function getPath(points) {\n var path = [];\n each(points, function (point, index) {\n if (index === 0) {\n path.push(['M', point.x, point.y]);\n } else {\n path.push(['L', point.x, point.y]);\n }\n });\n return path;\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var size = cfg.size || Global.defaultEdge.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg);\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var path = this.getPath(points);\n var styles = mix({}, Global.defaultEdge.style, {\n stroke: Global.defaultEdge.color,\n lineWidth: size,\n path: path\n }, style);\n return styles;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item, updateType) {\n var _a;\n var group = item.getContainer();\n // const strokeStyle: ShapeStyle = {\n // stroke: cfg.color,\n // };\n var shape = ((_a = item.getKeyShape) === null || _a === void 0 ? void 0 : _a.call(item)) || group['shapeMap']['edge-shape']; // group.find((element) => element.get('className') === 'edge-shape');\n var size = cfg.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg); // || cfg.controlPoints;\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var currentAttr = shape.attr();\n // const previousStyle = mix({}, strokeStyle, currentAttr, cfg.style);\n var previousStyle = cfg.style || {};\n if (previousStyle.stroke === undefined) {\n previousStyle.stroke = cfg.color;\n }\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var routeCfg = {\n radius: previousStyle.radius\n };\n if (!controlPoints) {\n routeCfg = {\n source: source,\n target: target,\n offset: previousStyle.offset,\n radius: previousStyle.radius\n };\n }\n var path = this.getPath(points, routeCfg);\n var style = {};\n if (updateType === 'move') {\n style = {\n path: path\n };\n } else {\n if (currentAttr.endArrow && previousStyle.endArrow === false) {\n cfg.style.endArrow = {\n path: ''\n };\n }\n if (currentAttr.startArrow && previousStyle.startArrow === false) {\n cfg.style.startArrow = {\n path: ''\n };\n }\n style = __assign({}, cfg.style);\n if (style.lineWidth === undefined) style.lineWidth = (isNumber(size) ? size : size === null || size === void 0 ? void 0 : size[0]) || currentAttr.lineWidth;\n if (style.path === undefined) style.path = path;\n if (style.stroke === undefined) style.stroke = currentAttr.stroke || cfg.color;\n }\n if (shape) {\n shape.attr(style);\n }\n },\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg, group) {\n var labelPosition = labelCfg.position || this.labelPosition; // 文本的位置用户可以传入\n var style = {};\n var pathShape = group === null || group === void 0 ? void 0 : group['shapeMap'][CLS_SHAPE]; // group?.find((element) => element.get('className') === CLS_SHAPE);\n // 不对 pathShape 进行判空,如果线不存在,说明有问题了\n var pointPercent;\n if (labelPosition === 'start') {\n pointPercent = 0;\n } else if (labelPosition === 'end') {\n pointPercent = 1;\n } else {\n pointPercent = 0.5;\n }\n // 偏移量\n var offsetX = labelCfg.refX || this.refX;\n var offsetY = labelCfg.refY || this.refY;\n // 如果两个节点重叠,线就变成了一个点,这时候label的位置,就是这个点 + 绝对偏移\n if (cfg.startPoint.x === cfg.endPoint.x && cfg.startPoint.y === cfg.endPoint.y) {\n style.x = cfg.startPoint.x + offsetX;\n style.y = cfg.startPoint.y + offsetY;\n style.text = cfg.label;\n return style;\n }\n var autoRotate;\n if (isNil(labelCfg.autoRotate)) autoRotate = this.labelAutoRotate;else autoRotate = labelCfg.autoRotate;\n var offsetStyle = getLabelPosition(pathShape, pointPercent, offsetX, offsetY, autoRotate);\n style.x = offsetStyle.x;\n style.y = offsetStyle.y;\n style.rotate = offsetStyle.rotate;\n style.textAlign = this._getTextAlign(labelPosition, offsetStyle.angle);\n style.text = cfg.label;\n return style;\n },\n getLabelBgStyleByPosition: function getLabelBgStyleByPosition(label, labelCfg) {\n if (!label) {\n return {};\n }\n var bbox = label.getBBox();\n var backgroundStyle = labelCfg.style && labelCfg.style.background;\n if (!backgroundStyle) {\n return {};\n }\n var padding = backgroundStyle.padding;\n var backgroundWidth = bbox.width + padding[1] + padding[3];\n var backgroundHeight = bbox.height + padding[0] + padding[2];\n var style = __assign(__assign({}, backgroundStyle), {\n width: backgroundWidth,\n height: backgroundHeight,\n x: bbox.minX - padding[3],\n y: bbox.minY - padding[0],\n matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1]\n });\n var autoRotate;\n if (isNil(labelCfg.autoRotate)) autoRotate = this.labelAutoRotate;else autoRotate = labelCfg.autoRotate;\n if (autoRotate) {\n style.matrix = label.attr('matrix') || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n return style;\n },\n // 获取文本对齐方式\n _getTextAlign: function _getTextAlign(labelPosition, angle) {\n var textAlign = 'center';\n if (!angle) {\n return labelPosition;\n }\n angle = angle % (Math.PI * 2); // 取模\n if (labelPosition !== 'center') {\n if (angle >= 0 && angle <= Math.PI / 2 || angle >= 3 / 2 * Math.PI && angle < 2 * Math.PI) {\n textAlign = labelPosition;\n } else {\n textAlign = revertAlign(labelPosition);\n }\n }\n return textAlign;\n },\n /**\n * @internal 获取边的控制点\n * @param {Object} cfg 边的配置项\n * @return {Array} 控制点的数组\n */\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n /**\n * @internal 处理需要重计算点和边的情况\n * @param {Object} cfg 边的配置项\n * @return {Object} 边的配置项\n */\n getPathPoints: function getPathPoints(cfg) {\n return cfg;\n },\n /**\n * 绘制边\n * @override\n * @param {Object} cfg 边的配置项\n * @param {G.Group} group 边的容器\n * @return {IShape} 图形\n */\n drawShape: function drawShape(cfg, group) {\n var shapeStyle = this.getShapeStyle(cfg);\n var shape = group.addShape('path', {\n className: CLS_SHAPE,\n name: CLS_SHAPE,\n attrs: shapeStyle\n });\n group['shapeMap'][CLS_SHAPE] = shape;\n return shape;\n },\n drawLabel: function drawLabel(cfg, group) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = deepMix({}, defaultLabelCfg, cfg.labelCfg);\n var labelStyle = this.getLabelStyle(cfg, labelCfg, group);\n var rotate = labelStyle.rotate;\n delete labelStyle.rotate;\n var label = group.addShape('text', {\n attrs: labelStyle,\n name: 'text-shape',\n labelRelated: true,\n draggable: true\n });\n group['shapeMap']['text-shape'] = label;\n if (!isNaN(rotate) && rotate !== '') {\n label.rotateAtStart(rotate);\n }\n if (labelStyle.background) {\n var rect = this.drawLabelBg(cfg, group, label, labelStyle, rotate);\n var labelBgClassname = this.itemType + CLS_LABEL_BG_SUFFIX;\n rect.set('classname', labelBgClassname);\n group['shapeMap'][labelBgClassname] = rect;\n label.toFront();\n }\n return label;\n },\n drawLabelBg: function drawLabelBg(cfg, group, label, labelStyle, rotate) {\n var defaultLabelCfg = this.options.labelCfg;\n var labelCfg = deepMix({}, defaultLabelCfg, cfg.labelCfg);\n var style = this.getLabelBgStyleByPosition(label, labelCfg);\n var rect = group.addShape('rect', {\n name: 'text-bg-shape',\n attrs: style,\n labelRelated: true\n });\n group['shapeMap']['text-bg-shape'] = rect;\n return rect;\n }\n};\nvar singleEdgeDef = __assign(__assign({}, shapeBase), singleEdge);\nShape.registerEdge('single-edge', singleEdgeDef);\n// 直线, 不支持控制点\nShape.registerEdge('line', {\n // 控制点不生效\n getControlPoints: function getControlPoints() {\n return undefined;\n }\n}, 'single-edge');\n// 直线\nShape.registerEdge('spline', {\n getPath: function getPath(points) {\n var path = getSpline(points);\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('arc', {\n curveOffset: 20,\n clockwise: 1,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var midPoint = {\n x: (startPoint.x + endPoint.x) / 2,\n y: (startPoint.y + endPoint.y) / 2\n };\n var center;\n var arcPoint;\n // 根据给定点计算圆弧\n if (cfg.controlPoints !== undefined) {\n arcPoint = cfg.controlPoints[0];\n center = getCircleCenterByPoints(startPoint, arcPoint, endPoint);\n // 根据控制点和直线关系决定 clockwise值\n if (startPoint.x <= endPoint.x && startPoint.y > endPoint.y) {\n this.clockwise = center.x > arcPoint.x ? 0 : 1;\n } else if (startPoint.x <= endPoint.x && startPoint.y < endPoint.y) {\n this.clockwise = center.x > arcPoint.x ? 1 : 0;\n } else if (startPoint.x > endPoint.x && startPoint.y <= endPoint.y) {\n this.clockwise = center.y < arcPoint.y ? 0 : 1;\n } else {\n this.clockwise = center.y < arcPoint.y ? 1 : 0;\n }\n // 若给定点和两端点共线,无法生成圆弧,绘制直线\n if ((arcPoint.x - startPoint.x) / (arcPoint.y - startPoint.y) === (endPoint.x - startPoint.x) / (endPoint.y - startPoint.y)) {\n return [];\n }\n } else {\n // 根据直线连线中点的的偏移计算圆弧\n // 若用户给定偏移量则根据其计算,否则按照默认偏移值计算\n if (cfg.curveOffset === undefined) {\n cfg.curveOffset = this.curveOffset;\n }\n if (isArray(cfg.curveOffset)) {\n cfg.curveOffset = cfg.curveOffset[0];\n }\n if (cfg.curveOffset < 0) {\n this.clockwise = 0;\n } else {\n this.clockwise = 1;\n }\n var vec = {\n x: endPoint.x - startPoint.x,\n y: endPoint.y - startPoint.y\n };\n var edgeAngle = Math.atan2(vec.y, vec.x);\n arcPoint = {\n x: cfg.curveOffset * Math.cos(-Math.PI / 2 + edgeAngle) + midPoint.x,\n y: cfg.curveOffset * Math.sin(-Math.PI / 2 + edgeAngle) + midPoint.y\n };\n center = getCircleCenterByPoints(startPoint, arcPoint, endPoint);\n }\n var radius = distance(startPoint, center);\n var controlPoints = [{\n x: radius,\n y: radius\n }];\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n // 控制点与端点共线\n if (points.length === 2) {\n path.push(['L', points[1].x, points[1].y]);\n } else {\n path.push(['A', points[1].x, points[1].y, 0, 0, this.clockwise, points[2].x, points[2].y]);\n }\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('quadratic', {\n curvePosition: 0.5,\n curveOffset: -20,\n getControlPoints: function getControlPoints(cfg) {\n var controlPoints = cfg.controlPoints; // 指定controlPoints\n if (!controlPoints || !controlPoints.length) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (isArray(cfg.curveOffset)) cfg.curveOffset = cfg.curveOffset[0];\n if (isArray(cfg.curvePosition)) cfg.curvePosition = cfg.curveOffset[0];\n var innerPoint = getControlPoint(startPoint, endPoint, cfg.curvePosition, cfg.curveOffset);\n controlPoints = [innerPoint];\n }\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n path.push(['Q', points[1].x, points[1].y, points[2].x, points[2].y]);\n return path;\n }\n}, 'single-edge');\nShape.registerEdge('cubic', {\n curvePosition: [1 / 2, 1 / 2],\n curveOffset: [-20, 20],\n getControlPoints: function getControlPoints(cfg) {\n var controlPoints = cfg.controlPoints; // 指定 controlPoints\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n if (!controlPoints || !controlPoints.length || controlPoints.length < 2) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var innerPoint1 = getControlPoint(startPoint, endPoint, cfg.curvePosition[0], cfg.curveOffset[0]);\n var innerPoint2 = getControlPoint(startPoint, endPoint, cfg.curvePosition[1], cfg.curveOffset[1]);\n controlPoints = [innerPoint1, innerPoint2];\n }\n return controlPoints;\n },\n getPath: function getPath(points) {\n var path = [];\n path.push(['M', points[0].x, points[0].y]);\n path.push(['C', points[1].x, points[1].y, points[2].x, points[2].y, points[3].x, points[3].y]);\n return path;\n }\n}, 'single-edge');\n// 垂直方向的三阶贝塞尔曲线,不再考虑用户外部传入的控制点\nShape.registerEdge('cubic-vertical', {\n curvePosition: [1 / 2, 1 / 2],\n minCurveOffset: [0, 0],\n curveOffset: undefined,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.minCurveOffset === undefined) cfg.minCurveOffset = this.minCurveOffset;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.minCurveOffset)) cfg.minCurveOffset = [cfg.minCurveOffset, -cfg.minCurveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n var yDist = endPoint.y - startPoint.y;\n var curveOffset = [0, 0];\n if (cfg.curveOffset) {\n curveOffset = cfg.curveOffset;\n } else if (Math.abs(yDist) < Math.abs(cfg.minCurveOffset[0])) {\n curveOffset = cfg.minCurveOffset;\n }\n var innerPoint1 = {\n x: startPoint.x,\n y: startPoint.y + yDist * this.curvePosition[0] + curveOffset[0]\n };\n var innerPoint2 = {\n x: endPoint.x,\n y: endPoint.y - yDist * this.curvePosition[1] + curveOffset[1]\n };\n return [innerPoint1, innerPoint2];\n }\n}, 'cubic');\n// 水平方向的三阶贝塞尔曲线,不再考虑用户外部传入的控制点\nShape.registerEdge('cubic-horizontal', {\n curvePosition: [1 / 2, 1 / 2],\n minCurveOffset: [0, 0],\n curveOffset: undefined,\n getControlPoints: function getControlPoints(cfg) {\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n if (cfg.curvePosition === undefined) cfg.curvePosition = this.curvePosition;\n if (cfg.curveOffset === undefined) cfg.curveOffset = this.curveOffset;\n if (cfg.minCurveOffset === undefined) cfg.minCurveOffset = this.minCurveOffset;\n if (isNumber(cfg.curveOffset)) cfg.curveOffset = [cfg.curveOffset, -cfg.curveOffset];\n if (isNumber(cfg.minCurveOffset)) cfg.minCurveOffset = [cfg.minCurveOffset, -cfg.minCurveOffset];\n if (isNumber(cfg.curvePosition)) cfg.curvePosition = [cfg.curvePosition, 1 - cfg.curvePosition];\n var xDist = endPoint.x - startPoint.x;\n var curveOffset = [0, 0];\n if (cfg.curveOffset) {\n curveOffset = cfg.curveOffset;\n } else if (Math.abs(xDist) < Math.abs(cfg.minCurveOffset[0])) {\n curveOffset = cfg.minCurveOffset;\n }\n var innerPoint1 = {\n x: startPoint.x + xDist * this.curvePosition[0] + curveOffset[0],\n y: startPoint.y\n };\n var innerPoint2 = {\n x: endPoint.x - xDist * this.curvePosition[1] + curveOffset[1],\n y: endPoint.y\n };\n var controlPoints = [innerPoint1, innerPoint2];\n return controlPoints;\n }\n}, 'cubic');\nShape.registerEdge('loop', {\n getPathPoints: function getPathPoints(cfg) {\n return getLoopCfgs(cfg);\n },\n getControlPoints: function getControlPoints(cfg) {\n return cfg.controlPoints;\n },\n afterDraw: function afterDraw(cfg) {\n cfg.controlPoints = undefined;\n },\n afterUpdate: function afterUpdate(cfg) {\n cfg.controlPoints = undefined;\n }\n}, 'cubic');","import { __assign } from \"tslib\";\nimport { isArray, isNil, clone } from '@antv/util';\nimport Global from '../global';\nimport Shape from './shape';\nimport { shapeBase } from './shapeBase';\nvar singleCombo = {\n itemType: 'combo',\n // 单个图形的类型\n shapeType: 'single-combo',\n /**\n * Combo 标题文本相对图形的位置,默认为 top\n * 位置包括: top, bottom, left, right, center\n * @type {String}\n */\n labelPosition: 'top',\n /**\n * 标题文本相对偏移,当 labelPosition 不为 center 时有效\n * @type {Number}\n */\n refX: Global.comboLabel.refX,\n refY: Global.comboLabel.refY,\n options: {\n style: {\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n /**\n * 获取 Combo 宽高\n * @internal 返回 Combo 的大小,以 [width, height] 的方式维护\n * @param {Object} cfg Combo 的配置项\n * @return {Array} 宽高\n */\n getSize: function getSize(cfg) {\n var size = clone(cfg.size || this.options.size || Global.defaultCombo.size);\n // size 是数组,若长度为 1,则补长度为 2\n if (isArray(size) && size.length === 1) {\n size = [size[0], size[0]];\n }\n // size 为数字,则转换为数组\n if (!isArray(size)) {\n size = [size, size];\n }\n return size;\n },\n // 私有方法,不希望扩展的 Combo 复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelPosition = labelCfg.position || this.labelPosition;\n var cfgStyle = cfg.style;\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var refX = labelCfg.refX,\n refY = labelCfg.refY;\n // 考虑 refX 和 refY = 0 的场景,不用用 labelCfg.refX || Global.nodeLabel.refX\n if (isNil(refX)) {\n refX = this.refX; // 不居中时的偏移量\n }\n\n if (isNil(refY)) {\n refY = this.refY; // 不居中时的偏移量\n }\n\n var size = this.getSize(cfg);\n var r = Math.max(cfgStyle.r, size[0] / 2) || size[0] / 2;\n var dis = r + padding;\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: 0,\n y: -dis - refY,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: dis + refY,\n textBaseline: 'bottom',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: -dis + refX,\n y: 0,\n textAlign: 'left'\n };\n break;\n case 'center':\n style = {\n x: 0,\n y: 0,\n text: cfg.label,\n textAlign: 'center'\n };\n break;\n default:\n style = {\n x: dis + refX,\n y: 0,\n textAlign: 'right'\n };\n break;\n }\n style.text = cfg.label;\n return style;\n },\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType; // || this.type,都已经加了 shapeType\n var style = this.getShapeStyle(cfg);\n var shape = group.addShape(shapeType, {\n attrs: style,\n draggable: true,\n name: 'combo-shape'\n });\n return shape;\n },\n updateCollapsedIcon: function updateCollapsedIcon(cfg, item, keyShapeStyle) {\n var collapsed = cfg.collapsed,\n _a = cfg.collapsedSubstituteIcon,\n collapsedSubstituteIcon = _a === void 0 ? {} : _a;\n var substituteIconConfig = Object.assign({}, this.options.collapsedSubstituteIcon, collapsedSubstituteIcon);\n var show = substituteIconConfig.show,\n img = substituteIconConfig.img,\n width = substituteIconConfig.width,\n height = substituteIconConfig.height;\n var group = item.getContainer();\n var collapsedIconShape = group.find(function (ele) {\n return ele.get('name') === 'combo-collapsed-substitute-icon';\n });\n var iconShapeExist = collapsedIconShape && !collapsedIconShape.destroyed;\n var keyShape = item.get('keyShape');\n if (collapsed && show) {\n if (iconShapeExist) {\n collapsedIconShape.show();\n } else {\n var sizeAttr = {\n width: width || keyShapeStyle.r * 2 || keyShapeStyle.width,\n height: height || keyShapeStyle.r * 2 || keyShapeStyle.height\n };\n collapsedIconShape = group.addShape('image', {\n attrs: __assign({\n img: img,\n x: -sizeAttr.width / 2,\n y: -sizeAttr.height / 2\n }, sizeAttr),\n name: 'combo-collapsed-substitute-icon',\n draggable: true\n });\n }\n keyShape.hide();\n } else if (iconShapeExist) {\n collapsedIconShape.hide();\n keyShape.show();\n }\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle) {\n var _this = this;\n var keyShape = item.get('keyShape');\n var itemAnimate = item.get('animate');\n var animate = itemAnimate && (cfg.animate === undefined ? this.options.animate : cfg.animate);\n if (animate && keyShape.animate) {\n // 更新到展开状态,先将 collapsedIcon 隐藏。否则在动画完成后再出现 collapsedIcon\n if (!cfg.collapsed) {\n this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n keyShape.animate(keyShapeStyle, {\n duration: 200,\n easing: 'easeLinear',\n callback: function callback() {\n if (cfg.collapsed) {\n _this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n }\n });\n } else {\n keyShape.attr(__assign({}, keyShapeStyle));\n this.updateCollapsedIcon(cfg, item, keyShapeStyle);\n }\n this.updateLabel(cfg, item);\n // special for some types of nodes\n }\n};\n\nvar singleComboDef = __assign(__assign({}, shapeBase), singleCombo);\nShape.registerCombo('single-combo', singleComboDef);","import { __assign } from \"tslib\";\nimport Global from '../../global';\nimport Shape from '../shape';\nimport { isNumber, clone, mix, isArray } from '@antv/util';\n// 圆形 Combo\nShape.registerCombo('circle', {\n // 自定义节点时的配置\n options: {\n size: [Global.defaultCombo.size[0], Global.defaultCombo.size[0]],\n padding: Math.max.apply(Math, Global.defaultCombo.padding),\n animate: true,\n style: {\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize\n },\n refX: 0,\n refY: 0\n },\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'top',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n delete style.height;\n delete style.width;\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: 'circle-combo',\n name: 'circle-combo',\n draggable: true\n });\n return keyShape;\n },\n /**\n * 获取 Combo 的样式,供基于该 Combo 自定义时使用\n * @param {Object} cfg Combo 数据模型\n * @return {Object} Combo 的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n var r;\n if (fixSize) {\n r = isNumber(fixSize) ? fixSize / 2 : fixSize[0] / 2;\n } else {\n var size = this.getSize(cfg);\n if (!isNumber(style.r) || isNaN(style.r)) r = size[0] / 2 || Global.defaultCombo.style.r;else r = Math.max(style.r, size[0] / 2) || size[0] / 2;\n }\n style.r = r + padding;\n var styles = __assign({\n x: 0,\n y: 0\n }, style);\n if (cfg.style) cfg.style.r = r;else {\n cfg.style = {\n r: r\n };\n }\n return styles;\n },\n update: function update(cfg, item) {\n var size = this.getSize(cfg);\n var padding = cfg.padding || this.options.padding;\n if (isArray(padding)) padding = Math.max.apply(Math, padding);\n var cfgStyle = clone(cfg.style);\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n var r;\n if (fixSize) {\n r = isNumber(fixSize) ? fixSize / 2 : fixSize[0] / 2;\n } else {\n r = Math.max(cfgStyle.r, size[0] / 2) || size[0] / 2;\n }\n cfgStyle.r = r + padding;\n var itemCacheSize = item.get('sizeCache');\n if (itemCacheSize) {\n itemCacheSize.r = cfgStyle.r;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, keyShape.attr(), strokeStyle, cfgStyle);\n if (cfg.style) cfg.style.r = r;else {\n cfg.style = {\n r: r\n };\n }\n this.updateShape(cfg, item, style, true);\n }\n}, 'single-combo');","import { __assign } from \"tslib\";\nimport { mix, isNumber, clone, isNil } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\nShape.registerCombo('rect', {\n // 自定义 Combo 时的配置\n options: {\n size: [40, 5],\n padding: [25, 20, 15, 20],\n animate: true,\n style: {\n radius: 0,\n stroke: Global.defaultCombo.style.stroke,\n fill: Global.defaultCombo.style.fill,\n lineWidth: Global.defaultCombo.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.comboLabel.style.fill,\n fontSize: Global.comboLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 连接点,默认为左右\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.comboStateStyles),\n collapsedSubstituteIcon: {\n show: false,\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*RsnHRqLfJn4AAAAAAAAAAAAAARQnAQ'\n }\n },\n shapeType: 'rect',\n labelPosition: 'top',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: 'rect-combo',\n name: 'rect-combo',\n draggable: true\n });\n return keyShape;\n },\n // 私有方法,不希望扩展的 Combo 复写这个方法\n getLabelStyleByPosition: function getLabelStyleByPosition(cfg, labelCfg) {\n var labelPosition = labelCfg.position || this.labelPosition;\n var cfgStyle = cfg.style;\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var refX = labelCfg.refX,\n refY = labelCfg.refY;\n // 考虑 refX 和 refY = 0 的场景,不用用 labelCfg.refX || Global.nodeLabel.refY\n if (isNil(refX)) {\n refX = this.refX; // 不居中时的偏移量\n }\n\n if (isNil(refY)) {\n refY = this.refY; // 不居中时的偏移量\n }\n\n var left = -cfgStyle.width / 2 - padding[3];\n var right = cfgStyle.width / 2 + padding[1];\n var top = -cfgStyle.height / 2 - padding[0];\n var bottom = cfgStyle.height / 2 + padding[2];\n var style;\n switch (labelPosition) {\n case 'top':\n style = {\n x: left + refX,\n y: top + refY,\n textBaseline: 'top',\n textAlign: 'left'\n };\n break;\n case 'bottom':\n style = {\n x: 0,\n y: bottom + refY,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n case 'left':\n style = {\n x: left + refY,\n y: 0,\n textAlign: 'left'\n };\n break;\n case 'center':\n style = {\n x: 0,\n y: 0,\n text: cfg.label,\n textAlign: 'center'\n };\n break;\n case 'top-center':\n style = {\n x: 0,\n y: top + refY,\n textBaseline: 'top',\n textAlign: 'center'\n };\n break;\n default:\n style = {\n x: right + refX,\n y: 0,\n textAlign: 'right'\n };\n break;\n }\n style.text = cfg.label;\n return style;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n var size = this.getSize(cfg);\n var width;\n var height;\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n if (fixSize) {\n if (isNumber(fixSize)) {\n width = fixSize;\n height = fixSize;\n } else {\n width = fixSize[0];\n height = fixSize[1];\n }\n } else {\n if (!isNumber(style.width) || isNaN(style.width)) width = size[0] || Global.defaultCombo.style.width;else width = Math.max(style.width, size[0]) || size[0];\n if (!isNumber(style.height) || isNaN(style.height)) height = size[1] || Global.defaultCombo.style.height;else height = Math.max(style.height, size[1]) || size[1];\n }\n var x = -width / 2 - padding[3];\n var y = -height / 2 - padding[0];\n style.width = width + padding[1] + padding[3];\n style.height = height + padding[0] + padding[2];\n var styles = __assign({\n x: x,\n y: y\n }, style);\n if (!cfg.style) {\n cfg.style = {\n width: width,\n height: height\n };\n } else {\n cfg.style.width = width;\n cfg.style.height = height;\n }\n return styles;\n },\n update: function update(cfg, item) {\n var size = this.getSize(cfg);\n var padding = cfg.padding || this.options.padding;\n if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var cfgStyle = clone(cfg.style);\n var width, height;\n var fixSize = cfg.collapsed && cfg.fixCollapseSize ? cfg.fixCollapseSize : cfg.fixSize;\n if (fixSize) {\n if (isNumber(fixSize)) {\n width = fixSize;\n height = fixSize;\n } else {\n width = fixSize[0];\n height = fixSize[1];\n }\n } else {\n width = Math.max(cfgStyle.width, size[0]) || size[0];\n height = Math.max(cfgStyle.height, size[1]) || size[1];\n }\n cfgStyle.width = width + padding[1] + padding[3];\n cfgStyle.height = height + padding[0] + padding[2];\n var itemCacheSize = item.get('sizeCache');\n if (itemCacheSize) {\n itemCacheSize.width = cfgStyle.width;\n itemCacheSize.height = cfgStyle.height;\n }\n cfgStyle.x = -width / 2 - padding[3];\n cfgStyle.y = -height / 2 - padding[0];\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, keyShape.attr(), strokeStyle, cfgStyle);\n if (cfg.style) {\n cfg.style.width = width;\n cfg.style.height = height;\n } else {\n cfg.style = {\n width: width,\n height: height\n };\n }\n this.updateShape(cfg, item, style, false);\n }\n}, 'single-combo');","import { __assign } from \"tslib\";\nimport { deepMix } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\n// 带有图标的圆,可用于拓扑图中\nShape.registerNode('simple-circle', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'simple-circle',\n // 文本位置\n labelPosition: 'center',\n shapeMap: {},\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var name = \"\".concat(this.type, \"-keyShape\");\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: name,\n draggable: true\n });\n group['shapeMap'][name] = keyShape;\n return keyShape;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = deepMix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n r: r\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var size = this.getSize(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n r: size[0] / 2\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = deepMix({}, keyShape.attr(), strokeStyle, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport { mix } from '@antv/util';\nimport Global from '../../global';\nimport Shape from '../shape';\nShape.registerNode('simple-rect', {\n // 自定义节点时的配置\n options: {\n size: [100, 30],\n style: {\n radius: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'simple-rect',\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n return keyShape;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var size = this.getSize(cfg);\n var keyShape = item.get('keyShape');\n if (!cfg.size) {\n size[0] = keyShape.attr('width') || defaultStyle.width;\n size[1] = keyShape.attr('height') || defaultStyle.height;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n x: -size[0] / 2,\n y: -size[1] / 2,\n width: size[0],\n height: size[1]\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, false, updateType);\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport Shape from '../shape';\nimport Global from '../../global';\n/**\n * 基本的图片,可以添加文本,默认文本在图片的下面\n */\nShape.registerNode('image', {\n options: {\n img: 'https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*eD7nT6tmYgAAAAAAAAAAAABkARQnAQ',\n size: 200,\n labelCfg: {\n style: {\n fontFamily: Global.windowFontFamily\n }\n },\n clipCfg: {\n show: false,\n type: 'circle',\n // circle\n r: 50,\n // ellipse\n rx: 50,\n ry: 35,\n // rect\n width: 50,\n height: 35,\n // polygon\n points: [[30, 12], [12, 30], [30, 48], [48, 30]],\n // path\n path: [['M', 25, 25], ['L', 50, 25], ['A', 12.5, 12.5, 0, 1, 1, 50, 50], ['A', 12.5, 12.5, 0, 1, 0, 50, 50], ['L', 25, 75], ['Z']],\n // 坐标\n x: 0,\n y: 0\n // clip 的属性样式\n // style: {\n // lineWidth: 1\n // },\n }\n },\n\n shapeType: 'image',\n labelPosition: 'bottom',\n drawShape: function drawShape(cfg, group) {\n var shapeType = this.shapeType;\n var style = this.getShapeStyle(cfg);\n delete style.fill;\n var shape = group.addShape(shapeType, {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n this.drawClip(cfg, shape);\n return shape;\n },\n drawClip: function drawClip(cfg, shape) {\n var clip = (this.mergeStyle || this.getOptions(cfg)).clipCfg;\n if (!clip.show) {\n return;\n }\n // 支持 circle、rect、ellipse、Polygon 及自定义 path clip\n var type = clip.type,\n x = clip.x,\n y = clip.y,\n style = clip.style;\n if (type === 'circle') {\n var r = clip.r;\n shape.setClip({\n type: 'circle',\n attrs: __assign({\n r: r,\n x: x,\n y: y\n }, style)\n });\n } else if (type === 'rect') {\n var width = clip.width,\n height = clip.height;\n var rectX = x - width / 2;\n var rectY = y - height / 2;\n shape.setClip({\n type: 'rect',\n attrs: __assign({\n x: rectX,\n y: rectY,\n width: width,\n height: height\n }, style)\n });\n } else if (type === 'ellipse') {\n var rx = clip.rx,\n ry = clip.ry;\n shape.setClip({\n type: 'ellipse',\n attrs: __assign({\n x: x,\n y: y,\n rx: rx,\n ry: ry\n }, style)\n });\n } else if (type === 'polygon') {\n var points = clip.points;\n shape.setClip({\n type: 'polygon',\n attrs: __assign({\n points: points\n }, style)\n });\n } else if (type === 'path') {\n var path = clip.path;\n shape.setClip({\n type: 'path',\n attrs: __assign({\n path: path\n }, style)\n });\n }\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n defaultStyle = _a.style,\n img = _a.img;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (defaultStyle) {\n width = defaultStyle.width || size[0];\n height = defaultStyle.height || size[1];\n }\n var style = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height,\n img: img\n }, defaultStyle);\n return style;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item) {\n var group = item.getContainer();\n var shapeClassName = \"\".concat(this.itemType, \"-shape\");\n var shape = group['shapeMap'][shapeClassName] || group.find(function (element) {\n return element.get('className') === shapeClassName;\n }) || item.getKeyShape();\n var shapeStyle = this.getShapeStyle(cfg);\n if (shape && !shape.destroyed) {\n shape.attr(shapeStyle);\n }\n }\n}, 'single-node');","export default {\n triangle: function triangle(width, length, d) {\n if (width === void 0) {\n width = 10;\n }\n if (length === void 0) {\n length = 15;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + length, \",-\").concat(width / 2, \" L \").concat(begin + length, \",\").concat(width / 2, \" Z\");\n return path;\n },\n vee: function vee(width, length, d) {\n if (width === void 0) {\n width = 15;\n }\n if (length === void 0) {\n length = 20;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + length, \",-\").concat(width / 2, \"\\n L \").concat(begin + 2 * length / 3, \",0 L \").concat(begin + length, \",\").concat(width / 2, \" Z\");\n return path;\n },\n circle: function circle(r, d) {\n if (r === void 0) {\n r = 5;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \", 0\\n a \").concat(r, \",\").concat(r, \" 0 1,0 \").concat(r * 2, \",0\\n a \").concat(r, \",\").concat(r, \" 0 1,0 \").concat(-r * 2, \",0\");\n return path;\n },\n rect: function rect(width, length, d) {\n if (width === void 0) {\n width = 10;\n }\n if (length === void 0) {\n length = 10;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",\").concat(width / 2, \" \\n L \").concat(begin, \",\").concat(width / 2, \" Z\");\n return path;\n },\n diamond: function diamond(width, length, d) {\n if (width === void 0) {\n width = 15;\n }\n if (length === void 0) {\n length = 15;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var path = \"M \".concat(begin, \",0 \\n L \").concat(begin + length / 2, \",\").concat(-width / 2, \" \\n L \").concat(begin + length, \",0 \\n L \").concat(begin + length / 2, \",\").concat(width / 2, \" Z\");\n return path;\n },\n triangleRect: function triangleRect(tWidth, tLength, rWidth, rLength, gap, d) {\n if (tWidth === void 0) {\n tWidth = 15;\n }\n if (tLength === void 0) {\n tLength = 15;\n }\n if (rWidth === void 0) {\n rWidth = 15;\n }\n if (rLength === void 0) {\n rLength = 3;\n }\n if (gap === void 0) {\n gap = 5;\n }\n if (d === void 0) {\n d = 0;\n }\n var begin = d * 2;\n var rectBegin = begin + tLength + gap;\n var path = \"M \".concat(begin, \",0 L \").concat(begin + tLength, \",-\").concat(tWidth / 2, \" L \").concat(begin + tLength, \",\").concat(tWidth / 2, \" Z\\n M \").concat(rectBegin, \", -\").concat(rWidth / 2, \"\\n L \").concat(rectBegin + rLength, \" -\").concat(rWidth / 2, \"\\n L \").concat(rectBegin + rLength, \" \").concat(rWidth / 2, \"\\n L \").concat(rectBegin, \" \").concat(rWidth / 2, \"\\n Z\");\n return path;\n }\n};","export default {\n collapse: function collapse(x, y, r) {\n return [['M', x - r, y], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0], ['M', x - r + 4, y], ['L', x + r - 4, y]];\n },\n expand: function expand(x, y, r) {\n return [['M', x - r, y], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0], ['M', x - r + 4, y], ['L', x - r + 2 * r - 4, y], ['M', x - r + r, y - r + 4], ['L', x, y + r - 4]];\n },\n upTriangle: function upTriangle(x, y, r) {\n var l1 = r * Math.cos(Math.PI / 6);\n var l2 = r * Math.sin(Math.PI / 6);\n return [['M', x - l1, y + l2], ['L', x + l1, y + l2], ['L', x, y - r], ['Z']];\n },\n downTriangle: function downTriangle(x, y, r) {\n var l1 = r * Math.cos(Math.PI / 6);\n var l2 = r * Math.sin(Math.PI / 6);\n return [['M', x - l1, y - l2], ['L', x + l1, y - l2], ['L', x, y + r], ['Z']];\n }\n};","export var defaultSubjectColors = ['#5F95FF', '#61DDAA', '#65789B', '#F6BD16', '#7262FD', '#78D3F8', '#9661BC', '#F6903D', '#008685', '#F08BB4'];","export var isForce = function isForce(layoutType) {\n return layoutType === 'force' || layoutType === 'g6force' || layoutType === 'gForce' || layoutType === 'force2';\n};","import { __assign } from \"tslib\";\nimport * as MathUtil from './math';\nimport * as GraphicUtil from './graphic';\nimport * as PathUtil from './path';\nimport * as BaseUtil from './base';\nimport * as ColorUtil from './color';\nimport * as LayoutUtil from './layout';\nimport { ext, mat3 } from '@antv/matrix-util';\nvar transform = ext.transform;\nvar Util = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, BaseUtil), GraphicUtil), PathUtil), MathUtil), ColorUtil), LayoutUtil), {\n transform: transform,\n mat3: mat3\n});\nexport default Util;","import { __assign, __awaiter, __generator, __rest } from \"tslib\";\nimport { isFunction, groupBy } from '@antv/util';\nimport { isNaN, calculationItemsBBox } from '../../util/base';\nimport { isForce } from '../../util/layout';\nvar LayoutController = /** @class */function () {\n function LayoutController(graph) {\n this.graph = graph;\n this.layoutCfg = graph.get('layout') || {};\n this.layoutType = this.getLayoutType();\n this.layoutMethods = [];\n this.initLayout();\n }\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.initLayout = function () {\n // no data before rendering\n };\n LayoutController.prototype.getLayoutType = function () {\n return this.getLayoutCfgType(this.layoutCfg);\n };\n LayoutController.prototype.getLayoutCfgType = function (layoutCfg) {\n var type = layoutCfg.type;\n // type should be top priority\n if (type) {\n return type;\n }\n var pipes = layoutCfg.pipes;\n if (Array.isArray(pipes)) {\n return pipes.map(function (pipe) {\n return (pipe === null || pipe === void 0 ? void 0 : pipe.type) || '';\n });\n }\n return null;\n };\n LayoutController.prototype.isLayoutTypeSame = function (cfg) {\n var current = this.getLayoutCfgType(cfg);\n var preHasPipes = Array.isArray(this.layoutType);\n var currentHasPipes = Array.isArray(current);\n // already has pipes, and the new one is pipes\n if (preHasPipes && currentHasPipes) {\n return this.layoutType.every(function (type, index) {\n return type === current[index];\n });\n }\n // only one of the pre and current is pipes\n if (Array.isArray(current) || Array.isArray(this.layoutType)) {\n return false;\n }\n // both of the pre and current are not pipes\n return (cfg === null || cfg === void 0 ? void 0 : cfg.type) === this.layoutType;\n };\n // 绘制\n LayoutController.prototype.refreshLayout = function () {\n var _a = this,\n graph = _a.graph,\n layoutType = _a.layoutType,\n _b = _a.layoutCfg,\n layoutCfg = _b === void 0 ? {} : _b;\n if (!graph) return;\n var animate = layoutCfg.animate;\n var isDefaultAnimateLayout = animate === undefined && (layoutType === 'force' || layoutType === 'force2');\n var forceAnimate = isForce(layoutType) && (animate || isDefaultAnimateLayout);\n if (graph.get('animate') && !forceAnimate) {\n graph.positionsAnimate(layoutType === 'comboCombined');\n } else {\n graph.refreshPositions(layoutType === 'comboCombined');\n }\n };\n // 更换布局\n LayoutController.prototype.changeLayout = function (cfg) {\n var disableTriggerLayout = cfg.disableTriggerLayout,\n otherCfgs = __rest(cfg, [\"disableTriggerLayout\"]);\n this.layoutCfg = otherCfgs;\n this.layoutType = otherCfgs.type || this.layoutType;\n // 不触发重新布局,仅更新参数\n if (disableTriggerLayout) return;\n this.layout();\n };\n // 更换数据\n LayoutController.prototype.changeData = function (success) {\n this.layout(success);\n };\n LayoutController.prototype.destoryLayoutMethods = function () {\n var layoutMethods = this.layoutMethods;\n var destroyedLayoutTypes = [];\n layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.forEach(function (layoutMethod) {\n var _a;\n var layoutType = (_a = layoutMethod.getType) === null || _a === void 0 ? void 0 : _a.call(layoutMethod);\n if (layoutType) destroyedLayoutTypes.push(layoutType);\n layoutMethod.destroy();\n });\n this.layoutMethods = [];\n return destroyedLayoutTypes;\n };\n // 销毁布局,不能使用 this.destroy,因为 controller 还需要被使用,只是把布局算法销毁\n LayoutController.prototype.destroyLayout = function () {\n this.destoryLayoutMethods();\n var graph = this.graph;\n if (graph && !graph.get('destroyed')) {\n graph.set('layout', undefined);\n }\n this.layoutCfg = undefined;\n this.layoutType = undefined;\n this.layoutMethods = undefined;\n };\n // 从 this.graph 获取数据\n LayoutController.prototype.setDataFromGraph = function () {\n var _a;\n var nodes = [];\n var hiddenNodes = [];\n var edges = [];\n var hiddenEdges = [];\n var comboEdges = [];\n var combos = [];\n var hiddenCombos = [];\n var nodeItems = this.graph.getNodes();\n var edgeItems = this.graph.getEdges();\n var comboItems = this.graph.getCombos();\n var nodeLength = nodeItems.length;\n for (var i = 0; i < nodeLength; i++) {\n var nodeItem = nodeItems[i];\n if (!nodeItem || nodeItem.destroyed) continue;\n var model = nodeItem.getModel();\n if (!nodeItem.isVisible()) {\n hiddenNodes.push(model);\n continue;\n }\n nodes.push(model);\n }\n var edgeLength = edgeItems.length;\n for (var i = 0; i < edgeLength; i++) {\n var edgeItem = edgeItems[i];\n if (!edgeItem || edgeItem.destroyed) continue;\n var model = edgeItem.getModel();\n if (!edgeItem.isVisible()) {\n hiddenEdges.push(model);\n continue;\n }\n if (!model.isComboEdge) edges.push(model);else comboEdges.push(model);\n }\n var comboLength = comboItems.length;\n for (var i = 0; i < comboLength; i++) {\n var comboItem = comboItems[i];\n if (comboItem.destroyed) continue;\n var model = comboItem.getModel();\n if (!comboItem.isVisible()) {\n hiddenCombos.push(model);\n continue;\n }\n combos.push(model);\n }\n return {\n nodes: nodes,\n hiddenNodes: hiddenNodes,\n edges: edges,\n hiddenEdges: hiddenEdges,\n combos: combos,\n hiddenCombos: hiddenCombos,\n comboEdges: comboEdges,\n vedges: (_a = this.graph.get('vedges')) === null || _a === void 0 ? void 0 : _a.map(function (edge) {\n return edge.getModel();\n })\n };\n };\n // 重新布局\n LayoutController.prototype.relayout = function (reloadData) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n layoutMethods = _a.layoutMethods,\n layoutCfg = _a.layoutCfg;\n if (!graph || graph.get('destroyed')) return;\n var start = Promise.resolve();\n if (reloadData) {\n this.data = this.setDataFromGraph();\n var nodes = this.data.nodes;\n if (!nodes) {\n return false;\n }\n start = this.initPositions(layoutCfg.center, nodes);\n }\n graph.emit('beforelayout');\n layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.forEach(function (layoutMethod, index) {\n var currentCfg = layoutCfg[index] || layoutCfg;\n start = start.then(function () {\n var _a;\n var relayoutPromise = _this.execLayoutMethod(currentCfg, index);\n if (index === layoutMethods.length - 1) {\n (_a = layoutCfg.onAllLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(layoutCfg);\n }\n return relayoutPromise;\n });\n });\n };\n // 筛选参与布局的nodes和edges\n LayoutController.prototype.filterLayoutData = function (data, cfg) {\n var nodes = data.nodes,\n edges = data.edges,\n rest = __rest(data, [\"nodes\", \"edges\"]);\n if (!nodes) {\n return data;\n }\n var nodesFilter;\n var edegsFilter;\n if (isFunction(cfg === null || cfg === void 0 ? void 0 : cfg.nodesFilter)) {\n nodesFilter = cfg.nodesFilter;\n } else {\n nodesFilter = function nodesFilter() {\n return true;\n };\n }\n var fNodes = nodes.filter(nodesFilter);\n if (isFunction(cfg === null || cfg === void 0 ? void 0 : cfg.edgesFilter)) {\n edegsFilter = cfg.edgesFilter;\n } else {\n var nodesMap_1 = fNodes.reduce(function (acc, cur) {\n acc[cur.id] = true;\n return acc;\n }, {});\n edegsFilter = function edegsFilter(edge) {\n return nodesMap_1[edge.source] && nodesMap_1[edge.target];\n };\n }\n return __assign({\n nodes: fNodes,\n edges: edges.filter(edegsFilter)\n }, rest);\n };\n LayoutController.prototype.getLayoutBBox = function (nodes) {\n var graph = this.graph;\n var graphGroupNodes = groupBy(graph.getNodes(), function (n) {\n return n.getModel().layoutOrder;\n });\n var layoutNodes = Object.values(graphGroupNodes).map(function (value) {\n var bbox = calculationItemsBBox(value);\n bbox.size = [bbox.width, bbox.height];\n return bbox;\n });\n var groupNodes = Object.values(groupBy(nodes, 'layoutOrder'));\n return {\n groupNodes: groupNodes,\n layoutNodes: layoutNodes\n };\n };\n // 控制布局动画\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.layoutAnimate = function () {};\n // 将当前节点的平均中心移动到原点\n LayoutController.prototype.moveToZero = function () {\n var graph = this.graph;\n var data = graph.get('data');\n var nodes = data.nodes;\n if (nodes[0].x === undefined || nodes[0].x === null || isNaN(nodes[0].x)) {\n return;\n }\n var meanCenter = [0, 0];\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n meanCenter[0] += node.x;\n meanCenter[1] += node.y;\n }\n meanCenter[0] /= nodes.length;\n meanCenter[1] /= nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n node.x -= meanCenter[0];\n node.y -= meanCenter[1];\n }\n };\n // 初始化节点到 center 附近\n LayoutController.prototype.initPositions = function (center, nodes) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var graph, nodesToInit, nodeLength;\n return __generator(this, function (_b) {\n graph = this.graph;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n return [2 /*return*/, Promise.resolve()];\n }\n nodesToInit = nodes.filter(function (node) {\n return isNaN(node.x) || isNaN(node.y);\n });\n nodeLength = nodesToInit ? nodesToInit.length : 0;\n if (!nodeLength) return [2 /*return*/];\n return [2 /*return*/, (_a = this.initWithPreset) === null || _a === void 0 ? void 0 : _a.call(this, function () {},\n // onFullfillment\n function () {\n var width = graph.get('width') * 0.85;\n var height = graph.get('height') * 0.85;\n var horiNum = Math.ceil(Math.sqrt(nodeLength) * (width / height));\n var vertiNum = Math.ceil(nodeLength / horiNum);\n var horiGap = width / (horiNum - 1);\n var vertiGap = height / (vertiNum - 1);\n if (!isFinite(horiGap) || !horiGap) horiGap = 0;\n if (!isFinite(vertiGap) || !horiGap) vertiGap = 0;\n var beginX = center[0] - width / 2;\n var beginY = center[1] - height / 2;\n var allHavePos = true;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodesToInit[i];\n if (isNaN(+node.x)) {\n allHavePos = false;\n node.x = i % horiNum * horiGap + beginX;\n }\n if (isNaN(+node.y)) {\n allHavePos = false;\n node.y = Math.floor(i / horiNum) * vertiGap + beginY;\n }\n }\n })];\n });\n });\n };\n LayoutController.prototype.destroy = function () {\n this.graph = null;\n this.destoryLayoutMethods();\n this.destroyed = true;\n };\n return LayoutController;\n}();\nexport default LayoutController;","var EventController = /** @class */function () {\n function EventController(graph) {\n this.graph = graph;\n this.destroyed = false;\n this.initEvents();\n }\n return EventController;\n}();\nexport default EventController;","import Behavior from './behavior';\nimport AbstractGraph from './graph/graph';\nimport Shape, { Arrow, Marker } from './element';\nimport Global from './global';\nimport Util from './util';\n// 用于 PC 和 Mobile 端分别实现 layout 和 updateLayoutCfg 方法\nimport AbstractLayout from './graph/controller/layout';\nimport AbstractEvent from './graph/controller/event';\nimport Node from './item/node';\nimport Edge from './item/edge';\nimport Hull from './item/hull';\nimport Combo from './item/combo';\nvar registerNode = Shape.registerNode;\nvar registerEdge = Shape.registerEdge;\nvar registerCombo = Shape.registerCombo;\nvar registerBehavior = Behavior.registerBehavior;\nvar BaseGlobal = Global;\nexport * from './types';\nexport { Arrow, Shape, Node, Edge, Combo, Hull, Marker, registerNode, registerCombo, AbstractGraph, Util, registerEdge, registerBehavior, AbstractLayout, AbstractEvent, BaseGlobal };\nexport default {\n version: Global.version,\n AbstractGraph: AbstractGraph,\n BaseGlobal: BaseGlobal,\n Util: Util,\n Shape: Shape,\n Node: Node,\n Edge: Edge,\n Combo: Combo,\n Hull: Hull,\n registerNode: Shape.registerNode,\n registerEdge: Shape.registerEdge,\n registerCombo: Shape.registerCombo,\n registerBehavior: Behavior.registerBehavior,\n Arrow: Arrow,\n Marker: Marker,\n AbstractLayout: AbstractLayout,\n AbstractEvent: AbstractEvent\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MESSAGE = exports.ALGORITHM = void 0;\nvar ALGORITHM = {\n pageRank: 'pageRank',\n breadthFirstSearch: 'breadthFirstSearch',\n connectedComponent: 'connectedComponent',\n depthFirstSearch: 'depthFirstSearch',\n detectCycle: 'detectCycle',\n detectDirectedCycle: 'detectDirectedCycle',\n detectAllCycles: 'detectAllCycles',\n detectAllDirectedCycle: 'detectAllDirectedCycle',\n detectAllUndirectedCycle: 'detectAllUndirectedCycle',\n dijkstra: 'dijkstra',\n findAllPath: 'findAllPath',\n findShortestPath: 'findShortestPath',\n floydWarshall: 'floydWarshall',\n getAdjMatrix: 'getAdjMatrix',\n getDegree: 'getDegree',\n getInDegree: 'getInDegree',\n getNeighbors: 'getNeighbors',\n getOutDegree: 'getOutDegree',\n labelPropagation: 'labelPropagation',\n louvain: 'louvain',\n GADDI: 'GADDI',\n minimumSpanningTree: 'minimumSpanningTree',\n SUCCESS: 'SUCCESS',\n FAILURE: 'FAILURE'\n};\nexports.ALGORITHM = ALGORITHM;\nvar MESSAGE = {\n SUCCESS: 'SUCCESS',\n FAILURE: 'FAILURE'\n};\nexports.MESSAGE = MESSAGE;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar adjMatrix = function adjMatrix(graphData, directed) {\n var nodes = graphData.nodes,\n edges = graphData.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error(\"invalid nodes data!\");\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n if (edges) {\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (!sIndex && sIndex !== 0 || !tIndex && tIndex !== 0) return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n }\n return matrix;\n};\nvar _default = adjMatrix;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.LinkedListNode = void 0;\nvar defaultComparator = function defaultComparator(a, b) {\n if (a === b) {\n return true;\n }\n return false;\n};\n/**\n * 链表中单个元素节点\n */\nvar LinkedListNode = /** @class */function () {\n function LinkedListNode(value, next) {\n if (next === void 0) {\n next = null;\n }\n this.value = value;\n this.next = next;\n }\n LinkedListNode.prototype.toString = function (callback) {\n return callback ? callback(this.value) : \"\".concat(this.value);\n };\n return LinkedListNode;\n}();\nexports.LinkedListNode = LinkedListNode;\nvar LinkedList = /** @class */function () {\n function LinkedList(comparator) {\n if (comparator === void 0) {\n comparator = defaultComparator;\n }\n this.head = null;\n this.tail = null;\n this.compare = comparator;\n }\n /**\n * 将指定元素添加到链表头部\n * @param value\n */\n LinkedList.prototype.prepend = function (value) {\n // 在头部添加一个节点\n var newNode = new LinkedListNode(value, this.head);\n this.head = newNode;\n if (!this.tail) {\n this.tail = newNode;\n }\n return this;\n };\n /**\n * 将指定元素添加到链表中\n * @param value\n */\n LinkedList.prototype.append = function (value) {\n var newNode = new LinkedListNode(value);\n // 如果不存在头节点,则将创建的新节点作为头节点\n if (!this.head) {\n this.head = newNode;\n this.tail = newNode;\n return this;\n }\n // 将新节点附加到链表末尾\n this.tail.next = newNode;\n this.tail = newNode;\n return this;\n };\n /**\n * 删除指定元素\n * @param value 要删除的元素\n */\n LinkedList.prototype.delete = function (value) {\n if (!this.head) {\n return null;\n }\n var deleteNode = null;\n // 如果删除的是头部元素,则将next作为头元素\n while (this.head && this.compare(this.head.value, value)) {\n deleteNode = this.head;\n this.head = this.head.next;\n }\n var currentNode = this.head;\n if (currentNode !== null) {\n // 如果删除了节点以后,将next节点前移\n while (currentNode.next) {\n if (this.compare(currentNode.next.value, value)) {\n deleteNode = currentNode.next;\n currentNode.next = currentNode.next.next;\n } else {\n currentNode = currentNode.next;\n }\n }\n }\n // 检查尾部节点是否被删除\n if (this.compare(this.tail.value, value)) {\n this.tail = currentNode;\n }\n return deleteNode;\n };\n /**\n * 查找指定的元素\n * @param param0\n */\n LinkedList.prototype.find = function (_a) {\n var _b = _a.value,\n value = _b === void 0 ? undefined : _b,\n _c = _a.callback,\n callback = _c === void 0 ? undefined : _c;\n if (!this.head) {\n return null;\n }\n var currentNode = this.head;\n while (currentNode) {\n // 如果指定了 callback,则按指定的 callback 查找\n if (callback && callback(currentNode.value)) {\n return currentNode;\n }\n // 如果指定了 value,则按 value 查找\n if (value !== undefined && this.compare(currentNode.value, value)) {\n return currentNode;\n }\n currentNode = currentNode.next;\n }\n return null;\n };\n /**\n * 删除尾部节点\n */\n LinkedList.prototype.deleteTail = function () {\n var deletedTail = this.tail;\n if (this.head === this.tail) {\n // 链表中只有一个元素\n this.head = null;\n this.tail = null;\n return deletedTail;\n }\n var currentNode = this.head;\n while (currentNode.next) {\n if (!currentNode.next.next) {\n currentNode.next = null;\n } else {\n currentNode = currentNode.next;\n }\n }\n this.tail = currentNode;\n return deletedTail;\n };\n /**\n * 删除头部节点\n */\n LinkedList.prototype.deleteHead = function () {\n if (!this.head) {\n return null;\n }\n var deletedHead = this.head;\n if (this.head.next) {\n this.head = this.head.next;\n } else {\n this.head = null;\n this.tail = null;\n }\n return deletedHead;\n };\n /**\n * 将一组元素转成链表中的节点\n * @param values 链表中的元素\n */\n LinkedList.prototype.fromArray = function (values) {\n var _this = this;\n values.forEach(function (value) {\n return _this.append(value);\n });\n return this;\n };\n /**\n * 将链表中的节点转成数组元素\n */\n LinkedList.prototype.toArray = function () {\n var nodes = [];\n var currentNode = this.head;\n while (currentNode) {\n nodes.push(currentNode);\n currentNode = currentNode.next;\n }\n return nodes;\n };\n /**\n * 反转链表中的元素节点\n */\n LinkedList.prototype.reverse = function () {\n var currentNode = this.head;\n var prevNode = null;\n var nextNode = null;\n while (currentNode) {\n // 存储下一个元素节点\n nextNode = currentNode.next;\n // 更改当前节点的下一个节点,以便将它连接到上一个节点上\n currentNode.next = prevNode;\n // 将 prevNode 和 currentNode 向前移动一步\n prevNode = currentNode;\n currentNode = nextNode;\n }\n this.tail = this.head;\n this.head = prevNode;\n };\n LinkedList.prototype.toString = function (callback) {\n if (callback === void 0) {\n callback = undefined;\n }\n return this.toArray().map(function (node) {\n return node.toString(callback);\n }).toString();\n };\n return LinkedList;\n}();\nvar _default = LinkedList;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _linkedList = _interopRequireDefault(require(\"./linked-list\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar Queue = /** @class */function () {\n function Queue() {\n this.linkedList = new _linkedList.default();\n }\n /**\n * 队列是否为空\n */\n Queue.prototype.isEmpty = function () {\n return !this.linkedList.head;\n };\n /**\n * 读取队列头部的元素, 不删除队列中的元素\n */\n Queue.prototype.peek = function () {\n if (!this.linkedList.head) {\n return null;\n }\n return this.linkedList.head.value;\n };\n /**\n * 在队列的尾部新增一个元素\n * @param value\n */\n Queue.prototype.enqueue = function (value) {\n this.linkedList.append(value);\n };\n /**\n * 删除队列中的头部元素,如果队列为空,则返回 null\n */\n Queue.prototype.dequeue = function () {\n var removeHead = this.linkedList.deleteHead();\n return removeHead ? removeHead.value : null;\n };\n Queue.prototype.toString = function (callback) {\n return this.linkedList.toString(callback);\n };\n return Queue;\n}();\nvar _default = Queue;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.uniqueId = exports.getOutEdgesNodeId = exports.getNeighbors = exports.getEdgesByNodeId = void 0;\n/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nvar getNeighbors = function getNeighbors(nodeId, edges, type) {\n if (edges === void 0) {\n edges = [];\n }\n var currentEdges = edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n if (type === 'target') {\n // 当前节点为 source,它所指向的目标节点\n var neighhborsConverter_1 = function neighhborsConverter_1(edge) {\n return edge.source === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_1).map(function (edge) {\n return edge.target;\n });\n }\n if (type === 'source') {\n // 当前节点为 target,它所指向的源节点\n var neighhborsConverter_2 = function neighhborsConverter_2(edge) {\n return edge.target === nodeId;\n };\n return currentEdges.filter(neighhborsConverter_2).map(function (edge) {\n return edge.source;\n });\n }\n // 若未指定 type ,则返回所有邻居\n var neighhborsConverter = function neighhborsConverter(edge) {\n return edge.source === nodeId ? edge.target : edge.source;\n };\n return currentEdges.map(neighhborsConverter);\n};\n/**\n * 获取指定节点的出边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexports.getNeighbors = getNeighbors;\nvar getOutEdgesNodeId = function getOutEdgesNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId;\n });\n};\n/**\n * 获取指定节点的边,包括出边和入边\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n */\nexports.getOutEdgesNodeId = getOutEdgesNodeId;\nvar getEdgesByNodeId = function getEdgesByNodeId(nodeId, edges) {\n return edges.filter(function (edge) {\n return edge.source === nodeId || edge.target === nodeId;\n });\n};\n/**\n * 生成唯一的 ID,规则是序号 + 时间戳\n * @param index 序号\n */\nexports.getEdgesByNodeId = getEdgesByNodeId;\nvar uniqueId = function uniqueId(index) {\n if (index === void 0) {\n index = 0;\n }\n var random1 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n var random2 = \"\".concat(Math.random()).split('.')[1].substr(0, 5);\n return \"\".concat(index, \"-\").concat(random1).concat(random2);\n};\nexports.uniqueId = uniqueId;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _queue = _interopRequireDefault(require(\"./structs/queue\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n *\n * @param callbacks\n * allowTraversal: 确定 BFS 是否从顶点沿着边遍历到其邻居,默认情况下,同一个节点只能遍历一次\n * enterNode: 当 BFS 访问某个节点时调用\n * leaveNode: 当 BFS 访问访问结束某个节点时调用\n */\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n var id = next;\n if (!seen[id]) {\n seen[id] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * 广度优先遍历图\n * @param graph Graph 图实例\n * @param startNode 开始遍历的节点\n * @param originalCallbacks 回调\n */\nvar breadthFirstSearch = function breadthFirstSearch(graphData, startNodeId, originalCallbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n var callbacks = initCallbacks(originalCallbacks);\n var nodeQueue = new _queue.default();\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n // 初始化队列元素\n nodeQueue.enqueue(startNodeId);\n var previousNode = '';\n var _loop_1 = function _loop_1() {\n var currentNode = nodeQueue.dequeue();\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n // 将所有邻居添加到队列中以便遍历\n (0, _util.getNeighbors)(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n nodeQueue.enqueue(nextNode);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n // 下一次循环之前存储当前顶点\n previousNode = currentNode;\n };\n // 遍历队列中的所有顶点\n while (!nodeQueue.isEmpty()) {\n _loop_1();\n }\n};\nvar _default = breadthFirstSearch;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = getConnectedComponents;\nexports.detectStrongConnectComponents = exports.detectConnectedComponents = void 0;\nvar _util = require(\"./util\");\n/**\n * Generate all connected components for an undirected graph\n * @param graph\n */\nvar detectConnectedComponents = function detectConnectedComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allComponents = [];\n var visited = {};\n var nodeStack = [];\n var getComponent = function getComponent(node) {\n nodeStack.push(node);\n visited[node.id] = true;\n var neighbors = (0, _util.getNeighbors)(node.id, edges);\n var _loop_1 = function _loop_1(i) {\n var neighbor = neighbors[i];\n if (!visited[neighbor]) {\n var targetNode = nodes.filter(function (node) {\n return node.id === neighbor;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n }\n };\n for (var i = 0; i < neighbors.length; ++i) {\n _loop_1(i);\n }\n };\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if (!visited[node.id]) {\n // 对于无向图进行dfs遍历,每一次调用后都得到一个连通分量\n getComponent(node);\n var component = [];\n while (nodeStack.length > 0) {\n component.push(nodeStack.pop());\n }\n allComponents.push(component);\n }\n }\n return allComponents;\n};\n/**\n * Tarjan's Algorithm 复杂度 O(|V|+|E|)\n * For directed graph only\n * a directed graph is said to be strongly connected if \"every vertex is reachable from every other vertex\".\n * refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @param graph\n * @return a list of strongly connected components\n */\nexports.detectConnectedComponents = detectConnectedComponents;\nvar detectStrongConnectComponents = function detectStrongConnectComponents(graphData) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeStack = [];\n var inStack = {}; // 辅助判断是否已经在stack中,减少查找开销\n var indices = {};\n var lowLink = {};\n var allComponents = [];\n var index = 0;\n var getComponent = function getComponent(node) {\n // Set the depth index for v to the smallest unused index\n indices[node.id] = index;\n lowLink[node.id] = index;\n index += 1;\n nodeStack.push(node);\n inStack[node.id] = true;\n // 考虑每个邻接点\n var neighbors = (0, _util.getNeighbors)(node.id, edges, 'target').filter(function (n) {\n return nodes.map(function (node) {\n return node.id;\n }).indexOf(n) > -1;\n });\n var _loop_2 = function _loop_2(i) {\n var targetNodeID = neighbors[i];\n if (!indices[targetNodeID] && indices[targetNodeID] !== 0) {\n var targetNode = nodes.filter(function (node) {\n return node.id === targetNodeID;\n });\n if (targetNode.length > 0) {\n getComponent(targetNode[0]);\n }\n // tree edge\n lowLink[node.id] = Math.min(lowLink[node.id], lowLink[targetNodeID]);\n } else if (inStack[targetNodeID]) {\n // back edge, target node is in the current SCC\n lowLink[node.id] = Math.min(lowLink[node.id], indices[targetNodeID]);\n }\n };\n for (var i = 0; i < neighbors.length; i++) {\n _loop_2(i);\n }\n // If node is a root node, generate an SCC\n if (lowLink[node.id] === indices[node.id]) {\n var component = [];\n while (nodeStack.length > 0) {\n var tmpNode = nodeStack.pop();\n inStack[tmpNode.id] = false;\n component.push(tmpNode);\n if (tmpNode === node) break;\n }\n if (component.length > 0) {\n allComponents.push(component);\n }\n }\n };\n for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) {\n var node = nodes_1[_i];\n if (!indices[node.id] && indices[node.id] !== 0) {\n getComponent(node);\n }\n }\n return allComponents;\n};\nexports.detectStrongConnectComponents = detectStrongConnectComponents;\nfunction getConnectedComponents(graphData, directed) {\n if (directed) return detectStrongConnectComponents(graphData);\n return detectConnectedComponents(graphData);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getOutDegree = exports.getInDegree = exports.default = void 0;\nvar degree = function degree(graphData) {\n var degrees = {};\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n nodes.forEach(function (node) {\n degrees[node.id] = {\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n });\n edges.forEach(function (edge) {\n degrees[edge.source].degree++;\n degrees[edge.source].outDegree++;\n degrees[edge.target].degree++;\n degrees[edge.target].inDegree++;\n });\n return degrees;\n};\nvar _default = degree;\n/**\n * 获取指定节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.default = _default;\nvar getInDegree = function getInDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].inDegree;\n }\n return 0;\n};\n/**\n * 获取指定节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getInDegree = getInDegree;\nvar getOutDegree = function getOutDegree(graphData, nodeId) {\n var nodeDegree = degree(graphData);\n if (nodeDegree[nodeId]) {\n return degree(graphData)[nodeId].outDegree;\n }\n return 0;\n};\nexports.getOutDegree = getOutDegree;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = depthFirstSearch;\nvar _util = require(\"./util\");\nfunction initCallbacks(callbacks) {\n if (callbacks === void 0) {\n callbacks = {};\n }\n var initiatedCallback = callbacks;\n var stubCallback = function stubCallback() {};\n var allowTraversalCallback = function () {\n var seen = {};\n return function (_a) {\n var next = _a.next;\n if (!seen[next]) {\n seen[next] = true;\n return true;\n }\n return false;\n };\n }();\n initiatedCallback.allowTraversal = callbacks.allowTraversal || allowTraversalCallback;\n initiatedCallback.enter = callbacks.enter || stubCallback;\n initiatedCallback.leave = callbacks.leave || stubCallback;\n return initiatedCallback;\n}\n/**\n * @param {Graph} graph\n * @param {GraphNode} currentNode\n * @param {GraphNode} previousNode\n * @param {Callbacks} callbacks\n */\nfunction depthFirstSearchRecursive(graphData, currentNode, previousNode, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n callbacks.enter({\n current: currentNode,\n previous: previousNode\n });\n var _a = graphData.edges,\n edges = _a === void 0 ? [] : _a;\n (0, _util.getNeighbors)(currentNode, edges, directed ? 'target' : undefined).forEach(function (nextNode) {\n if (callbacks.allowTraversal({\n previous: previousNode,\n current: currentNode,\n next: nextNode\n })) {\n depthFirstSearchRecursive(graphData, nextNode, currentNode, callbacks, directed);\n }\n });\n callbacks.leave({\n current: currentNode,\n previous: previousNode\n });\n}\n/**\n * 深度优先遍历图\n * @param data GraphData 图数据\n * @param startNodeId 开始遍历的节点的 ID\n * @param originalCallbacks 回调\n */\nfunction depthFirstSearch(graphData, startNodeId, callbacks, directed) {\n if (directed === void 0) {\n directed = true;\n }\n depthFirstSearchRecursive(graphData, startNodeId, '', initCallbacks(callbacks), directed);\n}","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.detectAllUndirectedCycle = exports.detectAllDirectedCycle = exports.detectAllCycles = exports.default = void 0;\nvar _dfs = _interopRequireDefault(require(\"./dfs\"));\nvar _connectedComponent = _interopRequireWildcard(require(\"./connected-component\"));\nvar _util = require(\"./util\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar detectDirectedCycle = function detectDirectedCycle(graphData) {\n var cycle = null;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n var dfsParentMap = {};\n // 所有没有被访问的节点集合\n var unvisitedSet = {};\n // 正在被访问的节点集合\n var visitingSet = {};\n // 所有已经被访问过的节点集合\n var visitedSet = {};\n // 初始化 unvisitedSet\n nodes.forEach(function (node) {\n unvisitedSet[node.id] = node;\n });\n var callbacks = {\n enter: function enter(_a) {\n var currentNode = _a.current,\n previousNode = _a.previous;\n if (visitingSet[currentNode]) {\n // 如果当前节点正在访问中,则说明检测到环路了\n cycle = {};\n var currentCycleNode = currentNode;\n var previousCycleNode = previousNode;\n while (previousCycleNode !== currentNode) {\n cycle[currentCycleNode] = previousCycleNode;\n currentCycleNode = previousCycleNode;\n previousCycleNode = dfsParentMap[previousCycleNode];\n }\n cycle[currentCycleNode] = previousCycleNode;\n } else {\n // 如果不存在正在访问集合中,则将其放入正在访问集合,并从未访问集合中删除\n visitingSet[currentNode] = currentNode;\n delete unvisitedSet[currentNode];\n // 更新 DSF parents 列表\n dfsParentMap[currentNode] = previousNode;\n }\n },\n leave: function leave(_a) {\n var currentNode = _a.current;\n // 如果所有的节点的子节点都已经访问过了,则从正在访问集合中删除掉,并将其移入到已访问集合中,\n // 同时也意味着当前节点的所有邻居节点都被访问过了\n visitedSet[currentNode] = currentNode;\n delete visitingSet[currentNode];\n },\n allowTraversal: function allowTraversal(_a) {\n var nextNode = _a.next;\n // 如果检测到环路则需要终止所有进一步的遍历,否则会导致无限循环遍历\n if (cycle) {\n return false;\n }\n // 仅允许遍历没有访问的节点,visitedSet 中的都已经访问过了\n return !visitedSet[nextNode];\n }\n };\n // 开始遍历节点\n while (Object.keys(unvisitedSet).length) {\n // 从第一个节点开始进行 DFS 遍历\n var firsetUnVisitedKey = Object.keys(unvisitedSet)[0];\n (0, _dfs.default)(graphData, firsetUnVisitedKey, callbacks);\n }\n return cycle;\n};\n/**\n * 检测无向图中的所有Base cycles\n * refer: https://www.codeproject.com/Articles/1158232/Enumerating-All-Cycles-in-an-Undirected-Graph\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回一组base cycles\n */\nvar detectAllUndirectedCycle = function detectAllUndirectedCycle(graphData, nodeIds, include) {\n var _a, _b;\n if (include === void 0) {\n include = true;\n }\n var allCycles = [];\n var components = (0, _connectedComponent.default)(graphData, false);\n // loop through all connected components\n for (var _i = 0, components_1 = components; _i < components_1.length; _i++) {\n var component = components_1[_i];\n if (!component.length) continue;\n var root = component[0];\n var rootId = root.id;\n var stack = [root];\n var parent_1 = (_a = {}, _a[rootId] = root, _a);\n var used = (_b = {}, _b[rootId] = new Set(), _b);\n // walk a spanning tree to find cycles\n while (stack.length > 0) {\n var curNode = stack.pop();\n var curNodeId = curNode.id;\n var neighbors = (0, _util.getNeighbors)(curNodeId, graphData.edges);\n var _loop_1 = function _loop_1(i) {\n var _c;\n var neighborId = neighbors[i];\n var neighbor = graphData.nodes.find(function (node) {\n return node.id === neighborId;\n });\n // const neighborId = neighbor.get('id');\n if (neighborId === curNodeId) {\n // 自环\n allCycles.push((_c = {}, _c[neighborId] = curNode, _c));\n } else if (!(neighborId in used)) {\n // visit a new node\n parent_1[neighborId] = curNode;\n stack.push(neighbor);\n used[neighborId] = new Set([curNode]);\n } else if (!used[curNodeId].has(neighbor)) {\n // a cycle found\n var cycleValid = true;\n var cyclePath = [neighbor, curNode];\n var p = parent_1[curNodeId];\n while (used[neighborId].size && !used[neighborId].has(p)) {\n cyclePath.push(p);\n if (p === parent_1[p.id]) break;else p = parent_1[p.id];\n }\n cyclePath.push(p);\n if (nodeIds && include) {\n // 如果有指定包含的节点\n cycleValid = false;\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = true;\n }\n } else if (nodeIds && !include) {\n // 如果有指定不包含的节点\n if (cyclePath.findIndex(function (node) {\n return nodeIds.indexOf(node.id) > -1;\n }) > -1) {\n cycleValid = false;\n }\n }\n // 把 node list 形式转换为 cycle 的格式\n if (cycleValid) {\n var cycle = {};\n for (var index = 1; index < cyclePath.length; index += 1) {\n cycle[cyclePath[index - 1].id] = cyclePath[index];\n }\n if (cyclePath.length) {\n cycle[cyclePath[cyclePath.length - 1].id] = cyclePath[0];\n }\n allCycles.push(cycle);\n }\n used[neighborId].add(curNode);\n }\n };\n for (var i = 0; i < neighbors.length; i += 1) {\n _loop_1(i);\n }\n }\n }\n return allCycles;\n};\n/**\n * Johnson's algorithm, 时间复杂度 O((V + E)(C + 1))$ and space bounded by O(V + E)\n * refer: https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF\n * refer: https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/cycles.html#simple_cycles\n * @param graph\n * @param nodeIds 节点 ID 的数组\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: INode}] 返回所有的 simple cycles\n */\nexports.detectAllUndirectedCycle = detectAllUndirectedCycle;\nvar detectAllDirectedCycle = function detectAllDirectedCycle(graphData, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n var path = []; // stack of nodes in current path\n var blocked = new Set();\n var B = []; // remember portions of the graph that yield no elementary circuit\n var allCycles = [];\n var idx2Node = {};\n var node2Idx = {};\n // 辅助函数: unblock all blocked nodes\n var unblock = function unblock(thisNode) {\n var stack = [thisNode];\n while (stack.length > 0) {\n var node = stack.pop();\n if (blocked.has(node)) {\n blocked.delete(node);\n B[node.id].forEach(function (n) {\n stack.push(n);\n });\n B[node.id].clear();\n }\n }\n };\n var circuit = function circuit(node, start, adjList) {\n var closed = false; // whether a path is closed\n if (nodeIds && include === false && nodeIds.indexOf(node.id) > -1) return closed;\n path.push(node);\n blocked.add(node);\n var neighbors = adjList[node.id];\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (neighbor === start) {\n var cycle = {};\n for (var index = 1; index < path.length; index += 1) {\n cycle[path[index - 1].id] = path[index];\n }\n if (path.length) {\n cycle[path[path.length - 1].id] = path[0];\n }\n allCycles.push(cycle);\n closed = true;\n } else if (!blocked.has(neighbor)) {\n if (circuit(neighbor, start, adjList)) {\n closed = true;\n }\n }\n }\n if (closed) {\n unblock(node);\n } else {\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = idx2Node[neighbors[i]];\n if (!B[neighbor.id].has(node)) {\n B[neighbor.id].add(node);\n }\n }\n }\n path.pop();\n return closed;\n };\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a;\n // Johnson's algorithm 要求给节点赋顺序,先按节点在数组中的顺序\n for (var i = 0; i < nodes.length; i += 1) {\n var node = nodes[i];\n var nodeId = node.id;\n node2Idx[nodeId] = i;\n idx2Node[i] = node;\n }\n // 如果有指定包含的节点,则把指定节点排序在前,以便提早结束搜索\n if (nodeIds && include) {\n var _loop_2 = function _loop_2(i) {\n var nodeId = nodeIds[i];\n node2Idx[nodes[i].id] = node2Idx[nodeId];\n node2Idx[nodeId] = 0;\n idx2Node[0] = nodes.find(function (node) {\n return node.id === nodeId;\n });\n idx2Node[node2Idx[nodes[i].id]] = nodes[i];\n };\n for (var i = 0; i < nodeIds.length; i++) {\n _loop_2(i);\n }\n }\n // 返回 节点顺序 >= nodeOrder 的强连通分量的adjList\n var getMinComponentAdj = function getMinComponentAdj(components) {\n var _a;\n var minCompIdx;\n var minIdx = Infinity;\n // Find least component and the lowest node\n for (var i = 0; i < components.length; i += 1) {\n var comp = components[i];\n for (var j = 0; j < comp.length; j++) {\n var nodeIdx_1 = node2Idx[comp[j].id];\n if (nodeIdx_1 < minIdx) {\n minIdx = nodeIdx_1;\n minCompIdx = i;\n }\n }\n }\n var component = components[minCompIdx];\n var adjList = [];\n for (var i = 0; i < component.length; i += 1) {\n var node = component[i];\n adjList[node.id] = [];\n for (var _i = 0, _b = (0, _util.getNeighbors)(node.id, graphData.edges, 'target').filter(function (n) {\n return component.map(function (c) {\n return c.id;\n }).indexOf(n) > -1;\n }); _i < _b.length; _i++) {\n var neighbor = _b[_i];\n // 对自环情况 (点连向自身) 特殊处理:记录自环,但不加入adjList\n if (neighbor === node.id && !(include === false && nodeIds.indexOf(node.id) > -1)) {\n allCycles.push((_a = {}, _a[node.id] = node, _a));\n } else {\n adjList[node.id].push(node2Idx[neighbor]);\n }\n }\n }\n return {\n component: component,\n adjList: adjList,\n minIdx: minIdx\n };\n };\n var nodeIdx = 0;\n while (nodeIdx < nodes.length) {\n var subgraphNodes = nodes.filter(function (n) {\n return node2Idx[n.id] >= nodeIdx;\n });\n var sccs = (0, _connectedComponent.detectStrongConnectComponents)({\n nodes: subgraphNodes,\n edges: graphData.edges\n }).filter(function (component) {\n return component.length > 1;\n });\n if (sccs.length === 0) break;\n var scc = getMinComponentAdj(sccs);\n var minIdx = scc.minIdx,\n adjList = scc.adjList,\n component = scc.component;\n if (component.length > 1) {\n component.forEach(function (node) {\n B[node.id] = new Set();\n });\n var startNode = idx2Node[minIdx];\n // startNode 不在指定要包含的节点中,提前结束搜索\n if (nodeIds && include && nodeIds.indexOf(startNode.id) === -1) return allCycles;\n circuit(startNode, startNode, adjList);\n nodeIdx = minIdx + 1;\n } else {\n break;\n }\n }\n return allCycles;\n};\n/**\n * 查找图中所有满足要求的圈\n * @param graph\n * @param directed 是否为有向图\n * @param nodeIds 节点 ID 的数组,若不指定,则返回图中所有的圈\n * @param include 包含或排除指定的节点\n * @return [{[key: string]: Node}] 包含所有环的数组,每个环用一个Object表示,其中key为节点id,value为该节点在环中指向的下一个节点\n */\nexports.detectAllDirectedCycle = detectAllDirectedCycle;\nvar detectAllCycles = function detectAllCycles(graphData, directed, nodeIds, include) {\n if (include === void 0) {\n include = true;\n }\n if (directed) return detectAllDirectedCycle(graphData, nodeIds, include);\n return detectAllUndirectedCycle(graphData, nodeIds, include);\n};\nexports.detectAllCycles = detectAllCycles;\nvar _default = detectDirectedCycle;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _tslib = require(\"tslib\");\nvar _util = require(\"@antv/util\");\nvar _util2 = require(\"./util\");\nvar minVertex = function minVertex(D, nodes, marks) {\n // 找出最小的点\n var minDis = Infinity;\n var minNode;\n for (var i = 0; i < nodes.length; i++) {\n var nodeId = nodes[i].id;\n if (!marks[nodeId] && D[nodeId] <= minDis) {\n minDis = D[nodeId];\n minNode = nodes[i];\n }\n }\n return minNode;\n};\nvar dijkstra = function dijkstra(graphData, source, directed, weightPropertyName) {\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodeIds = [];\n var marks = {};\n var D = {};\n var prevs = {}; // key: 顶点, value: 顶点的前驱点数组(可能有多条等长的最短路径)\n nodes.forEach(function (node, i) {\n var id = node.id;\n nodeIds.push(id);\n D[id] = Infinity;\n if (id === source) D[id] = 0;\n });\n var nodeNum = nodes.length;\n var _loop_1 = function _loop_1(i) {\n // Process the vertices\n var minNode = minVertex(D, nodes, marks);\n var minNodeId = minNode.id;\n marks[minNodeId] = true;\n if (D[minNodeId] === Infinity) return \"continue\"; // Unreachable vertices cannot be the intermediate point\n var relatedEdges = [];\n if (directed) relatedEdges = (0, _util2.getOutEdgesNodeId)(minNodeId, edges);else relatedEdges = (0, _util2.getEdgesByNodeId)(minNodeId, edges);\n relatedEdges.forEach(function (edge) {\n var edgeTarget = edge.target;\n var edgeSource = edge.source;\n var w = edgeTarget === minNodeId ? edgeSource : edgeTarget;\n var weight = weightPropertyName && edge[weightPropertyName] ? edge[weightPropertyName] : 1;\n if (D[w] > D[minNode.id] + weight) {\n D[w] = D[minNode.id] + weight;\n prevs[w] = [minNode.id];\n } else if (D[w] === D[minNode.id] + weight) {\n prevs[w].push(minNode.id);\n }\n });\n };\n for (var i = 0; i < nodeNum; i++) {\n _loop_1(i);\n }\n prevs[source] = [source];\n // 每个节点存可能存在多条最短路径\n var paths = {};\n for (var target in D) {\n if (D[target] !== Infinity) {\n findAllPaths(source, target, prevs, paths);\n }\n }\n // 兼容之前单路径\n var path = {};\n for (var target in paths) {\n path[target] = paths[target][0];\n }\n return {\n length: D,\n path: path,\n allPath: paths\n };\n};\nvar _default = dijkstra;\nexports.default = _default;\nfunction findAllPaths(source, target, prevs, foundPaths) {\n if (source === target) {\n return [source];\n }\n if (foundPaths[target]) {\n return foundPaths[target];\n }\n var paths = [];\n for (var _i = 0, _a = prevs[target]; _i < _a.length; _i++) {\n var prev = _a[_i];\n var prevPaths = findAllPaths(source, prev, prevs, foundPaths);\n if (!prevPaths) return;\n for (var _b = 0, prevPaths_1 = prevPaths; _b < prevPaths_1.length; _b++) {\n var prePath = prevPaths_1[_b];\n if ((0, _util.isArray)(prePath)) paths.push((0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], prePath, true), [target], false));else paths.push([prePath, target]);\n }\n }\n foundPaths[target] = paths;\n return foundPaths[target];\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findShortestPath = exports.findAllPath = void 0;\nvar _dijkstra = _interopRequireDefault(require(\"./dijkstra\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar findShortestPath = function findShortestPath(graphData, start, end, directed, weightPropertyName) {\n var _a = (0, _dijkstra.default)(graphData, start, directed, weightPropertyName),\n length = _a.length,\n path = _a.path,\n allPath = _a.allPath;\n return {\n length: length[end],\n path: path[end],\n allPath: allPath[end]\n };\n};\nexports.findShortestPath = findShortestPath;\nvar findAllPath = function findAllPath(graphData, start, end, directed) {\n var _a;\n if (start === end) return [[start]];\n var _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var visited = [start];\n var isVisited = (_a = {}, _a[start] = true, _a);\n var stack = []; // 辅助栈,用于存储访问过的节点的邻居节点\n var allPath = [];\n var neighbors = directed ? (0, _util.getNeighbors)(start, edges, 'target') : (0, _util.getNeighbors)(start, edges);\n stack.push(neighbors);\n while (visited.length > 0 && stack.length > 0) {\n var children = stack[stack.length - 1];\n if (children.length) {\n var child = children.shift();\n if (child) {\n visited.push(child);\n isVisited[child] = true;\n neighbors = directed ? (0, _util.getNeighbors)(child, edges, 'target') : (0, _util.getNeighbors)(child, edges);\n stack.push(neighbors.filter(function (neighbor) {\n return !isVisited[neighbor];\n }));\n }\n } else {\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n continue;\n }\n if (visited[visited.length - 1] === end) {\n var path = visited.map(function (node) {\n return node;\n });\n allPath.push(path);\n var node = visited.pop();\n isVisited[node] = false;\n stack.pop();\n }\n }\n return allPath;\n};\nexports.findAllPath = findAllPath;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar floydWarshall = function floydWarshall(graphData, directed) {\n var adjacentMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n var dist = [];\n var size = adjacentMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n } else if (adjacentMatrix[i][j] === 0 || !adjacentMatrix[i][j]) {\n dist[i][j] = Infinity;\n } else {\n dist[i][j] = adjacentMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nvar _default = floydWarshall;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nvar labelPropagation = function labelPropagation(graphData, directed, weightPropertyName, maxIteration) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = (0, _util.uniqueId)();\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n });\n ks.push(k);\n });\n var iter = 0;\n var _loop_1 = function _loop_1() {\n var changed = false;\n nodes.forEach(function (node) {\n var neighborClusters = {};\n Object.keys(neighbors[node.id]).forEach(function (neighborId) {\n var neighborWeight = neighbors[node.id][neighborId];\n var neighborNode = nodeMap[neighborId].node;\n var neighborClusterId = neighborNode.clusterId;\n if (!neighborClusters[neighborClusterId]) neighborClusters[neighborClusterId] = 0;\n neighborClusters[neighborClusterId] += neighborWeight;\n });\n // find the cluster with max weight\n var maxWeight = -Infinity;\n var bestClusterIds = [];\n Object.keys(neighborClusters).forEach(function (clusterId) {\n if (maxWeight < neighborClusters[clusterId]) {\n maxWeight = neighborClusters[clusterId];\n bestClusterIds = [clusterId];\n } else if (maxWeight === neighborClusters[clusterId]) {\n bestClusterIds.push(clusterId);\n }\n });\n if (bestClusterIds.length === 1 && bestClusterIds[0] === node.clusterId) return;\n var selfClusterIdx = bestClusterIds.indexOf(node.clusterId);\n if (selfClusterIdx >= 0) bestClusterIds.splice(selfClusterIdx, 1);\n if (bestClusterIds && bestClusterIds.length) {\n changed = true;\n // remove from origin cluster\n var selfCluster = clusters[node.clusterId];\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // move the node to the best cluster\n var randomIdx = Math.floor(Math.random() * bestClusterIds.length);\n var bestCluster = clusters[bestClusterIds[randomIdx]];\n bestCluster.nodes.push(node);\n node.clusterId = bestCluster.id;\n }\n });\n if (!changed) return \"break\";\n iter++;\n };\n while (iter < maxIteration) {\n var state_1 = _loop_1();\n if (state_1 === \"break\") break;\n }\n // delete the empty clusters\n Object.keys(clusters).forEach(function (clusterId) {\n var cluster = clusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete clusters[clusterId];\n }\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(clusters).forEach(function (clusterId) {\n clustersArray.push(clusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nvar _default = labelPropagation;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\n/**\n * 向量运算\n */\n\nvar Vector = /** @class */function () {\n function Vector(arr) {\n this.arr = arr;\n }\n Vector.prototype.getArr = function () {\n return this.arr || [];\n };\n Vector.prototype.add = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] + otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.subtract = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return new Vector(otherArr);\n }\n if (!(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return new Vector(this.arr);\n }\n if (this.arr.length === otherArr.length) {\n var res = [];\n for (var index in this.arr) {\n res[index] = this.arr[index] - otherArr[index];\n }\n return new Vector(res);\n }\n };\n Vector.prototype.avg = function (length) {\n var res = [];\n if (length !== 0) {\n for (var index in this.arr) {\n res[index] = this.arr[index] / length;\n }\n }\n return new Vector(res);\n };\n Vector.prototype.negate = function () {\n var res = [];\n for (var index in this.arr) {\n res[index] = -this.arr[index];\n }\n return new Vector(res);\n };\n // 平方欧式距离\n Vector.prototype.squareEuclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return res;\n }\n };\n // 欧式距离\n Vector.prototype.euclideanDistance = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index] - otherVector.arr[index], 2);\n }\n return Math.sqrt(res);\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 归一化处理\n Vector.prototype.normalize = function () {\n var res = [];\n var cloneArr = (0, _util.clone)(this.arr);\n cloneArr.sort(function (a, b) {\n return a - b;\n });\n var max = cloneArr[cloneArr.length - 1];\n var min = cloneArr[0];\n for (var index in this.arr) {\n res[index] = (this.arr[index] - min) / (max - min);\n }\n return new Vector(res);\n };\n // 2范数 or 模长\n Vector.prototype.norm2 = function () {\n var _a;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length)) {\n return 0;\n }\n var res = 0;\n for (var index in this.arr) {\n res += Math.pow(this.arr[index], 2);\n }\n return Math.sqrt(res);\n };\n // 两个向量的点积\n Vector.prototype.dot = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (!((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) || !(otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return 0;\n }\n if (this.arr.length === otherArr.length) {\n var res = 0;\n for (var index in this.arr) {\n res += this.arr[index] * otherVector.arr[index];\n }\n return res;\n } else {\n console.error('The two vectors are unequal in length.');\n }\n };\n // 两个向量比较\n Vector.prototype.equal = function (otherVector) {\n var _a;\n var otherArr = otherVector.arr;\n if (((_a = this.arr) === null || _a === void 0 ? void 0 : _a.length) !== (otherArr === null || otherArr === void 0 ? void 0 : otherArr.length)) {\n return false;\n }\n for (var index in this.arr) {\n if (this.arr[index] !== otherArr[index]) {\n return false;\n }\n }\n return true;\n };\n return Vector;\n}();\nvar _default = Vector;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.secondReg = exports.dateReg = void 0;\nvar secondReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2})$/;\nexports.secondReg = secondReg;\nvar dateReg = /^(\\d{1,4})(-|\\/)(\\d{1,2})\\2(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$/;\nexports.dateReg = dateReg;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPropertyWeight = exports.getAllSortProperties = exports.getAllProperties = exports.default = void 0;\nvar _time = require(\"../constants/time\");\n// 获取所有属性并排序\nvar getAllSortProperties = function getAllSortProperties(nodes, n) {\n if (nodes === void 0) {\n nodes = [];\n }\n if (n === void 0) {\n n = 100;\n }\n var propertyKeyInfo = {};\n nodes.forEach(function (node) {\n if (!node.properties) {\n return;\n }\n Object.keys(node.properties).forEach(function (propertyKey) {\n // 目前过滤只保留可以转成数值型的或日期型的, todo: 统一转成one-hot特征向量或者embedding\n if (propertyKey === 'id' || !\"\".concat(node.properties[propertyKey]).match(_time.secondReg) && !\"\".concat(node.properties[propertyKey]).match(_time.dateReg) && isNaN(Number(node.properties[propertyKey]))) {\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n delete propertyKeyInfo[propertyKey];\n }\n return;\n }\n if (propertyKeyInfo.hasOwnProperty(propertyKey)) {\n propertyKeyInfo[propertyKey] += 1;\n } else {\n propertyKeyInfo[propertyKey] = 1;\n }\n });\n });\n // 取top50的属性\n var sortKeys = Object.keys(propertyKeyInfo).sort(function (a, b) {\n return propertyKeyInfo[b] - propertyKeyInfo[a];\n });\n return sortKeys.length < n ? sortKeys : sortKeys.slice(0, n);\n};\nexports.getAllSortProperties = getAllSortProperties;\nvar processProperty = function processProperty(properties, propertyKeys) {\n return propertyKeys.map(function (key) {\n if (properties.hasOwnProperty(key)) {\n // // 可以转成数值的直接转成数值\n // if (!isNaN(Number(properties[key]))) {\n // return Number(properties[key]);\n // }\n // // 时间型的转成时间戳\n // if (properties[key].match(secondReg) || properties[key].match(dateReg)) {\n // // @ts-ignore\n // return Number(Date.parse(new Date(properties[key]))) / 1000;\n // }\n return properties[key];\n }\n return 0;\n });\n};\n// 获取属性特征权重\nvar getPropertyWeight = function getPropertyWeight(nodes) {\n var propertyKeys = getAllSortProperties(nodes);\n var allPropertiesWeight = [];\n for (var i = 0; i < nodes.length; i++) {\n allPropertiesWeight[i] = processProperty(nodes[i].properties, propertyKeys);\n }\n return allPropertiesWeight;\n};\n// 获取所有节点的属性集合\nexports.getPropertyWeight = getPropertyWeight;\nvar getAllProperties = function getAllProperties(nodes, key) {\n if (key === void 0) {\n key = undefined;\n }\n var allProperties = [];\n nodes.forEach(function (node) {\n if (key === undefined) {\n allProperties.push(node);\n }\n if (node[key] !== undefined) {\n allProperties.push(node[key]);\n }\n });\n return allProperties;\n};\nexports.getAllProperties = getAllProperties;\nvar _default = {\n getAllSortProperties: getAllSortProperties,\n getPropertyWeight: getPropertyWeight,\n getAllProperties: getAllProperties\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.DistanceType = void 0;\nvar DistanceType;\nexports.DistanceType = DistanceType;\n(function (DistanceType) {\n DistanceType[\"EuclideanDistance\"] = \"euclideanDistance\";\n})(DistanceType || (exports.DistanceType = DistanceType = {}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.oneHot = exports.getDistance = exports.getAllKeyValueMap = exports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _types = require(\"../types\");\nvar _vector = _interopRequireDefault(require(\"./vector\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 获取数据中所有的属性及其对应的值\n * @param dataList 数据集\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nvar getAllKeyValueMap = function getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys) {\n var keys = [];\n // 指定了参与计算的keys时,使用指定的keys\n if (involvedKeys === null || involvedKeys === void 0 ? void 0 : involvedKeys.length) {\n keys = involvedKeys;\n } else {\n // 未指定抽取的keys时,提取数据中所有的key\n dataList.forEach(function (data) {\n keys = keys.concat(Object.keys(data));\n });\n keys = (0, _util.uniq)(keys);\n }\n // 获取所有值非空的key的value数组\n var allKeyValueMap = {};\n keys.forEach(function (key) {\n var value = [];\n dataList.forEach(function (data) {\n if (data[key] !== undefined && data[key] !== '') {\n value.push(data[key]);\n }\n });\n if (value.length && !(uninvolvedKeys === null || uninvolvedKeys === void 0 ? void 0 : uninvolvedKeys.includes(key))) {\n allKeyValueMap[key] = (0, _util.uniq)(value);\n }\n });\n return allKeyValueMap;\n};\n/**\n * one-hot编码:数据特征提取\n * @param dataList 数据集\n * @param involvedKeys 参与计算的的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n */\nexports.getAllKeyValueMap = getAllKeyValueMap;\nvar oneHot = function oneHot(dataList, involvedKeys, uninvolvedKeys) {\n // 获取数据中所有的属性/特征及其对应的值\n var allKeyValueMap = getAllKeyValueMap(dataList, involvedKeys, uninvolvedKeys);\n var oneHotCode = [];\n if (!Object.keys(allKeyValueMap).length) {\n return oneHotCode;\n }\n // 获取所有的属性/特征值\n var allValue = Object.values(allKeyValueMap);\n // 是否所有属性/特征的值都是数值型\n var isAllNumber = allValue.every(function (value) {\n return value.every(function (item) {\n return typeof item === 'number';\n });\n });\n // 对数据进行one-hot编码\n dataList.forEach(function (data, index) {\n var code = [];\n Object.keys(allKeyValueMap).forEach(function (key) {\n var keyValue = data[key];\n var allKeyValue = allKeyValueMap[key];\n var valueIndex = allKeyValue.findIndex(function (value) {\n return keyValue === value;\n });\n var subCode = [];\n // 如果属性/特征所有的值都能转成数值型,不满足分箱,则直接用值(todo: 为了收敛更快,需做归一化处理)\n if (isAllNumber) {\n subCode.push(keyValue);\n } else {\n // 进行one-hot编码\n for (var i = 0; i < allKeyValue.length; i++) {\n if (i === valueIndex) {\n subCode.push(1);\n } else {\n subCode.push(0);\n }\n }\n }\n code = code.concat(subCode);\n });\n oneHotCode[index] = code;\n });\n return oneHotCode;\n};\n/**\n * getDistance:获取两个元素之间的距离\n * @param item\n * @param otherItem\n * @param distanceType 距离类型\n * @param graphData 图数据\n */\nexports.oneHot = oneHot;\nvar getDistance = function getDistance(item, otherItem, distanceType, graphData) {\n if (distanceType === void 0) {\n distanceType = _types.DistanceType.EuclideanDistance;\n }\n var distance = 0;\n switch (distanceType) {\n case _types.DistanceType.EuclideanDistance:\n distance = new _vector.default(item).euclideanDistance(new _vector.default(otherItem));\n break;\n default:\n break;\n }\n return distance;\n};\nexports.getDistance = getDistance;\nvar _default = {\n getAllKeyValueMap: getAllKeyValueMap,\n oneHot: oneHot,\n getDistance: getDistance\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _adjacentMatrix = _interopRequireDefault(require(\"./adjacent-matrix\"));\nvar _vector = _interopRequireDefault(require(\"./utils/vector\"));\nvar _nodeProperties = require(\"./utils/node-properties\");\nvar _dataPreprocessing = require(\"./utils/data-preprocessing\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar getModularity = function getModularity(nodes, adjMatrix, ks, m) {\n var length = adjMatrix.length;\n var param = 2 * m;\n var modularity = 0;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (clusteri !== clusterj) continue;\n var entry = adjMatrix[i][j] || 0;\n var ki = ks[i] || 0;\n var kj = ks[j] || 0;\n modularity += entry - ki * kj / param;\n }\n }\n modularity *= 1 / param;\n return modularity;\n};\n// 模块惯性度,衡量属性相似度\nvar getInertialModularity = function getInertialModularity(nodes, allPropertiesWeight) {\n if (nodes === void 0) {\n nodes = [];\n }\n var length = nodes.length;\n var totalProperties = new _vector.default([]);\n for (var i = 0; i < length; i++) {\n totalProperties = totalProperties.add(new _vector.default(allPropertiesWeight[i]));\n }\n // 均值向量\n var avgProperties = totalProperties.avg(length);\n avgProperties.normalize();\n // 节点集合的方差: 节点v与均值向量的平方欧式距离之和\n var variance = 0;\n for (var i = 0; i < length; i++) {\n var propertiesi = new _vector.default(allPropertiesWeight[i]);\n var squareEuclideanDistance = propertiesi.squareEuclideanDistance(avgProperties);\n variance += squareEuclideanDistance;\n }\n // 任意两点间的欧式平方距离\n var squareEuclideanDistanceInfo = [];\n nodes.forEach(function () {\n squareEuclideanDistanceInfo.push([]);\n });\n for (var i = 0; i < length; i++) {\n var propertiesi = new _vector.default(allPropertiesWeight[i]);\n nodes[i]['clusterInertial'] = 0;\n for (var j = 0; j < length; j++) {\n if (i === j) {\n squareEuclideanDistanceInfo[i][j] = 0;\n continue;\n }\n var propertiesj = new _vector.default(allPropertiesWeight[j]);\n squareEuclideanDistanceInfo[i][j] = propertiesi.squareEuclideanDistance(propertiesj);\n nodes[i]['clusterInertial'] += squareEuclideanDistanceInfo[i][j];\n }\n }\n // 计算模块惯性度\n var inertialModularity = 0;\n var param = 2 * length * variance;\n for (var i = 0; i < length; i++) {\n var clusteri = nodes[i].clusterId;\n for (var j = 0; j < length; j++) {\n var clusterj = nodes[j].clusterId;\n if (i === j || clusteri !== clusterj) continue;\n var inertial = nodes[i].clusterInertial * nodes[j].clusterInertial / Math.pow(param, 2) - squareEuclideanDistanceInfo[i][j] / param;\n inertialModularity += inertial;\n }\n }\n return Number(inertialModularity.toFixed(4));\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold 差值阈值\n * @param inertialModularity 是否使用惯性模块度(即节点属性相似性)\n * @param propertyKey 属性的字段名\n * @param involvedKeys 参与计算的key集合\n * @param uninvolvedKeys 不参与计算的key集合\n * @param inertialWeight 惯性模块度权重\n */\nvar louvain = function louvain(graphData, directed, weightPropertyName, threshold, inertialModularity, propertyKey, involvedKeys, uninvolvedKeys, inertialWeight) {\n if (directed === void 0) {\n directed = false;\n }\n if (weightPropertyName === void 0) {\n weightPropertyName = 'weight';\n }\n if (threshold === void 0) {\n threshold = 0.0001;\n }\n if (inertialModularity === void 0) {\n inertialModularity = false;\n }\n if (propertyKey === void 0) {\n propertyKey = undefined;\n }\n if (involvedKeys === void 0) {\n involvedKeys = [];\n }\n if (uninvolvedKeys === void 0) {\n uninvolvedKeys = ['id'];\n }\n if (inertialWeight === void 0) {\n inertialWeight = 1;\n }\n // the origin data\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var allPropertiesWeight = [];\n if (inertialModularity) {\n nodes.forEach(function (node, index) {\n node.properties = node.properties || {};\n node.originIndex = index;\n });\n var nodeTypeInfo_1 = [];\n if (nodes.every(function (node) {\n return node.hasOwnProperty('nodeType');\n })) {\n nodeTypeInfo_1 = Array.from(new Set(nodes.map(function (node) {\n return node.nodeType;\n })));\n nodes.forEach(function (node) {\n node.properties.nodeType = nodeTypeInfo_1.findIndex(function (nodeType) {\n return nodeType === node.nodeType;\n });\n });\n }\n // 所有节点属性集合\n var properties = (0, _nodeProperties.getAllProperties)(nodes, propertyKey);\n // 所有节点属性one-hot特征向量集合\n allPropertiesWeight = (0, _dataPreprocessing.oneHot)(properties, involvedKeys, uninvolvedKeys);\n }\n var uniqueId = 1;\n var clusters = {};\n var nodeMap = {};\n // init the clusters and nodeMap\n nodes.forEach(function (node, i) {\n var cid = String(uniqueId++);\n node.clusterId = cid;\n clusters[cid] = {\n id: cid,\n nodes: [node]\n };\n nodeMap[node.id] = {\n node: node,\n idx: i\n };\n });\n // the adjacent matrix of calNodes inside clusters\n var adjMatrix = (0, _adjacentMatrix.default)(graphData, directed);\n // the sum of each row in adjacent matrix\n var ks = [];\n /**\n * neighbor nodes (id for key and weight for value) for each node\n * neighbors = {\n * id(node_id): { id(neighbor_1_id): weight(weight of the edge), id(neighbor_2_id): weight(weight of the edge), ... },\n * ...\n * }\n */\n var neighbors = {};\n // the sum of the weights of all edges in the graph\n var m = 0;\n adjMatrix.forEach(function (row, i) {\n var k = 0;\n var iid = nodes[i].id;\n neighbors[iid] = {};\n row.forEach(function (entry, j) {\n if (!entry) return;\n k += entry;\n var jid = nodes[j].id;\n neighbors[iid][jid] = entry;\n m += entry;\n });\n ks.push(k);\n });\n m /= 2;\n var totalModularity = Infinity;\n var previousModularity = Infinity;\n var iter = 0;\n var finalNodes = [];\n var finalClusters = {};\n while (true) {\n if (inertialModularity && nodes.every(function (node) {\n return node.hasOwnProperty('properties');\n })) {\n totalModularity = getModularity(nodes, adjMatrix, ks, m) + getInertialModularity(nodes, allPropertiesWeight) * inertialWeight;\n } else {\n totalModularity = getModularity(nodes, adjMatrix, ks, m);\n }\n // 第一次迭代previousModularity直接赋值\n if (iter === 0) {\n previousModularity = totalModularity;\n finalNodes = nodes;\n finalClusters = clusters;\n }\n var increaseWithinThreshold = totalModularity > 0 && totalModularity > previousModularity && totalModularity - previousModularity < threshold;\n // 总模块度增加才更新最优解\n if (totalModularity > previousModularity) {\n finalNodes = nodes.map(function (node) {\n return {\n node: node,\n clusterId: node.clusterId\n };\n });\n finalClusters = (0, _util.clone)(clusters);\n previousModularity = totalModularity;\n }\n // whether to terminate the iterations\n if (increaseWithinThreshold || iter > 100) {\n break;\n }\n ;\n iter++;\n // pre compute some values for current clusters\n Object.keys(clusters).forEach(function (clusterId) {\n // sum of weights of edges to nodes in cluster\n var sumTot = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === clusterId && targetClusterId !== clusterId || targetClusterId === clusterId && sourceClusterId !== clusterId) {\n sumTot = sumTot + (edge[weightPropertyName] || 1);\n }\n });\n clusters[clusterId].sumTot = sumTot;\n });\n // move the nodes to increase the delta modularity\n nodes.forEach(function (node, i) {\n var selfCluster = clusters[node.clusterId];\n var bestIncrease = 0;\n var bestCluster;\n var commonParam = ks[i] / (2 * m);\n // sum of weights of edges from node to nodes in cluster\n var kiin = 0;\n var selfClusterNodes = selfCluster.nodes;\n selfClusterNodes.forEach(function (scNode) {\n var scNodeIdx = nodeMap[scNode.id].idx;\n kiin += adjMatrix[i][scNodeIdx] || 0;\n });\n // the modurarity for **removing** the node i from the origin cluster of node i\n var removeModurarity = kiin - selfCluster.sumTot * commonParam;\n // nodes for **removing** node i into this neighbor cluster\n var selfClusterNodesAfterRemove = selfClusterNodes.filter(function (scNode) {\n return scNode.id !== node.id;\n });\n var propertiesWeightRemove = [];\n selfClusterNodesAfterRemove.forEach(function (nodeRemove, index) {\n propertiesWeightRemove[index] = allPropertiesWeight[nodeRemove.originIndex];\n });\n // the inertialModularity for **removing** the node i from the origin cluster of node i\n var removeInertialModularity = getInertialModularity(selfClusterNodesAfterRemove, allPropertiesWeight) * inertialWeight;\n // the neightbors of the node\n var nodeNeighborIds = neighbors[node.id];\n Object.keys(nodeNeighborIds).forEach(function (neighborNodeId) {\n var neighborNode = nodeMap[neighborNodeId].node;\n var neighborClusterId = neighborNode.clusterId;\n // if the node and the neighbor of node are in the same cluster, reutrn\n if (neighborClusterId === node.clusterId) return;\n var neighborCluster = clusters[neighborClusterId];\n var clusterNodes = neighborCluster.nodes;\n // if the cluster is empty, remove the cluster and return\n if (!clusterNodes || !clusterNodes.length) return;\n // sum of weights of edges from node to nodes in cluster\n var neighborClusterKiin = 0;\n clusterNodes.forEach(function (cNode) {\n var cNodeIdx = nodeMap[cNode.id].idx;\n neighborClusterKiin += adjMatrix[i][cNodeIdx] || 0;\n });\n // the modurarity for **adding** node i into this neighbor cluster\n var addModurarity = neighborClusterKiin - neighborCluster.sumTot * commonParam;\n // nodes for **adding** node i into this neighbor cluster\n var clusterNodesAfterAdd = clusterNodes.concat([node]);\n var propertiesWeightAdd = [];\n clusterNodesAfterAdd.forEach(function (nodeAdd, index) {\n propertiesWeightAdd[index] = allPropertiesWeight[nodeAdd.originIndex];\n });\n // the inertialModularity for **adding** node i into this neighbor cluster\n var addInertialModularity = getInertialModularity(clusterNodesAfterAdd, allPropertiesWeight) * inertialWeight;\n // the increase modurarity is the difference between addModurarity and removeModurarity\n var increase = addModurarity - removeModurarity;\n if (inertialModularity) {\n increase = addModurarity + addInertialModularity - (removeModurarity + removeInertialModularity);\n }\n // find the best cluster to move node i into\n if (increase > bestIncrease) {\n bestIncrease = increase;\n bestCluster = neighborCluster;\n }\n });\n // if found a best cluster to move into\n if (bestIncrease > 0) {\n bestCluster.nodes.push(node);\n var previousClusterId_1 = node.clusterId;\n node.clusterId = bestCluster.id;\n // move the node to the best cluster\n var nodeInSelfClusterIdx = selfCluster.nodes.indexOf(node);\n // remove from origin cluster\n selfCluster.nodes.splice(nodeInSelfClusterIdx, 1);\n // update sumTot for clusters\n // sum of weights of edges to nodes in cluster\n var neighborClusterSumTot_1 = 0;\n var selfClusterSumTot_1 = 0;\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (sourceClusterId === bestCluster.id && targetClusterId !== bestCluster.id || targetClusterId === bestCluster.id && sourceClusterId !== bestCluster.id) {\n neighborClusterSumTot_1 = neighborClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n if (sourceClusterId === previousClusterId_1 && targetClusterId !== previousClusterId_1 || targetClusterId === previousClusterId_1 && sourceClusterId !== previousClusterId_1) {\n selfClusterSumTot_1 = selfClusterSumTot_1 + (edge[weightPropertyName] || 1);\n }\n });\n // the nodes of the clusters to move into and remove are changed, update their sumTot\n bestCluster.sumTot = neighborClusterSumTot_1;\n selfCluster.sumTot = selfClusterSumTot_1;\n }\n });\n }\n // delete the empty clusters, assign increasing clusterId\n var newClusterIdMap = {};\n var clusterIdx = 0;\n Object.keys(finalClusters).forEach(function (clusterId) {\n var cluster = finalClusters[clusterId];\n if (!cluster.nodes || !cluster.nodes.length) {\n delete finalClusters[clusterId];\n return;\n }\n var newId = String(clusterIdx + 1);\n if (newId === clusterId) {\n return;\n }\n cluster.id = newId;\n cluster.nodes = cluster.nodes.map(function (item) {\n return {\n id: item.id,\n clusterId: newId\n };\n });\n finalClusters[newId] = cluster;\n newClusterIdMap[clusterId] = newId;\n delete finalClusters[clusterId];\n clusterIdx++;\n });\n // restore node clusterId\n finalNodes.forEach(function (nodeInfo) {\n var node = nodeInfo.node,\n clusterId = nodeInfo.clusterId;\n if (!node) return;\n node.clusterId = clusterId;\n if (node.clusterId && newClusterIdMap[node.clusterId]) node.clusterId = newClusterIdMap[node.clusterId];\n });\n // get the cluster edges\n var clusterEdges = [];\n var clusterEdgeMap = {};\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var weight = edge[weightPropertyName] || 1;\n var sourceClusterId = nodeMap[source].node.clusterId;\n var targetClusterId = nodeMap[target].node.clusterId;\n if (!sourceClusterId || !targetClusterId) return;\n var newEdgeId = \"\".concat(sourceClusterId, \"---\").concat(targetClusterId);\n if (clusterEdgeMap[newEdgeId]) {\n clusterEdgeMap[newEdgeId].weight += weight;\n clusterEdgeMap[newEdgeId].count++;\n } else {\n var newEdge = {\n source: sourceClusterId,\n target: targetClusterId,\n weight: weight,\n count: 1\n };\n clusterEdgeMap[newEdgeId] = newEdge;\n clusterEdges.push(newEdge);\n }\n });\n var clustersArray = [];\n Object.keys(finalClusters).forEach(function (clusterId) {\n clustersArray.push(finalClusters[clusterId]);\n });\n return {\n clusters: clustersArray,\n clusterEdges: clusterEdges\n };\n};\nvar _default = louvain;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * 并查集 Disjoint set to support quick union\n */\nvar UnionFind = /** @class */function () {\n function UnionFind(items) {\n this.count = items.length;\n this.parent = {};\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var i = items_1[_i];\n this.parent[i] = i;\n }\n }\n // find the root of the item\n UnionFind.prototype.find = function (item) {\n while (this.parent[item] !== item) {\n item = this.parent[item];\n }\n return item;\n };\n UnionFind.prototype.union = function (a, b) {\n var rootA = this.find(a);\n var rootB = this.find(b);\n if (rootA === rootB) return;\n // make the element with smaller root the parent\n if (rootA < rootB) {\n if (this.parent[b] !== b) this.union(this.parent[b], a);\n this.parent[b] = this.parent[a];\n } else {\n if (this.parent[a] !== a) this.union(this.parent[a], b);\n this.parent[a] = this.parent[b];\n }\n };\n // whether a and b are connected, i.e. a and b have the same root\n UnionFind.prototype.connected = function (a, b) {\n return this.find(a) === this.find(b);\n };\n return UnionFind;\n}();\nvar _default = UnionFind;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar defaultCompare = function defaultCompare(a, b) {\n return a - b;\n};\nvar MinBinaryHeap = /** @class */function () {\n function MinBinaryHeap(compareFn) {\n if (compareFn === void 0) {\n compareFn = defaultCompare;\n }\n this.compareFn = compareFn;\n this.list = [];\n }\n MinBinaryHeap.prototype.getLeft = function (index) {\n return 2 * index + 1;\n };\n MinBinaryHeap.prototype.getRight = function (index) {\n return 2 * index + 2;\n };\n MinBinaryHeap.prototype.getParent = function (index) {\n if (index === 0) {\n return null;\n }\n return Math.floor((index - 1) / 2);\n };\n MinBinaryHeap.prototype.isEmpty = function () {\n return this.list.length <= 0;\n };\n MinBinaryHeap.prototype.top = function () {\n return this.isEmpty() ? undefined : this.list[0];\n };\n MinBinaryHeap.prototype.delMin = function () {\n var top = this.top();\n var bottom = this.list.pop();\n if (this.list.length > 0) {\n this.list[0] = bottom;\n this.moveDown(0);\n }\n return top;\n };\n MinBinaryHeap.prototype.insert = function (value) {\n if (value !== null) {\n this.list.push(value);\n var index = this.list.length - 1;\n this.moveUp(index);\n return true;\n }\n return false;\n };\n MinBinaryHeap.prototype.moveUp = function (index) {\n var parent = this.getParent(index);\n while (index && index > 0 && this.compareFn(this.list[parent], this.list[index]) > 0) {\n // swap\n var tmp = this.list[parent];\n this.list[parent] = this.list[index];\n this.list[index] = tmp;\n // [this.list[index], this.list[parent]] = [this.list[parent], this.list[index]]\n index = parent;\n parent = this.getParent(index);\n }\n };\n MinBinaryHeap.prototype.moveDown = function (index) {\n var _a;\n var element = index;\n var left = this.getLeft(index);\n var right = this.getRight(index);\n var size = this.list.length;\n if (left !== null && left < size && this.compareFn(this.list[element], this.list[left]) > 0) {\n element = left;\n } else if (right !== null && right < size && this.compareFn(this.list[element], this.list[right]) > 0) {\n element = right;\n }\n if (index !== element) {\n _a = [this.list[element], this.list[index]], this.list[index] = _a[0], this.list[element] = _a[1];\n this.moveDown(element);\n }\n };\n return MinBinaryHeap;\n}();\nvar _default = MinBinaryHeap;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _unionFind = _interopRequireDefault(require(\"./structs/union-find\"));\nvar _binaryHeap = _interopRequireDefault(require(\"./structs/binary-heap\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * Prim algorithm,use priority queue,复杂度 O(E+V*logV), V: 节点数量,E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Prim%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n */\nvar primMST = function primMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 从nodes[0]开始\n var currNode = nodes[0];\n var visited = new Set();\n visited.add(currNode);\n // 用二叉堆维护距已加入节点的其他节点的边的权值\n var compareWeight = function compareWeight(a, b) {\n if (weight) {\n return a.weight - b.weight;\n }\n return 0;\n };\n var edgeQueue = new _binaryHeap.default(compareWeight);\n (0, _util.getEdgesByNodeId)(currNode.id, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n while (!edgeQueue.isEmpty()) {\n // 选取与已加入的结点之间边权最小的结点\n var currEdge = edgeQueue.delMin();\n var source = currEdge.source;\n var target = currEdge.target;\n if (visited.has(source) && visited.has(target)) continue;\n selectedEdges.push(currEdge);\n if (!visited.has(source)) {\n visited.add(source);\n (0, _util.getEdgesByNodeId)(source, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n if (!visited.has(target)) {\n visited.add(target);\n (0, _util.getEdgesByNodeId)(target, edges).forEach(function (edge) {\n edgeQueue.insert(edge);\n });\n }\n }\n return selectedEdges;\n};\n/**\n * Kruskal algorithm,复杂度 O(E*logE), E: 边的数量\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @return IEdge[] 返回构成MST的边的数组\n */\nvar kruskalMST = function kruskalMST(graphData, weight) {\n var selectedEdges = [];\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n if (nodes.length === 0) {\n return selectedEdges;\n }\n // 若指定weight,则将所有的边按权值从小到大排序\n var weightEdges = edges.map(function (edge) {\n return edge;\n });\n if (weight) {\n weightEdges.sort(function (a, b) {\n return a.weight - b.weight;\n });\n }\n var disjointSet = new _unionFind.default(nodes.map(function (n) {\n return n.id;\n }));\n // 从权值最小的边开始,如果这条边连接的两个节点于图G中不在同一个连通分量中,则添加这条边\n // 直到遍历完所有点或边\n while (weightEdges.length > 0) {\n var curEdge = weightEdges.shift();\n var source = curEdge.source;\n var target = curEdge.target;\n if (!disjointSet.connected(source, target)) {\n selectedEdges.push(curEdge);\n disjointSet.union(source, target);\n }\n }\n return selectedEdges;\n};\n/**\n * 最小生成树\n * refer: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nvar minimumSpanningTree = function minimumSpanningTree(graphData, weight, algo) {\n var algos = {\n prim: primMST,\n kruskal: kruskalMST\n };\n if (!algo) return kruskalMST(graphData, weight);\n return algos[algo](graphData, weight);\n};\nvar _default = minimumSpanningTree;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _degree = _interopRequireDefault(require(\"./degree\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nvar pageRank = function pageRank(graphData, epsilon, linkProb) {\n if (typeof epsilon !== 'number') epsilon = 0.000001;\n if (typeof linkProb !== 'number') linkProb = 0.85;\n var distance = 1;\n var leakedRank = 0;\n var maxIterations = 1000;\n var _a = graphData.nodes,\n nodes = _a === void 0 ? [] : _a,\n _b = graphData.edges,\n edges = _b === void 0 ? [] : _b;\n var nodesCount = nodes.length;\n var currentRank;\n var curRanks = {};\n var prevRanks = {};\n // Initialize pageranks 初始化\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n curRanks[nodeId] = 1 / nodesCount;\n prevRanks[nodeId] = 1 / nodesCount;\n }\n var nodeDegree = (0, _degree.default)(graphData);\n while (maxIterations > 0 && distance > epsilon) {\n leakedRank = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = 0;\n if (nodeDegree[node.id].inDegree === 0) {\n curRanks[nodeId] = 0;\n } else {\n var neighbors = (0, _util.getNeighbors)(nodeId, edges, 'source');\n for (var i = 0; i < neighbors.length; ++i) {\n var neighbor = neighbors[i];\n var outDegree = nodeDegree[neighbor].outDegree;\n if (outDegree > 0) currentRank += prevRanks[neighbor] / outDegree;\n }\n curRanks[nodeId] = linkProb * currentRank;\n leakedRank += curRanks[nodeId];\n }\n }\n leakedRank = (1 - leakedRank) / nodesCount;\n distance = 0;\n for (var j = 0; j < nodesCount; ++j) {\n var node = nodes[j];\n var nodeId = node.id;\n currentRank = curRanks[nodeId] + leakedRank;\n distance += Math.abs(currentRank - prevRanks[nodeId]);\n prevRanks[nodeId] = currentRank;\n }\n maxIterations -= 1;\n }\n return prevRanks;\n};\nvar _default = pageRank;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VACANT_NODE_LABEL = exports.VACANT_NODE_ID = exports.VACANT_GRAPH_ID = exports.VACANT_EDGE_LABEL = exports.VACANT_EDGE_ID = exports.Node = exports.Graph = exports.Edge = exports.AUTO_EDGE_ID = void 0;\nvar VACANT_EDGE_ID = -1;\nexports.VACANT_EDGE_ID = VACANT_EDGE_ID;\nvar VACANT_NODE_ID = -1;\nexports.VACANT_NODE_ID = VACANT_NODE_ID;\nvar VACANT_EDGE_LABEL = \"-1\";\nexports.VACANT_EDGE_LABEL = VACANT_EDGE_LABEL;\nvar VACANT_NODE_LABEL = \"-1\";\nexports.VACANT_NODE_LABEL = VACANT_NODE_LABEL;\nvar VACANT_GRAPH_ID = -1;\nexports.VACANT_GRAPH_ID = VACANT_GRAPH_ID;\nvar AUTO_EDGE_ID = \"-1\";\nexports.AUTO_EDGE_ID = AUTO_EDGE_ID;\nvar Edge = /** @class */function () {\n function Edge(id, from, to, label) {\n if (id === void 0) {\n id = VACANT_EDGE_ID;\n }\n if (from === void 0) {\n from = VACANT_NODE_ID;\n }\n if (to === void 0) {\n to = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_EDGE_LABEL;\n }\n this.id = id;\n this.from = from;\n this.to = to;\n this.label = label;\n }\n return Edge;\n}();\nexports.Edge = Edge;\nvar Node = /** @class */function () {\n function Node(id, label) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (label === void 0) {\n label = VACANT_NODE_LABEL;\n }\n this.id = id;\n this.label = label;\n this.edges = [];\n this.edgeMap = {};\n }\n Node.prototype.addEdge = function (edge) {\n this.edges.push(edge);\n this.edgeMap[edge.id] = edge;\n };\n return Node;\n}();\nexports.Node = Node;\nvar Graph = /** @class */function () {\n function Graph(id, edgeIdAutoIncrease, directed) {\n if (id === void 0) {\n id = VACANT_NODE_ID;\n }\n if (edgeIdAutoIncrease === void 0) {\n edgeIdAutoIncrease = true;\n }\n if (directed === void 0) {\n directed = false;\n }\n this.id = id;\n this.edgeIdAutoIncrease = edgeIdAutoIncrease;\n this.edges = [];\n this.nodes = [];\n this.nodeMap = {};\n this.edgeMap = {};\n this.nodeLabelMap = {};\n this.edgeLabelMap = {};\n this.counter = 0;\n this.directed = directed;\n }\n Graph.prototype.getNodeNum = function () {\n return this.nodes.length;\n };\n Graph.prototype.addNode = function (id, label) {\n if (this.nodeMap[id]) return;\n var node = new Node(id, label);\n this.nodes.push(node);\n this.nodeMap[id] = node;\n if (!this.nodeLabelMap[label]) this.nodeLabelMap[label] = [];\n this.nodeLabelMap[label].push(id);\n };\n Graph.prototype.addEdge = function (id, from, to, label) {\n if (this.edgeIdAutoIncrease || id === undefined) id = this.counter++;\n if (this.nodeMap[from] && this.nodeMap[to] && this.nodeMap[to].edgeMap[id]) return;\n var edge = new Edge(id, from, to, label);\n this.edges.push(edge);\n this.edgeMap[id] = edge;\n this.nodeMap[from].addEdge(edge);\n if (!this.edgeLabelMap[label]) this.edgeLabelMap[label] = [];\n this.edgeLabelMap[label].push(edge);\n if (!this.directed) {\n var rEdge = new Edge(id, to, from, label);\n this.nodeMap[to].addEdge(rEdge);\n this.edgeLabelMap[label].push(rEdge);\n }\n };\n return Graph;\n}();\nexports.Graph = Graph;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _util = require(\"@antv/util\");\nvar _struct = require(\"./struct\");\nvar DFSedge = /** @class */function () {\n function DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.fromNode = fromNode;\n this.toNode = toNode;\n this.nodeEdgeNodeLabel = {\n nodeLabel1: fromNodeLabel || _struct.VACANT_NODE_LABEL,\n edgeLabel: edgeLabel || _struct.VACANT_EDGE_LABEL,\n nodeLabel2: toNodeLabel || _struct.VACANT_NODE_LABEL\n };\n }\n DFSedge.prototype.equalTo = function (other) {\n return this.fromNode === other.formNode && this.toNode === other.toNode && this.nodeEdgeNodeLabel === other.nodeEdgeNodeLabel;\n };\n DFSedge.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n return DFSedge;\n}();\n// DFScode 是 DESedge 的数组\nvar DFScode = /** @class */function () {\n function DFScode() {\n this.rmpath = [];\n this.dfsEdgeList = [];\n }\n DFScode.prototype.equalTo = function (other) {\n var aLength = this.dfsEdgeList.length;\n var bLength = other.length;\n if (aLength !== bLength) return false;\n for (var i = 0; i < aLength; i++) {\n if (this.dfsEdgeList[i] !== other[i]) return false;\n }\n return true;\n };\n DFScode.prototype.notEqualTo = function (other) {\n return !this.equalTo(other);\n };\n /** 增加一条 edge 到 DFScode */\n DFScode.prototype.pushBack = function (fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel) {\n this.dfsEdgeList.push(new DFSedge(fromNode, toNode, fromNodeLabel, edgeLabel, toNodeLabel));\n return this.dfsEdgeList;\n };\n /** 根据 dfs 构建图 */\n DFScode.prototype.toGraph = function (graphId, directed) {\n if (graphId === void 0) {\n graphId = _struct.VACANT_GRAPH_ID;\n }\n if (directed === void 0) {\n directed = false;\n }\n var graph = new _struct.Graph(graphId, true, directed);\n this.dfsEdgeList.forEach(function (dfsEdge) {\n var fromNodeId = dfsEdge.fromNode;\n var toNodeId = dfsEdge.toNode;\n var _a = dfsEdge.nodeEdgeNodeLabel,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (nodeLabel1 !== _struct.VACANT_NODE_LABEL) graph.addNode(fromNodeId, nodeLabel1);\n if (nodeLabel2 !== _struct.VACANT_NODE_LABEL) graph.addNode(toNodeId, nodeLabel2);\n if (nodeLabel1 !== _struct.VACANT_NODE_LABEL && nodeLabel2 !== nodeLabel1) graph.addEdge(undefined, fromNodeId, toNodeId, edgeLabel);\n });\n return graph;\n };\n // 建立 rightmost path\n DFScode.prototype.buildRmpath = function () {\n this.rmpath = [];\n var oldFrom = undefined;\n var selfLength = this.dfsEdgeList.length;\n for (var i = selfLength - 1; i >= 0; i--) {\n var dfsEdge = this.dfsEdgeList[i];\n var fromNodeIdx = dfsEdge.fromNode;\n var toNodeIdx = dfsEdge.toNode;\n if (fromNodeIdx < toNodeIdx && (oldFrom === undefined || toNodeIdx === oldFrom)) {\n this.rmpath.push(i);\n oldFrom = fromNodeIdx;\n }\n }\n return this.rmpath;\n };\n DFScode.prototype.getNodeNum = function () {\n var nodeMap = {};\n this.dfsEdgeList.forEach(function (dfsEdge) {\n if (!nodeMap[dfsEdge.fromNode]) nodeMap[dfsEdge.fromNode] = true;\n if (!nodeMap[dfsEdge.toNode]) nodeMap[dfsEdge.toNode] = true;\n });\n return Object.keys(nodeMap).length;\n };\n return DFScode;\n}();\nvar History = /** @class */function () {\n function History(pdfs) {\n this.his = {};\n this.nodesUsed = {};\n this.edgesUsed = {};\n this.edges = [];\n if (!pdfs) return;\n while (pdfs) {\n var e = pdfs.edge;\n this.edges.push(e);\n this.nodesUsed[e.from] = 1;\n this.nodesUsed[e.to] = 1;\n this.edgesUsed[e.id] = 1;\n pdfs = pdfs.preNode;\n }\n // 倒序\n this.edges = this.edges.reverse();\n }\n History.prototype.hasNode = function (node) {\n return this.nodesUsed[node.id] === 1;\n };\n History.prototype.hasEdge = function (edge) {\n return this.edgesUsed[edge.id] === 1;\n };\n return History;\n}();\nvar GSpan = /** @class */function () {\n function GSpan(_a) {\n var graphs = _a.graphs,\n _b = _a.minSupport,\n minSupport = _b === void 0 ? 2 : _b,\n _c = _a.minNodeNum,\n minNodeNum = _c === void 0 ? 1 : _c,\n _d = _a.maxNodeNum,\n maxNodeNum = _d === void 0 ? 4 : _d,\n _e = _a.top,\n top = _e === void 0 ? 10 : _e,\n _f = _a.directed,\n directed = _f === void 0 ? false : _f,\n _g = _a.verbose,\n verbose = _g === void 0 ? false : _g;\n // -------- 第零步,初始化-------\n this.graphs = graphs;\n this.dfsCode = new DFScode();\n this.support = 0;\n this.frequentSize1Subgraphs = [];\n this.frequentSubgraphs = [];\n this.minSupport = minSupport;\n this.top = top;\n this.directed = directed;\n this.counter = 0;\n // TODO? timestamp = {}\n this.maxNodeNum = maxNodeNum;\n this.minNodeNum = minNodeNum;\n this.verbose = verbose;\n if (this.maxNodeNum < this.minNodeNum) this.maxNodeNum = this.minNodeNum;\n this.reportDF = []; // matrix\n }\n // Line 352\n GSpan.prototype.findForwardRootEdges = function (graph, fromNode) {\n var _this = this;\n var result = [];\n var nodeMap = graph.nodeMap;\n fromNode.edges.forEach(function (edge) {\n if (_this.directed || fromNode.label <= nodeMap[edge.to].label) result.push(edge);\n });\n return result;\n };\n GSpan.prototype.findBackwardEdge = function (graph, edge1, edge2, history) {\n if (!this.directed && edge1 === edge2) return null;\n var nodeMap = graph.nodeMap;\n var edge2To = nodeMap[edge2.to];\n var edge2ToEdges = edge2To.edges;\n var edgeLength = edge2ToEdges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edge2ToEdges[i];\n if (history.hasEdge(edge) || edge.to !== edge1.from) continue;\n if (!this.directed) {\n if (edge1.label < edge.label || edge1.label === edge.label && nodeMap[edge1.to].label <= nodeMap[edge2.to].label) {\n return edge;\n }\n } else {\n if (nodeMap[edge1.from].label < nodeMap[edge2.to].label || nodeMap[edge1.from].label === nodeMap[edge2.to].label && edge1.label <= edge.label) {\n return edge;\n }\n }\n }\n return null;\n };\n GSpan.prototype.findForwardPureEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var rightmostEdgeToId = rightmostEdge.to;\n var edges = graph.nodeMap[rightmostEdgeToId].edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var toNode = graph.nodeMap[edge.to];\n if (minNodeLabel <= toNode.label && !history.hasNode(toNode)) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.findForwardRmpathEdges = function (graph, rightmostEdge, minNodeLabel, history) {\n var result = [];\n var nodeMap = graph.nodeMap;\n var toNodeLabel = nodeMap[rightmostEdge.to].label;\n var fromNode = nodeMap[rightmostEdge.from];\n var edges = fromNode.edges;\n var edgeLength = edges.length;\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var newToNodeLabel = nodeMap[edge.to].label;\n if (rightmostEdge.to === edge.to || minNodeLabel > newToNodeLabel || history.hasNode(nodeMap[edge.to])) {\n continue;\n }\n if (rightmostEdge.label < edge.label || rightmostEdge.label === edge.label && toNodeLabel <= newToNodeLabel) {\n result.push(edge);\n }\n }\n return result;\n };\n GSpan.prototype.getSupport = function (projected) {\n var graphMap = {};\n projected.forEach(function (pro) {\n if (!graphMap[pro.graphId]) graphMap[pro.graphId] = true;\n });\n return Object.keys(graphMap).length;\n };\n GSpan.prototype.findMinLabel = function (obj) {\n var minLabel = undefined;\n Object.keys(obj).forEach(function (nodeEdgeNodeLabel) {\n var _a = obj[nodeEdgeNodeLabel],\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n if (!minLabel) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n return;\n }\n if (nodeLabel1 < minLabel.nodeLabel1 || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel < minLabel.edgeLabel || nodeLabel1 === minLabel.nodeLabel1 && edgeLabel === minLabel.edgeLabel && nodeLabel2 < minLabel.nodeLabel2) {\n minLabel = {\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n }\n });\n return minLabel;\n };\n GSpan.prototype.isMin = function () {\n var _this = this;\n var dfsCode = this.dfsCode;\n if (this.verbose) console.log(\"isMin checking\", dfsCode);\n if (dfsCode.dfsEdgeList.length === 1) return true;\n var directed = this.directed;\n var graph = dfsCode.toGraph(_struct.VACANT_GRAPH_ID, directed);\n var nodeMap = graph.nodeMap;\n var dfsCodeMin = new DFScode();\n var root = {};\n graph.nodes.forEach(function (node) {\n var forwardEdges = _this.findForwardRootEdges(graph, node);\n forwardEdges.forEach(function (edge) {\n var otherNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(otherNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: otherNode.label\n };\n var pdfs = {\n graphId: graph.id,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n // 比较 root 中每一项的 nodeEdgeNodeLabel 大小,按照 nodeLabel1、edgeLabe、nodeLabel2 的顺序比较\n var minLabel = this.findMinLabel(root); // line 419\n if (!minLabel) return;\n dfsCodeMin.dfsEdgeList.push(new DFSedge(0, 1, minLabel.nodeLabel1, minLabel.edgeLabel, minLabel.nodeLabel2));\n // line 423\n var projectIsMin = function projectIsMin(projected) {\n // right most path\n var rmpath = dfsCodeMin.buildRmpath();\n var minNodeLabel = dfsCodeMin.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var maxToC = dfsCodeMin.dfsEdgeList[rmpath[0]].toNode; // node id\n var backwardRoot = {};\n var flag = false,\n newTo = 0;\n var end = directed ? -1 : 0; // 遍历到 1 还是到 0\n var _loop_1 = function _loop_1(i) {\n if (flag) return \"break\";\n // line 435\n projected.forEach(function (p) {\n var history = new History(p);\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n // Line 441\n if (!backwardRoot[backwardEdge.label]) {\n backwardRoot[backwardEdge.label] = {\n projected: [],\n edgeLabel: backwardEdge.label\n };\n }\n backwardRoot[backwardEdge.label].projected.push({\n graphId: graph.id,\n edge: backwardRoot,\n preNode: p\n });\n newTo = dfsCodeMin.dfsEdgeList[rmpath[i]].fromNode;\n flag = true;\n }\n });\n };\n for (var i = rmpath.length - 1; i > end; i--) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\") break;\n }\n if (flag) {\n var minBackwardEdgeLabel = _this.findMinLabel(backwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(maxToC, newTo, _struct.VACANT_NODE_LABEL, minBackwardEdgeLabel.edgeLabel, _struct.VACANT_NODE_LABEL));\n var idx_1 = dfsCodeMin.dfsEdgeList.length - 1;\n if (_this.dfsCode.dfsEdgeList[idx_1] !== dfsCodeMin.dfsEdgeList[idx_1]) return false;\n return projectIsMin(backwardRoot[minBackwardEdgeLabel.edgeLabel].projected);\n }\n var forwardRoot = {};\n flag = false;\n var newFrom = 0;\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n if (forwardPureEdges.length > 0) {\n flag = true;\n newFrom = maxToC;\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n var pathLength = rmpath.length;\n var _loop_2 = function _loop_2(i) {\n if (flag) return \"break\";\n var value = rmpath[i];\n projected.forEach(function (p) {\n var history = new History(p);\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[value], minNodeLabel, history);\n if (forwardRmpathEdges.length > 0) {\n flag = true;\n newFrom = dfsCodeMin.dfsEdgeList[value].fromNode;\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: graph.id,\n edge: edge,\n preNode: p\n });\n });\n }\n });\n };\n for (var i = 0; i < pathLength; i++) {\n var state_2 = _loop_2(i);\n if (state_2 === \"break\") break;\n }\n if (!flag) return true;\n var forwardMinEdgeNodeLabel = _this.findMinLabel(forwardRoot);\n dfsCodeMin.dfsEdgeList.push(new DFSedge(newFrom, maxToC + 1, _struct.VACANT_NODE_LABEL, forwardMinEdgeNodeLabel.edgeLabel, forwardMinEdgeNodeLabel.nodeLabel2));\n var idx = dfsCodeMin.dfsEdgeList.length - 1;\n if (dfsCode.dfsEdgeList[idx] !== dfsCodeMin.dfsEdgeList[idx]) return false;\n return projectIsMin(forwardRoot[\"\".concat(forwardMinEdgeNodeLabel.edgeLabel, \"-\").concat(forwardMinEdgeNodeLabel.nodeLabel2)].projected);\n };\n var key = \"\".concat(minLabel.nodeLabel1, \"-\").concat(minLabel.edgeLabel, \"-\").concat(minLabel.nodeLabel2);\n return projectIsMin(root[key].projected);\n };\n GSpan.prototype.report = function () {\n if (this.dfsCode.getNodeNum() < this.minNodeNum) return;\n this.counter++;\n var graph = this.dfsCode.toGraph(this.counter, this.directed);\n this.frequentSubgraphs.push((0, _util.clone)(graph));\n };\n GSpan.prototype.subGraphMining = function (projected) {\n var _this = this;\n var support = this.getSupport(projected);\n if (support < this.minSupport) return;\n if (!this.isMin()) return;\n this.report();\n var nodeNum = this.dfsCode.getNodeNum();\n var rmpath = this.dfsCode.buildRmpath();\n var maxToC = this.dfsCode.dfsEdgeList[rmpath[0]].toNode;\n var minNodeLabel = this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1;\n var forwardRoot = {};\n var backwardRoot = {};\n projected.forEach(function (p) {\n var graph = _this.graphs[p.graphId];\n var nodeMap = graph.nodeMap;\n var history = new History(p);\n // backward Line 526\n for (var i = rmpath.length - 1; i >= 0; i--) {\n var backwardEdge = _this.findBackwardEdge(graph, history.edges[rmpath[i]], history.edges[rmpath[0]], history);\n if (backwardEdge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(backwardEdge.label);\n if (!backwardRoot[key]) backwardRoot[key] = {\n projected: [],\n toNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: backwardEdge.label\n };\n backwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: backwardEdge,\n preNode: p\n });\n }\n }\n // pure forward\n if (nodeNum >= _this.maxNodeNum) return;\n var forwardPureEdges = _this.findForwardPureEdges(graph, history.edges[rmpath[0]], minNodeLabel, history);\n forwardPureEdges.forEach(function (edge) {\n var key = \"\".concat(maxToC, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: maxToC,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n var _loop_3 = function _loop_3(i) {\n var forwardRmpathEdges = _this.findForwardRmpathEdges(graph, history.edges[rmpath[i]], minNodeLabel, history);\n forwardRmpathEdges.forEach(function (edge) {\n var key = \"\".concat(_this.dfsCode.dfsEdgeList[rmpath[i]].fromNode, \"-\").concat(edge.label, \"-\").concat(nodeMap[edge.to].label);\n if (!forwardRoot[key]) forwardRoot[key] = {\n projected: [],\n fromNodeId: _this.dfsCode.dfsEdgeList[rmpath[i]].fromNode,\n edgeLabel: edge.label,\n nodeLabel2: nodeMap[edge.to].label\n };\n forwardRoot[key].projected.push({\n graphId: p.graphId,\n edge: edge,\n preNode: p\n });\n });\n };\n // rmpath forward\n for (var i = 0; i < rmpath.length; i++) {\n _loop_3(i);\n }\n });\n // backward\n Object.keys(backwardRoot).forEach(function (key) {\n var _a = backwardRoot[key],\n toNodeId = _a.toNodeId,\n edgeLabel = _a.edgeLabel;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(maxToC, toNodeId, \"-1\", edgeLabel, \"-1\"));\n _this.subGraphMining(backwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n // forward\n Object.keys(forwardRoot).forEach(function (key) {\n var _a = forwardRoot[key],\n fromNodeId = _a.fromNodeId,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(fromNodeId, maxToC + 1, _struct.VACANT_NODE_LABEL, edgeLabel, nodeLabel2));\n _this.subGraphMining(forwardRoot[key].projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n GSpan.prototype.generate1EdgeFrequentSubGraphs = function () {\n var graphs = this.graphs;\n var directed = this.directed;\n var minSupport = this.minSupport;\n var frequentSize1Subgraphs = this.frequentSize1Subgraphs;\n var nodeLabelCounter = {},\n nodeEdgeNodeCounter = {};\n // 保存各个图和各自节点的关系 map,key 格式为 graphKey-node类型\n var nodeLableCounted = {};\n // 保存各个图和各自边的关系 map,key 格式为 graphKey-fromNode类型-edge类型-toNode类型\n var nodeEdgeNodeLabelCounted = {};\n Object.keys(graphs).forEach(function (key) {\n // Line 271\n var graph = graphs[key];\n var nodeMap = graph.nodeMap;\n // 遍历节点,记录对应图 与 每个节点的 label 到 nodeLableCounted\n graph.nodes.forEach(function (node, i) {\n // Line 272\n var nodeLabel = node.label;\n var graphNodeKey = \"\".concat(key, \"-\").concat(nodeLabel);\n if (!nodeLableCounted[graphNodeKey]) {\n var counter = nodeLabelCounter[nodeLabel] || 0;\n counter++;\n nodeLabelCounter[nodeLabel] = counter;\n }\n nodeLableCounted[graphNodeKey] = {\n graphKey: key,\n label: nodeLabel\n };\n // 遍历该节点的所有边,记录各个图和各自边的关系到 nodeEdgeNodeLabelCounted. Line 276\n node.edges.forEach(function (edge) {\n var nodeLabel1 = nodeLabel;\n var nodeLabel2 = nodeMap[edge.to].label;\n if (!directed && nodeLabel1 > nodeLabel2) {\n var tmp = nodeLabel2;\n nodeLabel2 = nodeLabel1;\n nodeLabel1 = tmp;\n }\n var edgeLabel = edge.label;\n var graphNodeEdgeNodeKey = \"\".concat(key, \"-\").concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n var nodeEdgeNodeKey = \"\".concat(nodeLabel1, \"-\").concat(edgeLabel, \"-\").concat(nodeLabel2);\n if (!nodeEdgeNodeCounter[nodeEdgeNodeKey]) {\n var counter = nodeEdgeNodeCounter[nodeEdgeNodeKey] || 0;\n counter++;\n nodeEdgeNodeCounter[nodeEdgeNodeKey] = counter; // Line281\n }\n\n nodeEdgeNodeLabelCounted[graphNodeEdgeNodeKey] = {\n graphId: key,\n nodeLabel1: nodeLabel1,\n edgeLabel: edgeLabel,\n nodeLabel2: nodeLabel2\n };\n });\n });\n });\n // 计算频繁的节点\n Object.keys(nodeLabelCounter).forEach(function (label) {\n var count = nodeLabelCounter[label];\n if (count < minSupport) return;\n var g = {\n nodes: [],\n edges: []\n };\n g.nodes.push({\n id: \"0\",\n label: label\n });\n frequentSize1Subgraphs.push(g);\n // if (minNodeNum <= 1) reportSize1 TODO\n });\n\n return frequentSize1Subgraphs;\n };\n GSpan.prototype.run = function () {\n var _this = this;\n // -------- 第一步, _generate_1edge_frequent_subgraphs:频繁的单个节点-------\n this.frequentSize1Subgraphs = this.generate1EdgeFrequentSubGraphs();\n if (this.maxNodeNum < 2) return;\n var graphs = this.graphs;\n var directed = this.directed;\n // PDFS 数组的 map Line 304\n var root = {};\n Object.keys(graphs).forEach(function (graphId) {\n var graph = graphs[graphId];\n var nodeMap = graph.nodeMap;\n // Line 306\n graph.nodes.forEach(function (node) {\n var forwardRootEdges = _this.findForwardRootEdges(graph, node);\n // Line 308\n forwardRootEdges.forEach(function (edge) {\n var toNode = nodeMap[edge.to];\n var nodeEdgeNodeLabel = \"\".concat(node.label, \"-\").concat(edge.label, \"-\").concat(toNode.label);\n if (!root[nodeEdgeNodeLabel]) root[nodeEdgeNodeLabel] = {\n projected: [],\n nodeLabel1: node.label,\n edgeLabel: edge.label,\n nodeLabel2: toNode.label\n };\n var pdfs = {\n graphId: graphId,\n edge: edge,\n preNode: null\n };\n root[nodeEdgeNodeLabel].projected.push(pdfs);\n });\n });\n });\n // Line 313\n Object.keys(root).forEach(function (nodeEdgeNodeLabel) {\n var _a = root[nodeEdgeNodeLabel],\n projected = _a.projected,\n nodeLabel1 = _a.nodeLabel1,\n edgeLabel = _a.edgeLabel,\n nodeLabel2 = _a.nodeLabel2;\n _this.dfsCode.dfsEdgeList.push(new DFSedge(0, 1, nodeLabel1, edgeLabel, nodeLabel2));\n _this.subGraphMining(projected);\n _this.dfsCode.dfsEdgeList.pop();\n });\n };\n return GSpan;\n}();\nvar formatGraphs = function formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp) {\n var result = {};\n Object.keys(graphs).forEach(function (key, i) {\n var graph = graphs[key];\n var fGraph = new _struct.Graph(i, true, directed);\n var nodeIdxMap = {};\n graph.nodes.forEach(function (node, j) {\n fGraph.addNode(j, node[nodeLabelProp]);\n nodeIdxMap[node.id] = j;\n });\n graph.edges.forEach(function (edge, k) {\n var sourceIdx = nodeIdxMap[edge.source];\n var targetIdx = nodeIdxMap[edge.target];\n fGraph.addEdge(-1, sourceIdx, targetIdx, edge[edgeLabelProp]);\n });\n if (fGraph && fGraph.getNodeNum()) result[fGraph.id] = fGraph;\n });\n return result;\n};\nvar toGraphDatas = function toGraphDatas(graphs, nodeLabelProp, edgeLabelProp) {\n var result = [];\n graphs.forEach(function (graph) {\n var graphData = {\n nodes: [],\n edges: []\n };\n graph.nodes.forEach(function (node) {\n var _a;\n graphData.nodes.push((_a = {\n id: \"\".concat(node.id)\n }, _a[nodeLabelProp] = node.label, _a));\n });\n graph.edges.forEach(function (edge) {\n var _a;\n graphData.edges.push((_a = {\n source: \"\".concat(edge.from),\n target: \"\".concat(edge.to)\n }, _a[edgeLabelProp] = edge.label, _a));\n });\n result.push(graphData);\n });\n return result;\n};\nvar DEFAULT_LABEL_NAME = \"cluster\";\n/**\n * gSpan 频繁子图计算算法(frequent graph mining)\n * @param params 参数\n */\nvar gSpan = function gSpan(params) {\n // ------- 将图数据 GraphData 的 map 转换为格式 -------\n var graphs = params.graphs,\n _a = params.directed,\n directed = _a === void 0 ? false : _a,\n _b = params.nodeLabelProp,\n nodeLabelProp = _b === void 0 ? DEFAULT_LABEL_NAME : _b,\n _c = params.edgeLabelProp,\n edgeLabelProp = _c === void 0 ? DEFAULT_LABEL_NAME : _c;\n var formattedGraphs = formatGraphs(graphs, directed, nodeLabelProp, edgeLabelProp);\n var minSupport = params.minSupport,\n maxNodeNum = params.maxNodeNum,\n minNodeNum = params.minNodeNum,\n verbose = params.verbose,\n top = params.top;\n // ------- 初始化与执行算法 -------\n var algoParams = {\n graphs: formattedGraphs,\n minSupport: minSupport,\n maxNodeNum: maxNodeNum,\n minNodeNum: minNodeNum,\n top: top,\n verbose: verbose,\n directed: directed\n };\n var calculator = new GSpan(algoParams);\n calculator.run();\n var result = toGraphDatas(calculator.frequentSubgraphs, nodeLabelProp, edgeLabelProp);\n return result;\n};\nvar _default = gSpan;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _tslib = require(\"tslib\");\nvar _floydWarshall = _interopRequireDefault(require(\"./floydWarshall\"));\nvar _gSpan = _interopRequireDefault(require(\"./gSpan/gSpan\"));\nvar _dijkstra = _interopRequireDefault(require(\"./dijkstra\"));\nvar _util = require(\"./util\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 为 graphData 中每个节点生成邻居单元数组\n * @param graphData\n * @param spm\n * @param nodeLabelProp\n * @param k k-近邻\n */\nvar findKNeighborUnits = function findKNeighborUnits(graphData, spm, nodeLabelProp, k) {\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (k === void 0) {\n k = 2;\n }\n var units = [];\n var nodes = graphData.nodes;\n spm.forEach(function (row, i) {\n units.push(findKNeighborUnit(nodes, row, i, nodeLabelProp, k));\n });\n return units;\n};\nvar findKNeighborUnit = function findKNeighborUnit(nodes, row, i, nodeLabelProp, k) {\n var unitNodeIdxs = [i];\n var neighbors = [];\n var labelCountMap = {};\n row.forEach(function (v, j) {\n if (v <= k && i !== j) {\n unitNodeIdxs.push(j);\n neighbors.push(nodes[j]);\n var label = nodes[j][nodeLabelProp];\n if (!labelCountMap[label]) labelCountMap[label] = {\n count: 1,\n dists: [v]\n };else {\n labelCountMap[label].count++;\n labelCountMap[label].dists.push(v);\n }\n }\n });\n // 将 labelCountMap 中的 dists 按照从小到大排序,方便后面使用\n Object.keys(labelCountMap).forEach(function (label) {\n labelCountMap[label].dists = labelCountMap[label].dists.sort(function (a, b) {\n return a - b;\n });\n });\n return {\n nodeIdx: i,\n nodeId: nodes[i].id,\n nodeIdxs: unitNodeIdxs,\n neighbors: neighbors,\n neighborNum: unitNodeIdxs.length - 1,\n nodeLabelCountMap: labelCountMap\n };\n};\n/**\n * 随机寻找点对,满足距离小于 k\n * @param k 参数 k,表示 k-近邻\n * @param nodeNum 参数 length\n * @param maxNodePairNum 寻找点对的数量不超过 maxNodePairNum\n * @param spm 最短路径矩阵\n */\nvar findNodePairsRandomly = function findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm) {\n // 每个节点需要随机找出的点对数\n var nodePairNumEachNode = Math.ceil(maxNodePairNum / nodeNum);\n var nodePairMap = {};\n var foundNodePairCount = 0;\n // 遍历节点,为每个节点随机找出 nodePairNumEachNode 个点对,满足距离小于 k。找到的点对数量超过 maxNodePairNum 或所有节点遍历结束时终止\n kNeighborUnits.forEach(function (unit, i) {\n // 若未达到 nodePairNumEachNode,或循环次数小于最大循环次数(2 * nodeNum),继续循环\n var nodePairForICount = 0;\n var outerLoopCount = 0;\n var neighbors = unit.nodeIdxs; // the first one is the center node\n var neighborNum = unit.neighborNum - 1;\n while (nodePairForICount < nodePairNumEachNode) {\n // 另一端节点在节点数组中的的 index\n var oidx = neighbors[1 + Math.floor(Math.random() * neighborNum)];\n var innerLoopCount = 0;\n // 若随机得到的另一端 idx 不符合条件,则继续 random。条件是不是同一个节点、这个点对没有被记录过、距离小于 k\n while (nodePairMap[\"\".concat(i, \"-\").concat(oidx)] || nodePairMap[\"\".concat(oidx, \"-\").concat(i)]) {\n oidx = Math.floor(Math.random() * nodeNum);\n innerLoopCount++;\n if (innerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n\n if (innerLoopCount < 2 * nodeNum) {\n // 未达到最大循环次数,说明找到了合适的另一端\n nodePairMap[\"\".concat(i, \"-\").concat(oidx)] = {\n start: i,\n end: oidx,\n distance: spm[i][oidx]\n };\n nodePairForICount++;\n foundNodePairCount++;\n // 如果当前找到的点对数量达到了上限,返回结果\n if (foundNodePairCount >= maxNodePairNum) return nodePairMap;\n }\n outerLoopCount++;\n if (outerLoopCount > 2 * nodeNum) break; // 循环次数大于最大循环次数(2 * nodeNum)跳出循环,避免死循环\n }\n // 这个节点没有找到足够 nodePairNumEachNode 的点对。更新 nodePairNumEachNode,让后续节点找更多的点对\n if (nodePairForICount < nodePairNumEachNode) {\n var gap = nodePairNumEachNode - nodePairForICount;\n nodePairNumEachNode = (nodePairNumEachNode + gap) / (nodeNum - i - 1);\n }\n });\n return nodePairMap;\n};\n/**\n * 计算所有 nodePairMap 中节点对的相交邻居诱导子图\n * @param nodePairMap 节点对 map,key 为 node1.id-node2.id,value 为 { startNodeIdx, endNodeIdx, distance }\n * @param neighborUnits 每个节点的邻居元数组\n * @param graphData 原图数据\n * @param edgeMap 边的 map,方便检索\n * @param cachedInducedGraphMap 缓存的结果,下次进入该函数将继续更新该缓存,若 key 在缓存中存在则不需要重复计算\n */\nvar getIntersectNeighborInducedGraph = function getIntersectNeighborInducedGraph(nodePairMap, neighborUnits, graphData, cachedInducedGraphMap) {\n var nodes = graphData.nodes;\n if (!cachedInducedGraphMap) cachedInducedGraphMap = {};\n Object.keys(nodePairMap).forEach(function (key) {\n var _a, _b;\n if (cachedInducedGraphMap && cachedInducedGraphMap[key]) return;\n cachedInducedGraphMap[key] = {\n nodes: [],\n edges: []\n };\n var pair = nodePairMap[key];\n var startUnitNodeIds = (_a = neighborUnits[pair.start]) === null || _a === void 0 ? void 0 : _a.nodeIdxs;\n var endUnitNodeIds = (_b = neighborUnits[pair.end]) === null || _b === void 0 ? void 0 : _b.nodeIdxs;\n if (!startUnitNodeIds || !endUnitNodeIds) return; // 不存在邻元,返回空图\n var endSet = new Set(endUnitNodeIds);\n var intersect = startUnitNodeIds.filter(function (x) {\n return endSet.has(x);\n }); // 可能会爆栈(在 1580 + 6 nodes full-connected 时出现)\n if (!intersect || !intersect.length) return; // 没有交集,返回空图\n var intersectIdMap = {};\n var intersectLength = intersect.length;\n for (var i = 0; i < intersectLength; i++) {\n var node = nodes[intersect[i]];\n cachedInducedGraphMap[key].nodes.push(node); // 将交集中的点加入诱导子图\n intersectIdMap[node.id] = true;\n }\n // 遍历所有边数据,如果边的两端都在交集中,将该边加入诱导子图\n graphData.edges.forEach(function (edge) {\n if (intersectIdMap[edge.source] && intersectIdMap[edge.target]) cachedInducedGraphMap[key].edges.push(edge);\n });\n });\n return cachedInducedGraphMap;\n};\n/**\n * 计算 strcutre 在 graph 上的匹配数量\n * @param graph 图数据\n * @param structure 目前支持只有两个节点一条边的最简单结构\n * @param nodeLabelProp 节点类型字段名\n * @param edgeLabelProp 边类型字段名\n */\nvar getMatchedCount = function getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp) {\n var _a, _b;\n var nodeMap = {};\n graph.nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var count = 0;\n if (!((_a = structure === null || structure === void 0 ? void 0 : structure.edges) === null || _a === void 0 ? void 0 : _a.length) || ((_b = structure === null || structure === void 0 ? void 0 : structure.nodes) === null || _b === void 0 ? void 0 : _b.length) < 2) return 0;\n graph.edges.forEach(function (e) {\n var sourceLabel = nodeMap[e.source][nodeLabelProp];\n var targetLabel = nodeMap[e.target][nodeLabelProp];\n var strNodeLabel1 = structure === null || structure === void 0 ? void 0 : structure.nodes[0][nodeLabelProp];\n var strNodeLabel2 = structure === null || structure === void 0 ? void 0 : structure.nodes[1][nodeLabelProp];\n var strEdgeLabel = structure === null || structure === void 0 ? void 0 : structure.edges[0][edgeLabelProp];\n if (e[edgeLabelProp] !== strEdgeLabel) return;\n if (sourceLabel === strNodeLabel1 && targetLabel === strNodeLabel2 || sourceLabel === strNodeLabel2 && targetLabel === strNodeLabel1) {\n count++;\n }\n });\n return count;\n};\n/**\n * structures 中寻找最具有代表性的一个。这个结构是使得 matchedCountMap 的分组方式类内间距最小,类间间距最大\n * @param matchedCountMap 每个 structure 分类后的各图匹配数量,格式 { [strcture.idx]: { [interInducedGraphKey]: count } }\n * @param structureNum strcuture 个数,与 matchedCountMap.length 对应\n * @param structures\n */\nvar findRepresentStructure = function findRepresentStructure(matchedCountMap, structureNum, structures) {\n var maxOffset = Infinity,\n representClusterType = 0;\n var _loop_1 = function _loop_1(i) {\n // 一种分组的 map,key 是 intGraph 的 key,value 是 structures[i] 的匹配个数\n var countMapI = matchedCountMap[i];\n // 按照 value 为该组排序,生成 keys 的数组:\n var sortedGraphKeys = Object.keys(countMapI).sort(function (a, b) {\n return countMapI[a] - countMapI[b];\n });\n // 共 100 个 graphKeys,将 graphKeys 按顺序分为 groupNum 组\n var groupNum = 10;\n var clusters = []; // 总共有 groupNum 个项\n sortedGraphKeys.forEach(function (key, j) {\n if (!clusters[j % groupNum]) clusters[j % groupNum] = {\n graphs: [],\n totalCount: 0,\n aveCount: 0\n };\n clusters[j % groupNum].graphs.push(key);\n clusters[j % groupNum].totalCount += countMapI[key];\n });\n // 计算 cluster 与 cluster 之间的距离 innerDist,每个 cluster 内部的距离 intraDist\n var aveIntraDist = 0; // 该类的类内平均值\n var aveCounts = []; // 类内平均匹配数量,将用于计算类间距离\n clusters.forEach(function (graphsInCluster) {\n // 类内均值\n var aveCount = graphsInCluster.totalCount / graphsInCluster.graphs.length;\n graphsInCluster.aveCount = aveCount;\n aveCounts.push(aveCount);\n // 对于每类,计算类内间距平均值\n var aveIntraPerCluster = 0;\n var graphsNum = graphsInCluster.length;\n graphsInCluster.graphs.forEach(function (graphKey1, j) {\n var graph1Count = countMapI[graphKey1];\n graphsInCluster.graphs.forEach(function (graphKey2, k) {\n if (j === k) return;\n aveIntraPerCluster += Math.abs(graph1Count - countMapI[graphKey2]);\n });\n });\n aveIntraPerCluster /= graphsNum * (graphsNum - 1) / 2;\n aveIntraDist += aveIntraPerCluster;\n });\n aveIntraDist /= clusters.length;\n // 用类内均值计算类间距\n var aveInterDist = 0; // 类间间距平均值\n aveCounts.forEach(function (aveCount1, j) {\n aveCounts.forEach(function (aveCount2, k) {\n if (j === k) return;\n aveInterDist += Math.abs(aveCount1 - aveCount2);\n });\n aveInterDist /= aveCounts.length * (aveCounts.length - 1) / 2;\n });\n // 寻找 (类间间距均值-类内间距均值) 最大的一种分组方式(对应的 structure 就是最终要找的唯一 DS(G))\n var offset = aveInterDist - aveIntraDist;\n if (maxOffset < offset) {\n maxOffset = offset;\n representClusterType = i;\n }\n };\n for (var i = 0; i < structureNum; i++) {\n _loop_1(i);\n }\n return {\n structure: structures[representClusterType],\n structureCountMap: matchedCountMap[representClusterType]\n };\n};\nvar getNodeMaps = function getNodeMaps(nodes, nodeLabelProp) {\n var nodeMap = {},\n nodeLabelMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = {\n idx: i,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var label = node[nodeLabelProp];\n if (!nodeLabelMap[label]) nodeLabelMap[label] = [];\n nodeLabelMap[label].push(node);\n });\n return {\n nodeMap: nodeMap,\n nodeLabelMap: nodeLabelMap\n };\n};\nvar getEdgeMaps = function getEdgeMaps(edges, edgeLabelProp, nodeMap) {\n var edgeMap = {},\n edgeLabelMap = {};\n edges.forEach(function (edge, i) {\n edgeMap[\"\".concat(_util.uniqueId)] = {\n idx: i,\n edge: edge\n };\n var label = edge[edgeLabelProp];\n if (!edgeLabelMap[label]) edgeLabelMap[label] = [];\n edgeLabelMap[label].push(edge);\n var sourceNode = nodeMap[edge.source];\n if (sourceNode) {\n sourceNode.degree++;\n sourceNode.outDegree++;\n }\n var targetNode = nodeMap[edge.target];\n if (targetNode) {\n targetNode.degree++;\n targetNode.inDegree++;\n }\n });\n return {\n edgeMap: edgeMap,\n edgeLabelMap: edgeLabelMap\n };\n};\n/**\n * 输出最短路径的 map,key 为 sourceNode.id-targetNode.id,value 为这两个节点的最短路径长度\n * @param nodes\n * @param spm\n * @param directed\n */\nvar getSpmMap = function getSpmMap(nodes, spm, directed) {\n var length = spm.length;\n var map = {};\n spm.forEach(function (row, i) {\n var start = directed ? 0 : i + 1;\n var iId = nodes[i].id;\n for (var j = start; j < length; j++) {\n if (i === j) continue;\n var jId = nodes[j].id;\n var dist = row[j];\n map[\"\".concat(iId, \"-\").concat(jId)] = dist;\n if (!directed) map[\"\".concat(jId, \"-\").concat(iId)] = dist;\n }\n });\n return map;\n};\n/**\n * 计算一对节点(node1,node2)的 NDS 距离\n * @param graph 原图数据\n * @param node1\n * @param node2\n */\nvar getNDSDist = function getNDSDist(graph, node1, node2, nodeMap, spDist, kNeighborUnits, structure, nodeLabelProp, edgeLabelProp, cachedNDSMap, cachedInterInducedGraph) {\n var _a;\n var key = \"\".concat(node1.id, \"-\").concat(node2.id);\n if (cachedNDSMap && cachedNDSMap[key]) return cachedNDSMap[key];\n var interInducedGraph = cachedInterInducedGraph ? cachedInterInducedGraph[key] : undefined;\n // 若没有缓存相交邻居诱导子图,计算\n if (!interInducedGraph) {\n var pairMap = (_a = {}, _a[key] = {\n start: nodeMap[node1.id].idx,\n end: nodeMap[node2.id].idx,\n distance: spDist\n }, _a);\n cachedInterInducedGraph = getIntersectNeighborInducedGraph(pairMap, kNeighborUnits, graph, cachedInterInducedGraph);\n interInducedGraph = cachedInterInducedGraph[key];\n }\n return getMatchedCount(interInducedGraph, structure, nodeLabelProp, edgeLabelProp);\n};\n/**\n * 计算 pattern 上绩点的度数并存储到 minPatternNodeLabelDegreeMap\n */\nvar stashPatternNodeLabelDegreeMap = function stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap) {\n var _a, _b, _c;\n var minPatternNodeLabelDegree = (_a = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _a === void 0 ? void 0 : _a.degree;\n var minPatternNodeLabelInDegree = (_b = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _b === void 0 ? void 0 : _b.inDegree;\n var minPatternNodeLabelOutDegree = (_c = minPatternNodeLabelDegreeMap[neighborLabel]) === null || _c === void 0 ? void 0 : _c.outDegree;\n if (minPatternNodeLabelDegreeMap[neighborLabel] === undefined) {\n minPatternNodeLabelDegree = Infinity;\n minPatternNodeLabelInDegree = Infinity;\n minPatternNodeLabelOutDegree = Infinity;\n patternNodeLabelMap[neighborLabel].forEach(function (patternNodeWithLabel) {\n var patternNodeDegree = patternNodeMap[patternNodeWithLabel.id].degree;\n if (minPatternNodeLabelDegree > patternNodeDegree) minPatternNodeLabelDegree = patternNodeDegree;\n var patternNodeInDegree = patternNodeMap[patternNodeWithLabel.id].inDegree;\n if (minPatternNodeLabelInDegree > patternNodeInDegree) minPatternNodeLabelInDegree = patternNodeInDegree;\n var patternNodeOutDegree = patternNodeMap[patternNodeWithLabel.id].outDegree;\n if (minPatternNodeLabelOutDegree > patternNodeOutDegree) minPatternNodeLabelOutDegree = patternNodeOutDegree;\n });\n minPatternNodeLabelDegreeMap[neighborLabel] = {\n degree: minPatternNodeLabelDegree,\n inDegree: minPatternNodeLabelInDegree,\n outDegree: minPatternNodeLabelOutDegree\n };\n }\n return {\n minPatternNodeLabelDegree: minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree: minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree: minPatternNodeLabelOutDegree\n };\n};\n/**\n * GADDI 模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nvar GADDI = function GADDI(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n var _a;\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n if (!graphData || !graphData.nodes) return;\n // 分为三步:\n // 0. 预计算:节点/边数,邻接矩阵、最短路径矩阵\n // 1. 处理原图 graphData。再分为 1~5 小步\n // 2. 匹配\n // console.log(\"----- stage-pre: preprocessing -------\");\n // -------- 第零步,预计算:节点/边数,邻接矩阵、最短路径矩阵-------\n var nodeNum = graphData.nodes.length;\n if (!nodeNum) return;\n // console.log(\"----- stage-pre.1: calc shortest path matrix for graph -------\");\n var spm = (0, _floydWarshall.default)(graphData, directed);\n // console.log(\n // \"----- stage-pre.2: calc shortest path matrix for pattern -------\"\n // );\n var patternSpm = (0, _floydWarshall.default)(pattern, directed);\n // console.log(\n // \"----- stage-pre.3: calc shortest path matrix map for graph -------\"\n // );\n var spmMap = getSpmMap(graphData.nodes, spm, directed);\n // console.log(\n // \"----- stage-pre.4: calc shortest path matrix map for pattern -------\"\n // );\n var patternSpmMap = getSpmMap(pattern.nodes, patternSpm, directed);\n // console.log(\"----- stage-pre.5: establish maps -------\");\n // 节点的 map,以 id 为 id 映射,方便后续快速检索\n var _b = getNodeMaps(graphData.nodes, nodeLabelProp),\n nodeMap = _b.nodeMap,\n nodeLabelMap = _b.nodeLabelMap;\n var _c = getNodeMaps(pattern.nodes, nodeLabelProp),\n patternNodeMap = _c.nodeMap,\n patternNodeLabelMap = _c.nodeLabelMap;\n // 计算节点度数\n getEdgeMaps(graphData.edges, edgeLabelProp, nodeMap);\n var patternEdgeLabelMap = getEdgeMaps(pattern.edges, edgeLabelProp, patternNodeMap).edgeLabelMap;\n // 若未指定 length,自动计算 pattern 半径(最短路径最大值)\n var patternSpmSpread = [];\n patternSpm === null || patternSpm === void 0 ? void 0 : patternSpm.forEach(function (row) {\n patternSpmSpread = patternSpmSpread.concat(row);\n });\n if (!length) length = Math.max.apply(Math, (0, _tslib.__spreadArray)((0, _tslib.__spreadArray)([], patternSpmSpread, false), [2], false));\n if (!k) k = length;\n // console.log(\"params\", directed, length, k);\n // console.log(\"----- stage-pre.6: calc k neighbor units -------\");\n // 计算每个节点的 k 邻元集合\n var kNeighborUnits = findKNeighborUnits(graphData, spm, nodeLabelProp, k);\n var patternKNeighborUnits = findKNeighborUnits(pattern, patternSpm, nodeLabelProp, k);\n // console.log(\n // \"----- stage0: going to processing graph and find intersect neighbor induced graphs -------\"\n // );\n // console.log(\"----- stage0.1: going to select random node pairs -------\");\n // -------- 第一步,处理原图 graphData-------\n // 1.1. 随机选择最多 100 个点对,满足距离小于 Length 和 k\n // 当 graphData 少于 20 个节点,则不能找出 100 个点对,只找出不多于 n(n-1)/2 个点对\n var maxNodePairNum = Math.min(100, nodeNum * (nodeNum - 1) / 2);\n var nodePairsMap = findNodePairsRandomly(k, nodeNum, maxNodePairNum, kNeighborUnits, spm);\n // console.log(\n // \"----- stage0.2: going to calculate intersect neighbor induced graphs -------\"\n // );\n // 1.2. 生成上面节点对的相应相交邻居诱导子图。格式为 {'beginNodeIdx-endNodeIdx': {nodes: [], edges: []}}\n var intGMap = getIntersectNeighborInducedGraph(nodePairsMap, kNeighborUnits, graphData);\n // 1.3. 使用 gSpan 算法(frequent graph mining)计算 ISIntG 的前 10 个频率最高的子结构(3-4条边)\n var top = 10,\n minSupport = 1,\n minNodeNum = 1,\n maxNodeNum = 4;\n var params = {\n graphs: intGMap,\n nodeLabelProp: nodeLabelProp,\n edgeLabelProp: edgeLabelProp,\n minSupport: minSupport,\n minNodeNum: minNodeNum,\n maxNodeNum: maxNodeNum,\n directed: directed\n };\n // console.log(\n // \"----- stage1: (gSpan) going to find frequent structure dsG -------\"\n // );\n // console.log(\"----- stage1.1: going to run gSpan -------\");\n // 暂时假设生成的 sub structure 都只有一条边\n var freStructures = (0, _gSpan.default)(params).slice(0, top);\n // structureNum 可能小于 top\n var structureNum = freStructures.length;\n // 1.4. 计算上述 10 个子结构在 intGMap 中每个诱导子图的匹配个数\n var matchedCountMap = [];\n freStructures.forEach(function (structure, i) {\n matchedCountMap[i] = {};\n Object.keys(intGMap).forEach(function (key) {\n var graph = intGMap[key];\n var subStructureCount = getMatchedCount(graph, structure, nodeLabelProp, edgeLabelProp);\n matchedCountMap[i][key] = subStructureCount;\n });\n });\n // console.log(\n // \"----- stage1.1: going to find the most represent strucutre -------\"\n // );\n // 1.5. 对于每个子结构,根据匹配个数为 intGMap 中的诱导子图分组,生成 structureNum 种分组\n // 计算每种分组的类间距和类内间距,找到类间距最大、类内间距最小的一种分组,这种分组对应的子结构被选为唯一代表性子结构 DS(G)\n var _d = findRepresentStructure(matchedCountMap, structureNum, freStructures),\n dsG = _d.structure,\n ndsDist = _d.structureCountMap;\n // -------- 第二步,匹配-------\n // 2.1 找到从 Q 中的一个节点作为起始节点,寻找 G 中的匹配。这个其实节点的标签可以在 G 中找到最多的节点\n var beginPNode = pattern.nodes[0],\n candidates = [],\n label = (_a = pattern.nodes[0]) === null || _a === void 0 ? void 0 : _a[nodeLabelProp],\n maxNodeNumWithSameLabel = -Infinity;\n pattern.nodes.forEach(function (node) {\n var pLabel = node[nodeLabelProp];\n var nodesWithSameLabel = nodeLabelMap[pLabel];\n if ((nodesWithSameLabel === null || nodesWithSameLabel === void 0 ? void 0 : nodesWithSameLabel.length) > maxNodeNumWithSameLabel) {\n maxNodeNumWithSameLabel = nodesWithSameLabel.length;\n candidates = nodesWithSameLabel;\n label = pLabel;\n beginPNode = node;\n }\n });\n // console.log(\"----- stage2: going to find candidates -------\");\n // 全局缓存,避免重复计算\n var minPatternNodeLabelDegreeMap = {}; // key 是 label,value 是该 label 节点的最小度数\n var patternIntGraphMap = {},\n patternNDSDist = {},\n // key 为 node.id-node.id\n patternNDSDistMap = {}; // key 为 node.id-label2,value nds距离值数组(按从大到小排序,无需关心具体对应哪个 node2)\n // 2.2.2 对于 Q 中的另一个标签的 k 个节点,计算它们到 node 的最短路径以及 NDS 距离\n var patternSpDist = {};\n var patternSpDistBack = {};\n Object.keys(patternNodeLabelMap).forEach(function (label2, j) {\n patternSpDist[label2] = [];\n if (directed) {\n patternSpDistBack[label2] = [];\n }\n var maxDist = -Infinity;\n var patternNodesWithLabel2 = patternNodeLabelMap[label2];\n var patternNodePairMap = {};\n patternNodesWithLabel2.forEach(function (nodeWithLabel2) {\n var dist = patternSpmMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)];\n dist && patternSpDist[label2].push(dist);\n if (maxDist < dist) maxDist = dist;\n patternNodePairMap[\"\".concat(beginPNode.id, \"-\").concat(nodeWithLabel2.id)] = {\n start: 0,\n end: patternNodeMap[nodeWithLabel2.id].idx,\n distance: dist\n };\n if (directed) {\n var distBack = patternSpmMap[\"\".concat(nodeWithLabel2.id, \"-\").concat(beginPNode.id)];\n distBack && patternSpDistBack[label2].push(distBack);\n }\n });\n // spDist[label2] 按照从小到大排序\n patternSpDist[label2] = patternSpDist[label2].sort(function (a, b) {\n return a - b;\n });\n if (directed) patternSpDistBack[label2] = patternSpDistBack[label2].sort(function (a, b) {\n return a - b;\n });\n // 计算 Q 中所有 label2 节点到 beginPNode 的 NDS 距离\n // 所有 label2 节点到 beginPNode 的邻居相交诱导子图:\n // key: node1.id-node2.id\n patternIntGraphMap = getIntersectNeighborInducedGraph(patternNodePairMap, patternKNeighborUnits, pattern, patternIntGraphMap);\n // pattern 中 beginNode 到当前 label2 节点 的 NDS 距离(数组,无需关心具体对应到哪个节点)\n var currentPatternNDSDistArray = [];\n Object.keys(patternNodePairMap).forEach(function (key) {\n if (patternNDSDist[key]) {\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var patternIntGraph = patternIntGraphMap[key];\n patternNDSDist[key] = getMatchedCount(patternIntGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentPatternNDSDistArray.push(patternNDSDist[key]);\n });\n // 根据值为 currentPatternNDSDist 从大到小排序\n currentPatternNDSDistArray = currentPatternNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n patternNDSDistMap[\"\".concat(beginPNode.id, \"-\").concat(label2)] = currentPatternNDSDistArray;\n if (label2 === label) return;\n var candidatesNum = (candidates === null || candidates === void 0 ? void 0 : candidates.length) || 0;\n var _loop_4 = function _loop_4(m) {\n var cNode = candidates[m];\n // prune1:若 candidates 中节点 cNode 的 kNeighborUnits 中标签为 label2 的节点个数少于 pattern 中 label2 个数,删去它\n var graphNeighborUnit = kNeighborUnits[nodeMap[cNode.id].idx];\n var graphNeighborUnitCountMap = graphNeighborUnit.nodeLabelCountMap[label2];\n var patternLabel2Num = patternNodeLabelMap[label2].length;\n if (!graphNeighborUnitCountMap || graphNeighborUnitCountMap.count < patternLabel2Num) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune2:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点最短路径大于 patternSpDist[label2],删去它\n // (prune2 规则即:candidate 相关的最短路径的最大 spDist[label2].length 个,按照大小顺序依次和 patternSpDist[label2] 中的值比较,只要遇到一个是 G > Q 的,就删去这个 candidate)\n var prune2Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (graphNeighborUnitCountMap.dists[n] > patternSpDist[label2][n]) {\n prune2Invalid = true;\n break;\n }\n }\n if (prune2Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n // prune3:若 candidates 中节点 cNode 到 kNeighborUnits 中标签为 label2 的节点 NDS 距离小于 patternNDSDist[beginNode.id-label2],删去它\n // TODO:prune3,currentPatternNDSDistArray 与 currentNDSDist 的比较\n // 计算 G 中所有 label2 节点到 cNode 的 NDS 距离\n // 所有 label2 节点到 cNode 的邻居相交诱导子图:\n var cNodePairMap = {};\n graphNeighborUnit.neighbors.forEach(function (neighborNode) {\n var dist = spmMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)];\n cNodePairMap[\"\".concat(cNode.id, \"-\").concat(neighborNode.id)] = {\n start: nodeMap[cNode.id].idx,\n end: nodeMap[neighborNode.id].idx,\n distance: dist\n };\n });\n // 更新 intGMap\n intGMap = getIntersectNeighborInducedGraph(cNodePairMap, kNeighborUnits, graphData, intGMap);\n // candidate 到它周围 label2 节点的 NDS 距离, key 是 node.id-node.id\n var currentNDSDistArray = [];\n Object.keys(cNodePairMap).forEach(function (key) {\n if (ndsDist[key]) {\n currentNDSDistArray.push(ndsDist[key]);\n return; // 缓存过则不需要再次计算\n }\n\n var intGraph = intGMap[key];\n ndsDist[key] = getMatchedCount(intGraph, dsG, nodeLabelProp, edgeLabelProp);\n currentNDSDistArray.push(ndsDist[key]);\n });\n // 根据值为 currentNDSDistArray 从大到小排序\n currentNDSDistArray = currentNDSDistArray.sort(function (a, b) {\n return b - a;\n });\n var prune3Invalid = false;\n for (var n = 0; n < patternLabel2Num; n++) {\n if (currentNDSDistArray[n] < currentPatternNDSDistArray[n]) {\n prune3Invalid = true;\n break;\n }\n }\n if (prune3Invalid) {\n candidates.splice(m, 1);\n return \"continue\";\n }\n };\n for (var m = candidatesNum - 1; m >= 0; m--) {\n _loop_4(m);\n }\n });\n var candidateGraphs = [];\n // console.log(\n // \"----- stage3: going to splice neighbors for each candidate graph -------\"\n // );\n // candidates 经过筛选后,以每个 candidate 为中心,生成 Length-neighbor 的邻居诱导子图\n // 并在诱导子图中去除不可能在 Q 上找到匹配的点:在 Q 上不存在的 label,其他 label 到 candidate 的最大最短距离符合 Q、NDS 距离符合 Q\n candidates === null || candidates === void 0 ? void 0 : candidates.forEach(function (candidate) {\n var nodeIdx = nodeMap[candidate.id].idx;\n var lengthNeighborUnit = findKNeighborUnit(graphData.nodes, spm[nodeIdx], nodeIdx, nodeLabelProp, length);\n var neighborNodes = lengthNeighborUnit.neighbors;\n // 删除不可能找到匹配的邻居点\n var neighborNum = neighborNodes.length;\n var unmatched = false;\n for (var i = neighborNum - 1; i >= 0; i--) {\n // 如果通过裁剪,符合条件的节点数量已过少,说明不能匹配这个 candidate 相关的图\n if (neighborNodes.length + 1 < pattern.nodes.length) {\n unmatched = true;\n return;\n }\n var neighborNode = neighborNodes[i];\n var neighborLabel = neighborNode[nodeLabelProp];\n // prune1: 若该邻居点的 label 不存在于 pattern 中,移除这个点\n if (!patternNodeLabelMap[neighborLabel] || !patternNodeLabelMap[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune2: 若该邻居点到 candidate 的最短路径比和它有相同 label 的节点到 beginPNode 的最大最短路径长度长,移除这个点\n // prune2.1: 如果没有这个标签到 beginPNode 的距离记录,说明 pattern 上(可能 beginPNode 是这个 label)没有其他这个 label 的节点\n if (!patternSpDist[neighborLabel] || !patternSpDist[neighborLabel].length) {\n neighborNodes.splice(i, 1);\n continue;\n }\n var key = \"\".concat(candidate.id, \"-\").concat(neighborNode.id);\n // prune2.2\n var distToCandidate = spmMap[key];\n var idx = patternSpDist[neighborLabel].length - 1;\n var maxDistWithLabelInPattern = patternSpDist[neighborLabel][idx]; // patternSpDist[neighborLabel] 已经按照从小到大排序\n if (distToCandidate > maxDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n if (directed) {\n var keyBack = \"\".concat(neighborNode.id, \"-\").concat(candidate.id);\n var distFromCandidate = spmMap[keyBack];\n idx = patternSpDistBack[neighborLabel].length - 1;\n var maxBackDistWithLabelInPattern = patternSpDistBack[neighborLabel][idx];\n if (distFromCandidate > maxBackDistWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // prune3: 若该邻居点到 candidate 的 NDS 距离比和它有相同 label 的节点到 beginPNode 的最小 NDS 距离小,移除这个点\n var ndsToCandidate = ndsDist[key] ? ndsDist[key] : getNDSDist(graphData, candidate, neighborNode, nodeMap, distToCandidate, kNeighborUnits, dsG, nodeLabelProp, edgeLabelProp, ndsDist, intGMap);\n var patternKey = \"\".concat(beginPNode.id, \"-\").concat(neighborLabel);\n var minNdsWithLabelInPattern = patternNDSDistMap[patternKey][patternNDSDistMap[patternKey].length - 1]; // patternNDSDist[key] 一定存在\n if (ndsToCandidate < minNdsWithLabelInPattern) {\n neighborNodes.splice(i, 1);\n continue;\n }\n // prune4: 若该邻居点的度数小于 pattern 同 label 节点最小度数,删去该点\n var _a = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, neighborLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _a.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _a.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _a.minPatternNodeLabelOutDegree;\n if (nodeMap[neighborNode.id].degree < minPatternNodeLabelDegree) {\n neighborNodes.splice(i, 1);\n continue;\n }\n }\n // 节点在个数上符合匹配(不少于 pattern 的节点个数),现在筛选相关边\n if (!unmatched) {\n candidateGraphs.push({\n nodes: [candidate].concat(neighborNodes)\n });\n }\n });\n // console.log(\n // \"----- stage4: going to splice edges and neighbors for each candidate graph -------\"\n // );\n var undirectedLengthsToBeginPNode = (0, _dijkstra.default)(pattern, beginPNode.id, false).length;\n var undirectedLengthsToBeginPNodeLabelMap = {};\n if (directed) {\n Object.keys(undirectedLengthsToBeginPNode).forEach(function (nodeId) {\n var nodeLabel = patternNodeMap[nodeId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nodeLabel]) undirectedLengthsToBeginPNodeLabelMap[nodeLabel] = [undirectedLengthsToBeginPNode[nodeId]];else undirectedLengthsToBeginPNodeLabelMap[nodeLabel].push(undirectedLengthsToBeginPNode[nodeId]);\n });\n Object.keys(undirectedLengthsToBeginPNodeLabelMap).forEach(function (pLabel) {\n undirectedLengthsToBeginPNodeLabelMap[pLabel].sort(function (a, b) {\n return a - b;\n });\n });\n } else {\n undirectedLengthsToBeginPNodeLabelMap = patternSpDist;\n }\n // 现在 candidateGraphs 里面只有节点,进行边的筛选\n var candidateGraphNum = candidateGraphs.length;\n var _loop_2 = function _loop_2(i) {\n var candidateGraph = candidateGraphs[i];\n var candidate = candidateGraph.nodes[0];\n var candidateNodeLabelCountMap = {};\n var candidateNodeMap = {};\n candidateGraph.nodes.forEach(function (node, q) {\n candidateNodeMap[node.id] = {\n idx: q,\n node: node,\n degree: 0,\n inDegree: 0,\n outDegree: 0\n };\n var cNodeLabel = node[nodeLabelProp];\n if (!candidateNodeLabelCountMap[cNodeLabel]) candidateNodeLabelCountMap[cNodeLabel] = 1;else candidateNodeLabelCountMap[cNodeLabel]++;\n });\n // 根据 candidate 和 neighborNodes 中的节点生成 G 的诱导子图\n // 即,将 graphData 上两端都在 candidateGraph.nodes 中的边放入 candidateEdges\n var candidateEdges = [];\n var edgeLabelCountMap = {};\n graphData.edges.forEach(function (edge) {\n if (candidateNodeMap[edge.source] && candidateNodeMap[edge.target]) {\n candidateEdges.push(edge);\n if (!edgeLabelCountMap[edge[edgeLabelProp]]) edgeLabelCountMap[edge[edgeLabelProp]] = 1;else edgeLabelCountMap[edge[edgeLabelProp]]++;\n candidateNodeMap[edge.source].degree++;\n candidateNodeMap[edge.target].degree++;\n candidateNodeMap[edge.source].outDegree++;\n candidateNodeMap[edge.target].inDegree++;\n }\n });\n // prune:若有一个 edgeLabel 在 candidateGraph 上的个数少于 pattern,去除该图\n var pattenrEdgeLabelNum = Object.keys(patternEdgeLabelMap).length;\n var prunedByEdgeLabel = false;\n for (var e = 0; e < pattenrEdgeLabelNum; e++) {\n var label_1 = Object.keys(patternEdgeLabelMap)[e];\n if (!edgeLabelCountMap[label_1] || edgeLabelCountMap[label_1] < patternEdgeLabelMap[label_1].length) {\n prunedByEdgeLabel = true;\n break;\n }\n }\n if (prunedByEdgeLabel) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // 遍历 candidateEdges,进行边的筛选\n var candidateEdgeNum = candidateEdges.length;\n // prune:若边数过少,去除该图\n if (candidateEdgeNum < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"break\";\n }\n var candidateGraphInvalid = false;\n var _loop_5 = function _loop_5(e) {\n var edge = candidateEdges[e];\n var edgeLabel = edge[edgeLabelProp];\n var patternEdgesWithLabel = patternEdgeLabelMap[edgeLabel];\n // prune 1: 若边的 label 不存在于 pattern 边 label 中,去除该边\n if (!patternEdgesWithLabel || !patternEdgesWithLabel.length) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n // prune 2: 若边的 label +两端 label 的三元组关系不能在 pattern 中找到,去除该边\n var sourceLabel = candidateNodeMap[edge.source].node[nodeLabelProp];\n var targetLabel = candidateNodeMap[edge.target].node[nodeLabelProp];\n var edgeMatched = false;\n patternEdgesWithLabel.forEach(function (patternEdge) {\n var patternSource = patternNodeMap[patternEdge.source].node;\n var patternTarget = patternNodeMap[patternEdge.target].node;\n if (patternSource[nodeLabelProp] === sourceLabel && patternTarget[nodeLabelProp] === targetLabel) edgeMatched = true;\n if (!directed && patternSource[nodeLabelProp] === targetLabel && patternTarget[nodeLabelProp] === sourceLabel) edgeMatched = true;\n });\n if (!edgeMatched) {\n edgeLabelCountMap[edgeLabel]--;\n // 若这个 label 的 count 减少之后,该 label 的边数不足,去除该图\n if (patternEdgesWithLabel && edgeLabelCountMap[edgeLabel] < patternEdgesWithLabel.length) {\n candidateGraphInvalid = true;\n return \"break\";\n }\n candidateEdges.splice(e, 1);\n candidateNodeMap[edge.source].degree--;\n candidateNodeMap[edge.target].degree--;\n candidateNodeMap[edge.source].outDegree--;\n candidateNodeMap[edge.target].inDegree--;\n return \"continue\";\n }\n };\n for (var e = candidateEdgeNum - 1; e >= 0; e--) {\n var state_2 = _loop_5(e);\n if (state_2 === \"break\") break;\n }\n // prune2: 删除边的过程中,发现边数过少/边 label 数过少时,去除该图\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n candidateGraph.edges = candidateEdges;\n var lengthsToCandidate = (0, _dijkstra.default)(candidateGraph, candidateGraph.nodes[0].id, false).length;\n Object.keys(lengthsToCandidate).reverse().forEach(function (targetId) {\n if (targetId === candidateGraph.nodes[0].id || candidateGraphInvalid) return;\n // prune4: 通过上述裁剪,可能导致该邻居子图变为不连通。裁剪掉目前在这个邻居子图中和 candidate(第一个节点)不连通的节点\n if (lengthsToCandidate[targetId] === Infinity) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n return;\n }\n // prune5: 经过边裁剪后,可能又出现了最短路径过长的节点 (比 pattern 中同 label 的节点到 beginNode 最大最短距离远),删去这些节点\n var nLabel = nodeMap[targetId].node[nodeLabelProp];\n if (!undirectedLengthsToBeginPNodeLabelMap[nLabel] || !undirectedLengthsToBeginPNodeLabelMap[nLabel].length || lengthsToCandidate[targetId] > undirectedLengthsToBeginPNodeLabelMap[nLabel][undirectedLengthsToBeginPNodeLabelMap[nLabel].length - 1]) {\n var targetNodeLabel = candidateNodeMap[targetId].node[nodeLabelProp];\n candidateNodeLabelCountMap[targetNodeLabel]--;\n if (candidateNodeLabelCountMap[targetNodeLabel] < patternNodeLabelMap[targetNodeLabel].length) {\n candidateGraphInvalid = true;\n return;\n }\n var idx = candidateGraph.nodes.indexOf(candidateNodeMap[targetId].node);\n candidateGraph.nodes.splice(idx, 1);\n candidateNodeMap[targetId] = undefined;\n }\n });\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n var degreeChanged = true;\n var loopCount = 0;\n while (degreeChanged && !candidateGraphInvalid) {\n degreeChanged = false;\n // candidate 度数不足,删去该图\n var condition = directed ? candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree || candidateNodeMap[candidate.id].inDegree < patternNodeMap[beginPNode.id].inDegree || candidateNodeMap[candidate.id].outDegree < patternNodeMap[beginPNode.id].outDegree : candidateNodeMap[candidate.id].degree < patternNodeMap[beginPNode.id].degree;\n if (condition) {\n candidateGraphInvalid = true;\n break;\n }\n // candidate label 个数不足,删去该图\n if (candidateNodeLabelCountMap[candidate[nodeLabelProp]] < patternNodeLabelMap[candidate[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n // prune6:去除度数过小的节点\n var currentCandidateNodeNum = candidateGraph.nodes.length;\n for (var o = currentCandidateNodeNum - 1; o >= 0; o--) {\n var cgNode = candidateGraph.nodes[o];\n var nodeDegree = candidateNodeMap[cgNode.id].degree;\n var nodeInDegree = candidateNodeMap[cgNode.id].inDegree;\n var nodeOutDegree = candidateNodeMap[cgNode.id].outDegree;\n var cNodeLabel = cgNode[nodeLabelProp];\n var _e = stashPatternNodeLabelDegreeMap(minPatternNodeLabelDegreeMap, cNodeLabel, patternNodeMap, patternNodeLabelMap),\n minPatternNodeLabelDegree = _e.minPatternNodeLabelDegree,\n minPatternNodeLabelInDegree = _e.minPatternNodeLabelInDegree,\n minPatternNodeLabelOutDegree = _e.minPatternNodeLabelOutDegree;\n var deleteCondition = directed ? nodeDegree < minPatternNodeLabelDegree || nodeInDegree < minPatternNodeLabelInDegree || nodeOutDegree < minPatternNodeLabelOutDegree : nodeDegree < minPatternNodeLabelDegree;\n if (deleteCondition) {\n candidateNodeLabelCountMap[cgNode[nodeLabelProp]]--;\n // 节点 label 个数不足\n if (candidateNodeLabelCountMap[cgNode[nodeLabelProp]] < patternNodeLabelMap[cgNode[nodeLabelProp]].length) {\n candidateGraphInvalid = true;\n break;\n }\n candidateGraph.nodes.splice(o, 1);\n candidateNodeMap[cgNode.id] = undefined;\n degreeChanged = true;\n }\n }\n if (candidateGraphInvalid || !degreeChanged && loopCount !== 0) break;\n // 经过 prune5 节点裁剪,删去端点已经不在 candidateGraph 中的边\n candidateEdgeNum = candidateEdges.length;\n for (var y = candidateEdgeNum - 1; y >= 0; y--) {\n var cedge = candidateEdges[y];\n if (!candidateNodeMap[cedge.source] || !candidateNodeMap[cedge.target]) {\n candidateEdges.splice(y, 1);\n var edgeLabel = cedge[edgeLabelProp];\n edgeLabelCountMap[edgeLabel]--;\n if (candidateNodeMap[cedge.source]) {\n candidateNodeMap[cedge.source].degree--;\n candidateNodeMap[cedge.source].outDegree--;\n }\n if (candidateNodeMap[cedge.target]) {\n candidateNodeMap[cedge.target].degree--;\n candidateNodeMap[cedge.target].inDegree--;\n }\n // 边 label 数量不足\n if (patternEdgeLabelMap[edgeLabel] && edgeLabelCountMap[edgeLabel] < patternEdgeLabelMap[edgeLabel].length) {\n candidateGraphInvalid = true;\n break;\n }\n degreeChanged = true;\n }\n }\n loopCount++;\n }\n if (candidateGraphInvalid) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n // prune: 若节点/边数过少,节点/边 label 过少,去掉这个图\n if (candidateGraphInvalid || candidateGraph.nodes.length < pattern.nodes.length || candidateEdges.length < pattern.edges.length) {\n candidateGraphs.splice(i, 1);\n return \"continue\";\n }\n };\n for (var i = candidateGraphNum - 1; i >= 0; i--) {\n var state_1 = _loop_2(i);\n if (state_1 === \"break\") break;\n }\n // 此时已经生成的多个 candidateGraphs,可能有重复\n // console.log(\n // \"----- stage5: going to splice dulplicated candidate graphs -------\"\n // );\n // 删去 candidateGraphs 中一模一样的子图,通过边的 node-node-edgeLabel 作为 key,这类边个数作为 value,进行匹配\n var currentLength = candidateGraphs.length;\n var _loop_3 = function _loop_3(i) {\n var cg1 = candidateGraphs[i];\n var cg1EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg1.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg1EdgeMap[key]) cg1EdgeMap[key] = 1;else cg1EdgeMap[key]++;\n });\n var _loop_6 = function _loop_6(j) {\n var cg2 = candidateGraphs[j];\n var cg2EdgeMap = {}; // [node1.id-node2.id-edge.label]: count\n cg2.edges.forEach(function (edge) {\n var key = \"\".concat(edge.source, \"-\").concat(edge.target, \"-\").concat(edge.label);\n if (!cg2EdgeMap[key]) cg2EdgeMap[key] = 1;else cg2EdgeMap[key]++;\n });\n var same = true;\n if (Object.keys(cg2EdgeMap).length !== Object.keys(cg1EdgeMap).length) {\n same = false;\n } else {\n Object.keys(cg1EdgeMap).forEach(function (key) {\n if (cg2EdgeMap[key] !== cg1EdgeMap[key]) same = false;\n });\n }\n if (same) {\n candidateGraphs.splice(j, 1);\n }\n };\n for (var j = currentLength - 1; j > i; j--) {\n _loop_6(j);\n }\n currentLength = candidateGraphs.length;\n };\n for (var i = 0; i <= currentLength - 1; i++) {\n _loop_3(i);\n }\n return candidateGraphs;\n};\nvar _default = GADDI;\nexports.default = _default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GADDI\", {\n enumerable: true,\n get: function get() {\n return _gaddi.default;\n }\n});\nObject.defineProperty(exports, \"breadthFirstSearch\", {\n enumerable: true,\n get: function get() {\n return _bfs.default;\n }\n});\nObject.defineProperty(exports, \"connectedComponent\", {\n enumerable: true,\n get: function get() {\n return _connectedComponent.default;\n }\n});\nObject.defineProperty(exports, \"depthFirstSearch\", {\n enumerable: true,\n get: function get() {\n return _dfs.default;\n }\n});\nObject.defineProperty(exports, \"detectCycle\", {\n enumerable: true,\n get: function get() {\n return _detectCycle.default;\n }\n});\nObject.defineProperty(exports, \"dijkstra\", {\n enumerable: true,\n get: function get() {\n return _dijkstra.default;\n }\n});\nObject.defineProperty(exports, \"findAllPath\", {\n enumerable: true,\n get: function get() {\n return _findPath.findAllPath;\n }\n});\nObject.defineProperty(exports, \"findShortestPath\", {\n enumerable: true,\n get: function get() {\n return _findPath.findShortestPath;\n }\n});\nObject.defineProperty(exports, \"floydWarshall\", {\n enumerable: true,\n get: function get() {\n return _floydWarshall.default;\n }\n});\nObject.defineProperty(exports, \"getAdjMatrix\", {\n enumerable: true,\n get: function get() {\n return _adjacentMatrix.default;\n }\n});\nObject.defineProperty(exports, \"getDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.default;\n }\n});\nObject.defineProperty(exports, \"getInDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.getInDegree;\n }\n});\nObject.defineProperty(exports, \"getNeighbors\", {\n enumerable: true,\n get: function get() {\n return _util.getNeighbors;\n }\n});\nObject.defineProperty(exports, \"getOutDegree\", {\n enumerable: true,\n get: function get() {\n return _degree.getOutDegree;\n }\n});\nObject.defineProperty(exports, \"labelPropagation\", {\n enumerable: true,\n get: function get() {\n return _labelPropagation.default;\n }\n});\nObject.defineProperty(exports, \"louvain\", {\n enumerable: true,\n get: function get() {\n return _louvain.default;\n }\n});\nObject.defineProperty(exports, \"minimumSpanningTree\", {\n enumerable: true,\n get: function get() {\n return _mts.default;\n }\n});\nObject.defineProperty(exports, \"pageRank\", {\n enumerable: true,\n get: function get() {\n return _pageRank.default;\n }\n});\nvar _adjacentMatrix = _interopRequireDefault(require(\"../adjacent-matrix\"));\nvar _bfs = _interopRequireDefault(require(\"../bfs\"));\nvar _connectedComponent = _interopRequireDefault(require(\"../connected-component\"));\nvar _degree = _interopRequireWildcard(require(\"../degree\"));\nvar _detectCycle = _interopRequireDefault(require(\"../detect-cycle\"));\nvar _dfs = _interopRequireDefault(require(\"../dfs\"));\nvar _dijkstra = _interopRequireDefault(require(\"../dijkstra\"));\nvar _findPath = require(\"../find-path\");\nvar _floydWarshall = _interopRequireDefault(require(\"../floydWarshall\"));\nvar _labelPropagation = _interopRequireDefault(require(\"../label-propagation\"));\nvar _louvain = _interopRequireDefault(require(\"../louvain\"));\nvar _mts = _interopRequireDefault(require(\"../mts\"));\nvar _pageRank = _interopRequireDefault(require(\"../pageRank\"));\nvar _gaddi = _interopRequireDefault(require(\"../gaddi\"));\nvar _util = require(\"../util\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar algorithm = _interopRequireWildcard(require(\"./algorithm\"));\nvar _constant = require(\"./constant\");\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nvar ctx = typeof self !== 'undefined' ? self : {};\nctx.onmessage = function (event) {\n var _a = event.data,\n _algorithmType = _a._algorithmType,\n data = _a.data;\n // 如果发送内容没有私有类型。说明不是自己发的。不管\n // fix: https://github.com/antvis/algorithm/issues/25\n if (!_algorithmType) {\n return;\n }\n if (typeof algorithm[_algorithmType] === 'function') {\n var result = algorithm[_algorithmType].apply(algorithm, data);\n ctx.postMessage({\n _algorithmType: _constant.MESSAGE.SUCCESS,\n data: result\n });\n return;\n }\n ctx.postMessage({\n _algorithmType: _constant.MESSAGE.FAILURE\n });\n};\n// https://stackoverflow.com/questions/50210416/webpack-worker-loader-fails-to-compile-typescript-worker\nvar _default = null;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _constant = require(\"./constant\");\nvar _index = _interopRequireDefault(require(\"./index.worker\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * 创建一个在worker中运行的算法\n * @param type 算法类型\n */\nvar createWorker = function createWorker(type) {\n return function () {\n var data = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n data[_i] = arguments[_i];\n }\n return new Promise(function (resolve, reject) {\n var worker = new _index.default();\n worker.postMessage({\n _algorithmType: type,\n data: data\n });\n worker.onmessage = function (event) {\n var _a = event.data,\n data = _a.data,\n _algorithmType = _a._algorithmType;\n if (_constant.MESSAGE.SUCCESS === _algorithmType) {\n resolve(data);\n } else {\n reject();\n }\n worker.terminate();\n };\n });\n };\n};\nvar _default = createWorker;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.pageRankAsync = exports.minimumSpanningTreeAsync = exports.louvainAsync = exports.labelPropagationAsync = exports.getOutDegreeAsync = exports.getNeighborsAsync = exports.getInDegreeAsync = exports.getDegreeAsync = exports.getAdjMatrixAsync = exports.floydWarshallAsync = exports.findShortestPathAsync = exports.findAllPathAsync = exports.dijkstraAsync = exports.detectCycleAsync = exports.detectAllUndirectedCycleAsync = exports.detectAllDirectedCycleAsync = exports.detectAllCyclesAsync = exports.connectedComponentAsync = exports.GADDIAsync = void 0;\nvar _createWorker = _interopRequireDefault(require(\"./createWorker\"));\nvar _constant = require(\"./constant\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n/**\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nvar getAdjMatrixAsync = function getAdjMatrixAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getAdjMatrix).apply(void 0, [graphData, directed]);\n};\n/**\n * 图的连通分量\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nexports.getAdjMatrixAsync = getAdjMatrixAsync;\nvar connectedComponentAsync = function connectedComponentAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.connectedComponent).apply(void 0, [graphData, directed]);\n};\n/**\n * 获取节点的度\n * @param graphData 图数据\n */\nexports.connectedComponentAsync = connectedComponentAsync;\nvar getDegreeAsync = function getDegreeAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getDegree)(graphData);\n};\n/**\n * 获取节点的入度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getDegreeAsync = getDegreeAsync;\nvar getInDegreeAsync = function getInDegreeAsync(graphData, nodeId) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getInDegree)(graphData, nodeId);\n};\n/**\n * 获取节点的出度\n * @param graphData 图数据\n * @param nodeId 节点ID\n */\nexports.getInDegreeAsync = getInDegreeAsync;\nvar getOutDegreeAsync = function getOutDegreeAsync(graphData, nodeId) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getOutDegree)(graphData, nodeId);\n};\n/**\n * 检测图中的(有向) Cycle\n * @param graphData 图数据\n */\nexports.getOutDegreeAsync = getOutDegreeAsync;\nvar detectCycleAsync = function detectCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectCycle)(graphData);\n};\n/**\n * 检测图中的(无向) Cycle\n * @param graphData 图数据\n */\nexports.detectCycleAsync = detectCycleAsync;\nvar detectAllCyclesAsync = function detectAllCyclesAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllCycles)(graphData);\n};\n/**\n * 检测图中的所有(有向) Cycle\n * @param graphData 图数据\n */\nexports.detectAllCyclesAsync = detectAllCyclesAsync;\nvar detectAllDirectedCycleAsync = function detectAllDirectedCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllDirectedCycle)(graphData);\n};\n/**\n * 检测图中的所有(无向) Cycle\n * @param graphData 图数据\n */\nexports.detectAllDirectedCycleAsync = detectAllDirectedCycleAsync;\nvar detectAllUndirectedCycleAsync = function detectAllUndirectedCycleAsync(graphData) {\n return (0, _createWorker.default)(_constant.ALGORITHM.detectAllUndirectedCycle)(graphData);\n};\n/**\n * Dijkstra's algorithm, See {@link https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm}\n * @param graphData 图数据\n */\nexports.detectAllUndirectedCycleAsync = detectAllUndirectedCycleAsync;\nvar dijkstraAsync = function dijkstraAsync(graphData, source, directed, weightPropertyName) {\n return (0, _createWorker.default)(_constant.ALGORITHM.dijkstra).apply(void 0, [graphData, source, directed, weightPropertyName]);\n};\n/**\n * 查找两点之间的所有路径\n * @param graphData 图数据\n * @param start 路径起始点ID\n * @param end 路径终点ID\n * @param directed 是否为有向图\n */\nexports.dijkstraAsync = dijkstraAsync;\nvar findAllPathAsync = function findAllPathAsync(graphData, start, end, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.findAllPath).apply(void 0, [graphData, start, end, directed]);\n};\n/**\n * 查找两点之间的所有路径\n * @param graphData 图数据\n * @param start 路径起始点ID\n * @param end 路径终点ID\n * @param directed 是否为有向图\n * @param weightPropertyName 边权重的属名称,若数据中没有权重,则默认每条边权重为 1\n */\nexports.findAllPathAsync = findAllPathAsync;\nvar findShortestPathAsync = function findShortestPathAsync(graphData, start, end, directed, weightPropertyName) {\n return (0, _createWorker.default)(_constant.ALGORITHM.findShortestPath).apply(void 0, [graphData, start, end, directed, weightPropertyName]);\n};\n/**\n * Floyd–Warshall algorithm, See {@link https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm}\n * @param graphData 图数据\n * @param directed 是否为有向图\n */\nexports.findShortestPathAsync = findShortestPathAsync;\nvar floydWarshallAsync = function floydWarshallAsync(graphData, directed) {\n return (0, _createWorker.default)(_constant.ALGORITHM.floydWarshall).apply(void 0, [graphData, directed]);\n};\n/**\n * 标签传播算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param maxIteration 最大迭代次数\n */\nexports.floydWarshallAsync = floydWarshallAsync;\nvar labelPropagationAsync = function labelPropagationAsync(graphData, directed, weightPropertyName, maxIteration) {\n if (maxIteration === void 0) {\n maxIteration = 1000;\n }\n return (0, _createWorker.default)(_constant.ALGORITHM.labelPropagation)(graphData, directed, weightPropertyName, maxIteration);\n};\n/**\n * 社区发现 louvain 算法\n * @param graphData 图数据\n * @param directed 是否有向图,默认为 false\n * @param weightPropertyName 权重的属性字段\n * @param threshold\n */\nexports.labelPropagationAsync = labelPropagationAsync;\nvar louvainAsync = function louvainAsync(graphData, directed, weightPropertyName, threshold) {\n return (0, _createWorker.default)(_constant.ALGORITHM.louvain)(graphData, directed, weightPropertyName, threshold);\n};\n/**\n * 最小生成树,See {@link https://en.wikipedia.org/wiki/Kruskal%27s_algorithm}\n * @param graph\n * @param weight 指定用于作为边权重的属性,若不指定,则认为所有边权重一致\n * @param algo 'prim' | 'kruskal' 算法类型\n * @return EdgeConfig[] 返回构成MST的边的数组\n */\nexports.louvainAsync = louvainAsync;\nvar minimumSpanningTreeAsync = function minimumSpanningTreeAsync(graphData, weight, algo) {\n return (0, _createWorker.default)(_constant.ALGORITHM.minimumSpanningTree).apply(void 0, [graphData, weight, algo]);\n};\n/**\n * PageRank https://en.wikipedia.org/wiki/PageRank\n * refer: https://github.com/anvaka/ngraph.pagerank\n * @param graph\n * @param epsilon 判断是否收敛的精度值,默认 0.000001\n * @param linkProb 阻尼系数(dumping factor),指任意时刻,用户访问到某节点后继续访问该节点链接的下一个节点的概率,经验值 0.85\n */\nexports.minimumSpanningTreeAsync = minimumSpanningTreeAsync;\nvar pageRankAsync = function pageRankAsync(graphData, epsilon, linkProb) {\n return (0, _createWorker.default)(_constant.ALGORITHM.pageRank).apply(void 0, [graphData, epsilon, linkProb]);\n};\n/**\n * 获取指定节点的所有邻居\n * @param nodeId 节点 ID\n * @param edges 图中的所有边数据\n * @param type 邻居类型\n */\nexports.pageRankAsync = pageRankAsync;\nvar getNeighborsAsync = function getNeighborsAsync(nodeId, edges, type) {\n return (0, _createWorker.default)(_constant.ALGORITHM.getNeighbors).apply(void 0, [nodeId, edges, type]);\n};\n/**\n * GADDI 图模式匹配\n * @param graphData 原图数据\n * @param pattern 搜索图(需要在原图上搜索的模式)数据\n * @param directed 是否计算有向图,默认 false\n * @param k 参数 k,表示 k-近邻\n * @param length 参数 length\n * @param nodeLabelProp 节点数据中代表节点标签(分类信息)的属性名。默认为 cluster\n * @param edgeLabelProp 边数据中代表边标签(分类信息)的属性名。默认为 cluster\n */\nexports.getNeighborsAsync = getNeighborsAsync;\nvar GADDIAsync = function GADDIAsync(graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp) {\n if (directed === void 0) {\n directed = false;\n }\n if (nodeLabelProp === void 0) {\n nodeLabelProp = 'cluster';\n }\n if (edgeLabelProp === void 0) {\n edgeLabelProp = 'cluster';\n }\n return (0, _createWorker.default)(_constant.ALGORITHM.GADDI).apply(void 0, [graphData, pattern, directed, k, length, nodeLabelProp, edgeLabelProp]);\n};\nexports.GADDIAsync = GADDIAsync;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"GADDIAsync\", {\n enumerable: true,\n get: function get() {\n return _index.GADDIAsync;\n }\n});\nObject.defineProperty(exports, \"connectedComponentAsync\", {\n enumerable: true,\n get: function get() {\n return _index.connectedComponentAsync;\n }\n});\nexports.default = void 0;\nObject.defineProperty(exports, \"detectAllCyclesAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllCyclesAsync;\n }\n});\nObject.defineProperty(exports, \"detectAllDirectedCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllDirectedCycleAsync;\n }\n});\nObject.defineProperty(exports, \"detectAllUndirectedCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectAllUndirectedCycleAsync;\n }\n});\nObject.defineProperty(exports, \"detectCycleAsync\", {\n enumerable: true,\n get: function get() {\n return _index.detectCycleAsync;\n }\n});\nexports.detectDirectedCycleAsync = void 0;\nObject.defineProperty(exports, \"dijkstraAsync\", {\n enumerable: true,\n get: function get() {\n return _index.dijkstraAsync;\n }\n});\nObject.defineProperty(exports, \"findAllPathAsync\", {\n enumerable: true,\n get: function get() {\n return _index.findAllPathAsync;\n }\n});\nObject.defineProperty(exports, \"findShortestPathAsync\", {\n enumerable: true,\n get: function get() {\n return _index.findShortestPathAsync;\n }\n});\nObject.defineProperty(exports, \"floydWarshallAsync\", {\n enumerable: true,\n get: function get() {\n return _index.floydWarshallAsync;\n }\n});\nObject.defineProperty(exports, \"getAdjMatrixAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getAdjMatrixAsync;\n }\n});\nObject.defineProperty(exports, \"getDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"getInDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getInDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"getNeighborsAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getNeighborsAsync;\n }\n});\nObject.defineProperty(exports, \"getOutDegreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.getOutDegreeAsync;\n }\n});\nObject.defineProperty(exports, \"labelPropagationAsync\", {\n enumerable: true,\n get: function get() {\n return _index.labelPropagationAsync;\n }\n});\nObject.defineProperty(exports, \"louvainAsync\", {\n enumerable: true,\n get: function get() {\n return _index.louvainAsync;\n }\n});\nObject.defineProperty(exports, \"minimumSpanningTreeAsync\", {\n enumerable: true,\n get: function get() {\n return _index.minimumSpanningTreeAsync;\n }\n});\nObject.defineProperty(exports, \"pageRankAsync\", {\n enumerable: true,\n get: function get() {\n return _index.pageRankAsync;\n }\n});\nvar _index = require(\"./workers/index\");\nvar detectDirectedCycleAsync = _index.detectCycleAsync;\nexports.detectDirectedCycleAsync = detectDirectedCycleAsync;\nvar _default = {\n getAdjMatrixAsync: _index.getAdjMatrixAsync,\n connectedComponentAsync: _index.connectedComponentAsync,\n getDegreeAsync: _index.getDegreeAsync,\n getInDegreeAsync: _index.getInDegreeAsync,\n getOutDegreeAsync: _index.getOutDegreeAsync,\n detectCycleAsync: _index.detectCycleAsync,\n detectDirectedCycleAsync: detectDirectedCycleAsync,\n detectAllCyclesAsync: _index.detectAllCyclesAsync,\n detectAllDirectedCycleAsync: _index.detectAllDirectedCycleAsync,\n detectAllUndirectedCycleAsync: _index.detectAllUndirectedCycleAsync,\n dijkstraAsync: _index.dijkstraAsync,\n findAllPathAsync: _index.findAllPathAsync,\n findShortestPathAsync: _index.findShortestPathAsync,\n floydWarshallAsync: _index.floydWarshallAsync,\n labelPropagationAsync: _index.labelPropagationAsync,\n louvainAsync: _index.louvainAsync,\n minimumSpanningTreeAsync: _index.minimumSpanningTreeAsync,\n pageRankAsync: _index.pageRankAsync,\n getNeighborsAsync: _index.getNeighborsAsync,\n GADDIAsync: _index.GADDIAsync\n};\nexports.default = _default;","export function getPixelRatio() {\n return window ? window.devicePixelRatio : 1;\n}\n/**\n * 两点之间的距离\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 结束点 x\n * @param {number} y2 结束点 y\n */\nexport function distance(x1, y1, x2, y2) {\n var dx = x1 - x2;\n var dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\n/**\n * 是否在包围盒内\n * @param {number} minX 包围盒开始的点 x\n * @param {number} minY 包围盒开始的点 y\n * @param {number} width 宽度\n * @param {number} height 高度\n * @param {[type]} x 检测点的 x\n * @param {[type]} y 监测点的 y\n */\nexport function inBox(minX, minY, width, height, x, y) {\n return x >= minX && x <= minX + width && y >= minY && y <= minY + height;\n}\nexport function intersectRect(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n}\n// 合并两个区域\nexport function mergeRegion(region1, region2) {\n if (!region1 || !region2) {\n return region1 || region2;\n }\n return {\n minX: Math.min(region1.minX, region2.minX),\n minY: Math.min(region1.minY, region2.minY),\n maxX: Math.max(region1.maxX, region2.maxX),\n maxY: Math.max(region1.maxY, region2.maxY),\n };\n}\n/**\n * 判断两个点是否重合,点坐标的格式为 [x, y]\n * @param {Array} point1 第一个点\n * @param {Array} point2 第二个点\n */\nexport function isSamePoint(point1, point2) {\n return point1[0] === point2[0] && point1[1] === point2[1];\n}\nexport { isNil, isString, isFunction, isArray, each, toRadian, mod, isNumberEqual, requestAnimationFrame, clearAnimationFrame, } from '@antv/util';\n//# sourceMappingURL=util.js.map","import { isString, each, isArray } from './util';\nvar regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexPR = /^p\\s*\\(\\s*([axyn])\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^\\)]+\\))/gi;\nfunction addStop(steps, gradient) {\n var arr = steps.match(regexColorStop);\n each(arr, function (item) {\n var itemArr = item.split(':');\n gradient.addColorStop(itemArr[0], itemArr[1]);\n });\n}\n/**\n * 将边和填充设置的颜色转换成线性渐变对象\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} gradientStr 颜色\n * @returns {any} 渐变对象\n */\nexport function parseLineGradient(context, element, gradientStr) {\n var arr = regexLG.exec(gradientStr);\n var angle = (parseFloat(arr[1]) % 360) * (Math.PI / 180);\n var steps = arr[2];\n var box = element.getBBox();\n var start;\n var end;\n if (angle >= 0 && angle < (1 / 2) * Math.PI) {\n start = {\n x: box.minX,\n y: box.minY,\n };\n end = {\n x: box.maxX,\n y: box.maxY,\n };\n }\n else if ((1 / 2) * Math.PI <= angle && angle < Math.PI) {\n start = {\n x: box.maxX,\n y: box.minY,\n };\n end = {\n x: box.minX,\n y: box.maxY,\n };\n }\n else if (Math.PI <= angle && angle < (3 / 2) * Math.PI) {\n start = {\n x: box.maxX,\n y: box.maxY,\n };\n end = {\n x: box.minX,\n y: box.minY,\n };\n }\n else {\n start = {\n x: box.minX,\n y: box.maxY,\n };\n end = {\n x: box.maxX,\n y: box.minY,\n };\n }\n var tanTheta = Math.tan(angle);\n var tanTheta2 = tanTheta * tanTheta;\n var x = (end.x - start.x + tanTheta * (end.y - start.y)) / (tanTheta2 + 1) + start.x;\n var y = (tanTheta * (end.x - start.x + tanTheta * (end.y - start.y))) / (tanTheta2 + 1) + start.y;\n var gradient = context.createLinearGradient(start.x, start.y, x, y);\n addStop(steps, gradient);\n return gradient;\n}\n/**\n * 将边和填充设置的颜色转换成圆形渐变对象\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} gradientStr 颜色\n * @returns {any} 渐变对象\n */\nexport function parseRadialGradient(context, element, gradientStr) {\n var arr = regexRG.exec(gradientStr);\n var fx = parseFloat(arr[1]);\n var fy = parseFloat(arr[2]);\n var fr = parseFloat(arr[3]);\n var steps = arr[4];\n // 环半径为0时,默认无渐变,取渐变序列的最后一个颜色\n if (fr === 0) {\n var colors = steps.match(regexColorStop);\n return colors[colors.length - 1].split(':')[1];\n }\n var box = element.getBBox();\n var width = box.maxX - box.minX;\n var height = box.maxY - box.minY;\n var r = Math.sqrt(width * width + height * height) / 2;\n var gradient = context.createRadialGradient(box.minX + width * fx, box.minY + height * fy, 0, box.minX + width / 2, box.minY + height / 2, fr * r);\n addStop(steps, gradient);\n return gradient;\n}\n/**\n * 边和填充设置的颜色转换成 pattern\n * @param {CanvasRenderingContext2D} context canvas 上下文\n * @param {IElement} element 图形元素\n * @param {string} patternStr 生成 pattern 的字符串\n */\nexport function parsePattern(context, element, patternStr) {\n // 在转换过程中进行了缓存\n if (element.get('patternSource') && element.get('patternSource') === patternStr) {\n return element.get('pattern');\n }\n var pattern;\n var img;\n var arr = regexPR.exec(patternStr);\n var repeat = arr[1];\n var source = arr[2];\n // Function to be called when pattern loads\n function onload() {\n // Create pattern\n pattern = context.createPattern(img, repeat);\n element.set('pattern', pattern); // be a cache\n element.set('patternSource', patternStr);\n }\n switch (repeat) {\n case 'a':\n repeat = 'repeat';\n break;\n case 'x':\n repeat = 'repeat-x';\n break;\n case 'y':\n repeat = 'repeat-y';\n break;\n case 'n':\n repeat = 'no-repeat';\n break;\n default:\n repeat = 'no-repeat';\n }\n img = new Image();\n // If source URL is not a data URL\n if (!source.match(/^data:/i)) {\n // Set crossOrigin for this image\n img.crossOrigin = 'Anonymous';\n }\n img.src = source;\n if (img.complete) {\n onload();\n }\n else {\n img.onload = onload;\n // Fix onload() bug in IE9\n img.src = img.src;\n }\n return pattern;\n}\nexport function parseStyle(context, element, color) {\n var bbox = element.getBBox();\n if (isNaN(bbox.x) || isNaN(bbox.y) || isNaN(bbox.width) || isNaN(bbox.height)) {\n return color;\n }\n if (isString(color)) {\n if (color[1] === '(' || color[2] === '(') {\n if (color[0] === 'l') {\n // regexLG.test(color)\n return parseLineGradient(context, element, color);\n }\n if (color[0] === 'r') {\n // regexRG.test(color)\n return parseRadialGradient(context, element, color);\n }\n if (color[0] === 'p') {\n // regexPR.test(color)\n return parsePattern(context, element, color);\n }\n }\n return color;\n }\n if (color instanceof CanvasPattern) {\n return color;\n }\n}\nexport function parseRadius(radius) {\n var r1 = 0;\n var r2 = 0;\n var r3 = 0;\n var r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return [r1, r2, r3, r4];\n}\n//# sourceMappingURL=parse.js.map","import { mod, toRadian, isSamePoint } from './util';\n// 向量长度\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n// u.v/|u||v|,计算夹角的余弦值\nfunction vRatio(u, v) {\n // 当存在一个向量的长度为 0 时,夹角也为 0,即夹角的余弦值为 1\n return vMag(u) * vMag(v) ? (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v)) : 1;\n}\n// 向量角度\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n// A 0:rx 1:ry 2:x-axis-rotation 3:large-arc-flag 4:sweep-flag 5: x 6: y\nexport default function getArcParams(startPoint, params) {\n var rx = params[1];\n var ry = params[2];\n var xRotation = mod(toRadian(params[3]), Math.PI * 2);\n var arcFlag = params[4];\n var sweepFlag = params[5];\n // 弧形起点坐标\n var x1 = startPoint[0];\n var y1 = startPoint[1];\n // 弧形终点坐标\n var x2 = params[6];\n var y2 = params[7];\n var xp = (Math.cos(xRotation) * (x1 - x2)) / 2.0 + (Math.sin(xRotation) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(xRotation) * (x1 - x2)) / 2.0 + (Math.cos(xRotation) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = diff ? Math.sqrt((rx * rx * (ry * ry) - diff) / diff) : 1;\n if (arcFlag === sweepFlag) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n // 旋转前的起点坐标,且当长半轴和短半轴的长度为 0 时,坐标按 (0, 0) 处理\n var cxp = ry ? (f * rx * yp) / ry : 0;\n var cyp = rx ? (f * -ry * xp) / rx : 0;\n // 椭圆圆心坐标\n var cx = (x1 + x2) / 2.0 + Math.cos(xRotation) * cxp - Math.sin(xRotation) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(xRotation) * cxp + Math.cos(xRotation) * cyp;\n // 起始点的单位向量\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n // 终止点的单位向量\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n // 计算起始点和圆心的连线,与 x 轴正方向的夹角\n var theta = vAngle([1, 0], u);\n // 计算圆弧起始点和终止点与椭圆圆心连线的夹角\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (sweepFlag === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (sweepFlag === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return {\n cx: cx,\n cy: cy,\n // 弧形的起点和终点相同时,长轴和短轴的长度按 0 处理\n rx: isSamePoint(startPoint, [x2, y2]) ? 0 : rx,\n ry: isSamePoint(startPoint, [x2, y2]) ? 0 : ry,\n startAngle: theta,\n endAngle: theta + dTheta,\n xRotation: xRotation,\n arcFlag: arcFlag,\n sweepFlag: sweepFlag,\n };\n}\n//# sourceMappingURL=arc-params.js.map","import { __assign, __rest } from \"tslib\";\nimport { Path } from '../shape';\nvar sin = Math.sin, cos = Math.cos, atan2 = Math.atan2, PI = Math.PI;\nfunction _addDefaultArrow(shape, attrs, x1, y1, x2, y2, isStart) {\n var stroke = attrs.stroke, lineWidth = attrs.lineWidth;\n var x = x1 - x2;\n var y = y1 - y2;\n var rad = atan2(y, x);\n var arrowShape = new Path({\n type: 'path',\n canvas: shape.get('canvas'),\n isArrowShape: true,\n attrs: {\n // 默认箭头的边长为 10,夹角为 60 度\n path: \"M\" + 10 * cos(PI / 6) + \",\" + 10 * sin(PI / 6) + \" L0,0 L\" + 10 * cos(PI / 6) + \",-\" + 10 * sin(PI / 6),\n // 使用 shape stroke 值\n stroke: stroke,\n lineWidth: lineWidth,\n },\n });\n arrowShape.translate(x2, y2);\n arrowShape.rotateAtPoint(x2, y2, rad);\n shape.set(isStart ? 'startArrowShape' : 'endArrowShape', arrowShape);\n}\n/**\n * 箭头 path 的设置要求\n * 1. 箭头顶点坐标需要为 (0, 0)\n * 2. 箭头夹角的中心分割线需要与 X 轴正方向对齐\n */\nfunction _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, isStart) {\n var startArrow = attrs.startArrow, endArrow = attrs.endArrow, stroke = attrs.stroke, lineWidth = attrs.lineWidth;\n var arrowAttrs = isStart ? startArrow : endArrow;\n var d = arrowAttrs.d, arrowFill = arrowAttrs.fill, arrowStroke = arrowAttrs.stroke, arrowLineWidth = arrowAttrs.lineWidth, restAttrs = __rest(arrowAttrs, [\"d\", \"fill\", \"stroke\", \"lineWidth\"]);\n var x = x1 - x2;\n var y = y1 - y2;\n var rad = atan2(y, x);\n if (d) {\n x2 = x2 - cos(rad) * d;\n y2 = y2 - sin(rad) * d;\n }\n var arrowShape = new Path({\n type: 'path',\n canvas: shape.get('canvas'),\n isArrowShape: true,\n attrs: __assign(__assign({}, restAttrs), { \n // 支持单独设置箭头的 stroke 和 lineWidth,若为空则使用 shape 的值\n stroke: arrowStroke || stroke, lineWidth: arrowLineWidth || lineWidth, \n // 箭头是否填充需要手动设置,不会继承自 shape 的值\n fill: arrowFill }),\n });\n arrowShape.translate(x2, y2);\n arrowShape.rotateAtPoint(x2, y2, rad);\n shape.set(isStart ? 'startArrowShape' : 'endArrowShape', arrowShape);\n}\n/**\n * 如果自定义箭头并且有 d 需要做偏移,如果直接画,线条会超出箭头尖端,因此需要根据箭头偏移 d, 返回线需要缩短的距离\n * |----------------\n * |<|--------------\n * |\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n * @param {number} d 箭头沿线条方向的偏移距离\n * @return {{dx: number, dy: number}} 返回线条偏移距离\n */\nexport function getShortenOffset(x1, y1, x2, y2, d) {\n var rad = atan2(y2 - y1, x2 - x1);\n return {\n dx: cos(rad) * d,\n dy: sin(rad) * d,\n };\n}\n/**\n * 绘制起始箭头\n * @param {IShape} shape 图形\n * @param {ShapeAttrs} attrs shape 的绘图属性\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n */\nexport function addStartArrow(shape, attrs, x1, y1, x2, y2) {\n if (typeof attrs.startArrow === 'object') {\n _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, true);\n }\n else if (attrs.startArrow) {\n _addDefaultArrow(shape, attrs, x1, y1, x2, y2, true);\n }\n else {\n shape.set('startArrowShape', null);\n }\n}\n/**\n * 绘制结束箭头\n * @param {IShape} shape 图形\n * @param {ShapeAttrs} attrs shape 的绘图属性\n * @param {number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n */\nexport function addEndArrow(shape, attrs, x1, y1, x2, y2) {\n if (typeof attrs.endArrow === 'object') {\n _addCustomizedArrow(shape, attrs, x1, y1, x2, y2, false);\n }\n else if (attrs.endArrow) {\n _addDefaultArrow(shape, attrs, x1, y1, x2, y2, false);\n }\n else {\n shape.set('startArrowShape', null);\n }\n}\n//# sourceMappingURL=arrow.js.map","import { each, isArray, max, min } from '@antv/util';\nimport { parseStyle } from './parse';\nimport getArcParams from './arc-params';\nimport { mergeRegion, intersectRect } from './util';\nimport * as ArrowUtil from '../util/arrow';\nvar SHAPE_ATTRS_MAP = {\n fill: 'fillStyle',\n stroke: 'strokeStyle',\n opacity: 'globalAlpha',\n};\nexport function applyAttrsToContext(context, element) {\n var attrs = element.attr();\n for (var k in attrs) {\n var v = attrs[k];\n // 转换一下不与 canvas 兼容的属性名\n var name_1 = SHAPE_ATTRS_MAP[k] ? SHAPE_ATTRS_MAP[k] : k;\n if (name_1 === 'matrix' && v) {\n // 设置矩阵\n context.transform(v[0], v[1], v[3], v[4], v[6], v[7]);\n }\n else if (name_1 === 'lineDash' && context.setLineDash) {\n // 设置虚线,只支持数组形式,非数组形式不做任何操作\n isArray(v) && context.setLineDash(v);\n }\n else {\n if (name_1 === 'strokeStyle' || name_1 === 'fillStyle') {\n // 如果存在渐变、pattern 这个开销有些大\n // 可以考虑缓存机制,通过 hasUpdate 来避免一些运算\n v = parseStyle(context, element, v);\n }\n else if (name_1 === 'globalAlpha') {\n // opacity 效果可以叠加,子元素的 opacity 需要与父元素 opacity 相乘\n v = v * context.globalAlpha;\n }\n context[name_1] = v;\n }\n }\n}\nexport function drawChildren(context, children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.cfg.visible) {\n child.draw(context, region);\n }\n else {\n child.skipDraw();\n }\n }\n}\n// 这个地方的逻辑比较复杂,简单画了一张图:https://www.yuque.com/antv/ou292n/pcgt5g#OW1QE\nexport function checkRefresh(canvas, children, region) {\n var refreshElements = canvas.get('refreshElements');\n // 先遍历需要刷新的元素,将这些元素的父元素也设置 refresh\n each(refreshElements, function (el) {\n if (el !== canvas) {\n var parent_1 = el.cfg.parent;\n while (parent_1 && parent_1 !== canvas && !parent_1.cfg.refresh) {\n parent_1.cfg.refresh = true;\n parent_1 = parent_1.cfg.parent;\n }\n }\n });\n if (refreshElements[0] === canvas) {\n setChildrenRefresh(children, region);\n }\n else {\n // 检查所有子元素是否可以刷新\n checkChildrenRefresh(children, region);\n }\n}\n// 检查所有的子元素是否应该更新\nexport function checkChildrenRefresh(children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.cfg.visible) {\n // 先判断 hasChanged,因为它的优先级判断应该高于 refresh\n if (child.cfg.hasChanged) {\n // 如果节点发生了 change,则需要级联设置子元素的 refresh\n child.cfg.refresh = true;\n if (child.isGroup()) {\n setChildrenRefresh(child.cfg.children, region);\n }\n }\n else if (child.cfg.refresh) {\n // 如果当前图形/分组 refresh = true,说明其子节点存在 changed\n if (child.isGroup()) {\n checkChildrenRefresh(child.cfg.children, region);\n }\n }\n else {\n // 这个分支说明此次局部刷新,所有的节点和父元素没有发生变化,仅需要检查包围盒(缓存)是否相交即可\n var refresh = checkElementRefresh(child, region);\n child.cfg.refresh = refresh;\n if (refresh && child.isGroup()) {\n // 如果需要刷新,说明子元素也需要刷新,继续进行判定\n checkChildrenRefresh(child.cfg.children, region);\n }\n }\n }\n }\n}\n// 由于对改变的图形放入 refreshElements 时做了优化,判定父元素 changed 时不加入\n// 那么有可能会出现 elements 都为空,所以最终 group\nexport function clearChanged(elements) {\n for (var i = 0; i < elements.length; i++) {\n var el = elements[i];\n el.cfg.hasChanged = false;\n // 级联清理\n if (el.isGroup() && !el.destroyed) {\n clearChanged(el.cfg.children);\n }\n }\n}\n// 当某个父元素发生改变时,调用这个方法级联设置 refresh\nfunction setChildrenRefresh(children, region) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (!child.cfg.visible) {\n continue;\n }\n // let refresh = true;\n // 获取缓存的 bbox,如果这个 bbox 还存在则说明父元素不是矩阵发生了改变\n // const bbox = child.cfg.canvasBBox;\n // if (bbox) {\n // // 如果这时候\n // refresh = intersectRect(bbox, region);\n // }\n child.cfg.refresh = true;\n // 如果需要刷新当前节点,所有的子元素设置 refresh\n if (child.isGroup()) {\n setChildrenRefresh(child.get('children'), region);\n }\n }\n}\nfunction checkElementRefresh(shape, region) {\n var bbox = shape.cfg.cacheCanvasBBox;\n var isAllow = shape.cfg.isInView && bbox && intersectRect(bbox, region);\n return isAllow;\n}\n// 绘制 path\nexport function drawPath(shape, context, attrs, arcParamsCache) {\n var path = attrs.path, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (!path) {\n return;\n }\n var currentPoint = [0, 0]; // 当前图形\n var startMovePoint = [0, 0]; // 开始 M 的点,可能会有多个\n var distance = {\n dx: 0,\n dy: 0,\n };\n context.beginPath();\n for (var i = 0; i < path.length; i++) {\n var params = path[i];\n var command = params[0];\n if (i === 0 && startArrow && startArrow.d) {\n var tangent = shape.getStartTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], startArrow.d);\n }\n else if (i === path.length - 2 && path[i + 1][0] === 'Z' && endArrow && endArrow.d) {\n // 为了防止结尾为 Z 的 segment 缩短不起效,需要取最后两个 segment 特殊处理\n var lastPath = path[i + 1];\n if (lastPath[0] === 'Z') {\n var tangent = shape.getEndTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], endArrow.d);\n }\n }\n else if (i === path.length - 1 && endArrow && endArrow.d) {\n if (path[0] !== 'Z') {\n var tangent = shape.getEndTangent();\n distance = ArrowUtil.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], endArrow.d);\n }\n }\n var dx = distance.dx, dy = distance.dy;\n // V,H,S,T 都在前面被转换成标准形式\n switch (command) {\n case 'M':\n context.moveTo(params[1] - dx, params[2] - dy);\n startMovePoint = [params[1], params[2]];\n break;\n case 'L':\n context.lineTo(params[1] - dx, params[2] - dy);\n break;\n case 'Q':\n context.quadraticCurveTo(params[1], params[2], params[3] - dx, params[4] - dy);\n break;\n case 'C':\n context.bezierCurveTo(params[1], params[2], params[3], params[4], params[5] - dx, params[6] - dy);\n break;\n case 'A': {\n var arcParams = void 0;\n // 为了加速绘制,可以提供参数的缓存,各个图形自己缓存\n if (arcParamsCache) {\n arcParams = arcParamsCache[i];\n if (!arcParams) {\n arcParams = getArcParams(currentPoint, params);\n arcParamsCache[i] = arcParams;\n }\n }\n else {\n arcParams = getArcParams(currentPoint, params);\n }\n var cx = arcParams.cx, cy = arcParams.cy, rx = arcParams.rx, ry = arcParams.ry, startAngle = arcParams.startAngle, endAngle = arcParams.endAngle, xRotation = arcParams.xRotation, sweepFlag = arcParams.sweepFlag;\n // 直接使用椭圆的 api\n if (context.ellipse) {\n context.ellipse(cx, cy, rx, ry, xRotation, startAngle, endAngle, 1 - sweepFlag);\n }\n else {\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(xRotation);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, startAngle, endAngle, 1 - sweepFlag);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-xRotation);\n context.translate(-cx, -cy);\n }\n break;\n }\n case 'Z':\n context.closePath();\n break;\n default:\n break;\n }\n // 有了 Z 后,当前节点从开始 M 的点开始\n if (command === 'Z') {\n currentPoint = startMovePoint;\n }\n else {\n var len = params.length;\n currentPoint = [params[len - 2], params[len - 1]];\n }\n }\n}\n// 刷新图形元素(Shape 或者 Group)\nexport function refreshElement(element, changeType) {\n var canvas = element.get('canvas');\n // 只有存在于 canvas 上时生效\n if (canvas) {\n if (changeType === 'remove') {\n // 一旦 remove,则无法在 element 上拿到包围盒\n // destroy 后所有属性都拿不到,所以需要暂存一下\n // 这是一段 hack 的代码\n element._cacheCanvasBBox = element.get('cacheCanvasBBox');\n }\n // 防止反复刷新\n if (!element.get('hasChanged')) {\n // 但是始终要标记为 hasChanged,便于后面进行局部渲染\n element.set('hasChanged', true);\n // 本来只有局部渲染模式下,才需要记录更新的元素队列\n // if (canvas.get('localRefresh')) {\n // canvas.refreshElement(element, changeType, canvas);\n // }\n // 但对于 https://github.com/antvis/g/issues/422 的场景,全局渲染的模式下也需要记录更新的元素队列\n // 如果当前元素的父元素发生了改变,可以不放入队列,这句话大概能够提升 15% 的初次渲染性能\n if (!(element.cfg.parent && element.cfg.parent.get('hasChanged'))) {\n canvas.refreshElement(element, changeType, canvas);\n if (canvas.get('autoDraw')) {\n canvas.draw();\n }\n }\n }\n }\n}\nexport function getRefreshRegion(element) {\n var region;\n if (!element.destroyed) {\n var cacheBox = element.get('cacheCanvasBBox');\n var validCache = cacheBox && !!(cacheBox.width && cacheBox.height);\n var bbox = element.getCanvasBBox();\n var validBBox = bbox && !!(bbox.width && bbox.height);\n // 是否是有效 bbox 判定,一些 NaN 或者 宽高为 0 的情况过滤掉\n if (validCache && validBBox) {\n region = mergeRegion(cacheBox, bbox);\n }\n else if (validCache) {\n region = cacheBox;\n }\n else if (validBBox) {\n region = bbox;\n }\n }\n else {\n // 因为元素已经销毁所以无法获取到缓存的包围盒\n region = element['_cacheCanvasBBox'];\n }\n return region;\n}\nexport function getMergedRegion(elements) {\n if (!elements.length) {\n return null;\n }\n var minXArr = [];\n var minYArr = [];\n var maxXArr = [];\n var maxYArr = [];\n each(elements, function (el) {\n var region = getRefreshRegion(el);\n if (region) {\n minXArr.push(region.minX);\n minYArr.push(region.minY);\n maxXArr.push(region.maxX);\n maxYArr.push(region.maxY);\n }\n });\n return {\n minX: min(minXArr),\n minY: min(minYArr),\n maxX: max(maxXArr),\n maxY: max(maxYArr),\n };\n}\nexport function mergeView(region, viewRegion) {\n if (!region || !viewRegion) {\n return null;\n }\n // 不相交,则直接返回 null\n if (!intersectRect(region, viewRegion)) {\n return null;\n }\n return {\n minX: Math.max(region.minX, viewRegion.minX),\n minY: Math.max(region.minY, viewRegion.minY),\n maxX: Math.min(region.maxX, viewRegion.maxX),\n maxY: Math.min(region.maxY, viewRegion.maxY),\n };\n}\n//# sourceMappingURL=draw.js.map","import { __extends } from \"tslib\";\nimport { AbstractGroup } from '@antv/g-base';\nimport * as Shape from './shape';\nimport { applyAttrsToContext, drawChildren, refreshElement } from './util/draw';\nimport { each, max, min } from '@antv/util';\nimport { intersectRect } from './util/util';\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Group.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n Group.prototype.getShapeBase = function () {\n return Shape;\n };\n Group.prototype.getGroupBase = function () {\n return Group;\n };\n // 同 shape 中的方法重复了\n Group.prototype._applyClip = function (context, clip) {\n if (clip) {\n context.save();\n // 将 clip 的属性挂载到 context 上\n applyAttrsToContext(context, clip);\n // 绘制 clip 路径\n clip.createPath(context);\n context.restore();\n // 裁剪\n context.clip();\n clip._afterDraw();\n }\n };\n // 这个方法以前直接使用的 getCanvasBBox,由于 group 上没有缓存,所以每次重新计算,导致性能开销比较大\n // 大概能够节省全局渲染 15-20% 的性能,如果不在这里加缓存优化后 10W 个节点无法达到 5-6 ms,大概能够 30-40ms\n Group.prototype.cacheCanvasBBox = function () {\n var children = this.cfg.children;\n var xArr = [];\n var yArr = [];\n each(children, function (child) {\n var bbox = child.cfg.cacheCanvasBBox;\n // isInview 的判定是一旦图形或者分组渲染就要计算是否在视图内,\n // 这个判定 10W 个图形下差不多能够节省 5-6 ms 的开销\n if (bbox && child.cfg.isInView) {\n xArr.push(bbox.minX, bbox.maxX);\n yArr.push(bbox.minY, bbox.maxY);\n }\n });\n var bbox = null;\n if (xArr.length) {\n var minX = min(xArr);\n var maxX = max(xArr);\n var minY = min(yArr);\n var maxY = max(yArr);\n bbox = {\n minX: minX,\n minY: minY,\n x: minX,\n y: minY,\n maxX: maxX,\n maxY: maxY,\n width: maxX - minX,\n height: maxY - minY,\n };\n var canvas = this.cfg.canvas;\n if (canvas) {\n var viewRange = canvas.getViewRange();\n // 如果这个地方判定 isInView == false 设置 bbox 为 false 的话,拾取的性能会更高\n // 但是目前 10W 图形的拾取在 2-5ms 内,这个优化意义不大,可以后期观察再看\n this.set('isInView', intersectRect(bbox, viewRange));\n }\n }\n else {\n this.set('isInView', false);\n }\n this.set('cacheCanvasBBox', bbox);\n };\n Group.prototype.draw = function (context, region) {\n var children = this.cfg.children;\n var allowDraw = region ? this.cfg.refresh : true; // 局部刷新需要判定\n // 这个地方需要判定,在 G6 的场景每个 group 都有 transform 的场景下性能会开销非常大\n // 通过 refresh 的判定,可以不刷新没有发生过变化的分组,不在视窗内的分组等等\n // 如果想进一步提升局部渲染性能,可以进一步优化 refresh 的判定,依然有潜力\n if (children.length && allowDraw) {\n context.save();\n // group 上的矩阵和属性也会应用到上下文上\n // 先将 attrs 应用到上下文中,再设置 clip。因为 clip 应该被当前元素的 matrix 所影响\n applyAttrsToContext(context, this);\n this._applyClip(context, this.getClip());\n drawChildren(context, children, region);\n context.restore();\n this.cacheCanvasBBox();\n }\n // 这里的成本比较大,如果不绘制则不再\n // this.set('cacheCanvasBBox', this.getCanvasBBox());\n this.cfg.refresh = null;\n // 绘制后,消除更新标记\n this.set('hasChanged', false);\n };\n // 绘制时被跳过,一般发生在分组隐藏时\n Group.prototype.skipDraw = function () {\n this.set('cacheCanvasBBox', null);\n this.set('hasChanged', false);\n };\n return Group;\n}(AbstractGroup));\nexport default Group;\n//# sourceMappingURL=group.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractShape } from '@antv/g-base';\nimport { isNil, intersectRect } from '../util/util';\nimport { applyAttrsToContext, refreshElement } from '../util/draw';\nimport { getBBoxMethod } from '@antv/g-base';\nimport * as Shape from './index';\nimport Group from '../group';\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n function ShapeBase() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ShapeBase.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n // 设置默认值\n return __assign(__assign({}, attrs), { lineWidth: 1, lineAppendWidth: 0, strokeOpacity: 1, fillOpacity: 1 });\n };\n ShapeBase.prototype.getShapeBase = function () {\n return Shape;\n };\n ShapeBase.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n ShapeBase.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n ShapeBase.prototype.calculateBBox = function () {\n var type = this.get('type');\n var lineWidth = this.getHitLineWidth();\n // const attrs = this.attr();\n var bboxMethod = getBBoxMethod(type);\n var box = bboxMethod(this);\n var halfLineWidth = lineWidth / 2;\n var minX = box.x - halfLineWidth;\n var minY = box.y - halfLineWidth;\n var maxX = box.x + box.width + halfLineWidth;\n var maxY = box.y + box.height + halfLineWidth;\n return {\n x: minX,\n minX: minX,\n y: minY,\n minY: minY,\n width: box.width + lineWidth,\n height: box.height + lineWidth,\n maxX: maxX,\n maxY: maxY,\n };\n };\n ShapeBase.prototype.isFill = function () {\n return !!this.attrs['fill'] || this.isClipShape();\n };\n ShapeBase.prototype.isStroke = function () {\n return !!this.attrs['stroke'];\n };\n // 同 shape 中的方法重复了\n ShapeBase.prototype._applyClip = function (context, clip) {\n if (clip) {\n context.save();\n // 将 clip 的属性挂载到 context 上\n applyAttrsToContext(context, clip);\n // 绘制 clip 路径\n clip.createPath(context);\n context.restore();\n // 裁剪\n context.clip();\n clip._afterDraw();\n }\n };\n // 绘制图形时需要考虑 region 限制\n ShapeBase.prototype.draw = function (context, region) {\n var clip = this.cfg.clipShape;\n // 如果指定了 region,同时不允许刷新时,直接返回\n if (region) {\n if (this.cfg.refresh === false) {\n // this._afterDraw();\n this.set('hasChanged', false);\n return;\n }\n // 是否相交需要考虑 clip 的包围盒\n var bbox = this.getCanvasBBox();\n if (!intersectRect(region, bbox)) {\n // 图形的包围盒与重绘区域不相交时,也需要清除标记\n this.set('hasChanged', false);\n // 存在多种情形需要更新 cacheCanvasBBox 和 isInview 的判定\n // 1. 之前图形在视窗内,但是现在不再视窗内\n // 2. 如果当前的图形以及父元素都没有发生过变化,refresh = false 不会走到这里,所以这里的图形都是父元素发生变化,但是没有在视图内的元素\n if (this.cfg.isInView) {\n this._afterDraw();\n }\n return;\n }\n }\n context.save();\n // 先将 attrs 应用到上下文中,再设置 clip。因为 clip 应该被当前元素的 matrix 所影响\n applyAttrsToContext(context, this);\n this._applyClip(context, clip);\n this.drawPath(context);\n context.restore();\n this._afterDraw();\n };\n ShapeBase.prototype.getCanvasViewBox = function () {\n var canvas = this.cfg.canvas;\n if (canvas) {\n // @ts-ignore\n return canvas.getViewRange();\n }\n return null;\n };\n ShapeBase.prototype.cacheCanvasBBox = function () {\n var canvasBBox = this.getCanvasViewBox();\n // 绘制的时候缓存包围盒\n if (canvasBBox) {\n var bbox = this.getCanvasBBox();\n var isInView = intersectRect(bbox, canvasBBox);\n this.set('isInView', isInView);\n // 不再视窗内 cacheCanvasBBox 设置成 null,会提升局部渲染的性能,\n // 因为在局部渲染影响的包围盒计算时不考虑这个图形的包围盒\n // 父元素 cacheCanvasBBox 计算的时候也不计算\n if (isInView) {\n this.set('cacheCanvasBBox', bbox);\n }\n else {\n this.set('cacheCanvasBBox', null);\n }\n }\n };\n ShapeBase.prototype._afterDraw = function () {\n this.cacheCanvasBBox();\n // 绘制后消除标记\n this.set('hasChanged', false);\n this.set('refresh', null);\n };\n ShapeBase.prototype.skipDraw = function () {\n this.set('cacheCanvasBBox', null);\n this.set('isInView', null);\n this.set('hasChanged', false);\n };\n /**\n * 绘制图形的路径\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.drawPath = function (context) {\n this.createPath(context);\n this.strokeAndFill(context);\n this.afterDrawPath(context);\n };\n /**\n * @protected\n * 填充图形\n * @param {CanvasRenderingContext2D} context context 上下文\n */\n ShapeBase.prototype.fill = function (context) {\n context.fill();\n };\n /**\n * @protected\n * 绘制图形边框\n * @param {CanvasRenderingContext2D} context context 上下文\n */\n ShapeBase.prototype.stroke = function (context) {\n context.stroke();\n };\n // 绘制或者填充\n ShapeBase.prototype.strokeAndFill = function (context) {\n var _a = this.attrs, lineWidth = _a.lineWidth, opacity = _a.opacity, strokeOpacity = _a.strokeOpacity, fillOpacity = _a.fillOpacity;\n if (this.isFill()) {\n if (!isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n this.fill(context);\n context.globalAlpha = opacity;\n }\n else {\n this.fill(context);\n }\n }\n if (this.isStroke()) {\n if (lineWidth > 0) {\n if (!isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = strokeOpacity;\n }\n this.stroke(context);\n }\n }\n this.afterDrawPath(context);\n };\n /**\n * @protected\n * 绘制图形的路径\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.createPath = function (context) { };\n /**\n * 绘制完成 path 后的操作\n * @param {CanvasRenderingContext2D} context 上下文\n */\n ShapeBase.prototype.afterDrawPath = function (context) { };\n ShapeBase.prototype.isInShape = function (refX, refY) {\n // return HitUtil.isHitShape(this, refX, refY);\n var isStroke = this.isStroke();\n var isFill = this.isFill();\n var lineWidth = this.getHitLineWidth();\n return this.isInStrokeOrPath(refX, refY, isStroke, isFill, lineWidth);\n };\n // 之所以不拆成 isInStroke 和 isInPath 在于两者存在一些共同的计算\n ShapeBase.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n return false;\n };\n /**\n * 获取线拾取的宽度\n * @returns {number} 线的拾取宽度\n */\n ShapeBase.prototype.getHitLineWidth = function () {\n if (!this.isStroke()) {\n return 0;\n }\n var attrs = this.attrs;\n return attrs['lineWidth'] + attrs['lineAppendWidth'];\n };\n return ShapeBase;\n}(AbstractShape));\nexport default ShapeBase;\n//# sourceMappingURL=base.js.map","/**\n * @fileoverview 圆\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { distance } from '../util/util';\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Circle.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, r: 0 });\n };\n Circle.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n var halfLineWidth = lineWidth / 2;\n var absDistance = distance(cx, cy, x, y);\n // 直接用距离,如果同时存在边和填充时,可以减少两次计算\n if (isFill && isStroke) {\n return absDistance <= r + halfLineWidth;\n }\n if (isFill) {\n return absDistance <= r;\n }\n if (isStroke) {\n return absDistance >= r - halfLineWidth && absDistance <= r + halfLineWidth;\n }\n return false;\n };\n Circle.prototype.createPath = function (context) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n context.beginPath();\n context.arc(cx, cy, r, 0, Math.PI * 2, false);\n context.closePath();\n };\n return Circle;\n}(ShapeBase));\nexport default Circle;\n//# sourceMappingURL=circle.js.map","/**\n * @fileoverview 椭圆\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\n// 根据椭圆公式计算 x*x/rx*rx + y*y/ry*ry;\nfunction ellipseDistance(squareX, squareY, rx, ry) {\n return squareX / (rx * rx) + squareY / (ry * ry);\n}\nvar Ellipse = /** @class */ (function (_super) {\n __extends(Ellipse, _super);\n function Ellipse() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Ellipse.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, rx: 0, ry: 0 });\n };\n Ellipse.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var halfLineWith = lineWidth / 2;\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx, ry = attrs.ry;\n var squareX = (x - cx) * (x - cx);\n var squareY = (y - cy) * (y - cy);\n // 使用椭圆的公式: x*x/rx*rx + y*y/ry*ry = 1;\n if (isFill && isStroke) {\n return ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1;\n }\n if (isFill) {\n return ellipseDistance(squareX, squareY, rx, ry) <= 1;\n }\n if (isStroke) {\n return (ellipseDistance(squareX, squareY, rx - halfLineWith, ry - halfLineWith) >= 1 &&\n ellipseDistance(squareX, squareY, rx + halfLineWith, ry + halfLineWith) <= 1);\n }\n return false;\n };\n Ellipse.prototype.createPath = function (context) {\n var attrs = this.attr();\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx;\n var ry = attrs.ry;\n context.beginPath();\n // 兼容逻辑\n if (context.ellipse) {\n context.ellipse(cx, cy, rx, ry, 0, 0, Math.PI * 2, false);\n }\n else {\n // 如果不支持,则使用圆来绘制,进行变形\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.save();\n context.translate(cx, cy);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, 0, Math.PI * 2);\n context.restore();\n context.closePath();\n }\n };\n return Ellipse;\n}(ShapeBase));\nexport default Ellipse;\n//# sourceMappingURL=ellipse.js.map","/**\n * @fileoverview 图片\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { isString, isNil } from '../util/util';\nfunction isCanvas(dom) {\n return dom instanceof HTMLElement && isString(dom.nodeName) && dom.nodeName.toUpperCase() === 'CANVAS';\n}\nvar ImageShape = /** @class */ (function (_super) {\n __extends(ImageShape, _super);\n function ImageShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImageShape.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0 });\n };\n ImageShape.prototype.initAttrs = function (attrs) {\n this._setImage(attrs.img);\n };\n // image 不计算 stroke\n ImageShape.prototype.isStroke = function () {\n return false;\n };\n // 仅仅使用包围盒检测来进行拾取\n // 所以不需要复写 isInStrokeOrPath 的方法\n ImageShape.prototype.isOnlyHitBox = function () {\n return true;\n };\n ImageShape.prototype._afterLoading = function () {\n if (this.get('toDraw') === true) {\n var canvas = this.get('canvas');\n if (canvas) {\n // 这段应该改成局部渲染\n canvas.draw();\n }\n else {\n // 这种方式如果发生遮挡会出现问题\n this.createPath(this.get('context'));\n }\n }\n };\n ImageShape.prototype._setImage = function (img) {\n var _this = this;\n var attrs = this.attrs;\n if (isString(img)) {\n var image_1 = new Image();\n image_1.onload = function () {\n // 图片未加载完,则已经被销毁\n if (_this.destroyed) {\n return false;\n }\n // 缓存原始地址,可以做对比,防止重复加载图片\n // 如果考虑到在加载过程中可能替换 img 属性,则情况更加复杂\n // this.set('imgSrc', img);\n // 这里会循环调用 _setImage 方法,但不会再走这个分支\n _this.attr('img', image_1);\n _this.set('loading', false);\n _this._afterLoading();\n var callback = _this.get('callback');\n if (callback) {\n callback.call(_this);\n }\n };\n // 设置跨域\n image_1.crossOrigin = 'Anonymous';\n image_1.src = img;\n // loading 过程中不绘制\n this.set('loading', true);\n }\n else if (img instanceof Image) {\n // 如果是一个 image 对象,则设置宽高\n if (!attrs.width) {\n attrs.width = img.width;\n }\n if (!attrs.height) {\n attrs.height = img.height;\n }\n }\n else if (isCanvas(img)) {\n // 如果设置了 canvas 对象\n if (!attrs.width) {\n attrs.width = Number(img.getAttribute('width'));\n }\n if (!attrs.height) {\n attrs.height, Number(img.getAttribute('height'));\n }\n }\n };\n ImageShape.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n // 如果加载的已经是当前图片,则不再处理\n if (name === 'img') {\n // 可以加缓冲,&& this.get('imgSrc') !== value\n this._setImage(value);\n }\n };\n ImageShape.prototype.createPath = function (context) {\n // 正在加载则不绘制\n if (this.get('loading')) {\n this.set('toDraw', true); // 加载完成后绘制\n this.set('context', context);\n return;\n }\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y, width = attrs.width, height = attrs.height, sx = attrs.sx, sy = attrs.sy, swidth = attrs.swidth, sheight = attrs.sheight;\n var img = attrs.img;\n if (img instanceof Image || isCanvas(img)) {\n if (!isNil(sx) && !isNil(sy) && !isNil(swidth) && !isNil(sheight)) {\n context.drawImage(img, sx, sy, swidth, sheight, x, y, width, height);\n }\n else {\n context.drawImage(img, x, y, width, height);\n }\n }\n };\n return ImageShape;\n}(ShapeBase));\nexport default ImageShape;\n//# sourceMappingURL=image.js.map","import { Line as LineUtil } from '@antv/g-math';\nexport default function inLine(x1, y1, x2, y2, lineWidth, x, y) {\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n var halfWidth = lineWidth / 2;\n // 因为目前的方案是计算点到直线的距离,而有可能会在延长线上,所以要先判断是否在包围盒内\n // 这种方案会在水平或者竖直的情况下载线的延长线上有半 lineWidth 的误差\n if (!(x >= minX - halfWidth && x <= maxX + halfWidth && y >= minY - halfWidth && y <= maxY + halfWidth)) {\n return false;\n }\n // 因为已经计算了包围盒,所以仅需要计算到直线的距离即可,可以显著提升性能\n return LineUtil.pointToLine(x1, y1, x2, y2, x, y) <= lineWidth / 2;\n}\n//# sourceMappingURL=line.js.map","import { __assign, __extends } from \"tslib\";\n/**\n * @fileoverview 线\n * @author dxq613@gmail.com\n */\nimport { Line as LineUtil } from '@antv/g-math';\nimport ShapeBase from './base';\nimport inLine from '../util/in-stroke/line';\nimport * as ArrowUtil from '../util/arrow';\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n function Line() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Line.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x1: 0, y1: 0, x2: 0, y2: 0, startArrow: false, endArrow: false });\n };\n Line.prototype.initAttrs = function (attrs) {\n this.setArrow();\n };\n // 更新属性时,检测是否更改了箭头\n Line.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n // 由于箭头的绘制依赖于 line 的诸多 attrs,因此这里不再对每个 attr 进行判断,attr 每次变化都会影响箭头的更新\n this.setArrow();\n };\n Line.prototype.setArrow = function () {\n var attrs = this.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (startArrow) {\n ArrowUtil.addStartArrow(this, attrs, x2, y2, x1, y1);\n }\n if (endArrow) {\n ArrowUtil.addEndArrow(this, attrs, x1, y1, x2, y2);\n }\n };\n Line.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n if (!isStroke || !lineWidth) {\n return false;\n }\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return inLine(x1, y1, x2, y2, lineWidth, x, y);\n };\n Line.prototype.createPath = function (context) {\n var attrs = this.attr();\n var x1 = attrs.x1, y1 = attrs.y1, x2 = attrs.x2, y2 = attrs.y2, startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n var startArrowDistance = {\n dx: 0,\n dy: 0,\n };\n var endArrowDistance = {\n dx: 0,\n dy: 0,\n };\n if (startArrow && startArrow.d) {\n startArrowDistance = ArrowUtil.getShortenOffset(x1, y1, x2, y2, attrs.startArrow.d);\n }\n if (endArrow && endArrow.d) {\n endArrowDistance = ArrowUtil.getShortenOffset(x1, y1, x2, y2, attrs.endArrow.d);\n }\n context.beginPath();\n // 如果自定义箭头,线条相应缩进\n context.moveTo(x1 + startArrowDistance.dx, y1 + startArrowDistance.dy);\n context.lineTo(x2 - endArrowDistance.dx, y2 - endArrowDistance.dy);\n };\n Line.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get length of line\n * @return {number} length\n */\n Line.prototype.getTotalLength = function () {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.length(x1, y1, x2, y2);\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Line.prototype.getPoint = function (ratio) {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.pointAt(x1, y1, x2, y2, ratio);\n };\n return Line;\n}(ShapeBase));\nexport default Line;\n//# sourceMappingURL=line.js.map","/**\n * @fileoverview Marker\n * @author dxq613@gmail.com\n */\nimport { __extends } from \"tslib\";\nimport { isNil } from '@antv/util';\nimport { path2Absolute } from '@antv/path-util';\nimport ShapeBase from './base';\nimport { isFunction } from '../util/util';\nimport { drawPath } from '../util/draw';\nvar Symbols = {\n // 圆\n circle: function (x, y, r) {\n return [\n ['M', x - r, y],\n ['A', r, r, 0, 1, 0, x + r, y],\n ['A', r, r, 0, 1, 0, x - r, y],\n ];\n },\n // 正方形\n square: function (x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function (x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['Z']];\n },\n // 倒三角形\n 'triangle-down': function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n },\n};\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Marker.prototype.initAttrs = function (attrs) {\n this._resetParamsCache();\n };\n // 重置绘制 path 存储的缓存\n Marker.prototype._resetParamsCache = function () {\n // 为了加速 path 的绘制、拾取和计算,这个地方可以缓存很多东西\n // 这些缓存都是第一次需要时计算和存储,虽然增加了复杂度,但是频繁调用的方法,性能有很大提升\n this.set('paramsCache', {}); // 清理缓存\n };\n // 更新属性时,检测是否更改了 path\n Marker.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (['symbol', 'x', 'y', 'r', 'radius'].indexOf(name) !== -1) {\n // path 相关属性更改时,清理缓存\n this._resetParamsCache();\n }\n };\n // 仅仅使用包围盒检测来进行拾取\n // 所以不需要复写 isInStrokeOrPath 的方法\n Marker.prototype.isOnlyHitBox = function () {\n return true;\n };\n Marker.prototype._getR = function (attrs) {\n // 兼容 r 和 radius 两种写法,推荐使用 r\n return isNil(attrs.r) ? attrs.radius : attrs.r;\n };\n Marker.prototype._getPath = function () {\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y;\n var symbol = attrs.symbol || 'circle';\n var r = this._getR(attrs);\n var method;\n var path;\n if (isFunction(symbol)) {\n method = symbol;\n path = method(x, y, r);\n // 将 path 转成绝对路径\n path = path2Absolute(path);\n }\n else {\n // 内置 symbol 的 path 都是绝对路径,直接绘制即可,不需要对 path 进行特殊处理\n method = Marker.Symbols[symbol];\n if (!method) {\n console.warn(symbol + \" marker is not supported.\");\n return null;\n }\n path = method(x, y, r);\n }\n return path;\n };\n Marker.prototype.createPath = function (context) {\n var path = this._getPath();\n var paramsCache = this.get('paramsCache');\n drawPath(this, context, { path: path }, paramsCache);\n };\n Marker.Symbols = Symbols;\n return Marker;\n}(ShapeBase));\nexport default Marker;\n//# sourceMappingURL=marker.js.map","import { getOffScreenContext } from '@antv/g-base';\nexport default function isPointInPath(shape, x, y) {\n var ctx = getOffScreenContext();\n shape.createPath(ctx);\n return ctx.isPointInPath(x, y);\n}\n//# sourceMappingURL=point-in-path.js.map","/**\n * @fileoverview 判断点是否在多边形内\n * @author dxq613@gmail.com\n */\n// 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526\nvar tolerance = 1e-6;\n// 三态函数,判断两个double在eps精度下的大小关系\nfunction dcmp(x) {\n if (Math.abs(x) < tolerance) {\n return 0;\n }\n return x < 0 ? -1 : 1;\n}\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) &&\n Math.min(p1[0], p2[0]) <= q[0] &&\n q[0] <= Math.max(p1[0], p2[0]) &&\n Math.min(p1[1], p2[1]) <= q[1] &&\n q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n// 判断点P在多边形内-射线法\nexport default function isInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 &&\n dcmp(x - ((y - p1[1]) * (p1[0] - p2[0])) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n}\n//# sourceMappingURL=polygon.js.map","import { distance } from '../util';\nexport default function arc(cx, cy, r, startAngle, endAngle, lineWidth, x, y) {\n var angle = (Math.atan2(y - cy, x - cx) + Math.PI * 2) % (Math.PI * 2); // 转换到 0 - 2 * Math.PI 之间\n if (angle < startAngle || angle > endAngle) {\n return false;\n }\n var point = {\n x: cx + r * Math.cos(angle),\n y: cy + r * Math.sin(angle),\n };\n return distance(point.x, point.y, x, y) <= lineWidth / 2;\n}\n//# sourceMappingURL=arc.js.map","import { __assign } from \"tslib\";\n/**\n * @fileoverview path 的一些工具\n * @author dxq613@gmail.com\n */\nimport { PathUtil } from '@antv/g-base';\nimport { Quad as QuadUtil } from '@antv/g-math';\nimport { Cubic as CubicUtil } from '@antv/g-math';\nimport { ext } from '@antv/matrix-util';\nimport * as vec3 from 'gl-matrix/vec3';\nimport { inBox } from './util';\nimport inLine from './in-stroke/line';\nimport inArc from './in-stroke/arc';\nvar transform = ext.transform;\nfunction hasArc(path) {\n var hasArc = false;\n var count = path.length;\n for (var i = 0; i < count; i++) {\n var params = path[i];\n var cmd = params[0];\n if (cmd === 'C' || cmd === 'A' || cmd === 'Q') {\n hasArc = true;\n break;\n }\n }\n return hasArc;\n}\nfunction isPointInStroke(segments, lineWidth, x, y, length) {\n var isHit = false;\n var halfWidth = lineWidth / 2;\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n var currentPoint = segment.currentPoint, params = segment.params, prePoint = segment.prePoint, box = segment.box;\n // 如果在前面已经生成过包围盒,直接按照包围盒计算\n if (box && !inBox(box.x - halfWidth, box.y - halfWidth, box.width + lineWidth, box.height + lineWidth, x, y)) {\n continue;\n }\n switch (segment.command) {\n // L 和 Z 都是直线, M 不进行拾取\n case 'L':\n case 'Z':\n isHit = inLine(prePoint[0], prePoint[1], currentPoint[0], currentPoint[1], lineWidth, x, y);\n break;\n case 'Q':\n var qDistance = QuadUtil.pointDistance(prePoint[0], prePoint[1], params[1], params[2], params[3], params[4], x, y);\n isHit = qDistance <= lineWidth / 2;\n break;\n case 'C':\n var cDistance = CubicUtil.pointDistance(prePoint[0], // 上一段结束位置, 即 C 的起始点\n prePoint[1], params[1], // 'C' 的参数,1、2 为第一个控制点,3、4 为第二个控制点,5、6 为结束点\n params[2], params[3], params[4], params[5], params[6], x, y, length);\n isHit = cDistance <= lineWidth / 2;\n break;\n case 'A':\n // 计算点到椭圆圆弧的距离,暂时使用近似算法,后面可以改成切割法求最近距离\n var arcParams = segment.arcParams;\n var cx = arcParams.cx, cy = arcParams.cy, rx = arcParams.rx, ry = arcParams.ry, startAngle = arcParams.startAngle, endAngle = arcParams.endAngle, xRotation = arcParams.xRotation;\n var p = [x, y, 1];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n var m = transform(null, [\n ['t', -cx, -cy],\n ['r', -xRotation],\n ['s', 1 / scaleX, 1 / scaleY],\n ]);\n vec3.transformMat3(p, p, m);\n isHit = inArc(0, 0, r, startAngle, endAngle, lineWidth, p[0], p[1]);\n break;\n default:\n break;\n }\n if (isHit) {\n break;\n }\n }\n return isHit;\n}\n/**\n * 提取出内部的闭合多边形和非闭合的多边形,假设 path 不存在圆弧\n * @param {Array} path 路径\n * @returns {Array} 点的集合\n */\nfunction extractPolygons(path) {\n var count = path.length;\n var polygons = [];\n var polylines = [];\n var points = []; // 防止第一个命令不是 'M'\n for (var i = 0; i < count; i++) {\n var params = path[i];\n var cmd = params[0];\n if (cmd === 'M') {\n // 遇到 'M' 判定是否是新数组,新数组中没有点\n if (points.length) {\n // 如果存在点,则说明没有遇到 'Z',开始了一个新的多边形\n polylines.push(points);\n points = []; // 创建新的点\n }\n points.push([params[1], params[2]]);\n }\n else if (cmd === 'Z') {\n if (points.length) {\n // 存在点\n polygons.push(points);\n points = []; // 开始新的点集合\n }\n // 如果不存在点,同时 'Z',则说明是错误,不处理\n }\n else {\n points.push([params[1], params[2]]);\n }\n }\n // 说明 points 未放入 polygons 或者 polyline\n // 仅当只有一个 M,没有 Z 时会发生这种情况\n if (points.length > 0) {\n polylines.push(points);\n }\n return {\n polygons: polygons,\n polylines: polylines,\n };\n}\nexport default __assign({ hasArc: hasArc,\n extractPolygons: extractPolygons,\n isPointInStroke: isPointInStroke }, PathUtil);\n//# sourceMappingURL=path.js.map","import { __assign, __extends } from \"tslib\";\nimport { Cubic as CubicUtil } from '@antv/g-math';\nimport { each, isNil } from '@antv/util';\nimport ShapeBase from './base';\nimport { path2Absolute, path2Segments } from '@antv/path-util';\nimport { drawPath } from '../util/draw';\nimport isPointInPath from '../util/in-path/point-in-path';\nimport isInPolygon from '../util/in-path/polygon';\nimport PathUtil from '../util/path';\nimport * as ArrowUtil from '../util/arrow';\n// 是否在多个多边形内部\nfunction isInPolygons(polygons, x, y) {\n var isHit = false;\n for (var i = 0; i < polygons.length; i++) {\n var points = polygons[i];\n isHit = isInPolygon(points, x, y);\n if (isHit) {\n break;\n }\n }\n return isHit;\n}\nvar Path = /** @class */ (function (_super) {\n __extends(Path, _super);\n function Path() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Path.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n Path.prototype.initAttrs = function (attrs) {\n this._setPathArr(attrs.path);\n this.setArrow();\n };\n // 更新属性时,检测是否更改了 path\n Path.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name === 'path') {\n this._setPathArr(value);\n }\n // 由于箭头的绘制依赖于 line 的诸多 attrs,因此这里不再对每个 attr 进行判断,attr 每次变化都会影响箭头的更新\n this.setArrow();\n };\n // 将 path 转换成绝对路径\n Path.prototype._setPathArr = function (path) {\n // 转换 path 的格式\n this.attrs.path = path2Absolute(path);\n var hasArc = PathUtil.hasArc(path);\n // 为了加速 path 的绘制、拾取和计算,这个地方可以缓存很多东西\n // 这些缓存都是第一次需要时计算和存储,虽然增加了复杂度,但是频繁调用的方法,性能有很大提升\n this.set('hasArc', hasArc);\n this.set('paramsCache', {}); // 清理缓存\n this.set('segments', null); // 延迟生成 path,在动画场景下可能不会有拾取\n this.set('curve', null);\n this.set('tCache', null);\n this.set('totalLength', null);\n };\n Path.prototype.getSegments = function () {\n var segments = this.get('segements');\n if (!segments) {\n segments = path2Segments(this.attr('path'));\n this.set('segments', segments);\n }\n return segments;\n };\n Path.prototype.setArrow = function () {\n var attrs = this.attr();\n var startArrow = attrs.startArrow, endArrow = attrs.endArrow;\n if (startArrow) {\n var tangent = this.getStartTangent();\n ArrowUtil.addStartArrow(this, attrs, tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1]);\n }\n if (endArrow) {\n var tangent = this.getEndTangent();\n ArrowUtil.addEndArrow(this, attrs, tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1]);\n }\n };\n Path.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var segments = this.getSegments();\n var hasArc = this.get('hasArc');\n var isHit = false;\n if (isStroke) {\n var length_1 = this.getTotalLength();\n isHit = PathUtil.isPointInStroke(segments, lineWidth, x, y, length_1);\n }\n if (!isHit && isFill) {\n if (hasArc) {\n // 存在曲线时,暂时使用 canvas 的 api 计算,后续可以进行多边形切割\n isHit = isPointInPath(this, x, y);\n }\n else {\n var path = this.attr('path');\n var extractResutl = PathUtil.extractPolygons(path);\n // 提取出来的多边形包含闭合的和非闭合的,在这里统一按照多边形处理\n isHit = isInPolygons(extractResutl.polygons, x, y) || isInPolygons(extractResutl.polylines, x, y);\n }\n }\n return isHit;\n };\n Path.prototype.createPath = function (context) {\n var attrs = this.attr();\n var paramsCache = this.get('paramsCache'); // 由于计算圆弧的参数成本很大,所以要缓存\n drawPath(this, context, attrs, paramsCache);\n };\n Path.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get total length of path\n * @return {number} length\n */\n Path.prototype.getTotalLength = function () {\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this._calculateCurve();\n this._setTcache();\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Path.prototype.getPoint = function (ratio) {\n var tCache = this.get('tCache');\n if (!tCache) {\n this._calculateCurve();\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n var curve = this.get('curve');\n if (!tCache || tCache.length === 0) {\n if (curve) {\n return {\n x: curve[0][1],\n y: curve[0][2],\n };\n }\n return null;\n }\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n var seg = curve[index];\n if (isNil(seg) || isNil(index)) {\n return null;\n }\n var l = seg.length;\n var nextSeg = curve[index + 1];\n return CubicUtil.pointAt(seg[l - 2], seg[l - 1], nextSeg[1], nextSeg[2], nextSeg[3], nextSeg[4], nextSeg[5], nextSeg[6], subt);\n };\n Path.prototype._calculateCurve = function () {\n var path = this.attr().path;\n this.set('curve', PathUtil.pathToCurve(path));\n };\n Path.prototype._setTcache = function () {\n var totalLength = 0;\n var tempLength = 0;\n // 每段 curve 对应起止点的长度比例列表,形如: [[0, 0.25], [0.25, 0.6]. [0.6, 0.9], [0.9, 1]]\n var tCache = [];\n var segmentT;\n var segmentL;\n var segmentN;\n var l;\n var curve = this.get('curve');\n if (!curve) {\n return;\n }\n each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n if (segmentN) {\n totalLength +=\n CubicUtil.length(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]) || 0;\n }\n });\n this.set('totalLength', totalLength);\n if (totalLength === 0) {\n this.set('tCache', []);\n return;\n }\n each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n if (segmentN) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = CubicUtil.length(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]);\n // 当 path 不连续时,segmentL 可能为空,为空时需要作为 0 处理\n tempLength += segmentL || 0;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n Path.prototype.getStartTangent = function () {\n var segments = this.getSegments();\n var result;\n if (segments.length > 1) {\n var startPoint = segments[0].currentPoint;\n var endPoint = segments[1].currentPoint;\n var tangent = segments[1].startTangent;\n result = [];\n if (tangent) {\n result.push([startPoint[0] - tangent[0], startPoint[1] - tangent[1]]);\n result.push([startPoint[0], startPoint[1]]);\n }\n else {\n result.push([endPoint[0], endPoint[1]]);\n result.push([startPoint[0], startPoint[1]]);\n }\n }\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n Path.prototype.getEndTangent = function () {\n var segments = this.getSegments();\n var length = segments.length;\n var result;\n if (length > 1) {\n var startPoint = segments[length - 2].currentPoint;\n var endPoint = segments[length - 1].currentPoint;\n var tangent = segments[length - 1].endTangent;\n result = [];\n if (tangent) {\n result.push([endPoint[0] - tangent[0], endPoint[1] - tangent[1]]);\n result.push([endPoint[0], endPoint[1]]);\n }\n else {\n result.push([startPoint[0], startPoint[1]]);\n result.push([endPoint[0], endPoint[1]]);\n }\n }\n return result;\n };\n return Path;\n}(ShapeBase));\nexport default Path;\n//# sourceMappingURL=path.js.map","import inLine from './line';\nexport default function inPolyline(points, lineWidth, x, y, isClose) {\n var count = points.length;\n if (count < 2) {\n return false;\n }\n for (var i = 0; i < count - 1; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var x2 = points[i + 1][0];\n var y2 = points[i + 1][1];\n if (inLine(x1, y1, x2, y2, lineWidth, x, y)) {\n return true;\n }\n }\n // 如果封闭,则计算起始点和结束点的边\n if (isClose) {\n var first = points[0];\n var last = points[count - 1];\n if (inLine(first[0], first[1], last[0], last[1], lineWidth, x, y)) {\n return true;\n }\n }\n return false;\n}\n//# sourceMappingURL=polyline.js.map","/**\n * @fileoverview 多边形\n * @author dxq613@gmail.com\n */\nimport { __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport inPolyline from '../util/in-stroke/polyline';\nimport isInPolygon from '../util/in-path/polygon';\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Polygon.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var points = this.attr().points;\n var isHit = false;\n if (isStroke) {\n isHit = inPolyline(points, lineWidth, x, y, true);\n }\n if (!isHit && isFill) {\n isHit = isInPolygon(points, x, y); // isPointInPath(shape, x, y);\n }\n return isHit;\n };\n Polygon.prototype.createPath = function (context) {\n var attrs = this.attr();\n var points = attrs.points;\n if (points.length < 2) {\n return;\n }\n context.beginPath();\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n if (i === 0) {\n context.moveTo(point[0], point[1]);\n }\n else {\n context.lineTo(point[0], point[1]);\n }\n }\n context.closePath();\n };\n return Polygon;\n}(ShapeBase));\nexport default Polygon;\n//# sourceMappingURL=polygon.js.map","import { __assign, __extends } from \"tslib\";\nimport { Line as LineUtil } from '@antv/g-math';\nimport { Polyline as PolylineUtil } from '@antv/g-math';\nimport { each, isNil } from '@antv/util';\nimport ShapeBase from './base';\nimport inPolyline from '../util/in-stroke/polyline';\nimport * as ArrowUtil from '../util/arrow';\nvar PolyLine = /** @class */ (function (_super) {\n __extends(PolyLine, _super);\n function PolyLine() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PolyLine.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n PolyLine.prototype.initAttrs = function (attrs) {\n this.setArrow();\n };\n // 更新属性时,检测是否更改了 points\n PolyLine.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n this.setArrow();\n if (['points'].indexOf(name) !== -1) {\n this._resetCache();\n }\n };\n PolyLine.prototype._resetCache = function () {\n this.set('totalLength', null);\n this.set('tCache', null);\n };\n PolyLine.prototype.setArrow = function () {\n var attrs = this.attr();\n var _a = this.attrs, points = _a.points, startArrow = _a.startArrow, endArrow = _a.endArrow;\n var length = points.length;\n var x1 = points[0][0];\n var y1 = points[0][1];\n var x2 = points[length - 1][0];\n var y2 = points[length - 1][1];\n if (startArrow) {\n ArrowUtil.addStartArrow(this, attrs, points[1][0], points[1][1], x1, y1);\n }\n if (endArrow) {\n ArrowUtil.addEndArrow(this, attrs, points[length - 2][0], points[length - 2][1], x2, y2);\n }\n };\n // 不允许 fill\n PolyLine.prototype.isFill = function () {\n return false;\n };\n PolyLine.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n // 没有设置 stroke 不能被拾取, 没有线宽不能被拾取\n if (!isStroke || !lineWidth) {\n return false;\n }\n var points = this.attr().points;\n return inPolyline(points, lineWidth, x, y, false);\n };\n // 始终填充\n PolyLine.prototype.isStroke = function () {\n return true;\n };\n PolyLine.prototype.createPath = function (context) {\n var _a = this.attr(), points = _a.points, startArrow = _a.startArrow, endArrow = _a.endArrow;\n var length = points.length;\n if (points.length < 2) {\n return;\n }\n var x1 = points[0][0];\n var y1 = points[0][1];\n var x2 = points[length - 1][0];\n var y2 = points[length - 1][1];\n // 如果定义了箭头,并且是自定义箭头,线条相应缩进\n if (startArrow && startArrow.d) {\n var distance = ArrowUtil.getShortenOffset(x1, y1, points[1][0], points[1][1], startArrow.d);\n x1 += distance.dx;\n y1 += distance.dy;\n }\n if (endArrow && endArrow.d) {\n var distance = ArrowUtil.getShortenOffset(points[length - 2][0], points[length - 2][1], x2, y2, endArrow.d);\n x2 -= distance.dx;\n y2 -= distance.dy;\n }\n context.beginPath();\n context.moveTo(x1, y1);\n for (var i = 0; i < length - 1; i++) {\n var point = points[i];\n context.lineTo(point[0], point[1]);\n }\n context.lineTo(x2, y2);\n };\n PolyLine.prototype.afterDrawPath = function (context) {\n var startArrowShape = this.get('startArrowShape');\n var endArrowShape = this.get('endArrowShape');\n if (startArrowShape) {\n startArrowShape.draw(context);\n }\n if (endArrowShape) {\n endArrowShape.draw(context);\n }\n };\n /**\n * Get length of polyline\n * @return {number} length\n */\n PolyLine.prototype.getTotalLength = function () {\n var points = this.attr().points;\n // get totalLength from cache\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this.set('totalLength', PolylineUtil.length(points));\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n PolyLine.prototype.getPoint = function (ratio) {\n var points = this.attr().points;\n // get tCache from cache\n var tCache = this.get('tCache');\n if (!tCache) {\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n return LineUtil.pointAt(points[index][0], points[index][1], points[index + 1][0], points[index + 1][1], subt);\n };\n PolyLine.prototype._setTcache = function () {\n var points = this.attr().points;\n if (!points || points.length === 0) {\n return;\n }\n var totalLength = this.getTotalLength();\n if (totalLength <= 0) {\n return;\n }\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n each(points, function (p, i) {\n if (points[i + 1]) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = LineUtil.length(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n PolyLine.prototype.getStartTangent = function () {\n var points = this.attr().points;\n var result = [];\n result.push([points[1][0], points[1][1]]);\n result.push([points[0][0], points[0][1]]);\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n PolyLine.prototype.getEndTangent = function () {\n var points = this.attr().points;\n var l = points.length - 1;\n var result = [];\n result.push([points[l - 1][0], points[l - 1][1]]);\n result.push([points[l][0], points[l][1]]);\n return result;\n };\n return PolyLine;\n}(ShapeBase));\nexport default PolyLine;\n//# sourceMappingURL=polyline.js.map","import { inBox } from '../util';\nexport default function inRect(minX, minY, width, height, lineWidth, x, y) {\n var halfWidth = lineWidth / 2;\n // 将四个边看做矩形来检测,比边的检测算法要快\n return (inBox(minX - halfWidth, minY - halfWidth, width, lineWidth, x, y) || // 上边\n inBox(minX + width - halfWidth, minY - halfWidth, lineWidth, height, x, y) || // 右边\n inBox(minX + halfWidth, minY + height - halfWidth, width, lineWidth, x, y) || // 下边\n inBox(minX - halfWidth, minY + halfWidth, lineWidth, height, x, y)); // 左边\n}\n//# sourceMappingURL=rect.js.map","import inLine from './line';\nimport inArc from './arc';\nexport default function rectWithRadius(minX, minY, width, height, radius, lineWidth, x, y) {\n var halfWidth = lineWidth / 2;\n return (inLine(minX + radius, minY, minX + width - radius, minY, lineWidth, x, y) ||\n inLine(minX + width, minY + radius, minX + width, minY + height - radius, lineWidth, x, y) ||\n inLine(minX + width - radius, minY + height, minX + radius, minY + height, lineWidth, x, y) ||\n inLine(minX, minY + height - radius, minX, minY + radius, lineWidth, x, y) ||\n inArc(minX + width - radius, minY + radius, radius, 1.5 * Math.PI, 2 * Math.PI, lineWidth, x, y) ||\n inArc(minX + width - radius, minY + height - radius, radius, 0, 0.5 * Math.PI, lineWidth, x, y) ||\n inArc(minX + radius, minY + height - radius, radius, 0.5 * Math.PI, Math.PI, lineWidth, x, y) ||\n inArc(minX + radius, minY + radius, radius, Math.PI, 1.5 * Math.PI, lineWidth, x, y));\n}\n//# sourceMappingURL=rect-radius.js.map","/**\n * @fileoverview 矩形\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { parseRadius } from '../util/parse';\nimport { inBox } from '../util/util';\nimport inRect from '../util/in-stroke/rect';\nimport inRectWithRadius from '../util/in-stroke/rect-radius';\nimport isPointInPath from '../util/in-path/point-in-path';\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n function Rect() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Rect.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0, radius: 0 });\n };\n Rect.prototype.isInStrokeOrPath = function (x, y, isStroke, isFill, lineWidth) {\n var attrs = this.attr();\n var minX = attrs.x;\n var minY = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var radius = attrs.radius;\n // 无圆角时的策略\n if (!radius) {\n var halfWidth = lineWidth / 2;\n // 同时填充和带有边框\n if (isFill && isStroke) {\n return inBox(minX - halfWidth, minY - halfWidth, width + halfWidth, height + halfWidth, x, y);\n }\n // 仅填充\n if (isFill) {\n return inBox(minX, minY, width, height, x, y);\n }\n if (isStroke) {\n return inRect(minX, minY, width, height, lineWidth, x, y);\n }\n }\n else {\n var isHit = false;\n if (isStroke) {\n isHit = inRectWithRadius(minX, minY, width, height, radius, lineWidth, x, y);\n }\n // 仅填充时带有圆角的矩形直接通过图形拾取\n // 以后可以改成纯数学的近似拾取,将圆弧切割成多边形\n if (!isHit && isFill) {\n isHit = isPointInPath(this, x, y);\n }\n return isHit;\n }\n };\n Rect.prototype.createPath = function (context) {\n var attrs = this.attr();\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var radius = attrs.radius;\n context.beginPath();\n if (radius === 0) {\n // 改成原生的rect方法\n context.rect(x, y, width, height);\n }\n else {\n var _a = parseRadius(radius), r1 = _a[0], r2 = _a[1], r3 = _a[2], r4 = _a[3];\n context.moveTo(x + r1, y);\n context.lineTo(x + width - r2, y);\n r2 !== 0 && context.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);\n context.lineTo(x + width, y + height - r3);\n r3 !== 0 && context.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);\n context.lineTo(x + r4, y + height);\n r4 !== 0 && context.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);\n context.lineTo(x, y + r1);\n r1 !== 0 && context.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);\n context.closePath();\n }\n };\n return Rect;\n}(ShapeBase));\nexport default Rect;\n//# sourceMappingURL=rect.js.map","/**\n * @fileoverview 文本\n * @author dxq613@gmail.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport ShapeBase from './base';\nimport { isNil, isString, each } from '../util/util';\nimport { getTextHeight, assembleFont } from '@antv/g-base';\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // 默认文本属性\n Text.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, text: null, fontSize: 12, fontFamily: 'sans-serif', fontStyle: 'normal', fontWeight: 'normal', fontVariant: 'normal', textAlign: 'start', textBaseline: 'bottom' });\n };\n // 仅仅使用包围盒检测来进行拾取\n Text.prototype.isOnlyHitBox = function () {\n return true;\n };\n // 初始化时组合 font,同时判断 text 是否换行\n Text.prototype.initAttrs = function (attrs) {\n this._assembleFont();\n if (attrs.text) {\n this._setText(attrs.text);\n }\n };\n // 组装字体\n Text.prototype._assembleFont = function () {\n var attrs = this.attrs;\n attrs.font = assembleFont(attrs);\n };\n // 如果文本换行,则缓存数组\n Text.prototype._setText = function (text) {\n var textArr = null;\n if (isString(text) && text.indexOf('\\n') !== -1) {\n textArr = text.split('\\n');\n }\n this.set('textArr', textArr);\n };\n // 更新属性时,检测是否更改了 font、text\n Text.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (name.startsWith('font')) {\n this._assembleFont();\n }\n if (name === 'text') {\n this._setText(value);\n }\n };\n // 这个方法在 text 时没有可以做的事情,如果要支持文字背景时可以考虑\n // createPath(context) {\n // }\n // 如果文本多行,需要获取文本间距\n Text.prototype._getSpaceingY = function () {\n var attrs = this.attrs;\n var lineHeight = attrs.lineHeight;\n var fontSize = attrs.fontSize * 1;\n return lineHeight ? lineHeight - fontSize : fontSize * 0.14;\n };\n // 绘制文本,考虑多行的场景\n Text.prototype._drawTextArr = function (context, textArr, isFill) {\n var attrs = this.attrs;\n var textBaseline = attrs.textBaseline;\n var x = attrs.x;\n var y = attrs.y;\n var fontSize = attrs.fontSize * 1;\n var spaceingY = this._getSpaceingY();\n var height = getTextHeight(attrs.text, attrs.fontSize, attrs.lineHeight);\n var subY;\n each(textArr, function (subText, index) {\n subY = y + index * (spaceingY + fontSize) - height + fontSize; // bottom;\n if (textBaseline === 'middle')\n subY += height - fontSize - (height - fontSize) / 2;\n if (textBaseline === 'top')\n subY += height - fontSize;\n if (!isNil(subText)) {\n if (isFill) {\n context.fillText(subText, x, subY);\n }\n else {\n context.strokeText(subText, x, subY);\n }\n }\n });\n };\n // 绘制文本,同时考虑填充和绘制边框\n Text.prototype._drawText = function (context, isFill) {\n var attrs = this.attr();\n var x = attrs.x;\n var y = attrs.y;\n var textArr = this.get('textArr');\n if (textArr) {\n this._drawTextArr(context, textArr, isFill);\n }\n else {\n var text = attrs.text;\n if (!isNil(text)) {\n if (isFill) {\n context.fillText(text, x, y);\n }\n else {\n context.strokeText(text, x, y);\n }\n }\n }\n };\n // 复写绘制和填充的逻辑:对于文本,应该先绘制边框,再进行填充\n Text.prototype.strokeAndFill = function (context) {\n var _a = this.attrs, lineWidth = _a.lineWidth, opacity = _a.opacity, strokeOpacity = _a.strokeOpacity, fillOpacity = _a.fillOpacity;\n if (this.isStroke()) {\n if (lineWidth > 0) {\n if (!isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = opacity;\n }\n this.stroke(context);\n }\n }\n if (this.isFill()) {\n if (!isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n this.fill(context);\n context.globalAlpha = opacity;\n }\n else {\n this.fill(context);\n }\n }\n this.afterDrawPath(context);\n };\n // 复写填充逻辑\n Text.prototype.fill = function (context) {\n this._drawText(context, true);\n };\n // 复写绘制边框的逻辑\n Text.prototype.stroke = function (context) {\n this._drawText(context, false);\n };\n return Text;\n}(ShapeBase));\nexport default Text;\n//# sourceMappingURL=text.js.map","import { isAllowCapture, multiplyVec2, invert } from '@antv/g-base';\nfunction invertFromMatrix(v, matrix) {\n if (matrix) {\n var invertMatrix = invert(matrix);\n return multiplyVec2(invertMatrix, v);\n }\n return v;\n}\nfunction getRefXY(element, x, y) {\n // @ts-ignore\n var totalMatrix = element.getTotalMatrix();\n if (totalMatrix) {\n var _a = invertFromMatrix([x, y, 1], totalMatrix), refX = _a[0], refY = _a[1];\n return [refX, refY];\n }\n return [x, y];\n}\n// 拾取前的检测,只有通过检测才能继续拾取\nfunction preTest(element, x, y) {\n // @ts-ignore\n if (element.isCanvas && element.isCanvas()) {\n return true;\n }\n // 不允许被拾取,则返回 null\n // @ts-ignore\n if (!isAllowCapture(element) || element.cfg.isInView === false) {\n return false;\n }\n if (element.cfg.clipShape) {\n // 如果存在 clip\n var _a = getRefXY(element, x, y), refX = _a[0], refY = _a[1];\n if (element.isClipped(refX, refY)) {\n return false;\n }\n }\n // @ts-ignore ,这个地方调用过于频繁\n var bbox = element.cfg.cacheCanvasBBox || element.getCanvasBBox();\n // 如果没有缓存 bbox,则说明不可见\n // 注释掉的这段可能会加速拾取,上面的语句改写成 const bbox = element.cfg.cacheCanvasBBox;\n // 这时候的拾取假设图形/分组在上一次绘制都在视窗内,但是上面已经判定了 isInView 所以意义不大\n // 现在还调用 element.getCanvasBBox(); 一个很大的原因是便于单元测试\n // if (!bbox) {\n // return false;\n // }\n if (!(x >= bbox.minX && x <= bbox.maxX && y >= bbox.minY && y <= bbox.maxY)) {\n return false;\n }\n return true;\n}\n// 这个方法复写了 g-base 的 getShape\nexport function getShape(container, x, y) {\n // 没有通过检测,则返回 null\n if (!preTest(container, x, y)) {\n return null;\n }\n var shape = null;\n var children = container.getChildren();\n var count = children.length;\n for (var i = count - 1; i >= 0; i--) {\n var child = children[i];\n if (child.isGroup()) {\n shape = getShape(child, x, y);\n }\n else if (preTest(child, x, y)) {\n var curShape = child;\n var _a = getRefXY(child, x, y), refX = _a[0], refY = _a[1];\n // @ts-ignore\n if (curShape.isInShape(refX, refY)) {\n shape = child;\n }\n }\n if (shape) {\n break;\n }\n }\n return shape;\n}\n//# sourceMappingURL=hit.js.map","import { __extends } from \"tslib\";\nimport { AbstractCanvas } from '@antv/g-base';\nimport { getShape } from './util/hit';\nimport * as Shape from './shape';\nimport Group from './group';\nimport { each, getPixelRatio, requestAnimationFrame, clearAnimationFrame } from './util/util';\nimport { applyAttrsToContext, drawChildren, getMergedRegion, mergeView, checkRefresh, clearChanged } from './util/draw';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Canvas.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // 设置渲染引擎为 canvas,只读属性\n cfg['renderer'] = 'canvas';\n // 是否自动绘制,不需要用户调用 draw 方法\n cfg['autoDraw'] = true;\n // 是否允许局部刷新图表\n cfg['localRefresh'] = true;\n cfg['refreshElements'] = [];\n // 是否在视图内自动裁剪\n cfg['clipView'] = true;\n // 是否使用快速拾取的方案,默认为 false,上层可以打开\n cfg['quickHit'] = false;\n return cfg;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Canvas.prototype.onCanvasChange = function (changeType) {\n /**\n * 触发画布更新的三种 changeType\n * 1. attr: 修改画布的绘图属性\n * 2. sort: 画布排序,图形的层次会发生变化\n * 3. changeSize: 改变画布大小\n */\n if (changeType === 'attr' || changeType === 'sort' || changeType === 'changeSize') {\n this.set('refreshElements', [this]);\n this.draw();\n }\n };\n Canvas.prototype.getShapeBase = function () {\n return Shape;\n };\n Canvas.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 获取屏幕像素比\n */\n Canvas.prototype.getPixelRatio = function () {\n var pixelRatio = this.get('pixelRatio') || getPixelRatio();\n // 不足 1 的取 1,超出 1 的取整\n return pixelRatio >= 1 ? Math.ceil(pixelRatio) : 1;\n };\n Canvas.prototype.getViewRange = function () {\n return {\n minX: 0,\n minY: 0,\n maxX: this.cfg.width,\n maxY: this.cfg.height,\n };\n };\n // 复写基类的方法生成标签\n Canvas.prototype.createDom = function () {\n var element = document.createElement('canvas');\n var context = element.getContext('2d');\n // 缓存 context 对象\n this.set('context', context);\n return element;\n };\n Canvas.prototype.setDOMSize = function (width, height) {\n _super.prototype.setDOMSize.call(this, width, height);\n var context = this.get('context');\n var el = this.get('el');\n var pixelRatio = this.getPixelRatio();\n el.width = pixelRatio * width;\n el.height = pixelRatio * height;\n // 设置 canvas 元素的宽度和高度,会重置缩放,因此 context.scale 需要在每次设置宽、高后调用\n if (pixelRatio > 1) {\n context.scale(pixelRatio, pixelRatio);\n }\n };\n // 复写基类方法\n Canvas.prototype.clear = function () {\n _super.prototype.clear.call(this);\n this._clearFrame(); // 需要清理掉延迟绘制的帧\n var context = this.get('context');\n var element = this.get('el');\n context.clearRect(0, 0, element.width, element.height);\n };\n Canvas.prototype.getShape = function (x, y) {\n var shape;\n if (this.get('quickHit')) {\n shape = getShape(this, x, y);\n }\n else {\n shape = _super.prototype.getShape.call(this, x, y, null);\n }\n return shape;\n };\n // 对绘制区域边缘取整,避免浮点数问题\n Canvas.prototype._getRefreshRegion = function () {\n var elements = this.get('refreshElements');\n var viewRegion = this.getViewRange();\n var region;\n // 如果是当前画布整体发生了变化,则直接重绘整个画布\n if (elements.length && elements[0] === this) {\n region = viewRegion;\n }\n else {\n region = getMergedRegion(elements);\n if (region) {\n region.minX = Math.floor(region.minX);\n region.minY = Math.floor(region.minY);\n region.maxX = Math.ceil(region.maxX);\n region.maxY = Math.ceil(region.maxY);\n region.maxY += 1; // 在很多环境下字体的高低会不一致,附加一像素,避免残影\n var clipView = this.get('clipView');\n // 自动裁剪不在 view 内的区域\n if (clipView) {\n region = mergeView(region, viewRegion);\n }\n }\n }\n return region;\n };\n /**\n * 刷新图形元素,这里仅仅是放入队列,下次绘制时进行绘制\n * @param {IElement} element 图形元素\n */\n Canvas.prototype.refreshElement = function (element) {\n var refreshElements = this.get('refreshElements');\n refreshElements.push(element);\n // if (this.get('autoDraw')) {\n // this._startDraw();\n // }\n };\n // 清理还在进行的绘制\n Canvas.prototype._clearFrame = function () {\n var drawFrame = this.get('drawFrame');\n if (drawFrame) {\n // 如果全部渲染时,存在局部渲染,则抛弃掉局部渲染\n clearAnimationFrame(drawFrame);\n this.set('drawFrame', null);\n this.set('refreshElements', []);\n }\n };\n // 手工调用绘制接口\n Canvas.prototype.draw = function () {\n var drawFrame = this.get('drawFrame');\n if (this.get('autoDraw') && drawFrame) {\n return;\n }\n this._startDraw();\n };\n // 绘制所有图形\n Canvas.prototype._drawAll = function () {\n var context = this.get('context');\n var element = this.get('el');\n var children = this.getChildren();\n context.clearRect(0, 0, element.width, element.height);\n applyAttrsToContext(context, this);\n drawChildren(context, children);\n // 对于 https://github.com/antvis/g/issues/422 的场景,全局渲染的模式下也会记录更新的元素队列,因此全局渲染完后也需要置空\n this.set('refreshElements', []);\n };\n // 绘制局部\n Canvas.prototype._drawRegion = function () {\n var context = this.get('context');\n var refreshElements = this.get('refreshElements');\n var children = this.getChildren();\n var region = this._getRefreshRegion();\n // 需要注意可能没有 region 的场景\n // 一般发生在设置了 localRefresh ,在没有图形发生变化的情况下,用户调用了 draw\n if (region) {\n // 清理指定区域\n context.clearRect(region.minX, region.minY, region.maxX - region.minX, region.maxY - region.minY);\n // 保存上下文,设置 clip\n context.save();\n context.beginPath();\n context.rect(region.minX, region.minY, region.maxX - region.minX, region.maxY - region.minY);\n context.clip();\n applyAttrsToContext(context, this);\n // 确认更新的元素,这个优化可以提升 10 倍左右的性能,10W 个带有 group 的节点,局部渲染会从 90ms 下降到 5-6 ms\n checkRefresh(this, children, region);\n // 绘制子元素\n drawChildren(context, children, region);\n context.restore();\n }\n else if (refreshElements.length) {\n // 防止发生改变的 elements 没有 region 的场景,这会发生在多个情况下\n // 1. 空的 group\n // 2. 所有 elements 没有在绘图区域\n // 3. group 下面的 elements 隐藏掉\n // 如果不进行清理 hasChanged 的状态会不正确\n clearChanged(refreshElements);\n }\n each(refreshElements, function (element) {\n if (element.get('hasChanged')) {\n // 在视窗外的 Group 元素会加入到更新队列里,但实际却没有执行 draw() 逻辑,也就没有清除 hasChanged 标记\n // 即已经重绘完、但 hasChanged 标记没有清除的元素,需要统一清除掉。主要是 Group 存在问题,具体原因待排查\n element.set('hasChanged', false);\n }\n });\n this.set('refreshElements', []);\n };\n // 触发绘制\n Canvas.prototype._startDraw = function () {\n var _this = this;\n var drawFrame = this.get('drawFrame');\n if (!drawFrame) {\n drawFrame = requestAnimationFrame(function () {\n if (_this.get('localRefresh')) {\n _this._drawRegion();\n }\n else {\n _this._drawAll();\n }\n _this.set('drawFrame', null);\n });\n this.set('drawFrame', drawFrame);\n }\n };\n Canvas.prototype.skipDraw = function () { };\n Canvas.prototype.removeDom = function () {\n var el = this.get('el');\n // 需要清理 canvas 画布内容,否则ios下 创建的canvas垃圾未回收,导致Total canvas memory use exceeds问题\n // 相关问题列表\n // https://stackoverflow.com/questions/52532614/total-canvas-memory-use-exceeds-the-maximum-limit-safari-12\n // https://github.com/openlayers/openlayers/issues/9291\n el.width = 0;\n el.height = 0;\n el.parentNode.removeChild(el);\n };\n return Canvas;\n}(AbstractCanvas));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","export var SHAPE_TO_TAGS = {\n rect: 'path',\n circle: 'circle',\n line: 'line',\n path: 'path',\n marker: 'path',\n text: 'text',\n polyline: 'polyline',\n polygon: 'polygon',\n image: 'image',\n ellipse: 'ellipse',\n dom: 'foreignObject',\n};\nexport var SVG_ATTR_MAP = {\n opacity: 'opacity',\n fillStyle: 'fill',\n fill: 'fill',\n fillOpacity: 'fill-opacity',\n strokeStyle: 'stroke',\n strokeOpacity: 'stroke-opacity',\n stroke: 'stroke',\n x: 'x',\n y: 'y',\n r: 'r',\n rx: 'rx',\n ry: 'ry',\n width: 'width',\n height: 'height',\n x1: 'x1',\n x2: 'x2',\n y1: 'y1',\n y2: 'y2',\n lineCap: 'stroke-linecap',\n lineJoin: 'stroke-linejoin',\n lineWidth: 'stroke-width',\n lineDash: 'stroke-dasharray',\n lineDashOffset: 'stroke-dashoffset',\n miterLimit: 'stroke-miterlimit',\n font: 'font',\n fontSize: 'font-size',\n fontStyle: 'font-style',\n fontVariant: 'font-variant',\n fontWeight: 'font-weight',\n fontFamily: 'font-family',\n startArrow: 'marker-start',\n endArrow: 'marker-end',\n path: 'd',\n class: 'class',\n id: 'id',\n style: 'style',\n preserveAspectRatio: 'preserveAspectRatio',\n};\nexport var EVENTS = [\n 'click',\n 'mousedown',\n 'mouseup',\n 'dblclick',\n 'contextmenu',\n 'mouseenter',\n 'mouseleave',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'wheel',\n];\n//# sourceMappingURL=constant.js.map","import { toArray } from '@antv/util';\nimport { SHAPE_TO_TAGS } from '../constant';\n/**\n * 创建并返回图形的 svg 元素\n * @param type svg类型\n */\nexport function createSVGElement(type) {\n return document.createElementNS('http://www.w3.org/2000/svg', type);\n}\n/**\n * 创建并返回图形的 dom 元素\n * @param {IShape} shape 图形\n * @return {SVGElement}\n */\nexport function createDom(shape) {\n var type = SHAPE_TO_TAGS[shape.type];\n var parent = shape.getParent();\n if (!type) {\n throw new Error(\"the type \" + shape.type + \" is not supported by svg\");\n }\n var element = createSVGElement(type);\n if (shape.get('id')) {\n element.id = shape.get('id');\n }\n shape.set('el', element);\n shape.set('attrs', {});\n // 对于 defs 下的 dom 节点,parent 为空,通过 context 统一挂载到 defs 节点下\n if (parent) {\n var parentNode = parent.get('el');\n if (parentNode) {\n parentNode.appendChild(element);\n }\n else {\n // parentNode maybe null for group\n parentNode = parent.createDom();\n parent.set('el', parentNode);\n parentNode.appendChild(element);\n }\n }\n return element;\n}\n/**\n * 对 dom 元素进行排序\n * @param {IElement} element 元素\n * @param {sorter} function 排序函数\n */\nexport function sortDom(element, sorter) {\n var el = element.get('el');\n var childList = toArray(el.children).sort(sorter);\n // create empty fragment\n var fragment = document.createDocumentFragment();\n childList.forEach(function (child) {\n fragment.appendChild(child);\n });\n el.appendChild(fragment);\n}\n/**\n * 将 dom 元素移动到父元素下的指定位置\n * @param {SVGElement} element dom 元素\n * @param {number} targetIndex 目标位置(从 0 开始)\n */\nexport function moveTo(element, targetIndex) {\n var parentNode = element.parentNode;\n var siblings = Array.from(parentNode.childNodes).filter(\n // 要求为元素节点,且不能为 defs 节点\n function (node) { return node.nodeType === 1 && node.nodeName.toLowerCase() !== 'defs'; });\n // 获取目标节点\n var target = siblings[targetIndex];\n var currentIndex = siblings.indexOf(element);\n // 如果目标节点存在\n if (target) {\n // 当前索引 > 目标索引,直接插入到目标节点之前即可\n if (currentIndex > targetIndex) {\n parentNode.insertBefore(element, target);\n }\n else if (currentIndex < targetIndex) {\n // 当前索引 < 目标索引\n // 获取目标节点的下一个节点\n var targetNext = siblings[targetIndex + 1];\n // 如果目标节点的下一个节点存在,插入到该节点之前\n if (targetNext) {\n parentNode.insertBefore(element, targetNext);\n }\n else {\n // 如果该节点不存在,则追加到末尾\n parentNode.appendChild(element);\n }\n }\n }\n else {\n parentNode.appendChild(element);\n }\n}\n//# sourceMappingURL=dom.js.map","import { createDom } from './dom';\nexport function setShadow(model, context) {\n var el = model.cfg.el;\n var attrs = model.attr();\n var cfg = {\n dx: attrs.shadowOffsetX,\n dy: attrs.shadowOffsetY,\n blur: attrs.shadowBlur,\n color: attrs.shadowColor,\n };\n if (!cfg.dx && !cfg.dy && !cfg.blur && !cfg.color) {\n el.removeAttribute('filter');\n }\n else {\n var id = context.find('filter', cfg);\n if (!id) {\n id = context.addShadow(cfg);\n }\n el.setAttribute('filter', \"url(#\" + id + \")\");\n }\n}\nexport function setTransform(model) {\n var matrix = model.attr().matrix;\n if (matrix) {\n var el = model.cfg.el;\n var transform = [];\n for (var i = 0; i < 9; i += 3) {\n transform.push(matrix[i] + \",\" + matrix[i + 1]);\n }\n transform = transform.join(',');\n if (transform.indexOf('NaN') === -1) {\n el.setAttribute('transform', \"matrix(\" + transform + \")\");\n }\n else {\n console.warn('invalid matrix:', matrix);\n }\n }\n}\nexport function setClip(model, context) {\n var clip = model.getClip();\n var el = model.get('el');\n if (!clip) {\n el.removeAttribute('clip-path');\n }\n else if (clip && !el.hasAttribute('clip-path')) {\n createDom(clip);\n clip.createPath(context);\n var id = context.addClip(clip);\n el.setAttribute('clip-path', \"url(#\" + id + \")\");\n }\n}\n//# sourceMappingURL=svg.js.map","import { setTransform, setClip } from './svg';\nimport { sortDom, moveTo } from './dom';\nexport function drawChildren(context, children) {\n children.forEach(function (child) {\n child.draw(context);\n });\n}\n/**\n * 更新元素,包括 group 和 shape\n * @param {IElement} element SVG 元素\n * @param {ChangeType} changeType 更新类型\n */\nexport function refreshElement(element, changeType) {\n // 对于还没有挂载到画布下的元素,canvas 可能为空\n var canvas = element.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n var parent_1 = element.getParent();\n var parentChildren = parent_1 ? parent_1.getChildren() : [canvas];\n var el = element.get('el');\n if (changeType === 'remove') {\n var isClipShape = element.get('isClipShape');\n // 对于 clip,不仅需要将 clipShape 对于的 SVG 元素删除,还需要将上层的 clipPath 元素也删除\n if (isClipShape) {\n var clipPathEl = el && el.parentNode;\n var defsEl = clipPathEl && clipPathEl.parentNode;\n if (clipPathEl && defsEl) {\n defsEl.removeChild(clipPathEl);\n }\n }\n else if (el && el.parentNode) {\n el.parentNode.removeChild(el);\n }\n }\n else if (changeType === 'show') {\n el.setAttribute('visibility', 'visible');\n }\n else if (changeType === 'hide') {\n el.setAttribute('visibility', 'hidden');\n }\n else if (changeType === 'zIndex') {\n moveTo(el, parentChildren.indexOf(element));\n }\n else if (changeType === 'sort') {\n var children_1 = element.get('children');\n if (children_1 && children_1.length) {\n sortDom(element, function (a, b) {\n return children_1.indexOf(a) - children_1.indexOf(b) ? 1 : 0;\n });\n }\n }\n else if (changeType === 'clear') {\n // el maybe null for group\n if (el) {\n el.innerHTML = '';\n }\n }\n else if (changeType === 'matrix') {\n setTransform(element);\n }\n else if (changeType === 'clip') {\n setClip(element, context);\n }\n else if (changeType === 'attr') {\n // 已在 afterAttrsChange 进行了处理,此处 do nothing\n }\n else if (changeType === 'add') {\n element.draw(context);\n }\n }\n}\n//# sourceMappingURL=draw.js.map","import { __extends } from \"tslib\";\nimport { AbstractGroup } from '@antv/g-base';\nimport { each } from '@antv/util';\nimport * as Shape from './shape';\nimport { drawChildren, refreshElement } from './util/draw';\nimport { setClip, setTransform } from './util/svg';\nimport { SVG_ATTR_MAP } from './constant';\nimport { createSVGElement } from './util/dom';\nvar Group = /** @class */ (function (_super) {\n __extends(Group, _super);\n function Group() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // SVG 中分组对应实体标签 \n Group.prototype.isEntityGroup = function () {\n return true;\n };\n Group.prototype.createDom = function () {\n var element = createSVGElement('g');\n this.set('el', element);\n var parent = this.getParent();\n if (parent) {\n var parentNode = parent.get('el');\n if (parentNode) {\n parentNode.appendChild(element);\n }\n else {\n // parentNode maybe null for group\n parentNode = parent.createDom();\n parent.set('el', parentNode);\n parentNode.appendChild(element);\n }\n }\n return element;\n };\n // 覆盖基类的 afterAttrsChange 方法\n Group.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n var canvas = this.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n this.createPath(context, targetAttrs);\n }\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Group.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n Group.prototype.getShapeBase = function () {\n return Shape;\n };\n Group.prototype.getGroupBase = function () {\n return Group;\n };\n Group.prototype.draw = function (context) {\n var children = this.getChildren();\n var el = this.get('el');\n if (this.get('destroyed')) {\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n else {\n if (!el) {\n this.createDom();\n }\n setClip(this, context);\n this.createPath(context);\n if (children.length) {\n drawChildren(context, children);\n }\n }\n };\n /**\n * 绘制分组的路径\n * @param {Defs} context 上下文\n * @param {ShapeAttrs} targetAttrs 渲染的目标属性\n */\n Group.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n setTransform(this);\n };\n return Group;\n}(AbstractGroup));\nexport default Group;\n//# sourceMappingURL=group.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractShape } from '@antv/g-base';\nimport { setShadow, setTransform, setClip } from '../util/svg';\nimport { createDom } from '../util/dom';\nimport { refreshElement } from '../util/draw';\nimport { SVG_ATTR_MAP } from '../constant';\nimport * as Shape from './index';\nimport Group from '../group';\nimport { getBBoxMethod } from '@antv/g-base';\nvar ShapeBase = /** @class */ (function (_super) {\n __extends(ShapeBase, _super);\n function ShapeBase() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'svg';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n ShapeBase.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n // 设置默认值\n return __assign(__assign({}, attrs), { lineWidth: 1, lineAppendWidth: 0, strokeOpacity: 1, fillOpacity: 1 });\n };\n // 覆盖基类的 afterAttrsChange 方法\n ShapeBase.prototype.afterAttrsChange = function (targetAttrs) {\n _super.prototype.afterAttrsChange.call(this, targetAttrs);\n var canvas = this.get('canvas');\n // 只有挂载到画布下,才对元素进行实际渲染\n if (canvas && canvas.get('autoDraw')) {\n var context = canvas.get('context');\n this.draw(context, targetAttrs);\n }\n };\n ShapeBase.prototype.getShapeBase = function () {\n return Shape;\n };\n ShapeBase.prototype.getGroupBase = function () {\n return Group;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n ShapeBase.prototype.onCanvasChange = function (changeType) {\n refreshElement(this, changeType);\n };\n ShapeBase.prototype.calculateBBox = function () {\n var el = this.get('el');\n var bbox = null;\n // 包围盒计算依赖于绘制,如果还没有生成对应的 Dom 元素,则包围盒的长宽均为 0\n if (el) {\n bbox = el.getBBox();\n }\n else {\n var bboxMethod = getBBoxMethod(this.get('type'));\n if (bboxMethod) {\n bbox = bboxMethod(this);\n }\n }\n if (bbox) {\n var x = bbox.x, y = bbox.y, width = bbox.width, height = bbox.height;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2;\n var minX = x - halfWidth;\n var minY = y - halfWidth;\n var maxX = x + width + halfWidth;\n var maxY = y + height + halfWidth;\n return {\n x: minX,\n y: minY,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n width: width + lineWidth,\n height: height + lineWidth,\n };\n }\n return {\n x: 0,\n y: 0,\n minX: 0,\n minY: 0,\n maxX: 0,\n maxY: 0,\n width: 0,\n height: 0,\n };\n };\n ShapeBase.prototype.isFill = function () {\n var _a = this.attr(), fill = _a.fill, fillStyle = _a.fillStyle;\n return (fill || fillStyle || this.isClipShape()) && this.canFill;\n };\n ShapeBase.prototype.isStroke = function () {\n var _a = this.attr(), stroke = _a.stroke, strokeStyle = _a.strokeStyle;\n return (stroke || strokeStyle) && this.canStroke;\n };\n ShapeBase.prototype.draw = function (context, targetAttrs) {\n var el = this.get('el');\n if (this.get('destroyed')) {\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n else {\n if (!el) {\n createDom(this);\n }\n setClip(this, context);\n this.createPath(context, targetAttrs);\n this.shadow(context, targetAttrs);\n this.strokeAndFill(context, targetAttrs);\n this.transform(targetAttrs);\n }\n };\n /**\n * @protected\n * 绘制图形的路径\n * @param {Defs} context 上下文\n * @param {ShapeAttrs} targetAttrs 渲染的目标属性\n */\n ShapeBase.prototype.createPath = function (context, targetAttrs) { };\n // stroke and fill\n ShapeBase.prototype.strokeAndFill = function (context, targetAttrs) {\n var attrs = targetAttrs || this.attr();\n var fill = attrs.fill, fillStyle = attrs.fillStyle, stroke = attrs.stroke, strokeStyle = attrs.strokeStyle, fillOpacity = attrs.fillOpacity, strokeOpacity = attrs.strokeOpacity, lineWidth = attrs.lineWidth;\n var el = this.get('el');\n if (this.canFill) {\n // 初次渲染和更新渲染的逻辑有所不同: 初次渲染值为空时,需要设置为 none,否则就会是黑色,而更新渲染则不需要\n if (!targetAttrs) {\n this._setColor(context, 'fill', fill || fillStyle);\n }\n else if ('fill' in attrs) {\n this._setColor(context, 'fill', fill);\n }\n else if ('fillStyle' in attrs) {\n // compatible with fillStyle\n this._setColor(context, 'fill', fillStyle);\n }\n if (fillOpacity) {\n el.setAttribute(SVG_ATTR_MAP['fillOpacity'], fillOpacity);\n }\n }\n if (this.canStroke && lineWidth > 0) {\n if (!targetAttrs) {\n this._setColor(context, 'stroke', stroke || strokeStyle);\n }\n else if ('stroke' in attrs) {\n this._setColor(context, 'stroke', stroke);\n }\n else if ('strokeStyle' in attrs) {\n // compatible with strokeStyle\n this._setColor(context, 'stroke', strokeStyle);\n }\n if (strokeOpacity) {\n el.setAttribute(SVG_ATTR_MAP['strokeOpacity'], strokeOpacity);\n }\n if (lineWidth) {\n el.setAttribute(SVG_ATTR_MAP['lineWidth'], lineWidth);\n }\n }\n };\n ShapeBase.prototype._setColor = function (context, attr, value) {\n var el = this.get('el');\n if (!value) {\n // need to set `none` to avoid default value\n el.setAttribute(SVG_ATTR_MAP[attr], 'none');\n return;\n }\n value = value.trim();\n if (/^[r,R,L,l]{1}[\\s]*\\(/.test(value)) {\n var id = context.find('gradient', value);\n if (!id) {\n id = context.addGradient(value);\n }\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else if (/^[p,P]{1}[\\s]*\\(/.test(value)) {\n var id = context.find('pattern', value);\n if (!id) {\n id = context.addPattern(value);\n }\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n };\n ShapeBase.prototype.shadow = function (context, targetAttrs) {\n var attrs = this.attr();\n var _a = targetAttrs || attrs, shadowOffsetX = _a.shadowOffsetX, shadowOffsetY = _a.shadowOffsetY, shadowBlur = _a.shadowBlur, shadowColor = _a.shadowColor;\n if (shadowOffsetX || shadowOffsetY || shadowBlur || shadowColor) {\n setShadow(this, context);\n }\n };\n ShapeBase.prototype.transform = function (targetAttrs) {\n var attrs = this.attr();\n var matrix = (targetAttrs || attrs).matrix;\n if (matrix) {\n setTransform(this);\n }\n };\n ShapeBase.prototype.isInShape = function (refX, refY) {\n return this.isPointInPath(refX, refY);\n };\n ShapeBase.prototype.isPointInPath = function (refX, refY) {\n var el = this.get('el');\n var canvas = this.get('canvas');\n var bbox = canvas.get('el').getBoundingClientRect();\n var clientX = refX + bbox.left;\n var clientY = refY + bbox.top;\n var element = document.elementFromPoint(clientX, clientY);\n if (element && element.isEqualNode(el)) {\n return true;\n }\n return false;\n };\n /**\n * 获取线拾取的宽度\n * @returns {number} 线的拾取宽度\n */\n ShapeBase.prototype.getHitLineWidth = function () {\n var _a = this.attrs, lineWidth = _a.lineWidth, lineAppendWidth = _a.lineAppendWidth;\n if (this.isStroke()) {\n return lineWidth + lineAppendWidth;\n }\n return 0;\n };\n return ShapeBase;\n}(AbstractShape));\nexport default ShapeBase;\n//# sourceMappingURL=base.js.map","/**\n * @fileoverview circle\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'circle';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Circle.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, r: 0 });\n };\n Circle.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n // 圆和椭圆的点坐标属性不是 x, y,而是 cx, cy\n if (attr === 'x' || attr === 'y') {\n el.setAttribute(\"c\" + attr, value);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Circle;\n}(ShapeBase));\nexport default Circle;\n//# sourceMappingURL=circle.js.map","/**\n * @fileoverview dom\n * @author dengfuping_develop@163.com\n */\nimport { __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Dom = /** @class */ (function (_super) {\n __extends(Dom, _super);\n function Dom() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'dom';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n Dom.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n if (typeof attrs['html'] === 'function') {\n var element = attrs['html'].call(this, attrs);\n if (element instanceof Element || element instanceof HTMLDocument) {\n var children = el.childNodes;\n for (var i = children.length - 1; i >= 0; i--) {\n el.removeChild(children[i]);\n }\n el.appendChild(element); // append to el if it's an element\n }\n else {\n el.innerHTML = element; // set innerHTML\n }\n }\n else {\n el.innerHTML = attrs['html']; // set innerHTML\n }\n };\n return Dom;\n}(ShapeBase));\nexport default Dom;\n//# sourceMappingURL=dom.js.map","/**\n * @fileoverview ellipse\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Ellipse = /** @class */ (function (_super) {\n __extends(Ellipse, _super);\n function Ellipse() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'ellipse';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Ellipse.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, rx: 0, ry: 0 });\n };\n Ellipse.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n // 圆和椭圆的点坐标属性不是 x, y,而是 cx, cy\n if (attr === 'x' || attr === 'y') {\n el.setAttribute(\"c\" + attr, value);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Ellipse;\n}(ShapeBase));\nexport default Ellipse;\n//# sourceMappingURL=ellipse.js.map","/**\n * @fileoverview image\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each, isString } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Image = /** @class */ (function (_super) {\n __extends(Image, _super);\n function Image() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'image';\n _this.canFill = false;\n _this.canStroke = false;\n return _this;\n }\n Image.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0 });\n };\n Image.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'img') {\n _this._setImage(attrs.img);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Image.prototype.setAttr = function (name, value) {\n this.attrs[name] = value;\n if (name === 'img') {\n this._setImage(value);\n }\n };\n Image.prototype._setImage = function (img) {\n var attrs = this.attr();\n var el = this.get('el');\n if (isString(img)) {\n el.setAttribute('href', img);\n }\n else if (img instanceof window.Image) {\n if (!attrs.width) {\n el.setAttribute('width', img.width);\n this.attr('width', img.width);\n }\n if (!attrs.height) {\n el.setAttribute('height', img.height);\n this.attr('height', img.height);\n }\n el.setAttribute('href', img.src);\n }\n else if (img instanceof HTMLElement && isString(img.nodeName) && img.nodeName.toUpperCase() === 'CANVAS') {\n // @ts-ignore\n el.setAttribute('href', img.toDataURL());\n }\n else if (img instanceof ImageData) {\n var canvas = document.createElement('canvas');\n canvas.setAttribute('width', \"\" + img.width);\n canvas.setAttribute('height', \"\" + img.height);\n canvas.getContext('2d').putImageData(img, 0, 0);\n if (!attrs.width) {\n el.setAttribute('width', \"\" + img.width);\n this.attr('width', img.width);\n }\n if (!attrs.height) {\n el.setAttribute('height', \"\" + img.height);\n this.attr('height', img.height);\n }\n el.setAttribute('href', canvas.toDataURL());\n }\n };\n return Image;\n}(ShapeBase));\nexport default Image;\n//# sourceMappingURL=image.js.map","import { __assign, __extends } from \"tslib\";\n/**\n * @fileoverview line\n * @author dengfuping_develop@163.com\n */\nimport { Line as LineUtil } from '@antv/g-math';\nimport { each, isObject } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Line = /** @class */ (function (_super) {\n __extends(Line, _super);\n function Line() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'line';\n _this.canFill = false;\n _this.canStroke = true;\n return _this;\n }\n Line.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x1: 0, y1: 0, x2: 0, y2: 0, startArrow: false, endArrow: false });\n };\n Line.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'startArrow' || attr === 'endArrow') {\n if (value) {\n var id = isObject(value)\n ? context.addArrow(attrs, SVG_ATTR_MAP[attr])\n : context.getDefaultArrow(attrs, SVG_ATTR_MAP[attr]);\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.removeAttribute(SVG_ATTR_MAP[attr]);\n }\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n /**\n * Use math calculation to get length of line\n * @return {number} length\n */\n Line.prototype.getTotalLength = function () {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.length(x1, y1, x2, y2);\n };\n /**\n * Use math calculation to get point according to ratio as same sa Canvas version\n * @param {number} ratio\n * @return {Point} point\n */\n Line.prototype.getPoint = function (ratio) {\n var _a = this.attr(), x1 = _a.x1, y1 = _a.y1, x2 = _a.x2, y2 = _a.y2;\n return LineUtil.pointAt(x1, y1, x2, y2, ratio);\n };\n return Line;\n}(ShapeBase));\nexport default Line;\n//# sourceMappingURL=line.js.map","var Symbols = {\n // 圆\n circle: function (x, y, r) {\n return [\n ['M', x, y],\n ['m', -r, 0],\n ['a', r, r, 0, 1, 0, r * 2, 0],\n ['a', r, r, 0, 1, 0, -r * 2, 0],\n ];\n },\n // 正方形\n square: function (x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function (x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];\n },\n // 倒三角形\n triangleDown: function (x, y, r) {\n var diffY = r * Math.sin((1 / 3) * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n },\n};\nexport default {\n get: function (type) {\n return Symbols[type];\n },\n register: function (type, func) {\n Symbols[type] = func;\n },\n remove: function (type) {\n delete Symbols[type];\n },\n getAll: function () {\n return Symbols;\n },\n};\n//# sourceMappingURL=symbols.js.map","/**\n * @fileoverview marker\n * @author dengfuping_develop@163.com\n */\nimport { __extends } from \"tslib\";\nimport { isArray, isFunction } from '@antv/util';\nimport ShapeBase from '../base';\nimport symbolsFactory from './symbols';\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'marker';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Marker.prototype.createPath = function (context) {\n var el = this.get('el');\n el.setAttribute('d', this._assembleMarker());\n };\n Marker.prototype._assembleMarker = function () {\n var d = this._getPath();\n if (isArray(d)) {\n return d\n .map(function (path) {\n return path.join(' ');\n })\n .join('');\n }\n return d;\n };\n Marker.prototype._getPath = function () {\n var attrs = this.attr();\n var x = attrs.x, y = attrs.y;\n // 兼容 r 和 radius 两种写法,推荐使用 r\n var r = attrs.r || attrs.radius;\n var symbol = attrs.symbol || 'circle';\n var method;\n if (isFunction(symbol)) {\n method = symbol;\n }\n else {\n method = symbolsFactory.get(symbol);\n }\n if (!method) {\n console.warn(method + \" symbol is not exist.\");\n return null;\n }\n return method(x, y, r);\n };\n // 作为其静态属性\n Marker.symbolsFactory = symbolsFactory;\n return Marker;\n}(ShapeBase));\nexport default Marker;\n//# sourceMappingURL=index.js.map","import { __assign, __extends } from \"tslib\";\nimport { each, isArray, isObject } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Path = /** @class */ (function (_super) {\n __extends(Path, _super);\n function Path() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'path';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Path.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n Path.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'path' && isArray(value)) {\n el.setAttribute('d', _this._formatPath(value));\n }\n else if (attr === 'startArrow' || attr === 'endArrow') {\n if (value) {\n var id = isObject(value)\n ? context.addArrow(attrs, SVG_ATTR_MAP[attr])\n : context.getDefaultArrow(attrs, SVG_ATTR_MAP[attr]);\n el.setAttribute(SVG_ATTR_MAP[attr], \"url(#\" + id + \")\");\n }\n else {\n el.removeAttribute(SVG_ATTR_MAP[attr]);\n }\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Path.prototype._formatPath = function (value) {\n var newValue = value\n .map(function (path) {\n return path.join(' ');\n })\n .join('');\n if (~newValue.indexOf('NaN')) {\n return '';\n }\n return newValue;\n };\n /**\n * Get total length of path\n * 尽管通过浏览器的 SVGPathElement.getTotalLength() 接口获取的 path 长度,\n * 与 Canvas 版本通过数学计算的方式得到的长度有一些细微差异,但最大误差在个位数像素,精度上可以能接受\n * @return {number} length\n */\n Path.prototype.getTotalLength = function () {\n var el = this.get('el');\n return el ? el.getTotalLength() : null;\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Path.prototype.getPoint = function (ratio) {\n var el = this.get('el');\n var totalLength = this.getTotalLength();\n // @see https://github.com/antvis/g/issues/634\n if (totalLength === 0) {\n return null;\n }\n var point = el ? el.getPointAtLength(ratio * totalLength) : null;\n return point\n ? {\n x: point.x,\n y: point.y,\n }\n : null;\n };\n return Path;\n}(ShapeBase));\nexport default Path;\n//# sourceMappingURL=path.js.map","import { __extends } from \"tslib\";\n/**\n * @fileoverview polygon\n * @author dengfuping_develop@163.com\n */\nimport { each, isArray } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'polygon';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Polygon.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'points' && isArray(value) && value.length >= 2) {\n el.setAttribute('points', value.map(function (point) { return point[0] + \",\" + point[1]; }).join(' '));\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n return Polygon;\n}(ShapeBase));\nexport default Polygon;\n//# sourceMappingURL=polygon.js.map","import { __assign, __extends } from \"tslib\";\nimport { Polyline as PolylineUtil } from '@antv/g-math';\nimport { Line as LineUtil } from '@antv/g-math';\nimport { each, isArray, isNil } from '@antv/util';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar Polyline = /** @class */ (function (_super) {\n __extends(Polyline, _super);\n function Polyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'polyline';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Polyline.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { startArrow: false, endArrow: false });\n };\n // 更新属性时,检测是否更改了 points\n Polyline.prototype.onAttrChange = function (name, value, originValue) {\n _super.prototype.onAttrChange.call(this, name, value, originValue);\n if (['points'].indexOf(name) !== -1) {\n this._resetCache();\n }\n };\n Polyline.prototype._resetCache = function () {\n this.set('totalLength', null);\n this.set('tCache', null);\n };\n Polyline.prototype.createPath = function (context, targetAttrs) {\n var attrs = this.attr();\n var el = this.get('el');\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'points' && isArray(value) && value.length >= 2) {\n el.setAttribute('points', value.map(function (point) { return point[0] + \",\" + point[1]; }).join(' '));\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n /**\n * Get length of polyline\n * @return {number} length\n */\n Polyline.prototype.getTotalLength = function () {\n var points = this.attr().points;\n // get totalLength from cache\n var totalLength = this.get('totalLength');\n if (!isNil(totalLength)) {\n return totalLength;\n }\n this.set('totalLength', PolylineUtil.length(points));\n return this.get('totalLength');\n };\n /**\n * Get point according to ratio\n * @param {number} ratio\n * @return {Point} point\n */\n Polyline.prototype.getPoint = function (ratio) {\n var points = this.attr().points;\n // get tCache from cache\n var tCache = this.get('tCache');\n if (!tCache) {\n this._setTcache();\n tCache = this.get('tCache');\n }\n var subt;\n var index;\n each(tCache, function (v, i) {\n if (ratio >= v[0] && ratio <= v[1]) {\n subt = (ratio - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n return LineUtil.pointAt(points[index][0], points[index][1], points[index + 1][0], points[index + 1][1], subt);\n };\n Polyline.prototype._setTcache = function () {\n var points = this.attr().points;\n if (!points || points.length === 0) {\n return;\n }\n var totalLength = this.getTotalLength();\n if (totalLength <= 0) {\n return;\n }\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n each(points, function (p, i) {\n if (points[i + 1]) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = LineUtil.length(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.set('tCache', tCache);\n };\n /**\n * Get start tangent vector\n * @return {Array}\n */\n Polyline.prototype.getStartTangent = function () {\n var points = this.attr().points;\n var result = [];\n result.push([points[1][0], points[1][1]]);\n result.push([points[0][0], points[0][1]]);\n return result;\n };\n /**\n * Get end tangent vector\n * @return {Array}\n */\n Polyline.prototype.getEndTangent = function () {\n var points = this.attr().points;\n var l = points.length - 1;\n var result = [];\n result.push([points[l - 1][0], points[l - 1][1]]);\n result.push([points[l][0], points[l][1]]);\n return result;\n };\n return Polyline;\n}(ShapeBase));\nexport default Polyline;\n//# sourceMappingURL=polyline.js.map","import { each, isArray, isString } from '@antv/util';\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi;\nvar regexDot = /[^\\s,]+/gi;\nexport function parseRadius(radius) {\n var r1 = 0;\n var r2 = 0;\n var r3 = 0;\n var r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4,\n };\n}\nexport function parsePath(path) {\n path = path || [];\n if (isArray(path)) {\n return path;\n }\n if (isString(path)) {\n path = path.match(regexTags);\n each(path, function (item, index) {\n item = item.match(regexDot);\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n item.splice(1, 0, item[0].substr(1));\n item[0] = tag;\n }\n each(item, function (sub, i) {\n if (!isNaN(sub)) {\n item[i] = +sub;\n }\n });\n path[index] = item;\n });\n return path;\n }\n}\n//# sourceMappingURL=format.js.map","/**\n * @fileoverview rect\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each, isArray } from '@antv/util';\nimport ShapeBase from './base';\nimport { SVG_ATTR_MAP } from '../constant';\nimport { parseRadius } from '../util/format';\nvar Rect = /** @class */ (function (_super) {\n __extends(Rect, _super);\n function Rect() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'rect';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Rect.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, width: 0, height: 0, radius: 0 });\n };\n Rect.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n // 加上状态量,用来标记 path 是否已组装\n var completed = false;\n // 和组装 path 相关的绘图属性\n var pathRelatedAttrs = ['x', 'y', 'width', 'height', 'radius'];\n each(targetAttrs || attrs, function (value, attr) {\n if (pathRelatedAttrs.indexOf(attr) !== -1 && !completed) {\n el.setAttribute('d', _this._assembleRect(attrs));\n completed = true;\n }\n else if (pathRelatedAttrs.indexOf(attr) === -1 && SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n };\n Rect.prototype._assembleRect = function (attrs) {\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n var radius = attrs.radius;\n if (!radius) {\n return \"M \" + x + \",\" + y + \" l \" + w + \",0 l 0,\" + h + \" l\" + -w + \" 0 z\";\n }\n var r = parseRadius(radius);\n if (isArray(radius)) {\n if (radius.length === 1) {\n r.r1 = r.r2 = r.r3 = r.r4 = radius[0];\n }\n else if (radius.length === 2) {\n r.r1 = r.r3 = radius[0];\n r.r2 = r.r4 = radius[1];\n }\n else if (radius.length === 3) {\n r.r1 = radius[0];\n r.r2 = r.r4 = radius[1];\n r.r3 = radius[2];\n }\n else {\n r.r1 = radius[0];\n r.r2 = radius[1];\n r.r3 = radius[2];\n r.r4 = radius[3];\n }\n }\n else {\n r.r1 = r.r2 = r.r3 = r.r4 = radius;\n }\n var d = [\n [\"M \" + (x + r.r1) + \",\" + y],\n [\"l \" + (w - r.r1 - r.r2) + \",0\"],\n [\"a \" + r.r2 + \",\" + r.r2 + \",0,0,1,\" + r.r2 + \",\" + r.r2],\n [\"l 0,\" + (h - r.r2 - r.r3)],\n [\"a \" + r.r3 + \",\" + r.r3 + \",0,0,1,\" + -r.r3 + \",\" + r.r3],\n [\"l \" + (r.r3 + r.r4 - w) + \",0\"],\n [\"a \" + r.r4 + \",\" + r.r4 + \",0,0,1,\" + -r.r4 + \",\" + -r.r4],\n [\"l 0,\" + (r.r4 + r.r1 - h)],\n [\"a \" + r.r1 + \",\" + r.r1 + \",0,0,1,\" + r.r1 + \",\" + -r.r1],\n ['z'],\n ];\n return d.join(' ');\n };\n return Rect;\n}(ShapeBase));\nexport default Rect;\n//# sourceMappingURL=rect.js.map","/**\n * @fileoverview text\n * @author dengfuping_develop@163.com\n */\nimport { __assign, __extends } from \"tslib\";\nimport { each } from '@antv/util';\nimport { detect } from 'detect-browser';\nimport { setTransform } from '../util/svg';\nimport { SVG_ATTR_MAP } from '../constant';\nimport ShapeBase from './base';\nvar LETTER_SPACING = 0.3;\nvar BASELINE_MAP = {\n top: 'before-edge',\n middle: 'central',\n bottom: 'after-edge',\n alphabetic: 'baseline',\n hanging: 'hanging',\n};\n// for FireFox\nvar BASELINE_MAP_FOR_FIREFOX = {\n top: 'text-before-edge',\n middle: 'central',\n bottom: 'text-after-edge',\n alphabetic: 'alphabetic',\n hanging: 'hanging',\n};\nvar ANCHOR_MAP = {\n left: 'left',\n start: 'left',\n center: 'middle',\n right: 'end',\n end: 'end',\n};\nvar Text = /** @class */ (function (_super) {\n __extends(Text, _super);\n function Text() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'text';\n _this.canFill = true;\n _this.canStroke = true;\n return _this;\n }\n Text.prototype.getDefaultAttrs = function () {\n var attrs = _super.prototype.getDefaultAttrs.call(this);\n return __assign(__assign({}, attrs), { x: 0, y: 0, text: null, fontSize: 12, fontFamily: 'sans-serif', fontStyle: 'normal', fontWeight: 'normal', fontVariant: 'normal', textAlign: 'start', textBaseline: 'bottom' });\n };\n Text.prototype.createPath = function (context, targetAttrs) {\n var _this = this;\n var attrs = this.attr();\n var el = this.get('el');\n this._setFont();\n each(targetAttrs || attrs, function (value, attr) {\n if (attr === 'text') {\n _this._setText(\"\" + value);\n }\n else if (attr === 'matrix' && value) {\n setTransform(_this);\n }\n else if (SVG_ATTR_MAP[attr]) {\n el.setAttribute(SVG_ATTR_MAP[attr], value);\n }\n });\n el.setAttribute('paint-order', 'stroke');\n el.setAttribute('style', 'stroke-linecap:butt; stroke-linejoin:miter;');\n };\n Text.prototype._setFont = function () {\n var el = this.get('el');\n var _a = this.attr(), textBaseline = _a.textBaseline, textAlign = _a.textAlign;\n var browser = detect();\n if (browser && browser.name === 'firefox') {\n // compatible with FireFox browser, ref: https://github.com/antvis/g/issues/119\n el.setAttribute('dominant-baseline', BASELINE_MAP_FOR_FIREFOX[textBaseline] || 'alphabetic');\n }\n else {\n el.setAttribute('alignment-baseline', BASELINE_MAP[textBaseline] || 'baseline');\n }\n el.setAttribute('text-anchor', ANCHOR_MAP[textAlign] || 'left');\n };\n Text.prototype._setText = function (text) {\n var el = this.get('el');\n var _a = this.attr(), x = _a.x, _b = _a.textBaseline, baseline = _b === void 0 ? 'bottom' : _b;\n if (!text) {\n el.innerHTML = '';\n }\n else if (~text.indexOf('\\n')) {\n var textArr = text.split('\\n');\n var textLen_1 = textArr.length - 1;\n var arr_1 = '';\n each(textArr, function (segment, i) {\n if (i === 0) {\n if (baseline === 'alphabetic') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'top') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'middle') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'bottom') {\n arr_1 += \"\" + segment + \"\";\n }\n else if (baseline === 'hanging') {\n arr_1 += \"\" + segment + \"\";\n }\n }\n else {\n arr_1 += \"\" + segment + \"\";\n }\n });\n el.innerHTML = arr_1;\n }\n else {\n el.innerHTML = text;\n }\n };\n return Text;\n}(ShapeBase));\nexport default Text;\n//# sourceMappingURL=text.js.map","/**\n * @fileoverview gradient\n * @author dengfuping_develop@163.com\n */\nimport { each, mod, toRadian, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^)]+\\))/gi;\nfunction addStop(steps) {\n var arr = steps.match(regexColorStop);\n if (!arr) {\n return '';\n }\n var stops = '';\n arr.sort(function (a, b) {\n a = a.split(':');\n b = b.split(':');\n return Number(a[0]) - Number(b[0]);\n });\n each(arr, function (item) {\n item = item.split(':');\n stops += \"\";\n });\n return stops;\n}\nfunction parseLineGradient(color, el) {\n var arr = regexLG.exec(color);\n var angle = mod(toRadian(parseFloat(arr[1])), Math.PI * 2);\n var steps = arr[2];\n var start;\n var end;\n if (angle >= 0 && angle < 0.5 * Math.PI) {\n start = {\n x: 0,\n y: 0,\n };\n end = {\n x: 1,\n y: 1,\n };\n }\n else if (0.5 * Math.PI <= angle && angle < Math.PI) {\n start = {\n x: 1,\n y: 0,\n };\n end = {\n x: 0,\n y: 1,\n };\n }\n else if (Math.PI <= angle && angle < 1.5 * Math.PI) {\n start = {\n x: 1,\n y: 1,\n };\n end = {\n x: 0,\n y: 0,\n };\n }\n else {\n start = {\n x: 0,\n y: 1,\n };\n end = {\n x: 1,\n y: 0,\n };\n }\n var tanTheta = Math.tan(angle);\n var tanTheta2 = tanTheta * tanTheta;\n var x = (end.x - start.x + tanTheta * (end.y - start.y)) / (tanTheta2 + 1) + start.x;\n var y = (tanTheta * (end.x - start.x + tanTheta * (end.y - start.y))) / (tanTheta2 + 1) + start.y;\n el.setAttribute('x1', start.x);\n el.setAttribute('y1', start.y);\n el.setAttribute('x2', x);\n el.setAttribute('y2', y);\n el.innerHTML = addStop(steps);\n}\nfunction parseRadialGradient(color, self) {\n var arr = regexRG.exec(color);\n var cx = parseFloat(arr[1]);\n var cy = parseFloat(arr[2]);\n var r = parseFloat(arr[3]);\n var steps = arr[4];\n self.setAttribute('cx', cx);\n self.setAttribute('cy', cy);\n self.setAttribute('r', r);\n self.innerHTML = addStop(steps);\n}\nvar Gradient = /** @class */ (function () {\n function Gradient(cfg) {\n this.cfg = {};\n var el = null;\n var id = uniqueId('gradient_');\n if (cfg.toLowerCase()[0] === 'l') {\n el = createSVGElement('linearGradient');\n parseLineGradient(cfg, el);\n }\n else {\n el = createSVGElement('radialGradient');\n parseRadialGradient(cfg, el);\n }\n el.setAttribute('id', id);\n this.el = el;\n this.id = id;\n this.cfg = cfg;\n return this;\n }\n Gradient.prototype.match = function (type, attr) {\n return this.cfg === attr;\n };\n return Gradient;\n}());\nexport default Gradient;\n//# sourceMappingURL=gradient.js.map","/**\n * @fileoverview shadow\n * @author dengfuping_develop@163.com\n */\nimport { each, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar ATTR_MAP = {\n shadowColor: 'color',\n shadowOpacity: 'opacity',\n shadowBlur: 'blur',\n shadowOffsetX: 'dx',\n shadowOffsetY: 'dy',\n};\nvar SHADOW_DIMENSION = {\n x: '-40%',\n y: '-40%',\n width: '200%',\n height: '200%',\n};\nvar Shadow = /** @class */ (function () {\n function Shadow(cfg) {\n this.type = 'filter';\n this.cfg = {};\n this.type = 'filter';\n var el = createSVGElement('filter');\n // expand the filter region to fill in shadows\n each(SHADOW_DIMENSION, function (v, k) {\n el.setAttribute(k, v);\n });\n this.el = el;\n this.id = uniqueId('filter_');\n this.el.id = this.id;\n this.cfg = cfg;\n this._parseShadow(cfg, el);\n return this;\n }\n Shadow.prototype.match = function (type, cfg) {\n if (this.type !== type) {\n return false;\n }\n var flag = true;\n var config = this.cfg;\n each(Object.keys(config), function (attr) {\n if (config[attr] !== cfg[attr]) {\n flag = false;\n return false;\n }\n });\n return flag;\n };\n Shadow.prototype.update = function (name, value) {\n var config = this.cfg;\n config[ATTR_MAP[name]] = value;\n this._parseShadow(config, this.el);\n return this;\n };\n Shadow.prototype._parseShadow = function (config, el) {\n var child = \"\";\n el.innerHTML = child;\n };\n return Shadow;\n}());\nexport default Shadow;\n//# sourceMappingURL=shadow.js.map","/**\n * @fileoverview arrow\n * @author dengfuping_develop@163.com\n */\nimport { isArray, uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar Arrow = /** @class */ (function () {\n function Arrow(attrs, type) {\n this.cfg = {};\n var el = createSVGElement('marker');\n var id = uniqueId('marker_');\n el.setAttribute('id', id);\n var shape = createSVGElement('path');\n shape.setAttribute('stroke', attrs.stroke || 'none');\n shape.setAttribute('fill', attrs.fill || 'none');\n el.appendChild(shape);\n el.setAttribute('overflow', 'visible');\n el.setAttribute('orient', 'auto-start-reverse');\n this.el = el;\n this.child = shape;\n this.id = id;\n var cfg = attrs[type === 'marker-start' ? 'startArrow' : 'endArrow'];\n this.stroke = attrs.stroke || '#000';\n if (cfg === true) {\n this._setDefaultPath(type, shape);\n }\n else {\n this.cfg = cfg; // when arrow config exists\n this._setMarker(attrs.lineWidth, shape);\n }\n return this;\n }\n Arrow.prototype.match = function () {\n return false;\n };\n Arrow.prototype._setDefaultPath = function (type, el) {\n var parent = this.el;\n // 默认箭头的边长为 10,夹角为 60 度\n el.setAttribute('d', \"M0,0 L\" + 10 * Math.cos(Math.PI / 6) + \",5 L0,10\");\n parent.setAttribute('refX', \"\" + 10 * Math.cos(Math.PI / 6));\n parent.setAttribute('refY', \"\" + 5);\n };\n Arrow.prototype._setMarker = function (r, el) {\n var parent = this.el;\n var path = this.cfg.path;\n var d = this.cfg.d;\n if (isArray(path)) {\n path = path\n .map(function (segment) {\n return segment.join(' ');\n })\n .join('');\n }\n el.setAttribute('d', path);\n parent.appendChild(el);\n if (d) {\n parent.setAttribute('refX', \"\" + d / r);\n }\n };\n Arrow.prototype.update = function (fill) {\n var child = this.child;\n if (child.attr) {\n child.attr('fill', fill);\n }\n else {\n child.setAttribute('fill', fill);\n }\n };\n return Arrow;\n}());\nexport default Arrow;\n//# sourceMappingURL=arrow.js.map","/**\n * @fileoverview clip\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar Clip = /** @class */ (function () {\n function Clip(cfg) {\n this.type = 'clip';\n this.cfg = {};\n var el = createSVGElement('clipPath');\n this.el = el;\n this.id = uniqueId('clip_');\n el.id = this.id;\n var shapeEl = cfg.cfg.el;\n el.appendChild(shapeEl);\n this.cfg = cfg;\n return this;\n }\n Clip.prototype.match = function () {\n return false;\n };\n Clip.prototype.remove = function () {\n var el = this.el;\n el.parentNode.removeChild(el);\n };\n return Clip;\n}());\nexport default Clip;\n//# sourceMappingURL=clip.js.map","/**\n * @fileoverview pattern\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport { createSVGElement } from '../util/dom';\nvar regexPR = /^p\\s*\\(\\s*([axyn])\\s*\\)\\s*(.*)/i;\nvar Pattern = /** @class */ (function () {\n function Pattern(cfg) {\n this.cfg = {};\n var el = createSVGElement('pattern');\n el.setAttribute('patternUnits', 'userSpaceOnUse');\n var child = createSVGElement('image');\n el.appendChild(child);\n var id = uniqueId('pattern_');\n el.id = id;\n this.el = el;\n this.id = id;\n this.cfg = cfg;\n var arr = regexPR.exec(cfg);\n var source = arr[2];\n child.setAttribute('href', source);\n var img = new Image();\n if (!source.match(/^data:/i)) {\n img.crossOrigin = 'Anonymous';\n }\n img.src = source;\n function onload() {\n el.setAttribute('width', \"\" + img.width);\n el.setAttribute('height', \"\" + img.height);\n }\n if (img.complete) {\n onload();\n }\n else {\n img.onload = onload;\n // Fix onload() bug in IE9\n img.src = img.src;\n }\n return this;\n }\n Pattern.prototype.match = function (type, attr) {\n return this.cfg === attr;\n };\n return Pattern;\n}());\nexport default Pattern;\n//# sourceMappingURL=pattern.js.map","/**\n * @fileoverview defs\n * @author dengfuping_develop@163.com\n */\nimport { uniqueId } from '@antv/util';\nimport Gradient from './gradient';\nimport Shadow from './shadow';\nimport Arrow from './arrow';\nimport Clip from './clip';\nimport Pattern from './pattern';\nimport { createSVGElement } from '../util/dom';\nvar Defs = /** @class */ (function () {\n function Defs(canvas) {\n var el = createSVGElement('defs');\n var id = uniqueId('defs_');\n el.id = id;\n canvas.appendChild(el);\n this.children = [];\n this.defaultArrow = {};\n this.el = el;\n this.canvas = canvas;\n }\n Defs.prototype.find = function (type, attr) {\n var children = this.children;\n var result = null;\n for (var i = 0; i < children.length; i++) {\n if (children[i].match(type, attr)) {\n result = children[i].id;\n break;\n }\n }\n return result;\n };\n Defs.prototype.findById = function (id) {\n var children = this.children;\n var flag = null;\n for (var i = 0; i < children.length; i++) {\n if (children[i].id === id) {\n flag = children[i];\n break;\n }\n }\n return flag;\n };\n Defs.prototype.add = function (item) {\n this.children.push(item);\n item.canvas = this.canvas;\n item.parent = this;\n };\n Defs.prototype.getDefaultArrow = function (attrs, name) {\n var stroke = attrs.stroke || attrs.strokeStyle;\n if (this.defaultArrow[stroke]) {\n return this.defaultArrow[stroke].id;\n }\n var arrow = new Arrow(attrs, name);\n this.defaultArrow[stroke] = arrow;\n this.el.appendChild(arrow.el);\n this.add(arrow);\n return arrow.id;\n };\n Defs.prototype.addGradient = function (cfg) {\n var gradient = new Gradient(cfg);\n this.el.appendChild(gradient.el);\n this.add(gradient);\n return gradient.id;\n };\n Defs.prototype.addArrow = function (attrs, name) {\n var arrow = new Arrow(attrs, name);\n this.el.appendChild(arrow.el);\n this.add(arrow);\n return arrow.id;\n };\n Defs.prototype.addShadow = function (cfg) {\n var shadow = new Shadow(cfg);\n this.el.appendChild(shadow.el);\n this.add(shadow);\n return shadow.id;\n };\n Defs.prototype.addPattern = function (cfg) {\n var pattern = new Pattern(cfg);\n this.el.appendChild(pattern.el);\n this.add(pattern);\n return pattern.id;\n };\n Defs.prototype.addClip = function (cfg) {\n var clip = new Clip(cfg);\n this.el.appendChild(clip.el);\n this.add(clip);\n return clip.id;\n };\n return Defs;\n}());\nexport default Defs;\n//# sourceMappingURL=index.js.map","import { __assign, __extends } from \"tslib\";\nimport { AbstractCanvas } from '@antv/g-base';\nimport { SHAPE_TO_TAGS } from './constant';\nimport { drawChildren } from './util/draw';\nimport { setTransform, setClip } from './util/svg';\nimport { sortDom, createSVGElement } from './util/dom';\nimport * as Shape from './shape';\nimport Group from './group';\nimport Defs from './defs';\nvar Canvas = /** @class */ (function (_super) {\n __extends(Canvas, _super);\n function Canvas(cfg) {\n return _super.call(this, __assign(__assign({}, cfg), { autoDraw: true, \n // 设置渲染引擎为 canvas,只读属性\n renderer: 'svg' })) || this;\n }\n Canvas.prototype.getShapeBase = function () {\n return Shape;\n };\n Canvas.prototype.getGroupBase = function () {\n return Group;\n };\n // 覆盖 Container 中通过遍历的方式获取 shape 对象的逻辑,直接走 SVG 的 dom 拾取即可\n Canvas.prototype.getShape = function (x, y, ev) {\n var target = ev.target || ev.srcElement;\n if (!SHAPE_TO_TAGS[target.tagName]) {\n var parent_1 = target.parentNode;\n while (parent_1 && !SHAPE_TO_TAGS[parent_1.tagName]) {\n parent_1 = parent_1.parentNode;\n }\n target = parent_1;\n }\n return this.find(function (child) { return child.get('el') === target; });\n };\n // 复写基类的方法生成标签\n Canvas.prototype.createDom = function () {\n var element = createSVGElement('svg');\n var context = new Defs(element);\n element.setAttribute('width', \"\" + this.get('width'));\n element.setAttribute('height', \"\" + this.get('height'));\n // 缓存 context 对象\n this.set('context', context);\n return element;\n };\n /**\n * 一些方法调用会引起画布变化\n * @param {ChangeType} changeType 改变的类型\n */\n Canvas.prototype.onCanvasChange = function (changeType) {\n var context = this.get('context');\n var el = this.get('el');\n if (changeType === 'sort') {\n var children_1 = this.get('children');\n if (children_1 && children_1.length) {\n sortDom(this, function (a, b) {\n return children_1.indexOf(a) - children_1.indexOf(b) ? 1 : 0;\n });\n }\n }\n else if (changeType === 'clear') {\n // el maybe null for canvas\n if (el) {\n // 清空 SVG 元素\n el.innerHTML = '';\n var defsEl = context.el;\n // 清空 defs 元素\n defsEl.innerHTML = '';\n // 将清空后的 defs 元素挂载到 el 下\n el.appendChild(defsEl);\n }\n }\n else if (changeType === 'matrix') {\n setTransform(this);\n }\n else if (changeType === 'clip') {\n setClip(this, context);\n }\n else if (changeType === 'changeSize') {\n el.setAttribute('width', \"\" + this.get('width'));\n el.setAttribute('height', \"\" + this.get('height'));\n }\n };\n // 复写基类的 draw 方法\n Canvas.prototype.draw = function () {\n var context = this.get('context');\n var children = this.getChildren();\n setClip(this, context);\n if (children.length) {\n drawChildren(context, children);\n }\n };\n return Canvas;\n}(AbstractCanvas));\nexport default Canvas;\n//# sourceMappingURL=canvas.js.map","export default function addEventListener(target, eventType, callback) {\n if (target) {\n if (typeof target.addEventListener === 'function') {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function () {\n target.removeEventListener(eventType, callback, false);\n },\n };\n // @ts-ignore\n }\n if (typeof target.attachEvent === 'function') {\n // @ts-ignore\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function () {\n // @ts-ignore\n target.detachEvent('on' + eventType, callback);\n },\n };\n }\n }\n}\n//# sourceMappingURL=add-event-listener.js.map","/**\n * 创建DOM 节点\n * @param {String} str Dom 字符串\n * @return {HTMLElement} DOM 节点\n */\nvar TABLE;\nvar TABLE_TR;\nvar FRAGMENT_REG;\nvar CONTAINERS;\nfunction initConstants() {\n TABLE = document.createElement('table');\n TABLE_TR = document.createElement('tr');\n FRAGMENT_REG = /^\\s*<(\\w+|!)[^>]*>/;\n CONTAINERS = {\n tr: document.createElement('tbody'),\n tbody: TABLE,\n thead: TABLE,\n tfoot: TABLE,\n td: TABLE_TR,\n th: TABLE_TR,\n '*': document.createElement('div'),\n };\n}\nexport default function createDom(str) {\n if (!TABLE) {\n initConstants();\n }\n var name = FRAGMENT_REG.test(str) && RegExp.$1;\n if (!name || !(name in CONTAINERS)) {\n name = '*';\n }\n var container = CONTAINERS[name];\n str = typeof str === 'string' ? str.replace(/(^\\s*)|(\\s*$)/g, '') : str;\n container.innerHTML = '' + str;\n var dom = container.childNodes[0];\n if (dom && container.contains(dom)) {\n container.removeChild(dom);\n }\n return dom;\n}\n//# sourceMappingURL=create-dom.js.map","export default function modifyCSS(dom, css) {\n if (dom) {\n for (var key in css) {\n if (css.hasOwnProperty(key)) {\n dom.style[key] = css[key];\n }\n }\n }\n return dom;\n}\n//# sourceMappingURL=modify-css.js.map","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","// This file is autogenerated. It's used to publish ESM to npm.\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\nvar trimLeft = /^\\s+/;\nvar trimRight = /\\s+$/;\nfunction tinycolor(color, opts) {\n color = color ? color : \"\";\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n var rgb = inputToRGB(color);\n this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) this._r = Math.round(this._r);\n if (this._g < 1) this._g = Math.round(this._g);\n if (this._b < 1) this._b = Math.round(this._b);\n this._ok = rgb.ok;\n}\ntinycolor.prototype = {\n isDark: function isDark() {\n return this.getBrightness() < 128;\n },\n isLight: function isLight() {\n return !this.isDark();\n },\n isValid: function isValid() {\n return this._ok;\n },\n getOriginalInput: function getOriginalInput() {\n return this._originalInput;\n },\n getFormat: function getFormat() {\n return this._format;\n },\n getAlpha: function getAlpha() {\n return this._a;\n },\n getBrightness: function getBrightness() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function getLuminance() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r / 255;\n GsRGB = rgb.g / 255;\n BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n },\n setAlpha: function setAlpha(value) {\n this._a = boundAlpha(value);\n this._roundA = Math.round(100 * this._a) / 100;\n return this;\n },\n toHsv: function toHsv() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return {\n h: hsv.h * 360,\n s: hsv.s,\n v: hsv.v,\n a: this._a\n };\n },\n toHsvString: function toHsvString() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = Math.round(hsv.h * 360),\n s = Math.round(hsv.s * 100),\n v = Math.round(hsv.v * 100);\n return this._a == 1 ? \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" : \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + this._roundA + \")\";\n },\n toHsl: function toHsl() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return {\n h: hsl.h * 360,\n s: hsl.s,\n l: hsl.l,\n a: this._a\n };\n },\n toHslString: function toHslString() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = Math.round(hsl.h * 360),\n s = Math.round(hsl.s * 100),\n l = Math.round(hsl.l * 100);\n return this._a == 1 ? \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" : \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + this._roundA + \")\";\n },\n toHex: function toHex(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function toHexString(allow3Char) {\n return \"#\" + this.toHex(allow3Char);\n },\n toHex8: function toHex8(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function toHex8String(allow4Char) {\n return \"#\" + this.toHex8(allow4Char);\n },\n toRgb: function toRgb() {\n return {\n r: Math.round(this._r),\n g: Math.round(this._g),\n b: Math.round(this._b),\n a: this._a\n };\n },\n toRgbString: function toRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \")\" : \"rgba(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function toPercentageRgb() {\n return {\n r: Math.round(bound01(this._r, 255) * 100) + \"%\",\n g: Math.round(bound01(this._g, 255) * 100) + \"%\",\n b: Math.round(bound01(this._b, 255) * 100) + \"%\",\n a: this._a\n };\n },\n toPercentageRgbString: function toPercentageRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%)\" : \"rgba(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function toName() {\n if (this._a === 0) {\n return \"transparent\";\n }\n if (this._a < 1) {\n return false;\n }\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function toFilter(secondColor) {\n var hex8String = \"#\" + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = \"#\" + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n return \"progid:DXImageTransform.Microsoft.gradient(\" + gradientType + \"startColorstr=\" + hex8String + \",endColorstr=\" + secondHex8String + \")\";\n },\n toString: function toString(format) {\n var formatSet = !!format;\n format = format || this._format;\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n },\n clone: function clone() {\n return tinycolor(this.toString());\n },\n _applyModification: function _applyModification(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function lighten() {\n return this._applyModification(_lighten, arguments);\n },\n brighten: function brighten() {\n return this._applyModification(_brighten, arguments);\n },\n darken: function darken() {\n return this._applyModification(_darken, arguments);\n },\n desaturate: function desaturate() {\n return this._applyModification(_desaturate, arguments);\n },\n saturate: function saturate() {\n return this._applyModification(_saturate, arguments);\n },\n greyscale: function greyscale() {\n return this._applyModification(_greyscale, arguments);\n },\n spin: function spin() {\n return this._applyModification(_spin, arguments);\n },\n _applyCombination: function _applyCombination(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function analogous() {\n return this._applyCombination(_analogous, arguments);\n },\n complement: function complement() {\n return this._applyCombination(_complement, arguments);\n },\n monochromatic: function monochromatic() {\n return this._applyCombination(_monochromatic, arguments);\n },\n splitcomplement: function splitcomplement() {\n return this._applyCombination(_splitcomplement, arguments);\n },\n // Disabled until https://github.com/bgrins/TinyColor/issues/254\n // polyad: function (number) {\n // return this._applyCombination(polyad, [number]);\n // },\n triad: function triad() {\n return this._applyCombination(polyad, [3]);\n },\n tetrad: function tetrad() {\n return this._applyCombination(polyad, [4]);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function (color, opts) {\n if (_typeof(color) == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n var rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n if (_typeof(color) == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a\n };\n}\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// \n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n l: l\n };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n v = max;\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n v: v\n };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) return false;\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\ntinycolor.random = function () {\n return tinycolor.fromRatio({\n r: Math.random(),\n g: Math.random(),\n b: Math.random()\n });\n};\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// \n\nfunction _desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\nfunction _saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\nfunction _greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\nfunction _lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\nfunction _brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return tinycolor(rgb);\n}\nfunction _darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// \n\nfunction _complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\nfunction polyad(color, number) {\n if (isNaN(number) || number <= 0) {\n throw new Error(\"Argument to polyad must be a positive number\");\n }\n var hsl = tinycolor(color).toHsl();\n var result = [tinycolor(color)];\n var step = 360 / number;\n for (var i = 1; i < number; i++) {\n result.push(tinycolor({\n h: (hsl.h + i * step) % 360,\n s: hsl.s,\n l: hsl.l\n }));\n }\n return result;\n}\nfunction _splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [tinycolor(color), tinycolor({\n h: (h + 72) % 360,\n s: hsl.s,\n l: hsl.l\n }), tinycolor({\n h: (h + 216) % 360,\n s: hsl.s,\n l: hsl.l\n })];\n}\nfunction _analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\nfunction _monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n while (results--) {\n ret.push(tinycolor({\n h: h,\n s: s,\n v: v\n }));\n v = (v + modification) % 1;\n }\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function (color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a\n };\n return tinycolor(rgba);\n};\n\n// Readability Functions\n// ---------------------\n// false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function (color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n out = false;\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function (baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors;\n level = args.level;\n size = args.size;\n for (var i = 0; i < colorList.length; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n if (tinycolor.isReadable(baseColor, bestColor, {\n level: level,\n size: size\n }) || !includeFallbackColors) {\n return bestColor;\n } else {\n args.includeFallbackColors = false;\n return tinycolor.mostReadable(baseColor, [\"#fff\", \"#000\"], args);\n }\n};\n\n// Big List of Colors\n// ------------------\n// \nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) n = \"100%\";\n var processPercent = isPercentage(n);\n n = Math.min(max, Math.max(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return n % max / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf(\".\") != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf(\"%\") != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? \"0\" + c : \"\" + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\nvar matchers = function () {\n // \n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // \n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n}();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n color = color.replace(trimLeft, \"\").replace(trimRight, \"\").toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == \"transparent\") {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n format: \"name\"\n };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if (match = matchers.rgb.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3]\n };\n }\n if (match = matchers.rgba.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsl.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3]\n };\n }\n if (match = matchers.hsla.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsv.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3]\n };\n }\n if (match = matchers.hsva.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hex8.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex6.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if (match = matchers.hex4.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n a: convertHexToDecimal(match[4] + \"\" + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex3.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n return false;\n}\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\n level: \"AA\",\n size: \"small\"\n };\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\n level: level,\n size: size\n };\n}\n\nexport { tinycolor as default };\n","import tinycolor from 'tinycolor2';\n\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = tinycolor(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = pColor.toHsv();\n var colorString = tinycolor({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }).toHexString();\n patterns.push(colorString);\n }\n\n patterns.push(pColor.toHexString());\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = pColor.toHsv();\n\n var _colorString = tinycolor({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }).toHexString();\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref) {\n var index = _ref.index,\n opacity = _ref.opacity;\n var darkColorString = tinycolor.mix(opts.backgroundColor || '#141414', patterns[index], opacity * 100).toHexString();\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\n\nexport { blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow };\n","import color from 'color';\nimport { generate } from '@ant-design/colors';\n/**\n * get the mix color of backColor and frontColor with alpha\n * @param backColor background color\n * @param frontColor foreground color\n * @param frontAlpha the opacity of foreground color\n */\nexport var mixColor = function mixColor(backColor, frontColor, frontAlpha) {\n var bc = color(backColor);\n var fc = color(frontColor);\n return color([(1 - frontAlpha) * bc.red() + frontAlpha * fc.red(), (1 - frontAlpha) * bc.green() + frontAlpha * fc.green(), (1 - frontAlpha) * bc.blue() + frontAlpha * fc.blue()]).rgb();\n};\nvar getColorsWithDefaultTheme = function getColorsWithDefaultTheme(subjectColor, backColor, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n var subjectColor005 = mixColor(backColor, subjectColor, 0.05).rgb().toString();\n var subjectColor01 = mixColor(backColor, subjectColor, 0.1).rgb().toString();\n var subjectColor02 = mixColor(backColor, subjectColor, 0.2).rgb().toString();\n var subjectColor04 = mixColor(backColor, subjectColor, 0.4).rgb().toString();\n var disableColor002 = mixColor(backColor, disableColor, 0.02).rgb().toString();\n var disableColor005 = mixColor(backColor, disableColor, 0.05).rgb().toString();\n var disableColor01 = mixColor(backColor, disableColor, 0.1).rgb().toString();\n var disableColor02 = mixColor(backColor, disableColor, 0.2).rgb().toString();\n var disableColor03 = mixColor(backColor, disableColor, 0.3).rgb().toString();\n var paletteFromSubject = generate(subjectColor, {\n theme: 'default',\n backgroundColor: backColor\n });\n var subjectHex = color(subjectColor).hex().toLowerCase();\n var subjectIdx = paletteFromSubject.indexOf(subjectHex);\n var deeperSubject = subjectColor;\n if (subjectIdx !== -1) {\n deeperSubject = paletteFromSubject[subjectIdx + 1];\n }\n return {\n // for nodes\n mainStroke: subjectColor,\n mainFill: subjectColor01,\n activeStroke: subjectColor,\n activeFill: subjectColor005,\n inactiveStroke: subjectColor04,\n inactiveFill: subjectColor005,\n selectedStroke: subjectColor,\n selectedFill: backColor,\n highlightStroke: deeperSubject,\n highlightFill: subjectColor02,\n disableStroke: disableColor03,\n disableFill: disableColor005,\n // for edges\n edgeMainStroke: disableColor03,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: disableColor02,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: disableColor01,\n // for combos\n comboMainStroke: disableColor03,\n comboMainFill: disableColor002,\n comboActiveStroke: subjectColor,\n comboActiveFill: subjectColor005,\n comboInactiveStroke: disableColor03,\n comboInactiveFill: disableColor002,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: disableColor002,\n comboHighlightStroke: deeperSubject,\n comboHighlightFill: disableColor002,\n comboDisableStroke: disableColor02,\n comboDisableFill: disableColor005\n };\n};\nvar getColorsWithDarkTheme = function getColorsWithDarkTheme(subjectColor, backColor, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (disableColor === void 0) {\n disableColor = '#777';\n }\n var subjectColor02 = mixColor(backColor, subjectColor, 0.2).rgb().toString();\n var subjectColor03 = mixColor(backColor, subjectColor, 0.3).rgb().toString();\n var subjectColor06 = mixColor(backColor, subjectColor, 0.6).rgb().toString();\n var subjectColor08 = mixColor(backColor, subjectColor, 0.8).rgb().toString();\n var disableColor02 = mixColor(backColor, disableColor, 0.2).rgb().toString();\n var disableColor025 = mixColor(backColor, disableColor, 0.25).rgb().toString();\n var disableColor03 = mixColor(backColor, disableColor, 0.3).rgb().toString();\n var disableColor04 = mixColor(backColor, disableColor, 0.4).rgb().toString();\n var disableColor05 = mixColor(backColor, disableColor, 0.5).rgb().toString();\n var paletteFromSubject = generate(subjectColor, {\n theme: 'dark',\n backgroundColor: backColor\n });\n var subjectHex = color(subjectColor).hex().toLowerCase();\n var subjectIdx = paletteFromSubject.indexOf(subjectHex);\n var deeperSubject = subjectColor;\n if (subjectIdx !== -1) {\n deeperSubject = paletteFromSubject[subjectIdx + 1];\n }\n return {\n // for nodes\n mainStroke: subjectColor08,\n mainFill: subjectColor02,\n activeStroke: subjectColor,\n activeFill: subjectColor03,\n inactiveStroke: subjectColor08,\n inactiveFill: subjectColor02,\n selectedStroke: subjectColor,\n selectedFill: subjectColor02,\n highlightStroke: subjectColor,\n highlightFill: subjectColor06,\n disableStroke: disableColor05,\n disableFill: disableColor025,\n // for edges\n edgeMainStroke: disableColor,\n edgeActiveStroke: subjectColor,\n edgeInactiveStroke: disableColor,\n edgeSelectedStroke: subjectColor,\n edgeHighlightStroke: subjectColor,\n edgeDisableStroke: disableColor03,\n // for combos\n comboMainStroke: disableColor04,\n comboMainFill: disableColor025,\n comboActiveStroke: subjectColor,\n comboActiveFill: disableColor02,\n comboInactiveStroke: disableColor04,\n comboInactiveFill: disableColor025,\n comboSelectedStroke: subjectColor,\n comboSelectedFill: disableColor02,\n comboHighlightStroke: deeperSubject,\n comboHighlightFill: disableColor025,\n comboDisableStroke: disableColor04,\n comboDisableFill: disableColor02\n };\n};\n/**\n * get the set of colors according to the subject color and background color\n * @param subjectColor the subject color\n * @param backColor background color\n * @param disableColor the color for disable state\n */\nexport var getColorsWithSubjectColor = function getColorsWithSubjectColor(subjectColor, backColor, theme, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (theme === void 0) {\n theme = 'default';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n if (theme === 'default') return getColorsWithDefaultTheme(subjectColor, backColor, 'rgb(150, 150, 150)');\n return getColorsWithDarkTheme(subjectColor, backColor, '#777');\n};\nexport var getColorSetsBySubjectColors = function getColorSetsBySubjectColors(subjectColors, backColor, theme, disableColor) {\n if (backColor === void 0) {\n backColor = '#fff';\n }\n if (theme === void 0) {\n theme = 'default';\n }\n if (disableColor === void 0) {\n disableColor = 'rgb(150, 150, 150)';\n }\n var sets = [];\n subjectColors.forEach(function (sColor) {\n sets.push(getColorsWithSubjectColor(sColor, backColor, theme, disableColor));\n });\n return sets;\n};","import { getColorsWithSubjectColor } from './util/color';\nvar subjectColor = 'rgb(95, 149, 255)';\nvar backColor = 'rgb(255, 255, 255)';\nvar textColor = 'rgb(0, 0, 0)';\nvar colorSet = getColorsWithSubjectColor(subjectColor, backColor);\nexport default {\n version: '0.8.23',\n rootContainerClassName: 'root-container',\n nodeContainerClassName: 'node-container',\n edgeContainerClassName: 'edge-container',\n comboContainerClassName: 'combo-container',\n delegateContainerClassName: 'delegate-container',\n defaultLoopPosition: 'top',\n nodeLabel: {\n style: {\n fill: '#000',\n fontSize: 12,\n textAlign: 'center',\n textBaseline: 'middle'\n },\n offset: 4 // 节点的默认文本不居中时的偏移量\n },\n\n defaultNode: {\n type: 'circle',\n style: {\n lineWidth: 1,\n stroke: colorSet.mainStroke,\n fill: colorSet.mainFill\n },\n size: 20,\n color: colorSet.mainStroke,\n linkPoints: {\n size: 8,\n lineWidth: 1,\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke\n }\n },\n // 节点应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n nodeStateStyles: {\n active: {\n fill: colorSet.activeFill,\n stroke: colorSet.activeStroke,\n lineWidth: 2,\n shadowColor: colorSet.mainStroke,\n shadowBlur: 10\n },\n selected: {\n fill: colorSet.selectedFill,\n stroke: colorSet.selectedStroke,\n lineWidth: 4,\n shadowColor: colorSet.selectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n fill: colorSet.highlightFill,\n stroke: colorSet.highlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n fill: colorSet.inactiveFill,\n stroke: colorSet.inactiveStroke,\n lineWidth: 1\n },\n disable: {\n fill: colorSet.disableFill,\n stroke: colorSet.disableStroke,\n lineWidth: 1\n }\n },\n edgeLabel: {\n style: {\n fill: textColor,\n textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n }\n },\n defaultEdge: {\n type: 'line',\n size: 1,\n style: {\n stroke: colorSet.edgeMainStroke,\n lineAppendWidth: 2\n },\n color: colorSet.edgeMainStroke\n },\n // 边应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n edgeStateStyles: {\n active: {\n stroke: colorSet.edgeActiveStroke,\n lineWidth: 1\n },\n selected: {\n stroke: colorSet.edgeSelectedStroke,\n lineWidth: 2,\n shadowColor: colorSet.edgeSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.edgeHighlightStroke,\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.edgeInactiveStroke,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.edgeDisableStroke,\n lineWidth: 1\n }\n },\n comboLabel: {\n style: {\n fill: textColor,\n // textAlign: 'center',\n textBaseline: 'middle',\n fontSize: 12\n },\n refY: 10,\n refX: 10 // Combo 的默认文本不居中时的偏移量\n },\n\n defaultCombo: {\n type: 'circle',\n style: {\n fill: colorSet.comboMainFill,\n lineWidth: 1,\n stroke: colorSet.comboMainStroke,\n r: 5,\n width: 20,\n height: 10\n },\n size: [20, 5],\n color: colorSet.comboMainStroke,\n padding: [25, 20, 15, 20]\n },\n // combo 应用状态后的样式,默认仅提供 active、selected、highlight、inactive、disable,用户可以自己扩展\n comboStateStyles: {\n active: {\n stroke: colorSet.comboActiveStroke,\n lineWidth: 1,\n fill: colorSet.comboActiveFill\n },\n selected: {\n stroke: colorSet.comboSelectedStroke,\n lineWidth: 2,\n fill: colorSet.comboSelectedFill,\n shadowColor: colorSet.comboSelectedStroke,\n shadowBlur: 10,\n 'text-shape': {\n fontWeight: 500\n }\n },\n highlight: {\n stroke: colorSet.comboHighlightStroke,\n lineWidth: 2,\n fill: colorSet.comboHighlightFill,\n 'text-shape': {\n fontWeight: 500\n }\n },\n inactive: {\n stroke: colorSet.comboInactiveStroke,\n fill: colorSet.comboInactiveFill,\n lineWidth: 1\n },\n disable: {\n stroke: colorSet.comboDisableStroke,\n fill: colorSet.comboDisableFill,\n lineWidth: 1\n }\n },\n delegateStyle: {\n fill: '#F3F9FF',\n fillOpacity: 0.5,\n stroke: '#1890FF',\n strokeOpacity: 0.9,\n lineDash: [5, 5]\n },\n // 文本水印默认配置\n textWaterMarkerConfig: {\n width: 150,\n height: 100,\n compatible: false,\n text: {\n x: 0,\n y: 60,\n lineHeight: 20,\n rotate: 20,\n fontSize: 14,\n fontFamily: 'Microsoft YaHei',\n fill: 'rgba(0, 0, 0, 0.1)',\n baseline: 'Middle'\n }\n },\n imageWaterMarkerConfig: {\n width: 150,\n height: 130,\n compatible: false,\n image: {\n x: 0,\n y: 0,\n width: 30,\n height: 20,\n rotate: 0\n }\n },\n waterMarkerImage: 'https://gw.alipayobjects.com/os/s/prod/antv/assets/image/logo-with-text-73b8a.svg'\n};","/**\n * Clone group and clone the clip shapes of image shapes.\n * @param group group to be cloned\n * @returns cloned group with same clipped shapes of original group\n */\nexport var cloneGElement = function cloneGElement(element) {\n var vElement = element.clone();\n applyCloneClip(element, vElement);\n return vElement;\n};\n/**\n * Apply the clipShape for image shapes from original element to cloned one (clonedElement).\n * @param element original element\n * @param clonedElement cloned element of original element\n */\nvar applyCloneClip = function applyCloneClip(element, clonedElement) {\n var _a;\n if (element.isGroup() && clonedElement.isGroup()) {\n (_a = element.get('children')) === null || _a === void 0 ? void 0 : _a.forEach(function (child, i) {\n var clonedChild = clonedElement.get('children')[i];\n applyCloneClip(child, clonedChild);\n });\n }\n var type = element.get('type');\n var clonedType = clonedElement.get('type');\n if (type !== 'image' || clonedType !== 'image') return;\n var clipShape = element.get('clipShape');\n if (clipShape) {\n clonedElement.setClip({\n type: clipShape.get('type'),\n attrs: clipShape.attr()\n });\n }\n};","import { __extends } from \"tslib\";\nimport { addEventListener } from '@antv/dom-util';\nimport { each, isNil, wrapBehavior } from '@antv/util';\nimport { AbstractEvent, Util } from '@antv/g6-core';\nvar cloneEvent = Util.cloneEvent,\n isViewportChanged = Util.isViewportChanged;\nvar EventController = /** @class */function (_super) {\n __extends(EventController, _super);\n function EventController(graph) {\n var _this = _super.call(this, graph) || this;\n _this.extendEvents = [];\n _this.dragging = false;\n _this.mousedown = false;\n _this.preItem = null;\n _this.destroy();\n _this.graph = graph;\n _this.destroyed = false;\n _this.initEvents();\n return _this;\n }\n // 初始化 G6 中的事件\n EventController.prototype.initEvents = function () {\n var _a = this,\n graph = _a.graph,\n _b = _a.extendEvents,\n extendEvents = _b === void 0 ? [] : _b;\n var canvas = graph.get('canvas');\n // canvas.set('draggable', true);\n var el = canvas.get('el');\n var canvasHandler = wrapBehavior(this, 'onCanvasEvents');\n var originHandler = wrapBehavior(this, 'onExtendEvents');\n var wheelHandler = wrapBehavior(this, 'onWheelEvent');\n // each(EVENTS, event => {\n // canvas.off(event).on(event, canvasHandler);\n // });\n canvas.off('*').on('*', canvasHandler);\n this.canvasHandler = canvasHandler;\n extendEvents.push(addEventListener(el, 'wheel', wheelHandler));\n if (typeof window !== 'undefined') {\n extendEvents.push(addEventListener(window, 'keydown', originHandler));\n extendEvents.push(addEventListener(window, 'keyup', originHandler));\n extendEvents.push(addEventListener(window, 'focus', originHandler));\n }\n // 数据变更,重置一些状态\n if (this.resetHandler) graph.off('afterchangedata', this.resetHandler);\n this.resetHandler = wrapBehavior(this, 'resetStatus');\n graph.on('afterchangedata', this.resetHandler);\n };\n // 获取 shape 的 item 对象\n EventController.getItemRoot = function (shape) {\n while (shape && !shape.get('item')) {\n shape = shape.get('parent');\n }\n return shape;\n };\n /**\n * 处理 canvas 事件\n * @param evt 事件句柄\n */\n EventController.prototype.onCanvasEvents = function (evt) {\n var _this = this;\n var graph = this.graph;\n var canvas = graph.get('canvas');\n var target = evt.target;\n var eventType = evt.type;\n switch (eventType) {\n // solve G's problem: mousemove and mouseup are not triggered with drag and dragend\n case 'drag':\n this.onCanvasEvents(Object.assign({}, evt, {\n type: 'mousemove'\n }));\n break;\n case 'dragend':\n this.onCanvasEvents(Object.assign({}, evt, {\n type: 'mouseup'\n }));\n break;\n // solve G's problem: mousedown on other DOMs, mouseup on canvas, click event is triggered unexpectedly\n case 'mousedown':\n this.mousedown = true;\n break;\n case 'mouseup':\n // mouseup happend before click, so setTimeout to reset the tag for reference in click event\n setTimeout(function () {\n return _this.mousedown = false;\n });\n break;\n case 'click':\n // the mousedown is not happend, the click is invalid\n if (!this.mousedown) return;\n break;\n default:\n break;\n }\n /**\n * (clientX, clientY): 相对于页面的坐标;\n * (canvasX, canvasY): 相对于 左上角的坐标;\n * (x, y): 相对于整个画布的坐标, 与 model 的 x, y 是同一维度的。\n */\n evt.canvasX = evt.x;\n evt.canvasY = evt.y;\n var point = {\n x: evt.canvasX,\n y: evt.canvasY\n };\n var group = graph.get('group');\n var matrix = group.getMatrix();\n if (!matrix) {\n matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n }\n if (isViewportChanged(matrix)) {\n point = graph.getPointByClient(evt.clientX, evt.clientY);\n }\n evt.x = point.x;\n evt.y = point.y;\n evt.currentTarget = graph;\n if (target === canvas) {\n if (eventType === 'mousemove' || eventType === 'mouseleave') {\n this.handleMouseMove(evt, 'canvas');\n }\n evt.target = canvas;\n evt.item = null;\n graph.emit(eventType, evt);\n graph.emit(\"canvas:\".concat(eventType), evt);\n return;\n }\n var itemShape = EventController.getItemRoot(target);\n if (!itemShape) {\n graph.emit(eventType, evt);\n return;\n }\n var item = itemShape.get('item');\n if (item.destroyed) {\n return;\n }\n var type = item.getType();\n // 事件target是触发事件的Shape实例,item是触发事件的item实例\n evt.target = target;\n evt.item = item;\n if (evt.canvasX === evt.x && evt.canvasY === evt.y) {\n var canvasPoint = graph.getCanvasByPoint(evt.x, evt.y);\n evt.canvasX = canvasPoint.x;\n evt.canvasY = canvasPoint.y;\n }\n if (evt.name && !evt.name.includes(':')) {\n graph.emit(\"\".concat(type, \":\").concat(eventType), evt); // emit('node:click', evt)\n graph.emit(eventType, evt); // emit('click', evt);\n } else if (evt.name) {\n graph.emit(evt.name, evt); // emit('text-shape:click', evt)\n }\n\n if (eventType === 'dragstart') {\n this.dragging = true;\n }\n if (eventType === 'dragend') {\n this.dragging = false;\n }\n if (eventType === 'mousemove') {\n this.handleMouseMove(evt, type);\n }\n };\n /**\n * 处理扩展事件\n * @param evt 事件句柄\n */\n EventController.prototype.onExtendEvents = function (evt) {\n this.graph.emit(evt.type, evt);\n };\n /**\n * 处理滚轮事件\n * @param evt 事件句柄\n */\n EventController.prototype.onWheelEvent = function (evt) {\n if (isNil(evt.wheelDelta)) {\n evt.wheelDelta = -evt.detail;\n }\n this.graph.emit('wheel', evt);\n };\n /**\n * 处理鼠标移动的事件\n * @param evt 事件句柄\n * @param type item 类型\n */\n EventController.prototype.handleMouseMove = function (evt, type) {\n var _a = this,\n graph = _a.graph,\n preItem = _a.preItem;\n var canvas = graph.get('canvas');\n var item = evt.target === canvas ? null : evt.item;\n evt = cloneEvent(evt);\n // 从前一个item直接移动到当前item,触发前一个item的leave事件\n if (preItem && preItem !== item && !preItem.destroyed) {\n evt.item = preItem;\n this.emitCustomEvent(preItem.getType(), 'mouseleave', evt);\n if (this.dragging) {\n this.emitCustomEvent(preItem.getType(), 'dragleave', evt);\n }\n }\n // 从一个item或canvas移动到当前item,触发当前item的enter事件\n if (item && preItem !== item) {\n evt.item = item;\n this.emitCustomEvent(type, 'mouseenter', evt);\n if (this.dragging) {\n this.emitCustomEvent(type, 'dragenter', evt);\n }\n }\n this.preItem = item;\n };\n /**\n * 在 graph 上面 emit 事件\n * @param itemType item 类型\n * @param eventType 事件类型\n * @param evt 事件句柄\n */\n EventController.prototype.emitCustomEvent = function (itemType, eventType, evt) {\n evt.type = eventType;\n this.graph.emit(\"\".concat(itemType, \":\").concat(eventType), evt);\n };\n EventController.prototype.resetStatus = function () {\n this.mousedown = false;\n this.dragging = false;\n this.preItem = null;\n };\n EventController.prototype.destroy = function () {\n var _a = this,\n graph = _a.graph,\n canvasHandler = _a.canvasHandler,\n extendEvents = _a.extendEvents;\n var canvas = graph.get('canvas');\n // each(EVENTS, event => {\n // canvas.off(event, canvasHandler);\n // });\n canvas.off('*', canvasHandler);\n each(extendEvents, function (event) {\n event.remove();\n });\n this.resetStatus();\n this.extendEvents.length = 0;\n this.canvasHandler = null;\n this.resetHandler = null;\n this.destroyed = true;\n };\n return EventController;\n}(AbstractEvent);\nexport default EventController;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Base = void 0;\nvar Base = /** @class */ (function () {\n function Base() {\n this.nodes = [];\n this.edges = [];\n this.combos = [];\n this.comboEdges = [];\n this.hiddenNodes = [];\n this.hiddenEdges = [];\n this.hiddenCombos = [];\n // temp edges e.g. the edge generated for releated collapsed combo\n this.vedges = [];\n this.positions = [];\n this.destroyed = false;\n this.onLayoutEnd = function () { };\n }\n Base.prototype.layout = function (data) {\n this.init(data);\n return this.execute(true);\n };\n Base.prototype.init = function (data) {\n this.nodes = data.nodes || [];\n this.edges = data.edges || [];\n this.combos = data.combos || [];\n this.comboEdges = data.comboEdges || [];\n this.hiddenNodes = data.hiddenNodes || [];\n this.hiddenEdges = data.hiddenEdges || [];\n this.hiddenCombos = data.hiddenCombos || [];\n this.vedges = data.vedges || [];\n };\n Base.prototype.execute = function (reloadData) { };\n Base.prototype.executeWithWorker = function () { };\n Base.prototype.getDefaultCfg = function () {\n return {};\n };\n Base.prototype.updateCfg = function (cfg) {\n if (cfg) {\n Object.assign(this, cfg);\n }\n };\n Base.prototype.getType = function () {\n return 'base';\n };\n Base.prototype.destroy = function () {\n this.nodes = null;\n this.edges = null;\n this.combos = null;\n this.positions = null;\n this.destroyed = true;\n };\n return Base;\n}());\nexports.Base = Base;\n//# sourceMappingURL=base.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.camelize = exports.isString = void 0;\nvar isString = function (val) { return typeof val === 'string'; };\nexports.isString = isString;\nvar cacheStringFunction = function (fn) {\n var cache = Object.create(null);\n return (function (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str));\n });\n};\nvar camelizeRE = /-(\\w)/g;\nexports.camelize = cacheStringFunction(function (str) {\n return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });\n});\n// export const capitalize = cacheStringFunction(\n// (str: string) => str.charAt(0).toUpperCase() + str.slice(1),\n// )\n//# sourceMappingURL=string.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isArray = void 0;\nexports.isArray = Array.isArray;\n//# sourceMappingURL=array.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toNumber = exports.isNaN = exports.isNumber = void 0;\nvar isNumber = function (val) { return typeof val === 'number'; };\nexports.isNumber = isNumber;\nvar isNaN = function (num) { return Number.isNaN(Number(num)); };\nexports.isNaN = isNaN;\nvar toNumber = function (val) {\n var n = parseFloat(val);\n return (0, exports.isNaN)(n) ? val : n;\n};\nexports.toNumber = toNumber;\n//# sourceMappingURL=number.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clone = exports.isObject = void 0;\nvar isObject = function (val) {\n return val !== null && typeof val === 'object';\n};\nexports.isObject = isObject;\nvar clone = function (target) {\n if (target === null) {\n return target;\n }\n if (target instanceof Date) {\n return new Date(target.getTime());\n }\n if (target instanceof Array) {\n var cp_1 = [];\n target.forEach(function (v) {\n cp_1.push(v);\n });\n return cp_1.map(function (n) { return (0, exports.clone)(n); });\n }\n if (typeof target === 'object' && Object.keys(target).length) {\n var cp_2 = __assign({}, target);\n Object.keys(cp_2).forEach(function (k) {\n cp_2[k] = (0, exports.clone)(cp_2[k]);\n });\n return cp_2;\n }\n return target;\n};\nexports.clone = clone;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCoreNodeAndRelativeLeafNodes = exports.getAvgNodePosition = exports.getLayoutBBox = exports.traverseTreeUp = exports.scaleMatrix = exports.getAdjMatrix = exports.floydWarshall = exports.getDegreeMap = exports.getDegree = exports.getEdgeTerminal = void 0;\nvar array_1 = require(\"./array\");\nvar number_1 = require(\"./number\");\nvar object_1 = require(\"./object\");\nvar getEdgeTerminal = function (edge, type) {\n var terminal = edge[type];\n if ((0, object_1.isObject)(terminal)) {\n return terminal.cell;\n }\n return terminal;\n};\nexports.getEdgeTerminal = getEdgeTerminal;\nvar getDegree = function (n, nodeIdxMap, edges) {\n var degrees = [];\n for (var i = 0; i < n; i++) {\n degrees[i] = {\n in: 0,\n out: 0,\n all: 0\n };\n }\n if (!edges)\n return degrees;\n edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n if (source && degrees[nodeIdxMap[source]]) {\n degrees[nodeIdxMap[source]].out += 1;\n degrees[nodeIdxMap[source]].all += 1;\n }\n if (target && degrees[nodeIdxMap[target]]) {\n degrees[nodeIdxMap[target]].in += 1;\n degrees[nodeIdxMap[target]].all += 1;\n }\n });\n return degrees;\n};\nexports.getDegree = getDegree;\nvar getDegreeMap = function (nodes, edges) {\n var degreesMap = {};\n nodes.forEach(function (node) {\n degreesMap[node.id] = {\n in: 0,\n out: 0,\n all: 0\n };\n });\n if (!edges)\n return degreesMap;\n edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n if (source) {\n degreesMap[source].out += 1;\n degreesMap[source].all += 1;\n }\n if (target) {\n degreesMap[target].in += 1;\n degreesMap[target].all += 1;\n }\n });\n return degreesMap;\n};\nexports.getDegreeMap = getDegreeMap;\nvar floydWarshall = function (adjMatrix) {\n // initialize\n var dist = [];\n var size = adjMatrix.length;\n for (var i = 0; i < size; i += 1) {\n dist[i] = [];\n for (var j = 0; j < size; j += 1) {\n if (i === j) {\n dist[i][j] = 0;\n }\n else if (adjMatrix[i][j] === 0 || !adjMatrix[i][j]) {\n dist[i][j] = Infinity;\n }\n else {\n dist[i][j] = adjMatrix[i][j];\n }\n }\n }\n // floyd\n for (var k = 0; k < size; k += 1) {\n for (var i = 0; i < size; i += 1) {\n for (var j = 0; j < size; j += 1) {\n if (dist[i][j] > dist[i][k] + dist[k][j]) {\n dist[i][j] = dist[i][k] + dist[k][j];\n }\n }\n }\n }\n return dist;\n};\nexports.floydWarshall = floydWarshall;\nvar getAdjMatrix = function (data, directed) {\n var nodes = data.nodes, edges = data.edges;\n var matrix = [];\n // map node with index in data.nodes\n var nodeMap = {};\n if (!nodes) {\n throw new Error('invalid nodes data!');\n }\n if (nodes) {\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n var row = [];\n matrix.push(row);\n });\n }\n edges === null || edges === void 0 ? void 0 : edges.forEach(function (e) {\n var source = (0, exports.getEdgeTerminal)(e, 'source');\n var target = (0, exports.getEdgeTerminal)(e, 'target');\n var sIndex = nodeMap[source];\n var tIndex = nodeMap[target];\n if (sIndex === undefined || tIndex === undefined)\n return;\n matrix[sIndex][tIndex] = 1;\n if (!directed) {\n matrix[tIndex][sIndex] = 1;\n }\n });\n return matrix;\n};\nexports.getAdjMatrix = getAdjMatrix;\n/**\n * scale matrix\n * @param matrix [ [], [], [] ]\n * @param ratio\n */\nvar scaleMatrix = function (matrix, ratio) {\n var result = [];\n matrix.forEach(function (row) {\n var newRow = [];\n row.forEach(function (v) {\n newRow.push(v * ratio);\n });\n result.push(newRow);\n });\n return result;\n};\nexports.scaleMatrix = scaleMatrix;\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseUp = function (data, fn) {\n if (data && data.children) {\n for (var i = data.children.length - 1; i >= 0; i--) {\n if (!traverseUp(data.children[i], fn))\n return;\n }\n }\n if (!fn(data)) {\n return false;\n }\n return true;\n};\n/**\n * depth first traverse, from leaves to root, children in inverse order\n * if the fn returns false, terminate the traverse\n */\nvar traverseTreeUp = function (data, fn) {\n if (typeof fn !== 'function') {\n return;\n }\n traverseUp(data, fn);\n};\nexports.traverseTreeUp = traverseTreeUp;\n/**\n * calculate the bounding box for the nodes according to their x, y, and size\n * @param nodes nodes in the layout\n * @returns\n */\nvar getLayoutBBox = function (nodes) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n nodes.forEach(function (node) {\n var size = node.size;\n if ((0, array_1.isArray)(size)) {\n if (size.length === 1)\n size = [size[0], size[0]];\n }\n else if ((0, number_1.isNumber)(size)) {\n size = [size, size];\n }\n else if (size === undefined || isNaN(size)) {\n size = [30, 30];\n }\n var halfSize = [size[0] / 2, size[1] / 2];\n var left = node.x - halfSize[0];\n var right = node.x + halfSize[0];\n var top = node.y - halfSize[1];\n var bottom = node.y + halfSize[1];\n if (minX > left)\n minX = left;\n if (minY > top)\n minY = top;\n if (maxX < right)\n maxX = right;\n if (maxY < bottom)\n maxY = bottom;\n });\n return { minX: minX, minY: minY, maxX: maxX, maxY: maxY };\n};\nexports.getLayoutBBox = getLayoutBBox;\n/**\n * 获取节点集合的平均位置信息\n * @param nodes 节点集合\n * @returns 平局内置\n */\nvar getAvgNodePosition = function (nodes) {\n var totalNodes = { x: 0, y: 0 };\n nodes.forEach(function (node) {\n totalNodes.x += node.x || 0;\n totalNodes.y += node.y || 0;\n });\n // 获取均值向量\n var length = nodes.length || 1;\n return {\n x: totalNodes.x / length,\n y: totalNodes.y / length,\n };\n};\nexports.getAvgNodePosition = getAvgNodePosition;\n// 找出指定节点关联的边的起点或终点\nvar getCoreNode = function (type, node, edges) {\n var _a, _b;\n if (type === 'source') {\n return (((_a = edges === null || edges === void 0 ? void 0 : edges.find(function (edge) { return edge.target === node.id; })) === null || _a === void 0 ? void 0 : _a.source) || {});\n }\n return (((_b = edges === null || edges === void 0 ? void 0 : edges.find(function (edge) { return edge.source === node.id; })) === null || _b === void 0 ? void 0 : _b.target) || {});\n};\n// 找出指定节点为起点或终点的所有一度叶子节点\nvar getRelativeNodeIds = function (type, coreNode, edges) {\n var relativeNodes = [];\n switch (type) {\n case 'source':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.source === coreNode.id; }).map(function (edge) { return edge.target; });\n break;\n case 'target':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.target === coreNode.id; }).map(function (edge) { return edge.source; });\n break;\n case 'both':\n relativeNodes = edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.source === coreNode.id; }).map(function (edge) { return edge.target; }).concat(edges === null || edges === void 0 ? void 0 : edges.filter(function (edge) { return edge.target === coreNode.id; }).map(function (edge) { return edge.source; }));\n break;\n default:\n break;\n }\n // 去重\n var set = new Set(relativeNodes);\n return Array.from(set);\n};\n// 找出同类型的节点\nvar getSameTypeNodes = function (type, nodeClusterBy, node, relativeNodes, degreesMap) {\n // @ts-ignore\n var typeName = node[nodeClusterBy] || '';\n // @ts-ignore\n var sameTypeNodes = (relativeNodes === null || relativeNodes === void 0 ? void 0 : relativeNodes.filter(function (item) { return item[nodeClusterBy] === typeName; })) || [];\n if (type === 'leaf') {\n sameTypeNodes = sameTypeNodes.filter(function (node) { var _a, _b; return ((_a = degreesMap[node.id]) === null || _a === void 0 ? void 0 : _a.in) === 0 || ((_b = degreesMap[node.id]) === null || _b === void 0 ? void 0 : _b.out) === 0; });\n }\n return sameTypeNodes;\n};\n// 找出与指定节点关联的边的起点或终点出发的所有一度叶子节点\nvar getCoreNodeAndRelativeLeafNodes = function (type, node, edges, nodeClusterBy, degreesMap, nodeMap) {\n var _a = degreesMap[node.id], inDegree = _a.in, outDegree = _a.out;\n var coreNode = node;\n var relativeLeafNodes = [];\n if (inDegree === 0) {\n // 如果为没有出边的叶子节点,则找出与它关联的边的起点出发的所有一度节点\n coreNode = getCoreNode('source', node, edges);\n relativeLeafNodes = getRelativeNodeIds('both', coreNode, edges).map(function (nodeId) { return nodeMap[nodeId]; });\n }\n else if (outDegree === 0) {\n // 如果为没有入边边的叶子节点,则找出与它关联的边的起点出发的所有一度节点\n coreNode = getCoreNode('target', node, edges);\n relativeLeafNodes = getRelativeNodeIds('both', coreNode, edges).map(function (nodeId) { return nodeMap[nodeId]; });\n }\n relativeLeafNodes = relativeLeafNodes.filter(function (node) { return degreesMap[node.id] && (degreesMap[node.id].in === 0 || degreesMap[node.id].out === 0); });\n var sameTypeLeafNodes = getSameTypeNodes(type, nodeClusterBy, node, relativeLeafNodes, degreesMap);\n return { coreNode: coreNode, relativeLeafNodes: relativeLeafNodes, sameTypeLeafNodes: sameTypeLeafNodes };\n};\nexports.getCoreNodeAndRelativeLeafNodes = getCoreNodeAndRelativeLeafNodes;\n//# sourceMappingURL=math.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFuncByUnknownType = exports.getFunc = exports.isFunction = void 0;\nvar _1 = require(\".\");\nvar number_1 = require(\"./number\");\nvar isFunction = function (val) {\n return typeof val === 'function';\n};\nexports.isFunction = isFunction;\nvar getFunc = function (value, defaultValue, func) {\n var resultFunc;\n if (func) {\n resultFunc = func;\n }\n else if ((0, number_1.isNumber)(value)) {\n resultFunc = function () { return value; };\n }\n else {\n resultFunc = function () { return defaultValue; };\n }\n return resultFunc;\n};\nexports.getFunc = getFunc;\nvar getFuncByUnknownType = function (defaultValue, value, resultIsNumber) {\n if (resultIsNumber === void 0) { resultIsNumber = true; }\n if (!value && value !== 0) {\n return function (d) {\n if (d.size) {\n if ((0, _1.isArray)(d.size))\n return d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n if ((0, _1.isObject)(d.size))\n return d.size.width > d.size.height ? d.size.width : d.size.height;\n return d.size;\n }\n return defaultValue;\n };\n }\n if ((0, exports.isFunction)(value)) {\n return value;\n }\n if ((0, number_1.isNumber)(value)) {\n return function () { return value; };\n }\n if ((0, _1.isArray)(value)) {\n return function () {\n if (resultIsNumber) {\n var max = Math.max.apply(Math, value);\n return isNaN(max) ? defaultValue : max;\n }\n return value;\n };\n }\n if ((0, _1.isObject)(value)) {\n return function () {\n if (resultIsNumber) {\n var max = Math.max(value.width, value.height);\n return isNaN(max) ? defaultValue : max;\n }\n return [value.width, value.height];\n };\n }\n return function () { return defaultValue; };\n};\nexports.getFuncByUnknownType = getFuncByUnknownType;\n//# sourceMappingURL=function.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./string\"), exports);\n__exportStar(require(\"./array\"), exports);\n__exportStar(require(\"./number\"), exports);\n__exportStar(require(\"./math\"), exports);\n__exportStar(require(\"./object\"), exports);\n__exportStar(require(\"./function\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLayoutByName = exports.unRegisterLayout = exports.registerLayout = void 0;\nvar base_1 = require(\"../layout/base\");\nvar util_1 = require(\"../util\");\nvar map = new Map();\nvar registerLayout = function (name, layoutOverride) {\n if (map.get(name)) {\n console.warn(\"The layout with the name \".concat(name, \" exists already, it will be overridden\"));\n }\n if ((0, util_1.isObject)(layoutOverride)) {\n // tslint:disable-next-line: max-classes-per-file\n var GLayout = /** @class */ (function (_super) {\n __extends(GLayout, _super);\n function GLayout(cfg) {\n var _this = this;\n var _a;\n _this = _super.call(this) || this;\n var self = _this;\n var props = {};\n var defaultCfg = Object.assign({}, self.getDefaultCfg(), ((_a = layoutOverride.getDefaultCfg) === null || _a === void 0 ? void 0 : _a.call(layoutOverride)) || {});\n Object.assign(props, defaultCfg, layoutOverride, cfg);\n Object.keys(props).forEach(function (key) {\n var value = props[key];\n self[key] = value;\n });\n return _this;\n }\n return GLayout;\n }(base_1.Base));\n map.set(name, GLayout);\n }\n else {\n map.set(name, layoutOverride);\n }\n return map.get(name);\n};\nexports.registerLayout = registerLayout;\nvar unRegisterLayout = function (name) {\n if (map.has(name)) {\n map.delete(name);\n }\n};\nexports.unRegisterLayout = unRegisterLayout;\nvar getLayoutByName = function (name) {\n if (map.has(name)) {\n return map.get(name);\n }\n return null;\n};\nexports.getLayoutByName = getLayoutByName;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview grid layout\n * @author shiwu.wyy@antfin.com\n * this algorithm refers to - https://github.com/cytoscape/cytoscape.js/\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridLayout = void 0;\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * 网格布局\n */\nvar GridLayout = /** @class */ (function (_super) {\n __extends(GridLayout, _super);\n function GridLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局起始点 */\n _this.begin = [0, 0];\n /** prevents node overlap, may overflow boundingBox if not enough space */\n _this.preventOverlap = true;\n /** extra spacing around nodes when preventOverlap: true */\n _this.preventOverlapPadding = 10;\n /** uses all available space on false, uses minimal space on true */\n _this.condense = false;\n /** a sorting function to order the nodes; e.g. function(a, b){ return a.datapublic ('weight') - b.data('weight') } */\n _this.sortBy = \"degree\";\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.row = 0;\n _this.col = 0;\n _this.cellWidth = 0;\n _this.cellHeight = 0;\n _this.cellUsed = {};\n _this.id2manPos = {};\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n GridLayout.prototype.getDefaultCfg = function () {\n return {\n begin: [0, 0],\n preventOverlap: true,\n preventOverlapPadding: 10,\n condense: false,\n rows: undefined,\n cols: undefined,\n position: undefined,\n sortBy: \"degree\",\n nodeSize: 30\n };\n };\n /**\n * 执行布局\n */\n GridLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, edges = self.edges, begin = self.begin;\n var n = nodes.length;\n if (n === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n }\n if (n === 1) {\n nodes[0].x = begin[0];\n nodes[0].y = begin[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges,\n };\n }\n var sortBy = self.sortBy, width = self.width, height = self.height;\n var condense = self.condense, preventOverlapPadding = self.preventOverlapPadding, preventOverlap = self.preventOverlap, paramNodeSpacing = self.nodeSpacing, paramNodeSize = self.nodeSize;\n var layoutNodes = [];\n nodes.forEach(function (node) {\n layoutNodes.push(node);\n });\n var nodeIdxMap = {};\n layoutNodes.forEach(function (node, i) {\n nodeIdxMap[node.id] = i;\n });\n if (sortBy === \"degree\" ||\n !(0, util_1.isString)(sortBy) ||\n layoutNodes[0][sortBy] === undefined) {\n sortBy = \"degree\";\n if ((0, util_1.isNaN)(nodes[0].degree)) {\n var values_1 = (0, util_1.getDegree)(layoutNodes.length, nodeIdxMap, edges);\n layoutNodes.forEach(function (node, i) {\n node.degree = values_1[i].all;\n });\n }\n }\n // sort nodes by value\n layoutNodes.sort(function (n1, n2) { return n2[sortBy] - n1[sortBy]; });\n if (!width && typeof window !== \"undefined\") {\n width = window.innerWidth;\n }\n if (!height && typeof window !== \"undefined\") {\n height = window.innerHeight;\n }\n var oRows = self.rows;\n var oCols = self.cols != null ? self.cols : self.columns;\n self.cells = n;\n // if rows or columns were set in self, use those values\n if (oRows != null && oCols != null) {\n self.rows = oRows;\n self.cols = oCols;\n }\n else if (oRows != null && oCols == null) {\n self.rows = oRows;\n self.cols = Math.ceil(self.cells / self.rows);\n }\n else if (oRows == null && oCols != null) {\n self.cols = oCols;\n self.rows = Math.ceil(self.cells / self.cols);\n }\n else {\n // otherwise use the automatic values and adjust accordingly\t // otherwise use the automatic values and adjust accordingly\n // width/height * splits^2 = cells where splits is number of times to split width\n self.splits = Math.sqrt((self.cells * self.height) / self.width);\n self.rows = Math.round(self.splits);\n self.cols = Math.round((self.width / self.height) * self.splits);\n }\n self.rows = Math.max(self.rows, 1);\n self.cols = Math.max(self.cols, 1);\n if (self.cols * self.rows > self.cells) {\n // otherwise use the automatic values and adjust accordingly\n // if rounding was up, see if we can reduce rows or columns\n var sm = self.small();\n var lg = self.large();\n // reducing the small side takes away the most cells, so try it first\n if ((sm - 1) * lg >= self.cells) {\n self.small(sm - 1);\n }\n else if ((lg - 1) * sm >= self.cells) {\n self.large(lg - 1);\n }\n }\n else {\n // if rounding was too low, add rows or columns\n while (self.cols * self.rows < self.cells) {\n var sm = self.small();\n var lg = self.large();\n // try to add to larger side first (adds less in multiplication)\n if ((lg + 1) * sm >= self.cells) {\n self.large(lg + 1);\n }\n else {\n self.small(sm + 1);\n }\n }\n }\n self.cellWidth = width / self.cols;\n self.cellHeight = height / self.rows;\n if (condense) {\n self.cellWidth = 0;\n self.cellHeight = 0;\n }\n if (preventOverlap || paramNodeSpacing) {\n var nodeSpacing_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSpacing);\n var nodeSize_1 = (0, util_1.getFuncByUnknownType)(30, paramNodeSize, false);\n layoutNodes.forEach(function (node) {\n if (!node.x || !node.y) {\n // for bb\n node.x = 0;\n node.y = 0;\n }\n var res = nodeSize_1(node) || 30;\n var nodeW;\n var nodeH;\n if ((0, util_1.isArray)(res)) {\n nodeW = res[0];\n nodeH = res[1];\n }\n else {\n nodeW = res;\n nodeH = res;\n }\n var p = nodeSpacing_1 !== undefined ? nodeSpacing_1(node) : preventOverlapPadding;\n var w = nodeW + p;\n var h = nodeH + p;\n self.cellWidth = Math.max(self.cellWidth, w);\n self.cellHeight = Math.max(self.cellHeight, h);\n });\n }\n self.cellUsed = {}; // e.g. 'c-0-2' => true\n // to keep track of current cell position\n self.row = 0;\n self.col = 0;\n // get a cache of all the manual positions\n self.id2manPos = {};\n for (var i = 0; i < layoutNodes.length; i++) {\n var node = layoutNodes[i];\n var rcPos = void 0;\n if (self.position) {\n rcPos = self.position(node);\n }\n if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) {\n // must have at least row or col def'd\n var pos = {\n row: rcPos.row,\n col: rcPos.col\n };\n if (pos.col === undefined) {\n // find unused col\n pos.col = 0;\n while (self.used(pos.row, pos.col)) {\n pos.col++;\n }\n }\n else if (pos.row === undefined) {\n // find unused row\n pos.row = 0;\n while (self.used(pos.row, pos.col)) {\n pos.row++;\n }\n }\n self.id2manPos[node.id] = pos;\n self.use(pos.row, pos.col);\n }\n self.getPos(node);\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n edges: edges,\n nodes: layoutNodes\n };\n };\n GridLayout.prototype.small = function (val) {\n var self = this;\n var res;\n var rows = self.rows || 5;\n var cols = self.cols || 5;\n if (val == null) {\n res = Math.min(rows, cols);\n }\n else {\n var min = Math.min(rows, cols);\n if (min === self.rows) {\n self.rows = val;\n }\n else {\n self.cols = val;\n }\n }\n return res;\n };\n GridLayout.prototype.large = function (val) {\n var self = this;\n var res;\n var rows = self.rows || 5;\n var cols = self.cols || 5;\n if (val == null) {\n res = Math.max(rows, cols);\n }\n else {\n var max = Math.max(rows, cols);\n if (max === self.rows) {\n self.rows = val;\n }\n else {\n self.cols = val;\n }\n }\n return res;\n };\n GridLayout.prototype.used = function (row, col) {\n var self = this;\n return self.cellUsed[\"c-\".concat(row, \"-\").concat(col)] || false;\n };\n GridLayout.prototype.use = function (row, col) {\n var self = this;\n self.cellUsed[\"c-\".concat(row, \"-\").concat(col)] = true;\n };\n GridLayout.prototype.moveToNextCell = function () {\n var self = this;\n var cols = self.cols || 5;\n self.col++;\n if (self.col >= cols) {\n self.col = 0;\n self.row++;\n }\n };\n GridLayout.prototype.getPos = function (node) {\n var self = this;\n var begin = self.begin, cellWidth = self.cellWidth, cellHeight = self.cellHeight;\n var x;\n var y;\n // see if we have a manual position set\n var rcPos = self.id2manPos[node.id];\n if (rcPos) {\n x = rcPos.col * cellWidth + cellWidth / 2 + begin[0];\n y = rcPos.row * cellHeight + cellHeight / 2 + begin[1];\n }\n else {\n // otherwise set automatically\n while (self.used(self.row, self.col)) {\n self.moveToNextCell();\n }\n x = self.col * cellWidth + cellWidth / 2 + begin[0];\n y = self.row * cellHeight + cellHeight / 2 + begin[1];\n self.use(self.row, self.col);\n self.moveToNextCell();\n }\n node.x = x;\n node.y = y;\n };\n GridLayout.prototype.getType = function () {\n return \"grid\";\n };\n return GridLayout;\n}(base_1.Base));\nexports.GridLayout = GridLayout;\n//# sourceMappingURL=grid.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RandomLayout = void 0;\nvar base_1 = require(\"./base\");\n/**\n * 随机布局\n */\nvar RandomLayout = /** @class */ (function (_super) {\n __extends(RandomLayout, _super);\n function RandomLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 宽度 */\n _this.width = 300;\n /** 高度 */\n _this.height = 300;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n RandomLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n width: 300,\n height: 300\n };\n };\n /**\n * 执行布局\n */\n RandomLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var layoutScale = 0.9;\n var center = self.center;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (nodes) {\n nodes.forEach(function (node) {\n node.x = (Math.random() - 0.5) * layoutScale * self.width + center[0];\n node.y = (Math.random() - 0.5) * layoutScale * self.height + center[1];\n });\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: this.edges\n };\n };\n RandomLayout.prototype.getType = function () {\n return \"random\";\n };\n return RandomLayout;\n}(base_1.Base));\nexports.RandomLayout = RandomLayout;\n//# sourceMappingURL=random.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GForceLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function (d) {\n return defaultV || 1;\n };\n }\n else if ((0, util_1.isNumber)(value)) {\n func = function (d) {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\n/**\n * graphin 中的 force 布局\n */\nvar GForceLayout = /** @class */ (function (_super) {\n __extends(GForceLayout, _super);\n function GForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 500;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 1000;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.5;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 1;\n /** 重力大小 */\n _this.gravity = 10;\n /** 是否防止重叠 */\n _this.preventOverlap = true;\n /** 防止重叠的力大小参数 */\n _this.collideStrength = 1;\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n /** 是否使用 window.setInterval 运行迭代 */\n _this.animate = true;\n _this.updateCfg(options);\n return _this;\n }\n GForceLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 500,\n gravity: 10,\n enableTick: true,\n animate: true,\n };\n };\n /**\n * 执行布局\n */\n GForceLayout.prototype.execute = function () {\n var _a, _b;\n var self = this;\n var nodes = self.nodes;\n if (self.timeInterval !== undefined && typeof window !== \"undefined\") {\n window.clearInterval(self.timeInterval);\n }\n if (!nodes || nodes.length === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.linkDistance = proccessToFunc(self.linkDistance, 1);\n self.nodeStrength = proccessToFunc(self.nodeStrength, 1);\n self.edgeStrength = proccessToFunc(self.edgeStrength, 1);\n // node size function\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n if (self.preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return Math.max(d.size[0], d.size[1]) + nodeSpacingFunc_1(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n return Math.max(d.size.width, d.size.height) + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return Math.max(nodeSize[0], nodeSize[1]) + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n }\n self.nodeSize = nodeSizeFunc;\n var edges = self.edges;\n self.degrees = (0, util_1.getDegree)(nodes.length, self.nodeIdxMap, edges);\n if (!self.getMass) {\n self.getMass = function (d) {\n var mass = d.mass || self.degrees[self.nodeIdxMap[d.id]].all || 1;\n return mass;\n };\n }\n // layout\n self.run();\n };\n GForceLayout.prototype.run = function () {\n var _a;\n var self = this;\n var maxIteration = self.maxIteration, nodes = self.nodes, workerEnabled = self.workerEnabled, minMovement = self.minMovement, animate = self.animate;\n if (!nodes)\n return;\n if (workerEnabled || !animate) {\n for (var i = 0; i < maxIteration; i++) {\n var previousPos = self.runOneStep(i);\n if (self.reachMoveThreshold(nodes, previousPos, minMovement)) {\n break;\n }\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n }\n else {\n if (typeof window === \"undefined\")\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n var _a, _b;\n if (!nodes)\n return;\n var previousPos = self.runOneStep(iter_1) || [];\n if (self.reachMoveThreshold(nodes, previousPos, minMovement)) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n window.clearInterval(self.timeInterval);\n }\n iter_1++;\n if (iter_1 >= maxIteration) {\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n };\n GForceLayout.prototype.reachMoveThreshold = function (nodes, previousPos, minMovement) {\n // whether to stop the iteration\n var movement = 0;\n nodes.forEach(function (node, j) {\n var vx = node.x - previousPos[j].x;\n var vy = node.y - previousPos[j].y;\n movement += Math.sqrt(vx * vx + vy * vy);\n });\n movement /= nodes.length;\n return movement < minMovement;\n };\n GForceLayout.prototype.runOneStep = function (iter) {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n var accArray = [];\n var velArray = [];\n if (!nodes)\n return;\n nodes.forEach(function (_, i) {\n accArray[2 * i] = 0;\n accArray[2 * i + 1] = 0;\n velArray[2 * i] = 0;\n velArray[2 * i + 1] = 0;\n });\n self.calRepulsive(accArray, nodes);\n if (edges)\n self.calAttractive(accArray, edges);\n self.calGravity(accArray, nodes);\n var stepInterval = Math.max(0.02, self.interval - iter * 0.002);\n self.updateVelocity(accArray, velArray, stepInterval, nodes);\n var previousPos = [];\n nodes.forEach(function (node) {\n previousPos.push({\n x: node.x,\n y: node.y\n });\n });\n self.updatePosition(velArray, stepInterval, nodes);\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n return previousPos;\n };\n GForceLayout.prototype.calRepulsive = function (accArray, nodes) {\n var self = this;\n var getMass = self.getMass, factor = self.factor, coulombDisScale = self.coulombDisScale, preventOverlap = self.preventOverlap, _a = self.collideStrength, collideStrength = _a === void 0 ? 1 : _a;\n var nodeStrength = self.nodeStrength;\n var nodeSize = self.nodeSize;\n nodes.forEach(function (ni, i) {\n var massi = getMass ? getMass(ni) : 1;\n nodes.forEach(function (nj, j) {\n if (i >= j)\n return;\n // if (!accArray[j]) accArray[j] = 0;\n var vecX = ni.x - nj.x;\n var vecY = ni.y - nj.y;\n if (vecX === 0 && vecY === 0) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var lengthSqr = vecX * vecX + vecY * vecY;\n var vecLength = Math.sqrt(lengthSqr);\n var nVecLength = (vecLength + 0.1) * coulombDisScale;\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n var param = (((nodeStrength(ni) + nodeStrength(nj)) * 0.5) * factor) /\n (nVecLength * nVecLength);\n var massj = getMass ? getMass(nj) : 1;\n accArray[2 * i] += (direX * param);\n accArray[2 * i + 1] += (direY * param);\n accArray[2 * j] -= (direX * param);\n accArray[2 * j + 1] -= (direY * param);\n if (preventOverlap && (nodeSize(ni) + nodeSize(nj)) / 2 > vecLength) {\n var paramOverlap = collideStrength * (nodeStrength(ni) + nodeStrength(nj)) * 0.5 / lengthSqr;\n accArray[2 * i] += (direX * paramOverlap) / massi;\n accArray[2 * i + 1] += (direY * paramOverlap) / massi;\n accArray[2 * j] -= (direX * paramOverlap) / massj;\n accArray[2 * j + 1] -= (direY * paramOverlap) / massj;\n }\n });\n });\n };\n GForceLayout.prototype.calAttractive = function (accArray, edges) {\n var self = this;\n var nodeMap = self.nodeMap, nodeIdxMap = self.nodeIdxMap, linkDistance = self.linkDistance, edgeStrength = self.edgeStrength;\n var nodeSize = self.nodeSize;\n var getMass = self.getMass;\n edges.forEach(function (edge, i) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n var sourceNode = nodeMap[source];\n var targetNode = nodeMap[target];\n var vecX = targetNode.x - sourceNode.x;\n var vecY = targetNode.y - sourceNode.y;\n if (vecX === 0 && vecY === 0) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n var length = linkDistance(edge, sourceNode, targetNode) || 1 + ((nodeSize(sourceNode) + nodeSize(targetNode)) || 0) / 2;\n var diff = length - vecLength;\n var param = diff * edgeStrength(edge);\n var sourceIdx = nodeIdxMap[source];\n var targetIdx = nodeIdxMap[target];\n var massSource = getMass ? getMass(sourceNode) : 1;\n var massTarget = getMass ? getMass(targetNode) : 1;\n accArray[2 * sourceIdx] -= (direX * param) / massSource;\n accArray[2 * sourceIdx + 1] -= (direY * param) / massSource;\n accArray[2 * targetIdx] += (direX * param) / massTarget;\n accArray[2 * targetIdx + 1] += (direY * param) / massTarget;\n });\n };\n GForceLayout.prototype.calGravity = function (accArray, nodes) {\n var self = this;\n // const nodes = self.nodes;\n var center = self.center;\n var defaultGravity = self.gravity;\n var degrees = self.degrees;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var vecX = node.x - center[0];\n var vecY = node.y - center[1];\n var gravity = defaultGravity;\n if (self.getCenter) {\n var customCenterOpt = self.getCenter(node, degrees[i].all);\n if (customCenterOpt &&\n (0, util_1.isNumber)(customCenterOpt[0]) &&\n (0, util_1.isNumber)(customCenterOpt[1]) &&\n (0, util_1.isNumber)(customCenterOpt[2])) {\n vecX = node.x - customCenterOpt[0];\n vecY = node.y - customCenterOpt[1];\n gravity = customCenterOpt[2];\n }\n }\n if (!gravity)\n continue;\n accArray[2 * i] -= gravity * vecX;\n accArray[2 * i + 1] -= gravity * vecY;\n }\n };\n GForceLayout.prototype.updateVelocity = function (accArray, velArray, stepInterval, nodes) {\n var self = this;\n var param = stepInterval * self.damping;\n // const nodes = self.nodes;\n nodes.forEach(function (node, i) {\n var vx = accArray[2 * i] * param || 0.01;\n var vy = accArray[2 * i + 1] * param || 0.01;\n var vLength = Math.sqrt(vx * vx + vy * vy);\n if (vLength > self.maxSpeed) {\n var param2 = self.maxSpeed / vLength;\n vx = param2 * vx;\n vy = param2 * vy;\n }\n velArray[2 * i] = vx;\n velArray[2 * i + 1] = vy;\n });\n };\n GForceLayout.prototype.updatePosition = function (velArray, stepInterval, nodes) {\n nodes.forEach(function (node, i) {\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n node.x = node.fx;\n node.y = node.fy;\n return;\n }\n var distX = velArray[2 * i] * stepInterval;\n var distY = velArray[2 * i + 1] * stepInterval;\n node.x += distX;\n node.y += distY;\n });\n };\n GForceLayout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== \"undefined\") {\n window.clearInterval(this.timeInterval);\n }\n };\n GForceLayout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n GForceLayout.prototype.getType = function () {\n return \"gForce\";\n };\n return GForceLayout;\n}(base_1.Base));\nexports.GForceLayout = GForceLayout;\n//# sourceMappingURL=gForce.js.map","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.forceNBody = void 0;\nvar d3_quadtree_1 = require(\"d3-quadtree\");\nvar theta2 = 0.81; // Barnes-Hut approximation threshold\nvar epsilon = 0.1; // 为了防止出现除0的情况,加一个epsilon\nfunction forceNBody(nodes, nodeMap, factor, coulombDisScale2, accArray) {\n var weightParam = factor / coulombDisScale2;\n var data = nodes.map(function (n, i) {\n // @ts-ignore\n var mappedNode = nodeMap[n.id];\n // @ts-ignore\n var nodeData = mappedNode.data, x = mappedNode.x, y = mappedNode.y, size = mappedNode.size;\n var nodeStrength = nodeData.layout.force.nodeStrength;\n return {\n x: x,\n y: y,\n size: size,\n index: i,\n vx: 0,\n vy: 0,\n weight: weightParam * nodeStrength,\n };\n });\n var tree = (0, d3_quadtree_1.quadtree)(data, function (d) { return d.x; }, function (d) { return d.y; }).visitAfter(accumulate); // init internal node\n data.forEach(function (n) {\n // @ts-ignore\n computeForce(n, tree);\n });\n data.map(function (n, i) {\n // @ts-ignore\n var mappedNode = nodeMap[nodes[i].id];\n // @ts-ignore\n var _a = mappedNode.data.layout.force.mass, mass = _a === void 0 ? 1 : _a;\n // 从 0 开始,= 初始化 + 加斥力\n accArray[2 * i] = n.vx / mass;\n accArray[2 * i + 1] = n.vy / mass;\n });\n return accArray;\n}\nexports.forceNBody = forceNBody;\n// @ts-ignore\nfunction accumulate(quad) {\n var accWeight = 0;\n var accX = 0;\n var accY = 0;\n if (quad.length) {\n // internal node, accumulate 4 child quads\n for (var i = 0; i < 4; i++) {\n var q = quad[i];\n if (q && q.weight) {\n accWeight += q.weight;\n accX += q.x * q.weight;\n accY += q.y * q.weight;\n }\n }\n quad.x = accX / accWeight;\n quad.y = accY / accWeight;\n quad.weight = accWeight;\n }\n else {\n // leaf node\n var q = quad;\n quad.x = q.data.x;\n quad.y = q.data.y;\n quad.weight = q.data.weight;\n }\n}\n// @ts-ignore\nvar apply = function (quad, x1, y1, x2, y2, node) {\n var dx = (node.x - quad.x) || epsilon;\n var dy = (node.y - quad.y) || epsilon;\n var width = x2 - x1;\n var len2 = dx * dx + dy * dy;\n var len3 = Math.sqrt(len2) * len2;\n // far node, apply Barnes-Hut approximation\n if ((width * width) * theta2 < len2) {\n var param = quad.weight / len3;\n node.vx += dx * param;\n node.vy += dy * param;\n return true;\n }\n // near quad, compute force directly\n if (quad.length)\n return false; // internal node, visit children\n // leaf node\n if (quad.data !== node) {\n var param = quad.data.weight / len3;\n node.vx += dx * param;\n node.vy += dy * param;\n }\n};\n// @ts-ignore\nfunction computeForce(node, tree) {\n // @ts-ignore\n tree.visit(function (quad, x1, y1, x2, y2) { return apply(quad, x1, y1, x2, y2, node); });\n}\n//# sourceMappingURL=ForceNBody.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Force2Layout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\nvar ForceNBody_1 = require(\"./ForceNBody\");\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function (d) {\n return defaultV || 1;\n };\n }\n else if ((0, util_1.isNumber)(value)) {\n func = function (d) {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\n/**\n * graphin 中的 force 布局\n */\nvar Force2Layout = /** @class */ (function (_super) {\n __extends(Force2Layout, _super);\n function Force2Layout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 500;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.4;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 200;\n /** 重力大小 */\n _this.gravity = 0;\n /** 节点聚类作用力系数 */\n _this.clusterNodeStrength = 20;\n /** 是否防止重叠 */\n _this.preventOverlap = true;\n /** 阈值的使用条件,mean 代表平均移动距离小于 minMovement 时停止迭代,max 代表最大移动距离大时 minMovement 时停时迭代。默认为 mean */\n _this.distanceThresholdMode = 'mean';\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.judgingDistance = 0;\n /** 默认的向心配置 */\n _this.centripetalOptions = {\n leaf: 2,\n single: 2,\n others: 1,\n // eslint-disable-next-line\n center: function (n) {\n return {\n x: _this.width / 2,\n y: _this.height / 2,\n };\n },\n };\n var getMass = options.getMass;\n _this.propsGetMass = getMass;\n _this.updateCfg(options);\n return _this;\n }\n Force2Layout.prototype.getCentripetalOptions = function () {\n var _a = this, leafCluster = _a.leafCluster, clustering = _a.clustering, nodeClusterBy = _a.nodeClusterBy, nodes = _a.nodes, nodeMap = _a.nodeMap, propsClusterNodeStrength = _a.clusterNodeStrength;\n var getClusterNodeStrength = function (node) {\n return typeof propsClusterNodeStrength === 'function'\n ? propsClusterNodeStrength(node)\n : propsClusterNodeStrength;\n };\n var centripetalOptions = {};\n var sameTypeLeafMap;\n // 如果传入了需要叶子节点聚类\n if (leafCluster) {\n sameTypeLeafMap = this.getSameTypeLeafMap() || {};\n var relativeNodesType_1 = Array.from(new Set(nodes === null || nodes === void 0 ? void 0 : nodes.map(function (node) { return node[nodeClusterBy]; }))) || [];\n centripetalOptions = {\n single: 100,\n leaf: function (node, nodes, edges) {\n // 找出与它关联的边的起点或终点出发的所有一度节点中同类型的叶子节点\n var _a = sameTypeLeafMap[node.id] || {}, relativeLeafNodes = _a.relativeLeafNodes, sameTypeLeafNodes = _a.sameTypeLeafNodes;\n // 如果都是同一类型或者每种类型只有1个,则施加默认向心力\n if ((sameTypeLeafNodes === null || sameTypeLeafNodes === void 0 ? void 0 : sameTypeLeafNodes.length) === (relativeLeafNodes === null || relativeLeafNodes === void 0 ? void 0 : relativeLeafNodes.length) ||\n (relativeNodesType_1 === null || relativeNodesType_1 === void 0 ? void 0 : relativeNodesType_1.length) === 1) {\n return 1;\n }\n return getClusterNodeStrength(node);\n },\n others: 1,\n center: function (node, nodes, edges) {\n var _a;\n var degree = (((_a = node.data) === null || _a === void 0 ? void 0 : _a.layout) || {}).degree;\n // 孤点默认给1个远离的中心点\n if (!degree) {\n return {\n x: 100,\n y: 100,\n };\n }\n var centerNode;\n if (degree === 1) {\n // 如果为叶子节点\n // 找出与它关联的边的起点出发的所有一度节点中同类型的叶子节点\n var _b = (sameTypeLeafMap[node.id] || {}).sameTypeLeafNodes, sameTypeLeafNodes = _b === void 0 ? [] : _b;\n if (sameTypeLeafNodes.length === 1) {\n // 如果同类型的叶子节点只有1个,中心节点置为undefined\n centerNode = undefined;\n }\n else if (sameTypeLeafNodes.length > 1) {\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n centerNode = (0, util_1.getAvgNodePosition)(sameTypeLeafNodes);\n }\n }\n else {\n centerNode = undefined;\n }\n return {\n x: centerNode === null || centerNode === void 0 ? void 0 : centerNode.x,\n y: centerNode === null || centerNode === void 0 ? void 0 : centerNode.y,\n };\n },\n };\n }\n // 如果传入了全局节点聚类\n if (clustering) {\n if (!sameTypeLeafMap)\n sameTypeLeafMap = this.getSameTypeLeafMap();\n var clusters = Array.from(new Set(nodes.map(function (node, i) {\n return node[nodeClusterBy];\n }))).filter(function (item) { return item !== undefined; });\n var centerNodeInfo_1 = {};\n clusters.forEach(function (cluster) {\n var sameTypeNodes = nodes\n .filter(function (item) { return item[nodeClusterBy] === cluster; })\n .map(function (node) { return nodeMap[node.id]; });\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n centerNodeInfo_1[cluster] = (0, util_1.getAvgNodePosition)(sameTypeNodes);\n });\n centripetalOptions = {\n single: function (node) { return getClusterNodeStrength(node); },\n leaf: function (node) { return getClusterNodeStrength(node); },\n others: function (node) { return getClusterNodeStrength(node); },\n center: function (node, nodes, edges) {\n // 找出同类型节点平均位置节点的距离最近的节点作为中心节点\n var centerNode = centerNodeInfo_1[node[nodeClusterBy]];\n return {\n x: centerNode === null || centerNode === void 0 ? void 0 : centerNode.x,\n y: centerNode === null || centerNode === void 0 ? void 0 : centerNode.y,\n };\n },\n };\n }\n this.centripetalOptions = __assign(__assign({}, this.centripetalOptions), centripetalOptions);\n var _b = this.centripetalOptions, leaf = _b.leaf, single = _b.single, others = _b.others;\n if (leaf && typeof leaf !== 'function')\n this.centripetalOptions.leaf = function () { return leaf; };\n if (single && typeof single !== 'function')\n this.centripetalOptions.single = function () { return single; };\n if (others && typeof others !== 'function')\n this.centripetalOptions.others = function () { return others; };\n };\n Force2Layout.prototype.updateCfg = function (cfg) {\n if (cfg)\n Object.assign(this, cfg);\n };\n Force2Layout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 500,\n gravity: 10,\n enableTick: true,\n animate: true,\n };\n };\n /**\n * 执行布局\n */\n Force2Layout.prototype.execute = function () {\n var self = this;\n self.stop();\n var nodes = self.nodes, edges = self.edges, defSpringLen = self.defSpringLen;\n self.judgingDistance = 0;\n if (!nodes || nodes.length === 0) {\n self.onLayoutEnd([]);\n return;\n }\n if (!self.width && typeof window !== 'undefined') {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== 'undefined') {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n self.onLayoutEnd([__assign({}, nodes[0])]);\n return;\n }\n self.degreesMap = (0, util_1.getDegreeMap)(nodes, edges);\n if (self.propsGetMass) {\n self.getMass = self.propsGetMass;\n }\n else {\n self.getMass = function (d) {\n var massWeight = 1;\n if ((0, util_1.isNumber)(d.mass))\n massWeight = d.mass;\n var degree = self.degreesMap[d.id].all;\n return !degree || degree < 5 ? massWeight : degree * 5 * massWeight;\n };\n }\n // node size function\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n if (self.preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return Math.max(d.size[0], d.size[1]) + nodeSpacingFunc_1(d);\n }\n else if ((0, util_1.isObject)(d.size)) {\n return Math.max(d.size.width, d.size.height) + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return Math.max(nodeSize[0], nodeSize[1]) + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n }\n self.nodeSize = nodeSizeFunc;\n self.linkDistance = proccessToFunc(self.linkDistance, 1);\n self.nodeStrength = proccessToFunc(self.nodeStrength, 1);\n self.edgeStrength = proccessToFunc(self.edgeStrength, 1);\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n var degree = self.degreesMap[node.id];\n nodeMap[node.id] = __assign(__assign({}, node), { data: __assign(__assign({}, node.data), { size: self.nodeSize(node) || 30, layout: {\n inDegree: degree.in,\n outDegree: degree.out,\n degree: degree.all,\n tDegree: degree.in,\n sDegree: degree.out,\n force: {\n mass: self.getMass(node),\n nodeStrength: self.nodeStrength(node, edges),\n },\n } }) });\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.edgeInfos = [];\n edges === null || edges === void 0 ? void 0 : edges.forEach(function (edge) {\n var sourceNode = nodeMap[edge.source];\n var targetNode = nodeMap[edge.target];\n if (!sourceNode || !targetNode) {\n elf.edgeInfos.push({});\n }\n else {\n self.edgeInfos.push({\n edgeStrength: self.edgeStrength(edge),\n linkDistance: defSpringLen\n ? defSpringLen(__assign(__assign({}, edge), { source: sourceNode, target: targetNode }), sourceNode, targetNode)\n : self.linkDistance(edge, sourceNode, targetNode) ||\n 1 + (nodeSize(sourceNode) + nodeSize(sourceNode) || 0) / 2,\n });\n }\n });\n this.getCentripetalOptions();\n self.onLayoutEnd = self.onLayoutEnd || (function () { });\n self.run();\n };\n Force2Layout.prototype.run = function () {\n var self = this;\n var maxIteration = self.maxIteration, nodes = self.nodes, edges = self.edges, workerEnabled = self.workerEnabled, minMovement = self.minMovement, animate = self.animate, nodeMap = self.nodeMap, height = self.height;\n self.currentMinY = 0;\n self.currentMaxY = height;\n if (!nodes)\n return;\n var velArray = [];\n nodes.forEach(function (_, i) {\n velArray[2 * i] = 0;\n velArray[2 * i + 1] = 0;\n });\n if (this.defSideCoe && typeof this.defSideCoe === 'function') {\n var relatedEdges_1 = {};\n edges.forEach(function (edge) {\n var source = edge.source, target = edge.target;\n relatedEdges_1[source] = relatedEdges_1[source] || [];\n relatedEdges_1[source].push(edge);\n relatedEdges_1[target] = relatedEdges_1[target] || [];\n relatedEdges_1[target].push(edge);\n });\n this.relatedEdges = relatedEdges_1;\n }\n var maxIter = maxIteration;\n var silence = !animate;\n if (workerEnabled || silence) {\n var usedIter = 0;\n for (var i = 0; (self.judgingDistance > minMovement || i < 1) && i < maxIter; i++) {\n usedIter = i;\n self.runOneStep(i, velArray);\n }\n self.onLayoutEnd(Object.values(nodeMap));\n }\n else {\n if (typeof window === 'undefined')\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n if (!nodes)\n return;\n self.runOneStep(iter_1, velArray);\n iter_1++;\n if (iter_1 >= maxIter || self.judgingDistance < minMovement) {\n self.onLayoutEnd(Object.values(nodeMap));\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n };\n Force2Layout.prototype.runOneStep = function (iter, velArray) {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges, nodeMap = self.nodeMap, monitor = self.monitor;\n var accArray = [];\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n self.calRepulsive(accArray);\n if (edges)\n self.calAttractive(accArray);\n self.calGravity(accArray);\n self.attractToSide(accArray);\n var stepInterval = self.interval; // Math.max(0.02, self.interval - iter * 0.002);\n self.updateVelocity(accArray, velArray, stepInterval);\n self.updatePosition(velArray, stepInterval);\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n /** 如果需要监控信息,则提供给用户 */\n if (monitor) {\n var energy = this.calTotalEnergy(accArray);\n monitor({ energy: energy, nodes: nodes, edges: edges, iterations: iter });\n }\n };\n Force2Layout.prototype.calTotalEnergy = function (accArray) {\n var _a = this, nodes = _a.nodes, nodeMap = _a.nodeMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return 0;\n var energy = 0.0;\n nodes.forEach(function (node, i) {\n var vx = accArray[2 * i];\n var vy = accArray[2 * i + 1];\n var speed2 = vx * vx + vy * vy;\n var _a = nodeMap[node.id].data.layout.force.mass, mass = _a === void 0 ? 1 : _a;\n energy += mass * speed2 * 0.5; // p = 1/2*(mv^2)\n });\n return energy;\n };\n // coulombs law\n Force2Layout.prototype.calRepulsive = function (accArray) {\n var self = this;\n var nodes = self.nodes, nodeMap = self.nodeMap, factor = self.factor, coulombDisScale = self.coulombDisScale;\n var nodeSize = self.nodeSize;\n (0, ForceNBody_1.forceNBody)(nodes, nodeMap, factor, coulombDisScale * coulombDisScale, accArray);\n };\n // hooks law\n Force2Layout.prototype.calAttractive = function (accArray) {\n var self = this;\n var edges = self.edges, nodeMap = self.nodeMap, nodeIdxMap = self.nodeIdxMap, edgeInfos = self.edgeInfos;\n var nodeSize = self.nodeSize;\n edges.forEach(function (edge, i) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n var sourceNode = nodeMap[source];\n var targetNode = nodeMap[target];\n if (!sourceNode || !targetNode)\n return;\n var vecX = targetNode.x - sourceNode.x;\n var vecY = targetNode.y - sourceNode.y;\n if (!vecX && !vecY) {\n vecX = Math.random() * 0.01;\n vecY = Math.random() * 0.01;\n }\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var direX = vecX / vecLength;\n var direY = vecY / vecLength;\n // @ts-ignore\n var _a = edgeInfos[i] || {}, _b = _a.linkDistance, linkDistance = _b === void 0 ? 200 : _b, _c = _a.edgeStrength, edgeStrength = _c === void 0 ? 200 : _c;\n var diff = linkDistance - vecLength;\n var param = diff * edgeStrength;\n var massSource = sourceNode.data.layout.force.mass || 1;\n var massTarget = targetNode.data.layout.force.mass || 1;\n // 质量占比越大,对另一端影响程度越大\n var sourceMassRatio = 1 / massSource;\n var targetMassRatio = 1 / massTarget;\n var disX = direX * param;\n var disY = direY * param;\n var sourceIdx = 2 * nodeIdxMap[source];\n var targetIdx = 2 * nodeIdxMap[target];\n accArray[sourceIdx] -= disX * sourceMassRatio;\n accArray[sourceIdx + 1] -= disY * sourceMassRatio;\n accArray[targetIdx] += disX * targetMassRatio;\n accArray[targetIdx + 1] += disY * targetMassRatio;\n });\n };\n // attract to center\n Force2Layout.prototype.calGravity = function (accArray) {\n var _a;\n var self = this;\n var nodes = self.nodes, _b = self.edges, edges = _b === void 0 ? [] : _b, nodeMap = self.nodeMap, width = self.width, height = self.height, center = self.center, defaultGravity = self.gravity, degreesMap = self.degreesMap, centripetalOptions = self.centripetalOptions;\n if (!nodes)\n return;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var idx = 2 * i;\n var node = nodeMap[nodes[i].id];\n var _c = node.data.layout.force.mass, mass = _c === void 0 ? 1 : _c;\n var vecX = 0;\n var vecY = 0;\n var gravity = defaultGravity;\n var _d = degreesMap[node.id], inDegree = _d.in, outDegree = _d.out, degree = _d.all;\n var forceCenter = (_a = self.getCenter) === null || _a === void 0 ? void 0 : _a.call(self, node, degree);\n if (forceCenter) {\n var centerX = forceCenter[0], centerY = forceCenter[1], strength = forceCenter[2];\n vecX = node.x - centerX;\n vecY = node.y - centerY;\n gravity = strength;\n }\n else {\n vecX = node.x - center[0];\n vecY = node.y - center[1];\n }\n if (gravity) {\n accArray[idx] -= (gravity * vecX) / mass;\n accArray[idx + 1] -= (gravity * vecY) / mass;\n }\n if (centripetalOptions) {\n var leaf = centripetalOptions.leaf, single = centripetalOptions.single, others = centripetalOptions.others, centriCenter = centripetalOptions.center;\n var _e = (centriCenter === null || centriCenter === void 0 ? void 0 : centriCenter(node, nodes, edges, width, height)) || {\n x: 0,\n y: 0,\n centerStrength: 0,\n }, centriX = _e.x, centriY = _e.y, centerStrength = _e.centerStrength;\n if (!(0, util_1.isNumber)(centriX) || !(0, util_1.isNumber)(centriY))\n continue;\n var vx = (node.x - centriX) / mass;\n var vy = (node.y - centriY) / mass;\n if (centerStrength) {\n accArray[idx] -= centerStrength * vx;\n accArray[idx + 1] -= centerStrength * vy;\n }\n // 孤点\n if (degree === 0) {\n var singleStrength = single(node);\n if (!singleStrength)\n continue;\n accArray[idx] -= singleStrength * vx;\n accArray[idx + 1] -= singleStrength * vy;\n continue;\n }\n // 没有出度或没有入度,都认为是叶子节点\n if (inDegree === 0 || outDegree === 0) {\n var leafStrength = leaf(node, nodes, edges);\n if (!leafStrength)\n continue;\n accArray[idx] -= leafStrength * vx;\n accArray[idx + 1] -= leafStrength * vy;\n continue;\n }\n /** others */\n var othersStrength = others(node);\n if (!othersStrength)\n continue;\n accArray[idx] -= othersStrength * vx;\n accArray[idx + 1] -= othersStrength * vy;\n }\n }\n };\n /**\n * Attract forces to the top and bottom.\n * @param accArray\n * @returns\n */\n Force2Layout.prototype.attractToSide = function (accArray) {\n var _a = this, defSideCoe = _a.defSideCoe, height = _a.height, nodes = _a.nodes, relatedEdges = _a.relatedEdges, _b = _a.currentMinY, currentMinY = _b === void 0 ? 0 : _b, _c = _a.currentMaxY, currentMaxY = _c === void 0 ? this.height : _c;\n if (!defSideCoe || typeof defSideCoe !== 'function' || !(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n nodes.forEach(function (node, i) {\n var sideCoe = defSideCoe(node, relatedEdges[node.id] || []);\n if (sideCoe === 0)\n return;\n var targetY = sideCoe < 0 ? currentMinY : currentMaxY;\n var strength = Math.abs(sideCoe);\n accArray[2 * i + 1] -= strength * (node.y - targetY);\n });\n };\n Force2Layout.prototype.updateVelocity = function (accArray, velArray, stepInterval) {\n var self = this;\n var nodes = self.nodes, damping = self.damping, maxSpeed = self.maxSpeed;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n nodes.forEach(function (_, i) {\n var vx = (velArray[2 * i] + accArray[2 * i] * stepInterval) * damping || 0.01;\n var vy = (velArray[2 * i + 1] + accArray[2 * i + 1] * stepInterval) * damping ||\n 0.01;\n var vLength = Math.sqrt(vx * vx + vy * vy);\n if (vLength > maxSpeed) {\n var param2 = maxSpeed / vLength;\n vx = param2 * vx;\n vy = param2 * vy;\n }\n velArray[2 * i] = vx;\n velArray[2 * i + 1] = vy;\n });\n };\n Force2Layout.prototype.updatePosition = function (velArray, stepInterval) {\n var self = this;\n var nodes = self.nodes, distanceThresholdMode = self.distanceThresholdMode, nodeMap = self.nodeMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n this.judgingDistance = 0;\n return;\n }\n var sum = 0;\n if (distanceThresholdMode === 'max')\n self.judgingDistance = -Infinity;\n else if (distanceThresholdMode === 'min')\n self.judgingDistance = Infinity;\n var currentMinY = Infinity;\n var currentMaxY = -Infinity;\n nodes.forEach(function (node, i) {\n var mappedNode = nodeMap[node.id];\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n node.x = node.fx;\n node.y = node.fy;\n mappedNode.x = node.x;\n mappedNode.y = node.y;\n return;\n }\n var distX = velArray[2 * i] * stepInterval;\n var distY = velArray[2 * i + 1] * stepInterval;\n node.x += distX;\n node.y += distY;\n mappedNode.x = node.x;\n mappedNode.y = node.y;\n if (node.y < currentMinY)\n currentMinY = node.y;\n if (node.y > currentMaxY)\n currentMaxY = node.y;\n var distanceMagnitude = Math.sqrt(distX * distX + distY * distY);\n switch (distanceThresholdMode) {\n case 'max':\n if (self.judgingDistance < distanceMagnitude)\n self.judgingDistance = distanceMagnitude;\n break;\n case 'min':\n if (self.judgingDistance > distanceMagnitude)\n self.judgingDistance = distanceMagnitude;\n break;\n default:\n sum = sum + distanceMagnitude;\n break;\n }\n });\n this.currentMinY = currentMinY;\n this.currentMaxY = currentMaxY;\n if (!distanceThresholdMode || distanceThresholdMode === 'mean')\n self.judgingDistance = sum / nodes.length;\n };\n Force2Layout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== 'undefined') {\n window.clearInterval(this.timeInterval);\n }\n };\n Force2Layout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n Force2Layout.prototype.getType = function () {\n return 'force2';\n };\n Force2Layout.prototype.getSameTypeLeafMap = function () {\n var _a = this, nodeClusterBy = _a.nodeClusterBy, nodes = _a.nodes, edges = _a.edges, nodeMap = _a.nodeMap, degreesMap = _a.degreesMap;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n // eslint-disable-next-line\n var sameTypeLeafMap = {};\n nodes.forEach(function (node, i) {\n var degree = degreesMap[node.id].all;\n if (degree === 1) {\n sameTypeLeafMap[node.id] = (0, util_1.getCoreNodeAndRelativeLeafNodes)('leaf', node, edges, nodeClusterBy, degreesMap, nodeMap);\n }\n });\n return sameTypeLeafMap;\n };\n return Force2Layout;\n}(base_1.Base));\nexports.Force2Layout = Force2Layout;\n//# sourceMappingURL=index.js.map","export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y) {\n var nodes,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = node.y - y || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n node.vy += dy * k;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _, initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar d3Force = __importStar(require(\"d3-force\"));\nvar util_1 = require(\"../../util\");\n// https://github.com/john-guerra/forceInABox/blob/master/src/forceInABox.js\nfunction forceInABox() {\n function constant(_) {\n return function () { return _; };\n }\n var groupBy = function (d) {\n return d.cluster;\n };\n var forceNodeSize = constant(1);\n var forceCharge = constant(-1);\n var forceLinkDistance = constant(100);\n var forceLinkStrength = constant(0.1);\n var offset = [0, 0];\n var nodes = [];\n var nodesMap = {};\n var links = [];\n var centerX = 100;\n var centerY = 100;\n var foci = {\n none: {\n x: 0,\n y: 0,\n },\n };\n var templateNodes = [];\n var templateForce;\n var template = 'force';\n var enableGrouping = true;\n var strength = 0.1;\n function force(alpha) {\n if (!enableGrouping) {\n return force;\n }\n templateForce.tick();\n getFocisFromTemplate();\n for (var i = 0, n = nodes.length, node = void 0, k = alpha * strength; i < n; ++i) {\n node = nodes[i];\n node.vx += (foci[groupBy(node)].x - node.x) * k;\n node.vy += (foci[groupBy(node)].y - node.y) * k;\n }\n }\n function initialize() {\n if (!nodes)\n return;\n initializeWithForce();\n }\n function initializeWithForce() {\n if (!nodes || !nodes.length) {\n return;\n }\n if (groupBy(nodes[0]) === undefined) {\n throw Error(\"Couldnt find the grouping attribute for the nodes. Make sure to set it up with forceInABox.groupBy('clusterAttr') before calling .links()\");\n }\n // checkLinksAsObjects();\n var net = getGroupsGraph();\n templateForce = d3Force\n .forceSimulation(net.nodes)\n .force('x', d3Force.forceX(centerX).strength(0.1))\n .force('y', d3Force.forceY(centerY).strength(0.1))\n .force('collide', d3Force.forceCollide(function (d) { return d.r; }).iterations(4))\n .force('charge', d3Force.forceManyBody().strength(forceCharge))\n .force('links', d3Force\n .forceLink(net.nodes.length ? net.links : [])\n .distance(forceLinkDistance)\n .strength(forceLinkStrength));\n templateNodes = templateForce.nodes();\n getFocisFromTemplate();\n }\n function getGroupsGraph() {\n var gnodes = [];\n var glinks = [];\n var dNodes = {};\n var clustersList = [];\n var clustersCounts = {};\n var clustersLinks = [];\n clustersCounts = computeClustersNodeCounts(nodes);\n clustersLinks = computeClustersLinkCounts(links);\n clustersList = Object.keys(clustersCounts);\n clustersList.forEach(function (key, index) {\n var val = clustersCounts[key];\n // Uses approx meta-node size\n gnodes.push({\n id: key,\n size: val.count,\n r: Math.sqrt(val.sumforceNodeSize / Math.PI),\n });\n dNodes[key] = index;\n });\n clustersLinks.forEach(function (l) {\n var sourceTerminal = (0, util_1.getEdgeTerminal)(l, 'source');\n var targetTerminal = (0, util_1.getEdgeTerminal)(l, 'target');\n var source = dNodes[sourceTerminal];\n var target = dNodes[targetTerminal];\n if (source !== undefined && target !== undefined) {\n glinks.push({\n source: source,\n target: target,\n count: l.count,\n });\n }\n });\n return {\n nodes: gnodes,\n links: glinks,\n };\n }\n function computeClustersNodeCounts(nodes) {\n var clustersCounts = {};\n nodes.forEach(function (d) {\n var key = groupBy(d);\n if (!clustersCounts[key]) {\n clustersCounts[key] = {\n count: 0,\n sumforceNodeSize: 0,\n };\n }\n });\n nodes.forEach(function (d) {\n var key = groupBy(d);\n var nodeSize = forceNodeSize(d);\n var tmpCount = clustersCounts[key];\n tmpCount.count = tmpCount.count + 1;\n tmpCount.sumforceNodeSize =\n tmpCount.sumforceNodeSize + Math.PI * (nodeSize * nodeSize) * 1.3;\n clustersCounts[key] = tmpCount;\n });\n return clustersCounts;\n }\n function computeClustersLinkCounts(links) {\n var dClusterLinks = {};\n var clusterLinks = [];\n links.forEach(function (l) {\n var key = getLinkKey(l);\n var count = 0;\n if (dClusterLinks[key] !== undefined) {\n count = dClusterLinks[key];\n }\n count += 1;\n dClusterLinks[key] = count;\n });\n // @ts-ignore\n var entries = Object.entries(dClusterLinks);\n entries.forEach(function (_a) {\n var key = _a[0], count = _a[1];\n var source = key.split('~')[0];\n var target = key.split('~')[1];\n if (source !== undefined && target !== undefined) {\n clusterLinks.push({\n source: source,\n target: target,\n count: count,\n });\n }\n });\n return clusterLinks;\n }\n function getFocisFromTemplate() {\n foci = {\n none: {\n x: 0,\n y: 0,\n },\n };\n templateNodes.forEach(function (d) {\n foci[d.id] = {\n x: d.x - offset[0],\n y: d.y - offset[1],\n };\n });\n return foci;\n }\n function getLinkKey(l) {\n var source = (0, util_1.getEdgeTerminal)(l, 'source');\n var target = (0, util_1.getEdgeTerminal)(l, 'target');\n var sourceID = groupBy(nodesMap[source]);\n var targetID = groupBy(nodesMap[target]);\n return sourceID <= targetID\n ? \"\".concat(sourceID, \"~\").concat(targetID)\n : \"\".concat(targetID, \"~\").concat(sourceID);\n }\n function genNodesMap(nodes) {\n nodesMap = {};\n nodes.forEach(function (node) {\n nodesMap[node.id] = node;\n });\n }\n function setTemplate(x) {\n if (!arguments.length)\n return template;\n template = x;\n initialize();\n return force;\n }\n function setGroupBy(x) {\n if (!arguments.length)\n return groupBy;\n if (typeof x === 'string') {\n groupBy = function (d) {\n return d[x];\n };\n return force;\n }\n groupBy = x;\n return force;\n }\n function setEnableGrouping(x) {\n if (!arguments.length)\n return enableGrouping;\n enableGrouping = x;\n return force;\n }\n function setStrength(x) {\n if (!arguments.length)\n return strength;\n strength = x;\n return force;\n }\n function setCenterX(_) {\n if (arguments.length) {\n centerX = _;\n return force;\n }\n return centerX;\n }\n function setCenterY(_) {\n if (arguments.length) {\n centerY = _;\n return force;\n }\n return centerY;\n }\n function setNodes(_) {\n if (arguments.length) {\n genNodesMap(_ || []);\n nodes = _ || [];\n return force;\n }\n return nodes;\n }\n function setLinks(_) {\n if (arguments.length) {\n links = _ || [];\n initialize();\n return force;\n }\n return links;\n }\n function setForceNodeSize(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceNodeSize = _;\n }\n else {\n forceNodeSize = constant(+_);\n }\n initialize();\n return force;\n }\n return forceNodeSize;\n }\n function setForceCharge(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceCharge = _;\n }\n else {\n forceCharge = constant(+_);\n }\n initialize();\n return force;\n }\n return forceCharge;\n }\n function setForceLinkDistance(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceLinkDistance = _;\n }\n else {\n forceLinkDistance = constant(+_);\n }\n initialize();\n return force;\n }\n return forceLinkDistance;\n }\n function setForceLinkStrength(_) {\n if (arguments.length) {\n if (typeof _ === 'function') {\n forceLinkStrength = _;\n }\n else {\n forceLinkStrength = constant(+_);\n }\n initialize();\n return force;\n }\n return forceLinkStrength;\n }\n function setOffset(_) {\n if (arguments.length) {\n offset = _;\n return force;\n }\n return offset;\n }\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n force.template = setTemplate;\n force.groupBy = setGroupBy;\n force.enableGrouping = setEnableGrouping;\n force.strength = setStrength;\n force.centerX = setCenterX;\n force.centerY = setCenterY;\n force.nodes = setNodes;\n force.links = setLinks;\n force.forceNodeSize = setForceNodeSize;\n // Legacy support\n force.nodeSize = force.forceNodeSize;\n force.forceCharge = setForceCharge;\n force.forceLinkDistance = setForceLinkDistance;\n force.forceLinkStrength = setForceLinkStrength;\n force.offset = setOffset;\n force.getFocis = getFocisFromTemplate;\n return force;\n}\nexports.default = forceInABox;\n//# sourceMappingURL=force-in-a-box.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FORCE_LAYOUT_TYPE_MAP = exports.LAYOUT_MESSAGE = void 0;\n/** layout message type */\nexports.LAYOUT_MESSAGE = {\n // run layout\n RUN: \"LAYOUT_RUN\",\n // layout ended with success\n END: \"LAYOUT_END\",\n // layout error\n ERROR: \"LAYOUT_ERROR\",\n // layout tick, used in force directed layout\n TICK: \"LAYOUT_TICK\",\n GPURUN: \"GPU_LAYOUT_RUN\",\n GPUEND: \"GPU_LAYOUT_END\"\n};\nexports.FORCE_LAYOUT_TYPE_MAP = {\n 'gForce': true,\n 'force2': true,\n 'fruchterman': true,\n 'forceAtlas2': true,\n 'force': true,\n 'graphin-force': true,\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ForceLayout = void 0;\nvar d3Force = __importStar(require(\"d3-force\"));\nvar force_in_a_box_1 = __importDefault(require(\"./force-in-a-box\"));\nvar util_1 = require(\"../../util\");\nvar base_1 = require(\"../base\");\nvar constants_1 = require(\"../constants\");\n/**\n * 经典力导布局 force-directed\n */\nvar ForceLayout = /** @class */ (function (_super) {\n __extends(ForceLayout, _super);\n function ForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 向心力作用点 */\n _this.center = [0, 0];\n /** 节点作用力 */\n _this.nodeStrength = null;\n /** 边的作用力, 默认为根据节点的入度出度自适应 */\n _this.edgeStrength = null;\n /** 是否防止节点相互覆盖 */\n _this.preventOverlap = false;\n /** 聚类节点作用力 */\n _this.clusterNodeStrength = null;\n /** 聚类边作用力 */\n _this.clusterEdgeStrength = null;\n /** 聚类边长度 */\n _this.clusterEdgeDistance = null;\n /** 聚类节点大小 / 直径,直径越大,越分散 */\n _this.clusterNodeSize = null;\n /** 用于 foci 的力 */\n _this.clusterFociStrength = null;\n /** 默认边长度 */\n _this.linkDistance = 50;\n /** 迭代阈值的衰减率 [0, 1],0.028 对应最大迭代数为 300 */\n _this.alphaDecay = 0.028;\n /** 停止迭代的阈值 */\n _this.alphaMin = 0.001;\n /** 当前阈值 */\n _this.alpha = 0.3;\n /** 防止重叠的力强度 */\n _this.collideStrength = 1;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.tick = function () { };\n /** 布局完成回调 */\n _this.onLayoutEnd = function () { };\n /** 是否正在布局 */\n _this.ticking = undefined;\n if (options) {\n _this.updateCfg(options);\n }\n return _this;\n }\n ForceLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n nodeStrength: null,\n edgeStrength: null,\n preventOverlap: false,\n nodeSize: undefined,\n nodeSpacing: undefined,\n linkDistance: 50,\n forceSimulation: null,\n alphaDecay: 0.028,\n alphaMin: 0.001,\n alpha: 0.3,\n collideStrength: 1,\n clustering: false,\n clusterNodeStrength: -1,\n clusterEdgeStrength: 0.1,\n clusterEdgeDistance: 100,\n clusterFociStrength: 0.8,\n clusterNodeSize: 10,\n tick: function () { },\n onLayoutEnd: function () { },\n // 是否启用web worker。前提是在web worker里执行布局,否则无效\n workerEnabled: false\n };\n };\n /**\n * 初始化\n * @param {object} data 数据\n */\n ForceLayout.prototype.init = function (data) {\n var self = this;\n self.nodes = data.nodes || [];\n var edges = data.edges || [];\n self.edges = edges.map(function (edge) {\n var res = {};\n var expectKeys = [\"targetNode\", \"sourceNode\", \"startPoint\", \"endPoint\"];\n Object.keys(edge).forEach(function (key) {\n if (!(expectKeys.indexOf(key) > -1)) {\n res[key] = edge[key];\n }\n });\n return res;\n });\n self.ticking = false;\n };\n /**\n * 执行布局\n */\n ForceLayout.prototype.execute = function (reloadData) {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n // 如果正在布局,忽略布局请求\n if (self.ticking) {\n return;\n }\n var simulation = self.forceSimulation;\n var alphaMin = self.alphaMin;\n var alphaDecay = self.alphaDecay;\n var alpha = self.alpha;\n if (!simulation) {\n try {\n // 定义节点的力\n var nodeForce = d3Force.forceManyBody();\n if (self.nodeStrength) {\n nodeForce.strength(self.nodeStrength);\n }\n simulation = d3Force.forceSimulation().nodes(nodes);\n if (self.clustering) {\n var clusterForce = (0, force_in_a_box_1.default)();\n clusterForce\n .centerX(self.center[0])\n .centerY(self.center[1])\n .template(\"force\")\n .strength(self.clusterFociStrength);\n if (edges) {\n clusterForce.links(edges);\n }\n if (nodes) {\n clusterForce.nodes(nodes);\n }\n clusterForce\n .forceLinkDistance(self.clusterEdgeDistance)\n .forceLinkStrength(self.clusterEdgeStrength)\n .forceCharge(self.clusterNodeStrength)\n .forceNodeSize(self.clusterNodeSize);\n self.clusterForce = clusterForce;\n simulation.force(\"group\", clusterForce);\n }\n simulation\n .force(\"center\", d3Force.forceCenter(self.center[0], self.center[1]))\n .force(\"charge\", nodeForce)\n .alpha(alpha)\n .alphaDecay(alphaDecay)\n .alphaMin(alphaMin);\n if (self.preventOverlap) {\n self.overlapProcess(simulation);\n }\n // 如果有边,定义边的力\n if (edges) {\n // d3 的 forceLayout 会重新生成边的数据模型,为了避免污染源数据\n var edgeForce = d3Force\n .forceLink()\n .id(function (d) { return d.id; })\n .links(edges);\n if (self.edgeStrength) {\n edgeForce.strength(self.edgeStrength);\n }\n if (self.linkDistance) {\n edgeForce.distance(self.linkDistance);\n }\n self.edgeForce = edgeForce;\n simulation.force(\"link\", edgeForce);\n }\n if (self.workerEnabled && !isInWorker()) {\n // 如果不是运行在web worker里,不用web worker布局\n self.workerEnabled = false;\n console.warn(\"workerEnabled option is only supported when running in web worker.\");\n }\n if (!self.workerEnabled) {\n simulation\n .on(\"tick\", function () {\n self.tick();\n })\n .on(\"end\", function () {\n self.ticking = false;\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n });\n self.ticking = true;\n }\n else {\n // worker is enabled\n simulation.stop();\n var totalTicks = getSimulationTicks(simulation);\n for (var currentTick = 1; currentTick <= totalTicks; currentTick++) {\n simulation.tick();\n // currentTick starts from 1.\n postMessage({\n nodes: nodes,\n currentTick: currentTick,\n totalTicks: totalTicks,\n type: constants_1.LAYOUT_MESSAGE.TICK\n }, undefined);\n }\n self.ticking = false;\n }\n self.forceSimulation = simulation;\n self.ticking = true;\n }\n catch (e) {\n self.ticking = false;\n console.warn(e);\n }\n }\n else {\n if (reloadData) {\n if (self.clustering && self.clusterForce) {\n self.clusterForce.nodes(nodes);\n self.clusterForce.links(edges);\n }\n simulation.nodes(nodes);\n if (edges && self.edgeForce)\n self.edgeForce.links(edges);\n else if (edges && !self.edgeForce) {\n // d3 的 forceLayout 会重新生成边的数据模型,为了避免污染源数据\n var edgeForce = d3Force\n .forceLink()\n .id(function (d) { return d.id; })\n .links(edges);\n if (self.edgeStrength) {\n edgeForce.strength(self.edgeStrength);\n }\n if (self.linkDistance) {\n edgeForce.distance(self.linkDistance);\n }\n self.edgeForce = edgeForce;\n simulation.force(\"link\", edgeForce);\n }\n }\n if (self.preventOverlap) {\n self.overlapProcess(simulation);\n }\n simulation.alpha(alpha).restart();\n this.ticking = true;\n }\n };\n /**\n * 防止重叠\n * @param {object} simulation 力模拟模型\n */\n ForceLayout.prototype.overlapProcess = function (simulation) {\n var self = this;\n var nodeSize = self.nodeSize;\n var nodeSpacing = self.nodeSpacing;\n var nodeSizeFunc;\n var nodeSpacingFunc;\n var collideStrength = self.collideStrength;\n if ((0, util_1.isNumber)(nodeSpacing)) {\n nodeSpacingFunc = function () { return nodeSpacing; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing)) {\n nodeSpacingFunc = nodeSpacing;\n }\n else {\n nodeSpacingFunc = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res / 2 + nodeSpacingFunc(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res / 2 + nodeSpacingFunc(d);\n }\n return d.size / 2 + nodeSpacingFunc(d);\n }\n return 10 + nodeSpacingFunc(d);\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var size = nodeSize(d);\n return size + nodeSpacingFunc(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1 + nodeSpacingFunc(d); };\n }\n else if ((0, util_1.isNumber)(nodeSize)) {\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2 + nodeSpacingFunc(d); };\n }\n else {\n nodeSizeFunc = function () { return 10; };\n }\n // forceCollide's parameter is a radius\n simulation.force(\"collisionForce\", d3Force.forceCollide(nodeSizeFunc).strength(collideStrength));\n };\n /**\n * 更新布局配置,但不执行布局\n * @param {object} cfg 需要更新的配置项\n */\n ForceLayout.prototype.updateCfg = function (cfg) {\n var self = this;\n if (self.ticking) {\n self.forceSimulation.stop();\n self.ticking = false;\n }\n self.forceSimulation = null;\n Object.assign(self, cfg);\n };\n ForceLayout.prototype.destroy = function () {\n var self = this;\n if (self.ticking) {\n self.forceSimulation.stop();\n self.ticking = false;\n }\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n return ForceLayout;\n}(base_1.Base));\nexports.ForceLayout = ForceLayout;\n// Return total ticks of d3-force simulation\nfunction getSimulationTicks(simulation) {\n var alphaMin = simulation.alphaMin();\n var alphaTarget = simulation.alphaTarget();\n var alpha = simulation.alpha();\n var totalTicksFloat = Math.log((alphaMin - alphaTarget) / (alpha - alphaTarget)) /\n Math.log(1 - simulation.alphaDecay());\n var totalTicks = Math.ceil(totalTicksFloat);\n return totalTicks;\n}\n// 判断是否运行在web worker里\nfunction isInWorker() {\n // eslint-disable-next-line no-undef\n return (typeof WorkerGlobalScope !== \"undefined\" &&\n self instanceof WorkerGlobalScope);\n}\n//# sourceMappingURL=force.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./force\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CircularLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nfunction initHierarchy(nodes, edges, nodeMap, directed) {\n nodes.forEach(function (_, i) {\n nodes[i].children = [];\n nodes[i].parent = [];\n });\n if (directed) {\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n var sourceIdx = 0;\n if (source) {\n sourceIdx = nodeMap[source];\n }\n var targetIdx = 0;\n if (target) {\n targetIdx = nodeMap[target];\n }\n var child = nodes[sourceIdx].children;\n var parent = nodes[targetIdx].parent;\n child.push(nodes[targetIdx].id);\n parent.push(nodes[sourceIdx].id);\n });\n }\n else {\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n var sourceIdx = 0;\n if (source) {\n sourceIdx = nodeMap[source];\n }\n var targetIdx = 0;\n if (target) {\n targetIdx = nodeMap[target];\n }\n var sourceChildren = nodes[sourceIdx].children;\n var targetChildren = nodes[targetIdx].children;\n sourceChildren.push(nodes[targetIdx].id);\n targetChildren.push(nodes[sourceIdx].id);\n });\n }\n}\nfunction connect(a, b, edges) {\n var m = edges.length;\n for (var i = 0; i < m; i++) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n if ((a.id === source && b.id === target) ||\n (b.id === source && a.id === target)) {\n return true;\n }\n }\n return false;\n}\nfunction compareDegree(a, b) {\n var aDegree = a.degree;\n var bDegree = b.degree;\n if (aDegree < bDegree) {\n return -1;\n }\n if (aDegree > bDegree) {\n return 1;\n }\n return 0;\n}\n/**\n * 圆形布局\n */\nvar CircularLayout = /** @class */ (function (_super) {\n __extends(CircularLayout, _super);\n function CircularLayout(options) {\n var _this = _super.call(this) || this;\n /** 固定半径,若设置了 radius,则 startRadius 与 endRadius 不起效 */\n _this.radius = null;\n /** 节点大小,配合 nodeSpacing,一起用于计算 radius。若不配置,节点大小默认为 30 */\n _this.nodeSize = undefined;\n /** 起始半径 */\n _this.startRadius = null;\n /** 终止半径 */\n _this.endRadius = null;\n /** 起始角度 */\n _this.startAngle = 0;\n /** 终止角度 */\n _this.endAngle = 2 * Math.PI;\n /** 是否顺时针 */\n _this.clockwise = true;\n /** 节点在环上分成段数(几个段将均匀分布),在 endRadius - startRadius != 0 时生效 */\n _this.divisions = 1;\n /** 节点在环上排序的依据,可选: 'topology', 'degree', 'null' */\n _this.ordering = null;\n /** how many 2*pi from first to last nodes */\n _this.angleRatio = 1;\n _this.nodes = [];\n _this.edges = [];\n _this.nodeMap = {};\n _this.degrees = [];\n _this.width = 300;\n _this.height = 300;\n _this.updateCfg(options);\n return _this;\n }\n CircularLayout.prototype.getDefaultCfg = function () {\n return {\n radius: null,\n startRadius: null,\n endRadius: null,\n startAngle: 0,\n endAngle: 2 * Math.PI,\n clockwise: true,\n divisions: 1,\n ordering: null,\n angleRatio: 1\n };\n };\n /**\n * 执行布局\n */\n CircularLayout.prototype.execute = function () {\n var _a;\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n var n = nodes.length;\n if (n === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (n === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var radius = self.radius, startRadius = self.startRadius, endRadius = self.endRadius;\n var divisions = self.divisions, startAngle = self.startAngle, endAngle = self.endAngle, angleRatio = self.angleRatio, ordering = self.ordering, clockwise = self.clockwise, paramNodeSpacing = self.nodeSpacing, paramNodeSize = self.nodeSize;\n var angleStep = (endAngle - startAngle) / n;\n // layout\n var nodeMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n var degrees = (0, util_1.getDegree)(nodes.length, nodeMap, edges);\n self.degrees = degrees;\n if (paramNodeSpacing) {\n var nodeSpacing_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSpacing);\n var nodeSize_1 = (0, util_1.getFuncByUnknownType)(10, paramNodeSize);\n var maxNodeSize_1 = -Infinity;\n nodes.forEach(function (node) {\n var nSize = nodeSize_1(node);\n if (maxNodeSize_1 < nSize)\n maxNodeSize_1 = nSize;\n });\n var length_1 = 0;\n nodes.forEach(function (node, i) {\n if (i === 0)\n length_1 += (maxNodeSize_1 || 10);\n else\n length_1 += (nodeSpacing_1(node) || 0) + (maxNodeSize_1 || 10);\n });\n radius = length_1 / (2 * Math.PI);\n }\n else if (!radius && !startRadius && !endRadius) {\n radius = self.height > self.width ? self.width / 2 : self.height / 2;\n }\n else if (!startRadius && endRadius) {\n startRadius = endRadius;\n }\n else if (startRadius && !endRadius) {\n endRadius = startRadius;\n }\n var astep = angleStep * angleRatio;\n var layoutNodes = [];\n if (ordering === \"topology\") {\n // layout according to the topology\n layoutNodes = self.topologyOrdering();\n }\n else if (ordering === \"topology-directed\") {\n // layout according to the topology\n layoutNodes = self.topologyOrdering(true);\n }\n else if (ordering === \"degree\") {\n // layout according to the descent order of degrees\n layoutNodes = self.degreeOrdering();\n }\n else {\n // layout according to the original order in the data.nodes\n layoutNodes = nodes;\n }\n var divN = Math.ceil(n / divisions); // node number in each division\n for (var i = 0; i < n; ++i) {\n var r = radius;\n if (!r && startRadius !== null && endRadius !== null) {\n r = startRadius + (i * (endRadius - startRadius)) / (n - 1);\n }\n if (!r) {\n r = 10 + (i * 100) / (n - 1);\n }\n var angle = startAngle +\n (i % divN) * astep +\n ((2 * Math.PI) / divisions) * Math.floor(i / divN);\n if (!clockwise) {\n angle =\n endAngle -\n (i % divN) * astep -\n ((2 * Math.PI) / divisions) * Math.floor(i / divN);\n }\n layoutNodes[i].x = center[0] + Math.cos(angle) * r;\n layoutNodes[i].y = center[1] + Math.sin(angle) * r;\n layoutNodes[i].weight = degrees[i].all;\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return {\n nodes: layoutNodes,\n edges: this.edges\n };\n };\n /**\n * 根据节点的拓扑结构排序\n * @return {array} orderedNodes 排序后的结果\n */\n CircularLayout.prototype.topologyOrdering = function (directed) {\n if (directed === void 0) { directed = false; }\n var self = this;\n var degrees = self.degrees;\n var edges = self.edges;\n var nodes = self.nodes;\n var cnodes = (0, util_1.clone)(nodes);\n var nodeMap = self.nodeMap;\n var orderedCNodes = [cnodes[0]];\n var resNodes = [nodes[0]];\n var pickFlags = [];\n var n = nodes.length;\n pickFlags[0] = true;\n initHierarchy(cnodes, edges, nodeMap, directed);\n var k = 0;\n cnodes.forEach(function (cnode, i) {\n if (i !== 0) {\n if ((i === n - 1 ||\n degrees[i].all !== degrees[i + 1].all ||\n connect(orderedCNodes[k], cnode, edges)) &&\n !pickFlags[i]) {\n orderedCNodes.push(cnode);\n resNodes.push(nodes[nodeMap[cnode.id]]);\n pickFlags[i] = true;\n k++;\n }\n else {\n var children = orderedCNodes[k].children;\n var foundChild = false;\n for (var j = 0; j < children.length; j++) {\n var childIdx = nodeMap[children[j]];\n if (degrees[childIdx].all === degrees[i].all && !pickFlags[childIdx]) {\n orderedCNodes.push(cnodes[childIdx]);\n resNodes.push(nodes[nodeMap[cnodes[childIdx].id]]);\n pickFlags[childIdx] = true;\n foundChild = true;\n break;\n }\n }\n var ii = 0;\n while (!foundChild) {\n if (!pickFlags[ii]) {\n orderedCNodes.push(cnodes[ii]);\n resNodes.push(nodes[nodeMap[cnodes[ii].id]]);\n pickFlags[ii] = true;\n foundChild = true;\n }\n ii++;\n if (ii === n) {\n break;\n }\n }\n }\n }\n });\n return resNodes;\n };\n /**\n * 根据节点度数大小排序\n * @return {array} orderedNodes 排序后的结果\n */\n CircularLayout.prototype.degreeOrdering = function () {\n var self = this;\n var nodes = self.nodes;\n var orderedNodes = [];\n var degrees = self.degrees;\n nodes.forEach(function (node, i) {\n node.degree = degrees[i].all;\n orderedNodes.push(node);\n });\n orderedNodes.sort(compareDegree);\n return orderedNodes;\n };\n CircularLayout.prototype.getType = function () {\n return \"circular\";\n };\n return CircularLayout;\n}(base_1.Base));\nexports.CircularLayout = CircularLayout;\n//# sourceMappingURL=circular.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar filterOutLinks = function (k, v) {\n if (k !== \"next\" && k !== \"prev\") {\n return v;\n }\n};\nvar unlink = function (entry) {\n entry.prev.next = entry.next;\n entry.next.prev = entry.prev;\n delete entry.next;\n delete entry.prev;\n};\nvar List = /** @class */ (function () {\n function List() {\n var shortcut = {};\n shortcut.prev = shortcut;\n shortcut.next = shortcut.prev;\n this.shortcut = shortcut;\n }\n List.prototype.dequeue = function () {\n var shortcut = this.shortcut;\n var entry = shortcut.prev;\n if (entry && entry !== shortcut) {\n unlink(entry);\n return entry;\n }\n };\n List.prototype.enqueue = function (entry) {\n var shortcut = this.shortcut;\n if (entry.prev && entry.next) {\n unlink(entry);\n }\n entry.next = shortcut.next;\n shortcut.next.prev = entry;\n shortcut.next = entry;\n entry.prev = shortcut;\n };\n List.prototype.toString = function () {\n var strs = [];\n var sentinel = this.shortcut;\n var curr = sentinel.prev;\n while (curr !== sentinel) {\n strs.push(JSON.stringify(curr, filterOutLinks));\n curr = curr === null || curr === void 0 ? void 0 : curr.prev;\n }\n return \"[\".concat(strs.join(\", \"), \"]\");\n };\n return List;\n}());\nexports.default = List;\n//# sourceMappingURL=list.js.map","export var GraphEnum;\n\n(function (GraphEnum) {\n GraphEnum[\"DEFAULT_EDGE_NAME\"] = \"\\0\";\n GraphEnum[\"GRAPH_NODE\"] = \"\\0\";\n GraphEnum[\"EDGE_KEY_DELIM\"] = \"\\x01\";\n})(GraphEnum || (GraphEnum = {}));","import { GraphEnum } from './Graph/enum';\n/**\n * @description add one to key's value in map\n * @description.zh-CN 在 map 中 key 的值加 1\n * @param map\n * @param key\n */\n\nexport function incrementOrInitEntry(map, key) {\n var val = map.get(key) || 0;\n map.set(key, val + 1);\n}\n/**\n * @description minus one from key's value in map, is value is 0, delete the key\n * @description.zh-CN 在 map 中 key 的值减 1,如果值为 0,则删除 key\n */\n\nexport function decrementOrRemoveEntry(map, key) {\n var val = map.get(key);\n\n if (val !== undefined) {\n val = val - 1;\n\n if (val > 0) {\n map.set(key, val);\n } else {\n map.delete(key);\n }\n }\n}\n/**\n * @description convert edge to string id\n * @description.zh-CN 转换边为字符串 id\n */\n\nexport function edgeArgsToId(isDirected, v_, w_, name) {\n var v = String(v_);\n var w = String(w_);\n\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n return v + GraphEnum.EDGE_KEY_DELIM + w + GraphEnum.EDGE_KEY_DELIM + (name === undefined ? GraphEnum.DEFAULT_EDGE_NAME : name);\n}\n/**\n * @description convert edge arguments to edge object\n * @description.zh-CN 转换边参数为边对象\n */\n\nexport function edgeArgsToObj(isDirected, v, w, name) {\n var strV = String(v);\n var strW = String(w);\n var edgeObj = {\n v: v,\n w: w\n };\n\n if (!isDirected && strV > strW) {\n var tmp = edgeObj.v;\n edgeObj.v = edgeObj.w;\n edgeObj.w = tmp;\n }\n\n if (name !== undefined) {\n edgeObj.name = name;\n }\n\n return edgeObj;\n}\n/**\n * @description convert edge object to string id\n * @description.zh-CN 转换边对象为字符串 id\n */\n\nexport function edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}\nexport function isFunction(obj) {\n return typeof obj === 'function';\n}","import Graph from '.';\n/**\n * @description Convert a graph's node to JSON.\n * @description.zh-CN 转换图的节点为 JSON。\n * @param graph\n * @returns\n */\n\nvar nodeToJSON = function nodeToJSON(graph) {\n return graph.nodes().map(function (n) {\n var value = graph.node(n);\n var parent = graph.parent(n);\n var node = {\n id: n,\n value: value,\n parent: parent\n };\n\n if (node.value === undefined) {\n delete node.value;\n }\n\n if (node.parent === undefined) {\n delete node.parent;\n }\n\n return node;\n });\n};\n/**\n * @description Convert all graph's edges to JSON.\n * @description.zh-CN 转换图的所有边为 JSON。\n * @param graph\n * @returns\n */\n\n\nvar edgeToJSON = function edgeToJSON(graph) {\n return graph.edges().map(function (edge) {\n var value = graph.edge(edge);\n var e = {\n v: edge.v,\n w: edge.w,\n value: value,\n name: edge.name\n };\n\n if (e.name === undefined) {\n delete e.name;\n }\n\n if (e.value === undefined) {\n delete e.value;\n }\n\n return e;\n });\n};\n/**\n * @description Convert a graph to JSON.\n * @description.zh-CN 转换图为 JSON。\n * @param graph\n * @returns\n */\n\n\nexport var write = function write(graph) {\n var json = {\n options: {\n directed: graph.isDirected(),\n multigraph: graph.isMultigraph(),\n compound: graph.isCompound()\n },\n nodes: nodeToJSON(graph),\n edges: edgeToJSON(graph),\n value: graph.graph()\n };\n\n if (json.value === undefined) {\n delete json.value;\n }\n\n return json;\n};\n/**\n * @description read a graph from JSON.\n * @description.zh-CN 从 JSON 读取图。\n * @param json\n * @returns\n */\n\nexport var read = function read(json) {\n var graph = new Graph(json.options);\n\n if (json.value !== undefined) {\n graph.setGraph(json.value);\n }\n\n json.nodes.forEach(function (entry) {\n graph.setNode(entry.id, entry.value);\n\n if (entry.parent) {\n graph.setParent(entry.id, entry.parent);\n }\n });\n json.edges.forEach(function (entry) {\n graph.setEdge(entry.v, entry.w, entry.value, entry.name);\n });\n return graph;\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { edgeArgsToId, isFunction } from '../util';\nimport { GraphEnum } from './enum';\nimport { decrementOrRemoveEntry, edgeArgsToObj, edgeObjToId, incrementOrInitEntry } from '../util';\nimport { read, write } from './toJSON';\nvar defaultOption = {\n compound: false,\n multigraph: false,\n directed: true\n};\n\nvar Graph = /*#__PURE__*/function () {\n // Graph option or basic props\n\n /**\n * @description Label for this graph itself\n * @description.zh-CN 图本身的标签(label)\n * @default undefined\n */\n\n /**\n * @description Number of nodes in the graph\n * @description.zh-CN 节点的数量\n * @default 0\n */\n\n /**\n * @description Number of edges in the graph\n * @description.zh-CN 节点的数量\n * @default 0\n */\n\n /**\n * @description return node label with its id\n * @description.zh-CN 返回节点的默认的标签\n */\n\n /**\n * @description return edge label with its id\n * @description.zh-CN 返回边的默认的标签\n */\n function Graph() {\n var _this = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Graph);\n\n this.directed = true;\n this.multigraph = false;\n this.compound = false;\n this.GRAPH_NODE = GraphEnum.GRAPH_NODE;\n this.label = void 0;\n this.nodeCountNum = 0;\n this.edgeCountNum = 0;\n\n this.defaultNodeLabelFn = function () {\n return undefined;\n };\n\n this.defaultEdgeLabelFn = function () {\n return undefined;\n };\n\n this.parentMap = void 0;\n this.childrenMap = void 0;\n this.nodesLabelMap = new Map();\n this.inEdgesMap = new Map();\n this.outEdgesMap = new Map();\n this.predecessorsMap = new Map();\n this.successorsMap = new Map();\n this.edgesMap = new Map();\n this.edgesLabelsMap = new Map();\n\n this.isDirected = function () {\n return _this.directed;\n };\n\n this.isMultigraph = function () {\n return _this.multigraph;\n };\n\n this.isCompound = function () {\n return _this.compound;\n };\n\n this.setGraph = function (label) {\n _this.label = label;\n return _this;\n };\n\n this.graph = function () {\n return _this.label;\n };\n\n this.setDefaultNodeLabel = function (newDefault) {\n if (isFunction(newDefault)) {\n _this.defaultNodeLabelFn = newDefault;\n } else {\n _this.defaultNodeLabelFn = function () {\n return newDefault;\n };\n }\n\n return _this;\n };\n\n this.nodeCount = function () {\n return _this.nodeCountNum;\n };\n\n this.node = function (n) {\n return _this.nodesLabelMap.get(n);\n };\n\n this.nodes = function () {\n return Array.from(_this.nodesLabelMap.keys());\n };\n\n this.sources = function () {\n return _this.nodes().filter(function (n) {\n var _this$inEdgesMap$get;\n\n return !((_this$inEdgesMap$get = _this.inEdgesMap.get(n)) === null || _this$inEdgesMap$get === void 0 ? void 0 : _this$inEdgesMap$get.size);\n });\n };\n\n this.sinks = function () {\n return _this.nodes().filter(function (n) {\n var _this$outEdgesMap$get;\n\n return !((_this$outEdgesMap$get = _this.outEdgesMap.get(n)) === null || _this$outEdgesMap$get === void 0 ? void 0 : _this$outEdgesMap$get.size);\n });\n };\n\n this.setNodes = function (nodes, value) {\n nodes.map(function (node) {\n return _this.setNode(node, value);\n });\n return _this;\n };\n\n this.hasNode = function (node) {\n return _this.nodesLabelMap.has(node);\n };\n\n this.checkCompound = function () {\n if (!_this.isCompound()) {\n throw new Error('Cannot construct parent-children relations in a non-compound graph');\n }\n };\n\n this.parent = function (node) {\n if (_this.isCompound()) {\n var _this$parentMap;\n\n var parent = (_this$parentMap = _this.parentMap) === null || _this$parentMap === void 0 ? void 0 : _this$parentMap.get(node);\n\n if (parent !== _this.GRAPH_NODE) {\n return parent;\n }\n }\n };\n\n this.removeFromParentsChildList = function (node) {\n var targetParent = _this.parentMap.get(node);\n\n _this.childrenMap.get(targetParent).delete(node);\n };\n\n this.setParent = function (node, parent) {\n var _this$parentMap2, _this$childrenMap;\n\n _this.checkCompound();\n\n var realParent = parent === undefined ? _this.GRAPH_NODE : parent;\n\n var checkNode = _this.parent(realParent);\n\n while (checkNode) {\n if (node === checkNode) {\n throw new Error('Setting ' + parent + ' as parent of ' + node + ' would create a cycle');\n }\n\n checkNode = _this.parent(checkNode);\n }\n\n if (parent) {\n _this.setNode(parent);\n }\n\n _this.setNode(node);\n\n _this.removeFromParentsChildList(node);\n\n (_this$parentMap2 = _this.parentMap) === null || _this$parentMap2 === void 0 ? void 0 : _this$parentMap2.set(node, realParent);\n\n var realParentChilren = _this.childrenMap.get(realParent);\n\n realParentChilren.set(node, true);\n (_this$childrenMap = _this.childrenMap) === null || _this$childrenMap === void 0 ? void 0 : _this$childrenMap.set(realParent, realParentChilren);\n return _this;\n };\n\n this.children = function (node) {\n var targetNode = node === undefined ? _this.GRAPH_NODE : node;\n\n if (_this.isCompound()) {\n var _this$childrenMap2;\n\n var target = (_this$childrenMap2 = _this.childrenMap) === null || _this$childrenMap2 === void 0 ? void 0 : _this$childrenMap2.get(targetNode);\n\n if (target) {\n return Array.from(target.keys());\n }\n\n return undefined;\n }\n\n if (targetNode === _this.GRAPH_NODE) {\n return _this.nodes();\n }\n\n if (node && _this.hasNode(node)) {\n return [];\n }\n };\n\n this.predecessors = function (node) {\n var preds = _this.predecessorsMap.get(node);\n\n return preds ? Array.from(preds.keys()) : undefined;\n };\n\n this.successors = function (node) {\n var succs = _this.successorsMap.get(node);\n\n return succs ? Array.from(succs.keys()) : undefined;\n };\n\n this.neighbors = function (node) {\n var _this$predecessors;\n\n if (!_this.hasNode(node)) {\n return undefined;\n }\n\n return Array.from(new Set((_this$predecessors = _this.predecessors(node)) === null || _this$predecessors === void 0 ? void 0 : _this$predecessors.concat(_this.successors(node))));\n };\n\n this.isLeaf = function (node) {\n var _this$neighbors;\n\n if (_this.isDirected()) {\n var _this$successors;\n\n return !((_this$successors = _this.successors(node)) === null || _this$successors === void 0 ? void 0 : _this$successors.length);\n }\n\n return !((_this$neighbors = _this.neighbors(node)) === null || _this$neighbors === void 0 ? void 0 : _this$neighbors.length);\n };\n\n this.filterNodes = function (filter) {\n var directed = _this.directed,\n multigraph = _this.multigraph,\n compound = _this.compound;\n var copyGraph = new Graph({\n directed: directed,\n multigraph: multigraph,\n compound: compound\n });\n copyGraph.setGraph(_this.graph());\n\n _this.nodes().forEach(function (n) {\n if (filter(n)) {\n copyGraph.setNode(n, _this.node(n));\n }\n });\n\n _this.edges().forEach(function (edgeObj) {\n if (copyGraph.hasNode(edgeObj.v) && copyGraph.hasNode(edgeObj.w)) {\n copyGraph.setEdgeObj(edgeObj, _this.edge(edgeObj));\n }\n });\n\n if (compound) {\n var findParent = function findParent(node) {\n var parent = _this.parent(node);\n\n while (parent !== undefined && !copyGraph.hasNode(parent)) {\n parent = _this.parent(parent);\n }\n\n return parent;\n };\n\n copyGraph.nodes().forEach(function (node) {\n copyGraph.setParent(node, findParent(node));\n });\n }\n\n return copyGraph;\n };\n\n this.setDefaultEdgeLabel = function (newDefault) {\n if (isFunction(newDefault)) {\n _this.defaultEdgeLabelFn = newDefault;\n } else {\n _this.defaultEdgeLabelFn = function () {\n return newDefault;\n };\n }\n\n return _this;\n };\n\n this.edgeCount = function () {\n return _this.edgeCountNum;\n };\n\n this.setEdgeObj = function (edgeObj, value) {\n return _this.setEdge(edgeObj.v, edgeObj.w, value, edgeObj.name);\n };\n\n this.setPath = function (edges, value) {\n edges.reduce(function (v, w) {\n _this.setEdge(v, w, value);\n\n return w;\n });\n return _this;\n };\n\n this.edgeFromArgs = function (v, w, name) {\n return _this.edge({\n v: v,\n w: w,\n name: name\n });\n };\n\n this.edge = function (edgeObj) {\n return _this.edgesLabelsMap.get(edgeObjToId(_this.isDirected(), edgeObj));\n };\n\n this.hasEdge = function (v, w, name) {\n return _this.edgesLabelsMap.has(edgeObjToId(_this.isDirected(), {\n v: v,\n w: w,\n name: name\n }));\n };\n\n this.removeEdgeObj = function (_ref) {\n var v = _ref.v,\n w = _ref.w,\n name = _ref.name;\n return _this.removeEdge(v, w, name);\n };\n\n this.edges = function () {\n return Array.from(_this.edgesMap.values());\n };\n\n this.inEdges = function (v, u) {\n var inV = _this.inEdgesMap.get(v);\n\n if (inV) {\n return Array.from(inV.values()).filter(function (e) {\n return !u || e.v === u;\n });\n }\n\n return undefined;\n };\n\n this.outEdges = function (w, u) {\n var outW = _this.outEdgesMap.get(w);\n\n if (outW) {\n return Array.from(outW.values()).filter(function (e) {\n return !u || e.w === u;\n });\n }\n\n return undefined;\n };\n\n this.nodeEdges = function (v, w) {\n var _this$inEdges;\n\n if (!_this.hasNode(v)) {\n return undefined;\n }\n\n return (_this$inEdges = _this.inEdges(v, w)) === null || _this$inEdges === void 0 ? void 0 : _this$inEdges.concat(_this.outEdges(v, w));\n };\n\n this.toJSON = function () {\n return write(_this);\n };\n\n this.nodeInDegree = function (node) {\n var inEdges = _this.inEdgesMap.get(node);\n\n if (inEdges) {\n return inEdges.size;\n }\n\n return 0;\n };\n\n this.nodeOutDegree = function (node) {\n var outEdges = _this.outEdgesMap.get(node);\n\n if (outEdges) {\n return outEdges.size;\n }\n\n return 0;\n };\n\n this.nodeDegree = function (node) {\n return _this.nodeInDegree(node) + _this.nodeOutDegree(node);\n };\n\n this.source = function (edge) {\n return edge.v;\n };\n\n this.target = function (edge) {\n return edge.w;\n };\n\n var resultOptions = _objectSpread(_objectSpread({}, defaultOption), options);\n\n this.compound = resultOptions.compound;\n this.directed = resultOptions.directed;\n this.multigraph = resultOptions.multigraph;\n\n if (this.compound) {\n this.parentMap = new Map();\n this.childrenMap = new Map();\n }\n } // Map for graph\n\n /**\n * @description Map for parent relationship\n * @description.zh-CN 父子关系的映射\n */\n\n\n _createClass(Graph, [{\n key: \"setNode\",\n value:\n /**\n * @description Set Node label in graph if node not in graph then create it\n * @description.zh-CN 设置节点的label,如果这个节点不在图中,则在图中创建这个节点\n * @param node\n * @param value\n * @returns\n */\n function setNode(node, value) {\n var nodesLabelMap = this.nodesLabelMap,\n defaultNodeLabelFn = this.defaultNodeLabelFn,\n isCompound = this.isCompound,\n parentMap = this.parentMap,\n childrenMap = this.childrenMap,\n inEdgesMap = this.inEdgesMap,\n outEdgesMap = this.outEdgesMap,\n predecessorsMap = this.predecessorsMap,\n successorsMap = this.successorsMap; // 如果节点不在图中,则创建节点\n\n if (nodesLabelMap.has(node)) {\n if (value !== undefined) {\n nodesLabelMap.set(node, value);\n }\n\n return this;\n }\n\n nodesLabelMap.set(node, value || defaultNodeLabelFn(node)); // 如果是复合图,则创建节点的子节点\n\n if (isCompound()) {\n var _childrenMap$get;\n\n parentMap === null || parentMap === void 0 ? void 0 : parentMap.set(node, this.GRAPH_NODE);\n childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.set(node, new Map());\n\n if (!(childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.has(this.GRAPH_NODE))) {\n childrenMap === null || childrenMap === void 0 ? void 0 : childrenMap.set(this.GRAPH_NODE, new Map());\n }\n\n childrenMap === null || childrenMap === void 0 ? void 0 : (_childrenMap$get = childrenMap.get(this.GRAPH_NODE)) === null || _childrenMap$get === void 0 ? void 0 : _childrenMap$get.set(node, true);\n }\n\n [inEdgesMap, outEdgesMap, predecessorsMap, successorsMap].forEach(function (map) {\n return map.set(node, new Map());\n });\n this.nodeCountNum += 1;\n return this;\n }\n /**\n * @description Set nodes or add nodes in batch\n * @description.zh-CN 批量设置或者创建节点\n * @param nodes\n * @param value\n * @returns\n */\n\n }, {\n key: \"removeNode\",\n value:\n /**\n * @description Remove node from graph\n * @description.zh-CN 将节点从图中移除\n * @param node\n * @returns\n */\n function removeNode(node) {\n var _this2 = this;\n\n if (this.hasNode(node)) {\n var cleanEdge = function cleanEdge(edgeObj) {\n _this2.removeEdge(edgeObj.v, edgeObj.w, edgeObj.name);\n };\n\n var inEdgesMap = this.inEdgesMap,\n outEdgesMap = this.outEdgesMap,\n predecessorsMap = this.predecessorsMap,\n successorsMap = this.successorsMap,\n nodesLabelMap = this.nodesLabelMap;\n\n if (this.isCompound()) {\n var _this$parentMap3, _this$children, _this$childrenMap3;\n\n this.removeFromParentsChildList(node);\n (_this$parentMap3 = this.parentMap) === null || _this$parentMap3 === void 0 ? void 0 : _this$parentMap3.delete(node);\n (_this$children = this.children(node)) === null || _this$children === void 0 ? void 0 : _this$children.forEach(function (n) {\n return _this2.setParent(n);\n });\n (_this$childrenMap3 = this.childrenMap) === null || _this$childrenMap3 === void 0 ? void 0 : _this$childrenMap3.delete(node);\n }\n\n var inE = inEdgesMap.get(node);\n var outE = outEdgesMap.get(node);\n Array.from(inE.values()).forEach(function (edge) {\n return cleanEdge(edge);\n });\n Array.from(outE.values()).forEach(function (edge) {\n return cleanEdge(edge);\n });\n nodesLabelMap.delete(node);\n inEdgesMap.delete(node);\n outEdgesMap.delete(node);\n predecessorsMap.delete(node);\n successorsMap.delete(node);\n this.nodeCountNum -= 1;\n }\n\n return this;\n }\n /**\n * @description Set function that generate default label for edge, if param is non-function value then default label will always be this value;\n * @description.zh-CN 设置默认获取边Label的方法,如果传入不是函数的,那么默认label 的值只会是传入值\n * @param newDefault\n * @returns\n */\n\n }, {\n key: \"setEdge\",\n value:\n /**\n * @description set edge value, if nodes or edges not exsit then add to graph\n * @description.zh-CN 设置边的属性,如果边或节点不存在,那么将他们加入这个图\n * @param v\n * @param w\n * @param value\n * @param name\n * @returns\n */\n function setEdge(v_, w_, value, name) {\n var _this$inEdgesMap$get2, _this$outEdgesMap$get2;\n\n var edgeObj = edgeArgsToObj(this.isDirected(), v_, w_, name);\n var edgeId = edgeObjToId(this.isDirected(), edgeObj);\n var v = edgeObj.v,\n w = edgeObj.w;\n\n if (this.edgesLabelsMap.has(edgeId)) {\n this.edgesLabelsMap.set(edgeId, value);\n return this;\n }\n\n if (name !== undefined && !this.isMultigraph()) {\n throw new Error('Cannot set a named edge when isMultigraph = false');\n }\n\n this.setNode(v);\n this.setNode(w);\n this.edgesLabelsMap.set(edgeId, value || this.defaultEdgeLabelFn(v, w, name));\n Object.freeze(edgeObj);\n this.edgesMap.set(edgeId, edgeObj);\n var preds = this.predecessorsMap.get(w);\n var succs = this.successorsMap.get(v);\n incrementOrInitEntry(preds, v);\n incrementOrInitEntry(succs, w);\n (_this$inEdgesMap$get2 = this.inEdgesMap.get(w)) === null || _this$inEdgesMap$get2 === void 0 ? void 0 : _this$inEdgesMap$get2.set(edgeId, edgeObj);\n (_this$outEdgesMap$get2 = this.outEdgesMap.get(v)) === null || _this$outEdgesMap$get2 === void 0 ? void 0 : _this$outEdgesMap$get2.set(edgeId, edgeObj);\n this.edgeCountNum += 1;\n return this;\n }\n }, {\n key: \"removeEdge\",\n value:\n /**\n * @description remove a specific edge\n * @description.zh-CN 删除一条边\n * @param v\n * @param w\n * @param name\n * @returns\n */\n function removeEdge(v_, w_, name) {\n var edgeId = edgeArgsToId(this.isDirected(), v_, w_, name);\n var edgeObj = this.edgesMap.get(edgeId);\n\n if (edgeObj) {\n var _edgeArgsToObj = edgeArgsToObj(this.isDirected(), v_, w_, name),\n v = _edgeArgsToObj.v,\n w = _edgeArgsToObj.w;\n\n this.edgesLabelsMap.delete(edgeId);\n this.edgesMap.delete(edgeId);\n var preds = this.predecessorsMap.get(w);\n var succs = this.successorsMap.get(v);\n decrementOrRemoveEntry(preds, v);\n decrementOrRemoveEntry(succs, w);\n this.inEdgesMap.get(w).delete(edgeId);\n this.outEdgesMap.get(v).delete(edgeId);\n this.edgeCountNum -= 1;\n }\n\n return this;\n }\n /**\n * @description remove a specific edge by edge object\n * @description.zh-CN 删除一条边\n */\n\n }]);\n\n return Graph;\n}();\n\nGraph.fromJSON = read;\nexport { Graph as default };","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport Graph from '.';\nexport var GraphWithEvent = /*#__PURE__*/function (_Graph) {\n _inherits(GraphWithEvent, _Graph);\n\n var _super = _createSuper(GraphWithEvent);\n\n function GraphWithEvent() {\n var _this;\n\n _classCallCheck(this, GraphWithEvent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.eventPool = {};\n return _this;\n }\n\n _createClass(GraphWithEvent, [{\n key: \"appendEvent\",\n value:\n /**\n * @description Add an event listener.\n * @description.zh-CN 添加事件监听器。\n */\n function appendEvent(type, callback) {\n if (!this.eventPool[type]) {\n this.eventPool[type] = [];\n }\n\n this.eventPool[type].push(callback);\n }\n /**\n * @description remove an event listener.\n * @description.zh-CN 移除事件监听器。\n */\n\n }, {\n key: \"removeEvent\",\n value: function removeEvent(type, callback) {\n if (!this.eventPool[type]) {\n return;\n }\n\n var index = this.eventPool[type].indexOf(callback);\n\n if (index > -1) {\n this.eventPool[type].splice(index, 1);\n }\n }\n /**\n * @description trigger an event.\n * @description.zh-CN 触发事件。\n */\n\n }, {\n key: \"emitEvent\",\n value: function emitEvent(type) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (!this.eventPool[type]) {\n return;\n }\n\n this.eventPool[type].forEach(function (callback) {\n callback.apply(void 0, args);\n });\n }\n }, {\n key: \"setNode\",\n value: function setNode(node, value) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"setNode\", this).call(this, node, value);\n\n this.emitEvent('nodeAdd', node, value);\n return this;\n }\n }, {\n key: \"removeNode\",\n value: function removeNode(node) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"removeNode\", this).call(this, node);\n\n this.emitEvent('nodeRemove', node);\n return this;\n }\n }, {\n key: \"setEdge\",\n value: function setEdge(v_, w_, value, name) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"setEdge\", this).call(this, v_, w_, value, name);\n\n this.emitEvent('edgeAdd', v_, w_, value, name);\n return this;\n }\n }, {\n key: \"removeEdge\",\n value: function removeEdge(v_, w_, name) {\n _get(_getPrototypeOf(GraphWithEvent.prototype), \"removeEdge\", this).call(this, v_, w_, name);\n\n this.emitEvent('edgeRemove', v_, w_, name);\n return this;\n }\n }]);\n\n return GraphWithEvent;\n}(Graph);","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// A PriorityQueue is a queue that can be sorted by priority.\nvar PriorityQueue = /*#__PURE__*/_createClass(function PriorityQueue() {\n var _this = this;\n\n _classCallCheck(this, PriorityQueue);\n\n this.arr = [];\n this.keyIndice = new Map();\n\n this.size = function () {\n return _this.arr.length;\n };\n\n this.keys = function () {\n return _this.arr.map(function (e) {\n return e.key;\n });\n };\n\n this.has = function (key) {\n return _this.keyIndice.has(key);\n };\n\n this.priority = function (key) {\n var index = _this.keyIndice.get(key);\n\n if (index !== undefined) {\n return _this.arr[index].priority;\n }\n };\n\n this.swap = function (i, j) {\n var arr = _this.arr,\n keyIndice = _this.keyIndice;\n var _ref = [arr[i], arr[j]],\n originI = _ref[0],\n originJ = _ref[1];\n arr[i] = originJ;\n arr[j] = originI;\n keyIndice.set(originI.key, j);\n keyIndice.set(originJ.key, i);\n };\n\n this.innerDecrease = function (index) {\n var arr = _this.arr;\n var priority = arr[index].priority;\n var parent;\n var i = index;\n\n while (i !== 0) {\n var _arr$parent;\n\n parent = i >> 1;\n\n if (((_arr$parent = arr[parent]) === null || _arr$parent === void 0 ? void 0 : _arr$parent.priority) < priority) {\n break;\n }\n\n _this.swap(i, parent);\n\n i = parent;\n }\n };\n\n this.heapify = function (i) {\n var arr = _this.arr;\n var l = i << 1;\n var r = l + 1;\n var largest = i;\n\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n\n if (largest !== i) {\n _this.swap(i, largest);\n\n _this.heapify(largest);\n }\n }\n };\n\n this.min = function () {\n if (_this.size() === 0) {\n throw new Error('Queue underflow');\n }\n\n return _this.arr[0].key;\n };\n\n this.add = function (key, priority) {\n var keyIndice = _this.keyIndice,\n arr = _this.arr; // if the key is already in the queue, update the priority\n\n if (!keyIndice.has(key)) {\n var index = arr.length;\n keyIndice.set(key, index);\n arr.push({\n key: key,\n priority: priority\n });\n\n _this.innerDecrease(index);\n\n return true;\n }\n\n return false;\n };\n\n this.removeMin = function () {\n _this.swap(0, _this.arr.length - 1);\n\n var min = _this.arr.pop();\n\n _this.keyIndice.delete(min.key);\n\n _this.heapify(0);\n\n return min.key;\n };\n\n this.decrease = function (key, priority) {\n if (!_this.has(key)) {\n throw new Error(\"There's no key named \".concat(key));\n } // there must be an index\n\n\n var index = _this.keyIndice.get(key);\n\n if (priority > _this.arr[index].priority) {\n throw new Error(\"New priority is greater than current priority.Key: \".concat(key, \" Old: + \").concat(_this.arr[index].priority, \" New: \").concat(priority));\n }\n\n _this.arr[index].priority = priority;\n\n _this.innerDecrease(index);\n };\n});\n\nexport { PriorityQueue as default };","import Graph from '../Graph';\nimport PriorityQueue from './PriorityQueue';\n\nvar prim = function prim(graph, weightFn) {\n var result = new Graph();\n var parents = new Map();\n var pq = new PriorityQueue();\n var v;\n\n function updateNeighbors(edge) {\n var w = edge.v === v ? edge.w : edge.v;\n var pri = pq.priority(w);\n\n if (pri !== undefined) {\n var edgeWeight = weightFn(edge);\n\n if (edgeWeight < pri) {\n parents.set(w, v);\n pq.decrease(w, edgeWeight);\n }\n }\n }\n\n if (graph.nodeCount() === 0) {\n return result;\n }\n\n graph.nodes().forEach(function (node) {\n pq.add(node, Number.POSITIVE_INFINITY);\n result.setNode(node);\n }); // Start from an arbitrary node\n\n pq.decrease(graph.nodes()[0], 0);\n var init = false;\n\n while (pq.size() > 0) {\n var _graph$nodeEdges;\n\n v = pq.removeMin();\n\n if (parents.has(v)) {\n result.setEdge(v, parents.get(v));\n } else if (init) {\n throw new Error('Input graph is not connected: ' + graph.graph());\n } else {\n init = true;\n }\n\n (_graph$nodeEdges = graph.nodeEdges(v)) === null || _graph$nodeEdges === void 0 ? void 0 : _graph$nodeEdges.forEach(updateNeighbors);\n }\n\n return result;\n};\n\nexport default prim;","var components = function components(graph) {\n var visited = new Set();\n var resultComponents = [];\n var nodes = graph.nodes();\n nodes.forEach(function (n) {\n var componentsArr = [];\n var waitingList = [n];\n\n while (waitingList.length > 0) {\n var node = waitingList.pop();\n\n if (!visited.has(node)) {\n var _graph$successors, _graph$predecessors;\n\n visited.add(node);\n componentsArr.push(node);\n (_graph$successors = graph.successors(node)) === null || _graph$successors === void 0 ? void 0 : _graph$successors.forEach(function (n) {\n return waitingList.push(n);\n });\n (_graph$predecessors = graph.predecessors(node)) === null || _graph$predecessors === void 0 ? void 0 : _graph$predecessors.forEach(function (n) {\n return waitingList.push(n);\n });\n }\n }\n\n if (componentsArr.length) {\n resultComponents.push(componentsArr);\n }\n });\n return resultComponents;\n};\n\nexport default components;","/**\n * @description DFS traversal.\n * @description.zh-CN DFS 遍历。\n */\nvar doDFS = function doDFS(graph, node, postorder, visited, navigator, result) {\n if (!visited.includes(node)) {\n visited.push(node);\n\n if (!postorder) {\n result.push(node);\n }\n\n navigator(node).forEach(function (n) {\n return doDFS(graph, n, postorder, visited, navigator, result);\n });\n\n if (postorder) {\n result.push(node);\n }\n }\n};\n/**\n * @description DFS traversal.\n * @description.zh-CN DFS 遍历。\n */\n\n\nvar dfs = function dfs(graph, node, order) {\n var nodes = Array.isArray(node) ? node : [node];\n\n var navigator = function navigator(n) {\n return graph.isDirected() ? graph.successors(n) : graph.neighbors(n);\n };\n\n var results = [];\n var visited = [];\n nodes.forEach(function (node) {\n if (!graph.hasNode(node)) {\n throw new Error('Graph does not have node: ' + node);\n } else {\n doDFS(graph, node, order === 'post', visited, navigator, results);\n }\n });\n return results;\n};\n\nexport default dfs;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport PriorityQueue from './PriorityQueue';\n\nvar DEFAULT_WEIGHT_FUNC = function DEFAULT_WEIGHT_FUNC() {\n return 1;\n};\n/**\n * @description Dijkstra's algorithm for single-source shortest paths.\n * @description https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm\n * @description.zh-CN Dijkstra 算法用于单源最短路径。\n */\n\n\nvar dijkstra = function dijkstra(graph, source, weightFn, edgeFn) {\n return runDijkstra(graph, source, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function (v) {\n return graph.outEdges(v);\n });\n};\n/**\n * @description Dijkstra's algorithm for single-source shortest paths.\n * @description https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm\n * @description.zh-CN Dijkstra 算法用于单源最短路径。\n */\n\n\nvar runDijkstra = function runDijkstra(graph, source, weightFn, edgeFn) {\n var results = new Map();\n var pq = new PriorityQueue();\n var v;\n var vEntry;\n\n var updateNeighbors = function updateNeighbors(edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results.get(w);\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error('dijkstra does not allow negative edge weights. ' + 'Bad edge: ' + edge + ' Weight: ' + weight);\n } // If there is already a shorter path to w, ignore this edge.\n\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n graph.nodes().forEach(function (v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results.set(v, {\n distance: distance\n });\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results.get(v);\n\n if (vEntry && vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n var obj = {};\n Array.from(results.entries()).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n e = _ref2[1];\n\n obj[String(node)] = e;\n return obj;\n });\n return obj;\n};\n\nexport default dijkstra;","import dijkstra from './dijkstra';\n\nvar dijkstraAll = function dijkstraAll(graph, weightFn, edgeFn) {\n var map = {};\n graph.nodes().forEach(function (node) {\n map[String(node)] = dijkstra(graph, node, weightFn, edgeFn);\n return map;\n });\n return map;\n};\n\nexport default dijkstraAll;","/**\n * @description Tarjan's algorithm for finding the strongly connected components of a graph.\n * @description https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm\n * @description.zh-CN Tarjan 算法用于找到图的强连通子图。\n * @param graph\n * @returns\n */\nvar tarjan = function tarjan(graph) {\n var index = 0;\n var stack = [];\n var visited = new Map(); // node id -> { onStack, lowlink, index }\n\n var results = [];\n\n function dfs(v) {\n var _graph$successors;\n\n var entry = {\n onStack: true,\n lowlink: index,\n index: index\n };\n visited.set(v, entry);\n index += 1;\n stack.push(v);\n (_graph$successors = graph.successors(v)) === null || _graph$successors === void 0 ? void 0 : _graph$successors.forEach(function (w) {\n var _visited$get;\n\n // 如果 w 没有被访问过,则继续访问 w\n if (!visited.has(w)) {\n dfs(w);\n var wEntry = visited.get(w);\n entry.lowlink = Math.min(entry.lowlink, wEntry.lowlink); // 如果 w 在栈顶,则说明 w 和 v 不是强连通的\n } else if ((_visited$get = visited.get(w)) === null || _visited$get === void 0 ? void 0 : _visited$get.onStack) {\n var _wEntry = visited.get(w); // 如果 w 在栈中,则说明 w 在当前访问的路径上\n\n\n entry.lowlink = Math.min(entry.lowlink, _wEntry.index);\n }\n }); // 如果 v 的 lowlink 不等于 v 的 index,则说明 v 和 v 的 lowlink 不是强连通的\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n\n do {\n // 将 w 出栈,并将 w 的所有邻接点加入强连通子图\n w = stack.pop();\n var wEntry = visited.get(w);\n wEntry.onStack = false;\n cmpt.push(w);\n } while (v !== w);\n\n results.push(cmpt);\n }\n }\n\n graph.nodes().forEach(function (v) {\n if (!visited.has(v)) {\n dfs(v);\n }\n });\n return results;\n};\n\nexport default tarjan;","import tarjan from './tarjan';\n\nvar findCycles = function findCycles(graph) {\n return tarjan(graph).filter(function (cmpt) {\n return cmpt.length > 1 || cmpt.length === 1 && graph.hasEdge(cmpt[0], cmpt[0]);\n });\n};\n\nexport default findCycles;","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nexport var CycleException = /*#__PURE__*/function (_Error) {\n _inherits(CycleException, _Error);\n\n var _super = _createSuper(CycleException);\n\n function CycleException() {\n _classCallCheck(this, CycleException);\n\n return _super.apply(this, arguments);\n }\n\n return _createClass(CycleException);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction topsort(graph) {\n var visited = new Set();\n var stack = new Set();\n var results = [];\n\n function visit(node) {\n if (stack.has(node)) {\n throw new CycleException();\n }\n\n if (!visited.has(node)) {\n var _graph$predecessors;\n\n stack.add(node);\n visited.add(node);\n (_graph$predecessors = graph.predecessors(node)) === null || _graph$predecessors === void 0 ? void 0 : _graph$predecessors.forEach(visit);\n stack.delete(node);\n results.push(node);\n }\n }\n\n graph.sinks().forEach(visit);\n\n if (visited.size !== graph.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nexport default topsort;","import topsort, { CycleException } from './topsort';\n\nvar isAcyclic = function isAcyclic(graph) {\n try {\n topsort(graph);\n } catch (e) {\n if (e instanceof CycleException) {\n return false;\n }\n\n throw e;\n }\n\n return true;\n};\n\nexport default isAcyclic;","import dfs from './dfs';\n\nvar postorder = function postorder(graph, nodes) {\n return dfs(graph, nodes, 'post');\n};\n\nexport default postorder;","import dfs from './dfs';\n\nvar preorder = function preorder(graph, nodes) {\n return dfs(graph, nodes, 'pre');\n};\n\nexport default preorder;","var DEFAULT_WEIGHT_FUNC = function DEFAULT_WEIGHT_FUNC() {\n return 1;\n};\n\nexport function floydWarshall(graph, weightFn, edgeFn) {\n return runFloydWarshall(graph, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function (v) {\n return graph.outEdges(v);\n });\n}\n\nfunction runFloydWarshall(graph, weightFn, edgeFn) {\n var results = {};\n var nodes = graph.nodes();\n nodes.forEach(function (node) {\n var v = String(node);\n results[v] = {};\n results[v][v] = {\n distance: 0\n };\n nodes.forEach(function (w) {\n if (node !== w) {\n results[v][String(w)] = {\n distance: Number.POSITIVE_INFINITY\n };\n }\n });\n edgeFn(node).forEach(function (edge) {\n var w = edge.v === node ? edge.w : edge.v;\n var d = weightFn(edge);\n results[v][String(w)] = {\n distance: d,\n predecessor: node\n };\n });\n });\n nodes.forEach(function (nodek) {\n var k = String(nodek);\n var rowK = results[k];\n nodes.forEach(function (nodei) {\n var i = String(nodei);\n var rowI = results[i];\n nodes.forEach(function (nodej) {\n var j = String(nodej);\n var ik = rowI[k];\n var kj = rowK[j];\n var ij = rowI[j];\n var altDistance = ik.distance + kj.distance;\n\n if (altDistance < ij.distance) {\n ij.distance = altDistance;\n ij.predecessor = kj.predecessor;\n }\n });\n });\n });\n return results;\n}\n\nexport default floydWarshall;","/**\n * @file Functions that used to find similar element between two graph\n * @file.zh-CN 在两个图中查找相似元素的函数\n */\n\n/**\n * @description Check if two graphs are contains the same nodes.\n * @description.zh-CN 检查两个图是否包含相同的节点。\n */\nexport var containSameNodes = function containSameNodes(aGraph, bGraph) {\n var aNodes = aGraph.nodes();\n\n for (var i = 0; i < aNodes.length; i++) {\n var aNode = aNodes[i];\n\n if (bGraph.hasNode(aNode)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @description Check if two graphs are contains the same edges.\n * @description.zh-CN 检查两个图是否包含相同的边。\n */\n\nexport var containSameEdges = function containSameEdges(aGraph, bGraph) {\n var aEdges = aGraph.edges();\n\n for (var i = 0; i < aEdges.length; i++) {\n var aEdge = aEdges[i];\n\n if (bGraph.hasEdge(aEdge.v, aEdge.w, aEdge.name)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @description get same nodes in two graphs.\n * @description.zh-CN 获取两个图中相同的节点。\n */\n\nexport var getSameNodes = function getSameNodes(aGraph, bGraph) {\n var aNodes = aGraph.nodes();\n var sameNodes = aNodes.filter(function (aNode) {\n return bGraph.hasNode(aNode);\n });\n return sameNodes;\n};\n/**\n * @description get same edges in two graphs.\n * @description.zh-CN 获取两个图中相同的边。\n */\n\nexport var getSameEdges = function getSameEdges(aGraph, bGraph) {\n var aEdges = aGraph.edges();\n var sameEdges = aEdges.filter(function (aEdge) {\n return bGraph.hasEdge(aEdge.v, aEdge.w, aEdge.name);\n });\n return sameEdges;\n};\n/**\n * @description Check if two graphs'option are the same.\n * @description.zh-CN 检查两个图的选项是否相同。\n */\n\nexport var isGraphOptionSame = function isGraphOptionSame(aGraph, bGraph) {\n return aGraph.isCompound() === bGraph.isCompound() && aGraph.isDirected() === bGraph.isDirected() && aGraph.isMultigraph() === bGraph.isMultigraph();\n};\n/**\n * @description Check if a graph contains all nodes in another graph.\n * @description.zh-CN 检查一个图是否包含另一个图的所有节点。\n */\n\nexport var containAllSameNodes = function containAllSameNodes(aGraph, bGraph) {\n var sameNodes = getSameNodes(aGraph, bGraph);\n return sameNodes.length === aGraph.nodes().length;\n};\n/**\n * @description Check if a graph contains all edges in another graph.\n * @description.zh-CN 检查一个图是否包含另一个图的所有边。\n */\n\nexport var containAllSameEdges = function containAllSameEdges(aGraph, bGraph) {\n var sameEdges = getSameEdges(aGraph, bGraph);\n return sameEdges.length === aGraph.edges().length;\n};\n/**\n * @description Check if two graphs are the same.\n * @description.zh-CN 检查两个图是否相同。\n */\n\nexport var isGraphSame = function isGraphSame(aGraph, bGraph) {\n return isGraphOptionSame(aGraph, bGraph) && aGraph.nodeCount() === bGraph.nodeCount() && containAllSameNodes(aGraph, bGraph) && aGraph.edgeCount() === bGraph.edgeCount() && containAllSameEdges(aGraph, bGraph);\n};\n/**\n * @description Check if one graph is the subgraph of another graph.\n * @description.zh-CN 检查一个图是否是另一个图的子图。\n */\n\nexport var isGraphContainsAnother = function isGraphContainsAnother(originGraph, targetGraph) {\n return containAllSameNodes(originGraph, targetGraph) && containAllSameEdges(originGraph, targetGraph);\n};","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/**\n * @file To get graph essencial information.\n * @file.zh-CN 获取图的基本信息\n * @module essence\n */\nimport Graph from '../Graph';\n/**\n * @description Check if the object is a graph.\n * @description.zh-CN 检查对象是否为图。\n */\n\nexport function isGraph(obj) {\n return obj instanceof Graph;\n}\n/**\n * @description Check if the graph is a simple graph.\n * @description.zh-CN 检查图是否为简单图。\n */\n\nexport function isSimpleGraph(graph) {\n if (graph.isMultigraph()) {\n return false;\n }\n\n var edges = graph.edges();\n var edgeStack = new Map();\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (edge.v === edge.w) {\n return false;\n }\n\n var _sort = [edge.v, edge.w].sort(),\n _sort2 = _slicedToArray(_sort, 2),\n v = _sort2[0],\n w = _sort2[1];\n\n var key = \"\".concat(v, \"-\").concat(w);\n\n if (edgeStack.has(key)) {\n return false;\n }\n\n edgeStack.set(key, true);\n }\n\n return true;\n}\n/**\n * @description Check if the graph is a null graph.\n * @description.zh-CN 检查图是否为空图。\n */\n\nexport function isNullGraph(graph) {\n return graph.nodes().length === 0;\n}\n/**\n * @description Check if the graph contains Self loops.\n * @description.zh-CN 检查图是否包含自环。\n */\n\nexport function hasSelfLoop(graph) {\n var edges = graph.edges();\n\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (edge.v === edge.w) {\n return true;\n }\n }\n\n return false;\n}","import { isSimpleGraph } from '../essence';\nimport { containAllSameNodes, containSameEdges } from './contain';\n/**\n * @description Check if one graph is the complement of another graph.\n * @description.zh-CN 检查一个图是否是另一个图的补图。\n */\n\nexport var isGraphComplement = function isGraphComplement(originGraph, targetGraph) {\n if (!isSimpleGraph(originGraph) || !isSimpleGraph(targetGraph)) {\n return false;\n }\n\n if (!containAllSameNodes(originGraph, targetGraph)) {\n return false;\n }\n\n if (containSameEdges(originGraph, targetGraph)) {\n return false;\n }\n\n var nodeCount = originGraph.nodeCount();\n return originGraph.edgeCount() + targetGraph.edgeCount() === nodeCount * (nodeCount - 1) / 2;\n};","import { isSimpleGraph } from '../essence';\nimport Graph from '../Graph';\n/**\n * @description Get the graph's complement\n * @description.zh-CN 获取图的补图\n */\n\nexport var getGraphComplement = function getGraphComplement(originGraph) {\n if (!isSimpleGraph(originGraph)) {\n return null;\n }\n\n var nodeCount = originGraph.nodeCount();\n var complementGraph = new Graph({\n compound: originGraph.isCompound(),\n directed: originGraph.isDirected(),\n multigraph: originGraph.isMultigraph()\n });\n var nodes = originGraph.nodes();\n\n for (var i = 0; i < nodeCount; i++) {\n var nodei = nodes[i];\n complementGraph.setNode(nodei, originGraph.node(nodei));\n\n for (var j = i + 1; j < nodeCount; j++) {\n var nodej = nodes[j];\n\n if (!originGraph.hasEdge(nodei, nodej)) {\n complementGraph.setEdge(nodei, nodej);\n }\n }\n }\n\n return complementGraph;\n};","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar list_1 = __importDefault(require(\"./data/list\"));\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar List = /** @class */ (function (_super) {\n __extends(List, _super);\n function List() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return List;\n}(list_1.default));\nvar StateGraph = /** @class */ (function (_super) {\n __extends(StateGraph, _super);\n function StateGraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StateGraph;\n}(graphlib_1.Graph));\n/*\n * A greedy heuristic for finding a feedback arc set for a graph. A feedback\n * arc set is a set of edges that can be removed to make a graph acyclic.\n * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, \"A fast and\n * effective heuristic for the feedback arc set problem.\" This implementation\n * adjusts that from the paper to allow for weighted edges.\n */\nvar DEFAULT_WEIGHT_FN = function () { return 1; };\nvar greedyFAS = function (g, weightFn) {\n var _a;\n if (g.nodeCount() <= 1)\n return [];\n var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);\n var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);\n return (_a = results.map(function (e) { return g.outEdges(e.v, e.w); })) === null || _a === void 0 ? void 0 : _a.flat();\n};\nvar doGreedyFAS = function (g, buckets, zeroIdx) {\n var results = [];\n var sources = buckets[buckets.length - 1];\n var sinks = buckets[0];\n var entry;\n while (g.nodeCount()) {\n while ((entry = sinks.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n while ((entry = sources.dequeue())) {\n removeNode(g, buckets, zeroIdx, entry);\n }\n if (g.nodeCount()) {\n for (var i = buckets.length - 2; i > 0; --i) {\n entry = buckets[i].dequeue();\n if (entry) {\n results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));\n break;\n }\n }\n }\n }\n return results;\n};\nvar removeNode = function (g, buckets, zeroIdx, entry, collectPredecessors) {\n var _a, _b;\n var results = [];\n (_a = g.inEdges(entry.v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edge) {\n var weight = g.edge(edge);\n var uEntry = g.node(edge.v);\n if (collectPredecessors) {\n // this result not really care about in or out\n results.push({ v: edge.v, w: edge.w, in: 0, out: 0 });\n }\n if (uEntry.out === undefined)\n uEntry.out = 0;\n uEntry.out -= weight;\n assignBucket(buckets, zeroIdx, uEntry);\n });\n (_b = g.outEdges(entry.v)) === null || _b === void 0 ? void 0 : _b.forEach(function (edge) {\n var weight = g.edge(edge);\n var w = edge.w;\n var wEntry = g.node(w);\n if (wEntry.in === undefined)\n wEntry.in = 0;\n wEntry.in -= weight;\n assignBucket(buckets, zeroIdx, wEntry);\n });\n g.removeNode(entry.v);\n return collectPredecessors ? results : undefined;\n};\nvar buildState = function (g, weightFn) {\n var fasGraph = new StateGraph();\n var maxIn = 0;\n var maxOut = 0;\n g.nodes().forEach(function (v) {\n fasGraph.setNode(v, { v: v, in: 0, out: 0 });\n });\n // Aggregate weights on nodes, but also sum the weights across multi-edges\n // into a single edge for the fasGraph.\n g.edges().forEach(function (e) {\n var prevWeight = fasGraph.edge(e) || 0;\n var weight = (weightFn === null || weightFn === void 0 ? void 0 : weightFn(e)) || 1;\n var edgeWeight = prevWeight + weight;\n fasGraph.setEdge(e.v, e.w, edgeWeight);\n maxOut = Math.max(maxOut, (fasGraph.node(e.v).out += weight));\n maxIn = Math.max(maxIn, (fasGraph.node(e.w).in += weight));\n });\n var buckets = [];\n var rangeMax = maxOut + maxIn + 3;\n for (var i = 0; i < rangeMax; i++) {\n buckets.push(new List());\n }\n var zeroIdx = maxIn + 1;\n fasGraph.nodes().forEach(function (v) {\n assignBucket(buckets, zeroIdx, fasGraph.node(v));\n });\n return { buckets: buckets, zeroIdx: zeroIdx, graph: fasGraph };\n};\nvar assignBucket = function (buckets, zeroIdx, entry) {\n if (!entry.out) {\n buckets[0].enqueue(entry);\n }\n else if (!entry[\"in\"]) {\n buckets[buckets.length - 1].enqueue(entry);\n }\n else {\n buckets[entry.out - entry[\"in\"] + zeroIdx].enqueue(entry);\n }\n};\nexports.default = greedyFAS;\n//# sourceMappingURL=greedy-fas.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar greedy_fas_1 = __importDefault(require(\"./greedy-fas\"));\nvar run = function (g) {\n var weightFn = function (g) {\n return function (e) { var _a; return ((_a = g.edge(e)) === null || _a === void 0 ? void 0 : _a.weight) || 1; };\n };\n var fas = g.graph().acyclicer === \"greedy\" ? (0, greedy_fas_1.default)(g, weightFn(g)) : dfsFAS(g);\n fas === null || fas === void 0 ? void 0 : fas.forEach(function (e) {\n var label = g.edge(e);\n g.removeEdgeObj(e);\n label.forwardName = e.name;\n label.reversed = true;\n g.setEdge(e.w, e.v, label, \"rev-\".concat(Math.random()));\n });\n};\nvar dfsFAS = function (g) {\n var fas = [];\n var stack = {};\n var visited = {};\n var dfs = function (v) {\n var _a;\n if (visited[v]) {\n return;\n }\n visited[v] = true;\n stack[v] = true;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n if (stack[e.w]) {\n fas.push(e);\n }\n else {\n dfs(e.w);\n }\n });\n delete stack[v];\n };\n g.nodes().forEach(dfs);\n return fas;\n};\nvar undo = function (g) {\n g.edges().forEach(function (e) {\n var label = g.edge(e);\n if (label.reversed) {\n g.removeEdgeObj(e);\n var forwardName = label.forwardName;\n delete label.reversed;\n delete label.forwardName;\n g.setEdge(e.w, e.v, label, forwardName);\n }\n });\n};\nexports.default = { run: run, undo: undo };\n//# sourceMappingURL=acyclic.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Graph = void 0;\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar Graph = /** @class */ (function (_super) {\n __extends(Graph, _super);\n function Graph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Graph;\n}(graphlib_1.Graph));\nexports.Graph = Graph;\n//# sourceMappingURL=graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.minBy = exports.notime = exports.time = exports.partition = exports.maxRank = exports.addBorderNode = exports.removeEmptyRanks = exports.normalizeRanks = exports.buildLayerMatrix = exports.intersectRect = exports.predecessorWeights = exports.successorWeights = exports.zipObject = exports.asNonCompoundGraph = exports.simplify = exports.addDummyNode = void 0;\nvar util_1 = require(\"../../../util\");\nvar graph_1 = require(\"../graph\");\nvar safeSort = function (valueA, valueB) {\n return Number(valueA) - Number(valueB);\n};\n/*\n * Adds a dummy node to the graph and return v.\n */\nvar addDummyNode = function (g, type, attrs, name) {\n var v;\n do {\n v = \"\".concat(name).concat(Math.random());\n } while (g.hasNode(v));\n attrs.dummy = type;\n g.setNode(v, attrs);\n return v;\n};\nexports.addDummyNode = addDummyNode;\n/*\n * Returns a new graph with only simple edges. Handles aggregation of data\n * associated with multi-edges.\n */\nvar simplify = function (g) {\n var simplified = new graph_1.Graph().setGraph(g.graph());\n g.nodes().forEach(function (v) { simplified.setNode(v, g.node(v)); });\n g.edges().forEach(function (e) {\n var simpleLabel = simplified.edgeFromArgs(e.v, e.w) || { weight: 0, minlen: 1 };\n var label = g.edge(e);\n simplified.setEdge(e.v, e.w, {\n weight: simpleLabel.weight + label.weight,\n minlen: Math.max(simpleLabel.minlen, label.minlen)\n });\n });\n return simplified;\n};\nexports.simplify = simplify;\nvar asNonCompoundGraph = function (g) {\n var simplified = new graph_1.Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());\n g.nodes().forEach(function (node) {\n var _a;\n if (!((_a = g.children(node)) === null || _a === void 0 ? void 0 : _a.length)) {\n simplified.setNode(node, g.node(node));\n }\n });\n g.edges().forEach(function (edge) {\n simplified.setEdgeObj(edge, g.edge(edge));\n });\n return simplified;\n};\nexports.asNonCompoundGraph = asNonCompoundGraph;\nvar zipObject = function (keys, values) {\n return keys === null || keys === void 0 ? void 0 : keys.reduce(function (obj, key, i) {\n obj[key] = values[i];\n return obj;\n }, {});\n};\nexports.zipObject = zipObject;\nvar successorWeights = function (g) {\n var weightsMap = {};\n g.nodes().forEach(function (node) {\n var _a;\n var sucs = {};\n (_a = g.outEdges(node)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var _a;\n sucs[e.w] = (sucs[e.w] || 0) + (((_a = g.edge(e)) === null || _a === void 0 ? void 0 : _a.weight) || 0);\n });\n weightsMap[node] = sucs;\n });\n return weightsMap;\n};\nexports.successorWeights = successorWeights;\nvar predecessorWeights = function (g) {\n var nodes = g.nodes();\n var weightMap = nodes.map(function (v) {\n var _a;\n var preds = {};\n (_a = g.inEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;\n });\n return preds;\n });\n return (0, exports.zipObject)(nodes, weightMap);\n};\nexports.predecessorWeights = predecessorWeights;\n/*\n * Finds where a line starting at point ({x, y}) would intersect a rectangle\n * ({x, y, width, height}) if it were pointing at the rectangle's center.\n */\nvar intersectRect = function (rect, point) {\n var x = Number(rect.x);\n var y = Number(rect.y);\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = Number(point.x) - x;\n var dy = Number(point.y) - y;\n var w = Number(rect.width) / 2;\n var h = Number(rect.height) / 2;\n if (!dx && !dy) {\n // completely overlapped directly, then return points its self\n return { x: 0, y: 0 };\n }\n var sx;\n var sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = (h * dx) / dy;\n sy = h;\n }\n else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = (w * dy) / dx;\n }\n return { x: x + sx, y: y + sy };\n};\nexports.intersectRect = intersectRect;\n/*\n * Given a DAG with each node assigned \"rank\" and \"order\" properties, this\n * const will produce a matrix with the ids of each node.\n */\nvar buildLayerMatrix = function (g) {\n var layeringNodes = [];\n var rankMax = (0, exports.maxRank)(g) + 1;\n for (var i = 0; i < rankMax; i++) {\n layeringNodes.push([]);\n }\n // const layering = _.map(_.range(maxRank(g) + 1), function() { return []; });\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (!node)\n return;\n var rank = node.rank;\n if (rank !== undefined && layeringNodes[rank]) {\n layeringNodes[rank].push(v);\n }\n });\n for (var i = 0; i < rankMax; i++) {\n layeringNodes[i] = layeringNodes[i].sort(function (va, vb) { var _a, _b; return safeSort((_a = g.node(va)) === null || _a === void 0 ? void 0 : _a.order, (_b = g.node(vb)) === null || _b === void 0 ? void 0 : _b.order); });\n }\n return layeringNodes;\n};\nexports.buildLayerMatrix = buildLayerMatrix;\n/*\n * Adjusts the ranks for all nodes in the graph such that all nodes v have\n * rank(v) >= 0 and at least one node w has rank(w) = 0.\n */\nvar normalizeRanks = function (g) {\n var nodeRanks = g\n .nodes()\n .filter(function (v) { var _a; return ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) !== undefined; })\n .map(function (v) { return g.node(v).rank; });\n var min = Math.min.apply(Math, nodeRanks);\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.hasOwnProperty(\"rank\") && min !== Infinity) {\n node.rank -= min;\n }\n });\n};\nexports.normalizeRanks = normalizeRanks;\nvar removeEmptyRanks = function (g) {\n // Ranks may not start at 0, so we need to offset them\n var nodes = g.nodes();\n var nodeRanks = nodes\n .filter(function (v) { var _a; return ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) !== undefined; })\n .map(function (v) { return g.node(v).rank; });\n var offset = Math.min.apply(Math, nodeRanks);\n var layers = [];\n nodes.forEach(function (v) {\n var _a;\n var rank = (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank) || 0) - offset;\n if (!layers[rank]) {\n layers[rank] = [];\n }\n layers[rank].push(v);\n });\n var delta = 0;\n var nodeRankFactor = g.graph().nodeRankFactor || 0;\n for (var i = 0; i < layers.length; i++) {\n var vs = layers[i];\n if (vs === undefined) {\n if (i % nodeRankFactor !== 0) {\n delta -= 1;\n }\n }\n else if (delta) {\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var node = g.node(v);\n if (node) {\n node.rank = node.rank || 0;\n node.rank += delta;\n }\n });\n }\n }\n};\nexports.removeEmptyRanks = removeEmptyRanks;\nvar addBorderNode = function (g, prefix, rank, order) {\n var node = {\n width: 0,\n height: 0\n };\n if ((0, util_1.isNumber)(rank) && (0, util_1.isNumber)(order)) {\n node.rank = rank;\n node.order = order;\n }\n return (0, exports.addDummyNode)(g, \"border\", node, prefix);\n};\nexports.addBorderNode = addBorderNode;\nvar maxRank = function (g) {\n var maxRank;\n g.nodes().forEach(function (v) {\n var _a;\n var rank = (_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.rank;\n if (rank !== undefined) {\n if (maxRank === undefined || rank > maxRank) {\n maxRank = rank;\n }\n }\n });\n if (!maxRank) {\n maxRank = 0;\n }\n return maxRank;\n};\nexports.maxRank = maxRank;\n/*\n * Partition a collection into two groups: `lhs` and `rhs`. If the supplied\n * const returns true for an entry it goes into `lhs`. Otherwise it goes\n * into `rhs.\n */\nvar partition = function (collection, fn) {\n var result = { lhs: [], rhs: [] };\n collection === null || collection === void 0 ? void 0 : collection.forEach(function (value) {\n if (fn(value)) {\n result.lhs.push(value);\n }\n else {\n result.rhs.push(value);\n }\n });\n return result;\n};\nexports.partition = partition;\n/*\n * Returns a new const that wraps `fn` with a timer. The wrapper logs the\n * time it takes to execute the function.\n */\nvar time = function (name, fn) {\n var start = Date.now();\n try {\n return fn();\n }\n finally {\n console.log(\"\".concat(name, \" time: \").concat(Date.now() - start, \"ms\"));\n }\n};\nexports.time = time;\nvar notime = function (name, fn) {\n return fn();\n};\nexports.notime = notime;\nvar minBy = function (array, func) {\n return array.reduce(function (a, b) {\n var valA = func(a);\n var valB = func(b);\n return valA > valB ? b : a;\n });\n};\nexports.minBy = minBy;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\n/*\n * Breaks any long edges in the graph into short segments that span 1 layer\n * each. This operation is undoable with the denormalize function.\n *\n * Pre-conditions:\n *\n * 1. The input graph is a DAG.\n * 2. Each node in the graph has a \"rank\" property.\n *\n * Post-condition:\n *\n * 1. All edges in the graph have a length of 1.\n * 2. Dummy nodes are added where edges have been split into segments.\n * 3. The graph is augmented with a \"dummyChains\" attribute which contains\n * the first dummy in each chain of dummy nodes produced.\n */\nvar run = function (g) {\n g.graph().dummyChains = [];\n g.edges().forEach(function (edge) { return normalizeEdge(g, edge); });\n};\nvar normalizeEdge = function (g, e) {\n var v = e.v;\n var vRank = g.node(v).rank;\n var w = e.w;\n var wRank = g.node(w).rank;\n var name = e.name;\n var edgeLabel = g.edge(e);\n var labelRank = edgeLabel.labelRank;\n if (wRank === vRank + 1)\n return;\n g.removeEdgeObj(e);\n var graph = g.graph();\n var dummy;\n var attrs;\n var i;\n for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {\n edgeLabel.points = [];\n attrs = {\n edgeLabel: edgeLabel,\n width: 0,\n height: 0,\n edgeObj: e,\n rank: vRank,\n };\n dummy = (0, util_1.addDummyNode)(g, \"edge\", attrs, \"_d\");\n if (vRank === labelRank) {\n attrs.width = edgeLabel.width;\n attrs.height = edgeLabel.height;\n attrs.dummy = \"edge-label\";\n attrs.labelpos = edgeLabel.labelpos;\n }\n g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);\n if (i === 0) {\n if (!graph.dummyChains)\n graph.dummyChains = [];\n graph.dummyChains.push(dummy);\n }\n v = dummy;\n }\n g.setEdge(v, w, { weight: edgeLabel.weight }, name);\n};\nvar undo = function (g) {\n var _a;\n (_a = g.graph().dummyChains) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n var node = g.node(v);\n var origLabel = node.edgeLabel;\n var w;\n if (node.edgeObj) {\n g.setEdgeObj(node.edgeObj, origLabel);\n }\n var currentV = v;\n while (node.dummy) {\n w = g.successors(currentV)[0];\n g.removeNode(currentV);\n origLabel.points.push({ x: node.x, y: node.y });\n if (node.dummy === \"edge-label\") {\n origLabel.x = node.x;\n origLabel.y = node.y;\n origLabel.width = node.width;\n origLabel.height = node.height;\n }\n currentV = w;\n node = g.node(currentV);\n }\n });\n};\nexports.default = { run: run, undo: undo };\n//# sourceMappingURL=normalize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slack = exports.longestPathWithLayer = exports.longestPath = void 0;\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nvar longestPath = function (g) {\n var _a;\n var visited = {};\n var dfs = function (v) {\n var _a;\n var label = g.node(v);\n if (!label)\n return 0;\n if (visited[v]) {\n return label.rank;\n }\n visited[v] = true;\n var rank;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edgeObj) {\n var wRank = dfs(edgeObj.w);\n var minLen = g.edge(edgeObj).minlen;\n var r = wRank - minLen;\n if (r) {\n if (rank === undefined || r < rank) {\n rank = r;\n }\n }\n });\n if (!rank) {\n rank = 0;\n }\n label.rank = rank;\n return rank;\n };\n (_a = g.sources()) === null || _a === void 0 ? void 0 : _a.forEach(function (source) { return dfs(source); });\n};\nexports.longestPath = longestPath;\nvar longestPathWithLayer = function (g) {\n var _a;\n // 用longest path,找出最深的点\n var visited = {};\n var minRank;\n var dfs = function (v) {\n var _a;\n var label = g.node(v);\n if (!label)\n return 0;\n if (visited[v]) {\n return label.rank;\n }\n visited[v] = true;\n var rank;\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (edgeObj) {\n var wRank = dfs(edgeObj.w);\n var minLen = g.edge(edgeObj).minlen;\n var r = wRank - minLen;\n if (r) {\n if (rank === undefined || r < rank) {\n rank = r;\n }\n }\n });\n if (!rank) {\n rank = 0;\n }\n if (minRank === undefined || rank < minRank) {\n minRank = rank;\n }\n label.rank = rank;\n return rank;\n };\n (_a = g.sources()) === null || _a === void 0 ? void 0 : _a.forEach(function (source) {\n if (g.node(source))\n dfs(source);\n });\n if (minRank === undefined) {\n minRank = 0;\n }\n // minRank += 1; // NOTE: 最小的层级是dummy root,+1\n // forward一遍,赋值层级\n var forwardVisited = {};\n var dfsForward = function (v, nextRank) {\n var _a;\n var label = g.node(v);\n var currRank = (!isNaN(label.layer) ? label.layer : nextRank);\n // 没有指定,取最大值\n if (label.rank === undefined || label.rank < currRank) {\n label.rank = currRank;\n }\n if (forwardVisited[v])\n return;\n forwardVisited[v] = true;\n // DFS遍历子节点\n (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.map(function (e) {\n dfsForward(e.w, currRank + g.edge(e).minlen);\n });\n };\n // 指定层级的,更新下游\n g.nodes().forEach(function (n) {\n var label = g.node(n);\n if (!label)\n return;\n if (!isNaN(label.layer)) {\n dfsForward(n, label.layer); // 默认的dummy root所在层的rank是-1\n }\n else {\n label.rank -= minRank;\n }\n });\n};\nexports.longestPathWithLayer = longestPathWithLayer;\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nvar slack = function (g, e) {\n return (g.node(e.w).rank -\n g.node(e.v).rank -\n g.edge(e).minlen);\n};\nexports.slack = slack;\nexports.default = {\n longestPath: longestPath,\n longestPathWithLayer: longestPathWithLayer,\n slack: slack,\n};\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.feasibleTreeWithLayer = exports.feasibleTree = void 0;\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"../util\");\nvar graph_1 = require(\"../../graph\");\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nvar feasibleTree = function (g) {\n var t = new graph_1.Graph({ directed: false });\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n var edge;\n var delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? (0, util_1.slack)(g, edge) : -(0, util_1.slack)(g, edge);\n shiftRanks(t, g, delta);\n }\n return t;\n};\nexports.feasibleTree = feasibleTree;\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nvar tightTree = function (t, g) {\n var dfs = function (v) {\n g.nodeEdges(v).forEach(function (e) {\n var edgeV = e.v;\n var w = (v === edgeV) ? e.w : edgeV;\n if (!t.hasNode(w) && !(0, util_1.slack)(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n };\n t.nodes().forEach(dfs);\n return t.nodeCount();\n};\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nvar feasibleTreeWithLayer = function (g) {\n var t = new graph_1.Graph({ directed: false });\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodes().filter(function (n) { return !!g.node(n); }).length;\n t.setNode(start, {});\n var edge;\n var delta;\n while (tightTreeWithLayer(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? (0, util_1.slack)(g, edge) : -(0, util_1.slack)(g, edge);\n shiftRanks(t, g, delta);\n }\n return t;\n};\nexports.feasibleTreeWithLayer = feasibleTreeWithLayer;\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nvar tightTreeWithLayer = function (t, g) {\n var dfs = function (v) {\n var _a;\n (_a = g.nodeEdges(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var edgeV = e.v;\n var w = (v === edgeV) ? e.w : edgeV;\n // 对于指定layer的,直接加入tight-tree,不参与调整\n if (!t.hasNode(w) && (g.node(w).layer !== undefined || !(0, util_1.slack)(g, e))) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n };\n t.nodes().forEach(dfs);\n return t.nodeCount();\n};\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nvar findMinSlackEdge = function (t, g) {\n return (0, util_2.minBy)(g.edges(), function (e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return (0, util_1.slack)(g, e);\n }\n return Infinity;\n });\n};\nvar shiftRanks = function (t, g, delta) {\n t.nodes().forEach(function (v) {\n if (!g.node(v).rank)\n g.node(v).rank = 0;\n g.node(v).rank += delta;\n });\n};\nexports.default = {\n feasibleTree: feasibleTree,\n feasibleTreeWithLayer: feasibleTreeWithLayer\n};\n//# sourceMappingURL=feasible-tree.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exchangeEdges = exports.enterEdge = exports.leaveEdge = exports.initLowLimValues = exports.calcCutValue = exports.initCutValues = void 0;\nvar feasible_tree_1 = require(\"./feasible-tree\");\nvar util_1 = require(\"./util\");\nvar util_2 = require(\"../util\");\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar preorder = graphlib_1.algorithm.preorder, postorder = graphlib_1.algorithm.postorder;\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nvar networkSimplex = function (og) {\n var g = (0, util_2.simplify)(og);\n (0, util_1.longestPath)(g);\n var t = (0, feasible_tree_1.feasibleTree)(g);\n (0, exports.initLowLimValues)(t);\n (0, exports.initCutValues)(t, g);\n var e;\n var f;\n while ((e = (0, exports.leaveEdge)(t))) {\n f = (0, exports.enterEdge)(t, g, e);\n (0, exports.exchangeEdges)(t, g, e, f);\n }\n};\n/*\n * Initializes cut values for all edges in the tree.\n */\nvar initCutValues = function (t, g) {\n var vs = postorder(t, t.nodes());\n vs = vs === null || vs === void 0 ? void 0 : vs.slice(0, (vs === null || vs === void 0 ? void 0 : vs.length) - 1);\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n assignCutValue(t, g, v);\n });\n};\nexports.initCutValues = initCutValues;\nvar assignCutValue = function (t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edgeFromArgs(child, parent).cutvalue = (0, exports.calcCutValue)(t, g, child);\n};\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nvar calcCutValue = function (t, g, child) {\n var _a;\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edgeFromArgs(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edgeFromArgs(parent, child);\n }\n cutValue = graphEdge.weight;\n (_a = g.nodeEdges(child)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var isOutEdge = e.v === child;\n var other = isOutEdge ? e.w : e.v;\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail;\n var otherWeight = g.edge(e).weight;\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edgeFromArgs(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n return cutValue;\n};\nexports.calcCutValue = calcCutValue;\nvar initLowLimValues = function (tree, root) {\n if (root === void 0) { root = tree.nodes()[0]; }\n dfsAssignLowLim(tree, {}, 1, root);\n};\nexports.initLowLimValues = initLowLimValues;\nvar dfsAssignLowLim = function (tree, visited, nextLim, v, parent) {\n var _a;\n var low = nextLim;\n var useNextLim = nextLim;\n var label = tree.node(v);\n visited[v] = true;\n (_a = tree.neighbors(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (w) {\n if (!visited[w]) {\n useNextLim = dfsAssignLowLim(tree, visited, useNextLim, w, v);\n }\n });\n label.low = low;\n label.lim = useNextLim++;\n if (parent) {\n label.parent = parent;\n }\n else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n return useNextLim;\n};\nvar leaveEdge = function (tree) {\n return tree.edges().find(function (e) {\n return tree.edge(e).cutvalue < 0;\n });\n};\nexports.leaveEdge = leaveEdge;\nvar enterEdge = function (t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n var candidates = g.edges().filter(function (edge) {\n return flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel);\n });\n return (0, util_2.minBy)(candidates, function (edge) { return (0, util_1.slack)(g, edge); });\n};\nexports.enterEdge = enterEdge;\nvar exchangeEdges = function (t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n (0, exports.initLowLimValues)(t);\n (0, exports.initCutValues)(t, g);\n updateRanks(t, g);\n};\nexports.exchangeEdges = exchangeEdges;\nvar updateRanks = function (t, g) {\n var root = t.nodes().find(function (v) { var _a; return !((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.parent); });\n var vs = preorder(t, root);\n vs = vs === null || vs === void 0 ? void 0 : vs.slice(1);\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var parent = t.node(v).parent;\n var edge = g.edgeFromArgs(v, parent);\n var flipped = false;\n if (!edge) {\n edge = g.edgeFromArgs(parent, v);\n flipped = true;\n }\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n};\n/*\n * Returns true if the edge is in the tree.\n */\nvar isTreeEdge = function (tree, u, v) {\n return tree.hasEdge(u, v);\n};\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nvar isDescendant = function (tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n};\nexports.default = networkSimplex;\n//# sourceMappingURL=network-simplex.js.map","\"use strict\";\n// \"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// var rankUtil = require(\"./util\");\n// var longestPath = rankUtil.longestPathWithLayer;\n// var feasibleTree = require(\"./feasible-tree\").feasibleTreeWithLayer;\n// var networkSimplex = require(\"./network-simplex\");\nvar util_1 = require(\"./util\");\nvar feasible_tree_1 = require(\"./feasible-tree\");\nvar network_simplex_1 = __importDefault(require(\"./network-simplex\"));\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nvar rank = function (g) {\n switch (g.graph().ranker) {\n case \"network-simplex\":\n networkSimplexRanker(g);\n break;\n case \"tight-tree\":\n tightTreeRanker(g);\n break;\n case \"longest-path\":\n longestPathRanker(g);\n break;\n // default: networkSimplexRanker(g);\n default: tightTreeRanker(g);\n }\n};\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = util_1.longestPath;\nvar tightTreeRanker = function (g) {\n (0, util_1.longestPathWithLayer)(g);\n (0, feasible_tree_1.feasibleTreeWithLayer)(g);\n};\nvar networkSimplexRanker = function (g) {\n (0, network_simplex_1.default)(g);\n};\nexports.default = rank;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// deep first search with both order low for pre, lim for post\nvar dfsBothOrder = function (g) {\n var _a;\n var result = {};\n var lim = 0;\n var dfs = function (v) {\n var _a;\n var low = lim;\n (_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.forEach(dfs);\n result[v] = { low: low, lim: lim++ };\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(dfs);\n return result;\n};\n// Find a path from v to w through the lowest common ancestor (LCA). Return the\n// full path and the LCA.\nvar findPath = function (g, postorderNums, v, w) {\n var vPath = [];\n var wPath = [];\n var low = Math.min(postorderNums[v].low, postorderNums[w].low);\n var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);\n var parent;\n var lca;\n // Traverse up from v to find the LCA\n parent = v;\n do {\n parent = g.parent(parent);\n vPath.push(parent);\n } while (parent &&\n (postorderNums[parent].low > low || lim > postorderNums[parent].lim));\n lca = parent;\n // Traverse from w to LCA\n parent = w;\n while (parent && parent !== lca) {\n wPath.push(parent);\n parent = g.parent(parent);\n }\n return { lca: lca, path: vPath.concat(wPath.reverse()) };\n};\nvar parentDummyChains = function (g) {\n var _a;\n var postorderNums = dfsBothOrder(g);\n (_a = g.graph().dummyChains) === null || _a === void 0 ? void 0 : _a.forEach(function (startV) {\n var _a, _b;\n var v = startV;\n var node = g.node(v);\n var edgeObj = node.edgeObj;\n if (!edgeObj)\n return;\n var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);\n var path = pathData.path;\n var lca = pathData.lca;\n var pathIdx = 0;\n var pathV = path[pathIdx];\n var ascending = true;\n while (v !== edgeObj.w) {\n node = g.node(v);\n if (ascending) {\n while (pathV !== lca && ((_a = g.node(pathV)) === null || _a === void 0 ? void 0 : _a.maxRank) < node.rank) {\n pathIdx++;\n pathV = path[pathIdx];\n }\n if (pathV === lca) {\n ascending = false;\n }\n }\n if (!ascending) {\n while (pathIdx < path.length - 1 &&\n ((_b = g.node(path[pathIdx + 1])) === null || _b === void 0 ? void 0 : _b.minRank) <=\n node.rank) {\n pathIdx++;\n }\n pathV = path[pathIdx];\n }\n g.setParent(v, pathV);\n v = g.successors(v)[0];\n }\n });\n};\nexports.default = parentDummyChains;\n//# sourceMappingURL=parent-dummy-chains.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\n/*\n * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,\n * adds appropriate edges to ensure that all cluster nodes are placed between\n * these boundries, and ensures that the graph is connected.\n *\n * In addition we ensure, through the use of the minlen property, that nodes\n * and subgraph border nodes to not end up on the same rank.\n *\n * Preconditions:\n *\n * 1. Input graph is a DAG\n * 2. Nodes in the input graph has a minlen attribute\n *\n * Postconditions:\n *\n * 1. Input graph is connected.\n * 2. Dummy nodes are added for the tops and bottoms of subgraphs.\n * 3. The minlen attribute for nodes is adjusted to ensure nodes do not\n * get placed on the same rank as subgraph border nodes.\n *\n * The nesting graph idea comes from Sander, \"Layout of Compound Directed\n * Graphs.\"\n */\nvar run = function (g) {\n var _a;\n var root = (0, util_1.addDummyNode)(g, \"root\", {}, \"_root\");\n var depths = treeDepths(g);\n var maxDepth = Math.max.apply(Math, Object.values(depths));\n if (Math.abs(maxDepth) === Infinity) {\n maxDepth = 1;\n }\n var height = maxDepth - 1; // Note: depths is an Object not an array\n var nodeSep = 2 * height + 1;\n g.graph().nestingRoot = root;\n // Multiply minlen by nodeSep to align nodes on non-border ranks.\n g.edges().forEach(function (e) {\n g.edge(e).minlen *= nodeSep;\n });\n // Calculate a weight that is sufficient to keep subgraphs vertically compact\n var weight = sumWeights(g) + 1;\n // Create border nodes and link them up\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n });\n // Save the multiplier for node layers for later removal of empty border\n // layers.\n g.graph().nodeRankFactor = nodeSep;\n};\nvar dfs = function (g, root, nodeSep, weight, height, depths, v) {\n var children = g.children(v);\n if (!(children === null || children === void 0 ? void 0 : children.length)) {\n if (v !== root) {\n g.setEdge(root, v, { weight: 0, minlen: nodeSep });\n }\n return;\n }\n var top = (0, util_1.addBorderNode)(g, \"_bt\");\n var bottom = (0, util_1.addBorderNode)(g, \"_bb\");\n var label = g.node(v);\n g.setParent(top, v);\n label.borderTop = top;\n g.setParent(bottom, v);\n label.borderBottom = bottom;\n children === null || children === void 0 ? void 0 : children.forEach(function (child) {\n dfs(g, root, nodeSep, weight, height, depths, child);\n var childNode = g.node(child);\n var childTop = childNode.borderTop ? childNode.borderTop : child;\n var childBottom = childNode.borderBottom ? childNode.borderBottom : child;\n var thisWeight = childNode.borderTop ? weight : 2 * weight;\n var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;\n g.setEdge(top, childTop, {\n minlen: minlen,\n weight: thisWeight,\n nestingEdge: true,\n });\n g.setEdge(childBottom, bottom, {\n minlen: minlen,\n weight: thisWeight,\n nestingEdge: true,\n });\n });\n if (!g.parent(v)) {\n g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });\n }\n};\nvar treeDepths = function (g) {\n var _a;\n var depths = {};\n var dfs = function (v, depth) {\n var children = g.children(v);\n children === null || children === void 0 ? void 0 : children.forEach(function (child) { return dfs(child, depth + 1); });\n depths[v] = depth;\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (v) { return dfs(v, 1); });\n return depths;\n};\nvar sumWeights = function (g) {\n var result = 0;\n g.edges().forEach(function (e) {\n result += g.edge(e).weight;\n });\n return result;\n};\nvar cleanup = function (g) {\n var graphLabel = g.graph();\n graphLabel.nestingRoot && g.removeNode(graphLabel.nestingRoot);\n delete graphLabel.nestingRoot;\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge.nestingEdge) {\n g.removeEdgeObj(e);\n }\n });\n};\nexports.default = { run: run, cleanup: cleanup };\n//# sourceMappingURL=nesting-graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"./util\");\nvar addBorderSegments = function (g) {\n var _a;\n var dfs = function (v) {\n var children = g.children(v);\n var node = g.node(v);\n if (children === null || children === void 0 ? void 0 : children.length) {\n children.forEach(function (child) { return dfs(child); });\n }\n if (node.hasOwnProperty(\"minRank\")) {\n node.borderLeft = [];\n node.borderRight = [];\n for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; rank += 1) {\n addBorderNode(g, \"borderLeft\", \"_bl\", v, node, rank);\n addBorderNode(g, \"borderRight\", \"_br\", v, node, rank);\n }\n }\n };\n (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { return dfs(child); });\n};\nvar addBorderNode = function (g, prop, prefix, sg, sgNode, rank) {\n var label = { rank: rank, borderType: prop, width: 0, height: 0 };\n var prev = sgNode[prop][rank - 1];\n var curr = (0, util_1.addDummyNode)(g, \"border\", label, prefix);\n sgNode[prop][rank] = curr;\n g.setParent(curr, sg);\n if (prev) {\n g.setEdge(prev, curr, { weight: 1 });\n }\n};\nexports.default = addBorderSegments;\n//# sourceMappingURL=add-border-segments.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar adjust = function (g) {\n var _a;\n var rankDir = (_a = g.graph().rankdir) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapWidthHeight(g);\n }\n};\nvar undo = function (g) {\n var _a;\n var rankDir = (_a = g.graph().rankdir) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (rankDir === \"bt\" || rankDir === \"rl\") {\n reverseY(g);\n }\n if (rankDir === \"lr\" || rankDir === \"rl\") {\n swapXY(g);\n swapWidthHeight(g);\n }\n};\nvar swapWidthHeight = function (g) {\n g.nodes().forEach(function (v) {\n swapWidthHeightOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n swapWidthHeightOne(g.edge(e));\n });\n};\nvar swapWidthHeightOne = function (attrs) {\n var w = attrs.width;\n attrs.width = attrs.height;\n attrs.height = w;\n};\nvar reverseY = function (g) {\n g.nodes().forEach(function (v) {\n reverseYOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) { return reverseYOne(point); });\n if (edge.hasOwnProperty(\"y\")) {\n reverseYOne(edge);\n }\n });\n};\nvar reverseYOne = function (attrs) {\n if (attrs === null || attrs === void 0 ? void 0 : attrs.y) {\n attrs.y = -attrs.y;\n }\n};\nvar swapXY = function (g) {\n g.nodes().forEach(function (v) {\n swapXYOne(g.node(v));\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) { return swapXYOne(point); });\n if (edge.hasOwnProperty(\"x\")) {\n swapXYOne(edge);\n }\n });\n};\nvar swapXYOne = function (attrs) {\n var x = attrs.x;\n attrs.x = attrs.y;\n attrs.y = x;\n};\nexports.default = { adjust: adjust, undo: undo };\n//# sourceMappingURL=coordinate-system.js.map","/**\n * rgb 颜色转换成数组\n * @param str\n * @returns\n */\nexport function rgb2arr(str) {\n return [parseInt(str.substr(1, 2), 16), parseInt(str.substr(3, 2), 16), parseInt(str.substr(5, 2), 16)];\n}\n//# sourceMappingURL=rgb2arr.js.map","/**\n * 将数值从 0-255 转换成 16 进制字符串\n * @param value\n * @returns\n */\nexport function toHex(value) {\n var x16Value = Math.round(value).toString(16);\n return x16Value.length === 1 ? \"0\" + x16Value : x16Value;\n}\n/**\n * 数组转换成颜色\n * @param arr\n * @returns\n */\nexport function arr2rgb(arr) {\n return \"#\" + toHex(arr[0]) + toHex(arr[1]) + toHex(arr[2]);\n}\n//# sourceMappingURL=arr2rgb.js.map","var isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\nexport default isArrayLike;\n//# sourceMappingURL=is-array-like.js.map","import isArrayLike from './is-array-like';\nvar contains = function (arr, value) {\n if (!isArrayLike(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\nexport default contains;\n//# sourceMappingURL=contains.js.map","import isArrayLike from './is-array-like';\nvar filter = function (arr, func) {\n if (!isArrayLike(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\nexport default filter;\n//# sourceMappingURL=filter.js.map","import filter from './filter';\nimport contains from './contains';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) { values = []; }\n return filter(arr, function (value) { return !contains(values, value); });\n};\nexport default difference;\n//# sourceMappingURL=difference.js.map","/**\n * @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction\n */\nexport default (function (value) {\n return typeof value === 'function';\n});\n//# sourceMappingURL=is-function.js.map","// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\nexport default isNil;\n//# sourceMappingURL=is-nil.js.map","var toString = {}.toString;\nvar isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };\nexport default isType;\n//# sourceMappingURL=is-type.js.map","import isType from './is-type';\nexport default (function (value) {\n return Array.isArray ? Array.isArray(value) : isType(value, 'Array');\n});\n//# sourceMappingURL=is-array.js.map","export default (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return (value !== null && type === 'object') || type === 'function';\n});\n//# sourceMappingURL=is-object.js.map","import isArray from './is-array';\nimport isObject from './is-object';\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (isArray(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n }\n else if (isObject(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\nexport default each;\n//# sourceMappingURL=each.js.map","import each from './each';\nimport isFunction from './is-function';\nvar keys = Object.keys\n ? function (obj) { return Object.keys(obj); }\n : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n };\nexport default keys;\n//# sourceMappingURL=keys.js.map","import isNil from './is-nil';\nimport keys from './keys';\nfunction isMatch(obj, attrs) {\n var _keys = keys(attrs);\n var length = _keys.length;\n if (isNil(obj))\n return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\nexport default isMatch;\n//# sourceMappingURL=is-match.js.map","var isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\nexport default isObjectLike;\n//# sourceMappingURL=is-object-like.js.map","import isObjectLike from './is-object-like';\nimport isType from './is-type';\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\nexport default isPlainObject;\n//# sourceMappingURL=is-plain-object.js.map","import isFunction from './is-function';\nimport isMatch from './is-match';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nfunction find(arr, predicate) {\n if (!isArray(arr))\n return null;\n var _predicate;\n if (isFunction(predicate)) {\n _predicate = predicate;\n }\n if (isPlainObject(predicate)) {\n _predicate = function (a) { return isMatch(a, predicate); };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\nexport default find;\n//# sourceMappingURL=find.js.map","function findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) { fromIndex = 0; }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\nexport default findIndex;\n//# sourceMappingURL=find-index.js.map","import isNil from './is-nil';\nimport isArray from './is-array';\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n if (isArray(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n }\n else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\nexport default firstValue;\n//# sourceMappingURL=first-value.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!isArray(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\nexport default flatten;\n//# sourceMappingURL=flatten.js.map","import isArray from './is-array';\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) { result = []; }\n if (!isArray(arr)) {\n result.push(arr);\n }\n else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\nexport default flattenDeep;\n//# sourceMappingURL=flatten-deep.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=max.js.map","import isArray from './is-array';\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\nexport default (function (arr) {\n if (!isArray(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n//# sourceMappingURL=min.js.map","import isArray from './is-array';\nimport { default as getMax } from './max';\nimport { default as getMin } from './min';\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) { return !isNaN(v); });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0,\n };\n }\n if (isArray(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = getMax(filterValues);\n var min = getMin(filterValues);\n return {\n min: min,\n max: max,\n };\n};\nexport default getRange;\n//# sourceMappingURL=get-range.js.map","var arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\nexport default pull;\n//# sourceMappingURL=pull.js.map","import isArrayLike from './is-array-like';\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!isArrayLike(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\nexport default pullAt;\n//# sourceMappingURL=pull-at.js.map","import each from './each';\nimport isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar reduce = function (arr, fn, init) {\n if (!isArray(arr) && !isPlainObject(arr)) {\n return arr;\n }\n var result = init;\n each(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\nexport default reduce;\n//# sourceMappingURL=reduce.js.map","import isArrayLike from './is-array-like';\nimport pullAt from './pull-at';\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!isArrayLike(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n pullAt(arr, indexes);\n return result;\n};\nexport default remove;\n//# sourceMappingURL=remove.js.map","import isType from './is-type';\nexport default (function (str) {\n return isType(str, 'String');\n});\n//# sourceMappingURL=is-string.js.map","import isArray from './is-array';\nimport isString from './is-string';\nimport isFunction from './is-function';\nfunction sortBy(arr, key) {\n var comparer;\n if (isFunction(key)) {\n comparer = function (a, b) { return key(a) - key(b); };\n }\n else {\n var keys_1 = [];\n if (isString(key)) {\n keys_1.push(key);\n }\n else if (isArray(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\nexport default sortBy;\n//# sourceMappingURL=sort-by.js.map","export default function uniq(arr, cache) {\n if (cache === void 0) { cache = new Map(); }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n//# sourceMappingURL=uniq.js.map","import uniq from './uniq';\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return uniq([].concat.apply([], sources));\n};\nexport default union;\n//# sourceMappingURL=union.js.map","import isArray from './is-array';\nimport isNil from './is-nil';\nexport default (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!isNil(value)) {\n // flatten\n if (!isArray(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n//# sourceMappingURL=values-of-key.js.map","import isArrayLike from './is-array-like';\nexport default function head(o) {\n if (isArrayLike(o)) {\n return o[0];\n }\n return undefined;\n}\n//# sourceMappingURL=head.js.map","import isArrayLike from './is-array-like';\nexport default function last(o) {\n if (isArrayLike(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n//# sourceMappingURL=last.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction startsWith(arr, e) {\n return isArray(arr) || isString(arr) ? arr[0] === e : false;\n}\nexport default startsWith;\n//# sourceMappingURL=starts-with.js.map","import isArray from './is-array';\nimport isString from './is-string';\nfunction endsWith(arr, e) {\n return isArray(arr) || isString(arr) ? arr[arr.length - 1] === e : false;\n}\nexport default endsWith;\n//# sourceMappingURL=ends-with.js.map","/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i))\n return false;\n }\n return true;\n};\nexport default every;\n//# sourceMappingURL=every.js.map","/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i))\n return true;\n }\n return false;\n};\nexport default some;\n//# sourceMappingURL=some.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !isArray(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = isFunction(condition) ? condition : function (item) { return item[condition]; };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n }\n else {\n result[key] = [item];\n }\n }\n return result;\n}\nexport default groupBy;\n//# sourceMappingURL=group-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\nimport groupBy from './group-by';\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nexport default function groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data,\n };\n }\n if (!isFunction(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = isArray(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return groupBy(data, condition);\n}\n//# sourceMappingURL=group-to-map.js.map","import groupToMap from './group-to-map';\nexport default (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = groupToMap(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n//# sourceMappingURL=group.js.map","/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\nexport default getWrapBehavior;\n//# sourceMappingURL=get-wrap-behavior.js.map","/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\nexport default wrapBehavior;\n//# sourceMappingURL=wrap-behavior.js.map","var numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\nexport default numberToColor;\n//# sourceMappingURL=number2color.js.map","import isArray from './is-array';\nfunction parseRadius(radius) {\n var r1 = 0, r2 = 0, r3 = 0, r4 = 0;\n if (isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n }\n else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n }\n else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n }\n else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n }\n else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4,\n };\n}\nexport default parseRadius;\n//# sourceMappingURL=parse-radius.js.map","var clamp = function (a, min, max) {\n if (a < min) {\n return min;\n }\n else if (a > max) {\n return max;\n }\n return a;\n};\nexport default clamp;\n//# sourceMappingURL=clamp.js.map","var fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\nexport default fixedBase;\n//# sourceMappingURL=fixed-base.js.map","/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\nimport isType from './is-type';\nvar isNumber = function (value) {\n return isType(value, 'Number');\n};\nexport default isNumber;\n//# sourceMappingURL=is-number.js.map","import isNumber from './is-number';\nvar isDecimal = function (num) {\n return isNumber(num) && num % 1 !== 0;\n};\nexport default isDecimal;\n//# sourceMappingURL=is-decimal.js.map","import isNumber from './is-number';\nvar isEven = function (num) {\n return isNumber(num) && num % 2 === 0;\n};\nexport default isEven;\n//# sourceMappingURL=is-even.js.map","import isNumber from './is-number';\nvar isInteger = Number.isInteger\n ? Number.isInteger\n : function (num) {\n return isNumber(num) && num % 1 === 0;\n };\nexport default isInteger;\n//# sourceMappingURL=is-integer.js.map","import isNumber from './is-number';\nvar isNegative = function (num) {\n return isNumber(num) && num < 0;\n};\nexport default isNegative;\n//# sourceMappingURL=is-negative.js.map","var PRECISION = 0.00001; // numbers less than this is considered as 0\nexport default function isNumberEqual(a, b, precision) {\n if (precision === void 0) { precision = PRECISION; }\n return Math.abs(a - b) < precision;\n}\n//# sourceMappingURL=is-number-equal.js.map","import isNumber from './is-number';\nvar isOdd = function (num) {\n return isNumber(num) && num % 2 !== 0;\n};\nexport default isOdd;\n//# sourceMappingURL=is-odd.js.map","import isNumber from './is-number';\nvar isPositive = function (num) {\n return isNumber(num) && num > 0;\n};\nexport default isPositive;\n//# sourceMappingURL=is-positive.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n//# sourceMappingURL=max-by.js.map","import isArray from './is-array';\nimport isFunction from './is-function';\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\nexport default (function (arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = isFunction(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n//# sourceMappingURL=min-by.js.map","var mod = function (n, m) {\n return ((n % m) + m) % m;\n};\nexport default mod;\n//# sourceMappingURL=mod.js.map","var DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\nexport default toDegree;\n//# sourceMappingURL=to-degree.js.map","export default parseInt;\n//# sourceMappingURL=to-integer.js.map","var RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\nexport default toRadian;\n//# sourceMappingURL=to-radian.js.map","export default (function (obj, key) { return obj.hasOwnProperty(key); });\n//# sourceMappingURL=has.js.map","import each from './each';\nimport isFunction from './is-function';\n// @ts-ignore\nvar values = Object.values\n ? function (obj) { return Object.values(obj); }\n : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n };\nexport default values;\n//# sourceMappingURL=values.js.map","import contains from './contains';\nimport values from './values';\nexport default (function (obj, value) { return contains(values(obj), value); });\n//# sourceMappingURL=has-value.js.map","import isNil from './is-nil';\nexport default (function (value) {\n if (isNil(value))\n return '';\n return value.toString();\n});\n//# sourceMappingURL=to-string.js.map","import toString from './to-string';\nvar lowerCase = function (str) {\n return toString(str).toLowerCase();\n};\nexport default lowerCase;\n//# sourceMappingURL=lower-case.js.map","import toString from './to-string';\nvar lowerFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\nexport default lowerFirst;\n//# sourceMappingURL=lower-first.js.map","function substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return o[name] === undefined ? '' : o[name];\n });\n}\nexport default substitute;\n//# sourceMappingURL=substitute.js.map","import toString from './to-string';\nvar upperCase = function (str) {\n return toString(str).toUpperCase();\n};\nexport default upperCase;\n//# sourceMappingURL=upper-case.js.map","import toString from './to-string';\nvar upperFirst = function (value) {\n var str = toString(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\nexport default upperFirst;\n//# sourceMappingURL=upper-first.js.map","var toString = {}.toString;\nvar getType = function (value) {\n return toString\n .call(value)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n};\nexport default getType;\n//# sourceMappingURL=get-type.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isArguments = function (value) {\n return isType(value, 'Arguments');\n};\nexport default isArguments;\n//# sourceMappingURL=is-arguments.js.map","/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isBoolean = function (value) {\n return isType(value, 'Boolean');\n};\nexport default isBoolean;\n//# sourceMappingURL=is-boolean.js.map","import isType from './is-type';\nvar isDate = function (value) {\n return isType(value, 'Date');\n};\nexport default isDate;\n//# sourceMappingURL=is-date.js.map","/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nimport isType from './is-type';\nvar isError = function (value) {\n return isType(value, 'Error');\n};\nexport default isError;\n//# sourceMappingURL=is-error.js.map","/**\n * 判断是否为有限数\n * @return {Boolean}\n */\nimport isNumber from './is-number';\nexport default function (value) {\n return isNumber(value) && isFinite(value);\n}\n//# sourceMappingURL=is-finite.js.map","var isNull = function (value) {\n return value === null;\n};\nexport default isNull;\n//# sourceMappingURL=is-null.js.map","var objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;\n return value === proto;\n};\nexport default isPrototype;\n//# sourceMappingURL=is-prototype.js.map","import isType from './is-type';\nvar isRegExp = function (str) {\n return isType(str, 'RegExp');\n};\nexport default isRegExp;\n//# sourceMappingURL=is-reg-exp.js.map","var isUndefined = function (value) {\n return value === undefined;\n};\nexport default isUndefined;\n//# sourceMappingURL=is-undefined.js.map","/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof Document;\n};\nexport default isElement;\n//# sourceMappingURL=is-element.js.map","export default function requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame ||\n // @ts-ignore\n window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame ||\n function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n//# sourceMappingURL=request-animation-frame.js.map","export default function cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame ||\n // @ts-ignore\n window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame ||\n clearTimeout;\n method(handler);\n}\n//# sourceMappingURL=clear-animation-frame.js.map","// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nexport default function mix(dist, src1, src2, src3) {\n if (src1)\n _mix(dist, src1);\n if (src2)\n _mix(dist, src2);\n if (src3)\n _mix(dist, src3);\n return dist;\n}\n//# sourceMappingURL=mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (isFunction(obj)) {\n obj = obj.prototype;\n }\n mix(c.prototype, obj);\n }\n};\nexport default augment;\n//# sourceMappingURL=augment.js.map","import isArray from './is-array';\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (isArray(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n }\n else {\n rst[i] = obj[i];\n }\n }\n }\n else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n }\n else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\nexport default clone;\n//# sourceMappingURL=clone.js.map","function debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this, args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\nexport default debounce;\n//# sourceMappingURL=debounce.js.map","export default function (max) {\n\tvar num, curr, prev;\n\tvar limit = max || 1;\n\n\tfunction keep(key, value) {\n\t\tif (++num > limit) {\n\t\t\tprev = curr;\n\t\t\treset(1);\n\t\t\t++num;\n\t\t}\n\t\tcurr[key] = value;\n\t}\n\n\tfunction reset(isPartial) {\n\t\tnum = 0;\n\t\tcurr = Object.create(null);\n\t\tisPartial || (prev=Object.create(null));\n\t}\n\n\treset();\n\n\treturn {\n\t\tclear: reset,\n\t\thas: function (key) {\n\t\t\treturn curr[key] !== void 0 || prev[key] !== void 0;\n\t\t},\n\t\tget: function (key) {\n\t\t\tvar val = curr[key];\n\t\t\tif (val !== void 0) return val;\n\t\t\tif ((val=prev[key]) !== void 0) {\n\t\t\t\tkeep(key, val);\n\t\t\t\treturn val;\n\t\t\t}\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (curr[key] !== void 0) {\n\t\t\t\tcurr[key] = value;\n\t\t\t} else {\n\t\t\t\tkeep(key, value);\n\t\t\t}\n\t\t}\n\t};\n}\n","import flru from 'flru';\nimport isFunction from './is-function';\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n * @param maxSize lru maxSize\n */\nexport default (function (f, resolver, maxSize) {\n if (maxSize === void 0) { maxSize = 128; }\n if (!isFunction(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = flru(maxSize);\n return memoized;\n});\n//# sourceMappingURL=memoize.js.map","import isArray from './is-array';\nimport isPlainObject from './is-plain-object';\nvar MAX_MIX_LEVEL = 5;\nfunction hasOwn(object, property) {\n if (Object.hasOwn) {\n return Object.hasOwn(object, property);\n }\n if (object == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n return Object.prototype.hasOwnProperty.call(Object(object), property);\n}\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (hasOwn(src, key)) {\n var value = src[key];\n if (value !== null && isPlainObject(value)) {\n if (!isPlainObject(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n }\n else {\n dist[key] = src[key];\n }\n }\n else if (isArray(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n }\n else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\nexport default deepMix;\n//# sourceMappingURL=deep-mix.js.map","import mix from './mix';\nimport isFunction from './is-function';\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!isFunction(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () { };\n }\n var create = Object.create\n ? function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c,\n },\n });\n }\n : function (proto, c) {\n function Tmp() { }\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = mix(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n mix(superObj, overrides);\n mix(subclass, staticOverrides);\n return subclass;\n};\nexport default extend;\n//# sourceMappingURL=extend.js.map","import isArrayLike from './is-array-like';\nvar indexOf = function (arr, obj) {\n if (!isArrayLike(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\nexport default indexOf;\n//# sourceMappingURL=index-of.js.map","import isNil from './is-nil';\nimport isArrayLike from './is-array-like';\nimport getType from './get-type';\nimport isPrototype from './is-prototype';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n if (isArrayLike(value)) {\n return !value.length;\n }\n var type = getType(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\nexport default isEmpty;\n//# sourceMappingURL=is-empty.js.map","import isObjectLike from './is-object-like';\nimport isArrayLike from './is-array-like';\nimport isString from './is-string';\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (isString(value) || isString(other)) {\n return false;\n }\n if (isArrayLike(value) || isArrayLike(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (isObjectLike(value) || isObjectLike(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\nexport default isEqual;\n//# sourceMappingURL=is-equal.js.map","import isFunction from './is-function';\nimport isEqual from './is-equal';\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\nexport default (function (value, other, fn) {\n if (!isFunction(fn)) {\n return isEqual(value, other);\n }\n return !!fn(value, other);\n});\n//# sourceMappingURL=is-equal-with.js.map","import isArrayLike from './is-array-like';\nvar map = function (arr, func) {\n if (!isArrayLike(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\nexport default map;\n//# sourceMappingURL=map.js.map","import isNil from './is-nil';\nimport isObject from './is-object';\nvar identity = function (v) { return v; };\nexport default (function (object, func) {\n if (func === void 0) { func = identity; }\n var r = {};\n if (isObject(object) && !isNil(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n//# sourceMappingURL=map-values.js.map","import isString from './is-string';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\nexport default (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = isString(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return obj === undefined || p < keyArr.length ? defaultValue : obj;\n});\n//# sourceMappingURL=get.js.map","import isObject from './is-object';\nimport isString from './is-string';\nimport isNumber from './is-number';\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\nexport default (function (obj, path, value) {\n var o = obj;\n var keyArr = isString(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!isObject(o[key])) {\n o[key] = isNumber(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n }\n else {\n o[key] = value;\n }\n });\n return obj;\n});\n//# sourceMappingURL=set.js.map","import each from './each';\nimport isPlainObject from './is-plain-object';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nexport default (function (object, keys) {\n if (object === null || !isPlainObject(object)) {\n return {};\n }\n var result = {};\n each(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n//# sourceMappingURL=pick.js.map","import reduce from './reduce';\nexport default (function (obj, keys) {\n return reduce(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n//# sourceMappingURL=omit.js.map","export default (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options)\n options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false)\n previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout)\n context = args = null;\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n//# sourceMappingURL=throttle.js.map","import isArrayLike from './is-array-like';\nexport default (function (value) {\n return isArrayLike(value) ? Array.prototype.slice.call(value) : [];\n});\n//# sourceMappingURL=to-array.js.map","var map = {};\nexport default (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n }\n else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n//# sourceMappingURL=unique-id.js.map","export default (function () { });\n//# sourceMappingURL=noop.js.map","export default (function (v) { return v; });\n//# sourceMappingURL=identity.js.map","import isNil from './is-nil';\nimport isArraylike from './is-array-like';\nexport default function size(o) {\n if (isNil(o)) {\n return 0;\n }\n if (isArraylike(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n//# sourceMappingURL=size.js.map","/**\n * k-v 存储\n */\nvar default_1 = /** @class */ (function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}());\nexport default default_1;\n//# sourceMappingURL=cache.js.map","import { memoize } from '../lodash';\nimport { arr2rgb } from './arr2rgb';\nvar RGB_REG = /rgba?\\(([\\s.,0-9]+)\\)/;\n/**\n * 创建辅助 tag 取颜色\n * @returns\n */\nfunction createTmp() {\n var i = document.createElement('i');\n i.title = 'Web Colour Picker';\n i.style.display = 'none';\n document.body.appendChild(i);\n return i;\n}\nvar iEl;\n/**\n * 将颜色转换到 rgb 的格式\n * @param {color} color 颜色\n * @return 将颜色转换到 '#ffffff' 的格式\n */\nfunction toRGBString(color) {\n // 如果已经是 rgb的格式\n if (color[0] === '#' && color.length === 7) {\n return color;\n }\n if (!iEl) {\n // 防止防止在页头报错\n iEl = createTmp();\n }\n iEl.style.color = color;\n var rst = document.defaultView.getComputedStyle(iEl, '').getPropertyValue('color');\n var matches = RGB_REG.exec(rst);\n var cArray = matches[1].split(/\\s*,\\s*/).map(function (s) { return Number(s); });\n rst = arr2rgb(cArray);\n return rst;\n}\n/**\n * export with memoize.\n * @param color\n * @returns\n */\nexport var toRGB = memoize(toRGBString, function (color) { return color; }, 256);\n//# sourceMappingURL=torgb.js.map","import { rgb2arr } from './rgb2arr';\nimport { arr2rgb } from './arr2rgb';\nimport { toRGB } from './torgb';\n/**\n * 获取颜色之间的插值\n * @param start\n * @param end\n * @param percent\n * @param index\n * @returns\n */\nfunction getValue(start, end, percent, index) {\n return start[index] + (end[index] - start[index]) * percent;\n}\n/**\n * 计算颜色\n * @param points\n * @param percent\n * @returns\n */\nfunction calColor(points, percent) {\n var fixedPercent = isNaN(Number(percent)) || percent < 0 ? 0 : percent > 1 ? 1 : Number(percent);\n var steps = points.length - 1;\n var step = Math.floor(steps * fixedPercent);\n var left = steps * fixedPercent - step;\n var start = points[step];\n var end = step === steps ? start : points[step + 1];\n return arr2rgb([getValue(start, end, left, 0), getValue(start, end, left, 1), getValue(start, end, left, 2)]);\n}\n/**\n * 获取渐变函数\n * @param colors 多个颜色\n * @return 颜色值\n */\nexport function gradient(colors) {\n var colorArray = typeof colors === 'string' ? colors.split('-') : colors;\n var points = colorArray.map(function (color) {\n return rgb2arr(color.indexOf('#') === -1 ? toRGB(color) : color);\n });\n // 返回一个函数\n return function (percent) {\n return calColor(points, percent);\n };\n}\n//# sourceMappingURL=gradient.js.map","var regexLG = /^l\\s*\\(\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexRG = /^r\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*\\)\\s*(.*)/i;\nvar regexColorStop = /[\\d.]+:(#[^\\s]+|[^)]+\\))/gi;\nfunction isGradientColor(val) {\n return /^[r,R,L,l]{1}[\\s]*\\(/.test(val);\n}\nexport function toCSSGradient(gradientColor) {\n if (isGradientColor(gradientColor)) {\n var cssColor_1;\n var steps = void 0;\n if (gradientColor[0] === 'l') {\n // 线性渐变\n var arr = regexLG.exec(gradientColor);\n var angle = +arr[1] + 90; // css 和 g 的渐变起始角度不同\n steps = arr[2];\n cssColor_1 = \"linear-gradient(\" + angle + \"deg, \";\n }\n else if (gradientColor[0] === 'r') {\n // 径向渐变\n cssColor_1 = 'radial-gradient(';\n var arr = regexRG.exec(gradientColor);\n steps = arr[4];\n }\n var colorStops_1 = steps.match(regexColorStop);\n colorStops_1.forEach(function (item, index) {\n var itemArr = item.split(':');\n cssColor_1 += itemArr[1] + \" \" + Number(itemArr[0]) * 100 + \"%\";\n if (index !== colorStops_1.length - 1) {\n cssColor_1 += ', ';\n }\n });\n cssColor_1 += ')';\n return cssColor_1;\n }\n return gradientColor;\n}\n//# sourceMappingURL=tocssgradient.js.map","import { mat3 } from 'gl-matrix';\nfunction leftTranslate(out, a, v) {\n var transMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromTranslation(transMat, v);\n return mat3.multiply(out, transMat, a);\n}\nfunction leftRotate(out, a, rad) {\n var rotateMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromRotation(rotateMat, rad);\n return mat3.multiply(out, rotateMat, a);\n}\nfunction leftScale(out, a, v) {\n var scaleMat = [0, 0, 0, 0, 0, 0, 0, 0, 0];\n mat3.fromScaling(scaleMat, v);\n return mat3.multiply(out, scaleMat, a);\n}\nfunction leftMultiply(out, a, a1) {\n return mat3.multiply(out, a1, a);\n}\n/**\n * 根据 actions 来做 transform\n * @param m\n * @param actions\n */\nexport function transform(m, actions) {\n var matrix = m ? [].concat(m) : [1, 0, 0, 0, 1, 0, 0, 0, 1];\n for (var i = 0, len = actions.length; i < len; i++) {\n var action = actions[i];\n switch (action[0]) {\n case 't':\n leftTranslate(matrix, matrix, [action[1], action[2]]);\n break;\n case 's':\n leftScale(matrix, matrix, [action[1], action[2]]);\n break;\n case 'r':\n leftRotate(matrix, matrix, action[1]);\n break;\n case 'm':\n leftMultiply(matrix, matrix, action[1]);\n break;\n default:\n break;\n }\n }\n return matrix;\n}\n//# sourceMappingURL=transform.js.map","/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\nexport function direction(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n//# sourceMappingURL=direction.js.map","import { vec2 } from 'gl-matrix';\nimport { direction } from './direction';\n/**\n * 二维向量 v1 到 v2 的夹角\n * @param v1\n * @param v2\n * @param direct\n */\nexport function angleTo(v1, v2, direct) {\n var ang = vec2.angle(v1, v2);\n var angleLargeThanPI = direction(v1, v2) >= 0;\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - ang;\n }\n return ang;\n }\n if (angleLargeThanPI) {\n return ang;\n }\n return Math.PI * 2 - ang;\n}\n//# sourceMappingURL=angle-to.js.map","/**\n * 计算二维向量的垂直向量\n * @param out\n * @param v\n * @param flag\n */\nexport function vertical(out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n }\n else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n return out;\n}\n//# sourceMappingURL=vertical.js.map","/**\n * Rounds the values of a `PathArray` instance to\n * a specified amount of decimals and returns it.\n */\nexport function roundPath(path, round) {\n if (round === 'off')\n return [].concat(path);\n // to round values to the power\n // the `round` value must be integer\n var pow = typeof round === 'number' && round >= 1 ? Math.pow(10, round) : 1;\n return path.map(function (pi) {\n var values = pi\n .slice(1)\n .map(Number)\n .map(function (n) { return (round ? Math.round(n * pow) / pow : Math.round(n)); });\n // @ts-ignore\n return [pi[0]].concat(values);\n });\n}\n//# sourceMappingURL=round-path.js.map","import { roundPath } from '../process/round-path';\n/**\n * Returns a valid `d` attribute string value created\n * by rounding values and concatenating the `pathArray` segments.\n */\nexport function path2String(path, round) {\n if (round === void 0) { round = 'off'; }\n return roundPath(path, round)\n .map(function (x) { return x[0] + x.slice(1).join(' '); })\n .join('');\n}\n//# sourceMappingURL=path-2-string.js.map","export var paramsParser = {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n x: 0,\n y: 0,\n qx: null,\n qy: null,\n};\n//# sourceMappingURL=params-parser.js.map","export function fixArc(pathArray, allPathCommands, i) {\n if (pathArray[i].length > 7) {\n pathArray[i].shift();\n var pi = pathArray[i];\n // const ni = i + 1;\n var ni = i;\n while (pi.length) {\n // if created multiple C:s, their original seg is saved\n allPathCommands[i] = 'A';\n // @ts-ignore\n pathArray.splice((ni += 1), 0, ['C'].concat(pi.splice(0, 6)));\n }\n pathArray.splice(i, 1);\n }\n}\n//# sourceMappingURL=fix-arc.js.map","export var paramsCount = {\n a: 7,\n c: 6,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n z: 0,\n};\n//# sourceMappingURL=params-count.js.map","import { paramsCount } from '../parser/params-count';\n/**\n * Iterates an array to check if it's an actual `PathArray`.\n */\nexport function isPathArray(path) {\n return (Array.isArray(path) &&\n path.every(function (seg) {\n var lk = seg[0].toLowerCase();\n return paramsCount[lk] === seg.length - 1 && 'achlmqstvz'.includes(lk);\n }));\n}\n//# sourceMappingURL=is-path-array.js.map","import { isPathArray } from './is-path-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all absolute values.\n */\nexport function isAbsoluteArray(path) {\n return (isPathArray(path) &&\n // @ts-ignore -- `isPathArray` also checks if it's `Array`\n path.every(function (_a) {\n var x = _a[0];\n return x === x.toUpperCase();\n }));\n}\n//# sourceMappingURL=is-absolute-array.js.map","import { isAbsoluteArray } from './is-absolute-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all segments are in non-shorthand notation\n * with absolute values.\n */\nexport function isNormalizedArray(path) {\n return isAbsoluteArray(path) && path.every(function (_a) {\n var pc = _a[0];\n return 'ACLMQZ'.includes(pc);\n });\n}\n//# sourceMappingURL=is-normalized-array.js.map","import { paramsCount } from './params-count';\n/**\n * Breaks the parsing of a pathString once a segment is finalized.\n */\nexport function finalizeSegment(path) {\n var pathCommand = path.pathValue[path.segmentStart];\n var LK = pathCommand.toLowerCase();\n var data = path.data;\n while (data.length >= paramsCount[LK]) {\n // overloaded `moveTo`\n // https://github.com/rveciana/svg-path-properties/blob/master/src/parse.ts\n if (LK === 'm' && data.length > 2) {\n // @ts-ignore\n path.segments.push([pathCommand].concat(data.splice(0, 2)));\n LK = 'l';\n pathCommand = pathCommand === 'm' ? 'l' : 'L';\n }\n else {\n // @ts-ignore\n path.segments.push([pathCommand].concat(data.splice(0, paramsCount[LK])));\n }\n if (!paramsCount[LK]) {\n break;\n }\n }\n}\n//# sourceMappingURL=finalize-segment.js.map","/**\n * Validates an A (arc-to) specific path command value.\n * Usually a `large-arc-flag` or `sweep-flag`.\n */\nexport function scanFlag(path) {\n var index = path.index, pathValue = path.pathValue;\n var code = pathValue.charCodeAt(index);\n if (code === 0x30 /* 0 */) {\n path.param = 0;\n path.index += 1;\n return;\n }\n if (code === 0x31 /* 1 */) {\n path.param = 1;\n path.index += 1;\n return;\n }\n path.err = \"[path-util]: invalid Arc flag \\\"\" + pathValue[index] + \"\\\", expecting 0 or 1 at index \" + index;\n}\n//# sourceMappingURL=scan-flag.js.map","/**\n * Checks if the character is or belongs to a number.\n * [0-9]|+|-|.\n */\nexport function isDigitStart(code) {\n return ((code >= 48 && code <= 57) /* 0..9 */ || code === 0x2b /* + */ || code === 0x2d /* - */ || code === 0x2e); /* . */\n}\nexport function isDigit(code) {\n return code >= 48 && code <= 57; // 0..9\n}\n//# sourceMappingURL=is-digit-start.js.map","import { isDigit } from './is-digit-start';\n/**\n * Validates every character of the path string,\n * every path command, negative numbers or floating point numbers.\n */\nexport function scanParam(path) {\n var max = path.max, pathValue = path.pathValue, start = path.index;\n var index = start;\n var zeroFirst = false;\n var hasCeiling = false;\n var hasDecimal = false;\n var hasDot = false;\n var ch;\n if (index >= max) {\n // path.err = 'SvgPath: missed param (at pos ' + index + ')';\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"pathValue\\\" is missing param\";\n return;\n }\n ch = pathValue.charCodeAt(index);\n if (ch === 0x2b /* + */ || ch === 0x2d /* - */) {\n index += 1;\n // ch = (index < max) ? pathValue.charCodeAt(index) : 0;\n ch = pathValue.charCodeAt(index);\n }\n // This logic is shamelessly borrowed from Esprima\n // https://github.com/ariya/esprimas\n if (!isDigit(ch) && ch !== 0x2e /* . */) {\n // path.err = 'SvgPath: param should start with 0..9 or `.` (at pos ' + index + ')';\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" is not a number\";\n return;\n }\n if (ch !== 0x2e /* . */) {\n zeroFirst = ch === 0x30 /* 0 */;\n index += 1;\n ch = pathValue.charCodeAt(index);\n if (zeroFirst && index < max) {\n // decimal number starts with '0' such as '09' is illegal.\n if (ch && isDigit(ch)) {\n // path.err = 'SvgPath: numbers started with `0` such as `09`\n // are illegal (at pos ' + start + ')';\n path.err = \"[path-util]: Invalid path value at index \" + start + \", \\\"\" + pathValue[start] + \"\\\" illegal number\";\n return;\n }\n }\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasCeiling = true;\n }\n ch = pathValue.charCodeAt(index);\n }\n if (ch === 0x2e /* . */) {\n hasDot = true;\n index += 1;\n while (isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasDecimal = true;\n }\n ch = pathValue.charCodeAt(index);\n }\n if (ch === 0x65 /* e */ || ch === 0x45 /* E */) {\n if (hasDot && !hasCeiling && !hasDecimal) {\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" invalid float exponent\";\n return;\n }\n index += 1;\n ch = pathValue.charCodeAt(index);\n if (ch === 0x2b /* + */ || ch === 0x2d /* - */) {\n index += 1;\n }\n if (index < max && isDigit(pathValue.charCodeAt(index))) {\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n }\n }\n else {\n path.err = \"[path-util]: Invalid path value at index \" + index + \", \\\"\" + pathValue[index] + \"\\\" invalid integer exponent\";\n return;\n }\n }\n path.index = index;\n path.param = +path.pathValue.slice(start, index);\n}\n//# sourceMappingURL=scan-param.js.map","/**\n * Checks if the character is a space.\n */\nexport function isSpace(ch) {\n var specialSpaces = [\n 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x202f,\n 0x205f, 0x3000, 0xfeff,\n ];\n /* istanbul ignore next */\n return (ch === 0x0a ||\n ch === 0x0d ||\n ch === 0x2028 ||\n ch === 0x2029 || // Line terminators\n // White spaces\n ch === 0x20 ||\n ch === 0x09 ||\n ch === 0x0b ||\n ch === 0x0c ||\n ch === 0xa0 ||\n (ch >= 0x1680 && specialSpaces.includes(ch)));\n}\n//# sourceMappingURL=is-space.js.map","import { isSpace } from './is-space';\n/**\n * Points the parser to the next character in the\n * path string every time it encounters any kind of\n * space character.\n */\nexport function skipSpaces(path) {\n var pathValue = path.pathValue, max = path.max;\n while (path.index < max && isSpace(pathValue.charCodeAt(path.index))) {\n path.index += 1;\n }\n}\n//# sourceMappingURL=skip-spaces.js.map","/**\n * Checks if the character is a path command.\n */\nexport function isPathCommand(code) {\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy\n switch (code | 0x20) {\n case 0x6d /* m */:\n case 0x7a /* z */:\n case 0x6c /* l */:\n case 0x68 /* h */:\n case 0x76 /* v */:\n case 0x63 /* c */:\n case 0x73 /* s */:\n case 0x71 /* q */:\n case 0x74 /* t */:\n case 0x61 /* a */:\n // case 0x72/* r */:\n return true;\n default:\n return false;\n }\n}\n//# sourceMappingURL=is-path-command.js.map","/**\n * Checks if the character is an A (arc-to) path command.\n */\nexport function isArcCommand(code) {\n return (code | 0x20) === 0x61;\n}\n//# sourceMappingURL=is-arc-command.js.map","import { finalizeSegment } from './finalize-segment';\nimport { paramsCount } from './params-count';\nimport { scanFlag } from './scan-flag';\nimport { scanParam } from './scan-param';\nimport { skipSpaces } from './skip-spaces';\nimport { isPathCommand } from './is-path-command';\nimport { isDigitStart } from './is-digit-start';\nimport { isArcCommand } from './is-arc-command';\n/**\n * Scans every character in the path string to determine\n * where a segment starts and where it ends.\n */\nexport function scanSegment(path) {\n var max = path.max, pathValue = path.pathValue, index = path.index;\n var cmdCode = pathValue.charCodeAt(index);\n var reqParams = paramsCount[pathValue[index].toLowerCase()];\n path.segmentStart = index;\n if (!isPathCommand(cmdCode)) {\n path.err = \"[path-util]: Invalid path value \\\"\" + pathValue[index] + \"\\\" is not a path command\";\n return;\n }\n path.index += 1;\n skipSpaces(path);\n path.data = [];\n if (!reqParams) {\n // Z\n finalizeSegment(path);\n return;\n }\n for (;;) {\n for (var i = reqParams; i > 0; i -= 1) {\n if (isArcCommand(cmdCode) && (i === 3 || i === 4))\n scanFlag(path);\n else\n scanParam(path);\n if (path.err.length) {\n return;\n }\n path.data.push(path.param);\n skipSpaces(path);\n // after ',' param is mandatory\n if (path.index < max && pathValue.charCodeAt(path.index) === 0x2c /* , */) {\n path.index += 1;\n skipSpaces(path);\n }\n }\n if (path.index >= path.max) {\n break;\n }\n // Stop on next segment\n if (!isDigitStart(pathValue.charCodeAt(path.index))) {\n break;\n }\n }\n finalizeSegment(path);\n}\n//# sourceMappingURL=scan-segment.js.map","/**\n * The `PathParser` is used by the `parsePathString` static method\n * to generate a `pathArray`.\n */\nvar PathParser = /** @class */ (function () {\n function PathParser(pathString) {\n this.pathValue = pathString;\n // @ts-ignore\n this.segments = [];\n this.max = pathString.length;\n this.index = 0;\n this.param = 0.0;\n this.segmentStart = 0;\n this.data = [];\n this.err = '';\n }\n return PathParser;\n}());\nexport { PathParser };\n//# sourceMappingURL=path-parser.js.map","import { isPathArray } from '../util/is-path-array';\nimport { scanSegment } from './scan-segment';\nimport { skipSpaces } from './skip-spaces';\nimport { PathParser } from './path-parser';\n/**\n * Parses a path string value and returns an array\n * of segments we like to call `pathArray`.\n */\nexport function parsePathString(pathInput) {\n if (isPathArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = new PathParser(pathInput);\n skipSpaces(path);\n while (path.index < path.max && !path.err.length) {\n scanSegment(path);\n }\n return path.err ? path.err : path.segments;\n}\n//# sourceMappingURL=parse-path-string.js.map","import { isAbsoluteArray } from '../util/is-absolute-array';\nimport { parsePathString } from '../parser/parse-path-string';\nexport function path2Absolute(pathInput) {\n if (isAbsoluteArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = parsePathString(pathInput);\n // if (!path || !path.length) {\n // return [['M', 0, 0]];\n // }\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n // @ts-ignore\n return path.map(function (segment) {\n var values = segment.slice(1).map(Number);\n var pathCommand = segment[0];\n var absCommand = pathCommand.toUpperCase();\n if (pathCommand === 'M') {\n x = values[0], y = values[1];\n mx = x;\n my = y;\n return ['M', x, y];\n }\n var absoluteSegment;\n if (pathCommand !== absCommand) {\n switch (absCommand) {\n case 'A':\n absoluteSegment = [\n absCommand,\n values[0],\n values[1],\n values[2],\n values[3],\n values[4],\n values[5] + x,\n values[6] + y,\n ];\n break;\n case 'V':\n absoluteSegment = [absCommand, values[0] + y];\n break;\n case 'H':\n absoluteSegment = [absCommand, values[0] + x];\n break;\n default: {\n // use brakets for `eslint: no-case-declaration`\n // https://stackoverflow.com/a/50753272/803358\n var absValues = values.map(function (n, j) { return n + (j % 2 ? y : x); });\n // for n, l, c, s, q, t\n // @ts-ignore\n absoluteSegment = [absCommand].concat(absValues);\n }\n }\n }\n else {\n // @ts-ignore\n absoluteSegment = [absCommand].concat(values);\n }\n var segLength = absoluteSegment.length;\n switch (absCommand) {\n case 'Z':\n x = mx;\n y = my;\n break;\n case 'H':\n x = absoluteSegment[1];\n break;\n case 'V':\n y = absoluteSegment[1];\n break;\n default:\n x = absoluteSegment[segLength - 2];\n y = absoluteSegment[segLength - 1];\n if (absCommand === 'M') {\n mx = x;\n my = y;\n }\n }\n return absoluteSegment;\n });\n}\n//# sourceMappingURL=path-2-absolute.js.map","/**\n * Normalizes a single segment of a `PathArray` object.\n * eg. H/V -> L, T -> Q\n */\nexport function normalizeSegment(segment, params) {\n var pathCommand = segment[0];\n var px1 = params.x1, py1 = params.y1, px2 = params.x2, py2 = params.y2;\n var values = segment.slice(1).map(Number);\n var result = segment;\n if (!'TQ'.includes(pathCommand)) {\n // optional but good to be cautious\n params.qx = null;\n params.qy = null;\n }\n if (pathCommand === 'H') {\n result = ['L', segment[1], py1];\n }\n else if (pathCommand === 'V') {\n result = ['L', px1, segment[1]];\n }\n else if (pathCommand === 'S') {\n var x1 = px1 * 2 - px2;\n var y1 = py1 * 2 - py2;\n params.x1 = x1;\n params.y1 = y1;\n result = ['C', x1, y1].concat(values);\n }\n else if (pathCommand === 'T') {\n var qx = px1 * 2 - params.qx;\n var qy = py1 * 2 - params.qy;\n params.qx = qx;\n params.qy = qy;\n result = ['Q', qx, qy].concat(values);\n }\n else if (pathCommand === 'Q') {\n var nqx = values[0], nqy = values[1];\n params.qx = nqx;\n params.qy = nqy;\n }\n return result;\n}\n//# sourceMappingURL=normalize-segment.js.map","import { __assign } from \"tslib\";\nimport { isNormalizedArray } from '../util/is-normalized-array';\nimport { paramsParser } from '../parser/params-parser';\nimport { path2Absolute } from '../convert/path-2-absolute';\nimport { normalizeSegment } from './normalize-segment';\n/**\n * @example\n * const path = 'M0 0 H50';\n * const normalizedPath = SVGPathCommander.normalizePath(path);\n * // result => [['M', 0, 0], ['L', 50, 0]]\n */\nexport function normalizePath(pathInput) {\n if (isNormalizedArray(pathInput)) {\n return [].concat(pathInput);\n }\n var path = path2Absolute(pathInput);\n var params = __assign({}, paramsParser);\n for (var i = 0; i < path.length; i += 1) {\n // Save current path command\n path[i] = normalizeSegment(path[i], params);\n var segment = path[i];\n var seglen = segment.length;\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +segment[seglen - 4] || params.x1;\n params.y2 = +segment[seglen - 3] || params.y1;\n }\n return path;\n}\n//# sourceMappingURL=normalize-path.js.map","import { isNormalizedArray } from './is-normalized-array';\n/**\n * Iterates an array to check if it's a `PathArray`\n * with all C (cubic bezier) segments.\n *\n * @param {string | PathArray} path the `Array` to be checked\n * @returns {boolean} iteration result\n */\nexport function isCurveArray(path) {\n return isNormalizedArray(path) && path.every(function (_a) {\n var pc = _a[0];\n return 'MC'.includes(pc);\n });\n}\n//# sourceMappingURL=is-curve-array.js.map","export function rotateVector(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return { x: X, y: Y };\n}\n//# sourceMappingURL=rotate-vector.js.map","import { rotateVector } from '../util/rotate-vector';\n/**\n * Converts A (arc-to) segments to C (cubic-bezier-to).\n *\n * For more information of where this math came from visit:\n * http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n */\nexport function arcToCubic(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, recursive) {\n var x1 = X1;\n var y1 = Y1;\n var rx = RX;\n var ry = RY;\n var x2 = X2;\n var y2 = Y2;\n // for more information of where this Math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n var d120 = (Math.PI * 120) / 180;\n var rad = (Math.PI / 180) * (+angle || 0);\n /** @type {number[]} */\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n if (!recursive) {\n xy = rotateVector(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotateVector(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx *= h;\n ry *= h;\n }\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (LAF === SF ? -1 : 1) *\n Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = (k * rx * y) / ry + (x1 + x2) / 2;\n cy = (k * -ry * x) / rx + (y1 + y2) / 2;\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f1 = Math.asin(((((y1 - cy) / ry) * Math.pow(10, 9)) >> 0) / Math.pow(10, 9));\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f2 = Math.asin(((((y2 - cy) / ry) * Math.pow(10, 9)) >> 0) / Math.pow(10, 9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n if (f1 < 0)\n f1 = Math.PI * 2 + f1;\n if (f2 < 0)\n f2 = Math.PI * 2 + f2;\n if (SF && f1 > f2) {\n f1 -= Math.PI * 2;\n }\n if (!SF && f2 > f1) {\n f2 -= Math.PI * 2;\n }\n }\n else {\n f1 = recursive[0], f2 = recursive[1], cx = recursive[2], cy = recursive[3];\n }\n var df = f2 - f1;\n if (Math.abs(df) > d120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + d120 * (SF && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = arcToCubic(x2, y2, rx, ry, angle, 0, SF, x2old, y2old, [f2, f2old, cx, cy]);\n }\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = (4 / 3) * rx * t;\n var hy = (4 / 3) * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return m2.concat(m3, m4, res);\n // return [...m2, ...m3, ...m4, ...res];\n }\n res = m2.concat(m3, m4, res);\n // res = [...m2, ...m3, ...m4, ...res];\n var newres = [];\n for (var i = 0, ii = res.length; i < ii; i += 1) {\n newres[i] = i % 2 ? rotateVector(res[i - 1], res[i], rad).y : rotateVector(res[i], res[i + 1], rad).x;\n }\n return newres;\n}\n// const TAU = Math.PI * 2;\n// const mapToEllipse = (\n// { x, y }: { x: number; y: number },\n// rx: number,\n// ry: number,\n// cosphi: number,\n// sinphi: number,\n// centerx: number,\n// centery: number,\n// ) => {\n// x *= rx;\n// y *= ry;\n// const xp = cosphi * x - sinphi * y;\n// const yp = sinphi * x + cosphi * y;\n// return {\n// x: xp + centerx,\n// y: yp + centery,\n// };\n// };\n// const approxUnitArc = (ang1: number, ang2: number) => {\n// // If 90 degree circular arc, use a constant\n// // as derived from http://spencermortensen.com/articles/bezier-circle\n// const a =\n// ang2 === 1.5707963267948966\n// ? 0.551915024494\n// : ang2 === -1.5707963267948966\n// ? -0.551915024494\n// : (4 / 3) * Math.tan(ang2 / 4);\n// const x1 = Math.cos(ang1);\n// const y1 = Math.sin(ang1);\n// const x2 = Math.cos(ang1 + ang2);\n// const y2 = Math.sin(ang1 + ang2);\n// return [\n// {\n// x: x1 - y1 * a,\n// y: y1 + x1 * a,\n// },\n// {\n// x: x2 + y2 * a,\n// y: y2 - x2 * a,\n// },\n// {\n// x: x2,\n// y: y2,\n// },\n// ];\n// };\n// const vectorAngle = (ux: number, uy: number, vx: number, vy: number) => {\n// const sign = ux * vy - uy * vx < 0 ? -1 : 1;\n// let dot = ux * vx + uy * vy;\n// if (dot > 1) {\n// dot = 1;\n// }\n// if (dot < -1) {\n// dot = -1;\n// }\n// return sign * Math.acos(dot);\n// };\n// const getArcCenter = (\n// px: any,\n// py: any,\n// cx: any,\n// cy: any,\n// rx: number,\n// ry: number,\n// largeArcFlag: number,\n// sweepFlag: number,\n// sinphi: number,\n// cosphi: number,\n// pxp: number,\n// pyp: number,\n// ) => {\n// const rxsq = Math.pow(rx, 2);\n// const rysq = Math.pow(ry, 2);\n// const pxpsq = Math.pow(pxp, 2);\n// const pypsq = Math.pow(pyp, 2);\n// let radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq;\n// if (radicant < 0) {\n// radicant = 0;\n// }\n// radicant /= rxsq * pypsq + rysq * pxpsq;\n// radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n// const centerxp = ((radicant * rx) / ry) * pyp;\n// const centeryp = ((radicant * -ry) / rx) * pxp;\n// const centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2;\n// const centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2;\n// const vx1 = (pxp - centerxp) / rx;\n// const vy1 = (pyp - centeryp) / ry;\n// const vx2 = (-pxp - centerxp) / rx;\n// const vy2 = (-pyp - centeryp) / ry;\n// const ang1 = vectorAngle(1, 0, vx1, vy1);\n// let ang2 = vectorAngle(vx1, vy1, vx2, vy2);\n// if (sweepFlag === 0 && ang2 > 0) {\n// ang2 -= TAU;\n// }\n// if (sweepFlag === 1 && ang2 < 0) {\n// ang2 += TAU;\n// }\n// return [centerx, centery, ang1, ang2];\n// };\n// const arcToBezier = ({ px, py, cx, cy, rx, ry, xAxisRotation = 0, largeArcFlag = 0, sweepFlag = 0 }) => {\n// const curves = [];\n// if (rx === 0 || ry === 0) {\n// return [{ x1: 0, y1: 0, x2: 0, y2: 0, x: cx, y: cy }];\n// }\n// const sinphi = Math.sin((xAxisRotation * TAU) / 360);\n// const cosphi = Math.cos((xAxisRotation * TAU) / 360);\n// const pxp = (cosphi * (px - cx)) / 2 + (sinphi * (py - cy)) / 2;\n// const pyp = (-sinphi * (px - cx)) / 2 + (cosphi * (py - cy)) / 2;\n// if (pxp === 0 && pyp === 0) {\n// return [{ x1: 0, y1: 0, x2: 0, y2: 0, x: cx, y: cy }];\n// }\n// rx = Math.abs(rx);\n// ry = Math.abs(ry);\n// const lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2);\n// if (lambda > 1) {\n// rx *= Math.sqrt(lambda);\n// ry *= Math.sqrt(lambda);\n// }\n// let [centerx, centery, ang1, ang2] = getArcCenter(\n// px,\n// py,\n// cx,\n// cy,\n// rx,\n// ry,\n// largeArcFlag,\n// sweepFlag,\n// sinphi,\n// cosphi,\n// pxp,\n// pyp,\n// );\n// // If 'ang2' == 90.0000000001, then `ratio` will evaluate to\n// // 1.0000000001. This causes `segments` to be greater than one, which is an\n// // unecessary split, and adds extra points to the bezier curve. To alleviate\n// // this issue, we round to 1.0 when the ratio is close to 1.0.\n// let ratio = Math.abs(ang2) / (TAU / 4);\n// if (Math.abs(1.0 - ratio) < 0.0000001) {\n// ratio = 1.0;\n// }\n// const segments = Math.max(Math.ceil(ratio), 1);\n// ang2 /= segments;\n// for (let i = 0; i < segments; i++) {\n// curves.push(approxUnitArc(ang1, ang2));\n// ang1 += ang2;\n// }\n// return curves.map((curve) => {\n// const { x: x1, y: y1 } = mapToEllipse(curve[0], rx, ry, cosphi, sinphi, centerx, centery);\n// const { x: x2, y: y2 } = mapToEllipse(curve[1], rx, ry, cosphi, sinphi, centerx, centery);\n// const { x, y } = mapToEllipse(curve[2], rx, ry, cosphi, sinphi, centerx, centery);\n// return { x1, y1, x2, y2, x, y };\n// });\n// };\n// export function arcToCubic(\n// x1: number,\n// y1: number,\n// rx: number,\n// ry: number,\n// angle: number,\n// LAF: number,\n// SF: number,\n// x2: number,\n// y2: number,\n// ) {\n// const curves = arcToBezier({\n// px: x1,\n// py: y1,\n// cx: x2,\n// cy: y2,\n// rx,\n// ry,\n// xAxisRotation: angle,\n// largeArcFlag: LAF,\n// sweepFlag: SF,\n// });\n// return curves.reduce((prev, cur) => {\n// const { x1, y1, x2, y2, x, y } = cur;\n// prev.push(x1, y1, x2, y2, x, y);\n// return prev;\n// }, [] as number[]);\n// }\n//# sourceMappingURL=arc-2-cubic.js.map","export function quadToCubic(x1, y1, qx, qy, x2, y2) {\n var r13 = 1 / 3;\n var r23 = 2 / 3;\n return [\n r13 * x1 + r23 * qx,\n r13 * y1 + r23 * qy,\n r13 * x2 + r23 * qx,\n r13 * y2 + r23 * qy,\n x2,\n y2, // x,y\n ];\n}\n//# sourceMappingURL=quad-2-cubic.js.map","export function midPoint(a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var bx = b[0];\n var by = b[1];\n return [ax + (bx - ax) * t, ay + (by - ay) * t];\n}\n//# sourceMappingURL=mid-point.js.map","import { __spreadArray } from \"tslib\";\nimport { midPoint } from '../util/mid-point';\nexport var lineToCubic = function (x1, y1, x2, y2) {\n var t = 0.5;\n var mid = midPoint([x1, y1], [x2, y2], t);\n return __spreadArray(__spreadArray([], mid, true), [x2, y2, x2, y2], false);\n};\n//# sourceMappingURL=line-2-cubic.js.map","import { arcToCubic } from './arc-2-cubic';\nimport { quadToCubic } from './quad-2-cubic';\nimport { lineToCubic } from './line-2-cubic';\nexport function segmentToCubic(segment, params) {\n var pathCommand = segment[0];\n var values = segment.slice(1).map(Number);\n var x = values[0], y = values[1];\n var args;\n var px1 = params.x1, py1 = params.y1, px = params.x, py = params.y;\n if (!'TQ'.includes(pathCommand)) {\n params.qx = null;\n params.qy = null;\n }\n switch (pathCommand) {\n case 'M':\n params.x = x;\n params.y = y;\n return segment;\n case 'A':\n args = [px1, py1].concat(values);\n // @ts-ignore\n return ['C'].concat(arcToCubic(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]));\n case 'Q':\n params.qx = x;\n params.qy = y;\n args = [px1, py1].concat(values);\n // @ts-ignore\n return ['C'].concat(quadToCubic(args[0], args[1], args[2], args[3], args[4], args[5]));\n case 'L':\n // @ts-ignore\n return ['C'].concat(lineToCubic(px1, py1, x, y));\n case 'Z':\n // prevent NaN from divide 0\n if (px1 === px && py1 === py) {\n return ['C', px1, py1, px, py, px, py];\n }\n // @ts-ignore\n return ['C'].concat(lineToCubic(px1, py1, px, py));\n default:\n }\n return segment;\n}\n//# sourceMappingURL=segment-2-cubic.js.map","import { __assign } from \"tslib\";\nimport { paramsParser } from '../parser/params-parser';\nimport { fixArc } from '../process/fix-arc';\nimport { normalizePath } from '../process/normalize-path';\nimport { isCurveArray } from '../util/is-curve-array';\nimport { segmentToCubic } from '../process/segment-2-cubic';\n// import { fixPath } from '../process/fix-path';\nexport function path2Curve(pathInput, needZCommandIndexes) {\n if (needZCommandIndexes === void 0) { needZCommandIndexes = false; }\n if (isCurveArray(pathInput)) {\n var cloned = [].concat(pathInput);\n if (needZCommandIndexes) {\n return [cloned, []];\n }\n else {\n return cloned;\n }\n }\n // fixPath will remove 'Z' command\n // const path = fixPath(normalizePath(pathInput));\n var path = normalizePath(pathInput);\n var params = __assign({}, paramsParser);\n var allPathCommands = [];\n var pathCommand = '';\n var ii = path.length;\n var segment;\n var seglen;\n var zCommandIndexes = [];\n for (var i = 0; i < ii; i += 1) {\n if (path[i])\n pathCommand = path[i][0];\n allPathCommands[i] = pathCommand;\n var curveSegment = segmentToCubic(path[i], params);\n path[i] = curveSegment;\n fixArc(path, allPathCommands, i);\n ii = path.length; // solves curveArrays ending in Z\n // keep Z command account for lineJoin\n // @see https://github.com/antvis/util/issues/68\n if (pathCommand === 'Z') {\n zCommandIndexes.push(i);\n }\n segment = path[i];\n seglen = segment.length;\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +segment[seglen - 4] || params.x1;\n params.y2 = +segment[seglen - 3] || params.y1;\n }\n // validate\n if (needZCommandIndexes) {\n return [path, zCommandIndexes];\n }\n else {\n return path;\n }\n}\n//# sourceMappingURL=path-2-curve.js.map","export function clonePath(path) {\n return path.map(function (x) { return (Array.isArray(x) ? [].concat(x) : x); });\n}\n//# sourceMappingURL=clone-path.js.map","// reverse CURVE based pathArray segments only\nexport function reverseCurve(pathArray) {\n var rotatedCurve = pathArray\n .slice(1)\n .map(function (x, i, curveOnly) {\n // @ts-ignore\n return !i ? pathArray[0].slice(1).concat(x.slice(1)) : curveOnly[i - 1].slice(-2).concat(x.slice(1));\n })\n // @ts-ignore\n .map(function (x) { return x.map(function (y, i) { return x[x.length - i - 2 * (1 - (i % 2))]; }); })\n .reverse();\n return [['M'].concat(rotatedCurve[0].slice(0, 2))].concat(rotatedCurve.map(function (x) { return ['C'].concat(x.slice(2)); }));\n}\n//# sourceMappingURL=reverse-curve.js.map","export function distanceSquareRoot(a, b) {\n return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]));\n}\n//# sourceMappingURL=distance-square-root.js.map","import { midPoint } from './mid-point';\nimport { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a line (L,V,H,Z) segment.\n */\nexport function segmentLineFactory(x1, y1, x2, y2, distance) {\n var length = distanceSquareRoot([x1, y1], [x2, y2]);\n var point = { x: 0, y: 0 };\n if (typeof distance === 'number') {\n if (distance <= 0) {\n point = { x: x1, y: y1 };\n }\n else if (distance >= length) {\n point = { x: x2, y: y2 };\n }\n else {\n var _a = midPoint([x1, y1], [x2, y2], distance / length), x = _a[0], y = _a[1];\n point = { x: x, y: y };\n }\n }\n return {\n length: length,\n point: point,\n min: {\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n },\n max: {\n x: Math.max(x1, x2),\n y: Math.max(y1, y2),\n },\n };\n}\n//# sourceMappingURL=segment-line-factory.js.map","import { segmentLineFactory } from './segment-line-factory';\nimport { distanceSquareRoot } from './distance-square-root';\nfunction angleBetween(v0, v1) {\n var v0x = v0.x, v0y = v0.y;\n var v1x = v1.x, v1y = v1.y;\n var p = v0x * v1x + v0y * v1y;\n var n = Math.sqrt((Math.pow(v0x, 2) + Math.pow(v0y, 2)) * (Math.pow(v1x, 2) + Math.pow(v1y, 2)));\n var sign = v0x * v1y - v0y * v1x < 0 ? -1 : 1;\n var angle = sign * Math.acos(p / n);\n return angle;\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n * @see https://github.com/MadLittleMods/svg-curve-lib/blob/master/src/js/svg-curve-lib.js\n */\nfunction getPointAtArcSegmentLength(x1, y1, RX, RY, angle, LAF, SF, x, y, t) {\n var abs = Math.abs, sin = Math.sin, cos = Math.cos, sqrt = Math.sqrt, PI = Math.PI;\n var rx = abs(RX);\n var ry = abs(RY);\n var xRot = ((angle % 360) + 360) % 360;\n var xRotRad = xRot * (PI / 180);\n if (x1 === x && y1 === y) {\n return { x: x1, y: y1 };\n }\n if (rx === 0 || ry === 0) {\n return segmentLineFactory(x1, y1, x, y, t).point;\n }\n var dx = (x1 - x) / 2;\n var dy = (y1 - y) / 2;\n var transformedPoint = {\n x: cos(xRotRad) * dx + sin(xRotRad) * dy,\n y: -sin(xRotRad) * dx + cos(xRotRad) * dy,\n };\n var radiiCheck = Math.pow(transformedPoint.x, 2) / Math.pow(rx, 2) + Math.pow(transformedPoint.y, 2) / Math.pow(ry, 2);\n if (radiiCheck > 1) {\n rx *= sqrt(radiiCheck);\n ry *= sqrt(radiiCheck);\n }\n var cSquareNumerator = Math.pow(rx, 2) * Math.pow(ry, 2) - Math.pow(rx, 2) * Math.pow(transformedPoint.y, 2) - Math.pow(ry, 2) * Math.pow(transformedPoint.x, 2);\n var cSquareRootDenom = Math.pow(rx, 2) * Math.pow(transformedPoint.y, 2) + Math.pow(ry, 2) * Math.pow(transformedPoint.x, 2);\n var cRadicand = cSquareNumerator / cSquareRootDenom;\n cRadicand = cRadicand < 0 ? 0 : cRadicand;\n var cCoef = (LAF !== SF ? 1 : -1) * sqrt(cRadicand);\n var transformedCenter = {\n x: cCoef * ((rx * transformedPoint.y) / ry),\n y: cCoef * (-(ry * transformedPoint.x) / rx),\n };\n var center = {\n x: cos(xRotRad) * transformedCenter.x - sin(xRotRad) * transformedCenter.y + (x1 + x) / 2,\n y: sin(xRotRad) * transformedCenter.x + cos(xRotRad) * transformedCenter.y + (y1 + y) / 2,\n };\n var startVector = {\n x: (transformedPoint.x - transformedCenter.x) / rx,\n y: (transformedPoint.y - transformedCenter.y) / ry,\n };\n var startAngle = angleBetween({ x: 1, y: 0 }, startVector);\n var endVector = {\n x: (-transformedPoint.x - transformedCenter.x) / rx,\n y: (-transformedPoint.y - transformedCenter.y) / ry,\n };\n var sweepAngle = angleBetween(startVector, endVector);\n if (!SF && sweepAngle > 0) {\n sweepAngle -= 2 * PI;\n }\n else if (SF && sweepAngle < 0) {\n sweepAngle += 2 * PI;\n }\n sweepAngle %= 2 * PI;\n var alpha = startAngle + sweepAngle * t;\n var ellipseComponentX = rx * cos(alpha);\n var ellipseComponentY = ry * sin(alpha);\n var point = {\n x: cos(xRotRad) * ellipseComponentX - sin(xRotRad) * ellipseComponentY + center.x,\n y: sin(xRotRad) * ellipseComponentX + cos(xRotRad) * ellipseComponentY + center.y,\n };\n // to be used later\n // point.ellipticalArcStartAngle = startAngle;\n // point.ellipticalArcEndAngle = startAngle + sweepAngle;\n // point.ellipticalArcAngle = alpha;\n // point.ellipticalArcCenter = center;\n // point.resultantRx = rx;\n // point.resultantRy = ry;\n return point;\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the shape minimum and maximum {x,y} coordinates of an A (arc-to) segment.\n *\n * For better performance, it can skip calculate bbox or length in some scenario.\n */\nexport function segmentArcFactory(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 30 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = X1;\n var y = Y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n // bad perf when size > 100\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtArcSegmentLength(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: X2, y: Y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-arc-factory.js.map","import { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n */\nfunction getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t) {\n var t1 = 1 - t;\n return {\n x: Math.pow(t1, 3) * x1 + 3 * Math.pow(t1, 2) * t * c1x + 3 * t1 * Math.pow(t, 2) * c2x + Math.pow(t, 3) * x2,\n y: Math.pow(t1, 3) * y1 + 3 * Math.pow(t1, 2) * t * c1y + 3 * t1 * Math.pow(t, 2) * c2y + Math.pow(t, 3) * y2,\n };\n}\n/**\n * Returns the length of a C (cubic-bezier) segment\n * or an {x,y} point at a given length.\n */\nexport function segmentCubicFactory(x1, y1, c1x, c1y, c2x, c2y, x2, y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 10 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = x1;\n var y = y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n // bad perf when size = 300\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-cubic-factory.js.map","import { distanceSquareRoot } from './distance-square-root';\n/**\n * Returns the {x,y} coordinates of a point at a\n * given length of a quadratic-bezier segment.\n *\n * @see https://github.com/substack/point-at-length\n */\nfunction getPointAtQuadSegmentLength(x1, y1, cx, cy, x2, y2, t) {\n var t1 = 1 - t;\n return {\n x: Math.pow(t1, 2) * x1 + 2 * t1 * t * cx + Math.pow(t, 2) * x2,\n y: Math.pow(t1, 2) * y1 + 2 * t1 * t * cy + Math.pow(t, 2) * y2,\n };\n}\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a Q (quadratic-bezier) segment.\n */\nexport function segmentQuadFactory(x1, y1, qx, qy, x2, y2, distance, options) {\n var _a;\n var _b = options.bbox, bbox = _b === void 0 ? true : _b, _c = options.length, length = _c === void 0 ? true : _c, _d = options.sampleSize, sampleSize = _d === void 0 ? 10 : _d;\n var distanceIsNumber = typeof distance === 'number';\n var x = x1;\n var y = y1;\n var LENGTH = 0;\n var prev = [x, y, LENGTH];\n var cur = [x, y];\n var t = 0;\n var POINT = { x: 0, y: 0 };\n var POINTS = [{ x: x, y: y }];\n if (distanceIsNumber && distance <= 0) {\n POINT = { x: x, y: y };\n }\n for (var j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n (_a = getPointAtQuadSegmentLength(x1, y1, qx, qy, x2, y2, t), x = _a.x, y = _a.y);\n if (bbox) {\n POINTS.push({ x: x, y: y });\n }\n if (length) {\n LENGTH += distanceSquareRoot(cur, [x, y]);\n }\n cur = [x, y];\n if (distanceIsNumber && LENGTH >= distance && distance > prev[2]) {\n var dv = (LENGTH - distance) / (LENGTH - prev[2]);\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n /* istanbul ignore else */\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.min.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, POINTS.map(function (n) { return n.x; })),\n y: Math.max.apply(null, POINTS.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=segment-quad-factory.js.map","import { normalizePath } from '../process/normalize-path';\nimport { segmentLineFactory } from './segment-line-factory';\nimport { segmentArcFactory } from './segment-arc-factory';\nimport { segmentCubicFactory } from './segment-cubic-factory';\nimport { segmentQuadFactory } from './segment-quad-factory';\n/**\n * Returns a {x,y} point at a given length\n * of a shape, the shape total length and\n * the shape minimum and maximum {x,y} coordinates.\n */\nexport function pathLengthFactory(pathInput, distance, options) {\n var _a, _b, _c, _d, _e, _f;\n var path = normalizePath(pathInput);\n var distanceIsNumber = typeof distance === 'number';\n var isM;\n var data = [];\n var pathCommand;\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var seg;\n var MIN = [];\n var MAX = [];\n var length = 0;\n var min = { x: 0, y: 0 };\n var max = min;\n var point = min;\n var POINT = min;\n var LENGTH = 0;\n for (var i = 0, ll = path.length; i < ll; i += 1) {\n seg = path[i];\n pathCommand = seg[0];\n isM = pathCommand === 'M';\n data = !isM ? [x, y].concat(seg.slice(1)) : data;\n // this segment is always ZERO\n /* istanbul ignore else */\n if (isM) {\n // remember mx, my for Z\n mx = seg[1], my = seg[2];\n min = { x: mx, y: my };\n max = min;\n length = 0;\n if (distanceIsNumber && distance < 0.001) {\n POINT = min;\n }\n }\n else if (pathCommand === 'L') {\n (_a = segmentLineFactory(data[0], data[1], data[2], data[3], (distance || 0) - LENGTH), length = _a.length, min = _a.min, max = _a.max, point = _a.point);\n }\n else if (pathCommand === 'A') {\n (_b = segmentArcFactory(data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], (distance || 0) - LENGTH, options || {}), length = _b.length, min = _b.min, max = _b.max, point = _b.point);\n }\n else if (pathCommand === 'C') {\n (_c = segmentCubicFactory(data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], (distance || 0) - LENGTH, options || {}), length = _c.length, min = _c.min, max = _c.max, point = _c.point);\n }\n else if (pathCommand === 'Q') {\n (_d = segmentQuadFactory(data[0], data[1], data[2], data[3], data[4], data[5], (distance || 0) - LENGTH, options || {}), length = _d.length, min = _d.min, max = _d.max, point = _d.point);\n }\n else if (pathCommand === 'Z') {\n data = [x, y, mx, my];\n (_e = segmentLineFactory(data[0], data[1], data[2], data[3], (distance || 0) - LENGTH), length = _e.length, min = _e.min, max = _e.max, point = _e.point);\n }\n if (distanceIsNumber && LENGTH < distance && LENGTH + length >= distance) {\n POINT = point;\n }\n MAX.push(max);\n MIN.push(min);\n LENGTH += length;\n _f = pathCommand !== 'Z' ? seg.slice(-2) : [mx, my], x = _f[0], y = _f[1];\n }\n // native `getPointAtLength` behavior when the given distance\n // is higher than total length\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x, y: y };\n }\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min.apply(null, MIN.map(function (n) { return n.x; })),\n y: Math.min.apply(null, MIN.map(function (n) { return n.y; })),\n },\n max: {\n x: Math.max.apply(null, MAX.map(function (n) { return n.x; })),\n y: Math.max.apply(null, MAX.map(function (n) { return n.y; })),\n },\n };\n}\n//# sourceMappingURL=path-length-factory.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the bounding box of a shape.\n */\nexport function getPathBBox(path, options) {\n if (!path) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n x2: 0,\n y2: 0,\n cx: 0,\n cy: 0,\n cz: 0,\n };\n }\n var _a = pathLengthFactory(path, undefined, __assign(__assign({}, options), { length: false })), _b = _a.min, xMin = _b.x, yMin = _b.y, _c = _a.max, xMax = _c.x, yMax = _c.y;\n var width = xMax - xMin;\n var height = yMax - yMin;\n return {\n width: width,\n height: height,\n x: xMin,\n y: yMin,\n x2: xMax,\n y2: yMax,\n cx: xMin + width / 2,\n cy: yMin + height / 2,\n // an estimted guess\n cz: Math.max(width, height) + Math.min(width, height) / 2,\n };\n}\n//# sourceMappingURL=get-path-bbox.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the shape total length, or the equivalent to `shape.getTotalLength()`.\n *\n * The `normalizePath` version is lighter, faster, more efficient and more accurate\n * with paths that are not `curveArray`.\n */\nexport function getTotalLength(pathInput, options) {\n return pathLengthFactory(pathInput, undefined, __assign(__assign({}, options), { bbox: false, length: true })).length;\n}\n//# sourceMappingURL=get-total-length.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns the bounding box of a shape.\n */\nexport function getPathBBoxTotalLength(path, options) {\n if (!path) {\n return {\n length: 0,\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n x2: 0,\n y2: 0,\n cx: 0,\n cy: 0,\n cz: 0,\n };\n }\n var _a = pathLengthFactory(path, undefined, __assign(__assign({}, options), { bbox: true, length: true })), length = _a.length, _b = _a.min, xMin = _b.x, yMin = _b.y, _c = _a.max, xMax = _c.x, yMax = _c.y;\n var width = xMax - xMin;\n var height = yMax - yMin;\n return {\n length: length,\n width: width,\n height: height,\n x: xMin,\n y: yMin,\n x2: xMax,\n y2: yMax,\n cx: xMin + width / 2,\n cy: yMin + height / 2,\n // an estimted guess\n cz: Math.max(width, height) + Math.min(width, height) / 2,\n };\n}\n//# sourceMappingURL=get-path-bbox-total-length.js.map","import { distanceSquareRoot } from './distance-square-root';\nfunction getRotations(a) {\n var segCount = a.length;\n var pointCount = segCount - 1;\n return a.map(function (f, idx) {\n return a.map(function (p, i) {\n var oldSegIdx = idx + i;\n var seg;\n if (i === 0 || (a[oldSegIdx] && a[oldSegIdx][0] === 'M')) {\n seg = a[oldSegIdx];\n return ['M'].concat(seg.slice(-2));\n }\n if (oldSegIdx >= segCount)\n oldSegIdx -= pointCount;\n return a[oldSegIdx];\n });\n });\n}\nexport function getRotatedCurve(a, b) {\n var segCount = a.length - 1;\n var lineLengths = [];\n var computedIndex = 0;\n var sumLensSqrd = 0;\n var rotations = getRotations(a);\n rotations.forEach(function (r, i) {\n a.slice(1).forEach(function (s, j) {\n // @ts-ignore\n sumLensSqrd += distanceSquareRoot(a[(i + j) % segCount].slice(-2), b[j % segCount].slice(-2));\n });\n lineLengths[i] = sumLensSqrd;\n sumLensSqrd = 0;\n });\n computedIndex = lineLengths.indexOf(Math.min.apply(null, lineLengths));\n return rotations[computedIndex];\n}\n//# sourceMappingURL=get-rotated-curve.js.map","import { path2Curve } from '../convert/path-2-curve';\n/**\n * Returns the area of a single cubic-bezier segment.\n *\n * http://objectmix.com/graphics/133553-area-closed-bezier-curve.html\n */\nfunction getCubicSegArea(x1, y1, c1x, c1y, c2x, c2y, x2, y2) {\n // https://stackoverflow.com/a/15845996\n return ((3 *\n ((y2 - y1) * (c1x + c2x) -\n (x2 - x1) * (c1y + c2y) +\n c1y * (x1 - c2x) -\n c1x * (y1 - c2y) +\n y2 * (c2x + x1 / 3) -\n x2 * (c2y + y1 / 3))) /\n 20);\n}\n/**\n * Returns the area of a shape.\n * @author Jürg Lehni & Jonathan Puckey\n *\n * @see https://github.com/paperjs/paper.js/blob/develop/src/path/Path.js\n */\nexport function getPathArea(path) {\n var x = 0;\n var y = 0;\n var len = 0;\n return path2Curve(path)\n .map(function (seg) {\n var _a;\n switch (seg[0]) {\n case 'M':\n x = seg[1], y = seg[2];\n return 0;\n default:\n // @ts-ignore\n var _b = seg.slice(1), c1x = _b[0], c1y = _b[1], c2x = _b[2], c2y = _b[3], x2 = _b[4], y2 = _b[5];\n len = getCubicSegArea(x, y, c1x, c1y, c2x, c2y, x2, y2);\n _a = seg.slice(-2), x = _a[0], y = _a[1];\n return len;\n }\n })\n .reduce(function (a, b) { return a + b; }, 0);\n}\n// export function getPathArea(pathArray: AbsoluteArray) {\n// let x = 0;\n// let y = 0;\n// let mx = 0;\n// let my = 0;\n// let len = 0;\n// return pathArray\n// .map((seg) => {\n// switch (seg[0]) {\n// case 'M':\n// case 'Z':\n// mx = seg[0] === 'M' ? seg[1] : mx;\n// my = seg[0] === 'M' ? seg[2] : my;\n// x = mx;\n// y = my;\n// return 0;\n// default:\n// // @ts-ignore\n// len = getCubicSegArea.apply(0, [x, y].concat(seg.slice(1)));\n// [x, y] = seg.slice(-2) as [number, number];\n// return len;\n// }\n// })\n// .reduce((a, b) => a + b, 0);\n// }\n//# sourceMappingURL=get-path-area.js.map","import { getPathArea } from './get-path-area';\nexport function getDrawDirection(pathArray) {\n return getPathArea(pathArray) >= 0;\n}\n//# sourceMappingURL=get-draw-direction.js.map","import { __assign } from \"tslib\";\nimport { pathLengthFactory } from './path-length-factory';\n/**\n * Returns [x,y] coordinates of a point at a given length of a shape.\n */\nexport function getPointAtLength(pathInput, distance, options) {\n return pathLengthFactory(pathInput, distance, __assign(__assign({}, options), { bbox: false, length: true })).point;\n}\n//# sourceMappingURL=get-point-at-length.js.map","import { parsePathString } from '../parser/parse-path-string';\nimport { getTotalLength } from './get-total-length';\n/**\n * Returns the segment, its index and length as well as\n * the length to that segment at a given length in a path.\n */\nexport function getPropertiesAtLength(pathInput, distance) {\n var pathArray = parsePathString(pathInput);\n if (typeof pathArray === 'string') {\n throw TypeError(pathArray);\n }\n var pathTemp = pathArray.slice();\n var pathLength = getTotalLength(pathTemp);\n var index = pathTemp.length - 1;\n var lengthAtSegment = 0;\n var length = 0;\n var segment = pathArray[0];\n var _a = segment.slice(-2), x = _a[0], y = _a[1];\n var point = { x: x, y: y };\n // If the path is empty, return 0.\n if (index <= 0 || !distance || !Number.isFinite(distance)) {\n return {\n segment: segment,\n index: 0,\n length: length,\n point: point,\n lengthAtSegment: lengthAtSegment,\n };\n }\n if (distance >= pathLength) {\n pathTemp = pathArray.slice(0, -1);\n lengthAtSegment = getTotalLength(pathTemp);\n length = pathLength - lengthAtSegment;\n return {\n segment: pathArray[index],\n index: index,\n length: length,\n lengthAtSegment: lengthAtSegment,\n };\n }\n var segments = [];\n while (index > 0) {\n segment = pathTemp[index];\n pathTemp = pathTemp.slice(0, -1);\n lengthAtSegment = getTotalLength(pathTemp);\n length = pathLength - lengthAtSegment;\n pathLength = lengthAtSegment;\n segments.push({\n segment: segment,\n index: index,\n length: length,\n lengthAtSegment: lengthAtSegment,\n });\n index -= 1;\n }\n return segments.find(function (_a) {\n var l = _a.lengthAtSegment;\n return l <= distance;\n });\n}\n//# sourceMappingURL=get-properties-at-length.js.map","import { parsePathString } from '../parser/parse-path-string';\nimport { normalizePath } from '../process/normalize-path';\nimport { getPointAtLength } from './get-point-at-length';\nimport { getPropertiesAtLength } from './get-properties-at-length';\nimport { getTotalLength } from './get-total-length';\n/**\n * Returns the point and segment in path closest to a given point as well as\n * the distance to the path stroke.\n * @see https://bl.ocks.org/mbostock/8027637\n */\nexport function getPropertiesAtPoint(pathInput, point) {\n var path = parsePathString(pathInput);\n var normalPath = normalizePath(path);\n var pathLength = getTotalLength(path);\n var distanceTo = function (p) {\n var dx = p.x - point.x;\n var dy = p.y - point.y;\n return dx * dx + dy * dy;\n };\n var precision = 8;\n var scan;\n var scanDistance = 0;\n var closest;\n var bestLength = 0;\n var bestDistance = Infinity;\n // linear scan for coarse approximation\n for (var scanLength = 0; scanLength <= pathLength; scanLength += precision) {\n scan = getPointAtLength(normalPath, scanLength);\n scanDistance = distanceTo(scan);\n if (scanDistance < bestDistance) {\n closest = scan;\n bestLength = scanLength;\n bestDistance = scanDistance;\n }\n }\n // binary search for precise estimate\n precision /= 2;\n var before;\n var after;\n var beforeLength = 0;\n var afterLength = 0;\n var beforeDistance = 0;\n var afterDistance = 0;\n while (precision > 0.5) {\n beforeLength = bestLength - precision;\n before = getPointAtLength(normalPath, beforeLength);\n beforeDistance = distanceTo(before);\n afterLength = bestLength + precision;\n after = getPointAtLength(normalPath, afterLength);\n afterDistance = distanceTo(after);\n if (beforeLength >= 0 && beforeDistance < bestDistance) {\n closest = before;\n bestLength = beforeLength;\n bestDistance = beforeDistance;\n }\n else if (afterLength <= pathLength && afterDistance < bestDistance) {\n closest = after;\n bestLength = afterLength;\n bestDistance = afterDistance;\n }\n else {\n precision /= 2;\n }\n }\n var segment = getPropertiesAtLength(path, bestLength);\n var distance = Math.sqrt(bestDistance);\n return { closest: closest, distance: distance, segment: segment };\n}\n//# sourceMappingURL=get-properties-at-point.js.map","import { getPropertiesAtPoint } from './get-properties-at-point';\n/**\n * Checks if a given point is in the stroke of a path.\n */\nexport function isPointInStroke(pathInput, point) {\n var distance = getPropertiesAtPoint(pathInput, point).distance;\n return Math.abs(distance) < 0.001; // 0.01 might be more permissive\n}\n//# sourceMappingURL=is-point-in-stroke.js.map","import { midPoint } from './mid-point';\nimport { segmentCubicFactory } from './segment-cubic-factory';\nfunction splitCubic(pts, t) {\n if (t === void 0) { t = 0.5; }\n var p0 = pts.slice(0, 2);\n var p1 = pts.slice(2, 4);\n var p2 = pts.slice(4, 6);\n var p3 = pts.slice(6, 8);\n var p4 = midPoint(p0, p1, t);\n var p5 = midPoint(p1, p2, t);\n var p6 = midPoint(p2, p3, t);\n var p7 = midPoint(p4, p5, t);\n var p8 = midPoint(p5, p6, t);\n var p9 = midPoint(p7, p8, t);\n return [\n // @ts-ignore\n ['C'].concat(p4, p7, p9),\n // @ts-ignore\n ['C'].concat(p8, p6, p3),\n ];\n}\nfunction getCurveArray(segments) {\n return segments.map(function (segment, i, pathArray) {\n // @ts-ignore\n var segmentData = i && pathArray[i - 1].slice(-2).concat(segment.slice(1));\n // @ts-ignore\n var curveLength = i\n ? segmentCubicFactory(segmentData[0], segmentData[1], segmentData[2], segmentData[3], segmentData[4], segmentData[5], segmentData[6], segmentData[7], segmentData[8], { bbox: false }).length\n : 0;\n var subsegs;\n if (i) {\n // must be [segment,segment]\n subsegs = curveLength ? splitCubic(segmentData) : [segment, segment];\n }\n else {\n subsegs = [segment];\n }\n return {\n s: segment,\n ss: subsegs,\n l: curveLength,\n };\n });\n}\nexport function equalizeSegments(path1, path2, TL) {\n var c1 = getCurveArray(path1);\n var c2 = getCurveArray(path2);\n var L1 = c1.length;\n var L2 = c2.length;\n var l1 = c1.filter(function (x) { return x.l; }).length;\n var l2 = c2.filter(function (x) { return x.l; }).length;\n var m1 = c1.filter(function (x) { return x.l; }).reduce(function (a, _a) {\n var l = _a.l;\n return a + l;\n }, 0) / l1 || 0;\n var m2 = c2.filter(function (x) { return x.l; }).reduce(function (a, _a) {\n var l = _a.l;\n return a + l;\n }, 0) / l2 || 0;\n var tl = TL || Math.max(L1, L2);\n var mm = [m1, m2];\n var dif = [tl - L1, tl - L2];\n var canSplit = 0;\n var result = [c1, c2].map(function (x, i) {\n // @ts-ignore\n return x.l === tl\n ? x.map(function (y) { return y.s; })\n : x\n .map(function (y, j) {\n canSplit = j && dif[i] && y.l >= mm[i];\n dif[i] -= canSplit ? 1 : 0;\n return canSplit ? y.ss : [y.s];\n })\n .flat();\n });\n return result[0].length === result[1].length ? result : equalizeSegments(result[0], result[1], tl);\n}\n//# sourceMappingURL=equalize-segments.js.map","// 多边形的射线检测,参考:https://blog.csdn.net/WilliamSun0122/article/details/77994526\nvar tolerance = 1e-6;\n// 三态函数,判断两个double在eps精度下的大小关系\nfunction dcmp(x) {\n if (Math.abs(x) < tolerance) {\n return 0;\n }\n return x < 0 ? -1 : 1;\n}\n// 判断点Q是否在p1和p2的线段上\nfunction onSegment(p1, p2, q) {\n if ((q[0] - p1[0]) * (p2[1] - p1[1]) === (p2[0] - p1[0]) * (q[1] - p1[1]) &&\n Math.min(p1[0], p2[0]) <= q[0] &&\n q[0] <= Math.max(p1[0], p2[0]) &&\n Math.min(p1[1], p2[1]) <= q[1] &&\n q[1] <= Math.max(p1[1], p2[1])) {\n return true;\n }\n return false;\n}\n// 判断点P在多边形内-射线法\nexport function isPointInPolygon(points, x, y) {\n var isHit = false;\n var n = points.length;\n if (n <= 2) {\n // svg 中点小于 3 个时,不显示,也无法被拾取\n return false;\n }\n for (var i = 0; i < n; i++) {\n var p1 = points[i];\n var p2 = points[(i + 1) % n];\n if (onSegment(p1, p2, [x, y])) {\n // 点在多边形一条边上\n return true;\n }\n // 前一个判断min(p1[1],p2[1]) 0 !== dcmp(p2[1] - y) > 0 &&\n dcmp(x - ((y - p1[1]) * (p1[0] - p2[0])) / (p1[1] - p2[1]) - p1[0]) < 0) {\n isHit = !isHit;\n }\n }\n return isHit;\n}\n//# sourceMappingURL=is-point-in-polygon.js.map","import { isPointInPolygon } from './is-point-in-polygon';\nvar isBetween = function (value, min, max) { return value >= min && value <= max; };\nfunction getLineIntersect(p0, p1, p2, p3) {\n var tolerance = 0.001;\n var E = {\n x: p2.x - p0.x,\n y: p2.y - p0.y,\n };\n var D0 = {\n x: p1.x - p0.x,\n y: p1.y - p0.y,\n };\n var D1 = {\n x: p3.x - p2.x,\n y: p3.y - p2.y,\n };\n var kross = D0.x * D1.y - D0.y * D1.x;\n var sqrKross = kross * kross;\n var sqrLen0 = D0.x * D0.x + D0.y * D0.y;\n var sqrLen1 = D1.x * D1.x + D1.y * D1.y;\n var point = null;\n if (sqrKross > tolerance * sqrLen0 * sqrLen1) {\n var s = (E.x * D1.y - E.y * D1.x) / kross;\n var t = (E.x * D0.y - E.y * D0.x) / kross;\n if (isBetween(s, 0, 1) && isBetween(t, 0, 1)) {\n point = {\n x: p0.x + s * D0.x,\n y: p0.y + s * D0.y,\n };\n }\n }\n return point;\n}\nfunction parseToLines(points) {\n var lines = [];\n var count = points.length;\n for (var i = 0; i < count - 1; i++) {\n var point = points[i];\n var next = points[i + 1];\n lines.push({\n from: {\n x: point[0],\n y: point[1],\n },\n to: {\n x: next[0],\n y: next[1],\n },\n });\n }\n if (lines.length > 1) {\n var first = points[0];\n var last = points[count - 1];\n lines.push({\n from: {\n x: last[0],\n y: last[1],\n },\n to: {\n x: first[0],\n y: first[1],\n },\n });\n }\n return lines;\n}\nfunction lineIntersectPolygon(lines, line) {\n var isIntersect = false;\n lines.forEach(function (l) {\n if (getLineIntersect(l.from, l.to, line.from, line.to)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n}\nfunction getBBox(points) {\n var xArr = points.map(function (p) { return p[0]; });\n var yArr = points.map(function (p) { return p[1]; });\n return {\n minX: Math.min.apply(null, xArr),\n maxX: Math.max.apply(null, xArr),\n minY: Math.min.apply(null, yArr),\n maxY: Math.max.apply(null, yArr),\n };\n}\nfunction intersectBBox(box1, box2) {\n return !(box2.minX > box1.maxX || box2.maxX < box1.minX || box2.minY > box1.maxY || box2.maxY < box1.minY);\n}\n/**\n * @see https://stackoverflow.com/questions/753140/how-do-i-determine-if-two-convex-polygons-intersect\n */\nexport function isPolygonsIntersect(points1, points2) {\n // 空数组,或者一个点返回 false\n if (points1.length < 2 || points2.length < 2) {\n return false;\n }\n var bbox1 = getBBox(points1);\n var bbox2 = getBBox(points2);\n // 判定包围盒是否相交,比判定点是否在多边形内要快的多,可以筛选掉大多数情况\n if (!intersectBBox(bbox1, bbox2)) {\n return false;\n }\n var isIn = false;\n // 判定点是否在多边形内部,一旦有一个点在另一个多边形内,则返回\n points2.forEach(function (point) {\n if (isPointInPolygon(points1, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n // 两个多边形都需要判定\n points1.forEach(function (point) {\n if (isPointInPolygon(points2, point[0], point[1])) {\n isIn = true;\n return false;\n }\n });\n if (isIn) {\n return true;\n }\n var lines1 = parseToLines(points1);\n var lines2 = parseToLines(points2);\n var isIntersect = false;\n lines2.forEach(function (line) {\n if (lineIntersectPolygon(lines1, line)) {\n isIntersect = true;\n return false;\n }\n });\n return isIntersect;\n}\n//# sourceMappingURL=is-polygons-intersect.js.map","/**\n * Create DOM from a html string.\n * @param str\n * @returns\n */\nexport function createDOM(str) {\n var container = document.createElement('div');\n container.innerHTML = str;\n var dom = container.childNodes[0];\n if (dom && container.contains(dom)) {\n container.removeChild(dom);\n }\n return dom;\n}\n//# sourceMappingURL=create-dom.js.map","/**\n * Modify the CSS of a DOM.\n * @param dom\n * @param css\n * @returns\n */\nexport function modifyCSS(dom, css) {\n if (!dom)\n return;\n Object.keys(css).forEach(function (key) {\n dom.style[key] = css[key];\n });\n return dom;\n}\n//# sourceMappingURL=modify-css.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"@antv/util\");\n/*\n * Assigns an initial order value for each node by performing a DFS search\n * starting from nodes in the first rank. Nodes are assigned an order in their\n * rank as they are first visited.\n *\n * This approach comes from Gansner, et al., \"A Technique for Drawing Directed\n * Graphs.\"\n *\n * Returns a layering matrix with an array per layer and each layer sorted by\n * the order of its nodes.\n */\nvar initOrder = function (g) {\n var visited = {};\n var simpleNodes = g.nodes().filter(function (v) {\n var _a;\n return !((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length);\n });\n var nodeRanks = simpleNodes.map(function (v) { return g.node(v).rank; });\n var maxRank = (0, util_1.max)(nodeRanks);\n var layers = [];\n for (var i = 0; i < maxRank + 1; i++) {\n layers.push([]);\n }\n var dfs = function (v) {\n var _a;\n if (visited.hasOwnProperty(v))\n return;\n visited[v] = true;\n var node = g.node(v);\n if (!isNaN(node.rank)) {\n layers[node.rank].push(v);\n }\n (_a = g.successors(v)) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { return dfs(child); });\n };\n var orderedVs = simpleNodes.sort(function (a, b) { return g.node(a).rank - g.node(b).rank; });\n // const orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v)!.rank; });\n // 有fixOrder的,直接排序好放进去\n var beforeSort = orderedVs.filter(function (n) {\n return g.node(n).fixorder !== undefined;\n });\n var fixOrderNodes = beforeSort.sort(function (a, b) { return g.node(a).fixorder - g.node(b).fixorder; });\n fixOrderNodes === null || fixOrderNodes === void 0 ? void 0 : fixOrderNodes.forEach(function (n) {\n if (!isNaN(g.node(n).rank)) {\n layers[g.node(n).rank].push(n);\n }\n visited[n] = true;\n });\n orderedVs === null || orderedVs === void 0 ? void 0 : orderedVs.forEach(dfs);\n return layers;\n};\nexports.default = initOrder;\n//# sourceMappingURL=init-order.js.map","\"use strict\";\n/*\n * A function that takes a layering (an array of layers, each with an array of\n * ordererd nodes) and a graph and returns a weighted crossing count.\n *\n * Pre-conditions:\n *\n * 1. Input graph must be simple (not a multigraph), directed, and include\n * only simple edges.\n * 2. Edges in the input graph must have assigned weights.\n *\n * Post-conditions:\n *\n * 1. The graph and layering matrix are left unchanged.\n *\n * This algorithm is derived from Barth, et al., \"Bilayer Cross Counting.\"\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar twoLayerCrossCount = function (g, northLayer, southLayer) {\n // Sort all of the edges between the north and south layers by their position\n // in the north layer and then the south. Map these edges to the position of\n // their head in the south layer.\n var southPos = (0, util_1.zipObject)(southLayer, southLayer.map(function (v, i) { return i; }));\n var unflat = northLayer.map(function (v) {\n var _a;\n var unsort = (_a = g.outEdges(v)) === null || _a === void 0 ? void 0 : _a.map(function (e) {\n return { pos: southPos[e.w] || 0, weight: g.edge(e).weight };\n });\n return unsort === null || unsort === void 0 ? void 0 : unsort.sort(function (a, b) { return a.pos - b.pos; });\n });\n var southEntries = unflat.flat().filter(function (entry) { return entry !== undefined; });\n // Build the accumulator tree\n var firstIndex = 1;\n while (firstIndex < southLayer.length)\n firstIndex <<= 1;\n var treeSize = 2 * firstIndex - 1;\n firstIndex -= 1;\n var tree = Array(treeSize).fill(0, 0, treeSize);\n // Calculate the weighted crossings\n var cc = 0;\n southEntries === null || southEntries === void 0 ? void 0 : southEntries.forEach(function (entry) {\n if (entry) {\n var index = entry.pos + firstIndex;\n tree[index] += entry.weight;\n var weightSum = 0;\n while (index > 0) {\n if (index % 2) {\n weightSum += tree[index + 1];\n }\n index = (index - 1) >> 1;\n tree[index] += entry.weight;\n }\n cc += entry.weight * weightSum;\n }\n });\n return cc;\n};\nvar crossCount = function (g, layering) {\n var cc = 0;\n for (var i = 1; i < (layering === null || layering === void 0 ? void 0 : layering.length); i += 1) {\n cc += twoLayerCrossCount(g, layering[i - 1], layering[i]);\n }\n return cc;\n};\nexports.default = crossCount;\n//# sourceMappingURL=cross-count.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graph_1 = require(\"../../graph\");\n/*\n * Constructs a graph that can be used to sort a layer of nodes. The graph will\n * contain all base and subgraph nodes from the request layer in their original\n * hierarchy and any edges that are incident on these nodes and are of the type\n * requested by the \"relationship\" parameter.\n *\n * Nodes from the requested rank that do not have parents are assigned a root\n * node in the output graph, which is set in the root graph attribute. This\n * makes it easy to walk the hierarchy of movable nodes during ordering.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG\n * 2. Base nodes in the input graph have a rank attribute\n * 3. Subgraph nodes in the input graph has minRank and maxRank attributes\n * 4. Edges have an assigned weight\n *\n * Post-conditions:\n *\n * 1. Output graph has all nodes in the movable rank with preserved\n * hierarchy.\n * 2. Root nodes in the movable layer are made children of the node\n * indicated by the root attribute of the graph.\n * 3. Non-movable nodes incident on movable nodes, selected by the\n * relationship parameter, are included in the graph (without hierarchy).\n * 4. Edges incident on movable nodes, selected by the relationship\n * parameter, are added to the output graph.\n * 5. The weights for copied edges are aggregated as need, since the output\n * graph is not a multi-graph.\n */\nvar buildLayerGraph = function (g, rank, relationship) {\n var root = createRootNode(g);\n var result = new graph_1.Graph({ compound: true })\n .setGraph({ root: root })\n .setDefaultNodeLabel(function (v) {\n return g.node(v);\n });\n g.nodes().forEach(function (v) {\n var _a;\n var node = g.node(v);\n var parent = g.parent(v);\n if (node.rank === rank ||\n (node.minRank <= rank && rank <= node.maxRank)) {\n result.setNode(v);\n result.setParent(v, parent || root);\n // This assumes we have only short edges!\n (_a = g[relationship](v)) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var u = e.v === v ? e.w : e.v;\n var edge = result.edgeFromArgs(u, v);\n var weight = edge !== undefined ? edge.weight : 0;\n result.setEdge(u, v, { weight: g.edge(e).weight + weight });\n });\n if (node.hasOwnProperty(\"minRank\")) {\n result.setNode(v, {\n borderLeft: node.borderLeft[rank],\n borderRight: node.borderRight[rank],\n });\n }\n }\n });\n return result;\n};\nvar createRootNode = function (g) {\n var v;\n while (g.hasNode((v = \"_root\".concat(Math.random()))))\n ;\n return v;\n};\nexports.default = buildLayerGraph;\n//# sourceMappingURL=build-layer-graph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar addSubgraphConstraints = function (g, cg, vs) {\n var prev = {};\n var rootPrev;\n vs === null || vs === void 0 ? void 0 : vs.forEach(function (v) {\n var child = g.parent(v);\n var parent;\n var prevChild;\n while (child) {\n parent = g.parent(child);\n if (parent) {\n prevChild = prev[parent];\n prev[parent] = child;\n }\n else {\n prevChild = rootPrev;\n rootPrev = child;\n }\n if (prevChild && prevChild !== child) {\n cg.setEdge(prevChild, child);\n return;\n }\n child = parent;\n }\n });\n};\nexports.default = addSubgraphConstraints;\n//# sourceMappingURL=add-subgraph-constraints.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar barycenter = function (g, movable) {\n return movable.map(function (v) {\n var inV = g.inEdges(v);\n if (!(inV === null || inV === void 0 ? void 0 : inV.length)) {\n return { v: v };\n }\n {\n var result_1 = { sum: 0, weight: 0 };\n inV === null || inV === void 0 ? void 0 : inV.forEach(function (e) {\n var edge = g.edge(e);\n var nodeU = g.node(e.v);\n result_1.sum += (edge.weight * nodeU.order);\n result_1.weight += edge.weight;\n });\n return {\n v: v,\n barycenter: result_1.sum / result_1.weight,\n weight: result_1.weight\n };\n }\n });\n};\nexports.default = barycenter;\n//# sourceMappingURL=barycenter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar resolveConflicts = function (entries, cg) {\n var _a, _b, _c;\n var mappedEntries = {};\n entries === null || entries === void 0 ? void 0 : entries.forEach(function (entry, i) {\n mappedEntries[entry.v] = {\n i: i,\n indegree: 0,\n in: [],\n out: [],\n vs: [entry.v],\n };\n var tmp = mappedEntries[entry.v];\n if (entry.barycenter !== undefined) {\n tmp.barycenter = entry.barycenter;\n tmp.weight = entry.weight;\n }\n });\n (_a = cg.edges()) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var entryV = mappedEntries[e.v];\n var entryW = mappedEntries[e.w];\n if (entryV !== undefined && entryW !== undefined) {\n entryW.indegree++;\n entryV.out.push(mappedEntries[e.w]);\n }\n });\n var sourceSet = (_c = (_b = Object.values(mappedEntries)).filter) === null || _c === void 0 ? void 0 : _c.call(_b, function (entry) { return !entry.indegree; });\n return doResolveConflicts(sourceSet);\n};\nvar doResolveConflicts = function (sourceSet) {\n var _a, _b;\n var entries = [];\n var handleIn = function (vEntry) {\n return function (uEntry) {\n if (uEntry.merged)\n return;\n if (uEntry.barycenter === undefined ||\n vEntry.barycenter === undefined ||\n uEntry.barycenter >= vEntry.barycenter) {\n mergeEntries(vEntry, uEntry);\n }\n };\n };\n var handleOut = function (vEntry) {\n return function (wEntry) {\n wEntry[\"in\"].push(vEntry);\n if (--wEntry.indegree === 0) {\n sourceSet.push(wEntry);\n }\n };\n };\n var _loop_1 = function () {\n var entry = sourceSet.pop();\n entries.push(entry);\n (_a = entry[\"in\"].reverse()) === null || _a === void 0 ? void 0 : _a.forEach(function (e) { return handleIn(entry)(e); });\n (_b = entry.out) === null || _b === void 0 ? void 0 : _b.forEach(function (e) { return handleOut(entry)(e); });\n };\n while (sourceSet === null || sourceSet === void 0 ? void 0 : sourceSet.length) {\n _loop_1();\n }\n var filtered = entries.filter(function (entry) { return !entry.merged; });\n var keys = [\n \"vs\",\n \"i\",\n \"barycenter\",\n \"weight\",\n ];\n return filtered.map(function (entry) {\n var picked = {};\n keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {\n if (entry[key] === undefined)\n return;\n picked[key] = entry[key];\n });\n return picked;\n });\n};\nvar mergeEntries = function (target, source) {\n var _a;\n var sum = 0;\n var weight = 0;\n if (target.weight) {\n sum += target.barycenter * target.weight;\n weight += target.weight;\n }\n if (source.weight) {\n sum += source.barycenter * source.weight;\n weight += source.weight;\n }\n target.vs = (_a = source.vs) === null || _a === void 0 ? void 0 : _a.concat(target.vs);\n target.barycenter = sum / weight;\n target.weight = weight;\n target.i = Math.min(source.i, target.i);\n source.merged = true;\n};\nexports.default = resolveConflicts;\n//# sourceMappingURL=resolve-conflicts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar sort = function (entries, biasRight, usePrev, keepNodeOrder) {\n var parts = (0, util_1.partition)(entries, function (entry) {\n var hasFixOrder = entry.hasOwnProperty(\"fixorder\") && !isNaN(entry.fixorder);\n if (keepNodeOrder)\n return !hasFixOrder && entry.hasOwnProperty(\"barycenter\");\n // NOTE: 有fixorder的也可以排\n return hasFixOrder || entry.hasOwnProperty(\"barycenter\");\n });\n var sortable = parts.lhs;\n var unsortable = parts.rhs.sort(function (a, b) { return -a.i - (-b.i); });\n var vs = [];\n var sum = 0;\n var weight = 0;\n var vsIndex = 0;\n sortable === null || sortable === void 0 ? void 0 : sortable.sort(compareWithBias(!!biasRight, !!usePrev));\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n sortable === null || sortable === void 0 ? void 0 : sortable.forEach(function (entry) {\n var _a;\n vsIndex += (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.length;\n vs.push(entry.vs);\n sum += entry.barycenter * entry.weight;\n weight += entry.weight;\n vsIndex = consumeUnsortable(vs, unsortable, vsIndex);\n });\n var result = { vs: vs.flat() };\n if (weight) {\n result.barycenter = sum / weight;\n result.weight = weight;\n }\n return result;\n};\nvar consumeUnsortable = function (vs, unsortable, index) {\n var iindex = index;\n var last;\n while (unsortable.length && (last = unsortable[unsortable.length - 1]).i <= iindex) {\n unsortable.pop();\n vs === null || vs === void 0 ? void 0 : vs.push(last.vs);\n iindex++;\n }\n return iindex;\n};\n/**\n * 配置是否考虑使用之前的布局结果\n */\nvar compareWithBias = function (bias, usePrev) {\n return function (entryV, entryW) {\n // 排序的时候先判断fixorder,不行再判断重心\n if (entryV.fixorder !== undefined && entryW.fixorder !== undefined) {\n return entryV.fixorder - entryW.fixorder;\n }\n if (entryV.barycenter < entryW.barycenter) {\n return -1;\n }\n if (entryV.barycenter > entryW.barycenter) {\n return 1;\n }\n // 重心相同,考虑之前排好的顺序\n if (usePrev && entryV.order !== undefined && entryW.order !== undefined) {\n if (entryV.order < entryW.order) {\n return -1;\n }\n if (entryV.order > entryW.order) {\n return 1;\n }\n }\n return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;\n };\n};\nexports.default = sort;\n//# sourceMappingURL=sort.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar barycenter_1 = __importDefault(require(\"./barycenter\"));\nvar resolve_conflicts_1 = __importDefault(require(\"./resolve-conflicts\"));\nvar sort_1 = __importDefault(require(\"./sort\"));\nvar sortSubgraph = function (g, v, cg, biasRight, usePrev, keepNodeOrder) {\n var _a, _b, _c, _d;\n var movable = g.children(v);\n // fixorder的点不参与排序(这个方案不合适,只排了新增节点,和原来的分离)\n var node = g.node(v);\n var bl = node ? node.borderLeft : undefined;\n var br = node ? node.borderRight : undefined;\n var subgraphs = {};\n if (bl) {\n movable = movable === null || movable === void 0 ? void 0 : movable.filter(function (w) {\n return w !== bl && w !== br;\n });\n }\n var barycenters = (0, barycenter_1.default)(g, movable || []);\n barycenters === null || barycenters === void 0 ? void 0 : barycenters.forEach(function (entry) {\n var _a;\n if ((_a = g.children(entry.v)) === null || _a === void 0 ? void 0 : _a.length) {\n var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight, keepNodeOrder);\n subgraphs[entry.v] = subgraphResult;\n if (subgraphResult.hasOwnProperty(\"barycenter\")) {\n mergeBarycenters(entry, subgraphResult);\n }\n }\n });\n var entries = (0, resolve_conflicts_1.default)(barycenters, cg);\n expandSubgraphs(entries, subgraphs);\n // 添加fixorder信息到entries里边\n // TODO: 不考虑复合情况,只用第一个点的fixorder信息,后续考虑更完备的实现\n (_a = entries\n .filter(function (e) { return e.vs.length > 0; })) === null || _a === void 0 ? void 0 : _a.forEach(function (e) {\n var node = g.node(e.vs[0]);\n if (node) {\n e.fixorder = node.fixorder;\n e.order = node.order;\n }\n });\n var result = (0, sort_1.default)(entries, biasRight, usePrev, keepNodeOrder);\n if (bl) {\n result.vs = [bl, result.vs, br].flat();\n if ((_b = g.predecessors(bl)) === null || _b === void 0 ? void 0 : _b.length) {\n var blPred = g.node(((_c = g.predecessors(bl)) === null || _c === void 0 ? void 0 : _c[0]) || \"\");\n var brPred = g.node(((_d = g.predecessors(br)) === null || _d === void 0 ? void 0 : _d[0]) || \"\");\n if (!result.hasOwnProperty(\"barycenter\")) {\n result.barycenter = 0;\n result.weight = 0;\n }\n result.barycenter =\n (result.barycenter * result.weight +\n blPred.order +\n brPred.order) /\n (result.weight + 2);\n result.weight += 2;\n }\n }\n return result;\n};\nvar expandSubgraphs = function (entries, subgraphs) {\n entries === null || entries === void 0 ? void 0 : entries.forEach(function (entry) {\n var _a;\n var vss = (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.map(function (v) {\n if (subgraphs[v]) {\n return subgraphs[v].vs;\n }\n return v;\n });\n entry.vs = vss.flat();\n });\n};\nvar mergeBarycenters = function (target, other) {\n if (target.barycenter !== undefined) {\n target.barycenter =\n (target.barycenter * target.weight + other.barycenter * other.weight) /\n (target.weight + other.weight);\n target.weight += other.weight;\n }\n else {\n target.barycenter = other.barycenter;\n target.weight = other.weight;\n }\n};\nexports.default = sortSubgraph;\n//# sourceMappingURL=sort-subgraph.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar init_order_1 = __importDefault(require(\"./init-order\"));\nvar cross_count_1 = __importDefault(require(\"./cross-count\"));\nvar build_layer_graph_1 = __importDefault(require(\"./build-layer-graph\"));\nvar add_subgraph_constraints_1 = __importDefault(require(\"./add-subgraph-constraints\"));\nvar sort_subgraph_1 = __importDefault(require(\"./sort-subgraph\"));\nvar util_1 = require(\"../../../../util\");\nvar graph_1 = require(\"../../graph\");\nvar util_2 = require(\"../util\");\n/*\n * Applies heuristics to minimize edge crossings in the graph and sets the best\n * order solution as an order attribute on each node.\n *\n * Pre-conditions:\n *\n * 1. Graph must be DAG\n * 2. Graph nodes must be objects with a \"rank\" attribute\n * 3. Graph edges must have the \"weight\" attribute\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have an \"order\" attribute based on the results of the\n * algorithm.\n */\nvar order = function (g, keepNodeOrder) {\n var mxRank = (0, util_2.maxRank)(g);\n var range1 = [];\n var range2 = [];\n for (var i = 1; i < mxRank + 1; i++)\n range1.push(i);\n for (var i = mxRank - 1; i > -1; i--)\n range2.push(i);\n var downLayerGraphs = buildLayerGraphs(g, range1, \"inEdges\");\n var upLayerGraphs = buildLayerGraphs(g, range2, \"outEdges\");\n var layering = (0, init_order_1.default)(g);\n assignOrder(g, layering);\n var bestCC = Number.POSITIVE_INFINITY;\n var best;\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2, false, keepNodeOrder);\n layering = (0, util_2.buildLayerMatrix)(g);\n var cc = (0, cross_count_1.default)(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = (0, util_1.clone)(layering);\n bestCC = cc;\n }\n }\n // consider use previous result, maybe somewhat reduendant\n layering = (0, init_order_1.default)(g);\n assignOrder(g, layering);\n for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {\n sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2, true, keepNodeOrder);\n layering = (0, util_2.buildLayerMatrix)(g);\n var cc = (0, cross_count_1.default)(g, layering);\n if (cc < bestCC) {\n lastBest = 0;\n best = (0, util_1.clone)(layering);\n bestCC = cc;\n }\n }\n assignOrder(g, best);\n};\nvar buildLayerGraphs = function (g, ranks, relationship) {\n return ranks.map(function (rank) {\n return (0, build_layer_graph_1.default)(g, rank, relationship);\n });\n};\nvar sweepLayerGraphs = function (layerGraphs, biasRight, usePrev, keepNodeOrder) {\n var cg = new graph_1.Graph();\n layerGraphs === null || layerGraphs === void 0 ? void 0 : layerGraphs.forEach(function (lg) {\n var _a;\n var root = lg.graph().root;\n var sorted = (0, sort_subgraph_1.default)(lg, root, cg, biasRight, usePrev, keepNodeOrder);\n for (var i = 0; i < ((_a = sorted.vs) === null || _a === void 0 ? void 0 : _a.length) || 0; i++) {\n var lnode = lg.node(sorted.vs[i]);\n if (lnode) {\n lnode.order = i;\n }\n }\n (0, add_subgraph_constraints_1.default)(lg, cg, sorted.vs);\n });\n};\nvar assignOrder = function (g, layering) {\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n g.node(v).order = i;\n });\n });\n};\nexports.default = order;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.width = exports.sep = exports.positionX = exports.balance = exports.alignCoordinates = exports.findSmallestWidthAlignment = exports.buildBlockGraph = exports.horizontalCompaction = exports.verticalAlignment = exports.hasConflict = exports.addConflict = exports.findOtherInnerSegmentNode = exports.findType2Conflicts = exports.findType1Conflicts = void 0;\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\nvar graphlib_1 = require(\"@antv/graphlib\");\nvar util_1 = require(\"@antv/util\");\nvar util_2 = require(\"../util\");\nvar BlockGraph = /** @class */ (function (_super) {\n __extends(BlockGraph, _super);\n function BlockGraph() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return BlockGraph;\n}(graphlib_1.Graph));\nvar findType1Conflicts = function (g, layering) {\n var conflicts = {};\n var visitLayer = function (prevLayer, layer) {\n // last visited node in the previous layer that is incident on an inner\n // segment.\n var k0 = 0;\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n var scanPos = 0;\n var prevLayerLength = prevLayer.length;\n var lastNode = layer === null || layer === void 0 ? void 0 : layer[(layer === null || layer === void 0 ? void 0 : layer.length) - 1];\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n var _a;\n var w = (0, exports.findOtherInnerSegmentNode)(g, v);\n var k1 = w ? g.node(w).order : prevLayerLength;\n if (w || v === lastNode) {\n (_a = layer.slice(scanPos, i + 1)) === null || _a === void 0 ? void 0 : _a.forEach(function (scanNode) {\n var _a;\n (_a = g.predecessors(scanNode)) === null || _a === void 0 ? void 0 : _a.forEach(function (u) {\n var _a;\n var uLabel = g.node(u);\n var uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) &&\n !(uLabel.dummy && ((_a = g.node(scanNode)) === null || _a === void 0 ? void 0 : _a.dummy))) {\n (0, exports.addConflict)(conflicts, u, scanNode);\n }\n });\n });\n scanPos = i + 1;\n k0 = k1;\n }\n });\n return layer;\n };\n if (layering === null || layering === void 0 ? void 0 : layering.length) {\n layering.reduce(visitLayer);\n }\n return conflicts;\n};\nexports.findType1Conflicts = findType1Conflicts;\nvar findType2Conflicts = function (g, layering) {\n var conflicts = {};\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var _a, _b;\n var v;\n for (var i = southPos; i < southEnd; i++) {\n v = south[i];\n if ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) {\n (_b = g.predecessors(v)) === null || _b === void 0 ? void 0 : _b.forEach(function (u) {\n var uNode = g.node(u);\n if (uNode.dummy &&\n (uNode.order < prevNorthBorder ||\n uNode.order > nextNorthBorder)) {\n (0, exports.addConflict)(conflicts, u, v);\n }\n });\n }\n }\n }\n ;\n function getScannedKey(params) {\n // south数组可能很大,不适合做key\n return JSON.stringify(params.slice(1));\n }\n function scanIfNeeded(params, scanCache) {\n var cacheKey = getScannedKey(params);\n if (scanCache.get(cacheKey))\n return;\n scan.apply(void 0, params);\n scanCache.set(cacheKey, true);\n }\n var visitLayer = function (north, south) {\n var prevNorthPos = -1;\n var nextNorthPos;\n var southPos = 0;\n var scanned = new Map();\n south === null || south === void 0 ? void 0 : south.forEach(function (v, southLookahead) {\n var _a;\n if (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) === \"border\") {\n var predecessors = g.predecessors(v) || [];\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scanIfNeeded([south, southPos, southLookahead, prevNorthPos, nextNorthPos], scanned);\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scanIfNeeded([south, southPos, south.length, nextNorthPos, north.length], scanned);\n });\n return south;\n };\n if (layering === null || layering === void 0 ? void 0 : layering.length) {\n layering.reduce(visitLayer);\n }\n return conflicts;\n};\nexports.findType2Conflicts = findType2Conflicts;\nvar findOtherInnerSegmentNode = function (g, v) {\n var _a, _b;\n if ((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) {\n return (_b = g.predecessors(v)) === null || _b === void 0 ? void 0 : _b.find(function (u) { return g.node(u).dummy; });\n }\n};\nexports.findOtherInnerSegmentNode = findOtherInnerSegmentNode;\nvar addConflict = function (conflicts, v, w) {\n var vv = v;\n var ww = w;\n if (vv > ww) {\n var tmp = vv;\n vv = ww;\n ww = tmp;\n }\n var conflictsV = conflicts[vv];\n if (!conflictsV) {\n conflicts[vv] = conflictsV = {};\n }\n conflictsV[ww] = true;\n};\nexports.addConflict = addConflict;\nvar hasConflict = function (conflicts, v, w) {\n var vv = v;\n var ww = w;\n if (vv > ww) {\n var tmp = v;\n vv = ww;\n ww = tmp;\n }\n return !!conflicts[vv];\n};\nexports.hasConflict = hasConflict;\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nvar verticalAlignment = function (g, layering, conflicts, neighborFn) {\n var root = {};\n var align = {};\n var pos = {};\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var prevIdx = -1;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = ws.sort(function (a, b) { return pos[a] - pos[b]; });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v &&\n prevIdx < pos[w] &&\n !(0, exports.hasConflict)(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n return { root: root, align: align };\n};\nexports.verticalAlignment = verticalAlignment;\nvar horizontalCompaction = function (g, layering, root, align, reverseSep) {\n var _a;\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {};\n var blockG = (0, exports.buildBlockGraph)(g, layering, root, reverseSep);\n var borderType = reverseSep ? \"borderLeft\" : \"borderRight\";\n var iterate = function (setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n }\n else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n elem = stack.pop();\n }\n };\n // First pass, assign smallest coordinates\n var pass1 = function (elem) {\n xs[elem] = (blockG.inEdges(elem) || []).reduce(function (acc, e) {\n return Math.max(acc, (xs[e.v] || 0) + blockG.edge(e));\n }, 0);\n };\n // Second pass, assign greatest coordinates\n var pass2 = function (elem) {\n var min = (blockG.outEdges(elem) || []).reduce(function (acc, e) {\n return Math.min(acc, (xs[e.w] || 0) - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n };\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n // Assign x coordinates to all nodes\n (_a = Object.values(align)) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n xs[v] = xs[root[v]];\n });\n return xs;\n};\nexports.horizontalCompaction = horizontalCompaction;\nvar buildBlockGraph = function (g, layering, root, reverseSep) {\n var blockGraph = new BlockGraph();\n var graphLabel = g.graph();\n var sepFn = (0, exports.sep)(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var u;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u];\n var prevMax = blockGraph.edgeFromArgs(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n return blockGraph;\n};\nexports.buildBlockGraph = buildBlockGraph;\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nvar findSmallestWidthAlignment = function (g, xss) {\n return (0, util_2.minBy)(Object.values(xss), function (xs) {\n var _a;\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n (_a = Object.keys(xs)) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {\n var x = xs[v];\n var halfWidth = (0, exports.width)(g, v) / 2;\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n return max - min;\n });\n};\nexports.findSmallestWidthAlignment = findSmallestWidthAlignment;\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = Object.values(alignTo);\n var alignToMin = (0, util_1.min)(alignToVals);\n var alignToMax = (0, util_1.max)(alignToVals);\n [\"u\", \"d\"].forEach(function (vert) {\n [\"l\", \"r\"].forEach(function (horiz) {\n var alignment = vert + horiz;\n var xs = xss[alignment];\n var delta;\n if (xs === alignTo)\n return;\n var xsVals = Object.values(xs);\n delta =\n horiz === \"l\"\n ? alignToMin - (0, util_1.min)(xsVals)\n : alignToMax - (0, util_1.max)(xsVals);\n if (delta) {\n xss[alignment] = {};\n Object.keys(xs).forEach(function (key) {\n xss[alignment][key] = xs[key] + delta;\n });\n }\n });\n });\n}\nexports.alignCoordinates = alignCoordinates;\nvar balance = function (xss, align) {\n var result = {};\n Object.keys(xss.ul).forEach(function (key) {\n if (align) {\n result[key] = xss[align.toLowerCase()][key];\n }\n else {\n var values = Object.values(xss).map(function (x) { return x[key]; });\n result[key] = (values[0] + values[1]) / 2; // (ur + ul) / 2\n }\n });\n return result;\n};\nexports.balance = balance;\nvar positionX = function (g) {\n var layering = (0, util_2.buildLayerMatrix)(g);\n var conflicts = Object.assign((0, exports.findType1Conflicts)(g, layering), (0, exports.findType2Conflicts)(g, layering));\n var xss = {};\n var adjustedLayering;\n [\"u\", \"d\"].forEach(function (vert) {\n adjustedLayering =\n vert === \"u\" ? layering : Object.values(layering).reverse();\n [\"l\", \"r\"].forEach(function (horiz) {\n if (horiz === \"r\") {\n adjustedLayering = adjustedLayering.map(function (inner) {\n return Object.values(inner).reverse();\n });\n }\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = (0, exports.verticalAlignment)(g, adjustedLayering, conflicts, neighborFn);\n var xs = (0, exports.horizontalCompaction)(g, adjustedLayering, align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n Object.keys(xs).forEach(function (key) {\n xs[key] = -xs[key];\n });\n }\n xss[vert + horiz] = xs;\n });\n });\n var smallestWidth = (0, exports.findSmallestWidthAlignment)(g, xss);\n alignCoordinates(xss, smallestWidth);\n return (0, exports.balance)(xss, g.graph().align);\n};\nexports.positionX = positionX;\nvar sep = function (nodeSep, edgeSep, reverseSep) {\n return function (g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n sum += vLabel.width / 2;\n if (vLabel.hasOwnProperty(\"labelpos\")) {\n switch ((vLabel.labelpos || \"\").toLowerCase()) {\n case \"l\":\n delta = -vLabel.width / 2;\n break;\n case \"r\":\n delta = vLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += wLabel.width / 2;\n if (wLabel.labelpos) {\n switch ((wLabel.labelpos || \"\").toLowerCase()) {\n case \"l\":\n delta = wLabel.width / 2;\n break;\n case \"r\":\n delta = -wLabel.width / 2;\n break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n return sum;\n };\n};\nexports.sep = sep;\nvar width = function (g, v) { return g.node(v).width || 0; };\nexports.width = width;\n//# sourceMappingURL=bk.js.map","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nvar bk_1 = require(\"./bk\");\nvar positionY = function (g) {\n var layering = (0, util_1.buildLayerMatrix)(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n layering === null || layering === void 0 ? void 0 : layering.forEach(function (layer) {\n var heights = layer.map(function (v) { return g.node(v).height; });\n var maxHeight = Math.max.apply(Math, __spreadArray(__spreadArray([], heights, false), [0], false));\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n};\nvar positionX = function (g) {\n var layering = (0, util_1.buildLayerMatrix)(g);\n var conflicts = Object.assign((0, bk_1.findType1Conflicts)(g, layering), (0, bk_1.findType2Conflicts)(g, layering));\n var xss = {};\n var adjustedLayering = [];\n [\"u\", \"d\"].forEach(function (vert) {\n adjustedLayering =\n vert === \"u\" ? layering : Object.values(layering).reverse();\n [\"l\", \"r\"].forEach(function (horiz) {\n if (horiz === \"r\") {\n adjustedLayering = adjustedLayering.map(function (inner) {\n return Object.values(inner).reverse();\n });\n }\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = (0, bk_1.verticalAlignment)(g, adjustedLayering, conflicts, neighborFn);\n var xs = (0, bk_1.horizontalCompaction)(g, adjustedLayering, align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n Object.keys(xs).forEach(function (xsKey) { return (xs[xsKey] = -xs[xsKey]); });\n }\n xss[vert + horiz] = xs;\n });\n });\n var smallestWidth = (0, bk_1.findSmallestWidthAlignment)(g, xss);\n smallestWidth && (0, bk_1.alignCoordinates)(xss, smallestWidth);\n return (0, bk_1.balance)(xss, g.graph().align);\n};\nvar position = function (g) {\n var _a;\n var ng = (0, util_1.asNonCompoundGraph)(g);\n positionY(ng);\n var xs = positionX(ng);\n (_a = Object.keys(xs)) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {\n ng.node(key).x = xs[key];\n });\n};\nexports.default = position;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * 按照数据中的结果设置fixorder\n */\nvar initDataOrder = function (g, nodeOrder) {\n var simpleNodes = g.nodes().filter(function (v) {\n var _a;\n return !((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length);\n });\n var ranks = simpleNodes.map(function (v) { return g.node(v).rank; });\n var maxRank = Math.max.apply(Math, ranks);\n var layers = [];\n for (var i = 0; i < maxRank + 1; i++) {\n layers[i] = [];\n }\n nodeOrder === null || nodeOrder === void 0 ? void 0 : nodeOrder.forEach(function (n) {\n var node = g.node(n);\n // 只考虑原有节点,dummy节点需要按照后续算法排出\n if (!node || (node === null || node === void 0 ? void 0 : node.dummy)) {\n return;\n }\n if (!isNaN(node.rank)) {\n node.fixorder = layers[node.rank].length; // 设置fixorder为当层的顺序\n layers[node.rank].push(n);\n }\n });\n};\nexports.default = initDataOrder;\n//# sourceMappingURL=init-data-order.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar acyclic_1 = __importDefault(require(\"./acyclic\"));\nvar normalize_1 = __importDefault(require(\"./normalize\"));\nvar rank_1 = __importDefault(require(\"./rank\"));\nvar util_1 = require(\"./util\");\nvar parent_dummy_chains_1 = __importDefault(require(\"./parent-dummy-chains\"));\nvar nesting_graph_1 = __importDefault(require(\"./nesting-graph\"));\nvar add_border_segments_1 = __importDefault(require(\"./add-border-segments\"));\nvar coordinate_system_1 = __importDefault(require(\"./coordinate-system\"));\nvar order_1 = __importDefault(require(\"./order\"));\nvar position_1 = __importDefault(require(\"./position\"));\nvar init_data_order_1 = __importDefault(require(\"./order/init-data-order\"));\nvar graph_1 = require(\"../graph\");\nvar layout = function (g, opts) {\n var time = opts && opts.debugTiming ? util_1.time : util_1.notime;\n time(\"layout\", function () {\n // 如果在原图基础上修改,继承原图的order结果\n if (opts && !opts.keepNodeOrder && opts.prevGraph) {\n time(\" inheritOrder\", function () {\n inheritOrder(g, opts.prevGraph);\n });\n }\n var layoutGraph = time(\" buildLayoutGraph\", function () {\n return buildLayoutGraph(g);\n });\n // 控制是否为边的label留位置(这会影响是否在边中间添加dummy node)\n if (!(opts && opts.edgeLabelSpace === false)) {\n time(\" makeSpaceForEdgeLabels\", function () {\n makeSpaceForEdgeLabels(layoutGraph);\n });\n }\n // TODO: 暂时处理层级设置不正确时的异常报错,提示设置正确的层级\n try {\n time(\" runLayout\", function () {\n runLayout(layoutGraph, time, opts);\n });\n }\n catch (e) {\n if (e.message ===\n \"Not possible to find intersection inside of the rectangle\") {\n console.error(\"The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:\\n\", e);\n return;\n }\n throw e;\n }\n time(\" updateInputGraph\", function () {\n updateInputGraph(g, layoutGraph);\n });\n });\n};\nvar runLayout = function (g, time, opts) {\n time(\" removeSelfEdges\", function () {\n removeSelfEdges(g);\n });\n time(\" acyclic\", function () {\n acyclic_1.default.run(g);\n });\n time(\" nestingGraph.run\", function () {\n nesting_graph_1.default.run(g);\n });\n time(\" rank\", function () {\n (0, rank_1.default)((0, util_1.asNonCompoundGraph)(g));\n });\n time(\" injectEdgeLabelProxies\", function () {\n injectEdgeLabelProxies(g);\n });\n time(\" removeEmptyRanks\", function () {\n (0, util_1.removeEmptyRanks)(g);\n });\n time(\" nestingGraph.cleanup\", function () {\n nesting_graph_1.default.cleanup(g);\n });\n time(\" normalizeRanks\", function () {\n (0, util_1.normalizeRanks)(g);\n });\n time(\" assignRankMinMax\", function () {\n assignRankMinMax(g);\n });\n time(\" removeEdgeLabelProxies\", function () {\n removeEdgeLabelProxies(g);\n });\n time(\" normalize.run\", function () {\n normalize_1.default.run(g);\n });\n time(\" parentDummyChains\", function () {\n (0, parent_dummy_chains_1.default)(g);\n });\n time(\" addBorderSegments\", function () {\n (0, add_border_segments_1.default)(g);\n });\n if (opts && opts.keepNodeOrder) {\n time(\" initDataOrder\", function () {\n (0, init_data_order_1.default)(g, opts.nodeOrder);\n });\n }\n time(\" order\", function () {\n (0, order_1.default)(g, opts === null || opts === void 0 ? void 0 : opts.keepNodeOrder);\n });\n time(\" insertSelfEdges\", function () {\n insertSelfEdges(g);\n });\n time(\" adjustCoordinateSystem\", function () {\n coordinate_system_1.default.adjust(g);\n });\n time(\" position\", function () {\n (0, position_1.default)(g);\n });\n time(\" positionSelfEdges\", function () {\n positionSelfEdges(g);\n });\n time(\" removeBorderNodes\", function () {\n removeBorderNodes(g);\n });\n time(\" normalize.undo\", function () {\n normalize_1.default.undo(g);\n });\n time(\" fixupEdgeLabelCoords\", function () {\n fixupEdgeLabelCoords(g);\n });\n time(\" undoCoordinateSystem\", function () {\n coordinate_system_1.default.undo(g);\n });\n time(\" translateGraph\", function () {\n translateGraph(g);\n });\n time(\" assignNodeIntersects\", function () {\n assignNodeIntersects(g);\n });\n time(\" reversePoints\", function () {\n reversePointsForReversedEdges(g);\n });\n time(\" acyclic.undo\", function () {\n acyclic_1.default.undo(g);\n });\n};\n/**\n * 继承上一个布局中的order,防止翻转\n * TODO: 暂时没有考虑涉及层级变动的布局,只保证原来布局层级和相对顺序不变\n */\nvar inheritOrder = function (currG, prevG) {\n currG.nodes().forEach(function (n) {\n var node = currG.node(n);\n var prevNode = prevG.node(n);\n if (prevNode !== undefined) {\n node.fixorder = prevNode._order;\n delete prevNode._order;\n }\n else {\n delete node.fixorder;\n }\n });\n};\n/*\n * Copies final layout information from the layout graph back to the input\n * graph. This process only copies whitelisted attributes from the layout graph\n * to the input graph, so it serves as a good place to determine what\n * attributes can influence layout.\n */\nvar updateInputGraph = function (inputGraph, layoutGraph) {\n inputGraph.nodes().forEach(function (v) {\n var _a;\n var inputLabel = inputGraph.node(v);\n if (inputLabel) {\n var layoutLabel = layoutGraph.node(v);\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n inputLabel._order = layoutLabel.order;\n inputLabel._rank = layoutLabel.rank;\n if ((_a = layoutGraph.children(v)) === null || _a === void 0 ? void 0 : _a.length) {\n inputLabel.width = layoutLabel.width;\n inputLabel.height = layoutLabel.height;\n }\n }\n });\n inputGraph.edges().forEach(function (e) {\n var inputLabel = inputGraph.edge(e);\n var layoutLabel = layoutGraph.edge(e);\n inputLabel.points = layoutLabel ? layoutLabel.points : [];\n if (layoutLabel && layoutLabel.hasOwnProperty(\"x\")) {\n inputLabel.x = layoutLabel.x;\n inputLabel.y = layoutLabel.y;\n }\n });\n inputGraph.graph().width = layoutGraph.graph().width;\n inputGraph.graph().height = layoutGraph.graph().height;\n};\nvar graphNumAttrs = [\"nodesep\", \"edgesep\", \"ranksep\", \"marginx\", \"marginy\"];\nvar graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: \"tb\" };\nvar graphAttrs = [\"acyclicer\", \"ranker\", \"rankdir\", \"align\"];\nvar nodeNumAttrs = [\"width\", \"height\", \"layer\", \"fixorder\"]; // 需要传入layer, fixOrder作为参数参考\nvar nodeDefaults = { width: 0, height: 0 };\nvar edgeNumAttrs = [\"minlen\", \"weight\", \"width\", \"height\", \"labeloffset\"];\nvar edgeDefaults = {\n minlen: 1,\n weight: 1,\n width: 0,\n height: 0,\n labeloffset: 10,\n labelpos: \"r\",\n};\nvar edgeAttrs = [\"labelpos\"];\n/*\n * Constructs a new graph from the input graph, which can be used for layout.\n * This process copies only whitelisted attributes from the input graph to the\n * layout graph. Thus this function serves as a good place to determine what\n * attributes can influence layout.\n */\nvar buildLayoutGraph = function (inputGraph) {\n var g = new graph_1.Graph({ multigraph: true, compound: true });\n var graph = canonicalize(inputGraph.graph());\n var pickedProperties = {};\n graphAttrs === null || graphAttrs === void 0 ? void 0 : graphAttrs.forEach(function (key) {\n if (graph[key] !== undefined)\n pickedProperties[key] = graph[key];\n });\n g.setGraph(Object.assign({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pickedProperties));\n inputGraph.nodes().forEach(function (v) {\n var node = canonicalize(inputGraph.node(v));\n var defaultNode = __assign(__assign({}, nodeDefaults), node);\n var defaultAttrs = selectNumberAttrs(defaultNode, nodeNumAttrs);\n g.setNode(v, defaultAttrs);\n g.setParent(v, inputGraph.parent(v));\n });\n inputGraph.edges().forEach(function (e) {\n var edge = canonicalize(inputGraph.edge(e));\n var pickedProperties = {};\n edgeAttrs === null || edgeAttrs === void 0 ? void 0 : edgeAttrs.forEach(function (key) {\n if (edge[key] !== undefined)\n pickedProperties[key] = edge[key];\n });\n g.setEdgeObj(e, Object.assign({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pickedProperties));\n });\n return g;\n};\n/*\n * This idea comes from the Gansner paper: to account for edge labels in our\n * layout we split each rank in half by doubling minlen and halving ranksep.\n * Then we can place labels at these mid-points between nodes.\n *\n * We also add some minimal padding to the width to push the label for the edge\n * away from the edge itself a bit.\n */\nvar makeSpaceForEdgeLabels = function (g) {\n var graph = g.graph();\n if (!graph.ranksep)\n graph.ranksep = 0;\n graph.ranksep /= 2;\n g.nodes().forEach(function (n) {\n var node = g.node(n);\n if (!isNaN(node.layer)) {\n if (!node.layer)\n node.layer = 0;\n }\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n edge.minlen *= 2;\n if (((_a = edge.labelpos) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== \"c\") {\n if (graph.rankdir === \"TB\" || graph.rankdir === \"BT\") {\n edge.width += edge.labeloffset;\n }\n else {\n edge.height += edge.labeloffset;\n }\n }\n });\n};\n/*\n * Creates temporary dummy nodes that capture the rank in which each edge's\n * label is going to, if it has one of non-zero width and height. We do this\n * so that we can safely remove empty ranks while preserving balance for the\n * label's position.\n */\nvar injectEdgeLabelProxies = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge.width && edge.height) {\n var v = g.node(e.v);\n var w = g.node(e.w);\n var label = {\n e: e,\n rank: (w.rank - v.rank) / 2 + v.rank,\n };\n (0, util_1.addDummyNode)(g, \"edge-proxy\", label, \"_ep\");\n }\n });\n};\nvar assignRankMinMax = function (g) {\n var maxRank = 0;\n g.nodes().forEach(function (v) {\n var _a, _b;\n var node = g.node(v);\n if (node.borderTop) {\n node.minRank = (_a = g.node(node.borderTop)) === null || _a === void 0 ? void 0 : _a.rank;\n node.maxRank = (_b = g.node(node.borderBottom)) === null || _b === void 0 ? void 0 : _b.rank;\n maxRank = Math.max(maxRank, node.maxRank || -Infinity);\n }\n });\n g.graph().maxRank = maxRank;\n};\nvar removeEdgeLabelProxies = function (g) {\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.dummy === \"edge-proxy\") {\n g.edge(node.e).labelRank = node.rank;\n g.removeNode(v);\n }\n });\n};\nvar translateGraph = function (g) {\n var minX;\n var maxX = 0;\n var minY;\n var maxY = 0;\n var graphLabel = g.graph();\n var marginX = graphLabel.marginx || 0;\n var marginY = graphLabel.marginy || 0;\n var getExtremes = function (attrs) {\n if (!attrs)\n return;\n var x = attrs.x;\n var y = attrs.y;\n var w = attrs.width;\n var h = attrs.height;\n if (!isNaN(x) && !isNaN(w)) {\n if (minX === undefined) {\n minX = x - w / 2;\n }\n minX = Math.min(minX, x - w / 2);\n maxX = Math.max(maxX, x + w / 2);\n }\n if (!isNaN(y) && !isNaN(h)) {\n if (minY === undefined) {\n minY = y - h / 2;\n }\n minY = Math.min(minY, y - h / 2);\n maxY = Math.max(maxY, y + h / 2);\n }\n };\n g.nodes().forEach(function (v) {\n getExtremes(g.node(v));\n });\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge === null || edge === void 0 ? void 0 : edge.hasOwnProperty(\"x\")) {\n getExtremes(edge);\n }\n });\n minX -= marginX;\n minY -= marginY;\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node) {\n node.x -= minX;\n node.y -= minY;\n }\n });\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.forEach(function (p) {\n p.x -= minX;\n p.y -= minY;\n });\n if (edge.hasOwnProperty(\"x\")) {\n edge.x -= minX;\n }\n if (edge.hasOwnProperty(\"y\")) {\n edge.y -= minY;\n }\n });\n graphLabel.width = maxX - minX + marginX;\n graphLabel.height = maxY - minY + marginY;\n};\nvar assignNodeIntersects = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n var nodeV = g.node(e.v);\n var nodeW = g.node(e.w);\n var p1;\n var p2;\n if (!edge.points) {\n edge.points = [];\n p1 = nodeW;\n p2 = nodeV;\n }\n else {\n p1 = edge.points[0];\n p2 = edge.points[edge.points.length - 1];\n }\n edge.points.unshift((0, util_1.intersectRect)(nodeV, p1));\n edge.points.push((0, util_1.intersectRect)(nodeW, p2));\n });\n};\nvar fixupEdgeLabelCoords = function (g) {\n g.edges().forEach(function (e) {\n var edge = g.edge(e);\n if (edge === null || edge === void 0 ? void 0 : edge.hasOwnProperty(\"x\")) {\n if (edge.labelpos === \"l\" || edge.labelpos === \"r\") {\n edge.width -= edge.labeloffset;\n }\n switch (edge.labelpos) {\n case \"l\":\n edge.x -= edge.width / 2 + edge.labeloffset;\n break;\n case \"r\":\n edge.x += edge.width / 2 + edge.labeloffset;\n break;\n }\n }\n });\n};\nvar reversePointsForReversedEdges = function (g) {\n g.edges().forEach(function (e) {\n var _a;\n var edge = g.edge(e);\n if (edge.reversed) {\n (_a = edge.points) === null || _a === void 0 ? void 0 : _a.reverse();\n }\n });\n};\nvar removeBorderNodes = function (g) {\n g.nodes().forEach(function (v) {\n var _a, _b, _c;\n if ((_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.length) {\n var node = g.node(v);\n var t = g.node(node.borderTop);\n var b = g.node(node.borderBottom);\n var l = g.node(node.borderLeft[((_b = node.borderLeft) === null || _b === void 0 ? void 0 : _b.length) - 1]);\n var r = g.node(node.borderRight[((_c = node.borderRight) === null || _c === void 0 ? void 0 : _c.length) - 1]);\n node.width = Math.abs((r === null || r === void 0 ? void 0 : r.x) - (l === null || l === void 0 ? void 0 : l.x)) || 10;\n node.height = Math.abs((b === null || b === void 0 ? void 0 : b.y) - (t === null || t === void 0 ? void 0 : t.y)) || 10;\n node.x = ((l === null || l === void 0 ? void 0 : l.x) || 0) + node.width / 2;\n node.y = ((t === null || t === void 0 ? void 0 : t.y) || 0) + node.height / 2;\n }\n });\n g.nodes().forEach(function (v) {\n var _a;\n if (((_a = g.node(v)) === null || _a === void 0 ? void 0 : _a.dummy) === \"border\") {\n g.removeNode(v);\n }\n });\n};\nvar removeSelfEdges = function (g) {\n g.edges().forEach(function (e) {\n if (e.v === e.w) {\n var node = g.node(e.v);\n if (!node.selfEdges) {\n node.selfEdges = [];\n }\n node.selfEdges.push({ e: e, label: g.edge(e) });\n g.removeEdgeObj(e);\n }\n });\n};\nvar insertSelfEdges = function (g) {\n var layers = (0, util_1.buildLayerMatrix)(g);\n layers === null || layers === void 0 ? void 0 : layers.forEach(function (layer) {\n var orderShift = 0;\n layer === null || layer === void 0 ? void 0 : layer.forEach(function (v, i) {\n var _a;\n var node = g.node(v);\n node.order = i + orderShift;\n (_a = node.selfEdges) === null || _a === void 0 ? void 0 : _a.forEach(function (selfEdge) {\n (0, util_1.addDummyNode)(g, \"selfedge\", {\n width: selfEdge.label.width,\n height: selfEdge.label.height,\n rank: node.rank,\n order: i + ++orderShift,\n e: selfEdge.e,\n label: selfEdge.label,\n }, \"_se\");\n });\n delete node.selfEdges;\n });\n });\n};\nvar positionSelfEdges = function (g) {\n g.nodes().forEach(function (v) {\n var node = g.node(v);\n if (node.dummy === \"selfedge\") {\n var selfNode = g.node(node.e.v);\n var x = selfNode.x + selfNode.width / 2;\n var y = selfNode.y;\n var dx = node.x - x;\n var dy = selfNode.height / 2;\n g.setEdgeObj(node.e, node.label);\n g.removeNode(v);\n node.label.points = [\n { x: x + (2 * dx) / 3, y: y - dy },\n { x: x + (5 * dx) / 6, y: y - dy },\n { y: y, x: x + dx },\n { x: x + (5 * dx) / 6, y: y + dy },\n { x: x + (2 * dx) / 3, y: y + dy },\n ];\n node.label.x = node.x;\n node.label.y = node.y;\n }\n });\n};\nvar selectNumberAttrs = function (obj, attrs) {\n var pickedProperties = {};\n attrs === null || attrs === void 0 ? void 0 : attrs.forEach(function (key) {\n if (obj[key] === undefined)\n return;\n pickedProperties[key] = (+obj[key]);\n });\n return pickedProperties;\n};\nvar canonicalize = function (attrs) {\n if (attrs === void 0) { attrs = {}; }\n var newAttrs = {};\n Object.keys(attrs).forEach(function (k) {\n newAttrs[k.toLowerCase()] = attrs[k];\n });\n return newAttrs;\n};\nexports.default = layout;\n//# sourceMappingURL=layout.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\nvar layout_1 = __importDefault(require(\"./src/layout\"));\nvar util_1 = require(\"./src/util\");\nexports.default = {\n layout: layout_1.default,\n util: {\n time: util_1.time,\n notime: util_1.notime\n },\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview dagre layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DagreLayout = void 0;\nvar index_1 = __importDefault(require(\"./dagre/index\"));\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\nvar graph_1 = require(\"./dagre/graph\");\n/**\n * 层次布局\n */\nvar DagreLayout = /** @class */ (function (_super) {\n __extends(DagreLayout, _super);\n function DagreLayout(options) {\n var _this = _super.call(this) || this;\n /** layout 方向, 可选 TB, BT, LR, RL */\n _this.rankdir = 'TB';\n /** 节点水平间距(px) */\n _this.nodesep = 50;\n /** 每一层节点之间间距 */\n _this.ranksep = 50;\n /** 是否保留布局连线的控制点 */\n _this.controlPoints = false;\n /** 每层节点是否根据节点数据中的 comboId 进行排序,以防止同层 combo 重叠 */\n _this.sortByCombo = false;\n /** 是否保留每条边上的dummy node */\n _this.edgeLabelSpace = true;\n /** 是否基于 dagre 进行辐射布局,若是,第一层节点将被放置在最内环上,其余层依次向外辐射 */\n _this.radial = false;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.layoutNode = function (nodeId) {\n var self = _this;\n var nodes = self.nodes;\n var node = nodes.find(function (node) { return node.id === nodeId; });\n if (node) {\n var layout = node.layout !== false;\n return layout;\n }\n return true;\n };\n _this.updateCfg(options);\n return _this;\n }\n DagreLayout.prototype.getDefaultCfg = function () {\n return {\n rankdir: 'TB',\n align: undefined,\n nodeSize: undefined,\n nodesepFunc: undefined,\n ranksepFunc: undefined,\n nodesep: 50,\n ranksep: 50,\n controlPoints: false,\n radial: false,\n focusNode: null, // radial 为 true 时生效,关注的节点\n };\n };\n /**\n * 执行布局\n */\n DagreLayout.prototype.execute = function () {\n var _this = this;\n var _a, _b, _c, _d;\n var self = this;\n var nodes = self.nodes, nodeSize = self.nodeSize, rankdir = self.rankdir, combos = self.combos, begin = self.begin, radial = self.radial, _e = self.comboEdges, comboEdges = _e === void 0 ? [] : _e, _f = self.vedges, vedges = _f === void 0 ? [] : _f;\n if (!nodes)\n return;\n var edges = self.edges || [];\n var g = new graph_1.Graph({\n multigraph: true,\n compound: true,\n });\n // collect the nodes in their combo, to create virtual edges for comboEdges\n self.nodeMap = {};\n var nodeComboMap = {};\n nodes.forEach(function (node) {\n self.nodeMap[node.id] = node;\n if (!node.comboId)\n return;\n nodeComboMap[node.comboId] = nodeComboMap[node.comboId] || [];\n nodeComboMap[node.comboId].push(node.id);\n });\n var sortedNodes = [];\n var visitedMap = {};\n if ((_a = self.nodeOrder) === null || _a === void 0 ? void 0 : _a.length) {\n self.nodeOrder.forEach(function (id) {\n visitedMap[id] = true;\n sortedNodes.push(self.nodeMap[id]);\n });\n nodes.forEach(function (node) {\n if (!visitedMap[node.id])\n sortedNodes.push(node);\n });\n }\n else {\n sortedNodes = nodes;\n }\n var nodeSizeFunc;\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n if ((0, util_1.isObject)(d.size)) {\n return [d.size.width || 40, d.size.height || 40];\n }\n return [d.size, d.size];\n }\n return [40, 40];\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function () { return nodeSize; };\n }\n else {\n nodeSizeFunc = function () { return [nodeSize, nodeSize]; };\n }\n var ranksepfunc = (0, util_1.getFunc)(self.ranksep, 50, self.ranksepFunc);\n var nodesepfunc = (0, util_1.getFunc)(self.nodesep, 50, self.nodesepFunc);\n var horisep = nodesepfunc;\n var vertisep = ranksepfunc;\n if (rankdir === 'LR' || rankdir === 'RL') {\n horisep = ranksepfunc;\n vertisep = nodesepfunc;\n }\n g.setDefaultEdgeLabel(function () { return ({}); });\n g.setGraph(self);\n var comboMap = {};\n if (this.sortByCombo && combos) {\n combos.forEach(function (combo) {\n comboMap[combo.id] = combo;\n // regard the collapsed combo as a node\n if (combo.collapsed) {\n var size = nodeSizeFunc(combo);\n var verti = vertisep(combo);\n var hori = horisep(combo);\n var width = size[0] + 2 * hori;\n var height = size[1] + 2 * verti;\n g.setNode(combo.id, { width: width, height: height });\n }\n if (!combo.parentId)\n return;\n if (!comboMap[combo.parentId]) {\n g.setNode(combo.parentId, {});\n }\n g.setParent(combo.id, combo.parentId);\n });\n }\n sortedNodes\n .filter(function (node) { return node.layout !== false; })\n .forEach(function (node) {\n var size = nodeSizeFunc(node);\n var verti = vertisep(node);\n var hori = horisep(node);\n var width = size[0] + 2 * hori;\n var height = size[1] + 2 * verti;\n var layer = node.layer;\n if ((0, util_1.isNumber)(layer)) {\n // 如果有layer属性,加入到node的label中\n g.setNode(node.id, { width: width, height: height, layer: layer });\n }\n else {\n g.setNode(node.id, { width: width, height: height });\n }\n if (_this.sortByCombo && node.comboId) {\n if (!comboMap[node.comboId]) {\n comboMap[node.comboId] = { id: node.comboId };\n g.setNode(node.comboId, {});\n }\n g.setParent(node.id, node.comboId);\n }\n });\n edges.forEach(function (edge) {\n // dagrejs Wiki https://github.com/dagrejs/dagre/wiki#configuring-the-layout\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n if (_this.layoutNode(source) && _this.layoutNode(target)) {\n g.setEdge(source, target, {\n weight: edge.weight || 1,\n });\n }\n });\n // create virtual edges from node to node for comboEdges\n (_b = comboEdges === null || comboEdges === void 0 ? void 0 : comboEdges.concat(vedges || [])) === null || _b === void 0 ? void 0 : _b.forEach(function (comboEdge) {\n var _a, _b;\n var source = comboEdge.source, target = comboEdge.target;\n var sources = ((_a = comboMap[source]) === null || _a === void 0 ? void 0 : _a.collapsed)\n ? [source]\n : nodeComboMap[source] || [source];\n var targets = ((_b = comboMap[target]) === null || _b === void 0 ? void 0 : _b.collapsed)\n ? [target]\n : nodeComboMap[target] || [target];\n sources.forEach(function (s) {\n targets.forEach(function (t) {\n g.setEdge(s, t, {\n weight: comboEdge.weight || 1,\n });\n });\n });\n });\n // 考虑增量图中的原始图\n var prevGraph = undefined;\n if ((_c = self.preset) === null || _c === void 0 ? void 0 : _c.nodes) {\n prevGraph = new graph_1.Graph({\n multigraph: true,\n compound: true,\n });\n self.preset.nodes.forEach(function (node) {\n prevGraph === null || prevGraph === void 0 ? void 0 : prevGraph.setNode(node.id, node);\n });\n }\n index_1.default.layout(g, {\n prevGraph: prevGraph,\n edgeLabelSpace: self.edgeLabelSpace,\n keepNodeOrder: Boolean(!!self.nodeOrder),\n nodeOrder: self.nodeOrder,\n });\n var dBegin = [0, 0];\n if (begin) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (minX_1 > coord.x)\n minX_1 = coord.x;\n if (minY_1 > coord.y)\n minY_1 = coord.y;\n });\n g.edges().forEach(function (edge) {\n var _a;\n var coord = g.edge(edge);\n (_a = coord.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) {\n if (minX_1 > point.x)\n minX_1 = point.x;\n if (minY_1 > point.y)\n minY_1 = point.y;\n });\n });\n dBegin[0] = begin[0] - minX_1;\n dBegin[1] = begin[1] - minY_1;\n }\n var isHorizontal = rankdir === 'LR' || rankdir === 'RL';\n // 变形为辐射\n if (radial) {\n var _g = this, focusNode = _g.focusNode, ranksep = _g.ranksep, getRadialPos_1 = _g.getRadialPos;\n var focusId = (0, util_1.isString)(focusNode) ? focusNode : focusNode === null || focusNode === void 0 ? void 0 : focusNode.id;\n var focusLayer_1 = focusId ? (_d = g.node(focusId)) === null || _d === void 0 ? void 0 : _d._rank : 0;\n var layers_1 = [];\n var dim_1 = isHorizontal ? 'y' : 'x';\n var sizeDim_1 = isHorizontal ? 'height' : 'width';\n // 找到整个图作为环的坐标维度(dim)的最大、最小值,考虑节点宽度\n var min_1 = Infinity;\n var max_1 = -Infinity;\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (!self.nodeMap[node])\n return;\n var currentNodesep = nodesepfunc(self.nodeMap[node]);\n if (focusLayer_1 === 0) {\n if (!layers_1[coord._rank]) {\n layers_1[coord._rank] = {\n nodes: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[coord._rank].nodes.push(node);\n layers_1[coord._rank].totalWidth += currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[coord._rank].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[coord._rank].maxSize = Math.max(coord.width, coord.height);\n }\n }\n else {\n var diffLayer = coord._rank - focusLayer_1;\n if (diffLayer === 0) {\n if (!layers_1[diffLayer]) {\n layers_1[diffLayer] = {\n nodes: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[diffLayer].nodes.push(node);\n layers_1[diffLayer].totalWidth += currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[diffLayer].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[diffLayer].maxSize = Math.max(coord.width, coord.height);\n }\n }\n else {\n var diffLayerAbs = Math.abs(diffLayer);\n if (!layers_1[diffLayerAbs]) {\n layers_1[diffLayerAbs] = {\n left: [],\n right: [],\n totalWidth: 0,\n maxSize: -Infinity,\n };\n }\n layers_1[diffLayerAbs].totalWidth +=\n currentNodesep * 2 + coord[sizeDim_1];\n if (layers_1[diffLayerAbs].maxSize < Math.max(coord.width, coord.height)) {\n layers_1[diffLayerAbs].maxSize = Math.max(coord.width, coord.height);\n }\n if (diffLayer < 0) {\n layers_1[diffLayerAbs].left.push(node);\n }\n else {\n layers_1[diffLayerAbs].right.push(node);\n }\n }\n }\n var leftPos = coord[dim_1] - coord[sizeDim_1] / 2 - currentNodesep;\n var rightPos = coord[dim_1] + coord[sizeDim_1] / 2 + currentNodesep;\n if (leftPos < min_1)\n min_1 = leftPos;\n if (rightPos > max_1)\n max_1 = rightPos;\n });\n // const padding = (max - min) * 0.1; // TODO\n // \b初始化为第一圈的半径,后面根据每层 ranksep 叠加\n var radius_1 = ranksep || 50; // TODO;\n var radiusMap_1 = {};\n // 扩大最大最小值范围,以便为环上留出接缝处的空隙\n var rangeLength_1 = (max_1 - min_1) / 0.9;\n var range_1 = [\n (min_1 + max_1 - rangeLength_1) * 0.5,\n (min_1 + max_1 + rangeLength_1) * 0.5,\n ];\n // 根据半径、分布比例,计算节点在环上的位置,并返回该组节点中最大的 ranksep 值\n var processNodes_1 = function (layerNodes, radius, propsMaxRanksep, arcRange) {\n if (propsMaxRanksep === void 0) { propsMaxRanksep = -Infinity; }\n if (arcRange === void 0) { arcRange = [0, 1]; }\n var maxRanksep = propsMaxRanksep;\n layerNodes.forEach(function (node) {\n var coord = g.node(node);\n radiusMap_1[node] = radius;\n // 获取变形为 radial 后的直角坐标系坐标\n var _a = getRadialPos_1(coord[dim_1], range_1, rangeLength_1, radius, arcRange), newX = _a.x, newY = _a.y;\n // 将新坐标写入源数据\n if (!self.nodeMap[node])\n return;\n self.nodeMap[node].x = newX + dBegin[0];\n self.nodeMap[node].y = newY + dBegin[1];\n // @ts-ignore: pass layer order to data for increment layout use\n self.nodeMap[node]._order = coord._order;\n // 找到本层最大的一个 ranksep,作为下一层与本层的间隙,叠加到下一层的半径上\n var currentNodeRanksep = ranksepfunc(self.nodeMap[node]);\n if (maxRanksep < currentNodeRanksep)\n maxRanksep = currentNodeRanksep;\n });\n return maxRanksep;\n };\n var isFirstLevel_1 = true;\n var lastLayerMaxNodeSize_1 = 0;\n layers_1.forEach(function (layerNodes) {\n var _a, _b, _c, _d, _e, _f, _g;\n if (!((_a = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.nodes) === null || _a === void 0 ? void 0 : _a.length) &&\n !((_b = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.left) === null || _b === void 0 ? void 0 : _b.length) &&\n !((_c = layerNodes === null || layerNodes === void 0 ? void 0 : layerNodes.right) === null || _c === void 0 ? void 0 : _c.length)) {\n return;\n }\n // 第一层只有一个节点,直接放在圆心,初始半径设定为 0\n if (isFirstLevel_1 && layerNodes.nodes.length === 1) {\n // 将新坐标写入源数据\n var nodeId = layerNodes.nodes[0];\n if (!self.nodeMap[nodeId])\n return;\n self.nodeMap[nodeId].x = dBegin[0];\n self.nodeMap[nodeId].y = dBegin[1];\n radiusMap_1[layerNodes.nodes[0]] = 0;\n radius_1 = ranksepfunc(self.nodeMap[nodeId]);\n isFirstLevel_1 = false;\n return;\n }\n // 为接缝留出空隙,半径也需要扩大\n radius_1 = Math.max(radius_1, layerNodes.totalWidth / (2 * Math.PI)); // / 0.9;\n var maxRanksep = -Infinity;\n if (focusLayer_1 === 0 || ((_d = layerNodes.nodes) === null || _d === void 0 ? void 0 : _d.length)) {\n maxRanksep = processNodes_1(layerNodes.nodes, radius_1, maxRanksep, [0, 1]); // 0.8\n }\n else {\n var leftRatio = ((_e = layerNodes.left) === null || _e === void 0 ? void 0 : _e.length) /\n (((_f = layerNodes.left) === null || _f === void 0 ? void 0 : _f.length) + ((_g = layerNodes.right) === null || _g === void 0 ? void 0 : _g.length));\n maxRanksep = processNodes_1(layerNodes.left, radius_1, maxRanksep, [\n 0,\n leftRatio,\n ]); // 接缝留出 0.05 的缝隙\n maxRanksep = processNodes_1(layerNodes.right, radius_1, maxRanksep, [\n leftRatio + 0.05,\n 1,\n ]); // 接缝留出 0.05 的缝隙\n }\n radius_1 += maxRanksep;\n isFirstLevel_1 = false;\n lastLayerMaxNodeSize_1 - layerNodes.maxSize;\n });\n g.edges().forEach(function (edge) {\n var _a, _b, _c;\n var coord = g.edge(edge);\n var i = edges.findIndex(function (it) {\n var source = (0, util_1.getEdgeTerminal)(it, 'source');\n var target = (0, util_1.getEdgeTerminal)(it, 'target');\n return source === edge.v && target === edge.w;\n });\n if (i <= -1)\n return;\n if (self.edgeLabelSpace &&\n self.controlPoints &&\n edges[i].type !== 'loop') {\n var otherDim_1 = dim_1 === 'x' ? 'y' : 'x';\n var controlPoints = (_a = coord === null || coord === void 0 ? void 0 : coord.points) === null || _a === void 0 ? void 0 : _a.slice(1, coord.points.length - 1);\n var newControlPoints_1 = [];\n var sourceOtherDimValue_1 = (_b = g.node(edge.v)) === null || _b === void 0 ? void 0 : _b[otherDim_1];\n var otherDimDist_1 = sourceOtherDimValue_1 - ((_c = g.node(edge.w)) === null || _c === void 0 ? void 0 : _c[otherDim_1]);\n var sourceRadius_1 = radiusMap_1[edge.v];\n var radiusDist_1 = sourceRadius_1 - radiusMap_1[edge.w];\n controlPoints === null || controlPoints === void 0 ? void 0 : controlPoints.forEach(function (point) {\n // 根据该边的起点、终点半径,及起点、终点、控制点位置关系,确定该控制点的半径\n var cRadius = ((point[otherDim_1] - sourceOtherDimValue_1) / otherDimDist_1) *\n radiusDist_1 +\n sourceRadius_1;\n // 获取变形为 radial 后的直角坐标系坐标\n var newPos = getRadialPos_1(point[dim_1], range_1, rangeLength_1, cRadius);\n newControlPoints_1.push({\n x: newPos.x + dBegin[0],\n y: newPos.y + dBegin[1],\n });\n });\n edges[i].controlPoints = newControlPoints_1;\n }\n });\n }\n else {\n var layerCoords_1 = new Set();\n var isInvert = rankdir === 'BT' || rankdir === 'RL';\n var layerCoordSort = isInvert\n ? function (a, b) { return b - a; }\n : function (a, b) { return a - b; };\n g.nodes().forEach(function (node) {\n var coord = g.node(node);\n if (!coord)\n return;\n var ndata = _this.nodeMap[node];\n if (!ndata) {\n ndata = combos === null || combos === void 0 ? void 0 : combos.find(function (it) { return it.id === node; });\n }\n if (!ndata)\n return;\n ndata.x = coord.x + dBegin[0];\n ndata.y = coord.y + dBegin[1];\n // @ts-ignore: pass layer order to data for increment layout use\n ndata._order = coord._order;\n layerCoords_1.add(isHorizontal ? ndata.x : ndata.y);\n });\n var layerCoordsArr_1 = Array.from(layerCoords_1).sort(layerCoordSort);\n // pre-define the isHorizontal related functions to avoid redundant calc in interations\n var isDifferentLayer_1 = isHorizontal\n ? function (point1, point2) { return point1.x !== point2.x; }\n : function (point1, point2) { return point1.y !== point2.y; };\n var filterControlPointsOutOfBoundary_1 = isHorizontal\n ? function (ps, point1, point2) {\n var max = Math.max(point1.y, point2.y);\n var min = Math.min(point1.y, point2.y);\n return ps.filter(function (point) { return point.y <= max && point.y >= min; });\n }\n : function (ps, point1, point2) {\n var max = Math.max(point1.x, point2.x);\n var min = Math.min(point1.x, point2.x);\n return ps.filter(function (point) { return point.x <= max && point.x >= min; });\n };\n g.edges().forEach(function (edge) {\n var _a;\n var coord = g.edge(edge);\n var i = edges.findIndex(function (it) {\n var source = (0, util_1.getEdgeTerminal)(it, 'source');\n var target = (0, util_1.getEdgeTerminal)(it, 'target');\n return source === edge.v && target === edge.w;\n });\n if (i <= -1)\n return;\n if (self.edgeLabelSpace &&\n self.controlPoints &&\n edges[i].type !== 'loop') {\n (_a = coord === null || coord === void 0 ? void 0 : coord.points) === null || _a === void 0 ? void 0 : _a.forEach(function (point) {\n point.x += dBegin[0];\n point.y += dBegin[1];\n });\n var sourceNode = self.nodeMap[edge.v];\n var targetNode = self.nodeMap[edge.w];\n edges[i].controlPoints = getControlPoints(coord === null || coord === void 0 ? void 0 : coord.points, sourceNode, targetNode, layerCoordsArr_1, isHorizontal, isDifferentLayer_1, filterControlPointsOutOfBoundary_1);\n }\n });\n }\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges,\n };\n };\n DagreLayout.prototype.getRadialPos = function (dimValue, range, rangeLength, radius, arcRange) {\n if (arcRange === void 0) { arcRange = [0, 1]; }\n // dimRatio 占圆弧的比例\n var dimRatio = (dimValue - range[0]) / rangeLength;\n // 再进一步归一化到指定的范围上\n dimRatio = dimRatio * (arcRange[1] - arcRange[0]) + arcRange[0];\n // 使用最终归一化后的范围计算角度\n var angle = dimRatio * 2 * Math.PI; // 弧度\n // 将极坐标系转换为直角坐标系\n return {\n x: Math.cos(angle) * radius,\n y: Math.sin(angle) * radius,\n };\n };\n DagreLayout.prototype.getType = function () {\n return 'dagre';\n };\n return DagreLayout;\n}(base_1.Base));\nexports.DagreLayout = DagreLayout;\n/**\n * Format controlPoints to avoid polylines crossing nodes\n * @param points\n * @param sourceNode\n * @param targetNode\n * @param layerCoordsArr\n * @param isHorizontal\n * @returns\n */\nvar getControlPoints = function (points, sourceNode, targetNode, layerCoordsArr, isHorizontal, isDifferentLayer, filterControlPointsOutOfBoundary) {\n var controlPoints = (points === null || points === void 0 ? void 0 : points.slice(1, points.length - 1)) || []; // 去掉头尾\n // 酌情增加控制点,使折线不穿过跨层的节点\n if (sourceNode && targetNode) {\n var sourceX = sourceNode.x, sourceY = sourceNode.y;\n var targetX = targetNode.x, targetY = targetNode.y;\n if (isHorizontal) {\n sourceX = sourceNode.y;\n sourceY = sourceNode.x;\n targetX = targetNode.y;\n targetY = targetNode.x;\n }\n // 为跨层级的边增加第一个控制点。忽略垂直的/横向的边。\n // 新控制点 = {\n // x: 终点x,\n // y: (起点y + 下一层y) / 2, #下一层y可能不等于终点y\n // }\n if (targetY !== sourceY && sourceX !== targetX) {\n var sourceLayer = layerCoordsArr.indexOf(sourceY);\n var sourceNextLayerCoord = layerCoordsArr[sourceLayer + 1];\n if (sourceNextLayerCoord) {\n var firstControlPoint = controlPoints[0];\n var insertStartControlPoint = isHorizontal\n ? {\n x: (sourceY + sourceNextLayerCoord) / 2,\n y: (firstControlPoint === null || firstControlPoint === void 0 ? void 0 : firstControlPoint.y) || targetX,\n }\n : {\n x: (firstControlPoint === null || firstControlPoint === void 0 ? void 0 : firstControlPoint.x) || targetX,\n y: (sourceY + sourceNextLayerCoord) / 2,\n };\n // 当新增的控制点不存在(!=当前第一个控制点)时添加\n if (!firstControlPoint ||\n isDifferentLayer(firstControlPoint, insertStartControlPoint)) {\n controlPoints.unshift(insertStartControlPoint);\n }\n }\n var targetLayer = layerCoordsArr.indexOf(targetY);\n var layerDiff = Math.abs(targetLayer - sourceLayer);\n if (layerDiff === 1) {\n controlPoints = filterControlPointsOutOfBoundary(controlPoints, sourceNode, targetNode);\n // one controlPoint at least\n if (!controlPoints.length) {\n controlPoints.push(isHorizontal\n ? {\n x: (sourceY + targetY) / 2,\n y: sourceX,\n }\n : {\n x: sourceX,\n y: (sourceY + targetY) / 2,\n });\n }\n }\n else if (layerDiff > 1) {\n var targetLastLayerCoord = layerCoordsArr[targetLayer - 1];\n if (targetLastLayerCoord) {\n var lastControlPoints = controlPoints[controlPoints.length - 1];\n var insertEndControlPoint = isHorizontal\n ? {\n x: (targetY + targetLastLayerCoord) / 2,\n y: (lastControlPoints === null || lastControlPoints === void 0 ? void 0 : lastControlPoints.y) || targetX,\n }\n : {\n x: (lastControlPoints === null || lastControlPoints === void 0 ? void 0 : lastControlPoints.x) || sourceX,\n y: (targetY + targetLastLayerCoord) / 2,\n };\n // 当新增的控制点不存在(!=当前最后一个控制点)时添加\n if (!lastControlPoints ||\n isDifferentLayer(lastControlPoints, insertEndControlPoint)) {\n controlPoints.push(insertEndControlPoint);\n }\n }\n }\n }\n }\n return controlPoints;\n};\n//# sourceMappingURL=dagre.js.map","const e={graph:{meta:{rankDir:\"TB\",nodeSep:50,rankSep:50,edgeSep:5,align:void 0}},subScene:{meta:{paddingTop:20,paddingBottom:20,paddingLeft:20,paddingRight:20,labelHeight:20}},nodeSize:{meta:{width:100,maxLabelWidth:0,height:20},node:{width:80,height:20,labelOffset:10,maxLabelWidth:40},bridge:{width:5,height:5,radius:2,labelOffset:0}}};function n(n={},t=e){var r,o,i,a;const u=JSON.parse(JSON.stringify(t)),c=(null===(r=null==n?void 0:n.graph)||void 0===r?void 0:r.meta)||{},s=(null===(o=null==n?void 0:n.subScene)||void 0===o?void 0:o.meta)||{},d=(null===(i=null==n?void 0:n.nodeSize)||void 0===i?void 0:i.meta)||{},f=(null===(a=null==n?void 0:n.nodeSize)||void 0===a?void 0:a.node)||{},h=u.nodeSize.bridge;return{graph:{meta:Object.assign(u.graph.meta,c)},subScene:{meta:Object.assign(u.subScene.meta,s)},nodeSize:{meta:Object.assign(u.nodeSize.meta,d),node:Object.assign(u.nodeSize.node,f),bridge:h}}}function t(e){return`◬${e}◬`}const r=t(\"ROOT\"),o=t(\"BRIDGE_GRAPH\");var i,a,u,c;!function(e){e[e.META=0]=\"META\",e[e.NODE=1]=\"NODE\",e[e.BRIDGE=2]=\"BRIDGE\"}(i||(i={})),function(e){e[e.INCLUDE=0]=\"INCLUDE\",e[e.EXCLUDE=1]=\"EXCLUDE\",e[e.UNSPECIFIED=2]=\"UNSPECIFIED\"}(a||(a={})),function(e){e[e.META=0]=\"META\",e[e.CORE=1]=\"CORE\",e[e.BRIDGE=2]=\"BRIDGE\"}(u||(u={})),function(e){e[e.META=0]=\"META\",e[e.OP=1]=\"OP\",e[e.SERIES=2]=\"SERIES\"}(c||(c={}));var s=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function d(e,n){return e(n={exports:{}},n.exports),n.exports}var f=function(){this.__data__=[],this.size=0};var h=function(e,n){return e===n||e!=e&&n!=n};var l=function(e,n){for(var t=e.length;t--;)if(h(e[t][0],n))return t;return-1},v=Array.prototype.splice;var p=function(e){var n=this.__data__,t=l(n,e);return!(t<0)&&(t==n.length-1?n.pop():v.call(n,t,1),--this.size,!0)};var g=function(e){var n=this.__data__,t=l(n,e);return t<0?void 0:n[t][1]};var y=function(e){return l(this.__data__,e)>-1};var b=function(e,n){var t=this.__data__,r=l(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function m(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Ve={};Ve[\"[object Float32Array]\"]=Ve[\"[object Float64Array]\"]=Ve[\"[object Int8Array]\"]=Ve[\"[object Int16Array]\"]=Ve[\"[object Int32Array]\"]=Ve[\"[object Uint8Array]\"]=Ve[\"[object Uint8ClampedArray]\"]=Ve[\"[object Uint16Array]\"]=Ve[\"[object Uint32Array]\"]=!0,Ve[\"[object Arguments]\"]=Ve[\"[object Array]\"]=Ve[\"[object ArrayBuffer]\"]=Ve[\"[object Boolean]\"]=Ve[\"[object DataView]\"]=Ve[\"[object Date]\"]=Ve[\"[object Error]\"]=Ve[\"[object Function]\"]=Ve[\"[object Map]\"]=Ve[\"[object Number]\"]=Ve[\"[object Object]\"]=Ve[\"[object RegExp]\"]=Ve[\"[object Set]\"]=Ve[\"[object String]\"]=Ve[\"[object WeakMap]\"]=!1;var $e=function(e){return Ce(e)&&Ue(e.length)&&!!Ve[T(e)]};var He=function(e){return function(n){return e(n)}},We=d((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,o=r&&r.exports===t&&N.process,i=function(){try{var e=r&&r.require&&r.require(\"util\").types;return e||o&&o.binding&&o.binding(\"util\")}catch(e){}}();e.exports=i})),qe=We&&We.isTypedArray,Ye=qe?He(qe):$e,Je=Object.prototype.hasOwnProperty;var Xe=function(e,n){var t=Te(e),r=!t&&Re(e),o=!t&&!r&&Pe(e),i=!t&&!r&&!o&&Ye(e),a=t||r||o||i,u=a?Me(e.length,String):[],c=u.length;for(var s in e)!n&&!Je.call(e,s)||a&&(\"length\"==s||o&&(\"offset\"==s||\"parent\"==s)||i&&(\"buffer\"==s||\"byteLength\"==s||\"byteOffset\"==s)||Fe(s,c))||u.push(s);return u},Ke=Object.prototype;var Qe=function(e){var n=e&&e.constructor;return e===(\"function\"==typeof n&&n.prototype||Ke)};var Ze=function(e,n){return function(t){return e(n(t))}},en=Ze(Object.keys,Object),nn=Object.prototype.hasOwnProperty;var tn=function(e){if(!Qe(e))return en(e);var n=[];for(var t in Object(e))nn.call(e,t)&&\"constructor\"!=t&&n.push(t);return n};var rn=function(e){return null!=e&&Ue(e.length)&&!z(e)};var on=function(e){return rn(e)?Xe(e):tn(e)};var an=function(e,n){return e&&Se(n,on(n),e)};var un=function(e){var n=[];if(null!=e)for(var t in Object(e))n.push(t);return n},cn=Object.prototype.hasOwnProperty;var sn=function(e){if(!D(e))return un(e);var n=Qe(e),t=[];for(var r in e)(\"constructor\"!=r||!n&&cn.call(e,r))&&t.push(r);return t};var dn=function(e){return rn(e)?Xe(e,!0):sn(e)};var fn=function(e,n){return e&&Se(n,dn(n),e)},hn=d((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,o=r&&r.exports===t?k.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,n){if(n)return e.slice();var t=e.length,r=i?i(t):new e.constructor(t);return e.copy(r),r}}));var ln=function(e,n){var t=-1,r=e.length;for(n||(n=Array(r));++tu))return!1;var s=i.get(e),d=i.get(n);if(s&&d)return s==n&&d==e;var f=-1,h=!0,l=2&t?new wt:void 0;for(i.set(e,n),i.set(n,e);++f0&&r(c)?t>1?e(c,t-1,r,o,i):wn(i,c):o||(i[i.length]=c)}return i};var $r=function(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)},Hr=Math.max;var Wr=function(e,n,t){return n=Hr(void 0===n?e.length-1:n,0),function(){for(var r=arguments,o=-1,i=Hr(r.length-n,0),a=Array(i);++o0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}(qr);var Xr=function(e,n){return Jr(Wr(e,n,ht),e+\"\")};var Kr=function(e,n,t,r){for(var o=e.length,i=t+(r?1:-1);r?i--:++i-1};var to=function(e,n,t){for(var r=-1,o=null==e?0:e.length;++r=200){var s=n?null:oo(e);if(s)return Nt(s);a=!1,o=_t,c=new wt}else c=n?[]:u;e:for(;++ri){var a=o;o=i,i=a}return o+\"\u0001\"+i+\"\u0001\"+(ho.isUndefined(r)?\"\\0\":r)}function bo(e,n,t,r){var o=\"\"+n,i=\"\"+t;if(!e&&o>i){var a=o;o=i,i=a}var u={v:o,w:i};return r&&(u.name=r),u}function mo(e,n){return yo(e,n.v,n.w,n.name)}vo.prototype._nodeCount=0,vo.prototype._edgeCount=0,vo.prototype.isDirected=function(){return this._isDirected},vo.prototype.isMultigraph=function(){return this._isMultigraph},vo.prototype.isCompound=function(){return this._isCompound},vo.prototype.setGraph=function(e){return this._label=e,this},vo.prototype.graph=function(){return this._label},vo.prototype.setDefaultNodeLabel=function(e){return ho.isFunction(e)||(e=ho.constant(e)),this._defaultNodeLabelFn=e,this},vo.prototype.nodeCount=function(){return this._nodeCount},vo.prototype.nodes=function(){return ho.keys(this._nodes)},vo.prototype.sources=function(){var e=this;return ho.filter(this.nodes(),(function(n){return ho.isEmpty(e._in[n])}))},vo.prototype.sinks=function(){var e=this;return ho.filter(this.nodes(),(function(n){return ho.isEmpty(e._out[n])}))},vo.prototype.setNodes=function(e,n){var t=arguments,r=this;return ho.each(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this},vo.prototype.setNode=function(e,n){return ho.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=\"\\0\",this._children[e]={},this._children[\"\\0\"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},vo.prototype.node=function(e){return this._nodes[e]},vo.prototype.hasNode=function(e){return ho.has(this._nodes,e)},vo.prototype.removeNode=function(e){var n=this;if(ho.has(this._nodes,e)){var t=function(e){n.removeEdge(n._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],ho.each(this.children(e),(function(e){n.setParent(e)})),delete this._children[e]),ho.each(ho.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ho.each(ho.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},vo.prototype.setParent=function(e,n){if(!this._isCompound)throw new Error(\"Cannot set parent in a non-compound graph\");if(ho.isUndefined(n))n=\"\\0\";else{for(var t=n+=\"\";!ho.isUndefined(t);t=this.parent(t))if(t===e)throw new Error(\"Setting \"+n+\" as parent of \"+e+\" would create a cycle\");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this},vo.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},vo.prototype.parent=function(e){if(this._isCompound){var n=this._parent[e];if(\"\\0\"!==n)return n}},vo.prototype.children=function(e){if(ho.isUndefined(e)&&(e=\"\\0\"),this._isCompound){var n=this._children[e];if(n)return ho.keys(n)}else{if(\"\\0\"===e)return this.nodes();if(this.hasNode(e))return[]}},vo.prototype.predecessors=function(e){var n=this._preds[e];if(n)return ho.keys(n)},vo.prototype.successors=function(e){var n=this._sucs[e];if(n)return ho.keys(n)},vo.prototype.neighbors=function(e){var n=this.predecessors(e);if(n)return ho.union(n,this.successors(e))},vo.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},vo.prototype.filterNodes=function(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;ho.each(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),ho.each(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&ho.each(n.nodes(),(function(e){n.setParent(e,o(e))})),n},vo.prototype.setDefaultEdgeLabel=function(e){return ho.isFunction(e)||(e=ho.constant(e)),this._defaultEdgeLabelFn=e,this},vo.prototype.edgeCount=function(){return this._edgeCount},vo.prototype.edges=function(){return ho.values(this._edgeObjs)},vo.prototype.setPath=function(e,n){var t=this,r=arguments;return ho.reduce(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this},vo.prototype.setEdge=function(){var e,n,t,r,o=!1,i=arguments[0];\"object\"==typeof i&&null!==i&&\"v\"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=\"\"+e,n=\"\"+n,ho.isUndefined(t)||(t=\"\"+t);var a=yo(this._isDirected,e,n,t);if(ho.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=r),this;if(!ho.isUndefined(t)&&!this._isMultigraph)throw new Error(\"Cannot set a named edge when isMultigraph = false\");this.setNode(e),this.setNode(n),this._edgeLabels[a]=o?r:this._defaultEdgeLabelFn(e,n,t);var u=bo(this._isDirected,e,n,t);return e=u.v,n=u.w,Object.freeze(u),this._edgeObjs[a]=u,po(this._preds[n],e),po(this._sucs[e],n),this._in[n][a]=u,this._out[e][a]=u,this._edgeCount++,this},vo.prototype.edge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t);return this._edgeLabels[r]},vo.prototype.hasEdge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t);return ho.has(this._edgeLabels,r)},vo.prototype.removeEdge=function(e,n,t){var r=1===arguments.length?mo(this._isDirected,arguments[0]):yo(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],go(this._preds[n],e),go(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this},vo.prototype.inEdges=function(e,n){var t=this._in[e];if(t){var r=ho.values(t);return n?ho.filter(r,(function(e){return e.v===n})):r}},vo.prototype.outEdges=function(e,n){var t=this._out[e];if(t){var r=ho.values(t);return n?ho.filter(r,(function(e){return e.w===n})):r}},vo.prototype.nodeEdges=function(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))};var wo={Graph:lo,version:\"2.1.8\"},Eo={write:function(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:_o(e),edges:jo(e)};ho.isUndefined(e.graph())||(n.value=ho.clone(e.graph()));return n},read:function(e){var n=new lo(e.options).setGraph(e.value);return ho.each(e.nodes,(function(e){n.setNode(e.v,e.value),e.parent&&n.setParent(e.v,e.parent)})),ho.each(e.edges,(function(e){n.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),n}};function _o(e){return ho.map(e.nodes(),(function(n){var t=e.node(n),r=e.parent(n),o={v:n};return ho.isUndefined(t)||(o.value=t),ho.isUndefined(r)||(o.parent=r),o}))}function jo(e){return ho.map(e.edges(),(function(n){var t=e.edge(n),r={v:n.v,w:n.w};return ho.isUndefined(n.name)||(r.name=n.name),ho.isUndefined(t)||(r.value=t),r}))}var xo=function(e){var n,t={},r=[];function o(r){ho.has(t,r)||(t[r]=!0,n.push(r),ho.each(e.successors(r),o),ho.each(e.predecessors(r),o))}return ho.each(e.nodes(),(function(e){n=[],o(e),n.length&&r.push(n)})),r};var No=Oo;function Oo(){this._arr=[],this._keyIndices={}}Oo.prototype.size=function(){return this._arr.length},Oo.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},Oo.prototype.has=function(e){return ho.has(this._keyIndices,e)},Oo.prototype.priority=function(e){var n=this._keyIndices[e];if(void 0!==n)return this._arr[n].priority},Oo.prototype.min=function(){if(0===this.size())throw new Error(\"Queue underflow\");return this._arr[0].key},Oo.prototype.add=function(e,n){var t=this._keyIndices;if(e=String(e),!ho.has(t,e)){var r=this._arr,o=r.length;return t[e]=o,r.push({key:e,priority:n}),this._decrease(o),!0}return!1},Oo.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},Oo.prototype.decrease=function(e,n){var t=this._keyIndices[e];if(n>this._arr[t].priority)throw new Error(\"New priority is greater than current priority. Key: \"+e+\" Old: \"+this._arr[t].priority+\" New: \"+n);this._arr[t].priority=n,this._decrease(t)},Oo.prototype._heapify=function(e){var n=this._arr,t=2*e,r=t+1,o=e;t>1].priority0&&(o=u.removeMin(),(i=a[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return a}(e,String(n),t||Io,r||function(n){return e.outEdges(n)})},Io=ho.constant(1);var So=function(e,n,t){return ho.transform(e.nodes(),(function(r,o){r[o]=ko(e,o,n,t)}),{})};var Mo=function(e){var n=0,t=[],r={},o=[];function i(a){var u=r[a]={onStack:!0,lowlink:n,index:n++};if(t.push(a),e.successors(a).forEach((function(e){ho.has(r,e)?r[e].onStack&&(u.lowlink=Math.min(u.lowlink,r[e].index)):(i(e),u.lowlink=Math.min(u.lowlink,r[e].lowlink))})),u.lowlink===u.index){var c,s=[];do{c=t.pop(),r[c].onStack=!1,s.push(c)}while(a!==c);o.push(s)}}return e.nodes().forEach((function(e){ho.has(r,e)||i(e)})),o};var Co=function(e){return ho.filter(Mo(e),(function(n){return n.length>1||1===n.length&&e.hasEdge(n[0],n[0])}))};var Go=function(e,n,t){return function(e,n,t){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(n){e!==n&&(r[e][n]={distance:Number.POSITIVE_INFINITY})})),t(e).forEach((function(t){var o=t.v===e?t.w:t.v,i=n(t);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var n=r[e];o.forEach((function(t){var i=r[t];o.forEach((function(t){var r=i[e],o=n[t],a=i[t],u=r.distance+o.distance;u0;){if(t=i.removeMin(),ho.has(o,t))r.setEdge(t,o[t]);else{if(u)throw new Error(\"Input graph is not connected: \"+e);u=!0}e.nodeEdges(t).forEach(a)}return r},tarjan:Mo,topsort:Ao},version:wo.version};try{Po=zo}catch(e){}Po||(Po=window.graphlib);var Fo=Po;var Uo=function(e){return at(e,5)};var Vo=function(e,n,t){if(!D(t))return!1;var r=typeof n;return!!(\"number\"==r?rn(t)&&Fe(n,t.length):\"string\"==r&&n in t)&&h(t[n],e)},$o=Object.prototype,Ho=$o.hasOwnProperty,Wo=Xr((function(e,n){e=Object(e);var t=-1,r=n.length,o=r>2?n[2]:void 0;for(o&&Vo(n[0],n[1],o)&&(r=1);++t-1?o[i?n[a]:a]:void 0}},Yo=/^\\s+|\\s+$/g,Jo=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,Ko=/^0o[0-7]+$/i,Qo=parseInt;var Zo=function(e){if(\"number\"==typeof e)return e;if(Pt(e))return NaN;if(D(e)){var n=\"function\"==typeof e.valueOf?e.valueOf():e;e=D(n)?n+\"\":n}if(\"string\"!=typeof e)return 0===e?e:+e;e=e.replace(Yo,\"\");var t=Xo.test(e);return t||Ko.test(e)?Qo(e.slice(2),t?2:8):Jo.test(e)?NaN:+e};var ei=function(e){return e?Infinity===(e=Zo(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var ni=function(e){var n=ei(e),t=n%1;return n==n?t?n-t:n:0},ti=Math.max;var ri=qo((function(e,n,t){var r=null==e?0:e.length;if(!r)return-1;var o=null==t?0:ni(t);return o<0&&(o=ti(r+o,0)),Kr(e,dr(n),o)}));var oi=function(e){return(null==e?0:e.length)?Vr(e,1):[]};var ii=function(e,n){return null==e?e:st(e,lt(n),dn)};var ai=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var ui=function(e,n){var t={};return n=dr(n),dt(e,(function(e,r,o){Oe(t,r,n(e,r,o))})),t};var ci=function(e,n,t){for(var r=-1,o=e.length;++rn};var di=function(e){return e&&e.length?ci(e,ht,si):void 0};var fi=function(e,n,t){(void 0!==t&&!h(e[n],t)||void 0===t&&!(n in e))&&Oe(e,n,t)},hi=Function.prototype,li=Object.prototype,vi=hi.toString,pi=li.hasOwnProperty,gi=vi.call(Object);var yi=function(e){if(!Ce(e)||\"[object Object]\"!=T(e))return!1;var n=En(e);if(null===n)return!0;var t=pi.call(n,\"constructor\")&&n.constructor;return\"function\"==typeof t&&t instanceof t&&vi.call(t)==gi};var bi=function(e,n){if((\"constructor\"!==n||\"function\"!=typeof e[n])&&\"__proto__\"!=n)return e[n]};var mi=function(e){return Se(e,dn(e))};var wi=function(e,n,t,r,o,i,a){var u=bi(e,t),c=bi(n,t),s=a.get(c);if(s)fi(e,t,s);else{var d=i?i(u,c,t+\"\",e,n,a):void 0,f=void 0===d;if(f){var h=Te(c),l=!h&&Pe(c),v=!h&&!l&&Ye(c);d=c,h||l||v?Te(u)?d=u:ao(u)?d=ln(u):l?(f=!1,d=hn(c,!0)):v?(f=!1,d=Yn(c,!0)):d=[]:yi(c)||Re(c)?(d=u,Re(u)?d=mi(u):D(u)&&!z(u)||(d=Qn(c))):f=!1}f&&(a.set(c,d),o(d,c,r,i,a),a.delete(c)),fi(e,t,d)}};var Ei=function e(n,t,r,o,i){n!==t&&st(t,(function(a,u){if(i||(i=new je),D(a))wi(n,t,u,r,e,o,i);else{var c=o?o(bi(n,u),a,u+\"\",n,t,i):void 0;void 0===c&&(c=a),fi(n,u,c)}}),dn)};var _i=function(e){return Xr((function(n,t){var r=-1,o=t.length,i=o>1?t[o-1]:void 0,a=o>2?t[2]:void 0;for(i=e.length>3&&\"function\"==typeof i?(o--,i):void 0,a&&Vo(t[0],t[1],a)&&(i=o<3?void 0:i,o=1),n=Object(n);++rn||i&&a&&c&&!u&&!s||r&&a&&c||!t&&c||!o)return 1;if(!r&&!i&&!s&&e=u?c:c*(\"desc\"==t[r]?-1:1)}return e.index-n.index};var Di=function(e,n,t){n=n.length?Yt(n,(function(e){return Te(e)?function(n){return nr(n,1===e.length?e[0]:e)}:e})):[ht];var r=-1;n=Yt(n,He(dr));var o=br(e,(function(e,t,o){return{criteria:Yt(n,(function(n){return n(e)})),index:++r,value:e}}));return Li(o,(function(e,n){return Ti(e,n,t)}))},Pi=Xr((function(e,n){if(null==e)return[];var t=n.length;return t>1&&Vo(e,n[0],n[1])?n=[]:t>2&&Vo(n[0],n[1],n[2])&&(n=[n[0]]),Di(e,Vr(n,1),[])})),zi=0;var Fi=function(e){var n=++zi;return Qt(e)+n};var Ui=function(e,n,t){for(var r=-1,o=e.length,i=n.length,a={};++r0;--u)if(r=n[u].dequeue()){o=o.concat(Zi(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return Hi.flatten(Hi.map(r,(function(n){return e.outEdges(n.v,n.w)})),!0)},Qi=Hi.constant(1);function Zi(e,n,t,r,o){var i=o?[]:void 0;return Hi.forEach(e.inEdges(r.v),(function(r){var a=e.edge(r),u=e.node(r.v);o&&i.push({v:r.v,w:r.w}),u.out-=a,ea(n,t,u)})),Hi.forEach(e.outEdges(r.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,ea(n,t,a)})),e.removeNode(r.v),i}function ea(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}var na={run:function(e){var n=\"greedy\"===e.graph().acyclicer?Ki(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},r={};function o(i){Hi.has(r,i)||(r[i]=!0,t[i]=!0,Hi.forEach(e.outEdges(i),(function(e){Hi.has(t,e.w)?n.push(e):o(e.w)})),delete t[i])}return Hi.forEach(e.nodes(),o),n}(e);Hi.forEach(n,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,Hi.uniqueId(\"rev\"))}))},undo:function(e){Hi.forEach(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}};var ta=Fo.Graph,ra={addDummyNode:oa,simplify:function(e){var n=(new ta).setGraph(e.graph());return Hi.forEach(e.nodes(),(function(t){n.setNode(t,e.node(t))})),Hi.forEach(e.edges(),(function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},o=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),n},asNonCompoundGraph:function(e){var n=new ta({multigraph:e.isMultigraph()}).setGraph(e.graph());return Hi.forEach(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),Hi.forEach(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n},successorWeights:function(e){var n=Hi.map(e.nodes(),(function(n){var t={};return Hi.forEach(e.outEdges(n),(function(n){t[n.w]=(t[n.w]||0)+e.edge(n).weight})),t}));return Hi.zipObject(e.nodes(),n)},predecessorWeights:function(e){var n=Hi.map(e.nodes(),(function(n){var t={};return Hi.forEach(e.inEdges(n),(function(n){t[n.v]=(t[n.v]||0)+e.edge(n).weight})),t}));return Hi.zipObject(e.nodes(),n)},intersectRect:function(e,n){var t,r,o=e.x,i=e.y,a=n.x-o,u=n.y-i,c=e.width/2,s=e.height/2;if(!a&&!u)throw new Error(\"Not possible to find intersection inside of the rectangle\");Math.abs(u)*c>Math.abs(a)*s?(u<0&&(s=-s),t=s*a/u,r=s):(a<0&&(c=-c),t=c,r=c*u/a);return{x:o+t,y:i+r}},buildLayerMatrix:function(e){var n=Hi.map(Hi.range(ia(e)+1),(function(){return[]}));return Hi.forEach(e.nodes(),(function(t){var r=e.node(t),o=r.rank;Hi.isUndefined(o)||(n[o][r.order]=t)})),n},normalizeRanks:function(e){var n=Hi.min(Hi.map(e.nodes(),(function(n){return e.node(n).rank})));Hi.forEach(e.nodes(),(function(t){var r=e.node(t);Hi.has(r,\"rank\")&&(r.rank-=n)}))},removeEmptyRanks:function(e){var n=Hi.min(Hi.map(e.nodes(),(function(n){return e.node(n).rank}))),t=[];Hi.forEach(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var r=0,o=e.graph().nodeRankFactor;Hi.forEach(t,(function(n,t){Hi.isUndefined(n)&&t%o!=0?--r:r&&Hi.forEach(n,(function(n){e.node(n).rank+=r}))}))},addBorderNode:function(e,n,t,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=t,o.order=r);return oa(e,\"border\",o,n)},maxRank:ia,partition:function(e,n){var t={lhs:[],rhs:[]};return Hi.forEach(e,(function(e){n(e)?t.lhs.push(e):t.rhs.push(e)})),t},time:function(e,n){var t=Hi.now();try{return n()}finally{console.log(e+\" time: \"+(Hi.now()-t)+\"ms\")}},notime:function(e,n){return n()}};function oa(e,n,t,r){var o;do{o=Hi.uniqueId(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function ia(e){return Hi.max(Hi.map(e.nodes(),(function(n){var t=e.node(n).rank;if(!Hi.isUndefined(t))return t})))}var aa={run:function(e){e.graph().dummyChains=[],Hi.forEach(e.edges(),(function(n){!function(e,n){var t,r,o,i=n.v,a=e.node(i).rank,u=n.w,c=e.node(u).rank,s=n.name,d=e.edge(n),f=d.labelRank;if(c===a+1)return;for(e.removeEdge(n),o=0,++a;aa.lim&&(u=a,c=!0);var s=Hi.filter(n.edges(),(function(n){return c===Sa(e,e.node(n.v),u)&&c!==Sa(e,e.node(n.w),u)}));return Hi.minBy(s,(function(e){return pa(n,e)}))}function Ia(e,n,t,r){var o=t.v,i=t.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),xa(e),_a(e,n),function(e,n){var t=Hi.find(e.nodes(),(function(e){return!n.node(e).parent})),r=ya(e,t);r=r.slice(1),Hi.forEach(r,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function Sa(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}Ea.initLowLimValues=xa,Ea.initCutValues=_a,Ea.calcCutValue=ja,Ea.leaveEdge=Oa,Ea.enterEdge=ka,Ea.exchangeEdges=Ia;var Ma=ua,Ca=function(e){switch(e.graph().ranker){case\"network-simplex\":Ba(e);break;case\"tight-tree\":!function(e){Ma(e),fa(e)}(e);break;case\"longest-path\":Ga(e);break;default:Ba(e)}};var Ga=Ma;function Ba(e){wa(e)}var Aa=function(e){var n=function(e){var n={},t=0;function r(o){var i=t;Hi.forEach(e.children(o),r),n[o]={low:i,lim:t++}}return Hi.forEach(e.children(),r),n}(e);Hi.forEach(e.graph().dummyChains,(function(t){for(var r=e.node(t),o=r.edgeObj,i=function(e,n,t,r){var o,i,a=[],u=[],c=Math.min(n[t].low,n[r].low),s=Math.max(n[t].lim,n[r].lim);o=t;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>c||s>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,c=0,s=a[c],d=!0;t!==o.w;){if(r=e.node(t),d){for(;(s=a[c])!==u&&e.node(s).maxRank0;)n%2&&(t+=u[n+1]),u[n=n-1>>1]+=e.weight;c+=e.weight*t}))),c}var qa=function(e,n){return Hi.map(n,(function(n){var t=e.inEdges(n);if(t.length){var r=Hi.reduce(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))};var Ya=function(e,n){var t={};return Hi.forEach(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};Hi.isUndefined(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),Hi.forEach(n.edges(),(function(e){var n=t[e.v],r=t[e.w];Hi.isUndefined(n)||Hi.isUndefined(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){n.merged||(Hi.isUndefined(n.barycenter)||Hi.isUndefined(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function r(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var o=e.pop();n.push(o),Hi.forEach(o.in.reverse(),t(o)),Hi.forEach(o.out,r(o))}return Hi.map(Hi.filter(n,(function(e){return!e.merged})),(function(e){return Hi.pick(e,[\"vs\",\"i\",\"barycenter\",\"weight\"])}))}(Hi.filter(t,(function(e){return!e.indegree})))};var Ja=function(e,n){var t=ra.partition(e,(function(e){return Hi.has(e,\"barycenter\")})),r=t.lhs,o=Hi.sortBy(t.rhs,(function(e){return-e.i})),i=[],a=0,u=0,c=0;r.sort((s=!!n,function(e,n){return e.barycentern.barycenter?1:s?n.i-e.i:e.i-n.i})),c=Xa(i,o,c),Hi.forEach(r,(function(e){c+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,u+=e.weight,c=Xa(i,o,c)}));var s;var d={vs:Hi.flatten(i,!0)};u&&(d.barycenter=a/u,d.weight=u);return d};function Xa(e,n,t){for(var r;n.length&&(r=Hi.last(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}var Ka=function e(n,t,r,o){var i=n.children(t),a=n.node(t),u=a?a.borderLeft:void 0,c=a?a.borderRight:void 0,s={};u&&(i=Hi.filter(i,(function(e){return e!==u&&e!==c})));var d=qa(n,i);Hi.forEach(d,(function(t){if(n.children(t.v).length){var i=e(n,t.v,r,o);s[t.v]=i,Hi.has(i,\"barycenter\")&&(a=t,u=i,Hi.isUndefined(a.barycenter)?(a.barycenter=u.barycenter,a.weight=u.weight):(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight))}var a,u}));var f=Ya(d,r);!function(e,n){Hi.forEach(e,(function(e){e.vs=Hi.flatten(e.vs.map((function(e){return n[e]?n[e].vs:e})),!0)}))}(f,s);var h=Ja(f,o);if(u&&(h.vs=Hi.flatten([u,h.vs,c],!0),n.predecessors(u).length)){var l=n.node(n.predecessors(u)[0]),v=n.node(n.predecessors(c)[0]);Hi.has(h,\"barycenter\")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+l.order+v.order)/(h.weight+2),h.weight+=2}return h};var Qa=Fo.Graph,Za=function(e,n,t){var r=function(e){var n;for(;e.hasNode(n=Hi.uniqueId(\"_root\")););return n}(e),o=new Qa({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(n){return e.node(n)}));return Hi.forEach(e.nodes(),(function(i){var a=e.node(i),u=e.parent(i);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(o.setNode(i),o.setParent(i,u||r),Hi.forEach(e[t](i),(function(n){var t=n.v===i?n.w:n.v,r=o.edge(t,i),a=Hi.isUndefined(r)?0:r.weight;o.setEdge(t,i,{weight:e.edge(n).weight+a})})),Hi.has(a,\"minRank\")&&o.setNode(i,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))})),o};var eu=function(e,n,t){var r,o={};Hi.forEach(t,(function(t){for(var i,a,u=e.parent(t);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=r,r=u),a&&a!==u)return void n.setEdge(a,u);u=i}}))};var nu=Fo.Graph,tu=function(e){var n=ra.maxRank(e),t=ru(e,Hi.range(1,n+1),\"inEdges\"),r=ru(e,Hi.range(n-1,-1,-1),\"outEdges\"),o=$a(e);iu(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,c=0;c<4;++u,++c){ou(u%2?t:r,u%4>=2),o=ra.buildLayerMatrix(e);var s=Ha(e,o);sa)&&du(t,n,u)}))}))}return Hi.reduce(n,(function(n,t){var o,i=-1,a=0;return Hi.forEach(t,(function(u,c){if(\"border\"===e.node(u).dummy){var s=e.predecessors(u);s.length&&(o=e.node(s[0]).order,r(t,a,c,i,o),a=c,i=o)}r(t,a,t.length,o,n.length)})),t})),t}function du(e,n,t){if(n>t){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function fu(e,n,t){if(n>t){var r=n;n=t,t=r}return Hi.has(e[n],t)}function hu(e,n,t,r){var o={},i={},a={};return Hi.forEach(n,(function(e){Hi.forEach(e,(function(e,n){o[e]=e,i[e]=e,a[e]=n}))})),Hi.forEach(n,(function(e){var n=-1;Hi.forEach(e,(function(e){var u=r(e);if(u.length)for(var c=((u=Hi.sortBy(u,(function(e){return a[e]}))).length-1)/2,s=Math.floor(c),d=Math.ceil(c);s<=d;++s){var f=u[s];i[e]===e&&nnew Du(e))).forEach((e=>{n.nodes[e.name]=e,e.inputs.forEach((t=>{!function(e,n,t){t.name!==n.name&&e.edges.push(Object.assign(Object.assign({},t.attr),{v:t.name,w:n.name}))}(n,e,t)}))})),n}class Fu{constructor(e,n={}){this.attr=null,this.bridgeGraph=null,this.cardinality=0,this.depth=1,this.include=a.UNSPECIFIED,this.isGroupNode=!0,this.parentNode=null,this.type=i.META,this.path=[],this.name=e,this.metaGraph=Hu(e,u.META,n)}getFirstChild(){return this.metaGraph.node(this.metaGraph.nodes()[0])}getChildren(){return this.metaGraph.nodes().map((e=>this.metaGraph.node(e)))}leaves(){let e,n=[],t=[this];for(;t.length;){let r=t.shift();r.isGroupNode?(e=r.metaGraph,e.nodes().forEach((n=>t.push(e.node(n))))):n.push(r.name)}return n}}class Uu{constructor(e,n){this.v=e,this.w=n,this.baseEdgeList=[],this.inbound=null,this.name=null}addBaseEdge(e,n){this.baseEdgeList.push(e)}}function Vu(e,n={}){return new Fu(e,n)}function $u(e,n){return new Uu(e,n)}function Hu(e,n,t){const r=t||{},o=new Ru.Graph(r);return o.setGraph({name:e,rankdir:r.rankdir,type:n,align:r.align}),o}class Wu{constructor(e={}){this.graphOptions=e,this.index={},this.graphOptions.compound=!0,this.root=Vu(r,this.graphOptions),this.index[r]=this.root}getNodeMap(){return this.index}node(e){return this.index[e]}setNode(e,n){this.index[e]=n}getBridgeGraph(e){const n=this.index[e];if(!n)throw Error(\"Could not find node in hierarchy: \"+e);if(!(\"metaGraph\"in n))return null;const t=n;if(t.bridgeGraph)return t.bridgeGraph;const r=Hu(o,u.BRIDGE,this.graphOptions);if(t.bridgeGraph=r,!n.parentNode||!(\"metaGraph\"in n.parentNode))return r;const i=n.parentNode;return[i.metaGraph,this.getBridgeGraph(i.name)].forEach((n=>{n.edges().filter((n=>n.v===e||n.w===e)).forEach((t=>{const o=t.w===e;n.edge(t).baseEdgeList.forEach((n=>{const[i,a]=o?[n.w,t.v]:[n.v,t.w],u=this.getChildName(e,i),c={v:o?a:u,w:o?u:a};let s=r.edge(c);s||(s=$u(c.v,c.w),s.inbound=o,r.setEdge(c.v,c.w,s)),s.addBaseEdge(n,this)}))}))})),r}getChildName(e,n){let t=this.index[n];for(;t;){if(t.parentNode&&t.parentNode.name===e)return t.name;t=t.parentNode}throw Error(\"Could not find immediate child for descendant: \"+n)}getPredecessors(e){const n=this.index[e];if(!n)throw Error(\"Could not find node with name: \"+e);return this.getOneWayEdges(n,!0)}getSuccessors(e){const n=this.index[e];if(!n)throw Error(\"Could not find node with name: \"+e);return this.getOneWayEdges(n,!1)}getOneWayEdges(e,n){const t=[];if(!e.parentNode||!e.parentNode.isGroupNode)return t;const r=e.parentNode,o=r.metaGraph,i=this.getBridgeGraph(r.name);return Yu(o,e,n,t),Yu(i,e,n,t),t}}function qu(e,n){const{rankDirection:t,align:r}=n,o=new Wu({rankdir:t,align:r});return function(e,n){Object.keys(n.nodes).forEach((t=>{const r=n.nodes[t],o=r.path;let i=e.root;i.depth=Math.max(o.length,i.depth);for(let n=0;n{let t=0;for(;e;)n[t++]=e.name,e=e.parentNode;return t-1};n.edges.forEach((a=>{r=[],o=[];let u=i(n.nodes[a.v],r),c=i(n.nodes[a.w],o);for(;r[u]===o[c];)if(u--,c--,u<0||c<0)throw Error(\"No difference found between ancestor paths.\");const s=t[r[u+1]],d=r[u],f=o[c];let h=s.metaGraph.edge(d,f);h||(h=$u(d,f),s.metaGraph.setEdge(d,f,h)),h.addBaseEdge(a,e)}))}(o,e),o}function Yu(e,n,t,r){(t?e.inEdges(n.name):e.outEdges(n.name)).forEach((n=>{const t=e.edge(n);r.push(t)}))}class Ju{constructor(e){this.hierarchy=e,this.index={},this.hasSubHierarchy={},this.root=new Qu(this.hierarchy.root,this.hierarchy.graphOptions),this.index[e.root.name]=this.root,this.buildSubHierarchy(e.root.name),this.root.expanded=!0}getRenderInfoNodes(){return Object.values(this.index)}getSubHierarchy(){return this.hasSubHierarchy}buildSubHierarchy(e){if(e in this.hasSubHierarchy)return;this.hasSubHierarchy[e]=!0;const n=this.index[e];if(n.node.type!==i.META)return;const t=n,r=t.node.metaGraph,o=t.coreGraph;r.nodes().forEach((e=>{const n=this.getOrCreateRenderNodeByName(e);o.setNode(e,n)})),r.edges().forEach((e=>{const n=r.edge(e),t=new Ku(n);o.setEdge(e.v,e.w,t)}));const u=t.node.parentNode;if(!u)return;const c=this.getRenderNodeByName(u.name),s=(e,...n)=>n.concat([e?\"IN\":\"OUT\"]).join(\"~~\"),d=this.hierarchy.getBridgeGraph(e);d.edges().forEach((n=>{const t=d.edge(n),f=!!r.node(n.w),[h,l]=f?[n.w,n.v]:[n.v,n.w],v=n=>{const t=f?{v:n,w:e}:{v:e,w:n};return c.coreGraph.edge(t)};let p=v(l);p||(p=v(s(f,l,u.name)));const g=s(f,e),y=s(f,l,e);let b=o.node(y);if(!b){let e=o.node(g);if(!e){const n={name:g,type:i.BRIDGE,isGroupNode:!1,cardinality:0,parentNode:null,include:a.UNSPECIFIED,inbound:f,attr:{}};e=new Xu(n),this.index[g]=e,o.setNode(g,e)}const n={name:y,type:i.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,include:a.UNSPECIFIED,inbound:f,attr:{}};b=new Xu(n),this.index[y]=b,o.setNode(y,b),o.setParent(y,g),e.node.cardinality++}const m=new Ku(t);m.adjoiningMetaEdge=p,f?o.setEdge(y,h,m):o.setEdge(h,y,m)}))}getOrCreateRenderNodeByName(e){if(!e)return null;if(e in this.index)return this.index[e];const n=this.getNodeByName(e);return n?(this.index[e]=n.isGroupNode?new Qu(n,this.hierarchy.graphOptions):new Xu(n),this.index[e]):null}getRenderNodeByName(e){return this.index[e]}getNodeByName(e){return this.hierarchy.node(e)}}class Xu{constructor(e){this.node=e,this.expanded=!1,this.x=0,this.y=0,this.coreBox={width:0,height:0},this.outboxWidth=0,this.labelOffset=0,this.radius=0,this.labelHeight=0,this.paddingTop=0,this.paddingLeft=0,this.paddingRight=0,this.paddingBottom=0,this.width=e.width||0,this.height=e.height||0,this.displayName=e.name,this.attr=e.attr}}class Ku{constructor(e){this.metaEdge=e,this.adjoiningMetaEdge=null,this.weight=1,this.points=[]}}class Qu extends Xu{constructor(e,n){super(e);const t=e.metaGraph.graph();n.compound=!0,this.coreGraph=Hu(t.name,u.CORE,n)}}function Zu(e,t){e.node.isGroupNode&&function(e,t){const r=n(t);e.coreGraph.nodes().map((n=>e.coreGraph.node(n))).forEach((e=>{var n,o,a,u,c,s;const{height:d,width:f}=e;switch(e.node.type){case i.NODE:Object.assign(e,r.nodeSize.node),e.height=d||r.nodeSize.node.height,e.width=f||r.nodeSize.node.width;break;case i.BRIDGE:Object.assign(e,r.nodeSize.bridge);break;case i.META:if(e.expanded){Zu(e,t)}else Object.assign(e,r.nodeSize.meta),e.height=r.nodeSize.meta.height,e.width=r.nodeSize.meta.width;break;default:throw Error(\"Unrecognized node type: \"+e.node.type)}if(!e.expanded){const r=e.attr;!function(e,n=!1){if(e.coreBox.width=e.width,e.coreBox.height=e.height,!n){const n=`${e.displayName}`.length,t=3;e.width=Math.max(e.coreBox.width,n*t)}}(e,t&&(0===e.node.type&&!!(null===(o=null===(n=null==t?void 0:t.nodeSize)||void 0===n?void 0:n.meta)||void 0===o?void 0:o.width)||1===e.node.type&&(!!(null===(u=null===(a=null==t?void 0:t.nodeSize)||void 0===a?void 0:a.node)||void 0===u?void 0:u.width)||!!r.width)||2===e.node.type&&!!(null===(s=null===(c=null==t?void 0:t.nodeSize)||void 0===c?void 0:c.bridge)||void 0===s?void 0:s.width)))}}))}(e,t),e.node.type===i.META&&function(e,t){const r=n(t),o=r.subScene.meta;Object.assign(e,o);const{nodeSep:a,rankSep:u,edgeSep:c,align:s}=r.graph.meta,d={nodesep:a,ranksep:u,edgesep:c,align:s};Object.assign(e.coreBox,function(e,n){const{ranksep:t,nodesep:r,edgesep:o,align:a}=n;Object.assign(e.graph(),{ranksep:t,nodesep:r,edgesep:o,align:a});const u=[];if(e.nodes().forEach((n=>{e.node(n).node.type!==i.BRIDGE&&u.push(n)})),!u.length)return{width:0,height:0};Tu(e);let c=1/0,s=1/0,d=-1/0,f=-1/0;return u.forEach((n=>{const t=e.node(n),r=.5*t.width,o=t.x-r,i=t.x+r;c=od?i:d;const a=.5*t.height,u=t.y-a,h=t.y+a;s=uf?h:f})),e.edges().forEach((n=>{const t=e.edge(n),r=e.node(t.metaEdge.v),o=e.node(t.metaEdge.w);if(3===t.points.length&&function(e){let n=ec(e[0],e[1]);for(let t=1;t1)return!1;n=r}return!0}(t.points)){if(null!=r){const e=r.expanded?r.x:nc(r);t.points[0].x=e}if(null!=o){const e=o.expanded?o.x:nc(o);t.points[2].x=e}t.points=[t.points[0],t.points[1]]}const i=t.points[t.points.length-2];null!=o&&(t.points[t.points.length-1]=tc(i,o));const a=t.points[1];null!=r&&(t.points[0]=tc(a,r)),t.points.forEach((e=>{c=e.xd?e.x:d,s=e.yf?e.y:f}))})),e.nodes().forEach((n=>{const t=e.node(n);t.x-=c,t.y-=s})),e.edges().forEach((n=>{e.edge(n).points.forEach((e=>{e.x-=c,e.y-=s}))})),{width:d-c,height:f-s}}(e.coreGraph,d));let f=0;e.coreGraph.nodeCount()>0&&f++;const h=f<=1?0:f;e.coreBox.width+=h+h,e.coreBox.height=o.labelHeight+e.coreBox.height,e.width=e.coreBox.width+o.paddingLeft+o.paddingRight,e.height=e.paddingTop+e.coreBox.height+e.paddingBottom}(e,t)}function ec(e,n){const t=n.x-e.x,r=n.y-e.y;return 180*Math.atan(r/t)/Math.PI}function nc(e){if(e.expanded)return e.x;return e.x-e.width/2+0+e.coreBox.width/2}function tc(e,n){const t=n.expanded?n.x:nc(n),r=n.y,o=e.x-t,i=e.y-r;let a,u,c=n.expanded?n.width:n.coreBox.width,s=n.expanded?n.height:n.coreBox.height;return Math.abs(i)*c/2>Math.abs(o)*s/2?(i<0&&(s=-s),a=0===i?0:s/2*o/i,u=s/2):(o<0&&(c=-c),a=c/2,u=0===o?0:c/2*i/o),{x:t+a,y:r+u}}function rc(n,t,r){var o,i,a,u;const c=n.nodes.filter(((e,n,t)=>t.findIndex((n=>n.id===e.id))!==n)).map((e=>e.id));if(c.length)throw new Error(`Duplicated ids found: ${c.join(\", \")}`);const s=function(e){const n={nodes:[]},t=e.compound,r=Object.keys(t||{}),o=new Map,i=(e,n=[])=>{if(o.has(e))return o.get(e);for(let o=0;oe.edges.filter((e=>e.w===n)).map((e=>({name:e.v})));return e.nodes.forEach((e=>{const t=e.id,r=[...i(t),t];let o=a(t);n.nodes.push({name:t,path:r,inputs:o,width:e.width,height:e.height,attr:Object.assign({},e)})})),n}(n),d=function(e,n){const t=(e,n)=>{for(let t of n.values())if(t.includes(e))return!0;return!1},r=(e,n=[])=>{if(0===Object.keys(e).length)return[...new Set(n)];const o=new Map(Object.keys(e).map((n=>[n,e[n]]))),i={};for(let[e,r]of o)t(e,o)?i[e]=r:n=n.concat(e,r);return r(i,n)};return r(e).filter((e=>n.includes(e)))}(n.compound||{},(null==t?void 0:t.expanded)||[]),f=function(e,n){return function(e){return new Ju(e)}(qu(zu(e),n))}(s,{rankDirection:(null===(i=null===(o=null==r?void 0:r.graph)||void 0===o?void 0:o.meta)||void 0===i?void 0:i.rankDir)||(null==t?void 0:t.rankDirection)||e.graph.meta.rankDir,align:(null===(u=null===(a=null==r?void 0:r.graph)||void 0===a?void 0:a.meta)||void 0===u?void 0:u.align)||e.graph.meta.align});return function(e,n){n.forEach((n=>{const t=e.getRenderInfoNodes().find((e=>e.displayName===n));let r=t&&t.node&&t.node.name||\"\";const o=e.getRenderNodeByName(r);if(!o)throw new Error(`No nodes found: ${r}`);o.expanded=!0,e.buildSubHierarchy(r)}))}(f,d),Zu(f.root,r),ac(f.root)}function oc(e,n=!1){const t=JSON.parse(JSON.stringify(e)),o={nodes:[t],edges:[...t.edges]};return t.nodes.forEach((function e(n){(0===n.type||1===n.type)&&o.nodes.push(n),0===n.type&&(o.edges=o.edges.concat(n.edges)),Array.isArray(n.nodes)&&n.nodes.forEach(e)})),n&&o.nodes.forEach((e=>{const n=o.nodes.find((n=>n.id===e.parentNodeName));if(n){const t=n.x-n.width/2+n.paddingLeft,o=n.y-n.height/2+n.labelHeight+n.paddingTop;n.id!==r&&(e.x+=t,e.y+=o),0===e.type&&e.edges.forEach((n=>{n.points.forEach((n=>{n.x+=e.x-e.width/2+e.paddingLeft,n.y+=e.y-e.height/2+e.labelHeight+e.paddingTop}))}))}})),o}function ic(e,n,t,o){var i,a;let u=[];const c=(null===(i=t.find((n=>n.id===e)))||void 0===i?void 0:i.path)||[],s=(null===(a=t.find((e=>e.id===n)))||void 0===a?void 0:a.path)||[],d=[r,...c].slice(0,c.length).reverse(),f=[r,...s].slice(0,s.length);return d.forEach((r=>{const i=t.find((e=>e.id===r));u=u.concat(i.edges.filter((t=>t.baseEdgeList.some((t=>t.v===((null==o?void 0:o.v)||e)&&t.w===((null==o?void 0:o.w)||n))))))})),f.filter((e=>!d.includes(e))).forEach((r=>{const i=t.find((e=>e.id===r));u=u.concat(i.edges.filter((t=>t.baseEdgeList.some((t=>t.v===((null==o?void 0:o.v)||e)&&t.w===((null==o?void 0:o.w)||n))))))})),u}function ac(e){const n=e.coreGraph.nodes().map((n=>e.coreGraph.node(n)));return Object.assign(Object.assign({},uc(e)),{expanded:e.expanded,nodes:e.expanded?(t=n,t.map((e=>e.node.type===i.META?ac(e):uc(e)))):[],edges:e.expanded?cc(e):[]});var t}function uc(e){return{id:e.node.name,name:e.node.name,type:e.node.type,cardinality:e.node.cardinality,attr:e.attr,parentNodeName:e.node.parentNode?e.node.parentNode.name:null,coreBox:Object.assign({},e.coreBox),x:e.x,y:e.y,width:e.width,height:e.height,radius:e.radius,labelHeight:e.labelHeight,labelOffset:e.labelOffset,outboxWidth:e.outboxWidth,paddingLeft:e.paddingLeft,paddingTop:e.paddingTop,paddingRight:e.paddingRight,paddingBottom:e.paddingBottom,path:e.node.path}}function cc(e){return e.coreGraph.edges().map((n=>({renderInfoEdge:e.coreGraph.edge(n),edge:n}))).filter((({renderInfoEdge:e})=>e.metaEdge)).map((({edge:n,renderInfoEdge:t})=>{const r=function(e,n){const t=n.points.map((e=>Object.assign({},e)));if(n.adjoiningMetaEdge){const r=n.adjoiningMetaEdge.points,o=n.metaEdge.inbound,i=o?r[r.length-1]:r[0],a=t[o?0:t.length-1],u=e.x-e.width/2,c=e.y-e.height/2,s=i.x-u,d=i.y-c,f=-e.paddingLeft,h=-(e.paddingTop+e.labelHeight);a.x=s+f,a.y=d+h}return t}(e,t);return{adjoiningEdge:t.adjoiningMetaEdge?{w:t.adjoiningMetaEdge.metaEdge.w,v:t.adjoiningMetaEdge.metaEdge.v}:null,inbound:t.metaEdge.inbound,w:n.w,v:n.v,points:r,weight:t.weight,baseEdgeList:t.metaEdge.baseEdgeList,parentNodeName:e.node.name}}))}export{o as BRIDGE_GRAPH_NAME,u as GraphType,c as HierarchyNodeType,a as InclusionType,e as LAYOUT_CONFIG,i as NodeType,r as ROOT_NAME,rc as buildGraph,oc as flatGraph,ic as getEdges,n as mergeConfig};\n//# sourceMappingURL=dagre-compound.es5.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DagreCompoundLayout = void 0;\nvar base_1 = require(\"./base\");\nvar dagre_compound_1 = require(\"dagre-compound\");\nvar util_1 = require(\"../util\");\nvar DagreCompoundLayout = /** @class */ (function (_super) {\n __extends(DagreCompoundLayout, _super);\n function DagreCompoundLayout(options) {\n var _this = _super.call(this) || this;\n /** layout 方向, 可选 TB, BT, LR, RL */\n _this.rankdir = 'TB';\n /** 节点水平间距(px) */\n _this.nodesep = 50;\n /** 边水平间距(px) */\n _this.edgesep = 5;\n /** 每一层节点之间间距 */\n _this.ranksep = 50;\n /** 是否保留布局连线的控制点 */\n _this.controlPoints = true;\n /** 是否保留使用布局计算的锚点 */\n _this.anchorPoint = true;\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n DagreCompoundLayout.prototype.getDefaultCfg = function () {\n return {\n rankdir: 'TB',\n align: undefined,\n begin: undefined,\n nodeSize: undefined,\n nodesep: 50,\n ranksep: 50,\n controlPoints: true,\n anchorPoint: true // 是否使用布局计算的锚点\n };\n };\n DagreCompoundLayout.prototype.init = function (data) {\n var hiddenNodes = data.hiddenNodes || []; // 被隐藏的节点\n var hiddenEdges = data.hiddenEdges || []; // 被隐藏的边\n var hiddenCombos = data.hiddenCombos || []; // 赋值 hiddenCombos\n // 确保此次排序按照用户输入顺序\n this.nodes = this.getDataByOrder((data.nodes || []).concat(hiddenNodes));\n this.edges = this.getDataByOrder((data.edges || []).concat(hiddenEdges));\n this.combos = (data.combos || []).concat(hiddenCombos.map(function (hc) { return (__assign(__assign({}, hc), { collapsed: true })); }));\n };\n DagreCompoundLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n if (!nodes)\n return;\n var _a = self.getLayoutConfig(), graphDef = _a.graphDef, graphOption = _a.graphOption, graphSettings = _a.graphSettings;\n var renderInfo = (0, dagre_compound_1.buildGraph)(graphDef, graphOption, graphSettings);\n var flattenedRenderInfo = (0, dagre_compound_1.flatGraph)(renderInfo, true); // 打平数据进行遍历\n this.updatePosition(flattenedRenderInfo);\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n /**\n * combo 模式下查找节点完整路径\n * @param nodeId\n * @private\n */\n DagreCompoundLayout.prototype.getNodePath = function (nodeId) {\n var self = this;\n var nodes = self.nodes, combos = self.combos;\n var targetNode = nodes.find(function (n) { return n.id === nodeId; });\n var findPath = function (comboId, fullPath) {\n if (fullPath === void 0) { fullPath = []; }\n var combo = combos.find(function (c) { return c.id === comboId; });\n if (combo) {\n fullPath.unshift(comboId);\n if (combo.parentId) {\n return findPath(combo.parentId, fullPath);\n }\n return fullPath;\n }\n return fullPath;\n };\n if (targetNode && targetNode.comboId) {\n return findPath(targetNode.comboId, [nodeId]);\n }\n return [nodeId];\n };\n /** 准备 dagre-compound 布局参数 */\n DagreCompoundLayout.prototype.getLayoutConfig = function () {\n var _a, _b, _c;\n var self = this;\n var nodes = self.nodes, edges = self.edges, combos = self.combos, nodeSize = self.nodeSize, rankdir = self.rankdir, align = self.align, edgesep = self.edgesep, nodesep = self.nodesep, ranksep = self.ranksep, settings = self.settings;\n var compound = (combos || []).reduce(function (pre, cur) {\n var matchedNodes = nodes.filter(function (n) { return n.comboId === cur.id; }).map(function (n) { return n.id; });\n var matchedCombos = (combos || []).filter(function (n) { return n.parentId === cur.id; }).map(function (n) { return n.id; });\n if (matchedNodes.length || matchedCombos.length) {\n pre[cur.id] = __spreadArray(__spreadArray([], matchedNodes, true), matchedCombos, true);\n }\n return pre;\n }, {});\n /** 计算 nodeSize */\n var nodeSizeFunc;\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d && d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n if ((0, util_1.isObject)(d.size)) {\n return [d.size.width || 40, d.size.height || 40];\n }\n return [d.size, d.size];\n }\n return [40, 40];\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function () { return nodeSize; };\n }\n else {\n nodeSizeFunc = function () { return [nodeSize, nodeSize]; };\n }\n /** 计算 comboSize */\n var comboSizeFunc = function (d) {\n if (d && d.size) {\n if ((0, util_1.isArray)(d.size)) {\n return d.size;\n }\n return [d.size, d.size];\n }\n return [80, 40];\n };\n // 接受 defaultCombo 设置的 size\n var _d = comboSizeFunc(combos === null || combos === void 0 ? void 0 : combos[0]), metaWidth = _d[0], metaHeight = _d[1];\n // 初始化 padding\n var subSceneMeta = (_b = (_a = self.graphSettings) === null || _a === void 0 ? void 0 : _a.subScene) === null || _b === void 0 ? void 0 : _b.meta;\n var _e = ((_c = combos.find(function (c) { return !c.collapsed; })) === null || _c === void 0 ? void 0 : _c.padding) || [20, 20, 20, 20], paddingTop = _e[0], paddingRight = _e[1], paddingBottom = _e[2], paddingLeft = _e[3];\n var graphDef = {\n compound: compound,\n nodes: __spreadArray([], (nodes || []).map(function (n) {\n var size = nodeSizeFunc(n);\n var width = size[0];\n var height = size[1];\n return __assign(__assign({}, n), { width: width, height: height });\n }), true),\n edges: __spreadArray([], (edges || []).map(function (e) { return (__assign(__assign({}, e), { v: e.source, w: e.target })); }), true)\n };\n // 需要展开的节点\n var graphOption = {\n expanded: (combos || []).filter(function (c) { return !c.collapsed; }).map(function (c) { return c.id; })\n };\n // dagre-compound 布局参数\n var graphMetaConfig = {\n graph: {\n meta: {\n align: align,\n rankDir: rankdir,\n nodeSep: nodesep,\n edgeSep: edgesep,\n rankSep: ranksep\n }\n },\n subScene: {\n meta: {\n paddingTop: paddingTop || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingTop) || 20,\n paddingRight: paddingRight || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingRight) || 20,\n paddingBottom: paddingBottom || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingBottom) || 20,\n paddingLeft: paddingLeft || (subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingLeft) || 20,\n labelHeight: 0\n }\n },\n nodeSize: {\n meta: {\n width: metaWidth,\n height: metaHeight\n }\n }\n };\n // 合并用户输入的内容\n var graphSettings = (0, dagre_compound_1.mergeConfig)(settings, __assign({}, (0, dagre_compound_1.mergeConfig)(graphMetaConfig, dagre_compound_1.LAYOUT_CONFIG)));\n self.graphSettings = graphSettings;\n return {\n graphDef: graphDef,\n graphOption: graphOption,\n graphSettings: graphSettings\n };\n };\n /** 更新节点与边位置 */\n DagreCompoundLayout.prototype.updatePosition = function (flattenedGraph) {\n var nodes = flattenedGraph.nodes, edges = flattenedGraph.edges;\n this.updateNodePosition(nodes, edges);\n this.updateEdgePosition(nodes, edges);\n };\n DagreCompoundLayout.prototype.getBegin = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var begin = self.begin;\n var dBegin = [0, 0];\n if (begin) {\n var minX_1 = Infinity;\n var minY_1 = Infinity;\n flattenedNodes.forEach(function (node) {\n if (minX_1 > node.x)\n minX_1 = node.x;\n if (minY_1 > node.y)\n minY_1 = node.y;\n });\n flattenedEdges.forEach(function (edge) {\n edge.points.forEach(function (point) {\n if (minX_1 > point.x)\n minX_1 = point.x;\n if (minY_1 > point.y)\n minY_1 = point.y;\n });\n });\n dBegin[0] = begin[0] - minX_1;\n dBegin[1] = begin[1] - minY_1;\n }\n return dBegin;\n };\n DagreCompoundLayout.prototype.updateNodePosition = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var combos = self.combos, nodes = self.nodes, edges = self.edges, anchorPoint = self.anchorPoint, graphSettings = self.graphSettings;\n var dBegin = this.getBegin(flattenedNodes, flattenedEdges);\n flattenedNodes.forEach(function (node) {\n var _a;\n var x = node.x, y = node.y, id = node.id, type = node.type, coreBox = node.coreBox;\n if (type === dagre_compound_1.HierarchyNodeType.META && id !== dagre_compound_1.ROOT_NAME) {\n var i = combos.findIndex(function (item) { return item.id === id; });\n var subSceneMeta = (_a = graphSettings === null || graphSettings === void 0 ? void 0 : graphSettings.subScene) === null || _a === void 0 ? void 0 : _a.meta;\n // 将布局生成的 combo 位置暂存至 offsetX offsetY\n combos[i].offsetX = x + dBegin[0];\n combos[i].offsetY = y + dBegin[1];\n combos[i].fixSize = [coreBox.width, coreBox.height];\n combos[i].fixCollapseSize = [coreBox.width, coreBox.height];\n // 如果设置了收起时隐藏 padding,则手动优化 combo padding 信息,展开的话则恢复\n if (!node.expanded) {\n combos[i].padding = [0, 0, 0, 0];\n }\n else {\n combos[i].padding = [\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingTop,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingRight,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingBottom,\n subSceneMeta === null || subSceneMeta === void 0 ? void 0 : subSceneMeta.paddingLeft\n ];\n }\n }\n else if (type === dagre_compound_1.HierarchyNodeType.OP) {\n var i = nodes.findIndex(function (item) { return item.id === id; });\n nodes[i].x = x + dBegin[0];\n nodes[i].y = y + dBegin[1];\n if (anchorPoint) {\n var anchorPoints_1 = [];\n var outEdges = flattenedEdges.filter(function (e) { return e.v === id; });\n var inEdges = flattenedEdges.filter(function (e) { return e.w === id; });\n // 指定出边锚点,锚点中心点为 [0.5, 0.5]\n if (outEdges.length > 0) {\n outEdges.forEach(function (outEdge) {\n var firstPoint = outEdge.points[0];\n var anchorPointX = (firstPoint.x - x) / node.width + 0.5;\n var anchorPointY = (firstPoint.y - y) / node.height + 0.5;\n anchorPoints_1.push([anchorPointX, anchorPointY]);\n // 出边对应 source 边锚点\n outEdge.baseEdgeList.forEach(function (baseEdge) {\n var edge = edges.find(function (e) { return e.source === baseEdge.v && e.target === baseEdge.w; });\n if (edge) {\n edge.sourceAnchor = anchorPoints_1.length - 1;\n }\n });\n });\n }\n // 指定入边锚点\n if (inEdges.length > 0) {\n inEdges.forEach(function (inEdge) {\n var lastPoint = inEdge.points[inEdge.points.length - 1];\n var anchorPointX = (lastPoint.x - x) / node.width + 0.5;\n var anchorPointY = (lastPoint.y - y) / node.height + 0.5;\n anchorPoints_1.push([anchorPointX, anchorPointY]);\n // 出边对应 source 锚点\n inEdge.baseEdgeList.forEach(function (baseEdge) {\n var edge = edges.find(function (e) { return e.source === baseEdge.v && e.target === baseEdge.w; });\n if (edge) {\n edge.targetAnchor = anchorPoints_1.length - 1;\n }\n });\n });\n }\n nodes[i].anchorPoints = anchorPoints_1.length > 0 ? anchorPoints_1 : nodes[i].anchorPoints || [];\n }\n }\n });\n };\n DagreCompoundLayout.prototype.updateEdgePosition = function (flattenedNodes, flattenedEdges) {\n var self = this;\n var combos = self.combos, edges = self.edges, controlPoints = self.controlPoints;\n var dBegin = this.getBegin(flattenedNodes, flattenedEdges);\n if (controlPoints) {\n combos.forEach(function (combo) {\n combo.inEdges = [];\n combo.outEdges = [];\n });\n edges.forEach(function (sourceEdge) {\n var _a, _b, _c, _d;\n var sourceNode = flattenedNodes.find(function (v) { return v.id === sourceEdge.source; });\n var targetNode = flattenedNodes.find(function (v) { return v.id === sourceEdge.target; });\n // Combo 收起状态,dagre-compound 不会渲染该节点,边需要使用到 group 的边作为补充\n var points = [];\n var sortedEdges = [];\n if (sourceNode && targetNode) {\n sortedEdges = (0, dagre_compound_1.getEdges)(sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id, targetNode === null || targetNode === void 0 ? void 0 : targetNode.id, flattenedNodes);\n }\n else if (!sourceNode || !targetNode) {\n /** 存在收起节点时,需要重新计算边的 controlPoints,确保线正常 */\n // 情况1:目标节点被收起了,向上寻找该节点最近一个存在的父节点\n var sourceNodePath = self.getNodePath(sourceEdge.source);\n var targetNodePath = self.getNodePath(sourceEdge.target);\n var lastExistingSource_1 = sourceNodePath\n .reverse()\n .slice(!sourceNode ? 1 : 0)\n .find(function (parentId) { return flattenedNodes.find(function (fNode) { return fNode.id === parentId; }); });\n var lastExistingTarget_1 = targetNodePath\n .reverse()\n .slice(!targetNode ? 1 : 0)\n .find(function (parentId) { return flattenedNodes.find(function (fNode) { return fNode.id === parentId; }); });\n sourceNode = flattenedNodes.find(function (v) { return v.id === lastExistingSource_1; });\n targetNode = flattenedNodes.find(function (v) { return v.id === lastExistingTarget_1; });\n sortedEdges = (0, dagre_compound_1.getEdges)(sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id, targetNode === null || targetNode === void 0 ? void 0 : targetNode.id, flattenedNodes, { v: sourceEdge.source, w: sourceEdge.target });\n }\n points = sortedEdges.reduce(function (pre, cur) {\n return __spreadArray(__spreadArray([], pre, true), cur.points.map(function (p) {\n return __assign(__assign({}, p), { x: p.x + dBegin[0], y: p.y + dBegin[1] });\n }), true);\n }, []);\n // 取消首尾节点\n points = points.slice(1, -1);\n sourceEdge.controlPoints = points;\n if ((targetNode === null || targetNode === void 0 ? void 0 : targetNode.type) === dagre_compound_1.NodeType.META) {\n // combo 节点控制点\n var i = combos.findIndex(function (item) { return item.id === (targetNode === null || targetNode === void 0 ? void 0 : targetNode.id); });\n if (!combos[i] || ((_a = combos[i].inEdges) === null || _a === void 0 ? void 0 : _a.some(function (inEdge) { return inEdge.source === sourceNode.id && inEdge.target === targetNode.id; }))) {\n return;\n }\n (_b = combos[i].inEdges) === null || _b === void 0 ? void 0 : _b.push({\n source: sourceNode.id,\n target: targetNode.id,\n controlPoints: points\n });\n }\n if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type) === dagre_compound_1.NodeType.META) {\n var i = combos.findIndex(function (item) { return item.id === (sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.id); });\n if (!combos[i] || ((_c = combos[i].outEdges) === null || _c === void 0 ? void 0 : _c.some(function (oedge) { return oedge.source === sourceNode.id && oedge.target === targetNode.id; }))) {\n return;\n }\n (_d = combos[i].outEdges) === null || _d === void 0 ? void 0 : _d.push({\n source: sourceNode.id,\n target: targetNode.id,\n controlPoints: points\n });\n }\n });\n }\n };\n DagreCompoundLayout.prototype.getType = function () {\n return 'dagreCompound';\n };\n /**\n * 确保布局使用的数据与用户输入数据顺序一致\n * 通过 layoutOrder 排序 节点 与 边\n * @param list\n * @private\n */\n DagreCompoundLayout.prototype.getDataByOrder = function (list) {\n if (list.every(function (n) { return n.layoutOrder !== undefined; })) {\n // 所有数据均设置过索引,表示仅布局,数据未变化,无需处理\n }\n else {\n // 首次布局或动态添加删减节点时重新赋值\n list.forEach(function (n, i) {\n n.layoutOrder = i;\n });\n }\n // 按照 layoutOrder 排序\n return list.sort(function (pre, cur) { return pre.layoutOrder - cur.layoutOrder; });\n };\n return DagreCompoundLayout;\n}(base_1.Base));\nexports.DagreCompoundLayout = DagreCompoundLayout;\n//# sourceMappingURL=dagreCompound.js.map","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toString = Object.prototype.toString;\n/**\n * Checks if an object is an instance of an Array (array or typed array, except those that contain bigint values).\n *\n * @param value - Object to check.\n * @returns True if the object is an array or a typed array.\n */\nexport function isAnyArray(value) {\n const tag = toString.call(value);\n return tag.endsWith('Array]') && !tag.includes('Big');\n}\n//# sourceMappingURL=index.js.map","import { isAnyArray } from 'is-any-array';\n\nfunction max(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n }\n\n if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var _options$fromIndex = options.fromIndex,\n fromIndex = _options$fromIndex === void 0 ? 0 : _options$fromIndex,\n _options$toIndex = options.toIndex,\n toIndex = _options$toIndex === void 0 ? input.length : _options$toIndex;\n\n if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {\n throw new Error('fromIndex must be a positive integer smaller than length');\n }\n\n if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {\n throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');\n }\n\n var maxValue = input[fromIndex];\n\n for (var i = fromIndex + 1; i < toIndex; i++) {\n if (input[i] > maxValue) maxValue = input[i];\n }\n\n return maxValue;\n}\n\nexport { max as default };\n","import { isAnyArray } from 'is-any-array';\n\nfunction min(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n }\n\n if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var _options$fromIndex = options.fromIndex,\n fromIndex = _options$fromIndex === void 0 ? 0 : _options$fromIndex,\n _options$toIndex = options.toIndex,\n toIndex = _options$toIndex === void 0 ? input.length : _options$toIndex;\n\n if (fromIndex < 0 || fromIndex >= input.length || !Number.isInteger(fromIndex)) {\n throw new Error('fromIndex must be a positive integer smaller than length');\n }\n\n if (toIndex <= fromIndex || toIndex > input.length || !Number.isInteger(toIndex)) {\n throw new Error('toIndex must be an integer greater than fromIndex and at most equal to length');\n }\n\n var minValue = input[fromIndex];\n\n for (var i = fromIndex + 1; i < toIndex; i++) {\n if (input[i] < minValue) minValue = input[i];\n }\n\n return minValue;\n}\n\nexport { min as default };\n","import { isAnyArray } from 'is-any-array';\nimport max from 'ml-array-max';\nimport min from 'ml-array-min';\n\nfunction rescale(input) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!isAnyArray(input)) {\n throw new TypeError('input must be an array');\n } else if (input.length === 0) {\n throw new TypeError('input must not be empty');\n }\n\n var output;\n\n if (options.output !== undefined) {\n if (!isAnyArray(options.output)) {\n throw new TypeError('output option must be an array if specified');\n }\n\n output = options.output;\n } else {\n output = new Array(input.length);\n }\n\n var currentMin = min(input);\n var currentMax = max(input);\n\n if (currentMin === currentMax) {\n throw new RangeError('minimum and maximum input values are equal. Cannot rescale a constant array');\n }\n\n var _options$min = options.min,\n minValue = _options$min === void 0 ? options.autoMinMax ? currentMin : 0 : _options$min,\n _options$max = options.max,\n maxValue = _options$max === void 0 ? options.autoMinMax ? currentMax : 1 : _options$max;\n\n if (minValue >= maxValue) {\n throw new RangeError('min option must be smaller than max option');\n }\n\n var factor = (maxValue - minValue) / (currentMax - currentMin);\n\n for (var i = 0; i < input.length; i++) {\n output[i] = (input[i] - currentMin) * factor + minValue;\n }\n\n return output;\n}\n\nexport { rescale as default };\n","const indent = ' '.repeat(2);\nconst indentData = ' '.repeat(4);\n\nexport function inspectMatrix() {\n return inspectMatrixWithOptions(this);\n}\n\nexport function inspectMatrixWithOptions(matrix, options = {}) {\n const { maxRows = 15, maxColumns = 10, maxNumSize = 8 } = options;\n return `${matrix.constructor.name} {\n${indent}[\n${indentData}${inspectData(matrix, maxRows, maxColumns, maxNumSize)}\n${indent}]\n${indent}rows: ${matrix.rows}\n${indent}columns: ${matrix.columns}\n}`;\n}\n\nfunction inspectData(matrix, maxRows, maxColumns, maxNumSize) {\n const { rows, columns } = matrix;\n const maxI = Math.min(rows, maxRows);\n const maxJ = Math.min(columns, maxColumns);\n const result = [];\n for (let i = 0; i < maxI; i++) {\n let line = [];\n for (let j = 0; j < maxJ; j++) {\n line.push(formatNumber(matrix.get(i, j), maxNumSize));\n }\n result.push(`${line.join(' ')}`);\n }\n if (maxJ !== columns) {\n result[result.length - 1] += ` ... ${columns - maxColumns} more columns`;\n }\n if (maxI !== rows) {\n result.push(`... ${rows - maxRows} more rows`);\n }\n return result.join(`\\n${indentData}`);\n}\n\nfunction formatNumber(num, maxNumSize) {\n const numStr = String(num);\n if (numStr.length <= maxNumSize) {\n return numStr.padEnd(maxNumSize, ' ');\n }\n const precise = num.toPrecision(maxNumSize - 2);\n if (precise.length <= maxNumSize) {\n return precise;\n }\n const exponential = num.toExponential(maxNumSize - 2);\n const eIndex = exponential.indexOf('e');\n const e = exponential.slice(eIndex);\n return exponential.slice(0, maxNumSize - e.length) + e;\n}\n","export function installMathOperations(AbstractMatrix, Matrix) {\n AbstractMatrix.prototype.add = function add(value) {\n if (typeof value === 'number') return this.addS(value);\n return this.addM(value);\n };\n\n AbstractMatrix.prototype.addS = function addS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.addM = function addM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.add = function add(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.add(value);\n };\n\n AbstractMatrix.prototype.sub = function sub(value) {\n if (typeof value === 'number') return this.subS(value);\n return this.subM(value);\n };\n\n AbstractMatrix.prototype.subS = function subS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.subM = function subM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.sub = function sub(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sub(value);\n };\n AbstractMatrix.prototype.subtract = AbstractMatrix.prototype.sub;\n AbstractMatrix.prototype.subtractS = AbstractMatrix.prototype.subS;\n AbstractMatrix.prototype.subtractM = AbstractMatrix.prototype.subM;\n AbstractMatrix.subtract = AbstractMatrix.sub;\n\n AbstractMatrix.prototype.mul = function mul(value) {\n if (typeof value === 'number') return this.mulS(value);\n return this.mulM(value);\n };\n\n AbstractMatrix.prototype.mulS = function mulS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.mulM = function mulM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.mul = function mul(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.mul(value);\n };\n AbstractMatrix.prototype.multiply = AbstractMatrix.prototype.mul;\n AbstractMatrix.prototype.multiplyS = AbstractMatrix.prototype.mulS;\n AbstractMatrix.prototype.multiplyM = AbstractMatrix.prototype.mulM;\n AbstractMatrix.multiply = AbstractMatrix.mul;\n\n AbstractMatrix.prototype.div = function div(value) {\n if (typeof value === 'number') return this.divS(value);\n return this.divM(value);\n };\n\n AbstractMatrix.prototype.divS = function divS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.divM = function divM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.div = function div(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.div(value);\n };\n AbstractMatrix.prototype.divide = AbstractMatrix.prototype.div;\n AbstractMatrix.prototype.divideS = AbstractMatrix.prototype.divS;\n AbstractMatrix.prototype.divideM = AbstractMatrix.prototype.divM;\n AbstractMatrix.divide = AbstractMatrix.div;\n\n AbstractMatrix.prototype.mod = function mod(value) {\n if (typeof value === 'number') return this.modS(value);\n return this.modM(value);\n };\n\n AbstractMatrix.prototype.modS = function modS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) % value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.modM = function modM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) % matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.mod = function mod(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.mod(value);\n };\n AbstractMatrix.prototype.modulus = AbstractMatrix.prototype.mod;\n AbstractMatrix.prototype.modulusS = AbstractMatrix.prototype.modS;\n AbstractMatrix.prototype.modulusM = AbstractMatrix.prototype.modM;\n AbstractMatrix.modulus = AbstractMatrix.mod;\n\n AbstractMatrix.prototype.and = function and(value) {\n if (typeof value === 'number') return this.andS(value);\n return this.andM(value);\n };\n\n AbstractMatrix.prototype.andS = function andS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) & value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.andM = function andM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) & matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.and = function and(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.and(value);\n };\n\n AbstractMatrix.prototype.or = function or(value) {\n if (typeof value === 'number') return this.orS(value);\n return this.orM(value);\n };\n\n AbstractMatrix.prototype.orS = function orS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) | value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.orM = function orM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) | matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.or = function or(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.or(value);\n };\n\n AbstractMatrix.prototype.xor = function xor(value) {\n if (typeof value === 'number') return this.xorS(value);\n return this.xorM(value);\n };\n\n AbstractMatrix.prototype.xorS = function xorS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) ^ value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.xorM = function xorM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) ^ matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.xor = function xor(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.xor(value);\n };\n\n AbstractMatrix.prototype.leftShift = function leftShift(value) {\n if (typeof value === 'number') return this.leftShiftS(value);\n return this.leftShiftM(value);\n };\n\n AbstractMatrix.prototype.leftShiftS = function leftShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) << value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.leftShiftM = function leftShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) << matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.leftShift = function leftShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.leftShift(value);\n };\n\n AbstractMatrix.prototype.signPropagatingRightShift = function signPropagatingRightShift(value) {\n if (typeof value === 'number') return this.signPropagatingRightShiftS(value);\n return this.signPropagatingRightShiftM(value);\n };\n\n AbstractMatrix.prototype.signPropagatingRightShiftS = function signPropagatingRightShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >> value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.signPropagatingRightShiftM = function signPropagatingRightShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >> matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.signPropagatingRightShift = function signPropagatingRightShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.signPropagatingRightShift(value);\n };\n\n AbstractMatrix.prototype.rightShift = function rightShift(value) {\n if (typeof value === 'number') return this.rightShiftS(value);\n return this.rightShiftM(value);\n };\n\n AbstractMatrix.prototype.rightShiftS = function rightShiftS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >>> value);\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.rightShiftM = function rightShiftM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) >>> matrix.get(i, j));\n }\n }\n return this;\n };\n\n AbstractMatrix.rightShift = function rightShift(matrix, value) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.rightShift(value);\n };\n AbstractMatrix.prototype.zeroFillRightShift = AbstractMatrix.prototype.rightShift;\n AbstractMatrix.prototype.zeroFillRightShiftS = AbstractMatrix.prototype.rightShiftS;\n AbstractMatrix.prototype.zeroFillRightShiftM = AbstractMatrix.prototype.rightShiftM;\n AbstractMatrix.zeroFillRightShift = AbstractMatrix.rightShift;\n\n AbstractMatrix.prototype.not = function not() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, ~(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.not = function not(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.not();\n };\n\n AbstractMatrix.prototype.abs = function abs() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.abs(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.abs = function abs(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.abs();\n };\n\n AbstractMatrix.prototype.acos = function acos() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.acos(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.acos = function acos(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.acos();\n };\n\n AbstractMatrix.prototype.acosh = function acosh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.acosh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.acosh = function acosh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.acosh();\n };\n\n AbstractMatrix.prototype.asin = function asin() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.asin(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.asin = function asin(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.asin();\n };\n\n AbstractMatrix.prototype.asinh = function asinh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.asinh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.asinh = function asinh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.asinh();\n };\n\n AbstractMatrix.prototype.atan = function atan() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.atan(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.atan = function atan(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.atan();\n };\n\n AbstractMatrix.prototype.atanh = function atanh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.atanh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.atanh = function atanh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.atanh();\n };\n\n AbstractMatrix.prototype.cbrt = function cbrt() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cbrt(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cbrt = function cbrt(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cbrt();\n };\n\n AbstractMatrix.prototype.ceil = function ceil() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.ceil(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.ceil = function ceil(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.ceil();\n };\n\n AbstractMatrix.prototype.clz32 = function clz32() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.clz32(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.clz32 = function clz32(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.clz32();\n };\n\n AbstractMatrix.prototype.cos = function cos() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cos(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cos = function cos(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cos();\n };\n\n AbstractMatrix.prototype.cosh = function cosh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.cosh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.cosh = function cosh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.cosh();\n };\n\n AbstractMatrix.prototype.exp = function exp() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.exp(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.exp = function exp(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.exp();\n };\n\n AbstractMatrix.prototype.expm1 = function expm1() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.expm1(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.expm1 = function expm1(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.expm1();\n };\n\n AbstractMatrix.prototype.floor = function floor() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.floor(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.floor = function floor(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.floor();\n };\n\n AbstractMatrix.prototype.fround = function fround() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.fround(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.fround = function fround(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.fround();\n };\n\n AbstractMatrix.prototype.log = function log() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log = function log(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log();\n };\n\n AbstractMatrix.prototype.log1p = function log1p() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log1p(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log1p = function log1p(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log1p();\n };\n\n AbstractMatrix.prototype.log10 = function log10() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log10(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log10 = function log10(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log10();\n };\n\n AbstractMatrix.prototype.log2 = function log2() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.log2(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.log2 = function log2(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.log2();\n };\n\n AbstractMatrix.prototype.round = function round() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.round(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.round = function round(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.round();\n };\n\n AbstractMatrix.prototype.sign = function sign() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sign(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sign = function sign(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sign();\n };\n\n AbstractMatrix.prototype.sin = function sin() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sin(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sin = function sin(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sin();\n };\n\n AbstractMatrix.prototype.sinh = function sinh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sinh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sinh = function sinh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sinh();\n };\n\n AbstractMatrix.prototype.sqrt = function sqrt() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.sqrt(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.sqrt = function sqrt(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.sqrt();\n };\n\n AbstractMatrix.prototype.tan = function tan() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.tan(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.tan = function tan(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.tan();\n };\n\n AbstractMatrix.prototype.tanh = function tanh() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.tanh(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.tanh = function tanh(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.tanh();\n };\n\n AbstractMatrix.prototype.trunc = function trunc() {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.trunc(this.get(i, j)));\n }\n }\n return this;\n };\n\n AbstractMatrix.trunc = function trunc(matrix) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.trunc();\n };\n\n AbstractMatrix.pow = function pow(matrix, arg0) {\n const newMatrix = new Matrix(matrix);\n return newMatrix.pow(arg0);\n };\n\n AbstractMatrix.prototype.pow = function pow(value) {\n if (typeof value === 'number') return this.powS(value);\n return this.powM(value);\n };\n\n AbstractMatrix.prototype.powS = function powS(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.pow(this.get(i, j), value));\n }\n }\n return this;\n };\n\n AbstractMatrix.prototype.powM = function powM(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (this.rows !== matrix.rows ||\n this.columns !== matrix.columns) {\n throw new RangeError('Matrices dimensions must be equal');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, Math.pow(this.get(i, j), matrix.get(i, j)));\n }\n }\n return this;\n };\n}\n","/**\n * @private\n * Check that a row index is not out of bounds\n * @param {Matrix} matrix\n * @param {number} index\n * @param {boolean} [outer]\n */\nexport function checkRowIndex(matrix, index, outer) {\n let max = outer ? matrix.rows : matrix.rows - 1;\n if (index < 0 || index > max) {\n throw new RangeError('Row index out of range');\n }\n}\n\n/**\n * @private\n * Check that a column index is not out of bounds\n * @param {Matrix} matrix\n * @param {number} index\n * @param {boolean} [outer]\n */\nexport function checkColumnIndex(matrix, index, outer) {\n let max = outer ? matrix.columns : matrix.columns - 1;\n if (index < 0 || index > max) {\n throw new RangeError('Column index out of range');\n }\n}\n\n/**\n * @private\n * Check that the provided vector is an array with the right length\n * @param {Matrix} matrix\n * @param {Array|Matrix} vector\n * @return {Array}\n * @throws {RangeError}\n */\nexport function checkRowVector(matrix, vector) {\n if (vector.to1DArray) {\n vector = vector.to1DArray();\n }\n if (vector.length !== matrix.columns) {\n throw new RangeError(\n 'vector size must be the same as the number of columns',\n );\n }\n return vector;\n}\n\n/**\n * @private\n * Check that the provided vector is an array with the right length\n * @param {Matrix} matrix\n * @param {Array|Matrix} vector\n * @return {Array}\n * @throws {RangeError}\n */\nexport function checkColumnVector(matrix, vector) {\n if (vector.to1DArray) {\n vector = vector.to1DArray();\n }\n if (vector.length !== matrix.rows) {\n throw new RangeError('vector size must be the same as the number of rows');\n }\n return vector;\n}\n\nexport function checkIndices(matrix, rowIndices, columnIndices) {\n return {\n row: checkRowIndices(matrix, rowIndices),\n column: checkColumnIndices(matrix, columnIndices),\n };\n}\n\nexport function checkRowIndices(matrix, rowIndices) {\n if (typeof rowIndices !== 'object') {\n throw new TypeError('unexpected type for row indices');\n }\n\n let rowOut = rowIndices.some((r) => {\n return r < 0 || r >= matrix.rows;\n });\n\n if (rowOut) {\n throw new RangeError('row indices are out of range');\n }\n\n if (!Array.isArray(rowIndices)) rowIndices = Array.from(rowIndices);\n\n return rowIndices;\n}\n\nexport function checkColumnIndices(matrix, columnIndices) {\n if (typeof columnIndices !== 'object') {\n throw new TypeError('unexpected type for column indices');\n }\n\n let columnOut = columnIndices.some((c) => {\n return c < 0 || c >= matrix.columns;\n });\n\n if (columnOut) {\n throw new RangeError('column indices are out of range');\n }\n if (!Array.isArray(columnIndices)) columnIndices = Array.from(columnIndices);\n\n return columnIndices;\n}\n\nexport function checkRange(matrix, startRow, endRow, startColumn, endColumn) {\n if (arguments.length !== 5) {\n throw new RangeError('expected 4 arguments');\n }\n checkNumber('startRow', startRow);\n checkNumber('endRow', endRow);\n checkNumber('startColumn', startColumn);\n checkNumber('endColumn', endColumn);\n if (\n startRow > endRow ||\n startColumn > endColumn ||\n startRow < 0 ||\n startRow >= matrix.rows ||\n endRow < 0 ||\n endRow >= matrix.rows ||\n startColumn < 0 ||\n startColumn >= matrix.columns ||\n endColumn < 0 ||\n endColumn >= matrix.columns\n ) {\n throw new RangeError('Submatrix indices are out of range');\n }\n}\n\nexport function newArray(length, value = 0) {\n let array = [];\n for (let i = 0; i < length; i++) {\n array.push(value);\n }\n return array;\n}\n\nfunction checkNumber(name, value) {\n if (typeof value !== 'number') {\n throw new TypeError(`${name} must be a number`);\n }\n}\n","import { newArray } from './util';\n\nexport function sumByRow(matrix) {\n let sum = newArray(matrix.rows);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[i] += matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function sumByColumn(matrix) {\n let sum = newArray(matrix.columns);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[j] += matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function sumAll(matrix) {\n let v = 0;\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n v += matrix.get(i, j);\n }\n }\n return v;\n}\n\nexport function productByRow(matrix) {\n let sum = newArray(matrix.rows, 1);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[i] *= matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function productByColumn(matrix) {\n let sum = newArray(matrix.columns, 1);\n for (let i = 0; i < matrix.rows; ++i) {\n for (let j = 0; j < matrix.columns; ++j) {\n sum[j] *= matrix.get(i, j);\n }\n }\n return sum;\n}\n\nexport function productAll(matrix) {\n let v = 1;\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n v *= matrix.get(i, j);\n }\n }\n return v;\n}\n\nexport function varianceByRow(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const variance = [];\n\n for (let i = 0; i < rows; i++) {\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let j = 0; j < cols; j++) {\n x = matrix.get(i, j) - mean[i];\n sum1 += x;\n sum2 += x * x;\n }\n if (unbiased) {\n variance.push((sum2 - (sum1 * sum1) / cols) / (cols - 1));\n } else {\n variance.push((sum2 - (sum1 * sum1) / cols) / cols);\n }\n }\n return variance;\n}\n\nexport function varianceByColumn(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const variance = [];\n\n for (let j = 0; j < cols; j++) {\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let i = 0; i < rows; i++) {\n x = matrix.get(i, j) - mean[j];\n sum1 += x;\n sum2 += x * x;\n }\n if (unbiased) {\n variance.push((sum2 - (sum1 * sum1) / rows) / (rows - 1));\n } else {\n variance.push((sum2 - (sum1 * sum1) / rows) / rows);\n }\n }\n return variance;\n}\n\nexport function varianceAll(matrix, unbiased, mean) {\n const rows = matrix.rows;\n const cols = matrix.columns;\n const size = rows * cols;\n\n let sum1 = 0;\n let sum2 = 0;\n let x = 0;\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < cols; j++) {\n x = matrix.get(i, j) - mean;\n sum1 += x;\n sum2 += x * x;\n }\n }\n if (unbiased) {\n return (sum2 - (sum1 * sum1) / size) / (size - 1);\n } else {\n return (sum2 - (sum1 * sum1) / size) / size;\n }\n}\n\nexport function centerByRow(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean[i]);\n }\n }\n}\n\nexport function centerByColumn(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean[j]);\n }\n }\n}\n\nexport function centerAll(matrix, mean) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) - mean);\n }\n }\n}\n\nexport function getScaleByRow(matrix) {\n const scale = [];\n for (let i = 0; i < matrix.rows; i++) {\n let sum = 0;\n for (let j = 0; j < matrix.columns; j++) {\n sum += Math.pow(matrix.get(i, j), 2) / (matrix.columns - 1);\n }\n scale.push(Math.sqrt(sum));\n }\n return scale;\n}\n\nexport function scaleByRow(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale[i]);\n }\n }\n}\n\nexport function getScaleByColumn(matrix) {\n const scale = [];\n for (let j = 0; j < matrix.columns; j++) {\n let sum = 0;\n for (let i = 0; i < matrix.rows; i++) {\n sum += Math.pow(matrix.get(i, j), 2) / (matrix.rows - 1);\n }\n scale.push(Math.sqrt(sum));\n }\n return scale;\n}\n\nexport function scaleByColumn(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale[j]);\n }\n }\n}\n\nexport function getScaleAll(matrix) {\n const divider = matrix.size - 1;\n let sum = 0;\n for (let j = 0; j < matrix.columns; j++) {\n for (let i = 0; i < matrix.rows; i++) {\n sum += Math.pow(matrix.get(i, j), 2) / divider;\n }\n }\n return Math.sqrt(sum);\n}\n\nexport function scaleAll(matrix, scale) {\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n matrix.set(i, j, matrix.get(i, j) / scale);\n }\n }\n}\n","import rescale from 'ml-array-rescale';\n\nimport { inspectMatrix, inspectMatrixWithOptions } from './inspect';\nimport { installMathOperations } from './mathOperations';\nimport {\n sumByRow,\n sumByColumn,\n sumAll,\n productByRow,\n productByColumn,\n productAll,\n varianceByRow,\n varianceByColumn,\n varianceAll,\n centerByRow,\n centerByColumn,\n centerAll,\n scaleByRow,\n scaleByColumn,\n scaleAll,\n getScaleByRow,\n getScaleByColumn,\n getScaleAll,\n} from './stat';\nimport {\n checkRowVector,\n checkRowIndex,\n checkColumnIndex,\n checkColumnVector,\n checkRange,\n checkIndices,\n} from './util';\n\nexport class AbstractMatrix {\n static from1DArray(newRows, newColumns, newData) {\n let length = newRows * newColumns;\n if (length !== newData.length) {\n throw new RangeError('data length does not match given dimensions');\n }\n let newMatrix = new Matrix(newRows, newColumns);\n for (let row = 0; row < newRows; row++) {\n for (let column = 0; column < newColumns; column++) {\n newMatrix.set(row, column, newData[row * newColumns + column]);\n }\n }\n return newMatrix;\n }\n\n static rowVector(newData) {\n let vector = new Matrix(1, newData.length);\n for (let i = 0; i < newData.length; i++) {\n vector.set(0, i, newData[i]);\n }\n return vector;\n }\n\n static columnVector(newData) {\n let vector = new Matrix(newData.length, 1);\n for (let i = 0; i < newData.length; i++) {\n vector.set(i, 0, newData[i]);\n }\n return vector;\n }\n\n static zeros(rows, columns) {\n return new Matrix(rows, columns);\n }\n\n static ones(rows, columns) {\n return new Matrix(rows, columns).fill(1);\n }\n\n static rand(rows, columns, options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { random = Math.random } = options;\n let matrix = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n matrix.set(i, j, random());\n }\n }\n return matrix;\n }\n\n static randInt(rows, columns, options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1000, random = Math.random } = options;\n if (!Number.isInteger(min)) throw new TypeError('min must be an integer');\n if (!Number.isInteger(max)) throw new TypeError('max must be an integer');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let interval = max - min;\n let matrix = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n let value = min + Math.round(random() * interval);\n matrix.set(i, j, value);\n }\n }\n return matrix;\n }\n\n static eye(rows, columns, value) {\n if (columns === undefined) columns = rows;\n if (value === undefined) value = 1;\n let min = Math.min(rows, columns);\n let matrix = this.zeros(rows, columns);\n for (let i = 0; i < min; i++) {\n matrix.set(i, i, value);\n }\n return matrix;\n }\n\n static diag(data, rows, columns) {\n let l = data.length;\n if (rows === undefined) rows = l;\n if (columns === undefined) columns = rows;\n let min = Math.min(l, rows, columns);\n let matrix = this.zeros(rows, columns);\n for (let i = 0; i < min; i++) {\n matrix.set(i, i, data[i]);\n }\n return matrix;\n }\n\n static min(matrix1, matrix2) {\n matrix1 = this.checkMatrix(matrix1);\n matrix2 = this.checkMatrix(matrix2);\n let rows = matrix1.rows;\n let columns = matrix1.columns;\n let result = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n result.set(i, j, Math.min(matrix1.get(i, j), matrix2.get(i, j)));\n }\n }\n return result;\n }\n\n static max(matrix1, matrix2) {\n matrix1 = this.checkMatrix(matrix1);\n matrix2 = this.checkMatrix(matrix2);\n let rows = matrix1.rows;\n let columns = matrix1.columns;\n let result = new this(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n result.set(i, j, Math.max(matrix1.get(i, j), matrix2.get(i, j)));\n }\n }\n return result;\n }\n\n static checkMatrix(value) {\n return AbstractMatrix.isMatrix(value) ? value : new Matrix(value);\n }\n\n static isMatrix(value) {\n return value != null && value.klass === 'Matrix';\n }\n\n get size() {\n return this.rows * this.columns;\n }\n\n apply(callback) {\n if (typeof callback !== 'function') {\n throw new TypeError('callback must be a function');\n }\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n callback.call(this, i, j);\n }\n }\n return this;\n }\n\n to1DArray() {\n let array = [];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n array.push(this.get(i, j));\n }\n }\n return array;\n }\n\n to2DArray() {\n let copy = [];\n for (let i = 0; i < this.rows; i++) {\n copy.push([]);\n for (let j = 0; j < this.columns; j++) {\n copy[i].push(this.get(i, j));\n }\n }\n return copy;\n }\n\n toJSON() {\n return this.to2DArray();\n }\n\n isRowVector() {\n return this.rows === 1;\n }\n\n isColumnVector() {\n return this.columns === 1;\n }\n\n isVector() {\n return this.rows === 1 || this.columns === 1;\n }\n\n isSquare() {\n return this.rows === this.columns;\n }\n\n isSymmetric() {\n if (this.isSquare()) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j <= i; j++) {\n if (this.get(i, j) !== this.get(j, i)) {\n return false;\n }\n }\n }\n return true;\n }\n return false;\n }\n\n isEchelonForm() {\n let i = 0;\n let j = 0;\n let previousColumn = -1;\n let isEchelonForm = true;\n let checked = false;\n while (i < this.rows && isEchelonForm) {\n j = 0;\n checked = false;\n while (j < this.columns && checked === false) {\n if (this.get(i, j) === 0) {\n j++;\n } else if (this.get(i, j) === 1 && j > previousColumn) {\n checked = true;\n previousColumn = j;\n } else {\n isEchelonForm = false;\n checked = true;\n }\n }\n i++;\n }\n return isEchelonForm;\n }\n\n isReducedEchelonForm() {\n let i = 0;\n let j = 0;\n let previousColumn = -1;\n let isReducedEchelonForm = true;\n let checked = false;\n while (i < this.rows && isReducedEchelonForm) {\n j = 0;\n checked = false;\n while (j < this.columns && checked === false) {\n if (this.get(i, j) === 0) {\n j++;\n } else if (this.get(i, j) === 1 && j > previousColumn) {\n checked = true;\n previousColumn = j;\n } else {\n isReducedEchelonForm = false;\n checked = true;\n }\n }\n for (let k = j + 1; k < this.rows; k++) {\n if (this.get(i, k) !== 0) {\n isReducedEchelonForm = false;\n }\n }\n i++;\n }\n return isReducedEchelonForm;\n }\n\n echelonForm() {\n let result = this.clone();\n let h = 0;\n let k = 0;\n while (h < result.rows && k < result.columns) {\n let iMax = h;\n for (let i = h; i < result.rows; i++) {\n if (result.get(i, k) > result.get(iMax, k)) {\n iMax = i;\n }\n }\n if (result.get(iMax, k) === 0) {\n k++;\n } else {\n result.swapRows(h, iMax);\n let tmp = result.get(h, k);\n for (let j = k; j < result.columns; j++) {\n result.set(h, j, result.get(h, j) / tmp);\n }\n for (let i = h + 1; i < result.rows; i++) {\n let factor = result.get(i, k) / result.get(h, k);\n result.set(i, k, 0);\n for (let j = k + 1; j < result.columns; j++) {\n result.set(i, j, result.get(i, j) - result.get(h, j) * factor);\n }\n }\n h++;\n k++;\n }\n }\n return result;\n }\n\n reducedEchelonForm() {\n let result = this.echelonForm();\n let m = result.columns;\n let n = result.rows;\n let h = n - 1;\n while (h >= 0) {\n if (result.maxRow(h) === 0) {\n h--;\n } else {\n let p = 0;\n let pivot = false;\n while (p < n && pivot === false) {\n if (result.get(h, p) === 1) {\n pivot = true;\n } else {\n p++;\n }\n }\n for (let i = 0; i < h; i++) {\n let factor = result.get(i, p);\n for (let j = p; j < m; j++) {\n let tmp = result.get(i, j) - factor * result.get(h, j);\n result.set(i, j, tmp);\n }\n }\n h--;\n }\n }\n return result;\n }\n\n set() {\n throw new Error('set method is unimplemented');\n }\n\n get() {\n throw new Error('get method is unimplemented');\n }\n\n repeat(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { rows = 1, columns = 1 } = options;\n if (!Number.isInteger(rows) || rows <= 0) {\n throw new TypeError('rows must be a positive integer');\n }\n if (!Number.isInteger(columns) || columns <= 0) {\n throw new TypeError('columns must be a positive integer');\n }\n let matrix = new Matrix(this.rows * rows, this.columns * columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n matrix.setSubMatrix(this, this.rows * i, this.columns * j);\n }\n }\n return matrix;\n }\n\n fill(value) {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, value);\n }\n }\n return this;\n }\n\n neg() {\n return this.mulS(-1);\n }\n\n getRow(index) {\n checkRowIndex(this, index);\n let row = [];\n for (let i = 0; i < this.columns; i++) {\n row.push(this.get(index, i));\n }\n return row;\n }\n\n getRowVector(index) {\n return Matrix.rowVector(this.getRow(index));\n }\n\n setRow(index, array) {\n checkRowIndex(this, index);\n array = checkRowVector(this, array);\n for (let i = 0; i < this.columns; i++) {\n this.set(index, i, array[i]);\n }\n return this;\n }\n\n swapRows(row1, row2) {\n checkRowIndex(this, row1);\n checkRowIndex(this, row2);\n for (let i = 0; i < this.columns; i++) {\n let temp = this.get(row1, i);\n this.set(row1, i, this.get(row2, i));\n this.set(row2, i, temp);\n }\n return this;\n }\n\n getColumn(index) {\n checkColumnIndex(this, index);\n let column = [];\n for (let i = 0; i < this.rows; i++) {\n column.push(this.get(i, index));\n }\n return column;\n }\n\n getColumnVector(index) {\n return Matrix.columnVector(this.getColumn(index));\n }\n\n setColumn(index, array) {\n checkColumnIndex(this, index);\n array = checkColumnVector(this, array);\n for (let i = 0; i < this.rows; i++) {\n this.set(i, index, array[i]);\n }\n return this;\n }\n\n swapColumns(column1, column2) {\n checkColumnIndex(this, column1);\n checkColumnIndex(this, column2);\n for (let i = 0; i < this.rows; i++) {\n let temp = this.get(i, column1);\n this.set(i, column1, this.get(i, column2));\n this.set(i, column2, temp);\n }\n return this;\n }\n\n addRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + vector[j]);\n }\n }\n return this;\n }\n\n subRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - vector[j]);\n }\n }\n return this;\n }\n\n mulRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * vector[j]);\n }\n }\n return this;\n }\n\n divRowVector(vector) {\n vector = checkRowVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / vector[j]);\n }\n }\n return this;\n }\n\n addColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) + vector[i]);\n }\n }\n return this;\n }\n\n subColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) - vector[i]);\n }\n }\n return this;\n }\n\n mulColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) * vector[i]);\n }\n }\n return this;\n }\n\n divColumnVector(vector) {\n vector = checkColumnVector(this, vector);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n this.set(i, j, this.get(i, j) / vector[i]);\n }\n }\n return this;\n }\n\n mulRow(index, value) {\n checkRowIndex(this, index);\n for (let i = 0; i < this.columns; i++) {\n this.set(index, i, this.get(index, i) * value);\n }\n return this;\n }\n\n mulColumn(index, value) {\n checkColumnIndex(this, index);\n for (let i = 0; i < this.rows; i++) {\n this.set(i, index, this.get(i, index) * value);\n }\n return this;\n }\n\n max() {\n let v = this.get(0, 0);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) > v) {\n v = this.get(i, j);\n }\n }\n }\n return v;\n }\n\n maxIndex() {\n let v = this.get(0, 0);\n let idx = [0, 0];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) > v) {\n v = this.get(i, j);\n idx[0] = i;\n idx[1] = j;\n }\n }\n }\n return idx;\n }\n\n min() {\n let v = this.get(0, 0);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) < v) {\n v = this.get(i, j);\n }\n }\n }\n return v;\n }\n\n minIndex() {\n let v = this.get(0, 0);\n let idx = [0, 0];\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n if (this.get(i, j) < v) {\n v = this.get(i, j);\n idx[0] = i;\n idx[1] = j;\n }\n }\n }\n return idx;\n }\n\n maxRow(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) > v) {\n v = this.get(row, i);\n }\n }\n return v;\n }\n\n maxRowIndex(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n let idx = [row, 0];\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) > v) {\n v = this.get(row, i);\n idx[1] = i;\n }\n }\n return idx;\n }\n\n minRow(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) < v) {\n v = this.get(row, i);\n }\n }\n return v;\n }\n\n minRowIndex(row) {\n checkRowIndex(this, row);\n let v = this.get(row, 0);\n let idx = [row, 0];\n for (let i = 1; i < this.columns; i++) {\n if (this.get(row, i) < v) {\n v = this.get(row, i);\n idx[1] = i;\n }\n }\n return idx;\n }\n\n maxColumn(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) > v) {\n v = this.get(i, column);\n }\n }\n return v;\n }\n\n maxColumnIndex(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n let idx = [0, column];\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) > v) {\n v = this.get(i, column);\n idx[0] = i;\n }\n }\n return idx;\n }\n\n minColumn(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) < v) {\n v = this.get(i, column);\n }\n }\n return v;\n }\n\n minColumnIndex(column) {\n checkColumnIndex(this, column);\n let v = this.get(0, column);\n let idx = [0, column];\n for (let i = 1; i < this.rows; i++) {\n if (this.get(i, column) < v) {\n v = this.get(i, column);\n idx[0] = i;\n }\n }\n return idx;\n }\n\n diag() {\n let min = Math.min(this.rows, this.columns);\n let diag = [];\n for (let i = 0; i < min; i++) {\n diag.push(this.get(i, i));\n }\n return diag;\n }\n\n norm(type = 'frobenius') {\n let result = 0;\n if (type === 'max') {\n return this.max();\n } else if (type === 'frobenius') {\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n result = result + this.get(i, j) * this.get(i, j);\n }\n }\n return Math.sqrt(result);\n } else {\n throw new RangeError(`unknown norm type: ${type}`);\n }\n }\n\n cumulativeSum() {\n let sum = 0;\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n sum += this.get(i, j);\n this.set(i, j, sum);\n }\n }\n return this;\n }\n\n dot(vector2) {\n if (AbstractMatrix.isMatrix(vector2)) vector2 = vector2.to1DArray();\n let vector1 = this.to1DArray();\n if (vector1.length !== vector2.length) {\n throw new RangeError('vectors do not have the same size');\n }\n let dot = 0;\n for (let i = 0; i < vector1.length; i++) {\n dot += vector1[i] * vector2[i];\n }\n return dot;\n }\n\n mmul(other) {\n other = Matrix.checkMatrix(other);\n\n let m = this.rows;\n let n = this.columns;\n let p = other.columns;\n\n let result = new Matrix(m, p);\n\n let Bcolj = new Float64Array(n);\n for (let j = 0; j < p; j++) {\n for (let k = 0; k < n; k++) {\n Bcolj[k] = other.get(k, j);\n }\n\n for (let i = 0; i < m; i++) {\n let s = 0;\n for (let k = 0; k < n; k++) {\n s += this.get(i, k) * Bcolj[k];\n }\n\n result.set(i, j, s);\n }\n }\n return result;\n }\n\n strassen2x2(other) {\n other = Matrix.checkMatrix(other);\n let result = new Matrix(2, 2);\n const a11 = this.get(0, 0);\n const b11 = other.get(0, 0);\n const a12 = this.get(0, 1);\n const b12 = other.get(0, 1);\n const a21 = this.get(1, 0);\n const b21 = other.get(1, 0);\n const a22 = this.get(1, 1);\n const b22 = other.get(1, 1);\n\n // Compute intermediate values.\n const m1 = (a11 + a22) * (b11 + b22);\n const m2 = (a21 + a22) * b11;\n const m3 = a11 * (b12 - b22);\n const m4 = a22 * (b21 - b11);\n const m5 = (a11 + a12) * b22;\n const m6 = (a21 - a11) * (b11 + b12);\n const m7 = (a12 - a22) * (b21 + b22);\n\n // Combine intermediate values into the output.\n const c00 = m1 + m4 - m5 + m7;\n const c01 = m3 + m5;\n const c10 = m2 + m4;\n const c11 = m1 - m2 + m3 + m6;\n\n result.set(0, 0, c00);\n result.set(0, 1, c01);\n result.set(1, 0, c10);\n result.set(1, 1, c11);\n return result;\n }\n\n strassen3x3(other) {\n other = Matrix.checkMatrix(other);\n let result = new Matrix(3, 3);\n\n const a00 = this.get(0, 0);\n const a01 = this.get(0, 1);\n const a02 = this.get(0, 2);\n const a10 = this.get(1, 0);\n const a11 = this.get(1, 1);\n const a12 = this.get(1, 2);\n const a20 = this.get(2, 0);\n const a21 = this.get(2, 1);\n const a22 = this.get(2, 2);\n\n const b00 = other.get(0, 0);\n const b01 = other.get(0, 1);\n const b02 = other.get(0, 2);\n const b10 = other.get(1, 0);\n const b11 = other.get(1, 1);\n const b12 = other.get(1, 2);\n const b20 = other.get(2, 0);\n const b21 = other.get(2, 1);\n const b22 = other.get(2, 2);\n\n const m1 = (a00 + a01 + a02 - a10 - a11 - a21 - a22) * b11;\n const m2 = (a00 - a10) * (-b01 + b11);\n const m3 = a11 * (-b00 + b01 + b10 - b11 - b12 - b20 + b22);\n const m4 = (-a00 + a10 + a11) * (b00 - b01 + b11);\n const m5 = (a10 + a11) * (-b00 + b01);\n const m6 = a00 * b00;\n const m7 = (-a00 + a20 + a21) * (b00 - b02 + b12);\n const m8 = (-a00 + a20) * (b02 - b12);\n const m9 = (a20 + a21) * (-b00 + b02);\n const m10 = (a00 + a01 + a02 - a11 - a12 - a20 - a21) * b12;\n const m11 = a21 * (-b00 + b02 + b10 - b11 - b12 - b20 + b21);\n const m12 = (-a02 + a21 + a22) * (b11 + b20 - b21);\n const m13 = (a02 - a22) * (b11 - b21);\n const m14 = a02 * b20;\n const m15 = (a21 + a22) * (-b20 + b21);\n const m16 = (-a02 + a11 + a12) * (b12 + b20 - b22);\n const m17 = (a02 - a12) * (b12 - b22);\n const m18 = (a11 + a12) * (-b20 + b22);\n const m19 = a01 * b10;\n const m20 = a12 * b21;\n const m21 = a10 * b02;\n const m22 = a20 * b01;\n const m23 = a22 * b22;\n\n const c00 = m6 + m14 + m19;\n const c01 = m1 + m4 + m5 + m6 + m12 + m14 + m15;\n const c02 = m6 + m7 + m9 + m10 + m14 + m16 + m18;\n const c10 = m2 + m3 + m4 + m6 + m14 + m16 + m17;\n const c11 = m2 + m4 + m5 + m6 + m20;\n const c12 = m14 + m16 + m17 + m18 + m21;\n const c20 = m6 + m7 + m8 + m11 + m12 + m13 + m14;\n const c21 = m12 + m13 + m14 + m15 + m22;\n const c22 = m6 + m7 + m8 + m9 + m23;\n\n result.set(0, 0, c00);\n result.set(0, 1, c01);\n result.set(0, 2, c02);\n result.set(1, 0, c10);\n result.set(1, 1, c11);\n result.set(1, 2, c12);\n result.set(2, 0, c20);\n result.set(2, 1, c21);\n result.set(2, 2, c22);\n return result;\n }\n\n mmulStrassen(y) {\n y = Matrix.checkMatrix(y);\n let x = this.clone();\n let r1 = x.rows;\n let c1 = x.columns;\n let r2 = y.rows;\n let c2 = y.columns;\n if (c1 !== r2) {\n // eslint-disable-next-line no-console\n console.warn(\n `Multiplying ${r1} x ${c1} and ${r2} x ${c2} matrix: dimensions do not match.`,\n );\n }\n\n // Put a matrix into the top left of a matrix of zeros.\n // `rows` and `cols` are the dimensions of the output matrix.\n function embed(mat, rows, cols) {\n let r = mat.rows;\n let c = mat.columns;\n if (r === rows && c === cols) {\n return mat;\n } else {\n let resultat = AbstractMatrix.zeros(rows, cols);\n resultat = resultat.setSubMatrix(mat, 0, 0);\n return resultat;\n }\n }\n\n // Make sure both matrices are the same size.\n // This is exclusively for simplicity:\n // this algorithm can be implemented with matrices of different sizes.\n\n let r = Math.max(r1, r2);\n let c = Math.max(c1, c2);\n x = embed(x, r, c);\n y = embed(y, r, c);\n\n // Our recursive multiplication function.\n function blockMult(a, b, rows, cols) {\n // For small matrices, resort to naive multiplication.\n if (rows <= 512 || cols <= 512) {\n return a.mmul(b); // a is equivalent to this\n }\n\n // Apply dynamic padding.\n if (rows % 2 === 1 && cols % 2 === 1) {\n a = embed(a, rows + 1, cols + 1);\n b = embed(b, rows + 1, cols + 1);\n } else if (rows % 2 === 1) {\n a = embed(a, rows + 1, cols);\n b = embed(b, rows + 1, cols);\n } else if (cols % 2 === 1) {\n a = embed(a, rows, cols + 1);\n b = embed(b, rows, cols + 1);\n }\n\n let halfRows = parseInt(a.rows / 2, 10);\n let halfCols = parseInt(a.columns / 2, 10);\n // Subdivide input matrices.\n let a11 = a.subMatrix(0, halfRows - 1, 0, halfCols - 1);\n let b11 = b.subMatrix(0, halfRows - 1, 0, halfCols - 1);\n\n let a12 = a.subMatrix(0, halfRows - 1, halfCols, a.columns - 1);\n let b12 = b.subMatrix(0, halfRows - 1, halfCols, b.columns - 1);\n\n let a21 = a.subMatrix(halfRows, a.rows - 1, 0, halfCols - 1);\n let b21 = b.subMatrix(halfRows, b.rows - 1, 0, halfCols - 1);\n\n let a22 = a.subMatrix(halfRows, a.rows - 1, halfCols, a.columns - 1);\n let b22 = b.subMatrix(halfRows, b.rows - 1, halfCols, b.columns - 1);\n\n // Compute intermediate values.\n let m1 = blockMult(\n AbstractMatrix.add(a11, a22),\n AbstractMatrix.add(b11, b22),\n halfRows,\n halfCols,\n );\n let m2 = blockMult(AbstractMatrix.add(a21, a22), b11, halfRows, halfCols);\n let m3 = blockMult(a11, AbstractMatrix.sub(b12, b22), halfRows, halfCols);\n let m4 = blockMult(a22, AbstractMatrix.sub(b21, b11), halfRows, halfCols);\n let m5 = blockMult(AbstractMatrix.add(a11, a12), b22, halfRows, halfCols);\n let m6 = blockMult(\n AbstractMatrix.sub(a21, a11),\n AbstractMatrix.add(b11, b12),\n halfRows,\n halfCols,\n );\n let m7 = blockMult(\n AbstractMatrix.sub(a12, a22),\n AbstractMatrix.add(b21, b22),\n halfRows,\n halfCols,\n );\n\n // Combine intermediate values into the output.\n let c11 = AbstractMatrix.add(m1, m4);\n c11.sub(m5);\n c11.add(m7);\n let c12 = AbstractMatrix.add(m3, m5);\n let c21 = AbstractMatrix.add(m2, m4);\n let c22 = AbstractMatrix.sub(m1, m2);\n c22.add(m3);\n c22.add(m6);\n\n // Crop output to the desired size (undo dynamic padding).\n let resultat = AbstractMatrix.zeros(2 * c11.rows, 2 * c11.columns);\n resultat = resultat.setSubMatrix(c11, 0, 0);\n resultat = resultat.setSubMatrix(c12, c11.rows, 0);\n resultat = resultat.setSubMatrix(c21, 0, c11.columns);\n resultat = resultat.setSubMatrix(c22, c11.rows, c11.columns);\n return resultat.subMatrix(0, rows - 1, 0, cols - 1);\n }\n return blockMult(x, y, r, c);\n }\n\n scaleRows(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1 } = options;\n if (!Number.isFinite(min)) throw new TypeError('min must be a number');\n if (!Number.isFinite(max)) throw new TypeError('max must be a number');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let i = 0; i < this.rows; i++) {\n const row = this.getRow(i);\n rescale(row, { min, max, output: row });\n newMatrix.setRow(i, row);\n }\n return newMatrix;\n }\n\n scaleColumns(options = {}) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { min = 0, max = 1 } = options;\n if (!Number.isFinite(min)) throw new TypeError('min must be a number');\n if (!Number.isFinite(max)) throw new TypeError('max must be a number');\n if (min >= max) throw new RangeError('min must be smaller than max');\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let i = 0; i < this.columns; i++) {\n const column = this.getColumn(i);\n rescale(column, {\n min: min,\n max: max,\n output: column,\n });\n newMatrix.setColumn(i, column);\n }\n return newMatrix;\n }\n\n flipRows() {\n const middle = Math.ceil(this.columns / 2);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < middle; j++) {\n let first = this.get(i, j);\n let last = this.get(i, this.columns - 1 - j);\n this.set(i, j, last);\n this.set(i, this.columns - 1 - j, first);\n }\n }\n return this;\n }\n\n flipColumns() {\n const middle = Math.ceil(this.rows / 2);\n for (let j = 0; j < this.columns; j++) {\n for (let i = 0; i < middle; i++) {\n let first = this.get(i, j);\n let last = this.get(this.rows - 1 - i, j);\n this.set(i, j, last);\n this.set(this.rows - 1 - i, j, first);\n }\n }\n return this;\n }\n\n kroneckerProduct(other) {\n other = Matrix.checkMatrix(other);\n\n let m = this.rows;\n let n = this.columns;\n let p = other.rows;\n let q = other.columns;\n\n let result = new Matrix(m * p, n * q);\n for (let i = 0; i < m; i++) {\n for (let j = 0; j < n; j++) {\n for (let k = 0; k < p; k++) {\n for (let l = 0; l < q; l++) {\n result.set(p * i + k, q * j + l, this.get(i, j) * other.get(k, l));\n }\n }\n }\n }\n return result;\n }\n\n transpose() {\n let result = new Matrix(this.columns, this.rows);\n for (let i = 0; i < this.rows; i++) {\n for (let j = 0; j < this.columns; j++) {\n result.set(j, i, this.get(i, j));\n }\n }\n return result;\n }\n\n sortRows(compareFunction = compareNumbers) {\n for (let i = 0; i < this.rows; i++) {\n this.setRow(i, this.getRow(i).sort(compareFunction));\n }\n return this;\n }\n\n sortColumns(compareFunction = compareNumbers) {\n for (let i = 0; i < this.columns; i++) {\n this.setColumn(i, this.getColumn(i).sort(compareFunction));\n }\n return this;\n }\n\n subMatrix(startRow, endRow, startColumn, endColumn) {\n checkRange(this, startRow, endRow, startColumn, endColumn);\n let newMatrix = new Matrix(\n endRow - startRow + 1,\n endColumn - startColumn + 1,\n );\n for (let i = startRow; i <= endRow; i++) {\n for (let j = startColumn; j <= endColumn; j++) {\n newMatrix.set(i - startRow, j - startColumn, this.get(i, j));\n }\n }\n return newMatrix;\n }\n\n subMatrixRow(indices, startColumn, endColumn) {\n if (startColumn === undefined) startColumn = 0;\n if (endColumn === undefined) endColumn = this.columns - 1;\n if (\n startColumn > endColumn ||\n startColumn < 0 ||\n startColumn >= this.columns ||\n endColumn < 0 ||\n endColumn >= this.columns\n ) {\n throw new RangeError('Argument out of range');\n }\n\n let newMatrix = new Matrix(indices.length, endColumn - startColumn + 1);\n for (let i = 0; i < indices.length; i++) {\n for (let j = startColumn; j <= endColumn; j++) {\n if (indices[i] < 0 || indices[i] >= this.rows) {\n throw new RangeError(`Row index out of range: ${indices[i]}`);\n }\n newMatrix.set(i, j - startColumn, this.get(indices[i], j));\n }\n }\n return newMatrix;\n }\n\n subMatrixColumn(indices, startRow, endRow) {\n if (startRow === undefined) startRow = 0;\n if (endRow === undefined) endRow = this.rows - 1;\n if (\n startRow > endRow ||\n startRow < 0 ||\n startRow >= this.rows ||\n endRow < 0 ||\n endRow >= this.rows\n ) {\n throw new RangeError('Argument out of range');\n }\n\n let newMatrix = new Matrix(endRow - startRow + 1, indices.length);\n for (let i = 0; i < indices.length; i++) {\n for (let j = startRow; j <= endRow; j++) {\n if (indices[i] < 0 || indices[i] >= this.columns) {\n throw new RangeError(`Column index out of range: ${indices[i]}`);\n }\n newMatrix.set(j - startRow, i, this.get(j, indices[i]));\n }\n }\n return newMatrix;\n }\n\n setSubMatrix(matrix, startRow, startColumn) {\n matrix = Matrix.checkMatrix(matrix);\n let endRow = startRow + matrix.rows - 1;\n let endColumn = startColumn + matrix.columns - 1;\n checkRange(this, startRow, endRow, startColumn, endColumn);\n for (let i = 0; i < matrix.rows; i++) {\n for (let j = 0; j < matrix.columns; j++) {\n this.set(startRow + i, startColumn + j, matrix.get(i, j));\n }\n }\n return this;\n }\n\n selection(rowIndices, columnIndices) {\n let indices = checkIndices(this, rowIndices, columnIndices);\n let newMatrix = new Matrix(rowIndices.length, columnIndices.length);\n for (let i = 0; i < indices.row.length; i++) {\n let rowIndex = indices.row[i];\n for (let j = 0; j < indices.column.length; j++) {\n let columnIndex = indices.column[j];\n newMatrix.set(i, j, this.get(rowIndex, columnIndex));\n }\n }\n return newMatrix;\n }\n\n trace() {\n let min = Math.min(this.rows, this.columns);\n let trace = 0;\n for (let i = 0; i < min; i++) {\n trace += this.get(i, i);\n }\n return trace;\n }\n\n clone() {\n let newMatrix = new Matrix(this.rows, this.columns);\n for (let row = 0; row < this.rows; row++) {\n for (let column = 0; column < this.columns; column++) {\n newMatrix.set(row, column, this.get(row, column));\n }\n }\n return newMatrix;\n }\n\n sum(by) {\n switch (by) {\n case 'row':\n return sumByRow(this);\n case 'column':\n return sumByColumn(this);\n case undefined:\n return sumAll(this);\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n product(by) {\n switch (by) {\n case 'row':\n return productByRow(this);\n case 'column':\n return productByColumn(this);\n case undefined:\n return productAll(this);\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n mean(by) {\n const sum = this.sum(by);\n switch (by) {\n case 'row': {\n for (let i = 0; i < this.rows; i++) {\n sum[i] /= this.columns;\n }\n return sum;\n }\n case 'column': {\n for (let i = 0; i < this.columns; i++) {\n sum[i] /= this.rows;\n }\n return sum;\n }\n case undefined:\n return sum / this.size;\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n variance(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { unbiased = true, mean = this.mean(by) } = options;\n if (typeof unbiased !== 'boolean') {\n throw new TypeError('unbiased must be a boolean');\n }\n switch (by) {\n case 'row': {\n if (!Array.isArray(mean)) {\n throw new TypeError('mean must be an array');\n }\n return varianceByRow(this, unbiased, mean);\n }\n case 'column': {\n if (!Array.isArray(mean)) {\n throw new TypeError('mean must be an array');\n }\n return varianceByColumn(this, unbiased, mean);\n }\n case undefined: {\n if (typeof mean !== 'number') {\n throw new TypeError('mean must be a number');\n }\n return varianceAll(this, unbiased, mean);\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n standardDeviation(by, options) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n const variance = this.variance(by, options);\n if (by === undefined) {\n return Math.sqrt(variance);\n } else {\n for (let i = 0; i < variance.length; i++) {\n variance[i] = Math.sqrt(variance[i]);\n }\n return variance;\n }\n }\n\n center(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n const { center = this.mean(by) } = options;\n switch (by) {\n case 'row': {\n if (!Array.isArray(center)) {\n throw new TypeError('center must be an array');\n }\n centerByRow(this, center);\n return this;\n }\n case 'column': {\n if (!Array.isArray(center)) {\n throw new TypeError('center must be an array');\n }\n centerByColumn(this, center);\n return this;\n }\n case undefined: {\n if (typeof center !== 'number') {\n throw new TypeError('center must be a number');\n }\n centerAll(this, center);\n return this;\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n scale(by, options = {}) {\n if (typeof by === 'object') {\n options = by;\n by = undefined;\n }\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n let scale = options.scale;\n switch (by) {\n case 'row': {\n if (scale === undefined) {\n scale = getScaleByRow(this);\n } else if (!Array.isArray(scale)) {\n throw new TypeError('scale must be an array');\n }\n scaleByRow(this, scale);\n return this;\n }\n case 'column': {\n if (scale === undefined) {\n scale = getScaleByColumn(this);\n } else if (!Array.isArray(scale)) {\n throw new TypeError('scale must be an array');\n }\n scaleByColumn(this, scale);\n return this;\n }\n case undefined: {\n if (scale === undefined) {\n scale = getScaleAll(this);\n } else if (typeof scale !== 'number') {\n throw new TypeError('scale must be a number');\n }\n scaleAll(this, scale);\n return this;\n }\n default:\n throw new Error(`invalid option: ${by}`);\n }\n }\n\n toString(options) {\n return inspectMatrixWithOptions(this, options);\n }\n}\n\nAbstractMatrix.prototype.klass = 'Matrix';\nif (typeof Symbol !== 'undefined') {\n AbstractMatrix.prototype[\n Symbol.for('nodejs.util.inspect.custom')\n ] = inspectMatrix;\n}\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\n// Synonyms\nAbstractMatrix.random = AbstractMatrix.rand;\nAbstractMatrix.randomInt = AbstractMatrix.randInt;\nAbstractMatrix.diagonal = AbstractMatrix.diag;\nAbstractMatrix.prototype.diagonal = AbstractMatrix.prototype.diag;\nAbstractMatrix.identity = AbstractMatrix.eye;\nAbstractMatrix.prototype.negate = AbstractMatrix.prototype.neg;\nAbstractMatrix.prototype.tensorProduct =\n AbstractMatrix.prototype.kroneckerProduct;\n\nexport default class Matrix extends AbstractMatrix {\n constructor(nRows, nColumns) {\n super();\n if (Matrix.isMatrix(nRows)) {\n return nRows.clone();\n } else if (Number.isInteger(nRows) && nRows > 0) {\n // Create an empty matrix\n this.data = [];\n if (Number.isInteger(nColumns) && nColumns > 0) {\n for (let i = 0; i < nRows; i++) {\n this.data.push(new Float64Array(nColumns));\n }\n } else {\n throw new TypeError('nColumns must be a positive integer');\n }\n } else if (Array.isArray(nRows)) {\n // Copy the values from the 2D array\n const arrayData = nRows;\n nRows = arrayData.length;\n nColumns = arrayData[0].length;\n if (typeof nColumns !== 'number' || nColumns === 0) {\n throw new TypeError(\n 'Data must be a 2D array with at least one element',\n );\n }\n this.data = [];\n for (let i = 0; i < nRows; i++) {\n if (arrayData[i].length !== nColumns) {\n throw new RangeError('Inconsistent array dimensions');\n }\n this.data.push(Float64Array.from(arrayData[i]));\n }\n } else {\n throw new TypeError(\n 'First argument must be a positive number or an array',\n );\n }\n this.rows = nRows;\n this.columns = nColumns;\n return this;\n }\n\n set(rowIndex, columnIndex, value) {\n this.data[rowIndex][columnIndex] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.data[rowIndex][columnIndex];\n }\n\n removeRow(index) {\n checkRowIndex(this, index);\n if (this.rows === 1) {\n throw new RangeError('A matrix cannot have less than one row');\n }\n this.data.splice(index, 1);\n this.rows -= 1;\n return this;\n }\n\n addRow(index, array) {\n if (array === undefined) {\n array = index;\n index = this.rows;\n }\n checkRowIndex(this, index, true);\n array = Float64Array.from(checkRowVector(this, array, true));\n this.data.splice(index, 0, array);\n this.rows += 1;\n return this;\n }\n\n removeColumn(index) {\n checkColumnIndex(this, index);\n if (this.columns === 1) {\n throw new RangeError('A matrix cannot have less than one column');\n }\n for (let i = 0; i < this.rows; i++) {\n const newRow = new Float64Array(this.columns - 1);\n for (let j = 0; j < index; j++) {\n newRow[j] = this.data[i][j];\n }\n for (let j = index + 1; j < this.columns; j++) {\n newRow[j - 1] = this.data[i][j];\n }\n this.data[i] = newRow;\n }\n this.columns -= 1;\n return this;\n }\n\n addColumn(index, array) {\n if (typeof array === 'undefined') {\n array = index;\n index = this.columns;\n }\n checkColumnIndex(this, index, true);\n array = checkColumnVector(this, array);\n for (let i = 0; i < this.rows; i++) {\n const newRow = new Float64Array(this.columns + 1);\n let j = 0;\n for (; j < index; j++) {\n newRow[j] = this.data[i][j];\n }\n newRow[j++] = array[i];\n for (; j < this.columns + 1; j++) {\n newRow[j] = this.data[i][j - 1];\n }\n this.data[i] = newRow;\n }\n this.columns += 1;\n return this;\n }\n}\n\ninstallMathOperations(AbstractMatrix, Matrix);\n","import { AbstractMatrix } from '../matrix';\n\nexport default class BaseView extends AbstractMatrix {\n constructor(matrix, rows, columns) {\n super();\n this.matrix = matrix;\n this.rows = rows;\n this.columns = columns;\n }\n}\n","import { checkColumnIndex } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixColumnView extends BaseView {\n constructor(matrix, column) {\n checkColumnIndex(matrix, column);\n super(matrix, matrix.rows, 1);\n this.column = column;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.column, value);\n return this;\n }\n\n get(rowIndex) {\n return this.matrix.get(rowIndex, this.column);\n }\n}\n","import { checkColumnIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixColumnSelectionView extends BaseView {\n constructor(matrix, columnIndices) {\n columnIndices = checkColumnIndices(matrix, columnIndices);\n super(matrix, matrix.rows, columnIndices.length);\n this.columnIndices = columnIndices;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.columnIndices[columnIndex], value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(rowIndex, this.columnIndices[columnIndex]);\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixFlipColumnView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.rows, matrix.columns);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(rowIndex, this.columns - columnIndex - 1, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(rowIndex, this.columns - columnIndex - 1);\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixFlipRowView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.rows, matrix.columns);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.rows - rowIndex - 1, columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.rows - rowIndex - 1, columnIndex);\n }\n}\n","import { checkRowIndex } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixRowView extends BaseView {\n constructor(matrix, row) {\n checkRowIndex(matrix, row);\n super(matrix, 1, matrix.columns);\n this.row = row;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.row, columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.row, columnIndex);\n }\n}\n","import { checkRowIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixRowSelectionView extends BaseView {\n constructor(matrix, rowIndices) {\n rowIndices = checkRowIndices(matrix, rowIndices);\n super(matrix, rowIndices.length, matrix.columns);\n this.rowIndices = rowIndices;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(this.rowIndices[rowIndex], columnIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(this.rowIndices[rowIndex], columnIndex);\n }\n}\n","import { checkIndices } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixSelectionView extends BaseView {\n constructor(matrix, rowIndices, columnIndices) {\n let indices = checkIndices(matrix, rowIndices, columnIndices);\n super(matrix, indices.row.length, indices.column.length);\n this.rowIndices = indices.row;\n this.columnIndices = indices.column;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(\n this.rowIndices[rowIndex],\n this.columnIndices[columnIndex],\n value,\n );\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(\n this.rowIndices[rowIndex],\n this.columnIndices[columnIndex],\n );\n }\n}\n","import { checkRange } from '../util';\n\nimport BaseView from './base';\n\nexport default class MatrixSubView extends BaseView {\n constructor(matrix, startRow, endRow, startColumn, endColumn) {\n checkRange(matrix, startRow, endRow, startColumn, endColumn);\n super(matrix, endRow - startRow + 1, endColumn - startColumn + 1);\n this.startRow = startRow;\n this.startColumn = startColumn;\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(\n this.startRow + rowIndex,\n this.startColumn + columnIndex,\n value,\n );\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(\n this.startRow + rowIndex,\n this.startColumn + columnIndex,\n );\n }\n}\n","import BaseView from './base';\n\nexport default class MatrixTransposeView extends BaseView {\n constructor(matrix) {\n super(matrix, matrix.columns, matrix.rows);\n }\n\n set(rowIndex, columnIndex, value) {\n this.matrix.set(columnIndex, rowIndex, value);\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.matrix.get(columnIndex, rowIndex);\n }\n}\n","import { AbstractMatrix } from '../matrix';\n\nexport default class WrapperMatrix1D extends AbstractMatrix {\n constructor(data, options = {}) {\n const { rows = 1 } = options;\n\n if (data.length % rows !== 0) {\n throw new Error('the data length is not divisible by the number of rows');\n }\n super();\n this.rows = rows;\n this.columns = data.length / rows;\n this.data = data;\n }\n\n set(rowIndex, columnIndex, value) {\n let index = this._calculateIndex(rowIndex, columnIndex);\n this.data[index] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n let index = this._calculateIndex(rowIndex, columnIndex);\n return this.data[index];\n }\n\n _calculateIndex(row, column) {\n return row * this.columns + column;\n }\n}\n","import { AbstractMatrix } from '../matrix';\n\nexport default class WrapperMatrix2D extends AbstractMatrix {\n constructor(data) {\n super();\n this.data = data;\n this.rows = data.length;\n this.columns = data[0].length;\n }\n\n set(rowIndex, columnIndex, value) {\n this.data[rowIndex][columnIndex] = value;\n return this;\n }\n\n get(rowIndex, columnIndex) {\n return this.data[rowIndex][columnIndex];\n }\n}\n","import WrapperMatrix1D from './WrapperMatrix1D';\nimport WrapperMatrix2D from './WrapperMatrix2D';\n\nexport function wrap(array, options) {\n if (Array.isArray(array)) {\n if (array[0] && Array.isArray(array[0])) {\n return new WrapperMatrix2D(array);\n } else {\n return new WrapperMatrix1D(array, options);\n }\n } else {\n throw new Error('the argument is not an array');\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class LuDecomposition {\n constructor(matrix) {\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n\n let lu = matrix.clone();\n let rows = lu.rows;\n let columns = lu.columns;\n let pivotVector = new Float64Array(rows);\n let pivotSign = 1;\n let i, j, k, p, s, t, v;\n let LUcolj, kmax;\n\n for (i = 0; i < rows; i++) {\n pivotVector[i] = i;\n }\n\n LUcolj = new Float64Array(rows);\n\n for (j = 0; j < columns; j++) {\n for (i = 0; i < rows; i++) {\n LUcolj[i] = lu.get(i, j);\n }\n\n for (i = 0; i < rows; i++) {\n kmax = Math.min(i, j);\n s = 0;\n for (k = 0; k < kmax; k++) {\n s += lu.get(i, k) * LUcolj[k];\n }\n LUcolj[i] -= s;\n lu.set(i, j, LUcolj[i]);\n }\n\n p = j;\n for (i = j + 1; i < rows; i++) {\n if (Math.abs(LUcolj[i]) > Math.abs(LUcolj[p])) {\n p = i;\n }\n }\n\n if (p !== j) {\n for (k = 0; k < columns; k++) {\n t = lu.get(p, k);\n lu.set(p, k, lu.get(j, k));\n lu.set(j, k, t);\n }\n\n v = pivotVector[p];\n pivotVector[p] = pivotVector[j];\n pivotVector[j] = v;\n\n pivotSign = -pivotSign;\n }\n\n if (j < rows && lu.get(j, j) !== 0) {\n for (i = j + 1; i < rows; i++) {\n lu.set(i, j, lu.get(i, j) / lu.get(j, j));\n }\n }\n }\n\n this.LU = lu;\n this.pivotVector = pivotVector;\n this.pivotSign = pivotSign;\n }\n\n isSingular() {\n let data = this.LU;\n let col = data.columns;\n for (let j = 0; j < col; j++) {\n if (data.get(j, j) === 0) {\n return true;\n }\n }\n return false;\n }\n\n solve(value) {\n value = Matrix.checkMatrix(value);\n\n let lu = this.LU;\n let rows = lu.rows;\n\n if (rows !== value.rows) {\n throw new Error('Invalid matrix dimensions');\n }\n if (this.isSingular()) {\n throw new Error('LU matrix is singular');\n }\n\n let count = value.columns;\n let X = value.subMatrixRow(this.pivotVector, 0, count - 1);\n let columns = lu.columns;\n let i, j, k;\n\n for (k = 0; k < columns; k++) {\n for (i = k + 1; i < columns; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));\n }\n }\n }\n for (k = columns - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n X.set(k, j, X.get(k, j) / lu.get(k, k));\n }\n for (i = 0; i < k; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * lu.get(i, k));\n }\n }\n }\n return X;\n }\n\n get determinant() {\n let data = this.LU;\n if (!data.isSquare()) {\n throw new Error('Matrix must be square');\n }\n let determinant = this.pivotSign;\n let col = data.columns;\n for (let j = 0; j < col; j++) {\n determinant *= data.get(j, j);\n }\n return determinant;\n }\n\n get lowerTriangularMatrix() {\n let data = this.LU;\n let rows = data.rows;\n let columns = data.columns;\n let X = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n if (i > j) {\n X.set(i, j, data.get(i, j));\n } else if (i === j) {\n X.set(i, j, 1);\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get upperTriangularMatrix() {\n let data = this.LU;\n let rows = data.rows;\n let columns = data.columns;\n let X = new Matrix(rows, columns);\n for (let i = 0; i < rows; i++) {\n for (let j = 0; j < columns; j++) {\n if (i <= j) {\n X.set(i, j, data.get(i, j));\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get pivotPermutationVector() {\n return Array.from(this.pivotVector);\n }\n}\n","export function hypotenuse(a, b) {\n let r = 0;\n if (Math.abs(a) > Math.abs(b)) {\n r = b / a;\n return Math.abs(a) * Math.sqrt(1 + r * r);\n }\n if (b !== 0) {\n r = a / b;\n return Math.abs(b) * Math.sqrt(1 + r * r);\n }\n return 0;\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class QrDecomposition {\n constructor(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let qr = value.clone();\n let m = value.rows;\n let n = value.columns;\n let rdiag = new Float64Array(n);\n let i, j, k, s;\n\n for (k = 0; k < n; k++) {\n let nrm = 0;\n for (i = k; i < m; i++) {\n nrm = hypotenuse(nrm, qr.get(i, k));\n }\n if (nrm !== 0) {\n if (qr.get(k, k) < 0) {\n nrm = -nrm;\n }\n for (i = k; i < m; i++) {\n qr.set(i, k, qr.get(i, k) / nrm);\n }\n qr.set(k, k, qr.get(k, k) + 1);\n for (j = k + 1; j < n; j++) {\n s = 0;\n for (i = k; i < m; i++) {\n s += qr.get(i, k) * qr.get(i, j);\n }\n s = -s / qr.get(k, k);\n for (i = k; i < m; i++) {\n qr.set(i, j, qr.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n rdiag[k] = -nrm;\n }\n\n this.QR = qr;\n this.Rdiag = rdiag;\n }\n\n solve(value) {\n value = Matrix.checkMatrix(value);\n\n let qr = this.QR;\n let m = qr.rows;\n\n if (value.rows !== m) {\n throw new Error('Matrix row dimensions must agree');\n }\n if (!this.isFullRank()) {\n throw new Error('Matrix is rank deficient');\n }\n\n let count = value.columns;\n let X = value.clone();\n let n = qr.columns;\n let i, j, k, s;\n\n for (k = 0; k < n; k++) {\n for (j = 0; j < count; j++) {\n s = 0;\n for (i = k; i < m; i++) {\n s += qr.get(i, k) * X.get(i, j);\n }\n s = -s / qr.get(k, k);\n for (i = k; i < m; i++) {\n X.set(i, j, X.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n for (k = n - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n X.set(k, j, X.get(k, j) / this.Rdiag[k]);\n }\n for (i = 0; i < k; i++) {\n for (j = 0; j < count; j++) {\n X.set(i, j, X.get(i, j) - X.get(k, j) * qr.get(i, k));\n }\n }\n }\n\n return X.subMatrix(0, n - 1, 0, count - 1);\n }\n\n isFullRank() {\n let columns = this.QR.columns;\n for (let i = 0; i < columns; i++) {\n if (this.Rdiag[i] === 0) {\n return false;\n }\n }\n return true;\n }\n\n get upperTriangularMatrix() {\n let qr = this.QR;\n let n = qr.columns;\n let X = new Matrix(n, n);\n let i, j;\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n if (i < j) {\n X.set(i, j, qr.get(i, j));\n } else if (i === j) {\n X.set(i, j, this.Rdiag[i]);\n } else {\n X.set(i, j, 0);\n }\n }\n }\n return X;\n }\n\n get orthogonalMatrix() {\n let qr = this.QR;\n let rows = qr.rows;\n let columns = qr.columns;\n let X = new Matrix(rows, columns);\n let i, j, k, s;\n\n for (k = columns - 1; k >= 0; k--) {\n for (i = 0; i < rows; i++) {\n X.set(i, k, 0);\n }\n X.set(k, k, 1);\n for (j = k; j < columns; j++) {\n if (qr.get(k, k) !== 0) {\n s = 0;\n for (i = k; i < rows; i++) {\n s += qr.get(i, k) * X.get(i, j);\n }\n\n s = -s / qr.get(k, k);\n\n for (i = k; i < rows; i++) {\n X.set(i, j, X.get(i, j) + s * qr.get(i, k));\n }\n }\n }\n }\n return X;\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class SingularValueDecomposition {\n constructor(value, options = {}) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let m = value.rows;\n let n = value.columns;\n\n const {\n computeLeftSingularVectors = true,\n computeRightSingularVectors = true,\n autoTranspose = false,\n } = options;\n\n let wantu = Boolean(computeLeftSingularVectors);\n let wantv = Boolean(computeRightSingularVectors);\n\n let swapped = false;\n let a;\n if (m < n) {\n if (!autoTranspose) {\n a = value.clone();\n // eslint-disable-next-line no-console\n console.warn(\n 'Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose',\n );\n } else {\n a = value.transpose();\n m = a.rows;\n n = a.columns;\n swapped = true;\n let aux = wantu;\n wantu = wantv;\n wantv = aux;\n }\n } else {\n a = value.clone();\n }\n\n let nu = Math.min(m, n);\n let ni = Math.min(m + 1, n);\n let s = new Float64Array(ni);\n let U = new Matrix(m, nu);\n let V = new Matrix(n, n);\n\n let e = new Float64Array(n);\n let work = new Float64Array(m);\n\n let si = new Float64Array(ni);\n for (let i = 0; i < ni; i++) si[i] = i;\n\n let nct = Math.min(m - 1, n);\n let nrt = Math.max(0, Math.min(n - 2, m));\n let mrc = Math.max(nct, nrt);\n\n for (let k = 0; k < mrc; k++) {\n if (k < nct) {\n s[k] = 0;\n for (let i = k; i < m; i++) {\n s[k] = hypotenuse(s[k], a.get(i, k));\n }\n if (s[k] !== 0) {\n if (a.get(k, k) < 0) {\n s[k] = -s[k];\n }\n for (let i = k; i < m; i++) {\n a.set(i, k, a.get(i, k) / s[k]);\n }\n a.set(k, k, a.get(k, k) + 1);\n }\n s[k] = -s[k];\n }\n\n for (let j = k + 1; j < n; j++) {\n if (k < nct && s[k] !== 0) {\n let t = 0;\n for (let i = k; i < m; i++) {\n t += a.get(i, k) * a.get(i, j);\n }\n t = -t / a.get(k, k);\n for (let i = k; i < m; i++) {\n a.set(i, j, a.get(i, j) + t * a.get(i, k));\n }\n }\n e[j] = a.get(k, j);\n }\n\n if (wantu && k < nct) {\n for (let i = k; i < m; i++) {\n U.set(i, k, a.get(i, k));\n }\n }\n\n if (k < nrt) {\n e[k] = 0;\n for (let i = k + 1; i < n; i++) {\n e[k] = hypotenuse(e[k], e[i]);\n }\n if (e[k] !== 0) {\n if (e[k + 1] < 0) {\n e[k] = 0 - e[k];\n }\n for (let i = k + 1; i < n; i++) {\n e[i] /= e[k];\n }\n e[k + 1] += 1;\n }\n e[k] = -e[k];\n if (k + 1 < m && e[k] !== 0) {\n for (let i = k + 1; i < m; i++) {\n work[i] = 0;\n }\n for (let i = k + 1; i < m; i++) {\n for (let j = k + 1; j < n; j++) {\n work[i] += e[j] * a.get(i, j);\n }\n }\n for (let j = k + 1; j < n; j++) {\n let t = -e[j] / e[k + 1];\n for (let i = k + 1; i < m; i++) {\n a.set(i, j, a.get(i, j) + t * work[i]);\n }\n }\n }\n if (wantv) {\n for (let i = k + 1; i < n; i++) {\n V.set(i, k, e[i]);\n }\n }\n }\n }\n\n let p = Math.min(n, m + 1);\n if (nct < n) {\n s[nct] = a.get(nct, nct);\n }\n if (m < p) {\n s[p - 1] = 0;\n }\n if (nrt + 1 < p) {\n e[nrt] = a.get(nrt, p - 1);\n }\n e[p - 1] = 0;\n\n if (wantu) {\n for (let j = nct; j < nu; j++) {\n for (let i = 0; i < m; i++) {\n U.set(i, j, 0);\n }\n U.set(j, j, 1);\n }\n for (let k = nct - 1; k >= 0; k--) {\n if (s[k] !== 0) {\n for (let j = k + 1; j < nu; j++) {\n let t = 0;\n for (let i = k; i < m; i++) {\n t += U.get(i, k) * U.get(i, j);\n }\n t = -t / U.get(k, k);\n for (let i = k; i < m; i++) {\n U.set(i, j, U.get(i, j) + t * U.get(i, k));\n }\n }\n for (let i = k; i < m; i++) {\n U.set(i, k, -U.get(i, k));\n }\n U.set(k, k, 1 + U.get(k, k));\n for (let i = 0; i < k - 1; i++) {\n U.set(i, k, 0);\n }\n } else {\n for (let i = 0; i < m; i++) {\n U.set(i, k, 0);\n }\n U.set(k, k, 1);\n }\n }\n }\n\n if (wantv) {\n for (let k = n - 1; k >= 0; k--) {\n if (k < nrt && e[k] !== 0) {\n for (let j = k + 1; j < n; j++) {\n let t = 0;\n for (let i = k + 1; i < n; i++) {\n t += V.get(i, k) * V.get(i, j);\n }\n t = -t / V.get(k + 1, k);\n for (let i = k + 1; i < n; i++) {\n V.set(i, j, V.get(i, j) + t * V.get(i, k));\n }\n }\n }\n for (let i = 0; i < n; i++) {\n V.set(i, k, 0);\n }\n V.set(k, k, 1);\n }\n }\n\n let pp = p - 1;\n let iter = 0;\n let eps = Number.EPSILON;\n while (p > 0) {\n let k, kase;\n for (k = p - 2; k >= -1; k--) {\n if (k === -1) {\n break;\n }\n const alpha =\n Number.MIN_VALUE + eps * Math.abs(s[k] + Math.abs(s[k + 1]));\n if (Math.abs(e[k]) <= alpha || Number.isNaN(e[k])) {\n e[k] = 0;\n break;\n }\n }\n if (k === p - 2) {\n kase = 4;\n } else {\n let ks;\n for (ks = p - 1; ks >= k; ks--) {\n if (ks === k) {\n break;\n }\n let t =\n (ks !== p ? Math.abs(e[ks]) : 0) +\n (ks !== k + 1 ? Math.abs(e[ks - 1]) : 0);\n if (Math.abs(s[ks]) <= eps * t) {\n s[ks] = 0;\n break;\n }\n }\n if (ks === k) {\n kase = 3;\n } else if (ks === p - 1) {\n kase = 1;\n } else {\n kase = 2;\n k = ks;\n }\n }\n\n k++;\n\n switch (kase) {\n case 1: {\n let f = e[p - 2];\n e[p - 2] = 0;\n for (let j = p - 2; j >= k; j--) {\n let t = hypotenuse(s[j], f);\n let cs = s[j] / t;\n let sn = f / t;\n s[j] = t;\n if (j !== k) {\n f = -sn * e[j - 1];\n e[j - 1] = cs * e[j - 1];\n }\n if (wantv) {\n for (let i = 0; i < n; i++) {\n t = cs * V.get(i, j) + sn * V.get(i, p - 1);\n V.set(i, p - 1, -sn * V.get(i, j) + cs * V.get(i, p - 1));\n V.set(i, j, t);\n }\n }\n }\n break;\n }\n case 2: {\n let f = e[k - 1];\n e[k - 1] = 0;\n for (let j = k; j < p; j++) {\n let t = hypotenuse(s[j], f);\n let cs = s[j] / t;\n let sn = f / t;\n s[j] = t;\n f = -sn * e[j];\n e[j] = cs * e[j];\n if (wantu) {\n for (let i = 0; i < m; i++) {\n t = cs * U.get(i, j) + sn * U.get(i, k - 1);\n U.set(i, k - 1, -sn * U.get(i, j) + cs * U.get(i, k - 1));\n U.set(i, j, t);\n }\n }\n }\n break;\n }\n case 3: {\n const scale = Math.max(\n Math.abs(s[p - 1]),\n Math.abs(s[p - 2]),\n Math.abs(e[p - 2]),\n Math.abs(s[k]),\n Math.abs(e[k]),\n );\n const sp = s[p - 1] / scale;\n const spm1 = s[p - 2] / scale;\n const epm1 = e[p - 2] / scale;\n const sk = s[k] / scale;\n const ek = e[k] / scale;\n const b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2;\n const c = sp * epm1 * (sp * epm1);\n let shift = 0;\n if (b !== 0 || c !== 0) {\n if (b < 0) {\n shift = 0 - Math.sqrt(b * b + c);\n } else {\n shift = Math.sqrt(b * b + c);\n }\n shift = c / (b + shift);\n }\n let f = (sk + sp) * (sk - sp) + shift;\n let g = sk * ek;\n for (let j = k; j < p - 1; j++) {\n let t = hypotenuse(f, g);\n if (t === 0) t = Number.MIN_VALUE;\n let cs = f / t;\n let sn = g / t;\n if (j !== k) {\n e[j - 1] = t;\n }\n f = cs * s[j] + sn * e[j];\n e[j] = cs * e[j] - sn * s[j];\n g = sn * s[j + 1];\n s[j + 1] = cs * s[j + 1];\n if (wantv) {\n for (let i = 0; i < n; i++) {\n t = cs * V.get(i, j) + sn * V.get(i, j + 1);\n V.set(i, j + 1, -sn * V.get(i, j) + cs * V.get(i, j + 1));\n V.set(i, j, t);\n }\n }\n t = hypotenuse(f, g);\n if (t === 0) t = Number.MIN_VALUE;\n cs = f / t;\n sn = g / t;\n s[j] = t;\n f = cs * e[j] + sn * s[j + 1];\n s[j + 1] = -sn * e[j] + cs * s[j + 1];\n g = sn * e[j + 1];\n e[j + 1] = cs * e[j + 1];\n if (wantu && j < m - 1) {\n for (let i = 0; i < m; i++) {\n t = cs * U.get(i, j) + sn * U.get(i, j + 1);\n U.set(i, j + 1, -sn * U.get(i, j) + cs * U.get(i, j + 1));\n U.set(i, j, t);\n }\n }\n }\n e[p - 2] = f;\n iter = iter + 1;\n break;\n }\n case 4: {\n if (s[k] <= 0) {\n s[k] = s[k] < 0 ? -s[k] : 0;\n if (wantv) {\n for (let i = 0; i <= pp; i++) {\n V.set(i, k, -V.get(i, k));\n }\n }\n }\n while (k < pp) {\n if (s[k] >= s[k + 1]) {\n break;\n }\n let t = s[k];\n s[k] = s[k + 1];\n s[k + 1] = t;\n if (wantv && k < n - 1) {\n for (let i = 0; i < n; i++) {\n t = V.get(i, k + 1);\n V.set(i, k + 1, V.get(i, k));\n V.set(i, k, t);\n }\n }\n if (wantu && k < m - 1) {\n for (let i = 0; i < m; i++) {\n t = U.get(i, k + 1);\n U.set(i, k + 1, U.get(i, k));\n U.set(i, k, t);\n }\n }\n k++;\n }\n iter = 0;\n p--;\n break;\n }\n // no default\n }\n }\n\n if (swapped) {\n let tmp = V;\n V = U;\n U = tmp;\n }\n\n this.m = m;\n this.n = n;\n this.s = s;\n this.U = U;\n this.V = V;\n }\n\n solve(value) {\n let Y = value;\n let e = this.threshold;\n let scols = this.s.length;\n let Ls = Matrix.zeros(scols, scols);\n\n for (let i = 0; i < scols; i++) {\n if (Math.abs(this.s[i]) <= e) {\n Ls.set(i, i, 0);\n } else {\n Ls.set(i, i, 1 / this.s[i]);\n }\n }\n\n let U = this.U;\n let V = this.rightSingularVectors;\n\n let VL = V.mmul(Ls);\n let vrows = V.rows;\n let urows = U.rows;\n let VLU = Matrix.zeros(vrows, urows);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < urows; j++) {\n let sum = 0;\n for (let k = 0; k < scols; k++) {\n sum += VL.get(i, k) * U.get(j, k);\n }\n VLU.set(i, j, sum);\n }\n }\n\n return VLU.mmul(Y);\n }\n\n solveForDiagonal(value) {\n return this.solve(Matrix.diag(value));\n }\n\n inverse() {\n let V = this.V;\n let e = this.threshold;\n let vrows = V.rows;\n let vcols = V.columns;\n let X = new Matrix(vrows, this.s.length);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < vcols; j++) {\n if (Math.abs(this.s[j]) > e) {\n X.set(i, j, V.get(i, j) / this.s[j]);\n }\n }\n }\n\n let U = this.U;\n\n let urows = U.rows;\n let ucols = U.columns;\n let Y = new Matrix(vrows, urows);\n\n for (let i = 0; i < vrows; i++) {\n for (let j = 0; j < urows; j++) {\n let sum = 0;\n for (let k = 0; k < ucols; k++) {\n sum += X.get(i, k) * U.get(j, k);\n }\n Y.set(i, j, sum);\n }\n }\n\n return Y;\n }\n\n get condition() {\n return this.s[0] / this.s[Math.min(this.m, this.n) - 1];\n }\n\n get norm2() {\n return this.s[0];\n }\n\n get rank() {\n let tol = Math.max(this.m, this.n) * this.s[0] * Number.EPSILON;\n let r = 0;\n let s = this.s;\n for (let i = 0, ii = s.length; i < ii; i++) {\n if (s[i] > tol) {\n r++;\n }\n }\n return r;\n }\n\n get diagonal() {\n return Array.from(this.s);\n }\n\n get threshold() {\n return (Number.EPSILON / 2) * Math.max(this.m, this.n) * this.s[0];\n }\n\n get leftSingularVectors() {\n return this.U;\n }\n\n get rightSingularVectors() {\n return this.V;\n }\n\n get diagonalMatrix() {\n return Matrix.diag(this.s);\n }\n}\n","import LuDecomposition from './dc/lu';\nimport QrDecomposition from './dc/qr';\nimport SingularValueDecomposition from './dc/svd';\nimport Matrix from './matrix';\nimport WrapperMatrix2D from './wrap/WrapperMatrix2D';\n\nexport function inverse(matrix, useSVD = false) {\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n if (useSVD) {\n return new SingularValueDecomposition(matrix).inverse();\n } else {\n return solve(matrix, Matrix.eye(matrix.rows));\n }\n}\n\nexport function solve(leftHandSide, rightHandSide, useSVD = false) {\n leftHandSide = WrapperMatrix2D.checkMatrix(leftHandSide);\n rightHandSide = WrapperMatrix2D.checkMatrix(rightHandSide);\n if (useSVD) {\n return new SingularValueDecomposition(leftHandSide).solve(rightHandSide);\n } else {\n return leftHandSide.isSquare()\n ? new LuDecomposition(leftHandSide).solve(rightHandSide)\n : new QrDecomposition(leftHandSide).solve(rightHandSide);\n }\n}\n","import LuDecomposition from './dc/lu';\nimport Matrix from './matrix';\nimport MatrixSelectionView from './views/selection';\n\nexport function determinant(matrix) {\n matrix = Matrix.checkMatrix(matrix);\n if (matrix.isSquare()) {\n let a, b, c, d;\n if (matrix.columns === 2) {\n // 2 x 2 matrix\n a = matrix.get(0, 0);\n b = matrix.get(0, 1);\n c = matrix.get(1, 0);\n d = matrix.get(1, 1);\n\n return a * d - b * c;\n } else if (matrix.columns === 3) {\n // 3 x 3 matrix\n let subMatrix0, subMatrix1, subMatrix2;\n subMatrix0 = new MatrixSelectionView(matrix, [1, 2], [1, 2]);\n subMatrix1 = new MatrixSelectionView(matrix, [1, 2], [0, 2]);\n subMatrix2 = new MatrixSelectionView(matrix, [1, 2], [0, 1]);\n a = matrix.get(0, 0);\n b = matrix.get(0, 1);\n c = matrix.get(0, 2);\n\n return (\n a * determinant(subMatrix0) -\n b * determinant(subMatrix1) +\n c * determinant(subMatrix2)\n );\n } else {\n // general purpose determinant using the LU decomposition\n return new LuDecomposition(matrix).determinant;\n }\n } else {\n throw Error('determinant can only be calculated for a square matrix');\n }\n}\n","import SingularValueDecomposition from './dc/svd';\nimport Matrix from './matrix';\n\nfunction xrange(n, exception) {\n let range = [];\n for (let i = 0; i < n; i++) {\n if (i !== exception) {\n range.push(i);\n }\n }\n return range;\n}\n\nfunction dependenciesOneRow(\n error,\n matrix,\n index,\n thresholdValue = 10e-10,\n thresholdError = 10e-10,\n) {\n if (error > thresholdError) {\n return new Array(matrix.rows + 1).fill(0);\n } else {\n let returnArray = matrix.addRow(index, [0]);\n for (let i = 0; i < returnArray.rows; i++) {\n if (Math.abs(returnArray.get(i, 0)) < thresholdValue) {\n returnArray.set(i, 0, 0);\n }\n }\n return returnArray.to1DArray();\n }\n}\n\nexport function linearDependencies(matrix, options = {}) {\n const { thresholdValue = 10e-10, thresholdError = 10e-10 } = options;\n matrix = Matrix.checkMatrix(matrix);\n\n let n = matrix.rows;\n let results = new Matrix(n, n);\n\n for (let i = 0; i < n; i++) {\n let b = Matrix.columnVector(matrix.getRow(i));\n let Abis = matrix.subMatrixRow(xrange(n, i)).transpose();\n let svd = new SingularValueDecomposition(Abis);\n let x = svd.solve(b);\n let error = Matrix.sub(b, Abis.mmul(x)).abs().max();\n results.setRow(\n i,\n dependenciesOneRow(error, x, i, thresholdValue, thresholdError),\n );\n }\n return results;\n}\n","import SVD from './dc/svd';\nimport Matrix from './matrix';\n\nexport function pseudoInverse(matrix, threshold = Number.EPSILON) {\n matrix = Matrix.checkMatrix(matrix);\n let svdSolution = new SVD(matrix, { autoTranspose: true });\n\n let U = svdSolution.leftSingularVectors;\n let V = svdSolution.rightSingularVectors;\n let s = svdSolution.diagonal;\n\n for (let i = 0; i < s.length; i++) {\n if (Math.abs(s[i]) > threshold) {\n s[i] = 1.0 / s[i];\n } else {\n s[i] = 0.0;\n }\n }\n\n return V.mmul(Matrix.diag(s).mmul(U.transpose()));\n}\n","import Matrix from './matrix';\n\nexport function covariance(xMatrix, yMatrix = xMatrix, options = {}) {\n xMatrix = new Matrix(xMatrix);\n let yIsSame = false;\n if (\n typeof yMatrix === 'object' &&\n !Matrix.isMatrix(yMatrix) &&\n !Array.isArray(yMatrix)\n ) {\n options = yMatrix;\n yMatrix = xMatrix;\n yIsSame = true;\n } else {\n yMatrix = new Matrix(yMatrix);\n }\n if (xMatrix.rows !== yMatrix.rows) {\n throw new TypeError('Both matrices must have the same number of rows');\n }\n const { center = true } = options;\n if (center) {\n xMatrix = xMatrix.center('column');\n if (!yIsSame) {\n yMatrix = yMatrix.center('column');\n }\n }\n const cov = xMatrix.transpose().mmul(yMatrix);\n for (let i = 0; i < cov.rows; i++) {\n for (let j = 0; j < cov.columns; j++) {\n cov.set(i, j, cov.get(i, j) * (1 / (xMatrix.rows - 1)));\n }\n }\n return cov;\n}\n","import Matrix from './matrix';\n\nexport function correlation(xMatrix, yMatrix = xMatrix, options = {}) {\n xMatrix = new Matrix(xMatrix);\n let yIsSame = false;\n if (\n typeof yMatrix === 'object' &&\n !Matrix.isMatrix(yMatrix) &&\n !Array.isArray(yMatrix)\n ) {\n options = yMatrix;\n yMatrix = xMatrix;\n yIsSame = true;\n } else {\n yMatrix = new Matrix(yMatrix);\n }\n if (xMatrix.rows !== yMatrix.rows) {\n throw new TypeError('Both matrices must have the same number of rows');\n }\n\n const { center = true, scale = true } = options;\n if (center) {\n xMatrix.center('column');\n if (!yIsSame) {\n yMatrix.center('column');\n }\n }\n if (scale) {\n xMatrix.scale('column');\n if (!yIsSame) {\n yMatrix.scale('column');\n }\n }\n\n const sdx = xMatrix.standardDeviation('column', { unbiased: true });\n const sdy = yIsSame\n ? sdx\n : yMatrix.standardDeviation('column', { unbiased: true });\n\n const corr = xMatrix.transpose().mmul(yMatrix);\n for (let i = 0; i < corr.rows; i++) {\n for (let j = 0; j < corr.columns; j++) {\n corr.set(\n i,\n j,\n corr.get(i, j) * (1 / (sdx[i] * sdy[j])) * (1 / (xMatrix.rows - 1)),\n );\n }\n }\n return corr;\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nimport { hypotenuse } from './util';\n\nexport default class EigenvalueDecomposition {\n constructor(matrix, options = {}) {\n const { assumeSymmetric = false } = options;\n\n matrix = WrapperMatrix2D.checkMatrix(matrix);\n if (!matrix.isSquare()) {\n throw new Error('Matrix is not a square matrix');\n }\n\n let n = matrix.columns;\n let V = new Matrix(n, n);\n let d = new Float64Array(n);\n let e = new Float64Array(n);\n let value = matrix;\n let i, j;\n\n let isSymmetric = false;\n if (assumeSymmetric) {\n isSymmetric = true;\n } else {\n isSymmetric = matrix.isSymmetric();\n }\n\n if (isSymmetric) {\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n V.set(i, j, value.get(i, j));\n }\n }\n tred2(n, e, d, V);\n tql2(n, e, d, V);\n } else {\n let H = new Matrix(n, n);\n let ort = new Float64Array(n);\n for (j = 0; j < n; j++) {\n for (i = 0; i < n; i++) {\n H.set(i, j, value.get(i, j));\n }\n }\n orthes(n, H, ort, V);\n hqr2(n, e, d, V, H);\n }\n\n this.n = n;\n this.e = e;\n this.d = d;\n this.V = V;\n }\n\n get realEigenvalues() {\n return Array.from(this.d);\n }\n\n get imaginaryEigenvalues() {\n return Array.from(this.e);\n }\n\n get eigenvectorMatrix() {\n return this.V;\n }\n\n get diagonalMatrix() {\n let n = this.n;\n let e = this.e;\n let d = this.d;\n let X = new Matrix(n, n);\n let i, j;\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n X.set(i, j, 0);\n }\n X.set(i, i, d[i]);\n if (e[i] > 0) {\n X.set(i, i + 1, e[i]);\n } else if (e[i] < 0) {\n X.set(i, i - 1, e[i]);\n }\n }\n return X;\n }\n}\n\nfunction tred2(n, e, d, V) {\n let f, g, h, i, j, k, hh, scale;\n\n for (j = 0; j < n; j++) {\n d[j] = V.get(n - 1, j);\n }\n\n for (i = n - 1; i > 0; i--) {\n scale = 0;\n h = 0;\n for (k = 0; k < i; k++) {\n scale = scale + Math.abs(d[k]);\n }\n\n if (scale === 0) {\n e[i] = d[i - 1];\n for (j = 0; j < i; j++) {\n d[j] = V.get(i - 1, j);\n V.set(i, j, 0);\n V.set(j, i, 0);\n }\n } else {\n for (k = 0; k < i; k++) {\n d[k] /= scale;\n h += d[k] * d[k];\n }\n\n f = d[i - 1];\n g = Math.sqrt(h);\n if (f > 0) {\n g = -g;\n }\n\n e[i] = scale * g;\n h = h - f * g;\n d[i - 1] = f - g;\n for (j = 0; j < i; j++) {\n e[j] = 0;\n }\n\n for (j = 0; j < i; j++) {\n f = d[j];\n V.set(j, i, f);\n g = e[j] + V.get(j, j) * f;\n for (k = j + 1; k <= i - 1; k++) {\n g += V.get(k, j) * d[k];\n e[k] += V.get(k, j) * f;\n }\n e[j] = g;\n }\n\n f = 0;\n for (j = 0; j < i; j++) {\n e[j] /= h;\n f += e[j] * d[j];\n }\n\n hh = f / (h + h);\n for (j = 0; j < i; j++) {\n e[j] -= hh * d[j];\n }\n\n for (j = 0; j < i; j++) {\n f = d[j];\n g = e[j];\n for (k = j; k <= i - 1; k++) {\n V.set(k, j, V.get(k, j) - (f * e[k] + g * d[k]));\n }\n d[j] = V.get(i - 1, j);\n V.set(i, j, 0);\n }\n }\n d[i] = h;\n }\n\n for (i = 0; i < n - 1; i++) {\n V.set(n - 1, i, V.get(i, i));\n V.set(i, i, 1);\n h = d[i + 1];\n if (h !== 0) {\n for (k = 0; k <= i; k++) {\n d[k] = V.get(k, i + 1) / h;\n }\n\n for (j = 0; j <= i; j++) {\n g = 0;\n for (k = 0; k <= i; k++) {\n g += V.get(k, i + 1) * V.get(k, j);\n }\n for (k = 0; k <= i; k++) {\n V.set(k, j, V.get(k, j) - g * d[k]);\n }\n }\n }\n\n for (k = 0; k <= i; k++) {\n V.set(k, i + 1, 0);\n }\n }\n\n for (j = 0; j < n; j++) {\n d[j] = V.get(n - 1, j);\n V.set(n - 1, j, 0);\n }\n\n V.set(n - 1, n - 1, 1);\n e[0] = 0;\n}\n\nfunction tql2(n, e, d, V) {\n let g, h, i, j, k, l, m, p, r, dl1, c, c2, c3, el1, s, s2, iter;\n\n for (i = 1; i < n; i++) {\n e[i - 1] = e[i];\n }\n\n e[n - 1] = 0;\n\n let f = 0;\n let tst1 = 0;\n let eps = Number.EPSILON;\n\n for (l = 0; l < n; l++) {\n tst1 = Math.max(tst1, Math.abs(d[l]) + Math.abs(e[l]));\n m = l;\n while (m < n) {\n if (Math.abs(e[m]) <= eps * tst1) {\n break;\n }\n m++;\n }\n\n if (m > l) {\n iter = 0;\n do {\n iter = iter + 1;\n\n g = d[l];\n p = (d[l + 1] - g) / (2 * e[l]);\n r = hypotenuse(p, 1);\n if (p < 0) {\n r = -r;\n }\n\n d[l] = e[l] / (p + r);\n d[l + 1] = e[l] * (p + r);\n dl1 = d[l + 1];\n h = g - d[l];\n for (i = l + 2; i < n; i++) {\n d[i] -= h;\n }\n\n f = f + h;\n\n p = d[m];\n c = 1;\n c2 = c;\n c3 = c;\n el1 = e[l + 1];\n s = 0;\n s2 = 0;\n for (i = m - 1; i >= l; i--) {\n c3 = c2;\n c2 = c;\n s2 = s;\n g = c * e[i];\n h = c * p;\n r = hypotenuse(p, e[i]);\n e[i + 1] = s * r;\n s = e[i] / r;\n c = p / r;\n p = c * d[i] - s * g;\n d[i + 1] = h + s * (c * g + s * d[i]);\n\n for (k = 0; k < n; k++) {\n h = V.get(k, i + 1);\n V.set(k, i + 1, s * V.get(k, i) + c * h);\n V.set(k, i, c * V.get(k, i) - s * h);\n }\n }\n\n p = (-s * s2 * c3 * el1 * e[l]) / dl1;\n e[l] = s * p;\n d[l] = c * p;\n } while (Math.abs(e[l]) > eps * tst1);\n }\n d[l] = d[l] + f;\n e[l] = 0;\n }\n\n for (i = 0; i < n - 1; i++) {\n k = i;\n p = d[i];\n for (j = i + 1; j < n; j++) {\n if (d[j] < p) {\n k = j;\n p = d[j];\n }\n }\n\n if (k !== i) {\n d[k] = d[i];\n d[i] = p;\n for (j = 0; j < n; j++) {\n p = V.get(j, i);\n V.set(j, i, V.get(j, k));\n V.set(j, k, p);\n }\n }\n }\n}\n\nfunction orthes(n, H, ort, V) {\n let low = 0;\n let high = n - 1;\n let f, g, h, i, j, m;\n let scale;\n\n for (m = low + 1; m <= high - 1; m++) {\n scale = 0;\n for (i = m; i <= high; i++) {\n scale = scale + Math.abs(H.get(i, m - 1));\n }\n\n if (scale !== 0) {\n h = 0;\n for (i = high; i >= m; i--) {\n ort[i] = H.get(i, m - 1) / scale;\n h += ort[i] * ort[i];\n }\n\n g = Math.sqrt(h);\n if (ort[m] > 0) {\n g = -g;\n }\n\n h = h - ort[m] * g;\n ort[m] = ort[m] - g;\n\n for (j = m; j < n; j++) {\n f = 0;\n for (i = high; i >= m; i--) {\n f += ort[i] * H.get(i, j);\n }\n\n f = f / h;\n for (i = m; i <= high; i++) {\n H.set(i, j, H.get(i, j) - f * ort[i]);\n }\n }\n\n for (i = 0; i <= high; i++) {\n f = 0;\n for (j = high; j >= m; j--) {\n f += ort[j] * H.get(i, j);\n }\n\n f = f / h;\n for (j = m; j <= high; j++) {\n H.set(i, j, H.get(i, j) - f * ort[j]);\n }\n }\n\n ort[m] = scale * ort[m];\n H.set(m, m - 1, scale * g);\n }\n }\n\n for (i = 0; i < n; i++) {\n for (j = 0; j < n; j++) {\n V.set(i, j, i === j ? 1 : 0);\n }\n }\n\n for (m = high - 1; m >= low + 1; m--) {\n if (H.get(m, m - 1) !== 0) {\n for (i = m + 1; i <= high; i++) {\n ort[i] = H.get(i, m - 1);\n }\n\n for (j = m; j <= high; j++) {\n g = 0;\n for (i = m; i <= high; i++) {\n g += ort[i] * V.get(i, j);\n }\n\n g = g / ort[m] / H.get(m, m - 1);\n for (i = m; i <= high; i++) {\n V.set(i, j, V.get(i, j) + g * ort[i]);\n }\n }\n }\n }\n}\n\nfunction hqr2(nn, e, d, V, H) {\n let n = nn - 1;\n let low = 0;\n let high = nn - 1;\n let eps = Number.EPSILON;\n let exshift = 0;\n let norm = 0;\n let p = 0;\n let q = 0;\n let r = 0;\n let s = 0;\n let z = 0;\n let iter = 0;\n let i, j, k, l, m, t, w, x, y;\n let ra, sa, vr, vi;\n let notlast, cdivres;\n\n for (i = 0; i < nn; i++) {\n if (i < low || i > high) {\n d[i] = H.get(i, i);\n e[i] = 0;\n }\n\n for (j = Math.max(i - 1, 0); j < nn; j++) {\n norm = norm + Math.abs(H.get(i, j));\n }\n }\n\n while (n >= low) {\n l = n;\n while (l > low) {\n s = Math.abs(H.get(l - 1, l - 1)) + Math.abs(H.get(l, l));\n if (s === 0) {\n s = norm;\n }\n if (Math.abs(H.get(l, l - 1)) < eps * s) {\n break;\n }\n l--;\n }\n\n if (l === n) {\n H.set(n, n, H.get(n, n) + exshift);\n d[n] = H.get(n, n);\n e[n] = 0;\n n--;\n iter = 0;\n } else if (l === n - 1) {\n w = H.get(n, n - 1) * H.get(n - 1, n);\n p = (H.get(n - 1, n - 1) - H.get(n, n)) / 2;\n q = p * p + w;\n z = Math.sqrt(Math.abs(q));\n H.set(n, n, H.get(n, n) + exshift);\n H.set(n - 1, n - 1, H.get(n - 1, n - 1) + exshift);\n x = H.get(n, n);\n\n if (q >= 0) {\n z = p >= 0 ? p + z : p - z;\n d[n - 1] = x + z;\n d[n] = d[n - 1];\n if (z !== 0) {\n d[n] = x - w / z;\n }\n e[n - 1] = 0;\n e[n] = 0;\n x = H.get(n, n - 1);\n s = Math.abs(x) + Math.abs(z);\n p = x / s;\n q = z / s;\n r = Math.sqrt(p * p + q * q);\n p = p / r;\n q = q / r;\n\n for (j = n - 1; j < nn; j++) {\n z = H.get(n - 1, j);\n H.set(n - 1, j, q * z + p * H.get(n, j));\n H.set(n, j, q * H.get(n, j) - p * z);\n }\n\n for (i = 0; i <= n; i++) {\n z = H.get(i, n - 1);\n H.set(i, n - 1, q * z + p * H.get(i, n));\n H.set(i, n, q * H.get(i, n) - p * z);\n }\n\n for (i = low; i <= high; i++) {\n z = V.get(i, n - 1);\n V.set(i, n - 1, q * z + p * V.get(i, n));\n V.set(i, n, q * V.get(i, n) - p * z);\n }\n } else {\n d[n - 1] = x + p;\n d[n] = x + p;\n e[n - 1] = z;\n e[n] = -z;\n }\n\n n = n - 2;\n iter = 0;\n } else {\n x = H.get(n, n);\n y = 0;\n w = 0;\n if (l < n) {\n y = H.get(n - 1, n - 1);\n w = H.get(n, n - 1) * H.get(n - 1, n);\n }\n\n if (iter === 10) {\n exshift += x;\n for (i = low; i <= n; i++) {\n H.set(i, i, H.get(i, i) - x);\n }\n s = Math.abs(H.get(n, n - 1)) + Math.abs(H.get(n - 1, n - 2));\n x = y = 0.75 * s;\n w = -0.4375 * s * s;\n }\n\n if (iter === 30) {\n s = (y - x) / 2;\n s = s * s + w;\n if (s > 0) {\n s = Math.sqrt(s);\n if (y < x) {\n s = -s;\n }\n s = x - w / ((y - x) / 2 + s);\n for (i = low; i <= n; i++) {\n H.set(i, i, H.get(i, i) - s);\n }\n exshift += s;\n x = y = w = 0.964;\n }\n }\n\n iter = iter + 1;\n\n m = n - 2;\n while (m >= l) {\n z = H.get(m, m);\n r = x - z;\n s = y - z;\n p = (r * s - w) / H.get(m + 1, m) + H.get(m, m + 1);\n q = H.get(m + 1, m + 1) - z - r - s;\n r = H.get(m + 2, m + 1);\n s = Math.abs(p) + Math.abs(q) + Math.abs(r);\n p = p / s;\n q = q / s;\n r = r / s;\n if (m === l) {\n break;\n }\n if (\n Math.abs(H.get(m, m - 1)) * (Math.abs(q) + Math.abs(r)) <\n eps *\n (Math.abs(p) *\n (Math.abs(H.get(m - 1, m - 1)) +\n Math.abs(z) +\n Math.abs(H.get(m + 1, m + 1))))\n ) {\n break;\n }\n m--;\n }\n\n for (i = m + 2; i <= n; i++) {\n H.set(i, i - 2, 0);\n if (i > m + 2) {\n H.set(i, i - 3, 0);\n }\n }\n\n for (k = m; k <= n - 1; k++) {\n notlast = k !== n - 1;\n if (k !== m) {\n p = H.get(k, k - 1);\n q = H.get(k + 1, k - 1);\n r = notlast ? H.get(k + 2, k - 1) : 0;\n x = Math.abs(p) + Math.abs(q) + Math.abs(r);\n if (x !== 0) {\n p = p / x;\n q = q / x;\n r = r / x;\n }\n }\n\n if (x === 0) {\n break;\n }\n\n s = Math.sqrt(p * p + q * q + r * r);\n if (p < 0) {\n s = -s;\n }\n\n if (s !== 0) {\n if (k !== m) {\n H.set(k, k - 1, -s * x);\n } else if (l !== m) {\n H.set(k, k - 1, -H.get(k, k - 1));\n }\n\n p = p + s;\n x = p / s;\n y = q / s;\n z = r / s;\n q = q / p;\n r = r / p;\n\n for (j = k; j < nn; j++) {\n p = H.get(k, j) + q * H.get(k + 1, j);\n if (notlast) {\n p = p + r * H.get(k + 2, j);\n H.set(k + 2, j, H.get(k + 2, j) - p * z);\n }\n\n H.set(k, j, H.get(k, j) - p * x);\n H.set(k + 1, j, H.get(k + 1, j) - p * y);\n }\n\n for (i = 0; i <= Math.min(n, k + 3); i++) {\n p = x * H.get(i, k) + y * H.get(i, k + 1);\n if (notlast) {\n p = p + z * H.get(i, k + 2);\n H.set(i, k + 2, H.get(i, k + 2) - p * r);\n }\n\n H.set(i, k, H.get(i, k) - p);\n H.set(i, k + 1, H.get(i, k + 1) - p * q);\n }\n\n for (i = low; i <= high; i++) {\n p = x * V.get(i, k) + y * V.get(i, k + 1);\n if (notlast) {\n p = p + z * V.get(i, k + 2);\n V.set(i, k + 2, V.get(i, k + 2) - p * r);\n }\n\n V.set(i, k, V.get(i, k) - p);\n V.set(i, k + 1, V.get(i, k + 1) - p * q);\n }\n }\n }\n }\n }\n\n if (norm === 0) {\n return;\n }\n\n for (n = nn - 1; n >= 0; n--) {\n p = d[n];\n q = e[n];\n\n if (q === 0) {\n l = n;\n H.set(n, n, 1);\n for (i = n - 1; i >= 0; i--) {\n w = H.get(i, i) - p;\n r = 0;\n for (j = l; j <= n; j++) {\n r = r + H.get(i, j) * H.get(j, n);\n }\n\n if (e[i] < 0) {\n z = w;\n s = r;\n } else {\n l = i;\n if (e[i] === 0) {\n H.set(i, n, w !== 0 ? -r / w : -r / (eps * norm));\n } else {\n x = H.get(i, i + 1);\n y = H.get(i + 1, i);\n q = (d[i] - p) * (d[i] - p) + e[i] * e[i];\n t = (x * s - z * r) / q;\n H.set(i, n, t);\n H.set(\n i + 1,\n n,\n Math.abs(x) > Math.abs(z) ? (-r - w * t) / x : (-s - y * t) / z,\n );\n }\n\n t = Math.abs(H.get(i, n));\n if (eps * t * t > 1) {\n for (j = i; j <= n; j++) {\n H.set(j, n, H.get(j, n) / t);\n }\n }\n }\n }\n } else if (q < 0) {\n l = n - 1;\n\n if (Math.abs(H.get(n, n - 1)) > Math.abs(H.get(n - 1, n))) {\n H.set(n - 1, n - 1, q / H.get(n, n - 1));\n H.set(n - 1, n, -(H.get(n, n) - p) / H.get(n, n - 1));\n } else {\n cdivres = cdiv(0, -H.get(n - 1, n), H.get(n - 1, n - 1) - p, q);\n H.set(n - 1, n - 1, cdivres[0]);\n H.set(n - 1, n, cdivres[1]);\n }\n\n H.set(n, n - 1, 0);\n H.set(n, n, 1);\n for (i = n - 2; i >= 0; i--) {\n ra = 0;\n sa = 0;\n for (j = l; j <= n; j++) {\n ra = ra + H.get(i, j) * H.get(j, n - 1);\n sa = sa + H.get(i, j) * H.get(j, n);\n }\n\n w = H.get(i, i) - p;\n\n if (e[i] < 0) {\n z = w;\n r = ra;\n s = sa;\n } else {\n l = i;\n if (e[i] === 0) {\n cdivres = cdiv(-ra, -sa, w, q);\n H.set(i, n - 1, cdivres[0]);\n H.set(i, n, cdivres[1]);\n } else {\n x = H.get(i, i + 1);\n y = H.get(i + 1, i);\n vr = (d[i] - p) * (d[i] - p) + e[i] * e[i] - q * q;\n vi = (d[i] - p) * 2 * q;\n if (vr === 0 && vi === 0) {\n vr =\n eps *\n norm *\n (Math.abs(w) +\n Math.abs(q) +\n Math.abs(x) +\n Math.abs(y) +\n Math.abs(z));\n }\n cdivres = cdiv(\n x * r - z * ra + q * sa,\n x * s - z * sa - q * ra,\n vr,\n vi,\n );\n H.set(i, n - 1, cdivres[0]);\n H.set(i, n, cdivres[1]);\n if (Math.abs(x) > Math.abs(z) + Math.abs(q)) {\n H.set(\n i + 1,\n n - 1,\n (-ra - w * H.get(i, n - 1) + q * H.get(i, n)) / x,\n );\n H.set(\n i + 1,\n n,\n (-sa - w * H.get(i, n) - q * H.get(i, n - 1)) / x,\n );\n } else {\n cdivres = cdiv(\n -r - y * H.get(i, n - 1),\n -s - y * H.get(i, n),\n z,\n q,\n );\n H.set(i + 1, n - 1, cdivres[0]);\n H.set(i + 1, n, cdivres[1]);\n }\n }\n\n t = Math.max(Math.abs(H.get(i, n - 1)), Math.abs(H.get(i, n)));\n if (eps * t * t > 1) {\n for (j = i; j <= n; j++) {\n H.set(j, n - 1, H.get(j, n - 1) / t);\n H.set(j, n, H.get(j, n) / t);\n }\n }\n }\n }\n }\n }\n\n for (i = 0; i < nn; i++) {\n if (i < low || i > high) {\n for (j = i; j < nn; j++) {\n V.set(i, j, H.get(i, j));\n }\n }\n }\n\n for (j = nn - 1; j >= low; j--) {\n for (i = low; i <= high; i++) {\n z = 0;\n for (k = low; k <= Math.min(j, high); k++) {\n z = z + V.get(i, k) * H.get(k, j);\n }\n V.set(i, j, z);\n }\n }\n}\n\nfunction cdiv(xr, xi, yr, yi) {\n let r, d;\n if (Math.abs(yr) > Math.abs(yi)) {\n r = yi / yr;\n d = yr + r * yi;\n return [(xr + r * xi) / d, (xi - r * xr) / d];\n } else {\n r = yr / yi;\n d = yi + r * yr;\n return [(r * xr + xi) / d, (r * xi - xr) / d];\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class CholeskyDecomposition {\n constructor(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n if (!value.isSymmetric()) {\n throw new Error('Matrix is not symmetric');\n }\n\n let a = value;\n let dimension = a.rows;\n let l = new Matrix(dimension, dimension);\n let positiveDefinite = true;\n let i, j, k;\n\n for (j = 0; j < dimension; j++) {\n let d = 0;\n for (k = 0; k < j; k++) {\n let s = 0;\n for (i = 0; i < k; i++) {\n s += l.get(k, i) * l.get(j, i);\n }\n s = (a.get(j, k) - s) / l.get(k, k);\n l.set(j, k, s);\n d = d + s * s;\n }\n\n d = a.get(j, j) - d;\n\n positiveDefinite &= d > 0;\n l.set(j, j, Math.sqrt(Math.max(d, 0)));\n for (k = j + 1; k < dimension; k++) {\n l.set(j, k, 0);\n }\n }\n\n this.L = l;\n this.positiveDefinite = Boolean(positiveDefinite);\n }\n\n isPositiveDefinite() {\n return this.positiveDefinite;\n }\n\n solve(value) {\n value = WrapperMatrix2D.checkMatrix(value);\n\n let l = this.L;\n let dimension = l.rows;\n\n if (value.rows !== dimension) {\n throw new Error('Matrix dimensions do not match');\n }\n if (this.isPositiveDefinite() === false) {\n throw new Error('Matrix is not positive definite');\n }\n\n let count = value.columns;\n let B = value.clone();\n let i, j, k;\n\n for (k = 0; k < dimension; k++) {\n for (j = 0; j < count; j++) {\n for (i = 0; i < k; i++) {\n B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(k, i));\n }\n B.set(k, j, B.get(k, j) / l.get(k, k));\n }\n }\n\n for (k = dimension - 1; k >= 0; k--) {\n for (j = 0; j < count; j++) {\n for (i = k + 1; i < dimension; i++) {\n B.set(k, j, B.get(k, j) - B.get(i, j) * l.get(i, k));\n }\n B.set(k, j, B.get(k, j) / l.get(k, k));\n }\n }\n\n return B;\n }\n\n get lowerTriangularMatrix() {\n return this.L;\n }\n}\n","import Matrix from '../matrix';\nimport WrapperMatrix2D from '../wrap/WrapperMatrix2D';\n\nexport default class nipals {\n constructor(X, options = {}) {\n X = WrapperMatrix2D.checkMatrix(X);\n let { Y } = options;\n const {\n scaleScores = false,\n maxIterations = 1000,\n terminationCriteria = 1e-10,\n } = options;\n\n let u;\n if (Y) {\n if (Array.isArray(Y) && typeof Y[0] === 'number') {\n Y = Matrix.columnVector(Y);\n } else {\n Y = WrapperMatrix2D.checkMatrix(Y);\n }\n if (!Y.isColumnVector() || Y.rows !== X.rows) {\n throw new Error('Y must be a column vector of length X.rows');\n }\n u = Y;\n } else {\n u = X.getColumnVector(0);\n }\n\n let diff = 1;\n let t, q, w, tOld;\n\n for (\n let counter = 0;\n counter < maxIterations && diff > terminationCriteria;\n counter++\n ) {\n w = X.transpose().mmul(u).div(u.transpose().mmul(u).get(0, 0));\n w = w.div(w.norm());\n\n t = X.mmul(w).div(w.transpose().mmul(w).get(0, 0));\n\n if (counter > 0) {\n diff = t.clone().sub(tOld).pow(2).sum();\n }\n tOld = t.clone();\n\n if (Y) {\n q = Y.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n q = q.div(q.norm());\n\n u = Y.mmul(q).div(q.transpose().mmul(q).get(0, 0));\n } else {\n u = t;\n }\n }\n\n if (Y) {\n let p = X.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n p = p.div(p.norm());\n let xResidual = X.clone().sub(t.clone().mmul(p.transpose()));\n let residual = u.transpose().mmul(t).div(t.transpose().mmul(t).get(0, 0));\n let yResidual = Y.clone().sub(\n t.clone().mulS(residual.get(0, 0)).mmul(q.transpose()),\n );\n\n this.t = t;\n this.p = p.transpose();\n this.w = w.transpose();\n this.q = q;\n this.u = u;\n this.s = t.transpose().mmul(t);\n this.xResidual = xResidual;\n this.yResidual = yResidual;\n this.betas = residual;\n } else {\n this.w = w.transpose();\n this.s = t.transpose().mmul(t).sqrt();\n if (scaleScores) {\n this.t = t.clone().div(this.s.get(0, 0));\n } else {\n this.t = t;\n }\n this.xResidual = X.sub(t.mmul(w.transpose()));\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ml_matrix_1 = require(\"ml-matrix\");\nvar MDS = /** @class */ (function () {\n function MDS(params) {\n this.distances = params.distances;\n this.dimension = params.dimension || 2;\n this.linkDistance = params.linkDistance;\n }\n MDS.prototype.layout = function () {\n var self = this;\n var dimension = self.dimension, distances = self.distances, linkDistance = self.linkDistance;\n try {\n // square distances\n var M = ml_matrix_1.Matrix.mul(ml_matrix_1.Matrix.pow(distances, 2), -0.5);\n // double centre the rows/columns\n var rowMeans = M.mean('row');\n var colMeans = M.mean('column');\n var totalMean = M.mean();\n M.add(totalMean).subRowVector(rowMeans).subColumnVector(colMeans);\n // take the SVD of the double centred matrix, and return the\n // points from it\n var ret = new ml_matrix_1.SingularValueDecomposition(M);\n var eigenValues_1 = ml_matrix_1.Matrix.sqrt(ret.diagonalMatrix).diagonal();\n return ret.leftSingularVectors.toJSON().map(function (row) {\n return ml_matrix_1.Matrix.mul([row], [eigenValues_1]).toJSON()[0].splice(0, dimension);\n });\n }\n catch (_a) {\n var res = [];\n for (var i = 0; i < distances.length; i++) {\n var x = Math.random() * linkDistance;\n var y = Math.random() * linkDistance;\n res.push([x, y]);\n }\n return res;\n }\n };\n return MDS;\n}());\nexports.default = MDS;\n//# sourceMappingURL=mds.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SPEED_DIVISOR = 800;\nvar RadialNonoverlapForce = /** @class */ (function () {\n function RadialNonoverlapForce(params) {\n this.disp = [];\n this.positions = params.positions;\n this.adjMatrix = params.adjMatrix;\n this.focusID = params.focusID;\n this.radii = params.radii;\n this.iterations = params.iterations || 10;\n this.height = params.height || 10;\n this.width = params.width || 10;\n this.speed = params.speed || 100;\n this.gravity = params.gravity || 10;\n this.nodeSizeFunc = params.nodeSizeFunc;\n this.k = params.k || 5;\n this.strictRadial = params.strictRadial;\n this.nodes = params.nodes;\n }\n RadialNonoverlapForce.prototype.layout = function () {\n var self = this;\n var positions = self.positions;\n var disp = [];\n var iterations = self.iterations;\n var maxDisplace = self.width / 10;\n self.maxDisplace = maxDisplace;\n self.disp = disp;\n for (var i = 0; i < iterations; i++) {\n positions.forEach(function (_, k) {\n disp[k] = { x: 0, y: 0 };\n });\n // 给重叠的节点增加斥力\n self.getRepulsion();\n self.updatePositions();\n }\n return positions;\n };\n RadialNonoverlapForce.prototype.getRepulsion = function () {\n var self = this;\n var positions = self.positions;\n var nodes = self.nodes;\n var disp = self.disp;\n var k = self.k;\n var radii = self.radii || [];\n positions.forEach(function (v, i) {\n disp[i] = { x: 0, y: 0 };\n positions.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n // v and u are not on the same circle, return\n if (radii[i] !== radii[j]) {\n return;\n }\n var vecx = v[0] - u[0];\n var vecy = v[1] - u[1];\n var vecLength = Math.sqrt(vecx * vecx + vecy * vecy);\n if (vecLength === 0) {\n vecLength = 1;\n var sign = i > j ? 1 : -1;\n vecx = 0.01 * sign;\n vecy = 0.01 * sign;\n }\n // these two nodes overlap\n if (vecLength < self.nodeSizeFunc(nodes[i]) / 2 + self.nodeSizeFunc(nodes[j]) / 2) {\n var common = (k * k) / vecLength;\n disp[i].x += (vecx / vecLength) * common;\n disp[i].y += (vecy / vecLength) * common;\n }\n });\n });\n };\n RadialNonoverlapForce.prototype.updatePositions = function () {\n var self = this;\n var positions = self.positions;\n var disp = self.disp;\n var speed = self.speed;\n var strictRadial = self.strictRadial;\n var f = self.focusID;\n var maxDisplace = self.maxDisplace || self.width / 10;\n if (strictRadial) {\n disp.forEach(function (di, i) {\n var vx = positions[i][0] - positions[f][0];\n var vy = positions[i][1] - positions[f][1];\n var vLength = Math.sqrt(vx * vx + vy * vy);\n var vpx = vy / vLength;\n var vpy = -vx / vLength;\n var diLength = Math.sqrt(di.x * di.x + di.y * di.y);\n var alpha = Math.acos((vpx * di.x + vpy * di.y) / diLength);\n if (alpha > Math.PI / 2) {\n alpha -= Math.PI / 2;\n vpx *= -1;\n vpy *= -1;\n }\n var tdispLength = Math.cos(alpha) * diLength;\n di.x = vpx * tdispLength;\n di.y = vpy * tdispLength;\n });\n }\n // move\n var radii = self.radii;\n positions.forEach(function (n, i) {\n if (i === f) {\n return;\n }\n var distLength = Math.sqrt(disp[i].x * disp[i].x + disp[i].y * disp[i].y);\n if (distLength > 0 && i !== f) {\n var limitedDist = Math.min(maxDisplace * (speed / SPEED_DIVISOR), distLength);\n n[0] += (disp[i].x / distLength) * limitedDist;\n n[1] += (disp[i].y / distLength) * limitedDist;\n if (strictRadial) {\n var vx = n[0] - positions[f][0];\n var vy = n[1] - positions[f][1];\n var nfDis = Math.sqrt(vx * vx + vy * vy);\n vx = (vx / nfDis) * radii[i];\n vy = (vy / nfDis) * radii[i];\n n[0] = positions[f][0] + vx;\n n[1] = positions[f][1] + vy;\n }\n }\n });\n };\n return RadialNonoverlapForce;\n}());\nexports.default = RadialNonoverlapForce;\n//# sourceMappingURL=radialNonoverlapForce.js.map","\"use strict\";\n/**\n * @fileOverview random layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RadialLayout = void 0;\nvar util_1 = require(\"../../util\");\nvar base_1 = require(\"../base\");\nvar mds_1 = __importDefault(require(\"./mds\"));\nvar radialNonoverlapForce_1 = __importDefault(require(\"./radialNonoverlapForce\"));\nfunction getWeightMatrix(M) {\n var rows = M.length;\n var cols = M[0].length;\n var result = [];\n for (var i = 0; i < rows; i++) {\n var row = [];\n for (var j = 0; j < cols; j++) {\n if (M[i][j] !== 0) {\n row.push(1 / (M[i][j] * M[i][j]));\n }\n else {\n row.push(0);\n }\n }\n result.push(row);\n }\n return result;\n}\nfunction getIndexById(array, id) {\n var index = -1;\n array.forEach(function (a, i) {\n if (a.id === id) {\n index = i;\n }\n });\n return index;\n}\nfunction getEDistance(p1, p2) {\n return Math.sqrt((p1[0] - p2[0]) * (p1[0] - p2[0]) + (p1[1] - p2[1]) * (p1[1] - p2[1]));\n}\n/**\n * 辐射状布局\n */\nvar RadialLayout = /** @class */ (function (_super) {\n __extends(RadialLayout, _super);\n function RadialLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 中心点,默认为数据中第一个点 */\n _this.focusNode = null;\n /** 每一圈半径 */\n _this.unitRadius = null;\n /** 默认边长度 */\n _this.linkDistance = 50;\n /** 是否防止重叠 */\n _this.preventOverlap = false;\n /** 是否必须是严格的 radial 布局,即每一层的节点严格布局在一个环上。preventOverlap 为 true 时生效 */\n _this.strictRadial = true;\n /** 防止重叠步骤的最大迭代次数 */\n _this.maxPreventOverlapIteration = 200;\n _this.sortStrength = 10;\n _this.nodes = [];\n _this.edges = [];\n _this.updateCfg(options);\n return _this;\n }\n RadialLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n focusNode: null,\n unitRadius: null,\n linkDistance: 50,\n preventOverlap: false,\n nodeSize: undefined,\n nodeSpacing: undefined,\n strictRadial: true,\n maxPreventOverlapIteration: 200,\n sortBy: undefined,\n sortStrength: 10\n };\n };\n /**\n * 执行布局\n */\n RadialLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges || [];\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var linkDistance = self.linkDistance;\n // layout\n var focusNode = null;\n if ((0, util_1.isString)(self.focusNode)) {\n var found = false;\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].id === self.focusNode) {\n focusNode = nodes[i];\n self.focusNode = focusNode;\n found = true;\n i = nodes.length;\n }\n }\n if (!found) {\n focusNode = null;\n }\n }\n else {\n focusNode = self.focusNode;\n }\n // default focus node\n if (!focusNode) {\n focusNode = nodes[0];\n self.focusNode = focusNode;\n }\n // the index of the focusNode in data\n var focusIndex = getIndexById(nodes, focusNode.id);\n if (focusIndex < 0)\n focusIndex = 0;\n self.focusIndex = focusIndex;\n // the graph-theoretic distance (shortest path distance) matrix\n var adjMatrix = (0, util_1.getAdjMatrix)({ nodes: nodes, edges: edges }, false);\n var D = (0, util_1.floydWarshall)(adjMatrix);\n var maxDistance = self.maxToFocus(D, focusIndex);\n // replace first node in unconnected component to the circle at (maxDistance + 1)\n self.handleInfinity(D, focusIndex, maxDistance + 1);\n self.distances = D;\n // the shortest path distance from each node to focusNode\n var focusNodeD = D[focusIndex];\n var width = self.width || 500;\n var height = self.height || 500;\n var semiWidth = width - center[0] > center[0] ? center[0] : width - center[0];\n var semiHeight = height - center[1] > center[1] ? center[1] : height - center[1];\n if (semiWidth === 0) {\n semiWidth = width / 2;\n }\n if (semiHeight === 0) {\n semiHeight = height / 2;\n }\n // the maxRadius of the graph\n var maxRadius = semiHeight > semiWidth ? semiWidth : semiHeight;\n var maxD = Math.max.apply(Math, focusNodeD);\n // the radius for each nodes away from focusNode\n var radii = [];\n focusNodeD.forEach(function (value, i) {\n if (!self.unitRadius) {\n self.unitRadius = maxRadius / maxD;\n }\n radii[i] = value * self.unitRadius;\n });\n self.radii = radii;\n var eIdealD = self.eIdealDisMatrix();\n // const eIdealD = scaleMatrix(D, linkDistance);\n self.eIdealDistances = eIdealD;\n // the weight matrix, Wij = 1 / dij^(-2)\n var W = getWeightMatrix(eIdealD);\n self.weights = W;\n // the initial positions from mds\n var mds = new mds_1.default({ linkDistance: linkDistance, distances: eIdealD });\n var positions = mds.layout();\n positions.forEach(function (p) {\n if ((0, util_1.isNaN)(p[0])) {\n p[0] = Math.random() * linkDistance;\n }\n if ((0, util_1.isNaN)(p[1])) {\n p[1] = Math.random() * linkDistance;\n }\n });\n self.positions = positions;\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n // move the graph to origin, centered at focusNode\n positions.forEach(function (p) {\n p[0] -= positions[focusIndex][0];\n p[1] -= positions[focusIndex][1];\n });\n self.run();\n var preventOverlap = self.preventOverlap;\n var nodeSize = self.nodeSize;\n var nodeSizeFunc;\n var strictRadial = self.strictRadial;\n // stagger the overlapped nodes\n if (preventOverlap) {\n var nodeSpacing_1 = self.nodeSpacing;\n var nodeSpacingFunc_1;\n if ((0, util_1.isNumber)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = function () { return nodeSpacing_1; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing_1)) {\n nodeSpacingFunc_1 = nodeSpacing_1;\n }\n else {\n nodeSpacingFunc_1 = function () { return 0; };\n }\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res + nodeSpacingFunc_1(d);\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res + nodeSpacingFunc_1(d);\n }\n return d.size + nodeSpacingFunc_1(d);\n }\n return 10 + nodeSpacingFunc_1(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var res = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n return res + nodeSpacingFunc_1(d);\n };\n }\n else {\n nodeSizeFunc = function (d) { return nodeSize + nodeSpacingFunc_1(d); };\n }\n var nonoverlapForceParams = {\n nodes: nodes,\n nodeSizeFunc: nodeSizeFunc,\n adjMatrix: adjMatrix,\n positions: positions,\n radii: radii,\n height: height,\n width: width,\n strictRadial: strictRadial,\n focusID: focusIndex,\n iterations: self.maxPreventOverlapIteration || 200,\n k: positions.length / 4.5\n };\n var nonoverlapForce = new radialNonoverlapForce_1.default(nonoverlapForceParams);\n positions = nonoverlapForce.layout();\n }\n // move the graph to center\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n RadialLayout.prototype.run = function () {\n var self = this;\n var maxIteration = self.maxIteration;\n var positions = self.positions || [];\n var W = self.weights || [];\n var eIdealDis = self.eIdealDistances || [];\n var radii = self.radii || [];\n for (var i = 0; i <= maxIteration; i++) {\n var param = i / maxIteration;\n self.oneIteration(param, positions, radii, eIdealDis, W);\n }\n };\n RadialLayout.prototype.oneIteration = function (param, positions, radii, D, W) {\n var self = this;\n var vparam = 1 - param;\n var focusIndex = self.focusIndex;\n positions.forEach(function (v, i) {\n // v\n var originDis = getEDistance(v, [0, 0]);\n var reciODis = originDis === 0 ? 0 : 1 / originDis;\n if (i === focusIndex) {\n return;\n }\n var xMolecule = 0;\n var yMolecule = 0;\n var denominator = 0;\n positions.forEach(function (u, j) {\n // u\n if (i === j) {\n return;\n }\n // the euclidean distance between v and u\n var edis = getEDistance(v, u);\n var reciEdis = edis === 0 ? 0 : 1 / edis;\n var idealDis = D[j][i];\n // same for x and y\n denominator += W[i][j];\n // x\n xMolecule += W[i][j] * (u[0] + idealDis * (v[0] - u[0]) * reciEdis);\n // y\n yMolecule += W[i][j] * (u[1] + idealDis * (v[1] - u[1]) * reciEdis);\n });\n var reciR = radii[i] === 0 ? 0 : 1 / radii[i];\n denominator *= vparam;\n denominator += param * reciR * reciR;\n // x\n xMolecule *= vparam;\n xMolecule += param * reciR * v[0] * reciODis;\n v[0] = xMolecule / denominator;\n // y\n yMolecule *= vparam;\n yMolecule += param * reciR * v[1] * reciODis;\n v[1] = yMolecule / denominator;\n });\n };\n RadialLayout.prototype.eIdealDisMatrix = function () {\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return [];\n var D = self.distances;\n var linkDis = self.linkDistance;\n var radii = self.radii || [];\n var unitRadius = self.unitRadius || 50;\n var result = [];\n if (D) {\n D.forEach(function (row, i) {\n var newRow = [];\n row.forEach(function (v, j) {\n if (i === j) {\n newRow.push(0);\n }\n else if (radii[i] === radii[j]) {\n // i and j are on the same circle\n if (self.sortBy === \"data\") {\n // sort the nodes on the same circle according to the ordering of the data\n newRow.push((v * (Math.abs(i - j) * self.sortStrength)) /\n (radii[i] / unitRadius));\n }\n else if (self.sortBy) {\n // sort the nodes on the same circle according to the attributes\n var iValue = nodes[i][self.sortBy] || 0;\n var jValue = nodes[j][self.sortBy] || 0;\n if ((0, util_1.isString)(iValue)) {\n iValue = iValue.charCodeAt(0);\n }\n if ((0, util_1.isString)(jValue)) {\n jValue = jValue.charCodeAt(0);\n }\n newRow.push((v * (Math.abs(iValue - jValue) * self.sortStrength)) /\n (radii[i] / unitRadius));\n }\n else {\n newRow.push((v * linkDis) / (radii[i] / unitRadius));\n }\n }\n else {\n // i and j are on different circle\n // i and j are on different circle\n var link = (linkDis + unitRadius) / 2;\n newRow.push(v * link);\n }\n });\n result.push(newRow);\n });\n }\n return result;\n };\n RadialLayout.prototype.handleInfinity = function (matrix, focusIndex, step) {\n var length = matrix.length;\n // 遍历 matrix 中遍历 focus 对应行\n for (var i = 0; i < length; i++) {\n // matrix 关注点对应行的 Inf 项\n if (matrix[focusIndex][i] === Infinity) {\n matrix[focusIndex][i] = step;\n matrix[i][focusIndex] = step;\n // 遍历 matrix 中的 i 行,i 行中非 Inf 项若在 focus 行为 Inf,则替换 focus 行的那个 Inf\n for (var j = 0; j < length; j++) {\n if (matrix[i][j] !== Infinity && matrix[focusIndex][j] === Infinity) {\n matrix[focusIndex][j] = step + matrix[i][j];\n matrix[j][focusIndex] = step + matrix[i][j];\n }\n }\n }\n }\n // 处理其他行的 Inf。根据该行对应点与 focus 距离以及 Inf 项点 与 focus 距离,决定替换值\n for (var i = 0; i < length; i++) {\n if (i === focusIndex) {\n continue;\n }\n for (var j = 0; j < length; j++) {\n if (matrix[i][j] === Infinity) {\n var minus = Math.abs(matrix[focusIndex][i] - matrix[focusIndex][j]);\n minus = minus === 0 ? 1 : minus;\n matrix[i][j] = minus;\n }\n }\n }\n };\n RadialLayout.prototype.maxToFocus = function (matrix, focusIndex) {\n var max = 0;\n for (var i = 0; i < matrix[focusIndex].length; i++) {\n if (matrix[focusIndex][i] === Infinity) {\n continue;\n }\n max = matrix[focusIndex][i] > max ? matrix[focusIndex][i] : max;\n }\n return max;\n };\n RadialLayout.prototype.getType = function () {\n return \"radial\";\n };\n return RadialLayout;\n}(base_1.Base));\nexports.RadialLayout = RadialLayout;\n//# sourceMappingURL=radial.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./radial\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/**\n * @fileOverview concentric layout\n * @author shiwu.wyy@antfin.com\n * this algorithm refers to - https://github.com/cytoscape/cytoscape.js/\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConcentricLayout = void 0;\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * 同心圆布局\n */\nvar ConcentricLayout = /** @class */ (function (_super) {\n __extends(ConcentricLayout, _super);\n function ConcentricLayout(options) {\n var _this = _super.call(this) || this;\n _this.nodeSize = 30;\n /** min spacing between outside of nodes (used for radius adjustment) */\n _this.minNodeSpacing = 10;\n /** same as minNodeSpacing. min spacing between outside of nodes (used for radius adjustment) */\n _this.nodeSpacing = 10;\n /** prevents node overlap, may overflow boundingBox if not enough space */\n _this.preventOverlap = false;\n /** whether levels have an equal radial distance betwen them, may cause bounding box overflow */\n _this.equidistant = false;\n /** where nodes start in radians */\n _this.startAngle = (3 / 2) * Math.PI;\n /** whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) */\n _this.clockwise = true;\n /** 根据 sortBy 指定的属性进行排布,数值高的放在中心,如果是 sortBy 则会计算节点度数,度数最高的放在中心 */\n _this.sortBy = \"degree\";\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n ConcentricLayout.prototype.getDefaultCfg = function () {\n return {\n nodeSize: 30,\n minNodeSpacing: 10,\n nodeSpacing: 10,\n preventOverlap: false,\n sweep: undefined,\n equidistant: false,\n startAngle: (3 / 2) * Math.PI,\n clockwise: true,\n maxLevelDiff: undefined,\n sortBy: \"degree\"\n };\n };\n /**\n * 执行布局\n */\n ConcentricLayout.prototype.execute = function () {\n var _a, _b;\n var self = this;\n var nodes = self.nodes, edges = self.edges;\n var n = nodes.length;\n if (n === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (n === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeSize = self.nodeSize, nodeSpacing = self.nodeSpacing;\n var layoutNodes = [];\n var maxNodeSize;\n var maxNodeSpacing = 0;\n if ((0, util_1.isArray)(nodeSize)) {\n maxNodeSize = Math.max(nodeSize[0], nodeSize[1]);\n }\n else {\n maxNodeSize = nodeSize;\n }\n if ((0, util_1.isArray)(nodeSpacing)) {\n maxNodeSpacing = Math.max(nodeSpacing[0], nodeSpacing[1]);\n }\n else if ((0, util_1.isNumber)(nodeSpacing)) {\n maxNodeSpacing = nodeSpacing;\n }\n nodes.forEach(function (node) {\n layoutNodes.push(node);\n var nodeSize = maxNodeSize;\n if ((0, util_1.isArray)(node.size)) {\n nodeSize = Math.max(node.size[0], node.size[1]);\n }\n else if ((0, util_1.isNumber)(node.size)) {\n nodeSize = node.size;\n }\n else if ((0, util_1.isObject)(node.size)) {\n nodeSize = Math.max(node.size.width, node.size.height);\n }\n maxNodeSize = Math.max(maxNodeSize, nodeSize);\n if ((0, util_1.isFunction)(nodeSpacing)) {\n maxNodeSpacing = Math.max(nodeSpacing(node), maxNodeSpacing);\n }\n });\n self.clockwise =\n self.counterclockwise !== undefined\n ? !self.counterclockwise\n : self.clockwise;\n // layout\n var nodeMap = {};\n var indexMap = {};\n layoutNodes.forEach(function (node, i) {\n nodeMap[node.id] = node;\n indexMap[node.id] = i;\n });\n // get the node degrees\n if (self.sortBy === \"degree\" ||\n !(0, util_1.isString)(self.sortBy) ||\n layoutNodes[0][self.sortBy] === undefined) {\n self.sortBy = \"degree\";\n if (!(0, util_1.isNumber)(nodes[0].degree)) {\n var values_1 = (0, util_1.getDegree)(nodes.length, indexMap, edges);\n layoutNodes.forEach(function (node, i) {\n node.degree = values_1[i].all;\n });\n }\n }\n // sort nodes by value\n layoutNodes.sort(function (n1, n2) {\n return n2[self.sortBy] - n1[self.sortBy];\n });\n self.maxValueNode = layoutNodes[0];\n self.maxLevelDiff =\n self.maxLevelDiff || self.maxValueNode[self.sortBy] / 4;\n // put the values into levels\n var levels = [[]];\n var currentLevel = levels[0];\n layoutNodes.forEach(function (node) {\n if (currentLevel.length > 0) {\n var diff = Math.abs(currentLevel[0][self.sortBy] - node[self.sortBy]);\n if (self.maxLevelDiff && diff >= self.maxLevelDiff) {\n currentLevel = [];\n levels.push(currentLevel);\n }\n }\n currentLevel.push(node);\n });\n // create positions for levels\n var minDist = maxNodeSize + (maxNodeSpacing || self.minNodeSpacing); // min dist between nodes\n if (!self.preventOverlap) {\n // then strictly constrain to bb\n var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1;\n var maxR = Math.min(self.width, self.height) / 2 - minDist;\n var rStep = maxR / (levels.length + (firstLvlHasMulti ? 1 : 0));\n minDist = Math.min(minDist, rStep);\n }\n // find the metrics for each level\n var r = 0;\n levels.forEach(function (level) {\n var sweep = self.sweep;\n if (sweep === undefined) {\n sweep = 2 * Math.PI - (2 * Math.PI) / level.length;\n }\n var dTheta = (level.dTheta = sweep / Math.max(1, level.length - 1));\n // calculate the radius\n if (level.length > 1 && self.preventOverlap) {\n // but only if more than one node (can't overlap)\n var dcos = Math.cos(dTheta) - Math.cos(0);\n var dsin = Math.sin(dTheta) - Math.sin(0);\n var rMin = Math.sqrt((minDist * minDist) / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping\n r = Math.max(rMin, r);\n }\n level.r = r;\n r += minDist;\n });\n if (self.equidistant) {\n var rDeltaMax_1 = 0;\n var rr_1 = 0;\n for (var i = 0; i < levels.length; i++) {\n var level = levels[i];\n var rDelta = level.r - rr_1;\n rDeltaMax_1 = Math.max(rDeltaMax_1, rDelta);\n }\n rr_1 = 0;\n levels.forEach(function (level, i) {\n if (i === 0) {\n rr_1 = level.r;\n }\n level.r = rr_1;\n rr_1 += rDeltaMax_1;\n });\n }\n // calculate the node positions\n levels.forEach(function (level) {\n var dTheta = level.dTheta;\n var rr = level.r;\n level.forEach(function (node, j) {\n var theta = self.startAngle + (self.clockwise ? 1 : -1) * dTheta * j;\n node.x = center[0] + rr * Math.cos(theta);\n node.y = center[1] + rr * Math.sin(theta);\n });\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n ConcentricLayout.prototype.getType = function () {\n return \"concentric\";\n };\n return ConcentricLayout;\n}(base_1.Base));\nexports.ConcentricLayout = ConcentricLayout;\n//# sourceMappingURL=concentric.js.map","\"use strict\";\n/**\n * @fileOverview MDS layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MDSLayout = void 0;\nvar ml_matrix_1 = require(\"ml-matrix\");\nvar util_1 = require(\"../util\");\nvar base_1 = require(\"./base\");\n/**\n * mds 布局\n */\nvar MDSLayout = /** @class */ (function (_super) {\n __extends(MDSLayout, _super);\n function MDSLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 边长度 */\n _this.linkDistance = 50;\n _this.nodes = [];\n _this.edges = [];\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n _this.updateCfg(options);\n return _this;\n }\n MDSLayout.prototype.getDefaultCfg = function () {\n return {\n center: [0, 0],\n linkDistance: 50\n };\n };\n /**\n * 执行布局\n */\n MDSLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, _a = self.edges, edges = _a === void 0 ? [] : _a;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n var linkDistance = self.linkDistance;\n // the graph-theoretic distance (shortest path distance) matrix\n var adjMatrix = (0, util_1.getAdjMatrix)({ nodes: nodes, edges: edges }, false);\n var distances = (0, util_1.floydWarshall)(adjMatrix);\n self.handleInfinity(distances);\n // scale the ideal edge length acoording to linkDistance\n var scaledD = (0, util_1.scaleMatrix)(distances, linkDistance);\n self.scaledDistances = scaledD;\n // get positions by MDS\n var positions = self.runMDS();\n self.positions = positions;\n positions.forEach(function (p, i) {\n nodes[i].x = p[0] + center[0];\n nodes[i].y = p[1] + center[1];\n });\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return {\n nodes: nodes,\n edges: edges\n };\n };\n /**\n * mds 算法\n * @return {array} positions 计算后的节点位置数组\n */\n MDSLayout.prototype.runMDS = function () {\n var self = this;\n var dimension = 2;\n var distances = self.scaledDistances;\n // square distances\n var M = ml_matrix_1.Matrix.mul(ml_matrix_1.Matrix.pow(distances, 2), -0.5);\n // double centre the rows/columns\n var rowMeans = M.mean(\"row\");\n var colMeans = M.mean(\"column\");\n var totalMean = M.mean();\n M.add(totalMean)\n .subRowVector(rowMeans)\n .subColumnVector(colMeans);\n // take the SVD of the double centred matrix, and return the\n // points from it\n var ret = new ml_matrix_1.SingularValueDecomposition(M);\n var eigenValues = ml_matrix_1.Matrix.sqrt(ret.diagonalMatrix).diagonal();\n return ret.leftSingularVectors.toJSON().map(function (row) {\n return ml_matrix_1.Matrix.mul([row], [eigenValues])\n .toJSON()[0]\n .splice(0, dimension);\n });\n };\n MDSLayout.prototype.handleInfinity = function (distances) {\n var maxDistance = -999999;\n distances.forEach(function (row) {\n row.forEach(function (value) {\n if (value === Infinity) {\n return;\n }\n if (maxDistance < value) {\n maxDistance = value;\n }\n });\n });\n distances.forEach(function (row, i) {\n row.forEach(function (value, j) {\n if (value === Infinity) {\n distances[i][j] = maxDistance;\n }\n });\n });\n };\n MDSLayout.prototype.getType = function () {\n return \"mds\";\n };\n return MDSLayout;\n}(base_1.Base));\nexports.MDSLayout = MDSLayout;\n//# sourceMappingURL=mds.js.map","\"use strict\";\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FruchtermanLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar SPEED_DIVISOR = 800;\n/**\n * fruchterman 布局\n */\nvar FruchtermanLayout = /** @class */ (function (_super) {\n __extends(FruchtermanLayout, _super);\n function FruchtermanLayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 是否启动 worker */\n _this.workerEnabled = false;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 速度 */\n _this.speed = 5;\n /** 是否产生聚类力 */\n _this.clustering = false;\n /** 聚类力大小 */\n _this.clusterGravity = 10;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n /** 每次迭代结束的回调函数 */\n _this.tick = function () { };\n /** 是否使用 window.setInterval 运行迭代 */\n _this.animate = true;\n _this.updateCfg(options);\n return _this;\n }\n FruchtermanLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n gravity: 10,\n speed: 1,\n clustering: false,\n clusterGravity: 10,\n animate: true\n };\n };\n /**\n * 执行布局\n */\n FruchtermanLayout.prototype.execute = function () {\n var _this = this;\n var _a, _b;\n var self = this;\n var nodes = self.nodes;\n if (self.timeInterval !== undefined && typeof window !== \"undefined\") {\n window.clearInterval(self.timeInterval);\n }\n if (!nodes || nodes.length === 0) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n return;\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n var center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n (_b = self.onLayoutEnd) === null || _b === void 0 ? void 0 : _b.call(self);\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return self.run();\n };\n FruchtermanLayout.prototype.run = function () {\n var _a;\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return;\n var edges = self.edges, maxIteration = self.maxIteration, workerEnabled = self.workerEnabled, clustering = self.clustering, animate = self.animate;\n var clusterMap = {};\n if (clustering) {\n nodes.forEach(function (n) {\n if (clusterMap[n.cluster] === undefined) {\n clusterMap[n.cluster] = {\n name: n.cluster,\n cx: 0,\n cy: 0,\n count: 0\n };\n }\n });\n }\n if (workerEnabled || !animate) {\n for (var i = 0; i < maxIteration; i++) {\n self.runOneStep(clusterMap);\n }\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n }\n else {\n if (typeof window === \"undefined\")\n return;\n var iter_1 = 0;\n // interval for render the result after each iteration\n this.timeInterval = window.setInterval(function () {\n var _a;\n self.runOneStep(clusterMap);\n iter_1++;\n if (iter_1 >= maxIteration) {\n (_a = self.onLayoutEnd) === null || _a === void 0 ? void 0 : _a.call(self);\n window.clearInterval(self.timeInterval);\n }\n }, 0);\n }\n return {\n nodes: nodes,\n edges: edges\n };\n };\n FruchtermanLayout.prototype.runOneStep = function (clusterMap) {\n var _a;\n var self = this;\n var nodes = self.nodes;\n if (!nodes)\n return;\n var edges = self.edges, center = self.center, gravity = self.gravity, speed = self.speed, clustering = self.clustering;\n var area = self.height * self.width;\n var maxDisplace = Math.sqrt(area) / 10;\n var k2 = area / (nodes.length + 1);\n var k = Math.sqrt(k2);\n var displacements = [];\n nodes.forEach(function (_, j) {\n displacements[j] = { x: 0, y: 0 };\n });\n self.applyCalculate(nodes, edges, displacements, k, k2);\n // gravity for clusters\n if (clustering) {\n // re-compute the clustering centers\n for (var key in clusterMap) {\n clusterMap[key].cx = 0;\n clusterMap[key].cy = 0;\n clusterMap[key].count = 0;\n }\n nodes.forEach(function (n) {\n var c = clusterMap[n.cluster];\n if ((0, util_1.isNumber)(n.x)) {\n c.cx += n.x;\n }\n if ((0, util_1.isNumber)(n.y)) {\n c.cy += n.y;\n }\n c.count++;\n });\n for (var key in clusterMap) {\n clusterMap[key].cx /= clusterMap[key].count;\n clusterMap[key].cy /= clusterMap[key].count;\n }\n // compute the cluster gravity forces\n var clusterGravity_1 = self.clusterGravity || gravity;\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var c = clusterMap[n.cluster];\n var distLength = Math.sqrt((n.x - c.cx) * (n.x - c.cx) + (n.y - c.cy) * (n.y - c.cy));\n var gravityForce = k * clusterGravity_1;\n displacements[j].x -= (gravityForce * (n.x - c.cx)) / distLength;\n displacements[j].y -= (gravityForce * (n.y - c.cy)) / distLength;\n });\n }\n // gravity\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var gravityForce = 0.01 * k * gravity;\n displacements[j].x -= gravityForce * (n.x - center[0]);\n displacements[j].y -= gravityForce * (n.y - center[1]);\n });\n // move\n nodes.forEach(function (n, j) {\n if ((0, util_1.isNumber)(n.fx) && (0, util_1.isNumber)(n.fy)) {\n n.x = n.fx;\n n.y = n.fy;\n return;\n }\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n var distLength = Math.sqrt(displacements[j].x * displacements[j].x +\n displacements[j].y * displacements[j].y);\n if (distLength > 0) {\n // && !n.isFixed()\n var limitedDist = Math.min(maxDisplace * (speed / SPEED_DIVISOR), distLength);\n n.x += (displacements[j].x / distLength) * limitedDist;\n n.y += (displacements[j].y / distLength) * limitedDist;\n }\n });\n (_a = self.tick) === null || _a === void 0 ? void 0 : _a.call(self);\n };\n FruchtermanLayout.prototype.applyCalculate = function (nodes, edges, displacements, k, k2) {\n var self = this;\n self.calRepulsive(nodes, displacements, k2);\n if (edges)\n self.calAttractive(edges, displacements, k);\n };\n FruchtermanLayout.prototype.calRepulsive = function (nodes, displacements, k2) {\n nodes.forEach(function (v, i) {\n displacements[i] = { x: 0, y: 0 };\n nodes.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n if (!(0, util_1.isNumber)(v.x) ||\n !(0, util_1.isNumber)(u.x) ||\n !(0, util_1.isNumber)(v.y) ||\n !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var vecX = v.x - u.x;\n var vecY = v.y - u.y;\n var vecLengthSqr = vecX * vecX + vecY * vecY;\n if (vecLengthSqr === 0) {\n vecLengthSqr = 1;\n var sign = i > j ? 1 : -1;\n vecX = 0.01 * sign;\n vecY = 0.01 * sign;\n }\n var common = k2 / vecLengthSqr;\n displacements[i].x += vecX * common;\n displacements[i].y += vecY * common;\n });\n });\n };\n FruchtermanLayout.prototype.calAttractive = function (edges, displacements, k) {\n var _this = this;\n edges.forEach(function (e) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n if (!source || !target)\n return;\n var uIndex = _this.nodeIdxMap[source];\n var vIndex = _this.nodeIdxMap[target];\n if (uIndex === vIndex) {\n return;\n }\n var u = _this.nodeMap[source];\n var v = _this.nodeMap[target];\n if (!(0, util_1.isNumber)(v.x) || !(0, util_1.isNumber)(u.x) || !(0, util_1.isNumber)(v.y) || !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var vecX = v.x - u.x;\n var vecY = v.y - u.y;\n var vecLength = Math.sqrt(vecX * vecX + vecY * vecY);\n var common = (vecLength * vecLength) / k;\n displacements[vIndex].x -= (vecX / vecLength) * common;\n displacements[vIndex].y -= (vecY / vecLength) * common;\n displacements[uIndex].x += (vecX / vecLength) * common;\n displacements[uIndex].y += (vecY / vecLength) * common;\n });\n };\n FruchtermanLayout.prototype.stop = function () {\n if (this.timeInterval && typeof window !== \"undefined\") {\n window.clearInterval(this.timeInterval);\n }\n };\n FruchtermanLayout.prototype.destroy = function () {\n var self = this;\n self.stop();\n self.tick = null;\n self.nodes = null;\n self.edges = null;\n self.destroyed = true;\n };\n FruchtermanLayout.prototype.getType = function () {\n return \"fruchterman\";\n };\n return FruchtermanLayout;\n}(base_1.Base));\nexports.FruchtermanLayout = FruchtermanLayout;\n//# sourceMappingURL=fruchterman.js.map","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export var EMPTY = -1;\nvar entitySequence = 1;\n\n/**\n * 类似关系型数据库的主键\n * TODO: 自动生成,考虑序列化\n */\nexport function createEntity() {\n return entitySequence++;\n}\n//# sourceMappingURL=Entity.js.map","/**\n * WebGL 枚举值\n * @see http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14\n * 使用 babel 插件对常量进行内联,以减少最终打包产物大小\n * @see https://github.com/uber/deck.gl/blob/7.1-release/dev-docs/roadmaps/dist-size-roadmap.md#inline-gl-constants\n * 为了支持 WebGPU,新增 TextureUsage\n * @see https://gpuweb.github.io/gpuweb/#gputextureusage\n */\nexport var gl;\n(function (gl) {\n gl[gl[\"DEPTH_BUFFER_BIT\"] = 256] = \"DEPTH_BUFFER_BIT\";\n gl[gl[\"STENCIL_BUFFER_BIT\"] = 1024] = \"STENCIL_BUFFER_BIT\";\n gl[gl[\"COLOR_BUFFER_BIT\"] = 16384] = \"COLOR_BUFFER_BIT\";\n gl[gl[\"POINTS\"] = 0] = \"POINTS\";\n gl[gl[\"LINES\"] = 1] = \"LINES\";\n gl[gl[\"LINE_LOOP\"] = 2] = \"LINE_LOOP\";\n gl[gl[\"LINE_STRIP\"] = 3] = \"LINE_STRIP\";\n gl[gl[\"TRIANGLES\"] = 4] = \"TRIANGLES\";\n gl[gl[\"TRIANGLE_STRIP\"] = 5] = \"TRIANGLE_STRIP\";\n gl[gl[\"TRIANGLE_FAN\"] = 6] = \"TRIANGLE_FAN\";\n gl[gl[\"ZERO\"] = 0] = \"ZERO\";\n gl[gl[\"ONE\"] = 1] = \"ONE\";\n gl[gl[\"SRC_COLOR\"] = 768] = \"SRC_COLOR\";\n gl[gl[\"ONE_MINUS_SRC_COLOR\"] = 769] = \"ONE_MINUS_SRC_COLOR\";\n gl[gl[\"SRC_ALPHA\"] = 770] = \"SRC_ALPHA\";\n gl[gl[\"ONE_MINUS_SRC_ALPHA\"] = 771] = \"ONE_MINUS_SRC_ALPHA\";\n gl[gl[\"DST_ALPHA\"] = 772] = \"DST_ALPHA\";\n gl[gl[\"ONE_MINUS_DST_ALPHA\"] = 773] = \"ONE_MINUS_DST_ALPHA\";\n gl[gl[\"DST_COLOR\"] = 774] = \"DST_COLOR\";\n gl[gl[\"ONE_MINUS_DST_COLOR\"] = 775] = \"ONE_MINUS_DST_COLOR\";\n gl[gl[\"SRC_ALPHA_SATURATE\"] = 776] = \"SRC_ALPHA_SATURATE\";\n gl[gl[\"FUNC_ADD\"] = 32774] = \"FUNC_ADD\";\n gl[gl[\"BLEND_EQUATION\"] = 32777] = \"BLEND_EQUATION\";\n gl[gl[\"BLEND_EQUATION_RGB\"] = 32777] = \"BLEND_EQUATION_RGB\";\n gl[gl[\"BLEND_EQUATION_ALPHA\"] = 34877] = \"BLEND_EQUATION_ALPHA\";\n gl[gl[\"FUNC_SUBTRACT\"] = 32778] = \"FUNC_SUBTRACT\";\n gl[gl[\"FUNC_REVERSE_SUBTRACT\"] = 32779] = \"FUNC_REVERSE_SUBTRACT\";\n gl[gl[\"MAX_EXT\"] = 32776] = \"MAX_EXT\";\n gl[gl[\"MIN_EXT\"] = 32775] = \"MIN_EXT\";\n gl[gl[\"BLEND_DST_RGB\"] = 32968] = \"BLEND_DST_RGB\";\n gl[gl[\"BLEND_SRC_RGB\"] = 32969] = \"BLEND_SRC_RGB\";\n gl[gl[\"BLEND_DST_ALPHA\"] = 32970] = \"BLEND_DST_ALPHA\";\n gl[gl[\"BLEND_SRC_ALPHA\"] = 32971] = \"BLEND_SRC_ALPHA\";\n gl[gl[\"CONSTANT_COLOR\"] = 32769] = \"CONSTANT_COLOR\";\n gl[gl[\"ONE_MINUS_CONSTANT_COLOR\"] = 32770] = \"ONE_MINUS_CONSTANT_COLOR\";\n gl[gl[\"CONSTANT_ALPHA\"] = 32771] = \"CONSTANT_ALPHA\";\n gl[gl[\"ONE_MINUS_CONSTANT_ALPHA\"] = 32772] = \"ONE_MINUS_CONSTANT_ALPHA\";\n gl[gl[\"BLEND_COLOR\"] = 32773] = \"BLEND_COLOR\";\n gl[gl[\"ARRAY_BUFFER\"] = 34962] = \"ARRAY_BUFFER\";\n gl[gl[\"ELEMENT_ARRAY_BUFFER\"] = 34963] = \"ELEMENT_ARRAY_BUFFER\";\n gl[gl[\"ARRAY_BUFFER_BINDING\"] = 34964] = \"ARRAY_BUFFER_BINDING\";\n gl[gl[\"ELEMENT_ARRAY_BUFFER_BINDING\"] = 34965] = \"ELEMENT_ARRAY_BUFFER_BINDING\";\n gl[gl[\"STREAM_DRAW\"] = 35040] = \"STREAM_DRAW\";\n gl[gl[\"STATIC_DRAW\"] = 35044] = \"STATIC_DRAW\";\n gl[gl[\"DYNAMIC_DRAW\"] = 35048] = \"DYNAMIC_DRAW\";\n gl[gl[\"BUFFER_SIZE\"] = 34660] = \"BUFFER_SIZE\";\n gl[gl[\"BUFFER_USAGE\"] = 34661] = \"BUFFER_USAGE\";\n gl[gl[\"CURRENT_VERTEX_ATTRIB\"] = 34342] = \"CURRENT_VERTEX_ATTRIB\";\n gl[gl[\"FRONT\"] = 1028] = \"FRONT\";\n gl[gl[\"BACK\"] = 1029] = \"BACK\";\n gl[gl[\"FRONT_AND_BACK\"] = 1032] = \"FRONT_AND_BACK\";\n gl[gl[\"CULL_FACE\"] = 2884] = \"CULL_FACE\";\n gl[gl[\"BLEND\"] = 3042] = \"BLEND\";\n gl[gl[\"DITHER\"] = 3024] = \"DITHER\";\n gl[gl[\"STENCIL_TEST\"] = 2960] = \"STENCIL_TEST\";\n gl[gl[\"DEPTH_TEST\"] = 2929] = \"DEPTH_TEST\";\n gl[gl[\"SCISSOR_TEST\"] = 3089] = \"SCISSOR_TEST\";\n gl[gl[\"POLYGON_OFFSET_FILL\"] = 32823] = \"POLYGON_OFFSET_FILL\";\n gl[gl[\"SAMPLE_ALPHA_TO_COVERAGE\"] = 32926] = \"SAMPLE_ALPHA_TO_COVERAGE\";\n gl[gl[\"SAMPLE_COVERAGE\"] = 32928] = \"SAMPLE_COVERAGE\";\n gl[gl[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n gl[gl[\"INVALID_ENUM\"] = 1280] = \"INVALID_ENUM\";\n gl[gl[\"INVALID_VALUE\"] = 1281] = \"INVALID_VALUE\";\n gl[gl[\"INVALID_OPERATION\"] = 1282] = \"INVALID_OPERATION\";\n gl[gl[\"OUT_OF_MEMORY\"] = 1285] = \"OUT_OF_MEMORY\";\n gl[gl[\"CW\"] = 2304] = \"CW\";\n gl[gl[\"CCW\"] = 2305] = \"CCW\";\n gl[gl[\"LINE_WIDTH\"] = 2849] = \"LINE_WIDTH\";\n gl[gl[\"ALIASED_POINT_SIZE_RANGE\"] = 33901] = \"ALIASED_POINT_SIZE_RANGE\";\n gl[gl[\"ALIASED_LINE_WIDTH_RANGE\"] = 33902] = \"ALIASED_LINE_WIDTH_RANGE\";\n gl[gl[\"CULL_FACE_MODE\"] = 2885] = \"CULL_FACE_MODE\";\n gl[gl[\"FRONT_FACE\"] = 2886] = \"FRONT_FACE\";\n gl[gl[\"DEPTH_RANGE\"] = 2928] = \"DEPTH_RANGE\";\n gl[gl[\"DEPTH_WRITEMASK\"] = 2930] = \"DEPTH_WRITEMASK\";\n gl[gl[\"DEPTH_CLEAR_VALUE\"] = 2931] = \"DEPTH_CLEAR_VALUE\";\n gl[gl[\"DEPTH_FUNC\"] = 2932] = \"DEPTH_FUNC\";\n gl[gl[\"STENCIL_CLEAR_VALUE\"] = 2961] = \"STENCIL_CLEAR_VALUE\";\n gl[gl[\"STENCIL_FUNC\"] = 2962] = \"STENCIL_FUNC\";\n gl[gl[\"STENCIL_FAIL\"] = 2964] = \"STENCIL_FAIL\";\n gl[gl[\"STENCIL_PASS_DEPTH_FAIL\"] = 2965] = \"STENCIL_PASS_DEPTH_FAIL\";\n gl[gl[\"STENCIL_PASS_DEPTH_PASS\"] = 2966] = \"STENCIL_PASS_DEPTH_PASS\";\n gl[gl[\"STENCIL_REF\"] = 2967] = \"STENCIL_REF\";\n gl[gl[\"STENCIL_VALUE_MASK\"] = 2963] = \"STENCIL_VALUE_MASK\";\n gl[gl[\"STENCIL_WRITEMASK\"] = 2968] = \"STENCIL_WRITEMASK\";\n gl[gl[\"STENCIL_BACK_FUNC\"] = 34816] = \"STENCIL_BACK_FUNC\";\n gl[gl[\"STENCIL_BACK_FAIL\"] = 34817] = \"STENCIL_BACK_FAIL\";\n gl[gl[\"STENCIL_BACK_PASS_DEPTH_FAIL\"] = 34818] = \"STENCIL_BACK_PASS_DEPTH_FAIL\";\n gl[gl[\"STENCIL_BACK_PASS_DEPTH_PASS\"] = 34819] = \"STENCIL_BACK_PASS_DEPTH_PASS\";\n gl[gl[\"STENCIL_BACK_REF\"] = 36003] = \"STENCIL_BACK_REF\";\n gl[gl[\"STENCIL_BACK_VALUE_MASK\"] = 36004] = \"STENCIL_BACK_VALUE_MASK\";\n gl[gl[\"STENCIL_BACK_WRITEMASK\"] = 36005] = \"STENCIL_BACK_WRITEMASK\";\n gl[gl[\"VIEWPORT\"] = 2978] = \"VIEWPORT\";\n gl[gl[\"SCISSOR_BOX\"] = 3088] = \"SCISSOR_BOX\";\n gl[gl[\"COLOR_CLEAR_VALUE\"] = 3106] = \"COLOR_CLEAR_VALUE\";\n gl[gl[\"COLOR_WRITEMASK\"] = 3107] = \"COLOR_WRITEMASK\";\n gl[gl[\"UNPACK_ALIGNMENT\"] = 3317] = \"UNPACK_ALIGNMENT\";\n gl[gl[\"PACK_ALIGNMENT\"] = 3333] = \"PACK_ALIGNMENT\";\n gl[gl[\"MAX_TEXTURE_SIZE\"] = 3379] = \"MAX_TEXTURE_SIZE\";\n gl[gl[\"MAX_VIEWPORT_DIMS\"] = 3386] = \"MAX_VIEWPORT_DIMS\";\n gl[gl[\"SUBPIXEL_BITS\"] = 3408] = \"SUBPIXEL_BITS\";\n gl[gl[\"RED_BITS\"] = 3410] = \"RED_BITS\";\n gl[gl[\"GREEN_BITS\"] = 3411] = \"GREEN_BITS\";\n gl[gl[\"BLUE_BITS\"] = 3412] = \"BLUE_BITS\";\n gl[gl[\"ALPHA_BITS\"] = 3413] = \"ALPHA_BITS\";\n gl[gl[\"DEPTH_BITS\"] = 3414] = \"DEPTH_BITS\";\n gl[gl[\"STENCIL_BITS\"] = 3415] = \"STENCIL_BITS\";\n gl[gl[\"POLYGON_OFFSET_UNITS\"] = 10752] = \"POLYGON_OFFSET_UNITS\";\n gl[gl[\"POLYGON_OFFSET_FACTOR\"] = 32824] = \"POLYGON_OFFSET_FACTOR\";\n gl[gl[\"TEXTURE_BINDING_2D\"] = 32873] = \"TEXTURE_BINDING_2D\";\n gl[gl[\"SAMPLE_BUFFERS\"] = 32936] = \"SAMPLE_BUFFERS\";\n gl[gl[\"SAMPLES\"] = 32937] = \"SAMPLES\";\n gl[gl[\"SAMPLE_COVERAGE_VALUE\"] = 32938] = \"SAMPLE_COVERAGE_VALUE\";\n gl[gl[\"SAMPLE_COVERAGE_INVERT\"] = 32939] = \"SAMPLE_COVERAGE_INVERT\";\n gl[gl[\"COMPRESSED_TEXTURE_FORMATS\"] = 34467] = \"COMPRESSED_TEXTURE_FORMATS\";\n gl[gl[\"DONT_CARE\"] = 4352] = \"DONT_CARE\";\n gl[gl[\"FASTEST\"] = 4353] = \"FASTEST\";\n gl[gl[\"NICEST\"] = 4354] = \"NICEST\";\n gl[gl[\"GENERATE_MIPMAP_HINT\"] = 33170] = \"GENERATE_MIPMAP_HINT\";\n gl[gl[\"BYTE\"] = 5120] = \"BYTE\";\n gl[gl[\"UNSIGNED_BYTE\"] = 5121] = \"UNSIGNED_BYTE\";\n gl[gl[\"SHORT\"] = 5122] = \"SHORT\";\n gl[gl[\"UNSIGNED_SHORT\"] = 5123] = \"UNSIGNED_SHORT\";\n gl[gl[\"INT\"] = 5124] = \"INT\";\n gl[gl[\"UNSIGNED_INT\"] = 5125] = \"UNSIGNED_INT\";\n gl[gl[\"FLOAT\"] = 5126] = \"FLOAT\";\n gl[gl[\"DEPTH_COMPONENT\"] = 6402] = \"DEPTH_COMPONENT\";\n gl[gl[\"ALPHA\"] = 6406] = \"ALPHA\";\n gl[gl[\"RGB\"] = 6407] = \"RGB\";\n gl[gl[\"RGBA\"] = 6408] = \"RGBA\";\n gl[gl[\"LUMINANCE\"] = 6409] = \"LUMINANCE\";\n gl[gl[\"LUMINANCE_ALPHA\"] = 6410] = \"LUMINANCE_ALPHA\";\n gl[gl[\"UNSIGNED_SHORT_4_4_4_4\"] = 32819] = \"UNSIGNED_SHORT_4_4_4_4\";\n gl[gl[\"UNSIGNED_SHORT_5_5_5_1\"] = 32820] = \"UNSIGNED_SHORT_5_5_5_1\";\n gl[gl[\"UNSIGNED_SHORT_5_6_5\"] = 33635] = \"UNSIGNED_SHORT_5_6_5\";\n gl[gl[\"FRAGMENT_SHADER\"] = 35632] = \"FRAGMENT_SHADER\";\n gl[gl[\"VERTEX_SHADER\"] = 35633] = \"VERTEX_SHADER\";\n gl[gl[\"MAX_VERTEX_ATTRIBS\"] = 34921] = \"MAX_VERTEX_ATTRIBS\";\n gl[gl[\"MAX_VERTEX_UNIFORM_VECTORS\"] = 36347] = \"MAX_VERTEX_UNIFORM_VECTORS\";\n gl[gl[\"MAX_VARYING_VECTORS\"] = 36348] = \"MAX_VARYING_VECTORS\";\n gl[gl[\"MAX_COMBINED_TEXTURE_IMAGE_UNITS\"] = 35661] = \"MAX_COMBINED_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_VERTEX_TEXTURE_IMAGE_UNITS\"] = 35660] = \"MAX_VERTEX_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_TEXTURE_IMAGE_UNITS\"] = 34930] = \"MAX_TEXTURE_IMAGE_UNITS\";\n gl[gl[\"MAX_FRAGMENT_UNIFORM_VECTORS\"] = 36349] = \"MAX_FRAGMENT_UNIFORM_VECTORS\";\n gl[gl[\"SHADER_TYPE\"] = 35663] = \"SHADER_TYPE\";\n gl[gl[\"DELETE_STATUS\"] = 35712] = \"DELETE_STATUS\";\n gl[gl[\"LINK_STATUS\"] = 35714] = \"LINK_STATUS\";\n gl[gl[\"VALIDATE_STATUS\"] = 35715] = \"VALIDATE_STATUS\";\n gl[gl[\"ATTACHED_SHADERS\"] = 35717] = \"ATTACHED_SHADERS\";\n gl[gl[\"ACTIVE_UNIFORMS\"] = 35718] = \"ACTIVE_UNIFORMS\";\n gl[gl[\"ACTIVE_ATTRIBUTES\"] = 35721] = \"ACTIVE_ATTRIBUTES\";\n gl[gl[\"SHADING_LANGUAGE_VERSION\"] = 35724] = \"SHADING_LANGUAGE_VERSION\";\n gl[gl[\"CURRENT_PROGRAM\"] = 35725] = \"CURRENT_PROGRAM\";\n gl[gl[\"NEVER\"] = 512] = \"NEVER\";\n gl[gl[\"LESS\"] = 513] = \"LESS\";\n gl[gl[\"EQUAL\"] = 514] = \"EQUAL\";\n gl[gl[\"LEQUAL\"] = 515] = \"LEQUAL\";\n gl[gl[\"GREATER\"] = 516] = \"GREATER\";\n gl[gl[\"NOTEQUAL\"] = 517] = \"NOTEQUAL\";\n gl[gl[\"GEQUAL\"] = 518] = \"GEQUAL\";\n gl[gl[\"ALWAYS\"] = 519] = \"ALWAYS\";\n gl[gl[\"KEEP\"] = 7680] = \"KEEP\";\n gl[gl[\"REPLACE\"] = 7681] = \"REPLACE\";\n gl[gl[\"INCR\"] = 7682] = \"INCR\";\n gl[gl[\"DECR\"] = 7683] = \"DECR\";\n gl[gl[\"INVERT\"] = 5386] = \"INVERT\";\n gl[gl[\"INCR_WRAP\"] = 34055] = \"INCR_WRAP\";\n gl[gl[\"DECR_WRAP\"] = 34056] = \"DECR_WRAP\";\n gl[gl[\"VENDOR\"] = 7936] = \"VENDOR\";\n gl[gl[\"RENDERER\"] = 7937] = \"RENDERER\";\n gl[gl[\"VERSION\"] = 7938] = \"VERSION\";\n gl[gl[\"NEAREST\"] = 9728] = \"NEAREST\";\n gl[gl[\"LINEAR\"] = 9729] = \"LINEAR\";\n gl[gl[\"NEAREST_MIPMAP_NEAREST\"] = 9984] = \"NEAREST_MIPMAP_NEAREST\";\n gl[gl[\"LINEAR_MIPMAP_NEAREST\"] = 9985] = \"LINEAR_MIPMAP_NEAREST\";\n gl[gl[\"NEAREST_MIPMAP_LINEAR\"] = 9986] = \"NEAREST_MIPMAP_LINEAR\";\n gl[gl[\"LINEAR_MIPMAP_LINEAR\"] = 9987] = \"LINEAR_MIPMAP_LINEAR\";\n gl[gl[\"TEXTURE_MAG_FILTER\"] = 10240] = \"TEXTURE_MAG_FILTER\";\n gl[gl[\"TEXTURE_MIN_FILTER\"] = 10241] = \"TEXTURE_MIN_FILTER\";\n gl[gl[\"TEXTURE_WRAP_S\"] = 10242] = \"TEXTURE_WRAP_S\";\n gl[gl[\"TEXTURE_WRAP_T\"] = 10243] = \"TEXTURE_WRAP_T\";\n gl[gl[\"TEXTURE_2D\"] = 3553] = \"TEXTURE_2D\";\n gl[gl[\"TEXTURE\"] = 5890] = \"TEXTURE\";\n gl[gl[\"TEXTURE_CUBE_MAP\"] = 34067] = \"TEXTURE_CUBE_MAP\";\n gl[gl[\"TEXTURE_BINDING_CUBE_MAP\"] = 34068] = \"TEXTURE_BINDING_CUBE_MAP\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_X\"] = 34069] = \"TEXTURE_CUBE_MAP_POSITIVE_X\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_X\"] = 34070] = \"TEXTURE_CUBE_MAP_NEGATIVE_X\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_Y\"] = 34071] = \"TEXTURE_CUBE_MAP_POSITIVE_Y\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_Y\"] = 34072] = \"TEXTURE_CUBE_MAP_NEGATIVE_Y\";\n gl[gl[\"TEXTURE_CUBE_MAP_POSITIVE_Z\"] = 34073] = \"TEXTURE_CUBE_MAP_POSITIVE_Z\";\n gl[gl[\"TEXTURE_CUBE_MAP_NEGATIVE_Z\"] = 34074] = \"TEXTURE_CUBE_MAP_NEGATIVE_Z\";\n gl[gl[\"MAX_CUBE_MAP_TEXTURE_SIZE\"] = 34076] = \"MAX_CUBE_MAP_TEXTURE_SIZE\";\n gl[gl[\"TEXTURE0\"] = 33984] = \"TEXTURE0\";\n gl[gl[\"TEXTURE1\"] = 33985] = \"TEXTURE1\";\n gl[gl[\"TEXTURE2\"] = 33986] = \"TEXTURE2\";\n gl[gl[\"TEXTURE3\"] = 33987] = \"TEXTURE3\";\n gl[gl[\"TEXTURE4\"] = 33988] = \"TEXTURE4\";\n gl[gl[\"TEXTURE5\"] = 33989] = \"TEXTURE5\";\n gl[gl[\"TEXTURE6\"] = 33990] = \"TEXTURE6\";\n gl[gl[\"TEXTURE7\"] = 33991] = \"TEXTURE7\";\n gl[gl[\"TEXTURE8\"] = 33992] = \"TEXTURE8\";\n gl[gl[\"TEXTURE9\"] = 33993] = \"TEXTURE9\";\n gl[gl[\"TEXTURE10\"] = 33994] = \"TEXTURE10\";\n gl[gl[\"TEXTURE11\"] = 33995] = \"TEXTURE11\";\n gl[gl[\"TEXTURE12\"] = 33996] = \"TEXTURE12\";\n gl[gl[\"TEXTURE13\"] = 33997] = \"TEXTURE13\";\n gl[gl[\"TEXTURE14\"] = 33998] = \"TEXTURE14\";\n gl[gl[\"TEXTURE15\"] = 33999] = \"TEXTURE15\";\n gl[gl[\"TEXTURE16\"] = 34000] = \"TEXTURE16\";\n gl[gl[\"TEXTURE17\"] = 34001] = \"TEXTURE17\";\n gl[gl[\"TEXTURE18\"] = 34002] = \"TEXTURE18\";\n gl[gl[\"TEXTURE19\"] = 34003] = \"TEXTURE19\";\n gl[gl[\"TEXTURE20\"] = 34004] = \"TEXTURE20\";\n gl[gl[\"TEXTURE21\"] = 34005] = \"TEXTURE21\";\n gl[gl[\"TEXTURE22\"] = 34006] = \"TEXTURE22\";\n gl[gl[\"TEXTURE23\"] = 34007] = \"TEXTURE23\";\n gl[gl[\"TEXTURE24\"] = 34008] = \"TEXTURE24\";\n gl[gl[\"TEXTURE25\"] = 34009] = \"TEXTURE25\";\n gl[gl[\"TEXTURE26\"] = 34010] = \"TEXTURE26\";\n gl[gl[\"TEXTURE27\"] = 34011] = \"TEXTURE27\";\n gl[gl[\"TEXTURE28\"] = 34012] = \"TEXTURE28\";\n gl[gl[\"TEXTURE29\"] = 34013] = \"TEXTURE29\";\n gl[gl[\"TEXTURE30\"] = 34014] = \"TEXTURE30\";\n gl[gl[\"TEXTURE31\"] = 34015] = \"TEXTURE31\";\n gl[gl[\"ACTIVE_TEXTURE\"] = 34016] = \"ACTIVE_TEXTURE\";\n gl[gl[\"REPEAT\"] = 10497] = \"REPEAT\";\n gl[gl[\"CLAMP_TO_EDGE\"] = 33071] = \"CLAMP_TO_EDGE\";\n gl[gl[\"MIRRORED_REPEAT\"] = 33648] = \"MIRRORED_REPEAT\";\n gl[gl[\"FLOAT_VEC2\"] = 35664] = \"FLOAT_VEC2\";\n gl[gl[\"FLOAT_VEC3\"] = 35665] = \"FLOAT_VEC3\";\n gl[gl[\"FLOAT_VEC4\"] = 35666] = \"FLOAT_VEC4\";\n gl[gl[\"INT_VEC2\"] = 35667] = \"INT_VEC2\";\n gl[gl[\"INT_VEC3\"] = 35668] = \"INT_VEC3\";\n gl[gl[\"INT_VEC4\"] = 35669] = \"INT_VEC4\";\n gl[gl[\"BOOL\"] = 35670] = \"BOOL\";\n gl[gl[\"BOOL_VEC2\"] = 35671] = \"BOOL_VEC2\";\n gl[gl[\"BOOL_VEC3\"] = 35672] = \"BOOL_VEC3\";\n gl[gl[\"BOOL_VEC4\"] = 35673] = \"BOOL_VEC4\";\n gl[gl[\"FLOAT_MAT2\"] = 35674] = \"FLOAT_MAT2\";\n gl[gl[\"FLOAT_MAT3\"] = 35675] = \"FLOAT_MAT3\";\n gl[gl[\"FLOAT_MAT4\"] = 35676] = \"FLOAT_MAT4\";\n gl[gl[\"SAMPLER_2D\"] = 35678] = \"SAMPLER_2D\";\n gl[gl[\"SAMPLER_CUBE\"] = 35680] = \"SAMPLER_CUBE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_ENABLED\"] = 34338] = \"VERTEX_ATTRIB_ARRAY_ENABLED\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_SIZE\"] = 34339] = \"VERTEX_ATTRIB_ARRAY_SIZE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_STRIDE\"] = 34340] = \"VERTEX_ATTRIB_ARRAY_STRIDE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_TYPE\"] = 34341] = \"VERTEX_ATTRIB_ARRAY_TYPE\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_NORMALIZED\"] = 34922] = \"VERTEX_ATTRIB_ARRAY_NORMALIZED\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_POINTER\"] = 34373] = \"VERTEX_ATTRIB_ARRAY_POINTER\";\n gl[gl[\"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\"] = 34975] = \"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\";\n gl[gl[\"COMPILE_STATUS\"] = 35713] = \"COMPILE_STATUS\";\n gl[gl[\"LOW_FLOAT\"] = 36336] = \"LOW_FLOAT\";\n gl[gl[\"MEDIUM_FLOAT\"] = 36337] = \"MEDIUM_FLOAT\";\n gl[gl[\"HIGH_FLOAT\"] = 36338] = \"HIGH_FLOAT\";\n gl[gl[\"LOW_INT\"] = 36339] = \"LOW_INT\";\n gl[gl[\"MEDIUM_INT\"] = 36340] = \"MEDIUM_INT\";\n gl[gl[\"HIGH_INT\"] = 36341] = \"HIGH_INT\";\n gl[gl[\"FRAMEBUFFER\"] = 36160] = \"FRAMEBUFFER\";\n gl[gl[\"RENDERBUFFER\"] = 36161] = \"RENDERBUFFER\";\n gl[gl[\"RGBA4\"] = 32854] = \"RGBA4\";\n gl[gl[\"RGB5_A1\"] = 32855] = \"RGB5_A1\";\n gl[gl[\"RGB565\"] = 36194] = \"RGB565\";\n gl[gl[\"DEPTH_COMPONENT16\"] = 33189] = \"DEPTH_COMPONENT16\";\n gl[gl[\"STENCIL_INDEX\"] = 6401] = \"STENCIL_INDEX\";\n gl[gl[\"STENCIL_INDEX8\"] = 36168] = \"STENCIL_INDEX8\";\n gl[gl[\"DEPTH_STENCIL\"] = 34041] = \"DEPTH_STENCIL\";\n gl[gl[\"RENDERBUFFER_WIDTH\"] = 36162] = \"RENDERBUFFER_WIDTH\";\n gl[gl[\"RENDERBUFFER_HEIGHT\"] = 36163] = \"RENDERBUFFER_HEIGHT\";\n gl[gl[\"RENDERBUFFER_INTERNAL_FORMAT\"] = 36164] = \"RENDERBUFFER_INTERNAL_FORMAT\";\n gl[gl[\"RENDERBUFFER_RED_SIZE\"] = 36176] = \"RENDERBUFFER_RED_SIZE\";\n gl[gl[\"RENDERBUFFER_GREEN_SIZE\"] = 36177] = \"RENDERBUFFER_GREEN_SIZE\";\n gl[gl[\"RENDERBUFFER_BLUE_SIZE\"] = 36178] = \"RENDERBUFFER_BLUE_SIZE\";\n gl[gl[\"RENDERBUFFER_ALPHA_SIZE\"] = 36179] = \"RENDERBUFFER_ALPHA_SIZE\";\n gl[gl[\"RENDERBUFFER_DEPTH_SIZE\"] = 36180] = \"RENDERBUFFER_DEPTH_SIZE\";\n gl[gl[\"RENDERBUFFER_STENCIL_SIZE\"] = 36181] = \"RENDERBUFFER_STENCIL_SIZE\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\"] = 36048] = \"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\"] = 36049] = \"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\"] = 36050] = \"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\";\n gl[gl[\"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\"] = 36051] = \"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\";\n gl[gl[\"COLOR_ATTACHMENT0\"] = 36064] = \"COLOR_ATTACHMENT0\";\n gl[gl[\"DEPTH_ATTACHMENT\"] = 36096] = \"DEPTH_ATTACHMENT\";\n gl[gl[\"STENCIL_ATTACHMENT\"] = 36128] = \"STENCIL_ATTACHMENT\";\n gl[gl[\"DEPTH_STENCIL_ATTACHMENT\"] = 33306] = \"DEPTH_STENCIL_ATTACHMENT\";\n gl[gl[\"NONE\"] = 0] = \"NONE\";\n gl[gl[\"FRAMEBUFFER_COMPLETE\"] = 36053] = \"FRAMEBUFFER_COMPLETE\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\"] = 36054] = \"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\"] = 36055] = \"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\";\n gl[gl[\"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\"] = 36057] = \"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\";\n gl[gl[\"FRAMEBUFFER_UNSUPPORTED\"] = 36061] = \"FRAMEBUFFER_UNSUPPORTED\";\n gl[gl[\"FRAMEBUFFER_BINDING\"] = 36006] = \"FRAMEBUFFER_BINDING\";\n gl[gl[\"RENDERBUFFER_BINDING\"] = 36007] = \"RENDERBUFFER_BINDING\";\n gl[gl[\"MAX_RENDERBUFFER_SIZE\"] = 34024] = \"MAX_RENDERBUFFER_SIZE\";\n gl[gl[\"INVALID_FRAMEBUFFER_OPERATION\"] = 1286] = \"INVALID_FRAMEBUFFER_OPERATION\";\n gl[gl[\"UNPACK_FLIP_Y_WEBGL\"] = 37440] = \"UNPACK_FLIP_Y_WEBGL\";\n gl[gl[\"UNPACK_PREMULTIPLY_ALPHA_WEBGL\"] = 37441] = \"UNPACK_PREMULTIPLY_ALPHA_WEBGL\";\n gl[gl[\"CONTEXT_LOST_WEBGL\"] = 37442] = \"CONTEXT_LOST_WEBGL\";\n gl[gl[\"UNPACK_COLORSPACE_CONVERSION_WEBGL\"] = 37443] = \"UNPACK_COLORSPACE_CONVERSION_WEBGL\";\n gl[gl[\"BROWSER_DEFAULT_WEBGL\"] = 37444] = \"BROWSER_DEFAULT_WEBGL\";\n gl[gl[\"COPY_SRC\"] = 1] = \"COPY_SRC\";\n gl[gl[\"COPY_DST\"] = 2] = \"COPY_DST\";\n gl[gl[\"SAMPLED\"] = 4] = \"SAMPLED\";\n gl[gl[\"STORAGE\"] = 8] = \"STORAGE\";\n gl[gl[\"RENDER_ATTACHMENT\"] = 16] = \"RENDER_ATTACHMENT\";\n})(gl || (gl = {}));\n//# sourceMappingURL=gl.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nexport var ConfigService = /*#__PURE__*/function () {\n function ConfigService() {\n _classCallCheck(this, ConfigService);\n this.config = void 0;\n }\n _createClass(ConfigService, [{\n key: \"get\",\n value: function get() {\n return this.config;\n }\n }, {\n key: \"set\",\n value: function set(config) {\n this.config = config;\n }\n }]);\n return ConfigService;\n}();\n//# sourceMappingURL=ConfigService.js.map","import { Component, ComponentManager } from './ComponentManager';\nimport { gl } from './components/renderer/gl';\nimport { createEntity } from './Entity';\nimport { ConfigService } from './services/config/ConfigService';\nimport { isSafari } from './utils/isSafari';\nvar AST_TOKEN_TYPES;\n(function (AST_TOKEN_TYPES) {\n AST_TOKEN_TYPES[\"Void\"] = \"Void\";\n AST_TOKEN_TYPES[\"Boolean\"] = \"Boolean\";\n AST_TOKEN_TYPES[\"Float\"] = \"Float\";\n AST_TOKEN_TYPES[\"Uint32\"] = \"Uint32\";\n AST_TOKEN_TYPES[\"Int32\"] = \"Int32\";\n AST_TOKEN_TYPES[\"Vector\"] = \"Vector\";\n AST_TOKEN_TYPES[\"Vector2Float\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Float\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Float\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Boolean\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Boolean\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Boolean\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Uint\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Uint\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Uint\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Vector2Int\"] = \"vec2\";\n AST_TOKEN_TYPES[\"Vector3Int\"] = \"vec3\";\n AST_TOKEN_TYPES[\"Vector4Int\"] = \"vec4\";\n AST_TOKEN_TYPES[\"Matrix\"] = \"Matrix\";\n AST_TOKEN_TYPES[\"Matrix3x3Float\"] = \"mat3x3\";\n AST_TOKEN_TYPES[\"Matrix4x4Float\"] = \"mat4x4\";\n AST_TOKEN_TYPES[\"Struct\"] = \"Struct\";\n AST_TOKEN_TYPES[\"FloatArray\"] = \"Float[]\";\n AST_TOKEN_TYPES[\"Vector4FloatArray\"] = \"vec4[]\";\n})(AST_TOKEN_TYPES || (AST_TOKEN_TYPES = {}));\nvar AST_NODE_TYPES;\n(function (AST_NODE_TYPES) {\n AST_NODE_TYPES[\"Program\"] = \"Program\";\n AST_NODE_TYPES[\"Identifier\"] = \"Identifier\";\n AST_NODE_TYPES[\"VariableDeclaration\"] = \"VariableDeclaration\";\n AST_NODE_TYPES[\"BlockStatement\"] = \"BlockStatement\";\n AST_NODE_TYPES[\"ReturnStatement\"] = \"ReturnStatement\";\n AST_NODE_TYPES[\"FunctionDeclaration\"] = \"FunctionDeclaration\";\n AST_NODE_TYPES[\"VariableDeclarator\"] = \"VariableDeclarator\";\n AST_NODE_TYPES[\"AssignmentExpression\"] = \"AssignmentExpression\";\n AST_NODE_TYPES[\"LogicalExpression\"] = \"LogicalExpression\";\n AST_NODE_TYPES[\"BinaryExpression\"] = \"BinaryExpression\";\n AST_NODE_TYPES[\"ArrayExpression\"] = \"ArrayExpression\";\n AST_NODE_TYPES[\"UnaryExpression\"] = \"UnaryExpression\";\n AST_NODE_TYPES[\"UpdateExpression\"] = \"UpdateExpression\";\n AST_NODE_TYPES[\"FunctionExpression\"] = \"FunctionExpression\";\n AST_NODE_TYPES[\"MemberExpression\"] = \"MemberExpression\";\n AST_NODE_TYPES[\"ConditionalExpression\"] = \"ConditionalExpression\";\n AST_NODE_TYPES[\"ExpressionStatement\"] = \"ExpressionStatement\";\n AST_NODE_TYPES[\"CallExpression\"] = \"CallExpression\";\n AST_NODE_TYPES[\"NumThreadStatement\"] = \"NumThreadStatement\";\n AST_NODE_TYPES[\"StorageStatement\"] = \"StorageStatement\";\n AST_NODE_TYPES[\"DoWhileStatement\"] = \"DoWhileStatement\";\n AST_NODE_TYPES[\"WhileStatement\"] = \"WhileStatement\";\n AST_NODE_TYPES[\"ForStatement\"] = \"ForStatement\";\n AST_NODE_TYPES[\"BreakStatement\"] = \"BreakStatement\";\n AST_NODE_TYPES[\"ContinueStatement\"] = \"ContinueStatement\";\n AST_NODE_TYPES[\"IfStatement\"] = \"IfStatement\";\n AST_NODE_TYPES[\"ImportedFunctionStatement\"] = \"ImportedFunctionStatement\";\n})(AST_NODE_TYPES || (AST_NODE_TYPES = {}));\nvar STORAGE_CLASS;\n(function (STORAGE_CLASS) {\n STORAGE_CLASS[\"Input\"] = \"Input\";\n STORAGE_CLASS[\"Output\"] = \"Output\";\n STORAGE_CLASS[\"Uniform\"] = \"Uniform\";\n STORAGE_CLASS[\"Workgroup\"] = \"Workgroup\";\n STORAGE_CLASS[\"UniformConstant\"] = \"UniformConstant\";\n STORAGE_CLASS[\"Image\"] = \"Image\";\n STORAGE_CLASS[\"StorageBuffer\"] = \"StorageBuffer\";\n STORAGE_CLASS[\"Private\"] = \"Private\";\n STORAGE_CLASS[\"Function\"] = \"Function\";\n})(STORAGE_CLASS || (STORAGE_CLASS = {}));\n/**\n * 根据目标平台生成 Shader 代码\n * * WebGL GLSL 1.0\n * * WebGPU Chrome/Edge GLSL 4.5 & WGSL @see https://gpuweb.github.io/gpuweb/wgsl.html\n * * Safari WHLSL (maybe deprecated)\n */\nvar Target;\n(function (Target) {\n Target[\"GLSL100\"] = \"GLSL100\";\n Target[\"GLSL450\"] = \"GLSL450\";\n Target[\"WGSL\"] = \"WGSL\";\n})(Target || (Target = {}));\nvar DefineValuePlaceholder = '__DefineValuePlaceholder__';\nexport { createEntity, Component, ComponentManager, isSafari,\n// renderer service\ngl, ConfigService, AST_TOKEN_TYPES, AST_NODE_TYPES, STORAGE_CLASS, Target, DefineValuePlaceholder };\n//# sourceMappingURL=index.js.map","export function createCanvas() {\n if (typeof document !== 'undefined') {\n return document.createElement('canvas');\n } else {\n throw new Error('Cannot create a canvas in this context');\n }\n}\n//# sourceMappingURL=canvas.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _isTypedArray from \"lodash/isTypedArray\";\nimport _isNumber from \"lodash/isNumber\";\nimport _isArray from \"lodash/isArray\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { AST_TOKEN_TYPES, DefineValuePlaceholder, STORAGE_CLASS, Target } from '@antv/g-webgpu-core';\nimport { createCanvas } from './utils/canvas';\nexport var Kernel = /*#__PURE__*/function () {\n function Kernel(engine, configService) {\n _classCallCheck(this, Kernel);\n this.engine = engine;\n this.configService = configService;\n this.model = void 0;\n this.dirty = true;\n this.compiledBundle = void 0;\n this.initPromise = void 0;\n }\n _createClass(Kernel, [{\n key: \"init\",\n value: function init() {\n var _this$configService$g = this.configService.get(),\n canvas = _this$configService$g.canvas,\n engineOptions = _this$configService$g.engineOptions;\n this.initPromise = this.engine.init(_objectSpread({\n canvas: canvas || createCanvas(),\n // swapChainFormat: WebGPUConstants.TextureFormat.BGRA8Unorm,\n antialiasing: false\n }, engineOptions));\n }\n }, {\n key: \"setBundle\",\n value: function setBundle(bundle) {\n // deep clone\n this.compiledBundle = JSON.parse(JSON.stringify(bundle));\n }\n }, {\n key: \"setDispatch\",\n value: function setDispatch(dispatch) {\n if (this.compiledBundle.context) {\n this.compiledBundle.context.dispatch = dispatch;\n }\n return this;\n }\n }, {\n key: \"setMaxIteration\",\n value: function setMaxIteration(maxIteration) {\n if (this.compiledBundle.context) {\n this.compiledBundle.context.maxIteration = maxIteration;\n }\n return this;\n }\n }, {\n key: \"setBinding\",\n value: function setBinding(name, data) {\n var _this = this;\n if (typeof name === 'string') {\n var isNumberLikeData = _isNumber(data) || _isTypedArray(data) || _isArray(data);\n if (this.compiledBundle && this.compiledBundle.context) {\n // set define, eg. setBinding('MAX_LENGTH', 10)\n var existedDefine = this.compiledBundle.context.defines.find(function (b) {\n return b.name === name;\n });\n if (existedDefine) {\n existedDefine.value = data;\n return this;\n }\n\n // set uniform\n var existedBinding = this.compiledBundle.context.uniforms.find(function (b) {\n return b.name === name;\n });\n if (existedBinding) {\n // update uniform or buffer\n if (isNumberLikeData) {\n // @ts-ignore\n existedBinding.data = data;\n existedBinding.isReferer = false;\n if (existedBinding.storageClass === STORAGE_CLASS.Uniform) {\n if (this.model) {\n // @ts-ignore\n this.model.updateUniform(name, data);\n }\n } else {\n if (this.model) {\n // @ts-ignore\n this.model.updateBuffer(name, data);\n }\n }\n } else {\n // update with another kernel\n existedBinding.isReferer = true;\n // @ts-ignore\n existedBinding.data = data;\n }\n }\n }\n } else {\n Object.keys(name).forEach(function (key) {\n _this.setBinding(key, name[key]);\n });\n }\n return this;\n }\n }, {\n key: \"execute\",\n value: function () {\n var _execute = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _this2 = this;\n var iteration,\n i,\n _args = arguments;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n iteration = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1;\n if (!this.dirty) {\n _context.next = 6;\n break;\n }\n if (this.compiledBundle.context) {\n if (iteration > 1) {\n this.compiledBundle.context.maxIteration = iteration;\n } else {\n this.compiledBundle.context.maxIteration++;\n }\n }\n _context.next = 5;\n return this.compile();\n case 5:\n this.dirty = false;\n case 6:\n this.engine.beginFrame();\n\n // 首先开启当前 frame 的 compute pass\n this.engine.clear({});\n if (this.compiledBundle.context) {\n this.compiledBundle.context.uniforms.filter(function (_ref) {\n var isReferer = _ref.isReferer;\n return isReferer;\n }).forEach(function (_ref2) {\n var data = _ref2.data,\n name = _ref2.name;\n // @ts-ignore\n _this2.model.confirmInput(data.model, name);\n });\n }\n for (i = 0; i < iteration; i++) {\n this.model.run();\n }\n this.engine.endFrame();\n return _context.abrupt(\"return\", this);\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n function execute() {\n return _execute.apply(this, arguments);\n }\n return execute;\n }()\n /**\n * read output from GPUBuffer\n */\n }, {\n key: \"getOutput\",\n value: function () {\n var _getOutput = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n return _context2.abrupt(\"return\", this.model.readData());\n case 1:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n function getOutput() {\n return _getOutput.apply(this, arguments);\n }\n return getOutput;\n }()\n }, {\n key: \"compile\",\n value: function () {\n var _compile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {\n var context, target, shader;\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return this.initPromise;\n case 2:\n context = _objectSpread({}, this.compiledBundle.context);\n target = this.engine.supportWebGPU ? this.engine.useWGSL ? Target.WGSL : Target.GLSL450 : Target.GLSL100;\n shader = this.compiledBundle.shaders[target]; // this.bindings?.forEach(({ name, data }) => {\n // if (name === name.toUpperCase()) {\n // const define = context.defines.find((d) => d.name === name);\n // if (define) {\n // // @ts-ignore\n // define.value = data;\n // }\n // }\n // });\n // 生成运行时 define\n context.defines.filter(function (define) {\n return define.runtime;\n }).forEach(function (define) {\n var valuePlaceHolder = \"\".concat(DefineValuePlaceholder).concat(define.name);\n shader = shader.replace(valuePlaceHolder, \"\".concat(define.value));\n });\n context.shader = shader;\n\n // 添加 uniform 绑定的数据\n context.uniforms.forEach(function (uniform) {\n // const binding = this.bindings.find((b) => b.name === uniform.name);\n // if (binding) {\n // // @ts-ignore\n // uniform.data = binding.referer || binding.data;\n // // @ts-ignore\n // uniform.isReferer = !!binding.referer;\n // }\n\n // 未指定数据,尝试根据 uniform 类型初始化\n if (!uniform.data) {\n if (uniform.storageClass === STORAGE_CLASS.StorageBuffer) {\n var sizePerElement = 1;\n if (uniform.type === AST_TOKEN_TYPES.FloatArray) {\n sizePerElement = 1;\n } else if (uniform.type === AST_TOKEN_TYPES.Vector4FloatArray) {\n sizePerElement = 4;\n }\n uniform.data = new Float32Array(context.output.length * sizePerElement).fill(0);\n }\n }\n });\n // } else if (uniform.type === 'image2D') {\n // // @ts-ignore\n // buffer.data = new Uint8ClampedArray(context.output.length!).fill(0);\n // }\n\n this.compiledBundle.context = context;\n _context3.next = 11;\n return this.engine.createComputeModel(this.compiledBundle.context);\n case 11:\n this.model = _context3.sent;\n case 12:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n function compile() {\n return _compile.apply(this, arguments);\n }\n return compile;\n }()\n }]);\n return Kernel;\n}();\n//# sourceMappingURL=Kernel.js.map","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.createREGL = factory());\n}(this, (function () { 'use strict';\n\nvar isTypedArray = function (x) {\n return (\n x instanceof Uint8Array ||\n x instanceof Uint16Array ||\n x instanceof Uint32Array ||\n x instanceof Int8Array ||\n x instanceof Int16Array ||\n x instanceof Int32Array ||\n x instanceof Float32Array ||\n x instanceof Float64Array ||\n x instanceof Uint8ClampedArray\n )\n}\n\nvar extend = function (base, opts) {\n var keys = Object.keys(opts)\n for (var i = 0; i < keys.length; ++i) {\n base[keys[i]] = opts[keys[i]]\n }\n return base\n}\n\n// Error checking and parameter validation.\n//\n// Statements for the form `check.someProcedure(...)` get removed by\n// a browserify transform for optimized/minified bundles.\n//\n/* globals atob */\nvar endl = '\\n'\n\n// only used for extracting shader names. if atob not present, then errors\n// will be slightly crappier\nfunction decodeB64 (str) {\n if (typeof atob !== 'undefined') {\n return atob(str)\n }\n return 'base64:' + str\n}\n\nfunction raise (message) {\n var error = new Error('(regl) ' + message)\n console.error(error)\n throw error\n}\n\nfunction check (pred, message) {\n if (!pred) {\n raise(message)\n }\n}\n\nfunction encolon (message) {\n if (message) {\n return ': ' + message\n }\n return ''\n}\n\nfunction checkParameter (param, possibilities, message) {\n if (!(param in possibilities)) {\n raise('unknown parameter (' + param + ')' + encolon(message) +\n '. possible values: ' + Object.keys(possibilities).join())\n }\n}\n\nfunction checkIsTypedArray (data, message) {\n if (!isTypedArray(data)) {\n raise(\n 'invalid parameter type' + encolon(message) +\n '. must be a typed array')\n }\n}\n\nfunction standardTypeEh (value, type) {\n switch (type) {\n case 'number': return typeof value === 'number'\n case 'object': return typeof value === 'object'\n case 'string': return typeof value === 'string'\n case 'boolean': return typeof value === 'boolean'\n case 'function': return typeof value === 'function'\n case 'undefined': return typeof value === 'undefined'\n case 'symbol': return typeof value === 'symbol'\n }\n}\n\nfunction checkTypeOf (value, type, message) {\n if (!standardTypeEh(value, type)) {\n raise(\n 'invalid parameter type' + encolon(message) +\n '. expected ' + type + ', got ' + (typeof value))\n }\n}\n\nfunction checkNonNegativeInt (value, message) {\n if (!((value >= 0) &&\n ((value | 0) === value))) {\n raise('invalid parameter type, (' + value + ')' + encolon(message) +\n '. must be a nonnegative integer')\n }\n}\n\nfunction checkOneOf (value, list, message) {\n if (list.indexOf(value) < 0) {\n raise('invalid value' + encolon(message) + '. must be one of: ' + list)\n }\n}\n\nvar constructorKeys = [\n 'gl',\n 'canvas',\n 'container',\n 'attributes',\n 'pixelRatio',\n 'extensions',\n 'optionalExtensions',\n 'profile',\n 'onDone'\n]\n\nfunction checkConstructor (obj) {\n Object.keys(obj).forEach(function (key) {\n if (constructorKeys.indexOf(key) < 0) {\n raise('invalid regl constructor argument \"' + key + '\". must be one of ' + constructorKeys)\n }\n })\n}\n\nfunction leftPad (str, n) {\n str = str + ''\n while (str.length < n) {\n str = ' ' + str\n }\n return str\n}\n\nfunction ShaderFile () {\n this.name = 'unknown'\n this.lines = []\n this.index = {}\n this.hasErrors = false\n}\n\nfunction ShaderLine (number, line) {\n this.number = number\n this.line = line\n this.errors = []\n}\n\nfunction ShaderError (fileNumber, lineNumber, message) {\n this.file = fileNumber\n this.line = lineNumber\n this.message = message\n}\n\nfunction guessCommand () {\n var error = new Error()\n var stack = (error.stack || error).toString()\n var pat = /compileProcedure.*\\n\\s*at.*\\((.*)\\)/.exec(stack)\n if (pat) {\n return pat[1]\n }\n var pat2 = /compileProcedure.*\\n\\s*at\\s+(.*)(\\n|$)/.exec(stack)\n if (pat2) {\n return pat2[1]\n }\n return 'unknown'\n}\n\nfunction guessCallSite () {\n var error = new Error()\n var stack = (error.stack || error).toString()\n var pat = /at REGLCommand.*\\n\\s+at.*\\((.*)\\)/.exec(stack)\n if (pat) {\n return pat[1]\n }\n var pat2 = /at REGLCommand.*\\n\\s+at\\s+(.*)\\n/.exec(stack)\n if (pat2) {\n return pat2[1]\n }\n return 'unknown'\n}\n\nfunction parseSource (source, command) {\n var lines = source.split('\\n')\n var lineNumber = 1\n var fileNumber = 0\n var files = {\n unknown: new ShaderFile(),\n 0: new ShaderFile()\n }\n files.unknown.name = files[0].name = command || guessCommand()\n files.unknown.lines.push(new ShaderLine(0, ''))\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i]\n var parts = /^\\s*#\\s*(\\w+)\\s+(.+)\\s*$/.exec(line)\n if (parts) {\n switch (parts[1]) {\n case 'line':\n var lineNumberInfo = /(\\d+)(\\s+\\d+)?/.exec(parts[2])\n if (lineNumberInfo) {\n lineNumber = lineNumberInfo[1] | 0\n if (lineNumberInfo[2]) {\n fileNumber = lineNumberInfo[2] | 0\n if (!(fileNumber in files)) {\n files[fileNumber] = new ShaderFile()\n }\n }\n }\n break\n case 'define':\n var nameInfo = /SHADER_NAME(_B64)?\\s+(.*)$/.exec(parts[2])\n if (nameInfo) {\n files[fileNumber].name = (nameInfo[1]\n ? decodeB64(nameInfo[2])\n : nameInfo[2])\n }\n break\n }\n }\n files[fileNumber].lines.push(new ShaderLine(lineNumber++, line))\n }\n Object.keys(files).forEach(function (fileNumber) {\n var file = files[fileNumber]\n file.lines.forEach(function (line) {\n file.index[line.number] = line\n })\n })\n return files\n}\n\nfunction parseErrorLog (errLog) {\n var result = []\n errLog.split('\\n').forEach(function (errMsg) {\n if (errMsg.length < 5) {\n return\n }\n var parts = /^ERROR:\\s+(\\d+):(\\d+):\\s*(.*)$/.exec(errMsg)\n if (parts) {\n result.push(new ShaderError(\n parts[1] | 0,\n parts[2] | 0,\n parts[3].trim()))\n } else if (errMsg.length > 0) {\n result.push(new ShaderError('unknown', 0, errMsg))\n }\n })\n return result\n}\n\nfunction annotateFiles (files, errors) {\n errors.forEach(function (error) {\n var file = files[error.file]\n if (file) {\n var line = file.index[error.line]\n if (line) {\n line.errors.push(error)\n file.hasErrors = true\n return\n }\n }\n files.unknown.hasErrors = true\n files.unknown.lines[0].errors.push(error)\n })\n}\n\nfunction checkShaderError (gl, shader, source, type, command) {\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var errLog = gl.getShaderInfoLog(shader)\n var typeName = type === gl.FRAGMENT_SHADER ? 'fragment' : 'vertex'\n checkCommandType(source, 'string', typeName + ' shader source must be a string', command)\n var files = parseSource(source, command)\n var errors = parseErrorLog(errLog)\n annotateFiles(files, errors)\n\n Object.keys(files).forEach(function (fileNumber) {\n var file = files[fileNumber]\n if (!file.hasErrors) {\n return\n }\n\n var strings = ['']\n var styles = ['']\n\n function push (str, style) {\n strings.push(str)\n styles.push(style || '')\n }\n\n push('file number ' + fileNumber + ': ' + file.name + '\\n', 'color:red;text-decoration:underline;font-weight:bold')\n\n file.lines.forEach(function (line) {\n if (line.errors.length > 0) {\n push(leftPad(line.number, 4) + '| ', 'background-color:yellow; font-weight:bold')\n push(line.line + endl, 'color:red; background-color:yellow; font-weight:bold')\n\n // try to guess token\n var offset = 0\n line.errors.forEach(function (error) {\n var message = error.message\n var token = /^\\s*'(.*)'\\s*:\\s*(.*)$/.exec(message)\n if (token) {\n var tokenPat = token[1]\n message = token[2]\n switch (tokenPat) {\n case 'assign':\n tokenPat = '='\n break\n }\n offset = Math.max(line.line.indexOf(tokenPat, offset), 0)\n } else {\n offset = 0\n }\n\n push(leftPad('| ', 6))\n push(leftPad('^^^', offset + 3) + endl, 'font-weight:bold')\n push(leftPad('| ', 6))\n push(message + endl, 'font-weight:bold')\n })\n push(leftPad('| ', 6) + endl)\n } else {\n push(leftPad(line.number, 4) + '| ')\n push(line.line + endl, 'color:red')\n }\n })\n if (typeof document !== 'undefined' && !window.chrome) {\n styles[0] = strings.join('%c')\n console.log.apply(console, styles)\n } else {\n console.log(strings.join(''))\n }\n })\n\n check.raise('Error compiling ' + typeName + ' shader, ' + files[0].name)\n }\n}\n\nfunction checkLinkError (gl, program, fragShader, vertShader, command) {\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var errLog = gl.getProgramInfoLog(program)\n var fragParse = parseSource(fragShader, command)\n var vertParse = parseSource(vertShader, command)\n\n var header = 'Error linking program with vertex shader, \"' +\n vertParse[0].name + '\", and fragment shader \"' + fragParse[0].name + '\"'\n\n if (typeof document !== 'undefined') {\n console.log('%c' + header + endl + '%c' + errLog,\n 'color:red;text-decoration:underline;font-weight:bold',\n 'color:red')\n } else {\n console.log(header + endl + errLog)\n }\n check.raise(header)\n }\n}\n\nfunction saveCommandRef (object) {\n object._commandRef = guessCommand()\n}\n\nfunction saveDrawCommandInfo (opts, uniforms, attributes, stringStore) {\n saveCommandRef(opts)\n\n function id (str) {\n if (str) {\n return stringStore.id(str)\n }\n return 0\n }\n opts._fragId = id(opts.static.frag)\n opts._vertId = id(opts.static.vert)\n\n function addProps (dict, set) {\n Object.keys(set).forEach(function (u) {\n dict[stringStore.id(u)] = true\n })\n }\n\n var uniformSet = opts._uniformSet = {}\n addProps(uniformSet, uniforms.static)\n addProps(uniformSet, uniforms.dynamic)\n\n var attributeSet = opts._attributeSet = {}\n addProps(attributeSet, attributes.static)\n addProps(attributeSet, attributes.dynamic)\n\n opts._hasCount = (\n 'count' in opts.static ||\n 'count' in opts.dynamic ||\n 'elements' in opts.static ||\n 'elements' in opts.dynamic)\n}\n\nfunction commandRaise (message, command) {\n var callSite = guessCallSite()\n raise(message +\n ' in command ' + (command || guessCommand()) +\n (callSite === 'unknown' ? '' : ' called from ' + callSite))\n}\n\nfunction checkCommand (pred, message, command) {\n if (!pred) {\n commandRaise(message, command || guessCommand())\n }\n}\n\nfunction checkParameterCommand (param, possibilities, message, command) {\n if (!(param in possibilities)) {\n commandRaise(\n 'unknown parameter (' + param + ')' + encolon(message) +\n '. possible values: ' + Object.keys(possibilities).join(),\n command || guessCommand())\n }\n}\n\nfunction checkCommandType (value, type, message, command) {\n if (!standardTypeEh(value, type)) {\n commandRaise(\n 'invalid parameter type' + encolon(message) +\n '. expected ' + type + ', got ' + (typeof value),\n command || guessCommand())\n }\n}\n\nfunction checkOptional (block) {\n block()\n}\n\nfunction checkFramebufferFormat (attachment, texFormats, rbFormats) {\n if (attachment.texture) {\n checkOneOf(\n attachment.texture._texture.internalformat,\n texFormats,\n 'unsupported texture format for attachment')\n } else {\n checkOneOf(\n attachment.renderbuffer._renderbuffer.format,\n rbFormats,\n 'unsupported renderbuffer format for attachment')\n }\n}\n\nvar GL_CLAMP_TO_EDGE = 0x812F\n\nvar GL_NEAREST = 0x2600\nvar GL_NEAREST_MIPMAP_NEAREST = 0x2700\nvar GL_LINEAR_MIPMAP_NEAREST = 0x2701\nvar GL_NEAREST_MIPMAP_LINEAR = 0x2702\nvar GL_LINEAR_MIPMAP_LINEAR = 0x2703\n\nvar GL_BYTE = 5120\nvar GL_UNSIGNED_BYTE = 5121\nvar GL_SHORT = 5122\nvar GL_UNSIGNED_SHORT = 5123\nvar GL_INT = 5124\nvar GL_UNSIGNED_INT = 5125\nvar GL_FLOAT = 5126\n\nvar GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033\nvar GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034\nvar GL_UNSIGNED_SHORT_5_6_5 = 0x8363\nvar GL_UNSIGNED_INT_24_8_WEBGL = 0x84FA\n\nvar GL_HALF_FLOAT_OES = 0x8D61\n\nvar TYPE_SIZE = {}\n\nTYPE_SIZE[GL_BYTE] =\nTYPE_SIZE[GL_UNSIGNED_BYTE] = 1\n\nTYPE_SIZE[GL_SHORT] =\nTYPE_SIZE[GL_UNSIGNED_SHORT] =\nTYPE_SIZE[GL_HALF_FLOAT_OES] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_5_6_5] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_4_4_4_4] =\nTYPE_SIZE[GL_UNSIGNED_SHORT_5_5_5_1] = 2\n\nTYPE_SIZE[GL_INT] =\nTYPE_SIZE[GL_UNSIGNED_INT] =\nTYPE_SIZE[GL_FLOAT] =\nTYPE_SIZE[GL_UNSIGNED_INT_24_8_WEBGL] = 4\n\nfunction pixelSize (type, channels) {\n if (type === GL_UNSIGNED_SHORT_5_5_5_1 ||\n type === GL_UNSIGNED_SHORT_4_4_4_4 ||\n type === GL_UNSIGNED_SHORT_5_6_5) {\n return 2\n } else if (type === GL_UNSIGNED_INT_24_8_WEBGL) {\n return 4\n } else {\n return TYPE_SIZE[type] * channels\n }\n}\n\nfunction isPow2 (v) {\n return !(v & (v - 1)) && (!!v)\n}\n\nfunction checkTexture2D (info, mipData, limits) {\n var i\n var w = mipData.width\n var h = mipData.height\n var c = mipData.channels\n\n // Check texture shape\n check(w > 0 && w <= limits.maxTextureSize &&\n h > 0 && h <= limits.maxTextureSize,\n 'invalid texture shape')\n\n // check wrap mode\n if (info.wrapS !== GL_CLAMP_TO_EDGE || info.wrapT !== GL_CLAMP_TO_EDGE) {\n check(isPow2(w) && isPow2(h),\n 'incompatible wrap mode for texture, both width and height must be power of 2')\n }\n\n if (mipData.mipmask === 1) {\n if (w !== 1 && h !== 1) {\n check(\n info.minFilter !== GL_NEAREST_MIPMAP_NEAREST &&\n info.minFilter !== GL_NEAREST_MIPMAP_LINEAR &&\n info.minFilter !== GL_LINEAR_MIPMAP_NEAREST &&\n info.minFilter !== GL_LINEAR_MIPMAP_LINEAR,\n 'min filter requires mipmap')\n }\n } else {\n // texture must be power of 2\n check(isPow2(w) && isPow2(h),\n 'texture must be a square power of 2 to support mipmapping')\n check(mipData.mipmask === (w << 1) - 1,\n 'missing or incomplete mipmap data')\n }\n\n if (mipData.type === GL_FLOAT) {\n if (limits.extensions.indexOf('oes_texture_float_linear') < 0) {\n check(info.minFilter === GL_NEAREST && info.magFilter === GL_NEAREST,\n 'filter not supported, must enable oes_texture_float_linear')\n }\n check(!info.genMipmaps,\n 'mipmap generation not supported with float textures')\n }\n\n // check image complete\n var mipimages = mipData.images\n for (i = 0; i < 16; ++i) {\n if (mipimages[i]) {\n var mw = w >> i\n var mh = h >> i\n check(mipData.mipmask & (1 << i), 'missing mipmap data')\n\n var img = mipimages[i]\n\n check(\n img.width === mw &&\n img.height === mh,\n 'invalid shape for mip images')\n\n check(\n img.format === mipData.format &&\n img.internalformat === mipData.internalformat &&\n img.type === mipData.type,\n 'incompatible type for mip image')\n\n if (img.compressed) {\n // TODO: check size for compressed images\n } else if (img.data) {\n // check(img.data.byteLength === mw * mh *\n // Math.max(pixelSize(img.type, c), img.unpackAlignment),\n var rowSize = Math.ceil(pixelSize(img.type, c) * mw / img.unpackAlignment) * img.unpackAlignment\n check(img.data.byteLength === rowSize * mh,\n 'invalid data for image, buffer size is inconsistent with image format')\n } else if (img.element) {\n // TODO: check element can be loaded\n } else if (img.copy) {\n // TODO: check compatible format and type\n }\n } else if (!info.genMipmaps) {\n check((mipData.mipmask & (1 << i)) === 0, 'extra mipmap data')\n }\n }\n\n if (mipData.compressed) {\n check(!info.genMipmaps,\n 'mipmap generation for compressed images not supported')\n }\n}\n\nfunction checkTextureCube (texture, info, faces, limits) {\n var w = texture.width\n var h = texture.height\n var c = texture.channels\n\n // Check texture shape\n check(\n w > 0 && w <= limits.maxTextureSize && h > 0 && h <= limits.maxTextureSize,\n 'invalid texture shape')\n check(\n w === h,\n 'cube map must be square')\n check(\n info.wrapS === GL_CLAMP_TO_EDGE && info.wrapT === GL_CLAMP_TO_EDGE,\n 'wrap mode not supported by cube map')\n\n for (var i = 0; i < faces.length; ++i) {\n var face = faces[i]\n check(\n face.width === w && face.height === h,\n 'inconsistent cube map face shape')\n\n if (info.genMipmaps) {\n check(!face.compressed,\n 'can not generate mipmap for compressed textures')\n check(face.mipmask === 1,\n 'can not specify mipmaps and generate mipmaps')\n } else {\n // TODO: check mip and filter mode\n }\n\n var mipmaps = face.images\n for (var j = 0; j < 16; ++j) {\n var img = mipmaps[j]\n if (img) {\n var mw = w >> j\n var mh = h >> j\n check(face.mipmask & (1 << j), 'missing mipmap data')\n check(\n img.width === mw &&\n img.height === mh,\n 'invalid shape for mip images')\n check(\n img.format === texture.format &&\n img.internalformat === texture.internalformat &&\n img.type === texture.type,\n 'incompatible type for mip image')\n\n if (img.compressed) {\n // TODO: check size for compressed images\n } else if (img.data) {\n check(img.data.byteLength === mw * mh *\n Math.max(pixelSize(img.type, c), img.unpackAlignment),\n 'invalid data for image, buffer size is inconsistent with image format')\n } else if (img.element) {\n // TODO: check element can be loaded\n } else if (img.copy) {\n // TODO: check compatible format and type\n }\n }\n }\n }\n}\n\nvar check$1 = extend(check, {\n optional: checkOptional,\n raise: raise,\n commandRaise: commandRaise,\n command: checkCommand,\n parameter: checkParameter,\n commandParameter: checkParameterCommand,\n constructor: checkConstructor,\n type: checkTypeOf,\n commandType: checkCommandType,\n isTypedArray: checkIsTypedArray,\n nni: checkNonNegativeInt,\n oneOf: checkOneOf,\n shaderError: checkShaderError,\n linkError: checkLinkError,\n callSite: guessCallSite,\n saveCommandRef: saveCommandRef,\n saveDrawInfo: saveDrawCommandInfo,\n framebufferFormat: checkFramebufferFormat,\n guessCommand: guessCommand,\n texture2D: checkTexture2D,\n textureCube: checkTextureCube\n});\n\nvar VARIABLE_COUNTER = 0\n\nvar DYN_FUNC = 0\nvar DYN_CONSTANT = 5\nvar DYN_ARRAY = 6\n\nfunction DynamicVariable (type, data) {\n this.id = (VARIABLE_COUNTER++)\n this.type = type\n this.data = data\n}\n\nfunction escapeStr (str) {\n return str.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n}\n\nfunction splitParts (str) {\n if (str.length === 0) {\n return []\n }\n\n var firstChar = str.charAt(0)\n var lastChar = str.charAt(str.length - 1)\n\n if (str.length > 1 &&\n firstChar === lastChar &&\n (firstChar === '\"' || firstChar === \"'\")) {\n return ['\"' + escapeStr(str.substr(1, str.length - 2)) + '\"']\n }\n\n var parts = /\\[(false|true|null|\\d+|'[^']*'|\"[^\"]*\")\\]/.exec(str)\n if (parts) {\n return (\n splitParts(str.substr(0, parts.index))\n .concat(splitParts(parts[1]))\n .concat(splitParts(str.substr(parts.index + parts[0].length)))\n )\n }\n\n var subparts = str.split('.')\n if (subparts.length === 1) {\n return ['\"' + escapeStr(str) + '\"']\n }\n\n var result = []\n for (var i = 0; i < subparts.length; ++i) {\n result = result.concat(splitParts(subparts[i]))\n }\n return result\n}\n\nfunction toAccessorString (str) {\n return '[' + splitParts(str).join('][') + ']'\n}\n\nfunction defineDynamic (type, data) {\n return new DynamicVariable(type, toAccessorString(data + ''))\n}\n\nfunction isDynamic (x) {\n return (typeof x === 'function' && !x._reglType) || (x instanceof DynamicVariable)\n}\n\nfunction unbox (x, path) {\n if (typeof x === 'function') {\n return new DynamicVariable(DYN_FUNC, x)\n } else if (typeof x === 'number' || typeof x === 'boolean') {\n return new DynamicVariable(DYN_CONSTANT, x)\n } else if (Array.isArray(x)) {\n return new DynamicVariable(DYN_ARRAY, x.map((y, i) => unbox(y, path + '[' + i + ']')))\n } else if (x instanceof DynamicVariable) {\n return x\n }\n check$1(false, 'invalid option type in uniform ' + path)\n}\n\nvar dynamic = {\n DynamicVariable: DynamicVariable,\n define: defineDynamic,\n isDynamic: isDynamic,\n unbox: unbox,\n accessor: toAccessorString\n};\n\n/* globals requestAnimationFrame, cancelAnimationFrame */\nvar raf = {\n next: typeof requestAnimationFrame === 'function'\n ? function (cb) { return requestAnimationFrame(cb) }\n : function (cb) { return setTimeout(cb, 16) },\n cancel: typeof cancelAnimationFrame === 'function'\n ? function (raf) { return cancelAnimationFrame(raf) }\n : clearTimeout\n};\n\n/* globals performance */\nvar clock = (typeof performance !== 'undefined' && performance.now)\n ? function () { return performance.now() }\n : function () { return +(new Date()) };\n\nfunction createStringStore () {\n var stringIds = { '': 0 }\n var stringValues = ['']\n return {\n id: function (str) {\n var result = stringIds[str]\n if (result) {\n return result\n }\n result = stringIds[str] = stringValues.length\n stringValues.push(str)\n return result\n },\n\n str: function (id) {\n return stringValues[id]\n }\n }\n}\n\n// Context and canvas creation helper functions\nfunction createCanvas (element, onDone, pixelRatio) {\n var canvas = document.createElement('canvas')\n extend(canvas.style, {\n border: 0,\n margin: 0,\n padding: 0,\n top: 0,\n left: 0\n })\n element.appendChild(canvas)\n\n if (element === document.body) {\n canvas.style.position = 'absolute'\n extend(element.style, {\n margin: 0,\n padding: 0\n })\n }\n\n function resize () {\n var w = window.innerWidth\n var h = window.innerHeight\n if (element !== document.body) {\n var bounds = element.getBoundingClientRect()\n w = bounds.right - bounds.left\n h = bounds.bottom - bounds.top\n }\n canvas.width = pixelRatio * w\n canvas.height = pixelRatio * h\n extend(canvas.style, {\n width: w + 'px',\n height: h + 'px'\n })\n }\n\n var resizeObserver\n if (element !== document.body && typeof ResizeObserver === 'function') {\n // ignore 'ResizeObserver' is not defined\n // eslint-disable-next-line\n resizeObserver = new ResizeObserver(function () {\n // setTimeout to avoid flicker\n setTimeout(resize)\n })\n resizeObserver.observe(element)\n } else {\n window.addEventListener('resize', resize, false)\n }\n\n function onDestroy () {\n if (resizeObserver) {\n resizeObserver.disconnect()\n } else {\n window.removeEventListener('resize', resize)\n }\n element.removeChild(canvas)\n }\n\n resize()\n\n return {\n canvas: canvas,\n onDestroy: onDestroy\n }\n}\n\nfunction createContext (canvas, contextAttributes) {\n function get (name) {\n try {\n return canvas.getContext(name, contextAttributes)\n } catch (e) {\n return null\n }\n }\n return (\n get('webgl') ||\n get('experimental-webgl') ||\n get('webgl-experimental')\n )\n}\n\nfunction isHTMLElement (obj) {\n return (\n typeof obj.nodeName === 'string' &&\n typeof obj.appendChild === 'function' &&\n typeof obj.getBoundingClientRect === 'function'\n )\n}\n\nfunction isWebGLContext (obj) {\n return (\n typeof obj.drawArrays === 'function' ||\n typeof obj.drawElements === 'function'\n )\n}\n\nfunction parseExtensions (input) {\n if (typeof input === 'string') {\n return input.split()\n }\n check$1(Array.isArray(input), 'invalid extension array')\n return input\n}\n\nfunction getElement (desc) {\n if (typeof desc === 'string') {\n check$1(typeof document !== 'undefined', 'not supported outside of DOM')\n return document.querySelector(desc)\n }\n return desc\n}\n\nfunction parseArgs (args_) {\n var args = args_ || {}\n var element, container, canvas, gl\n var contextAttributes = {}\n var extensions = []\n var optionalExtensions = []\n var pixelRatio = (typeof window === 'undefined' ? 1 : window.devicePixelRatio)\n var profile = false\n var onDone = function (err) {\n if (err) {\n check$1.raise(err)\n }\n }\n var onDestroy = function () {}\n if (typeof args === 'string') {\n check$1(\n typeof document !== 'undefined',\n 'selector queries only supported in DOM enviroments')\n element = document.querySelector(args)\n check$1(element, 'invalid query string for element')\n } else if (typeof args === 'object') {\n if (isHTMLElement(args)) {\n element = args\n } else if (isWebGLContext(args)) {\n gl = args\n canvas = gl.canvas\n } else {\n check$1.constructor(args)\n if ('gl' in args) {\n gl = args.gl\n } else if ('canvas' in args) {\n canvas = getElement(args.canvas)\n } else if ('container' in args) {\n container = getElement(args.container)\n }\n if ('attributes' in args) {\n contextAttributes = args.attributes\n check$1.type(contextAttributes, 'object', 'invalid context attributes')\n }\n if ('extensions' in args) {\n extensions = parseExtensions(args.extensions)\n }\n if ('optionalExtensions' in args) {\n optionalExtensions = parseExtensions(args.optionalExtensions)\n }\n if ('onDone' in args) {\n check$1.type(\n args.onDone, 'function',\n 'invalid or missing onDone callback')\n onDone = args.onDone\n }\n if ('profile' in args) {\n profile = !!args.profile\n }\n if ('pixelRatio' in args) {\n pixelRatio = +args.pixelRatio\n check$1(pixelRatio > 0, 'invalid pixel ratio')\n }\n }\n } else {\n check$1.raise('invalid arguments to regl')\n }\n\n if (element) {\n if (element.nodeName.toLowerCase() === 'canvas') {\n canvas = element\n } else {\n container = element\n }\n }\n\n if (!gl) {\n if (!canvas) {\n check$1(\n typeof document !== 'undefined',\n 'must manually specify webgl context outside of DOM environments')\n var result = createCanvas(container || document.body, onDone, pixelRatio)\n if (!result) {\n return null\n }\n canvas = result.canvas\n onDestroy = result.onDestroy\n }\n // workaround for chromium bug, premultiplied alpha value is platform dependent\n if (contextAttributes.premultipliedAlpha === undefined) contextAttributes.premultipliedAlpha = true\n gl = createContext(canvas, contextAttributes)\n }\n\n if (!gl) {\n onDestroy()\n onDone('webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org')\n return null\n }\n\n return {\n gl: gl,\n canvas: canvas,\n container: container,\n extensions: extensions,\n optionalExtensions: optionalExtensions,\n pixelRatio: pixelRatio,\n profile: profile,\n onDone: onDone,\n onDestroy: onDestroy\n }\n}\n\nfunction createExtensionCache (gl, config) {\n var extensions = {}\n\n function tryLoadExtension (name_) {\n check$1.type(name_, 'string', 'extension name must be string')\n var name = name_.toLowerCase()\n var ext\n try {\n ext = extensions[name] = gl.getExtension(name)\n } catch (e) {}\n return !!ext\n }\n\n for (var i = 0; i < config.extensions.length; ++i) {\n var name = config.extensions[i]\n if (!tryLoadExtension(name)) {\n config.onDestroy()\n config.onDone('\"' + name + '\" extension is not supported by the current WebGL context, try upgrading your system or a different browser')\n return null\n }\n }\n\n config.optionalExtensions.forEach(tryLoadExtension)\n\n return {\n extensions: extensions,\n restore: function () {\n Object.keys(extensions).forEach(function (name) {\n if (extensions[name] && !tryLoadExtension(name)) {\n throw new Error('(regl): error restoring extension ' + name)\n }\n })\n }\n }\n}\n\nfunction loop (n, f) {\n var result = Array(n)\n for (var i = 0; i < n; ++i) {\n result[i] = f(i)\n }\n return result\n}\n\nvar GL_BYTE$1 = 5120\nvar GL_UNSIGNED_BYTE$2 = 5121\nvar GL_SHORT$1 = 5122\nvar GL_UNSIGNED_SHORT$1 = 5123\nvar GL_INT$1 = 5124\nvar GL_UNSIGNED_INT$1 = 5125\nvar GL_FLOAT$2 = 5126\n\nfunction nextPow16 (v) {\n for (var i = 16; i <= (1 << 28); i *= 16) {\n if (v <= i) {\n return i\n }\n }\n return 0\n}\n\nfunction log2 (v) {\n var r, shift\n r = (v > 0xFFFF) << 4\n v >>>= r\n shift = (v > 0xFF) << 3\n v >>>= shift; r |= shift\n shift = (v > 0xF) << 2\n v >>>= shift; r |= shift\n shift = (v > 0x3) << 1\n v >>>= shift; r |= shift\n return r | (v >> 1)\n}\n\nfunction createPool () {\n var bufferPool = loop(8, function () {\n return []\n })\n\n function alloc (n) {\n var sz = nextPow16(n)\n var bin = bufferPool[log2(sz) >> 2]\n if (bin.length > 0) {\n return bin.pop()\n }\n return new ArrayBuffer(sz)\n }\n\n function free (buf) {\n bufferPool[log2(buf.byteLength) >> 2].push(buf)\n }\n\n function allocType (type, n) {\n var result = null\n switch (type) {\n case GL_BYTE$1:\n result = new Int8Array(alloc(n), 0, n)\n break\n case GL_UNSIGNED_BYTE$2:\n result = new Uint8Array(alloc(n), 0, n)\n break\n case GL_SHORT$1:\n result = new Int16Array(alloc(2 * n), 0, n)\n break\n case GL_UNSIGNED_SHORT$1:\n result = new Uint16Array(alloc(2 * n), 0, n)\n break\n case GL_INT$1:\n result = new Int32Array(alloc(4 * n), 0, n)\n break\n case GL_UNSIGNED_INT$1:\n result = new Uint32Array(alloc(4 * n), 0, n)\n break\n case GL_FLOAT$2:\n result = new Float32Array(alloc(4 * n), 0, n)\n break\n default:\n return null\n }\n if (result.length !== n) {\n return result.subarray(0, n)\n }\n return result\n }\n\n function freeType (array) {\n free(array.buffer)\n }\n\n return {\n alloc: alloc,\n free: free,\n allocType: allocType,\n freeType: freeType\n }\n}\n\nvar pool = createPool()\n\n// zero pool for initial zero data\npool.zero = createPool()\n\nvar GL_SUBPIXEL_BITS = 0x0D50\nvar GL_RED_BITS = 0x0D52\nvar GL_GREEN_BITS = 0x0D53\nvar GL_BLUE_BITS = 0x0D54\nvar GL_ALPHA_BITS = 0x0D55\nvar GL_DEPTH_BITS = 0x0D56\nvar GL_STENCIL_BITS = 0x0D57\n\nvar GL_ALIASED_POINT_SIZE_RANGE = 0x846D\nvar GL_ALIASED_LINE_WIDTH_RANGE = 0x846E\n\nvar GL_MAX_TEXTURE_SIZE = 0x0D33\nvar GL_MAX_VIEWPORT_DIMS = 0x0D3A\nvar GL_MAX_VERTEX_ATTRIBS = 0x8869\nvar GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB\nvar GL_MAX_VARYING_VECTORS = 0x8DFC\nvar GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D\nvar GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C\nvar GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872\nvar GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD\nvar GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C\nvar GL_MAX_RENDERBUFFER_SIZE = 0x84E8\n\nvar GL_VENDOR = 0x1F00\nvar GL_RENDERER = 0x1F01\nvar GL_VERSION = 0x1F02\nvar GL_SHADING_LANGUAGE_VERSION = 0x8B8C\n\nvar GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF\n\nvar GL_MAX_COLOR_ATTACHMENTS_WEBGL = 0x8CDF\nvar GL_MAX_DRAW_BUFFERS_WEBGL = 0x8824\n\nvar GL_TEXTURE_2D = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP = 0x8513\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515\nvar GL_TEXTURE0 = 0x84C0\nvar GL_RGBA = 0x1908\nvar GL_FLOAT$1 = 0x1406\nvar GL_UNSIGNED_BYTE$1 = 0x1401\nvar GL_FRAMEBUFFER = 0x8D40\nvar GL_FRAMEBUFFER_COMPLETE = 0x8CD5\nvar GL_COLOR_ATTACHMENT0 = 0x8CE0\nvar GL_COLOR_BUFFER_BIT$1 = 0x4000\n\nvar wrapLimits = function (gl, extensions) {\n var maxAnisotropic = 1\n if (extensions.ext_texture_filter_anisotropic) {\n maxAnisotropic = gl.getParameter(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)\n }\n\n var maxDrawbuffers = 1\n var maxColorAttachments = 1\n if (extensions.webgl_draw_buffers) {\n maxDrawbuffers = gl.getParameter(GL_MAX_DRAW_BUFFERS_WEBGL)\n maxColorAttachments = gl.getParameter(GL_MAX_COLOR_ATTACHMENTS_WEBGL)\n }\n\n // detect if reading float textures is available (Safari doesn't support)\n var readFloat = !!extensions.oes_texture_float\n if (readFloat) {\n var readFloatTexture = gl.createTexture()\n gl.bindTexture(GL_TEXTURE_2D, readFloatTexture)\n gl.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_FLOAT$1, null)\n\n var fbo = gl.createFramebuffer()\n gl.bindFramebuffer(GL_FRAMEBUFFER, fbo)\n gl.framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, readFloatTexture, 0)\n gl.bindTexture(GL_TEXTURE_2D, null)\n\n if (gl.checkFramebufferStatus(GL_FRAMEBUFFER) !== GL_FRAMEBUFFER_COMPLETE) readFloat = false\n\n else {\n gl.viewport(0, 0, 1, 1)\n gl.clearColor(1.0, 0.0, 0.0, 1.0)\n gl.clear(GL_COLOR_BUFFER_BIT$1)\n var pixels = pool.allocType(GL_FLOAT$1, 4)\n gl.readPixels(0, 0, 1, 1, GL_RGBA, GL_FLOAT$1, pixels)\n\n if (gl.getError()) readFloat = false\n else {\n gl.deleteFramebuffer(fbo)\n gl.deleteTexture(readFloatTexture)\n\n readFloat = pixels[0] === 1.0\n }\n\n pool.freeType(pixels)\n }\n }\n\n // detect non power of two cube textures support (IE doesn't support)\n var isIE = typeof navigator !== 'undefined' && (/MSIE/.test(navigator.userAgent) || /Trident\\//.test(navigator.appVersion) || /Edge/.test(navigator.userAgent))\n\n var npotTextureCube = true\n\n if (!isIE) {\n var cubeTexture = gl.createTexture()\n var data = pool.allocType(GL_UNSIGNED_BYTE$1, 36)\n gl.activeTexture(GL_TEXTURE0)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP, cubeTexture)\n gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGBA, 3, 3, 0, GL_RGBA, GL_UNSIGNED_BYTE$1, data)\n pool.freeType(data)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP, null)\n gl.deleteTexture(cubeTexture)\n npotTextureCube = !gl.getError()\n }\n\n return {\n // drawing buffer bit depth\n colorBits: [\n gl.getParameter(GL_RED_BITS),\n gl.getParameter(GL_GREEN_BITS),\n gl.getParameter(GL_BLUE_BITS),\n gl.getParameter(GL_ALPHA_BITS)\n ],\n depthBits: gl.getParameter(GL_DEPTH_BITS),\n stencilBits: gl.getParameter(GL_STENCIL_BITS),\n subpixelBits: gl.getParameter(GL_SUBPIXEL_BITS),\n\n // supported extensions\n extensions: Object.keys(extensions).filter(function (ext) {\n return !!extensions[ext]\n }),\n\n // max aniso samples\n maxAnisotropic: maxAnisotropic,\n\n // max draw buffers\n maxDrawbuffers: maxDrawbuffers,\n maxColorAttachments: maxColorAttachments,\n\n // point and line size ranges\n pointSizeDims: gl.getParameter(GL_ALIASED_POINT_SIZE_RANGE),\n lineWidthDims: gl.getParameter(GL_ALIASED_LINE_WIDTH_RANGE),\n maxViewportDims: gl.getParameter(GL_MAX_VIEWPORT_DIMS),\n maxCombinedTextureUnits: gl.getParameter(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS),\n maxCubeMapSize: gl.getParameter(GL_MAX_CUBE_MAP_TEXTURE_SIZE),\n maxRenderbufferSize: gl.getParameter(GL_MAX_RENDERBUFFER_SIZE),\n maxTextureUnits: gl.getParameter(GL_MAX_TEXTURE_IMAGE_UNITS),\n maxTextureSize: gl.getParameter(GL_MAX_TEXTURE_SIZE),\n maxAttributes: gl.getParameter(GL_MAX_VERTEX_ATTRIBS),\n maxVertexUniforms: gl.getParameter(GL_MAX_VERTEX_UNIFORM_VECTORS),\n maxVertexTextureUnits: gl.getParameter(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS),\n maxVaryingVectors: gl.getParameter(GL_MAX_VARYING_VECTORS),\n maxFragmentUniforms: gl.getParameter(GL_MAX_FRAGMENT_UNIFORM_VECTORS),\n\n // vendor info\n glsl: gl.getParameter(GL_SHADING_LANGUAGE_VERSION),\n renderer: gl.getParameter(GL_RENDERER),\n vendor: gl.getParameter(GL_VENDOR),\n version: gl.getParameter(GL_VERSION),\n\n // quirks\n readFloat: readFloat,\n npotTextureCube: npotTextureCube\n }\n}\n\nfunction isNDArrayLike (obj) {\n return (\n !!obj &&\n typeof obj === 'object' &&\n Array.isArray(obj.shape) &&\n Array.isArray(obj.stride) &&\n typeof obj.offset === 'number' &&\n obj.shape.length === obj.stride.length &&\n (Array.isArray(obj.data) ||\n isTypedArray(obj.data)))\n}\n\nvar values = function (obj) {\n return Object.keys(obj).map(function (key) { return obj[key] })\n}\n\nvar flattenUtils = {\n shape: arrayShape$1,\n flatten: flattenArray\n};\n\nfunction flatten1D (array, nx, out) {\n for (var i = 0; i < nx; ++i) {\n out[i] = array[i]\n }\n}\n\nfunction flatten2D (array, nx, ny, out) {\n var ptr = 0\n for (var i = 0; i < nx; ++i) {\n var row = array[i]\n for (var j = 0; j < ny; ++j) {\n out[ptr++] = row[j]\n }\n }\n}\n\nfunction flatten3D (array, nx, ny, nz, out, ptr_) {\n var ptr = ptr_\n for (var i = 0; i < nx; ++i) {\n var row = array[i]\n for (var j = 0; j < ny; ++j) {\n var col = row[j]\n for (var k = 0; k < nz; ++k) {\n out[ptr++] = col[k]\n }\n }\n }\n}\n\nfunction flattenRec (array, shape, level, out, ptr) {\n var stride = 1\n for (var i = level + 1; i < shape.length; ++i) {\n stride *= shape[i]\n }\n var n = shape[level]\n if (shape.length - level === 4) {\n var nx = shape[level + 1]\n var ny = shape[level + 2]\n var nz = shape[level + 3]\n for (i = 0; i < n; ++i) {\n flatten3D(array[i], nx, ny, nz, out, ptr)\n ptr += stride\n }\n } else {\n for (i = 0; i < n; ++i) {\n flattenRec(array[i], shape, level + 1, out, ptr)\n ptr += stride\n }\n }\n}\n\nfunction flattenArray (array, shape, type, out_) {\n var sz = 1\n if (shape.length) {\n for (var i = 0; i < shape.length; ++i) {\n sz *= shape[i]\n }\n } else {\n sz = 0\n }\n var out = out_ || pool.allocType(type, sz)\n switch (shape.length) {\n case 0:\n break\n case 1:\n flatten1D(array, shape[0], out)\n break\n case 2:\n flatten2D(array, shape[0], shape[1], out)\n break\n case 3:\n flatten3D(array, shape[0], shape[1], shape[2], out, 0)\n break\n default:\n flattenRec(array, shape, 0, out, 0)\n }\n return out\n}\n\nfunction arrayShape$1 (array_) {\n var shape = []\n for (var array = array_; array.length; array = array[0]) {\n shape.push(array.length)\n }\n return shape\n}\n\nvar arrayTypes = {\n\t\"[object Int8Array]\": 5120,\n\t\"[object Int16Array]\": 5122,\n\t\"[object Int32Array]\": 5124,\n\t\"[object Uint8Array]\": 5121,\n\t\"[object Uint8ClampedArray]\": 5121,\n\t\"[object Uint16Array]\": 5123,\n\t\"[object Uint32Array]\": 5125,\n\t\"[object Float32Array]\": 5126,\n\t\"[object Float64Array]\": 5121,\n\t\"[object ArrayBuffer]\": 5121\n};\n\nvar int8 = 5120;\nvar int16 = 5122;\nvar int32 = 5124;\nvar uint8 = 5121;\nvar uint16 = 5123;\nvar uint32 = 5125;\nvar float = 5126;\nvar float32 = 5126;\nvar glTypes = {\n\tint8: int8,\n\tint16: int16,\n\tint32: int32,\n\tuint8: uint8,\n\tuint16: uint16,\n\tuint32: uint32,\n\tfloat: float,\n\tfloat32: float32\n};\n\nvar dynamic$1 = 35048;\nvar stream = 35040;\nvar usageTypes = {\n\tdynamic: dynamic$1,\n\tstream: stream,\n\t\"static\": 35044\n};\n\nvar arrayFlatten = flattenUtils.flatten\nvar arrayShape = flattenUtils.shape\n\nvar GL_STATIC_DRAW = 0x88E4\nvar GL_STREAM_DRAW = 0x88E0\n\nvar GL_UNSIGNED_BYTE$3 = 5121\nvar GL_FLOAT$3 = 5126\n\nvar DTYPES_SIZES = []\nDTYPES_SIZES[5120] = 1 // int8\nDTYPES_SIZES[5122] = 2 // int16\nDTYPES_SIZES[5124] = 4 // int32\nDTYPES_SIZES[5121] = 1 // uint8\nDTYPES_SIZES[5123] = 2 // uint16\nDTYPES_SIZES[5125] = 4 // uint32\nDTYPES_SIZES[5126] = 4 // float32\n\nfunction typedArrayCode (data) {\n return arrayTypes[Object.prototype.toString.call(data)] | 0\n}\n\nfunction copyArray (out, inp) {\n for (var i = 0; i < inp.length; ++i) {\n out[i] = inp[i]\n }\n}\n\nfunction transpose (\n result, data, shapeX, shapeY, strideX, strideY, offset) {\n var ptr = 0\n for (var i = 0; i < shapeX; ++i) {\n for (var j = 0; j < shapeY; ++j) {\n result[ptr++] = data[strideX * i + strideY * j + offset]\n }\n }\n}\n\nfunction wrapBufferState (gl, stats, config, destroyBuffer) {\n var bufferCount = 0\n var bufferSet = {}\n\n function REGLBuffer (type) {\n this.id = bufferCount++\n this.buffer = gl.createBuffer()\n this.type = type\n this.usage = GL_STATIC_DRAW\n this.byteLength = 0\n this.dimension = 1\n this.dtype = GL_UNSIGNED_BYTE$3\n\n this.persistentData = null\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n REGLBuffer.prototype.bind = function () {\n gl.bindBuffer(this.type, this.buffer)\n }\n\n REGLBuffer.prototype.destroy = function () {\n destroy(this)\n }\n\n var streamPool = []\n\n function createStream (type, data) {\n var buffer = streamPool.pop()\n if (!buffer) {\n buffer = new REGLBuffer(type)\n }\n buffer.bind()\n initBufferFromData(buffer, data, GL_STREAM_DRAW, 0, 1, false)\n return buffer\n }\n\n function destroyStream (stream$$1) {\n streamPool.push(stream$$1)\n }\n\n function initBufferFromTypedArray (buffer, data, usage) {\n buffer.byteLength = data.byteLength\n gl.bufferData(buffer.type, data, usage)\n }\n\n function initBufferFromData (buffer, data, usage, dtype, dimension, persist) {\n var shape\n buffer.usage = usage\n if (Array.isArray(data)) {\n buffer.dtype = dtype || GL_FLOAT$3\n if (data.length > 0) {\n var flatData\n if (Array.isArray(data[0])) {\n shape = arrayShape(data)\n var dim = 1\n for (var i = 1; i < shape.length; ++i) {\n dim *= shape[i]\n }\n buffer.dimension = dim\n flatData = arrayFlatten(data, shape, buffer.dtype)\n initBufferFromTypedArray(buffer, flatData, usage)\n if (persist) {\n buffer.persistentData = flatData\n } else {\n pool.freeType(flatData)\n }\n } else if (typeof data[0] === 'number') {\n buffer.dimension = dimension\n var typedData = pool.allocType(buffer.dtype, data.length)\n copyArray(typedData, data)\n initBufferFromTypedArray(buffer, typedData, usage)\n if (persist) {\n buffer.persistentData = typedData\n } else {\n pool.freeType(typedData)\n }\n } else if (isTypedArray(data[0])) {\n buffer.dimension = data[0].length\n buffer.dtype = dtype || typedArrayCode(data[0]) || GL_FLOAT$3\n flatData = arrayFlatten(\n data,\n [data.length, data[0].length],\n buffer.dtype)\n initBufferFromTypedArray(buffer, flatData, usage)\n if (persist) {\n buffer.persistentData = flatData\n } else {\n pool.freeType(flatData)\n }\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n } else if (isTypedArray(data)) {\n buffer.dtype = dtype || typedArrayCode(data)\n buffer.dimension = dimension\n initBufferFromTypedArray(buffer, data, usage)\n if (persist) {\n buffer.persistentData = new Uint8Array(new Uint8Array(data.buffer))\n }\n } else if (isNDArrayLike(data)) {\n shape = data.shape\n var stride = data.stride\n var offset = data.offset\n\n var shapeX = 0\n var shapeY = 0\n var strideX = 0\n var strideY = 0\n if (shape.length === 1) {\n shapeX = shape[0]\n shapeY = 1\n strideX = stride[0]\n strideY = 0\n } else if (shape.length === 2) {\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n } else {\n check$1.raise('invalid shape')\n }\n\n buffer.dtype = dtype || typedArrayCode(data.data) || GL_FLOAT$3\n buffer.dimension = shapeY\n\n var transposeData = pool.allocType(buffer.dtype, shapeX * shapeY)\n transpose(transposeData,\n data.data,\n shapeX, shapeY,\n strideX, strideY,\n offset)\n initBufferFromTypedArray(buffer, transposeData, usage)\n if (persist) {\n buffer.persistentData = transposeData\n } else {\n pool.freeType(transposeData)\n }\n } else if (data instanceof ArrayBuffer) {\n buffer.dtype = GL_UNSIGNED_BYTE$3\n buffer.dimension = dimension\n initBufferFromTypedArray(buffer, data, usage)\n if (persist) {\n buffer.persistentData = new Uint8Array(new Uint8Array(data))\n }\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n\n function destroy (buffer) {\n stats.bufferCount--\n\n // remove attribute link\n destroyBuffer(buffer)\n\n var handle = buffer.buffer\n check$1(handle, 'buffer must not be deleted already')\n gl.deleteBuffer(handle)\n buffer.buffer = null\n delete bufferSet[buffer.id]\n }\n\n function createBuffer (options, type, deferInit, persistent) {\n stats.bufferCount++\n\n var buffer = new REGLBuffer(type)\n bufferSet[buffer.id] = buffer\n\n function reglBuffer (options) {\n var usage = GL_STATIC_DRAW\n var data = null\n var byteLength = 0\n var dtype = 0\n var dimension = 1\n if (Array.isArray(options) ||\n isTypedArray(options) ||\n isNDArrayLike(options) ||\n options instanceof ArrayBuffer) {\n data = options\n } else if (typeof options === 'number') {\n byteLength = options | 0\n } else if (options) {\n check$1.type(\n options, 'object',\n 'buffer arguments must be an object, a number or an array')\n\n if ('data' in options) {\n check$1(\n data === null ||\n Array.isArray(data) ||\n isTypedArray(data) ||\n isNDArrayLike(data),\n 'invalid data for buffer')\n data = options.data\n }\n\n if ('usage' in options) {\n check$1.parameter(options.usage, usageTypes, 'invalid buffer usage')\n usage = usageTypes[options.usage]\n }\n\n if ('type' in options) {\n check$1.parameter(options.type, glTypes, 'invalid buffer type')\n dtype = glTypes[options.type]\n }\n\n if ('dimension' in options) {\n check$1.type(options.dimension, 'number', 'invalid dimension')\n dimension = options.dimension | 0\n }\n\n if ('length' in options) {\n check$1.nni(byteLength, 'buffer length must be a nonnegative integer')\n byteLength = options.length | 0\n }\n }\n\n buffer.bind()\n if (!data) {\n // #475\n if (byteLength) gl.bufferData(buffer.type, byteLength, usage)\n buffer.dtype = dtype || GL_UNSIGNED_BYTE$3\n buffer.usage = usage\n buffer.dimension = dimension\n buffer.byteLength = byteLength\n } else {\n initBufferFromData(buffer, data, usage, dtype, dimension, persistent)\n }\n\n if (config.profile) {\n buffer.stats.size = buffer.byteLength * DTYPES_SIZES[buffer.dtype]\n }\n\n return reglBuffer\n }\n\n function setSubData (data, offset) {\n check$1(offset + data.byteLength <= buffer.byteLength,\n 'invalid buffer subdata call, buffer is too small. ' + ' Can\\'t write data of size ' + data.byteLength + ' starting from offset ' + offset + ' to a buffer of size ' + buffer.byteLength)\n\n gl.bufferSubData(buffer.type, offset, data)\n }\n\n function subdata (data, offset_) {\n var offset = (offset_ || 0) | 0\n var shape\n buffer.bind()\n if (isTypedArray(data) || data instanceof ArrayBuffer) {\n setSubData(data, offset)\n } else if (Array.isArray(data)) {\n if (data.length > 0) {\n if (typeof data[0] === 'number') {\n var converted = pool.allocType(buffer.dtype, data.length)\n copyArray(converted, data)\n setSubData(converted, offset)\n pool.freeType(converted)\n } else if (Array.isArray(data[0]) || isTypedArray(data[0])) {\n shape = arrayShape(data)\n var flatData = arrayFlatten(data, shape, buffer.dtype)\n setSubData(flatData, offset)\n pool.freeType(flatData)\n } else {\n check$1.raise('invalid buffer data')\n }\n }\n } else if (isNDArrayLike(data)) {\n shape = data.shape\n var stride = data.stride\n\n var shapeX = 0\n var shapeY = 0\n var strideX = 0\n var strideY = 0\n if (shape.length === 1) {\n shapeX = shape[0]\n shapeY = 1\n strideX = stride[0]\n strideY = 0\n } else if (shape.length === 2) {\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n } else {\n check$1.raise('invalid shape')\n }\n var dtype = Array.isArray(data.data)\n ? buffer.dtype\n : typedArrayCode(data.data)\n\n var transposeData = pool.allocType(dtype, shapeX * shapeY)\n transpose(transposeData,\n data.data,\n shapeX, shapeY,\n strideX, strideY,\n data.offset)\n setSubData(transposeData, offset)\n pool.freeType(transposeData)\n } else {\n check$1.raise('invalid data for buffer subdata')\n }\n return reglBuffer\n }\n\n if (!deferInit) {\n reglBuffer(options)\n }\n\n reglBuffer._reglType = 'buffer'\n reglBuffer._buffer = buffer\n reglBuffer.subdata = subdata\n if (config.profile) {\n reglBuffer.stats = buffer.stats\n }\n reglBuffer.destroy = function () { destroy(buffer) }\n\n return reglBuffer\n }\n\n function restoreBuffers () {\n values(bufferSet).forEach(function (buffer) {\n buffer.buffer = gl.createBuffer()\n gl.bindBuffer(buffer.type, buffer.buffer)\n gl.bufferData(\n buffer.type, buffer.persistentData || buffer.byteLength, buffer.usage)\n })\n }\n\n if (config.profile) {\n stats.getTotalBufferSize = function () {\n var total = 0\n // TODO: Right now, the streams are not part of the total count.\n Object.keys(bufferSet).forEach(function (key) {\n total += bufferSet[key].stats.size\n })\n return total\n }\n }\n\n return {\n create: createBuffer,\n\n createStream: createStream,\n destroyStream: destroyStream,\n\n clear: function () {\n values(bufferSet).forEach(destroy)\n streamPool.forEach(destroy)\n },\n\n getBuffer: function (wrapper) {\n if (wrapper && wrapper._buffer instanceof REGLBuffer) {\n return wrapper._buffer\n }\n return null\n },\n\n restore: restoreBuffers,\n\n _initBuffer: initBufferFromData\n }\n}\n\nvar points = 0;\nvar point = 0;\nvar lines = 1;\nvar line = 1;\nvar triangles = 4;\nvar triangle = 4;\nvar primTypes = {\n\tpoints: points,\n\tpoint: point,\n\tlines: lines,\n\tline: line,\n\ttriangles: triangles,\n\ttriangle: triangle,\n\t\"line loop\": 2,\n\t\"line strip\": 3,\n\t\"triangle strip\": 5,\n\t\"triangle fan\": 6\n};\n\nvar GL_POINTS = 0\nvar GL_LINES = 1\nvar GL_TRIANGLES = 4\n\nvar GL_BYTE$2 = 5120\nvar GL_UNSIGNED_BYTE$4 = 5121\nvar GL_SHORT$2 = 5122\nvar GL_UNSIGNED_SHORT$2 = 5123\nvar GL_INT$2 = 5124\nvar GL_UNSIGNED_INT$2 = 5125\n\nvar GL_ELEMENT_ARRAY_BUFFER = 34963\n\nvar GL_STREAM_DRAW$1 = 0x88E0\nvar GL_STATIC_DRAW$1 = 0x88E4\n\nfunction wrapElementsState (gl, extensions, bufferState, stats) {\n var elementSet = {}\n var elementCount = 0\n\n var elementTypes = {\n 'uint8': GL_UNSIGNED_BYTE$4,\n 'uint16': GL_UNSIGNED_SHORT$2\n }\n\n if (extensions.oes_element_index_uint) {\n elementTypes.uint32 = GL_UNSIGNED_INT$2\n }\n\n function REGLElementBuffer (buffer) {\n this.id = elementCount++\n elementSet[this.id] = this\n this.buffer = buffer\n this.primType = GL_TRIANGLES\n this.vertCount = 0\n this.type = 0\n }\n\n REGLElementBuffer.prototype.bind = function () {\n this.buffer.bind()\n }\n\n var bufferPool = []\n\n function createElementStream (data) {\n var result = bufferPool.pop()\n if (!result) {\n result = new REGLElementBuffer(bufferState.create(\n null,\n GL_ELEMENT_ARRAY_BUFFER,\n true,\n false)._buffer)\n }\n initElements(result, data, GL_STREAM_DRAW$1, -1, -1, 0, 0)\n return result\n }\n\n function destroyElementStream (elements) {\n bufferPool.push(elements)\n }\n\n function initElements (\n elements,\n data,\n usage,\n prim,\n count,\n byteLength,\n type) {\n elements.buffer.bind()\n var dtype\n if (data) {\n var predictedType = type\n if (!type && (\n !isTypedArray(data) ||\n (isNDArrayLike(data) && !isTypedArray(data.data)))) {\n predictedType = extensions.oes_element_index_uint\n ? GL_UNSIGNED_INT$2\n : GL_UNSIGNED_SHORT$2\n }\n bufferState._initBuffer(\n elements.buffer,\n data,\n usage,\n predictedType,\n 3)\n } else {\n gl.bufferData(GL_ELEMENT_ARRAY_BUFFER, byteLength, usage)\n elements.buffer.dtype = dtype || GL_UNSIGNED_BYTE$4\n elements.buffer.usage = usage\n elements.buffer.dimension = 3\n elements.buffer.byteLength = byteLength\n }\n\n dtype = type\n if (!type) {\n switch (elements.buffer.dtype) {\n case GL_UNSIGNED_BYTE$4:\n case GL_BYTE$2:\n dtype = GL_UNSIGNED_BYTE$4\n break\n\n case GL_UNSIGNED_SHORT$2:\n case GL_SHORT$2:\n dtype = GL_UNSIGNED_SHORT$2\n break\n\n case GL_UNSIGNED_INT$2:\n case GL_INT$2:\n dtype = GL_UNSIGNED_INT$2\n break\n\n default:\n check$1.raise('unsupported type for element array')\n }\n elements.buffer.dtype = dtype\n }\n elements.type = dtype\n\n // Check oes_element_index_uint extension\n check$1(\n dtype !== GL_UNSIGNED_INT$2 ||\n !!extensions.oes_element_index_uint,\n '32 bit element buffers not supported, enable oes_element_index_uint first')\n\n // try to guess default primitive type and arguments\n var vertCount = count\n if (vertCount < 0) {\n vertCount = elements.buffer.byteLength\n if (dtype === GL_UNSIGNED_SHORT$2) {\n vertCount >>= 1\n } else if (dtype === GL_UNSIGNED_INT$2) {\n vertCount >>= 2\n }\n }\n elements.vertCount = vertCount\n\n // try to guess primitive type from cell dimension\n var primType = prim\n if (prim < 0) {\n primType = GL_TRIANGLES\n var dimension = elements.buffer.dimension\n if (dimension === 1) primType = GL_POINTS\n if (dimension === 2) primType = GL_LINES\n if (dimension === 3) primType = GL_TRIANGLES\n }\n elements.primType = primType\n }\n\n function destroyElements (elements) {\n stats.elementsCount--\n\n check$1(elements.buffer !== null, 'must not double destroy elements')\n delete elementSet[elements.id]\n elements.buffer.destroy()\n elements.buffer = null\n }\n\n function createElements (options, persistent) {\n var buffer = bufferState.create(null, GL_ELEMENT_ARRAY_BUFFER, true)\n var elements = new REGLElementBuffer(buffer._buffer)\n stats.elementsCount++\n\n function reglElements (options) {\n if (!options) {\n buffer()\n elements.primType = GL_TRIANGLES\n elements.vertCount = 0\n elements.type = GL_UNSIGNED_BYTE$4\n } else if (typeof options === 'number') {\n buffer(options)\n elements.primType = GL_TRIANGLES\n elements.vertCount = options | 0\n elements.type = GL_UNSIGNED_BYTE$4\n } else {\n var data = null\n var usage = GL_STATIC_DRAW$1\n var primType = -1\n var vertCount = -1\n var byteLength = 0\n var dtype = 0\n if (Array.isArray(options) ||\n isTypedArray(options) ||\n isNDArrayLike(options)) {\n data = options\n } else {\n check$1.type(options, 'object', 'invalid arguments for elements')\n if ('data' in options) {\n data = options.data\n check$1(\n Array.isArray(data) ||\n isTypedArray(data) ||\n isNDArrayLike(data),\n 'invalid data for element buffer')\n }\n if ('usage' in options) {\n check$1.parameter(\n options.usage,\n usageTypes,\n 'invalid element buffer usage')\n usage = usageTypes[options.usage]\n }\n if ('primitive' in options) {\n check$1.parameter(\n options.primitive,\n primTypes,\n 'invalid element buffer primitive')\n primType = primTypes[options.primitive]\n }\n if ('count' in options) {\n check$1(\n typeof options.count === 'number' && options.count >= 0,\n 'invalid vertex count for elements')\n vertCount = options.count | 0\n }\n if ('type' in options) {\n check$1.parameter(\n options.type,\n elementTypes,\n 'invalid buffer type')\n dtype = elementTypes[options.type]\n }\n if ('length' in options) {\n byteLength = options.length | 0\n } else {\n byteLength = vertCount\n if (dtype === GL_UNSIGNED_SHORT$2 || dtype === GL_SHORT$2) {\n byteLength *= 2\n } else if (dtype === GL_UNSIGNED_INT$2 || dtype === GL_INT$2) {\n byteLength *= 4\n }\n }\n }\n initElements(\n elements,\n data,\n usage,\n primType,\n vertCount,\n byteLength,\n dtype)\n }\n\n return reglElements\n }\n\n reglElements(options)\n\n reglElements._reglType = 'elements'\n reglElements._elements = elements\n reglElements.subdata = function (data, offset) {\n buffer.subdata(data, offset)\n return reglElements\n }\n reglElements.destroy = function () {\n destroyElements(elements)\n }\n\n return reglElements\n }\n\n return {\n create: createElements,\n createStream: createElementStream,\n destroyStream: destroyElementStream,\n getElements: function (elements) {\n if (typeof elements === 'function' &&\n elements._elements instanceof REGLElementBuffer) {\n return elements._elements\n }\n return null\n },\n clear: function () {\n values(elementSet).forEach(destroyElements)\n }\n }\n}\n\nvar FLOAT = new Float32Array(1)\nvar INT = new Uint32Array(FLOAT.buffer)\n\nvar GL_UNSIGNED_SHORT$4 = 5123\n\nfunction convertToHalfFloat (array) {\n var ushorts = pool.allocType(GL_UNSIGNED_SHORT$4, array.length)\n\n for (var i = 0; i < array.length; ++i) {\n if (isNaN(array[i])) {\n ushorts[i] = 0xffff\n } else if (array[i] === Infinity) {\n ushorts[i] = 0x7c00\n } else if (array[i] === -Infinity) {\n ushorts[i] = 0xfc00\n } else {\n FLOAT[0] = array[i]\n var x = INT[0]\n\n var sgn = (x >>> 31) << 15\n var exp = ((x << 1) >>> 24) - 127\n var frac = (x >> 13) & ((1 << 10) - 1)\n\n if (exp < -24) {\n // round non-representable denormals to 0\n ushorts[i] = sgn\n } else if (exp < -14) {\n // handle denormals\n var s = -14 - exp\n ushorts[i] = sgn + ((frac + (1 << 10)) >> s)\n } else if (exp > 15) {\n // round overflow to +/- Infinity\n ushorts[i] = sgn + 0x7c00\n } else {\n // otherwise convert directly\n ushorts[i] = sgn + ((exp + 15) << 10) + frac\n }\n }\n }\n\n return ushorts\n}\n\nfunction isArrayLike (s) {\n return Array.isArray(s) || isTypedArray(s)\n}\n\nvar isPow2$1 = function (v) {\n return !(v & (v - 1)) && (!!v)\n}\n\nvar GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3\n\nvar GL_TEXTURE_2D$1 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP$1 = 0x8513\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 = 0x8515\n\nvar GL_RGBA$1 = 0x1908\nvar GL_ALPHA = 0x1906\nvar GL_RGB = 0x1907\nvar GL_LUMINANCE = 0x1909\nvar GL_LUMINANCE_ALPHA = 0x190A\n\nvar GL_RGBA4 = 0x8056\nvar GL_RGB5_A1 = 0x8057\nvar GL_RGB565 = 0x8D62\n\nvar GL_UNSIGNED_SHORT_4_4_4_4$1 = 0x8033\nvar GL_UNSIGNED_SHORT_5_5_5_1$1 = 0x8034\nvar GL_UNSIGNED_SHORT_5_6_5$1 = 0x8363\nvar GL_UNSIGNED_INT_24_8_WEBGL$1 = 0x84FA\n\nvar GL_DEPTH_COMPONENT = 0x1902\nvar GL_DEPTH_STENCIL = 0x84F9\n\nvar GL_SRGB_EXT = 0x8C40\nvar GL_SRGB_ALPHA_EXT = 0x8C42\n\nvar GL_HALF_FLOAT_OES$1 = 0x8D61\n\nvar GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0\nvar GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1\nvar GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2\nvar GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3\n\nvar GL_COMPRESSED_RGB_ATC_WEBGL = 0x8C92\nvar GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93\nvar GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE\n\nvar GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00\nvar GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01\nvar GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02\nvar GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03\n\nvar GL_COMPRESSED_RGB_ETC1_WEBGL = 0x8D64\n\nvar GL_UNSIGNED_BYTE$5 = 0x1401\nvar GL_UNSIGNED_SHORT$3 = 0x1403\nvar GL_UNSIGNED_INT$3 = 0x1405\nvar GL_FLOAT$4 = 0x1406\n\nvar GL_TEXTURE_WRAP_S = 0x2802\nvar GL_TEXTURE_WRAP_T = 0x2803\n\nvar GL_REPEAT = 0x2901\nvar GL_CLAMP_TO_EDGE$1 = 0x812F\nvar GL_MIRRORED_REPEAT = 0x8370\n\nvar GL_TEXTURE_MAG_FILTER = 0x2800\nvar GL_TEXTURE_MIN_FILTER = 0x2801\n\nvar GL_NEAREST$1 = 0x2600\nvar GL_LINEAR = 0x2601\nvar GL_NEAREST_MIPMAP_NEAREST$1 = 0x2700\nvar GL_LINEAR_MIPMAP_NEAREST$1 = 0x2701\nvar GL_NEAREST_MIPMAP_LINEAR$1 = 0x2702\nvar GL_LINEAR_MIPMAP_LINEAR$1 = 0x2703\n\nvar GL_GENERATE_MIPMAP_HINT = 0x8192\nvar GL_DONT_CARE = 0x1100\nvar GL_FASTEST = 0x1101\nvar GL_NICEST = 0x1102\n\nvar GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE\n\nvar GL_UNPACK_ALIGNMENT = 0x0CF5\nvar GL_UNPACK_FLIP_Y_WEBGL = 0x9240\nvar GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241\nvar GL_UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243\n\nvar GL_BROWSER_DEFAULT_WEBGL = 0x9244\n\nvar GL_TEXTURE0$1 = 0x84C0\n\nvar MIPMAP_FILTERS = [\n GL_NEAREST_MIPMAP_NEAREST$1,\n GL_NEAREST_MIPMAP_LINEAR$1,\n GL_LINEAR_MIPMAP_NEAREST$1,\n GL_LINEAR_MIPMAP_LINEAR$1\n]\n\nvar CHANNELS_FORMAT = [\n 0,\n GL_LUMINANCE,\n GL_LUMINANCE_ALPHA,\n GL_RGB,\n GL_RGBA$1\n]\n\nvar FORMAT_CHANNELS = {}\nFORMAT_CHANNELS[GL_LUMINANCE] =\nFORMAT_CHANNELS[GL_ALPHA] =\nFORMAT_CHANNELS[GL_DEPTH_COMPONENT] = 1\nFORMAT_CHANNELS[GL_DEPTH_STENCIL] =\nFORMAT_CHANNELS[GL_LUMINANCE_ALPHA] = 2\nFORMAT_CHANNELS[GL_RGB] =\nFORMAT_CHANNELS[GL_SRGB_EXT] = 3\nFORMAT_CHANNELS[GL_RGBA$1] =\nFORMAT_CHANNELS[GL_SRGB_ALPHA_EXT] = 4\n\nfunction objectName (str) {\n return '[object ' + str + ']'\n}\n\nvar CANVAS_CLASS = objectName('HTMLCanvasElement')\nvar OFFSCREENCANVAS_CLASS = objectName('OffscreenCanvas')\nvar CONTEXT2D_CLASS = objectName('CanvasRenderingContext2D')\nvar BITMAP_CLASS = objectName('ImageBitmap')\nvar IMAGE_CLASS = objectName('HTMLImageElement')\nvar VIDEO_CLASS = objectName('HTMLVideoElement')\n\nvar PIXEL_CLASSES = Object.keys(arrayTypes).concat([\n CANVAS_CLASS,\n OFFSCREENCANVAS_CLASS,\n CONTEXT2D_CLASS,\n BITMAP_CLASS,\n IMAGE_CLASS,\n VIDEO_CLASS\n])\n\n// for every texture type, store\n// the size in bytes.\nvar TYPE_SIZES = []\nTYPE_SIZES[GL_UNSIGNED_BYTE$5] = 1\nTYPE_SIZES[GL_FLOAT$4] = 4\nTYPE_SIZES[GL_HALF_FLOAT_OES$1] = 2\n\nTYPE_SIZES[GL_UNSIGNED_SHORT$3] = 2\nTYPE_SIZES[GL_UNSIGNED_INT$3] = 4\n\nvar FORMAT_SIZES_SPECIAL = []\nFORMAT_SIZES_SPECIAL[GL_RGBA4] = 2\nFORMAT_SIZES_SPECIAL[GL_RGB5_A1] = 2\nFORMAT_SIZES_SPECIAL[GL_RGB565] = 2\nFORMAT_SIZES_SPECIAL[GL_DEPTH_STENCIL] = 4\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_S3TC_DXT1_EXT] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT1_EXT] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT3_EXT] = 1\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_S3TC_DXT5_EXT] = 1\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_ATC_WEBGL] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL] = 1\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL] = 1\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG] = 0.25\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG] = 0.5\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG] = 0.25\n\nFORMAT_SIZES_SPECIAL[GL_COMPRESSED_RGB_ETC1_WEBGL] = 0.5\n\nfunction isNumericArray (arr) {\n return (\n Array.isArray(arr) &&\n (arr.length === 0 ||\n typeof arr[0] === 'number'))\n}\n\nfunction isRectArray (arr) {\n if (!Array.isArray(arr)) {\n return false\n }\n var width = arr.length\n if (width === 0 || !isArrayLike(arr[0])) {\n return false\n }\n return true\n}\n\nfunction classString (x) {\n return Object.prototype.toString.call(x)\n}\n\nfunction isCanvasElement (object) {\n return classString(object) === CANVAS_CLASS\n}\n\nfunction isOffscreenCanvas (object) {\n return classString(object) === OFFSCREENCANVAS_CLASS\n}\n\nfunction isContext2D (object) {\n return classString(object) === CONTEXT2D_CLASS\n}\n\nfunction isBitmap (object) {\n return classString(object) === BITMAP_CLASS\n}\n\nfunction isImageElement (object) {\n return classString(object) === IMAGE_CLASS\n}\n\nfunction isVideoElement (object) {\n return classString(object) === VIDEO_CLASS\n}\n\nfunction isPixelData (object) {\n if (!object) {\n return false\n }\n var className = classString(object)\n if (PIXEL_CLASSES.indexOf(className) >= 0) {\n return true\n }\n return (\n isNumericArray(object) ||\n isRectArray(object) ||\n isNDArrayLike(object))\n}\n\nfunction typedArrayCode$1 (data) {\n return arrayTypes[Object.prototype.toString.call(data)] | 0\n}\n\nfunction convertData (result, data) {\n var n = data.length\n switch (result.type) {\n case GL_UNSIGNED_BYTE$5:\n case GL_UNSIGNED_SHORT$3:\n case GL_UNSIGNED_INT$3:\n case GL_FLOAT$4:\n var converted = pool.allocType(result.type, n)\n converted.set(data)\n result.data = converted\n break\n\n case GL_HALF_FLOAT_OES$1:\n result.data = convertToHalfFloat(data)\n break\n\n default:\n check$1.raise('unsupported texture type, must specify a typed array')\n }\n}\n\nfunction preConvert (image, n) {\n return pool.allocType(\n image.type === GL_HALF_FLOAT_OES$1\n ? GL_FLOAT$4\n : image.type, n)\n}\n\nfunction postConvert (image, data) {\n if (image.type === GL_HALF_FLOAT_OES$1) {\n image.data = convertToHalfFloat(data)\n pool.freeType(data)\n } else {\n image.data = data\n }\n}\n\nfunction transposeData (image, array, strideX, strideY, strideC, offset) {\n var w = image.width\n var h = image.height\n var c = image.channels\n var n = w * h * c\n var data = preConvert(image, n)\n\n var p = 0\n for (var i = 0; i < h; ++i) {\n for (var j = 0; j < w; ++j) {\n for (var k = 0; k < c; ++k) {\n data[p++] = array[strideX * j + strideY * i + strideC * k + offset]\n }\n }\n }\n\n postConvert(image, data)\n}\n\nfunction getTextureSize (format, type, width, height, isMipmap, isCube) {\n var s\n if (typeof FORMAT_SIZES_SPECIAL[format] !== 'undefined') {\n // we have a special array for dealing with weird color formats such as RGB5A1\n s = FORMAT_SIZES_SPECIAL[format]\n } else {\n s = FORMAT_CHANNELS[format] * TYPE_SIZES[type]\n }\n\n if (isCube) {\n s *= 6\n }\n\n if (isMipmap) {\n // compute the total size of all the mipmaps.\n var total = 0\n\n var w = width\n while (w >= 1) {\n // we can only use mipmaps on a square image,\n // so we can simply use the width and ignore the height:\n total += s * w * w\n w /= 2\n }\n return total\n } else {\n return s * width * height\n }\n}\n\nfunction createTextureSet (\n gl, extensions, limits, reglPoll, contextState, stats, config) {\n // -------------------------------------------------------\n // Initialize constants and parameter tables here\n // -------------------------------------------------------\n var mipmapHint = {\n \"don't care\": GL_DONT_CARE,\n 'dont care': GL_DONT_CARE,\n 'nice': GL_NICEST,\n 'fast': GL_FASTEST\n }\n\n var wrapModes = {\n 'repeat': GL_REPEAT,\n 'clamp': GL_CLAMP_TO_EDGE$1,\n 'mirror': GL_MIRRORED_REPEAT\n }\n\n var magFilters = {\n 'nearest': GL_NEAREST$1,\n 'linear': GL_LINEAR\n }\n\n var minFilters = extend({\n 'mipmap': GL_LINEAR_MIPMAP_LINEAR$1,\n 'nearest mipmap nearest': GL_NEAREST_MIPMAP_NEAREST$1,\n 'linear mipmap nearest': GL_LINEAR_MIPMAP_NEAREST$1,\n 'nearest mipmap linear': GL_NEAREST_MIPMAP_LINEAR$1,\n 'linear mipmap linear': GL_LINEAR_MIPMAP_LINEAR$1\n }, magFilters)\n\n var colorSpace = {\n 'none': 0,\n 'browser': GL_BROWSER_DEFAULT_WEBGL\n }\n\n var textureTypes = {\n 'uint8': GL_UNSIGNED_BYTE$5,\n 'rgba4': GL_UNSIGNED_SHORT_4_4_4_4$1,\n 'rgb565': GL_UNSIGNED_SHORT_5_6_5$1,\n 'rgb5 a1': GL_UNSIGNED_SHORT_5_5_5_1$1\n }\n\n var textureFormats = {\n 'alpha': GL_ALPHA,\n 'luminance': GL_LUMINANCE,\n 'luminance alpha': GL_LUMINANCE_ALPHA,\n 'rgb': GL_RGB,\n 'rgba': GL_RGBA$1,\n 'rgba4': GL_RGBA4,\n 'rgb5 a1': GL_RGB5_A1,\n 'rgb565': GL_RGB565\n }\n\n var compressedTextureFormats = {}\n\n if (extensions.ext_srgb) {\n textureFormats.srgb = GL_SRGB_EXT\n textureFormats.srgba = GL_SRGB_ALPHA_EXT\n }\n\n if (extensions.oes_texture_float) {\n textureTypes.float32 = textureTypes.float = GL_FLOAT$4\n }\n\n if (extensions.oes_texture_half_float) {\n textureTypes['float16'] = textureTypes['half float'] = GL_HALF_FLOAT_OES$1\n }\n\n if (extensions.webgl_depth_texture) {\n extend(textureFormats, {\n 'depth': GL_DEPTH_COMPONENT,\n 'depth stencil': GL_DEPTH_STENCIL\n })\n\n extend(textureTypes, {\n 'uint16': GL_UNSIGNED_SHORT$3,\n 'uint32': GL_UNSIGNED_INT$3,\n 'depth stencil': GL_UNSIGNED_INT_24_8_WEBGL$1\n })\n }\n\n if (extensions.webgl_compressed_texture_s3tc) {\n extend(compressedTextureFormats, {\n 'rgb s3tc dxt1': GL_COMPRESSED_RGB_S3TC_DXT1_EXT,\n 'rgba s3tc dxt1': GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,\n 'rgba s3tc dxt3': GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,\n 'rgba s3tc dxt5': GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\n })\n }\n\n if (extensions.webgl_compressed_texture_atc) {\n extend(compressedTextureFormats, {\n 'rgb atc': GL_COMPRESSED_RGB_ATC_WEBGL,\n 'rgba atc explicit alpha': GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,\n 'rgba atc interpolated alpha': GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL\n })\n }\n\n if (extensions.webgl_compressed_texture_pvrtc) {\n extend(compressedTextureFormats, {\n 'rgb pvrtc 4bppv1': GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,\n 'rgb pvrtc 2bppv1': GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,\n 'rgba pvrtc 4bppv1': GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,\n 'rgba pvrtc 2bppv1': GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG\n })\n }\n\n if (extensions.webgl_compressed_texture_etc1) {\n compressedTextureFormats['rgb etc1'] = GL_COMPRESSED_RGB_ETC1_WEBGL\n }\n\n // Copy over all texture formats\n var supportedCompressedFormats = Array.prototype.slice.call(\n gl.getParameter(GL_COMPRESSED_TEXTURE_FORMATS))\n Object.keys(compressedTextureFormats).forEach(function (name) {\n var format = compressedTextureFormats[name]\n if (supportedCompressedFormats.indexOf(format) >= 0) {\n textureFormats[name] = format\n }\n })\n\n var supportedFormats = Object.keys(textureFormats)\n limits.textureFormats = supportedFormats\n\n // associate with every format string its\n // corresponding GL-value.\n var textureFormatsInvert = []\n Object.keys(textureFormats).forEach(function (key) {\n var val = textureFormats[key]\n textureFormatsInvert[val] = key\n })\n\n // associate with every type string its\n // corresponding GL-value.\n var textureTypesInvert = []\n Object.keys(textureTypes).forEach(function (key) {\n var val = textureTypes[key]\n textureTypesInvert[val] = key\n })\n\n var magFiltersInvert = []\n Object.keys(magFilters).forEach(function (key) {\n var val = magFilters[key]\n magFiltersInvert[val] = key\n })\n\n var minFiltersInvert = []\n Object.keys(minFilters).forEach(function (key) {\n var val = minFilters[key]\n minFiltersInvert[val] = key\n })\n\n var wrapModesInvert = []\n Object.keys(wrapModes).forEach(function (key) {\n var val = wrapModes[key]\n wrapModesInvert[val] = key\n })\n\n // colorFormats[] gives the format (channels) associated to an\n // internalformat\n var colorFormats = supportedFormats.reduce(function (color, key) {\n var glenum = textureFormats[key]\n if (glenum === GL_LUMINANCE ||\n glenum === GL_ALPHA ||\n glenum === GL_LUMINANCE ||\n glenum === GL_LUMINANCE_ALPHA ||\n glenum === GL_DEPTH_COMPONENT ||\n glenum === GL_DEPTH_STENCIL ||\n (extensions.ext_srgb &&\n (glenum === GL_SRGB_EXT ||\n glenum === GL_SRGB_ALPHA_EXT))) {\n color[glenum] = glenum\n } else if (glenum === GL_RGB5_A1 || key.indexOf('rgba') >= 0) {\n color[glenum] = GL_RGBA$1\n } else {\n color[glenum] = GL_RGB\n }\n return color\n }, {})\n\n function TexFlags () {\n // format info\n this.internalformat = GL_RGBA$1\n this.format = GL_RGBA$1\n this.type = GL_UNSIGNED_BYTE$5\n this.compressed = false\n\n // pixel storage\n this.premultiplyAlpha = false\n this.flipY = false\n this.unpackAlignment = 1\n this.colorSpace = GL_BROWSER_DEFAULT_WEBGL\n\n // shape info\n this.width = 0\n this.height = 0\n this.channels = 0\n }\n\n function copyFlags (result, other) {\n result.internalformat = other.internalformat\n result.format = other.format\n result.type = other.type\n result.compressed = other.compressed\n\n result.premultiplyAlpha = other.premultiplyAlpha\n result.flipY = other.flipY\n result.unpackAlignment = other.unpackAlignment\n result.colorSpace = other.colorSpace\n\n result.width = other.width\n result.height = other.height\n result.channels = other.channels\n }\n\n function parseFlags (flags, options) {\n if (typeof options !== 'object' || !options) {\n return\n }\n\n if ('premultiplyAlpha' in options) {\n check$1.type(options.premultiplyAlpha, 'boolean',\n 'invalid premultiplyAlpha')\n flags.premultiplyAlpha = options.premultiplyAlpha\n }\n\n if ('flipY' in options) {\n check$1.type(options.flipY, 'boolean',\n 'invalid texture flip')\n flags.flipY = options.flipY\n }\n\n if ('alignment' in options) {\n check$1.oneOf(options.alignment, [1, 2, 4, 8],\n 'invalid texture unpack alignment')\n flags.unpackAlignment = options.alignment\n }\n\n if ('colorSpace' in options) {\n check$1.parameter(options.colorSpace, colorSpace,\n 'invalid colorSpace')\n flags.colorSpace = colorSpace[options.colorSpace]\n }\n\n if ('type' in options) {\n var type = options.type\n check$1(extensions.oes_texture_float ||\n !(type === 'float' || type === 'float32'),\n 'you must enable the OES_texture_float extension in order to use floating point textures.')\n check$1(extensions.oes_texture_half_float ||\n !(type === 'half float' || type === 'float16'),\n 'you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures.')\n check$1(extensions.webgl_depth_texture ||\n !(type === 'uint16' || type === 'uint32' || type === 'depth stencil'),\n 'you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures.')\n check$1.parameter(type, textureTypes,\n 'invalid texture type')\n flags.type = textureTypes[type]\n }\n\n var w = flags.width\n var h = flags.height\n var c = flags.channels\n var hasChannels = false\n if ('shape' in options) {\n check$1(Array.isArray(options.shape) && options.shape.length >= 2,\n 'shape must be an array')\n w = options.shape[0]\n h = options.shape[1]\n if (options.shape.length === 3) {\n c = options.shape[2]\n check$1(c > 0 && c <= 4, 'invalid number of channels')\n hasChannels = true\n }\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid width')\n check$1(h >= 0 && h <= limits.maxTextureSize, 'invalid height')\n } else {\n if ('radius' in options) {\n w = h = options.radius\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid radius')\n }\n if ('width' in options) {\n w = options.width\n check$1(w >= 0 && w <= limits.maxTextureSize, 'invalid width')\n }\n if ('height' in options) {\n h = options.height\n check$1(h >= 0 && h <= limits.maxTextureSize, 'invalid height')\n }\n if ('channels' in options) {\n c = options.channels\n check$1(c > 0 && c <= 4, 'invalid number of channels')\n hasChannels = true\n }\n }\n flags.width = w | 0\n flags.height = h | 0\n flags.channels = c | 0\n\n var hasFormat = false\n if ('format' in options) {\n var formatStr = options.format\n check$1(extensions.webgl_depth_texture ||\n !(formatStr === 'depth' || formatStr === 'depth stencil'),\n 'you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures.')\n check$1.parameter(formatStr, textureFormats,\n 'invalid texture format')\n var internalformat = flags.internalformat = textureFormats[formatStr]\n flags.format = colorFormats[internalformat]\n if (formatStr in textureTypes) {\n if (!('type' in options)) {\n flags.type = textureTypes[formatStr]\n }\n }\n if (formatStr in compressedTextureFormats) {\n flags.compressed = true\n }\n hasFormat = true\n }\n\n // Reconcile channels and format\n if (!hasChannels && hasFormat) {\n flags.channels = FORMAT_CHANNELS[flags.format]\n } else if (hasChannels && !hasFormat) {\n if (flags.channels !== CHANNELS_FORMAT[flags.format]) {\n flags.format = flags.internalformat = CHANNELS_FORMAT[flags.channels]\n }\n } else if (hasFormat && hasChannels) {\n check$1(\n flags.channels === FORMAT_CHANNELS[flags.format],\n 'number of channels inconsistent with specified format')\n }\n }\n\n function setFlags (flags) {\n gl.pixelStorei(GL_UNPACK_FLIP_Y_WEBGL, flags.flipY)\n gl.pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL, flags.premultiplyAlpha)\n gl.pixelStorei(GL_UNPACK_COLORSPACE_CONVERSION_WEBGL, flags.colorSpace)\n gl.pixelStorei(GL_UNPACK_ALIGNMENT, flags.unpackAlignment)\n }\n\n // -------------------------------------------------------\n // Tex image data\n // -------------------------------------------------------\n function TexImage () {\n TexFlags.call(this)\n\n this.xOffset = 0\n this.yOffset = 0\n\n // data\n this.data = null\n this.needsFree = false\n\n // html element\n this.element = null\n\n // copyTexImage info\n this.needsCopy = false\n }\n\n function parseImage (image, options) {\n var data = null\n if (isPixelData(options)) {\n data = options\n } else if (options) {\n check$1.type(options, 'object', 'invalid pixel data type')\n parseFlags(image, options)\n if ('x' in options) {\n image.xOffset = options.x | 0\n }\n if ('y' in options) {\n image.yOffset = options.y | 0\n }\n if (isPixelData(options.data)) {\n data = options.data\n }\n }\n\n check$1(\n !image.compressed ||\n data instanceof Uint8Array,\n 'compressed texture data must be stored in a uint8array')\n\n if (options.copy) {\n check$1(!data, 'can not specify copy and data field for the same texture')\n var viewW = contextState.viewportWidth\n var viewH = contextState.viewportHeight\n image.width = image.width || (viewW - image.xOffset)\n image.height = image.height || (viewH - image.yOffset)\n image.needsCopy = true\n check$1(image.xOffset >= 0 && image.xOffset < viewW &&\n image.yOffset >= 0 && image.yOffset < viewH &&\n image.width > 0 && image.width <= viewW &&\n image.height > 0 && image.height <= viewH,\n 'copy texture read out of bounds')\n } else if (!data) {\n image.width = image.width || 1\n image.height = image.height || 1\n image.channels = image.channels || 4\n } else if (isTypedArray(data)) {\n image.channels = image.channels || 4\n image.data = data\n if (!('type' in options) && image.type === GL_UNSIGNED_BYTE$5) {\n image.type = typedArrayCode$1(data)\n }\n } else if (isNumericArray(data)) {\n image.channels = image.channels || 4\n convertData(image, data)\n image.alignment = 1\n image.needsFree = true\n } else if (isNDArrayLike(data)) {\n var array = data.data\n if (!Array.isArray(array) && image.type === GL_UNSIGNED_BYTE$5) {\n image.type = typedArrayCode$1(array)\n }\n var shape = data.shape\n var stride = data.stride\n var shapeX, shapeY, shapeC, strideX, strideY, strideC\n if (shape.length === 3) {\n shapeC = shape[2]\n strideC = stride[2]\n } else {\n check$1(shape.length === 2, 'invalid ndarray pixel data, must be 2 or 3D')\n shapeC = 1\n strideC = 1\n }\n shapeX = shape[0]\n shapeY = shape[1]\n strideX = stride[0]\n strideY = stride[1]\n image.alignment = 1\n image.width = shapeX\n image.height = shapeY\n image.channels = shapeC\n image.format = image.internalformat = CHANNELS_FORMAT[shapeC]\n image.needsFree = true\n transposeData(image, array, strideX, strideY, strideC, data.offset)\n } else if (isCanvasElement(data) || isOffscreenCanvas(data) || isContext2D(data)) {\n if (isCanvasElement(data) || isOffscreenCanvas(data)) {\n image.element = data\n } else {\n image.element = data.canvas\n }\n image.width = image.element.width\n image.height = image.element.height\n image.channels = 4\n } else if (isBitmap(data)) {\n image.element = data\n image.width = data.width\n image.height = data.height\n image.channels = 4\n } else if (isImageElement(data)) {\n image.element = data\n image.width = data.naturalWidth\n image.height = data.naturalHeight\n image.channels = 4\n } else if (isVideoElement(data)) {\n image.element = data\n image.width = data.videoWidth\n image.height = data.videoHeight\n image.channels = 4\n } else if (isRectArray(data)) {\n var w = image.width || data[0].length\n var h = image.height || data.length\n var c = image.channels\n if (isArrayLike(data[0][0])) {\n c = c || data[0][0].length\n } else {\n c = c || 1\n }\n var arrayShape = flattenUtils.shape(data)\n var n = 1\n for (var dd = 0; dd < arrayShape.length; ++dd) {\n n *= arrayShape[dd]\n }\n var allocData = preConvert(image, n)\n flattenUtils.flatten(data, arrayShape, '', allocData)\n postConvert(image, allocData)\n image.alignment = 1\n image.width = w\n image.height = h\n image.channels = c\n image.format = image.internalformat = CHANNELS_FORMAT[c]\n image.needsFree = true\n }\n\n if (image.type === GL_FLOAT$4) {\n check$1(limits.extensions.indexOf('oes_texture_float') >= 0,\n 'oes_texture_float extension not enabled')\n } else if (image.type === GL_HALF_FLOAT_OES$1) {\n check$1(limits.extensions.indexOf('oes_texture_half_float') >= 0,\n 'oes_texture_half_float extension not enabled')\n }\n\n // do compressed texture validation here.\n }\n\n function setImage (info, target, miplevel) {\n var element = info.element\n var data = info.data\n var internalformat = info.internalformat\n var format = info.format\n var type = info.type\n var width = info.width\n var height = info.height\n\n setFlags(info)\n\n if (element) {\n gl.texImage2D(target, miplevel, format, format, type, element)\n } else if (info.compressed) {\n gl.compressedTexImage2D(target, miplevel, internalformat, width, height, 0, data)\n } else if (info.needsCopy) {\n reglPoll()\n gl.copyTexImage2D(\n target, miplevel, format, info.xOffset, info.yOffset, width, height, 0)\n } else {\n gl.texImage2D(target, miplevel, format, width, height, 0, format, type, data || null)\n }\n }\n\n function setSubImage (info, target, x, y, miplevel) {\n var element = info.element\n var data = info.data\n var internalformat = info.internalformat\n var format = info.format\n var type = info.type\n var width = info.width\n var height = info.height\n\n setFlags(info)\n\n if (element) {\n gl.texSubImage2D(\n target, miplevel, x, y, format, type, element)\n } else if (info.compressed) {\n gl.compressedTexSubImage2D(\n target, miplevel, x, y, internalformat, width, height, data)\n } else if (info.needsCopy) {\n reglPoll()\n gl.copyTexSubImage2D(\n target, miplevel, x, y, info.xOffset, info.yOffset, width, height)\n } else {\n gl.texSubImage2D(\n target, miplevel, x, y, width, height, format, type, data)\n }\n }\n\n // texImage pool\n var imagePool = []\n\n function allocImage () {\n return imagePool.pop() || new TexImage()\n }\n\n function freeImage (image) {\n if (image.needsFree) {\n pool.freeType(image.data)\n }\n TexImage.call(image)\n imagePool.push(image)\n }\n\n // -------------------------------------------------------\n // Mip map\n // -------------------------------------------------------\n function MipMap () {\n TexFlags.call(this)\n\n this.genMipmaps = false\n this.mipmapHint = GL_DONT_CARE\n this.mipmask = 0\n this.images = Array(16)\n }\n\n function parseMipMapFromShape (mipmap, width, height) {\n var img = mipmap.images[0] = allocImage()\n mipmap.mipmask = 1\n img.width = mipmap.width = width\n img.height = mipmap.height = height\n img.channels = mipmap.channels = 4\n }\n\n function parseMipMapFromObject (mipmap, options) {\n var imgData = null\n if (isPixelData(options)) {\n imgData = mipmap.images[0] = allocImage()\n copyFlags(imgData, mipmap)\n parseImage(imgData, options)\n mipmap.mipmask = 1\n } else {\n parseFlags(mipmap, options)\n if (Array.isArray(options.mipmap)) {\n var mipData = options.mipmap\n for (var i = 0; i < mipData.length; ++i) {\n imgData = mipmap.images[i] = allocImage()\n copyFlags(imgData, mipmap)\n imgData.width >>= i\n imgData.height >>= i\n parseImage(imgData, mipData[i])\n mipmap.mipmask |= (1 << i)\n }\n } else {\n imgData = mipmap.images[0] = allocImage()\n copyFlags(imgData, mipmap)\n parseImage(imgData, options)\n mipmap.mipmask = 1\n }\n }\n copyFlags(mipmap, mipmap.images[0])\n\n // For textures of the compressed format WEBGL_compressed_texture_s3tc\n // we must have that\n //\n // \"When level equals zero width and height must be a multiple of 4.\n // When level is greater than 0 width and height must be 0, 1, 2 or a multiple of 4. \"\n //\n // but we do not yet support having multiple mipmap levels for compressed textures,\n // so we only test for level zero.\n\n if (\n mipmap.compressed &&\n (\n mipmap.internalformat === GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||\n mipmap.internalformat === GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\n )\n ) {\n check$1(mipmap.width % 4 === 0 && mipmap.height % 4 === 0,\n 'for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4')\n }\n }\n\n function setMipMap (mipmap, target) {\n var images = mipmap.images\n for (var i = 0; i < images.length; ++i) {\n if (!images[i]) {\n return\n }\n setImage(images[i], target, i)\n }\n }\n\n var mipPool = []\n\n function allocMipMap () {\n var result = mipPool.pop() || new MipMap()\n TexFlags.call(result)\n result.mipmask = 0\n for (var i = 0; i < 16; ++i) {\n result.images[i] = null\n }\n return result\n }\n\n function freeMipMap (mipmap) {\n var images = mipmap.images\n for (var i = 0; i < images.length; ++i) {\n if (images[i]) {\n freeImage(images[i])\n }\n images[i] = null\n }\n mipPool.push(mipmap)\n }\n\n // -------------------------------------------------------\n // Tex info\n // -------------------------------------------------------\n function TexInfo () {\n this.minFilter = GL_NEAREST$1\n this.magFilter = GL_NEAREST$1\n\n this.wrapS = GL_CLAMP_TO_EDGE$1\n this.wrapT = GL_CLAMP_TO_EDGE$1\n\n this.anisotropic = 1\n\n this.genMipmaps = false\n this.mipmapHint = GL_DONT_CARE\n }\n\n function parseTexInfo (info, options) {\n if ('min' in options) {\n var minFilter = options.min\n check$1.parameter(minFilter, minFilters)\n info.minFilter = minFilters[minFilter]\n if (MIPMAP_FILTERS.indexOf(info.minFilter) >= 0 && !('faces' in options)) {\n info.genMipmaps = true\n }\n }\n\n if ('mag' in options) {\n var magFilter = options.mag\n check$1.parameter(magFilter, magFilters)\n info.magFilter = magFilters[magFilter]\n }\n\n var wrapS = info.wrapS\n var wrapT = info.wrapT\n if ('wrap' in options) {\n var wrap = options.wrap\n if (typeof wrap === 'string') {\n check$1.parameter(wrap, wrapModes)\n wrapS = wrapT = wrapModes[wrap]\n } else if (Array.isArray(wrap)) {\n check$1.parameter(wrap[0], wrapModes)\n check$1.parameter(wrap[1], wrapModes)\n wrapS = wrapModes[wrap[0]]\n wrapT = wrapModes[wrap[1]]\n }\n } else {\n if ('wrapS' in options) {\n var optWrapS = options.wrapS\n check$1.parameter(optWrapS, wrapModes)\n wrapS = wrapModes[optWrapS]\n }\n if ('wrapT' in options) {\n var optWrapT = options.wrapT\n check$1.parameter(optWrapT, wrapModes)\n wrapT = wrapModes[optWrapT]\n }\n }\n info.wrapS = wrapS\n info.wrapT = wrapT\n\n if ('anisotropic' in options) {\n var anisotropic = options.anisotropic\n check$1(typeof anisotropic === 'number' &&\n anisotropic >= 1 && anisotropic <= limits.maxAnisotropic,\n 'aniso samples must be between 1 and ')\n info.anisotropic = options.anisotropic\n }\n\n if ('mipmap' in options) {\n var hasMipMap = false\n switch (typeof options.mipmap) {\n case 'string':\n check$1.parameter(options.mipmap, mipmapHint,\n 'invalid mipmap hint')\n info.mipmapHint = mipmapHint[options.mipmap]\n info.genMipmaps = true\n hasMipMap = true\n break\n\n case 'boolean':\n hasMipMap = info.genMipmaps = options.mipmap\n break\n\n case 'object':\n check$1(Array.isArray(options.mipmap), 'invalid mipmap type')\n info.genMipmaps = false\n hasMipMap = true\n break\n\n default:\n check$1.raise('invalid mipmap type')\n }\n if (hasMipMap && !('min' in options)) {\n info.minFilter = GL_NEAREST_MIPMAP_NEAREST$1\n }\n }\n }\n\n function setTexInfo (info, target) {\n gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, info.minFilter)\n gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, info.magFilter)\n gl.texParameteri(target, GL_TEXTURE_WRAP_S, info.wrapS)\n gl.texParameteri(target, GL_TEXTURE_WRAP_T, info.wrapT)\n if (extensions.ext_texture_filter_anisotropic) {\n gl.texParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, info.anisotropic)\n }\n if (info.genMipmaps) {\n gl.hint(GL_GENERATE_MIPMAP_HINT, info.mipmapHint)\n gl.generateMipmap(target)\n }\n }\n\n // -------------------------------------------------------\n // Full texture object\n // -------------------------------------------------------\n var textureCount = 0\n var textureSet = {}\n var numTexUnits = limits.maxTextureUnits\n var textureUnits = Array(numTexUnits).map(function () {\n return null\n })\n\n function REGLTexture (target) {\n TexFlags.call(this)\n this.mipmask = 0\n this.internalformat = GL_RGBA$1\n\n this.id = textureCount++\n\n this.refCount = 1\n\n this.target = target\n this.texture = gl.createTexture()\n\n this.unit = -1\n this.bindCount = 0\n\n this.texInfo = new TexInfo()\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n function tempBind (texture) {\n gl.activeTexture(GL_TEXTURE0$1)\n gl.bindTexture(texture.target, texture.texture)\n }\n\n function tempRestore () {\n var prev = textureUnits[0]\n if (prev) {\n gl.bindTexture(prev.target, prev.texture)\n } else {\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n }\n }\n\n function destroy (texture) {\n var handle = texture.texture\n check$1(handle, 'must not double destroy texture')\n var unit = texture.unit\n var target = texture.target\n if (unit >= 0) {\n gl.activeTexture(GL_TEXTURE0$1 + unit)\n gl.bindTexture(target, null)\n textureUnits[unit] = null\n }\n gl.deleteTexture(handle)\n texture.texture = null\n texture.params = null\n texture.pixels = null\n texture.refCount = 0\n delete textureSet[texture.id]\n stats.textureCount--\n }\n\n extend(REGLTexture.prototype, {\n bind: function () {\n var texture = this\n texture.bindCount += 1\n var unit = texture.unit\n if (unit < 0) {\n for (var i = 0; i < numTexUnits; ++i) {\n var other = textureUnits[i]\n if (other) {\n if (other.bindCount > 0) {\n continue\n }\n other.unit = -1\n }\n textureUnits[i] = texture\n unit = i\n break\n }\n if (unit >= numTexUnits) {\n check$1.raise('insufficient number of texture units')\n }\n if (config.profile && stats.maxTextureUnits < (unit + 1)) {\n stats.maxTextureUnits = unit + 1 // +1, since the units are zero-based\n }\n texture.unit = unit\n gl.activeTexture(GL_TEXTURE0$1 + unit)\n gl.bindTexture(texture.target, texture.texture)\n }\n return unit\n },\n\n unbind: function () {\n this.bindCount -= 1\n },\n\n decRef: function () {\n if (--this.refCount <= 0) {\n destroy(this)\n }\n }\n })\n\n function createTexture2D (a, b) {\n var texture = new REGLTexture(GL_TEXTURE_2D$1)\n textureSet[texture.id] = texture\n stats.textureCount++\n\n function reglTexture2D (a, b) {\n var texInfo = texture.texInfo\n TexInfo.call(texInfo)\n var mipData = allocMipMap()\n\n if (typeof a === 'number') {\n if (typeof b === 'number') {\n parseMipMapFromShape(mipData, a | 0, b | 0)\n } else {\n parseMipMapFromShape(mipData, a | 0, a | 0)\n }\n } else if (a) {\n check$1.type(a, 'object', 'invalid arguments to regl.texture')\n parseTexInfo(texInfo, a)\n parseMipMapFromObject(mipData, a)\n } else {\n // empty textures get assigned a default shape of 1x1\n parseMipMapFromShape(mipData, 1, 1)\n }\n\n if (texInfo.genMipmaps) {\n mipData.mipmask = (mipData.width << 1) - 1\n }\n texture.mipmask = mipData.mipmask\n\n copyFlags(texture, mipData)\n\n check$1.texture2D(texInfo, mipData, limits)\n texture.internalformat = mipData.internalformat\n\n reglTexture2D.width = mipData.width\n reglTexture2D.height = mipData.height\n\n tempBind(texture)\n setMipMap(mipData, GL_TEXTURE_2D$1)\n setTexInfo(texInfo, GL_TEXTURE_2D$1)\n tempRestore()\n\n freeMipMap(mipData)\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n mipData.width,\n mipData.height,\n texInfo.genMipmaps,\n false)\n }\n reglTexture2D.format = textureFormatsInvert[texture.internalformat]\n reglTexture2D.type = textureTypesInvert[texture.type]\n\n reglTexture2D.mag = magFiltersInvert[texInfo.magFilter]\n reglTexture2D.min = minFiltersInvert[texInfo.minFilter]\n\n reglTexture2D.wrapS = wrapModesInvert[texInfo.wrapS]\n reglTexture2D.wrapT = wrapModesInvert[texInfo.wrapT]\n\n return reglTexture2D\n }\n\n function subimage (image, x_, y_, level_) {\n check$1(!!image, 'must specify image data')\n\n var x = x_ | 0\n var y = y_ | 0\n var level = level_ | 0\n\n var imageData = allocImage()\n copyFlags(imageData, texture)\n imageData.width = 0\n imageData.height = 0\n parseImage(imageData, image)\n imageData.width = imageData.width || ((texture.width >> level) - x)\n imageData.height = imageData.height || ((texture.height >> level) - y)\n\n check$1(\n texture.type === imageData.type &&\n texture.format === imageData.format &&\n texture.internalformat === imageData.internalformat,\n 'incompatible format for texture.subimage')\n check$1(\n x >= 0 && y >= 0 &&\n x + imageData.width <= texture.width &&\n y + imageData.height <= texture.height,\n 'texture.subimage write out of bounds')\n check$1(\n texture.mipmask & (1 << level),\n 'missing mipmap data')\n check$1(\n imageData.data || imageData.element || imageData.needsCopy,\n 'missing image data')\n\n tempBind(texture)\n setSubImage(imageData, GL_TEXTURE_2D$1, x, y, level)\n tempRestore()\n\n freeImage(imageData)\n\n return reglTexture2D\n }\n\n function resize (w_, h_) {\n var w = w_ | 0\n var h = (h_ | 0) || w\n if (w === texture.width && h === texture.height) {\n return reglTexture2D\n }\n\n reglTexture2D.width = texture.width = w\n reglTexture2D.height = texture.height = h\n\n tempBind(texture)\n\n for (var i = 0; texture.mipmask >> i; ++i) {\n var _w = w >> i\n var _h = h >> i\n if (!_w || !_h) break\n gl.texImage2D(\n GL_TEXTURE_2D$1,\n i,\n texture.format,\n _w,\n _h,\n 0,\n texture.format,\n texture.type,\n null)\n }\n tempRestore()\n\n // also, recompute the texture size.\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n w,\n h,\n false,\n false)\n }\n\n return reglTexture2D\n }\n\n reglTexture2D(a, b)\n\n reglTexture2D.subimage = subimage\n reglTexture2D.resize = resize\n reglTexture2D._reglType = 'texture2d'\n reglTexture2D._texture = texture\n if (config.profile) {\n reglTexture2D.stats = texture.stats\n }\n reglTexture2D.destroy = function () {\n texture.decRef()\n }\n\n return reglTexture2D\n }\n\n function createTextureCube (a0, a1, a2, a3, a4, a5) {\n var texture = new REGLTexture(GL_TEXTURE_CUBE_MAP$1)\n textureSet[texture.id] = texture\n stats.cubeCount++\n\n var faces = new Array(6)\n\n function reglTextureCube (a0, a1, a2, a3, a4, a5) {\n var i\n var texInfo = texture.texInfo\n TexInfo.call(texInfo)\n for (i = 0; i < 6; ++i) {\n faces[i] = allocMipMap()\n }\n\n if (typeof a0 === 'number' || !a0) {\n var s = (a0 | 0) || 1\n for (i = 0; i < 6; ++i) {\n parseMipMapFromShape(faces[i], s, s)\n }\n } else if (typeof a0 === 'object') {\n if (a1) {\n parseMipMapFromObject(faces[0], a0)\n parseMipMapFromObject(faces[1], a1)\n parseMipMapFromObject(faces[2], a2)\n parseMipMapFromObject(faces[3], a3)\n parseMipMapFromObject(faces[4], a4)\n parseMipMapFromObject(faces[5], a5)\n } else {\n parseTexInfo(texInfo, a0)\n parseFlags(texture, a0)\n if ('faces' in a0) {\n var faceInput = a0.faces\n check$1(Array.isArray(faceInput) && faceInput.length === 6,\n 'cube faces must be a length 6 array')\n for (i = 0; i < 6; ++i) {\n check$1(typeof faceInput[i] === 'object' && !!faceInput[i],\n 'invalid input for cube map face')\n copyFlags(faces[i], texture)\n parseMipMapFromObject(faces[i], faceInput[i])\n }\n } else {\n for (i = 0; i < 6; ++i) {\n parseMipMapFromObject(faces[i], a0)\n }\n }\n }\n } else {\n check$1.raise('invalid arguments to cube map')\n }\n\n copyFlags(texture, faces[0])\n\n if (!limits.npotTextureCube) {\n check$1(isPow2$1(texture.width) && isPow2$1(texture.height), 'your browser does not support non power or two texture dimensions')\n }\n\n if (texInfo.genMipmaps) {\n texture.mipmask = (faces[0].width << 1) - 1\n } else {\n texture.mipmask = faces[0].mipmask\n }\n\n check$1.textureCube(texture, texInfo, faces, limits)\n texture.internalformat = faces[0].internalformat\n\n reglTextureCube.width = faces[0].width\n reglTextureCube.height = faces[0].height\n\n tempBind(texture)\n for (i = 0; i < 6; ++i) {\n setMipMap(faces[i], GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + i)\n }\n setTexInfo(texInfo, GL_TEXTURE_CUBE_MAP$1)\n tempRestore()\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n reglTextureCube.width,\n reglTextureCube.height,\n texInfo.genMipmaps,\n true)\n }\n\n reglTextureCube.format = textureFormatsInvert[texture.internalformat]\n reglTextureCube.type = textureTypesInvert[texture.type]\n\n reglTextureCube.mag = magFiltersInvert[texInfo.magFilter]\n reglTextureCube.min = minFiltersInvert[texInfo.minFilter]\n\n reglTextureCube.wrapS = wrapModesInvert[texInfo.wrapS]\n reglTextureCube.wrapT = wrapModesInvert[texInfo.wrapT]\n\n for (i = 0; i < 6; ++i) {\n freeMipMap(faces[i])\n }\n\n return reglTextureCube\n }\n\n function subimage (face, image, x_, y_, level_) {\n check$1(!!image, 'must specify image data')\n check$1(typeof face === 'number' && face === (face | 0) &&\n face >= 0 && face < 6, 'invalid face')\n\n var x = x_ | 0\n var y = y_ | 0\n var level = level_ | 0\n\n var imageData = allocImage()\n copyFlags(imageData, texture)\n imageData.width = 0\n imageData.height = 0\n parseImage(imageData, image)\n imageData.width = imageData.width || ((texture.width >> level) - x)\n imageData.height = imageData.height || ((texture.height >> level) - y)\n\n check$1(\n texture.type === imageData.type &&\n texture.format === imageData.format &&\n texture.internalformat === imageData.internalformat,\n 'incompatible format for texture.subimage')\n check$1(\n x >= 0 && y >= 0 &&\n x + imageData.width <= texture.width &&\n y + imageData.height <= texture.height,\n 'texture.subimage write out of bounds')\n check$1(\n texture.mipmask & (1 << level),\n 'missing mipmap data')\n check$1(\n imageData.data || imageData.element || imageData.needsCopy,\n 'missing image data')\n\n tempBind(texture)\n setSubImage(imageData, GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + face, x, y, level)\n tempRestore()\n\n freeImage(imageData)\n\n return reglTextureCube\n }\n\n function resize (radius_) {\n var radius = radius_ | 0\n if (radius === texture.width) {\n return\n }\n\n reglTextureCube.width = texture.width = radius\n reglTextureCube.height = texture.height = radius\n\n tempBind(texture)\n for (var i = 0; i < 6; ++i) {\n for (var j = 0; texture.mipmask >> j; ++j) {\n gl.texImage2D(\n GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + i,\n j,\n texture.format,\n radius >> j,\n radius >> j,\n 0,\n texture.format,\n texture.type,\n null)\n }\n }\n tempRestore()\n\n if (config.profile) {\n texture.stats.size = getTextureSize(\n texture.internalformat,\n texture.type,\n reglTextureCube.width,\n reglTextureCube.height,\n false,\n true)\n }\n\n return reglTextureCube\n }\n\n reglTextureCube(a0, a1, a2, a3, a4, a5)\n\n reglTextureCube.subimage = subimage\n reglTextureCube.resize = resize\n reglTextureCube._reglType = 'textureCube'\n reglTextureCube._texture = texture\n if (config.profile) {\n reglTextureCube.stats = texture.stats\n }\n reglTextureCube.destroy = function () {\n texture.decRef()\n }\n\n return reglTextureCube\n }\n\n // Called when regl is destroyed\n function destroyTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n gl.activeTexture(GL_TEXTURE0$1 + i)\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n textureUnits[i] = null\n }\n values(textureSet).forEach(destroy)\n\n stats.cubeCount = 0\n stats.textureCount = 0\n }\n\n if (config.profile) {\n stats.getTotalTextureSize = function () {\n var total = 0\n Object.keys(textureSet).forEach(function (key) {\n total += textureSet[key].stats.size\n })\n return total\n }\n }\n\n function restoreTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n var tex = textureUnits[i]\n if (tex) {\n tex.bindCount = 0\n tex.unit = -1\n textureUnits[i] = null\n }\n }\n\n values(textureSet).forEach(function (texture) {\n texture.texture = gl.createTexture()\n gl.bindTexture(texture.target, texture.texture)\n for (var i = 0; i < 32; ++i) {\n if ((texture.mipmask & (1 << i)) === 0) {\n continue\n }\n if (texture.target === GL_TEXTURE_2D$1) {\n gl.texImage2D(GL_TEXTURE_2D$1,\n i,\n texture.internalformat,\n texture.width >> i,\n texture.height >> i,\n 0,\n texture.internalformat,\n texture.type,\n null)\n } else {\n for (var j = 0; j < 6; ++j) {\n gl.texImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X$1 + j,\n i,\n texture.internalformat,\n texture.width >> i,\n texture.height >> i,\n 0,\n texture.internalformat,\n texture.type,\n null)\n }\n }\n }\n setTexInfo(texture.texInfo, texture.target)\n })\n }\n\n function refreshTextures () {\n for (var i = 0; i < numTexUnits; ++i) {\n var tex = textureUnits[i]\n if (tex) {\n tex.bindCount = 0\n tex.unit = -1\n textureUnits[i] = null\n }\n gl.activeTexture(GL_TEXTURE0$1 + i)\n gl.bindTexture(GL_TEXTURE_2D$1, null)\n gl.bindTexture(GL_TEXTURE_CUBE_MAP$1, null)\n }\n }\n\n return {\n create2D: createTexture2D,\n createCube: createTextureCube,\n clear: destroyTextures,\n getTexture: function (wrapper) {\n return null\n },\n restore: restoreTextures,\n refresh: refreshTextures\n }\n}\n\nvar GL_RENDERBUFFER = 0x8D41\n\nvar GL_RGBA4$1 = 0x8056\nvar GL_RGB5_A1$1 = 0x8057\nvar GL_RGB565$1 = 0x8D62\nvar GL_DEPTH_COMPONENT16 = 0x81A5\nvar GL_STENCIL_INDEX8 = 0x8D48\nvar GL_DEPTH_STENCIL$1 = 0x84F9\n\nvar GL_SRGB8_ALPHA8_EXT = 0x8C43\n\nvar GL_RGBA32F_EXT = 0x8814\n\nvar GL_RGBA16F_EXT = 0x881A\nvar GL_RGB16F_EXT = 0x881B\n\nvar FORMAT_SIZES = []\n\nFORMAT_SIZES[GL_RGBA4$1] = 2\nFORMAT_SIZES[GL_RGB5_A1$1] = 2\nFORMAT_SIZES[GL_RGB565$1] = 2\n\nFORMAT_SIZES[GL_DEPTH_COMPONENT16] = 2\nFORMAT_SIZES[GL_STENCIL_INDEX8] = 1\nFORMAT_SIZES[GL_DEPTH_STENCIL$1] = 4\n\nFORMAT_SIZES[GL_SRGB8_ALPHA8_EXT] = 4\nFORMAT_SIZES[GL_RGBA32F_EXT] = 16\nFORMAT_SIZES[GL_RGBA16F_EXT] = 8\nFORMAT_SIZES[GL_RGB16F_EXT] = 6\n\nfunction getRenderbufferSize (format, width, height) {\n return FORMAT_SIZES[format] * width * height\n}\n\nvar wrapRenderbuffers = function (gl, extensions, limits, stats, config) {\n var formatTypes = {\n 'rgba4': GL_RGBA4$1,\n 'rgb565': GL_RGB565$1,\n 'rgb5 a1': GL_RGB5_A1$1,\n 'depth': GL_DEPTH_COMPONENT16,\n 'stencil': GL_STENCIL_INDEX8,\n 'depth stencil': GL_DEPTH_STENCIL$1\n }\n\n if (extensions.ext_srgb) {\n formatTypes['srgba'] = GL_SRGB8_ALPHA8_EXT\n }\n\n if (extensions.ext_color_buffer_half_float) {\n formatTypes['rgba16f'] = GL_RGBA16F_EXT\n formatTypes['rgb16f'] = GL_RGB16F_EXT\n }\n\n if (extensions.webgl_color_buffer_float) {\n formatTypes['rgba32f'] = GL_RGBA32F_EXT\n }\n\n var formatTypesInvert = []\n Object.keys(formatTypes).forEach(function (key) {\n var val = formatTypes[key]\n formatTypesInvert[val] = key\n })\n\n var renderbufferCount = 0\n var renderbufferSet = {}\n\n function REGLRenderbuffer (renderbuffer) {\n this.id = renderbufferCount++\n this.refCount = 1\n\n this.renderbuffer = renderbuffer\n\n this.format = GL_RGBA4$1\n this.width = 0\n this.height = 0\n\n if (config.profile) {\n this.stats = { size: 0 }\n }\n }\n\n REGLRenderbuffer.prototype.decRef = function () {\n if (--this.refCount <= 0) {\n destroy(this)\n }\n }\n\n function destroy (rb) {\n var handle = rb.renderbuffer\n check$1(handle, 'must not double destroy renderbuffer')\n gl.bindRenderbuffer(GL_RENDERBUFFER, null)\n gl.deleteRenderbuffer(handle)\n rb.renderbuffer = null\n rb.refCount = 0\n delete renderbufferSet[rb.id]\n stats.renderbufferCount--\n }\n\n function createRenderbuffer (a, b) {\n var renderbuffer = new REGLRenderbuffer(gl.createRenderbuffer())\n renderbufferSet[renderbuffer.id] = renderbuffer\n stats.renderbufferCount++\n\n function reglRenderbuffer (a, b) {\n var w = 0\n var h = 0\n var format = GL_RGBA4$1\n\n if (typeof a === 'object' && a) {\n var options = a\n if ('shape' in options) {\n var shape = options.shape\n check$1(Array.isArray(shape) && shape.length >= 2,\n 'invalid renderbuffer shape')\n w = shape[0] | 0\n h = shape[1] | 0\n } else {\n if ('radius' in options) {\n w = h = options.radius | 0\n }\n if ('width' in options) {\n w = options.width | 0\n }\n if ('height' in options) {\n h = options.height | 0\n }\n }\n if ('format' in options) {\n check$1.parameter(options.format, formatTypes,\n 'invalid renderbuffer format')\n format = formatTypes[options.format]\n }\n } else if (typeof a === 'number') {\n w = a | 0\n if (typeof b === 'number') {\n h = b | 0\n } else {\n h = w\n }\n } else if (!a) {\n w = h = 1\n } else {\n check$1.raise('invalid arguments to renderbuffer constructor')\n }\n\n // check shape\n check$1(\n w > 0 && h > 0 &&\n w <= limits.maxRenderbufferSize && h <= limits.maxRenderbufferSize,\n 'invalid renderbuffer size')\n\n if (w === renderbuffer.width &&\n h === renderbuffer.height &&\n format === renderbuffer.format) {\n return\n }\n\n reglRenderbuffer.width = renderbuffer.width = w\n reglRenderbuffer.height = renderbuffer.height = h\n renderbuffer.format = format\n\n gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, format, w, h)\n\n check$1(\n gl.getError() === 0,\n 'invalid render buffer format')\n\n if (config.profile) {\n renderbuffer.stats.size = getRenderbufferSize(renderbuffer.format, renderbuffer.width, renderbuffer.height)\n }\n reglRenderbuffer.format = formatTypesInvert[renderbuffer.format]\n\n return reglRenderbuffer\n }\n\n function resize (w_, h_) {\n var w = w_ | 0\n var h = (h_ | 0) || w\n\n if (w === renderbuffer.width && h === renderbuffer.height) {\n return reglRenderbuffer\n }\n\n // check shape\n check$1(\n w > 0 && h > 0 &&\n w <= limits.maxRenderbufferSize && h <= limits.maxRenderbufferSize,\n 'invalid renderbuffer size')\n\n reglRenderbuffer.width = renderbuffer.width = w\n reglRenderbuffer.height = renderbuffer.height = h\n\n gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, renderbuffer.format, w, h)\n\n check$1(\n gl.getError() === 0,\n 'invalid render buffer format')\n\n // also, recompute size.\n if (config.profile) {\n renderbuffer.stats.size = getRenderbufferSize(\n renderbuffer.format, renderbuffer.width, renderbuffer.height)\n }\n\n return reglRenderbuffer\n }\n\n reglRenderbuffer(a, b)\n\n reglRenderbuffer.resize = resize\n reglRenderbuffer._reglType = 'renderbuffer'\n reglRenderbuffer._renderbuffer = renderbuffer\n if (config.profile) {\n reglRenderbuffer.stats = renderbuffer.stats\n }\n reglRenderbuffer.destroy = function () {\n renderbuffer.decRef()\n }\n\n return reglRenderbuffer\n }\n\n if (config.profile) {\n stats.getTotalRenderbufferSize = function () {\n var total = 0\n Object.keys(renderbufferSet).forEach(function (key) {\n total += renderbufferSet[key].stats.size\n })\n return total\n }\n }\n\n function restoreRenderbuffers () {\n values(renderbufferSet).forEach(function (rb) {\n rb.renderbuffer = gl.createRenderbuffer()\n gl.bindRenderbuffer(GL_RENDERBUFFER, rb.renderbuffer)\n gl.renderbufferStorage(GL_RENDERBUFFER, rb.format, rb.width, rb.height)\n })\n gl.bindRenderbuffer(GL_RENDERBUFFER, null)\n }\n\n return {\n create: createRenderbuffer,\n clear: function () {\n values(renderbufferSet).forEach(destroy)\n },\n restore: restoreRenderbuffers\n }\n}\n\n// We store these constants so that the minifier can inline them\nvar GL_FRAMEBUFFER$1 = 0x8D40\nvar GL_RENDERBUFFER$1 = 0x8D41\n\nvar GL_TEXTURE_2D$2 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 = 0x8515\n\nvar GL_COLOR_ATTACHMENT0$1 = 0x8CE0\nvar GL_DEPTH_ATTACHMENT = 0x8D00\nvar GL_STENCIL_ATTACHMENT = 0x8D20\nvar GL_DEPTH_STENCIL_ATTACHMENT = 0x821A\n\nvar GL_FRAMEBUFFER_COMPLETE$1 = 0x8CD5\nvar GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6\nvar GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7\nvar GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9\nvar GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD\n\nvar GL_HALF_FLOAT_OES$2 = 0x8D61\nvar GL_UNSIGNED_BYTE$6 = 0x1401\nvar GL_FLOAT$5 = 0x1406\n\nvar GL_RGB$1 = 0x1907\nvar GL_RGBA$2 = 0x1908\n\nvar GL_DEPTH_COMPONENT$1 = 0x1902\n\nvar colorTextureFormatEnums = [\n GL_RGB$1,\n GL_RGBA$2\n]\n\n// for every texture format, store\n// the number of channels\nvar textureFormatChannels = []\ntextureFormatChannels[GL_RGBA$2] = 4\ntextureFormatChannels[GL_RGB$1] = 3\n\n// for every texture type, store\n// the size in bytes.\nvar textureTypeSizes = []\ntextureTypeSizes[GL_UNSIGNED_BYTE$6] = 1\ntextureTypeSizes[GL_FLOAT$5] = 4\ntextureTypeSizes[GL_HALF_FLOAT_OES$2] = 2\n\nvar GL_RGBA4$2 = 0x8056\nvar GL_RGB5_A1$2 = 0x8057\nvar GL_RGB565$2 = 0x8D62\nvar GL_DEPTH_COMPONENT16$1 = 0x81A5\nvar GL_STENCIL_INDEX8$1 = 0x8D48\nvar GL_DEPTH_STENCIL$2 = 0x84F9\n\nvar GL_SRGB8_ALPHA8_EXT$1 = 0x8C43\n\nvar GL_RGBA32F_EXT$1 = 0x8814\n\nvar GL_RGBA16F_EXT$1 = 0x881A\nvar GL_RGB16F_EXT$1 = 0x881B\n\nvar colorRenderbufferFormatEnums = [\n GL_RGBA4$2,\n GL_RGB5_A1$2,\n GL_RGB565$2,\n GL_SRGB8_ALPHA8_EXT$1,\n GL_RGBA16F_EXT$1,\n GL_RGB16F_EXT$1,\n GL_RGBA32F_EXT$1\n]\n\nvar statusCode = {}\nstatusCode[GL_FRAMEBUFFER_COMPLETE$1] = 'complete'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT] = 'incomplete attachment'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS] = 'incomplete dimensions'\nstatusCode[GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT] = 'incomplete, missing attachment'\nstatusCode[GL_FRAMEBUFFER_UNSUPPORTED] = 'unsupported'\n\nfunction wrapFBOState (\n gl,\n extensions,\n limits,\n textureState,\n renderbufferState,\n stats) {\n var framebufferState = {\n cur: null,\n next: null,\n dirty: false,\n setFBO: null\n }\n\n var colorTextureFormats = ['rgba']\n var colorRenderbufferFormats = ['rgba4', 'rgb565', 'rgb5 a1']\n\n if (extensions.ext_srgb) {\n colorRenderbufferFormats.push('srgba')\n }\n\n if (extensions.ext_color_buffer_half_float) {\n colorRenderbufferFormats.push('rgba16f', 'rgb16f')\n }\n\n if (extensions.webgl_color_buffer_float) {\n colorRenderbufferFormats.push('rgba32f')\n }\n\n var colorTypes = ['uint8']\n if (extensions.oes_texture_half_float) {\n colorTypes.push('half float', 'float16')\n }\n if (extensions.oes_texture_float) {\n colorTypes.push('float', 'float32')\n }\n\n function FramebufferAttachment (target, texture, renderbuffer) {\n this.target = target\n this.texture = texture\n this.renderbuffer = renderbuffer\n\n var w = 0\n var h = 0\n if (texture) {\n w = texture.width\n h = texture.height\n } else if (renderbuffer) {\n w = renderbuffer.width\n h = renderbuffer.height\n }\n this.width = w\n this.height = h\n }\n\n function decRef (attachment) {\n if (attachment) {\n if (attachment.texture) {\n attachment.texture._texture.decRef()\n }\n if (attachment.renderbuffer) {\n attachment.renderbuffer._renderbuffer.decRef()\n }\n }\n }\n\n function incRefAndCheckShape (attachment, width, height) {\n if (!attachment) {\n return\n }\n if (attachment.texture) {\n var texture = attachment.texture._texture\n var tw = Math.max(1, texture.width)\n var th = Math.max(1, texture.height)\n check$1(tw === width && th === height,\n 'inconsistent width/height for supplied texture')\n texture.refCount += 1\n } else {\n var renderbuffer = attachment.renderbuffer._renderbuffer\n check$1(\n renderbuffer.width === width && renderbuffer.height === height,\n 'inconsistent width/height for renderbuffer')\n renderbuffer.refCount += 1\n }\n }\n\n function attach (location, attachment) {\n if (attachment) {\n if (attachment.texture) {\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n location,\n attachment.target,\n attachment.texture._texture.texture,\n 0)\n } else {\n gl.framebufferRenderbuffer(\n GL_FRAMEBUFFER$1,\n location,\n GL_RENDERBUFFER$1,\n attachment.renderbuffer._renderbuffer.renderbuffer)\n }\n }\n }\n\n function parseAttachment (attachment) {\n var target = GL_TEXTURE_2D$2\n var texture = null\n var renderbuffer = null\n\n var data = attachment\n if (typeof attachment === 'object') {\n data = attachment.data\n if ('target' in attachment) {\n target = attachment.target | 0\n }\n }\n\n check$1.type(data, 'function', 'invalid attachment data')\n\n var type = data._reglType\n if (type === 'texture2d') {\n texture = data\n check$1(target === GL_TEXTURE_2D$2)\n } else if (type === 'textureCube') {\n texture = data\n check$1(\n target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 &&\n target < GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 + 6,\n 'invalid cube map target')\n } else if (type === 'renderbuffer') {\n renderbuffer = data\n target = GL_RENDERBUFFER$1\n } else {\n check$1.raise('invalid regl object for attachment')\n }\n\n return new FramebufferAttachment(target, texture, renderbuffer)\n }\n\n function allocAttachment (\n width,\n height,\n isTexture,\n format,\n type) {\n if (isTexture) {\n var texture = textureState.create2D({\n width: width,\n height: height,\n format: format,\n type: type\n })\n texture._texture.refCount = 0\n return new FramebufferAttachment(GL_TEXTURE_2D$2, texture, null)\n } else {\n var rb = renderbufferState.create({\n width: width,\n height: height,\n format: format\n })\n rb._renderbuffer.refCount = 0\n return new FramebufferAttachment(GL_RENDERBUFFER$1, null, rb)\n }\n }\n\n function unwrapAttachment (attachment) {\n return attachment && (attachment.texture || attachment.renderbuffer)\n }\n\n function resizeAttachment (attachment, w, h) {\n if (attachment) {\n if (attachment.texture) {\n attachment.texture.resize(w, h)\n } else if (attachment.renderbuffer) {\n attachment.renderbuffer.resize(w, h)\n }\n attachment.width = w\n attachment.height = h\n }\n }\n\n var framebufferCount = 0\n var framebufferSet = {}\n\n function REGLFramebuffer () {\n this.id = framebufferCount++\n framebufferSet[this.id] = this\n\n this.framebuffer = gl.createFramebuffer()\n this.width = 0\n this.height = 0\n\n this.colorAttachments = []\n this.depthAttachment = null\n this.stencilAttachment = null\n this.depthStencilAttachment = null\n }\n\n function decFBORefs (framebuffer) {\n framebuffer.colorAttachments.forEach(decRef)\n decRef(framebuffer.depthAttachment)\n decRef(framebuffer.stencilAttachment)\n decRef(framebuffer.depthStencilAttachment)\n }\n\n function destroy (framebuffer) {\n var handle = framebuffer.framebuffer\n check$1(handle, 'must not double destroy framebuffer')\n gl.deleteFramebuffer(handle)\n framebuffer.framebuffer = null\n stats.framebufferCount--\n delete framebufferSet[framebuffer.id]\n }\n\n function updateFramebuffer (framebuffer) {\n var i\n\n gl.bindFramebuffer(GL_FRAMEBUFFER$1, framebuffer.framebuffer)\n var colorAttachments = framebuffer.colorAttachments\n for (i = 0; i < colorAttachments.length; ++i) {\n attach(GL_COLOR_ATTACHMENT0$1 + i, colorAttachments[i])\n }\n for (i = colorAttachments.length; i < limits.maxColorAttachments; ++i) {\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_COLOR_ATTACHMENT0$1 + i,\n GL_TEXTURE_2D$2,\n null,\n 0)\n }\n\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_DEPTH_STENCIL_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_DEPTH_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n gl.framebufferTexture2D(\n GL_FRAMEBUFFER$1,\n GL_STENCIL_ATTACHMENT,\n GL_TEXTURE_2D$2,\n null,\n 0)\n\n attach(GL_DEPTH_ATTACHMENT, framebuffer.depthAttachment)\n attach(GL_STENCIL_ATTACHMENT, framebuffer.stencilAttachment)\n attach(GL_DEPTH_STENCIL_ATTACHMENT, framebuffer.depthStencilAttachment)\n\n // Check status code\n var status = gl.checkFramebufferStatus(GL_FRAMEBUFFER$1)\n if (!gl.isContextLost() && status !== GL_FRAMEBUFFER_COMPLETE$1) {\n check$1.raise('framebuffer configuration not supported, status = ' +\n statusCode[status])\n }\n\n gl.bindFramebuffer(GL_FRAMEBUFFER$1, framebufferState.next ? framebufferState.next.framebuffer : null)\n framebufferState.cur = framebufferState.next\n\n // FIXME: Clear error code here. This is a work around for a bug in\n // headless-gl\n gl.getError()\n }\n\n function createFBO (a0, a1) {\n var framebuffer = new REGLFramebuffer()\n stats.framebufferCount++\n\n function reglFramebuffer (a, b) {\n var i\n\n check$1(framebufferState.next !== framebuffer,\n 'can not update framebuffer which is currently in use')\n\n var width = 0\n var height = 0\n\n var needsDepth = true\n var needsStencil = true\n\n var colorBuffer = null\n var colorTexture = true\n var colorFormat = 'rgba'\n var colorType = 'uint8'\n var colorCount = 1\n\n var depthBuffer = null\n var stencilBuffer = null\n var depthStencilBuffer = null\n var depthStencilTexture = false\n\n if (typeof a === 'number') {\n width = a | 0\n height = (b | 0) || width\n } else if (!a) {\n width = height = 1\n } else {\n check$1.type(a, 'object', 'invalid arguments for framebuffer')\n var options = a\n\n if ('shape' in options) {\n var shape = options.shape\n check$1(Array.isArray(shape) && shape.length >= 2,\n 'invalid shape for framebuffer')\n width = shape[0]\n height = shape[1]\n } else {\n if ('radius' in options) {\n width = height = options.radius\n }\n if ('width' in options) {\n width = options.width\n }\n if ('height' in options) {\n height = options.height\n }\n }\n\n if ('color' in options ||\n 'colors' in options) {\n colorBuffer =\n options.color ||\n options.colors\n if (Array.isArray(colorBuffer)) {\n check$1(\n colorBuffer.length === 1 || extensions.webgl_draw_buffers,\n 'multiple render targets not supported')\n }\n }\n\n if (!colorBuffer) {\n if ('colorCount' in options) {\n colorCount = options.colorCount | 0\n check$1(colorCount > 0, 'invalid color buffer count')\n }\n\n if ('colorTexture' in options) {\n colorTexture = !!options.colorTexture\n colorFormat = 'rgba4'\n }\n\n if ('colorType' in options) {\n colorType = options.colorType\n if (!colorTexture) {\n if (colorType === 'half float' || colorType === 'float16') {\n check$1(extensions.ext_color_buffer_half_float,\n 'you must enable EXT_color_buffer_half_float to use 16-bit render buffers')\n colorFormat = 'rgba16f'\n } else if (colorType === 'float' || colorType === 'float32') {\n check$1(extensions.webgl_color_buffer_float,\n 'you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers')\n colorFormat = 'rgba32f'\n }\n } else {\n check$1(extensions.oes_texture_float ||\n !(colorType === 'float' || colorType === 'float32'),\n 'you must enable OES_texture_float in order to use floating point framebuffer objects')\n check$1(extensions.oes_texture_half_float ||\n !(colorType === 'half float' || colorType === 'float16'),\n 'you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects')\n }\n check$1.oneOf(colorType, colorTypes, 'invalid color type')\n }\n\n if ('colorFormat' in options) {\n colorFormat = options.colorFormat\n if (colorTextureFormats.indexOf(colorFormat) >= 0) {\n colorTexture = true\n } else if (colorRenderbufferFormats.indexOf(colorFormat) >= 0) {\n colorTexture = false\n } else {\n if (colorTexture) {\n check$1.oneOf(\n options.colorFormat, colorTextureFormats,\n 'invalid color format for texture')\n } else {\n check$1.oneOf(\n options.colorFormat, colorRenderbufferFormats,\n 'invalid color format for renderbuffer')\n }\n }\n }\n }\n\n if ('depthTexture' in options || 'depthStencilTexture' in options) {\n depthStencilTexture = !!(options.depthTexture ||\n options.depthStencilTexture)\n check$1(!depthStencilTexture || extensions.webgl_depth_texture,\n 'webgl_depth_texture extension not supported')\n }\n\n if ('depth' in options) {\n if (typeof options.depth === 'boolean') {\n needsDepth = options.depth\n } else {\n depthBuffer = options.depth\n needsStencil = false\n }\n }\n\n if ('stencil' in options) {\n if (typeof options.stencil === 'boolean') {\n needsStencil = options.stencil\n } else {\n stencilBuffer = options.stencil\n needsDepth = false\n }\n }\n\n if ('depthStencil' in options) {\n if (typeof options.depthStencil === 'boolean') {\n needsDepth = needsStencil = options.depthStencil\n } else {\n depthStencilBuffer = options.depthStencil\n needsDepth = false\n needsStencil = false\n }\n }\n }\n\n // parse attachments\n var colorAttachments = null\n var depthAttachment = null\n var stencilAttachment = null\n var depthStencilAttachment = null\n\n // Set up color attachments\n if (Array.isArray(colorBuffer)) {\n colorAttachments = colorBuffer.map(parseAttachment)\n } else if (colorBuffer) {\n colorAttachments = [parseAttachment(colorBuffer)]\n } else {\n colorAttachments = new Array(colorCount)\n for (i = 0; i < colorCount; ++i) {\n colorAttachments[i] = allocAttachment(\n width,\n height,\n colorTexture,\n colorFormat,\n colorType)\n }\n }\n\n check$1(extensions.webgl_draw_buffers || colorAttachments.length <= 1,\n 'you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers.')\n check$1(colorAttachments.length <= limits.maxColorAttachments,\n 'too many color attachments, not supported')\n\n width = width || colorAttachments[0].width\n height = height || colorAttachments[0].height\n\n if (depthBuffer) {\n depthAttachment = parseAttachment(depthBuffer)\n } else if (needsDepth && !needsStencil) {\n depthAttachment = allocAttachment(\n width,\n height,\n depthStencilTexture,\n 'depth',\n 'uint32')\n }\n\n if (stencilBuffer) {\n stencilAttachment = parseAttachment(stencilBuffer)\n } else if (needsStencil && !needsDepth) {\n stencilAttachment = allocAttachment(\n width,\n height,\n false,\n 'stencil',\n 'uint8')\n }\n\n if (depthStencilBuffer) {\n depthStencilAttachment = parseAttachment(depthStencilBuffer)\n } else if (!depthBuffer && !stencilBuffer && needsStencil && needsDepth) {\n depthStencilAttachment = allocAttachment(\n width,\n height,\n depthStencilTexture,\n 'depth stencil',\n 'depth stencil')\n }\n\n check$1(\n (!!depthBuffer) + (!!stencilBuffer) + (!!depthStencilBuffer) <= 1,\n 'invalid framebuffer configuration, can specify exactly one depth/stencil attachment')\n\n var commonColorAttachmentSize = null\n\n for (i = 0; i < colorAttachments.length; ++i) {\n incRefAndCheckShape(colorAttachments[i], width, height)\n check$1(!colorAttachments[i] ||\n (colorAttachments[i].texture &&\n colorTextureFormatEnums.indexOf(colorAttachments[i].texture._texture.format) >= 0) ||\n (colorAttachments[i].renderbuffer &&\n colorRenderbufferFormatEnums.indexOf(colorAttachments[i].renderbuffer._renderbuffer.format) >= 0),\n 'framebuffer color attachment ' + i + ' is invalid')\n\n if (colorAttachments[i] && colorAttachments[i].texture) {\n var colorAttachmentSize =\n textureFormatChannels[colorAttachments[i].texture._texture.format] *\n textureTypeSizes[colorAttachments[i].texture._texture.type]\n\n if (commonColorAttachmentSize === null) {\n commonColorAttachmentSize = colorAttachmentSize\n } else {\n // We need to make sure that all color attachments have the same number of bitplanes\n // (that is, the same numer of bits per pixel)\n // This is required by the GLES2.0 standard. See the beginning of Chapter 4 in that document.\n check$1(commonColorAttachmentSize === colorAttachmentSize,\n 'all color attachments much have the same number of bits per pixel.')\n }\n }\n }\n incRefAndCheckShape(depthAttachment, width, height)\n check$1(!depthAttachment ||\n (depthAttachment.texture &&\n depthAttachment.texture._texture.format === GL_DEPTH_COMPONENT$1) ||\n (depthAttachment.renderbuffer &&\n depthAttachment.renderbuffer._renderbuffer.format === GL_DEPTH_COMPONENT16$1),\n 'invalid depth attachment for framebuffer object')\n incRefAndCheckShape(stencilAttachment, width, height)\n check$1(!stencilAttachment ||\n (stencilAttachment.renderbuffer &&\n stencilAttachment.renderbuffer._renderbuffer.format === GL_STENCIL_INDEX8$1),\n 'invalid stencil attachment for framebuffer object')\n incRefAndCheckShape(depthStencilAttachment, width, height)\n check$1(!depthStencilAttachment ||\n (depthStencilAttachment.texture &&\n depthStencilAttachment.texture._texture.format === GL_DEPTH_STENCIL$2) ||\n (depthStencilAttachment.renderbuffer &&\n depthStencilAttachment.renderbuffer._renderbuffer.format === GL_DEPTH_STENCIL$2),\n 'invalid depth-stencil attachment for framebuffer object')\n\n // decrement references\n decFBORefs(framebuffer)\n\n framebuffer.width = width\n framebuffer.height = height\n\n framebuffer.colorAttachments = colorAttachments\n framebuffer.depthAttachment = depthAttachment\n framebuffer.stencilAttachment = stencilAttachment\n framebuffer.depthStencilAttachment = depthStencilAttachment\n\n reglFramebuffer.color = colorAttachments.map(unwrapAttachment)\n reglFramebuffer.depth = unwrapAttachment(depthAttachment)\n reglFramebuffer.stencil = unwrapAttachment(stencilAttachment)\n reglFramebuffer.depthStencil = unwrapAttachment(depthStencilAttachment)\n\n reglFramebuffer.width = framebuffer.width\n reglFramebuffer.height = framebuffer.height\n\n updateFramebuffer(framebuffer)\n\n return reglFramebuffer\n }\n\n function resize (w_, h_) {\n check$1(framebufferState.next !== framebuffer,\n 'can not resize a framebuffer which is currently in use')\n\n var w = Math.max(w_ | 0, 1)\n var h = Math.max((h_ | 0) || w, 1)\n if (w === framebuffer.width && h === framebuffer.height) {\n return reglFramebuffer\n }\n\n // resize all buffers\n var colorAttachments = framebuffer.colorAttachments\n for (var i = 0; i < colorAttachments.length; ++i) {\n resizeAttachment(colorAttachments[i], w, h)\n }\n resizeAttachment(framebuffer.depthAttachment, w, h)\n resizeAttachment(framebuffer.stencilAttachment, w, h)\n resizeAttachment(framebuffer.depthStencilAttachment, w, h)\n\n framebuffer.width = reglFramebuffer.width = w\n framebuffer.height = reglFramebuffer.height = h\n\n updateFramebuffer(framebuffer)\n\n return reglFramebuffer\n }\n\n reglFramebuffer(a0, a1)\n\n return extend(reglFramebuffer, {\n resize: resize,\n _reglType: 'framebuffer',\n _framebuffer: framebuffer,\n destroy: function () {\n destroy(framebuffer)\n decFBORefs(framebuffer)\n },\n use: function (block) {\n framebufferState.setFBO({\n framebuffer: reglFramebuffer\n }, block)\n }\n })\n }\n\n function createCubeFBO (options) {\n var faces = Array(6)\n\n function reglFramebufferCube (a) {\n var i\n\n check$1(faces.indexOf(framebufferState.next) < 0,\n 'can not update framebuffer which is currently in use')\n\n var params = {\n color: null\n }\n\n var radius = 0\n\n var colorBuffer = null\n var colorFormat = 'rgba'\n var colorType = 'uint8'\n var colorCount = 1\n\n if (typeof a === 'number') {\n radius = a | 0\n } else if (!a) {\n radius = 1\n } else {\n check$1.type(a, 'object', 'invalid arguments for framebuffer')\n var options = a\n\n if ('shape' in options) {\n var shape = options.shape\n check$1(\n Array.isArray(shape) && shape.length >= 2,\n 'invalid shape for framebuffer')\n check$1(\n shape[0] === shape[1],\n 'cube framebuffer must be square')\n radius = shape[0]\n } else {\n if ('radius' in options) {\n radius = options.radius | 0\n }\n if ('width' in options) {\n radius = options.width | 0\n if ('height' in options) {\n check$1(options.height === radius, 'must be square')\n }\n } else if ('height' in options) {\n radius = options.height | 0\n }\n }\n\n if ('color' in options ||\n 'colors' in options) {\n colorBuffer =\n options.color ||\n options.colors\n if (Array.isArray(colorBuffer)) {\n check$1(\n colorBuffer.length === 1 || extensions.webgl_draw_buffers,\n 'multiple render targets not supported')\n }\n }\n\n if (!colorBuffer) {\n if ('colorCount' in options) {\n colorCount = options.colorCount | 0\n check$1(colorCount > 0, 'invalid color buffer count')\n }\n\n if ('colorType' in options) {\n check$1.oneOf(\n options.colorType, colorTypes,\n 'invalid color type')\n colorType = options.colorType\n }\n\n if ('colorFormat' in options) {\n colorFormat = options.colorFormat\n check$1.oneOf(\n options.colorFormat, colorTextureFormats,\n 'invalid color format for texture')\n }\n }\n\n if ('depth' in options) {\n params.depth = options.depth\n }\n\n if ('stencil' in options) {\n params.stencil = options.stencil\n }\n\n if ('depthStencil' in options) {\n params.depthStencil = options.depthStencil\n }\n }\n\n var colorCubes\n if (colorBuffer) {\n if (Array.isArray(colorBuffer)) {\n colorCubes = []\n for (i = 0; i < colorBuffer.length; ++i) {\n colorCubes[i] = colorBuffer[i]\n }\n } else {\n colorCubes = [ colorBuffer ]\n }\n } else {\n colorCubes = Array(colorCount)\n var cubeMapParams = {\n radius: radius,\n format: colorFormat,\n type: colorType\n }\n for (i = 0; i < colorCount; ++i) {\n colorCubes[i] = textureState.createCube(cubeMapParams)\n }\n }\n\n // Check color cubes\n params.color = Array(colorCubes.length)\n for (i = 0; i < colorCubes.length; ++i) {\n var cube = colorCubes[i]\n check$1(\n typeof cube === 'function' && cube._reglType === 'textureCube',\n 'invalid cube map')\n radius = radius || cube.width\n check$1(\n cube.width === radius && cube.height === radius,\n 'invalid cube map shape')\n params.color[i] = {\n target: GL_TEXTURE_CUBE_MAP_POSITIVE_X$2,\n data: colorCubes[i]\n }\n }\n\n for (i = 0; i < 6; ++i) {\n for (var j = 0; j < colorCubes.length; ++j) {\n params.color[j].target = GL_TEXTURE_CUBE_MAP_POSITIVE_X$2 + i\n }\n // reuse depth-stencil attachments across all cube maps\n if (i > 0) {\n params.depth = faces[0].depth\n params.stencil = faces[0].stencil\n params.depthStencil = faces[0].depthStencil\n }\n if (faces[i]) {\n (faces[i])(params)\n } else {\n faces[i] = createFBO(params)\n }\n }\n\n return extend(reglFramebufferCube, {\n width: radius,\n height: radius,\n color: colorCubes\n })\n }\n\n function resize (radius_) {\n var i\n var radius = radius_ | 0\n check$1(radius > 0 && radius <= limits.maxCubeMapSize,\n 'invalid radius for cube fbo')\n\n if (radius === reglFramebufferCube.width) {\n return reglFramebufferCube\n }\n\n var colors = reglFramebufferCube.color\n for (i = 0; i < colors.length; ++i) {\n colors[i].resize(radius)\n }\n\n for (i = 0; i < 6; ++i) {\n faces[i].resize(radius)\n }\n\n reglFramebufferCube.width = reglFramebufferCube.height = radius\n\n return reglFramebufferCube\n }\n\n reglFramebufferCube(options)\n\n return extend(reglFramebufferCube, {\n faces: faces,\n resize: resize,\n _reglType: 'framebufferCube',\n destroy: function () {\n faces.forEach(function (f) {\n f.destroy()\n })\n }\n })\n }\n\n function restoreFramebuffers () {\n framebufferState.cur = null\n framebufferState.next = null\n framebufferState.dirty = true\n values(framebufferSet).forEach(function (fb) {\n fb.framebuffer = gl.createFramebuffer()\n updateFramebuffer(fb)\n })\n }\n\n return extend(framebufferState, {\n getFramebuffer: function (object) {\n if (typeof object === 'function' && object._reglType === 'framebuffer') {\n var fbo = object._framebuffer\n if (fbo instanceof REGLFramebuffer) {\n return fbo\n }\n }\n return null\n },\n create: createFBO,\n createCube: createCubeFBO,\n clear: function () {\n values(framebufferSet).forEach(destroy)\n },\n restore: restoreFramebuffers\n })\n}\n\nvar GL_FLOAT$6 = 5126\nvar GL_ARRAY_BUFFER$1 = 34962\n\nfunction AttributeRecord () {\n this.state = 0\n\n this.x = 0.0\n this.y = 0.0\n this.z = 0.0\n this.w = 0.0\n\n this.buffer = null\n this.size = 0\n this.normalized = false\n this.type = GL_FLOAT$6\n this.offset = 0\n this.stride = 0\n this.divisor = 0\n}\n\nfunction wrapAttributeState (\n gl,\n extensions,\n limits,\n stats,\n bufferState) {\n var NUM_ATTRIBUTES = limits.maxAttributes\n var attributeBindings = new Array(NUM_ATTRIBUTES)\n for (var i = 0; i < NUM_ATTRIBUTES; ++i) {\n attributeBindings[i] = new AttributeRecord()\n }\n var vaoCount = 0\n var vaoSet = {}\n\n var state = {\n Record: AttributeRecord,\n scope: {},\n state: attributeBindings,\n currentVAO: null,\n targetVAO: null,\n restore: extVAO() ? restoreVAO : function () {},\n createVAO: createVAO,\n getVAO: getVAO,\n destroyBuffer: destroyBuffer,\n setVAO: extVAO() ? setVAOEXT : setVAOEmulated,\n clear: extVAO() ? destroyVAOEXT : function () {}\n }\n\n function destroyBuffer (buffer) {\n for (var i = 0; i < attributeBindings.length; ++i) {\n var record = attributeBindings[i]\n if (record.buffer === buffer) {\n gl.disableVertexAttribArray(i)\n record.buffer = null\n }\n }\n }\n\n function extVAO () {\n return extensions.oes_vertex_array_object\n }\n\n function extInstanced () {\n return extensions.angle_instanced_arrays\n }\n\n function getVAO (vao) {\n if (typeof vao === 'function' && vao._vao) {\n return vao._vao\n }\n return null\n }\n\n function setVAOEXT (vao) {\n if (vao === state.currentVAO) {\n return\n }\n var ext = extVAO()\n if (vao) {\n ext.bindVertexArrayOES(vao.vao)\n } else {\n ext.bindVertexArrayOES(null)\n }\n state.currentVAO = vao\n }\n\n function setVAOEmulated (vao) {\n if (vao === state.currentVAO) {\n return\n }\n if (vao) {\n vao.bindAttrs()\n } else {\n var exti = extInstanced()\n for (var i = 0; i < attributeBindings.length; ++i) {\n var binding = attributeBindings[i]\n if (binding.buffer) {\n gl.enableVertexAttribArray(i)\n gl.vertexAttribPointer(i, binding.size, binding.type, binding.normalized, binding.stride, binding.offfset)\n if (exti && binding.divisor) {\n exti.vertexAttribDivisorANGLE(i, binding.divisor)\n }\n } else {\n gl.disableVertexAttribArray(i)\n gl.vertexAttrib4f(i, binding.x, binding.y, binding.z, binding.w)\n }\n }\n }\n state.currentVAO = vao\n }\n\n function destroyVAOEXT () {\n values(vaoSet).forEach(function (vao) {\n vao.destroy()\n })\n }\n\n function REGLVAO () {\n this.id = ++vaoCount\n this.attributes = []\n var extension = extVAO()\n if (extension) {\n this.vao = extension.createVertexArrayOES()\n } else {\n this.vao = null\n }\n vaoSet[this.id] = this\n this.buffers = []\n }\n\n REGLVAO.prototype.bindAttrs = function () {\n var exti = extInstanced()\n var attributes = this.attributes\n for (var i = 0; i < attributes.length; ++i) {\n var attr = attributes[i]\n if (attr.buffer) {\n gl.enableVertexAttribArray(i)\n gl.bindBuffer(GL_ARRAY_BUFFER$1, attr.buffer.buffer)\n gl.vertexAttribPointer(i, attr.size, attr.type, attr.normalized, attr.stride, attr.offset)\n if (exti && attr.divisor) {\n exti.vertexAttribDivisorANGLE(i, attr.divisor)\n }\n } else {\n gl.disableVertexAttribArray(i)\n gl.vertexAttrib4f(i, attr.x, attr.y, attr.z, attr.w)\n }\n }\n for (var j = attributes.length; j < NUM_ATTRIBUTES; ++j) {\n gl.disableVertexAttribArray(j)\n }\n }\n\n REGLVAO.prototype.refresh = function () {\n var ext = extVAO()\n if (ext) {\n ext.bindVertexArrayOES(this.vao)\n this.bindAttrs()\n state.currentVAO = this\n }\n }\n\n REGLVAO.prototype.destroy = function () {\n if (this.vao) {\n var extension = extVAO()\n if (this === state.currentVAO) {\n state.currentVAO = null\n extension.bindVertexArrayOES(null)\n }\n extension.deleteVertexArrayOES(this.vao)\n this.vao = null\n }\n if (vaoSet[this.id]) {\n delete vaoSet[this.id]\n stats.vaoCount -= 1\n }\n }\n\n function restoreVAO () {\n var ext = extVAO()\n if (ext) {\n values(vaoSet).forEach(function (vao) {\n vao.refresh()\n })\n }\n }\n\n function createVAO (_attr) {\n var vao = new REGLVAO()\n stats.vaoCount += 1\n\n function updateVAO (attributes) {\n check$1(Array.isArray(attributes), 'arguments to vertex array constructor must be an array')\n check$1(attributes.length < NUM_ATTRIBUTES, 'too many attributes')\n check$1(attributes.length > 0, 'must specify at least one attribute')\n\n var bufUpdated = {}\n var nattributes = vao.attributes\n nattributes.length = attributes.length\n for (var i = 0; i < attributes.length; ++i) {\n var spec = attributes[i]\n var rec = nattributes[i] = new AttributeRecord()\n var data = spec.data || spec\n if (Array.isArray(data) || isTypedArray(data) || isNDArrayLike(data)) {\n var buf\n if (vao.buffers[i]) {\n buf = vao.buffers[i]\n if (isTypedArray(data) && buf._buffer.byteLength >= data.byteLength) {\n buf.subdata(data)\n } else {\n buf.destroy()\n vao.buffers[i] = null\n }\n }\n if (!vao.buffers[i]) {\n buf = vao.buffers[i] = bufferState.create(spec, GL_ARRAY_BUFFER$1, false, true)\n }\n rec.buffer = bufferState.getBuffer(buf)\n rec.size = rec.buffer.dimension | 0\n rec.normalized = false\n rec.type = rec.buffer.dtype\n rec.offset = 0\n rec.stride = 0\n rec.divisor = 0\n rec.state = 1\n bufUpdated[i] = 1\n } else if (bufferState.getBuffer(spec)) {\n rec.buffer = bufferState.getBuffer(spec)\n rec.size = rec.buffer.dimension | 0\n rec.normalized = false\n rec.type = rec.buffer.dtype\n rec.offset = 0\n rec.stride = 0\n rec.divisor = 0\n rec.state = 1\n } else if (bufferState.getBuffer(spec.buffer)) {\n rec.buffer = bufferState.getBuffer(spec.buffer)\n rec.size = ((+spec.size) || rec.buffer.dimension) | 0\n rec.normalized = !!spec.normalized || false\n if ('type' in spec) {\n check$1.parameter(spec.type, glTypes, 'invalid buffer type')\n rec.type = glTypes[spec.type]\n } else {\n rec.type = rec.buffer.dtype\n }\n rec.offset = (spec.offset || 0) | 0\n rec.stride = (spec.stride || 0) | 0\n rec.divisor = (spec.divisor || 0) | 0\n rec.state = 1\n\n check$1(rec.size >= 1 && rec.size <= 4, 'size must be between 1 and 4')\n check$1(rec.offset >= 0, 'invalid offset')\n check$1(rec.stride >= 0 && rec.stride <= 255, 'stride must be between 0 and 255')\n check$1(rec.divisor >= 0, 'divisor must be positive')\n check$1(!rec.divisor || !!extensions.angle_instanced_arrays, 'ANGLE_instanced_arrays must be enabled to use divisor')\n } else if ('x' in spec) {\n check$1(i > 0, 'first attribute must not be a constant')\n rec.x = +spec.x || 0\n rec.y = +spec.y || 0\n rec.z = +spec.z || 0\n rec.w = +spec.w || 0\n rec.state = 2\n } else {\n check$1(false, 'invalid attribute spec for location ' + i)\n }\n }\n\n // retire unused buffers\n for (var j = 0; j < vao.buffers.length; ++j) {\n if (!bufUpdated[j] && vao.buffers[j]) {\n vao.buffers[j].destroy()\n vao.buffers[j] = null\n }\n }\n\n vao.refresh()\n return updateVAO\n }\n\n updateVAO.destroy = function () {\n for (var j = 0; j < vao.buffers.length; ++j) {\n if (vao.buffers[j]) {\n vao.buffers[j].destroy()\n }\n }\n vao.buffers.length = 0\n vao.destroy()\n }\n\n updateVAO._vao = vao\n updateVAO._reglType = 'vao'\n\n return updateVAO(_attr)\n }\n\n return state\n}\n\nvar GL_FRAGMENT_SHADER = 35632\nvar GL_VERTEX_SHADER = 35633\n\nvar GL_ACTIVE_UNIFORMS = 0x8B86\nvar GL_ACTIVE_ATTRIBUTES = 0x8B89\n\nfunction wrapShaderState (gl, stringStore, stats, config) {\n // ===================================================\n // glsl compilation and linking\n // ===================================================\n var fragShaders = {}\n var vertShaders = {}\n\n function ActiveInfo (name, id, location, info) {\n this.name = name\n this.id = id\n this.location = location\n this.info = info\n }\n\n function insertActiveInfo (list, info) {\n for (var i = 0; i < list.length; ++i) {\n if (list[i].id === info.id) {\n list[i].location = info.location\n return\n }\n }\n list.push(info)\n }\n\n function getShader (type, id, command) {\n var cache = type === GL_FRAGMENT_SHADER ? fragShaders : vertShaders\n var shader = cache[id]\n\n if (!shader) {\n var source = stringStore.str(id)\n shader = gl.createShader(type)\n gl.shaderSource(shader, source)\n gl.compileShader(shader)\n check$1.shaderError(gl, shader, source, type, command)\n cache[id] = shader\n }\n\n return shader\n }\n\n // ===================================================\n // program linking\n // ===================================================\n var programCache = {}\n var programList = []\n\n var PROGRAM_COUNTER = 0\n\n function REGLProgram (fragId, vertId) {\n this.id = PROGRAM_COUNTER++\n this.fragId = fragId\n this.vertId = vertId\n this.program = null\n this.uniforms = []\n this.attributes = []\n this.refCount = 1\n\n if (config.profile) {\n this.stats = {\n uniformsCount: 0,\n attributesCount: 0\n }\n }\n }\n\n function linkProgram (desc, command, attributeLocations) {\n var i, info\n\n // -------------------------------\n // compile & link\n // -------------------------------\n var fragShader = getShader(GL_FRAGMENT_SHADER, desc.fragId)\n var vertShader = getShader(GL_VERTEX_SHADER, desc.vertId)\n\n var program = desc.program = gl.createProgram()\n gl.attachShader(program, fragShader)\n gl.attachShader(program, vertShader)\n if (attributeLocations) {\n for (i = 0; i < attributeLocations.length; ++i) {\n var binding = attributeLocations[i]\n gl.bindAttribLocation(program, binding[0], binding[1])\n }\n }\n\n gl.linkProgram(program)\n check$1.linkError(\n gl,\n program,\n stringStore.str(desc.fragId),\n stringStore.str(desc.vertId),\n command)\n\n // -------------------------------\n // grab uniforms\n // -------------------------------\n var numUniforms = gl.getProgramParameter(program, GL_ACTIVE_UNIFORMS)\n if (config.profile) {\n desc.stats.uniformsCount = numUniforms\n }\n var uniforms = desc.uniforms\n for (i = 0; i < numUniforms; ++i) {\n info = gl.getActiveUniform(program, i)\n if (info) {\n if (info.size > 1) {\n for (var j = 0; j < info.size; ++j) {\n var name = info.name.replace('[0]', '[' + j + ']')\n insertActiveInfo(uniforms, new ActiveInfo(\n name,\n stringStore.id(name),\n gl.getUniformLocation(program, name),\n info))\n }\n } else {\n insertActiveInfo(uniforms, new ActiveInfo(\n info.name,\n stringStore.id(info.name),\n gl.getUniformLocation(program, info.name),\n info))\n }\n }\n }\n\n // -------------------------------\n // grab attributes\n // -------------------------------\n var numAttributes = gl.getProgramParameter(program, GL_ACTIVE_ATTRIBUTES)\n if (config.profile) {\n desc.stats.attributesCount = numAttributes\n }\n\n var attributes = desc.attributes\n for (i = 0; i < numAttributes; ++i) {\n info = gl.getActiveAttrib(program, i)\n if (info) {\n insertActiveInfo(attributes, new ActiveInfo(\n info.name,\n stringStore.id(info.name),\n gl.getAttribLocation(program, info.name),\n info))\n }\n }\n }\n\n if (config.profile) {\n stats.getMaxUniformsCount = function () {\n var m = 0\n programList.forEach(function (desc) {\n if (desc.stats.uniformsCount > m) {\n m = desc.stats.uniformsCount\n }\n })\n return m\n }\n\n stats.getMaxAttributesCount = function () {\n var m = 0\n programList.forEach(function (desc) {\n if (desc.stats.attributesCount > m) {\n m = desc.stats.attributesCount\n }\n })\n return m\n }\n }\n\n function restoreShaders () {\n fragShaders = {}\n vertShaders = {}\n for (var i = 0; i < programList.length; ++i) {\n linkProgram(programList[i], null, programList[i].attributes.map(function (info) {\n return [info.location, info.name]\n }))\n }\n }\n\n return {\n clear: function () {\n var deleteShader = gl.deleteShader.bind(gl)\n values(fragShaders).forEach(deleteShader)\n fragShaders = {}\n values(vertShaders).forEach(deleteShader)\n vertShaders = {}\n\n programList.forEach(function (desc) {\n gl.deleteProgram(desc.program)\n })\n programList.length = 0\n programCache = {}\n\n stats.shaderCount = 0\n },\n\n program: function (vertId, fragId, command, attribLocations) {\n check$1.command(vertId >= 0, 'missing vertex shader', command)\n check$1.command(fragId >= 0, 'missing fragment shader', command)\n\n var cache = programCache[fragId]\n if (!cache) {\n cache = programCache[fragId] = {}\n }\n var prevProgram = cache[vertId]\n if (prevProgram) {\n prevProgram.refCount++\n if (!attribLocations) {\n return prevProgram\n }\n }\n var program = new REGLProgram(fragId, vertId)\n stats.shaderCount++\n linkProgram(program, command, attribLocations)\n if (!prevProgram) {\n cache[vertId] = program\n }\n programList.push(program)\n return extend(program, {\n destroy: function () {\n program.refCount--\n if (program.refCount <= 0) {\n gl.deleteProgram(program.program)\n var idx = programList.indexOf(program)\n programList.splice(idx, 1)\n stats.shaderCount--\n }\n // no program is linked to this vert anymore\n if (cache[program.vertId].refCount <= 0) {\n gl.deleteShader(vertShaders[program.vertId])\n delete vertShaders[program.vertId]\n delete programCache[program.fragId][program.vertId]\n }\n // no program is linked to this frag anymore\n if (!Object.keys(programCache[program.fragId]).length) {\n gl.deleteShader(fragShaders[program.fragId])\n delete fragShaders[program.fragId]\n delete programCache[program.fragId]\n }\n }\n })\n },\n\n restore: restoreShaders,\n\n shader: getShader,\n\n frag: -1,\n vert: -1\n }\n}\n\nvar GL_RGBA$3 = 6408\nvar GL_UNSIGNED_BYTE$7 = 5121\nvar GL_PACK_ALIGNMENT = 0x0D05\nvar GL_FLOAT$7 = 0x1406 // 5126\n\nfunction wrapReadPixels (\n gl,\n framebufferState,\n reglPoll,\n context,\n glAttributes,\n extensions,\n limits) {\n function readPixelsImpl (input) {\n var type\n if (framebufferState.next === null) {\n check$1(\n glAttributes.preserveDrawingBuffer,\n 'you must create a webgl context with \"preserveDrawingBuffer\":true in order to read pixels from the drawing buffer')\n type = GL_UNSIGNED_BYTE$7\n } else {\n check$1(\n framebufferState.next.colorAttachments[0].texture !== null,\n 'You cannot read from a renderbuffer')\n type = framebufferState.next.colorAttachments[0].texture._texture.type\n\n if (extensions.oes_texture_float) {\n check$1(\n type === GL_UNSIGNED_BYTE$7 || type === GL_FLOAT$7,\n 'Reading from a framebuffer is only allowed for the types \\'uint8\\' and \\'float\\'')\n\n if (type === GL_FLOAT$7) {\n check$1(limits.readFloat, 'Reading \\'float\\' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float')\n }\n } else {\n check$1(\n type === GL_UNSIGNED_BYTE$7,\n 'Reading from a framebuffer is only allowed for the type \\'uint8\\'')\n }\n }\n\n var x = 0\n var y = 0\n var width = context.framebufferWidth\n var height = context.framebufferHeight\n var data = null\n\n if (isTypedArray(input)) {\n data = input\n } else if (input) {\n check$1.type(input, 'object', 'invalid arguments to regl.read()')\n x = input.x | 0\n y = input.y | 0\n check$1(\n x >= 0 && x < context.framebufferWidth,\n 'invalid x offset for regl.read')\n check$1(\n y >= 0 && y < context.framebufferHeight,\n 'invalid y offset for regl.read')\n width = (input.width || (context.framebufferWidth - x)) | 0\n height = (input.height || (context.framebufferHeight - y)) | 0\n data = input.data || null\n }\n\n // sanity check input.data\n if (data) {\n if (type === GL_UNSIGNED_BYTE$7) {\n check$1(\n data instanceof Uint8Array,\n 'buffer must be \\'Uint8Array\\' when reading from a framebuffer of type \\'uint8\\'')\n } else if (type === GL_FLOAT$7) {\n check$1(\n data instanceof Float32Array,\n 'buffer must be \\'Float32Array\\' when reading from a framebuffer of type \\'float\\'')\n }\n }\n\n check$1(\n width > 0 && width + x <= context.framebufferWidth,\n 'invalid width for read pixels')\n check$1(\n height > 0 && height + y <= context.framebufferHeight,\n 'invalid height for read pixels')\n\n // Update WebGL state\n reglPoll()\n\n // Compute size\n var size = width * height * 4\n\n // Allocate data\n if (!data) {\n if (type === GL_UNSIGNED_BYTE$7) {\n data = new Uint8Array(size)\n } else if (type === GL_FLOAT$7) {\n data = data || new Float32Array(size)\n }\n }\n\n // Type check\n check$1.isTypedArray(data, 'data buffer for regl.read() must be a typedarray')\n check$1(data.byteLength >= size, 'data buffer for regl.read() too small')\n\n // Run read pixels\n gl.pixelStorei(GL_PACK_ALIGNMENT, 4)\n gl.readPixels(x, y, width, height, GL_RGBA$3,\n type,\n data)\n\n return data\n }\n\n function readPixelsFBO (options) {\n var result\n framebufferState.setFBO({\n framebuffer: options.framebuffer\n }, function () {\n result = readPixelsImpl(options)\n })\n return result\n }\n\n function readPixels (options) {\n if (!options || !('framebuffer' in options)) {\n return readPixelsImpl(options)\n } else {\n return readPixelsFBO(options)\n }\n }\n\n return readPixels\n}\n\nfunction slice (x) {\n return Array.prototype.slice.call(x)\n}\n\nfunction join (x) {\n return slice(x).join('')\n}\n\nfunction createEnvironment () {\n // Unique variable id counter\n var varCounter = 0\n\n // Linked values are passed from this scope into the generated code block\n // Calling link() passes a value into the generated scope and returns\n // the variable name which it is bound to\n var linkedNames = []\n var linkedValues = []\n function link (value) {\n for (var i = 0; i < linkedValues.length; ++i) {\n if (linkedValues[i] === value) {\n return linkedNames[i]\n }\n }\n\n var name = 'g' + (varCounter++)\n linkedNames.push(name)\n linkedValues.push(value)\n return name\n }\n\n // create a code block\n function block () {\n var code = []\n function push () {\n code.push.apply(code, slice(arguments))\n }\n\n var vars = []\n function def () {\n var name = 'v' + (varCounter++)\n vars.push(name)\n\n if (arguments.length > 0) {\n code.push(name, '=')\n code.push.apply(code, slice(arguments))\n code.push(';')\n }\n\n return name\n }\n\n return extend(push, {\n def: def,\n toString: function () {\n return join([\n (vars.length > 0 ? 'var ' + vars.join(',') + ';' : ''),\n join(code)\n ])\n }\n })\n }\n\n function scope () {\n var entry = block()\n var exit = block()\n\n var entryToString = entry.toString\n var exitToString = exit.toString\n\n function save (object, prop) {\n exit(object, prop, '=', entry.def(object, prop), ';')\n }\n\n return extend(function () {\n entry.apply(entry, slice(arguments))\n }, {\n def: entry.def,\n entry: entry,\n exit: exit,\n save: save,\n set: function (object, prop, value) {\n save(object, prop)\n entry(object, prop, '=', value, ';')\n },\n toString: function () {\n return entryToString() + exitToString()\n }\n })\n }\n\n function conditional () {\n var pred = join(arguments)\n var thenBlock = scope()\n var elseBlock = scope()\n\n var thenToString = thenBlock.toString\n var elseToString = elseBlock.toString\n\n return extend(thenBlock, {\n then: function () {\n thenBlock.apply(thenBlock, slice(arguments))\n return this\n },\n else: function () {\n elseBlock.apply(elseBlock, slice(arguments))\n return this\n },\n toString: function () {\n var elseClause = elseToString()\n if (elseClause) {\n elseClause = 'else{' + elseClause + '}'\n }\n return join([\n 'if(', pred, '){',\n thenToString(),\n '}', elseClause\n ])\n }\n })\n }\n\n // procedure list\n var globalBlock = block()\n var procedures = {}\n function proc (name, count) {\n var args = []\n function arg () {\n var name = 'a' + args.length\n args.push(name)\n return name\n }\n\n count = count || 0\n for (var i = 0; i < count; ++i) {\n arg()\n }\n\n var body = scope()\n var bodyToString = body.toString\n\n var result = procedures[name] = extend(body, {\n arg: arg,\n toString: function () {\n return join([\n 'function(', args.join(), '){',\n bodyToString(),\n '}'\n ])\n }\n })\n\n return result\n }\n\n function compile () {\n var code = ['\"use strict\";',\n globalBlock,\n 'return {']\n Object.keys(procedures).forEach(function (name) {\n code.push('\"', name, '\":', procedures[name].toString(), ',')\n })\n code.push('}')\n var src = join(code)\n .replace(/;/g, ';\\n')\n .replace(/}/g, '}\\n')\n .replace(/{/g, '{\\n')\n var proc = Function.apply(null, linkedNames.concat(src))\n return proc.apply(null, linkedValues)\n }\n\n return {\n global: globalBlock,\n link: link,\n block: block,\n proc: proc,\n scope: scope,\n cond: conditional,\n compile: compile\n }\n}\n\n// \"cute\" names for vector components\nvar CUTE_COMPONENTS = 'xyzw'.split('')\n\nvar GL_UNSIGNED_BYTE$8 = 5121\n\nvar ATTRIB_STATE_POINTER = 1\nvar ATTRIB_STATE_CONSTANT = 2\n\nvar DYN_FUNC$1 = 0\nvar DYN_PROP$1 = 1\nvar DYN_CONTEXT$1 = 2\nvar DYN_STATE$1 = 3\nvar DYN_THUNK = 4\nvar DYN_CONSTANT$1 = 5\nvar DYN_ARRAY$1 = 6\n\nvar S_DITHER = 'dither'\nvar S_BLEND_ENABLE = 'blend.enable'\nvar S_BLEND_COLOR = 'blend.color'\nvar S_BLEND_EQUATION = 'blend.equation'\nvar S_BLEND_FUNC = 'blend.func'\nvar S_DEPTH_ENABLE = 'depth.enable'\nvar S_DEPTH_FUNC = 'depth.func'\nvar S_DEPTH_RANGE = 'depth.range'\nvar S_DEPTH_MASK = 'depth.mask'\nvar S_COLOR_MASK = 'colorMask'\nvar S_CULL_ENABLE = 'cull.enable'\nvar S_CULL_FACE = 'cull.face'\nvar S_FRONT_FACE = 'frontFace'\nvar S_LINE_WIDTH = 'lineWidth'\nvar S_POLYGON_OFFSET_ENABLE = 'polygonOffset.enable'\nvar S_POLYGON_OFFSET_OFFSET = 'polygonOffset.offset'\nvar S_SAMPLE_ALPHA = 'sample.alpha'\nvar S_SAMPLE_ENABLE = 'sample.enable'\nvar S_SAMPLE_COVERAGE = 'sample.coverage'\nvar S_STENCIL_ENABLE = 'stencil.enable'\nvar S_STENCIL_MASK = 'stencil.mask'\nvar S_STENCIL_FUNC = 'stencil.func'\nvar S_STENCIL_OPFRONT = 'stencil.opFront'\nvar S_STENCIL_OPBACK = 'stencil.opBack'\nvar S_SCISSOR_ENABLE = 'scissor.enable'\nvar S_SCISSOR_BOX = 'scissor.box'\nvar S_VIEWPORT = 'viewport'\n\nvar S_PROFILE = 'profile'\n\nvar S_FRAMEBUFFER = 'framebuffer'\nvar S_VERT = 'vert'\nvar S_FRAG = 'frag'\nvar S_ELEMENTS = 'elements'\nvar S_PRIMITIVE = 'primitive'\nvar S_COUNT = 'count'\nvar S_OFFSET = 'offset'\nvar S_INSTANCES = 'instances'\nvar S_VAO = 'vao'\n\nvar SUFFIX_WIDTH = 'Width'\nvar SUFFIX_HEIGHT = 'Height'\n\nvar S_FRAMEBUFFER_WIDTH = S_FRAMEBUFFER + SUFFIX_WIDTH\nvar S_FRAMEBUFFER_HEIGHT = S_FRAMEBUFFER + SUFFIX_HEIGHT\nvar S_VIEWPORT_WIDTH = S_VIEWPORT + SUFFIX_WIDTH\nvar S_VIEWPORT_HEIGHT = S_VIEWPORT + SUFFIX_HEIGHT\nvar S_DRAWINGBUFFER = 'drawingBuffer'\nvar S_DRAWINGBUFFER_WIDTH = S_DRAWINGBUFFER + SUFFIX_WIDTH\nvar S_DRAWINGBUFFER_HEIGHT = S_DRAWINGBUFFER + SUFFIX_HEIGHT\n\nvar NESTED_OPTIONS = [\n S_BLEND_FUNC,\n S_BLEND_EQUATION,\n S_STENCIL_FUNC,\n S_STENCIL_OPFRONT,\n S_STENCIL_OPBACK,\n S_SAMPLE_COVERAGE,\n S_VIEWPORT,\n S_SCISSOR_BOX,\n S_POLYGON_OFFSET_OFFSET\n]\n\nvar GL_ARRAY_BUFFER$2 = 34962\nvar GL_ELEMENT_ARRAY_BUFFER$1 = 34963\n\nvar GL_FRAGMENT_SHADER$1 = 35632\nvar GL_VERTEX_SHADER$1 = 35633\n\nvar GL_TEXTURE_2D$3 = 0x0DE1\nvar GL_TEXTURE_CUBE_MAP$2 = 0x8513\n\nvar GL_CULL_FACE = 0x0B44\nvar GL_BLEND = 0x0BE2\nvar GL_DITHER = 0x0BD0\nvar GL_STENCIL_TEST = 0x0B90\nvar GL_DEPTH_TEST = 0x0B71\nvar GL_SCISSOR_TEST = 0x0C11\nvar GL_POLYGON_OFFSET_FILL = 0x8037\nvar GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E\nvar GL_SAMPLE_COVERAGE = 0x80A0\n\nvar GL_FLOAT$8 = 5126\nvar GL_FLOAT_VEC2 = 35664\nvar GL_FLOAT_VEC3 = 35665\nvar GL_FLOAT_VEC4 = 35666\nvar GL_INT$3 = 5124\nvar GL_INT_VEC2 = 35667\nvar GL_INT_VEC3 = 35668\nvar GL_INT_VEC4 = 35669\nvar GL_BOOL = 35670\nvar GL_BOOL_VEC2 = 35671\nvar GL_BOOL_VEC3 = 35672\nvar GL_BOOL_VEC4 = 35673\nvar GL_FLOAT_MAT2 = 35674\nvar GL_FLOAT_MAT3 = 35675\nvar GL_FLOAT_MAT4 = 35676\nvar GL_SAMPLER_2D = 35678\nvar GL_SAMPLER_CUBE = 35680\n\nvar GL_TRIANGLES$1 = 4\n\nvar GL_FRONT = 1028\nvar GL_BACK = 1029\nvar GL_CW = 0x0900\nvar GL_CCW = 0x0901\nvar GL_MIN_EXT = 0x8007\nvar GL_MAX_EXT = 0x8008\nvar GL_ALWAYS = 519\nvar GL_KEEP = 7680\nvar GL_ZERO = 0\nvar GL_ONE = 1\nvar GL_FUNC_ADD = 0x8006\nvar GL_LESS = 513\n\nvar GL_FRAMEBUFFER$2 = 0x8D40\nvar GL_COLOR_ATTACHMENT0$2 = 0x8CE0\n\nvar blendFuncs = {\n '0': 0,\n '1': 1,\n 'zero': 0,\n 'one': 1,\n 'src color': 768,\n 'one minus src color': 769,\n 'src alpha': 770,\n 'one minus src alpha': 771,\n 'dst color': 774,\n 'one minus dst color': 775,\n 'dst alpha': 772,\n 'one minus dst alpha': 773,\n 'constant color': 32769,\n 'one minus constant color': 32770,\n 'constant alpha': 32771,\n 'one minus constant alpha': 32772,\n 'src alpha saturate': 776\n}\n\n// There are invalid values for srcRGB and dstRGB. See:\n// https://www.khronos.org/registry/webgl/specs/1.0/#6.13\n// https://github.com/KhronosGroup/WebGL/blob/0d3201f5f7ec3c0060bc1f04077461541f1987b9/conformance-suites/1.0.3/conformance/misc/webgl-specific.html#L56\nvar invalidBlendCombinations = [\n 'constant color, constant alpha',\n 'one minus constant color, constant alpha',\n 'constant color, one minus constant alpha',\n 'one minus constant color, one minus constant alpha',\n 'constant alpha, constant color',\n 'constant alpha, one minus constant color',\n 'one minus constant alpha, constant color',\n 'one minus constant alpha, one minus constant color'\n]\n\nvar compareFuncs = {\n 'never': 512,\n 'less': 513,\n '<': 513,\n 'equal': 514,\n '=': 514,\n '==': 514,\n '===': 514,\n 'lequal': 515,\n '<=': 515,\n 'greater': 516,\n '>': 516,\n 'notequal': 517,\n '!=': 517,\n '!==': 517,\n 'gequal': 518,\n '>=': 518,\n 'always': 519\n}\n\nvar stencilOps = {\n '0': 0,\n 'zero': 0,\n 'keep': 7680,\n 'replace': 7681,\n 'increment': 7682,\n 'decrement': 7683,\n 'increment wrap': 34055,\n 'decrement wrap': 34056,\n 'invert': 5386\n}\n\nvar shaderType = {\n 'frag': GL_FRAGMENT_SHADER$1,\n 'vert': GL_VERTEX_SHADER$1\n}\n\nvar orientationType = {\n 'cw': GL_CW,\n 'ccw': GL_CCW\n}\n\nfunction isBufferArgs (x) {\n return Array.isArray(x) ||\n isTypedArray(x) ||\n isNDArrayLike(x)\n}\n\n// Make sure viewport is processed first\nfunction sortState (state) {\n return state.sort(function (a, b) {\n if (a === S_VIEWPORT) {\n return -1\n } else if (b === S_VIEWPORT) {\n return 1\n }\n return (a < b) ? -1 : 1\n })\n}\n\nfunction Declaration (thisDep, contextDep, propDep, append) {\n this.thisDep = thisDep\n this.contextDep = contextDep\n this.propDep = propDep\n this.append = append\n}\n\nfunction isStatic (decl) {\n return decl && !(decl.thisDep || decl.contextDep || decl.propDep)\n}\n\nfunction createStaticDecl (append) {\n return new Declaration(false, false, false, append)\n}\n\nfunction createDynamicDecl (dyn, append) {\n var type = dyn.type\n if (type === DYN_FUNC$1) {\n var numArgs = dyn.data.length\n return new Declaration(\n true,\n numArgs >= 1,\n numArgs >= 2,\n append)\n } else if (type === DYN_THUNK) {\n var data = dyn.data\n return new Declaration(\n data.thisDep,\n data.contextDep,\n data.propDep,\n append)\n } else if (type === DYN_CONSTANT$1) {\n return new Declaration(\n false,\n false,\n false,\n append)\n } else if (type === DYN_ARRAY$1) {\n var thisDep = false\n var contextDep = false\n var propDep = false\n for (var i = 0; i < dyn.data.length; ++i) {\n var subDyn = dyn.data[i]\n if (subDyn.type === DYN_PROP$1) {\n propDep = true\n } else if (subDyn.type === DYN_CONTEXT$1) {\n contextDep = true\n } else if (subDyn.type === DYN_STATE$1) {\n thisDep = true\n } else if (subDyn.type === DYN_FUNC$1) {\n thisDep = true\n var subArgs = subDyn.data\n if (subArgs >= 1) {\n contextDep = true\n }\n if (subArgs >= 2) {\n propDep = true\n }\n } else if (subDyn.type === DYN_THUNK) {\n thisDep = thisDep || subDyn.data.thisDep\n contextDep = contextDep || subDyn.data.contextDep\n propDep = propDep || subDyn.data.propDep\n }\n }\n return new Declaration(\n thisDep,\n contextDep,\n propDep,\n append)\n } else {\n return new Declaration(\n type === DYN_STATE$1,\n type === DYN_CONTEXT$1,\n type === DYN_PROP$1,\n append)\n }\n}\n\nvar SCOPE_DECL = new Declaration(false, false, false, function () {})\n\nfunction reglCore (\n gl,\n stringStore,\n extensions,\n limits,\n bufferState,\n elementState,\n textureState,\n framebufferState,\n uniformState,\n attributeState,\n shaderState,\n drawState,\n contextState,\n timer,\n config) {\n var AttributeRecord = attributeState.Record\n\n var blendEquations = {\n 'add': 32774,\n 'subtract': 32778,\n 'reverse subtract': 32779\n }\n if (extensions.ext_blend_minmax) {\n blendEquations.min = GL_MIN_EXT\n blendEquations.max = GL_MAX_EXT\n }\n\n var extInstancing = extensions.angle_instanced_arrays\n var extDrawBuffers = extensions.webgl_draw_buffers\n\n // ===================================================\n // ===================================================\n // WEBGL STATE\n // ===================================================\n // ===================================================\n var currentState = {\n dirty: true,\n profile: config.profile\n }\n var nextState = {}\n var GL_STATE_NAMES = []\n var GL_FLAGS = {}\n var GL_VARIABLES = {}\n\n function propName (name) {\n return name.replace('.', '_')\n }\n\n function stateFlag (sname, cap, init) {\n var name = propName(sname)\n GL_STATE_NAMES.push(sname)\n nextState[name] = currentState[name] = !!init\n GL_FLAGS[name] = cap\n }\n\n function stateVariable (sname, func, init) {\n var name = propName(sname)\n GL_STATE_NAMES.push(sname)\n if (Array.isArray(init)) {\n currentState[name] = init.slice()\n nextState[name] = init.slice()\n } else {\n currentState[name] = nextState[name] = init\n }\n GL_VARIABLES[name] = func\n }\n\n // Dithering\n stateFlag(S_DITHER, GL_DITHER)\n\n // Blending\n stateFlag(S_BLEND_ENABLE, GL_BLEND)\n stateVariable(S_BLEND_COLOR, 'blendColor', [0, 0, 0, 0])\n stateVariable(S_BLEND_EQUATION, 'blendEquationSeparate',\n [GL_FUNC_ADD, GL_FUNC_ADD])\n stateVariable(S_BLEND_FUNC, 'blendFuncSeparate',\n [GL_ONE, GL_ZERO, GL_ONE, GL_ZERO])\n\n // Depth\n stateFlag(S_DEPTH_ENABLE, GL_DEPTH_TEST, true)\n stateVariable(S_DEPTH_FUNC, 'depthFunc', GL_LESS)\n stateVariable(S_DEPTH_RANGE, 'depthRange', [0, 1])\n stateVariable(S_DEPTH_MASK, 'depthMask', true)\n\n // Color mask\n stateVariable(S_COLOR_MASK, S_COLOR_MASK, [true, true, true, true])\n\n // Face culling\n stateFlag(S_CULL_ENABLE, GL_CULL_FACE)\n stateVariable(S_CULL_FACE, 'cullFace', GL_BACK)\n\n // Front face orientation\n stateVariable(S_FRONT_FACE, S_FRONT_FACE, GL_CCW)\n\n // Line width\n stateVariable(S_LINE_WIDTH, S_LINE_WIDTH, 1)\n\n // Polygon offset\n stateFlag(S_POLYGON_OFFSET_ENABLE, GL_POLYGON_OFFSET_FILL)\n stateVariable(S_POLYGON_OFFSET_OFFSET, 'polygonOffset', [0, 0])\n\n // Sample coverage\n stateFlag(S_SAMPLE_ALPHA, GL_SAMPLE_ALPHA_TO_COVERAGE)\n stateFlag(S_SAMPLE_ENABLE, GL_SAMPLE_COVERAGE)\n stateVariable(S_SAMPLE_COVERAGE, 'sampleCoverage', [1, false])\n\n // Stencil\n stateFlag(S_STENCIL_ENABLE, GL_STENCIL_TEST)\n stateVariable(S_STENCIL_MASK, 'stencilMask', -1)\n stateVariable(S_STENCIL_FUNC, 'stencilFunc', [GL_ALWAYS, 0, -1])\n stateVariable(S_STENCIL_OPFRONT, 'stencilOpSeparate',\n [GL_FRONT, GL_KEEP, GL_KEEP, GL_KEEP])\n stateVariable(S_STENCIL_OPBACK, 'stencilOpSeparate',\n [GL_BACK, GL_KEEP, GL_KEEP, GL_KEEP])\n\n // Scissor\n stateFlag(S_SCISSOR_ENABLE, GL_SCISSOR_TEST)\n stateVariable(S_SCISSOR_BOX, 'scissor',\n [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight])\n\n // Viewport\n stateVariable(S_VIEWPORT, S_VIEWPORT,\n [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight])\n\n // ===================================================\n // ===================================================\n // ENVIRONMENT\n // ===================================================\n // ===================================================\n var sharedState = {\n gl: gl,\n context: contextState,\n strings: stringStore,\n next: nextState,\n current: currentState,\n draw: drawState,\n elements: elementState,\n buffer: bufferState,\n shader: shaderState,\n attributes: attributeState.state,\n vao: attributeState,\n uniforms: uniformState,\n framebuffer: framebufferState,\n extensions: extensions,\n\n timer: timer,\n isBufferArgs: isBufferArgs\n }\n\n var sharedConstants = {\n primTypes: primTypes,\n compareFuncs: compareFuncs,\n blendFuncs: blendFuncs,\n blendEquations: blendEquations,\n stencilOps: stencilOps,\n glTypes: glTypes,\n orientationType: orientationType\n }\n\n check$1.optional(function () {\n sharedState.isArrayLike = isArrayLike\n })\n\n if (extDrawBuffers) {\n sharedConstants.backBuffer = [GL_BACK]\n sharedConstants.drawBuffer = loop(limits.maxDrawbuffers, function (i) {\n if (i === 0) {\n return [0]\n }\n return loop(i, function (j) {\n return GL_COLOR_ATTACHMENT0$2 + j\n })\n })\n }\n\n var drawCallCounter = 0\n function createREGLEnvironment () {\n var env = createEnvironment()\n var link = env.link\n var global = env.global\n env.id = drawCallCounter++\n\n env.batchId = '0'\n\n // link shared state\n var SHARED = link(sharedState)\n var shared = env.shared = {\n props: 'a0'\n }\n Object.keys(sharedState).forEach(function (prop) {\n shared[prop] = global.def(SHARED, '.', prop)\n })\n\n // Inject runtime assertion stuff for debug builds\n check$1.optional(function () {\n env.CHECK = link(check$1)\n env.commandStr = check$1.guessCommand()\n env.command = link(env.commandStr)\n env.assert = function (block, pred, message) {\n block(\n 'if(!(', pred, '))',\n this.CHECK, '.commandRaise(', link(message), ',', this.command, ');')\n }\n\n sharedConstants.invalidBlendCombinations = invalidBlendCombinations\n })\n\n // Copy GL state variables over\n var nextVars = env.next = {}\n var currentVars = env.current = {}\n Object.keys(GL_VARIABLES).forEach(function (variable) {\n if (Array.isArray(currentState[variable])) {\n nextVars[variable] = global.def(shared.next, '.', variable)\n currentVars[variable] = global.def(shared.current, '.', variable)\n }\n })\n\n // Initialize shared constants\n var constants = env.constants = {}\n Object.keys(sharedConstants).forEach(function (name) {\n constants[name] = global.def(JSON.stringify(sharedConstants[name]))\n })\n\n // Helper function for calling a block\n env.invoke = function (block, x) {\n switch (x.type) {\n case DYN_FUNC$1:\n var argList = [\n 'this',\n shared.context,\n shared.props,\n env.batchId\n ]\n return block.def(\n link(x.data), '.call(',\n argList.slice(0, Math.max(x.data.length + 1, 4)),\n ')')\n case DYN_PROP$1:\n return block.def(shared.props, x.data)\n case DYN_CONTEXT$1:\n return block.def(shared.context, x.data)\n case DYN_STATE$1:\n return block.def('this', x.data)\n case DYN_THUNK:\n x.data.append(env, block)\n return x.data.ref\n case DYN_CONSTANT$1:\n return x.data.toString()\n case DYN_ARRAY$1:\n return x.data.map(function (y) {\n return env.invoke(block, y)\n })\n }\n }\n\n env.attribCache = {}\n\n var scopeAttribs = {}\n env.scopeAttrib = function (name) {\n var id = stringStore.id(name)\n if (id in scopeAttribs) {\n return scopeAttribs[id]\n }\n var binding = attributeState.scope[id]\n if (!binding) {\n binding = attributeState.scope[id] = new AttributeRecord()\n }\n var result = scopeAttribs[id] = link(binding)\n return result\n }\n\n return env\n }\n\n // ===================================================\n // ===================================================\n // PARSING\n // ===================================================\n // ===================================================\n function parseProfile (options) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n var profileEnable\n if (S_PROFILE in staticOptions) {\n var value = !!staticOptions[S_PROFILE]\n profileEnable = createStaticDecl(function (env, scope) {\n return value\n })\n profileEnable.enable = value\n } else if (S_PROFILE in dynamicOptions) {\n var dyn = dynamicOptions[S_PROFILE]\n profileEnable = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n }\n\n return profileEnable\n }\n\n function parseFramebuffer (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n if (S_FRAMEBUFFER in staticOptions) {\n var framebuffer = staticOptions[S_FRAMEBUFFER]\n if (framebuffer) {\n framebuffer = framebufferState.getFramebuffer(framebuffer)\n check$1.command(framebuffer, 'invalid framebuffer object')\n return createStaticDecl(function (env, block) {\n var FRAMEBUFFER = env.link(framebuffer)\n var shared = env.shared\n block.set(\n shared.framebuffer,\n '.next',\n FRAMEBUFFER)\n var CONTEXT = shared.context\n block.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n FRAMEBUFFER + '.width')\n block.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n FRAMEBUFFER + '.height')\n return FRAMEBUFFER\n })\n } else {\n return createStaticDecl(function (env, scope) {\n var shared = env.shared\n scope.set(\n shared.framebuffer,\n '.next',\n 'null')\n var CONTEXT = shared.context\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n CONTEXT + '.' + S_DRAWINGBUFFER_WIDTH)\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n CONTEXT + '.' + S_DRAWINGBUFFER_HEIGHT)\n return 'null'\n })\n }\n } else if (S_FRAMEBUFFER in dynamicOptions) {\n var dyn = dynamicOptions[S_FRAMEBUFFER]\n return createDynamicDecl(dyn, function (env, scope) {\n var FRAMEBUFFER_FUNC = env.invoke(scope, dyn)\n var shared = env.shared\n var FRAMEBUFFER_STATE = shared.framebuffer\n var FRAMEBUFFER = scope.def(\n FRAMEBUFFER_STATE, '.getFramebuffer(', FRAMEBUFFER_FUNC, ')')\n\n check$1.optional(function () {\n env.assert(scope,\n '!' + FRAMEBUFFER_FUNC + '||' + FRAMEBUFFER,\n 'invalid framebuffer object')\n })\n\n scope.set(\n FRAMEBUFFER_STATE,\n '.next',\n FRAMEBUFFER)\n var CONTEXT = shared.context\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_WIDTH,\n FRAMEBUFFER + '?' + FRAMEBUFFER + '.width:' +\n CONTEXT + '.' + S_DRAWINGBUFFER_WIDTH)\n scope.set(\n CONTEXT,\n '.' + S_FRAMEBUFFER_HEIGHT,\n FRAMEBUFFER +\n '?' + FRAMEBUFFER + '.height:' +\n CONTEXT + '.' + S_DRAWINGBUFFER_HEIGHT)\n return FRAMEBUFFER\n })\n } else {\n return null\n }\n }\n\n function parseViewportScissor (options, framebuffer, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseBox (param) {\n if (param in staticOptions) {\n var box = staticOptions[param]\n check$1.commandType(box, 'object', 'invalid ' + param, env.commandStr)\n\n var isStatic = true\n var x = box.x | 0\n var y = box.y | 0\n var w, h\n if ('width' in box) {\n w = box.width | 0\n check$1.command(w >= 0, 'invalid ' + param, env.commandStr)\n } else {\n isStatic = false\n }\n if ('height' in box) {\n h = box.height | 0\n check$1.command(h >= 0, 'invalid ' + param, env.commandStr)\n } else {\n isStatic = false\n }\n\n return new Declaration(\n !isStatic && framebuffer && framebuffer.thisDep,\n !isStatic && framebuffer && framebuffer.contextDep,\n !isStatic && framebuffer && framebuffer.propDep,\n function (env, scope) {\n var CONTEXT = env.shared.context\n var BOX_W = w\n if (!('width' in box)) {\n BOX_W = scope.def(CONTEXT, '.', S_FRAMEBUFFER_WIDTH, '-', x)\n }\n var BOX_H = h\n if (!('height' in box)) {\n BOX_H = scope.def(CONTEXT, '.', S_FRAMEBUFFER_HEIGHT, '-', y)\n }\n return [x, y, BOX_W, BOX_H]\n })\n } else if (param in dynamicOptions) {\n var dynBox = dynamicOptions[param]\n var result = createDynamicDecl(dynBox, function (env, scope) {\n var BOX = env.invoke(scope, dynBox)\n\n check$1.optional(function () {\n env.assert(scope,\n BOX + '&&typeof ' + BOX + '===\"object\"',\n 'invalid ' + param)\n })\n\n var CONTEXT = env.shared.context\n var BOX_X = scope.def(BOX, '.x|0')\n var BOX_Y = scope.def(BOX, '.y|0')\n var BOX_W = scope.def(\n '\"width\" in ', BOX, '?', BOX, '.width|0:',\n '(', CONTEXT, '.', S_FRAMEBUFFER_WIDTH, '-', BOX_X, ')')\n var BOX_H = scope.def(\n '\"height\" in ', BOX, '?', BOX, '.height|0:',\n '(', CONTEXT, '.', S_FRAMEBUFFER_HEIGHT, '-', BOX_Y, ')')\n\n check$1.optional(function () {\n env.assert(scope,\n BOX_W + '>=0&&' +\n BOX_H + '>=0',\n 'invalid ' + param)\n })\n\n return [BOX_X, BOX_Y, BOX_W, BOX_H]\n })\n if (framebuffer) {\n result.thisDep = result.thisDep || framebuffer.thisDep\n result.contextDep = result.contextDep || framebuffer.contextDep\n result.propDep = result.propDep || framebuffer.propDep\n }\n return result\n } else if (framebuffer) {\n return new Declaration(\n framebuffer.thisDep,\n framebuffer.contextDep,\n framebuffer.propDep,\n function (env, scope) {\n var CONTEXT = env.shared.context\n return [\n 0, 0,\n scope.def(CONTEXT, '.', S_FRAMEBUFFER_WIDTH),\n scope.def(CONTEXT, '.', S_FRAMEBUFFER_HEIGHT)]\n })\n } else {\n return null\n }\n }\n\n var viewport = parseBox(S_VIEWPORT)\n\n if (viewport) {\n var prevViewport = viewport\n viewport = new Declaration(\n viewport.thisDep,\n viewport.contextDep,\n viewport.propDep,\n function (env, scope) {\n var VIEWPORT = prevViewport.append(env, scope)\n var CONTEXT = env.shared.context\n scope.set(\n CONTEXT,\n '.' + S_VIEWPORT_WIDTH,\n VIEWPORT[2])\n scope.set(\n CONTEXT,\n '.' + S_VIEWPORT_HEIGHT,\n VIEWPORT[3])\n return VIEWPORT\n })\n }\n\n return {\n viewport: viewport,\n scissor_box: parseBox(S_SCISSOR_BOX)\n }\n }\n\n function parseAttribLocations (options, attributes) {\n var staticOptions = options.static\n var staticProgram =\n typeof staticOptions[S_FRAG] === 'string' &&\n typeof staticOptions[S_VERT] === 'string'\n if (staticProgram) {\n if (Object.keys(attributes.dynamic).length > 0) {\n return null\n }\n var staticAttributes = attributes.static\n var sAttributes = Object.keys(staticAttributes)\n if (sAttributes.length > 0 && typeof staticAttributes[sAttributes[0]] === 'number') {\n var bindings = []\n for (var i = 0; i < sAttributes.length; ++i) {\n check$1(typeof staticAttributes[sAttributes[i]] === 'number', 'must specify all vertex attribute locations when using vaos')\n bindings.push([staticAttributes[sAttributes[i]] | 0, sAttributes[i]])\n }\n return bindings\n }\n }\n return null\n }\n\n function parseProgram (options, env, attribLocations) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseShader (name) {\n if (name in staticOptions) {\n var id = stringStore.id(staticOptions[name])\n check$1.optional(function () {\n shaderState.shader(shaderType[name], id, check$1.guessCommand())\n })\n var result = createStaticDecl(function () {\n return id\n })\n result.id = id\n return result\n } else if (name in dynamicOptions) {\n var dyn = dynamicOptions[name]\n return createDynamicDecl(dyn, function (env, scope) {\n var str = env.invoke(scope, dyn)\n var id = scope.def(env.shared.strings, '.id(', str, ')')\n check$1.optional(function () {\n scope(\n env.shared.shader, '.shader(',\n shaderType[name], ',',\n id, ',',\n env.command, ');')\n })\n return id\n })\n }\n return null\n }\n\n var frag = parseShader(S_FRAG)\n var vert = parseShader(S_VERT)\n\n var program = null\n var progVar\n if (isStatic(frag) && isStatic(vert)) {\n program = shaderState.program(vert.id, frag.id, null, attribLocations)\n progVar = createStaticDecl(function (env, scope) {\n return env.link(program)\n })\n } else {\n progVar = new Declaration(\n (frag && frag.thisDep) || (vert && vert.thisDep),\n (frag && frag.contextDep) || (vert && vert.contextDep),\n (frag && frag.propDep) || (vert && vert.propDep),\n function (env, scope) {\n var SHADER_STATE = env.shared.shader\n var fragId\n if (frag) {\n fragId = frag.append(env, scope)\n } else {\n fragId = scope.def(SHADER_STATE, '.', S_FRAG)\n }\n var vertId\n if (vert) {\n vertId = vert.append(env, scope)\n } else {\n vertId = scope.def(SHADER_STATE, '.', S_VERT)\n }\n var progDef = SHADER_STATE + '.program(' + vertId + ',' + fragId\n check$1.optional(function () {\n progDef += ',' + env.command\n })\n return scope.def(progDef + ')')\n })\n }\n\n return {\n frag: frag,\n vert: vert,\n progVar: progVar,\n program: program\n }\n }\n\n function parseDraw (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n function parseElements () {\n if (S_ELEMENTS in staticOptions) {\n var elements = staticOptions[S_ELEMENTS]\n if (isBufferArgs(elements)) {\n elements = elementState.getElements(elementState.create(elements, true))\n } else if (elements) {\n elements = elementState.getElements(elements)\n check$1.command(elements, 'invalid elements', env.commandStr)\n }\n var result = createStaticDecl(function (env, scope) {\n if (elements) {\n var result = env.link(elements)\n env.ELEMENTS = result\n return result\n }\n env.ELEMENTS = null\n return null\n })\n result.value = elements\n return result\n } else if (S_ELEMENTS in dynamicOptions) {\n var dyn = dynamicOptions[S_ELEMENTS]\n return createDynamicDecl(dyn, function (env, scope) {\n var shared = env.shared\n\n var IS_BUFFER_ARGS = shared.isBufferArgs\n var ELEMENT_STATE = shared.elements\n\n var elementDefn = env.invoke(scope, dyn)\n var elements = scope.def('null')\n var elementStream = scope.def(IS_BUFFER_ARGS, '(', elementDefn, ')')\n\n var ifte = env.cond(elementStream)\n .then(elements, '=', ELEMENT_STATE, '.createStream(', elementDefn, ');')\n .else(elements, '=', ELEMENT_STATE, '.getElements(', elementDefn, ');')\n\n check$1.optional(function () {\n env.assert(ifte.else,\n '!' + elementDefn + '||' + elements,\n 'invalid elements')\n })\n\n scope.entry(ifte)\n scope.exit(\n env.cond(elementStream)\n .then(ELEMENT_STATE, '.destroyStream(', elements, ');'))\n\n env.ELEMENTS = elements\n\n return elements\n })\n }\n\n return null\n }\n\n var elements = parseElements()\n\n function parsePrimitive () {\n if (S_PRIMITIVE in staticOptions) {\n var primitive = staticOptions[S_PRIMITIVE]\n check$1.commandParameter(primitive, primTypes, 'invalid primitve', env.commandStr)\n return createStaticDecl(function (env, scope) {\n return primTypes[primitive]\n })\n } else if (S_PRIMITIVE in dynamicOptions) {\n var dynPrimitive = dynamicOptions[S_PRIMITIVE]\n return createDynamicDecl(dynPrimitive, function (env, scope) {\n var PRIM_TYPES = env.constants.primTypes\n var prim = env.invoke(scope, dynPrimitive)\n check$1.optional(function () {\n env.assert(scope,\n prim + ' in ' + PRIM_TYPES,\n 'invalid primitive, must be one of ' + Object.keys(primTypes))\n })\n return scope.def(PRIM_TYPES, '[', prim, ']')\n })\n } else if (elements) {\n if (isStatic(elements)) {\n if (elements.value) {\n return createStaticDecl(function (env, scope) {\n return scope.def(env.ELEMENTS, '.primType')\n })\n } else {\n return createStaticDecl(function () {\n return GL_TRIANGLES$1\n })\n }\n } else {\n return new Declaration(\n elements.thisDep,\n elements.contextDep,\n elements.propDep,\n function (env, scope) {\n var elements = env.ELEMENTS\n return scope.def(elements, '?', elements, '.primType:', GL_TRIANGLES$1)\n })\n }\n }\n return null\n }\n\n function parseParam (param, isOffset) {\n if (param in staticOptions) {\n var value = staticOptions[param] | 0\n check$1.command(!isOffset || value >= 0, 'invalid ' + param, env.commandStr)\n return createStaticDecl(function (env, scope) {\n if (isOffset) {\n env.OFFSET = value\n }\n return value\n })\n } else if (param in dynamicOptions) {\n var dynValue = dynamicOptions[param]\n return createDynamicDecl(dynValue, function (env, scope) {\n var result = env.invoke(scope, dynValue)\n if (isOffset) {\n env.OFFSET = result\n check$1.optional(function () {\n env.assert(scope,\n result + '>=0',\n 'invalid ' + param)\n })\n }\n return result\n })\n } else if (isOffset && elements) {\n return createStaticDecl(function (env, scope) {\n env.OFFSET = '0'\n return 0\n })\n }\n return null\n }\n\n var OFFSET = parseParam(S_OFFSET, true)\n\n function parseVertCount () {\n if (S_COUNT in staticOptions) {\n var count = staticOptions[S_COUNT] | 0\n check$1.command(\n typeof count === 'number' && count >= 0, 'invalid vertex count', env.commandStr)\n return createStaticDecl(function () {\n return count\n })\n } else if (S_COUNT in dynamicOptions) {\n var dynCount = dynamicOptions[S_COUNT]\n return createDynamicDecl(dynCount, function (env, scope) {\n var result = env.invoke(scope, dynCount)\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + result + '===\"number\"&&' +\n result + '>=0&&' +\n result + '===(' + result + '|0)',\n 'invalid vertex count')\n })\n return result\n })\n } else if (elements) {\n if (isStatic(elements)) {\n if (elements) {\n if (OFFSET) {\n return new Declaration(\n OFFSET.thisDep,\n OFFSET.contextDep,\n OFFSET.propDep,\n function (env, scope) {\n var result = scope.def(\n env.ELEMENTS, '.vertCount-', env.OFFSET)\n\n check$1.optional(function () {\n env.assert(scope,\n result + '>=0',\n 'invalid vertex offset/element buffer too small')\n })\n\n return result\n })\n } else {\n return createStaticDecl(function (env, scope) {\n return scope.def(env.ELEMENTS, '.vertCount')\n })\n }\n } else {\n var result = createStaticDecl(function () {\n return -1\n })\n check$1.optional(function () {\n result.MISSING = true\n })\n return result\n }\n } else {\n var variable = new Declaration(\n elements.thisDep || OFFSET.thisDep,\n elements.contextDep || OFFSET.contextDep,\n elements.propDep || OFFSET.propDep,\n function (env, scope) {\n var elements = env.ELEMENTS\n if (env.OFFSET) {\n return scope.def(elements, '?', elements, '.vertCount-',\n env.OFFSET, ':-1')\n }\n return scope.def(elements, '?', elements, '.vertCount:-1')\n })\n check$1.optional(function () {\n variable.DYNAMIC = true\n })\n return variable\n }\n }\n return null\n }\n\n return {\n elements: elements,\n primitive: parsePrimitive(),\n count: parseVertCount(),\n instances: parseParam(S_INSTANCES, false),\n offset: OFFSET\n }\n }\n\n function parseGLState (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n var STATE = {}\n\n GL_STATE_NAMES.forEach(function (prop) {\n var param = propName(prop)\n\n function parseParam (parseStatic, parseDynamic) {\n if (prop in staticOptions) {\n var value = parseStatic(staticOptions[prop])\n STATE[param] = createStaticDecl(function () {\n return value\n })\n } else if (prop in dynamicOptions) {\n var dyn = dynamicOptions[prop]\n STATE[param] = createDynamicDecl(dyn, function (env, scope) {\n return parseDynamic(env, scope, env.invoke(scope, dyn))\n })\n }\n }\n\n switch (prop) {\n case S_CULL_ENABLE:\n case S_BLEND_ENABLE:\n case S_DITHER:\n case S_STENCIL_ENABLE:\n case S_DEPTH_ENABLE:\n case S_SCISSOR_ENABLE:\n case S_POLYGON_OFFSET_ENABLE:\n case S_SAMPLE_ALPHA:\n case S_SAMPLE_ENABLE:\n case S_DEPTH_MASK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'boolean', prop, env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"boolean\"',\n 'invalid flag ' + prop, env.commandStr)\n })\n return value\n })\n\n case S_DEPTH_FUNC:\n return parseParam(\n function (value) {\n check$1.commandParameter(value, compareFuncs, 'invalid ' + prop, env.commandStr)\n return compareFuncs[value]\n },\n function (env, scope, value) {\n var COMPARE_FUNCS = env.constants.compareFuncs\n check$1.optional(function () {\n env.assert(scope,\n value + ' in ' + COMPARE_FUNCS,\n 'invalid ' + prop + ', must be one of ' + Object.keys(compareFuncs))\n })\n return scope.def(COMPARE_FUNCS, '[', value, ']')\n })\n\n case S_DEPTH_RANGE:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number' &&\n value[0] <= value[1],\n 'depth range is 2d array',\n env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===2&&' +\n 'typeof ' + value + '[0]===\"number\"&&' +\n 'typeof ' + value + '[1]===\"number\"&&' +\n value + '[0]<=' + value + '[1]',\n 'depth range must be a 2d array')\n })\n\n var Z_NEAR = scope.def('+', value, '[0]')\n var Z_FAR = scope.def('+', value, '[1]')\n return [Z_NEAR, Z_FAR]\n })\n\n case S_BLEND_FUNC:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', 'blend.func', env.commandStr)\n var srcRGB = ('srcRGB' in value ? value.srcRGB : value.src)\n var srcAlpha = ('srcAlpha' in value ? value.srcAlpha : value.src)\n var dstRGB = ('dstRGB' in value ? value.dstRGB : value.dst)\n var dstAlpha = ('dstAlpha' in value ? value.dstAlpha : value.dst)\n check$1.commandParameter(srcRGB, blendFuncs, param + '.srcRGB', env.commandStr)\n check$1.commandParameter(srcAlpha, blendFuncs, param + '.srcAlpha', env.commandStr)\n check$1.commandParameter(dstRGB, blendFuncs, param + '.dstRGB', env.commandStr)\n check$1.commandParameter(dstAlpha, blendFuncs, param + '.dstAlpha', env.commandStr)\n\n check$1.command(\n (invalidBlendCombinations.indexOf(srcRGB + ', ' + dstRGB) === -1),\n 'unallowed blending combination (srcRGB, dstRGB) = (' + srcRGB + ', ' + dstRGB + ')', env.commandStr)\n\n return [\n blendFuncs[srcRGB],\n blendFuncs[dstRGB],\n blendFuncs[srcAlpha],\n blendFuncs[dstAlpha]\n ]\n },\n function (env, scope, value) {\n var BLEND_FUNCS = env.constants.blendFuncs\n\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid blend func, must be an object')\n })\n\n function read (prefix, suffix) {\n var func = scope.def(\n '\"', prefix, suffix, '\" in ', value,\n '?', value, '.', prefix, suffix,\n ':', value, '.', prefix)\n\n check$1.optional(function () {\n env.assert(scope,\n func + ' in ' + BLEND_FUNCS,\n 'invalid ' + prop + '.' + prefix + suffix + ', must be one of ' + Object.keys(blendFuncs))\n })\n\n return func\n }\n\n var srcRGB = read('src', 'RGB')\n var dstRGB = read('dst', 'RGB')\n\n check$1.optional(function () {\n var INVALID_BLEND_COMBINATIONS = env.constants.invalidBlendCombinations\n\n env.assert(scope,\n INVALID_BLEND_COMBINATIONS +\n '.indexOf(' + srcRGB + '+\", \"+' + dstRGB + ') === -1 ',\n 'unallowed blending combination for (srcRGB, dstRGB)'\n )\n })\n\n var SRC_RGB = scope.def(BLEND_FUNCS, '[', srcRGB, ']')\n var SRC_ALPHA = scope.def(BLEND_FUNCS, '[', read('src', 'Alpha'), ']')\n var DST_RGB = scope.def(BLEND_FUNCS, '[', dstRGB, ']')\n var DST_ALPHA = scope.def(BLEND_FUNCS, '[', read('dst', 'Alpha'), ']')\n\n return [SRC_RGB, DST_RGB, SRC_ALPHA, DST_ALPHA]\n })\n\n case S_BLEND_EQUATION:\n return parseParam(\n function (value) {\n if (typeof value === 'string') {\n check$1.commandParameter(value, blendEquations, 'invalid ' + prop, env.commandStr)\n return [\n blendEquations[value],\n blendEquations[value]\n ]\n } else if (typeof value === 'object') {\n check$1.commandParameter(\n value.rgb, blendEquations, prop + '.rgb', env.commandStr)\n check$1.commandParameter(\n value.alpha, blendEquations, prop + '.alpha', env.commandStr)\n return [\n blendEquations[value.rgb],\n blendEquations[value.alpha]\n ]\n } else {\n check$1.commandRaise('invalid blend.equation', env.commandStr)\n }\n },\n function (env, scope, value) {\n var BLEND_EQUATIONS = env.constants.blendEquations\n\n var RGB = scope.def()\n var ALPHA = scope.def()\n\n var ifte = env.cond('typeof ', value, '===\"string\"')\n\n check$1.optional(function () {\n function checkProp (block, name, value) {\n env.assert(block,\n value + ' in ' + BLEND_EQUATIONS,\n 'invalid ' + name + ', must be one of ' + Object.keys(blendEquations))\n }\n checkProp(ifte.then, prop, value)\n\n env.assert(ifte.else,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n checkProp(ifte.else, prop + '.rgb', value + '.rgb')\n checkProp(ifte.else, prop + '.alpha', value + '.alpha')\n })\n\n ifte.then(\n RGB, '=', ALPHA, '=', BLEND_EQUATIONS, '[', value, '];')\n ifte.else(\n RGB, '=', BLEND_EQUATIONS, '[', value, '.rgb];',\n ALPHA, '=', BLEND_EQUATIONS, '[', value, '.alpha];')\n\n scope(ifte)\n\n return [RGB, ALPHA]\n })\n\n case S_BLEND_COLOR:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) &&\n value.length === 4,\n 'blend.color must be a 4d array', env.commandStr)\n return loop(4, function (i) {\n return +value[i]\n })\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===4',\n 'blend.color must be a 4d array')\n })\n return loop(4, function (i) {\n return scope.def('+', value, '[', i, ']')\n })\n })\n\n case S_STENCIL_MASK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'number', param, env.commandStr)\n return value | 0\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"number\"',\n 'invalid stencil.mask')\n })\n return scope.def(value, '|0')\n })\n\n case S_STENCIL_FUNC:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var cmp = value.cmp || 'keep'\n var ref = value.ref || 0\n var mask = 'mask' in value ? value.mask : -1\n check$1.commandParameter(cmp, compareFuncs, prop + '.cmp', env.commandStr)\n check$1.commandType(ref, 'number', prop + '.ref', env.commandStr)\n check$1.commandType(mask, 'number', prop + '.mask', env.commandStr)\n return [\n compareFuncs[cmp],\n ref,\n mask\n ]\n },\n function (env, scope, value) {\n var COMPARE_FUNCS = env.constants.compareFuncs\n check$1.optional(function () {\n function assert () {\n env.assert(scope,\n Array.prototype.join.call(arguments, ''),\n 'invalid stencil.func')\n }\n assert(value + '&&typeof ', value, '===\"object\"')\n assert('!(\"cmp\" in ', value, ')||(',\n value, '.cmp in ', COMPARE_FUNCS, ')')\n })\n var cmp = scope.def(\n '\"cmp\" in ', value,\n '?', COMPARE_FUNCS, '[', value, '.cmp]',\n ':', GL_KEEP)\n var ref = scope.def(value, '.ref|0')\n var mask = scope.def(\n '\"mask\" in ', value,\n '?', value, '.mask|0:-1')\n return [cmp, ref, mask]\n })\n\n case S_STENCIL_OPFRONT:\n case S_STENCIL_OPBACK:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var fail = value.fail || 'keep'\n var zfail = value.zfail || 'keep'\n var zpass = value.zpass || 'keep'\n check$1.commandParameter(fail, stencilOps, prop + '.fail', env.commandStr)\n check$1.commandParameter(zfail, stencilOps, prop + '.zfail', env.commandStr)\n check$1.commandParameter(zpass, stencilOps, prop + '.zpass', env.commandStr)\n return [\n prop === S_STENCIL_OPBACK ? GL_BACK : GL_FRONT,\n stencilOps[fail],\n stencilOps[zfail],\n stencilOps[zpass]\n ]\n },\n function (env, scope, value) {\n var STENCIL_OPS = env.constants.stencilOps\n\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n })\n\n function read (name) {\n check$1.optional(function () {\n env.assert(scope,\n '!(\"' + name + '\" in ' + value + ')||' +\n '(' + value + '.' + name + ' in ' + STENCIL_OPS + ')',\n 'invalid ' + prop + '.' + name + ', must be one of ' + Object.keys(stencilOps))\n })\n\n return scope.def(\n '\"', name, '\" in ', value,\n '?', STENCIL_OPS, '[', value, '.', name, ']:',\n GL_KEEP)\n }\n\n return [\n prop === S_STENCIL_OPBACK ? GL_BACK : GL_FRONT,\n read('fail'),\n read('zfail'),\n read('zpass')\n ]\n })\n\n case S_POLYGON_OFFSET_OFFSET:\n return parseParam(\n function (value) {\n check$1.commandType(value, 'object', param, env.commandStr)\n var factor = value.factor | 0\n var units = value.units | 0\n check$1.commandType(factor, 'number', param + '.factor', env.commandStr)\n check$1.commandType(units, 'number', param + '.units', env.commandStr)\n return [factor, units]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid ' + prop)\n })\n\n var FACTOR = scope.def(value, '.factor|0')\n var UNITS = scope.def(value, '.units|0')\n\n return [FACTOR, UNITS]\n })\n\n case S_CULL_FACE:\n return parseParam(\n function (value) {\n var face = 0\n if (value === 'front') {\n face = GL_FRONT\n } else if (value === 'back') {\n face = GL_BACK\n }\n check$1.command(!!face, param, env.commandStr)\n return face\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '===\"front\"||' +\n value + '===\"back\"',\n 'invalid cull.face')\n })\n return scope.def(value, '===\"front\"?', GL_FRONT, ':', GL_BACK)\n })\n\n case S_LINE_WIDTH:\n return parseParam(\n function (value) {\n check$1.command(\n typeof value === 'number' &&\n value >= limits.lineWidthDims[0] &&\n value <= limits.lineWidthDims[1],\n 'invalid line width, must be a positive number between ' +\n limits.lineWidthDims[0] + ' and ' + limits.lineWidthDims[1], env.commandStr)\n return value\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n 'typeof ' + value + '===\"number\"&&' +\n value + '>=' + limits.lineWidthDims[0] + '&&' +\n value + '<=' + limits.lineWidthDims[1],\n 'invalid line width')\n })\n\n return value\n })\n\n case S_FRONT_FACE:\n return parseParam(\n function (value) {\n check$1.commandParameter(value, orientationType, param, env.commandStr)\n return orientationType[value]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '===\"cw\"||' +\n value + '===\"ccw\"',\n 'invalid frontFace, must be one of cw,ccw')\n })\n return scope.def(value + '===\"cw\"?' + GL_CW + ':' + GL_CCW)\n })\n\n case S_COLOR_MASK:\n return parseParam(\n function (value) {\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'color.mask must be length 4 array', env.commandStr)\n return value.map(function (v) { return !!v })\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n env.shared.isArrayLike + '(' + value + ')&&' +\n value + '.length===4',\n 'invalid color.mask')\n })\n return loop(4, function (i) {\n return '!!' + value + '[' + i + ']'\n })\n })\n\n case S_SAMPLE_COVERAGE:\n return parseParam(\n function (value) {\n check$1.command(typeof value === 'object' && value, param, env.commandStr)\n var sampleValue = 'value' in value ? value.value : 1\n var sampleInvert = !!value.invert\n check$1.command(\n typeof sampleValue === 'number' &&\n sampleValue >= 0 && sampleValue <= 1,\n 'sample.coverage.value must be a number between 0 and 1', env.commandStr)\n return [sampleValue, sampleInvert]\n },\n function (env, scope, value) {\n check$1.optional(function () {\n env.assert(scope,\n value + '&&typeof ' + value + '===\"object\"',\n 'invalid sample.coverage')\n })\n var VALUE = scope.def(\n '\"value\" in ', value, '?+', value, '.value:1')\n var INVERT = scope.def('!!', value, '.invert')\n return [VALUE, INVERT]\n })\n }\n })\n\n return STATE\n }\n\n function parseUniforms (uniforms, env) {\n var staticUniforms = uniforms.static\n var dynamicUniforms = uniforms.dynamic\n\n var UNIFORMS = {}\n\n Object.keys(staticUniforms).forEach(function (name) {\n var value = staticUniforms[name]\n var result\n if (typeof value === 'number' ||\n typeof value === 'boolean') {\n result = createStaticDecl(function () {\n return value\n })\n } else if (typeof value === 'function') {\n var reglType = value._reglType\n if (reglType === 'texture2d' ||\n reglType === 'textureCube') {\n result = createStaticDecl(function (env) {\n return env.link(value)\n })\n } else if (reglType === 'framebuffer' ||\n reglType === 'framebufferCube') {\n check$1.command(value.color.length > 0,\n 'missing color attachment for framebuffer sent to uniform \"' + name + '\"', env.commandStr)\n result = createStaticDecl(function (env) {\n return env.link(value.color[0])\n })\n } else {\n check$1.commandRaise('invalid data for uniform \"' + name + '\"', env.commandStr)\n }\n } else if (isArrayLike(value)) {\n result = createStaticDecl(function (env) {\n var ITEM = env.global.def('[',\n loop(value.length, function (i) {\n check$1.command(\n typeof value[i] === 'number' ||\n typeof value[i] === 'boolean',\n 'invalid uniform ' + name, env.commandStr)\n return value[i]\n }), ']')\n return ITEM\n })\n } else {\n check$1.commandRaise('invalid or missing data for uniform \"' + name + '\"', env.commandStr)\n }\n result.value = value\n UNIFORMS[name] = result\n })\n\n Object.keys(dynamicUniforms).forEach(function (key) {\n var dyn = dynamicUniforms[key]\n UNIFORMS[key] = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n })\n\n return UNIFORMS\n }\n\n function parseAttributes (attributes, env) {\n var staticAttributes = attributes.static\n var dynamicAttributes = attributes.dynamic\n\n var attributeDefs = {}\n\n Object.keys(staticAttributes).forEach(function (attribute) {\n var value = staticAttributes[attribute]\n var id = stringStore.id(attribute)\n\n var record = new AttributeRecord()\n if (isBufferArgs(value)) {\n record.state = ATTRIB_STATE_POINTER\n record.buffer = bufferState.getBuffer(\n bufferState.create(value, GL_ARRAY_BUFFER$2, false, true))\n record.type = 0\n } else {\n var buffer = bufferState.getBuffer(value)\n if (buffer) {\n record.state = ATTRIB_STATE_POINTER\n record.buffer = buffer\n record.type = 0\n } else {\n check$1.command(typeof value === 'object' && value,\n 'invalid data for attribute ' + attribute, env.commandStr)\n if ('constant' in value) {\n var constant = value.constant\n record.buffer = 'null'\n record.state = ATTRIB_STATE_CONSTANT\n if (typeof constant === 'number') {\n record.x = constant\n } else {\n check$1.command(\n isArrayLike(constant) &&\n constant.length > 0 &&\n constant.length <= 4,\n 'invalid constant for attribute ' + attribute, env.commandStr)\n CUTE_COMPONENTS.forEach(function (c, i) {\n if (i < constant.length) {\n record[c] = constant[i]\n }\n })\n }\n } else {\n if (isBufferArgs(value.buffer)) {\n buffer = bufferState.getBuffer(\n bufferState.create(value.buffer, GL_ARRAY_BUFFER$2, false, true))\n } else {\n buffer = bufferState.getBuffer(value.buffer)\n }\n check$1.command(!!buffer, 'missing buffer for attribute \"' + attribute + '\"', env.commandStr)\n\n var offset = value.offset | 0\n check$1.command(offset >= 0,\n 'invalid offset for attribute \"' + attribute + '\"', env.commandStr)\n\n var stride = value.stride | 0\n check$1.command(stride >= 0 && stride < 256,\n 'invalid stride for attribute \"' + attribute + '\", must be integer betweeen [0, 255]', env.commandStr)\n\n var size = value.size | 0\n check$1.command(!('size' in value) || (size > 0 && size <= 4),\n 'invalid size for attribute \"' + attribute + '\", must be 1,2,3,4', env.commandStr)\n\n var normalized = !!value.normalized\n\n var type = 0\n if ('type' in value) {\n check$1.commandParameter(\n value.type, glTypes,\n 'invalid type for attribute ' + attribute, env.commandStr)\n type = glTypes[value.type]\n }\n\n var divisor = value.divisor | 0\n if ('divisor' in value) {\n check$1.command(divisor === 0 || extInstancing,\n 'cannot specify divisor for attribute \"' + attribute + '\", instancing not supported', env.commandStr)\n check$1.command(divisor >= 0,\n 'invalid divisor for attribute \"' + attribute + '\"', env.commandStr)\n }\n\n check$1.optional(function () {\n var command = env.commandStr\n\n var VALID_KEYS = [\n 'buffer',\n 'offset',\n 'divisor',\n 'normalized',\n 'type',\n 'size',\n 'stride'\n ]\n\n Object.keys(value).forEach(function (prop) {\n check$1.command(\n VALID_KEYS.indexOf(prop) >= 0,\n 'unknown parameter \"' + prop + '\" for attribute pointer \"' + attribute + '\" (valid parameters are ' + VALID_KEYS + ')',\n command)\n })\n })\n\n record.buffer = buffer\n record.state = ATTRIB_STATE_POINTER\n record.size = size\n record.normalized = normalized\n record.type = type || buffer.dtype\n record.offset = offset\n record.stride = stride\n record.divisor = divisor\n }\n }\n }\n\n attributeDefs[attribute] = createStaticDecl(function (env, scope) {\n var cache = env.attribCache\n if (id in cache) {\n return cache[id]\n }\n var result = {\n isStream: false\n }\n Object.keys(record).forEach(function (key) {\n result[key] = record[key]\n })\n if (record.buffer) {\n result.buffer = env.link(record.buffer)\n result.type = result.type || (result.buffer + '.dtype')\n }\n cache[id] = result\n return result\n })\n })\n\n Object.keys(dynamicAttributes).forEach(function (attribute) {\n var dyn = dynamicAttributes[attribute]\n\n function appendAttributeCode (env, block) {\n var VALUE = env.invoke(block, dyn)\n\n var shared = env.shared\n var constants = env.constants\n\n var IS_BUFFER_ARGS = shared.isBufferArgs\n var BUFFER_STATE = shared.buffer\n\n // Perform validation on attribute\n check$1.optional(function () {\n env.assert(block,\n VALUE + '&&(typeof ' + VALUE + '===\"object\"||typeof ' +\n VALUE + '===\"function\")&&(' +\n IS_BUFFER_ARGS + '(' + VALUE + ')||' +\n BUFFER_STATE + '.getBuffer(' + VALUE + ')||' +\n BUFFER_STATE + '.getBuffer(' + VALUE + '.buffer)||' +\n IS_BUFFER_ARGS + '(' + VALUE + '.buffer)||' +\n '(\"constant\" in ' + VALUE +\n '&&(typeof ' + VALUE + '.constant===\"number\"||' +\n shared.isArrayLike + '(' + VALUE + '.constant))))',\n 'invalid dynamic attribute \"' + attribute + '\"')\n })\n\n // allocate names for result\n var result = {\n isStream: block.def(false)\n }\n var defaultRecord = new AttributeRecord()\n defaultRecord.state = ATTRIB_STATE_POINTER\n Object.keys(defaultRecord).forEach(function (key) {\n result[key] = block.def('' + defaultRecord[key])\n })\n\n var BUFFER = result.buffer\n var TYPE = result.type\n block(\n 'if(', IS_BUFFER_ARGS, '(', VALUE, ')){',\n result.isStream, '=true;',\n BUFFER, '=', BUFFER_STATE, '.createStream(', GL_ARRAY_BUFFER$2, ',', VALUE, ');',\n TYPE, '=', BUFFER, '.dtype;',\n '}else{',\n BUFFER, '=', BUFFER_STATE, '.getBuffer(', VALUE, ');',\n 'if(', BUFFER, '){',\n TYPE, '=', BUFFER, '.dtype;',\n '}else if(\"constant\" in ', VALUE, '){',\n result.state, '=', ATTRIB_STATE_CONSTANT, ';',\n 'if(typeof ' + VALUE + '.constant === \"number\"){',\n result[CUTE_COMPONENTS[0]], '=', VALUE, '.constant;',\n CUTE_COMPONENTS.slice(1).map(function (n) {\n return result[n]\n }).join('='), '=0;',\n '}else{',\n CUTE_COMPONENTS.map(function (name, i) {\n return (\n result[name] + '=' + VALUE + '.constant.length>' + i +\n '?' + VALUE + '.constant[' + i + ']:0;'\n )\n }).join(''),\n '}}else{',\n 'if(', IS_BUFFER_ARGS, '(', VALUE, '.buffer)){',\n BUFFER, '=', BUFFER_STATE, '.createStream(', GL_ARRAY_BUFFER$2, ',', VALUE, '.buffer);',\n '}else{',\n BUFFER, '=', BUFFER_STATE, '.getBuffer(', VALUE, '.buffer);',\n '}',\n TYPE, '=\"type\" in ', VALUE, '?',\n constants.glTypes, '[', VALUE, '.type]:', BUFFER, '.dtype;',\n result.normalized, '=!!', VALUE, '.normalized;')\n function emitReadRecord (name) {\n block(result[name], '=', VALUE, '.', name, '|0;')\n }\n emitReadRecord('size')\n emitReadRecord('offset')\n emitReadRecord('stride')\n emitReadRecord('divisor')\n\n block('}}')\n\n block.exit(\n 'if(', result.isStream, '){',\n BUFFER_STATE, '.destroyStream(', BUFFER, ');',\n '}')\n\n return result\n }\n\n attributeDefs[attribute] = createDynamicDecl(dyn, appendAttributeCode)\n })\n\n return attributeDefs\n }\n\n function parseVAO (options, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n if (S_VAO in staticOptions) {\n var vao = staticOptions[S_VAO]\n if (vao !== null && attributeState.getVAO(vao) === null) {\n vao = attributeState.createVAO(vao)\n }\n return createStaticDecl(function (env) {\n return env.link(attributeState.getVAO(vao))\n })\n } else if (S_VAO in dynamicOptions) {\n var dyn = dynamicOptions[S_VAO]\n return createDynamicDecl(dyn, function (env, scope) {\n var vaoRef = env.invoke(scope, dyn)\n return scope.def(env.shared.vao + '.getVAO(' + vaoRef + ')')\n })\n }\n return null\n }\n\n function parseContext (context) {\n var staticContext = context.static\n var dynamicContext = context.dynamic\n var result = {}\n\n Object.keys(staticContext).forEach(function (name) {\n var value = staticContext[name]\n result[name] = createStaticDecl(function (env, scope) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return '' + value\n } else {\n return env.link(value)\n }\n })\n })\n\n Object.keys(dynamicContext).forEach(function (name) {\n var dyn = dynamicContext[name]\n result[name] = createDynamicDecl(dyn, function (env, scope) {\n return env.invoke(scope, dyn)\n })\n })\n\n return result\n }\n\n function parseArguments (options, attributes, uniforms, context, env) {\n var staticOptions = options.static\n var dynamicOptions = options.dynamic\n\n check$1.optional(function () {\n var KEY_NAMES = [\n S_FRAMEBUFFER,\n S_VERT,\n S_FRAG,\n S_ELEMENTS,\n S_PRIMITIVE,\n S_OFFSET,\n S_COUNT,\n S_INSTANCES,\n S_PROFILE,\n S_VAO\n ].concat(GL_STATE_NAMES)\n\n function checkKeys (dict) {\n Object.keys(dict).forEach(function (key) {\n check$1.command(\n KEY_NAMES.indexOf(key) >= 0,\n 'unknown parameter \"' + key + '\"',\n env.commandStr)\n })\n }\n\n checkKeys(staticOptions)\n checkKeys(dynamicOptions)\n })\n\n var attribLocations = parseAttribLocations(options, attributes)\n\n var framebuffer = parseFramebuffer(options, env)\n var viewportAndScissor = parseViewportScissor(options, framebuffer, env)\n var draw = parseDraw(options, env)\n var state = parseGLState(options, env)\n var shader = parseProgram(options, env, attribLocations)\n\n function copyBox (name) {\n var defn = viewportAndScissor[name]\n if (defn) {\n state[name] = defn\n }\n }\n copyBox(S_VIEWPORT)\n copyBox(propName(S_SCISSOR_BOX))\n\n var dirty = Object.keys(state).length > 0\n\n var result = {\n framebuffer: framebuffer,\n draw: draw,\n shader: shader,\n state: state,\n dirty: dirty,\n scopeVAO: null,\n drawVAO: null,\n useVAO: false,\n attributes: {}\n }\n\n result.profile = parseProfile(options, env)\n result.uniforms = parseUniforms(uniforms, env)\n result.drawVAO = result.scopeVAO = parseVAO(options, env)\n // special case: check if we can statically allocate a vertex array object for this program\n if (!result.drawVAO && shader.program && !attribLocations && extensions.angle_instanced_arrays) {\n var useVAO = true\n var staticBindings = shader.program.attributes.map(function (attr) {\n var binding = attributes.static[attr]\n useVAO = useVAO && !!binding\n return binding\n })\n if (useVAO && staticBindings.length > 0) {\n var vao = attributeState.getVAO(attributeState.createVAO(staticBindings))\n result.drawVAO = new Declaration(null, null, null, function (env, scope) {\n return env.link(vao)\n })\n result.useVAO = true\n }\n }\n if (attribLocations) {\n result.useVAO = true\n } else {\n result.attributes = parseAttributes(attributes, env)\n }\n result.context = parseContext(context, env)\n return result\n }\n\n // ===================================================\n // ===================================================\n // COMMON UPDATE FUNCTIONS\n // ===================================================\n // ===================================================\n function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n var value = defn.append(env, scope)\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];')\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';')\n }\n })\n\n scope(contextEnter)\n }\n\n // ===================================================\n // ===================================================\n // COMMON DRAWING FUNCTIONS\n // ===================================================\n // ===================================================\n function emitPollFramebuffer (env, scope, framebuffer, skipCheck) {\n var shared = env.shared\n\n var GL = shared.gl\n var FRAMEBUFFER_STATE = shared.framebuffer\n var EXT_DRAW_BUFFERS\n if (extDrawBuffers) {\n EXT_DRAW_BUFFERS = scope.def(shared.extensions, '.webgl_draw_buffers')\n }\n\n var constants = env.constants\n\n var DRAW_BUFFERS = constants.drawBuffer\n var BACK_BUFFER = constants.backBuffer\n\n var NEXT\n if (framebuffer) {\n NEXT = framebuffer.append(env, scope)\n } else {\n NEXT = scope.def(FRAMEBUFFER_STATE, '.next')\n }\n\n if (!skipCheck) {\n scope('if(', NEXT, '!==', FRAMEBUFFER_STATE, '.cur){')\n }\n scope(\n 'if(', NEXT, '){',\n GL, '.bindFramebuffer(', GL_FRAMEBUFFER$2, ',', NEXT, '.framebuffer);')\n if (extDrawBuffers) {\n scope(EXT_DRAW_BUFFERS, '.drawBuffersWEBGL(',\n DRAW_BUFFERS, '[', NEXT, '.colorAttachments.length]);')\n }\n scope('}else{',\n GL, '.bindFramebuffer(', GL_FRAMEBUFFER$2, ',null);')\n if (extDrawBuffers) {\n scope(EXT_DRAW_BUFFERS, '.drawBuffersWEBGL(', BACK_BUFFER, ');')\n }\n scope(\n '}',\n FRAMEBUFFER_STATE, '.cur=', NEXT, ';')\n if (!skipCheck) {\n scope('}')\n }\n }\n\n function emitPollState (env, scope, args) {\n var shared = env.shared\n\n var GL = shared.gl\n\n var CURRENT_VARS = env.current\n var NEXT_VARS = env.next\n var CURRENT_STATE = shared.current\n var NEXT_STATE = shared.next\n\n var block = env.cond(CURRENT_STATE, '.dirty')\n\n GL_STATE_NAMES.forEach(function (prop) {\n var param = propName(prop)\n if (param in args.state) {\n return\n }\n\n var NEXT, CURRENT\n if (param in NEXT_VARS) {\n NEXT = NEXT_VARS[param]\n CURRENT = CURRENT_VARS[param]\n var parts = loop(currentState[param].length, function (i) {\n return block.def(NEXT, '[', i, ']')\n })\n block(env.cond(parts.map(function (p, i) {\n return p + '!==' + CURRENT + '[' + i + ']'\n }).join('||'))\n .then(\n GL, '.', GL_VARIABLES[param], '(', parts, ');',\n parts.map(function (p, i) {\n return CURRENT + '[' + i + ']=' + p\n }).join(';'), ';'))\n } else {\n NEXT = block.def(NEXT_STATE, '.', param)\n var ifte = env.cond(NEXT, '!==', CURRENT_STATE, '.', param)\n block(ifte)\n if (param in GL_FLAGS) {\n ifte(\n env.cond(NEXT)\n .then(GL, '.enable(', GL_FLAGS[param], ');')\n .else(GL, '.disable(', GL_FLAGS[param], ');'),\n CURRENT_STATE, '.', param, '=', NEXT, ';')\n } else {\n ifte(\n GL, '.', GL_VARIABLES[param], '(', NEXT, ');',\n CURRENT_STATE, '.', param, '=', NEXT, ';')\n }\n }\n })\n if (Object.keys(args.state).length === 0) {\n block(CURRENT_STATE, '.dirty=false;')\n }\n scope(block)\n }\n\n function emitSetOptions (env, scope, options, filter) {\n var shared = env.shared\n var CURRENT_VARS = env.current\n var CURRENT_STATE = shared.current\n var GL = shared.gl\n sortState(Object.keys(options)).forEach(function (param) {\n var defn = options[param]\n if (filter && !filter(defn)) {\n return\n }\n var variable = defn.append(env, scope)\n if (GL_FLAGS[param]) {\n var flag = GL_FLAGS[param]\n if (isStatic(defn)) {\n if (variable) {\n scope(GL, '.enable(', flag, ');')\n } else {\n scope(GL, '.disable(', flag, ');')\n }\n } else {\n scope(env.cond(variable)\n .then(GL, '.enable(', flag, ');')\n .else(GL, '.disable(', flag, ');'))\n }\n scope(CURRENT_STATE, '.', param, '=', variable, ';')\n } else if (isArrayLike(variable)) {\n var CURRENT = CURRENT_VARS[param]\n scope(\n GL, '.', GL_VARIABLES[param], '(', variable, ');',\n variable.map(function (v, i) {\n return CURRENT + '[' + i + ']=' + v\n }).join(';'), ';')\n } else {\n scope(\n GL, '.', GL_VARIABLES[param], '(', variable, ');',\n CURRENT_STATE, '.', param, '=', variable, ';')\n }\n })\n }\n\n function injectExtensions (env, scope) {\n if (extInstancing) {\n env.instancing = scope.def(\n env.shared.extensions, '.angle_instanced_arrays')\n }\n }\n\n function emitProfile (env, scope, args, useScope, incrementCounter) {\n var shared = env.shared\n var STATS = env.stats\n var CURRENT_STATE = shared.current\n var TIMER = shared.timer\n var profileArg = args.profile\n\n function perfCounter () {\n if (typeof performance === 'undefined') {\n return 'Date.now()'\n } else {\n return 'performance.now()'\n }\n }\n\n var CPU_START, QUERY_COUNTER\n function emitProfileStart (block) {\n CPU_START = scope.def()\n block(CPU_START, '=', perfCounter(), ';')\n if (typeof incrementCounter === 'string') {\n block(STATS, '.count+=', incrementCounter, ';')\n } else {\n block(STATS, '.count++;')\n }\n if (timer) {\n if (useScope) {\n QUERY_COUNTER = scope.def()\n block(QUERY_COUNTER, '=', TIMER, '.getNumPendingQueries();')\n } else {\n block(TIMER, '.beginQuery(', STATS, ');')\n }\n }\n }\n\n function emitProfileEnd (block) {\n block(STATS, '.cpuTime+=', perfCounter(), '-', CPU_START, ';')\n if (timer) {\n if (useScope) {\n block(TIMER, '.pushScopeStats(',\n QUERY_COUNTER, ',',\n TIMER, '.getNumPendingQueries(),',\n STATS, ');')\n } else {\n block(TIMER, '.endQuery();')\n }\n }\n }\n\n function scopeProfile (value) {\n var prev = scope.def(CURRENT_STATE, '.profile')\n scope(CURRENT_STATE, '.profile=', value, ';')\n scope.exit(CURRENT_STATE, '.profile=', prev, ';')\n }\n\n var USE_PROFILE\n if (profileArg) {\n if (isStatic(profileArg)) {\n if (profileArg.enable) {\n emitProfileStart(scope)\n emitProfileEnd(scope.exit)\n scopeProfile('true')\n } else {\n scopeProfile('false')\n }\n return\n }\n USE_PROFILE = profileArg.append(env, scope)\n scopeProfile(USE_PROFILE)\n } else {\n USE_PROFILE = scope.def(CURRENT_STATE, '.profile')\n }\n\n var start = env.block()\n emitProfileStart(start)\n scope('if(', USE_PROFILE, '){', start, '}')\n var end = env.block()\n emitProfileEnd(end)\n scope.exit('if(', USE_PROFILE, '){', end, '}')\n }\n\n function emitAttributes (env, scope, args, attributes, filter) {\n var shared = env.shared\n\n function typeLength (x) {\n switch (x) {\n case GL_FLOAT_VEC2:\n case GL_INT_VEC2:\n case GL_BOOL_VEC2:\n return 2\n case GL_FLOAT_VEC3:\n case GL_INT_VEC3:\n case GL_BOOL_VEC3:\n return 3\n case GL_FLOAT_VEC4:\n case GL_INT_VEC4:\n case GL_BOOL_VEC4:\n return 4\n default:\n return 1\n }\n }\n\n function emitBindAttribute (ATTRIBUTE, size, record) {\n var GL = shared.gl\n\n var LOCATION = scope.def(ATTRIBUTE, '.location')\n var BINDING = scope.def(shared.attributes, '[', LOCATION, ']')\n\n var STATE = record.state\n var BUFFER = record.buffer\n var CONST_COMPONENTS = [\n record.x,\n record.y,\n record.z,\n record.w\n ]\n\n var COMMON_KEYS = [\n 'buffer',\n 'normalized',\n 'offset',\n 'stride'\n ]\n\n function emitBuffer () {\n scope(\n 'if(!', BINDING, '.buffer){',\n GL, '.enableVertexAttribArray(', LOCATION, ');}')\n\n var TYPE = record.type\n var SIZE\n if (!record.size) {\n SIZE = size\n } else {\n SIZE = scope.def(record.size, '||', size)\n }\n\n scope('if(',\n BINDING, '.type!==', TYPE, '||',\n BINDING, '.size!==', SIZE, '||',\n COMMON_KEYS.map(function (key) {\n return BINDING + '.' + key + '!==' + record[key]\n }).join('||'),\n '){',\n GL, '.bindBuffer(', GL_ARRAY_BUFFER$2, ',', BUFFER, '.buffer);',\n GL, '.vertexAttribPointer(', [\n LOCATION,\n SIZE,\n TYPE,\n record.normalized,\n record.stride,\n record.offset\n ], ');',\n BINDING, '.type=', TYPE, ';',\n BINDING, '.size=', SIZE, ';',\n COMMON_KEYS.map(function (key) {\n return BINDING + '.' + key + '=' + record[key] + ';'\n }).join(''),\n '}')\n\n if (extInstancing) {\n var DIVISOR = record.divisor\n scope(\n 'if(', BINDING, '.divisor!==', DIVISOR, '){',\n env.instancing, '.vertexAttribDivisorANGLE(', [LOCATION, DIVISOR], ');',\n BINDING, '.divisor=', DIVISOR, ';}')\n }\n }\n\n function emitConstant () {\n scope(\n 'if(', BINDING, '.buffer){',\n GL, '.disableVertexAttribArray(', LOCATION, ');',\n BINDING, '.buffer=null;',\n '}if(', CUTE_COMPONENTS.map(function (c, i) {\n return BINDING + '.' + c + '!==' + CONST_COMPONENTS[i]\n }).join('||'), '){',\n GL, '.vertexAttrib4f(', LOCATION, ',', CONST_COMPONENTS, ');',\n CUTE_COMPONENTS.map(function (c, i) {\n return BINDING + '.' + c + '=' + CONST_COMPONENTS[i] + ';'\n }).join(''),\n '}')\n }\n\n if (STATE === ATTRIB_STATE_POINTER) {\n emitBuffer()\n } else if (STATE === ATTRIB_STATE_CONSTANT) {\n emitConstant()\n } else {\n scope('if(', STATE, '===', ATTRIB_STATE_POINTER, '){')\n emitBuffer()\n scope('}else{')\n emitConstant()\n scope('}')\n }\n }\n\n attributes.forEach(function (attribute) {\n var name = attribute.name\n var arg = args.attributes[name]\n var record\n if (arg) {\n if (!filter(arg)) {\n return\n }\n record = arg.append(env, scope)\n } else {\n if (!filter(SCOPE_DECL)) {\n return\n }\n var scopeAttrib = env.scopeAttrib(name)\n check$1.optional(function () {\n env.assert(scope,\n scopeAttrib + '.state',\n 'missing attribute ' + name)\n })\n record = {}\n Object.keys(new AttributeRecord()).forEach(function (key) {\n record[key] = scope.def(scopeAttrib, '.', key)\n })\n }\n emitBindAttribute(\n env.link(attribute), typeLength(attribute.info.type), record)\n })\n }\n\n function emitUniforms (env, scope, args, uniforms, filter) {\n var shared = env.shared\n var GL = shared.gl\n\n var infix\n for (var i = 0; i < uniforms.length; ++i) {\n var uniform = uniforms[i]\n var name = uniform.name\n var type = uniform.info.type\n var arg = args.uniforms[name]\n var UNIFORM = env.link(uniform)\n var LOCATION = UNIFORM + '.location'\n\n var VALUE\n if (arg) {\n if (!filter(arg)) {\n continue\n }\n if (isStatic(arg)) {\n var value = arg.value\n check$1.command(\n value !== null && typeof value !== 'undefined',\n 'missing uniform \"' + name + '\"', env.commandStr)\n if (type === GL_SAMPLER_2D || type === GL_SAMPLER_CUBE) {\n check$1.command(\n typeof value === 'function' &&\n ((type === GL_SAMPLER_2D &&\n (value._reglType === 'texture2d' ||\n value._reglType === 'framebuffer')) ||\n (type === GL_SAMPLER_CUBE &&\n (value._reglType === 'textureCube' ||\n value._reglType === 'framebufferCube'))),\n 'invalid texture for uniform ' + name, env.commandStr)\n var TEX_VALUE = env.link(value._texture || value.color[0]._texture)\n scope(GL, '.uniform1i(', LOCATION, ',', TEX_VALUE + '.bind());')\n scope.exit(TEX_VALUE, '.unbind();')\n } else if (\n type === GL_FLOAT_MAT2 ||\n type === GL_FLOAT_MAT3 ||\n type === GL_FLOAT_MAT4) {\n check$1.optional(function () {\n check$1.command(isArrayLike(value),\n 'invalid matrix for uniform ' + name, env.commandStr)\n check$1.command(\n (type === GL_FLOAT_MAT2 && value.length === 4) ||\n (type === GL_FLOAT_MAT3 && value.length === 9) ||\n (type === GL_FLOAT_MAT4 && value.length === 16),\n 'invalid length for matrix uniform ' + name, env.commandStr)\n })\n var MAT_VALUE = env.global.def('new Float32Array([' +\n Array.prototype.slice.call(value) + '])')\n var dim = 2\n if (type === GL_FLOAT_MAT3) {\n dim = 3\n } else if (type === GL_FLOAT_MAT4) {\n dim = 4\n }\n scope(\n GL, '.uniformMatrix', dim, 'fv(',\n LOCATION, ',false,', MAT_VALUE, ');')\n } else {\n switch (type) {\n case GL_FLOAT$8:\n check$1.commandType(value, 'number', 'uniform ' + name, env.commandStr)\n infix = '1f'\n break\n case GL_FLOAT_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2f'\n break\n case GL_FLOAT_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3f'\n break\n case GL_FLOAT_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4f'\n break\n case GL_BOOL:\n check$1.commandType(value, 'boolean', 'uniform ' + name, env.commandStr)\n infix = '1i'\n break\n case GL_INT$3:\n check$1.commandType(value, 'number', 'uniform ' + name, env.commandStr)\n infix = '1i'\n break\n case GL_BOOL_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2i'\n break\n case GL_INT_VEC2:\n check$1.command(\n isArrayLike(value) && value.length === 2,\n 'uniform ' + name, env.commandStr)\n infix = '2i'\n break\n case GL_BOOL_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3i'\n break\n case GL_INT_VEC3:\n check$1.command(\n isArrayLike(value) && value.length === 3,\n 'uniform ' + name, env.commandStr)\n infix = '3i'\n break\n case GL_BOOL_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4i'\n break\n case GL_INT_VEC4:\n check$1.command(\n isArrayLike(value) && value.length === 4,\n 'uniform ' + name, env.commandStr)\n infix = '4i'\n break\n }\n scope(GL, '.uniform', infix, '(', LOCATION, ',',\n isArrayLike(value) ? Array.prototype.slice.call(value) : value,\n ');')\n }\n continue\n } else {\n VALUE = arg.append(env, scope)\n }\n } else {\n if (!filter(SCOPE_DECL)) {\n continue\n }\n VALUE = scope.def(shared.uniforms, '[', stringStore.id(name), ']')\n }\n\n if (type === GL_SAMPLER_2D) {\n check$1(!Array.isArray(VALUE), 'must specify a scalar prop for textures')\n scope(\n 'if(', VALUE, '&&', VALUE, '._reglType===\"framebuffer\"){',\n VALUE, '=', VALUE, '.color[0];',\n '}')\n } else if (type === GL_SAMPLER_CUBE) {\n check$1(!Array.isArray(VALUE), 'must specify a scalar prop for cube maps')\n scope(\n 'if(', VALUE, '&&', VALUE, '._reglType===\"framebufferCube\"){',\n VALUE, '=', VALUE, '.color[0];',\n '}')\n }\n\n // perform type validation\n check$1.optional(function () {\n function emitCheck (pred, message) {\n env.assert(scope, pred,\n 'bad data or missing for uniform \"' + name + '\". ' + message)\n }\n\n function checkType (type) {\n check$1(!Array.isArray(VALUE), 'must not specify an array type for uniform')\n emitCheck(\n 'typeof ' + VALUE + '===\"' + type + '\"',\n 'invalid type, expected ' + type)\n }\n\n function checkVector (n, type) {\n if (Array.isArray(VALUE)) {\n check$1(VALUE.length === n, 'must have length ' + n)\n } else {\n emitCheck(\n shared.isArrayLike + '(' + VALUE + ')&&' + VALUE + '.length===' + n,\n 'invalid vector, should have length ' + n, env.commandStr)\n }\n }\n\n function checkTexture (target) {\n check$1(!Array.isArray(VALUE), 'must not specify a value type')\n emitCheck(\n 'typeof ' + VALUE + '===\"function\"&&' +\n VALUE + '._reglType===\"texture' +\n (target === GL_TEXTURE_2D$3 ? '2d' : 'Cube') + '\"',\n 'invalid texture type', env.commandStr)\n }\n\n switch (type) {\n case GL_INT$3:\n checkType('number')\n break\n case GL_INT_VEC2:\n checkVector(2, 'number')\n break\n case GL_INT_VEC3:\n checkVector(3, 'number')\n break\n case GL_INT_VEC4:\n checkVector(4, 'number')\n break\n case GL_FLOAT$8:\n checkType('number')\n break\n case GL_FLOAT_VEC2:\n checkVector(2, 'number')\n break\n case GL_FLOAT_VEC3:\n checkVector(3, 'number')\n break\n case GL_FLOAT_VEC4:\n checkVector(4, 'number')\n break\n case GL_BOOL:\n checkType('boolean')\n break\n case GL_BOOL_VEC2:\n checkVector(2, 'boolean')\n break\n case GL_BOOL_VEC3:\n checkVector(3, 'boolean')\n break\n case GL_BOOL_VEC4:\n checkVector(4, 'boolean')\n break\n case GL_FLOAT_MAT2:\n checkVector(4, 'number')\n break\n case GL_FLOAT_MAT3:\n checkVector(9, 'number')\n break\n case GL_FLOAT_MAT4:\n checkVector(16, 'number')\n break\n case GL_SAMPLER_2D:\n checkTexture(GL_TEXTURE_2D$3)\n break\n case GL_SAMPLER_CUBE:\n checkTexture(GL_TEXTURE_CUBE_MAP$2)\n break\n }\n })\n\n var unroll = 1\n switch (type) {\n case GL_SAMPLER_2D:\n case GL_SAMPLER_CUBE:\n var TEX = scope.def(VALUE, '._texture')\n scope(GL, '.uniform1i(', LOCATION, ',', TEX, '.bind());')\n scope.exit(TEX, '.unbind();')\n continue\n\n case GL_INT$3:\n case GL_BOOL:\n infix = '1i'\n break\n\n case GL_INT_VEC2:\n case GL_BOOL_VEC2:\n infix = '2i'\n unroll = 2\n break\n\n case GL_INT_VEC3:\n case GL_BOOL_VEC3:\n infix = '3i'\n unroll = 3\n break\n\n case GL_INT_VEC4:\n case GL_BOOL_VEC4:\n infix = '4i'\n unroll = 4\n break\n\n case GL_FLOAT$8:\n infix = '1f'\n break\n\n case GL_FLOAT_VEC2:\n infix = '2f'\n unroll = 2\n break\n\n case GL_FLOAT_VEC3:\n infix = '3f'\n unroll = 3\n break\n\n case GL_FLOAT_VEC4:\n infix = '4f'\n unroll = 4\n break\n\n case GL_FLOAT_MAT2:\n infix = 'Matrix2fv'\n break\n\n case GL_FLOAT_MAT3:\n infix = 'Matrix3fv'\n break\n\n case GL_FLOAT_MAT4:\n infix = 'Matrix4fv'\n break\n }\n\n scope(GL, '.uniform', infix, '(', LOCATION, ',')\n if (infix.charAt(0) === 'M') {\n var matSize = Math.pow(type - GL_FLOAT_MAT2 + 2, 2)\n var STORAGE = env.global.def('new Float32Array(', matSize, ')')\n if (Array.isArray(VALUE)) {\n scope(\n 'false,(',\n loop(matSize, function (i) {\n return STORAGE + '[' + i + ']=' + VALUE[i]\n }), ',', STORAGE, ')')\n } else {\n scope(\n 'false,(Array.isArray(', VALUE, ')||', VALUE, ' instanceof Float32Array)?', VALUE, ':(',\n loop(matSize, function (i) {\n return STORAGE + '[' + i + ']=' + VALUE + '[' + i + ']'\n }), ',', STORAGE, ')')\n }\n } else if (unroll > 1) {\n scope(loop(unroll, function (i) {\n return Array.isArray(VALUE) ? VALUE[i] : VALUE + '[' + i + ']'\n }))\n } else {\n check$1(!Array.isArray(VALUE), 'uniform value must not be an array')\n scope(VALUE)\n }\n scope(');')\n }\n }\n\n function emitDraw (env, outer, inner, args) {\n var shared = env.shared\n var GL = shared.gl\n var DRAW_STATE = shared.draw\n\n var drawOptions = args.draw\n\n function emitElements () {\n var defn = drawOptions.elements\n var ELEMENTS\n var scope = outer\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n scope = inner\n }\n ELEMENTS = defn.append(env, scope)\n } else {\n ELEMENTS = scope.def(DRAW_STATE, '.', S_ELEMENTS)\n }\n if (ELEMENTS) {\n scope(\n 'if(' + ELEMENTS + ')' +\n GL + '.bindBuffer(' + GL_ELEMENT_ARRAY_BUFFER$1 + ',' + ELEMENTS + '.buffer.buffer);')\n }\n return ELEMENTS\n }\n\n function emitCount () {\n var defn = drawOptions.count\n var COUNT\n var scope = outer\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n scope = inner\n }\n COUNT = defn.append(env, scope)\n check$1.optional(function () {\n if (defn.MISSING) {\n env.assert(outer, 'false', 'missing vertex count')\n }\n if (defn.DYNAMIC) {\n env.assert(scope, COUNT + '>=0', 'missing vertex count')\n }\n })\n } else {\n COUNT = scope.def(DRAW_STATE, '.', S_COUNT)\n check$1.optional(function () {\n env.assert(scope, COUNT + '>=0', 'missing vertex count')\n })\n }\n return COUNT\n }\n\n var ELEMENTS = emitElements()\n function emitValue (name) {\n var defn = drawOptions[name]\n if (defn) {\n if ((defn.contextDep && args.contextDynamic) || defn.propDep) {\n return defn.append(env, inner)\n } else {\n return defn.append(env, outer)\n }\n } else {\n return outer.def(DRAW_STATE, '.', name)\n }\n }\n\n var PRIMITIVE = emitValue(S_PRIMITIVE)\n var OFFSET = emitValue(S_OFFSET)\n\n var COUNT = emitCount()\n if (typeof COUNT === 'number') {\n if (COUNT === 0) {\n return\n }\n } else {\n inner('if(', COUNT, '){')\n inner.exit('}')\n }\n\n var INSTANCES, EXT_INSTANCING\n if (extInstancing) {\n INSTANCES = emitValue(S_INSTANCES)\n EXT_INSTANCING = env.instancing\n }\n\n var ELEMENT_TYPE = ELEMENTS + '.type'\n\n var elementsStatic = drawOptions.elements && isStatic(drawOptions.elements)\n\n function emitInstancing () {\n function drawElements () {\n inner(EXT_INSTANCING, '.drawElementsInstancedANGLE(', [\n PRIMITIVE,\n COUNT,\n ELEMENT_TYPE,\n OFFSET + '<<((' + ELEMENT_TYPE + '-' + GL_UNSIGNED_BYTE$8 + ')>>1)',\n INSTANCES\n ], ');')\n }\n\n function drawArrays () {\n inner(EXT_INSTANCING, '.drawArraysInstancedANGLE(',\n [PRIMITIVE, OFFSET, COUNT, INSTANCES], ');')\n }\n\n if (ELEMENTS) {\n if (!elementsStatic) {\n inner('if(', ELEMENTS, '){')\n drawElements()\n inner('}else{')\n drawArrays()\n inner('}')\n } else {\n drawElements()\n }\n } else {\n drawArrays()\n }\n }\n\n function emitRegular () {\n function drawElements () {\n inner(GL + '.drawElements(' + [\n PRIMITIVE,\n COUNT,\n ELEMENT_TYPE,\n OFFSET + '<<((' + ELEMENT_TYPE + '-' + GL_UNSIGNED_BYTE$8 + ')>>1)'\n ] + ');')\n }\n\n function drawArrays () {\n inner(GL + '.drawArrays(' + [PRIMITIVE, OFFSET, COUNT] + ');')\n }\n\n if (ELEMENTS) {\n if (!elementsStatic) {\n inner('if(', ELEMENTS, '){')\n drawElements()\n inner('}else{')\n drawArrays()\n inner('}')\n } else {\n drawElements()\n }\n } else {\n drawArrays()\n }\n }\n\n if (extInstancing && (typeof INSTANCES !== 'number' || INSTANCES >= 0)) {\n if (typeof INSTANCES === 'string') {\n inner('if(', INSTANCES, '>0){')\n emitInstancing()\n inner('}else if(', INSTANCES, '<0){')\n emitRegular()\n inner('}')\n } else {\n emitInstancing()\n }\n } else {\n emitRegular()\n }\n }\n\n function createBody (emitBody, parentEnv, args, program, count) {\n var env = createREGLEnvironment()\n var scope = env.proc('body', count)\n check$1.optional(function () {\n env.commandStr = parentEnv.commandStr\n env.command = env.link(parentEnv.commandStr)\n })\n if (extInstancing) {\n env.instancing = scope.def(\n env.shared.extensions, '.angle_instanced_arrays')\n }\n emitBody(env, scope, args, program)\n return env.compile().body\n }\n\n // ===================================================\n // ===================================================\n // DRAW PROC\n // ===================================================\n // ===================================================\n function emitDrawBody (env, draw, args, program) {\n injectExtensions(env, draw)\n if (args.useVAO) {\n if (args.drawVAO) {\n draw(env.shared.vao, '.setVAO(', args.drawVAO.append(env, draw), ');')\n } else {\n draw(env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n }\n } else {\n draw(env.shared.vao, '.setVAO(null);')\n emitAttributes(env, draw, args, program.attributes, function () {\n return true\n })\n }\n emitUniforms(env, draw, args, program.uniforms, function () {\n return true\n })\n emitDraw(env, draw, draw, args)\n }\n\n function emitDrawProc (env, args) {\n var draw = env.proc('draw', 1)\n\n injectExtensions(env, draw)\n\n emitContext(env, draw, args.context)\n emitPollFramebuffer(env, draw, args.framebuffer)\n\n emitPollState(env, draw, args)\n emitSetOptions(env, draw, args.state)\n\n emitProfile(env, draw, args, false, true)\n\n var program = args.shader.progVar.append(env, draw)\n draw(env.shared.gl, '.useProgram(', program, '.program);')\n\n if (args.shader.program) {\n emitDrawBody(env, draw, args, args.shader.program)\n } else {\n draw(env.shared.vao, '.setVAO(null);')\n var drawCache = env.global.def('{}')\n var PROG_ID = draw.def(program, '.id')\n var CACHED_PROC = draw.def(drawCache, '[', PROG_ID, ']')\n draw(\n env.cond(CACHED_PROC)\n .then(CACHED_PROC, '.call(this,a0);')\n .else(\n CACHED_PROC, '=', drawCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(emitDrawBody, env, args, program, 1)\n }), '(', program, ');',\n CACHED_PROC, '.call(this,a0);'))\n }\n\n if (Object.keys(args.state).length > 0) {\n draw(env.shared.current, '.dirty=true;')\n }\n }\n\n // ===================================================\n // ===================================================\n // BATCH PROC\n // ===================================================\n // ===================================================\n\n function emitBatchDynamicShaderBody (env, scope, args, program) {\n env.batchId = 'a1'\n\n injectExtensions(env, scope)\n\n function all () {\n return true\n }\n\n emitAttributes(env, scope, args, program.attributes, all)\n emitUniforms(env, scope, args, program.uniforms, all)\n emitDraw(env, scope, scope, args)\n }\n\n function emitBatchBody (env, scope, args, program) {\n injectExtensions(env, scope)\n\n var contextDynamic = args.contextDep\n\n var BATCH_ID = scope.def()\n var PROP_LIST = 'a0'\n var NUM_PROPS = 'a1'\n var PROPS = scope.def()\n env.shared.props = PROPS\n env.batchId = BATCH_ID\n\n var outer = env.scope()\n var inner = env.scope()\n\n scope(\n outer.entry,\n 'for(', BATCH_ID, '=0;', BATCH_ID, '<', NUM_PROPS, ';++', BATCH_ID, '){',\n PROPS, '=', PROP_LIST, '[', BATCH_ID, '];',\n inner,\n '}',\n outer.exit)\n\n function isInnerDefn (defn) {\n return ((defn.contextDep && contextDynamic) || defn.propDep)\n }\n\n function isOuterDefn (defn) {\n return !isInnerDefn(defn)\n }\n\n if (args.needsContext) {\n emitContext(env, inner, args.context)\n }\n if (args.needsFramebuffer) {\n emitPollFramebuffer(env, inner, args.framebuffer)\n }\n emitSetOptions(env, inner, args.state, isInnerDefn)\n\n if (args.profile && isInnerDefn(args.profile)) {\n emitProfile(env, inner, args, false, true)\n }\n\n if (!program) {\n var progCache = env.global.def('{}')\n var PROGRAM = args.shader.progVar.append(env, inner)\n var PROG_ID = inner.def(PROGRAM, '.id')\n var CACHED_PROC = inner.def(progCache, '[', PROG_ID, ']')\n inner(\n env.shared.gl, '.useProgram(', PROGRAM, '.program);',\n 'if(!', CACHED_PROC, '){',\n CACHED_PROC, '=', progCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(\n emitBatchDynamicShaderBody, env, args, program, 2)\n }), '(', PROGRAM, ');}',\n CACHED_PROC, '.call(this,a0[', BATCH_ID, '],', BATCH_ID, ');')\n } else {\n if (args.useVAO) {\n if (args.drawVAO) {\n if (isInnerDefn(args.drawVAO)) {\n // vao is a prop\n inner(env.shared.vao, '.setVAO(', args.drawVAO.append(env, inner), ');')\n } else {\n // vao is invariant\n outer(env.shared.vao, '.setVAO(', args.drawVAO.append(env, outer), ');')\n }\n } else {\n // scoped vao binding\n outer(env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n }\n } else {\n outer(env.shared.vao, '.setVAO(null);')\n emitAttributes(env, outer, args, program.attributes, isOuterDefn)\n emitAttributes(env, inner, args, program.attributes, isInnerDefn)\n }\n emitUniforms(env, outer, args, program.uniforms, isOuterDefn)\n emitUniforms(env, inner, args, program.uniforms, isInnerDefn)\n emitDraw(env, outer, inner, args)\n }\n }\n\n function emitBatchProc (env, args) {\n var batch = env.proc('batch', 2)\n env.batchId = '0'\n\n injectExtensions(env, batch)\n\n // Check if any context variables depend on props\n var contextDynamic = false\n var needsContext = true\n Object.keys(args.context).forEach(function (name) {\n contextDynamic = contextDynamic || args.context[name].propDep\n })\n if (!contextDynamic) {\n emitContext(env, batch, args.context)\n needsContext = false\n }\n\n // framebuffer state affects framebufferWidth/height context vars\n var framebuffer = args.framebuffer\n var needsFramebuffer = false\n if (framebuffer) {\n if (framebuffer.propDep) {\n contextDynamic = needsFramebuffer = true\n } else if (framebuffer.contextDep && contextDynamic) {\n needsFramebuffer = true\n }\n if (!needsFramebuffer) {\n emitPollFramebuffer(env, batch, framebuffer)\n }\n } else {\n emitPollFramebuffer(env, batch, null)\n }\n\n // viewport is weird because it can affect context vars\n if (args.state.viewport && args.state.viewport.propDep) {\n contextDynamic = true\n }\n\n function isInnerDefn (defn) {\n return (defn.contextDep && contextDynamic) || defn.propDep\n }\n\n // set webgl options\n emitPollState(env, batch, args)\n emitSetOptions(env, batch, args.state, function (defn) {\n return !isInnerDefn(defn)\n })\n\n if (!args.profile || !isInnerDefn(args.profile)) {\n emitProfile(env, batch, args, false, 'a1')\n }\n\n // Save these values to args so that the batch body routine can use them\n args.contextDep = contextDynamic\n args.needsContext = needsContext\n args.needsFramebuffer = needsFramebuffer\n\n // determine if shader is dynamic\n var progDefn = args.shader.progVar\n if ((progDefn.contextDep && contextDynamic) || progDefn.propDep) {\n emitBatchBody(\n env,\n batch,\n args,\n null)\n } else {\n var PROGRAM = progDefn.append(env, batch)\n batch(env.shared.gl, '.useProgram(', PROGRAM, '.program);')\n if (args.shader.program) {\n emitBatchBody(\n env,\n batch,\n args,\n args.shader.program)\n } else {\n batch(env.shared.vao, '.setVAO(null);')\n var batchCache = env.global.def('{}')\n var PROG_ID = batch.def(PROGRAM, '.id')\n var CACHED_PROC = batch.def(batchCache, '[', PROG_ID, ']')\n batch(\n env.cond(CACHED_PROC)\n .then(CACHED_PROC, '.call(this,a0,a1);')\n .else(\n CACHED_PROC, '=', batchCache, '[', PROG_ID, ']=',\n env.link(function (program) {\n return createBody(emitBatchBody, env, args, program, 2)\n }), '(', PROGRAM, ');',\n CACHED_PROC, '.call(this,a0,a1);'))\n }\n }\n\n if (Object.keys(args.state).length > 0) {\n batch(env.shared.current, '.dirty=true;')\n }\n }\n\n // ===================================================\n // ===================================================\n // SCOPE COMMAND\n // ===================================================\n // ===================================================\n function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3)\n env.batchId = 'a2'\n\n var shared = env.shared\n var CURRENT_STATE = shared.current\n\n emitContext(env, scope, args.context)\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope)\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name]\n var value = defn.append(env, scope)\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v)\n })\n } else {\n scope.set(shared.next, '.' + name, value)\n }\n })\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt]\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope))\n })\n\n Object.keys(args.uniforms).forEach(function (opt) {\n var value = args.uniforms[opt].append(env, scope)\n if (Array.isArray(value)) {\n value = '[' + value.join() + ']'\n }\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n value)\n })\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope)\n var scopeAttrib = env.scopeAttrib(name)\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop])\n })\n })\n\n if (args.scopeVAO) {\n scope.set(shared.vao, '.targetVAO', args.scopeVAO.append(env, scope))\n }\n\n function saveShader (name) {\n var shader = args.shader[name]\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope))\n }\n }\n saveShader(S_VERT)\n saveShader(S_FRAG)\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;')\n scope.exit(CURRENT_STATE, '.dirty=true;')\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');')\n }\n\n function isDynamicObject (object) {\n if (typeof object !== 'object' || isArrayLike(object)) {\n return\n }\n var props = Object.keys(object)\n for (var i = 0; i < props.length; ++i) {\n if (dynamic.isDynamic(object[props[i]])) {\n return true\n }\n }\n return false\n }\n\n function splatObject (env, options, name) {\n var object = options.static[name]\n if (!object || !isDynamicObject(object)) {\n return\n }\n\n var globals = env.global\n var keys = Object.keys(object)\n var thisDep = false\n var contextDep = false\n var propDep = false\n var objectRef = env.global.def('{}')\n keys.forEach(function (key) {\n var value = object[key]\n if (dynamic.isDynamic(value)) {\n if (typeof value === 'function') {\n value = object[key] = dynamic.unbox(value)\n }\n var deps = createDynamicDecl(value, null)\n thisDep = thisDep || deps.thisDep\n propDep = propDep || deps.propDep\n contextDep = contextDep || deps.contextDep\n } else {\n globals(objectRef, '.', key, '=')\n switch (typeof value) {\n case 'number':\n globals(value)\n break\n case 'string':\n globals('\"', value, '\"')\n break\n case 'object':\n if (Array.isArray(value)) {\n globals('[', value.join(), ']')\n }\n break\n default:\n globals(env.link(value))\n break\n }\n globals(';')\n }\n })\n\n function appendBlock (env, block) {\n keys.forEach(function (key) {\n var value = object[key]\n if (!dynamic.isDynamic(value)) {\n return\n }\n var ref = env.invoke(block, value)\n block(objectRef, '.', key, '=', ref, ';')\n })\n }\n\n options.dynamic[name] = new dynamic.DynamicVariable(DYN_THUNK, {\n thisDep: thisDep,\n contextDep: contextDep,\n propDep: propDep,\n ref: objectRef,\n append: appendBlock\n })\n delete options.static[name]\n }\n\n // ===========================================================================\n // ===========================================================================\n // MAIN DRAW COMMAND\n // ===========================================================================\n // ===========================================================================\n function compileCommand (options, attributes, uniforms, context, stats) {\n var env = createREGLEnvironment()\n\n // link stats, so that we can easily access it in the program.\n env.stats = env.link(stats)\n\n // splat options and attributes to allow for dynamic nested properties\n Object.keys(attributes.static).forEach(function (key) {\n splatObject(env, attributes, key)\n })\n NESTED_OPTIONS.forEach(function (name) {\n splatObject(env, options, name)\n })\n\n var args = parseArguments(options, attributes, uniforms, context, env)\n\n emitDrawProc(env, args)\n emitScopeProc(env, args)\n emitBatchProc(env, args)\n\n return extend(env.compile(), {\n destroy: function () {\n args.shader.program.destroy()\n }\n })\n }\n\n // ===========================================================================\n // ===========================================================================\n // POLL / REFRESH\n // ===========================================================================\n // ===========================================================================\n return {\n next: nextState,\n current: currentState,\n procs: (function () {\n var env = createREGLEnvironment()\n var poll = env.proc('poll')\n var refresh = env.proc('refresh')\n var common = env.block()\n poll(common)\n refresh(common)\n\n var shared = env.shared\n var GL = shared.gl\n var NEXT_STATE = shared.next\n var CURRENT_STATE = shared.current\n\n common(CURRENT_STATE, '.dirty=false;')\n\n emitPollFramebuffer(env, poll)\n emitPollFramebuffer(env, refresh, null, true)\n\n // Refresh updates all attribute state changes\n var INSTANCING\n if (extInstancing) {\n INSTANCING = env.link(extInstancing)\n }\n\n // update vertex array bindings\n if (extensions.oes_vertex_array_object) {\n refresh(env.link(extensions.oes_vertex_array_object), '.bindVertexArrayOES(null);')\n }\n for (var i = 0; i < limits.maxAttributes; ++i) {\n var BINDING = refresh.def(shared.attributes, '[', i, ']')\n var ifte = env.cond(BINDING, '.buffer')\n ifte.then(\n GL, '.enableVertexAttribArray(', i, ');',\n GL, '.bindBuffer(',\n GL_ARRAY_BUFFER$2, ',',\n BINDING, '.buffer.buffer);',\n GL, '.vertexAttribPointer(',\n i, ',',\n BINDING, '.size,',\n BINDING, '.type,',\n BINDING, '.normalized,',\n BINDING, '.stride,',\n BINDING, '.offset);'\n ).else(\n GL, '.disableVertexAttribArray(', i, ');',\n GL, '.vertexAttrib4f(',\n i, ',',\n BINDING, '.x,',\n BINDING, '.y,',\n BINDING, '.z,',\n BINDING, '.w);',\n BINDING, '.buffer=null;')\n refresh(ifte)\n if (extInstancing) {\n refresh(\n INSTANCING, '.vertexAttribDivisorANGLE(',\n i, ',',\n BINDING, '.divisor);')\n }\n }\n refresh(\n env.shared.vao, '.currentVAO=null;',\n env.shared.vao, '.setVAO(', env.shared.vao, '.targetVAO);')\n\n Object.keys(GL_FLAGS).forEach(function (flag) {\n var cap = GL_FLAGS[flag]\n var NEXT = common.def(NEXT_STATE, '.', flag)\n var block = env.block()\n block('if(', NEXT, '){',\n GL, '.enable(', cap, ')}else{',\n GL, '.disable(', cap, ')}',\n CURRENT_STATE, '.', flag, '=', NEXT, ';')\n refresh(block)\n poll(\n 'if(', NEXT, '!==', CURRENT_STATE, '.', flag, '){',\n block,\n '}')\n })\n\n Object.keys(GL_VARIABLES).forEach(function (name) {\n var func = GL_VARIABLES[name]\n var init = currentState[name]\n var NEXT, CURRENT\n var block = env.block()\n block(GL, '.', func, '(')\n if (isArrayLike(init)) {\n var n = init.length\n NEXT = env.global.def(NEXT_STATE, '.', name)\n CURRENT = env.global.def(CURRENT_STATE, '.', name)\n block(\n loop(n, function (i) {\n return NEXT + '[' + i + ']'\n }), ');',\n loop(n, function (i) {\n return CURRENT + '[' + i + ']=' + NEXT + '[' + i + '];'\n }).join(''))\n poll(\n 'if(', loop(n, function (i) {\n return NEXT + '[' + i + ']!==' + CURRENT + '[' + i + ']'\n }).join('||'), '){',\n block,\n '}')\n } else {\n NEXT = common.def(NEXT_STATE, '.', name)\n CURRENT = common.def(CURRENT_STATE, '.', name)\n block(\n NEXT, ');',\n CURRENT_STATE, '.', name, '=', NEXT, ';')\n poll(\n 'if(', NEXT, '!==', CURRENT, '){',\n block,\n '}')\n }\n refresh(block)\n })\n\n return env.compile()\n })(),\n compile: compileCommand\n }\n}\n\nfunction stats () {\n return {\n vaoCount: 0,\n bufferCount: 0,\n elementsCount: 0,\n framebufferCount: 0,\n shaderCount: 0,\n textureCount: 0,\n cubeCount: 0,\n renderbufferCount: 0,\n maxTextureUnits: 0\n }\n}\n\nvar GL_QUERY_RESULT_EXT = 0x8866\nvar GL_QUERY_RESULT_AVAILABLE_EXT = 0x8867\nvar GL_TIME_ELAPSED_EXT = 0x88BF\n\nvar createTimer = function (gl, extensions) {\n if (!extensions.ext_disjoint_timer_query) {\n return null\n }\n\n // QUERY POOL BEGIN\n var queryPool = []\n function allocQuery () {\n return queryPool.pop() || extensions.ext_disjoint_timer_query.createQueryEXT()\n }\n function freeQuery (query) {\n queryPool.push(query)\n }\n // QUERY POOL END\n\n var pendingQueries = []\n function beginQuery (stats) {\n var query = allocQuery()\n extensions.ext_disjoint_timer_query.beginQueryEXT(GL_TIME_ELAPSED_EXT, query)\n pendingQueries.push(query)\n pushScopeStats(pendingQueries.length - 1, pendingQueries.length, stats)\n }\n\n function endQuery () {\n extensions.ext_disjoint_timer_query.endQueryEXT(GL_TIME_ELAPSED_EXT)\n }\n\n //\n // Pending stats pool.\n //\n function PendingStats () {\n this.startQueryIndex = -1\n this.endQueryIndex = -1\n this.sum = 0\n this.stats = null\n }\n var pendingStatsPool = []\n function allocPendingStats () {\n return pendingStatsPool.pop() || new PendingStats()\n }\n function freePendingStats (pendingStats) {\n pendingStatsPool.push(pendingStats)\n }\n // Pending stats pool end\n\n var pendingStats = []\n function pushScopeStats (start, end, stats) {\n var ps = allocPendingStats()\n ps.startQueryIndex = start\n ps.endQueryIndex = end\n ps.sum = 0\n ps.stats = stats\n pendingStats.push(ps)\n }\n\n // we should call this at the beginning of the frame,\n // in order to update gpuTime\n var timeSum = []\n var queryPtr = []\n function update () {\n var ptr, i\n\n var n = pendingQueries.length\n if (n === 0) {\n return\n }\n\n // Reserve space\n queryPtr.length = Math.max(queryPtr.length, n + 1)\n timeSum.length = Math.max(timeSum.length, n + 1)\n timeSum[0] = 0\n queryPtr[0] = 0\n\n // Update all pending timer queries\n var queryTime = 0\n ptr = 0\n for (i = 0; i < pendingQueries.length; ++i) {\n var query = pendingQueries[i]\n if (extensions.ext_disjoint_timer_query.getQueryObjectEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT)) {\n queryTime += extensions.ext_disjoint_timer_query.getQueryObjectEXT(query, GL_QUERY_RESULT_EXT)\n freeQuery(query)\n } else {\n pendingQueries[ptr++] = query\n }\n timeSum[i + 1] = queryTime\n queryPtr[i + 1] = ptr\n }\n pendingQueries.length = ptr\n\n // Update all pending stat queries\n ptr = 0\n for (i = 0; i < pendingStats.length; ++i) {\n var stats = pendingStats[i]\n var start = stats.startQueryIndex\n var end = stats.endQueryIndex\n stats.sum += timeSum[end] - timeSum[start]\n var startPtr = queryPtr[start]\n var endPtr = queryPtr[end]\n if (endPtr === startPtr) {\n stats.stats.gpuTime += stats.sum / 1e6\n freePendingStats(stats)\n } else {\n stats.startQueryIndex = startPtr\n stats.endQueryIndex = endPtr\n pendingStats[ptr++] = stats\n }\n }\n pendingStats.length = ptr\n }\n\n return {\n beginQuery: beginQuery,\n endQuery: endQuery,\n pushScopeStats: pushScopeStats,\n update: update,\n getNumPendingQueries: function () {\n return pendingQueries.length\n },\n clear: function () {\n queryPool.push.apply(queryPool, pendingQueries)\n for (var i = 0; i < queryPool.length; i++) {\n extensions.ext_disjoint_timer_query.deleteQueryEXT(queryPool[i])\n }\n pendingQueries.length = 0\n queryPool.length = 0\n },\n restore: function () {\n pendingQueries.length = 0\n queryPool.length = 0\n }\n }\n}\n\nvar GL_COLOR_BUFFER_BIT = 16384\nvar GL_DEPTH_BUFFER_BIT = 256\nvar GL_STENCIL_BUFFER_BIT = 1024\n\nvar GL_ARRAY_BUFFER = 34962\n\nvar CONTEXT_LOST_EVENT = 'webglcontextlost'\nvar CONTEXT_RESTORED_EVENT = 'webglcontextrestored'\n\nvar DYN_PROP = 1\nvar DYN_CONTEXT = 2\nvar DYN_STATE = 3\n\nfunction find (haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) {\n return i\n }\n }\n return -1\n}\n\nfunction wrapREGL (args) {\n var config = parseArgs(args)\n if (!config) {\n return null\n }\n\n var gl = config.gl\n var glAttributes = gl.getContextAttributes()\n var contextLost = gl.isContextLost()\n\n var extensionState = createExtensionCache(gl, config)\n if (!extensionState) {\n return null\n }\n\n var stringStore = createStringStore()\n var stats$$1 = stats()\n var extensions = extensionState.extensions\n var timer = createTimer(gl, extensions)\n\n var START_TIME = clock()\n var WIDTH = gl.drawingBufferWidth\n var HEIGHT = gl.drawingBufferHeight\n\n var contextState = {\n tick: 0,\n time: 0,\n viewportWidth: WIDTH,\n viewportHeight: HEIGHT,\n framebufferWidth: WIDTH,\n framebufferHeight: HEIGHT,\n drawingBufferWidth: WIDTH,\n drawingBufferHeight: HEIGHT,\n pixelRatio: config.pixelRatio\n }\n var uniformState = {}\n var drawState = {\n elements: null,\n primitive: 4, // GL_TRIANGLES\n count: -1,\n offset: 0,\n instances: -1\n }\n\n var limits = wrapLimits(gl, extensions)\n var bufferState = wrapBufferState(\n gl,\n stats$$1,\n config,\n destroyBuffer)\n var attributeState = wrapAttributeState(\n gl,\n extensions,\n limits,\n stats$$1,\n bufferState)\n function destroyBuffer (buffer) {\n return attributeState.destroyBuffer(buffer)\n }\n var elementState = wrapElementsState(gl, extensions, bufferState, stats$$1)\n var shaderState = wrapShaderState(gl, stringStore, stats$$1, config)\n var textureState = createTextureSet(\n gl,\n extensions,\n limits,\n function () { core.procs.poll() },\n contextState,\n stats$$1,\n config)\n var renderbufferState = wrapRenderbuffers(gl, extensions, limits, stats$$1, config)\n var framebufferState = wrapFBOState(\n gl,\n extensions,\n limits,\n textureState,\n renderbufferState,\n stats$$1)\n var core = reglCore(\n gl,\n stringStore,\n extensions,\n limits,\n bufferState,\n elementState,\n textureState,\n framebufferState,\n uniformState,\n attributeState,\n shaderState,\n drawState,\n contextState,\n timer,\n config)\n var readPixels = wrapReadPixels(\n gl,\n framebufferState,\n core.procs.poll,\n contextState,\n glAttributes, extensions, limits)\n\n var nextState = core.next\n var canvas = gl.canvas\n\n var rafCallbacks = []\n var lossCallbacks = []\n var restoreCallbacks = []\n var destroyCallbacks = [config.onDestroy]\n\n var activeRAF = null\n function handleRAF () {\n if (rafCallbacks.length === 0) {\n if (timer) {\n timer.update()\n }\n activeRAF = null\n return\n }\n\n // schedule next animation frame\n activeRAF = raf.next(handleRAF)\n\n // poll for changes\n poll()\n\n // fire a callback for all pending rafs\n for (var i = rafCallbacks.length - 1; i >= 0; --i) {\n var cb = rafCallbacks[i]\n if (cb) {\n cb(contextState, null, 0)\n }\n }\n\n // flush all pending webgl calls\n gl.flush()\n\n // poll GPU timers *after* gl.flush so we don't delay command dispatch\n if (timer) {\n timer.update()\n }\n }\n\n function startRAF () {\n if (!activeRAF && rafCallbacks.length > 0) {\n activeRAF = raf.next(handleRAF)\n }\n }\n\n function stopRAF () {\n if (activeRAF) {\n raf.cancel(handleRAF)\n activeRAF = null\n }\n }\n\n function handleContextLoss (event) {\n event.preventDefault()\n\n // set context lost flag\n contextLost = true\n\n // pause request animation frame\n stopRAF()\n\n // lose context\n lossCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n function handleContextRestored (event) {\n // clear error code\n gl.getError()\n\n // clear context lost flag\n contextLost = false\n\n // refresh state\n extensionState.restore()\n shaderState.restore()\n bufferState.restore()\n textureState.restore()\n renderbufferState.restore()\n framebufferState.restore()\n attributeState.restore()\n if (timer) {\n timer.restore()\n }\n\n // refresh state\n core.procs.refresh()\n\n // restart RAF\n startRAF()\n\n // restore context\n restoreCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n if (canvas) {\n canvas.addEventListener(CONTEXT_LOST_EVENT, handleContextLoss, false)\n canvas.addEventListener(CONTEXT_RESTORED_EVENT, handleContextRestored, false)\n }\n\n function destroy () {\n rafCallbacks.length = 0\n stopRAF()\n\n if (canvas) {\n canvas.removeEventListener(CONTEXT_LOST_EVENT, handleContextLoss)\n canvas.removeEventListener(CONTEXT_RESTORED_EVENT, handleContextRestored)\n }\n\n shaderState.clear()\n framebufferState.clear()\n renderbufferState.clear()\n textureState.clear()\n elementState.clear()\n bufferState.clear()\n attributeState.clear()\n\n if (timer) {\n timer.clear()\n }\n\n destroyCallbacks.forEach(function (cb) {\n cb()\n })\n }\n\n function compileProcedure (options) {\n check$1(!!options, 'invalid args to regl({...})')\n check$1.type(options, 'object', 'invalid args to regl({...})')\n\n function flattenNestedOptions (options) {\n var result = extend({}, options)\n delete result.uniforms\n delete result.attributes\n delete result.context\n delete result.vao\n\n if ('stencil' in result && result.stencil.op) {\n result.stencil.opBack = result.stencil.opFront = result.stencil.op\n delete result.stencil.op\n }\n\n function merge (name) {\n if (name in result) {\n var child = result[name]\n delete result[name]\n Object.keys(child).forEach(function (prop) {\n result[name + '.' + prop] = child[prop]\n })\n }\n }\n merge('blend')\n merge('depth')\n merge('cull')\n merge('stencil')\n merge('polygonOffset')\n merge('scissor')\n merge('sample')\n\n if ('vao' in options) {\n result.vao = options.vao\n }\n\n return result\n }\n\n function separateDynamic (object, useArrays) {\n var staticItems = {}\n var dynamicItems = {}\n Object.keys(object).forEach(function (option) {\n var value = object[option]\n if (dynamic.isDynamic(value)) {\n dynamicItems[option] = dynamic.unbox(value, option)\n return\n } else if (useArrays && Array.isArray(value)) {\n for (var i = 0; i < value.length; ++i) {\n if (dynamic.isDynamic(value[i])) {\n dynamicItems[option] = dynamic.unbox(value, option)\n return\n }\n }\n }\n staticItems[option] = value\n })\n return {\n dynamic: dynamicItems,\n static: staticItems\n }\n }\n\n // Treat context variables separate from other dynamic variables\n var context = separateDynamic(options.context || {}, true)\n var uniforms = separateDynamic(options.uniforms || {}, true)\n var attributes = separateDynamic(options.attributes || {}, false)\n var opts = separateDynamic(flattenNestedOptions(options), false)\n\n var stats$$1 = {\n gpuTime: 0.0,\n cpuTime: 0.0,\n count: 0\n }\n\n var compiled = core.compile(opts, attributes, uniforms, context, stats$$1)\n\n var draw = compiled.draw\n var batch = compiled.batch\n var scope = compiled.scope\n\n // FIXME: we should modify code generation for batch commands so this\n // isn't necessary\n var EMPTY_ARRAY = []\n function reserve (count) {\n while (EMPTY_ARRAY.length < count) {\n EMPTY_ARRAY.push(null)\n }\n return EMPTY_ARRAY\n }\n\n function REGLCommand (args, body) {\n var i\n if (contextLost) {\n check$1.raise('context lost')\n }\n if (typeof args === 'function') {\n return scope.call(this, null, args, 0)\n } else if (typeof body === 'function') {\n if (typeof args === 'number') {\n for (i = 0; i < args; ++i) {\n scope.call(this, null, body, i)\n }\n } else if (Array.isArray(args)) {\n for (i = 0; i < args.length; ++i) {\n scope.call(this, args[i], body, i)\n }\n } else {\n return scope.call(this, args, body, 0)\n }\n } else if (typeof args === 'number') {\n if (args > 0) {\n return batch.call(this, reserve(args | 0), args | 0)\n }\n } else if (Array.isArray(args)) {\n if (args.length) {\n return batch.call(this, args, args.length)\n }\n } else {\n return draw.call(this, args)\n }\n }\n\n return extend(REGLCommand, {\n stats: stats$$1,\n destroy: function () {\n compiled.destroy()\n }\n })\n }\n\n var setFBO = framebufferState.setFBO = compileProcedure({\n framebuffer: dynamic.define.call(null, DYN_PROP, 'framebuffer')\n })\n\n function clearImpl (_, options) {\n var clearFlags = 0\n core.procs.poll()\n\n var c = options.color\n if (c) {\n gl.clearColor(+c[0] || 0, +c[1] || 0, +c[2] || 0, +c[3] || 0)\n clearFlags |= GL_COLOR_BUFFER_BIT\n }\n if ('depth' in options) {\n gl.clearDepth(+options.depth)\n clearFlags |= GL_DEPTH_BUFFER_BIT\n }\n if ('stencil' in options) {\n gl.clearStencil(options.stencil | 0)\n clearFlags |= GL_STENCIL_BUFFER_BIT\n }\n\n check$1(!!clearFlags, 'called regl.clear with no buffer specified')\n gl.clear(clearFlags)\n }\n\n function clear (options) {\n check$1(\n typeof options === 'object' && options,\n 'regl.clear() takes an object as input')\n if ('framebuffer' in options) {\n if (options.framebuffer &&\n options.framebuffer_reglType === 'framebufferCube') {\n for (var i = 0; i < 6; ++i) {\n setFBO(extend({\n framebuffer: options.framebuffer.faces[i]\n }, options), clearImpl)\n }\n } else {\n setFBO(options, clearImpl)\n }\n } else {\n clearImpl(null, options)\n }\n }\n\n function frame (cb) {\n check$1.type(cb, 'function', 'regl.frame() callback must be a function')\n rafCallbacks.push(cb)\n\n function cancel () {\n // FIXME: should we check something other than equals cb here?\n // what if a user calls frame twice with the same callback...\n //\n var i = find(rafCallbacks, cb)\n check$1(i >= 0, 'cannot cancel a frame twice')\n function pendingCancel () {\n var index = find(rafCallbacks, pendingCancel)\n rafCallbacks[index] = rafCallbacks[rafCallbacks.length - 1]\n rafCallbacks.length -= 1\n if (rafCallbacks.length <= 0) {\n stopRAF()\n }\n }\n rafCallbacks[i] = pendingCancel\n }\n\n startRAF()\n\n return {\n cancel: cancel\n }\n }\n\n // poll viewport\n function pollViewport () {\n var viewport = nextState.viewport\n var scissorBox = nextState.scissor_box\n viewport[0] = viewport[1] = scissorBox[0] = scissorBox[1] = 0\n contextState.viewportWidth =\n contextState.framebufferWidth =\n contextState.drawingBufferWidth =\n viewport[2] =\n scissorBox[2] = gl.drawingBufferWidth\n contextState.viewportHeight =\n contextState.framebufferHeight =\n contextState.drawingBufferHeight =\n viewport[3] =\n scissorBox[3] = gl.drawingBufferHeight\n }\n\n function poll () {\n contextState.tick += 1\n contextState.time = now()\n pollViewport()\n core.procs.poll()\n }\n\n function refresh () {\n textureState.refresh()\n pollViewport()\n core.procs.refresh()\n if (timer) {\n timer.update()\n }\n }\n\n function now () {\n return (clock() - START_TIME) / 1000.0\n }\n\n refresh()\n\n function addListener (event, callback) {\n check$1.type(callback, 'function', 'listener callback must be a function')\n\n var callbacks\n switch (event) {\n case 'frame':\n return frame(callback)\n case 'lost':\n callbacks = lossCallbacks\n break\n case 'restore':\n callbacks = restoreCallbacks\n break\n case 'destroy':\n callbacks = destroyCallbacks\n break\n default:\n check$1.raise('invalid event, must be one of frame,lost,restore,destroy')\n }\n\n callbacks.push(callback)\n return {\n cancel: function () {\n for (var i = 0; i < callbacks.length; ++i) {\n if (callbacks[i] === callback) {\n callbacks[i] = callbacks[callbacks.length - 1]\n callbacks.pop()\n return\n }\n }\n }\n }\n }\n\n var regl = extend(compileProcedure, {\n // Clear current FBO\n clear: clear,\n\n // Short cuts for dynamic variables\n prop: dynamic.define.bind(null, DYN_PROP),\n context: dynamic.define.bind(null, DYN_CONTEXT),\n this: dynamic.define.bind(null, DYN_STATE),\n\n // executes an empty draw command\n draw: compileProcedure({}),\n\n // Resources\n buffer: function (options) {\n return bufferState.create(options, GL_ARRAY_BUFFER, false, false)\n },\n elements: function (options) {\n return elementState.create(options, false)\n },\n texture: textureState.create2D,\n cube: textureState.createCube,\n renderbuffer: renderbufferState.create,\n framebuffer: framebufferState.create,\n framebufferCube: framebufferState.createCube,\n vao: attributeState.createVAO,\n\n // Expose context attributes\n attributes: glAttributes,\n\n // Frame rendering\n frame: frame,\n on: addListener,\n\n // System limits\n limits: limits,\n hasExtension: function (name) {\n return limits.extensions.indexOf(name.toLowerCase()) >= 0\n },\n\n // Read pixels\n read: readPixels,\n\n // Destroy regl and all associated resources\n destroy: destroy,\n\n // Direct GL state manipulation\n _gl: gl,\n _refresh: refresh,\n\n poll: function () {\n poll()\n if (timer) {\n timer.update()\n }\n },\n\n // Current time\n now: now,\n\n // regl Statistics Information\n stats: stats$$1\n })\n\n config.onDone(null, regl)\n\n return regl\n}\n\nreturn wrapREGL;\n\n})));\n//# sourceMappingURL=regl.js.map\n","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n/**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#attributes\n */\nvar ReglAttribute = /*#__PURE__*/function () {\n function ReglAttribute(gl, options) {\n _classCallCheck(this, ReglAttribute);\n this.attribute = void 0;\n this.buffer = void 0;\n var buffer = options.buffer,\n offset = options.offset,\n stride = options.stride,\n normalized = options.normalized,\n size = options.size,\n divisor = options.divisor;\n this.buffer = buffer;\n this.attribute = {\n buffer: buffer.get(),\n offset: offset || 0,\n stride: stride || 0,\n normalized: normalized || false,\n divisor: divisor || 0\n };\n if (size) {\n this.attribute.size = size;\n }\n }\n _createClass(ReglAttribute, [{\n key: \"get\",\n value: function get() {\n return this.attribute;\n }\n }, {\n key: \"updateBuffer\",\n value: function updateBuffer(options) {\n this.buffer.subData(options);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.buffer.destroy();\n }\n }]);\n return ReglAttribute;\n}();\nexport { ReglAttribute as default };\n//# sourceMappingURL=ReglAttribute.js.map","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _primitiveMap, _usageMap, _dataTypeMap, _formatMap, _mipmapMap, _filterMap, _wrapModeMap, _colorSpaceMap, _depthFuncMap, _blendEquationMap, _blendFuncMap, _stencilFuncMap, _stencilOpMap, _cullFaceMap;\n/**\n * @desc 由于 regl 使用大量字符串而非 WebGL 常量,因此需要映射\n */\nimport { gl } from '@antv/g-webgpu-core';\n// @see https://github.com/regl-project/regl/blob/gh-pages/lib/constants/primitives.json\nexport var primitiveMap = (_primitiveMap = {}, _defineProperty(_primitiveMap, gl.POINTS, 'points'), _defineProperty(_primitiveMap, gl.LINES, 'lines'), _defineProperty(_primitiveMap, gl.LINE_LOOP, 'line loop'), _defineProperty(_primitiveMap, gl.LINE_STRIP, 'line strip'), _defineProperty(_primitiveMap, gl.TRIANGLES, 'triangles'), _defineProperty(_primitiveMap, gl.TRIANGLE_FAN, 'triangle fan'), _defineProperty(_primitiveMap, gl.TRIANGLE_STRIP, 'triangle strip'), _primitiveMap);\nexport var usageMap = (_usageMap = {}, _defineProperty(_usageMap, gl.STATIC_DRAW, 'static'), _defineProperty(_usageMap, gl.DYNAMIC_DRAW, 'dynamic'), _defineProperty(_usageMap, gl.STREAM_DRAW, 'stream'), _usageMap);\nexport var dataTypeMap = (_dataTypeMap = {}, _defineProperty(_dataTypeMap, gl.BYTE, 'int8'), _defineProperty(_dataTypeMap, gl.UNSIGNED_INT, 'int16'), _defineProperty(_dataTypeMap, gl.INT, 'int32'), _defineProperty(_dataTypeMap, gl.UNSIGNED_BYTE, 'uint8'), _defineProperty(_dataTypeMap, gl.UNSIGNED_SHORT, 'uint16'), _defineProperty(_dataTypeMap, gl.UNSIGNED_INT, 'uint32'), _defineProperty(_dataTypeMap, gl.FLOAT, 'float'), _dataTypeMap);\nexport var formatMap = (_formatMap = {}, _defineProperty(_formatMap, gl.ALPHA, 'alpha'), _defineProperty(_formatMap, gl.LUMINANCE, 'luminance'), _defineProperty(_formatMap, gl.LUMINANCE_ALPHA, 'luminance alpha'), _defineProperty(_formatMap, gl.RGB, 'rgb'), _defineProperty(_formatMap, gl.RGBA, 'rgba'), _defineProperty(_formatMap, gl.RGBA4, 'rgba4'), _defineProperty(_formatMap, gl.RGB5_A1, 'rgb5 a1'), _defineProperty(_formatMap, gl.RGB565, 'rgb565'), _defineProperty(_formatMap, gl.DEPTH_COMPONENT, 'depth'), _defineProperty(_formatMap, gl.DEPTH_STENCIL, 'depth stencil'), _formatMap);\nexport var mipmapMap = (_mipmapMap = {}, _defineProperty(_mipmapMap, gl.DONT_CARE, 'dont care'), _defineProperty(_mipmapMap, gl.NICEST, 'nice'), _defineProperty(_mipmapMap, gl.FASTEST, 'fast'), _mipmapMap);\nexport var filterMap = (_filterMap = {}, _defineProperty(_filterMap, gl.NEAREST, 'nearest'), _defineProperty(_filterMap, gl.LINEAR, 'linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_LINEAR, 'mipmap'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_LINEAR, 'nearest mipmap linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_NEAREST, 'linear mipmap nearest'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_NEAREST, 'nearest mipmap nearest'), _filterMap);\nexport var wrapModeMap = (_wrapModeMap = {}, _defineProperty(_wrapModeMap, gl.REPEAT, 'repeat'), _defineProperty(_wrapModeMap, gl.CLAMP_TO_EDGE, 'clamp'), _defineProperty(_wrapModeMap, gl.MIRRORED_REPEAT, 'mirror'), _wrapModeMap);\nexport var colorSpaceMap = (_colorSpaceMap = {}, _defineProperty(_colorSpaceMap, gl.NONE, 'none'), _defineProperty(_colorSpaceMap, gl.BROWSER_DEFAULT_WEBGL, 'browser'), _colorSpaceMap);\nexport var depthFuncMap = (_depthFuncMap = {}, _defineProperty(_depthFuncMap, gl.NEVER, 'never'), _defineProperty(_depthFuncMap, gl.ALWAYS, 'always'), _defineProperty(_depthFuncMap, gl.LESS, 'less'), _defineProperty(_depthFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_depthFuncMap, gl.GREATER, 'greater'), _defineProperty(_depthFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_depthFuncMap, gl.EQUAL, 'equal'), _defineProperty(_depthFuncMap, gl.NOTEQUAL, 'notequal'), _depthFuncMap);\nexport var blendEquationMap = (_blendEquationMap = {}, _defineProperty(_blendEquationMap, gl.FUNC_ADD, 'add'), _defineProperty(_blendEquationMap, gl.MIN_EXT, 'min'), _defineProperty(_blendEquationMap, gl.MAX_EXT, 'max'), _defineProperty(_blendEquationMap, gl.FUNC_SUBTRACT, 'subtract'), _defineProperty(_blendEquationMap, gl.FUNC_REVERSE_SUBTRACT, 'reverse subtract'), _blendEquationMap);\nexport var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_blendFuncMap, gl.ZERO, 'zero'), _defineProperty(_blendFuncMap, gl.ONE, 'one'), _defineProperty(_blendFuncMap, gl.SRC_COLOR, 'src color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_COLOR, 'one minus src color'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA, 'src alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_ALPHA, 'one minus src alpha'), _defineProperty(_blendFuncMap, gl.DST_COLOR, 'dst color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_COLOR, 'one minus dst color'), _defineProperty(_blendFuncMap, gl.DST_ALPHA, 'dst alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_ALPHA, 'one minus dst alpha'), _defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, 'constant color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_COLOR, 'one minus constant color'), _defineProperty(_blendFuncMap, gl.CONSTANT_ALPHA, 'constant alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_ALPHA, 'one minus constant alpha'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA_SATURATE, 'src alpha saturate'), _blendFuncMap);\nexport var stencilFuncMap = (_stencilFuncMap = {}, _defineProperty(_stencilFuncMap, gl.NEVER, 'never'), _defineProperty(_stencilFuncMap, gl.ALWAYS, 'always'), _defineProperty(_stencilFuncMap, gl.LESS, 'less'), _defineProperty(_stencilFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_stencilFuncMap, gl.GREATER, 'greater'), _defineProperty(_stencilFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_stencilFuncMap, gl.EQUAL, 'equal'), _defineProperty(_stencilFuncMap, gl.NOTEQUAL, 'notequal'), _stencilFuncMap);\nexport var stencilOpMap = (_stencilOpMap = {}, _defineProperty(_stencilOpMap, gl.ZERO, 'zero'), _defineProperty(_stencilOpMap, gl.KEEP, 'keep'), _defineProperty(_stencilOpMap, gl.REPLACE, 'replace'), _defineProperty(_stencilOpMap, gl.INVERT, 'invert'), _defineProperty(_stencilOpMap, gl.INCR, 'increment'), _defineProperty(_stencilOpMap, gl.DECR, 'decrement'), _defineProperty(_stencilOpMap, gl.INCR_WRAP, 'increment wrap'), _defineProperty(_stencilOpMap, gl.DECR_WRAP, 'decrement wrap'), _stencilOpMap);\nexport var cullFaceMap = (_cullFaceMap = {}, _defineProperty(_cullFaceMap, gl.FRONT, 'front'), _defineProperty(_cullFaceMap, gl.BACK, 'back'), _cullFaceMap);\n//# sourceMappingURL=constants.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { dataTypeMap, usageMap } from './constants';\n\n/**\n * adaptor for regl.Buffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers\n */\nvar ReglBuffer = /*#__PURE__*/function () {\n function ReglBuffer(reGl, options) {\n _classCallCheck(this, ReglBuffer);\n this.buffer = void 0;\n var data = options.data,\n usage = options.usage,\n type = options.type;\n // @ts-ignore\n this.buffer = reGl.buffer({\n data: data,\n usage: usageMap[usage || gl.STATIC_DRAW],\n type: dataTypeMap[type || gl.UNSIGNED_BYTE]\n // length: 0,\n });\n }\n _createClass(ReglBuffer, [{\n key: \"get\",\n value: function get() {\n return this.buffer;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // this.buffer.destroy();\n }\n }, {\n key: \"subData\",\n value: function subData(_ref) {\n var data = _ref.data,\n offset = _ref.offset;\n // @ts-ignore\n this.buffer.subdata(data, offset);\n }\n }]);\n return ReglBuffer;\n}();\nexport { ReglBuffer as default };\n//# sourceMappingURL=ReglBuffer.js.map","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _isTypedArray from \"lodash/isTypedArray\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nimport { AST_TOKEN_TYPES, createEntity, STORAGE_CLASS } from '@antv/g-webgpu-core';\n/* babel-plugin-inline-import './shaders/quad.vert.glsl' */\nvar quadVert = \"attribute vec3 a_Position;\\nattribute vec2 a_TexCoord;\\n\\nvarying vec2 v_TexCoord;\\n\\nvoid main() {\\n gl_Position = vec4(a_Position, 1.0);\\n v_TexCoord = a_TexCoord;\\n}\";\nvar textureId = 0;\nvar debug = false;\n\n/**\n * adaptor for regl.DrawCommand\n */\nvar ReglComputeModel = /*#__PURE__*/function () {\n function ReglComputeModel(reGl, context) {\n var _this = this;\n _classCallCheck(this, ReglComputeModel);\n this.reGl = reGl;\n this.context = context;\n this.entity = createEntity();\n this.texFBO = void 0;\n this.computeCommand = void 0;\n this.textureCache = {};\n this.outputTextureName = void 0;\n this.swapOutputTextureName = void 0;\n this.compiledPingpong = void 0;\n this.dynamicPingpong = void 0;\n var uniforms = {};\n this.context.uniforms.forEach(function (uniform) {\n var name = uniform.name,\n type = uniform.type,\n data = uniform.data,\n isReferer = uniform.isReferer,\n storageClass = uniform.storageClass;\n // store data with a 2D texture\n if (storageClass === STORAGE_CLASS.StorageBuffer) {\n if (!isReferer) {\n _this.textureCache[name] = _this.calcDataTexture(name, type, data);\n var _this$textureCache$na = _this.textureCache[name],\n width = _this$textureCache$na.textureWidth,\n isOutput = _this$textureCache$na.isOutput;\n uniforms[\"\".concat(name, \"Size\")] = [width, width];\n if (isOutput) {\n _this.outputTextureName = name;\n if (_this.context.needPingpong) {\n _this.outputTextureName = \"\".concat(name, \"Output\");\n _this.textureCache[_this.outputTextureName] = _this.calcDataTexture(name, type, data);\n }\n }\n } else {\n // @ts-ignore\n _this.textureCache[name] = {\n data: undefined\n };\n // refer to another kernel's output,\n // the referred kernel may not have been initialized, so we use dynamic way here\n uniforms[\"\".concat(name, \"Size\")] = function () {\n return (\n // @ts-ignore\n data.compiledBundle.context.output.textureSize\n );\n };\n }\n uniforms[name] = function () {\n if (debug) {\n console.log(\"[\".concat(_this.entity, \"]: \").concat(name, \" \").concat(_this.textureCache[name].id));\n }\n return _this.textureCache[name].texture;\n };\n } else if (storageClass === STORAGE_CLASS.Uniform) {\n if (data && (Array.isArray(data) || _isTypedArray(data)) && data.length > 16) {\n // up to mat4 which includes 16 elements\n throw new Error(\"invalid data type \".concat(type));\n }\n // get uniform dynamically\n uniforms[name] = function () {\n return uniform.data;\n };\n }\n });\n var _this$getOuputDataTex = this.getOuputDataTexture(),\n textureWidth = _this$getOuputDataTex.textureWidth,\n texelCount = _this$getOuputDataTex.texelCount;\n\n // 传入 output 纹理尺寸和数据长度,便于多余的 texel 提前退出\n uniforms.u_OutputTextureSize = [textureWidth, textureWidth];\n uniforms.u_OutputTexelCount = texelCount;\n\n // 保存在 Kernel 的上下文中,供其他 Kernel 引用\n this.context.output.textureSize = [textureWidth, textureWidth];\n var drawParams = {\n attributes: {\n a_Position: [[-1, 1, 0], [-1, -1, 0], [1, 1, 0], [1, -1, 0]],\n a_TexCoord: [[0, 1], [0, 0], [1, 1], [1, 0]]\n },\n frag: \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n precision highp float;\\n#else\\n precision mediump float;\\n#endif\\n\".concat(this.context.shader),\n uniforms: uniforms,\n vert: quadVert,\n // TODO: use a fullscreen triangle instead.\n primitive: 'triangle strip',\n count: 4\n };\n this.computeCommand = this.reGl(drawParams);\n }\n _createClass(ReglComputeModel, [{\n key: \"run\",\n value: function run() {\n var _this2 = this;\n if (this.context.maxIteration > 1 && this.context.needPingpong) {\n this.compiledPingpong = true;\n }\n // need pingpong when (@in@out and execute(10)) or use `setBinding('out', self)`\n // this.needPingpong =\n // !!(this.context.maxIteration > 1 && this.context.needPingpong);\n\n // if (this.relativeOutputTextureNames.length) {\n // const { id, texture } = this.getOuputDataTexture();\n // this.relativeOutputTextureNames.forEach((name) => {\n // this.textureCache[name].id = id;\n // this.textureCache[name].texture = texture;\n // });\n // this.swap();\n // }\n\n if (this.compiledPingpong || this.dynamicPingpong) {\n this.swap();\n }\n this.texFBO = this.reGl.framebuffer({\n color: this.getOuputDataTexture().texture\n });\n this.texFBO.use(function () {\n _this2.computeCommand();\n });\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: output \").concat(this.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"readData\",\n value: function () {\n var _readData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _this3 = this;\n var pixels, _this$getOuputDataTex2, originalDataLength, elementsPerTexel, _this$getOuputDataTex3, typedArrayConstructor, formattedPixels, i;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n this.reGl({\n framebuffer: this.texFBO\n })(function () {\n pixels = _this3.reGl.read();\n });\n\n // @ts-ignore\n if (!pixels) {\n _context.next = 6;\n break;\n }\n _this$getOuputDataTex2 = this.getOuputDataTexture(), originalDataLength = _this$getOuputDataTex2.originalDataLength, elementsPerTexel = _this$getOuputDataTex2.elementsPerTexel, _this$getOuputDataTex3 = _this$getOuputDataTex2.typedArrayConstructor, typedArrayConstructor = _this$getOuputDataTex3 === void 0 ? Float32Array : _this$getOuputDataTex3;\n formattedPixels = [];\n if (elementsPerTexel !== 4) {\n for (i = 0; i < pixels.length; i += 4) {\n if (elementsPerTexel === 1) {\n formattedPixels.push(pixels[i]);\n } else if (elementsPerTexel === 2) {\n formattedPixels.push(pixels[i], pixels[i + 1]);\n } else {\n formattedPixels.push(pixels[i], pixels[i + 1], pixels[i + 2]);\n }\n }\n } else {\n // @ts-ignore\n formattedPixels = pixels;\n }\n\n // 截取多余的部分\n // @ts-ignore\n return _context.abrupt(\"return\", new typedArrayConstructor(formattedPixels.slice(0, originalDataLength)));\n case 6:\n return _context.abrupt(\"return\", new Float32Array());\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n function readData() {\n return _readData.apply(this, arguments);\n }\n return readData;\n }()\n }, {\n key: \"confirmInput\",\n value: function confirmInput(model, inputName) {\n var inputModel;\n // refer to self, same as pingpong\n if (this.entity === model.entity) {\n this.dynamicPingpong = true;\n inputModel = this;\n } else {\n inputModel = model;\n }\n this.textureCache[inputName].id = inputModel.getOuputDataTexture().id;\n this.textureCache[inputName].texture = inputModel.getOuputDataTexture().texture;\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: confirm input \").concat(inputName, \" from model \").concat(inputModel.entity, \", \").concat(inputModel.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"updateUniform\",\n value: function updateUniform() {\n // already get uniform's data dynamically when created, do nothing here\n }\n }, {\n key: \"updateBuffer\",\n value: function updateBuffer(bufferName, data) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n // regenerate data texture\n var buffer = this.context.uniforms.find(function (_ref) {\n var name = _ref.name;\n return name === bufferName;\n });\n if (buffer) {\n var _this$calcDataTexture = this.calcDataTexture(bufferName, buffer.type, data),\n texture = _this$calcDataTexture.texture,\n paddingData = _this$calcDataTexture.data;\n\n // TODO: destroy outdated texture\n this.textureCache[bufferName].data = paddingData;\n this.textureCache[bufferName].texture = texture;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // regl will destroy all resources\n }\n }, {\n key: \"swap\",\n value: function swap() {\n if (!this.swapOutputTextureName) {\n this.createSwapOutputDataTexture();\n }\n if (this.compiledPingpong) {\n var outputTextureUniformName = this.context.output.name;\n this.textureCache[outputTextureUniformName].id = this.getOuputDataTexture().id;\n this.textureCache[outputTextureUniformName].texture = this.getOuputDataTexture().texture;\n }\n var tmp = this.outputTextureName;\n this.outputTextureName = this.swapOutputTextureName;\n this.swapOutputTextureName = tmp;\n if (debug) {\n console.log(\"[\".concat(this.entity, \"]: after swap, output \").concat(this.getOuputDataTexture().id));\n }\n }\n }, {\n key: \"getOuputDataTexture\",\n value: function getOuputDataTexture() {\n return this.textureCache[this.outputTextureName];\n }\n }, {\n key: \"createSwapOutputDataTexture\",\n value: function createSwapOutputDataTexture() {\n var texture = this.cloneDataTexture(this.getOuputDataTexture());\n this.swapOutputTextureName = \"\".concat(this.entity, \"-swap\");\n this.textureCache[this.swapOutputTextureName] = texture;\n }\n }, {\n key: \"cloneDataTexture\",\n value: function cloneDataTexture(texture) {\n var data = texture.data,\n textureWidth = texture.textureWidth;\n return _objectSpread(_objectSpread({}, texture), {}, {\n id: textureId++,\n // @ts-ignore\n texture: this.reGl.texture({\n width: textureWidth,\n height: textureWidth,\n data: data,\n type: 'float'\n })\n });\n }\n }, {\n key: \"calcDataTexture\",\n value: function calcDataTexture(name, type, data) {\n var elementsPerTexel = 1;\n if (type === AST_TOKEN_TYPES.Vector4FloatArray) {\n elementsPerTexel = 4;\n }\n\n // 用 0 补全不足 vec4 的部分\n var paddingData = [];\n for (var i = 0; i < data.length; i += elementsPerTexel) {\n if (elementsPerTexel === 1) {\n paddingData.push(data[i], 0, 0, 0);\n } else if (elementsPerTexel === 2) {\n paddingData.push(data[i], data[i + 1], 0, 0);\n } else if (elementsPerTexel === 3) {\n paddingData.push(data[i], data[i + 1], data[i + 2], 0);\n } else if (elementsPerTexel === 4) {\n paddingData.push(data[i], data[i + 1], data[i + 2], data[i + 3]);\n }\n }\n\n // 使用纹理存储,例如 Array(8) 使用 3 * 3 纹理,末尾空白使用 0 填充\n var originalDataLength = data.length;\n var texelCount = Math.ceil(originalDataLength / elementsPerTexel);\n var width = Math.ceil(Math.sqrt(texelCount));\n var paddingTexelCount = width * width;\n if (texelCount < paddingTexelCount) {\n paddingData.push.apply(paddingData, _toConsumableArray(new Array((paddingTexelCount - texelCount) * 4).fill(0)));\n }\n var texture = this.reGl.texture({\n width: width,\n height: width,\n data: paddingData,\n type: 'float'\n });\n return {\n id: textureId++,\n data: paddingData,\n originalDataLength: originalDataLength,\n typedArrayConstructor: _isTypedArray(data) ? data.constructor : undefined,\n textureWidth: width,\n texture: texture,\n texelCount: texelCount,\n elementsPerTexel: elementsPerTexel,\n isOutput: name === this.context.output.name\n };\n }\n }]);\n return ReglComputeModel;\n}();\nexport { ReglComputeModel as default };\n//# sourceMappingURL=ReglComputeModel.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { dataTypeMap, usageMap } from './constants';\n\n/**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#elements\n */\nvar ReglElements = /*#__PURE__*/function () {\n function ReglElements(reGl, options) {\n _classCallCheck(this, ReglElements);\n this.elements = void 0;\n var data = options.data,\n usage = options.usage,\n type = options.type,\n count = options.count;\n this.elements = reGl.elements({\n data: data,\n usage: usageMap[usage || gl.STATIC_DRAW],\n type: dataTypeMap[type || gl.UNSIGNED_BYTE],\n count: count\n });\n }\n _createClass(ReglElements, [{\n key: \"get\",\n value: function get() {\n return this.elements;\n }\n }, {\n key: \"subData\",\n value: function subData(_ref) {\n var data = _ref.data;\n this.elements.subdata(data);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.elements.destroy();\n }\n }]);\n return ReglElements;\n}();\nexport { ReglElements as default };\n//# sourceMappingURL=ReglElements.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n/**\n * adaptor for regl.Framebuffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#framebuffers\n */\nvar ReglFramebuffer = /*#__PURE__*/function () {\n function ReglFramebuffer(reGl, options) {\n _classCallCheck(this, ReglFramebuffer);\n this.framebuffer = void 0;\n var width = options.width,\n height = options.height,\n color = options.color,\n colors = options.colors,\n depth = options.depth,\n stencil = options.stencil;\n var framebufferOptions = {\n width: width,\n height: height\n };\n if (Array.isArray(colors)) {\n framebufferOptions.colors = colors.map(function (c) {\n return c.get();\n });\n }\n if (color && typeof color !== 'boolean') {\n framebufferOptions.color = color.get();\n }\n\n // TODO: depth & stencil\n\n this.framebuffer = reGl.framebuffer(framebufferOptions);\n }\n _createClass(ReglFramebuffer, [{\n key: \"get\",\n value: function get() {\n return this.framebuffer;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.framebuffer.destroy();\n }\n }, {\n key: \"resize\",\n value: function resize(_ref) {\n var width = _ref.width,\n height = _ref.height;\n this.framebuffer.resize(width, height);\n }\n }]);\n return ReglFramebuffer;\n}();\nexport { ReglFramebuffer as default };\n//# sourceMappingURL=ReglFramebuffer.js.map","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","import _isTypedArray from \"lodash/isTypedArray\";\nimport _isPlainObject from \"lodash/isPlainObject\";\n/**\n * 考虑结构体命名, eg:\n * a: { b: 1 } -> 'a.b'\n * a: [ { b: 1 } ] -> 'a[0].b'\n */\nexport function extractUniforms(uniforms) {\n var extractedUniforms = {};\n Object.keys(uniforms).forEach(function (uniformName) {\n extractUniformsRecursively(uniformName, uniforms[uniformName], extractedUniforms, '');\n });\n return extractedUniforms;\n}\nfunction extractUniformsRecursively(uniformName, uniformValue, uniforms, prefix) {\n if (uniformValue === null || typeof uniformValue === 'number' ||\n // u_A: 1\n typeof uniformValue === 'boolean' ||\n // u_A: false\n Array.isArray(uniformValue) && typeof uniformValue[0] === 'number' ||\n // u_A: [1, 2, 3]\n _isTypedArray(uniformValue) ||\n // u_A: Float32Array\n // @ts-ignore\n uniformValue === '' ||\n // @ts-ignore\n uniformValue.resize !== undefined) {\n uniforms[\"\".concat(prefix && prefix + '.').concat(uniformName)] = uniformValue;\n return;\n }\n\n // u_Struct.a.b.c\n if (_isPlainObject(uniformValue)) {\n Object.keys(uniformValue).forEach(function (childName) {\n extractUniformsRecursively(childName,\n // @ts-ignore\n uniformValue[childName], uniforms, \"\".concat(prefix && prefix + '.').concat(uniformName));\n });\n }\n\n // u_Struct[0].a\n if (Array.isArray(uniformValue)) {\n // @ts-ignore\n uniformValue.forEach(function (child, idx) {\n Object.keys(child).forEach(function (childName) {\n extractUniformsRecursively(childName,\n // @ts-ignore\n child[childName], uniforms, \"\".concat(prefix && prefix + '.').concat(uniformName, \"[\").concat(idx, \"]\"));\n });\n });\n }\n}\n//# sourceMappingURL=uniform.js.map","import _typeof from \"@babel/runtime/helpers/typeof\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { gl } from '@antv/g-webgpu-core';\nimport { extractUniforms } from '../utils/uniform';\nimport { blendEquationMap, blendFuncMap, cullFaceMap, depthFuncMap, primitiveMap, stencilFuncMap, stencilOpMap } from './constants';\n/**\n * adaptor for regl.DrawCommand\n */\nvar ReglModel = /*#__PURE__*/function () {\n function ReglModel(reGl, options) {\n _classCallCheck(this, ReglModel);\n this.reGl = void 0;\n this.drawCommand = void 0;\n this.uniforms = {};\n this.reGl = reGl;\n var vs = options.vs,\n fs = options.fs,\n defines = options.defines,\n attributes = options.attributes,\n uniforms = options.uniforms,\n primitive = options.primitive,\n count = options.count,\n elements = options.elements,\n depth = options.depth,\n blend = options.blend,\n stencil = options.stencil,\n cull = options.cull,\n instances = options.instances,\n scissor = options.scissor,\n viewport = options.viewport;\n var reglUniforms = {};\n if (uniforms) {\n this.uniforms = extractUniforms(uniforms);\n Object.keys(uniforms).forEach(function (uniformName) {\n // use regl prop API\n // @ts-ignore\n reglUniforms[uniformName] = reGl.prop(uniformName);\n });\n }\n var reglAttributes = {};\n Object.keys(attributes).forEach(function (name) {\n reglAttributes[name] = attributes[name].get();\n });\n var defineStmts = defines && this.generateDefines(defines) || '';\n var drawParams = {\n attributes: reglAttributes,\n frag: \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n precision highp float;\\n#else\\n precision mediump float;\\n#endif\\n\".concat(defineStmts, \"\\n\").concat(fs),\n uniforms: reglUniforms,\n vert: \"\\n\".concat(defineStmts, \"\\n\").concat(vs),\n primitive: primitiveMap[primitive === undefined ? gl.TRIANGLES : primitive]\n };\n if (instances) {\n drawParams.instances = instances;\n }\n\n // elements 中可能包含 count,此时不应传入\n if (count) {\n drawParams.count = count;\n }\n if (elements) {\n drawParams.elements = elements.get();\n }\n if (scissor) {\n drawParams.scissor = scissor;\n }\n if (viewport) {\n drawParams.viewport = viewport;\n }\n this.initDepthDrawParams({\n depth: depth\n }, drawParams);\n this.initBlendDrawParams({\n blend: blend\n }, drawParams);\n this.initStencilDrawParams({\n stencil: stencil\n }, drawParams);\n this.initCullDrawParams({\n cull: cull\n }, drawParams);\n this.drawCommand = reGl(drawParams);\n }\n _createClass(ReglModel, [{\n key: \"addUniforms\",\n value: function addUniforms(uniforms) {\n this.uniforms = _objectSpread(_objectSpread({}, this.uniforms), extractUniforms(uniforms));\n }\n }, {\n key: \"draw\",\n value: function draw(options) {\n var uniforms = _objectSpread(_objectSpread({}, this.uniforms), extractUniforms(options.uniforms || {}));\n var reglDrawProps = {};\n Object.keys(uniforms).forEach(function (uniformName) {\n var type = _typeof(uniforms[uniformName]);\n if (type === 'boolean' || type === 'number' || Array.isArray(uniforms[uniformName]) ||\n // @ts-ignore\n uniforms[uniformName].BYTES_PER_ELEMENT) {\n reglDrawProps[uniformName] = uniforms[uniformName];\n } else if (type === 'string') {\n // TODO: image url\n } else {\n reglDrawProps[uniformName] = uniforms[uniformName].get();\n }\n });\n this.drawCommand(reglDrawProps);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n // don't need do anything since we will call `rendererService.cleanup()`\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#depth-buffer\n */\n }, {\n key: \"initDepthDrawParams\",\n value: function initDepthDrawParams(_ref, drawParams) {\n var depth = _ref.depth;\n if (depth) {\n drawParams.depth = {\n enable: depth.enable === undefined ? true : !!depth.enable,\n mask: depth.mask === undefined ? true : !!depth.mask,\n func: depthFuncMap[depth.func || gl.LESS],\n range: depth.range || [0, 1]\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#blending\n */\n }, {\n key: \"initBlendDrawParams\",\n value: function initBlendDrawParams(_ref2, drawParams) {\n var blend = _ref2.blend;\n if (blend) {\n var enable = blend.enable,\n func = blend.func,\n equation = blend.equation,\n _blend$color = blend.color,\n color = _blend$color === void 0 ? [0, 0, 0, 0] : _blend$color;\n // @ts-ignore\n drawParams.blend = {\n enable: !!enable,\n func: {\n srcRGB: blendFuncMap[func && func.srcRGB || gl.SRC_ALPHA],\n srcAlpha: blendFuncMap[func && func.srcAlpha || gl.SRC_ALPHA],\n dstRGB: blendFuncMap[func && func.dstRGB || gl.ONE_MINUS_SRC_ALPHA],\n dstAlpha: blendFuncMap[func && func.dstAlpha || gl.ONE_MINUS_SRC_ALPHA]\n },\n equation: {\n rgb: blendEquationMap[equation && equation.rgb || gl.FUNC_ADD],\n alpha: blendEquationMap[equation && equation.alpha || gl.FUNC_ADD]\n },\n color: color\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#stencil\n */\n }, {\n key: \"initStencilDrawParams\",\n value: function initStencilDrawParams(_ref3, drawParams) {\n var stencil = _ref3.stencil;\n if (stencil) {\n var enable = stencil.enable,\n _stencil$mask = stencil.mask,\n mask = _stencil$mask === void 0 ? -1 : _stencil$mask,\n _stencil$func = stencil.func,\n func = _stencil$func === void 0 ? {\n cmp: gl.ALWAYS,\n ref: 0,\n mask: -1\n } : _stencil$func,\n _stencil$opFront = stencil.opFront,\n opFront = _stencil$opFront === void 0 ? {\n fail: gl.KEEP,\n zfail: gl.KEEP,\n zpass: gl.KEEP\n } : _stencil$opFront,\n _stencil$opBack = stencil.opBack,\n opBack = _stencil$opBack === void 0 ? {\n fail: gl.KEEP,\n zfail: gl.KEEP,\n zpass: gl.KEEP\n } : _stencil$opBack;\n drawParams.stencil = {\n enable: !!enable,\n mask: mask,\n func: _objectSpread(_objectSpread({}, func), {}, {\n cmp: stencilFuncMap[func.cmp]\n }),\n opFront: {\n fail: stencilOpMap[opFront.fail],\n zfail: stencilOpMap[opFront.zfail],\n zpass: stencilOpMap[opFront.zpass]\n },\n opBack: {\n fail: stencilOpMap[opBack.fail],\n zfail: stencilOpMap[opBack.zfail],\n zpass: stencilOpMap[opBack.zpass]\n }\n };\n }\n }\n\n /**\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#culling\n */\n }, {\n key: \"initCullDrawParams\",\n value: function initCullDrawParams(_ref4, drawParams) {\n var cull = _ref4.cull;\n if (cull) {\n var enable = cull.enable,\n _cull$face = cull.face,\n face = _cull$face === void 0 ? gl.BACK : _cull$face;\n drawParams.cull = {\n enable: !!enable,\n face: cullFaceMap[face]\n };\n }\n }\n }, {\n key: \"generateDefines\",\n value: function generateDefines(defines) {\n return Object.keys(defines).map(function (name) {\n return \"#define \".concat(name, \" \").concat(Number(defines[name]));\n }).join('\\n');\n }\n }]);\n return ReglModel;\n}();\nexport { ReglModel as default };\n//# sourceMappingURL=ReglModel.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { gl } from '@antv/g-webgpu-core';\nimport { colorSpaceMap, dataTypeMap, filterMap, formatMap, mipmapMap, wrapModeMap } from './constants';\n\n/**\n * adaptor for regl.Buffer\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers\n */\nvar ReglTexture2D = /*#__PURE__*/function () {\n function ReglTexture2D(reGl, options) {\n _classCallCheck(this, ReglTexture2D);\n this.texture = void 0;\n this.width = void 0;\n this.height = void 0;\n var data = options.data,\n _options$type = options.type,\n type = _options$type === void 0 ? gl.UNSIGNED_BYTE : _options$type,\n width = options.width,\n height = options.height,\n _options$flipY = options.flipY,\n flipY = _options$flipY === void 0 ? false : _options$flipY,\n _options$format = options.format,\n format = _options$format === void 0 ? gl.RGBA : _options$format,\n _options$mipmap = options.mipmap,\n mipmap = _options$mipmap === void 0 ? false : _options$mipmap,\n _options$wrapS = options.wrapS,\n wrapS = _options$wrapS === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapS,\n _options$wrapT = options.wrapT,\n wrapT = _options$wrapT === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapT,\n _options$aniso = options.aniso,\n aniso = _options$aniso === void 0 ? 0 : _options$aniso,\n _options$alignment = options.alignment,\n alignment = _options$alignment === void 0 ? 1 : _options$alignment,\n _options$premultiplyA = options.premultiplyAlpha,\n premultiplyAlpha = _options$premultiplyA === void 0 ? false : _options$premultiplyA,\n _options$mag = options.mag,\n mag = _options$mag === void 0 ? gl.NEAREST : _options$mag,\n _options$min = options.min,\n min = _options$min === void 0 ? gl.NEAREST : _options$min,\n _options$colorSpace = options.colorSpace,\n colorSpace = _options$colorSpace === void 0 ? gl.BROWSER_DEFAULT_WEBGL : _options$colorSpace;\n this.width = width;\n this.height = height;\n var textureOptions = {\n width: width,\n height: height,\n // @ts-ignore\n type: dataTypeMap[type],\n format: formatMap[format],\n wrapS: wrapModeMap[wrapS],\n wrapT: wrapModeMap[wrapT],\n // @ts-ignore\n mag: filterMap[mag],\n min: filterMap[min],\n alignment: alignment,\n flipY: flipY,\n colorSpace: colorSpaceMap[colorSpace],\n premultiplyAlpha: premultiplyAlpha,\n aniso: aniso\n };\n if (data) {\n textureOptions.data = data;\n }\n if (typeof mipmap === 'number') {\n textureOptions.mipmap = mipmapMap[mipmap];\n } else if (typeof mipmap === 'boolean') {\n textureOptions.mipmap = mipmap;\n }\n this.texture = reGl.texture(textureOptions);\n }\n _createClass(ReglTexture2D, [{\n key: \"get\",\n value: function get() {\n return this.texture;\n }\n }, {\n key: \"update\",\n value: function update() {\n // @ts-ignore\n this.texture._texture.bind();\n }\n }, {\n key: \"resize\",\n value: function resize(_ref) {\n var width = _ref.width,\n height = _ref.height;\n this.texture.resize(width, height);\n this.width = width;\n this.height = height;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.texture.destroy();\n }\n }]);\n return ReglTexture2D;\n}();\nexport { ReglTexture2D as default };\n//# sourceMappingURL=ReglTexture2D.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n/**\n * render w/ regl\n * @see https://github.com/regl-project/regl/blob/gh-pages/API.md\n */\nimport { gl } from '@antv/g-webgpu-core';\nimport regl from 'regl';\nimport ReglAttribute from './ReglAttribute';\nimport ReglBuffer from './ReglBuffer';\nimport ReglComputeModel from './ReglComputeModel';\nimport ReglElements from './ReglElements';\nimport ReglFramebuffer from './ReglFramebuffer';\nimport ReglModel from './ReglModel';\nimport ReglTexture2D from './ReglTexture2D';\n\n/**\n * regl renderer\n */\nexport var WebGLEngine = /*#__PURE__*/function () {\n function WebGLEngine() {\n var _this = this;\n _classCallCheck(this, WebGLEngine);\n this.supportWebGPU = false;\n this.useWGSL = false;\n this.$canvas = void 0;\n this.gl = void 0;\n this.inited = void 0;\n this.createModel = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(options) {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!options.uniforms) {\n _context2.next = 3;\n break;\n }\n _context2.next = 3;\n return Promise.all(Object.keys(options.uniforms).map( /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(name) {\n var texture;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(options.uniforms[name] &&\n // @ts-ignore\n options.uniforms[name].load !== undefined)) {\n _context.next = 5;\n break;\n }\n _context.next = 3;\n return options.uniforms[name].load();\n case 3:\n texture = _context.sent;\n // @ts-ignore\n options.uniforms[name] = texture;\n case 5:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return function (_x2) {\n return _ref2.apply(this, arguments);\n };\n }()));\n case 3:\n return _context2.abrupt(\"return\", new ReglModel(_this.gl, options));\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }();\n this.createAttribute = function (options) {\n return new ReglAttribute(_this.gl, options);\n };\n this.createBuffer = function (options) {\n return new ReglBuffer(_this.gl, options);\n };\n this.createElements = function (options) {\n return new ReglElements(_this.gl, options);\n };\n this.createTexture2D = function (options) {\n return new ReglTexture2D(_this.gl, options);\n };\n this.createFramebuffer = function (options) {\n return new ReglFramebuffer(_this.gl, options);\n };\n this.useFramebuffer = function (framebuffer, drawCommands) {\n _this.gl({\n framebuffer: framebuffer ? framebuffer.get() : null\n })(drawCommands);\n };\n this.createComputeModel = /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(context) {\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", new ReglComputeModel(_this.gl, context));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return function (_x3) {\n return _ref3.apply(this, arguments);\n };\n }();\n this.clear = function (options) {\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#clear-the-draw-buffer\n var color = options.color,\n depth = options.depth,\n stencil = options.stencil,\n _options$framebuffer = options.framebuffer,\n framebuffer = _options$framebuffer === void 0 ? null : _options$framebuffer;\n var reglClearOptions = {\n color: color,\n depth: depth,\n stencil: stencil\n };\n reglClearOptions.framebuffer = framebuffer === null ? framebuffer : framebuffer.get();\n _this.gl.clear(reglClearOptions);\n };\n this.setScissor = function (scissor) {\n if (_this.gl && _this.gl._gl) {\n // https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLRenderingContext/scissor\n if (scissor.enable && scissor.box) {\n // console.log(scissor.box);\n _this.gl._gl.enable(gl.SCISSOR_TEST);\n _this.gl._gl.scissor(scissor.box.x, scissor.box.y, scissor.box.width, scissor.box.height);\n } else {\n _this.gl._gl.disable(gl.SCISSOR_TEST);\n }\n _this.gl._refresh();\n }\n };\n this.viewport = function (_ref4) {\n var x = _ref4.x,\n y = _ref4.y,\n width = _ref4.width,\n height = _ref4.height;\n if (_this.gl && _this.gl._gl) {\n // use WebGL context directly\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#unsafe-escape-hatch\n _this.gl._gl.viewport(x, y, width, height);\n _this.gl._refresh();\n }\n };\n this.readPixels = function (options) {\n var framebuffer = options.framebuffer,\n x = options.x,\n y = options.y,\n width = options.width,\n height = options.height;\n var readPixelsOptions = {\n x: x,\n y: y,\n width: width,\n height: height\n };\n if (framebuffer) {\n readPixelsOptions.framebuffer = framebuffer.get();\n }\n return _this.gl.read(readPixelsOptions);\n };\n this.getCanvas = function () {\n return _this.$canvas;\n };\n this.getGLContext = function () {\n return _this.gl._gl;\n };\n this.destroy = function () {\n if (_this.gl) {\n // @see https://github.com/regl-project/regl/blob/gh-pages/API.md#clean-up\n _this.gl.destroy();\n _this.inited = false;\n }\n };\n }\n _createClass(WebGLEngine, [{\n key: \"init\",\n value: function () {\n var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(cfg) {\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (!this.inited) {\n _context4.next = 2;\n break;\n }\n return _context4.abrupt(\"return\");\n case 2:\n this.$canvas = cfg.canvas;\n // tslint:disable-next-line:typedef\n _context4.next = 5;\n return new Promise(function (resolve, reject) {\n regl({\n canvas: cfg.canvas,\n attributes: {\n alpha: true,\n // use TAA instead of MSAA\n // @see https://www.khronos.org/registry/webgl/specs/1.0/#5.2.1\n antialias: cfg.antialias,\n premultipliedAlpha: true\n // preserveDrawingBuffer: false,\n },\n\n pixelRatio: 1,\n // TODO: use extensions\n extensions: ['OES_element_index_uint', 'OES_texture_float', 'OES_standard_derivatives',\n // wireframe\n 'angle_instanced_arrays' // VSM shadow map\n ],\n\n optionalExtensions: ['EXT_texture_filter_anisotropic', 'EXT_blend_minmax', 'WEBGL_depth_texture'],\n profile: true,\n onDone: function onDone(err, r) {\n if (err || !r) {\n reject(err);\n }\n // @ts-ignore\n resolve(r);\n }\n });\n });\n case 5:\n this.gl = _context4.sent;\n this.inited = true;\n case 7:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n function init(_x4) {\n return _init.apply(this, arguments);\n }\n return init;\n }()\n }, {\n key: \"isFloatSupported\",\n value: function isFloatSupported() {\n // @see https://github.com/antvis/GWebGPUEngine/issues/26\n // @ts-ignore\n return this.gl.limits.readFloat;\n }\n }, {\n key: \"beginFrame\",\n value: function beginFrame() {\n //\n }\n }, {\n key: \"endFrame\",\n value: function endFrame() {\n //\n }\n }]);\n return WebGLEngine;\n}();\n//# sourceMappingURL=index.js.map","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport { ConfigService, createEntity as _createEntity } from '@antv/g-webgpu-core';\nimport { WebGLEngine } from '@antv/g-webgpu-engine';\nimport { Kernel } from './Kernel';\nexport var World = /*#__PURE__*/function () {\n function World() {\n _classCallCheck(this, World);\n this.engine = void 0;\n this.configService = new ConfigService();\n }\n _createClass(World, [{\n key: \"setConfig\",\n value: function setConfig(config) {\n this.configService.set(config);\n }\n }, {\n key: \"setEngine\",\n value: function setEngine(engine) {\n this.engine = engine;\n }\n }, {\n key: \"createEntity\",\n value: function createEntity() {\n return _createEntity();\n }\n }, {\n key: \"createKernel\",\n value: function createKernel(precompiledBundle) {\n var kernel = new Kernel(this.engine, this.configService);\n if (typeof precompiledBundle === 'string') {\n kernel.setBundle(JSON.parse(precompiledBundle));\n } else {\n kernel.setBundle(precompiledBundle);\n }\n kernel.init();\n return kernel;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.engine.destroy();\n }\n }], [{\n key: \"create\",\n value: function create() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var world = new World();\n world.setConfig(config);\n world.setEngine(new WebGLEngine());\n return world;\n }\n }]);\n return World;\n}();\n//# sourceMappingURL=World.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arrayToTextureData = exports.attributesToTextureData = exports.buildTextureDataWithTwoEdgeAttr = exports.buildTextureData = exports.proccessToFunc = void 0;\nvar _1 = require(\"./\");\nvar math_1 = require(\"./math\");\n/**\n * 将 number | Function 类型的参数转换为 return number 的 Function\n * @param {number | Function} value 需要被转换的值\n * @param {number} defaultV 返回函数的默认返回值\n * @return {Function} 转换后的函数\n */\nvar proccessToFunc = function (value, defaultV) {\n var func;\n if (!value) {\n func = function () {\n return defaultV || 1;\n };\n }\n else if ((0, _1.isNumber)(value)) {\n func = function () {\n return value;\n };\n }\n else {\n func = value;\n }\n return func;\n};\nexports.proccessToFunc = proccessToFunc;\n/**\n * 将节点和边数据转换为 GPU 可读的数组。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 需要被转换的值\n * @param {EdgeConfig[]} edges 返回函数的默认返回值\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nvar buildTextureData = function (nodes, edges) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n var source = (0, math_1.getEdgeTerminal)(e, 'source');\n var target = (0, math_1.getEdgeTerminal)(e, 'target');\n if (!isNaN(mapIdPos[source]) && !isNaN(mapIdPos[target])) {\n nodeDict[mapIdPos[source]].push(mapIdPos[target]);\n nodeDict[mapIdPos[target]].push(mapIdPos[source]);\n }\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i];\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = len;\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n maxEdgePerVetex: maxEdgePerVetex,\n array: new Float32Array(dataArray),\n };\n};\nexports.buildTextureData = buildTextureData;\n/**\n* 将节点和边数据转换为 GPU 可读的数组,每条边带有一个属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n* @param {NodeConfig[]} nodes 节点数组\n* @param {EdgeConfig[]} edges 边数组\n* @param {Function} attrs 读取边属性的函数\n* @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n*/\n// export const buildTextureDataWithOneEdgeAttr = (nodes: OutNode[], edges: Edge[], attrs: Function): {\n// array: Float32Array,\n// maxEdgePerVetex: number\n// } => {\n// const dataArray = [];\n// const nodeDict: any = [];\n// const mapIdPos: IndexMap = {};\n// let i = 0;\n// for (i = 0; i < nodes.length; i++) {\n// const n = nodes[i];\n// mapIdPos[n.id] = i;\n// dataArray.push(n.x);\n// dataArray.push(n.y);\n// dataArray.push(0);\n// dataArray.push(0);\n// nodeDict.push([]);\n// }\n// for (i = 0; i < edges.length; i++) {\n// const e = edges[i];\n// nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n// nodeDict[mapIdPos[e.source]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n// nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n// nodeDict[mapIdPos[e.target]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n// }\n// let maxEdgePerVetex = 0;\n// for (i = 0; i < nodes.length; i++) {\n// const offset: number = dataArray.length;\n// const dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n// const len = dests.length;\n// dataArray[i * 4 + 2] = offset;\n// dataArray[i * 4 + 3] = len / 2; // 第四位存储与该节点相关的所有节点个数\n// maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 2);\n// for (let j = 0; j < len; ++j) {\n// const dest = dests[j];\n// dataArray.push(+dest);\n// }\n// }\n// // 不是 4 的倍数,填充 0\n// while (dataArray.length % 4 !== 0) {\n// dataArray.push(0);\n// }\n// return {\n// array: new Float32Array(dataArray),\n// maxEdgePerVetex\n// }\n// }\n/**\n* 将节点和边数据转换为 GPU 可读的数组,每条边带有一个以上属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n* @param {NodeConfig[]} nodes 节点数组\n* @param {EdgeConfig[]} edges 边数组\n* @param {Function} attrs 读取边属性的函数\n* @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n*/\nvar buildTextureDataWithTwoEdgeAttr = function (nodes, edges, attrs1, attrs2) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n var source = (0, math_1.getEdgeTerminal)(e, 'source');\n var target = (0, math_1.getEdgeTerminal)(e, 'target');\n nodeDict[mapIdPos[source]].push(mapIdPos[target]);\n nodeDict[mapIdPos[source]].push(attrs1(e));\n nodeDict[mapIdPos[source]].push(attrs2(e));\n nodeDict[mapIdPos[source]].push(0);\n nodeDict[mapIdPos[target]].push(mapIdPos[source]);\n nodeDict[mapIdPos[target]].push(attrs1(e));\n nodeDict[mapIdPos[target]].push(attrs2(e));\n nodeDict[mapIdPos[target]].push(0);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n // dataArray[i * 4 + 2] = offset;\n // dataArray[i * 4 + 3] = len / 4; // 第四位存储与该节点相关的所有节点个数\n // pack offset & length into float32: offset 20bit, length 12bit\n dataArray[i * 4 + 2] = offset + 1048576 * len / 4;\n dataArray[i * 4 + 3] = 0; // 第四位存储与上一次的距离差值\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 4);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n maxEdgePerVetex: maxEdgePerVetex,\n array: new Float32Array(dataArray),\n };\n};\nexports.buildTextureDataWithTwoEdgeAttr = buildTextureDataWithTwoEdgeAttr;\n/**\n* transform the extended attributes of nodes or edges to a texture array\n* @param {string[]} attributeNames attributes' name to be read from items and put into output array\n* @param {ModelConfig[]} items the items to be read\n* @return {Float32Array} the attributes' value array to be read by GPU\n*/\nvar attributesToTextureData = function (attributeNames, items) {\n var dataArray = [];\n var attributeNum = attributeNames.length;\n var attributteStringMap = {};\n items.forEach(function (item) {\n attributeNames.forEach(function (name, i) {\n if (attributteStringMap[item[name]] === undefined) {\n attributteStringMap[item[name]] = Object.keys(attributteStringMap).length;\n }\n dataArray.push(attributteStringMap[item[name]]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n });\n return {\n array: new Float32Array(dataArray),\n count: Object.keys(attributteStringMap).length\n };\n};\nexports.attributesToTextureData = attributesToTextureData;\n/**\n* transform the number array format of extended attributes of nodes or edges to a texture array\n* @param {string[]} attributeNames attributes' name to be read from items and put into output array\n* @return {Float32Array} the attributes' value array to be read by GPU\n*/\nvar arrayToTextureData = function (valueArrays) {\n var dataArray = [];\n var attributeNum = valueArrays.length;\n var itemNum = valueArrays[0].length;\n var _loop_1 = function (j) {\n valueArrays.forEach(function (valueArray, i) {\n dataArray.push(valueArray[j]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n };\n for (var j = 0; j < itemNum; j++) {\n _loop_1(j);\n }\n return new Float32Array(dataArray);\n};\nexports.arrayToTextureData = arrayToTextureData;\n//# sourceMappingURL=gpu.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clusterBundle = exports.clusterCode = exports.fruchtermanBundle = exports.fruchtermanCode = void 0;\nexports.fruchtermanCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\nconst MAX_EDGE_PER_VERTEX;\\nconst VERTEX_COUNT;\\n@numthreads(1, 1, 1)\\nclass Fruchterman {\\n @in @out\\n u_Data: vec4[];\\n @in\\n u_K: float;\\n @in\\n u_K2: float;\\n \\n @in\\n u_Center: vec2;\\n @in\\n u_Gravity: float;\\n @in\\n u_ClusterGravity: float;\\n @in\\n u_Speed: float;\\n @in\\n u_MaxDisplace: float;\\n @in\\n u_Clustering: float;\\n @in\\n u_AttributeArray: vec4[];\\n @in\\n u_ClusterCenters: vec4[];\\n calcRepulsive(i: int, currentNode: vec4): vec2 {\\n let dx = 0, dy = 0;\\n for (let j = 0; j < VERTEX_COUNT; j++) {\\n if (i != j) {\\n const nextNode = this.u_Data[j];\\n const xDist = currentNode[0] - nextNode[0];\\n const yDist = currentNode[1] - nextNode[1];\\n const dist = (xDist * xDist + yDist * yDist) + 0.01;\\n let param = this.u_K2 / dist;\\n \\n if (dist > 0.0) {\\n dx += param * xDist;\\n dy += param * yDist;\\n if (xDist == 0 && yDist == 0) {\\n const sign = i < j ? 1 : -1;\\n dx += param * sign;\\n dy += param * sign;\\n }\\n }\\n }\\n }\\n return [dx, dy];\\n }\\n calcGravity(currentNode: vec4, nodeAttributes: vec4): vec2 { // \\n let dx = 0, dy = 0;\\n const vx = currentNode[0] - this.u_Center[0];\\n const vy = currentNode[1] - this.u_Center[1];\\n const gf = 0.01 * this.u_K * this.u_Gravity;\\n dx = gf * vx;\\n dy = gf * vy;\\n if (this.u_Clustering == 1) {\\n const clusterIdx = int(nodeAttributes[0]);\\n const center = this.u_ClusterCenters[clusterIdx];\\n const cvx = currentNode[0] - center[0];\\n const cvy = currentNode[1] - center[1];\\n const dist = sqrt(cvx * cvx + cvy * cvy) + 0.01;\\n const parma = this.u_K * this.u_ClusterGravity / dist;\\n dx += parma * cvx;\\n dy += parma * cvy;\\n }\\n return [dx, dy];\\n }\\n calcAttractive(i: int, currentNode: vec4): vec2 {\\n let dx = 0, dy = 0;\\n const arr_offset = int(floor(currentNode[2] + 0.5));\\n const length = int(floor(currentNode[3] + 0.5));\\n const node_buffer: vec4;\\n for (let p = 0; p < MAX_EDGE_PER_VERTEX; p++) {\\n if (p >= length) break;\\n const arr_idx = arr_offset + p;\\n // when arr_idx % 4 == 0 update currentNodedx_buffer\\n const buf_offset = arr_idx - arr_idx / 4 * 4;\\n if (p == 0 || buf_offset == 0) {\\n node_buffer = this.u_Data[int(arr_idx / 4)];\\n }\\n const float_j = buf_offset == 0 ? node_buffer[0] :\\n buf_offset == 1 ? node_buffer[1] :\\n buf_offset == 2 ? node_buffer[2] :\\n node_buffer[3];\\n const nextNode = this.u_Data[int(float_j)];\\n const xDist = currentNode[0] - nextNode[0];\\n const yDist = currentNode[1] - nextNode[1];\\n const dist = sqrt(xDist * xDist + yDist * yDist) + 0.01;\\n let attractiveF = dist / this.u_K;\\n \\n if (dist > 0.0) {\\n dx -= xDist * attractiveF;\\n dy -= yDist * attractiveF;\\n if (xDist == 0 && yDist == 0) {\\n const sign = i < int(float_j) ? 1 : -1;\\n dx -= sign * attractiveF;\\n dy -= sign * attractiveF;\\n }\\n }\\n }\\n return [dx, dy];\\n }\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const currentNode = this.u_Data[i];\\n let dx = 0, dy = 0;\\n if (i >= VERTEX_COUNT) {\\n this.u_Data[i] = currentNode;\\n return;\\n }\\n\\n // [gravity, fx, fy, 0]\\n const nodeAttributes = this.u_AttributeArray[i];\\n\\n if (nodeAttributes[1] != 0 && nodeAttributes[2] != 0) {\\n // the node is fixed\\n this.u_Data[i] = [\\n nodeAttributes[1],\\n nodeAttributes[2],\\n currentNode[2],\\n currentNode[3]\\n ];\\n return;\\n }\\n\\n // repulsive\\n const repulsive = this.calcRepulsive(i, currentNode);\\n dx += repulsive[0];\\n dy += repulsive[1];\\n // attractive\\n const attractive = this.calcAttractive(i, currentNode);\\n dx += attractive[0];\\n dy += attractive[1];\\n // gravity\\n const gravity = this.calcGravity(currentNode, nodeAttributes);\\n dx -= gravity[0];\\n dy -= gravity[1];\\n // speed\\n dx *= this.u_Speed;\\n dy *= this.u_Speed;\\n\\n // move\\n const distLength = sqrt(dx * dx + dy * dy);\\n if (distLength > 0.0) {\\n const limitedDist = min(this.u_MaxDisplace * this.u_Speed, distLength);\\n this.u_Data[i] = [\\n currentNode[0] + dx / distLength * limitedDist,\\n currentNode[1] + dy / distLength * limitedDist,\\n currentNode[2],\\n currentNode[3]\\n ];\\n }\\n }\\n}\\n\";\nexports.fruchtermanBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define MAX_EDGE_PER_VERTEX __DefineValuePlaceholder__MAX_EDGE_PER_VERTEX\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_K;\\\\nuniform float u_K2;\\\\nuniform vec2 u_Center;\\\\nuniform float u_Gravity;\\\\nuniform float u_ClusterGravity;\\\\nuniform float u_Speed;\\\\nuniform float u_MaxDisplace;\\\\nuniform float u_Clustering;\\\\nuniform sampler2D u_AttributeArray;\\\\nuniform vec2 u_AttributeArraySize;\\\\nvec4 getDatau_AttributeArray(vec2 address2D) {\\\\n return vec4(texture2D(u_AttributeArray, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AttributeArray(float address1D) {\\\\n return getDatau_AttributeArray(addrTranslation_1Dto2D(address1D, u_AttributeArraySize));\\\\n}\\\\nvec4 getDatau_AttributeArray(int address1D) {\\\\n return getDatau_AttributeArray(float(address1D));\\\\n}\\\\nuniform sampler2D u_ClusterCenters;\\\\nuniform vec2 u_ClusterCentersSize;\\\\nvec4 getDatau_ClusterCenters(vec2 address2D) {\\\\n return vec4(texture2D(u_ClusterCenters, address2D).rgba);\\\\n}\\\\nvec4 getDatau_ClusterCenters(float address1D) {\\\\n return getDatau_ClusterCenters(addrTranslation_1Dto2D(address1D, u_ClusterCentersSize));\\\\n}\\\\nvec4 getDatau_ClusterCenters(int address1D) {\\\\n return getDatau_ClusterCenters(float(address1D));\\\\n}\\\\nvec2 calcRepulsive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {if (i != j) {vec4 nextNode = getDatau_Data(j);\\\\nfloat xDist = currentNode.x - nextNode.x;\\\\nfloat yDist = currentNode.y - nextNode.y;\\\\nfloat dist = ((xDist * xDist) + (yDist * yDist)) + 0.01;\\\\nfloat param = u_K2 / dist;\\\\nif (dist > 0.0) {dx += param * xDist;\\\\ndy += param * yDist;\\\\nif ((xDist == 0.0) && (yDist == 0.0)) {float sign = (i < j) ? (1.0) : (-1.0);\\\\ndx += param * sign;\\\\ndy += param * sign;}}}}\\\\nreturn vec2(dx, dy);}\\\\nvec2 calcGravity(vec4 currentNode, vec4 nodeAttributes) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nfloat vx = currentNode.x - u_Center.x;\\\\nfloat vy = currentNode.y - u_Center.y;\\\\nfloat gf = (0.01 * u_K) * u_Gravity;\\\\ndx = gf * vx;\\\\ndy = gf * vy;\\\\nif (u_Clustering == 1.0) {int clusterIdx = int(nodeAttributes.x);\\\\nvec4 center = getDatau_ClusterCenters(clusterIdx);\\\\nfloat cvx = currentNode.x - center.x;\\\\nfloat cvy = currentNode.y - center.y;\\\\nfloat dist = sqrt((cvx * cvx) + (cvy * cvy)) + 0.01;\\\\nfloat parma = (u_K * u_ClusterGravity) / dist;\\\\ndx += parma * cvx;\\\\ndy += parma * cvy;}\\\\nreturn vec2(dx, dy);}\\\\nvec2 calcAttractive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nint arr_offset = int(floor(currentNode.z + 0.5));\\\\nint length = int(floor(currentNode.w + 0.5));\\\\nvec4 node_buffer;\\\\nfor (int p = 0; p < MAX_EDGE_PER_VERTEX; p++) {if (p >= length) {break;}\\\\nint arr_idx = arr_offset + int(p);\\\\nint buf_offset = arr_idx - ((arr_idx / 4) * 4);\\\\nif ((p == 0) || (buf_offset == 0)) {node_buffer = getDatau_Data(int(arr_idx / 4));}\\\\nfloat float_j = (buf_offset == 0) ? (node_buffer.x) : ((buf_offset == 1) ? (node_buffer.y) : ((buf_offset == 2) ? (node_buffer.z) : (node_buffer.w)));\\\\nvec4 nextNode = getDatau_Data(int(float_j));\\\\nfloat xDist = currentNode.x - nextNode.x;\\\\nfloat yDist = currentNode.y - nextNode.y;\\\\nfloat dist = sqrt((xDist * xDist) + (yDist * yDist)) + 0.01;\\\\nfloat attractiveF = dist / u_K;\\\\nif (dist > 0.0) {dx -= xDist * attractiveF;\\\\ndy -= yDist * attractiveF;\\\\nif ((xDist == 0.0) && (yDist == 0.0)) {float sign = (i < int(float_j)) ? (1.0) : (-1.0);\\\\ndx -= sign * attractiveF;\\\\ndy -= sign * attractiveF;}}}\\\\nreturn vec2(dx, dy);}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 currentNode = getDatau_Data(i);\\\\nfloat dx = 0.0;\\\\nfloat dy = 0.0;\\\\nif (i >= VERTEX_COUNT) {gl_FragColor = vec4(currentNode);\\\\nreturn ;}\\\\nvec4 nodeAttributes = getDatau_AttributeArray(i);\\\\nif ((nodeAttributes.y != 0.0) && (nodeAttributes.z != 0.0)) {gl_FragColor = vec4(vec4(nodeAttributes.y, nodeAttributes.z, currentNode.z, currentNode.w));\\\\nreturn ;}\\\\nvec2 repulsive = calcRepulsive(i, currentNode);\\\\ndx += repulsive.x;\\\\ndy += repulsive.y;\\\\nvec2 attractive = calcAttractive(i, currentNode);\\\\ndx += attractive.x;\\\\ndy += attractive.y;\\\\nvec2 gravity = calcGravity(currentNode, nodeAttributes);\\\\ndx -= gravity.x;\\\\ndy -= gravity.y;\\\\ndx *= u_Speed;\\\\ndy *= u_Speed;\\\\nfloat distLength = sqrt((dx * dx) + (dy * dy));\\\\nif (distLength > 0.0) {float limitedDist = min(u_MaxDisplace * u_Speed, distLength);\\\\ngl_FragColor = vec4(vec4(currentNode.x + ((dx / distLength) * limitedDist), currentNode.y + ((dy / distLength) * limitedDist), currentNode.z, currentNode.w));}if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"MAX_EDGE_PER_VERTEX\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_K\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_K2\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Center\\\",\\\"type\\\":\\\"vec2\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Gravity\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterGravity\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Speed\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_MaxDisplace\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_Clustering\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AttributeArray\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_Data\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\nexports.clusterCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\nconst VERTEX_COUNT;\\nconst CLUSTER_COUNT;\\n@numthreads(1, 1, 1)\\nclass CalcCenter {\\n @in\\n u_Data: vec4[];\\n @in\\n u_NodeAttributes: vec4[]; // [[clusterIdx, 0, 0, 0], ...]\\n @in @out\\n u_ClusterCenters: vec4[]; // [[cx, cy, nodeCount, clusterIdx], ...]\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const center = this.u_ClusterCenters[i];\\n let sumx = 0;\\n let sumy = 0;\\n let count = 0;\\n for (let j = 0; j < VERTEX_COUNT; j++) {\\n const attributes = this.u_NodeAttributes[j];\\n const clusterIdx = int(attributes[0]);\\n const vertex = this.u_Data[j];\\n if (clusterIdx == i) {\\n sumx += vertex.x;\\n sumy += vertex.y;\\n count += 1;\\n }\\n }\\n this.u_ClusterCenters[i] = [\\n sumx / count,\\n sumy / count,\\n count,\\n i\\n ];\\n }\\n}\\n\";\nexports.clusterBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n#define CLUSTER_COUNT __DefineValuePlaceholder__CLUSTER_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform sampler2D u_NodeAttributes;\\\\nuniform vec2 u_NodeAttributesSize;\\\\nvec4 getDatau_NodeAttributes(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributes, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributes(float address1D) {\\\\n return getDatau_NodeAttributes(addrTranslation_1Dto2D(address1D, u_NodeAttributesSize));\\\\n}\\\\nvec4 getDatau_NodeAttributes(int address1D) {\\\\n return getDatau_NodeAttributes(float(address1D));\\\\n}\\\\nuniform sampler2D u_ClusterCenters;\\\\nuniform vec2 u_ClusterCentersSize;\\\\nvec4 getDatau_ClusterCenters(vec2 address2D) {\\\\n return vec4(texture2D(u_ClusterCenters, address2D).rgba);\\\\n}\\\\nvec4 getDatau_ClusterCenters(float address1D) {\\\\n return getDatau_ClusterCenters(addrTranslation_1Dto2D(address1D, u_ClusterCentersSize));\\\\n}\\\\nvec4 getDatau_ClusterCenters(int address1D) {\\\\n return getDatau_ClusterCenters(float(address1D));\\\\n}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 center = getDatau_ClusterCenters(i);\\\\nfloat sumx = 0.0;\\\\nfloat sumy = 0.0;\\\\nfloat count = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {vec4 attributes = getDatau_NodeAttributes(j);\\\\nint clusterIdx = int(attributes.x);\\\\nvec4 vertex = getDatau_Data(j);\\\\nif (clusterIdx == i) {sumx += vertex.x;\\\\nsumy += vertex.y;\\\\ncount += 1.0;}}\\\\ngl_FragColor = vec4(vec4(sumx / count, sumy / count, count, i));if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"CLUSTER_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributes\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_ClusterCenters\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\n//# sourceMappingURL=fruchtermanShader.js.map","\"use strict\";\n// @ts-nocheck\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FruchtermanGPULayout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\n// @ts-ignore\nvar g_webgpu_1 = require(\"@antv/g-webgpu\");\n// compile at runtime in dev mode\nvar gpu_1 = require(\"../../util/gpu\");\n// use compiled bundle in prod mode\nvar fruchtermanShader_1 = require(\"./fruchtermanShader\");\nvar constants_1 = require(\"../constants\");\n/**\n * fruchterman 布局\n */\nvar FruchtermanGPULayout = /** @class */ (function (_super) {\n __extends(FruchtermanGPULayout, _super);\n function FruchtermanGPULayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 速度 */\n _this.speed = 1;\n /** 是否产生聚类力 */\n _this.clustering = false;\n /** 根据哪个字段聚类 */\n _this.clusterField = \"cluster\";\n /** 聚类力大小 */\n _this.clusterGravity = 10;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.updateCfg(options);\n return _this;\n }\n FruchtermanGPULayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 1000,\n gravity: 10,\n speed: 1,\n clustering: false,\n clusterGravity: 10\n };\n };\n /**\n * 执行布局\n */\n FruchtermanGPULayout.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return [4 /*yield*/, self.run()];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.executeWithWorker = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n center = self.center;\n if (!nodes || nodes.length === 0) {\n return [2 /*return*/];\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * _this.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * _this.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n // layout\n return [4 /*yield*/, self.run(canvas, ctx)];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.run = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, edges, maxIteration, center, area, maxDisplace, k2, k, speed, clustering, _a, attributeArray, clusterCount, numParticles, _b, maxEdgePerVetex, nodesEdgesArray, workerEnabled, world, onLayoutEnd, clusterCenters, i, kernelFruchterman, kernelCluster, execute;\n var _this = this;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n edges = self.edges;\n maxIteration = self.maxIteration;\n center = self.center;\n area = self.height * self.width;\n maxDisplace = Math.sqrt(area) / 10;\n k2 = area / (nodes.length + 1);\n k = Math.sqrt(k2);\n speed = self.speed;\n clustering = self.clustering;\n _a = (0, gpu_1.attributesToTextureData)([self.clusterField], nodes), attributeArray = _a.array, clusterCount = _a.count;\n // pushing the fx and fy\n nodes.forEach(function (node, i) {\n var fx = 0;\n var fy = 0;\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n fx = node.fx || 0.001;\n fy = node.fy || 0.001;\n }\n attributeArray[4 * i + 1] = fx;\n attributeArray[4 * i + 2] = fy;\n });\n numParticles = nodes.length;\n _b = (0, gpu_1.buildTextureData)(nodes, edges), maxEdgePerVetex = _b.maxEdgePerVetex, nodesEdgesArray = _b.array;\n workerEnabled = self.workerEnabled;\n if (workerEnabled) {\n world = g_webgpu_1.World.create({\n canvas: canvas,\n engineOptions: {\n supportCompute: true\n }\n });\n }\n else {\n world = g_webgpu_1.World.create({\n engineOptions: {\n supportCompute: true\n }\n });\n }\n onLayoutEnd = self.onLayoutEnd;\n clusterCenters = [];\n for (i = 0; i < clusterCount; i++) {\n clusterCenters.push(0, 0, 0, 0);\n }\n kernelFruchterman = world\n .createKernel(fruchtermanShader_1.fruchtermanBundle)\n .setDispatch([numParticles, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_K: k,\n u_K2: k2,\n u_Gravity: self.gravity,\n u_ClusterGravity: self.clusterGravity || self.gravity || 1,\n u_Speed: speed,\n u_MaxDisplace: maxDisplace,\n u_Clustering: clustering ? 1 : 0,\n u_Center: center,\n u_AttributeArray: attributeArray,\n u_ClusterCenters: clusterCenters,\n MAX_EDGE_PER_VERTEX: maxEdgePerVetex,\n VERTEX_COUNT: numParticles\n });\n if (clustering) {\n kernelCluster = world\n .createKernel(fruchtermanShader_1.clusterBundle)\n .setDispatch([clusterCount, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_NodeAttributes: attributeArray,\n u_ClusterCenters: clusterCenters,\n VERTEX_COUNT: numParticles,\n CLUSTER_COUNT: clusterCount\n });\n }\n execute = function () { return __awaiter(_this, void 0, void 0, function () {\n var i, finalParticleData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < maxIteration)) return [3 /*break*/, 6];\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelFruchterman.execute()];\n case 2:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n if (!clustering) return [3 /*break*/, 4];\n kernelCluster.setBinding({\n u_Data: kernelFruchterman\n });\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelCluster.execute()];\n case 3:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n kernelFruchterman.setBinding({\n u_ClusterCenters: kernelCluster\n });\n _a.label = 4;\n case 4:\n kernelFruchterman.setBinding({\n u_MaxDisplace: maxDisplace *= 0.99\n });\n _a.label = 5;\n case 5:\n i++;\n return [3 /*break*/, 1];\n case 6: return [4 /*yield*/, kernelFruchterman.getOutput()];\n case 7:\n finalParticleData = _a.sent();\n if (canvas) {\n // 传递数据给主线程\n ctx.postMessage({\n type: constants_1.LAYOUT_MESSAGE.GPUEND,\n vertexEdgeData: finalParticleData\n // edgeIndexBufferData,\n });\n }\n else {\n nodes.forEach(function (node, i) {\n var x = finalParticleData[4 * i];\n var y = finalParticleData[4 * i + 1];\n node.x = x;\n node.y = y;\n });\n }\n if (onLayoutEnd)\n onLayoutEnd();\n return [2 /*return*/];\n }\n });\n }); };\n return [4 /*yield*/, execute()];\n case 1:\n _c.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FruchtermanGPULayout.prototype.getType = function () {\n return \"fruchterman-gpu\";\n };\n return FruchtermanGPULayout;\n}(base_1.Base));\nexports.FruchtermanGPULayout = FruchtermanGPULayout;\n//# sourceMappingURL=fruchterman.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.aveMovementBundle = exports.aveMovementCode = exports.gForceBundle = exports.gForceCode = void 0;\nexports.gForceCode = \"\\nimport { globalInvocationID } from 'g-webgpu';\\n\\nconst MAX_EDGE_PER_VERTEX;\\nconst VERTEX_COUNT;\\nconst SHIFT_20 = 1048576;\\n\\n@numthreads(1, 1, 1)\\nclass GGForce {\\n @in @out\\n u_Data: vec4[];\\n\\n @in\\n u_damping: float;\\n \\n @in\\n u_maxSpeed: float;\\n\\n @in\\n u_minMovement: float;\\n\\n @in\\n u_AveMovement: vec4[];\\n\\n @in\\n u_coulombDisScale: float;\\n\\n @in\\n u_factor: float;\\n\\n @in\\n u_NodeAttributeArray1: vec4[];\\n\\n @in\\n u_NodeAttributeArray2: vec4[];\\n\\n @in\\n u_interval: float;\\n\\n unpack_float(packedValue: float): ivec2 {\\n const packedIntValue = int(packedValue);\\n const v0 = packedIntValue / SHIFT_20;\\n return [v0, packedIntValue - v0 * SHIFT_20];\\n }\\n\\n calcRepulsive(i: int, currentNode: vec4): vec2 {\\n let ax = 0, ay = 0;\\n for (let j: int = 0; j < VERTEX_COUNT; j++) {\\n if (i != j) {\\n const nextNode = this.u_Data[j];\\n const vx = currentNode[0] - nextNode[0];\\n const vy = currentNode[1] - nextNode[1];\\n const dist = sqrt(vx * vx + vy * vy) + 0.01;\\n const n_dist = (dist + 0.1) * this.u_coulombDisScale;\\n const direx = vx / dist;\\n const direy = vy / dist;\\n const attributesi = this.u_NodeAttributeArray1[i];\\n const attributesj = this.u_NodeAttributeArray1[j];\\n const massi = attributesi[0];\\n const nodeStrengthi = attributesi[2];\\n const nodeStrengthj = attributesj[2];\\n const nodeStrength = (nodeStrengthi + nodeStrengthj) / 2;\\n // const param = nodeStrength * this.u_factor / (n_dist * n_dist * massi);\\n const param = nodeStrength * this.u_factor / (n_dist * n_dist);\\n ax += direx * param;\\n ay += direy * param;\\n }\\n }\\n return [ax, ay];\\n }\\n\\n calcGravity(i: int, currentNode: vec4, attributes2: vec4): vec2 {\\n // note: attributes2 = [centerX, centerY, gravity, 0]\\n\\n const vx = currentNode[0] - attributes2[0];\\n const vy = currentNode[1] - attributes2[1];\\n \\n const ax = vx * attributes2[2];\\n const ay = vy * attributes2[2];\\n \\n return [ax, ay];\\n }\\n\\n calcAttractive(i: int, currentNode: vec4, attributes1: vec4): vec2 {\\n // note: attributes1 = [mass, degree, nodeSterngth, 0]\\n\\n const mass = attributes1[0];\\n let ax = 0, ay = 0;\\n // const arr_offset = int(floor(currentNode[2] + 0.5));\\n // const length = int(floor(currentNode[3] + 0.5));\\n\\n const compressed = this.unpack_float(currentNode[2]);\\n const length = compressed[0];\\n const arr_offset = compressed[1];\\n\\n const node_buffer: vec4;\\n for (let p: int = 0; p < MAX_EDGE_PER_VERTEX; p++) {\\n if (p >= length) break;\\n const arr_idx = arr_offset + 4 * p; // i \\u8282\\u70B9\\u7684\\u7B2C p \\u6761\\u8FB9\\u5F00\\u59CB\\u7684\\u5C0F\\u683C\\u5B50\\u4F4D\\u7F6E\\n const buf_offset = arr_idx - arr_idx / 4 * 4;\\n if (p == 0 || buf_offset == 0) {\\n node_buffer = this.u_Data[int(arr_idx / 4)]; // \\u5927\\u683C\\u5B50\\uFF0C\\u5927\\u683C\\u5B50\\u4F4D\\u7F6E=\\u5C0F\\u4E2A\\u5B50\\u4F4D\\u7F6E / 4\\uFF0C\\n }\\n\\n let float_j: float = node_buffer[0];\\n\\n const nextNode = this.u_Data[int(float_j)];\\n const vx = nextNode[0] - currentNode[0];\\n const vy = nextNode[1] - currentNode[1];\\n const dist = sqrt(vx * vx + vy * vy) + 0.01;\\n const direx = vx / dist;\\n const direy = vy / dist;\\n const edgeLength = node_buffer[1];\\n const edgeStrength = node_buffer[2];\\n const diff: float = edgeLength - dist;//edgeLength\\n // const param = diff * this.u_stiffness / mass; //\\n const param = diff * edgeStrength / mass; // \\n ax -= direx * param;\\n ay -= direy * param;\\n }\\n return [ax, ay];\\n }\\n\\n @main\\n compute() {\\n const i = globalInvocationID.x;\\n const currentNode = this.u_Data[i];\\n const movement = u_AveMovement[0];\\n let ax = 0, ay = 0;\\n\\n if (i >= VERTEX_COUNT || movement.x < u_minMovement) {\\n this.u_Data[i] = currentNode;\\n return;\\n }\\n\\n // \\u6BCF\\u4E2A\\u8282\\u70B9\\u5C5E\\u6027\\u5360\\u4E24\\u4E2A\\u6570\\u7EC4\\u4E2D\\u5404\\u4E00\\u683C\\n // [mass, degree, nodeStrength, fx]\\n const nodeAttributes1 = this.u_NodeAttributeArray1[i];\\n // [centerX, centerY, centerGravity, fy]\\n const nodeAttributes2 = this.u_NodeAttributeArray2[i];\\n\\n // repulsive\\n const repulsive = this.calcRepulsive(i, currentNode);\\n ax += repulsive[0];\\n ay += repulsive[1];\\n\\n // attractive\\n const attractive = this.calcAttractive(i, currentNode, nodeAttributes1);\\n ax += attractive[0];\\n ay += attractive[1];\\n\\n // gravity\\n const gravity = this.calcGravity(i, currentNode, nodeAttributes2);\\n ax -= gravity[0];\\n ay -= gravity[1];\\n\\n // speed\\n const param = this.u_interval * this.u_damping;\\n let vx = ax * param;\\n let vy = ay * param;\\n const vlength = sqrt(vx * vx + vy * vy) + 0.0001;\\n if (vlength > this.u_maxSpeed) {\\n const param2 = this.u_maxSpeed / vlength;\\n vx = param2 * vx;\\n vy = param2 * vy;\\n }\\n\\n // move\\n if (nodeAttributes1[3] != 0 && nodeAttributes2[3] != 0) {\\n this.u_Data[i] = [\\n nodeAttributes1[3],\\n nodeAttributes2[3],\\n currentNode[2],\\n 0\\n ];\\n } else {\\n const distx = vx * this.u_interval;\\n const disty = vy * this.u_interval;\\n const distLength = sqrt(distx * distx + disty * disty);\\n this.u_Data[i] = [\\n currentNode[0] + distx,\\n currentNode[1] + disty,\\n currentNode[2],\\n distLength\\n ];\\n }\\n \\n // the avarage move distance\\n // need to share memory\\n \\n }\\n}\\n\";\nexports.gForceBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define MAX_EDGE_PER_VERTEX __DefineValuePlaceholder__MAX_EDGE_PER_VERTEX\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n#define SHIFT_20 1048576.0\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_damping;\\\\nuniform float u_maxSpeed;\\\\nuniform float u_minMovement;\\\\nuniform sampler2D u_AveMovement;\\\\nuniform vec2 u_AveMovementSize;\\\\nvec4 getDatau_AveMovement(vec2 address2D) {\\\\n return vec4(texture2D(u_AveMovement, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AveMovement(float address1D) {\\\\n return getDatau_AveMovement(addrTranslation_1Dto2D(address1D, u_AveMovementSize));\\\\n}\\\\nvec4 getDatau_AveMovement(int address1D) {\\\\n return getDatau_AveMovement(float(address1D));\\\\n}\\\\nuniform float u_coulombDisScale;\\\\nuniform float u_factor;\\\\nuniform sampler2D u_NodeAttributeArray1;\\\\nuniform vec2 u_NodeAttributeArray1Size;\\\\nvec4 getDatau_NodeAttributeArray1(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributeArray1, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributeArray1(float address1D) {\\\\n return getDatau_NodeAttributeArray1(addrTranslation_1Dto2D(address1D, u_NodeAttributeArray1Size));\\\\n}\\\\nvec4 getDatau_NodeAttributeArray1(int address1D) {\\\\n return getDatau_NodeAttributeArray1(float(address1D));\\\\n}\\\\nuniform sampler2D u_NodeAttributeArray2;\\\\nuniform vec2 u_NodeAttributeArray2Size;\\\\nvec4 getDatau_NodeAttributeArray2(vec2 address2D) {\\\\n return vec4(texture2D(u_NodeAttributeArray2, address2D).rgba);\\\\n}\\\\nvec4 getDatau_NodeAttributeArray2(float address1D) {\\\\n return getDatau_NodeAttributeArray2(addrTranslation_1Dto2D(address1D, u_NodeAttributeArray2Size));\\\\n}\\\\nvec4 getDatau_NodeAttributeArray2(int address1D) {\\\\n return getDatau_NodeAttributeArray2(float(address1D));\\\\n}\\\\nuniform float u_interval;\\\\nivec2 unpack_float(float packedValue) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint packedIntValue = int(packedValue);\\\\nint v0 = packedIntValue / int(SHIFT_20);\\\\nreturn ivec2(v0, packedIntValue - (v0 * int(SHIFT_20)));}\\\\nvec2 calcRepulsive(int i, vec4 currentNode) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {if (i != j) {vec4 nextNode = getDatau_Data(j);\\\\nfloat vx = currentNode.x - nextNode.x;\\\\nfloat vy = currentNode.y - nextNode.y;\\\\nfloat dist = sqrt((vx * vx) + (vy * vy)) + 0.01;\\\\nfloat n_dist = (dist + 0.1) * u_coulombDisScale;\\\\nfloat direx = vx / dist;\\\\nfloat direy = vy / dist;\\\\nvec4 attributesi = getDatau_NodeAttributeArray1(i);\\\\nvec4 attributesj = getDatau_NodeAttributeArray1(j);\\\\nfloat massi = attributesi.x;\\\\nfloat nodeStrengthi = attributesi.z;\\\\nfloat nodeStrengthj = attributesj.z;\\\\nfloat nodeStrength = (nodeStrengthi + nodeStrengthj) / 2.0;\\\\nfloat param = (nodeStrength * u_factor) / (n_dist * n_dist);\\\\nax += direx * param;\\\\nay += direy * param;}}\\\\nreturn vec2(ax, ay);}\\\\nvec2 calcGravity(int i, vec4 currentNode, vec4 attributes2) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat vx = currentNode.x - attributes2.x;\\\\nfloat vy = currentNode.y - attributes2.y;\\\\nfloat ax = vx * attributes2.z;\\\\nfloat ay = vy * attributes2.z;\\\\nreturn vec2(ax, ay);}\\\\nvec2 calcAttractive(int i, vec4 currentNode, vec4 attributes1) {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat mass = attributes1.x;\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nivec2 compressed = unpack_float(currentNode.z);\\\\nint length = compressed.x;\\\\nint arr_offset = compressed.y;\\\\nvec4 node_buffer;\\\\nfor (int p = 0; p < MAX_EDGE_PER_VERTEX; p++) {if (p >= length) {break;}\\\\nint arr_idx = arr_offset + (4 * p);\\\\nint buf_offset = arr_idx - ((arr_idx / 4) * 4);\\\\nif ((p == 0) || (buf_offset == 0)) {node_buffer = getDatau_Data(int(arr_idx / 4));}\\\\nfloat float_j = node_buffer.x;\\\\nvec4 nextNode = getDatau_Data(int(float_j));\\\\nfloat vx = nextNode.x - currentNode.x;\\\\nfloat vy = nextNode.y - currentNode.y;\\\\nfloat dist = sqrt((vx * vx) + (vy * vy)) + 0.01;\\\\nfloat direx = vx / dist;\\\\nfloat direy = vy / dist;\\\\nfloat edgeLength = node_buffer.y;\\\\nfloat edgeStrength = node_buffer.z;\\\\nfloat diff = edgeLength - dist;\\\\nfloat param = (diff * edgeStrength) / mass;\\\\nax -= direx * param;\\\\nay -= direy * param;}\\\\nreturn vec2(ax, ay);}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nint i = globalInvocationID.x;\\\\nvec4 currentNode = getDatau_Data(i);\\\\nvec4 movement = getDatau_AveMovement(0.0);\\\\nfloat ax = 0.0;\\\\nfloat ay = 0.0;\\\\nif ((i >= VERTEX_COUNT) || (movement.x < u_minMovement)) {gl_FragColor = vec4(currentNode);\\\\nreturn ;}\\\\nvec4 nodeAttributes1 = getDatau_NodeAttributeArray1(i);\\\\nvec4 nodeAttributes2 = getDatau_NodeAttributeArray2(i);\\\\nvec2 repulsive = calcRepulsive(i, currentNode);\\\\nax += repulsive.x;\\\\nay += repulsive.y;\\\\nvec2 attractive = calcAttractive(i, currentNode, nodeAttributes1);\\\\nax += attractive.x;\\\\nay += attractive.y;\\\\nvec2 gravity = calcGravity(i, currentNode, nodeAttributes2);\\\\nax -= gravity.x;\\\\nay -= gravity.y;\\\\nfloat param = u_interval * u_damping;\\\\nfloat vx = ax * param;\\\\nfloat vy = ay * param;\\\\nfloat vlength = sqrt((vx * vx) + (vy * vy)) + 0.0001;\\\\nif (vlength > u_maxSpeed) {float param2 = u_maxSpeed / vlength;\\\\nvx = param2 * vx;\\\\nvy = param2 * vy;}\\\\nif ((nodeAttributes1.w != 0.0) && (nodeAttributes2.w != 0.0)) {gl_FragColor = vec4(vec4(nodeAttributes1.w, nodeAttributes2.w, currentNode.z, 0.0));}else {float distx = vx * u_interval;\\\\nfloat disty = vy * u_interval;\\\\nfloat distLength = sqrt((distx * distx) + (disty * disty));\\\\ngl_FragColor = vec4(vec4(currentNode.x + distx, currentNode.y + disty, currentNode.z, distLength));}if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"MAX_EDGE_PER_VERTEX\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true},{\\\"name\\\":\\\"SHIFT_20\\\",\\\"type\\\":\\\"Float\\\",\\\"value\\\":1048576,\\\"runtime\\\":false}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_damping\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_maxSpeed\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_minMovement\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AveMovement\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_coulombDisScale\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_factor\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributeArray1\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_NodeAttributeArray2\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_interval\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_Data\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\nexports.aveMovementCode = \"\\nconst VERTEX_COUNT;\\n@numthreads(1, 1, 1)\\nclass CalcAveMovement {\\n @in\\n u_Data: vec4[];\\n @in\\n u_iter: float;\\n @in @out\\n u_AveMovement: vec4[];\\n @main\\n compute() {\\n let movement = 0;\\n for (let j: int = 0; j < VERTEX_COUNT; j++) {\\n const vertex = this.u_Data[j];\\n movement += vertex[3];\\n }\\n movement = movement / float(VERTEX_COUNT);\\n this.u_AveMovement[0] = [movement, 0, 0, 0];\\n }\\n}\\n\";\nexports.aveMovementBundle = \"{\\\"shaders\\\":{\\\"WGSL\\\":\\\"\\\",\\\"GLSL450\\\":\\\"\\\",\\\"GLSL100\\\":\\\"\\\\n\\\\nfloat epsilon = 0.00001;\\\\nvec2 addrTranslation_1Dto2D(float address1D, vec2 texSize) {\\\\n vec2 conv_const = vec2(1.0 / texSize.x, 1.0 / (texSize.x * texSize.y));\\\\n vec2 normAddr2D = float(address1D) * conv_const;\\\\n return vec2(fract(normAddr2D.x + epsilon), normAddr2D.y);\\\\n}\\\\n\\\\nvoid barrier() {}\\\\n \\\\n\\\\nuniform vec2 u_OutputTextureSize;\\\\nuniform int u_OutputTexelCount;\\\\nvarying vec2 v_TexCoord;\\\\n\\\\nbool gWebGPUDebug = false;\\\\nvec4 gWebGPUDebugOutput = vec4(0.0);\\\\n\\\\n#define VERTEX_COUNT __DefineValuePlaceholder__VERTEX_COUNT\\\\n\\\\nuniform sampler2D u_Data;\\\\nuniform vec2 u_DataSize;\\\\nvec4 getDatau_Data(vec2 address2D) {\\\\n return vec4(texture2D(u_Data, address2D).rgba);\\\\n}\\\\nvec4 getDatau_Data(float address1D) {\\\\n return getDatau_Data(addrTranslation_1Dto2D(address1D, u_DataSize));\\\\n}\\\\nvec4 getDatau_Data(int address1D) {\\\\n return getDatau_Data(float(address1D));\\\\n}\\\\nuniform float u_iter;\\\\nuniform sampler2D u_AveMovement;\\\\nuniform vec2 u_AveMovementSize;\\\\nvec4 getDatau_AveMovement(vec2 address2D) {\\\\n return vec4(texture2D(u_AveMovement, address2D).rgba);\\\\n}\\\\nvec4 getDatau_AveMovement(float address1D) {\\\\n return getDatau_AveMovement(addrTranslation_1Dto2D(address1D, u_AveMovementSize));\\\\n}\\\\nvec4 getDatau_AveMovement(int address1D) {\\\\n return getDatau_AveMovement(float(address1D));\\\\n}\\\\nvoid main() {\\\\nivec3 workGroupSize = ivec3(1, 1, 1);\\\\nivec3 numWorkGroups = ivec3(1, 1, 1); \\\\nint globalInvocationIndex = int(floor(v_TexCoord.x * u_OutputTextureSize.x))\\\\n + int(floor(v_TexCoord.y * u_OutputTextureSize.y)) * int(u_OutputTextureSize.x);\\\\nint workGroupIDLength = globalInvocationIndex / (workGroupSize.x * workGroupSize.y * workGroupSize.z);\\\\nivec3 workGroupID = ivec3(workGroupIDLength / numWorkGroups.y / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.z, workGroupIDLength / numWorkGroups.x / numWorkGroups.y);\\\\nint localInvocationIDZ = globalInvocationIndex / (workGroupSize.x * workGroupSize.y);\\\\nint localInvocationIDY = (globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y) / workGroupSize.x;\\\\nint localInvocationIDX = globalInvocationIndex - localInvocationIDZ * workGroupSize.x * workGroupSize.y - localInvocationIDY * workGroupSize.x;\\\\nivec3 localInvocationID = ivec3(localInvocationIDX, localInvocationIDY, localInvocationIDZ);\\\\nivec3 globalInvocationID = workGroupID * workGroupSize + localInvocationID;\\\\nint localInvocationIndex = localInvocationID.z * workGroupSize.x * workGroupSize.y\\\\n + localInvocationID.y * workGroupSize.x + localInvocationID.x;\\\\nfloat movement = 0.0;\\\\nfor (int j = 0; j < VERTEX_COUNT; j++) {vec4 vertex = getDatau_Data(j);\\\\nmovement += vertex.w;}\\\\nmovement = movement / float(VERTEX_COUNT);\\\\ngl_FragColor = vec4(vec4(movement, 0.0, 0.0, 0.0));if (gWebGPUDebug) {\\\\n gl_FragColor = gWebGPUDebugOutput;\\\\n}}\\\\n\\\"},\\\"context\\\":{\\\"name\\\":\\\"\\\",\\\"dispatch\\\":[1,1,1],\\\"threadGroupSize\\\":[1,1,1],\\\"maxIteration\\\":1,\\\"defines\\\":[{\\\"name\\\":\\\"VERTEX_COUNT\\\",\\\"type\\\":\\\"Float\\\",\\\"runtime\\\":true}],\\\"uniforms\\\":[{\\\"name\\\":\\\"u_Data\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_iter\\\",\\\"type\\\":\\\"Float\\\",\\\"storageClass\\\":\\\"Uniform\\\",\\\"readonly\\\":true,\\\"writeonly\\\":false,\\\"size\\\":[1,1]},{\\\"name\\\":\\\"u_AveMovement\\\",\\\"type\\\":\\\"vec4[]\\\",\\\"storageClass\\\":\\\"StorageBuffer\\\",\\\"readonly\\\":false,\\\"writeonly\\\":false,\\\"size\\\":[1,1]}],\\\"globalDeclarations\\\":[],\\\"output\\\":{\\\"name\\\":\\\"u_AveMovement\\\",\\\"size\\\":[1,1],\\\"length\\\":1},\\\"needPingpong\\\":true}}\";\n//# sourceMappingURL=gForceShader.js.map","\"use strict\";\n// @ts-nocheck\n/**\n * @fileOverview fruchterman layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GForceGPULayout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\n// @ts-ignore\nvar g_webgpu_1 = require(\"@antv/g-webgpu\");\nvar gpu_1 = require(\"../../util/gpu\");\nvar math_1 = require(\"../../util/math\");\nvar gForceShader_1 = require(\"./gForceShader\");\nvar constants_1 = require(\"../constants\");\n/**\n * graphin 中的 force 布局\n */\nvar GForceGPULayout = /** @class */ (function (_super) {\n __extends(GForceGPULayout, _super);\n function GForceGPULayout(options) {\n var _this = _super.call(this) || this;\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 1000;\n /** 弹簧引力系数 */\n _this.edgeStrength = 200;\n /** 斥力系数 */\n _this.nodeStrength = 1000;\n /** 库伦系数 */\n _this.coulombDisScale = 0.005;\n /** 阻尼系数 */\n _this.damping = 0.9;\n /** 最大速度 */\n _this.maxSpeed = 1000;\n /** 一次迭代的平均移动距离小于该值时停止迭代 */\n _this.minMovement = 0.5;\n /** 迭代中衰减 */\n _this.interval = 0.02;\n /** 斥力的一个系数 */\n _this.factor = 1;\n /** 理想边长 */\n _this.linkDistance = 1;\n /** 重力大小 */\n _this.gravity = 10;\n /** 是否启用web worker。前提是在web worker里执行布局,否则无效\t*/\n _this.workerEnabled = false;\n _this.nodes = [];\n _this.edges = [];\n _this.width = 300;\n _this.height = 300;\n _this.nodeMap = {};\n _this.nodeIdxMap = {};\n _this.updateCfg(options);\n return _this;\n }\n GForceGPULayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 2000,\n gravity: 10,\n clustering: false,\n clusterGravity: 10\n };\n };\n /**\n * 执行布局\n */\n GForceGPULayout.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, center, nodeMap, nodeIdxMap;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n if (!self.center) {\n self.center = [self.width / 2, self.height / 2];\n }\n center = self.center;\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return [2 /*return*/];\n }\n nodeMap = {};\n nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.nodeStrength = (0, gpu_1.proccessToFunc)(self.nodeStrength, 1);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength, 1);\n // layout\n return [4 /*yield*/, self.run()];\n case 1:\n // layout\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n GForceGPULayout.prototype.executeWithWorker = function (canvas, ctx) {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n return;\n }\n var nodeMap = {};\n var nodeIdxMap = {};\n nodes.forEach(function (node, i) {\n if (!(0, util_1.isNumber)(node.x))\n node.x = Math.random() * self.width;\n if (!(0, util_1.isNumber)(node.y))\n node.y = Math.random() * self.height;\n nodeMap[node.id] = node;\n nodeIdxMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.nodeIdxMap = nodeIdxMap;\n self.nodeStrength = (0, gpu_1.proccessToFunc)(self.nodeStrength, 1);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength, 1);\n // layout\n self.run(canvas, ctx);\n };\n GForceGPULayout.prototype.run = function (canvas, ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var self, nodes, edges, maxIteration, numParticles, _a, maxEdgePerVetex, nodesEdgesArray, masses, nodeStrengths, centerXs, centerYs, centerGravities, fxs, fys, gravity, center, nodeAttributeArray1, nodeAttributeArray2, workerEnabled, world, onLayoutEnd, initPreviousData, i, kernelGForce, kernelAveMovement, execute;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n self = this;\n nodes = self.nodes;\n edges = self.edges;\n maxIteration = self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n numParticles = nodes.length;\n self.linkDistance = (0, gpu_1.proccessToFunc)(self.linkDistance);\n self.edgeStrength = (0, gpu_1.proccessToFunc)(self.edgeStrength);\n _a = (0, gpu_1.buildTextureDataWithTwoEdgeAttr)(nodes, edges, self.linkDistance, self.edgeStrength), maxEdgePerVetex = _a.maxEdgePerVetex, nodesEdgesArray = _a.array;\n // init degree for mass\n self.degrees = (0, math_1.getDegree)(nodes.length, self.nodeIdxMap, edges).map(function (degree) { return degree.all; });\n masses = [];\n nodeStrengths = [];\n centerXs = [];\n centerYs = [];\n centerGravities = [];\n fxs = [];\n fys = [];\n if (!self.getMass) {\n self.getMass = function (d) {\n return self.degrees[self.nodeIdxMap[d.id]] || 1;\n };\n }\n gravity = self.gravity;\n center = self.center;\n nodes.forEach(function (node, i) {\n masses.push(self.getMass(node));\n nodeStrengths.push(self.nodeStrength(node));\n if (!self.degrees[i])\n self.degrees[i] = 0;\n var nodeGravity = [center[0], center[1], gravity];\n if (self.getCenter) {\n var customCenter = self.getCenter(node, self.degrees[i]);\n if (customCenter &&\n (0, util_1.isNumber)(customCenter[0]) &&\n (0, util_1.isNumber)(customCenter[1]) &&\n (0, util_1.isNumber)(customCenter[2])) {\n nodeGravity = customCenter;\n }\n }\n centerXs.push(nodeGravity[0]);\n centerYs.push(nodeGravity[1]);\n centerGravities.push(nodeGravity[2]);\n if ((0, util_1.isNumber)(node.fx) && (0, util_1.isNumber)(node.fy)) {\n fxs.push(node.fx || 0.001);\n fys.push(node.fy || 0.001);\n }\n else {\n fxs.push(0);\n fys.push(0);\n }\n });\n nodeAttributeArray1 = (0, gpu_1.arrayToTextureData)([\n masses,\n self.degrees,\n nodeStrengths,\n fxs\n ]);\n nodeAttributeArray2 = (0, gpu_1.arrayToTextureData)([\n centerXs,\n centerYs,\n centerGravities,\n fys\n ]);\n workerEnabled = self.workerEnabled;\n if (workerEnabled) {\n world = g_webgpu_1.World.create({\n canvas: canvas,\n engineOptions: {\n supportCompute: true\n }\n });\n }\n else {\n world = g_webgpu_1.World.create({\n engineOptions: {\n supportCompute: true\n }\n });\n }\n onLayoutEnd = self.onLayoutEnd;\n initPreviousData = [];\n nodesEdgesArray.forEach(function (value) {\n initPreviousData.push(value);\n });\n for (i = 0; i < 4; i++) {\n initPreviousData.push(0);\n }\n kernelGForce = world\n .createKernel(gForceShader_1.gForceBundle)\n .setDispatch([numParticles, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n u_damping: self.damping,\n u_maxSpeed: self.maxSpeed,\n u_minMovement: self.minMovement,\n u_coulombDisScale: self.coulombDisScale,\n u_factor: self.factor,\n u_NodeAttributeArray1: nodeAttributeArray1,\n u_NodeAttributeArray2: nodeAttributeArray2,\n MAX_EDGE_PER_VERTEX: maxEdgePerVetex,\n VERTEX_COUNT: numParticles,\n u_AveMovement: initPreviousData,\n u_interval: self.interval // 每次迭代更新,首次设置为 interval,在 onIterationCompleted 中更新\n });\n kernelAveMovement = world\n .createKernel(gForceShader_1.aveMovementBundle)\n .setDispatch([1, 1, 1])\n .setBinding({\n u_Data: nodesEdgesArray,\n VERTEX_COUNT: numParticles,\n u_AveMovement: [0, 0, 0, 0]\n });\n execute = function () { return __awaiter(_this, void 0, void 0, function () {\n var i, stepInterval, finalParticleData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < maxIteration)) return [3 /*break*/, 5];\n // TODO: 似乎都来自 kernelGForce 是一个引用\n // 当前坐标作为下一次迭代的 PreviousData\n // if (i > 0) {\n // kernelAveMovement.setBinding({\n // u_PreviousData: kernelGForce\n // });\n // }\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelGForce.execute()];\n case 2:\n // TODO: 似乎都来自 kernelGForce 是一个引用\n // 当前坐标作为下一次迭代的 PreviousData\n // if (i > 0) {\n // kernelAveMovement.setBinding({\n // u_PreviousData: kernelGForce\n // });\n // }\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n // midRes = await kernelGForce.getOutput();\n // 每次迭代完成后\n // 计算平均位移,用于提前终止迭代\n kernelAveMovement.setBinding({\n u_Data: kernelGForce\n });\n // eslint-disable-next-line no-await-in-loop\n return [4 /*yield*/, kernelAveMovement.execute()];\n case 3:\n // eslint-disable-next-line no-await-in-loop\n _a.sent();\n stepInterval = Math.max(0.02, self.interval - i * 0.002);\n kernelGForce.setBinding({\n u_interval: stepInterval,\n u_AveMovement: kernelAveMovement\n });\n _a.label = 4;\n case 4:\n i++;\n return [3 /*break*/, 1];\n case 5: return [4 /*yield*/, kernelGForce.getOutput()];\n case 6:\n finalParticleData = _a.sent();\n // 所有迭代完成后\n if (canvas) {\n // 传递数据给主线程\n ctx.postMessage({\n type: constants_1.LAYOUT_MESSAGE.GPUEND,\n vertexEdgeData: finalParticleData\n // edgeIndexBufferData,\n });\n }\n else {\n nodes.forEach(function (node, i) {\n var x = finalParticleData[4 * i];\n var y = finalParticleData[4 * i + 1];\n node.x = x;\n node.y = y;\n });\n }\n if (onLayoutEnd)\n onLayoutEnd();\n return [2 /*return*/];\n }\n });\n }); };\n return [4 /*yield*/, execute()];\n case 1:\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n GForceGPULayout.prototype.getType = function () {\n return \"gForce-gpu\";\n };\n return GForceGPULayout;\n}(base_1.Base));\nexports.GForceGPULayout = GForceGPULayout;\n//# sourceMappingURL=gForce.js.map","\"use strict\";\n/**\n * @fileOverview Combo force layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComboForceLayout = void 0;\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\n/**\n * force layout for graph with combos\n */\nvar ComboForceLayout = /** @class */ (function (_super) {\n __extends(ComboForceLayout, _super);\n function ComboForceLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 停止迭代的最大迭代数 */\n _this.maxIteration = 100;\n /** 重力大小,影响图的紧凑程度 */\n _this.gravity = 10;\n /** 群组中心力大小 */\n _this.comboGravity = 10;\n /** 默认边长度 */\n _this.linkDistance = 10;\n /** 每次迭代位移的衰减相关参数 */\n _this.alpha = 1;\n _this.alphaMin = 0.001;\n _this.alphaDecay = 1 - Math.pow(_this.alphaMin, (1 / 300));\n _this.alphaTarget = 0;\n /** 节点运动速度衰减参数 */\n _this.velocityDecay = 0.6;\n /** 边引力大小 */\n _this.edgeStrength = 0.6;\n /** 节点引力大小 */\n _this.nodeStrength = 30;\n /** 是否开启防止重叠 */\n _this.preventOverlap = false;\n /** 是否开启节点之间的防止重叠 */\n _this.preventNodeOverlap = false;\n /** 是否开启 Combo 之间的防止重叠 */\n _this.preventComboOverlap = false;\n /** 防止重叠的碰撞力大小 */\n _this.collideStrength = undefined;\n /** 防止重叠的碰撞力大小 */\n _this.nodeCollideStrength = 0.5;\n /** 防止重叠的碰撞力大小 */\n _this.comboCollideStrength = 0.5;\n /** Combo 最小间距,防止重叠时的间隙 */\n _this.comboSpacing = 20;\n /** Combo 内部的 padding */\n _this.comboPadding = 10;\n /** 优化计算斥力的速度,两节点间距超过 optimizeRangeFactor * width 则不再计算斥力和重叠斥力 */\n _this.optimizeRangeFactor = 1;\n /** 每次迭代的回调函数 */\n _this.onTick = function () { };\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n /** 根据边两端节点层级差距的调整引力系数的因子,取值范围 [0, 1]。层级差距越大,引力越小 */\n _this.depthAttractiveForceScale = 1;\n /** 根据边两端节点层级差距的调整斥力系数的因子,取值范围 [1, Infinity]。层级差距越大,斥力越大 */\n _this.depthRepulsiveForceScale = 2;\n /** 内部计算参数 */\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n _this.comboTrees = [];\n _this.width = 300;\n _this.height = 300;\n _this.bias = [];\n _this.nodeMap = {};\n _this.oriComboMap = {};\n _this.indexMap = {};\n _this.comboMap = {};\n _this.previousLayouted = false;\n _this.updateCfg(options);\n return _this;\n }\n ComboForceLayout.prototype.getDefaultCfg = function () {\n return {\n maxIteration: 100,\n center: [0, 0],\n gravity: 10,\n speed: 1,\n comboGravity: 30,\n preventOverlap: false,\n preventComboOverlap: true,\n preventNodeOverlap: true,\n nodeSpacing: undefined,\n collideStrength: undefined,\n nodeCollideStrength: 0.5,\n comboCollideStrength: 0.5,\n comboSpacing: 20,\n comboPadding: 10,\n edgeStrength: 0.6,\n nodeStrength: 30,\n linkDistance: 10\n };\n };\n /**\n * 执行布局\n */\n ComboForceLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n self.comboTree = {\n id: \"comboTreeRoot\",\n depth: -1,\n children: self.comboTrees\n };\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n self.initVals();\n // layout\n self.run();\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n };\n ComboForceLayout.prototype.run = function () {\n var self = this;\n var nodes = self.nodes;\n var maxIteration = self.previousLayouted\n ? self.maxIteration / 5\n : self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n var center = self.center;\n var velocityDecay = self.velocityDecay;\n // init the positions to make the nodes with same combo gather around the combo\n var comboMap = self.comboMap;\n if (!self.previousLayouted)\n self.initPos(comboMap);\n var _loop_1 = function (i) {\n var displacements = [];\n nodes.forEach(function (_, j) {\n displacements[j] = { x: 0, y: 0 };\n });\n self.applyCalculate(displacements);\n // gravity for combos\n self.applyComboCenterForce(displacements);\n // move\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n n.x += displacements[j].x * velocityDecay;\n n.y += displacements[j].y * velocityDecay;\n });\n self.alpha += (self.alphaTarget - self.alpha) * self.alphaDecay;\n self.onTick();\n };\n // iterate\n for (var i = 0; i < maxIteration; i++) {\n _loop_1(i);\n }\n // move to center\n var meanCenter = [0, 0];\n nodes.forEach(function (n) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n meanCenter[0] += n.x;\n meanCenter[1] += n.y;\n });\n meanCenter[0] /= nodes.length;\n meanCenter[1] /= nodes.length;\n var centerOffset = [center[0] - meanCenter[0], center[1] - meanCenter[1]];\n nodes.forEach(function (n, j) {\n if (!(0, util_1.isNumber)(n.x) || !(0, util_1.isNumber)(n.y))\n return;\n n.x += centerOffset[0];\n n.y += centerOffset[1];\n });\n // arrange the empty combo\n self.combos.forEach(function (combo) {\n var mapped = comboMap[combo.id];\n if (mapped && mapped.empty) {\n combo.x = mapped.cx || combo.x;\n combo.y = mapped.cy || combo.y;\n }\n });\n self.previousLayouted = true;\n };\n ComboForceLayout.prototype.initVals = function () {\n var self = this;\n var edges = self.edges;\n var nodes = self.nodes;\n var combos = self.combos;\n var count = {};\n var nodeMap = {};\n var indexMap = {};\n nodes.forEach(function (node, i) {\n nodeMap[node.id] = node;\n indexMap[node.id] = i;\n });\n self.nodeMap = nodeMap;\n self.indexMap = indexMap;\n var oriComboMap = {};\n combos.forEach(function (combo) {\n oriComboMap[combo.id] = combo;\n });\n self.oriComboMap = oriComboMap;\n self.comboMap = self.getComboMap();\n var preventOverlap = self.preventOverlap;\n self.preventComboOverlap = self.preventComboOverlap || preventOverlap;\n self.preventNodeOverlap = self.preventNodeOverlap || preventOverlap;\n var collideStrength = self.collideStrength;\n if (collideStrength) {\n self.comboCollideStrength = collideStrength;\n self.nodeCollideStrength = collideStrength;\n }\n self.comboCollideStrength = self.comboCollideStrength\n ? self.comboCollideStrength\n : 0;\n self.nodeCollideStrength = self.nodeCollideStrength\n ? self.nodeCollideStrength\n : 0;\n // get edge bias\n for (var i = 0; i < edges.length; ++i) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n if (count[source])\n count[source]++;\n else\n count[source] = 1;\n if (count[target])\n count[target]++;\n else\n count[target] = 1;\n }\n var bias = [];\n for (var i = 0; i < edges.length; ++i) {\n var source = (0, util_1.getEdgeTerminal)(edges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(edges[i], 'target');\n bias[i] = count[source] / (count[source] + count[target]);\n }\n this.bias = bias;\n var nodeSize = self.nodeSize;\n var nodeSpacing = self.nodeSpacing;\n var nodeSizeFunc;\n var nodeSpacingFunc;\n // nodeSpacing to function\n if ((0, util_1.isNumber)(nodeSpacing)) {\n nodeSpacingFunc = function () { return nodeSpacing; };\n }\n else if ((0, util_1.isFunction)(nodeSpacing)) {\n nodeSpacingFunc = nodeSpacing;\n }\n else {\n nodeSpacingFunc = function () { return 0; };\n }\n this.nodeSpacing = nodeSpacingFunc;\n // nodeSize to function\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return res / 2;\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return res / 2;\n }\n return d.size / 2;\n }\n return 10;\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n return nodeSize(d);\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1; };\n }\n else {\n // number type\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2; };\n }\n this.nodeSize = nodeSizeFunc;\n // comboSpacing to function\n var comboSpacing = self.comboSpacing;\n var comboSpacingFunc;\n if ((0, util_1.isNumber)(comboSpacing)) {\n comboSpacingFunc = function () { return comboSpacing; };\n }\n else if ((0, util_1.isFunction)(comboSpacing)) {\n comboSpacingFunc = comboSpacing;\n }\n else {\n // null type\n comboSpacingFunc = function () { return 0; };\n }\n this.comboSpacing = comboSpacingFunc;\n // comboPadding to function\n var comboPadding = self.comboPadding;\n var comboPaddingFunc;\n if ((0, util_1.isNumber)(comboPadding)) {\n comboPaddingFunc = function () { return comboPadding; };\n }\n else if ((0, util_1.isArray)(comboPadding)) {\n comboPaddingFunc = function () { return Math.max.apply(null, comboPadding); };\n }\n else if ((0, util_1.isFunction)(comboPadding)) {\n comboPaddingFunc = comboPadding;\n }\n else {\n // null type\n comboPaddingFunc = function () { return 0; };\n }\n this.comboPadding = comboPaddingFunc;\n // linkDistance to function\n var linkDistance = this.linkDistance;\n var linkDistanceFunc;\n if (!linkDistance) {\n linkDistance = 10;\n }\n if ((0, util_1.isNumber)(linkDistance)) {\n linkDistanceFunc = function (d) {\n return linkDistance;\n };\n }\n else {\n linkDistanceFunc = linkDistance;\n }\n this.linkDistance = linkDistanceFunc;\n // linkStrength to function\n var edgeStrength = this.edgeStrength;\n var edgeStrengthFunc;\n if (!edgeStrength) {\n edgeStrength = 1;\n }\n if ((0, util_1.isNumber)(edgeStrength)) {\n edgeStrengthFunc = function (d) {\n return edgeStrength;\n };\n }\n else {\n edgeStrengthFunc = edgeStrength;\n }\n this.edgeStrength = edgeStrengthFunc;\n // nodeStrength to function\n var nodeStrength = this.nodeStrength;\n var nodeStrengthFunc;\n if (!nodeStrength) {\n nodeStrength = 30;\n }\n if ((0, util_1.isNumber)(nodeStrength)) {\n nodeStrengthFunc = function (d) {\n return nodeStrength;\n };\n }\n else {\n nodeStrengthFunc = nodeStrength;\n }\n this.nodeStrength = nodeStrengthFunc;\n };\n ComboForceLayout.prototype.initPos = function (comboMap) {\n var self = this;\n var nodes = self.nodes;\n nodes.forEach(function (node, i) {\n var comboId = node.comboId;\n var combo = comboMap[comboId];\n if (comboId && combo) {\n node.x = combo.cx + 100 / (i + 1);\n node.y = combo.cy + 100 / (i + 1);\n }\n else {\n node.x = 100 / (i + 1);\n node.y = 100 / (i + 1);\n }\n });\n };\n ComboForceLayout.prototype.getComboMap = function () {\n var self = this;\n var nodeMap = self.nodeMap;\n var comboTrees = self.comboTrees;\n var oriComboMap = self.oriComboMap;\n var comboMap = {};\n (comboTrees || []).forEach(function (ctree) {\n var treeChildren = [];\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n if (!oriComboMap[treeNode.id])\n return true; // means it is hidden, skip it\n if (comboMap[treeNode.id] === undefined) {\n var combo = {\n id: treeNode.id,\n name: treeNode.id,\n cx: 0,\n cy: 0,\n count: 0,\n depth: self.oriComboMap[treeNode.id].depth || 0,\n children: []\n };\n comboMap[treeNode.id] = combo;\n }\n var children = treeNode.children;\n if (children) {\n children.forEach(function (child) {\n if (!comboMap[child.id] && !nodeMap[child.id])\n return true; // means it is hidden\n treeChildren.push(child);\n });\n }\n var c = comboMap[treeNode.id];\n c.cx = 0;\n c.cy = 0;\n if (treeChildren.length === 0) {\n c.empty = true;\n var oriCombo = oriComboMap[treeNode.id];\n c.cx = oriCombo.x;\n c.cy = oriCombo.y;\n }\n treeChildren.forEach(function (child) {\n c.count++;\n if (child.itemType !== \"node\") {\n var childCombo = comboMap[child.id];\n if ((0, util_1.isNumber)(childCombo.cx))\n c.cx += childCombo.cx;\n if ((0, util_1.isNumber)(childCombo.cy))\n c.cy += childCombo.cy;\n return;\n }\n var node = nodeMap[child.id];\n // means the node is hidden, skip it\n if (!node)\n return;\n if ((0, util_1.isNumber)(node.x)) {\n c.cx += node.x;\n }\n if ((0, util_1.isNumber)(node.y)) {\n c.cy += node.y;\n }\n });\n c.cx /= (c.count || 1);\n c.cy /= (c.count || 1);\n c.children = treeChildren;\n return true;\n });\n });\n return comboMap;\n };\n ComboForceLayout.prototype.applyComboCenterForce = function (displacements) {\n var self = this;\n var gravity = self.gravity;\n var comboGravity = self.comboGravity || gravity;\n var alpha = this.alpha;\n var comboTrees = self.comboTrees;\n var indexMap = self.indexMap;\n var nodeMap = self.nodeMap;\n var comboMap = self.comboMap;\n (comboTrees || []).forEach(function (ctree) {\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n var combo = comboMap[treeNode.id];\n // means the combo is hidden, skip it\n if (!combo)\n return true;\n var c = comboMap[treeNode.id];\n // higher depth the combo, larger the gravity\n var gravityScale = ((c.depth + 1) / 10) * 0.5;\n // apply combo center force for all the descend nodes in this combo\n // and update the center position and count for this combo\n var comboX = c.cx;\n var comboY = c.cy;\n c.cx = 0;\n c.cy = 0;\n c.children.forEach(function (child) {\n if (child.itemType !== \"node\") {\n var childCombo = comboMap[child.id];\n if (childCombo && (0, util_1.isNumber)(childCombo.cx))\n c.cx += childCombo.cx;\n if (childCombo && (0, util_1.isNumber)(childCombo.cy))\n c.cy += childCombo.cy;\n return;\n }\n var node = nodeMap[child.id];\n var vecX = (node.x - comboX) || 0.005;\n var vecY = (node.y - comboY) || 0.005;\n var l = Math.sqrt(vecX * vecX + vecY * vecY);\n var childIdx = indexMap[node.id];\n var params = ((comboGravity * alpha) / l) * gravityScale;\n displacements[childIdx].x -= vecX * params;\n displacements[childIdx].y -= vecY * params;\n if ((0, util_1.isNumber)(node.x))\n c.cx += node.x;\n if ((0, util_1.isNumber)(node.y))\n c.cy += node.y;\n });\n c.cx /= (c.count || 1);\n c.cy /= (c.count || 1);\n return true;\n });\n });\n };\n ComboForceLayout.prototype.applyCalculate = function (displacements) {\n var self = this;\n var comboMap = self.comboMap;\n var nodes = self.nodes;\n // store the vx, vy, and distance to reduce dulplicate calculation\n var vecMap = {};\n nodes.forEach(function (v, i) {\n nodes.forEach(function (u, j) {\n if (i < j)\n return;\n var vx = (v.x - u.x) || 0.005;\n var vy = (v.y - u.y) || 0.005;\n var vl2 = vx * vx + vy * vy;\n var vl = Math.sqrt(vl2);\n if (vl2 < 1)\n vl2 = vl;\n vecMap[\"\".concat(v.id, \"-\").concat(u.id)] = { vx: vx, vy: vy, vl2: vl2, vl: vl };\n vecMap[\"\".concat(u.id, \"-\").concat(v.id)] = { vl2: vl2, vl: vl, vx: -vx, vy: -vy };\n });\n });\n // get the sizes of the combos\n self.updateComboSizes(comboMap);\n self.calRepulsive(displacements, vecMap);\n self.calAttractive(displacements, vecMap);\n var preventComboOverlap = self.preventComboOverlap;\n if (preventComboOverlap)\n self.comboNonOverlapping(displacements, comboMap);\n };\n /**\n * Update the sizes of the combos according to their children\n * Used for combos nonoverlap, but not re-render the combo shapes\n */\n ComboForceLayout.prototype.updateComboSizes = function (comboMap) {\n var self = this;\n var comboTrees = self.comboTrees;\n var nodeMap = self.nodeMap;\n var nodeSize = self.nodeSize;\n var comboSpacing = self.comboSpacing;\n var comboPadding = self.comboPadding;\n (comboTrees || []).forEach(function (ctree) {\n var treeChildren = [];\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n if (treeNode.itemType === \"node\")\n return true; // skip it\n var c = comboMap[treeNode.id];\n // means the combo is hidden, skip it\n if (!c)\n return false;\n var children = treeNode.children;\n if (children) {\n children.forEach(function (child) {\n // means the combo is hidden.\n if (!comboMap[child.id] && !nodeMap[child.id])\n return;\n treeChildren.push(child);\n });\n }\n c.minX = Infinity;\n c.minY = Infinity;\n c.maxX = -Infinity;\n c.maxY = -Infinity;\n treeChildren.forEach(function (child) {\n if (child.itemType !== \"node\")\n return true; // skip it\n var node = nodeMap[child.id];\n if (!node)\n return true; // means it is hidden\n var r = nodeSize(node);\n var nodeMinX = node.x - r;\n var nodeMinY = node.y - r;\n var nodeMaxX = node.x + r;\n var nodeMaxY = node.y + r;\n if (c.minX > nodeMinX)\n c.minX = nodeMinX;\n if (c.minY > nodeMinY)\n c.minY = nodeMinY;\n if (c.maxX < nodeMaxX)\n c.maxX = nodeMaxX;\n if (c.maxY < nodeMaxY)\n c.maxY = nodeMaxY;\n });\n var minSize = self.oriComboMap[treeNode.id].size || 10;\n if ((0, util_1.isArray)(minSize))\n minSize = minSize[0];\n var maxLength = Math.max(c.maxX - c.minX, c.maxY - c.minY, minSize);\n c.r = maxLength / 2 + comboSpacing(c) / 2 + comboPadding(c);\n return true;\n });\n });\n };\n /**\n * prevent the overlappings among combos\n */\n ComboForceLayout.prototype.comboNonOverlapping = function (displacements, comboMap) {\n var self = this;\n var comboTree = self.comboTree;\n var comboCollideStrength = self.comboCollideStrength;\n var indexMap = self.indexMap;\n var nodeMap = self.nodeMap;\n (0, util_1.traverseTreeUp)(comboTree, function (treeNode) {\n if (!comboMap[treeNode.id] &&\n !nodeMap[treeNode.id] &&\n treeNode.id !== \"comboTreeRoot\") {\n return false;\n } // means it is hidden\n var children = treeNode.children;\n // 同个子树下的子 combo 间两两对比\n if (children && children.length > 1) {\n children.forEach(function (v, i) {\n if (v.itemType === \"node\")\n return false; // skip it\n var cv = comboMap[v.id];\n if (!cv)\n return; // means it is hidden, skip it\n children.forEach(function (u, j) {\n if (i <= j)\n return false;\n if (u.itemType === \"node\")\n return false; // skip it\n var cu = comboMap[u.id];\n if (!cu)\n return false; // means it is hidden, skip it\n var vx = (cv.cx - cu.cx) || 0.005;\n var vy = (cv.cy - cu.cy) || 0.005;\n var l = vx * vx + vy * vy;\n var rv = cv.r || 1;\n var ru = cu.r || 1;\n var r = rv + ru;\n var ru2 = ru * ru;\n var rv2 = rv * rv;\n // overlapping\n if (l < r * r) {\n var vnodes = v.children;\n if (!vnodes || vnodes.length === 0)\n return false; // skip it\n var unodes_1 = u.children;\n if (!unodes_1 || unodes_1.length === 0)\n return false; // skip it\n var sqrtl = Math.sqrt(l);\n var ll = ((r - sqrtl) / sqrtl) * comboCollideStrength;\n var xl_1 = vx * ll;\n var yl_1 = vy * ll;\n var rratio_1 = ru2 / (rv2 + ru2);\n var irratio_1 = 1 - rratio_1;\n // 两兄弟 combo 的子节点上施加斥力\n vnodes.forEach(function (vn) {\n if (vn.itemType !== \"node\")\n return false; // skip it\n if (!nodeMap[vn.id])\n return; // means it is hidden, skip it\n var vindex = indexMap[vn.id];\n unodes_1.forEach(function (un) {\n if (un.itemType !== \"node\")\n return false;\n if (!nodeMap[un.id])\n return false; // means it is hidden, skip it\n var uindex = indexMap[un.id];\n displacements[vindex].x += xl_1 * rratio_1;\n displacements[vindex].y += yl_1 * rratio_1;\n displacements[uindex].x -= xl_1 * irratio_1;\n displacements[uindex].y -= yl_1 * irratio_1;\n });\n });\n }\n });\n });\n }\n return true;\n });\n };\n /**\n * Calculate the repulsive force between each node pair\n * @param displacements The array stores the displacements for nodes\n * @param vecMap The map stores vector between each node pair\n */\n ComboForceLayout.prototype.calRepulsive = function (displacements, vecMap) {\n var self = this;\n var nodes = self.nodes;\n var max = self.width * self.optimizeRangeFactor;\n var nodeStrength = self.nodeStrength;\n var alpha = self.alpha;\n var nodeCollideStrength = self.nodeCollideStrength;\n var preventNodeOverlap = self.preventNodeOverlap;\n var nodeSizeFunc = self.nodeSize;\n var nodeSpacingFunc = self.nodeSpacing;\n var scale = self.depthRepulsiveForceScale;\n var center = self.center;\n nodes.forEach(function (v, i) {\n if (!v.x || !v.y)\n return;\n // center gravity\n if (center) {\n var gravity = self.gravity;\n var vecX = (v.x - center[0]) || 0.005;\n var vecY = (v.y - center[1]) || 0.005;\n var l = Math.sqrt(vecX * vecX + vecY * vecY);\n displacements[i].x -= (vecX * gravity * alpha) / l;\n displacements[i].y -= (vecY * gravity * alpha) / l;\n }\n nodes.forEach(function (u, j) {\n if (i === j) {\n return;\n }\n if (!u.x || !u.y)\n return;\n var _a = vecMap[\"\".concat(v.id, \"-\").concat(u.id)], vl2 = _a.vl2, vl = _a.vl;\n if (vl > max)\n return;\n var _b = vecMap[\"\".concat(v.id, \"-\").concat(u.id)], vx = _b.vx, vy = _b.vy;\n var depthDiff = Math.log(Math.abs(u.depth - v.depth) / 10) + 1 || 1;\n depthDiff = depthDiff < 1 ? 1 : depthDiff;\n if (u.comboId !== v.comboId)\n depthDiff += 1;\n var depthParam = depthDiff ? Math.pow(scale, depthDiff) : 1;\n var params = ((nodeStrength(u) * alpha) / vl2) * depthParam;\n displacements[i].x += vx * params;\n displacements[i].y += vy * params;\n // prevent node overlappings\n if (i < j && preventNodeOverlap) {\n var ri = (nodeSizeFunc(v) + nodeSpacingFunc(v)) || 1;\n var rj = (nodeSizeFunc(u) + nodeSpacingFunc(u)) || 1;\n var r = ri + rj;\n if (vl2 < r * r) {\n var ll = ((r - vl) / vl) * nodeCollideStrength;\n var rj2 = rj * rj;\n var rratio = rj2 / (ri * ri + rj2);\n var xl = vx * ll;\n var yl = vy * ll;\n displacements[i].x += xl * rratio;\n displacements[i].y += yl * rratio;\n rratio = 1 - rratio;\n displacements[j].x -= xl * rratio;\n displacements[j].y -= yl * rratio;\n }\n }\n });\n });\n };\n /**\n * Calculate the attractive force between the node pair with edge\n * @param displacements The array stores the displacements for nodes\n * @param vecMap The map stores vector between each node pair\n */\n ComboForceLayout.prototype.calAttractive = function (displacements, vecMap) {\n var self = this;\n var edges = self.edges;\n var linkDistance = self.linkDistance;\n var alpha = self.alpha;\n var edgeStrength = self.edgeStrength;\n var bias = self.bias;\n var scale = self.depthAttractiveForceScale;\n edges.forEach(function (e, i) {\n var source = (0, util_1.getEdgeTerminal)(e, 'source');\n var target = (0, util_1.getEdgeTerminal)(e, 'target');\n if (!source || !target || source === target)\n return;\n var uIndex = self.indexMap[source];\n var vIndex = self.indexMap[target];\n var u = self.nodeMap[source];\n var v = self.nodeMap[target];\n if (!u || !v)\n return;\n var depthDiff = u.depth === v.depth ? 0 : Math.log(Math.abs(u.depth - v.depth) / 10);\n if (u.comboId === v.comboId) {\n depthDiff = depthDiff / 2;\n }\n var depthParam = depthDiff ? Math.pow(scale, depthDiff) : 1;\n if (u.comboId !== v.comboId && depthParam === 1) {\n depthParam = scale / 2;\n }\n else if (u.comboId === v.comboId) {\n depthParam = 2;\n }\n if (!(0, util_1.isNumber)(v.x) || !(0, util_1.isNumber)(u.x) || !(0, util_1.isNumber)(v.y) || !(0, util_1.isNumber)(u.y)) {\n return;\n }\n var _a = vecMap[\"\".concat(target, \"-\").concat(source)], vl = _a.vl, vx = _a.vx, vy = _a.vy;\n var l = ((vl - linkDistance(e)) / vl) * alpha * edgeStrength(e) * depthParam;\n var vecX = vx * l;\n var vecY = vy * l;\n var b = bias[i];\n displacements[vIndex].x -= vecX * b;\n displacements[vIndex].y -= vecY * b;\n displacements[uIndex].x += vecX * (1 - b);\n displacements[uIndex].y += vecY * (1 - b);\n });\n };\n ComboForceLayout.prototype.getType = function () {\n return \"comboForce\";\n };\n return ComboForceLayout;\n}(base_1.Base));\nexports.ComboForceLayout = ComboForceLayout;\n//# sourceMappingURL=comboForce.js.map","\"use strict\";\n/**\n * @fileOverview Combo force layout\n * @author shiwu.wyy@antfin.com\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ComboCombinedLayout = void 0;\nvar constants_1 = require(\"./constants\");\nvar base_1 = require(\"./base\");\nvar util_1 = require(\"../util\");\nvar _1 = require(\".\");\n/**\n * combined two layouts (inner and outer) for graph with combos\n */\nvar ComboCombinedLayout = /** @class */ (function (_super) {\n __extends(ComboCombinedLayout, _super);\n function ComboCombinedLayout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 内部计算参数 */\n _this.nodes = [];\n _this.edges = [];\n _this.combos = [];\n _this.comboEdges = [];\n /** Combo 内部的 padding */\n _this.comboPadding = 10;\n _this.comboTrees = [];\n _this.updateCfg(options);\n return _this;\n }\n ComboCombinedLayout.prototype.getDefaultCfg = function () {\n return {};\n };\n /**\n * 执行布局\n */\n ComboCombinedLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var center = self.center;\n if (!nodes || nodes.length === 0) {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n if (nodes.length === 1) {\n nodes[0].x = center[0];\n nodes[0].y = center[1];\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n return;\n }\n self.initVals();\n // layout\n self.run();\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n };\n ComboCombinedLayout.prototype.run = function () {\n var _a;\n var self = this;\n var nodes = self.nodes, edges = self.edges, combos = self.combos, comboEdges = self.comboEdges, center = self.center;\n var nodeMap = {};\n nodes.forEach(function (node) {\n nodeMap[node.id] = node;\n });\n var comboMap = {};\n combos.forEach(function (combo) {\n comboMap[combo.id] = combo;\n });\n var innerGraphs = self.getInnerGraphs(nodeMap);\n // 每个 innerGraph 作为一个节点,带有大小,参与 force 计算\n var outerNodeIds = [];\n var outerNodes = [];\n var nodeAncestorIdMap = {};\n var allHaveNoPosition = true;\n this.comboTrees.forEach(function (cTree) {\n var innerNode = innerGraphs[cTree.id];\n if (!innerNode) {\n return;\n }\n // 代表 combo 的节点\n var oNode = __assign(__assign({}, cTree), { x: innerNode.x || comboMap[cTree.id].x, y: innerNode.y || comboMap[cTree.id].y, fx: innerNode.fx || comboMap[cTree.id].fx, fy: innerNode.fy || comboMap[cTree.id].fy, mass: innerNode.mass || comboMap[cTree.id].mass, size: innerNode.size });\n outerNodes.push(oNode);\n if (!isNaN(oNode.x) &&\n oNode.x !== 0 &&\n !isNaN(oNode.y) &&\n oNode.y !== 0) {\n allHaveNoPosition = false;\n }\n else {\n oNode.x = Math.random() * 100;\n oNode.y = Math.random() * 100;\n }\n outerNodeIds.push(cTree.id);\n (0, util_1.traverseTreeUp)(cTree, function (child) {\n if (child.id !== cTree.id)\n nodeAncestorIdMap[child.id] = cTree.id;\n return true;\n });\n });\n nodes.forEach(function (node) {\n if (node.comboId && comboMap[node.comboId])\n return;\n // 代表节点的节点\n var oNode = __assign({}, node);\n outerNodes.push(oNode);\n if (!isNaN(oNode.x) &&\n oNode.x !== 0 &&\n !isNaN(oNode.y) &&\n oNode.y !== 0) {\n allHaveNoPosition = false;\n }\n else {\n oNode.x = Math.random() * 100;\n oNode.y = Math.random() * 100;\n }\n outerNodeIds.push(node.id);\n });\n var outerEdges = [];\n edges.concat(comboEdges).forEach(function (edge) {\n var sourceAncestorId = nodeAncestorIdMap[edge.source] || edge.source;\n var targetAncestorId = nodeAncestorIdMap[edge.target] || edge.target;\n // 若两个点的祖先都在力导图的节点中,且是不同的节点,创建一条链接两个祖先的边到力导图的边中\n if (sourceAncestorId !== targetAncestorId &&\n outerNodeIds.includes(sourceAncestorId) &&\n outerNodeIds.includes(targetAncestorId)) {\n outerEdges.push({\n source: sourceAncestorId,\n target: targetAncestorId,\n });\n }\n });\n // 若有需要最外层的 combo 或节点,则对最外层执行力导向\n if (outerNodes === null || outerNodes === void 0 ? void 0 : outerNodes.length) {\n if (outerNodes.length === 1) {\n outerNodes[0].x = center[0];\n outerNodes[0].y = center[1];\n }\n else {\n var outerData = {\n nodes: outerNodes,\n edges: outerEdges,\n };\n // 需要使用一个同步的布局\n // @ts-ignore\n var outerLayout = this.outerLayout ||\n new _1.GForceLayout({\n gravity: 1,\n factor: 4,\n linkDistance: function (edge, source, target) {\n var _a, _b;\n var nodeSize = ((((_a = source.size) === null || _a === void 0 ? void 0 : _a[0]) || 30) + (((_b = target.size) === null || _b === void 0 ? void 0 : _b[0]) || 30)) / 2;\n return Math.min(nodeSize * 1.5, 700);\n },\n });\n var outerLayoutType = (_a = outerLayout.getType) === null || _a === void 0 ? void 0 : _a.call(outerLayout);\n outerLayout.updateCfg({\n center: center,\n kg: 5,\n preventOverlap: true,\n animate: false,\n });\n // 若所有 outerNodes 都没有位置,且 outerLayout 是力导家族的布局,则先执行 preset mds 或 grid\n if (allHaveNoPosition && constants_1.FORCE_LAYOUT_TYPE_MAP[outerLayoutType]) {\n var outerLayoutPreset = outerNodes.length < 100 ? new _1.MDSLayout() : new _1.GridLayout();\n outerLayoutPreset.layout(outerData);\n }\n outerLayout.layout(outerData);\n }\n // 根据外部布局结果,平移 innerGraphs 中的节点(第一层)\n outerNodes.forEach(function (outerNode) {\n var innerGraph = innerGraphs[outerNode.id];\n if (!innerGraph) {\n var node = nodeMap[outerNode.id];\n if (node) {\n node.x = outerNode.x;\n node.y = outerNode.y;\n }\n return;\n }\n innerGraph.visited = true;\n innerGraph.x = outerNode.x;\n innerGraph.y = outerNode.y;\n innerGraph.nodes.forEach(function (node) {\n node.x += outerNode.x;\n node.y += outerNode.y;\n });\n });\n }\n // 至上而下遍历树处理下面各层节点位置\n var innerGraphIds = Object.keys(innerGraphs);\n var _loop_1 = function (i) {\n var id = innerGraphIds[i];\n var innerGraph = innerGraphs[id];\n if (!innerGraph)\n return \"continue\";\n innerGraph.nodes.forEach(function (node) {\n if (!innerGraph.visited) {\n node.x += innerGraph.x || 0;\n node.y += innerGraph.y || 0;\n }\n if (nodeMap[node.id]) {\n nodeMap[node.id].x = node.x;\n nodeMap[node.id].y = node.y;\n }\n });\n if (comboMap[id]) {\n comboMap[id].x = innerGraph.x;\n comboMap[id].y = innerGraph.y;\n }\n };\n for (var i = innerGraphIds.length - 1; i >= 0; i--) {\n _loop_1(i);\n }\n return { nodes: nodes, edges: edges, combos: combos, comboEdges: comboEdges };\n };\n ComboCombinedLayout.prototype.getInnerGraphs = function (nodeMap) {\n var self = this;\n var comboTrees = self.comboTrees, nodeSize = self.nodeSize, edges = self.edges, comboPadding = self.comboPadding, spacing = self.spacing;\n var innerGraphs = {};\n // @ts-ignore\n var innerGraphLayout = this.innerLayout ||\n new _1.ConcentricLayout({ type: 'concentric', sortBy: 'id' });\n innerGraphLayout.center = [0, 0];\n innerGraphLayout.preventOverlap = true;\n innerGraphLayout.nodeSpacing = spacing;\n (comboTrees || []).forEach(function (ctree) {\n (0, util_1.traverseTreeUp)(ctree, function (treeNode) {\n var _a;\n // @ts-ignore\n var padding = (comboPadding === null || comboPadding === void 0 ? void 0 : comboPadding(treeNode)) || 10; // 返回的最大值\n if ((0, util_1.isArray)(padding))\n padding = Math.max.apply(Math, padding);\n if (!((_a = treeNode.children) === null || _a === void 0 ? void 0 : _a.length)) {\n // 空 combo\n if (treeNode.itemType === 'combo') {\n var treeNodeSize = padding\n ? [padding * 2, padding * 2]\n : [30, 30];\n innerGraphs[treeNode.id] = {\n id: treeNode.id,\n nodes: [],\n size: treeNodeSize,\n };\n }\n }\n else {\n // 非空 combo\n var innerGraphNodes = treeNode.children.map(function (child) {\n if (child.itemType === 'combo')\n return innerGraphs[child.id];\n var oriNode = nodeMap[child.id] || {};\n return __assign(__assign({}, oriNode), child);\n });\n var innerGraphNodeIds_1 = innerGraphNodes.map(function (node) { return node.id; });\n var innerGraphData = {\n nodes: innerGraphNodes,\n edges: edges.filter(function (edge) {\n return innerGraphNodeIds_1.includes(edge.source) &&\n innerGraphNodeIds_1.includes(edge.target);\n }),\n };\n var minNodeSize_1 = Infinity;\n innerGraphNodes.forEach(function (node) {\n var _a;\n // @ts-ignore\n if (!node.size)\n node.size = ((_a = innerGraphs[node.id]) === null || _a === void 0 ? void 0 : _a.size) ||\n (nodeSize === null || nodeSize === void 0 ? void 0 : nodeSize(node)) || [30, 30];\n if ((0, util_1.isNumber)(node.size))\n node.size = [node.size, node.size];\n if (minNodeSize_1 > node.size[0])\n minNodeSize_1 = node.size[0];\n if (minNodeSize_1 > node.size[1])\n minNodeSize_1 = node.size[1];\n });\n // 根据节点数量、spacing,调整布局参数\n innerGraphLayout.layout(innerGraphData);\n var _b = (0, util_1.getLayoutBBox)(innerGraphNodes), minX = _b.minX, minY = _b.minY, maxX = _b.maxX, maxY = _b.maxY;\n // move the innerGraph to [0, 0],for later controled by parent layout\n var center_1 = { x: (maxX + minX) / 2, y: (maxY + minY) / 2 };\n innerGraphData.nodes.forEach(function (node) {\n node.x -= center_1.x;\n node.y -= center_1.y;\n });\n var innerGraphWidth = Math.max(maxX - minX, minNodeSize_1) + padding * 2;\n var innerGraphHeight = Math.max(maxY - minY, minNodeSize_1) + padding * 2;\n innerGraphs[treeNode.id] = {\n id: treeNode.id,\n nodes: innerGraphNodes,\n size: [innerGraphWidth, innerGraphHeight],\n };\n }\n return true;\n });\n });\n return innerGraphs;\n };\n ComboCombinedLayout.prototype.initVals = function () {\n var self = this;\n var nodeSize = self.nodeSize;\n var spacing = self.spacing;\n var nodeSizeFunc;\n var spacingFunc;\n // nodeSpacing to function\n if ((0, util_1.isNumber)(spacing)) {\n spacingFunc = function () { return spacing; };\n }\n else if ((0, util_1.isFunction)(spacing)) {\n spacingFunc = spacing;\n }\n else {\n spacingFunc = function () { return 0; };\n }\n this.spacing = spacingFunc;\n // nodeSize to function\n if (!nodeSize) {\n nodeSizeFunc = function (d) {\n var spacing = spacingFunc(d);\n if (d.size) {\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return (res + spacing) / 2;\n }\n if ((0, util_1.isObject)(d.size)) {\n var res = d.size.width > d.size.height ? d.size.width : d.size.height;\n return (res + spacing) / 2;\n }\n return (d.size + spacing) / 2;\n }\n return 10 + spacing / 2;\n };\n }\n else if ((0, util_1.isFunction)(nodeSize)) {\n nodeSizeFunc = function (d) {\n var size = nodeSize(d);\n var spacing = spacingFunc(d);\n if ((0, util_1.isArray)(d.size)) {\n var res = d.size[0] > d.size[1] ? d.size[0] : d.size[1];\n return (res + spacing) / 2;\n }\n return ((size || 10) + spacing) / 2;\n };\n }\n else if ((0, util_1.isArray)(nodeSize)) {\n var larger = nodeSize[0] > nodeSize[1] ? nodeSize[0] : nodeSize[1];\n var radius_1 = larger / 2;\n nodeSizeFunc = function (d) { return radius_1 + spacingFunc(d) / 2; };\n }\n else {\n // number type\n var radius_2 = nodeSize / 2;\n nodeSizeFunc = function (d) { return radius_2 + spacingFunc(d) / 2; };\n }\n this.nodeSize = nodeSizeFunc;\n // comboPadding to function\n var comboPadding = self.comboPadding;\n var comboPaddingFunc;\n if ((0, util_1.isNumber)(comboPadding)) {\n comboPaddingFunc = function () { return comboPadding; };\n }\n else if ((0, util_1.isArray)(comboPadding)) {\n comboPaddingFunc = function () { return Math.max.apply(null, comboPadding); };\n }\n else if ((0, util_1.isFunction)(comboPadding)) {\n comboPaddingFunc = comboPadding;\n }\n else {\n // null type\n comboPaddingFunc = function () { return 0; };\n }\n this.comboPadding = comboPaddingFunc;\n };\n ComboCombinedLayout.prototype.getType = function () {\n return 'comboCombined';\n };\n return ComboCombinedLayout;\n}(base_1.Base));\nexports.ComboCombinedLayout = ComboCombinedLayout;\n//# sourceMappingURL=comboCombined.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// represents a body(a point mass) and its position\nvar Body = /** @class */ (function () {\n function Body(params) {\n /**\n * the id of this body, the same with the node id\n * @type {number}\n */\n this.id = params.id || 0;\n /**\n * the position of this body\n * @type {number}\n */\n this.rx = params.rx;\n /**\n * the position of this body\n * @type {number}\n */\n this.ry = params.ry;\n /**\n * the force acting on this body\n * @type {number}\n */\n this.fx = 0;\n /**\n * the force acting on this body\n * @type {number}\n */\n this.fy = 0;\n /**\n * the mass of this body, =1 for a node\n * @type {number}\n */\n this.mass = params.mass;\n /**\n * the degree of the node represented by this body\n * @type {number}\n */\n this.degree = params.degree;\n /**\n * the parameter for repulsive force, = kr\n * @type {number}\n */\n this.g = params.g || 0;\n }\n // returns the euclidean distance\n Body.prototype.distanceTo = function (bo) {\n var dx = this.rx - bo.rx;\n var dy = this.ry - bo.ry;\n return Math.hypot(dx, dy);\n };\n Body.prototype.setPos = function (x, y) {\n this.rx = x;\n this.ry = y;\n };\n // resets the forces\n Body.prototype.resetForce = function () {\n this.fx = 0;\n this.fy = 0;\n };\n Body.prototype.addForce = function (b) {\n var dx = b.rx - this.rx;\n var dy = b.ry - this.ry;\n var dist = Math.hypot(dx, dy);\n dist = dist < 0.0001 ? 0.0001 : dist;\n // the repulsive defined by force atlas 2\n var F = (this.g * (this.degree + 1) * (b.degree + 1)) / dist;\n this.fx += F * dx / dist;\n this.fy += F * dy / dist;\n };\n // if quad contains this body\n Body.prototype.in = function (quad) {\n return quad.contains(this.rx, this.ry);\n };\n // returns a new body\n Body.prototype.add = function (bo) {\n var nenwMass = this.mass + bo.mass;\n var x = (this.rx * this.mass + bo.rx * bo.mass) / nenwMass;\n var y = (this.ry * this.mass + bo.ry * bo.mass) / nenwMass;\n var dg = this.degree + bo.degree;\n var params = {\n rx: x,\n ry: y,\n mass: nenwMass,\n degree: dg\n };\n return new Body(params);\n };\n return Body;\n}());\nexports.default = Body;\n//# sourceMappingURL=body.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Quad = /** @class */ (function () {\n function Quad(params) {\n /**\n * the center position of this quad\n * @type {number}\n */\n this.xmid = params.xmid;\n /**\n * the center position of this quad\n * @type {number}\n */\n this.ymid = params.ymid;\n /**\n * the length of this quad\n * @type {number}\n */\n this.length = params.length;\n /**\n * the mass center of this quad\n * @type {number}\n */\n this.massCenter = params.massCenter || [0, 0];\n /**\n * the mass of this quad\n * @type {number}\n */\n this.mass = params.mass || 1;\n }\n Quad.prototype.getLength = function () {\n return this.length;\n };\n Quad.prototype.contains = function (x, y) {\n var halfLen = this.length / 2;\n return (x <= this.xmid + halfLen &&\n x >= this.xmid - halfLen &&\n y <= this.ymid + halfLen &&\n y >= this.ymid - halfLen);\n };\n // northwest quadrant\n // tslint:disable-next-line\n Quad.prototype.NW = function () {\n var x = this.xmid - this.length / 4;\n var y = this.ymid + this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var NW = new Quad(params);\n return NW;\n };\n // northeast\n // tslint:disable-next-line\n Quad.prototype.NE = function () {\n var x = this.xmid + this.length / 4;\n var y = this.ymid + this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var NE = new Quad(params);\n return NE;\n };\n // southwest\n // tslint:disable-next-line\n Quad.prototype.SW = function () {\n var x = this.xmid - this.length / 4;\n var y = this.ymid - this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var SW = new Quad(params);\n return SW;\n };\n // southeast\n // tslint:disable-next-line\n Quad.prototype.SE = function () {\n var x = this.xmid + this.length / 4;\n var y = this.ymid - this.length / 4;\n var len = this.length / 2;\n var params = {\n xmid: x,\n ymid: y,\n length: len\n };\n var SE = new Quad(params);\n return SE;\n };\n return Quad;\n}());\nexports.default = Quad;\n//# sourceMappingURL=quad.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @fileOverview quadTree\n * @author shiwu.wyy@antfin.com\n */\nvar QuadTree = /** @class */ (function () {\n // each quadtree represents a quadrant and an aggregate body\n // that represents all bodies inside the quadrant\n function QuadTree(param) {\n /**\n * (aggregated) body in this quad\n * @type {object}\n */\n this.body = null;\n /**\n * tree representing the northwest quadrant\n * @type {object}\n */\n this.quad = null;\n this.NW = null;\n this.NE = null;\n this.SW = null;\n this.SE = null;\n /**\n * threshold\n * @type {number}\n */\n this.theta = 0.5;\n if (param != null)\n this.quad = param;\n }\n // insert a body(node) into the tree\n QuadTree.prototype.insert = function (bo) {\n // if this node does not contain a body, put the new body bo here\n if (this.body == null) {\n this.body = bo;\n return;\n }\n // internal node\n if (!this._isExternal()) {\n // update mass info\n this.body = this.body.add(bo);\n // insert body into quadrant\n this._putBody(bo);\n }\n else { // external node\n // divide this region into four children\n if (this.quad) {\n this.NW = new QuadTree(this.quad.NW());\n this.NE = new QuadTree(this.quad.NE());\n this.SW = new QuadTree(this.quad.SW());\n this.SE = new QuadTree(this.quad.SE());\n }\n // insert this body and bo\n this._putBody(this.body);\n this._putBody(bo);\n // update the mass info\n this.body = this.body.add(bo);\n }\n };\n // inserts bo into a quad\n // tslint:disable-next-line\n QuadTree.prototype._putBody = function (bo) {\n if (!this.quad)\n return;\n if (bo.in(this.quad.NW()) && this.NW)\n this.NW.insert(bo);\n else if (bo.in(this.quad.NE()) && this.NE)\n this.NE.insert(bo);\n else if (bo.in(this.quad.SW()) && this.SW)\n this.SW.insert(bo);\n else if (bo.in(this.quad.SE()) && this.SE)\n this.SE.insert(bo);\n };\n // tslint:disable-next-line\n QuadTree.prototype._isExternal = function () {\n // four children are null\n return (this.NW == null && this.NE == null && this.SW == null && this.SE == null);\n };\n // update the forces\n QuadTree.prototype.updateForce = function (bo) {\n if (this.body == null || bo === this.body) {\n return;\n }\n // if the current node is external\n if (this._isExternal())\n bo.addForce(this.body);\n // internal nodes\n else {\n var s = this.quad ? this.quad.getLength() : 0;\n var d = this.body.distanceTo(bo);\n // b is far enough\n if ((s / d) < this.theta)\n bo.addForce(this.body);\n else {\n this.NW && this.NW.updateForce(bo);\n this.NE && this.NE.updateForce(bo);\n this.SW && this.SW.updateForce(bo);\n this.SE && this.SE.updateForce(bo);\n }\n }\n };\n return QuadTree;\n}());\nexports.default = QuadTree;\n//# sourceMappingURL=quadTree.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ForceAtlas2Layout = void 0;\nvar base_1 = require(\"../base\");\nvar util_1 = require(\"../../util\");\nvar body_1 = __importDefault(require(\"./body\"));\nvar quad_1 = __importDefault(require(\"./quad\"));\nvar quadTree_1 = __importDefault(require(\"./quadTree\"));\nvar ForceAtlas2Layout = /** @class */ (function (_super) {\n __extends(ForceAtlas2Layout, _super);\n function ForceAtlas2Layout(options) {\n var _this = _super.call(this) || this;\n /** 布局中心 */\n _this.center = [0, 0];\n /** 宽度 */\n _this.width = 300;\n /** 高度 */\n _this.height = 300;\n _this.nodes = [];\n _this.edges = [];\n /**\n * the parameter for repulsive forces,\n * it will scale the layout but won't change the layout\n * larger the kr, looser the layout\n * @type {number}\n */\n _this.kr = 5;\n /**\n * the parameter for gravity forces\n * @type {number}\n */\n _this.kg = 1;\n /**\n * modes:\n * 'normal' for normal using\n * 'linlog' for compact clusters.\n * @type {string}\n */\n _this.mode = 'normal';\n /**\n * whether preventing the node overlapping\n * @type {boolean}\n */\n _this.preventOverlap = false;\n /**\n * whether active the dissuade hub mode\n * true: grant authorities (nodes with a high indegree)\n * a more central position than hubs (nodes with a high outdegree)\n * @type {boolean}\n */\n _this.dissuadeHubs = false;\n /**\n * whether active the barnes hut optimization on computing repulsive forces\n * @type {boolean}\n */\n _this.barnesHut = undefined;\n /**\n * the max iteration number\n * @type {number}\n */\n _this.maxIteration = 0;\n /**\n * control the global velocity\n * defualt: 0.1(gephi)\n * @type {number}\n */\n _this.ks = 0.1;\n /**\n * the max global velocity\n * @type {number}\n */\n _this.ksmax = 10;\n /**\n * the tolerance for the global swinging\n * @type {number}\n */\n _this.tao = 0.1;\n /**\n * the function of layout complete listener, display the legend and minimap after layout\n * @type {function}\n */\n _this.onLayoutEnd = function () { };\n /**\n * activate prune or not.\n * prune the leaves during most iterations, layout the leaves in the last 50 iteraitons.\n * if prune === '', it will be activated when the nodes number > 100\n * note that it will reduce the quality of the layout\n * @type {boolean}\n */\n _this.prune = undefined;\n _this.updateCfg(options);\n return _this;\n }\n ForceAtlas2Layout.prototype.getDefaultCfg = function () {\n return {};\n };\n // execute the layout\n ForceAtlas2Layout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes, onLayoutEnd = self.onLayoutEnd, prune = self.prune;\n var maxIteration = self.maxIteration;\n if (!self.width && typeof window !== \"undefined\") {\n self.width = window.innerWidth;\n }\n if (!self.height && typeof window !== \"undefined\") {\n self.height = window.innerHeight;\n }\n // the whidth of each nodes\n var sizes = [];\n var nodeNum = nodes.length;\n for (var i = 0; i < nodeNum; i += 1) {\n var node = nodes[i];\n var nodeWidth = 10;\n var nodeHeight = 10;\n if ((0, util_1.isNumber)(node.size)) {\n nodeWidth = node.size;\n nodeHeight = node.size;\n }\n if ((0, util_1.isArray)(node.size)) {\n if (!isNaN(node.size[0]))\n nodeWidth = node.size[0];\n if (!isNaN(node.size[1]))\n nodeHeight = node.size[1];\n }\n else if ((0, util_1.isObject)(node.size)) {\n nodeWidth = node.size.width;\n nodeHeight = node.size.height;\n }\n if (self.getWidth && !isNaN(self.getWidth(node)))\n nodeHeight = self.getWidth(node);\n if (self.getHeight && !isNaN(self.getHeight(node)))\n nodeWidth = self.getHeight(node);\n var maxSize = Math.max(nodeWidth, nodeHeight);\n sizes.push(maxSize);\n }\n if (self.barnesHut === undefined && nodeNum > 250)\n self.barnesHut = true;\n if (self.prune === undefined && nodeNum > 100)\n self.prune = true;\n if (this.maxIteration === 0 && !self.prune) {\n maxIteration = 250;\n if (nodeNum <= 200 && nodeNum > 100)\n maxIteration = 1000;\n else if (nodeNum > 200)\n maxIteration = 1200;\n this.maxIteration = maxIteration;\n }\n else if (this.maxIteration === 0 && prune) {\n maxIteration = 100;\n if (nodeNum <= 200 && nodeNum > 100)\n maxIteration = 500;\n else if (nodeNum > 200)\n maxIteration = 950;\n this.maxIteration = maxIteration;\n }\n if (!self.kr) {\n self.kr = 50;\n if (nodeNum > 100 && nodeNum <= 500)\n self.kr = 20;\n else if (nodeNum > 500)\n self.kr = 1;\n }\n if (!self.kg) {\n self.kg = 20;\n if (nodeNum > 100 && nodeNum <= 500)\n self.kg = 10;\n else if (nodeNum > 500)\n self.kg = 1;\n }\n this.nodes = self.updateNodesByForces(sizes);\n onLayoutEnd();\n };\n ForceAtlas2Layout.prototype.updateNodesByForces = function (sizes) {\n var self = this;\n var edges = self.edges, maxIteration = self.maxIteration;\n var nodes = self.nodes;\n var nonLoopEdges = edges.filter(function (edge) {\n var source = (0, util_1.getEdgeTerminal)(edge, 'source');\n var target = (0, util_1.getEdgeTerminal)(edge, 'target');\n return source !== target;\n });\n var size = nodes.length;\n var esize = nonLoopEdges.length;\n var degrees = [];\n var idMap = {};\n var edgeEndsIdMap = {};\n // tslint:disable-next-line\n var Es = [];\n for (var i = 0; i < size; i += 1) {\n idMap[nodes[i].id] = i;\n degrees[i] = 0;\n if (nodes[i].x === undefined || isNaN(nodes[i].x)) {\n nodes[i].x = Math.random() * 1000;\n }\n if (nodes[i].y === undefined || isNaN(nodes[i].y)) {\n nodes[i].y = Math.random() * 1000;\n }\n Es.push({ x: nodes[i].x, y: nodes[i].y });\n }\n for (var i = 0; i < esize; i += 1) {\n var node1 = void 0;\n var node2 = void 0;\n var sIdx = 0;\n var tIdx = 0;\n for (var j = 0; j < size; j += 1) {\n var source = (0, util_1.getEdgeTerminal)(nonLoopEdges[i], 'source');\n var target = (0, util_1.getEdgeTerminal)(nonLoopEdges[i], 'target');\n if (nodes[j].id === source) {\n node1 = nodes[j];\n sIdx = j;\n }\n else if (nodes[j].id === target) {\n node2 = nodes[j];\n tIdx = j;\n }\n edgeEndsIdMap[i] = { sourceIdx: sIdx, targetIdx: tIdx };\n }\n if (node1)\n degrees[idMap[node1.id]] += 1;\n if (node2)\n degrees[idMap[node2.id]] += 1;\n }\n var iteration = maxIteration;\n nodes = this.iterate(iteration, idMap, edgeEndsIdMap, esize, degrees, sizes);\n // if prune, place the leaves around their parents, and then re-layout for several iterations.\n if (self.prune) {\n for (var j = 0; j < esize; j += 1) {\n if (degrees[edgeEndsIdMap[j].sourceIdx] <= 1) {\n nodes[edgeEndsIdMap[j].sourceIdx].x = nodes[edgeEndsIdMap[j].targetIdx].x;\n nodes[edgeEndsIdMap[j].sourceIdx].y = nodes[edgeEndsIdMap[j].targetIdx].y;\n }\n else if (degrees[edgeEndsIdMap[j].targetIdx] <= 1) {\n nodes[edgeEndsIdMap[j].targetIdx].x = nodes[edgeEndsIdMap[j].sourceIdx].x;\n nodes[edgeEndsIdMap[j].targetIdx].y = nodes[edgeEndsIdMap[j].sourceIdx].y;\n }\n }\n self.prune = false;\n self.barnesHut = false;\n iteration = 100;\n nodes = this.iterate(iteration, idMap, edgeEndsIdMap, esize, degrees, sizes);\n }\n return nodes;\n };\n ForceAtlas2Layout.prototype.iterate = function (iteration, idMap, edgeEndsIdMap, esize, degrees, sizes) {\n var self = this;\n var nodes = self.nodes;\n var kr = self.kr, preventOverlap = self.preventOverlap;\n var barnesHut = self.barnesHut;\n var nodeNum = nodes.length;\n var sg = 0;\n var krPrime = 100;\n var iter = iteration;\n var prevoIter = 50;\n var forces = [];\n var preForces = [];\n var bodies = [];\n for (var i = 0; i < nodeNum; i += 1) {\n forces[2 * i] = 0;\n forces[2 * i + 1] = 0;\n if (barnesHut) {\n var params = {\n id: i,\n rx: nodes[i].x,\n ry: nodes[i].y,\n mass: 1,\n g: kr,\n degree: degrees[i]\n };\n bodies[i] = new body_1.default(params);\n }\n }\n while (iter > 0) {\n for (var i = 0; i < nodeNum; i += 1) {\n preForces[2 * i] = forces[2 * i];\n preForces[2 * i + 1] = forces[2 * i + 1];\n forces[2 * i] = 0;\n forces[2 * i + 1] = 0;\n }\n // attractive forces, existing on every actual edge\n forces = this.getAttrForces(iter, prevoIter, esize, idMap, edgeEndsIdMap, degrees, sizes, forces);\n // repulsive forces and Gravity, existing on every node pair\n // if preventOverlap, using the no-optimized method in the last prevoIter instead.\n if (barnesHut && ((preventOverlap && iter > prevoIter) || !preventOverlap)) {\n forces = this.getOptRepGraForces(forces, bodies, degrees);\n }\n else {\n forces = this.getRepGraForces(iter, prevoIter, forces, krPrime, sizes, degrees);\n }\n // update the positions\n var res = this.updatePos(forces, preForces, sg, degrees);\n nodes = res.nodes;\n sg = res.sg;\n iter--;\n if (self.tick)\n self.tick();\n }\n return nodes;\n };\n ForceAtlas2Layout.prototype.getAttrForces = function (iter, prevoIter, esize, idMap, edgeEndsIdMap, degrees, sizes, forces) {\n var self = this;\n var nodes = self.nodes, preventOverlap = self.preventOverlap, dissuadeHubs = self.dissuadeHubs, mode = self.mode, prune = self.prune;\n for (var i = 0; i < esize; i += 1) {\n var sourceNode = nodes[edgeEndsIdMap[i].sourceIdx];\n var sourceIdx = edgeEndsIdMap[i].sourceIdx;\n var targetNode = nodes[edgeEndsIdMap[i].targetIdx];\n var targetIdx = edgeEndsIdMap[i].targetIdx;\n if (prune && (degrees[sourceIdx] <= 1 || degrees[targetIdx] <= 1))\n continue;\n var dir = [targetNode.x - sourceNode.x, targetNode.y - sourceNode.y];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n eucliDis = eucliDis < 0.0001 ? 0.0001 : eucliDis;\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n if (preventOverlap && iter < prevoIter)\n eucliDis = eucliDis - sizes[sourceIdx] - sizes[targetIdx];\n var Fa1 = eucliDis; // tslint:disable-line\n var Fa2 = Fa1; // tslint:disable-line\n if (mode === 'linlog') {\n Fa1 = Math.log(1 + eucliDis);\n Fa2 = Fa1;\n }\n if (dissuadeHubs) {\n Fa1 = eucliDis / degrees[sourceIdx];\n Fa2 = eucliDis / degrees[targetIdx];\n }\n if (preventOverlap && iter < prevoIter && eucliDis <= 0) {\n Fa1 = 0;\n Fa2 = 0;\n }\n else if (preventOverlap && iter < prevoIter && eucliDis > 0) {\n Fa1 = eucliDis;\n Fa2 = eucliDis;\n }\n forces[2 * idMap[sourceNode.id]] += Fa1 * dir[0];\n forces[2 * idMap[targetNode.id]] -= Fa2 * dir[0];\n forces[2 * idMap[sourceNode.id] + 1] += Fa1 * dir[1];\n forces[2 * idMap[targetNode.id] + 1] -= Fa2 * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.getRepGraForces = function (iter, prevoIter, forces, krPrime, sizes, degrees) {\n var self = this;\n var nodes = self.nodes, preventOverlap = self.preventOverlap, kr = self.kr, kg = self.kg, center = self.center, prune = self.prune;\n var nodeNum = nodes.length;\n for (var i = 0; i < nodeNum; i += 1) {\n for (var j = i + 1; j < nodeNum; j += 1) {\n if (prune && (degrees[i] <= 1 || degrees[j] <= 1))\n continue;\n var dir_1 = [nodes[j].x - nodes[i].x, nodes[j].y - nodes[i].y];\n var eucliDis_1 = Math.hypot(dir_1[0], dir_1[1]);\n eucliDis_1 = eucliDis_1 < 0.0001 ? 0.0001 : eucliDis_1;\n dir_1[0] = dir_1[0] / eucliDis_1;\n dir_1[1] = dir_1[1] / eucliDis_1;\n if (preventOverlap && iter < prevoIter)\n eucliDis_1 = eucliDis_1 - sizes[i] - sizes[j];\n var Fr = kr * (degrees[i] + 1) * (degrees[j] + 1) / eucliDis_1; // tslint:disable-line\n if (preventOverlap && iter < prevoIter && eucliDis_1 < 0) {\n Fr = krPrime * (degrees[i] + 1) * (degrees[j] + 1);\n }\n else if (preventOverlap && iter < prevoIter && eucliDis_1 === 0) {\n Fr = 0;\n }\n else if (preventOverlap && iter < prevoIter && eucliDis_1 > 0) {\n Fr = kr * (degrees[i] + 1) * (degrees[j] + 1) / eucliDis_1;\n }\n forces[2 * i] -= Fr * dir_1[0];\n forces[2 * j] += Fr * dir_1[0];\n forces[2 * i + 1] -= Fr * dir_1[1];\n forces[2 * j + 1] += Fr * dir_1[1];\n }\n // gravity\n var dir = [nodes[i].x - center[0], nodes[i].y - center[1]];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n var Fg = kg * (degrees[i] + 1); // tslint:disable-line\n forces[2 * i] -= Fg * dir[0];\n forces[2 * i + 1] -= Fg * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.getOptRepGraForces = function (forces, bodies, degrees) {\n var self = this;\n var nodes = self.nodes, kg = self.kg, center = self.center, prune = self.prune;\n var nodeNum = nodes.length;\n var minx = 9e10;\n var maxx = -9e10;\n var miny = 9e10;\n var maxy = -9e10;\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n bodies[i].setPos(nodes[i].x, nodes[i].y);\n if (nodes[i].x >= maxx)\n maxx = nodes[i].x;\n if (nodes[i].x <= minx)\n minx = nodes[i].x;\n if (nodes[i].y >= maxy)\n maxy = nodes[i].y;\n if (nodes[i].y <= miny)\n miny = nodes[i].y;\n }\n var width = Math.max(maxx - minx, maxy - miny);\n var quadParams = {\n xmid: (maxx + minx) / 2,\n ymid: (maxy + miny) / 2,\n length: width,\n massCenter: center,\n mass: nodeNum\n };\n var quad = new quad_1.default(quadParams);\n var quadTree = new quadTree_1.default(quad);\n // build the tree, insert the nodes(quads) into the tree\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n if (bodies[i].in(quad))\n quadTree.insert(bodies[i]);\n }\n // update the repulsive forces and the gravity.\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n bodies[i].resetForce();\n quadTree.updateForce(bodies[i]);\n forces[2 * i] -= bodies[i].fx;\n forces[2 * i + 1] -= bodies[i].fy;\n // gravity\n var dir = [nodes[i].x - center[0], nodes[i].y - center[1]];\n var eucliDis = Math.hypot(dir[0], dir[1]);\n eucliDis = eucliDis < 0.0001 ? 0.0001 : eucliDis;\n dir[0] = dir[0] / eucliDis;\n dir[1] = dir[1] / eucliDis;\n var Fg = kg * (degrees[i] + 1); // tslint:disable-line\n forces[2 * i] -= Fg * dir[0];\n forces[2 * i + 1] -= Fg * dir[1];\n }\n return forces;\n };\n ForceAtlas2Layout.prototype.updatePos = function (forces, preForces, sg, degrees) {\n var self = this;\n var nodes = self.nodes, ks = self.ks, tao = self.tao, prune = self.prune, ksmax = self.ksmax;\n var nodeNum = nodes.length;\n var swgns = [];\n var trans = [];\n // swg(G) and tra(G)\n var swgG = 0;\n var traG = 0;\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n var minus = [forces[2 * i] - preForces[2 * i],\n forces[2 * i + 1] - preForces[2 * i + 1]\n ];\n var minusNorm = Math.hypot(minus[0], minus[1]);\n var add = [forces[2 * i] + preForces[2 * i],\n forces[2 * i + 1] + preForces[2 * i + 1]\n ];\n var addNorm = Math.hypot(add[0], add[1]);\n swgns[i] = minusNorm;\n trans[i] = addNorm / 2;\n swgG += (degrees[i] + 1) * swgns[i];\n traG += (degrees[i] + 1) * trans[i];\n }\n var preSG = sg;\n sg = tao * traG / swgG; // tslint:disable-line\n if (preSG !== 0) {\n sg = sg > (1.5 * preSG) ? (1.5 * preSG) : sg; // tslint:disable-line\n }\n // update the node positions\n for (var i = 0; i < nodeNum; i += 1) {\n if (prune && (degrees[i] <= 1))\n continue;\n if ((0, util_1.isNumber)(nodes[i].fx) && (0, util_1.isNumber)(nodes[i].fy))\n continue;\n var sn = ks * sg / (1 + sg * Math.sqrt(swgns[i]));\n var absForce = Math.hypot(forces[2 * i], forces[2 * i + 1]);\n absForce = absForce < 0.0001 ? 0.0001 : absForce;\n var max = ksmax / absForce;\n sn = sn > max ? max : sn;\n var dnx = sn * forces[2 * i];\n var dny = sn * forces[2 * i + 1];\n nodes[i].x += dnx;\n nodes[i].y += dny;\n }\n return { nodes: nodes, sg: sg };\n };\n return ForceAtlas2Layout;\n}(base_1.Base));\nexports.ForceAtlas2Layout = ForceAtlas2Layout;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Grid = /** @class */ (function () {\n function Grid() {\n this.cells = [];\n this.columnNum = 0;\n this.rowNum = 0;\n this.additionColumn = [];\n this.additionRow = [];\n }\n Grid.prototype.init = function (width, height, gridSize) {\n this.cells = [];\n this.CELL_W = gridSize.CELL_W || Grid.DEFAULT_CELL_W;\n this.CELL_H = gridSize.CELL_H || Grid.DEFAULT_CELL_H;\n this.columnNum = Math.ceil(width / this.CELL_W);\n this.rowNum = Math.ceil(height / this.CELL_H);\n Grid.MIN_DIST = Math.pow(width, 2) + Math.pow(height, 2);\n for (var i = 0; i < this.columnNum; i++) {\n var tmp = [];\n for (var j = 0; j < this.rowNum; j++) {\n var cell = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false\n };\n tmp.push(cell);\n }\n this.cells.push(tmp);\n }\n };\n Grid.prototype.findGridByNodeId = function (nodeId) {\n var _a, _b;\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (this.cells[i][j].node) {\n if (((_b = (_a = this.cells[i][j]) === null || _a === void 0 ? void 0 : _a.node) === null || _b === void 0 ? void 0 : _b.id) === nodeId) {\n return { column: i, row: j };\n }\n }\n }\n }\n return null;\n };\n Grid.prototype.sqdist = function (a, b) {\n return Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2);\n };\n Grid.prototype.occupyNearest = function (p) {\n var minDist = Grid.MIN_DIST;\n var d;\n var candidate = null;\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (!this.cells[i][j].occupied && (d = this.sqdist(p, this.cells[i][j])) < minDist) {\n minDist = d;\n candidate = this.cells[i][j];\n }\n }\n }\n if (candidate) {\n candidate.occupied = true;\n }\n return candidate;\n };\n Grid.prototype.insertColumn = function (columnIndex, length) {\n if (length <= 0)\n return;\n // 插入空列\n for (var i = 0; i < length; i++) {\n this.cells[i + this.columnNum] = [];\n for (var j = 0; j < this.rowNum; j++) {\n this.cells[i + this.columnNum][j] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 交换数据\n for (var i = (this.columnNum - 1); i > columnIndex; i--) {\n for (var j = 0; j < this.rowNum; j++) {\n this.cells[i + length][j] = __assign(__assign({}, this.cells[i][j]), { x: (i + length) * this.CELL_W, y: j * this.CELL_H });\n this.cells[i][j] = {\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: true,\n node: null,\n };\n }\n }\n // 已有行列的处理\n for (var j = 0; j < this.additionColumn.length; j++) {\n if (this.additionColumn[j] >= columnIndex) {\n this.additionColumn[j] += length;\n }\n }\n // 记录新增的行列\n for (var i = 0; i < length; i++) {\n this.additionColumn.push(columnIndex + i + 1);\n }\n this.columnNum += length;\n };\n Grid.prototype.insertRow = function (rowIndex, length) {\n if (length <= 0)\n return;\n // 插入空行\n for (var j = 0; j < length; j++) {\n for (var i = 0; i < this.columnNum; i++) {\n this.cells[i][j + this.rowNum] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 交换数据\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = (this.rowNum - 1); j > rowIndex; j--) {\n this.cells[i][j + length] = __assign(__assign({}, this.cells[i][j]), { dx: i, dy: j + length, x: i * this.CELL_W, y: (j + length) * this.CELL_H });\n this.cells[i][j] = {\n dx: i,\n dy: j,\n x: i * this.CELL_W,\n y: j * this.CELL_H,\n occupied: false,\n node: null,\n };\n }\n }\n // 已有行列的处理\n for (var j = 0; j < this.additionRow.length; j++) {\n if (this.additionRow[j] >= rowIndex) {\n this.additionRow[j] += length;\n }\n }\n // 记录新增的行列\n for (var i = 0; i < length; i++) {\n this.additionRow.push(rowIndex + i + 1);\n }\n this.rowNum += length;\n };\n Grid.prototype.getNodes = function () {\n var nodes = [];\n for (var i = 0; i < this.columnNum; i++) {\n for (var j = 0; j < this.rowNum; j++) {\n if (this.cells[i][j].node) {\n nodes.push(this.cells[i][j]);\n }\n }\n }\n return nodes;\n };\n Grid.MIN_DIST = 50;\n Grid.DEFAULT_CELL_W = 80;\n Grid.DEFAULT_CELL_H = 80;\n return Grid;\n}());\nexports.default = Grid;\n//# sourceMappingURL=grid.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar grid_1 = __importDefault(require(\"./grid\"));\nfunction layout(data, options) {\n if (!data.nodes || data.nodes.length === 0)\n return data;\n var width = options.width;\n var height = options.height;\n var nodeMinGap = options.nodeMinGap;\n // 2. 网格布局\n var CELL_W = 10000;\n var CELL_H = 10000;\n data.nodes.forEach(function (node) {\n var nodeWidth = node.size[0] || 50;\n var nodeHeight = node.size[1] || 50;\n CELL_W = Math.min(nodeWidth, CELL_W);\n CELL_H = Math.min(nodeHeight, CELL_H);\n });\n var grid = new grid_1.default();\n grid.init(width, height, {\n CELL_H: CELL_H,\n CELL_W: CELL_W,\n });\n data.nodes.forEach(function (d) {\n var gridpoint = grid.occupyNearest(d);\n if (gridpoint) {\n gridpoint.node = {\n id: d.id,\n size: d.size,\n };\n d.x = gridpoint.x;\n d.y = gridpoint.y;\n d.dx = gridpoint.dx;\n d.dy = gridpoint.dy;\n }\n });\n // 加入节点size\n for (var i = 0; i < data.nodes.length; i++) {\n // 节点宽度大于网格宽度,则往当前网格的右边插入列\n var node = data.nodes[i];\n var result = grid.findGridByNodeId(node.id);\n if (!result)\n throw new Error(\"can not find node cell\");\n var column = result.column, row = result.row;\n if ((node.size[0] + nodeMinGap) > CELL_W) {\n var addGridSize = Math.ceil((node.size[0] + nodeMinGap) / CELL_W) - 1;\n var realAdd = addGridSize;\n // 优化,假设同一列,不同行存在两个size为2的节点,遍历到第一个节点的时候,会往右插入两列,遍历到第二个节点,又往右插入。就会导致多余的网格\n for (var j = 0; j < addGridSize; j++) {\n var hasColumn = grid.additionColumn.indexOf(column + j + 1) > -1;\n if (hasColumn && !grid.cells[column + j + 1][row].node) {\n realAdd--;\n }\n else {\n break;\n }\n }\n grid.insertColumn(column, realAdd);\n }\n // 节点高度大于网格宽度,则往当前网格的下边插入行\n if ((node.size[1] + nodeMinGap) > CELL_H) {\n var addGridSize = Math.ceil((node.size[1] + nodeMinGap) / CELL_H) - 1;\n var realAdd = addGridSize;\n for (var j = 0; j < addGridSize; j++) {\n var hasColumn = grid.additionRow.indexOf(row + j + 1) > -1;\n if (hasColumn && !grid.cells[column][row + j + 1].node) {\n realAdd--;\n }\n else {\n break;\n }\n }\n grid.insertRow(row, realAdd);\n }\n }\n // 同步节点坐标\n for (var i = 0; i < grid.columnNum; i++) {\n var _loop_1 = function (j) {\n var cell = grid.cells[i][j];\n if (cell.node) {\n var node = data.nodes.find(function (node) { var _a; return node.id === ((_a = cell === null || cell === void 0 ? void 0 : cell.node) === null || _a === void 0 ? void 0 : _a.id); });\n if (node) {\n node.x = cell.x + node.size[0] / 2;\n node.y = cell.y + node.size[1] / 2;\n }\n }\n };\n for (var j = 0; j < grid.rowNum; j++) {\n _loop_1(j);\n }\n }\n}\nexports.default = layout;\n//# sourceMappingURL=forceGrid.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar graphWidth = 1200;\nvar graphHeight = 800;\nvar OVERLAP_QUOT = 10000000;\nvar MIN_DIST = 10;\nvar M_PI = 3.14159265358979323846;\nvar M_PI_2 = 1.57079632679489661923;\nvar PI_38 = M_PI * 0.375;\nvar PI_58 = M_PI * 0.625;\nvar nodeEdgeMap = new Map();\nvar CELL_W = 10;\nvar CELL_H = 10;\nvar T = 0.8;\nvar T_MIN = 0.1;\nvar R = 0.5;\nfunction distanceToNode(node1, node2, isHoriz) {\n var x11 = node1.x - node1.size[0] / 2;\n var y11 = node1.y - node1.size[1] / 2;\n var x12 = node1.x + node1.size[0] / 2;\n var y12 = node1.y + node1.size[1] / 2;\n var x21 = node2.x - node2.size[0] / 2;\n var y21 = node2.y - node2.size[1] / 2;\n var x22 = node2.x + node2.size[0] / 2;\n var y22 = node2.y + node2.size[1] / 2;\n var cx1 = node1.x;\n var cy1 = node1.y;\n var cx2 = node2.x;\n var cy2 = node2.y;\n var dcx = cx2 - cx1;\n // 两个节点间的方位角 \n var qr = Math.atan2(dcx, (cy2 - cy1));\n var dx = 0;\n var dy = 0;\n var l1 = 0;\n var l2 = 0;\n if (qr > M_PI_2) {\n dy = y11 - y22;\n dx = x21 - x12;\n l1 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n else if (0.0 < qr && qr <= M_PI_2) {\n dy = y21 - y12;\n dx = x21 - x12;\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n else if (qr < -M_PI_2) {\n dy = y11 - y22;\n dx = -(x22 - x11);\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat(dx ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n else {\n dy = y21 - y12;\n if (Math.abs(dcx) > (x12 - x11) / 2) {\n dx = x11 - x22;\n }\n else {\n dx = dcx;\n }\n if (dy > dx) {\n l1 = l2 = parseFloat(dy ? (dy / Math.cos(qr)).toFixed(2) : (dx).toFixed(2));\n }\n else {\n l1 = l2 = parseFloat((dx && qr !== 0.0) ? (dx / Math.sin(qr)).toFixed(2) : (dy).toFixed(2));\n }\n }\n var aqr = parseFloat(qr.toFixed(2));\n // 判断是否水平,角度\n var newHoriz = isHoriz;\n if (isHoriz) {\n newHoriz = PI_38 < aqr && aqr < PI_58;\n }\n return {\n distance: Math.abs(l1 < l2 ? l1 : l2),\n isHoriz: newHoriz,\n };\n}\nfunction calcNodePair(nodeA, nodeB) {\n // 确定两个节点间是否存在连线\n var edges = nodeEdgeMap.get(nodeA.id) || [];\n var isLinked = edges.find(function (edge) {\n return edge.source === nodeB.id || edge.target === nodeB.id;\n });\n var areaA = nodeA.size[0] * nodeA.size[1];\n var areaB = nodeB.size[0] * nodeB.size[1];\n var node1 = areaA > areaB ? nodeB : nodeA;\n var node2 = areaA > areaB ? nodeA : nodeB;\n var x11 = node1.x - node1.size[0] / 2;\n var y11 = node1.y - node1.size[1] / 2;\n var x12 = node1.x + node1.size[0] / 2;\n var y12 = node1.y + node1.size[1] / 2;\n var x21 = node2.x - node2.size[0] / 2;\n var y21 = node2.y - node2.size[1] / 2;\n var x22 = node2.x + node2.size[0] / 2;\n var y22 = node2.y + node2.size[1] / 2;\n var cx1 = node1.x;\n var cy1 = node1.y;\n var cx2 = node2.x;\n var cy2 = node2.y;\n // Detect if nodes overlap 检查节点之间是否存在覆盖问题\n var isoverlap = ((x12 >= x21) && (x22 >= x11) && (y12 >= y21) && (y22 >= y11));\n var e = 0;\n var distance = 0;\n if (isoverlap) {\n distance = Math.sqrt(Math.pow((cx2 - cx1), 2) + Math.pow((cy2 - cy1), 2));\n // calc area of overlap 计算重复区域的坐标和面积\n var sx1 = x11 > x21 ? x11 : x21;\n var sy1 = y11 > y21 ? y11 : y21;\n var sx2 = x12 < x22 ? x12 : x22;\n var sy2 = y12 < y22 ? y12 : y22;\n var dsx = sx2 - sx1;\n var dsy = sy2 - sy1;\n var sov = dsx * dsy;\n if (distance === 0.0) {\n distance = 0.0000001;\n }\n e = MIN_DIST * 1 / distance * 100 + sov;\n e *= OVERLAP_QUOT;\n }\n else {\n var isHoriz = false;\n var res = distanceToNode(node1, node2, isHoriz);\n distance = res.distance;\n isHoriz = res.isHoriz;\n if (distance <= MIN_DIST) {\n if (distance !== 0) {\n if (isLinked) {\n e += MIN_DIST + OVERLAP_QUOT * 1 / distance;\n }\n else {\n e += MIN_DIST + OVERLAP_QUOT * MIN_DIST / distance;\n }\n }\n else {\n e += OVERLAP_QUOT;\n }\n }\n else {\n e += distance;\n if (isLinked) {\n e += distance * distance;\n }\n }\n }\n return e;\n}\nfunction calcEnergy(nodes) {\n var energy = 0;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n if ((node.x < 0) || (node.y < 0) || (node.x > graphWidth) || (node.y > graphHeight)) {\n energy += 1000000000000;\n }\n for (var j = i + 1; j < nodes.length; j++) {\n energy += calcNodePair(node, nodes[j]);\n }\n }\n return energy;\n}\nfunction isCorrectPosition(node, newPosition, nodes, edges) {\n var nodeIdxMap = new Map();\n nodes.forEach(function (o, i) {\n nodeIdxMap.set(o.id, o);\n });\n var relateEdges = edges.filter(function (edge) { return edge.source === node.id || edge.target === node.id; }) || [];\n var relateNodes = [];\n relateEdges.forEach(function (edge) {\n var otherNodeId = edge.source === node.id ? edge.target : edge.source;\n var otherNode = nodeIdxMap.get(otherNodeId);\n if (otherNode) {\n relateNodes.push(otherNode);\n }\n });\n var flag = true;\n for (var i = 0; i < relateNodes.length; i++) {\n var item = relateNodes[i];\n // 判断条件调整,节点的坐标不需要完全一致。可以根据节点间的夹角来判断\n var delta = Math.atan((node.y - item.y) / (item.x - node.y)) * 180;\n var newDelta = Math.atan((newPosition.y - item.y) / (item.x - newPosition.y)) * 180;\n var isHor = delta < 30 || delta > 150;\n var newIsHor = newDelta < 30 || newDelta > 150;\n var isVer = delta > 70 && delta < 110;\n var newIsVer = newDelta > 70 && newDelta < 110;\n // 定义四个相似角度区间,0-15度,75-90度,90到105度,165到180度。\n if (isHor && !newIsHor || ((delta * newDelta) < 0)) {\n flag = false;\n break;\n }\n else if (isVer && !newIsVer || ((delta * newDelta) < 0)) {\n flag = false;\n break;\n }\n else if ((item.x - node.x) * (item.x - newPosition.x) < 0) {\n flag = false;\n break;\n }\n else if ((item.y - node.y) * (item.y - newPosition.y) < 0) {\n flag = false;\n break;\n }\n }\n return flag;\n}\nfunction shuffle(nodes, edges) {\n var foundSmallerEnergy = false;\n // 多次测试发现step为1时的效果最佳。\n var step = 1;\n var wstep = CELL_W * step;\n var hstep = CELL_H * step;\n var wsteps = [wstep, -wstep, 0, 0,];\n var hsteps = [0, 0, hstep, -hstep,];\n for (var i = 0; i < nodes.length; ++i) {\n var node = nodes[i];\n var nodeEnergy = calcNodeEnergy(node, nodes);\n for (var ns = 0; ns < wsteps.length; ns++) {\n // 判断新位置与其他连线节点的位置关系是否违规\n var flag = isCorrectPosition(node, { x: node.x + wsteps[ns], y: node.y + hsteps[ns] }, nodes, edges);\n if (flag) {\n // 节点朝上下左右四个方向移动,找到能量最小的那个位置\n node.x += wsteps[ns];\n node.y += hsteps[ns];\n // 计算移动后节点的能量\n var energy = calcNodeEnergy(node, nodes);\n var rdm = Math.random();\n if (energy < nodeEnergy) {\n nodeEnergy = energy;\n foundSmallerEnergy = true;\n }\n else if (rdm < T && rdm > T_MIN) {\n nodeEnergy = energy;\n foundSmallerEnergy = true;\n }\n else {\n // 回归原位\n node.x -= wsteps[ns];\n node.y -= hsteps[ns];\n }\n }\n }\n }\n if (T > T_MIN) {\n T *= R;\n }\n // 重新计算图整体的能量\n if (foundSmallerEnergy) {\n return calcEnergy(nodes);\n }\n return 0;\n}\n// 计算节点的能量,\nfunction calcNodeEnergy(node, nodes) {\n var e = 0.0;\n if ((node.x < 0) || (node.y < 0) ||\n (node.x + node.size[0] + 20 > graphWidth) ||\n (node.y + node.size[1] + 20 > graphHeight)) {\n e += 1000000000000.0;\n }\n for (var i = 0; i < nodes.length; ++i) {\n if (node.id !== nodes[i].id) {\n e += calcNodePair(node, nodes[i]);\n }\n }\n return e;\n}\nfunction layout(nodes, edges) {\n if (nodes.length === 0) {\n return { nodes: nodes, edges: edges };\n }\n nodes.forEach(function (node) {\n var relateEdge = edges.filter(function (edge) { return edge.source === node.id || edge.target === node.id; });\n nodeEdgeMap.set(node, relateEdge);\n });\n // 1. 初始化\n // 将node按照连接数进行排序\n nodes.sort(function (node1, node2) {\n var _a, _b;\n return ((_a = nodeEdgeMap.get(node1.id)) === null || _a === void 0 ? void 0 : _a.length) - ((_b = nodeEdgeMap.get(node2.id)) === null || _b === void 0 ? void 0 : _b.length);\n });\n // 2. 计算图能量\n var minEnergy = calcEnergy(nodes);\n var deSameCount = 20; // de=0 count\n var de = 1; // energy delta\n var prevEnergy = 0;\n // 定义总的迭代次数。超过就停掉,防止死循环\n var MAX_COUNT = 50;\n var count = 0;\n while (deSameCount > 0) {\n count++;\n if (count >= MAX_COUNT) {\n break;\n }\n var ea = shuffle(nodes, edges);\n if (ea !== 0) {\n prevEnergy = ea;\n }\n de = prevEnergy - minEnergy;\n minEnergy = prevEnergy;\n if (de === 0) {\n --deSameCount;\n }\n else {\n deSameCount = 20;\n }\n }\n nodes.forEach(function (node) {\n node.x = node.x - node.size[0] / 2;\n node.y = node.y - node.size[1] / 2;\n });\n return {\n nodes: nodes,\n edges: edges,\n };\n}\nexports.default = layout;\n//# sourceMappingURL=mysqlWorkbench.js.map","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar d3Force = __importStar(require(\"d3-force\"));\nvar forceGrid_1 = __importDefault(require(\"./forceGrid\"));\nvar mysqlWorkbench_1 = __importDefault(require(\"./mysqlWorkbench\"));\nvar dagre_1 = require(\"../dagre\");\nfunction layout(data, options) {\n var nodes = data.nodes, edges = data.edges;\n var width = options.width;\n var height = options.height;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return Promise.resolve();\n // 筛选非叶子节点,做Dagre布局\n var noLeafNodes = [];\n nodes.forEach(function (node) {\n var relateEdges = edges.filter(function (edge) {\n return edge.source === node.id || edge.target === node.id;\n });\n if (relateEdges.length > 1) {\n var temp = __assign({}, node);\n delete temp.size;\n noLeafNodes.push(temp);\n }\n });\n var noLeafEdge = [];\n edges.forEach(function (edge) {\n var sourceNode = noLeafNodes.find(function (node) { return node.id === edge.source; });\n var targetNode = noLeafNodes.find(function (node) { return node.id === edge.target; });\n if (sourceNode && targetNode) {\n noLeafEdge.push(edge);\n }\n });\n var graphLayout = new dagre_1.DagreLayout({\n type: 'dagre',\n ranksep: options.nodeMinGap,\n nodesep: options.nodeMinGap,\n });\n var nodesTmp = graphLayout.layout({\n nodes: noLeafNodes,\n edges: noLeafEdge,\n }).nodes;\n // 布局后,坐标同步\n nodes.forEach(function (n) {\n var found = (nodesTmp || []).find(function (temp) { return temp.id === n.id; });\n n.x = (found === null || found === void 0 ? void 0 : found.x) || width / 2;\n n.y = (found === null || found === void 0 ? void 0 : found.y) || height / 2;\n });\n var copyNodes = JSON.parse(JSON.stringify(nodes));\n var copyEdges = JSON.parse(JSON.stringify(edges));\n var simulation = d3Force.forceSimulation().nodes(copyNodes)\n .force(\"link\", d3Force.forceLink(copyEdges).id(function (d) { return d.id; }).distance(function (d) {\n var edgeInfo = noLeafEdge.find(function (edge) { return edge.source === d.source && edge.target === d.target; });\n if (edgeInfo) {\n return 30;\n }\n return 20;\n }))\n .force(\"charge\", d3Force.forceManyBody())\n .force(\"center\", d3Force.forceCenter(width / 2, height / 2))\n .force(\"x\", d3Force.forceX(width / 2))\n .force(\"y\", d3Force.forceY(height / 2))\n .alpha(0.3)\n .alphaDecay(0.08)\n .alphaMin(0.001);\n var layoutPromise = new Promise(function (resolve) {\n simulation.on('end', function () {\n // 坐标信息同步到nodes,edges中\n nodes.forEach(function (node) {\n var nodeInfo = copyNodes.find(function (item) { return item.id === node.id; });\n if (nodeInfo) {\n node.x = nodeInfo.x;\n node.y = nodeInfo.y;\n }\n });\n var minX = Math.min.apply(Math, nodes.map(function (node) { return node.x; }));\n var maxX = Math.max.apply(Math, nodes.map(function (node) { return node.x; }));\n var minY = Math.min.apply(Math, nodes.map(function (node) { return node.y; }));\n var maxY = Math.max.apply(Math, nodes.map(function (node) { return node.y; }));\n var scalex = width / (maxX - minX);\n var scaley = height / (maxY - minY);\n nodes.forEach(function (node) {\n if (node.x !== undefined && scalex < 1) {\n node.x = (node.x - minX) * scalex;\n }\n if (node.y !== undefined && scaley < 1) {\n node.y = (node.y - minY) * scaley;\n }\n });\n // 这一步就执行缩小空间。且不考虑节点size\n nodes.forEach(function (node) {\n node.sizeTemp = node.size;\n node.size = [10, 10];\n });\n (0, mysqlWorkbench_1.default)(nodes, edges);\n nodes.forEach(function (node) {\n node.size = node.sizeTemp || [];\n delete node.sizeTemp;\n });\n // 进行网格对齐+节点大小扩增\n (0, forceGrid_1.default)({\n nodes: nodes,\n edges: edges,\n }, options);\n resolve();\n });\n });\n return layoutPromise;\n}\nexports.default = layout;\n//# sourceMappingURL=core.js.map","\"use strict\";\n/**\n * @fileOverview Force Layout Grid Align layout\n * @author wenyanqi\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERLayout = void 0;\nvar base_1 = require(\"../base\");\nvar core_1 = __importDefault(require(\"./core\"));\nvar ERLayout = /** @class */ (function (_super) {\n __extends(ERLayout, _super);\n function ERLayout(options) {\n var _this = _super.call(this) || this;\n _this.width = 300;\n _this.height = 300;\n _this.nodeMinGap = 50;\n /** 迭代结束的回调函数 */\n _this.onLayoutEnd = function () { };\n if (options) {\n _this.updateCfg(options);\n }\n return _this;\n }\n ERLayout.prototype.getDefaultCfg = function () {\n return {\n width: 300,\n height: 300,\n nodeMinGap: 50,\n };\n };\n /**\n * 执行布局\n */\n ERLayout.prototype.execute = function () {\n var self = this;\n var nodes = self.nodes;\n var edges = self.edges;\n // 节点初始化,size初始化\n nodes === null || nodes === void 0 ? void 0 : nodes.forEach(function (node) {\n if (!node.size) {\n node.size = [50, 50];\n }\n });\n return (0, core_1.default)({\n nodes: nodes,\n edges: edges,\n }, {\n width: this.width,\n height: this.height,\n nodeMinGap: this.nodeMinGap,\n }).then(function () {\n if (self.onLayoutEnd)\n self.onLayoutEnd();\n });\n };\n ERLayout.prototype.getType = function () {\n return \"er\";\n };\n return ERLayout;\n}(base_1.Base));\nexports.ERLayout = ERLayout;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Layouts = exports.Layout = void 0;\nvar registy_1 = require(\"../registy\");\nvar grid_1 = require(\"./grid\");\nvar random_1 = require(\"./random\");\nvar force2_1 = require(\"./force2\");\nvar gForce_1 = require(\"./gForce\");\nvar force_1 = require(\"./force\");\nvar circular_1 = require(\"./circular\");\nvar dagre_1 = require(\"./dagre\");\nvar radial_1 = require(\"./radial\");\nvar concentric_1 = require(\"./concentric\");\nvar mds_1 = require(\"./mds\");\nvar fruchterman_1 = require(\"./fruchterman\");\nvar fruchterman_2 = require(\"./gpu/fruchterman\");\nvar gForce_2 = require(\"./gpu/gForce\");\nvar comboForce_1 = require(\"./comboForce\");\nvar comboCombined_1 = require(\"./comboCombined\");\nvar forceAtlas2_1 = require(\"./forceAtlas2\");\nvar er_1 = require(\"./er\");\nvar dagreCompound_1 = require(\"./dagreCompound\");\nvar util_1 = require(\"../util\");\nvar Layout = /** @class */ (function () {\n function Layout(options) {\n var layoutClass = (0, registy_1.getLayoutByName)(options.type);\n this.layoutInstance = new layoutClass(options);\n }\n Layout.prototype.layout = function (data) {\n return this.layoutInstance.layout(data);\n };\n Layout.prototype.updateCfg = function (cfg) {\n this.layoutInstance.updateCfg(cfg);\n };\n Layout.prototype.init = function (data) {\n this.correctLayers(data.nodes);\n this.layoutInstance.init(data);\n };\n /**\n * correcting the layers on the node data\n * if min(layer) <= 0, layers should begin from abs(min(layer)) + 1\n * @param nodes\n * @returns\n */\n Layout.prototype.correctLayers = function (nodes) {\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length))\n return;\n var minLayer = Infinity;\n var hasLayerNodes = [];\n nodes.forEach(function (node) {\n if ((0, util_1.isString)(node.layer)) {\n node.layer = parseInt(node.layer, 10);\n }\n // keep node.layer === undefined for TS problem\n if (node.layer === undefined || isNaN(node.layer))\n return;\n hasLayerNodes.push(node);\n if (node.layer < minLayer)\n minLayer = node.layer;\n });\n if (minLayer <= 0) {\n var layerOffset_1 = Math.abs(minLayer) + 1;\n // @ts-ignore\n hasLayerNodes.forEach(function (node) { return node.layer += layerOffset_1; });\n }\n };\n Layout.prototype.execute = function () {\n this.layoutInstance.execute();\n };\n Layout.prototype.getDefaultCfg = function () {\n return this.layoutInstance.getDefaultCfg();\n };\n Layout.prototype.destroy = function () {\n return this.layoutInstance.destroy();\n };\n return Layout;\n}());\nexports.Layout = Layout;\n// FIXME\n// FOR G6\n// tslint:disable-next-line\nexports.Layouts = {\n force: force_1.ForceLayout,\n fruchterman: fruchterman_1.FruchtermanLayout,\n forceAtlas2: forceAtlas2_1.ForceAtlas2Layout,\n gForce: gForce_1.GForceLayout,\n force2: force2_1.Force2Layout,\n dagre: dagre_1.DagreLayout,\n dagreCompound: dagreCompound_1.DagreCompoundLayout,\n circular: circular_1.CircularLayout,\n radial: radial_1.RadialLayout,\n concentric: concentric_1.ConcentricLayout,\n grid: grid_1.GridLayout,\n mds: mds_1.MDSLayout,\n comboForce: comboForce_1.ComboForceLayout,\n comboCombined: comboCombined_1.ComboCombinedLayout,\n random: random_1.RandomLayout,\n 'gForce-gpu': gForce_2.GForceGPULayout,\n 'fruchterman-gpu': fruchterman_2.FruchtermanGPULayout,\n er: er_1.ERLayout,\n};\n//# sourceMappingURL=layout.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERLayout = exports.ForceAtlas2Layout = exports.ComboCombinedLayout = exports.ComboForceLayout = exports.GForceGPULayout = exports.FruchtermanGPULayout = exports.FruchtermanLayout = exports.MDSLayout = exports.ConcentricLayout = exports.RadialLayout = exports.DagreCompoundLayout = exports.DagreLayout = exports.CircularLayout = exports.ForceLayout = exports.Force2Layout = exports.GForceLayout = exports.RandomLayout = exports.GridLayout = exports.Layouts = exports.Layout = void 0;\nvar grid_1 = require(\"./grid\");\nObject.defineProperty(exports, \"GridLayout\", { enumerable: true, get: function () { return grid_1.GridLayout; } });\nvar random_1 = require(\"./random\");\nObject.defineProperty(exports, \"RandomLayout\", { enumerable: true, get: function () { return random_1.RandomLayout; } });\nvar gForce_1 = require(\"./gForce\");\nObject.defineProperty(exports, \"GForceLayout\", { enumerable: true, get: function () { return gForce_1.GForceLayout; } });\nvar force2_1 = require(\"./force2\");\nObject.defineProperty(exports, \"Force2Layout\", { enumerable: true, get: function () { return force2_1.Force2Layout; } });\nvar force_1 = require(\"./force\");\nObject.defineProperty(exports, \"ForceLayout\", { enumerable: true, get: function () { return force_1.ForceLayout; } });\nvar circular_1 = require(\"./circular\");\nObject.defineProperty(exports, \"CircularLayout\", { enumerable: true, get: function () { return circular_1.CircularLayout; } });\nvar dagre_1 = require(\"./dagre\");\nObject.defineProperty(exports, \"DagreLayout\", { enumerable: true, get: function () { return dagre_1.DagreLayout; } });\nvar dagreCompound_1 = require(\"./dagreCompound\");\nObject.defineProperty(exports, \"DagreCompoundLayout\", { enumerable: true, get: function () { return dagreCompound_1.DagreCompoundLayout; } });\nvar radial_1 = require(\"./radial\");\nObject.defineProperty(exports, \"RadialLayout\", { enumerable: true, get: function () { return radial_1.RadialLayout; } });\nvar concentric_1 = require(\"./concentric\");\nObject.defineProperty(exports, \"ConcentricLayout\", { enumerable: true, get: function () { return concentric_1.ConcentricLayout; } });\nvar mds_1 = require(\"./mds\");\nObject.defineProperty(exports, \"MDSLayout\", { enumerable: true, get: function () { return mds_1.MDSLayout; } });\nvar fruchterman_1 = require(\"./fruchterman\");\nObject.defineProperty(exports, \"FruchtermanLayout\", { enumerable: true, get: function () { return fruchterman_1.FruchtermanLayout; } });\nvar fruchterman_2 = require(\"./gpu/fruchterman\");\nObject.defineProperty(exports, \"FruchtermanGPULayout\", { enumerable: true, get: function () { return fruchterman_2.FruchtermanGPULayout; } });\nvar gForce_2 = require(\"./gpu/gForce\");\nObject.defineProperty(exports, \"GForceGPULayout\", { enumerable: true, get: function () { return gForce_2.GForceGPULayout; } });\nvar comboForce_1 = require(\"./comboForce\");\nObject.defineProperty(exports, \"ComboForceLayout\", { enumerable: true, get: function () { return comboForce_1.ComboForceLayout; } });\nvar comboCombined_1 = require(\"./comboCombined\");\nObject.defineProperty(exports, \"ComboCombinedLayout\", { enumerable: true, get: function () { return comboCombined_1.ComboCombinedLayout; } });\nvar forceAtlas2_1 = require(\"./forceAtlas2\");\nObject.defineProperty(exports, \"ForceAtlas2Layout\", { enumerable: true, get: function () { return forceAtlas2_1.ForceAtlas2Layout; } });\nvar er_1 = require(\"./er\");\nObject.defineProperty(exports, \"ERLayout\", { enumerable: true, get: function () { return er_1.ERLayout; } });\nvar layout_1 = require(\"./layout\");\nObject.defineProperty(exports, \"Layout\", { enumerable: true, get: function () { return layout_1.Layout; } });\nObject.defineProperty(exports, \"Layouts\", { enumerable: true, get: function () { return layout_1.Layouts; } });\n// types file\n__exportStar(require(\"./types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLayoutByName = exports.unRegisterLayout = exports.registerLayout = void 0;\nvar registy_1 = require(\"./registy\");\nObject.defineProperty(exports, \"registerLayout\", { enumerable: true, get: function () { return registy_1.registerLayout; } });\nObject.defineProperty(exports, \"unRegisterLayout\", { enumerable: true, get: function () { return registy_1.unRegisterLayout; } });\nObject.defineProperty(exports, \"getLayoutByName\", { enumerable: true, get: function () { return registy_1.getLayoutByName; } });\n// layout, layout types file, worker\n__exportStar(require(\"./layout\"), exports);\n//# sourceMappingURL=index.js.map","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Hierarchy\"] = factory();\n\telse\n\t\troot[\"Hierarchy\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 36);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Array.isArray ? Array.isArray(value) : Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Array');\n});\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isArrayLike = function (value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isArrayLike);\n\n/***/ }),\n/* 2 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Function');\n});\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar toString = {}.toString;\nvar isType = function (value, type) {\n return toString.call(value) === '[object ' + type + ']';\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isType);\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(str, 'String');\n});\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\n\nvar isNumber = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Number');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNumber);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar _require = __webpack_require__(38),\n mix = _require.mix;\n\n/**\n * Get average height or height for node's position calculation, according to align.\n * @param {*} preNode previous node\n * @param {*} node current node, whose position is going to be calculated\n * @param {'center' | undefined} align 'center' means nodes align at the center, other value means align at the left-top\n * @param {string} heightField field name for height value on preNode and node\n * @return {number} the height for calculation\n */\nfunction getHeight(preNode, node, align, heightField) {\n if (heightField === void 0) {\n heightField = 'height';\n }\n return align === 'center' ? (preNode[heightField] + node[heightField]) / 2 : preNode.height;\n}\nmodule.exports = {\n assign: mix,\n getHeight: getHeight\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// isFinite,\nvar isNil = function (value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNil);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);\n\n\nfunction each(elements, func) {\n if (!elements) {\n return;\n }\n var rst;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n if (rst === false) {\n break;\n }\n }\n } else if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__[\"a\" /* default */])(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n if (rst === false) {\n break;\n }\n }\n }\n }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (each);\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) return '';\n return value.toString();\n});\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_type__ = __webpack_require__(3);\n\n\nvar isPlainObject = function (value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(value) || !Object(__WEBPACK_IMPORTED_MODULE_1__is_type__[\"a\" /* default */])(value, 'Object')) {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPlainObject);\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = __webpack_require__(18);\nvar Layout = /*#__PURE__*/function () {\n function Layout(root, options) {\n if (options === void 0) {\n options = {};\n }\n var me = this;\n me.options = options;\n me.rootNode = hierarchy(root, options);\n }\n var _proto = Layout.prototype;\n _proto.execute = function execute() {\n throw new Error('please override this method');\n };\n return Layout;\n}();\nmodule.exports = Layout;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value;\n return value !== null && type === 'object' || type === 'function';\n});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar contains = function (arr, value) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return false;\n }\n return arr.indexOf(value) > -1;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (contains);\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isObjectLike = function (value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return typeof value === 'object' && value !== null;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isObjectLike);\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n// @ts-ignore\nvar values = Object.values ? function (obj) {\n return Object.values(obj);\n} : function (obj) {\n var result = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(obj, function (value, key) {\n if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (values);\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = mix;\n// FIXME: Mutable param should be forbidden in static lang.\nfunction _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\nfunction mix(dist, src1, src2, src3) {\n if (src1) _mix(dist, src1);\n if (src2) _mix(dist, src2);\n if (src3) _mix(dist, src3);\n return dist;\n}\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar separateTree = __webpack_require__(35);\nvar VALID_DIRECTIONS = ['LR',\n// left to right\n'RL',\n// right to left\n'TB',\n// top to bottom\n'BT',\n// bottom to top\n'H',\n// horizontal\n'V' // vertical\n];\n\nvar HORIZONTAL_DIRECTIONS = ['LR', 'RL', 'H'];\nvar isHorizontal = function isHorizontal(direction) {\n return HORIZONTAL_DIRECTIONS.indexOf(direction) > -1;\n};\nvar DEFAULT_DIRECTION = VALID_DIRECTIONS[0];\nmodule.exports = function (root, options, layoutAlgrithm) {\n var direction = options.direction || DEFAULT_DIRECTION;\n options.isHorizontal = isHorizontal(direction);\n if (direction && VALID_DIRECTIONS.indexOf(direction) === -1) {\n throw new TypeError(\"Invalid direction: \" + direction);\n }\n if (direction === VALID_DIRECTIONS[0]) {\n // LR\n layoutAlgrithm(root, options);\n } else if (direction === VALID_DIRECTIONS[1]) {\n // RL\n layoutAlgrithm(root, options);\n root.right2left();\n } else if (direction === VALID_DIRECTIONS[2]) {\n // TB\n layoutAlgrithm(root, options);\n } else if (direction === VALID_DIRECTIONS[3]) {\n // BT\n layoutAlgrithm(root, options);\n root.bottom2top();\n } else if (direction === VALID_DIRECTIONS[4] || direction === VALID_DIRECTIONS[5]) {\n // H or V\n // separate into left and right trees\n var _separateTree = separateTree(root, options),\n left = _separateTree.left,\n right = _separateTree.right;\n // do layout for left and right trees\n layoutAlgrithm(left, options);\n layoutAlgrithm(right, options);\n options.isHorizontal ? left.right2left() : left.bottom2top();\n // combine left and right trees\n right.translate(left.x - right.x, left.y - right.y);\n // translate root\n root.x = left.x;\n root.y = right.y;\n var bb = root.getBoundingBox();\n if (options.isHorizontal) {\n if (bb.top < 0) {\n root.translate(0, -bb.top);\n }\n } else {\n if (bb.left < 0) {\n root.translate(-bb.left, 0);\n }\n }\n }\n // fixed root position, default value is true\n var fixedRoot = options.fixedRoot;\n if (fixedRoot === undefined) fixedRoot = true;\n if (fixedRoot) {\n root.translate(-(root.x + root.width / 2 + root.hgap), -(root.y + root.height / 2 + root.vgap));\n }\n return root;\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable no-cond-assign */\nvar util = __webpack_require__(6);\nvar PEM = 18;\nvar DEFAULT_HEIGHT = PEM * 2;\nvar DEFAULT_GAP = PEM;\nvar DEFAULT_OPTIONS = {\n getId: function getId(d) {\n return d.id || d.name;\n },\n getPreH: function getPreH(d) {\n return d.preH || 0;\n },\n getPreV: function getPreV(d) {\n return d.preV || 0;\n },\n getHGap: function getHGap(d) {\n return d.hgap || DEFAULT_GAP;\n },\n getVGap: function getVGap(d) {\n return d.vgap || DEFAULT_GAP;\n },\n getChildren: function getChildren(d) {\n return d.children;\n },\n getHeight: function getHeight(d) {\n return d.height || DEFAULT_HEIGHT;\n },\n getWidth: function getWidth(d) {\n var label = d.label || ' ';\n return d.width || label.split('').length * PEM; // FIXME DO NOT get width like this\n }\n};\n\nfunction Node(data, options) {\n var me = this;\n me.vgap = me.hgap = 0;\n if (data instanceof Node) return data;\n me.data = data;\n /*\n * Gaps: filling space between nodes\n * (x, y) ----------------------\n * | vgap |\n * | -------------------- h\n * | h | | e\n * | g | | i\n * | a | | g\n * | p | | h\n * | --------------------- t\n * | |\n * -----------width------------\n */\n var hgap = options.getHGap(data);\n var vgap = options.getVGap(data);\n me.preH = options.getPreH(data);\n me.preV = options.getPreV(data);\n me.width = options.getWidth(data);\n me.height = options.getHeight(data);\n me.width += me.preH;\n me.height += me.preV;\n me.id = options.getId(data);\n me.x = me.y = 0;\n me.depth = 0;\n if (!me.children) {\n me.children = [];\n }\n me.addGap(hgap, vgap);\n return me;\n}\nutil.assign(Node.prototype, {\n isRoot: function isRoot() {\n return this.depth === 0;\n },\n isLeaf: function isLeaf() {\n return this.children.length === 0;\n },\n addGap: function addGap(hgap, vgap) {\n var me = this;\n me.hgap += hgap;\n me.vgap += vgap;\n me.width += 2 * hgap;\n me.height += 2 * vgap;\n },\n eachNode: function eachNode(callback) {\n // Depth First traverse\n var me = this;\n var nodes = [me];\n var current;\n while (current = nodes.shift()) {\n callback(current);\n nodes = current.children.concat(nodes);\n }\n },\n DFTraverse: function DFTraverse(callback) {\n // Depth First traverse\n this.eachNode(callback);\n },\n BFTraverse: function BFTraverse(callback) {\n // Breadth First traverse\n var me = this;\n var nodes = [me];\n var current;\n while (current = nodes.shift()) {\n callback(current);\n nodes = nodes.concat(current.children);\n }\n },\n getBoundingBox: function getBoundingBox() {\n // BBox for just one tree node\n var bb = {\n left: Number.MAX_VALUE,\n top: Number.MAX_VALUE,\n width: 0,\n height: 0\n };\n this.eachNode(function (node) {\n bb.left = Math.min(bb.left, node.x);\n bb.top = Math.min(bb.top, node.y);\n bb.width = Math.max(bb.width, node.x + node.width);\n bb.height = Math.max(bb.height, node.y + node.height);\n });\n return bb;\n },\n // translate\n translate: function translate(tx, ty) {\n if (tx === void 0) {\n tx = 0;\n }\n if (ty === void 0) {\n ty = 0;\n }\n this.eachNode(function (node) {\n node.x += tx;\n node.y += ty;\n node.x += node.preH;\n node.y += node.preV;\n });\n },\n right2left: function right2left() {\n var me = this;\n var bb = me.getBoundingBox();\n me.eachNode(function (node) {\n node.x = node.x - (node.x - bb.left) * 2 - node.width;\n // node.x = - node.x;\n });\n\n me.translate(bb.width, 0);\n },\n bottom2top: function bottom2top() {\n var me = this;\n var bb = me.getBoundingBox();\n me.eachNode(function (node) {\n node.y = node.y - (node.y - bb.top) * 2 - node.height;\n // node.y = - node.y;\n });\n\n me.translate(0, bb.height);\n }\n});\nfunction hierarchy(data, options, isolated) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n var root = new Node(data, options);\n var nodes = [root];\n var node;\n if (!isolated && !data.collapsed) {\n while (node = nodes.shift()) {\n if (!node.data.collapsed) {\n var children = options.getChildren(node.data);\n var length = children ? children.length : 0;\n node.children = new Array(length);\n if (children && length) {\n for (var i = 0; i < length; i++) {\n var child = new Node(children[i], options);\n node.children[i] = child;\n nodes.push(child);\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n }\n }\n return root;\n}\nmodule.exports = hierarchy;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar filter = function (arr, func) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n if (func(value, index)) {\n result.push(value);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (filter);\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys__ = __webpack_require__(21);\n\n\nfunction isMatch(obj, attrs) {\n var _keys = Object(__WEBPACK_IMPORTED_MODULE_1__keys__[\"a\" /* default */])(attrs);\n var length = _keys.length;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(obj)) return !length;\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (isMatch);\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar keys = Object.keys ? function (obj) {\n return Object.keys(obj);\n} : function (obj) {\n var result = [];\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(obj, function (value, key) {\n if (!(Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (keys);\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the maximum value.\n * @example\n *\n * max([1, 2]);\n * // => 2\n *\n * max([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * max(data);\n * // => 1250010\n * // Math.max(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.max(prev, curr);\n }, arr[0]);\n});\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * @param {Array} arr The array to iterate over.\n * @return {*} Returns the minimum value.\n * @example\n *\n * min([1, 2]);\n * // => 1\n *\n * min([]);\n * // => undefined\n *\n * const data = new Array(1250010).fill(1).map((d,idx) => idx);\n *\n * min(data);\n * // => 1250010\n * // Math.min(...data) will encounter \"Maximum call stack size exceeded\" error\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n return arr.reduce(function (prev, curr) {\n return Math.min(prev, curr);\n }, arr[0]);\n});\n\n/***/ }),\n/* 24 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar splice = Array.prototype.splice;\nvar pullAt = function pullAt(arr, indexes) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return [];\n }\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (pullAt);\n\n/***/ }),\n/* 25 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_plain_object__ = __webpack_require__(10);\n\n\n\nvar reduce = function (arr, fn, init) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_array__[\"a\" /* default */])(arr) && !Object(__WEBPACK_IMPORTED_MODULE_2__is_plain_object__[\"a\" /* default */])(arr)) {\n return arr;\n }\n var result = init;\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(arr, function (data, i) {\n result = fn(result, data, i);\n });\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (reduce);\n\n/***/ }),\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = uniq;\nfunction uniq(arr, cache) {\n if (cache === void 0) {\n cache = new Map();\n }\n var r = [];\n if (Array.isArray(arr)) {\n for (var i = 0, len = arr.length; i < len; i++) {\n var item = arr[i];\n // 加一个 cache,提升性能\n if (!cache.has(item)) {\n r.push(item);\n cache.set(item, true);\n }\n }\n }\n return r;\n}\n\n/***/ }),\n/* 27 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = groupToMap;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group_by__ = __webpack_require__(28);\n\n\n\n/**\n * 将数据分组成 map\n * @param data\n * @param condition\n */\nfunction groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data\n };\n }\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(condition)) {\n // 如果是字符串,则按照 a*b 风格成数组\n var paramscondition_1 = Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n condition = function (row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n // 根据字段列表的值,拼接成 key\n for (var i = 0, l = paramscondition_1.length; i < l; i++) {\n unique += row[paramscondition_1[i]] && row[paramscondition_1[i]].toString();\n }\n return unique;\n };\n }\n return Object(__WEBPACK_IMPORTED_MODULE_2__group_by__[\"a\" /* default */])(data, condition);\n}\n\n/***/ }),\n/* 28 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction groupBy(data, condition) {\n if (!condition || !Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(data)) {\n return {};\n }\n var result = {};\n // 兼容方法和 字符串的写法\n var predicate = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(condition) ? condition : function (item) {\n return item[condition];\n };\n var key;\n for (var i = 0; i < data.length; i++) {\n var item = data[i];\n key = predicate(item);\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n } else {\n result[key] = [item];\n }\n }\n return result;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (groupBy);\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, key) {\n return obj.hasOwnProperty(key);\n});\n\n/***/ }),\n/* 30 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar toString = {}.toString;\nvar getType = function (value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/]$/, '');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (getType);\n\n/***/ }),\n/* 31 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar objectProto = Object.prototype;\nvar isPrototype = function (value) {\n var Ctor = value && value.constructor;\n var proto = typeof Ctor === 'function' && Ctor.prototype || objectProto;\n return value === proto;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPrototype);\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n\n/**\n * _.memoize(calColor);\n * _.memoize(calColor, (...args) => args[0]);\n * @param f\n * @param resolver\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (f, resolver) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(f)) {\n throw new TypeError('Expected a function');\n }\n var memoized = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key\n var key = resolver ? resolver.apply(this, args) : args[0];\n var cache = memoized.cache;\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = f.apply(this, args);\n // 缓存起来\n cache.set(key, result);\n return result;\n };\n memoized.cache = new Map();\n return memoized;\n});\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object_like__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_string__ = __webpack_require__(4);\n\n\n\nvar isEqual = function (value, other) {\n if (value === other) {\n return true;\n }\n if (!value || !other) {\n return false;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_2__is_string__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_2__is_string__[\"a\" /* default */])(other)) {\n return false;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(other)) {\n if (value.length !== other.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__is_object_like__[\"a\" /* default */])(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n var rst = true;\n for (var i = 0; i < valueKeys.length; i++) {\n rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);\n if (!rst) {\n break;\n }\n }\n return rst;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEqual);\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(116);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__memoize__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_string__ = __webpack_require__(4);\n\n\n\n\nvar ctx;\n/**\n * 计算文本的宽度\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (Object(__WEBPACK_IMPORTED_MODULE_2__memoize__[\"a\" /* default */])(function (text, font) {\n if (font === void 0) {\n font = {};\n }\n var fontSize = font.fontSize,\n fontFamily = font.fontFamily,\n fontWeight = font.fontWeight,\n fontStyle = font.fontStyle,\n fontVariant = font.fontVariant;\n if (!ctx) {\n ctx = document.createElement('canvas').getContext('2d');\n }\n ctx.font = [fontStyle, fontVariant, fontWeight, fontSize + \"px\", fontFamily].join(' ');\n return ctx.measureText(Object(__WEBPACK_IMPORTED_MODULE_3__is_string__[\"a\" /* default */])(text) ? text : '').width;\n}, function (text, font) {\n if (font === void 0) {\n font = {};\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0_tslib__[\"a\" /* __spreadArrays */])([text], Object(__WEBPACK_IMPORTED_MODULE_1__values__[\"a\" /* default */])(font)).join('');\n}));\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = __webpack_require__(18);\nmodule.exports = function (root, options) {\n // separate into left and right trees\n var left = hierarchy(root.data, options, true); // root only\n var right = hierarchy(root.data, options, true); // root only\n // automatically\n var treeSize = root.children.length;\n var rightTreeSize = Math.round(treeSize / 2);\n // separate left and right tree by meta data\n var getSide = options.getSide || function (child, index) {\n if (index < rightTreeSize) {\n return 'right';\n }\n return 'left';\n };\n for (var i = 0; i < treeSize; i++) {\n var child = root.children[i];\n var side = getSide(child, i);\n if (side === 'right') {\n right.children.push(child);\n } else {\n left.children.push(child);\n }\n }\n left.eachNode(function (node) {\n if (!node.isRoot()) {\n node.side = 'left';\n }\n });\n right.eachNode(function (node) {\n if (!node.isRoot()) {\n node.side = 'right';\n }\n });\n return {\n left: left,\n right: right\n };\n};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar hierarchy = {\n compactBox: __webpack_require__(37),\n dendrogram: __webpack_require__(120),\n indented: __webpack_require__(122),\n mindmap: __webpack_require__(124)\n};\nmodule.exports = hierarchy;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar nonLayeredTidyTree = __webpack_require__(119);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar CompactBoxTreeLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(CompactBoxTreeLayout, _TreeLayout);\n function CompactBoxTreeLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = CompactBoxTreeLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n return doTreeLayout(me.rootNode, me.options, nonLayeredTidyTree);\n };\n return CompactBoxTreeLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction compactBoxLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new CompactBoxTreeLayout(root, options).execute();\n}\nmodule.exports = compactBoxLayout;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"contains\", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"includes\", function() { return __WEBPACK_IMPORTED_MODULE_0__contains__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__difference__ = __webpack_require__(39);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"difference\", function() { return __WEBPACK_IMPORTED_MODULE_1__difference__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__find__ = __webpack_require__(40);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return __WEBPACK_IMPORTED_MODULE_2__find__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__find_index__ = __webpack_require__(41);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"findIndex\", function() { return __WEBPACK_IMPORTED_MODULE_3__find_index__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__first_value__ = __webpack_require__(42);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"firstValue\", function() { return __WEBPACK_IMPORTED_MODULE_4__first_value__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__flatten__ = __webpack_require__(43);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"flatten\", function() { return __WEBPACK_IMPORTED_MODULE_5__flatten__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__flatten_deep__ = __webpack_require__(44);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"flattenDeep\", function() { return __WEBPACK_IMPORTED_MODULE_6__flatten_deep__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__get_range__ = __webpack_require__(45);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getRange\", function() { return __WEBPACK_IMPORTED_MODULE_7__get_range__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__pull__ = __webpack_require__(46);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pull\", function() { return __WEBPACK_IMPORTED_MODULE_8__pull__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pull_at__ = __webpack_require__(24);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pullAt\", function() { return __WEBPACK_IMPORTED_MODULE_9__pull_at__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__reduce__ = __webpack_require__(25);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return __WEBPACK_IMPORTED_MODULE_10__reduce__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__remove__ = __webpack_require__(47);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"remove\", function() { return __WEBPACK_IMPORTED_MODULE_11__remove__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__sort_by__ = __webpack_require__(48);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"sortBy\", function() { return __WEBPACK_IMPORTED_MODULE_12__sort_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__union__ = __webpack_require__(49);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"union\", function() { return __WEBPACK_IMPORTED_MODULE_13__union__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__uniq__ = __webpack_require__(26);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"uniq\", function() { return __WEBPACK_IMPORTED_MODULE_14__uniq__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__values_of_key__ = __webpack_require__(50);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"valuesOfKey\", function() { return __WEBPACK_IMPORTED_MODULE_15__values_of_key__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__head__ = __webpack_require__(51);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"head\", function() { return __WEBPACK_IMPORTED_MODULE_16__head__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__last__ = __webpack_require__(52);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"last\", function() { return __WEBPACK_IMPORTED_MODULE_17__last__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__starts_with__ = __webpack_require__(53);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"startsWith\", function() { return __WEBPACK_IMPORTED_MODULE_18__starts_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ends_with__ = __webpack_require__(54);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"endsWith\", function() { return __WEBPACK_IMPORTED_MODULE_19__ends_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__filter__ = __webpack_require__(19);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return __WEBPACK_IMPORTED_MODULE_20__filter__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__every__ = __webpack_require__(55);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return __WEBPACK_IMPORTED_MODULE_21__every__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__some__ = __webpack_require__(56);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"some\", function() { return __WEBPACK_IMPORTED_MODULE_22__some__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__group__ = __webpack_require__(57);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"group\", function() { return __WEBPACK_IMPORTED_MODULE_23__group__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__group_by__ = __webpack_require__(28);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"groupBy\", function() { return __WEBPACK_IMPORTED_MODULE_24__group_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__group_to_map__ = __webpack_require__(27);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"groupToMap\", function() { return __WEBPACK_IMPORTED_MODULE_25__group_to_map__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__ = __webpack_require__(58);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getWrapBehavior\", function() { return __WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__ = __webpack_require__(59);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"wrapBehavior\", function() { return __WEBPACK_IMPORTED_MODULE_27__wrap_behavior__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__number2color__ = __webpack_require__(60);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"number2color\", function() { return __WEBPACK_IMPORTED_MODULE_28__number2color__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__parse_radius__ = __webpack_require__(61);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"parseRadius\", function() { return __WEBPACK_IMPORTED_MODULE_29__parse_radius__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__clamp__ = __webpack_require__(62);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clamp\", function() { return __WEBPACK_IMPORTED_MODULE_30__clamp__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__fixed_base__ = __webpack_require__(63);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"fixedBase\", function() { return __WEBPACK_IMPORTED_MODULE_31__fixed_base__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__is_decimal__ = __webpack_require__(64);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isDecimal\", function() { return __WEBPACK_IMPORTED_MODULE_32__is_decimal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__is_even__ = __webpack_require__(65);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEven\", function() { return __WEBPACK_IMPORTED_MODULE_33__is_even__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__is_integer__ = __webpack_require__(66);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isInteger\", function() { return __WEBPACK_IMPORTED_MODULE_34__is_integer__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__is_negative__ = __webpack_require__(67);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNegative\", function() { return __WEBPACK_IMPORTED_MODULE_35__is_negative__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__is_number_equal__ = __webpack_require__(68);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumberEqual\", function() { return __WEBPACK_IMPORTED_MODULE_36__is_number_equal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__is_odd__ = __webpack_require__(69);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isOdd\", function() { return __WEBPACK_IMPORTED_MODULE_37__is_odd__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__is_positive__ = __webpack_require__(70);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPositive\", function() { return __WEBPACK_IMPORTED_MODULE_38__is_positive__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__max__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"max\", function() { return __WEBPACK_IMPORTED_MODULE_39__max__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__max_by__ = __webpack_require__(71);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"maxBy\", function() { return __WEBPACK_IMPORTED_MODULE_40__max_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__min__ = __webpack_require__(23);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"min\", function() { return __WEBPACK_IMPORTED_MODULE_41__min__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__min_by__ = __webpack_require__(72);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"minBy\", function() { return __WEBPACK_IMPORTED_MODULE_42__min_by__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__mod__ = __webpack_require__(73);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mod\", function() { return __WEBPACK_IMPORTED_MODULE_43__mod__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__to_degree__ = __webpack_require__(74);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toDegree\", function() { return __WEBPACK_IMPORTED_MODULE_44__to_degree__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__to_integer__ = __webpack_require__(75);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toInteger\", function() { return __WEBPACK_IMPORTED_MODULE_45__to_integer__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__to_radian__ = __webpack_require__(76);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toRadian\", function() { return __WEBPACK_IMPORTED_MODULE_46__to_radian__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__for_in__ = __webpack_require__(77);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"forIn\", function() { return __WEBPACK_IMPORTED_MODULE_47__for_in__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__has__ = __webpack_require__(29);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"has\", function() { return __WEBPACK_IMPORTED_MODULE_48__has__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__has_key__ = __webpack_require__(78);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"hasKey\", function() { return __WEBPACK_IMPORTED_MODULE_49__has_key__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__has_value__ = __webpack_require__(79);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"hasValue\", function() { return __WEBPACK_IMPORTED_MODULE_50__has_value__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__keys__ = __webpack_require__(21);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return __WEBPACK_IMPORTED_MODULE_51__keys__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__is_match__ = __webpack_require__(20);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isMatch\", function() { return __WEBPACK_IMPORTED_MODULE_52__is_match__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__values__ = __webpack_require__(15);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"values\", function() { return __WEBPACK_IMPORTED_MODULE_53__values__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__lower_case__ = __webpack_require__(80);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"lowerCase\", function() { return __WEBPACK_IMPORTED_MODULE_54__lower_case__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__lower_first__ = __webpack_require__(81);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"lowerFirst\", function() { return __WEBPACK_IMPORTED_MODULE_55__lower_first__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__substitute__ = __webpack_require__(82);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"substitute\", function() { return __WEBPACK_IMPORTED_MODULE_56__substitute__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__upper_case__ = __webpack_require__(83);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"upperCase\", function() { return __WEBPACK_IMPORTED_MODULE_57__upper_case__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__upper_first__ = __webpack_require__(84);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"upperFirst\", function() { return __WEBPACK_IMPORTED_MODULE_58__upper_first__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__get_type__ = __webpack_require__(30);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getType\", function() { return __WEBPACK_IMPORTED_MODULE_59__get_type__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__is_arguments__ = __webpack_require__(85);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArguments\", function() { return __WEBPACK_IMPORTED_MODULE_60__is_arguments__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__is_array__ = __webpack_require__(0);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArray\", function() { return __WEBPACK_IMPORTED_MODULE_61__is_array__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__is_array_like__ = __webpack_require__(1);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isArrayLike\", function() { return __WEBPACK_IMPORTED_MODULE_62__is_array_like__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__is_boolean__ = __webpack_require__(86);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isBoolean\", function() { return __WEBPACK_IMPORTED_MODULE_63__is_boolean__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__is_date__ = __webpack_require__(87);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isDate\", function() { return __WEBPACK_IMPORTED_MODULE_64__is_date__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__is_error__ = __webpack_require__(88);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isError\", function() { return __WEBPACK_IMPORTED_MODULE_65__is_error__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__is_function__ = __webpack_require__(2);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isFunction\", function() { return __WEBPACK_IMPORTED_MODULE_66__is_function__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__is_finite__ = __webpack_require__(89);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isFinite\", function() { return __WEBPACK_IMPORTED_MODULE_67__is_finite__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__is_nil__ = __webpack_require__(7);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNil\", function() { return __WEBPACK_IMPORTED_MODULE_68__is_nil__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__is_null__ = __webpack_require__(90);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNull\", function() { return __WEBPACK_IMPORTED_MODULE_69__is_null__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__is_number__ = __webpack_require__(5);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isNumber\", function() { return __WEBPACK_IMPORTED_MODULE_70__is_number__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_71__is_object__ = __webpack_require__(12);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return __WEBPACK_IMPORTED_MODULE_71__is_object__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_72__is_object_like__ = __webpack_require__(14);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isObjectLike\", function() { return __WEBPACK_IMPORTED_MODULE_72__is_object_like__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__is_plain_object__ = __webpack_require__(10);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPlainObject\", function() { return __WEBPACK_IMPORTED_MODULE_73__is_plain_object__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_74__is_prototype__ = __webpack_require__(31);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isPrototype\", function() { return __WEBPACK_IMPORTED_MODULE_74__is_prototype__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__ = __webpack_require__(91);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isRegExp\", function() { return __WEBPACK_IMPORTED_MODULE_75__is_reg_exp__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_76__is_string__ = __webpack_require__(4);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return __WEBPACK_IMPORTED_MODULE_76__is_string__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_77__is_type__ = __webpack_require__(3);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isType\", function() { return __WEBPACK_IMPORTED_MODULE_77__is_type__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_78__is_undefined__ = __webpack_require__(92);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isUndefined\", function() { return __WEBPACK_IMPORTED_MODULE_78__is_undefined__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__is_element__ = __webpack_require__(93);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isElement\", function() { return __WEBPACK_IMPORTED_MODULE_79__is_element__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__ = __webpack_require__(94);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"requestAnimationFrame\", function() { return __WEBPACK_IMPORTED_MODULE_80__request_animation_frame__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__ = __webpack_require__(95);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clearAnimationFrame\", function() { return __WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__augment__ = __webpack_require__(96);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"augment\", function() { return __WEBPACK_IMPORTED_MODULE_82__augment__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__clone__ = __webpack_require__(97);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"clone\", function() { return __WEBPACK_IMPORTED_MODULE_83__clone__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__debounce__ = __webpack_require__(98);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return __WEBPACK_IMPORTED_MODULE_84__debounce__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_85__memoize__ = __webpack_require__(32);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"memoize\", function() { return __WEBPACK_IMPORTED_MODULE_85__memoize__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_86__deep_mix__ = __webpack_require__(99);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"deepMix\", function() { return __WEBPACK_IMPORTED_MODULE_86__deep_mix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_87__each__ = __webpack_require__(8);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"each\", function() { return __WEBPACK_IMPORTED_MODULE_87__each__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__extend__ = __webpack_require__(100);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"extend\", function() { return __WEBPACK_IMPORTED_MODULE_88__extend__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__index_of__ = __webpack_require__(101);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"indexOf\", function() { return __WEBPACK_IMPORTED_MODULE_89__index_of__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__is_empty__ = __webpack_require__(102);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEmpty\", function() { return __WEBPACK_IMPORTED_MODULE_90__is_empty__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_91__is_equal__ = __webpack_require__(33);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEqual\", function() { return __WEBPACK_IMPORTED_MODULE_91__is_equal__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_92__is_equal_with__ = __webpack_require__(103);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"isEqualWith\", function() { return __WEBPACK_IMPORTED_MODULE_92__is_equal_with__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_93__map__ = __webpack_require__(104);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return __WEBPACK_IMPORTED_MODULE_93__map__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_94__map_values__ = __webpack_require__(105);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mapValues\", function() { return __WEBPACK_IMPORTED_MODULE_94__map_values__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_95__mix__ = __webpack_require__(16);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"mix\", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"assign\", function() { return __WEBPACK_IMPORTED_MODULE_95__mix__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_96__get__ = __webpack_require__(106);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return __WEBPACK_IMPORTED_MODULE_96__get__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_97__set__ = __webpack_require__(107);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"set\", function() { return __WEBPACK_IMPORTED_MODULE_97__set__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_98__pick__ = __webpack_require__(108);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"pick\", function() { return __WEBPACK_IMPORTED_MODULE_98__pick__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_99__omit__ = __webpack_require__(109);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"omit\", function() { return __WEBPACK_IMPORTED_MODULE_99__omit__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_100__throttle__ = __webpack_require__(110);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"throttle\", function() { return __WEBPACK_IMPORTED_MODULE_100__throttle__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_101__to_array__ = __webpack_require__(111);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toArray\", function() { return __WEBPACK_IMPORTED_MODULE_101__to_array__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_102__to_string__ = __webpack_require__(9);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"toString\", function() { return __WEBPACK_IMPORTED_MODULE_102__to_string__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_103__unique_id__ = __webpack_require__(112);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"uniqueId\", function() { return __WEBPACK_IMPORTED_MODULE_103__unique_id__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_104__noop__ = __webpack_require__(113);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return __WEBPACK_IMPORTED_MODULE_104__noop__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_105__identity__ = __webpack_require__(114);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"identity\", function() { return __WEBPACK_IMPORTED_MODULE_105__identity__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_106__size__ = __webpack_require__(115);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"size\", function() { return __WEBPACK_IMPORTED_MODULE_106__size__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_107__measure_text_width__ = __webpack_require__(34);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"measureTextWidth\", function() { return __WEBPACK_IMPORTED_MODULE_107__measure_text_width__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__ = __webpack_require__(117);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"getEllipsisText\", function() { return __WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_109__cache__ = __webpack_require__(118);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"Cache\", function() { return __WEBPACK_IMPORTED_MODULE_109__cache__[\"a\"]; });\n// array\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// event\n\n\n// format\n\n\n// math\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// object\n\n\n\n\n\n\n\n// string\n\n\n\n\n\n// type\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// other\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// text\n\n\n// 不知道为什么,需要把这个 export,不然 ts 会报类型错误\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filter__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__contains__ = __webpack_require__(13);\n\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to inspect.\n * @param {Array} values The values to exclude.\n * @return {Array} Returns the new array of filtered values.\n * @example\n * difference([2, 1], [2, 3]); // => [1]\n */\nvar difference = function (arr, values) {\n if (values === void 0) {\n values = [];\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0__filter__[\"a\" /* default */])(arr, function (value) {\n return !Object(__WEBPACK_IMPORTED_MODULE_1__contains__[\"a\" /* default */])(values, value);\n });\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (difference);\n\n/***/ }),\n/* 40 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_match__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_plain_object__ = __webpack_require__(10);\n\n\n\n\nfunction find(arr, predicate) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_2__is_array__[\"a\" /* default */])(arr)) return null;\n var _predicate;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(predicate)) {\n _predicate = predicate;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_3__is_plain_object__[\"a\" /* default */])(predicate)) {\n _predicate = function (a) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__is_match__[\"a\" /* default */])(a, predicate);\n };\n }\n if (_predicate) {\n for (var i = 0; i < arr.length; i += 1) {\n if (_predicate(arr[i])) {\n return arr[i];\n }\n }\n }\n return null;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (find);\n\n/***/ }),\n/* 41 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction findIndex(arr, predicate, fromIndex) {\n if (fromIndex === void 0) {\n fromIndex = 0;\n }\n for (var i = fromIndex; i < arr.length; i++) {\n if (predicate(arr[i], i)) {\n // 找到终止循环\n return i;\n }\n }\n return -1;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (findIndex);\n\n/***/ }),\n/* 42 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array__ = __webpack_require__(0);\n\n\nvar firstValue = function (data, name) {\n var rst = null;\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) {\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array__[\"a\" /* default */])(value)) {\n rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云\n } else {\n rst = value;\n }\n break;\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (firstValue);\n\n/***/ }),\n/* 43 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]\n */\nvar flatten = function (arr) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return [];\n }\n var rst = [];\n for (var i = 0; i < arr.length; i++) {\n rst = rst.concat(arr[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (flatten);\n\n/***/ }),\n/* 44 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\n/**\n * Flattens `array` a single level deep.\n *\n * @param {Array} arr The array to flatten.\n * @param {Array} result The array to return.\n * @return {Array} Returns the new flattened array.\n * @example\n *\n * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]\n */\nvar flattenDeep = function (arr, result) {\n if (result === void 0) {\n result = [];\n }\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n result.push(arr);\n } else {\n for (var i = 0; i < arr.length; i += 1) {\n flattenDeep(arr[i], result);\n }\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (flattenDeep);\n\n/***/ }),\n/* 45 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__max__ = __webpack_require__(22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__min__ = __webpack_require__(23);\n\n\n\nvar getRange = function (values) {\n // 存在 NaN 时,min,max 判定会出问题\n var filterValues = values.filter(function (v) {\n return !isNaN(v);\n });\n if (!filterValues.length) {\n // 如果没有数值则直接返回0\n return {\n min: 0,\n max: 0\n };\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(values[0])) {\n var tmp = [];\n for (var i = 0; i < values.length; i++) {\n tmp = tmp.concat(values[i]);\n }\n filterValues = tmp;\n }\n var max = Object(__WEBPACK_IMPORTED_MODULE_1__max__[\"a\" /* default */])(filterValues);\n var min = Object(__WEBPACK_IMPORTED_MODULE_2__min__[\"a\" /* default */])(filterValues);\n return {\n min: min,\n max: max\n };\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (getRange);\n\n/***/ }),\n/* 46 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar pull = function (arr) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n return arr;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (pull);\n\n/***/ }),\n/* 47 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__pull_at__ = __webpack_require__(24);\n\n\nvar remove = function (arr, predicate) {\n /**\n * const arr = [1, 2, 3, 4]\n * const evens = remove(arr, n => n % 2 == 0)\n * console.log(arr) // => [1, 3]\n * console.log(evens) // => [2, 4]\n */\n var result = [];\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return result;\n }\n var i = -1;\n var indexes = [];\n var length = arr.length;\n while (++i < length) {\n var value = arr[i];\n if (predicate(value, i, arr)) {\n result.push(value);\n indexes.push(i);\n }\n }\n Object(__WEBPACK_IMPORTED_MODULE_1__pull_at__[\"a\" /* default */])(arr, indexes);\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (remove);\n\n/***/ }),\n/* 48 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_function__ = __webpack_require__(2);\n\n\n\nfunction sortBy(arr, key) {\n var comparer;\n if (Object(__WEBPACK_IMPORTED_MODULE_2__is_function__[\"a\" /* default */])(key)) {\n comparer = function (a, b) {\n return key(a) - key(b);\n };\n } else {\n var keys_1 = [];\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(key)) {\n keys_1.push(key);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(key)) {\n keys_1 = key;\n }\n comparer = function (a, b) {\n for (var i = 0; i < keys_1.length; i += 1) {\n var prop = keys_1[i];\n if (a[prop] > b[prop]) {\n return 1;\n }\n if (a[prop] < b[prop]) {\n return -1;\n }\n }\n return 0;\n };\n }\n arr.sort(comparer);\n return arr;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (sortBy);\n\n/***/ }),\n/* 49 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__uniq__ = __webpack_require__(26);\n\nvar union = function () {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return Object(__WEBPACK_IMPORTED_MODULE_0__uniq__[\"a\" /* default */])([].concat.apply([], sources));\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (union);\n\n/***/ }),\n/* 50 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_nil__ = __webpack_require__(7);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (data, name) {\n var rst = [];\n var tmpMap = {};\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_nil__[\"a\" /* default */])(value)) {\n // flatten\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(value)) {\n value = [value];\n }\n for (var j = 0; j < value.length; j++) {\n var val = value[j];\n // unique\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n }\n }\n }\n return rst;\n});\n\n/***/ }),\n/* 51 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = head;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nfunction head(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(o)) {\n return o[0];\n }\n return undefined;\n}\n\n/***/ }),\n/* 52 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = last;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nfunction last(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(o)) {\n var arr = o;\n return arr[arr.length - 1];\n }\n return undefined;\n}\n\n/***/ }),\n/* 53 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n\n\nfunction startsWith(arr, e) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(arr) ? arr[0] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (startsWith);\n\n/***/ }),\n/* 54 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n\n\nfunction endsWith(arr, e) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(arr) ? arr[arr.length - 1] === e : false;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (endsWith);\n\n/***/ }),\n/* 55 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 只要有一个不满足条件就返回 false\n * @param arr\n * @param func\n */\nvar every = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (!func(arr[i], i)) return false;\n }\n return true;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (every);\n\n/***/ }),\n/* 56 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 只要有一个满足条件就返回 true\n * @param arr\n * @param func\n */\nvar some = function (arr, func) {\n for (var i = 0; i < arr.length; i++) {\n if (func(arr[i], i)) return true;\n }\n return false;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (some);\n\n/***/ }),\n/* 57 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__group_to_map__ = __webpack_require__(27);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (data, condition) {\n if (!condition) {\n // 没有条件,则自身改成数组\n return [data];\n }\n var groups = Object(__WEBPACK_IMPORTED_MODULE_0__group_to_map__[\"a\" /* default */])(data, condition);\n var array = [];\n for (var i in groups) {\n array.push(groups[i]);\n }\n return array;\n});\n\n/***/ }),\n/* 58 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 获取封装的事件\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction getWrapBehavior(obj, action) {\n return obj['_wrap_' + action];\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (getWrapBehavior);\n\n/***/ }),\n/* 59 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 封装事件,便于使用上下文this,和便于解除事件时使用\n * @protected\n * @param {Object} obj 对象\n * @param {String} action 事件名称\n * @return {Function} 返回事件处理函数\n */\nfunction wrapBehavior(obj, action) {\n if (obj['_wrap_' + action]) {\n return obj['_wrap_' + action];\n }\n var method = function (e) {\n obj[action](e);\n };\n obj['_wrap_' + action] = method;\n return method;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (wrapBehavior);\n\n/***/ }),\n/* 60 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar numColorCache = {};\nfunction numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n if (!color) {\n var str = num.toString(16);\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n color = '#' + str;\n numColorCache[num] = color;\n }\n return color;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (numberToColor);\n\n/***/ }),\n/* 61 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\nfunction parseRadius(radius) {\n var r1 = 0,\n r2 = 0,\n r3 = 0,\n r4 = 0;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n } else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n } else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n } else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n } else {\n r1 = r2 = r3 = r4 = radius;\n }\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (parseRadius);\n\n/***/ }),\n/* 62 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar clamp = function (a, min, max) {\n if (a < min) {\n return min;\n } else if (a > max) {\n return max;\n }\n return a;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (clamp);\n\n/***/ }),\n/* 63 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar fixedBase = function (v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n if (index === -1) {\n return Math.round(v);\n }\n var length = str.substr(index + 1).length;\n if (length > 20) {\n length = 20;\n }\n return parseFloat(v.toFixed(length));\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (fixedBase);\n\n/***/ }),\n/* 64 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isDecimal = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 1 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isDecimal);\n\n/***/ }),\n/* 65 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isEven = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 2 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEven);\n\n/***/ }),\n/* 66 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isInteger = Number.isInteger ? Number.isInteger : function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 1 === 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isInteger);\n\n/***/ }),\n/* 67 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isNegative = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num < 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNegative);\n\n/***/ }),\n/* 68 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = isNumberEqual;\nvar PRECISION = 0.00001; // numbers less than this is considered as 0\nfunction isNumberEqual(a, b, precision) {\n if (precision === void 0) {\n precision = PRECISION;\n }\n return Math.abs(a - b) < precision;\n}\n;\n\n/***/ }),\n/* 69 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isOdd = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num % 2 !== 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isOdd);\n\n/***/ }),\n/* 70 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n\nvar isPositive = function (num) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(num) && num > 0;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isPositive);\n\n/***/ }),\n/* 71 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n var maxItem;\n var max = -Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(fn) ? fn(item) : item[fn];\n if (v > max) {\n maxItem = item;\n max = v;\n }\n }\n return maxItem;\n});\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (arr, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(arr)) {\n return undefined;\n }\n var minItem;\n var min = Infinity;\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n var v = Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(fn) ? fn(item) : item[fn];\n if (v < min) {\n minItem = item;\n min = v;\n }\n }\n return minItem;\n});\n\n/***/ }),\n/* 73 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar mod = function (n, m) {\n return (n % m + m) % m;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (mod);\n\n/***/ }),\n/* 74 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar DEGREE = 180 / Math.PI;\nvar toDegree = function (radian) {\n return DEGREE * radian;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (toDegree);\n\n/***/ }),\n/* 75 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (parseInt);\n\n/***/ }),\n/* 76 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar RADIAN = Math.PI / 180;\nvar toRadian = function (degree) {\n return RADIAN * degree;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (toRadian);\n\n/***/ }),\n/* 77 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */]);\n\n/***/ }),\n/* 78 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__has__ = __webpack_require__(29);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (__WEBPACK_IMPORTED_MODULE_0__has__[\"a\" /* default */]);\n\n/***/ }),\n/* 79 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__contains__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__values__ = __webpack_require__(15);\n\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__contains__[\"a\" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__values__[\"a\" /* default */])(obj), value);\n});\n\n/***/ }),\n/* 80 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar lowerCase = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(str).toLowerCase();\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (lowerCase);\n\n/***/ }),\n/* 81 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar lowerFirst = function (value) {\n var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (lowerFirst);\n\n/***/ }),\n/* 82 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction substitute(str, o) {\n if (!str || !o) {\n return str;\n }\n return str.replace(/\\\\?\\{([^{}]+)\\}/g, function (match, name) {\n if (match.charAt(0) === '\\\\') {\n return match.slice(1);\n }\n return o[name] === undefined ? '' : o[name];\n });\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (substitute);\n\n/***/ }),\n/* 83 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar upperCase = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(str).toUpperCase();\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (upperCase);\n\n/***/ }),\n/* 84 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__to_string__ = __webpack_require__(9);\n\nvar upperFirst = function (value) {\n var str = Object(__WEBPACK_IMPORTED_MODULE_0__to_string__[\"a\" /* default */])(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (upperFirst);\n\n/***/ }),\n/* 85 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isArguments = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Arguments');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isArguments);\n\n/***/ }),\n/* 86 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isBoolean = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Boolean');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isBoolean);\n\n/***/ }),\n/* 87 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\nvar isDate = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Date');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isDate);\n\n/***/ }),\n/* 88 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n/**\n * 是否是参数类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\n\nvar isError = function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(value, 'Error');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isError);\n\n/***/ }),\n/* 89 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_number__ = __webpack_require__(5);\n/**\n * 判断是否为有限数\n * @return {Boolean}\n */\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_number__[\"a\" /* default */])(value) && isFinite(value);\n});\n\n/***/ }),\n/* 90 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isNull = function (value) {\n return value === null;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isNull);\n\n/***/ }),\n/* 91 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_type__ = __webpack_require__(3);\n\nvar isRegExp = function (str) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_type__[\"a\" /* default */])(str, 'RegExp');\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isRegExp);\n\n/***/ }),\n/* 92 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar isUndefined = function (value) {\n return value === undefined;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isUndefined);\n\n/***/ }),\n/* 93 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * 判断是否HTML元素\n * @return {Boolean} 是否HTML元素\n */\nvar isElement = function (o) {\n return o instanceof Element || o instanceof HTMLDocument;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (isElement);\n\n/***/ }),\n/* 94 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = requestAnimationFrame;\nfunction requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame || window.webkitRequestAnimationFrame ||\n // @ts-ignore\n window.mozRequestAnimationFrame ||\n // @ts-ignore\n window.msRequestAnimationFrame || function (f) {\n return setTimeout(f, 16);\n };\n return method(fn);\n}\n;\n\n/***/ }),\n/* 95 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = cancelAnimationFrame;\nfunction cancelAnimationFrame(handler) {\n var method = window.cancelAnimationFrame || window.webkitCancelAnimationFrame ||\n // @ts-ignore\n window.mozCancelAnimationFrame ||\n // @ts-ignore\n window.msCancelAnimationFrame || clearTimeout;\n method(handler);\n}\n;\n\n/***/ }),\n/* 96 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar augment = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var c = args[0];\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(obj)) {\n obj = obj.prototype;\n }\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(c.prototype, obj);\n }\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (augment);\n\n/***/ }),\n/* 97 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n\nvar clone = function (obj) {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n var rst;\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(obj)) {\n rst = [];\n for (var i = 0, l = obj.length; i < l; i++) {\n if (typeof obj[i] === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n } else {\n rst[i] = obj[i];\n }\n }\n } else {\n rst = {};\n for (var k in obj) {\n if (typeof obj[k] === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n } else {\n rst[k] = obj[k];\n }\n }\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (clone);\n\n/***/ }),\n/* 98 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nfunction debounce(func, wait, immediate) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (debounce);\n\n/***/ }),\n/* 99 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);\n\n\nvar MAX_MIX_LEVEL = 5;\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n if (value !== null && Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(value)) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(dist[key])) {\n dist[key] = {};\n }\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n } else {\n dist[key] = src[key];\n }\n } else if (Object(__WEBPACK_IMPORTED_MODULE_0__is_array__[\"a\" /* default */])(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n } else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n// todo 重写\nvar deepMix = function (rst) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < args.length; i += 1) {\n _deepMix(rst, args[i]);\n }\n return rst;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (deepMix);\n\n/***/ }),\n/* 100 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mix__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_function__ = __webpack_require__(2);\n\n\nvar extend = function (subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__is_function__[\"a\" /* default */])(superclass)) {\n overrides = superclass;\n superclass = subclass;\n subclass = function () {};\n }\n var create = Object.create ? function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } : function (proto, c) {\n function Tmp() {}\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n subclass.prototype = Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(superObj, subclass.prototype); // 指定子类的prototype\n subclass.superclass = create(superclass.prototype, superclass);\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(superObj, overrides);\n Object(__WEBPACK_IMPORTED_MODULE_0__mix__[\"a\" /* default */])(subclass, staticOverrides);\n return subclass;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (extend);\n\n/***/ }),\n/* 101 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar indexOf = function (arr, obj) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n return -1;\n }\n var m = Array.prototype.indexOf;\n if (m) {\n return m.call(arr, obj);\n }\n var index = -1;\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === obj) {\n index = i;\n break;\n }\n }\n return index;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (indexOf);\n\n/***/ }),\n/* 102 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__get_type__ = __webpack_require__(30);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_prototype__ = __webpack_require__(31);\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(value)) {\n return true;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(value)) {\n return !value.length;\n }\n var type = Object(__WEBPACK_IMPORTED_MODULE_2__get_type__[\"a\" /* default */])(value);\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_3__is_prototype__[\"a\" /* default */])(value)) {\n return !Object.keys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (isEmpty);\n\n/***/ }),\n/* 103 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_function__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_equal__ = __webpack_require__(33);\n\n\n/**\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [fn] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * isEqualWith(array, other, customizer); // => true\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value, other, fn) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_function__[\"a\" /* default */])(fn)) {\n return Object(__WEBPACK_IMPORTED_MODULE_1__is_equal__[\"a\" /* default */])(value, other);\n }\n return !!fn(value, other);\n});\n\n/***/ }),\n/* 104 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\nvar map = function (arr, func) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(arr)) {\n // @ts-ignore\n return arr;\n }\n var result = [];\n for (var index = 0; index < arr.length; index++) {\n var value = arr[index];\n result.push(func(value, index));\n }\n return result;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (map);\n\n/***/ }),\n/* 105 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_object__ = __webpack_require__(12);\n\n\nvar identity = function (v) {\n return v;\n};\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (object, func) {\n if (func === void 0) {\n func = identity;\n }\n var r = {};\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_object__[\"a\" /* default */])(object) && !Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(object)) {\n Object.keys(object).forEach(function (key) {\n // @ts-ignore\n r[key] = func(object[key], key);\n });\n }\n return r;\n});\n\n/***/ }),\n/* 106 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param key\n * @param defaultValue\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, key, defaultValue) {\n var p = 0;\n var keyArr = Object(__WEBPACK_IMPORTED_MODULE_0__is_string__[\"a\" /* default */])(key) ? key.split('.') : key;\n while (obj && p < keyArr.length) {\n obj = obj[keyArr[p++]];\n }\n return obj === undefined || p < keyArr.length ? defaultValue : obj;\n});\n\n/***/ }),\n/* 107 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_object__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__is_number__ = __webpack_require__(5);\n\n\n\n/**\n * https://github.com/developit/dlv/blob/master/index.js\n * @param obj\n * @param path\n * @param value\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, path, value) {\n var o = obj;\n var keyArr = Object(__WEBPACK_IMPORTED_MODULE_1__is_string__[\"a\" /* default */])(path) ? path.split('.') : path;\n keyArr.forEach(function (key, idx) {\n // 不是最后一个\n if (idx < keyArr.length - 1) {\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__is_object__[\"a\" /* default */])(o[key])) {\n o[key] = Object(__WEBPACK_IMPORTED_MODULE_2__is_number__[\"a\" /* default */])(keyArr[idx + 1]) ? [] : {};\n }\n o = o[key];\n } else {\n o[key] = value;\n }\n });\n return obj;\n});\n\n/***/ }),\n/* 108 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__each__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_plain_object__ = __webpack_require__(10);\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (object, keys) {\n if (object === null || !Object(__WEBPACK_IMPORTED_MODULE_1__is_plain_object__[\"a\" /* default */])(object)) {\n return {};\n }\n var result = {};\n Object(__WEBPACK_IMPORTED_MODULE_0__each__[\"a\" /* default */])(keys, function (key) {\n if (hasOwnProperty.call(object, key)) {\n result[key] = object[key];\n }\n });\n return result;\n});\n\n/***/ }),\n/* 109 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reduce__ = __webpack_require__(25);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (obj, keys) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__reduce__[\"a\" /* default */])(obj, function (r, curr, key) {\n if (!keys.includes(key)) {\n r[key] = curr;\n }\n return r;\n }, {});\n});\n\n/***/ }),\n/* 110 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n var later = function () {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n var throttled = function () {\n var now = Date.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n throttled.cancel = function () {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n return throttled;\n});\n\n/***/ }),\n/* 111 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_array_like__ = __webpack_require__(1);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0__is_array_like__[\"a\" /* default */])(value) ? Array.prototype.slice.call(value) : [];\n});\n\n/***/ }),\n/* 112 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nvar map = {};\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (prefix) {\n prefix = prefix || 'g';\n if (!map[prefix]) {\n map[prefix] = 1;\n } else {\n map[prefix] += 1;\n }\n return prefix + map[prefix];\n});\n\n/***/ }),\n/* 113 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function () {});\n\n/***/ }),\n/* 114 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (v) {\n return v;\n});\n\n/***/ }),\n/* 115 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = size;\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_nil__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__is_array_like__ = __webpack_require__(1);\n\n\nfunction size(o) {\n if (Object(__WEBPACK_IMPORTED_MODULE_0__is_nil__[\"a\" /* default */])(o)) {\n return 0;\n }\n if (Object(__WEBPACK_IMPORTED_MODULE_1__is_array_like__[\"a\" /* default */])(o)) {\n return o.length;\n }\n return Object.keys(o).length;\n}\n\n/***/ }),\n/* 116 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export __extends */\n/* unused harmony export __assign */\n/* unused harmony export __rest */\n/* unused harmony export __decorate */\n/* unused harmony export __param */\n/* unused harmony export __esDecorate */\n/* unused harmony export __runInitializers */\n/* unused harmony export __propKey */\n/* unused harmony export __setFunctionName */\n/* unused harmony export __metadata */\n/* unused harmony export __awaiter */\n/* unused harmony export __generator */\n/* unused harmony export __createBinding */\n/* unused harmony export __exportStar */\n/* unused harmony export __values */\n/* unused harmony export __read */\n/* unused harmony export __spread */\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = __spreadArrays;\n/* unused harmony export __spreadArray */\n/* unused harmony export __await */\n/* unused harmony export __asyncGenerator */\n/* unused harmony export __asyncDelegator */\n/* unused harmony export __asyncValues */\n/* unused harmony export __makeTemplateObject */\n/* unused harmony export __importStar */\n/* unused harmony export __importDefault */\n/* unused harmony export __classPrivateFieldGet */\n/* unused harmony export __classPrivateFieldSet */\n/* unused harmony export __classPrivateFieldIn */\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nfunction __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nfunction __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.push(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.push(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nfunction __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nfunction __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nfunction __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nfunction __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nvar __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nfunction __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nfunction __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nfunction __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nfunction __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nfunction __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nfunction __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nfunction __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nfunction __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nfunction __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nfunction __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\n/***/ }),\n/* 117 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_string__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__to_string__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__measure_text_width__ = __webpack_require__(34);\n\n\n\n/**\n * 获取文本的 ... 文本。\n * 算法(减少每次 measureText 的长度,measureText 的性能跟字符串时间相关):\n * 1. 先通过 STEP 逐步计算,找到最后一个小于 maxWidth 的字符串\n * 2. 然后对最后这个字符串二分计算\n * @param text 需要计算的文本, 由于历史原因 除了支持string,还支持空值,number和数组等\n * @param maxWidth 最大宽度\n * @param font 字体\n * @param str 要替换的文本\n */\n/* harmony default export */ __webpack_exports__[\"a\"] = (function (text, maxWidth, font, str) {\n if (str === void 0) {\n str = '...';\n }\n var STEP = 16; // 每次 16,调参工程师\n var PLACEHOLDER_WIDTH = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(str, font);\n var leftText = !Object(__WEBPACK_IMPORTED_MODULE_0__is_string__[\"a\" /* default */])(text) ? Object(__WEBPACK_IMPORTED_MODULE_1__to_string__[\"a\" /* default */])(text) : text;\n var leftWidth = maxWidth;\n var r = []; // 最终的分段字符串\n var currentText;\n var currentWidth;\n if (Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(text, font) <= maxWidth) {\n return text;\n }\n // 首先通过 step 计算,找出最大的未超出长度的\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, STEP);\n // 计算宽度\n currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n if (currentWidth > leftWidth) {\n break;\n }\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(STEP);\n // 字符串整体没有超出\n if (!leftText) {\n return r.join('');\n }\n }\n // 最下的最后一个 STEP,使用 1 递增(用二分效果更高)\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // 更新字符串\n currentText = leftText.substr(0, 1);\n // 计算宽度\n currentWidth = Object(__WEBPACK_IMPORTED_MODULE_2__measure_text_width__[\"a\" /* default */])(currentText, font);\n // 超出剩余宽度,则停止\n if (currentWidth + PLACEHOLDER_WIDTH > leftWidth) {\n break;\n }\n r.push(currentText);\n // 没有超出,则计算剩余宽度\n leftWidth -= currentWidth;\n leftText = leftText.substr(1);\n if (!leftText) {\n return r.join('');\n }\n }\n return \"\" + r.join('') + str;\n});\n\n/***/ }),\n/* 118 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * k-v 存储\n */\nvar default_1 = /** @class */function () {\n function default_1() {\n this.map = {};\n }\n default_1.prototype.has = function (key) {\n return this.map[key] !== undefined;\n };\n default_1.prototype.get = function (key, def) {\n var v = this.map[key];\n return v === undefined ? def : v;\n };\n default_1.prototype.set = function (key, value) {\n this.map[key] = value;\n };\n default_1.prototype.clear = function () {\n this.map = {};\n };\n default_1.prototype.delete = function (key) {\n delete this.map[key];\n };\n default_1.prototype.size = function () {\n return Object.keys(this.map).length;\n };\n return default_1;\n}();\n/* harmony default export */ __webpack_exports__[\"a\"] = (default_1);\n\n/***/ }),\n/* 119 */\n/***/ (function(module, exports) {\n\n// wrap tree node\nfunction WrappedTree(w, h, y, c) {\n if (c === void 0) {\n c = [];\n }\n var me = this;\n // size\n me.w = w || 0;\n me.h = h || 0;\n\n // position\n me.y = y || 0;\n me.x = 0;\n\n // children\n me.c = c || [];\n me.cs = c.length;\n\n // modified\n me.prelim = 0;\n me.mod = 0;\n me.shift = 0;\n me.change = 0;\n\n // left/right tree\n me.tl = null;\n me.tr = null;\n\n // extreme left/right tree\n me.el = null;\n me.er = null;\n\n // modified left/right tree\n me.msel = 0;\n me.mser = 0;\n}\nWrappedTree.fromNode = function (root, isHorizontal) {\n if (!root) return null;\n var children = [];\n root.children.forEach(function (child) {\n children.push(WrappedTree.fromNode(child, isHorizontal));\n });\n if (isHorizontal) return new WrappedTree(root.height, root.width, root.x, children);\n return new WrappedTree(root.width, root.height, root.y, children);\n};\n\n// node utils\nfunction moveRight(node, move, isHorizontal) {\n if (isHorizontal) {\n node.y += move;\n } else {\n node.x += move;\n }\n node.children.forEach(function (child) {\n moveRight(child, move, isHorizontal);\n });\n}\nfunction getMin(node, isHorizontal) {\n var res = isHorizontal ? node.y : node.x;\n node.children.forEach(function (child) {\n res = Math.min(getMin(child, isHorizontal), res);\n });\n return res;\n}\nfunction normalize(node, isHorizontal) {\n var min = getMin(node, isHorizontal);\n moveRight(node, -min, isHorizontal);\n}\nfunction convertBack(converted /* WrappedTree */, root /* TreeNode */, isHorizontal) {\n if (isHorizontal) {\n root.y = converted.x;\n } else {\n root.x = converted.x;\n }\n converted.c.forEach(function (child, i) {\n convertBack(child, root.children[i], isHorizontal);\n });\n}\nfunction layer(node, isHorizontal, d) {\n if (d === void 0) {\n d = 0;\n }\n if (isHorizontal) {\n node.x = d;\n d += node.width;\n } else {\n node.y = d;\n d += node.height;\n }\n node.children.forEach(function (child) {\n layer(child, isHorizontal, d);\n });\n}\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n var isHorizontal = options.isHorizontal;\n function firstWalk(t) {\n if (t.cs === 0) {\n setExtremes(t);\n return;\n }\n firstWalk(t.c[0]);\n var ih = updateIYL(bottom(t.c[0].el), 0, null);\n for (var i = 1; i < t.cs; ++i) {\n firstWalk(t.c[i]);\n var min = bottom(t.c[i].er);\n separate(t, i, ih);\n ih = updateIYL(min, i, ih);\n }\n positionRoot(t);\n setExtremes(t);\n }\n function setExtremes(t) {\n if (t.cs === 0) {\n t.el = t;\n t.er = t;\n t.msel = t.mser = 0;\n } else {\n t.el = t.c[0].el;\n t.msel = t.c[0].msel;\n t.er = t.c[t.cs - 1].er;\n t.mser = t.c[t.cs - 1].mser;\n }\n }\n function separate(t, i, ih) {\n var sr = t.c[i - 1];\n var mssr = sr.mod;\n var cl = t.c[i];\n var mscl = cl.mod;\n while (sr !== null && cl !== null) {\n if (bottom(sr) > ih.low) ih = ih.nxt;\n var dist = mssr + sr.prelim + sr.w - (mscl + cl.prelim);\n if (dist > 0) {\n mscl += dist;\n moveSubtree(t, i, ih.index, dist);\n }\n var sy = bottom(sr);\n var cy = bottom(cl);\n if (sy <= cy) {\n sr = nextRightContour(sr);\n if (sr !== null) mssr += sr.mod;\n }\n if (sy >= cy) {\n cl = nextLeftContour(cl);\n if (cl !== null) mscl += cl.mod;\n }\n }\n if (!sr && !!cl) {\n setLeftThread(t, i, cl, mscl);\n } else if (!!sr && !cl) {\n setRightThread(t, i, sr, mssr);\n }\n }\n function moveSubtree(t, i, si, dist) {\n t.c[i].mod += dist;\n t.c[i].msel += dist;\n t.c[i].mser += dist;\n distributeExtra(t, i, si, dist);\n }\n function nextLeftContour(t) {\n return t.cs === 0 ? t.tl : t.c[0];\n }\n function nextRightContour(t) {\n return t.cs === 0 ? t.tr : t.c[t.cs - 1];\n }\n function bottom(t) {\n return t.y + t.h;\n }\n function setLeftThread(t, i, cl, modsumcl) {\n var li = t.c[0].el;\n li.tl = cl;\n var diff = modsumcl - cl.mod - t.c[0].msel;\n li.mod += diff;\n li.prelim -= diff;\n t.c[0].el = t.c[i].el;\n t.c[0].msel = t.c[i].msel;\n }\n function setRightThread(t, i, sr, modsumsr) {\n var ri = t.c[i].er;\n ri.tr = sr;\n var diff = modsumsr - sr.mod - t.c[i].mser;\n ri.mod += diff;\n ri.prelim -= diff;\n t.c[i].er = t.c[i - 1].er;\n t.c[i].mser = t.c[i - 1].mser;\n }\n function positionRoot(t) {\n t.prelim = (t.c[0].prelim + t.c[0].mod + t.c[t.cs - 1].mod + t.c[t.cs - 1].prelim + t.c[t.cs - 1].w) / 2 - t.w / 2;\n }\n function secondWalk(t, modsum) {\n modsum += t.mod;\n t.x = t.prelim + modsum;\n addChildSpacing(t);\n for (var i = 0; i < t.cs; i++) {\n secondWalk(t.c[i], modsum);\n }\n }\n function distributeExtra(t, i, si, dist) {\n if (si !== i - 1) {\n var nr = i - si;\n t.c[si + 1].shift += dist / nr;\n t.c[i].shift -= dist / nr;\n t.c[i].change -= dist - dist / nr;\n }\n }\n function addChildSpacing(t) {\n var d = 0;\n var modsumdelta = 0;\n for (var i = 0; i < t.cs; i++) {\n d += t.c[i].shift;\n modsumdelta += d + t.c[i].change;\n t.c[i].mod += modsumdelta;\n }\n }\n function updateIYL(low, index, ih) {\n while (ih !== null && low >= ih.low) {\n ih = ih.nxt;\n }\n return {\n low: low,\n index: index,\n nxt: ih\n };\n }\n\n // do layout\n layer(root, isHorizontal);\n var wt = WrappedTree.fromNode(root, isHorizontal);\n firstWalk(wt);\n secondWalk(wt, 0);\n convertBack(wt, root, isHorizontal);\n normalize(root, isHorizontal);\n return root;\n};\n\n/***/ }),\n/* 120 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar dendrogram = __webpack_require__(121);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar DendrogramLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(DendrogramLayout, _TreeLayout);\n function DendrogramLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = DendrogramLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n me.rootNode.width = 0;\n return doTreeLayout(me.rootNode, me.options, dendrogram);\n };\n return DendrogramLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction dendrogramLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new DendrogramLayout(root, options).execute();\n}\nmodule.exports = dendrogramLayout;\n\n/***/ }),\n/* 121 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// wrap tree node\n// TODO considering size\nvar util = __webpack_require__(6);\nfunction WrappedTree(height, children) {\n if (height === void 0) {\n height = 0;\n }\n if (children === void 0) {\n children = [];\n }\n var me = this;\n me.x = me.y = 0;\n me.leftChild = me.rightChild = null;\n me.height = 0;\n me.children = children;\n}\nvar DEFAULT_OPTIONS = {\n isHorizontal: true,\n nodeSep: 20,\n nodeSize: 20,\n rankSep: 200,\n subTreeSep: 10\n};\nfunction convertBack(converted /* WrappedTree */, root /* TreeNode */, isHorizontal) {\n if (isHorizontal) {\n root.x = converted.x;\n root.y = converted.y;\n } else {\n root.x = converted.y;\n root.y = converted.x;\n }\n converted.children.forEach(function (child, i) {\n convertBack(child, root.children[i], isHorizontal);\n });\n}\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n var maxDepth = 0;\n function wrappedTreeFromNode(n) {\n if (!n) return null;\n n.width = 0;\n if (n.depth && n.depth > maxDepth) {\n maxDepth = n.depth; // get the max depth\n }\n\n var children = n.children;\n var childrenCount = children.length;\n var t = new WrappedTree(n.height, []);\n children.forEach(function (child, i) {\n var childWT = wrappedTreeFromNode(child);\n t.children.push(childWT);\n if (i === 0) {\n // t.leftChild = childWT.leftChild ? childWT.leftChild : childWT\n t.leftChild = childWT;\n }\n if (i === childrenCount - 1) {\n // t.rightChild = childWT.rightChild ? childWT.rightChild : childWT\n t.rightChild = childWT;\n }\n });\n t.originNode = n;\n t.isLeaf = n.isLeaf();\n return t;\n }\n function getDrawingDepth(t) {\n if (t.isLeaf || t.children.length === 0) {\n t.drawingDepth = maxDepth;\n } else {\n var depths = t.children.map(function (child) {\n return getDrawingDepth(child);\n });\n var minChildDepth = Math.min.apply(null, depths);\n t.drawingDepth = minChildDepth - 1;\n }\n return t.drawingDepth;\n }\n var prevLeaf;\n function position(t) {\n t.x = t.drawingDepth * options.rankSep;\n if (t.isLeaf) {\n t.y = 0;\n if (prevLeaf) {\n t.y = prevLeaf.y + prevLeaf.height + options.nodeSep;\n if (t.originNode.parent !== prevLeaf.originNode.parent) {\n t.y += options.subTreeSep;\n }\n }\n prevLeaf = t;\n } else {\n t.children.forEach(function (child) {\n position(child);\n });\n t.y = (t.leftChild.y + t.rightChild.y) / 2;\n }\n }\n\n // wrap node\n var wt = wrappedTreeFromNode(root);\n // get depth for drawing\n getDrawingDepth(wt);\n // get position\n position(wt);\n // get x, y\n convertBack(wt, root, options.isHorizontal);\n return root;\n};\n\n/***/ }),\n/* 122 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar indentedTree = __webpack_require__(123);\nvar separateTree = __webpack_require__(35);\nvar util = __webpack_require__(6);\nvar VALID_DIRECTIONS = ['LR',\n// left to right\n'RL',\n// right to left\n'H' // horizontal\n];\n\nvar DEFAULT_DIRECTION = VALID_DIRECTIONS[0];\nvar IndentedLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(IndentedLayout, _TreeLayout);\n function IndentedLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = IndentedLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n var options = me.options;\n var root = me.rootNode;\n options.isHorizontal = true;\n // default indent 20 and sink first children;\n var _options$indent = options.indent,\n indent = _options$indent === void 0 ? 20 : _options$indent,\n _options$dropCap = options.dropCap,\n dropCap = _options$dropCap === void 0 ? true : _options$dropCap,\n _options$direction = options.direction,\n direction = _options$direction === void 0 ? DEFAULT_DIRECTION : _options$direction,\n align = options.align;\n if (direction && VALID_DIRECTIONS.indexOf(direction) === -1) {\n throw new TypeError(\"Invalid direction: \" + direction);\n }\n if (direction === VALID_DIRECTIONS[0]) {\n // LR\n indentedTree(root, indent, dropCap, align);\n } else if (direction === VALID_DIRECTIONS[1]) {\n // RL\n indentedTree(root, indent, dropCap, align);\n root.right2left();\n } else if (direction === VALID_DIRECTIONS[2]) {\n // H\n // separate into left and right trees\n var _separateTree = separateTree(root, options),\n left = _separateTree.left,\n right = _separateTree.right;\n indentedTree(left, indent, dropCap, align);\n left.right2left();\n indentedTree(right, indent, dropCap, align);\n var bbox = left.getBoundingBox();\n right.translate(bbox.width, 0);\n root.x = right.x - root.width / 2;\n }\n return root;\n };\n return IndentedLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction indentedLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new IndentedLayout(root, options).execute();\n}\nmodule.exports = indentedLayout;\n\n/***/ }),\n/* 123 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(6);\nfunction positionNode(node, previousNode, indent, dropCap, align) {\n // caculate the node's horizontal offset DX, dx's type might be number or function\n var displacementX = typeof indent === \"function\" ? indent(node) : indent * node.depth;\n if (!dropCap) {\n try {\n if (node.id === node.parent.children[0].id) {\n node.x += displacementX;\n node.y = previousNode ? previousNode.y : 0;\n return;\n }\n } catch (e) {\n // skip to normal when a node has no parent\n }\n }\n node.x += displacementX;\n if (previousNode) {\n node.y = previousNode.y + util.getHeight(previousNode, node, align);\n if (previousNode.parent && node.parent.id !== previousNode.parent.id) {\n // previous node has different parent\n var prevParent = previousNode.parent;\n var preY = prevParent.y + util.getHeight(prevParent, node, align);\n node.y = preY > node.y ? preY : node.y;\n }\n } else {\n node.y = 0;\n }\n return;\n}\nmodule.exports = function (root, indent, dropCap, align) {\n var previousNode = null;\n root.eachNode(function (node) {\n positionNode(node, previousNode, indent, dropCap, align);\n previousNode = node;\n });\n};\n\n/***/ }),\n/* 124 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nvar TreeLayout = __webpack_require__(11);\nvar mindmap = __webpack_require__(125);\nvar doTreeLayout = __webpack_require__(17);\nvar util = __webpack_require__(6);\nvar MindmapLayout = /*#__PURE__*/function (_TreeLayout) {\n _inheritsLoose(MindmapLayout, _TreeLayout);\n function MindmapLayout() {\n return _TreeLayout.apply(this, arguments) || this;\n }\n var _proto = MindmapLayout.prototype;\n _proto.execute = function execute() {\n var me = this;\n return doTreeLayout(me.rootNode, me.options, mindmap);\n };\n return MindmapLayout;\n}(TreeLayout);\nvar DEFAULT_OPTIONS = {};\nfunction mindmapLayout(root, options) {\n options = util.assign({}, DEFAULT_OPTIONS, options);\n return new MindmapLayout(root, options).execute();\n}\nmodule.exports = mindmapLayout;\n\n/***/ }),\n/* 125 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar util = __webpack_require__(6);\nfunction secondWalk(node, options) {\n var totalHeight = 0;\n if (!node.children.length) {\n totalHeight = node.height;\n } else {\n node.children.forEach(function (c) {\n totalHeight += secondWalk(c, options);\n });\n }\n node._subTreeSep = options.getSubTreeSep(node.data);\n node.totalHeight = Math.max(node.height, totalHeight) + 2 * node._subTreeSep;\n return node.totalHeight;\n}\nfunction thirdWalk(node) {\n var children = node.children;\n var len = children.length;\n if (len) {\n children.forEach(function (c) {\n thirdWalk(c);\n });\n var first = children[0];\n var last = children[len - 1];\n var childrenHeight = last.y - first.y + last.height;\n var childrenTotalHeight = 0;\n children.forEach(function (child) {\n childrenTotalHeight += child.totalHeight;\n });\n if (childrenHeight > node.height) {\n // 当子节点总高度大于父节点高度\n node.y = first.y + childrenHeight / 2 - node.height / 2;\n } else if (children.length !== 1 || node.height > childrenTotalHeight) {\n // 多于一个子节点或者父节点大于所有子节点的总高度\n var offset = node.y + (node.height - childrenHeight) / 2 - first.y;\n children.forEach(function (c) {\n c.translate(0, offset);\n });\n } else {\n // 只有一个子节点\n node.y = (first.y + first.height / 2 + last.y + last.height / 2) / 2 - node.height / 2;\n }\n }\n}\nvar DEFAULT_OPTIONS = {\n getSubTreeSep: function getSubTreeSep() {\n return 0;\n }\n};\nmodule.exports = function (root, options) {\n if (options === void 0) {\n options = {};\n }\n options = util.assign({}, DEFAULT_OPTIONS, options);\n root.parent = {\n x: 0,\n width: 0,\n height: 0,\n y: 0\n };\n // first walk\n root.BFTraverse(function (node) {\n node.x = node.parent.x + node.parent.width; // simply get x\n });\n\n root.parent = null;\n // second walk\n secondWalk(root, options); // assign sub tree totalHeight\n // adjusting\n // separating nodes\n root.startY = 0;\n root.y = root.totalHeight / 2 - root.height / 2;\n root.eachNode(function (node) {\n var children = node.children;\n var len = children.length;\n if (len) {\n var first = children[0];\n first.startY = node.startY + node._subTreeSep;\n if (len === 1) {\n first.y = node.y + node.height / 2 - first.height / 2;\n } else {\n first.y = first.startY + first.totalHeight / 2 - first.height / 2;\n for (var i = 1; i < len; i++) {\n var c = children[i];\n c.startY = children[i - 1].startY + children[i - 1].totalHeight;\n c.y = c.startY + c.totalHeight / 2 - c.height / 2;\n }\n }\n }\n });\n\n // third walk\n thirdWalk(root);\n};\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=hierarchy.js.map","import { Util } from '@antv/g6-core';\nimport { isNumber } from '@antv/util';\nvar traverseTree = Util.traverseTree;\n/**\n * 将 number | Function 类型的参数转换为 return number 的 Function\n * @param {number | Function} value 需要被转换的值\n * @param {number} defaultV 返回函数的默认返回值\n * @return {Function} 转换后的函数\n */\nexport var proccessToFunc = function proccessToFunc(value, defaultV) {\n var func;\n if (!value) {\n func = function func(d) {\n return defaultV || 1;\n };\n } else if (isNumber(value)) {\n func = function func(d) {\n return value;\n };\n } else {\n func = value;\n }\n return func;\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 需要被转换的值\n * @param {EdgeConfig[]} edges 返回函数的默认返回值\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureData = function buildTextureData(nodes, edges) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i];\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = dests.length;\n maxEdgePerVetex = Math.max(maxEdgePerVetex, dests.length);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组,每条边带有一个属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 节点数组\n * @param {EdgeConfig[]} edges 边数组\n * @param {Function} attrs 读取边属性的函数\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureDataWithOneEdgeAttr = function buildTextureDataWithOneEdgeAttr(nodes, edges, attrs) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.source]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n nodeDict[mapIdPos[e.target]].push(attrs(e)); // 理想边长,后续可以改成每条边不同\n }\n\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n dataArray[i * 4 + 2] = offset;\n dataArray[i * 4 + 3] = len / 2; // 第四位存储与该节点相关的所有节点个数\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 2);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * 将节点和边数据转换为 GPU 可读的数组,每条边带有一个以上属性。并返回 maxEdgePerVetex,每个节点上最多的边数\n * @param {NodeConfig[]} nodes 节点数组\n * @param {EdgeConfig[]} edges 边数组\n * @param {Function} attrs 读取边属性的函数\n * @return {Object} 转换后的数组及 maxEdgePerVetex 组成的对象\n */\nexport var buildTextureDataWithTwoEdgeAttr = function buildTextureDataWithTwoEdgeAttr(nodes, edges, attrs1, attrs2) {\n var dataArray = [];\n var nodeDict = [];\n var mapIdPos = {};\n var i = 0;\n for (i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n mapIdPos[n.id] = i;\n dataArray.push(n.x);\n dataArray.push(n.y);\n dataArray.push(0);\n dataArray.push(0);\n nodeDict.push([]);\n }\n for (i = 0; i < edges.length; i++) {\n var e = edges[i];\n nodeDict[mapIdPos[e.source]].push(mapIdPos[e.target]);\n nodeDict[mapIdPos[e.source]].push(attrs1(e));\n nodeDict[mapIdPos[e.source]].push(attrs2(e));\n nodeDict[mapIdPos[e.source]].push(0);\n nodeDict[mapIdPos[e.target]].push(mapIdPos[e.source]);\n nodeDict[mapIdPos[e.target]].push(attrs1(e));\n nodeDict[mapIdPos[e.target]].push(attrs2(e));\n nodeDict[mapIdPos[e.target]].push(0);\n }\n var maxEdgePerVetex = 0;\n for (i = 0; i < nodes.length; i++) {\n var offset = dataArray.length;\n var dests = nodeDict[i]; // dest 中节点 id 与边长间隔存储,即一位节点 id,一位边长……\n var len = dests.length;\n // dataArray[i * 4 + 2] = offset;\n // dataArray[i * 4 + 3] = len / 4; // 第四位存储与该节点相关的所有节点个数\n // pack offset & length into float32: offset 20bit, length 12bit\n dataArray[i * 4 + 2] = offset + 1048576 * len / 4;\n dataArray[i * 4 + 3] = 0; // 第四位存储与上一次的距离差值\n maxEdgePerVetex = Math.max(maxEdgePerVetex, len / 4);\n for (var j = 0; j < len; ++j) {\n var dest = dests[j];\n dataArray.push(+dest);\n }\n }\n // 不是 4 的倍数,填充 0\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n return {\n array: new Float32Array(dataArray),\n maxEdgePerVetex: maxEdgePerVetex\n };\n};\n/**\n * transform the extended attributes of nodes or edges to a texture array\n * @param {string[]} attributeNames attributes' name to be read from items and put into output array\n * @param {ModelConfig[]} items the items to be read\n * @return {Float32Array} the attributes' value array to be read by GPU\n */\nexport var attributesToTextureData = function attributesToTextureData(attributeNames, items) {\n var dataArray = [];\n var attributeNum = attributeNames.length;\n var attributeStringMap = {};\n items.forEach(function (item) {\n attributeNames.forEach(function (name, i) {\n if (attributeStringMap[item[name]] === undefined) {\n attributeStringMap[item[name]] = Object.keys(attributeStringMap).length;\n }\n dataArray.push(attributeStringMap[item[name]]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n });\n return {\n array: new Float32Array(dataArray),\n count: Object.keys(attributeStringMap).length\n };\n};\n/**\n * transform the number array format of extended attributes of nodes or edges to a texture array\n * @param {string[]} attributeNames attributes' name to be read from items and put into output array\n * @return {Float32Array} the attributes' value array to be read by GPU\n */\nexport var arrayToTextureData = function arrayToTextureData(valueArrays) {\n var dataArray = [];\n var attributeNum = valueArrays.length;\n var itemNum = valueArrays[0].length;\n var _loop_1 = function _loop_1(j) {\n valueArrays.forEach(function (valueArray, i) {\n dataArray.push(valueArray[j]);\n // insure each node's attributes take inter number of grids\n if (i === attributeNum - 1) {\n while (dataArray.length % 4 !== 0) {\n dataArray.push(0);\n }\n }\n });\n };\n for (var j = 0; j < itemNum; j++) {\n _loop_1(j);\n }\n return new Float32Array(dataArray);\n};\n/**\n *\n * @param data Tree graph data\n * @param layout\n */\nexport var radialLayout = function radialLayout(data, layout) {\n // 布局方式有 H / V / LR / RL / TB / BT\n var VERTICAL_LAYOUTS = ['V', 'TB', 'BT'];\n var min = {\n x: Infinity,\n y: Infinity\n };\n var max = {\n x: -Infinity,\n y: -Infinity\n };\n // 默认布局是垂直布局TB,此时x对应rad,y对应r\n var rScale = 'x';\n var radScale = 'y';\n if (layout && VERTICAL_LAYOUTS.indexOf(layout) >= 0) {\n // 若是水平布局,y对应rad,x对应r\n radScale = 'x';\n rScale = 'y';\n }\n var count = 0;\n traverseTree(data, function (node) {\n count++;\n if (node.x > max.x) {\n max.x = node.x;\n }\n if (node.x < min.x) {\n min.x = node.x;\n }\n if (node.y > max.y) {\n max.y = node.y;\n }\n if (node.y < min.y) {\n min.y = node.y;\n }\n return true;\n });\n var avgRad = Math.PI * 2 / count;\n var radDiff = max[radScale] - min[radScale];\n if (radDiff === 0) {\n return data;\n }\n traverseTree(data, function (node) {\n var radial = (node[radScale] - min[radScale]) / radDiff * (Math.PI * 2 - avgRad) + avgRad;\n var r = Math.abs(rScale === 'x' ? node.x - data.x : node.y - data.y);\n node.x = r * Math.cos(radial);\n node.y = r * Math.sin(radial);\n return true;\n });\n return data;\n};","/**\n * 调用 gpuDetector.webgl 判断当前浏览器是否支持 webgl。(支持 gpgpu 的浏览器一定也支持 webgl)\n */\nexport var gpuDetector = function gpuDetector() {\n if (typeof window === 'undefined' || typeof document === 'undefined') return {};\n return {\n canvas: !!window.CanvasRenderingContext2D,\n webgl: function () {\n try {\n var canvas = document.createElement('canvas');\n return !!(window.WebGLRenderingContext && (canvas.getContext('webgl') || canvas.getContext('experimental-webgl')));\n } catch (e) {\n return false;\n }\n }(),\n workers: !!window.Worker,\n fileapi: window.File && window.FileReader && window.FileList && window.Blob,\n getWebGLErrorMessage: function getWebGLErrorMessage() {\n var element = document.createElement('div');\n element.id = 'webgl-error-message';\n element.style.fontFamily = 'monospace';\n element.style.fontSize = '13px';\n element.style.fontWeight = 'normal';\n element.style.textAlign = 'center';\n element.style.background = '#fff';\n element.style.color = '#000';\n element.style.padding = '1.5em';\n element.style.width = '400px';\n element.style.margin = '5em auto 0';\n if (!this.webgl) {\n element.innerHTML = window.WebGLRenderingContext ? ['Your graphics card does not seem to support WebGL.
', 'Find out how to get it here.'].join('\\n') : ['Your browser does not seem to support WebGL.
', 'Find out how to get it here.'].join('\\n');\n }\n return element;\n },\n addGetWebGLMessage: function addGetWebGLMessage(parameters) {\n parameters = parameters || {};\n var parent = parameters.parent !== undefined ? parameters.parent : document.body;\n var id = parameters.id !== undefined ? parameters.id : 'oldie';\n var element = gpuDetector().getWebGLErrorMessage();\n element.id = id;\n parent.appendChild(element);\n }\n };\n};","/**\n * Get current browser name.\n * @returns browser name\n */\nexport var getBrowserName = function getBrowserName() {\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf('firefox') > -1) return 'firefox';\n if (userAgent.indexOf('safari') > -1) return 'safari';\n if (userAgent.indexOf('opr') > -1) return 'opera';\n if (userAgent.indexOf('chrome') > -1) return 'chrome';\n if (userAgent.indexOf('trident') > -1) return 'ie 11';\n if (userAgent.indexOf('ie') > -1) return 'ie';\n return 'unknown';\n};","import { __assign } from \"tslib\";\nimport * as ColorUtil from './color';\nimport * as LayoutUtil from './layout';\nimport * as GpuUtil from './gpu';\nimport * as BrowserUtil from './browser';\nimport { Util } from '@antv/g6-core';\nvar G6Util = __assign(__assign(__assign(__assign(__assign({}, Util), ColorUtil), LayoutUtil), GpuUtil), BrowserUtil);\nexport default G6Util;","import Hierarchy from '@antv/hierarchy';\nimport Util from '../util';\nvar radialLayout = Util.radialLayout;\nvar TreeLayout = /** @class */function () {\n function TreeLayout(cfg) {\n this.type = cfg.type;\n this.radial = cfg.radial;\n this.config = cfg;\n }\n TreeLayout.prototype.init = function (data) {\n var _this = this;\n this.data = data;\n if (this.radial) {\n this.layoutMethod = function (data) {\n var layoutData = Hierarchy[_this.type](data, _this.config);\n radialLayout(layoutData);\n return layoutData;\n };\n return;\n }\n this.layoutMethod = function (data) {\n return Hierarchy[_this.type](data, _this.config);\n };\n };\n TreeLayout.prototype.execute = function () {\n return this.layoutMethod(this.data, this.config);\n };\n TreeLayout.prototype.layout = function (data) {\n this.init(data);\n return this.execute();\n };\n return TreeLayout;\n}();\nexport default TreeLayout;","import { Layouts as Layout, registerLayout as oRegisterLayout, GridLayout, RandomLayout, ForceLayout, CircularLayout, DagreLayout, DagreCompoundLayout, RadialLayout, ConcentricLayout, MDSLayout, FruchtermanGPULayout, FruchtermanLayout, GForceLayout, Force2Layout, GForceGPULayout, ComboForceLayout, ComboCombinedLayout, ForceAtlas2Layout } from '@antv/layout/lib';\nimport TreeLayout from './tree-layout';\noRegisterLayout('grid', GridLayout);\noRegisterLayout('random', RandomLayout);\noRegisterLayout('force', ForceLayout);\noRegisterLayout('circular', CircularLayout);\noRegisterLayout('dagre', DagreLayout);\noRegisterLayout('dagreCompound', DagreCompoundLayout);\noRegisterLayout('radial', RadialLayout);\noRegisterLayout('concentric', ConcentricLayout);\noRegisterLayout('mds', MDSLayout);\noRegisterLayout('fruchterman', FruchtermanLayout);\noRegisterLayout('fruchterman-gpu', FruchtermanGPULayout);\noRegisterLayout('gForce', GForceLayout);\noRegisterLayout('force2', Force2Layout);\noRegisterLayout('gForce-gpu', GForceGPULayout);\noRegisterLayout('comboForce', ComboForceLayout);\noRegisterLayout('comboCombined', ComboCombinedLayout);\noRegisterLayout('forceAtlas2', ForceAtlas2Layout);\nvar registerLayout = function registerLayout(name, layoutOverride) {\n layoutOverride.isCustomLayout = true;\n Layout[name] = oRegisterLayout(name, layoutOverride);\n};\nexport { TreeLayout, Layout, registerLayout };","var WebWorker = /** @class */function () {\n function WebWorker(worker, workerScirptURL) {\n var code = worker.toString();\n var blob = new Blob([\"importScripts('\".concat(workerScirptURL, \"');(\").concat(code, \")()\")], {\n type: 'text/javascript'\n });\n return new Worker(URL.createObjectURL(blob));\n }\n return WebWorker;\n}();\nexport default WebWorker;","import WebWorker from './work';\nexport var LayoutWorker = function LayoutWorker(workerScriptURL) {\n if (workerScriptURL === void 0) {\n workerScriptURL = 'https://unpkg.com/@antv/layout@0.3.23/dist/layout.min.js';\n }\n function workerCode() {\n var LAYOUT_MESSAGE = {\n // run layout\n RUN: 'LAYOUT_RUN',\n // layout ended with success\n END: 'LAYOUT_END',\n // layout error\n ERROR: 'LAYOUT_ERROR',\n // layout tick, used in force directed layout\n TICK: 'LAYOUT_TICK',\n GPURUN: 'GPU_LAYOUT_RUN',\n GPUEND: 'GPU_LAYOUT_END'\n };\n // @ts-ignore\n layout.registerLayout('grid', layout.GridLayout);\n // @ts-ignore\n layout.registerLayout('random', layout.RandomLayout);\n // @ts-ignore\n layout.registerLayout('force', layout.ForceLayout);\n // @ts-ignore\n layout.registerLayout('force2', layout.Force2Layout);\n // @ts-ignore\n layout.registerLayout('circular', layout.CircularLayout);\n // @ts-ignore\n layout.registerLayout('dagre', layout.DagreLayout);\n // @ts-ignore\n layout.registerLayout('dagreCompound', layout.DagreCompoundLayout);\n // @ts-ignore\n layout.registerLayout('radial', layout.RadialLayout);\n // @ts-ignore\n layout.registerLayout('concentric', layout.ConcentricLayout);\n // @ts-ignore\n layout.registerLayout('mds', layout.MDSLayout);\n // @ts-ignore\n layout.registerLayout('fruchterman', layout.FruchtermanLayout);\n // @ts-ignore\n layout.registerLayout('fruchterman-gpu', layout.FruchtermanGPULayout);\n // @ts-ignore\n layout.registerLayout('gForce', layout.GForceLayout);\n // @ts-ignore\n layout.registerLayout('gForce-gpu', layout.GForceGPULayout);\n // @ts-ignore\n layout.registerLayout('comboForce', layout.ComboForceLayout);\n // @ts-ignore\n layout.registerLayout('comboCombined', layout.ComboCombinedLayout);\n // @ts-ignore\n layout.registerLayout('forceAtlas2', layout.ForceAtlas2Layout);\n function isLayoutMessage(event) {\n var type = event.data.type;\n return type === LAYOUT_MESSAGE.RUN || type === LAYOUT_MESSAGE.GPURUN;\n }\n function handleLayoutMessage(event) {\n var _this = this;\n var type = event.data.type;\n switch (type) {\n case LAYOUT_MESSAGE.RUN:\n {\n var _a = event.data,\n nodes_1 = _a.nodes,\n edges = _a.edges,\n _b = _a.layoutCfg,\n layoutCfg = _b === void 0 ? {} : _b;\n var layoutType = layoutCfg.type;\n // @ts-ignore\n var LayoutClass = layout.getLayoutByName(layoutType);\n if (!LayoutClass) {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" not found\")\n });\n break;\n }\n // eslint-disable-next-line prefer-const\n var layoutMethod_1;\n layoutCfg.onLayoutEnd = function () {\n _this.postMessage({\n type: LAYOUT_MESSAGE.END,\n nodes: nodes_1\n });\n layoutMethod_1 === null || layoutMethod_1 === void 0 ? void 0 : layoutMethod_1.destroy();\n };\n layoutMethod_1 = new LayoutClass(layoutCfg);\n layoutMethod_1.init({\n nodes: nodes_1,\n edges: edges\n });\n layoutMethod_1.execute();\n break;\n }\n case LAYOUT_MESSAGE.GPURUN:\n {\n var _c = event.data,\n nodes = _c.nodes,\n edges = _c.edges,\n _d = _c.layoutCfg,\n layoutCfg = _d === void 0 ? {} : _d,\n canvas = _c.canvas;\n var layoutType = layoutCfg.type;\n // @ts-ignore\n var LayoutClass = layout.getLayoutByName(layoutType);\n if (!LayoutClass) {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" not found\")\n });\n break;\n }\n if (layoutType.split('-')[1] !== 'gpu') {\n this.postMessage({\n type: LAYOUT_MESSAGE.ERROR,\n message: \"layout \".concat(layoutType, \" does not support GPU\")\n });\n break;\n }\n var layoutMethod = new LayoutClass(layoutCfg);\n layoutMethod.init({\n nodes: nodes,\n edges: edges\n });\n layoutMethod.executeWithWorker(canvas, this);\n break;\n }\n default:\n break;\n }\n }\n onmessage = function onmessage(event) {\n if (isLayoutMessage(event)) {\n handleLayoutMessage(event);\n }\n };\n }\n var layoutWorker = new WebWorker(workerCode, workerScriptURL);\n return layoutWorker;\n};","/**\n * @fileoverview constants for layout\n * @author changzhe.zb@antfin.com\n */\n/** layout message type */\nexport var LAYOUT_MESSAGE = {\n // run layout\n RUN: 'LAYOUT_RUN',\n // layout ended with success\n END: 'LAYOUT_END',\n // layout error\n ERROR: 'LAYOUT_ERROR',\n // layout tick, used in force directed layout\n TICK: 'LAYOUT_TICK',\n GPURUN: 'GPU_LAYOUT_RUN',\n GPUEND: 'GPU_LAYOUT_END'\n};","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport { __awaiter, __extends, __generator, __rest } from \"tslib\";\nimport { AbstractLayout, Util } from '@antv/g6-core';\nimport { Layout } from '../../layout';\nimport { LayoutWorker } from '../../layout/worker/layout';\nimport { LAYOUT_MESSAGE } from '../../layout/worker/layoutConst';\nimport { gpuDetector } from '../../util/gpu';\nimport { mix, clone } from '@antv/util';\n// eslint-disable-next-line @typescript-eslint/no-implied-eval\nvar mockRaf = function mockRaf(cb) {\n return setTimeout(cb, 16);\n};\nvar mockCaf = function mockCaf(reqId) {\n return clearTimeout(reqId);\n};\nvar helper = {\n // pollyfill\n requestAnimationFrame: function requestAnimationFrame(callback) {\n var fn = typeof window !== 'undefined' ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || mockRaf : mockRaf;\n return fn(callback);\n },\n cancelAnimationFrame: function cancelAnimationFrame(requestId) {\n var fn = typeof window !== 'undefined' ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || mockCaf : mockCaf;\n return fn(requestId);\n }\n};\nvar GPU_LAYOUT_NAMES = ['fruchterman', 'gForce'];\nvar LAYOUT_PIPES_ADJUST_NAMES = ['force', 'grid', 'circular'];\nvar LayoutController = /** @class */function (_super) {\n __extends(LayoutController, _super);\n // the configurations of the layout\n // private layoutCfg: any; // LayoutOptions\n // the type name of the layout\n // private layoutType: string;\n // private data: GraphData;\n // private layoutMethods: typeof Layout;\n function LayoutController(graph) {\n var _this = _super.call(this, graph) || this;\n _this.graph = graph;\n _this.layoutCfg = graph.get('layout') || {};\n _this.layoutType = _this.getLayoutType();\n _this.worker = null;\n _this.workerData = {};\n _this.initLayout();\n return _this;\n }\n // eslint-disable-next-line class-methods-use-this\n LayoutController.prototype.initLayout = function () {\n // no data before rendering\n };\n // get layout worker and create one if not exists\n LayoutController.prototype.getWorker = function () {\n if (this.worker) {\n return this.worker;\n }\n if (typeof Worker === 'undefined') {\n // 如果当前浏览器不支持 web worker,则不使用 web worker\n console.warn('Web worker is not supported in current browser.');\n this.worker = null;\n } else {\n this.worker = LayoutWorker(this.layoutCfg.workerScriptURL);\n }\n return this.worker;\n };\n // stop layout worker\n LayoutController.prototype.stopWorker = function () {\n var workerData = this.workerData;\n if (!this.worker) {\n return;\n }\n this.worker.terminate();\n this.worker = null;\n // 重新开始新的布局之前,先取消之前布局的requestAnimationFrame。\n if (workerData.requestId) {\n helper.cancelAnimationFrame(workerData.requestId);\n workerData.requestId = null;\n }\n if (workerData.requestId2) {\n helper.cancelAnimationFrame(workerData.requestId2);\n workerData.requestId2 = null;\n }\n };\n LayoutController.prototype.execLayoutMethod = function (layoutCfg, order) {\n var _this = this;\n return new Promise(function (reslove, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var graph, layoutType, onTick_1, animate_1, isDefaultAnimateLayout_1, tick, enableTick, layoutMethod, onTick_2, tick, layoutData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n graph = this.graph;\n if (!graph || graph.get('destroyed')) return [2 /*return*/];\n layoutType = layoutCfg.type;\n // 每个布局方法都需要注册\n layoutCfg.onLayoutEnd = function () {\n graph.emit('aftersublayout', {\n type: layoutType\n });\n reslove();\n };\n // 若用户指定开启 gpu,且当前浏览器支持 webgl,且该算法存在 GPU 版本(目前仅支持 fruchterman 和 gForce),使用 gpu 版本的布局\n if (layoutType && this.isGPU) {\n if (!hasGPUVersion(layoutType)) {\n console.warn(\"The '\".concat(layoutType, \"' layout does not support GPU calculation for now, it will run in CPU.\"));\n } else {\n layoutType = \"\".concat(layoutType, \"-gpu\");\n }\n }\n if (Util.isForce(layoutType)) {\n onTick_1 = layoutCfg.onTick, animate_1 = layoutCfg.animate;\n isDefaultAnimateLayout_1 = animate_1 === undefined && (layoutType === 'force' || layoutType === 'force2');\n tick = function tick() {\n if (onTick_1) {\n onTick_1();\n }\n if (animate_1 || isDefaultAnimateLayout_1) graph.refreshPositions();\n };\n layoutCfg.tick = tick;\n } else if (layoutType === 'comboForce' || layoutType === 'comboCombined') {\n layoutCfg.comboTrees = graph.get('comboTrees');\n }\n enableTick = false;\n try {\n layoutMethod = new Layout[layoutType](layoutCfg);\n if (this.layoutMethods[order]) {\n this.layoutMethods[order].destroy();\n }\n this.layoutMethods[order] = layoutMethod;\n } catch (e) {\n console.warn(\"The layout method: '\".concat(layoutType, \"' does not exist! Please specify it first.\"));\n reject();\n }\n // 是否需要迭代的方式完成布局。这里是来自布局对象的实例属性,是由布局的定义者在布局类定义的。\n enableTick = layoutMethod.enableTick;\n if (enableTick) {\n onTick_2 = layoutCfg.onTick;\n tick = function tick() {\n if (onTick_2) {\n onTick_2();\n }\n graph.refreshPositions();\n };\n layoutMethod.tick = tick;\n }\n layoutData = this.filterLayoutData(this.data, layoutCfg);\n addLayoutOrder(layoutData, order);\n layoutMethod.init(layoutData);\n // 若存在节点没有位置信息,且没有设置 layout,在 initPositions 中 random 给出了所有节点的位置,不需要再次执行 random 布局\n // 所有节点都有位置信息,且指定了 layout,则执行布局(代表不是第一次进行布局)\n graph.emit('beforesublayout', {\n type: layoutType\n });\n return [4 /*yield*/, layoutMethod.execute()];\n case 1:\n _a.sent();\n if (layoutMethod.isCustomLayout && layoutCfg.onLayoutEnd) layoutCfg.onLayoutEnd();\n return [2 /*return*/];\n }\n });\n });\n });\n };\n\n LayoutController.prototype.updateLayoutMethod = function (layoutMethod, layoutCfg) {\n var _this = this;\n return new Promise(function (reslove, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var graph, layoutType, onTick_3, animate_2, isDefaultAnimateLayout_2, tick, layoutData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n graph = this.graph;\n layoutType = layoutCfg === null || layoutCfg === void 0 ? void 0 : layoutCfg.type;\n // 每个布局方法都需要注册\n layoutCfg.onLayoutEnd = function () {\n graph.emit('aftersublayout', {\n type: layoutType\n });\n reslove();\n };\n if (Util.isForce(layoutType)) {\n onTick_3 = layoutCfg.onTick, animate_2 = layoutCfg.animate;\n isDefaultAnimateLayout_2 = animate_2 === undefined && (layoutType === 'force' || layoutType === 'force2');\n tick = function tick() {\n onTick_3 === null || onTick_3 === void 0 ? void 0 : onTick_3();\n if (animate_2 || isDefaultAnimateLayout_2) graph.refreshPositions();\n };\n layoutCfg.tick = tick;\n }\n layoutData = this.filterLayoutData(this.data, layoutCfg);\n layoutMethod.init(layoutData);\n layoutMethod.updateCfg(layoutCfg);\n graph.emit('beforesublayout', {\n type: layoutType\n });\n return [4 /*yield*/, layoutMethod.execute()];\n case 1:\n _a.sent();\n if (layoutMethod.isCustomLayout && layoutCfg.onLayoutEnd) layoutCfg.onLayoutEnd();\n return [2 /*return*/];\n }\n });\n });\n });\n };\n /**\n * @param {function} success callback\n * @return {boolean} 是否使用web worker布局\n */\n LayoutController.prototype.layout = function (success) {\n var _this = this;\n var _a;\n var graph = this.graph;\n if (!graph || graph.get('destroyed')) return;\n this.data = this.setDataFromGraph();\n var _b = this.data,\n nodes = _b.nodes,\n hiddenNodes = _b.hiddenNodes;\n if (!nodes) {\n return false;\n }\n var width = graph.get('width');\n var height = graph.get('height');\n var layoutCfg = {};\n Object.assign(layoutCfg, {\n width: width,\n height: height,\n center: [width / 2, height / 2]\n }, this.layoutCfg);\n this.layoutCfg = layoutCfg;\n var layoutType = layoutCfg.type;\n var prevHasNodes = false;\n (_a = this.layoutMethods) === null || _a === void 0 ? void 0 : _a.forEach(function (method) {\n var _a;\n return prevHasNodes = !!((_a = method.nodes) === null || _a === void 0 ? void 0 : _a.length) || prevHasNodes;\n });\n var preLayoutTypes = this.destoryLayoutMethods();\n graph.emit('beforelayout');\n var start = Promise.resolve();\n // 增量情况下(上一次的布局与当前布局一致),上一次有节点,使用 treakInit\n if (prevHasNodes && layoutType && (preLayoutTypes === null || preLayoutTypes === void 0 ? void 0 : preLayoutTypes.length) === 1 && preLayoutTypes[0] === layoutType) {\n this.tweakInit();\n } else {\n // 初始化位置,若配置了 preset,则使用 preset 的参数生成布局作为预布局,否则使用 grid\n start = this.initPositions(layoutCfg.center, nodes);\n }\n // init hidden nodes\n var initHiddenPromise = this.initPositions(layoutCfg.center, hiddenNodes);\n initHiddenPromise.then();\n // 若用户指定开启 gpu,且当前浏览器支持 webgl,且该算法存在 GPU 版本(目前仅支持 fruchterman 和 gForce),使用 gpu 版本的布局\n this.isGPU = getGPUEnabled(layoutCfg, layoutType);\n // 在 onAllLayoutEnd 中执行用户自定义 onLayoutEnd,触发 afterlayout、更新节点位置、fitView/fitCenter、触发 afterrender\n var onLayoutEnd = layoutCfg.onLayoutEnd,\n layoutEndFormatted = layoutCfg.layoutEndFormatted,\n adjust = layoutCfg.adjust;\n if (!layoutEndFormatted) {\n layoutCfg.layoutEndFormatted = true;\n layoutCfg.onAllLayoutEnd = function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // 执行用户自定义 onLayoutEnd\n if (onLayoutEnd) {\n onLayoutEnd(nodes);\n }\n // 更新节点位置\n this.refreshLayout();\n if (!(adjust && layoutCfg.pipes)) return [3 /*break*/, 2];\n return [4 /*yield*/, this.adjustPipesBox(this.data, adjust)];\n case 1:\n _a.sent();\n this.refreshLayout();\n _a.label = 2;\n case 2:\n // 触发 afterlayout\n graph.emit('afterlayout');\n return [2 /*return*/];\n }\n });\n });\n };\n }\n\n this.stopWorker();\n if (layoutCfg.workerEnabled && this.layoutWithWorker(this.data, success)) {\n // 如果启用布局web worker并且浏览器支持web worker,用web worker布局。否则回退到不用web worker布局。\n return true;\n }\n var hasLayout = false;\n if (layoutCfg.type) {\n hasLayout = true;\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.execLayoutMethod(layoutCfg, 0)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n } else if (layoutCfg.pipes) {\n hasLayout = true;\n layoutCfg.pipes.forEach(function (cfg, index) {\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.execLayoutMethod(cfg, index)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n });\n }\n if (hasLayout) {\n // 最后统一在外部调用onAllLayoutEnd\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n // 在执行 execute 后立即执行 success,且在 timeBar 中有 throttle,可以防止 timeBar 监听 afterrender 进行 changeData 后 layout,从而死循环\n // 对于 force 一类布局完成后的 fitView 需要用户自己在 onLayoutEnd 中配置\n if (success) success();\n }).catch(function (error) {\n console.warn('graph layout failed,', error);\n });\n } else {\n // 无布局配置\n graph.refreshPositions();\n success === null || success === void 0 ? void 0 : success();\n }\n return false;\n };\n /**\n * 增量数据初始化位置\n */\n LayoutController.prototype.tweakInit = function () {\n var _a = this,\n data = _a.data,\n graph = _a.graph;\n var nodes = data.nodes,\n edges = data.edges;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) return;\n var positionMap = {};\n nodes.forEach(function (node) {\n var x = node.x,\n y = node.y;\n if (!isNaN(x) && !isNaN(y)) {\n positionMap[node.id] = {\n x: x,\n y: y\n };\n // 有位置信息,则是原有节点,增加 mass\n node.mass = node.mass || 2;\n }\n });\n edges.forEach(function (edge) {\n var source = edge.source,\n target = edge.target;\n var sourcePosition = positionMap[source];\n var targetPosition = positionMap[target];\n if (!sourcePosition && targetPosition) {\n positionMap[source] = {\n x: targetPosition.x + (Math.random() - 0.5) * 80,\n y: targetPosition.y + (Math.random() - 0.5) * 80\n };\n } else if (!targetPosition && sourcePosition) {\n positionMap[target] = {\n x: sourcePosition.x + (Math.random() - 0.5) * 80,\n y: sourcePosition.y + (Math.random() - 0.5) * 80\n };\n }\n });\n var width = graph.get('width');\n var height = graph.get('height');\n nodes.forEach(function (node) {\n var position = positionMap[node.id] || {\n x: width / 2 + (Math.random() - 0.5) * 20,\n y: height / 2 + (Math.random() - 0.5) * 20\n };\n node.x = position.x;\n node.y = position.y;\n });\n };\n LayoutController.prototype.initWithPreset = function (hasPresetCallback, noPresetCallback) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n return __awaiter(_this, void 0, void 0, function () {\n var _a, layoutCfg, data, preset, isGPU, layoutType, presetLayout;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = this, layoutCfg = _a.layoutCfg, data = _a.data;\n preset = layoutCfg.preset;\n if (!(preset === null || preset === void 0 ? void 0 : preset.type) || !Layout[preset === null || preset === void 0 ? void 0 : preset.type]) {\n noPresetCallback === null || noPresetCallback === void 0 ? void 0 : noPresetCallback();\n resolve();\n return [2 /*return*/, false];\n }\n isGPU = getGPUEnabled(preset, preset.type);\n layoutType = isGPU ? \"\".concat(preset.type, \"-gpu\") : preset.type;\n presetLayout = new Layout[layoutType](preset);\n delete layoutCfg.preset;\n presetLayout.init(data);\n return [4 /*yield*/, presetLayout.execute()];\n case 1:\n _b.sent();\n hasPresetCallback === null || hasPresetCallback === void 0 ? void 0 : hasPresetCallback();\n resolve();\n return [2 /*return*/, true];\n }\n });\n });\n });\n };\n /**\n * layout with web worker\n * @param {object} data graph data\n * @return {boolean} 是否支持web worker\n */\n LayoutController.prototype.layoutWithWorker = function (data, success) {\n var _this = this;\n var _a = this,\n layoutCfg = _a.layoutCfg,\n graph = _a.graph;\n var worker = this.getWorker();\n // 每次worker message event handler调用之间的共享数据,会被修改。\n var workerData = this.workerData;\n if (!worker) {\n return false;\n }\n workerData.requestId = null;\n workerData.requestId2 = null;\n workerData.currentTick = null;\n workerData.currentTickData = null;\n graph.emit('beforelayout');\n var start = Promise.resolve();\n var hasLayout = false;\n if (layoutCfg.type) {\n hasLayout = true;\n start = start.then(function () {\n return _this.runWebworker(worker, data, layoutCfg);\n });\n } else if (layoutCfg.pipes) {\n hasLayout = true;\n var _loop_1 = function _loop_1(cfg) {\n start = start.then(function () {\n return _this.runWebworker(worker, data, cfg);\n });\n };\n for (var _i = 0, _b = layoutCfg.pipes; _i < _b.length; _i++) {\n var cfg = _b[_i];\n _loop_1(cfg);\n }\n }\n if (hasLayout) {\n // 最后统一在外部调用onAllLayoutEnd\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n success === null || success === void 0 ? void 0 : success();\n }).catch(function (error) {\n console.error('layout failed', error);\n });\n }\n return true;\n };\n LayoutController.prototype.runWebworker = function (worker, allData, layoutCfg) {\n var _this = this;\n var isGPU = this.isGPU;\n var data = this.filterLayoutData(allData, layoutCfg);\n var nodes = data.nodes,\n edges = data.edges;\n var offScreenCanvas = document.createElement('canvas');\n var gpuWorkerAbility = isGPU && typeof window !== 'undefined' &&\n // eslint-disable-next-line @typescript-eslint/dot-notation\n window.navigator && !navigator[\"gpu\"] &&\n // WebGPU 还不支持 OffscreenCanvas\n 'OffscreenCanvas' in window && 'transferControlToOffscreen' in offScreenCanvas;\n // NOTE: postMessage的message参数里面不能包含函数,否则postMessage会报错,\n // 例如:'function could not be cloned'。\n // 详情参考:https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n // 所以这里需要把过滤layoutCfg里的函数字段过滤掉。\n var filteredLayoutCfg = filterObject(layoutCfg, function (value) {\n return typeof value !== 'function';\n });\n if (!gpuWorkerAbility) {\n worker.postMessage({\n type: LAYOUT_MESSAGE.RUN,\n nodes: nodes,\n edges: edges,\n layoutCfg: filteredLayoutCfg\n });\n } else {\n var offscreen = offScreenCanvas.transferControlToOffscreen();\n // filteredLayoutCfg.canvas = offscreen;\n filteredLayoutCfg.type = \"\".concat(filteredLayoutCfg.type, \"-gpu\");\n worker.postMessage({\n type: LAYOUT_MESSAGE.GPURUN,\n nodes: nodes,\n edges: edges,\n layoutCfg: filteredLayoutCfg,\n canvas: offscreen\n }, [offscreen]);\n }\n return new Promise(function (reslove, reject) {\n worker.onmessage = function (event) {\n _this.handleWorkerMessage(reslove, reject, event, data, layoutCfg);\n };\n });\n };\n // success callback will be called when updating graph positions for the first time.\n LayoutController.prototype.handleWorkerMessage = function (reslove, reject, event, data, layoutCfg) {\n var _a = this,\n graph = _a.graph,\n workerData = _a.workerData;\n var eventData = event.data;\n var type = eventData.type;\n var onTick = function onTick() {\n if (layoutCfg.onTick) {\n layoutCfg.onTick();\n }\n };\n switch (type) {\n case LAYOUT_MESSAGE.TICK:\n workerData.currentTick = eventData.currentTick;\n workerData.currentTickData = eventData;\n if (!workerData.requestId) {\n workerData.requestId = helper.requestAnimationFrame(function requestId() {\n updateLayoutPosition(data, eventData);\n graph.refreshPositions();\n onTick();\n if (eventData.currentTick === eventData.totalTicks) {\n // 如果是最后一次tick\n reslove();\n } else if (workerData.currentTick === eventData.totalTicks) {\n // 注意这里workerData.currentTick可能已经不再是前面赋值时候的值了,\n // 因为在requestAnimationFrame等待时间里,可能产生新的tick。\n // 如果当前tick不是最后一次tick,并且所有的tick消息都已发出来了,那么需要用最后一次tick的数据再刷新一次。\n workerData.requestId2 = helper.requestAnimationFrame(function requestId2() {\n updateLayoutPosition(data, workerData.currentTickData);\n graph.refreshPositions();\n workerData.requestId2 = null;\n onTick();\n reslove();\n });\n }\n workerData.requestId = null;\n });\n }\n break;\n case LAYOUT_MESSAGE.END:\n // 如果没有tick消息(非力导布局)\n if (workerData.currentTick == null) {\n updateLayoutPosition(data, eventData);\n reslove();\n }\n break;\n case LAYOUT_MESSAGE.GPUEND:\n // 如果没有tick消息(非力导布局)\n if (workerData.currentTick == null) {\n updateGPUWorkerLayoutPosition(data, eventData);\n reslove();\n }\n break;\n case LAYOUT_MESSAGE.ERROR:\n console.warn('Web-Worker layout error!', eventData.message);\n reject();\n break;\n default:\n reject();\n break;\n }\n };\n // 更新布局参数\n LayoutController.prototype.updateLayoutCfg = function (cfg) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n layoutMethods = _a.layoutMethods;\n if (!graph || graph.get('destroyed')) return;\n // disableTriggerLayout 不触发重新布局,仅更新参数\n var disableTriggerLayout = cfg.disableTriggerLayout,\n otherCfg = __rest(cfg, [\"disableTriggerLayout\"]);\n var layoutCfg = mix({}, this.layoutCfg, otherCfg);\n this.layoutCfg = layoutCfg;\n // disableTriggerLayout 不触发重新布局,仅更新参数\n if (disableTriggerLayout) {\n return;\n }\n if (!(layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length)) {\n this.layout();\n return;\n }\n this.data = this.setDataFromGraph();\n this.stopWorker();\n if (otherCfg.workerEnabled && this.layoutWithWorker(this.data, null)) {\n // 如果启用布局web worker并且浏览器支持web worker,用web worker布局。否则回退到不用web worker布局。\n return;\n }\n graph.emit('beforelayout');\n var start = Promise.resolve();\n var hasLayout = false;\n if ((layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length) === 1) {\n hasLayout = true;\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.updateLayoutMethod(layoutMethods[0], layoutCfg)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n } else if (layoutMethods === null || layoutMethods === void 0 ? void 0 : layoutMethods.length) {\n hasLayout = true;\n layoutMethods.forEach(function (layoutMethod, index) {\n var currentCfg = layoutCfg.pipes[index];\n start = start.then(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, this.updateLayoutMethod(layoutMethod, currentCfg)];\n case 1:\n return [2 /*return*/, _a.sent()];\n }\n });\n });\n });\n });\n }\n if (hasLayout) {\n start.then(function () {\n if (layoutCfg.onAllLayoutEnd) layoutCfg.onAllLayoutEnd();\n }).catch(function (error) {\n console.warn('layout failed', error);\n });\n }\n };\n LayoutController.prototype.adjustPipesBox = function (data, adjust) {\n var _this = this;\n return new Promise(function (resolve) {\n var nodes = data.nodes;\n if (!(nodes === null || nodes === void 0 ? void 0 : nodes.length)) {\n resolve();\n }\n if (!LAYOUT_PIPES_ADJUST_NAMES.includes(adjust)) {\n console.warn(\"The adjust type \".concat(adjust, \" is not supported yet, please assign it with 'force', 'grid', or 'circular'.\"));\n resolve();\n }\n var layoutCfg = {\n center: _this.layoutCfg.center,\n nodeSize: function nodeSize(d) {\n return Math.max(d.height, d.width);\n },\n preventOverlap: true,\n onLayoutEnd: function onLayoutEnd() {}\n };\n // 计算出大单元\n var _a = _this.getLayoutBBox(nodes),\n groupNodes = _a.groupNodes,\n layoutNodes = _a.layoutNodes;\n var preNodes = clone(layoutNodes);\n // 根据大单元坐标的变化,调整这里面每个小单元nodes\n layoutCfg.onLayoutEnd = function () {\n layoutNodes === null || layoutNodes === void 0 ? void 0 : layoutNodes.forEach(function (ele, index) {\n var _a, _b, _c;\n var dx = ele.x - ((_a = preNodes[index]) === null || _a === void 0 ? void 0 : _a.x);\n var dy = ele.y - ((_b = preNodes[index]) === null || _b === void 0 ? void 0 : _b.y);\n (_c = groupNodes[index]) === null || _c === void 0 ? void 0 : _c.forEach(function (n) {\n n.x += dx;\n n.y += dy;\n });\n });\n resolve();\n };\n var layoutMethod = new Layout[adjust](layoutCfg);\n layoutMethod.layout({\n nodes: layoutNodes\n });\n });\n };\n LayoutController.prototype.destroy = function () {\n this.destoryLayoutMethods();\n var worker = this.worker;\n if (worker) {\n worker.terminate();\n this.worker = null;\n }\n this.destroyed = true;\n this.graph.set('layout', undefined);\n this.layoutCfg = undefined;\n this.layoutType = undefined;\n this.layoutMethods = undefined;\n this.graph = null;\n };\n return LayoutController;\n}(AbstractLayout);\nexport default LayoutController;\nfunction updateLayoutPosition(data, layoutData) {\n var nodes = data.nodes;\n var layoutNodes = layoutData.nodes;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n node.x = layoutNodes[i].x;\n node.y = layoutNodes[i].y;\n }\n}\nfunction filterObject(collection, callback) {\n var result = {};\n if (collection && _typeof(collection) === 'object') {\n Object.keys(collection).forEach(function (key) {\n if (collection.hasOwnProperty(key) && callback(collection[key])) {\n result[key] = collection[key];\n }\n });\n return result;\n }\n return collection;\n}\nfunction updateGPUWorkerLayoutPosition(data, layoutData) {\n var nodes = data.nodes;\n var vertexEdgeData = layoutData.vertexEdgeData;\n var nodeLength = nodes.length;\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var x = vertexEdgeData[4 * i];\n var y = vertexEdgeData[4 * i + 1];\n node.x = x;\n node.y = y;\n }\n}\nfunction addLayoutOrder(data, order) {\n var _a;\n if (!((_a = data === null || data === void 0 ? void 0 : data.nodes) === null || _a === void 0 ? void 0 : _a.length)) {\n return;\n }\n var nodes = data.nodes;\n nodes.forEach(function (node) {\n node.layoutOrder = order;\n });\n}\nfunction hasGPUVersion(layoutName) {\n return GPU_LAYOUT_NAMES.includes(layoutName);\n}\nfunction getGPUEnabled(layoutCfg, layoutType) {\n var type = layoutType;\n // 防止用户直接用 -gpu 结尾指定布局\n if (layoutType && layoutType.split('-')[1] === 'gpu') {\n type = layoutType.split('-')[0];\n layoutCfg.gpuEnabled = true;\n }\n var enableGPU = false;\n if (layoutCfg.gpuEnabled) {\n enableGPU = true;\n // 打开下面语句将会导致 webworker 报找不到 window\n if (!gpuDetector().webgl) {\n console.warn(\"Your browser does not support webGL or GPGPU. The layout will run in CPU.\");\n enableGPU = false;\n }\n }\n // the layout does not support GPU, will run in CPU\n if (enableGPU && !hasGPUVersion(type)) {\n console.warn(\"The '\".concat(type, \"' layout does not support GPU calculation for now, it will run in CPU.\"));\n enableGPU = false;\n }\n return enableGPU;\n}","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { AbstractGraph } from '@antv/g6-core';\nimport { ext } from '@antv/matrix-util';\nimport { clone, deepMix, each, isNumber, isString } from '@antv/util';\nimport { createDom } from '@antv/dom-util';\nimport Global from '../global';\nimport { cloneGElement } from '../util/image';\nimport { EventController, LayoutController } from './controller';\nvar transform = ext.transform;\nvar SVG = 'svg';\nvar Graph = /** @class */function (_super) {\n __extends(Graph, _super);\n function Graph(cfg) {\n var _this = _super.call(this, cfg) || this;\n var defaultNode = _this.get('defaultNode');\n if (!defaultNode) {\n _this.set('defaultNode', {\n type: 'circle'\n });\n }\n if (!defaultNode.type) {\n defaultNode.type = 'circle';\n _this.set('defaultNode', defaultNode);\n }\n _this.destroyed = false;\n return _this;\n }\n Graph.prototype.initLayoutController = function () {\n var layoutController = new LayoutController(this);\n this.set({\n layoutController: layoutController\n });\n };\n Graph.prototype.initEventController = function () {\n var eventController = new EventController(this);\n this.set({\n eventController: eventController\n });\n };\n Graph.prototype.initCanvas = function () {\n var container = this.get('container');\n if (typeof container === 'string') {\n container = document.getElementById(container);\n this.set('container', container);\n }\n if (!container) {\n throw new Error('invalid container');\n }\n var clientWidth = container.clientWidth,\n clientHeight = container.clientHeight;\n var width = this.get('width') || clientWidth;\n var height = this.get('height') || clientHeight;\n if (!this.get('width') && !this.get('height')) {\n this.set('width', clientWidth);\n this.set('height', clientHeight);\n }\n var renderer = this.get('renderer');\n var canvas;\n if (renderer === SVG) {\n canvas = new GSVGCanvas({\n container: container,\n width: width,\n height: height\n });\n } else {\n var canvasCfg = {\n container: container,\n width: width,\n height: height\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n }\n this.set('canvas', canvas);\n };\n Graph.prototype.initPlugins = function () {\n var self = this;\n each(self.get('plugins'), function (plugin) {\n if (!plugin.destroyed && plugin.initPlugin) {\n plugin.initPlugin(self);\n }\n });\n };\n /**\n * 增加图片下载水印功能\n */\n Graph.prototype.downloadImageWatermark = function (watermarker, context, width, height) {\n return __awaiter(this, void 0, void 0, function () {\n var watermarkStr, watermarkbase64, img;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n watermarkStr = watermarker.style.backgroundImage;\n watermarkbase64 = watermarkStr.slice(5, watermarkStr.length - 2);\n img = new Image();\n img.src = watermarkbase64;\n return [4 /*yield*/, new Promise(function (resolve) {\n img.onload = function () {\n var pat = context.createPattern(img, 'repeat');\n context.rect(0, 0, width, height);\n context.fillStyle = pat;\n context.fill();\n resolve('');\n };\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * 用于生成图片 (异步callback)\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n * @return {string} 图片 dataURL\n */\n Graph.prototype.asyncToDataUrl = function (type, backgroundColor, callback, widths, heights, vCanvasEl) {\n var _this = this;\n var watermarker = document.querySelector('.g6-graph-watermarker');\n var canvas = this.get('canvas');\n var renderer = canvas.getRenderer();\n var canvasDom = vCanvasEl || canvas.get('el');\n var dataURL = '';\n if (!type) type = 'image/png';\n setTimeout(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var cloneNode, svgDocType, svgDoc, svgData, imageData, context, width, height, compositeOperation, pixelRatio;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(renderer === 'svg')) return [3 /*break*/, 1];\n cloneNode = canvasDom.cloneNode(true);\n svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n return [3 /*break*/, 4];\n case 1:\n imageData = void 0;\n context = canvasDom.getContext('2d');\n width = widths || this.get('width');\n height = heights || this.get('height');\n compositeOperation = void 0;\n if (!watermarker) return [3 /*break*/, 3];\n return [4 /*yield*/, this.downloadImageWatermark(watermarker, context, width, height)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n if (backgroundColor) {\n pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio : 1;\n try {\n imageData = context.getImageData(0, 0, width * pixelRatio, height * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, width, height);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = canvasDom.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, width, height);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n _a.label = 4;\n case 4:\n if (callback) callback(dataURL);\n return [2 /*return*/];\n }\n });\n });\n }, 16);\n };\n /**\n * 返回可见区域的图的 dataUrl,用于生成图片\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n * @return {string} 图片 dataURL\n */\n Graph.prototype.toDataURL = function (type, backgroundColor) {\n var canvas = this.get('canvas');\n var renderer = canvas.getRenderer();\n var canvasDom = canvas.get('el');\n if (!type) type = 'image/png';\n var dataURL = '';\n if (renderer === 'svg') {\n var cloneNode = canvasDom.cloneNode(true);\n var svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n var svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n } else {\n var imageData = void 0;\n var context = canvasDom.getContext('2d');\n var width = Math.max(this.get('width'), 500);\n var height = Math.max(this.get('height'), 500);\n var compositeOperation = void 0;\n if (backgroundColor) {\n var pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;\n try {\n imageData = context.getImageData(0, 0, width * pixelRatio, height * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, width, height);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = canvasDom.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, width, height);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n }\n return dataURL;\n };\n /**\n * 返回整个图(包括超出可见区域的部分)的 dataUrl,用于生成图片\n * @param {Function} callback 异步生成 dataUrl 完成后的回调函数,在这里处理生成的 dataUrl 字符串\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {Object} imageConfig 图片配置项,包括背景色和上下左右的 padding\n */\n Graph.prototype.toFullDataURL = function (callback, type, imageConfig) {\n var bbox = this.get('group').getCanvasBBox();\n var height = bbox.height;\n var width = bbox.width;\n var renderer = this.get('renderer');\n var vContainerDOM = createDom('
');\n var backgroundColor = imageConfig ? imageConfig.backgroundColor : undefined;\n var padding = imageConfig ? imageConfig.padding : undefined;\n if (!padding) padding = [0, 0, 0, 0];else if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var vHeight = height + padding[0] + padding[2];\n var vWidth = width + padding[1] + padding[3];\n var canvasOptions = {\n container: vContainerDOM,\n height: vHeight,\n width: vWidth,\n quickHit: true\n };\n var vCanvas = renderer === 'svg' ? new GSVGCanvas(canvasOptions) : new GCanvas(canvasOptions);\n var group = this.get('group');\n var vGroup = group.clone();\n var matrix = clone(vGroup.getMatrix());\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var centerX = (bbox.maxX + bbox.minX) / 2;\n var centerY = (bbox.maxY + bbox.minY) / 2;\n matrix = transform(matrix, [['t', -centerX, -centerY], ['t', width / 2 + padding[3], height / 2 + padding[0]]]);\n vGroup.resetMatrix();\n vGroup.setMatrix(matrix);\n vCanvas.add(vGroup);\n var vCanvasEl = vCanvas.get('el');\n var dataURL = '';\n if (!type) type = 'image/png';\n setTimeout(function () {\n if (renderer === 'svg') {\n var cloneNode = vCanvasEl.cloneNode(true);\n var svgDocType = document.implementation.createDocumentType('svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd');\n var svgDoc = document.implementation.createDocument('http://www.w3.org/2000/svg', 'svg', svgDocType);\n svgDoc.replaceChild(cloneNode, svgDoc.documentElement);\n var svgData = new XMLSerializer().serializeToString(svgDoc);\n dataURL = \"data:image/svg+xml;charset=utf8,\".concat(encodeURIComponent(svgData));\n } else {\n var imageData = void 0;\n var context = vCanvasEl.getContext('2d');\n var compositeOperation = void 0;\n if (backgroundColor) {\n var pixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio : 1;\n try {\n imageData = context.getImageData(0, 0, vWidth * pixelRatio, vHeight * pixelRatio);\n compositeOperation = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-over';\n context.fillStyle = backgroundColor;\n context.fillRect(0, 0, vWidth, vHeight);\n } catch (error) {\n console.error('Download image failed. Out of memory at ImageData creation');\n }\n }\n dataURL = vCanvasEl.toDataURL(type);\n if (backgroundColor) {\n context.clearRect(0, 0, vWidth, vHeight);\n context.putImageData(imageData, 0, 0);\n context.globalCompositeOperation = compositeOperation;\n }\n }\n if (callback) callback(dataURL);\n }, 16);\n };\n /**\n * 导出包含全图的图片\n * @param {String} name 图片的名称\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {Object} imageConfig 图片配置项,包括背景色和上下左右的 padding\n */\n Graph.prototype.downloadFullImage = function (name, type, imageConfig) {\n var _this = this;\n var bbox = this.get('group').getCanvasBBox();\n var height = bbox.height;\n var width = bbox.width;\n var renderer = this.get('renderer');\n var vContainerDOM = createDom('
');\n var watermarker = document.querySelector('.g6-graph-watermarker');\n var backgroundColor = imageConfig ? imageConfig.backgroundColor : undefined;\n var padding = imageConfig ? imageConfig.padding : undefined;\n if (!padding) padding = [0, 0, 0, 0];else if (isNumber(padding)) padding = [padding, padding, padding, padding];\n var vHeight = height + padding[0] + padding[2];\n var vWidth = width + padding[1] + padding[3];\n if (watermarker) {\n var _a = this.get('graphWaterMarker').cfg || {},\n wmWidth = _a.width,\n wmHeight = _a.height;\n vHeight = Math.ceil(vHeight / wmHeight) * wmHeight;\n vWidth = Math.ceil(vWidth / wmWidth) * wmWidth;\n }\n var canvasOptions = {\n container: vContainerDOM,\n height: vHeight,\n width: vWidth\n };\n var vCanvas = renderer === 'svg' ? new GSVGCanvas(canvasOptions) : new GCanvas(canvasOptions);\n var group = this.get('group');\n // clone group and clone image shape's clip\n var vGroup = cloneGElement(group);\n var matrix = clone(vGroup.getMatrix());\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var centerX = (bbox.maxX + bbox.minX) / 2;\n var centerY = (bbox.maxY + bbox.minY) / 2;\n matrix = transform(matrix, [['t', -centerX, -centerY], ['t', width / 2 + padding[3], height / 2 + padding[0]]]);\n vGroup.resetMatrix();\n vGroup.setMatrix(matrix);\n vCanvas.add(vGroup);\n var vCanvasEl = vCanvas.get('el');\n if (!type) type = 'image/png';\n this.asyncToDataUrl(type, backgroundColor, function (dataURL) {\n var link = document.createElement('a');\n var fileName = (name || 'graph') + (renderer === 'svg' ? '.svg' : \".\".concat(type.split('/')[1]));\n _this.dataURLToImage(dataURL, renderer, link, fileName);\n var e = document.createEvent('MouseEvents');\n e.initEvent('click', false, false);\n link.dispatchEvent(e);\n }, vWidth, vHeight, vCanvasEl);\n };\n /**\n * 画布导出图片,图片仅包含画布可见区域部分内容\n * @param {String} name 图片的名称\n * @param {String} type 图片类型,可选值:\"image/png\" | \"image/jpeg\" | \"image/webp\" | \"image/bmp\"\n * @param {string} backgroundColor 图片背景色\n */\n Graph.prototype.downloadImage = function (name, type, backgroundColor) {\n var _this = this;\n var self = this;\n self.stopAnimate();\n var canvas = self.get('canvas');\n var renderer = canvas.getRenderer();\n if (!type) type = 'image/png';\n var fileName = (name || 'graph') + (renderer === 'svg' ? '.svg' : \".\".concat(type.split('/')[1]));\n var link = document.createElement('a');\n self.asyncToDataUrl(type, backgroundColor, function (dataURL) {\n _this.dataURLToImage(dataURL, renderer, link, fileName);\n var e = document.createEvent('MouseEvents');\n e.initEvent('click', false, false);\n link.dispatchEvent(e);\n });\n };\n Graph.prototype.dataURLToImage = function (dataURL, renderer, link, fileName) {\n if (!dataURL || dataURL === 'data:') {\n console.error('Download image failed. The graph is too large or there is invalid attribute values in graph items');\n return;\n }\n if (typeof window !== 'undefined') {\n if (window.Blob && window.URL && renderer !== 'svg') {\n var arr = dataURL.split(',');\n var mime = '';\n if (arr && arr.length > 0) {\n var match = arr[0].match(/:(.*?);/);\n // eslint-disable-next-line prefer-destructuring\n if (match && match.length >= 2) mime = match[1];\n }\n var bstr = atob(arr[1]);\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n var blobObj_1 = new Blob([u8arr], {\n type: mime\n });\n if (window.navigator.msSaveBlob) {\n window.navigator.msSaveBlob(blobObj_1, fileName);\n } else {\n link.addEventListener('click', function () {\n link.download = fileName;\n link.href = window.URL.createObjectURL(blobObj_1);\n });\n }\n } else {\n link.addEventListener('click', function () {\n link.download = fileName;\n link.href = dataURL;\n });\n }\n }\n };\n /**\n * 添加插件\n * @param {object} plugin 插件实例\n */\n Graph.prototype.addPlugin = function (plugin) {\n var self = this;\n if (plugin.destroyed) {\n return;\n }\n self.get('plugins').push(plugin);\n plugin.initPlugin(self);\n };\n /**\n * 添加插件\n * @param {object} plugin 插件实例\n */\n Graph.prototype.removePlugin = function (plugin) {\n var plugins = this.get('plugins');\n var index = plugins.indexOf(plugin);\n if (index >= 0) {\n plugin.destroyPlugin();\n plugins.splice(index, 1);\n }\n };\n /**\n * 设置图片水印\n * @param {string} imgURL 图片水印的url地址\n * @param {WaterMarkerConfig} config 文本水印的配置项\n */\n Graph.prototype.setImageWaterMarker = function (imgURL, config) {\n if (imgURL === void 0) {\n imgURL = Global.waterMarkerImage;\n }\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n var canvas = this.get('graphWaterMarker');\n var waterMarkerConfig = deepMix({}, Global.imageWaterMarkerConfig, config);\n var width = waterMarkerConfig.width,\n height = waterMarkerConfig.height,\n compatible = waterMarkerConfig.compatible,\n image = waterMarkerConfig.image;\n if (!imgURL) {\n var dom = compatible ? container : document.querySelector('.g6-graph-watermarker');\n if (dom) dom.style.cssText = undefined;\n if (canvas) canvas.clear();\n return;\n }\n if (!canvas) {\n var canvasCfg = {\n container: container,\n width: width,\n height: height,\n capture: false\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n this.set('graphWaterMarker', canvas);\n } else {\n canvas.clear();\n }\n canvas.get('el').style.display = 'none';\n var ctx = canvas.get('context');\n var rotate = image.rotate,\n x = image.x,\n y = image.y;\n // 旋转20度\n ctx.rotate(-rotate * Math.PI / 180);\n var img = new Image();\n img.crossOrigin = 'anonymous';\n img.src = imgURL;\n img.onload = function () {\n ctx.drawImage(img, x, y, image.width, image.height);\n // 恢复旋转角度\n ctx.rotate(rotate * Math.PI / 180);\n // 默认按照现代浏览器处理\n if (!compatible) {\n var box = document.querySelector('.g6-graph-watermarker');\n if (!box) {\n box = document.createElement('div');\n box.className = 'g6-graph-watermarker';\n }\n box.className = 'g6-graph-watermarker';\n if (!canvas.destroyed) {\n box.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;z-index:-1;\");\n container.appendChild(box);\n }\n } else {\n // 当需要兼容不支持 pointer-events属性的浏览器时,将 compatible 设置为 true\n container.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;\");\n }\n };\n };\n /**\n * 设置文本水印\n * @param {string[]} texts 水印的文本内容\n * @param {WaterMarkerConfig} config 文本水印的配置项\n */\n Graph.prototype.setTextWaterMarker = function (texts, config) {\n var container = this.get('container');\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (!container.style.position) {\n container.style.position = 'relative';\n }\n var canvas = this.get('graphWaterMarker');\n var waterMarkerConfig = deepMix({}, Global.textWaterMarkerConfig, config);\n var width = waterMarkerConfig.width,\n height = waterMarkerConfig.height,\n compatible = waterMarkerConfig.compatible,\n text = waterMarkerConfig.text;\n if (!(texts === null || texts === void 0 ? void 0 : texts.length)) {\n var dom = compatible ? container : document.querySelector('.g6-graph-watermarker');\n if (dom) dom.style.cssText = undefined;\n if (canvas) canvas.clear();\n return;\n }\n if (!canvas) {\n var canvasCfg = {\n container: container,\n width: width,\n height: height,\n capture: false\n };\n var pixelRatio = this.get('pixelRatio');\n if (pixelRatio) {\n canvasCfg.pixelRatio = pixelRatio;\n window.devicePixelRatio = pixelRatio;\n }\n canvas = new GCanvas(canvasCfg);\n this.set('graphWaterMarker', canvas);\n } else {\n canvas.clear();\n }\n canvas.get('el').style.display = 'none';\n var ctx = canvas.get('context');\n var rotate = text.rotate,\n fill = text.fill,\n fontFamily = text.fontFamily,\n fontSize = text.fontSize,\n baseline = text.baseline,\n x = text.x,\n y = text.y,\n lineHeight = text.lineHeight;\n // 旋转20度\n ctx.rotate(-rotate * Math.PI / 180);\n // 设置文字样式\n ctx.font = \"\".concat(fontSize, \"px \").concat(fontFamily);\n // 设置文字颜色\n ctx.fillStyle = fill;\n ctx.textBaseline = baseline;\n var displayTexts = isString(texts) ? [texts] : texts;\n for (var i = displayTexts.length - 1; i >= 0; i--) {\n // 将文字绘制到画布\n ctx.fillText(displayTexts[i], x, y + i * lineHeight);\n }\n // 恢复旋转角度\n ctx.rotate(rotate * Math.PI / 180);\n // 默认按照现代浏览器处理\n if (!compatible) {\n var box = document.querySelector('.g6-graph-watermarker');\n if (!box) {\n box = document.createElement('div');\n box.className = 'g6-graph-watermarker';\n }\n box.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;z-index:99;\");\n container.appendChild(box);\n } else {\n // 当需要兼容不支持 pointer-events属性的浏览器时,将 compatible 设置为 true\n container.style.cssText = \"background-image: url(\".concat(canvas.get('el').toDataURL('image/png'), \");background-repeat:repeat;\");\n }\n };\n /**\n * 销毁画布\n */\n Graph.prototype.destroy = function () {\n var _a, _b, _c, _d;\n each(this.get('plugins'), function (plugin) {\n plugin.destroyPlugin();\n });\n // destroy tooltip doms, removed when upgrade G6 4.0\n var tooltipDOMs = this.get('tooltips');\n if (tooltipDOMs) {\n for (var i = 0; i < tooltipDOMs.length; i++) {\n var container = tooltipDOMs[i];\n if (!container) continue;\n var parent_1 = container.parentElement;\n if (!parent_1) continue;\n parent_1.removeChild(container);\n }\n }\n (_a = this.get('eventController')) === null || _a === void 0 ? void 0 : _a.destroy();\n (_b = this.get('layoutController')) === null || _b === void 0 ? void 0 : _b.destroy();\n // this.get('eventController').destroy();\n // this.get('itemController').destroy();\n // this.get('modeController').destroy();\n // this.get('viewController').destroy();\n // this.get('stateController').destroy();\n // this.get('canvas').destroy();\n (_c = this.get('graphWaterMarker')) === null || _c === void 0 ? void 0 : _c.destroy();\n (_d = document.querySelector('.g6-graph-watermarker')) === null || _d === void 0 ? void 0 : _d.remove();\n _super.prototype.destroy.call(this);\n };\n return Graph;\n}(AbstractGraph);\nexport default Graph;","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/**\n * 递归进行深拷贝. 模拟还原 JSON.parse + JSON.stringify\n */\nfunction traverseClone(obj, hash) {\n if (hash === void 0) {\n hash = new WeakMap();\n }\n if (obj === null) return obj;\n if (obj instanceof Date) return new Date(obj);\n if (obj instanceof RegExp) return new RegExp(obj);\n // 可能是对象或者普通的值 如果是函数的话是不需要深拷贝\n if (_typeof(obj) !== 'object') return obj;\n // 对象分为两种,一种是数组一种是普通的对象\n if (hash.get(obj)) return hash.get(obj);\n var cloneObj = Array.isArray(obj) ? [] : {};\n // 找到的是所属于自己的属性才拷贝\n hash.set(obj, cloneObj);\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] !== undefined) {\n // 实现一个递归拷贝\n cloneObj[key] = traverseClone(obj[key], hash);\n }\n }\n return cloneObj;\n}\nexport function deepClone(data) {\n try {\n return structuredClone(data);\n } catch (err) {\n return traverseClone(data);\n }\n}","import { __extends } from \"tslib\";\nimport Hierarchy from '@antv/hierarchy';\nimport { each, isObject, isString, clone } from '@antv/util';\nimport Util from '../util';\nimport { deepClone } from '../util/deepClone';\nimport Graph from './graph';\nvar radialLayout = Util.radialLayout,\n traverseTree = Util.traverseTree;\nvar TreeGraph = /** @class */function (_super) {\n __extends(TreeGraph, _super);\n function TreeGraph(cfg) {\n var _this = _super.call(this, cfg) || this;\n _this.layoutAnimating = false;\n // 用于缓存动画结束后需要删除的节点\n _this.set('removeList', []);\n _this.set('layoutMethod', _this.getLayout());\n return _this;\n }\n /**\n * 通过 Layout 配置获取布局配置\n */\n TreeGraph.prototype.getLayout = function () {\n var layout = this.get('layout');\n if (!layout) {\n return null;\n }\n if (typeof layout === 'function') {\n return layout;\n }\n if (!layout.type) {\n layout.type = 'dendrogram';\n }\n if (!layout.direction) {\n layout.direction = layout.type === 'indented' ? 'LR' : 'TB';\n }\n if (layout.radial) {\n return function (data) {\n var layoutData = Hierarchy[layout.type](data, layout);\n radialLayout(layoutData);\n return layoutData;\n };\n }\n return function (data) {\n return Hierarchy[layout.type](data, layout);\n };\n };\n /**\n * 返回指定节点在树图数据中的索引\n * @param children 树图数据\n * @param child 树图中某一个 Item 的数据\n */\n TreeGraph.indexOfChild = function (children, id) {\n var index = -1;\n // eslint-disable-next-line consistent-return\n each(children, function (former, i) {\n if (id === former.id) {\n index = i;\n return false;\n }\n });\n return index;\n };\n TreeGraph.prototype.getDefaultCfg = function () {\n var cfg = _super.prototype.getDefaultCfg.call(this);\n // 树图默认打开动画\n cfg.animate = true;\n return cfg;\n };\n /**\n * 向🌲树中添加数据\n * @param treeData 树图数据\n * @param parent 父节点实例\n * @param animate 是否开启动画\n */\n TreeGraph.prototype.innerAddChild = function (treeData, parent, animate) {\n var self = this;\n var model = treeData.data;\n if (model) {\n // model 中应存储真实的数据,特别是真实的 children\n model.x = treeData.x;\n model.y = treeData.y;\n model.depth = treeData.depth;\n }\n var node = self.addItem('node', model, false);\n if (parent) {\n node.set('parent', parent);\n if (animate) {\n var origin_1 = parent.get('originAttrs');\n if (origin_1) {\n node.set('originAttrs', origin_1);\n } else {\n var parentModel = parent.getModel();\n node.set('originAttrs', {\n x: parentModel.x,\n y: parentModel.y\n });\n }\n }\n var childrenList = parent.get('children');\n if (!childrenList) {\n parent.set('children', [node]);\n } else {\n childrenList.push(node);\n }\n self.addItem('edge', {\n source: parent.get('id'),\n target: node.get('id'),\n id: \"\".concat(parent.get('id'), \":\").concat(node.get('id'))\n }, false);\n }\n // 渲染到视图上应参考布局的children, 避免多绘制了收起的节点\n each(treeData.children || [], function (child) {\n self.innerAddChild(child, node, animate);\n });\n self.emit('afteraddchild', {\n item: node,\n parent: parent\n });\n return node;\n };\n /**\n * 将数据上的变更转换到视图上\n * @param data\n * @param parent\n * @param animate\n */\n TreeGraph.prototype.innerUpdateChild = function (data, parent, animate) {\n var self = this;\n var current = self.findById(data.id);\n // 若子树不存在,整体添加即可\n if (!current) {\n self.innerAddChild(data, parent, animate);\n return;\n }\n // 更新新节点下所有子节点\n each(data.children || [], function (child) {\n self.innerUpdateChild(child, current, animate);\n });\n // 用现在节点的children实例来删除移除的子节点\n var children = current.get('children');\n if (children) {\n var len = children.length;\n if (len > 0) {\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i].getModel();\n if (TreeGraph.indexOfChild(data.children || [], child.id) === -1) {\n self.innerRemoveChild(child.id, {\n x: data.x,\n y: data.y\n }, animate);\n // 更新父节点下缓存的子节点 item 实例列表\n children.splice(i, 1);\n }\n }\n }\n }\n var oriX;\n var oriY;\n if (current.get('originAttrs')) {\n oriX = current.get('originAttrs').x;\n oriY = current.get('originAttrs').y;\n }\n var model = current.getModel();\n if (animate) {\n // 如果有动画,先缓存节点运动再更新节点\n current.set('originAttrs', {\n x: model.x,\n y: model.y\n });\n }\n current.set('model', Object.assign(model, data.data));\n if (oriX !== data.x || oriY !== data.y) {\n current.updatePosition({\n x: data.x,\n y: data.y\n });\n }\n };\n /**\n * 删除子节点Item对象\n * @param id\n * @param to\n * @param animate\n */\n TreeGraph.prototype.innerRemoveChild = function (id, to, animate) {\n var self = this;\n var node = self.findById(id);\n if (!node) {\n return;\n }\n each(node.get('children'), function (child) {\n self.innerRemoveChild(child.getModel().id, to, animate);\n });\n if (animate) {\n var model = node.getModel();\n node.set('to', to);\n node.set('originAttrs', {\n x: model.x,\n y: model.y\n });\n self.get('removeList').push(node);\n } else {\n self.removeItem(node, false);\n }\n };\n /**\n * 更新数据模型,差量更新并重新渲染\n * @param {object} data 数据模型\n */\n TreeGraph.prototype.changeData = function (data, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 更改数据源后,取消所有状态\n this.getNodes().map(function (node) {\n return self.clearItemStates(node);\n });\n this.getEdges().map(function (edge) {\n return self.clearItemStates(edge);\n });\n if (stack && this.get('enabledStack')) {\n this.pushStack('changedata', {\n before: self.get('originData'),\n after: data || self.get('data')\n });\n }\n if (data) {\n self.data(data);\n self.render(false);\n } else {\n self.layout(this.get('fitView'));\n }\n };\n /**\n * 已更名为 updateLayout,为保持兼容暂且保留。\n * 更改并应用树布局算法\n * @param {object} layout 布局算法\n */\n TreeGraph.prototype.changeLayout = function (layout) {\n // eslint-disable-next-line no-console\n console.warn('Please call updateLayout instead of changeLayout. changeLayout will be discarded soon');\n var self = this;\n self.updateLayout(layout);\n };\n /**\n * 更改并应用树布局算法\n * @param {object} layout 布局算法\n */\n TreeGraph.prototype.updateLayout = function (layout, align, alignPoint, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n if (!layout) {\n // eslint-disable-next-line no-console\n console.warn('layout cannot be null');\n return;\n }\n if (stack && this.get('enabledStack')) {\n this.pushStack('layout', {\n before: self.get('layout'),\n after: layout\n });\n }\n self.set('layout', layout);\n self.set('layoutMethod', self.getLayout());\n self.layout();\n // align the graph after layout\n if (align) {\n var toPoint = alignPoint;\n if (!toPoint) {\n if (align === 'begin') toPoint = {\n x: 0,\n y: 0\n };else toPoint = {\n x: this.getWidth() / 2,\n y: this.getHeight() / 2\n };\n }\n // translate to point coordinate system\n toPoint = this.getPointByCanvas(toPoint.x, toPoint.y);\n var matrix = this.getGroup().getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n toPoint.x = toPoint.x * matrix[0] + matrix[6];\n toPoint.y = toPoint.y * matrix[0] + matrix[7];\n var _a = this.getGroup().getCanvasBBox(),\n minX = _a.minX,\n maxX = _a.maxX,\n minY = _a.minY,\n maxY = _a.maxY;\n var bboxPoint = {\n x: (minX + maxX) / 2,\n y: (minY + maxY) / 2\n };\n if (align === 'begin') {\n bboxPoint.x = minX;\n bboxPoint.y = minY;\n }\n this.translate(toPoint.x - bboxPoint.x, toPoint.y - bboxPoint.y);\n }\n };\n /**\n * 已更名为 layout,为保持兼容暂且保留。\n * 根据目前的 data 刷新布局,更新到画布上。用于变更数据之后刷新视图。\n * @param {boolean} fitView 更新布局时是否需要适应窗口\n */\n TreeGraph.prototype.refreshLayout = function (fitView) {\n // eslint-disable-next-line no-console\n console.warn('Please call layout instead of refreshLayout. refreshLayout will be discarded soon');\n var self = this;\n self.layout(fitView);\n };\n /**\n * 根据目前的 data 刷新布局,更新到画布上。用于变更数据之后刷新视图。\n * @param {boolean} fitView 更新布局时是否需要适应窗口\n */\n TreeGraph.prototype.layout = function (fitView) {\n var _this = this;\n var self = this;\n var data = self.get('data');\n var layoutMethod = self.get('layoutMethod');\n var layoutConfig = self.get('layout');\n var layoutData = data;\n if (layoutConfig === null || layoutConfig === void 0 ? void 0 : layoutConfig.excludeInvisibles) {\n data = clone(self.get('data'));\n var cacheChidMap_1 = {};\n traverseTree(data, function (subTree) {\n var siblings = subTree.children;\n if (!(siblings === null || siblings === void 0 ? void 0 : siblings.length)) return true;\n for (var i = siblings.length - 1; i >= 0; i--) {\n var node = _this.findById(siblings[i].id);\n var isHidden = node ? !node.isVisible() : siblings[i].visible === false;\n if (isHidden) {\n cacheChidMap_1[subTree.id] = cacheChidMap_1[subTree.id] || [];\n cacheChidMap_1[subTree.id].push({\n idx: i,\n child: siblings.splice(i, 1)[0]\n });\n }\n }\n });\n layoutData = layoutMethod ? layoutMethod(data, self.get('layout')) : data;\n traverseTree(layoutData, function (subTree) {\n var cachedItems = cacheChidMap_1[subTree.id];\n if (cachedItems === null || cachedItems === void 0 ? void 0 : cachedItems.length) {\n for (var i = cachedItems.length - 1; i >= 0; i--) {\n var _a = cachedItems[i],\n idx = _a.idx,\n child = _a.child;\n subTree.children.splice(idx, 0, child);\n }\n }\n });\n } else {\n layoutData = layoutMethod ? layoutMethod(data, self.get('layout')) : data;\n }\n var animate = self.get('animate');\n self.emit('beforerefreshlayout', {\n data: data,\n layoutData: layoutData\n });\n self.emit('beforelayout');\n self.innerUpdateChild(layoutData, undefined, animate);\n if (fitView) {\n var viewController = self.get('viewController');\n viewController.fitView();\n }\n if (!animate) {\n // 如果没有动画,目前仅更新了节点的位置,刷新一下边的样式\n self.refresh();\n self.paint();\n } else {\n self.layoutAnimate(layoutData);\n }\n self.emit('afterrefreshlayout', {\n data: data,\n layoutData: layoutData\n });\n self.emit('afterlayout');\n };\n /**\n * 添加子树到对应 id 的节点\n * @param {TreeGraphData} data 子树数据模型\n * @param {string} parent 子树的父节点id\n */\n TreeGraph.prototype.addChild = function (data, parent, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n self.emit('beforeaddchild', {\n model: data,\n parent: parent\n });\n // 将数据添加到源数据中,走changeData方法\n if (!isString(parent)) {\n parent = parent.get('id');\n }\n var parentData = self.findDataById(parent);\n if (parentData) {\n if (!parentData.children) {\n parentData.children = [];\n }\n parentData.children.push(data);\n var parentItem = self.findById(parent);\n parentItem.refresh();\n self.changeData(undefined, stack);\n }\n };\n /**\n * 更新某个节点下的所有子节点\n * @param {TreeGraphData[]} data 子树数据模型集合\n * @param {string} parent 子树的父节点id\n */\n TreeGraph.prototype.updateChildren = function (data, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 如果没有父节点或找不到该节点,是全量的更新,直接重置data\n var parentItem = self.findById(parentId);\n if (!parentId || !parentItem) {\n console.warn(\"Update children failed! There is no node with id '\".concat(parentId, \"'\"));\n return;\n }\n var parentModel = self.findDataById(parentId);\n parentModel.children = data;\n parentItem.refresh();\n self.changeData(undefined, stack);\n };\n /**\n * 更新源数据,差量更新子树\n * @param {TreeGraphData} data 子树数据模型\n * @param {string} parentId 子树的父节点id\n */\n TreeGraph.prototype.updateChild = function (data, parentId, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n // 如果没有父节点或找不到该节点,是全量的更新,直接重置data\n if (!parentId || !self.findById(parentId)) {\n self.changeData(data, stack);\n return;\n }\n var parentModel = self.findDataById(parentId);\n var current = self.findById(data.id);\n if (!parentModel.children) {\n // 当 current 不存在时,children 为空数组\n parentModel.children = [];\n }\n // 如果不存在该节点,则添加\n if (!current) {\n parentModel.children.push(data);\n } else {\n var index = TreeGraph.indexOfChild(parentModel.children, data.id);\n if (index > -1) parentModel.children[index] = data;\n }\n var parentItem = self.findById(parentId);\n parentItem === null || parentItem === void 0 ? void 0 : parentItem.refresh();\n self.changeData(undefined, stack);\n };\n /**\n * 删除子树\n * @param {string} id 子树根节点id\n */\n TreeGraph.prototype.removeChild = function (id, stack) {\n if (stack === void 0) {\n stack = true;\n }\n var self = this;\n var node = self.findById(id);\n var parent;\n if (!node) {\n parent = self.getNodes().find(function (node) {\n var children = node.getModel().children || [];\n return !!children.find(function (child) {\n return child.id === id;\n });\n });\n } else {\n parent = node === null || node === void 0 ? void 0 : node.get('parent');\n }\n if (parent && !parent.destroyed) {\n var parentId = parent.get('id');\n var parentNode = self.findDataById(parentId);\n var siblings = parentNode && parentNode.children || [];\n var index = TreeGraph.indexOfChild(siblings, id);\n siblings.splice(index, 1);\n parent.refresh();\n }\n self.changeData(undefined, stack);\n };\n /**\n * 根据id获取对应的源数据\n * @param {string} id 元素id\n * @param {TreeGraphData | undefined} parent 从哪个节点开始寻找,为空时从根节点开始查找\n * @return {TreeGraphData} 对应源数据\n */\n TreeGraph.prototype.findDataById = function (id, parent) {\n var self = this;\n if (!parent) {\n parent = self.get('data');\n }\n if (id === parent.id) {\n return parent;\n }\n var result = null;\n // eslint-disable-next-line consistent-return\n each(parent.children || [], function (child) {\n if (child.id === id) {\n result = child;\n return false;\n }\n result = self.findDataById(id, child);\n if (result) {\n return false;\n }\n });\n return result;\n };\n /**\n * 布局动画接口,用于数据更新时做节点位置更新的动画\n * @param {TreeGraphData} data 更新的数据\n * @param {function} onFrame 定义节点位置更新时如何移动\n */\n TreeGraph.prototype.layoutAnimate = function (data, onFrame) {\n var self = this;\n var animateCfg = this.get('animateCfg');\n self.emit('beforeanimate', {\n data: data\n });\n // 如果边中没有指定锚点,但是本身有锚点控制,在动画过程中保持锚点不变\n self.getEdges().forEach(function (edge) {\n var model = edge.get('model');\n if (!model.sourceAnchor) {\n model.sourceAnchor = edge.get('sourceAnchorIndex');\n }\n });\n this.get('canvas').animate(function (ratio) {\n traverseTree(data, function (child) {\n var node = self.findById(child.id);\n // 只有当存在node的时候才执行\n if (node) {\n var origin_2 = node.get('originAttrs');\n var model = node.get('model');\n if (!origin_2) {\n origin_2 = {\n x: model.x,\n y: model.y\n };\n node.set('originAttrs', origin_2);\n }\n if (onFrame) {\n var attrs = onFrame(node, ratio, origin_2, data);\n node.set('model', Object.assign(model, attrs));\n } else {\n model.x = origin_2.x + (child.x - origin_2.x) * ratio;\n model.y = origin_2.y + (child.y - origin_2.y) * ratio;\n }\n }\n return true;\n });\n each(self.get('removeList'), function (node) {\n var model = node.getModel();\n var from = node.get('originAttrs');\n var to = node.get('to');\n model.x = from.x + (to.x - from.x) * ratio;\n model.y = from.y + (to.y - from.y) * ratio;\n });\n self.refreshPositions();\n }, {\n duration: animateCfg.duration,\n easing: animateCfg.ease,\n callback: function callback() {\n each(self.getNodes(), function (node) {\n node.set('originAttrs', null);\n });\n each(self.get('removeList'), function (node) {\n self.removeItem(node, false);\n });\n self.set('removeList', []);\n if (animateCfg.callback) {\n animateCfg.callback();\n }\n self.emit('afteranimate', {\n data: data\n });\n },\n delay: animateCfg.delay\n });\n };\n /**\n * 立即停止布局动画\n */\n TreeGraph.prototype.stopLayoutAnimate = function () {\n this.get('canvas').stopAnimate();\n this.emit('layoutanimateend', {\n data: this.get('data')\n });\n this.layoutAnimating = false;\n };\n /**\n * 是否在布局动画\n * @return {boolean} 是否有布局动画\n */\n TreeGraph.prototype.isLayoutAnimating = function () {\n return this.layoutAnimating;\n };\n /**\n * 根据data接口的数据渲染视图\n */\n TreeGraph.prototype.render = function (clearStack) {\n if (clearStack === void 0) {\n clearStack = true;\n }\n var self = this;\n var data = self.get('data');\n if (!data || !isObject(data) || !Object.keys(data).length) {\n throw new Error('data must be defined first');\n }\n self.clear();\n if (clearStack && this.get('enabledStack')) {\n // render 之前清空 redo 和 undo 栈\n this.clearStack();\n }\n self.emit('beforerender');\n self.layout(this.get('fitView'));\n self.emit('afterrender');\n };\n /**\n * 导出图数据\n * @return {object} data\n */\n TreeGraph.prototype.save = function () {\n return this.get('data');\n };\n /**\n * 设置视图初始化数据\n * @param {TreeGraphData} data 初始化数据\n */\n TreeGraph.prototype.data = function (data) {\n _super.prototype.data.call(this, data);\n this.set('originData', deepClone(data));\n };\n return TreeGraph;\n}(Graph);\nexport default TreeGraph;","import { wrapBehavior, each, deepMix } from '@antv/util';\nvar PluginBase = /** @class */function () {\n /**\n * 插件基类的构造函数\n * @param cfgs 插件的配置项\n */\n function PluginBase(cfgs) {\n this._cfgs = deepMix(this.getDefaultCfgs(), cfgs);\n this._events = {};\n this.destroyed = false;\n }\n /**\n * 获取默认的插件配置\n */\n PluginBase.prototype.getDefaultCfgs = function () {\n return {};\n };\n /**\n * 初始化插件\n * @param graph IGraph 实例\n */\n PluginBase.prototype.initPlugin = function (graph) {\n var self = this;\n self.set('graph', graph);\n var events = self.getEvents();\n var bindEvents = {};\n each(events, function (v, k) {\n var event = wrapBehavior(self, v);\n bindEvents[k] = event;\n graph.on(k, event);\n });\n this._events = bindEvents;\n this.init();\n };\n /**\n * 获取插件中的事件和事件处理方法,供子类实现\n */\n PluginBase.prototype.getEvents = function () {\n return {};\n };\n /**\n * 获取配置项中的某个值\n * @param key 键值\n */\n PluginBase.prototype.get = function (key) {\n var _a;\n return (_a = this._cfgs) === null || _a === void 0 ? void 0 : _a[key];\n };\n /**\n * 将指定的值存储到 cfgs 中\n * @param key 键值\n * @param val 设置的值\n */\n PluginBase.prototype.set = function (key, val) {\n this._cfgs[key] = val;\n };\n /**\n * 销毁方法,供子类复写\n */\n PluginBase.prototype.destroy = function () {};\n /**\n * 销毁插件\n */\n PluginBase.prototype.destroyPlugin = function () {\n this.destroy();\n var graph = this.get('graph');\n var events = this._events;\n each(events, function (v, k) {\n graph.off(k, v);\n });\n this._events = null;\n this._cfgs = null;\n this.destroyed = true;\n };\n return PluginBase;\n}();\nexport default PluginBase;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport Base from '../base';\n// 网格背景图片\nvar GRID_PNG = 'url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImdyaWQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTSAwIDEwIEwgNDAgMTAgTSAxMCAwIEwgMTAgNDAgTSAwIDIwIEwgNDAgMjAgTSAyMCAwIEwgMjAgNDAgTSAwIDMwIEwgNDAgMzAgTSAzMCAwIEwgMzAgNDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2UwZTBlMCIgb3BhY2l0eT0iMC4yIiBzdHJva2Utd2lkdGg9IjEiLz48cGF0aCBkPSJNIDQwIDAgTCAwIDAgMCA0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIiBzdHJva2Utd2lkdGg9IjEiLz48L3BhdHRlcm4+PC9kZWZzPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JpZCkiLz48L3N2Zz4=)';\nvar Grid = /** @class */function (_super) {\n __extends(Grid, _super);\n function Grid(config) {\n return _super.call(this, config) || this;\n }\n Grid.prototype.getDefaultCfgs = function () {\n return {\n img: GRID_PNG,\n follow: true\n };\n };\n Grid.prototype.init = function () {\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var canvas = graph.get('canvas').get('el');\n var img = this.get('img') || GRID_PNG;\n if (!img.includes('url(')) {\n img = \"url(\\\"\".concat(img, \"\\\")\");\n }\n var container = createDom(\"
\");\n var gridContainer = createDom(\"\"));\n this.set('container', container);\n this.set('gridContainer', gridContainer);\n this.positionInit();\n container.appendChild(gridContainer);\n graphContainer.insertBefore(container, canvas);\n };\n /** 定位信息初始化 */\n Grid.prototype.positionInit = function () {\n var graph = this.get('graph');\n var minZoom = graph.get('minZoom');\n var width = graph.get('width');\n var height = graph.get('height');\n modifyCSS(this.get('container'), {\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n // 网格 40*40 需保证 (gridContainerWidth / 2) % 40 = 0 才能让网格线对齐左上角 故 * 80\n var gridContainerWidth = width * 80 / minZoom;\n var gridContainerHeight = height * 80 / minZoom;\n modifyCSS(this.get('gridContainer'), {\n width: \"\".concat(gridContainerWidth, \"px\"),\n height: \"\".concat(gridContainerHeight, \"px\"),\n left: \"-\".concat(gridContainerWidth / 2, \"px\"),\n top: \"-\".concat(gridContainerHeight / 2, \"px\")\n });\n };\n // class-methods-use-this\n Grid.prototype.getEvents = function () {\n return {\n viewportchange: 'updateGrid'\n };\n };\n /**\n * viewport change 事件的响应函数\n * @param param\n */\n Grid.prototype.updateGrid = function (param) {\n var gridContainer = this.get('gridContainer');\n var matrix = param.matrix;\n if (!matrix) matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var isFollow = this.get('follow');\n var transform = \"matrix(\".concat(matrix[0], \", \").concat(matrix[1], \", \").concat(matrix[3], \", \").concat(matrix[4], \", \").concat(isFollow ? matrix[6] : '0', \", \").concat(isFollow ? matrix[7] : '0', \")\");\n modifyCSS(gridContainer, {\n transform: transform\n });\n };\n Grid.prototype.getContainer = function () {\n return this.get('container');\n };\n Grid.prototype.destroy = function () {\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = this.get('container');\n graphContainer.removeChild(container);\n };\n return Grid;\n}(Base);\nexport default Grid;","var containers = []; // will store container HTMLElement references\nvar styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}\n\nvar usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';\n\nfunction insertCss(css, options) {\n options = options || {};\n\n if (css === undefined) {\n throw new Error(usage);\n }\n\n var position = options.prepend === true ? 'prepend' : 'append';\n var container = options.container !== undefined ? options.container : document.querySelector('head');\n var containerId = containers.indexOf(container);\n\n // first time we see this container, create the necessary entries\n if (containerId === -1) {\n containerId = containers.push(container) - 1;\n styleElements[containerId] = {};\n }\n\n // try to get the correponding container + position styleElement, create it otherwise\n var styleElement;\n\n if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {\n styleElement = styleElements[containerId][position];\n } else {\n styleElement = styleElements[containerId][position] = createStyleElement();\n\n if (position === 'prepend') {\n container.insertBefore(styleElement, container.childNodes[0]);\n } else {\n container.appendChild(styleElement);\n }\n }\n\n // strip potential UTF-8 BOM if css was read from a file\n if (css.charCodeAt(0) === 0xFEFF) { css = css.substr(1, css.length); }\n\n // actually add the stylesheet\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText += css\n } else {\n styleElement.textContent += css;\n }\n\n return styleElement;\n};\n\nfunction createStyleElement() {\n var styleElement = document.createElement('style');\n styleElement.setAttribute('type', 'text/css');\n return styleElement;\n}\n\nmodule.exports = insertCss;\nmodule.exports.insertCss = insertCss;\n","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { isString } from '@antv/util';\nimport insertCss from 'insert-css';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-contextmenu {\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n background-color: rgba(255, 255, 255, 0.9);\\n padding: 10px 8px;\\n box-shadow: rgb(174, 174, 174) 0px 0px 10px;\\n }\\n .g6-contextmenu-ul {\\n padding: 0;\\n margin: 0;\\n list-style: none;\\n }\\n\\n\");\nvar Menu = /** @class */function (_super) {\n __extends(Menu, _super);\n function Menu(config) {\n return _super.call(this, config) || this;\n }\n Menu.prototype.getDefaultCfgs = function () {\n return {\n offsetX: 6,\n offsetY: 6,\n handleMenuClick: undefined,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(e) {\n return \"\\n
    \\n
  • \\u83DC\\u5355\\u98791
  • \\n
  • \\u83DC\\u5355\\u98792
  • \\n
\\n \";\n },\n shouldBegin: function shouldBegin(e) {\n return true;\n },\n // 菜单隐藏事件\n onHide: function onHide() {\n return true;\n },\n itemTypes: ['node', 'edge', 'combo'],\n trigger: 'contextmenu'\n };\n };\n // class-methods-use-this\n Menu.prototype.getEvents = function () {\n if (this.get('trigger') === 'click') {\n return {\n click: 'onMenuShow',\n touchend: 'onMenuShow'\n };\n }\n return {\n contextmenu: 'onMenuShow'\n };\n };\n Menu.prototype.init = function () {\n var className = this.get('className');\n var menu = createDom(\"
\"));\n modifyCSS(menu, {\n top: '0px',\n position: 'absolute',\n visibility: 'hidden'\n });\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.appendChild(menu);\n this.set('menu', menu);\n };\n Menu.prototype.onMenuShow = function (e) {\n var self = this;\n e.preventDefault();\n var itemTypes = this.get('itemTypes');\n if (!e.item) {\n if (itemTypes.indexOf('canvas') === -1) {\n self.onMenuHide();\n return;\n }\n } else {\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) {\n self.onMenuHide();\n return;\n }\n }\n var shouldBegin = this.get('shouldBegin');\n if (!shouldBegin(e)) return;\n var menuDom = this.get('menu');\n var getContent = this.get('getContent');\n var graph = this.get('graph');\n var menu = getContent(e, graph);\n if (isString(menu)) {\n menuDom.innerHTML = menu;\n } else {\n menuDom.innerHTML = menu.outerHTML;\n }\n // 清除之前监听的事件\n this.removeMenuEventListener();\n var handleMenuClick = this.get('handleMenuClick');\n if (handleMenuClick) {\n var handleMenuClickWrapper = function handleMenuClickWrapper(evt) {\n handleMenuClick(evt.target, e.item, graph);\n };\n this.set('handleMenuClickWrapper', handleMenuClickWrapper);\n menuDom.addEventListener('click', handleMenuClickWrapper);\n }\n var width = graph.get('width');\n var height = graph.get('height');\n var bbox = menuDom.getBoundingClientRect();\n var offsetX = this.get('offsetX') || 0;\n var offsetY = this.get('offsetY') || 0;\n var graphTop = graph.getContainer().offsetTop;\n var graphLeft = graph.getContainer().offsetLeft;\n var x = e.canvasX + graphLeft + offsetX;\n var y = e.canvasY + graphTop + offsetY;\n // when the menu is (part of) out of the canvas\n if (x + bbox.width > width) {\n x = e.canvasX - bbox.width - offsetX + graphLeft;\n }\n if (y + bbox.height > height) {\n y = e.canvasY - bbox.height - offsetY + graphTop;\n }\n if (y < 0) {\n y = 0;\n }\n modifyCSS(menuDom, {\n top: \"\".concat(y, \"px\"),\n left: \"\".concat(x, \"px\"),\n visibility: 'visible'\n });\n // 左键单击会触发 body 上监听的 click 事件,导致菜单展示出来后又立即被隐藏了,需要过滤掉\n var triggeredByFirstClick = this.get('trigger') === 'click';\n var handler = function handler(evt) {\n if (triggeredByFirstClick) {\n triggeredByFirstClick = false;\n return;\n }\n self.onMenuHide();\n };\n // 如果在页面中其他任意地方进行click, 隐去菜单\n document.body.addEventListener('click', handler);\n this.set('handler', handler);\n };\n Menu.prototype.removeMenuEventListener = function () {\n var handleMenuClickWrapper = this.get('handleMenuClickWrapper');\n var handler = this.get('handler');\n if (handleMenuClickWrapper) {\n var menuDom = this.get('menu');\n menuDom.removeEventListener('click', handleMenuClickWrapper);\n this.set('handleMenuClickWrapper', null);\n }\n if (handler) {\n document.body.removeEventListener('click', handler);\n }\n };\n Menu.prototype.onMenuHide = function () {\n var menuDom = this.get('menu');\n if (menuDom) {\n modifyCSS(menuDom, {\n visibility: 'hidden'\n });\n }\n // 隐藏菜单后需要移除事件监听\n this.removeMenuEventListener();\n };\n Menu.prototype.destroy = function () {\n var menu = this.get('menu');\n this.removeMenuEventListener();\n if (menu) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(menu);\n }\n };\n return Menu;\n}(Base);\nexport default Menu;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { isString, isNil, each, debounce } from '@antv/util';\nimport { createDom, modifyCSS } from '@antv/dom-util';\nimport { ext } from '@antv/matrix-util';\nimport Base from '../base';\nvar max = Math.max;\nvar transform = ext.transform;\nvar DEFAULT_MODE = 'default';\nvar KEYSHAPE_MODE = 'keyShape';\nvar DELEGATE_MODE = 'delegate';\nvar SVG = 'svg';\nvar MiniMap = /** @class */function (_super) {\n __extends(MiniMap, _super);\n function MiniMap(config) {\n var _this = _super.call(this, config) || this;\n /**\n * 主图更新的监听函数,使用 debounce 减少渲染频率\n * e.g. 拖拽节点只会在松手后的 100ms 后执行 updateCanvas\n * e.g. render 时大量 addItem 也只会执行一次 updateCanvas\n */\n _this.handleUpdateCanvas = debounce(function (event) {\n var self = _this;\n if (self.destroyed) return;\n self.updateCanvas();\n }, 100, false);\n return _this;\n }\n MiniMap.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-minimap',\n viewportClassName: 'g6-minimap-viewport',\n // Minimap 中默认展示和主图一样的内容,KeyShape 只展示节点和边的 key shape 部分,delegate表示展示自定义的rect,用户可自定义样式\n type: 'default',\n padding: 50,\n size: [200, 120],\n delegateStyle: {\n fill: '#40a9ff',\n stroke: '#096dd9'\n },\n refresh: true,\n hideEdge: false\n };\n };\n MiniMap.prototype.getEvents = function () {\n return {\n beforepaint: 'updateViewport',\n beforeanimate: 'disableRefresh',\n afteranimate: 'enableRefresh',\n viewportchange: 'disableOneRefresh'\n };\n };\n // 若是正在进行动画,不刷新缩略图\n MiniMap.prototype.disableRefresh = function () {\n this.set('refresh', false);\n };\n MiniMap.prototype.enableRefresh = function () {\n this.set('refresh', true);\n this.updateCanvas();\n };\n MiniMap.prototype.disableOneRefresh = function () {\n this.set('viewportChange', true);\n };\n MiniMap.prototype.initViewport = function () {\n var _this = this;\n var cfgs = this._cfgs;\n var size = cfgs.size,\n graph = cfgs.graph;\n if (this.destroyed) return;\n var canvas = this.get('canvas');\n var containerDOM = canvas.get('container');\n var isFireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n var isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;\n var viewport = createDom(\"\\n \"));\n // 计算拖拽水平方向距离\n var x = 0;\n // 计算拖拽垂直方向距离\n var y = 0;\n // 是否在拖拽minimap的视口\n var dragging = false;\n // 缓存viewport当前对于画布的x\n var left = 0;\n // 缓存viewport当前对于画布的y\n var top = 0;\n // 缓存viewport当前宽度\n var width = 0;\n // 缓存viewport当前高度\n var height = 0;\n var ratio = 0;\n var zoom = 0;\n var dragstartevent = isSafari || isFireFox ? 'mousedown' : 'dragstart';\n viewport.addEventListener(dragstartevent, function (e) {\n var _a, _b;\n if (e.dataTransfer) {\n var img = new Image();\n img.src = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' %3E%3Cpath /%3E%3C/svg%3E\";\n (_b = (_a = e.dataTransfer).setDragImage) === null || _b === void 0 ? void 0 : _b.call(_a, img, 0, 0);\n try {\n e.dataTransfer.setData('text/html', 'view-port-minimap');\n } catch (_c) {\n // support IE\n e.dataTransfer.setData('text', 'view-port-minimap');\n }\n }\n cfgs.refresh = false;\n if (e.target !== viewport) {\n return;\n }\n // 如果视口已经最大了,不需要拖拽\n var style = viewport.style;\n left = parseInt(style.left, 10);\n top = parseInt(style.top, 10);\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n if (width > size[0] || height > size[1]) {\n return;\n }\n zoom = graph.getZoom();\n ratio = _this.get('ratio');\n dragging = true;\n x = e.clientX;\n y = e.clientY;\n }, false);\n var dragListener = function dragListener(e) {\n if (!dragging || isNil(e.clientX) || isNil(e.clientY)) {\n return;\n }\n var dx = x - e.clientX;\n var dy = y - e.clientY;\n // 若视口移动到最左边或最右边了,仅移动到边界\n if (left - dx < 0 || left - dx + width >= size[0]) {\n dx = 0;\n }\n // 若视口移动到最上或最下边了,仅移动到边界\n if (top - dy < 0 || top - dy + height >= size[1]) {\n dy = 0;\n }\n left -= dx;\n top -= dy;\n // 先移动视口,避免移动到边上以后出现视口闪烁\n modifyCSS(viewport, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\")\n });\n // graph 移动需要偏移量 dx/dy * 缩放比例才会得到正确的移动距离\n graph.translate(dx * zoom / ratio, dy * zoom / ratio);\n x = e.clientX;\n y = e.clientY;\n };\n if (!isSafari && !isFireFox) {\n viewport.addEventListener('drag', dragListener, false);\n }\n var dragendListener = function dragendListener() {\n dragging = false;\n cfgs.refresh = true;\n };\n var dragendevent = isSafari || isFireFox ? 'mouseup' : 'dragend';\n viewport.addEventListener(dragendevent, dragendListener, false);\n containerDOM.addEventListener('mouseleave', dragendListener);\n containerDOM.addEventListener('mouseup', dragendListener);\n if (isSafari || isFireFox) {\n containerDOM.addEventListener('mousemove', dragListener, false);\n }\n this.set('viewport', viewport);\n containerDOM.appendChild(viewport);\n };\n /**\n * 更新 viewport 视图\n */\n MiniMap.prototype.updateViewport = function () {\n if (this.destroyed) return;\n var ratio = this.get('ratio');\n var totaldx = this.get('totaldx');\n var totaldy = this.get('totaldy');\n var graph = this.get('graph');\n var size = this.get('size');\n var graphCanvasEl = graph.get('canvas').get('el');\n var graphWidth = graph.get('width') || graphCanvasEl.scrollWidth || 500;\n var graphHeight = graph.get('height') || graphCanvasEl.scrollHeight || 500;\n var topLeft = graph.getPointByCanvas(0, 0);\n var bottomRight = graph.getPointByCanvas(graphWidth, graphHeight);\n var viewport = this.get('viewport');\n if (!viewport) {\n this.initViewport();\n }\n // viewport宽高,左上角点的计算\n var width = (bottomRight.x - topLeft.x) * ratio;\n var height = (bottomRight.y - topLeft.y) * ratio;\n var left = topLeft.x * ratio + totaldx;\n var top = topLeft.y * ratio + totaldy;\n var right = left + width;\n var bottom = top + height;\n if (left < 0) {\n width += left;\n left = 0;\n }\n if (right > size[0]) {\n width = width - (right - size[0]);\n }\n if (top < 0) {\n height += top;\n top = 0;\n }\n if (bottom > size[1]) {\n height = height - (bottom - size[1]);\n }\n // 缓存目前缩放比,在移动 minimap 视窗时就不用再计算大图的移动量\n this.set('ratio', ratio);\n var correctLeft = \"\".concat(left, \"px\");\n var correctTop = \"\".concat(top, \"px\");\n modifyCSS(viewport, {\n left: correctLeft,\n top: correctTop,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n };\n /**\n * 将主图上的图形完全复制到小图\n */\n MiniMap.prototype.updateGraphShapes = function () {\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var graphGroup = graph.get('group');\n if (graphGroup.destroyed) return;\n canvas.clear();\n var clonedGroup;\n if (this.get('hideEdge')) {\n clonedGroup = canvas.addGroup();\n graphGroup.get('children').forEach(function (group) {\n if (group.get('id').includes('-edge')) return;\n clonedGroup.add(group.clone());\n });\n } else {\n clonedGroup = graphGroup.clone();\n clonedGroup.resetMatrix();\n canvas.add(clonedGroup);\n }\n // 当 renderer 是 svg,由于渲染引擎的 bug,这里需要将 visible 为 false 的元素手动隐藏\n var renderer = graph.get('renderer');\n if (renderer === SVG) {\n // 递归更新子元素\n this.updateVisible(clonedGroup);\n }\n };\n // svg 在 canvas.add(clonedGroup) 之后会出现 visible 为 false 的元素被展示出来,需要递归更新\n MiniMap.prototype.updateVisible = function (ele) {\n var _this = this;\n if (!ele.isGroup() && !ele.get('visible')) {\n ele.hide();\n } else {\n var children = ele.get('children');\n if (!children || !children.length) return;\n children.forEach(function (child) {\n if (!child.get('visible')) child.hide();\n _this.updateVisible(child);\n });\n }\n };\n // 仅在 minimap 上绘制 keyShape\n // FIXME 如果用户自定义绘制了其他内容,minimap上就无法画出\n MiniMap.prototype.updateKeyShapes = function () {\n var _this = this;\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var group = canvas.get('children')[0] || canvas.addGroup();\n if (!this.get('hideEdge')) {\n each(graph.getEdges(), function (edge) {\n _this.updateOneEdgeKeyShape(edge, group);\n });\n }\n each(graph.getNodes(), function (node) {\n _this.updateOneNodeKeyShape(node, group);\n });\n var combos = graph.getCombos();\n if (combos && combos.length) {\n var comboGroup_1 = group.find(function (e) {\n return e.get('name') === 'comboGroup';\n }) || group.addGroup({\n name: 'comboGroup'\n });\n setTimeout(function () {\n if (_this.destroyed) return;\n each(combos, function (combo) {\n _this.updateOneComboKeyShape(combo, comboGroup_1);\n });\n comboGroup_1 === null || comboGroup_1 === void 0 ? void 0 : comboGroup_1.sort();\n comboGroup_1 === null || comboGroup_1 === void 0 ? void 0 : comboGroup_1.toBack();\n _this.updateCanvas();\n }, 250);\n }\n this.clearDestroyedShapes();\n };\n /**\n * 增加/更新单个元素的 keyShape\n * @param item ICombo 实例\n */\n MiniMap.prototype.updateOneComboKeyShape = function (item, comboGroup) {\n if (this.destroyed) return;\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n var cKeyShape = item.get('keyShape').clone();\n var keyShapeStyle = cKeyShape.attr();\n var attrs = {\n x: bbox.centerX,\n y: bbox.centerY\n };\n if (!mappedItem) {\n mappedItem = cKeyShape;\n comboGroup.add(mappedItem);\n } else {\n attrs = Object.assign(keyShapeStyle, attrs);\n }\n var shapeType = mappedItem.get('type');\n if (shapeType === 'rect' || shapeType === 'image') {\n attrs.x = bbox.minX;\n attrs.y = bbox.minY;\n }\n mappedItem.attr(attrs);\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n var zIndex = item.getModel().depth;\n if (!isNaN(zIndex)) mappedItem.set('zIndex', zIndex);\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * 增加/更新单个元素的 keyShape\n * @param item INode 实例\n */\n MiniMap.prototype.updateOneNodeKeyShape = function (item, group) {\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n var cKeyShape = item.get('keyShape').clone();\n var keyShapeStyle = cKeyShape.attr();\n var attrs = {\n x: bbox.centerX,\n y: bbox.centerY\n };\n if (!mappedItem) {\n mappedItem = cKeyShape;\n group.add(mappedItem);\n } else {\n attrs = Object.assign(keyShapeStyle, attrs);\n mappedItem.toFront();\n }\n var shapeType = mappedItem.get('type');\n if (shapeType === 'rect' || shapeType === 'image') {\n attrs.x = bbox.minX;\n attrs.y = bbox.minY;\n }\n mappedItem.attr(attrs);\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n var zIndex = item.getModel().depth;\n if (!isNaN(zIndex)) mappedItem.set('zIndex', zIndex);\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * Minimap 中展示自定义的rect,支持用户自定义样式和节点大小\n */\n MiniMap.prototype.updateDelegateShapes = function () {\n var _this = this;\n var graph = this._cfgs.graph;\n var canvas = this.get('canvas');\n var group = canvas.get('children')[0] || canvas.addGroup();\n // 差量更新 minimap 上的节点和边\n if (!this.get('hideEdge')) {\n each(graph.getEdges(), function (edge) {\n _this.updateOneEdgeKeyShape(edge, group);\n });\n }\n each(graph.getNodes(), function (node) {\n _this.updateOneNodeDelegateShape(node, group);\n });\n var combos = graph.getCombos();\n if (combos && combos.length) {\n var comboGroup_2 = group.find(function (e) {\n return e.get('name') === 'comboGroup';\n }) || group.addGroup({\n name: 'comboGroup'\n });\n setTimeout(function () {\n if (_this.destroyed) return;\n each(combos, function (combo) {\n _this.updateOneComboKeyShape(combo, comboGroup_2);\n });\n comboGroup_2 === null || comboGroup_2 === void 0 ? void 0 : comboGroup_2.sort();\n comboGroup_2 === null || comboGroup_2 === void 0 ? void 0 : comboGroup_2.toBack();\n _this.updateCanvas();\n }, 250);\n }\n this.clearDestroyedShapes();\n };\n MiniMap.prototype.clearDestroyedShapes = function () {\n var itemMap = this.get('itemMap') || {};\n var keys = Object.keys(itemMap);\n if (!keys || keys.length === 0) return;\n for (var i = keys.length - 1; i >= 0; i--) {\n var shape = itemMap[keys[i]];\n var exist = shape.exist;\n shape.exist = false;\n if (!exist) {\n shape.remove();\n delete itemMap[keys[i]];\n }\n }\n };\n /**\n * 设置只显示 edge 的 keyShape\n * @param item IEdge 实例\n */\n MiniMap.prototype.updateOneEdgeKeyShape = function (item, group) {\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n if (mappedItem) {\n var path = item.get('keyShape').attr('path');\n mappedItem.attr('path', path);\n } else {\n mappedItem = item.get('keyShape').clone();\n group.add(mappedItem);\n }\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n /**\n * Minimap 中展示自定义的 rect,支持用户自定义样式和节点大小\n * 增加/更新单个元素\n * @param item INode 实例\n */\n MiniMap.prototype.updateOneNodeDelegateShape = function (item, group) {\n var delegateStyle = this.get('delegateStyle');\n var itemMap = this.get('itemMap') || {};\n // 差量更新 minimap 上的一个节点,对应主图的 item\n var mappedItem = itemMap[item.get('id')];\n var bbox = item.getBBox(); // 计算了节点父组矩阵的 bbox\n if (mappedItem) {\n var attrs = {\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n };\n mappedItem.attr(attrs);\n mappedItem.toFront();\n } else {\n mappedItem = group.addShape('rect', {\n attrs: __assign({\n x: bbox.minX,\n y: bbox.minY,\n width: bbox.width,\n height: bbox.height\n }, delegateStyle),\n name: 'minimap-node-shape'\n });\n }\n if (!item.isVisible()) mappedItem.hide();else mappedItem.show();\n mappedItem.exist = true;\n itemMap[item.get('id')] = mappedItem;\n this.set('itemMap', itemMap);\n };\n MiniMap.prototype.init = function () {\n this.initContainer();\n this.get('graph').on('afterupdateitem', this.handleUpdateCanvas);\n this.get('graph').on('afteritemstatechange', this.handleUpdateCanvas);\n this.get('graph').on('afteradditem', this.handleUpdateCanvas);\n this.get('graph').on('afterremoveitem', this.handleUpdateCanvas);\n this.get('graph').on('afterrender', this.handleUpdateCanvas);\n this.get('graph').on('afterlayout', this.handleUpdateCanvas);\n };\n /**\n * 初始化 Minimap 的容器\n */\n MiniMap.prototype.initContainer = function () {\n var self = this;\n var graph = self.get('graph');\n var size = self.get('size');\n var className = self.get('className');\n var parentNode = self.get('container');\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n if (parentNode) {\n parentNode.appendChild(container);\n } else {\n graph.get('container').appendChild(container);\n }\n self.set('container', container);\n var containerDOM = createDom('
');\n container.appendChild(containerDOM);\n containerDOM.addEventListener('dragenter', function (e) {\n e.preventDefault();\n });\n containerDOM.addEventListener('dragover', function (e) {\n e.preventDefault();\n });\n var canvas;\n var renderer = graph.get('renderer');\n if (renderer === SVG) {\n canvas = new GSVGCanvas({\n container: containerDOM,\n width: size[0],\n height: size[1]\n });\n } else {\n canvas = new GCanvas({\n container: containerDOM,\n width: size[0],\n height: size[1]\n });\n }\n self.set('canvas', canvas);\n self.updateCanvas();\n };\n MiniMap.prototype.updateCanvas = function () {\n if (this.destroyed) return;\n // 如果是在动画,则不刷新视图\n var isRefresh = this.get('refresh');\n if (!isRefresh) {\n return;\n }\n var graph = this.get('graph');\n if (graph.get('destroyed')) {\n return;\n }\n // 如果是视口变换,也不刷新视图,但是需要重置视口大小和位置\n if (this.get('viewportChange')) {\n this.set('viewportChange', false);\n this.updateViewport();\n }\n var size = this.get('size'); // 用户定义的 minimap size\n var canvas = this.get('canvas'); // minimap 的 canvas\n var type = this.get('type'); // minimap 的类型\n var padding = this.get('padding'); // 用户额定义的 minimap 的 padding\n if (canvas.destroyed) {\n return;\n }\n switch (type) {\n case DEFAULT_MODE:\n this.updateGraphShapes();\n break;\n case KEYSHAPE_MODE:\n this.updateKeyShapes();\n break;\n case DELEGATE_MODE:\n // 得到的节点直接带有 x 和 y,每个节点不存在父 group,即每个节点位置不由父 group 控制\n this.updateDelegateShapes();\n break;\n default:\n break;\n }\n var group = canvas.get('children')[0];\n if (!group) return;\n group.resetMatrix();\n // 该 bbox 是准确的,不计算 matrix 的包围盒\n var bbox = group.getCanvasBBox();\n var graphBBox = graph.get('canvas').getCanvasBBox(); // 主图的 bbox\n var graphZoom = graph.getZoom() || 1;\n var width = graphBBox.width / graphZoom;\n var height = graphBBox.height / graphZoom;\n if (Number.isFinite(bbox.width)) {\n // 刷新后bbox可能会变,需要重置画布矩阵以缩放到合适的大小\n width = max(bbox.width, width);\n height = max(bbox.height, height);\n }\n width += 2 * padding;\n height += 2 * padding;\n var ratio = Math.min(size[0] / width, size[1] / height);\n var matrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var minX = 0;\n var minY = 0;\n // 平移到左上角\n if (Number.isFinite(bbox.minX)) {\n minX = -bbox.minX;\n }\n if (Number.isFinite(bbox.minY)) {\n minY = -bbox.minY;\n }\n // 缩放到适合视口后, 平移到画布中心\n var dx = (size[0] - (width - 2 * padding) * ratio) / 2;\n var dy = (size[1] - (height - 2 * padding) * ratio) / 2;\n matrix = transform(matrix, [['t', minX, minY], ['s', ratio, ratio], ['t', dx, dy] // 移动到画布中心\n ]);\n\n group.setMatrix(matrix);\n // 更新minimap视口\n this.set('ratio', ratio);\n this.set('totaldx', dx + minX * ratio);\n this.set('totaldy', dy + minY * ratio);\n this.set('dx', dx);\n this.set('dy', dy);\n this.updateViewport();\n };\n /**\n * 获取minimap的画布\n * @return {GCanvas} G的canvas实例\n */\n MiniMap.prototype.getCanvas = function () {\n return this.get('canvas');\n };\n /**\n * 获取minimap的窗口\n * @return {HTMLElement} 窗口的dom实例\n */\n MiniMap.prototype.getViewport = function () {\n return this.get('viewport');\n };\n /**\n * 获取minimap的容器dom\n * @return {HTMLElement} dom\n */\n MiniMap.prototype.getContainer = function () {\n return this.get('container');\n };\n MiniMap.prototype.destroy = function () {\n var _a;\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.destroy();\n var container = this.get('container');\n if (container === null || container === void 0 ? void 0 : container.parentNode) container.parentNode.removeChild(container);\n };\n return MiniMap;\n}(Base);\nexport default MiniMap;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport Base from '../base';\nfunction getEucliDis(pointA, pointB, eps) {\n var vx = pointA.x - pointB.x;\n var vy = pointA.y - pointB.y;\n if (!eps || Math.abs(vx) > eps || Math.abs(vy) > eps) {\n return Math.sqrt(vx * vx + vy * vy);\n }\n return eps;\n}\nfunction getDotProduct(ei, ej) {\n return ei.x * ej.x + ei.y * ej.y;\n}\nfunction projectPointToEdge(p, e) {\n var k = (e.source.y - e.target.y) / (e.source.x - e.target.x);\n var x = (k * k * e.source.x + k * (p.y - e.source.y) + p.x) / (k * k + 1);\n var y = k * (x - e.source.x) + e.source.y;\n return {\n x: x,\n y: y\n };\n}\nvar Bundling = /** @class */function (_super) {\n __extends(Bundling, _super);\n function Bundling(config) {\n return _super.call(this, config) || this;\n }\n Bundling.prototype.getDefaultCfgs = function () {\n return {\n edgeBundles: [],\n edgePoints: [],\n K: 0.1,\n lambda: 0.1,\n divisions: 1,\n divRate: 2,\n cycles: 6,\n iterations: 90,\n iterRate: 0.6666667,\n bundleThreshold: 0.6,\n eps: 1e-6,\n onLayoutEnd: function onLayoutEnd() {},\n onTick: function onTick() {}\n };\n };\n Bundling.prototype.init = function () {\n var graph = this.get('graph');\n var onTick = this.get('onTick');\n var tick = function tick() {\n if (onTick) {\n onTick();\n }\n graph.refreshPositions();\n };\n this.set('tick', tick);\n };\n Bundling.prototype.bundling = function (data) {\n var self = this;\n self.set('data', data);\n // 如果正在布局,忽略布局请求\n if (self.isTicking()) {\n return;\n }\n var edges = data.edges || [];\n var nodes = data.nodes || [];\n var nodeIdMap = {};\n var error = false;\n nodes.forEach(function (node) {\n if (node.x === null || !node.y === null || node.x === undefined || !node.y === undefined) {\n error = true;\n }\n nodeIdMap[node.id] = node;\n });\n if (error) throw new Error('please layout the graph or assign x and y for nodes first');\n self.set('nodeIdMap', nodeIdMap);\n // subdivide each edges\n var divisions = self.get('divisions');\n var divRate = self.get('divRate');\n var edgePoints = self.divideEdges(divisions);\n self.set('edgePoints', edgePoints);\n // compute the bundles\n var edgeBundles = self.getEdgeBundles();\n self.set('edgeBundles', edgeBundles);\n // iterations\n var C = self.get('cycles');\n var iterations = self.get('iterations');\n var iterRate = self.get('iterRate');\n var lambda = self.get('lambda');\n for (var i = 0; i < C; i++) {\n var _loop_1 = function _loop_1(j) {\n var forces = [];\n edges.forEach(function (e, k) {\n if (e.source === e.target) return;\n var source = nodeIdMap[e.source];\n var target = nodeIdMap[e.target];\n forces[k] = self.getEdgeForces({\n source: source,\n target: target\n }, k, divisions, lambda);\n for (var p = 0; p < divisions + 1; p++) {\n edgePoints[k][p].x += forces[k][p].x;\n edgePoints[k][p].y += forces[k][p].y;\n }\n });\n };\n for (var j = 0; j < iterations; j++) {\n _loop_1(j);\n }\n // parameters for nex cycle\n lambda = lambda / 2;\n divisions *= divRate;\n iterations *= iterRate;\n edgePoints = self.divideEdges(divisions);\n self.set('edgePoints', edgePoints);\n }\n // change the edges according to edgePoints\n edges.forEach(function (e, i) {\n if (e.source === e.target) return;\n e.type = 'polyline';\n e.controlPoints = edgePoints[i].slice(1, edgePoints[i].length - 1);\n });\n var graph = self.get('graph');\n graph.refresh();\n };\n Bundling.prototype.updateBundling = function (cfg) {\n var self = this;\n var data = cfg.data;\n if (data) {\n self.set('data', data);\n }\n if (self.get('ticking')) {\n self.set('ticking', false);\n }\n Object.keys(cfg).forEach(function (key) {\n self.set(key, cfg[key]);\n });\n if (cfg.onTick) {\n var graph_1 = this.get('graph');\n self.set('tick', function () {\n cfg.onTick();\n graph_1.refresh();\n });\n }\n self.bundling(data);\n };\n Bundling.prototype.divideEdges = function (divisions) {\n var self = this;\n var edges = self.get('data').edges;\n var nodeIdMap = self.get('nodeIdMap');\n var edgePoints = self.get('edgePoints');\n if (!edgePoints || edgePoints === undefined) edgePoints = [];\n edges.forEach(function (edge, i) {\n var _a;\n if (!edgePoints[i] || edgePoints[i] === undefined) {\n edgePoints[i] = [];\n }\n var source = nodeIdMap[edge.source];\n var target = nodeIdMap[edge.target];\n if (divisions === 1) {\n edgePoints[i].push({\n x: source.x,\n y: source.y\n }); // source\n edgePoints[i].push({\n x: 0.5 * (source.x + target.x),\n y: 0.5 * (source.y + target.y)\n }); // mid\n edgePoints[i].push({\n x: target.x,\n y: target.y\n }); // target\n } else {\n var edgeLength = 0;\n if (!((_a = edgePoints[i]) === null || _a === void 0 ? void 0 : _a.length)) {\n // it is a straight line\n edgeLength = getEucliDis({\n x: source.x,\n y: source.y\n }, {\n x: target.x,\n y: target.y\n });\n } else {\n edgeLength = self.getEdgeLength(edgePoints[i]);\n }\n var divisionLength_1 = edgeLength / (divisions + 1);\n var currentDivisonLength_1 = divisionLength_1;\n var newEdgePoints_1 = [{\n x: source.x,\n y: source.y\n }]; // source\n edgePoints[i].forEach(function (ep, j) {\n if (j === 0) return;\n var oriDivisionLength = getEucliDis(ep, edgePoints[i][j - 1]);\n while (oriDivisionLength > currentDivisonLength_1) {\n var ratio = currentDivisonLength_1 / oriDivisionLength;\n var edgePoint = {\n x: edgePoints[i][j - 1].x,\n y: edgePoints[i][j - 1].y\n };\n edgePoint.x += ratio * (ep.x - edgePoints[i][j - 1].x);\n edgePoint.y += ratio * (ep.y - edgePoints[i][j - 1].y);\n newEdgePoints_1.push(edgePoint);\n oriDivisionLength -= currentDivisonLength_1;\n currentDivisonLength_1 = divisionLength_1;\n }\n currentDivisonLength_1 -= oriDivisionLength;\n });\n newEdgePoints_1.push({\n x: target.x,\n y: target.y\n }); // target\n edgePoints[i] = newEdgePoints_1;\n }\n });\n return edgePoints;\n };\n /**\n * 计算边的长度\n * @param points\n */\n Bundling.prototype.getEdgeLength = function (points) {\n var length = 0;\n points.forEach(function (p, i) {\n if (i === 0) return;\n length += getEucliDis(p, points[i - 1]);\n });\n return length;\n };\n Bundling.prototype.getEdgeBundles = function () {\n var self = this;\n var data = self.get('data');\n var edges = data.edges || [];\n var bundleThreshold = self.get('bundleThreshold');\n var nodeIdMap = self.get('nodeIdMap');\n var edgeBundles = self.get('edgeBundles');\n if (!edgeBundles) edgeBundles = [];\n edges.forEach(function (e, i) {\n if (!edgeBundles[i] || edgeBundles[i] === undefined) {\n edgeBundles[i] = [];\n }\n });\n edges.forEach(function (ei, i) {\n var iSource = nodeIdMap[ei.source];\n var iTarget = nodeIdMap[ei.target];\n edges.forEach(function (ej, j) {\n if (j <= i) return;\n var jSource = nodeIdMap[ej.source];\n var jTarget = nodeIdMap[ej.target];\n var score = self.getBundleScore({\n source: iSource,\n target: iTarget\n }, {\n source: jSource,\n target: jTarget\n });\n if (score >= bundleThreshold) {\n edgeBundles[i].push(j);\n edgeBundles[j].push(i);\n }\n });\n });\n return edgeBundles;\n };\n Bundling.prototype.getBundleScore = function (ei, ej) {\n var self = this;\n ei.vx = ei.target.x - ei.source.x;\n ei.vy = ei.target.y - ei.source.y;\n ej.vx = ej.target.x - ej.source.x;\n ej.vy = ej.target.y - ej.source.y;\n ei.length = getEucliDis({\n x: ei.source.x,\n y: ei.source.y\n }, {\n x: ei.target.x,\n y: ei.target.y\n });\n ej.length = getEucliDis({\n x: ej.source.x,\n y: ej.source.y\n }, {\n x: ej.target.x,\n y: ej.target.y\n });\n // angle score\n var aScore = self.getAngleScore(ei, ej);\n // scale score\n var sScore = self.getScaleScore(ei, ej);\n // position score\n var pScore = self.getPositionScore(ei, ej);\n // visibility socre\n var vScore = self.getVisibilityScore(ei, ej);\n return aScore * sScore * pScore * vScore;\n };\n Bundling.prototype.getAngleScore = function (ei, ej) {\n var dotProduct = getDotProduct({\n x: ei.vx,\n y: ei.vy\n }, {\n x: ej.vx,\n y: ej.vy\n });\n return dotProduct / (ei.length * ej.length);\n };\n Bundling.prototype.getScaleScore = function (ei, ej) {\n var aLength = (ei.length + ej.length) / 2;\n var score = 2 / (aLength / Math.min(ei.length, ej.length) + Math.max(ei.length, ej.length) / aLength);\n return score;\n };\n Bundling.prototype.getPositionScore = function (ei, ej) {\n var aLength = (ei.length + ej.length) / 2;\n var iMid = {\n x: (ei.source.x + ei.target.x) / 2,\n y: (ei.source.y + ei.target.y) / 2\n };\n var jMid = {\n x: (ej.source.x + ej.target.x) / 2,\n y: (ej.source.y + ej.target.y) / 2\n };\n var distance = getEucliDis(iMid, jMid);\n return aLength / (aLength + distance);\n };\n Bundling.prototype.getVisibilityScore = function (ei, ej) {\n var vij = this.getEdgeVisibility(ei, ej);\n var vji = this.getEdgeVisibility(ej, ei);\n return vij < vji ? vij : vji;\n };\n Bundling.prototype.getEdgeVisibility = function (ei, ej) {\n var ps = projectPointToEdge(ej.source, ei);\n var pt = projectPointToEdge(ej.target, ei);\n var pMid = {\n x: (ps.x + pt.x) / 2,\n y: (ps.y + pt.y) / 2\n };\n var iMid = {\n x: (ei.source.x + ei.target.x) / 2,\n y: (ei.source.y + ei.target.y) / 2\n };\n return Math.max(0, 1 - 2 * getEucliDis(pMid, iMid) / getEucliDis(ps, pt));\n };\n Bundling.prototype.getEdgeForces = function (e, eidx, divisions, lambda) {\n var self = this;\n var edgePoints = self.get('edgePoints');\n var K = self.get('K');\n var kp = K / (getEucliDis(e.source, e.target) * (divisions + 1));\n var edgePointForces = [{\n x: 0,\n y: 0\n }];\n for (var i = 1; i < divisions; i++) {\n var force = {\n x: 0,\n y: 0\n };\n var spring = self.getSpringForce({\n pre: edgePoints[eidx][i - 1],\n cur: edgePoints[eidx][i],\n next: edgePoints[eidx][i + 1]\n }, kp);\n var electrostatic = self.getElectrostaticForce(i, eidx);\n force.x = lambda * (spring.x + electrostatic.x);\n force.y = lambda * (spring.y + electrostatic.y);\n edgePointForces.push(force);\n }\n edgePointForces.push({\n x: 0,\n y: 0\n });\n return edgePointForces;\n };\n Bundling.prototype.getSpringForce = function (divisions, kp) {\n var x = divisions.pre.x + divisions.next.x - 2 * divisions.cur.x;\n var y = divisions.pre.y + divisions.next.y - 2 * divisions.cur.y;\n x *= kp;\n y *= kp;\n return {\n x: x,\n y: y\n };\n };\n Bundling.prototype.getElectrostaticForce = function (pidx, eidx) {\n var self = this;\n var eps = self.get('eps');\n var edgeBundles = self.get('edgeBundles');\n var edgePoints = self.get('edgePoints');\n var edgeBundle = edgeBundles[eidx];\n var resForce = {\n x: 0,\n y: 0\n };\n edgeBundle.forEach(function (eb) {\n var force = {\n x: edgePoints[eb][pidx].x - edgePoints[eidx][pidx].x,\n y: edgePoints[eb][pidx].y - edgePoints[eidx][pidx].y\n };\n if (Math.abs(force.x) > eps || Math.abs(force.y) > eps) {\n var length_1 = getEucliDis(edgePoints[eb][pidx], edgePoints[eidx][pidx]);\n var diff = 1 / length_1;\n resForce.x += force.x * diff;\n resForce.y += force.y * diff;\n }\n });\n return resForce;\n };\n Bundling.prototype.isTicking = function () {\n return this.get('ticking');\n };\n Bundling.prototype.getSimulation = function () {\n return this.get('forceSimulation');\n };\n Bundling.prototype.destroy = function () {\n if (this.get('ticking')) {\n this.getSimulation().stop();\n }\n _super.prototype.destroy.call(this);\n };\n return Bundling;\n}(Base);\nexport default Bundling;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { clone } from '@antv/util';\nimport Base from '../base';\nvar DELTA = 0.05;\nvar lensDelegateStyle = {\n stroke: '#000',\n strokeOpacity: 0.8,\n lineWidth: 2,\n fillOpacity: 0.1,\n fill: '#ccc'\n};\nvar Fisheye = /** @class */function (_super) {\n __extends(Fisheye, _super);\n function Fisheye(config) {\n return _super.call(this, config) || this;\n }\n Fisheye.prototype.getDefaultCfgs = function () {\n return {\n trigger: 'mousemove',\n d: 1.5,\n r: 300,\n delegateStyle: clone(lensDelegateStyle),\n showLabel: false,\n maxD: 5,\n minD: 0,\n scaleRBy: 'unset',\n scaleDBy: 'unset',\n showDPercent: true\n };\n };\n // class-methods-use-this\n Fisheye.prototype.getEvents = function () {\n var events;\n switch (this.get('trigger')) {\n case 'click':\n events = {\n click: 'magnify'\n };\n break;\n case 'drag':\n events = {\n click: 'createDelegate'\n };\n break;\n default:\n events = {\n mousemove: 'magnify'\n };\n break;\n }\n return events;\n };\n Fisheye.prototype.init = function () {\n var self = this;\n var r = self.get('r');\n self.set('cachedMagnifiedModels', []);\n self.set('cachedOriginPositions', {});\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n };\n // Create the delegate when the trigger is drag\n Fisheye.prototype.createDelegate = function (e) {\n var _this = this;\n var self = this;\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n self.magnify(e);\n lensDelegate = self.get('delegate');\n // drag to move the lens\n lensDelegate.on('dragstart', function (evt) {\n self.set('delegateCenterDiff', {\n x: lensDelegate.attr('x') - evt.x,\n y: lensDelegate.attr('y') - evt.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n self.magnify(evt);\n });\n // 绑定调整范围(r)和缩放系数(d)的监听\n // 由于 drag 用于改变 lens 位置, 因此在此模式下, drag 不能用于调整 r 和 d\n // scaling d\n if (this.get('scaleDBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n _this.scaleDByWheel(evt);\n });\n }\n // scaling r\n if (this.get('scaleRBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n };\n /**\n * Scale the range by wheel\n * @param e mouse wheel event\n */\n Fisheye.prototype.scaleRByWheel = function (e) {\n var self = this;\n if (!e || !e.originalEvent) return;\n if (e.preventDefault) e.preventDefault();\n var graph = self.get('graph');\n var ratio;\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n var mousePos = lensCenter || graph.getPointByClient(e.clientX, e.clientY);\n if (e.originalEvent.wheelDelta < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n self.set('delegateCenterDiff', undefined);\n self.magnify(e, mousePos);\n };\n /**\n * Scale the range by dragging\n * @param e mouse event\n */\n Fisheye.prototype.scaleRByDrag = function (e) {\n var self = this;\n if (!e) return;\n var dragPrePos = self.get('dragPrePos');\n var graph = self.get('graph');\n var ratio;\n var mousePos = graph.getPointByClient(e.clientX, e.clientY);\n if (e.x - dragPrePos.x < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.set('r2', r * r);\n var d = self.get('d');\n self.set('molecularParam', (d + 1) * r);\n self.magnify(e, mousePos);\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n };\n /**\n * Scale the magnifying factor by wheel\n * @param e mouse wheel event\n */\n Fisheye.prototype.scaleDByWheel = function (evt) {\n var self = this;\n if (!evt && !evt.originalEvent) return;\n if (evt.preventDefault) evt.preventDefault();\n var delta = 0;\n if (evt.originalEvent.wheelDelta < 0) {\n delta = -0.1;\n } else {\n delta = 0.1;\n }\n var d = self.get('d');\n var newD = d + delta;\n var maxD = self.get('maxD');\n var minD = self.get('minD');\n if (newD < maxD && newD > minD) {\n self.set('d', newD);\n var r = self.get('r');\n self.set('molecularParam', (newD + 1) * r);\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n self.set('delegateCenterDiff', undefined);\n self.magnify(evt, lensCenter);\n }\n };\n /**\n * Scale the magnifying factor by dragging\n * @param e mouse event\n */\n Fisheye.prototype.scaleDByDrag = function (e) {\n var self = this;\n var dragPrePos = self.get('dragPrePos');\n var delta = e.x - dragPrePos.x > 0 ? 0.1 : -0.1;\n var d = self.get('d');\n var newD = d + delta;\n var maxD = self.get('maxD');\n var minD = self.get('minD');\n if (newD < maxD && newD > minD) {\n self.set('d', newD);\n var r = self.get('r');\n self.set('molecularParam', (newD + 1) * r);\n self.magnify(e);\n }\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n };\n /**\n * Response function for mousemove, click, or drag to magnify\n * @param e mouse event\n */\n Fisheye.prototype.magnify = function (e, mousePos) {\n var self = this;\n self.restoreCache();\n var graph = self.get('graph');\n var cachedMagnifiedModels = self.get('cachedMagnifiedModels');\n var cachedOriginPositions = self.get('cachedOriginPositions');\n var showLabel = self.get('showLabel');\n var r = self.get('r');\n var r2 = self.get('r2');\n var d = self.get('d');\n var molecularParam = self.get('molecularParam');\n var nodes = graph.getNodes();\n var nodeLength = nodes.length;\n var mCenter = mousePos ? {\n x: mousePos.x,\n y: mousePos.y\n } : {\n x: e.x,\n y: e.y\n };\n if (self.get('dragging') && (self.get('trigger') === 'mousemove' || self.get('trigger') === 'click')) {\n mCenter = self.get('cacheCenter');\n }\n var delegateCenterDiff = self.get('delegateCenterDiff');\n if (delegateCenterDiff) {\n mCenter.x += delegateCenterDiff.x;\n mCenter.y += delegateCenterDiff.y;\n }\n self.updateDelegate(mCenter, r);\n for (var i = 0; i < nodeLength; i++) {\n var model = nodes[i].getModel();\n var x = model.x,\n y = model.y;\n if (isNaN(x) || isNaN(y)) continue;\n // the square of the distance between the node and the magnified center\n var dist2 = (x - mCenter.x) * (x - mCenter.x) + (y - mCenter.y) * (y - mCenter.y);\n if (!isNaN(dist2) && dist2 < r2 && dist2 !== 0) {\n var dist = Math.sqrt(dist2);\n // (r * (d + 1) * (dist / r)) / (d * (dist / r) + 1);\n var magnifiedDist = molecularParam * dist / (d * dist + r);\n var cos = (x - mCenter.x) / dist;\n var sin = (y - mCenter.y) / dist;\n model.x = cos * magnifiedDist + mCenter.x;\n model.y = sin * magnifiedDist + mCenter.y;\n if (!cachedOriginPositions[model.id]) {\n cachedOriginPositions[model.id] = {\n x: x,\n y: y,\n texts: []\n };\n }\n cachedMagnifiedModels.push(model);\n if (showLabel && 2 * dist < r) {\n var node = nodes[i];\n var nodeGroup = node.getContainer();\n var shapes = nodeGroup.getChildren();\n var shapeLength = shapes.length;\n for (var j = 0; j < shapeLength; j++) {\n var shape = shapes[j];\n if (shape.get('type') === 'text') {\n cachedOriginPositions[model.id].texts.push({\n visible: shape.get('visible'),\n shape: shape\n });\n shape.set('visible', true);\n }\n }\n }\n }\n }\n graph.refreshPositions();\n };\n /**\n * Restore the cache nodes while magnifying\n */\n Fisheye.prototype.restoreCache = function () {\n var self = this;\n var cachedMagnifiedModels = self.get('cachedMagnifiedModels');\n var cachedOriginPositions = self.get('cachedOriginPositions');\n var cacheLength = cachedMagnifiedModels.length;\n for (var i = 0; i < cacheLength; i++) {\n var node = cachedMagnifiedModels[i];\n var id = node.id;\n var ori = cachedOriginPositions[id];\n node.x = ori.x;\n node.y = ori.y;\n var textLength = ori.texts.length;\n for (var j = 0; j < textLength; j++) {\n var text = ori.texts[j];\n text.shape.set('visible', text.visible);\n }\n }\n self.set('cachedMagnifiedModels', []);\n self.set('cachedOriginPositions', {});\n };\n /**\n * Adjust part of the parameters, including trigger, d, r, maxR, minR, maxD, minD, scaleRBy, and scaleDBy\n * @param {FisheyeConfig} cfg\n */\n Fisheye.prototype.updateParams = function (cfg) {\n var self = this;\n var r = cfg.r,\n d = cfg.d,\n trigger = cfg.trigger,\n minD = cfg.minD,\n maxD = cfg.maxD,\n minR = cfg.minR,\n maxR = cfg.maxR,\n scaleDBy = cfg.scaleDBy,\n scaleRBy = cfg.scaleRBy;\n if (!isNaN(cfg.r)) {\n self.set('r', r);\n self.set('r2', r * r);\n }\n if (!isNaN(d)) {\n self.set('d', d);\n }\n if (!isNaN(maxD)) {\n self.set('maxD', maxD);\n }\n if (!isNaN(minD)) {\n self.set('minD', minD);\n }\n if (!isNaN(maxR)) {\n self.set('maxR', maxR);\n }\n if (!isNaN(minR)) {\n self.set('minR', minR);\n }\n var nd = self.get('d');\n var nr = self.get('r');\n self.set('molecularParam', (nd + 1) * nr);\n if (trigger === 'mousemove' || trigger === 'click' || trigger === 'drag') {\n self.set('trigger', trigger);\n }\n if (scaleDBy === 'drag' || scaleDBy === 'wheel' || scaleDBy === 'unset') {\n self.set('scaleDBy', scaleDBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n if (scaleRBy === 'drag' || scaleRBy === 'wheel' || scaleRBy === 'unset') {\n self.set('scaleRBy', scaleRBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n };\n /**\n * Update the delegate shape of the lens\n * @param {Point} mCenter the center of the shape\n * @param {number} r the radius of the shape\n */\n Fisheye.prototype.updateDelegate = function (mCenter, r) {\n var _this = this;\n var self = this;\n var graph = self.get('graph');\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = self.get('delegateStyle') || lensDelegateStyle;\n // model上的x, y是相对于图形中心的, delegateShape是g实例, x,y是绝对坐标\n lensDelegate = parent_1.addShape('circle', {\n attrs: __assign({\n r: r / 1.5,\n x: mCenter.x,\n y: mCenter.y\n }, attrs),\n name: 'lens-shape',\n draggable: true\n });\n if (this.get('trigger') !== 'drag') {\n // 调整范围 r 的监听\n if (this.get('scaleRBy') === 'wheel') {\n // 使用滚轮调整 r\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n } else if (this.get('scaleRBy') === 'drag') {\n // 使用拖拽调整 r\n lensDelegate.on('dragstart', function (e) {\n self.set('dragging', true);\n self.set('cacheCenter', {\n x: e.x,\n y: e.y\n });\n self.set('dragPrePos', {\n x: e.x,\n y: e.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n self.scaleRByDrag(evt);\n });\n lensDelegate.on('dragend', function (e) {\n self.set('dragging', false);\n });\n }\n // 调整缩放系数 d 的监听\n if (this.get('scaleDBy') === 'wheel') {\n // 使用滚轮调整 d\n lensDelegate.on('mousewheel', function (evt) {\n _this.scaleDByWheel(evt);\n });\n } else if (this.get('scaleDBy') === 'drag') {\n // 使用拖拽调整 d\n lensDelegate.on('dragstart', function (evt) {\n self.set('dragging', true);\n self.set('cacheCenter', {\n x: evt.x,\n y: evt.y\n });\n self.set('dragPrePos', {\n x: evt.x,\n y: evt.y\n });\n });\n lensDelegate.on('drag', function (evt) {\n _this.scaleDByDrag(evt);\n });\n lensDelegate.on('dragend', function (evt) {\n self.set('dragging', false);\n });\n }\n }\n } else {\n lensDelegate.attr({\n x: mCenter.x,\n y: mCenter.y,\n r: r / 1.5\n });\n }\n // 绘制缩放系数百分比文本\n if (self.get('showDPercent')) {\n var percent = Math.round((self.get('d') - self.get('minD')) / (self.get('maxD') - self.get('minD')) * 100);\n var dPercentText = self.get('dPercentText');\n var textY = mCenter.y + r / 1.5 + 16;\n if (!dPercentText || dPercentText.destroyed) {\n var parent_2 = graph.get('group');\n dPercentText = parent_2.addShape('text', {\n attrs: {\n text: \"\".concat(percent, \"%\"),\n x: mCenter.x,\n y: textY,\n fill: '#aaa',\n stroke: '#fff',\n lineWidth: 1,\n fontSize: 12\n }\n });\n self.set('dPercentText', dPercentText);\n } else {\n dPercentText.attr({\n text: \"\".concat(percent, \"%\"),\n x: mCenter.x,\n y: textY\n });\n }\n }\n self.set('delegate', lensDelegate);\n };\n /**\n * Clear the fisheye lens\n */\n Fisheye.prototype.clear = function () {\n var graph = this.get('graph');\n this.restoreCache();\n graph.refreshPositions();\n var lensDelegate = this.get('delegate');\n if (lensDelegate && !lensDelegate.destroyed) {\n lensDelegate.remove();\n lensDelegate.destroy();\n }\n var dPercentText = this.get('dPercentText');\n if (dPercentText && !dPercentText.destroyed) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n };\n /**\n * Destroy the component\n */\n Fisheye.prototype.destroy = function () {\n this.clear();\n };\n return Fisheye;\n}(Base);\nexport default Fisheye;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { clone, isString } from '@antv/util';\nimport Base from '../base';\nimport insertCss from 'insert-css';\nvar DELTA = 0.05;\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-toolbar {\\n position: absolute;\\n list-style-type: none;\\n padding: 6px;\\n left: 0px;\\n top: 0px;\\n background-color: rgba(255, 255, 255, 0.9);\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n margin: 0;\\n }\\n .g6-component-toolbar li {\\n float: left;\\n text-align: center;\\n width: 35px;\\n height: 24px;\\n cursor: pointer;\\n\\t\\tlist-style-type:none;\\n list-style: none;\\n margin-left: 0px;\\n }\\n .g6-component-toolbar li .icon {\\n opacity: 0.7;\\n }\\n .g6-component-toolbar li .icon:hover {\\n opacity: 1;\\n }\\n\");\nvar getEventPath = function getEventPath(evt) {\n if (!evt) {\n return [];\n }\n if (evt.composedPath) {\n return evt.composedPath();\n }\n var path = [];\n var el = evt.target;\n while (el) {\n path.push(el);\n if (el.tagName === 'HTML') {\n path.push(document, window);\n return path;\n }\n el = el.parentElement;\n }\n return path;\n};\nvar ToolBar = /** @class */function (_super) {\n __extends(ToolBar, _super);\n function ToolBar(config) {\n return _super.call(this, config) || this;\n }\n ToolBar.prototype.getDefaultCfgs = function () {\n return {\n handleClick: undefined,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(graph) {\n return \"\\n
    \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
  • \\n \\n \\n \\n
  • \\n
\\n \";\n },\n zoomSensitivity: 2\n };\n };\n ToolBar.prototype.init = function () {\n var _this = this;\n var graph = this.get('graph');\n var getContent = this.get('getContent');\n var toolBar = getContent(graph);\n var toolBarDOM = toolBar;\n if (isString(toolBar)) {\n toolBarDOM = createDom(toolBar);\n }\n var className = this.get('className');\n toolBarDOM.setAttribute('class', className || 'g6-component-toolbar');\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.appendChild(toolBarDOM);\n this.set('toolBar', toolBarDOM);\n var handleClick = this.get('handleClick');\n toolBarDOM.addEventListener('click', function (evt) {\n var current = getEventPath(evt).filter(function (p) {\n return p.nodeName === 'LI';\n });\n if (current.length === 0) {\n return;\n }\n var code = current[0].getAttribute('code');\n if (!code) {\n return;\n }\n if (handleClick) {\n handleClick(code, graph);\n } else {\n _this.handleDefaultOperator(code);\n }\n });\n var pos = this.get('position');\n if (pos) {\n modifyCSS(toolBarDOM, {\n top: \"\".concat(pos.y, \"px\"),\n left: \"\".concat(pos.x, \"px\")\n });\n }\n this.bindUndoRedo();\n };\n ToolBar.prototype.bindUndoRedo = function () {\n var graph = this.get('graph');\n var undoDom = document.querySelector('.g6-component-toolbar li[code=\"undo\"]');\n var undoDomIcon = document.querySelector('.g6-component-toolbar li[code=\"undo\"] svg');\n var redoDom = document.querySelector('.g6-component-toolbar li[code=\"redo\"]');\n var redoDomIcon = document.querySelector('.g6-component-toolbar li[code=\"redo\"] svg');\n if (!undoDom || !undoDomIcon || !redoDom || !redoDomIcon) {\n return;\n }\n // initialy disabled redo and undo icons\n undoDom.setAttribute('style', 'cursor: not-allowed');\n undoDomIcon.setAttribute('style', 'opacity: 0.4');\n redoDom.setAttribute('style', 'cursor: not-allowed');\n redoDomIcon.setAttribute('style', 'opacity: 0.4');\n graph.on('stackchange', function (evt) {\n var undoStack = evt.undoStack,\n redoStack = evt.redoStack;\n var undoStackLen = undoStack.length;\n var redoStackLen = redoStack.length;\n // undo 不可用\n if (undoStackLen === 0) {\n undoDom.setAttribute('style', 'cursor: not-allowed');\n undoDomIcon.setAttribute('style', 'opacity: 0.4');\n } else {\n undoDom.removeAttribute('style');\n undoDomIcon.removeAttribute('style');\n }\n // redo 不可用\n if (redoStackLen === 0) {\n redoDom.setAttribute('style', 'cursor: not-allowed');\n redoDomIcon.setAttribute('style', 'opacity: 0.4');\n } else {\n redoDom.removeAttribute('style');\n redoDomIcon.removeAttribute('style');\n }\n });\n };\n /**\n * undo 操作\n */\n ToolBar.prototype.undo = function () {\n var graph = this.get('graph');\n var undoStack = graph.getUndoStack();\n if (!undoStack || undoStack.length === 0) {\n return;\n }\n var currentData = undoStack.pop();\n if (currentData) {\n var action = currentData.action;\n graph.pushStack(action, clone(currentData.data), 'redo');\n var data_1 = currentData.data.before;\n if (action === 'add') {\n data_1 = currentData.data.after;\n }\n if (!data_1) return;\n switch (action) {\n case 'visible':\n {\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n if (model.visible) {\n graph.showItem(item, false);\n } else {\n graph.hideItem(item, false);\n }\n });\n });\n break;\n }\n case 'render':\n case 'update':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n delete model.id;\n graph.updateItem(item, model, false);\n if (item.getType() === 'combo') graph.updateCombo(item);\n });\n });\n break;\n case 'changedata':\n graph.changeData(data_1, false);\n break;\n case 'delete':\n {\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n var itemType = model.itemType;\n delete model.itemType;\n graph.addItem(itemType, model, false);\n });\n });\n break;\n }\n case 'add':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n });\n break;\n case 'updateComboTree':\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n break;\n case 'createCombo':\n var afterCombos = currentData.data.after.combos;\n var createdCombo = afterCombos[afterCombos.length - 1];\n Object.keys(data_1).forEach(function (key) {\n var array = data_1[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n graph.removeItem(createdCombo.id, false);\n break;\n case 'uncombo':\n var targetCombo_1 = data_1.combos[data_1.combos.length - 1];\n var childrenIds = data_1.nodes.concat(data_1.combos).map(function (child) {\n return child.id;\n }).filter(function (id) {\n return id !== targetCombo_1.id;\n });\n graph.createCombo(targetCombo_1, childrenIds, false);\n break;\n case 'layout':\n graph.updateLayout(data_1, undefined, undefined, false);\n break;\n default:\n }\n }\n };\n /**\n * redo 操作\n */\n ToolBar.prototype.redo = function () {\n var graph = this.get('graph');\n var redoStack = graph.getRedoStack();\n if (!redoStack || redoStack.length === 0) {\n return;\n }\n var currentData = redoStack.pop();\n if (currentData) {\n var action = currentData.action;\n var data_2 = currentData.data.after;\n graph.pushStack(action, clone(currentData.data));\n if (action === 'delete') {\n data_2 = currentData.data.before;\n }\n if (!data_2) return;\n switch (action) {\n case 'visible':\n {\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n if (model.visible) {\n graph.showItem(item, false);\n } else {\n graph.hideItem(item, false);\n }\n });\n });\n break;\n }\n case 'render':\n case 'update':\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var item = graph.findById(model.id);\n delete model.id;\n graph.updateItem(item, model, false);\n if (item.getType() === 'combo') graph.updateCombo(item);\n });\n });\n break;\n case 'changedata':\n graph.changeData(data_2, false);\n break;\n case 'delete':\n if (data_2.edges) {\n data_2.edges.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n if (data_2.nodes) {\n data_2.nodes.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n if (data_2.combos) {\n data_2.combos.forEach(function (model) {\n graph.removeItem(model.id, false);\n });\n }\n break;\n case 'add':\n {\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n var itemType = model.itemType;\n delete model.itemType;\n graph.addItem(itemType, model, false);\n });\n });\n break;\n }\n case 'updateComboTree':\n Object.keys(data_2).forEach(function (key) {\n var array = data_2[key];\n if (!array) return;\n array.forEach(function (model) {\n graph.updateComboTree(model.id, model.parentId, false);\n });\n });\n break;\n case 'createCombo':\n var createdCombo = data_2.combos[data_2.combos.length - 1];\n graph.createCombo(createdCombo, createdCombo.children.map(function (child) {\n return child.id;\n }), false);\n break;\n case 'uncombo':\n var beforeCombos = currentData.data.before.combos;\n var targertCombo = beforeCombos[beforeCombos.length - 1];\n graph.uncombo(targertCombo.id, false);\n break;\n case 'layout':\n graph.updateLayout(data_2, undefined, undefined, false);\n break;\n default:\n }\n }\n };\n /**\n * zoomOut 操作\n */\n ToolBar.prototype.zoomOut = function () {\n var graph = this.get('graph');\n var currentZoom = graph.getZoom();\n var ratioOut = 1 / (1 - DELTA * this.get('zoomSensitivity'));\n var maxZoom = this.get('maxZoom') || graph.get('maxZoom');\n if (ratioOut * currentZoom > maxZoom) {\n return;\n }\n graph.zoomTo(currentZoom * ratioOut);\n };\n /**\n * zoomIn 操作\n */\n ToolBar.prototype.zoomIn = function () {\n var graph = this.get('graph');\n var currentZoom = graph.getZoom();\n var ratioIn = 1 - DELTA * this.get('zoomSensitivity');\n var minZoom = this.get('minZoom') || graph.get('minZoom');\n if (ratioIn * currentZoom < minZoom) {\n return;\n }\n graph.zoomTo(currentZoom * ratioIn);\n };\n /**\n * realZoom 操作\n */\n ToolBar.prototype.realZoom = function () {\n var graph = this.get('graph');\n graph.zoomTo(1);\n };\n /**\n * autoZoom 操作\n */\n ToolBar.prototype.autoZoom = function () {\n var graph = this.get('graph');\n graph.fitView([20, 20]);\n };\n /**\n * 根据 Toolbar 上不同类型对图进行操作\n * @param code 操作类型编码\n * @param graph Graph 实例\n */\n ToolBar.prototype.handleDefaultOperator = function (code) {\n switch (code) {\n case 'redo':\n this.redo();\n break;\n case 'undo':\n this.undo();\n break;\n case 'zoomOut':\n this.zoomOut();\n break;\n case 'zoomIn':\n this.zoomIn();\n break;\n case 'realZoom':\n this.realZoom();\n break;\n case 'autoZoom':\n this.autoZoom();\n break;\n default:\n }\n };\n ToolBar.prototype.destroy = function () {\n var toolBar = this.get('toolBar');\n if (toolBar) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(toolBar);\n }\n var handleClick = this.get('handleClick');\n if (handleClick) {\n toolBar.removeEventListener('click', handleClick);\n }\n };\n return ToolBar;\n}(Base);\nexport default ToolBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { isArray, isString } from '@antv/util';\nimport insertCss from 'insert-css';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-component-tooltip {\\n border: 1px solid #e2e2e2;\\n border-radius: 4px;\\n font-size: 12px;\\n color: #545454;\\n background-color: rgba(255, 255, 255, 0.9);\\n padding: 10px 8px;\\n box-shadow: rgb(174, 174, 174) 0px 0px 10px;\\n }\\n .tooltip-type {\\n padding: 0;\\n margin: 0;\\n }\\n .tooltip-id {\\n color: #531dab;\\n }\\n\");\nvar Tooltip = /** @class */function (_super) {\n __extends(Tooltip, _super);\n function Tooltip(config) {\n return _super.call(this, config) || this;\n }\n Tooltip.prototype.getDefaultCfgs = function () {\n return {\n offsetX: 6,\n offsetY: 6,\n // 指定菜单内容,function(e) {...}\n getContent: function getContent(e) {\n return \"\\n

\\u7C7B\\u578B\\uFF1A\".concat(e.item.getType(), \"

\\n ID\\uFF1A\").concat(e.item.getID(), \"\\n \");\n },\n shouldBegin: function shouldBegin(e) {\n return true;\n },\n itemTypes: ['node', 'edge', 'combo'],\n trigger: 'mouseenter',\n fixToNode: undefined\n };\n };\n // class-methods-use-this\n Tooltip.prototype.getEvents = function () {\n if (this.get('trigger') === 'click') {\n return {\n 'node:click': 'onClick',\n 'edge:click': 'onClick',\n 'combo:click': 'onClick',\n 'canvas:click': 'onMouseLeave',\n afterremoveitem: 'onMouseLeave',\n contextmenu: 'onMouseLeave',\n drag: 'onMouseLeave'\n };\n }\n return {\n 'node:mouseenter': 'onMouseEnter',\n 'node:mouseleave': 'onMouseLeave',\n 'node:mousemove': 'onMouseMove',\n 'edge:mouseenter': 'onMouseEnter',\n 'edge:mouseleave': 'onMouseLeave',\n 'edge:mousemove': 'onMouseMove',\n 'combo:mouseenter': 'onMouseEnter',\n 'combo:mouseleave': 'onMouseLeave',\n 'combo:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave',\n contextmenu: 'onMouseLeave',\n 'node:drag': 'onMouseLeave'\n };\n };\n Tooltip.prototype.init = function () {\n var self = this;\n var className = self.get('className') || 'g6-component-tooltip';\n var tooltip = createDom(\"
\"));\n var container = self.get('container');\n if (!container) {\n container = self.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n modifyCSS(tooltip, {\n position: 'absolute',\n visibility: 'hidden',\n display: 'none'\n });\n container.appendChild(tooltip);\n if (self.get('trigger') !== 'click') {\n tooltip.addEventListener('mouseenter', function (e) {\n modifyCSS(tooltip, {\n visibility: 'visible',\n display: 'unset'\n });\n });\n tooltip.addEventListener('mouseleave', function (e) {\n self.hideTooltip();\n });\n }\n self.set('tooltip', tooltip);\n };\n Tooltip.prototype.onClick = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var item = e.item;\n var graph = this.get('graph');\n // 若与上一次同一 item,隐藏该 tooltip\n if (this.currentTarget === item) {\n this.currentTarget = null;\n this.hideTooltip();\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'hide'\n });\n } else {\n this.currentTarget = item;\n this.showTooltip(e);\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n }\n };\n Tooltip.prototype.onMouseEnter = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var item = e.item;\n var graph = this.get('graph');\n this.currentTarget = item;\n this.showTooltip(e);\n graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n };\n Tooltip.prototype.onMouseMove = function (e) {\n var itemTypes = this.get('itemTypes');\n if (e.item && e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n if (!this.currentTarget || e.item !== this.currentTarget) {\n return;\n }\n this.showTooltip(e);\n };\n Tooltip.prototype.onMouseLeave = function () {\n this.hideTooltip();\n var graph = this.get('graph');\n graph.emit('tooltipchange', {\n item: this.currentTarget,\n action: 'hide'\n });\n this.currentTarget = null;\n };\n Tooltip.prototype.clearContainer = function () {\n var container = this.get('tooltip');\n if (container) {\n container.innerHTML = '';\n }\n };\n Tooltip.prototype.showTooltip = function (e) {\n if (!e.item) {\n return;\n }\n var itemTypes = this.get('itemTypes');\n if (e.item.getType && itemTypes.indexOf(e.item.getType()) === -1) return;\n var container = this.get('tooltip');\n var getContent = this.get('getContent');\n var tooltip = getContent(e);\n if (isString(tooltip)) {\n container.innerHTML = tooltip;\n } else {\n this.clearContainer();\n container.appendChild(tooltip);\n }\n this.updatePosition(e);\n };\n Tooltip.prototype.hideTooltip = function () {\n var tooltip = this.get('tooltip');\n if (tooltip) {\n modifyCSS(tooltip, {\n visibility: 'hidden',\n display: 'none'\n });\n }\n };\n Tooltip.prototype.updatePosition = function (e) {\n var shouldBegin = this.get('shouldBegin');\n var tooltip = this.get('tooltip');\n if (!shouldBegin(e)) {\n modifyCSS(tooltip, {\n visibility: 'hidden',\n display: 'none'\n });\n return;\n }\n var graph = this.get('graph');\n var width = graph.get('width');\n var height = graph.get('height');\n var offsetX = this.get('offsetX') || 0;\n var offsetY = this.get('offsetY') || 0;\n var point = graph.getPointByClient(e.clientX, e.clientY);\n var fixToNode = this.get('fixToNode');\n var item = e.item;\n if (item.getType && item.getType() === 'node' && fixToNode && isArray(fixToNode) && fixToNode.length >= 2) {\n var itemBBox = item.getBBox();\n point = {\n x: itemBBox.minX + itemBBox.width * fixToNode[0],\n y: itemBBox.minY + itemBBox.height * fixToNode[1]\n };\n }\n var _a = graph.getCanvasByPoint(point.x, point.y),\n x = _a.x,\n y = _a.y;\n var graphContainer = graph.getContainer();\n var res = {\n x: x + graphContainer.offsetLeft + offsetX,\n y: y + graphContainer.offsetTop + offsetY\n };\n // 先修改为 visible 方可正确计算 bbox\n modifyCSS(tooltip, {\n visibility: 'visible',\n display: 'unset'\n });\n var bbox = tooltip.getBoundingClientRect();\n if (x + bbox.width + offsetX > width) {\n res.x -= bbox.width + offsetX;\n }\n if (y + bbox.height + offsetY > height) {\n res.y -= bbox.height + offsetY;\n if (res.y < 0) {\n res.y = 0;\n }\n }\n modifyCSS(tooltip, {\n left: \"\".concat(res.x, \"px\"),\n top: \"\".concat(res.y, \"px\")\n });\n };\n Tooltip.prototype.hide = function () {\n this.onMouseLeave();\n };\n Tooltip.prototype.destroy = function () {\n var tooltip = this.get('tooltip');\n if (tooltip) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n container.removeChild(tooltip);\n }\n };\n return Tooltip;\n}(Base);\nexport default Tooltip;","export var TIMELINE_START = 'timebarstartplay';\nexport var TIMELINE_END = 'timebarendplay';\nexport var VALUE_CHANGE = 'valuechange';\nexport var TIMEBAR_CONFIG_CHANGE = 'timebarConfigChanged';\nexport var PLAY_PAUSE_BTN = 'playPauseBtn';\nexport var NEXT_STEP_BTN = 'nextStepBtn';\nexport var PRE_STEP_BTN = 'preStepBtn';","import { isString } from '@antv/util';\nimport { createDom, modifyCSS } from '@antv/dom-util';\nexport var BACKGROUND_STYLE = {\n opacity: 0.5,\n fill: '#000'\n};\nexport var ARROW_STYLE = {\n opacity: 0.5,\n fill: '#000',\n r: 5\n};\nexport var TEXT_STYLE = {\n fill: '#fff',\n fontSize: 12\n};\n/**\n * 缩略趋势图\n */\nvar TimeBarTooltip = /** @class */function () {\n function TimeBarTooltip(cfg) {\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n container = cfg.container,\n text = cfg.text,\n _c = cfg.padding,\n padding = _c === void 0 ? [4, 4, 4, 4] : _c,\n _d = cfg.className,\n className = _d === void 0 ? 'g6-component-timebar-tooltip' : _d,\n _e = cfg.backgroundColor,\n backgroundColor = _e === void 0 ? '#000' : _e,\n _f = cfg.textColor,\n textColor = _f === void 0 ? '#fff' : _f,\n _g = cfg.opacity,\n opacity = _g === void 0 ? 0.8 : _g,\n _h = cfg.fontSize,\n fontSize = _h === void 0 ? 12 : _h;\n this.container = container;\n this.className = className;\n this.backgroundColor = backgroundColor;\n this.textColor = textColor;\n this.x = x;\n this.y = y;\n this.text = text;\n this.padding = padding;\n this.opacity = opacity;\n this.fontSize = fontSize;\n this.render();\n }\n /**\n * 首次渲染\n * @private\n */\n TimeBarTooltip.prototype.render = function () {\n var self = this;\n var className = self.className,\n x = self.x,\n y = self.y,\n backgroundColor = self.backgroundColor,\n textColor = self.textColor,\n text = self.text,\n padding = self.padding,\n opacity = self.opacity,\n fontSize = self.fontSize;\n var parentNode = self.container;\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n parentNode.appendChild(container);\n self.parentHeight = parentNode.offsetHeight;\n self.parentWidth = parentNode.offsetWidth;\n modifyCSS(container, {\n visibility: 'hidden',\n top: 0,\n left: 0\n });\n var background = createDom(\"\\n
\"));\n background.innerHTML = text;\n container.appendChild(background);\n self.backgroundDOM = background;\n var arrow = createDom(\"
\"));\n container.appendChild(arrow);\n self.arrowDOM = arrow;\n self.container = container;\n };\n TimeBarTooltip.prototype.show = function (cfg) {\n var self = this;\n var text = cfg.text,\n x = cfg.x,\n y = cfg.y,\n clientX = cfg.clientX,\n clientY = cfg.clientY;\n self.backgroundDOM.innerHTML = text;\n var backgroundWidth = self.backgroundDOM.offsetWidth;\n var backgroundHeight = self.backgroundDOM.offsetHeight;\n var arrowWidth = self.arrowDOM.offsetWidth;\n var arrowHeight = self.arrowDOM.offsetHeight;\n modifyCSS(self.container, {\n top: \"\".concat(-backgroundHeight - arrowHeight, \"px\"),\n left: \"\".concat(x, \"px\"),\n visibility: 'visible'\n });\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2, \"px\")\n });\n modifyCSS(self.arrowDOM, {\n marginLeft: \"\".concat(-arrowWidth / 2, \"px\"),\n top: \"\".concat(backgroundHeight, \"px\")\n });\n var left = x - backgroundWidth / 2;\n var right = x + backgroundWidth / 2;\n if (left < 0) {\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2 - left, \"px\")\n });\n } else if (right > self.parentWidth) {\n modifyCSS(self.backgroundDOM, {\n marginLeft: \"\".concat(-backgroundWidth / 2 - right + self.parentWidth + 12, \"px\")\n });\n }\n };\n TimeBarTooltip.prototype.hide = function () {\n modifyCSS(this.container, {\n top: 0,\n left: 0,\n visibility: 'hidden'\n });\n };\n return TimeBarTooltip;\n}();\nexport default TimeBarTooltip;","/**\n * 基于 G 的按钮组件\n */\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { deepMix } from '@antv/util';\nimport { PLAY_PAUSE_BTN } from './constant';\nvar Button = /** @class */function () {\n function Button(cfg) {\n this.config = deepMix({}, cfg);\n this.init();\n }\n Button.prototype.update = function (cfg) {\n this.config = deepMix({}, this.config, cfg);\n this.updateElement();\n this.renderMarker();\n };\n Button.prototype.init = function () {\n this.initElement();\n this.renderMarker();\n };\n Button.prototype.initElement = function () {\n var _a = this.config,\n group = _a.group,\n style = _a.style;\n var _b = style.scale,\n scale = _b === void 0 ? 1 : _b,\n _c = style.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = style.offsetY,\n offsetY = _d === void 0 ? 0 : _d;\n var x = this.config.x + offsetX;\n var y = this.config.y + offsetY;\n var buttonGroup = group.addGroup({\n name: PLAY_PAUSE_BTN\n });\n this.startMarkerGroup = buttonGroup.addGroup({\n name: PLAY_PAUSE_BTN\n });\n this.circle = group.addShape('circle', {\n attrs: __assign({\n x: x,\n y: y,\n r: this.config.r * scale\n }, style),\n name: PLAY_PAUSE_BTN\n });\n this.startMarker = this.startMarkerGroup.addShape('path', {\n attrs: {\n path: this.getStartMarkerPath(x, y, scale),\n fill: style.stroke || '#aaa'\n },\n name: 'start-marker'\n });\n this.pauseMarkerGroup = buttonGroup.addGroup({\n name: PLAY_PAUSE_BTN\n });\n var width = 0.25 * this.config.r * scale;\n var height = 0.5 * this.config.r * Math.sqrt(3) * scale;\n this.pauseLeftMarker = this.pauseMarkerGroup.addShape('rect', {\n attrs: {\n x: x - 0.375 * this.config.r * scale,\n y: y - height / 2,\n width: width,\n height: height,\n fill: style.stroke || '#aaa',\n lineWidth: 0\n }\n });\n this.pauseRightMarker = this.pauseMarkerGroup.addShape('rect', {\n attrs: {\n x: x + 1 / 8 * this.config.r * scale,\n y: y - height / 2,\n width: width,\n height: height,\n fill: style.stroke || '#aaa',\n lineWidth: 0\n }\n });\n };\n Button.prototype.updateElement = function () {\n var _a = this.config.style,\n _b = _a.scale,\n scale = _b === void 0 ? 1 : _b,\n _c = _a.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = _a.offsetY,\n offsetY = _d === void 0 ? 0 : _d;\n var x = this.config.x + offsetX;\n var y = this.config.y + offsetY;\n this.circle.attr('x', x);\n this.circle.attr('y', y);\n this.circle.attr('r', this.config.r * scale);\n this.startMarker.attr('path', this.getStartMarkerPath(x, y, scale));\n var width = 0.25 * this.config.r * scale;\n var height = 0.5 * this.config.r * Math.sqrt(3) * scale;\n this.pauseLeftMarker.attr('x', x - (1 / 4 + 1 / 8) * this.config.r * scale);\n this.pauseLeftMarker.attr('y', y - height / 2);\n this.pauseLeftMarker.attr('width', width);\n this.pauseLeftMarker.attr('height', height);\n this.pauseRightMarker.attr('x', x + 1 / 8 * this.config.r * scale);\n this.pauseRightMarker.attr('y', y - height / 2);\n this.pauseRightMarker.attr('width', width);\n this.pauseRightMarker.attr('height', height);\n };\n Button.prototype.renderMarker = function () {\n if (this.config.isPlay) {\n this.startMarkerGroup.hide();\n this.pauseMarkerGroup.show();\n } else {\n this.startMarkerGroup.show();\n this.pauseMarkerGroup.hide();\n }\n };\n /** 获取播放键 marker path */\n Button.prototype.getStartMarkerPath = function (x, y, scale) {\n var sideLength = 0.5 * this.config.r * Math.sqrt(3) * scale;\n return [['M', x - sideLength / Math.sqrt(3) / 2, y - sideLength / 2], ['L', x + sideLength / Math.sqrt(3), y], ['L', x - sideLength / Math.sqrt(3) / 2, y + sideLength / 2]];\n };\n return Button;\n}();\nexport default Button;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { deepMix } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport Button from './timeButton';\nimport { TIMEBAR_CONFIG_CHANGE, PRE_STEP_BTN, NEXT_STEP_BTN } from './constant';\nvar transform = ext.transform;\nvar DEFAULT_RECT_FILL = '#aaa';\nvar DEFAULT_RECT_STROKE = 'green';\nvar DEFAULT_PLAYBTN_STYLE = {\n fill: '#aaa',\n fillOpacity: 0.35,\n stroke: '#aaa'\n};\nvar DEFAULT_PREBTN_STYLE = {\n fill: '#fff'\n};\nvar DEFAULT_NEXTBTN_STYLE = {\n fill: 'green'\n};\nvar DEFAULT_SPEED_CONTROLLER_STYLE = {\n pointer: {\n fill: '#aaa',\n lineWidth: 0\n },\n scroller: {\n stroke: '#aaa',\n fill: '#aaa',\n lineWidth: 1,\n lineAppendWidth: 5,\n cursor: 'pointer'\n },\n text: {\n fill: '#aaa',\n textBaseline: 'top'\n }\n};\nvar DEFAULT_TIMETYPE_CONTROLLER_STYLE = {\n check: {\n stroke: 'green',\n lineWidth: 3\n },\n box: {\n fill: '#fff',\n stroke: '#aaa',\n lineWidth: 2,\n radius: 3,\n width: 12,\n height: 12\n },\n text: {\n fill: '#aaa',\n fontSize: 12,\n textBaseline: 'top'\n }\n};\nvar DEFAULT_CONTROLLER_CONFIG = {\n speed: 1,\n loop: false,\n fill: '#fff',\n stroke: '#fff',\n hideTimeTypeController: false,\n preBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa'\n },\n nextBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa'\n },\n playBtnStyle: {\n fill: '#aaa',\n stroke: '#aaa',\n fillOpacity: 0.05\n },\n speedControllerStyle: DEFAULT_SPEED_CONTROLLER_STYLE,\n timeTypeControllerStyle: DEFAULT_TIMETYPE_CONTROLLER_STYLE\n};\nvar SPEED_CONTROLLER_OFFSET = 110;\nvar TOGGLE_MODEL_OFFSET = 50;\nexport var TIME_TYPE = {\n SINGLE: 'single',\n RANGE: 'range'\n};\nvar ControllerBtn = /** @class */function () {\n function ControllerBtn(cfg) {\n this.controllerCfg = deepMix({}, DEFAULT_CONTROLLER_CONFIG, cfg);\n this.group = cfg.group;\n this.controllerGroup = this.group.addGroup({\n name: 'controller-group'\n });\n this.speedAxisY = [];\n this.currentSpeed = this.controllerCfg.speed;\n this.currentType = this.controllerCfg.defaultTimeType || TIME_TYPE.RANGE;\n this.fontFamily = cfg.fontFamily || 'Arial, sans-serif';\n this.init();\n }\n ControllerBtn.prototype.init = function () {\n this.renderPlayButton();\n };\n /** 获取播放键 marker path */\n ControllerBtn.prototype.getNextMarkerPath = function (x, y, len) {\n return [['M', x, y - len], ['L', x + len, y], ['L', x, y + len], ['Z', x, y - len], ['M', x, y], ['L', x - len, y - len], ['L', x - len, y + len], ['Z']];\n };\n ControllerBtn.prototype.getPreMarkerPath = function (x, y, len) {\n return [['M', x, y - len], ['L', x - len, y], ['L', x, y + len], ['L', x, y - len], ['M', x, y], ['L', x + len, y - len], ['L', x + len, y + len], ['Z']];\n };\n ControllerBtn.prototype.renderPlayButton = function () {\n var controllerCfg = this.controllerCfg;\n var width = controllerCfg.width,\n height = controllerCfg.height,\n x = controllerCfg.x,\n y = controllerCfg.y,\n hideTimeTypeController = controllerCfg.hideTimeTypeController,\n _a = controllerCfg.fill,\n fill = _a === void 0 ? DEFAULT_RECT_FILL : _a,\n _b = controllerCfg.stroke,\n stroke = _b === void 0 ? DEFAULT_RECT_STROKE : _b,\n _c = controllerCfg.containerStyle,\n containerStyle = _c === void 0 ? {} : _c;\n var playBtnStyle = __assign(__assign({}, DEFAULT_PLAYBTN_STYLE), controllerCfg.playBtnStyle || {});\n var preBtnStyle = __assign(__assign({}, DEFAULT_PREBTN_STYLE), controllerCfg.preBtnStyle || {});\n var nextBtnStyle = __assign(__assign({}, DEFAULT_NEXTBTN_STYLE), controllerCfg.nextBtnStyle || {});\n var r = height / 2 - 5;\n var realY = y + 10;\n // 绘制最外层的矩形包围框\n var container = this.controllerGroup.addShape('rect', {\n attrs: __assign({\n x: x,\n y: realY,\n width: width,\n height: height,\n stroke: stroke,\n fill: fill\n }, containerStyle),\n name: 'container-rect'\n });\n if (this.playButton) {\n this.playButton.update({\n x: width / 2,\n y: realY,\n r: r\n });\n } else {\n this.playButton = new Button({\n group: this.controllerGroup,\n x: width / 2,\n y: realY + r + 5,\n r: r,\n isPlay: this.isPlay,\n style: playBtnStyle\n });\n }\n // 后退按钮\n var prePaddingX = preBtnStyle.offsetX || 0;\n var prePaddingY = preBtnStyle.offsetY || 0;\n var preR = (preBtnStyle.scale || 1) * r;\n this.controllerGroup.addShape('path', {\n attrs: __assign({\n path: this.getPreMarkerPath(width / 2 - 5 * r + prePaddingX, realY + r + 5 + prePaddingY, preR * 0.5)\n }, preBtnStyle),\n name: PRE_STEP_BTN\n });\n // 前进按钮\n var nxtPaddingX = nextBtnStyle.offsetX || 0;\n var nxtPaddingY = nextBtnStyle.offsetY || 0;\n var nxtR = (nextBtnStyle.scale || 1) * r;\n this.controllerGroup.addShape('path', {\n attrs: __assign({\n path: this.getNextMarkerPath(width / 2 + 5 * r + nxtPaddingX, realY + r + 5 + nxtPaddingY, nxtR * 0.5)\n }, nextBtnStyle),\n name: NEXT_STEP_BTN\n });\n container.toBack();\n // 调节speed的按钮\n this.renderSpeedBtn();\n if (!hideTimeTypeController) {\n this.renderToggleTime();\n }\n this.bindEvent();\n // 根据配置的 scale、offsetX,offsetY 缩放和移动控制栏\n var _d = this.controllerCfg.scale,\n scale = _d === void 0 ? 1 : _d;\n var currentBBox = this.controllerGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX, centerY]]);\n this.controllerGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.renderSpeedBtn = function () {\n var _a = this.controllerCfg,\n y = _a.y,\n width = _a.width,\n hideTimeTypeController = _a.hideTimeTypeController;\n var speedControllerStyle = __assign(__assign({}, DEFAULT_SPEED_CONTROLLER_STYLE), this.controllerCfg.speedControllerStyle || {});\n var _b = speedControllerStyle.scroller,\n scroller = _b === void 0 ? {} : _b,\n _c = speedControllerStyle.text,\n text = _c === void 0 ? {} : _c,\n _d = speedControllerStyle.pointer,\n pointer = _d === void 0 ? {} : _d,\n _e = speedControllerStyle.scale,\n scale = _e === void 0 ? 1 : _e,\n _f = speedControllerStyle.offsetX,\n offsetX = _f === void 0 ? 0 : _f,\n _g = speedControllerStyle.offsetY,\n offsetY = _g === void 0 ? 0 : _g;\n var speedGroup = this.controllerGroup.addGroup({\n name: 'speed-group'\n });\n this.speedGroup = speedGroup;\n var speedNum = [];\n var maxSpeed = 5;\n this.speedAxisY = [19, 22, 26, 32, 39];\n // 增加speed刻度\n for (var i = 0; i < 5; i++) {\n var axisY = y + this.speedAxisY[i];\n // 灰色刻度\n var startX = width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET);\n speedGroup.addShape('line', {\n attrs: __assign({\n x1: startX,\n x2: startX + 15,\n y1: axisY,\n y2: axisY\n }, scroller),\n speed: maxSpeed,\n name: 'speed-rect'\n });\n this.speedAxisY[i] = axisY;\n speedNum.push(maxSpeed);\n maxSpeed = maxSpeed - 1;\n }\n // 速度文本\n this.speedText = speedGroup.addShape('text', {\n attrs: __assign({\n x: width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET) + 20,\n y: this.speedAxisY[0] + 4,\n text: \"1.0X\",\n fontFamily: this.fontFamily || 'Arial, sans-serif'\n }, text),\n name: 'speed-text'\n });\n this.speedPoint = speedGroup.addShape('path', {\n attrs: __assign({\n path: this.getPointerPath(width - (!hideTimeTypeController ? SPEED_CONTROLLER_OFFSET : TOGGLE_MODEL_OFFSET), 0),\n matrix: [1, 0, 0, 0, 1, 0, 0, this.speedAxisY[4], 1]\n }, pointer),\n name: 'speed-pointer'\n });\n // 根据配置在 speedControllerStyle 中的 scale offsetX offsetY 缩放和移动速度控制器\n var currentBBox = this.speedGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = this.speedGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n matrix = transform(matrix, [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX + offsetX * scale, centerY + offsetY * scale]]);\n this.speedGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.getPointerPath = function (x, y) {\n return [['M', x, y], ['L', x - 10, y - 4], ['L', x - 10, y + 4], ['Z']];\n };\n ControllerBtn.prototype.renderToggleTime = function () {\n var _a, _b;\n var _c = this.controllerCfg,\n width = _c.width,\n defaultTimeType = _c.defaultTimeType;\n var timeTypeControllerStyle = __assign(__assign({}, DEFAULT_TIMETYPE_CONTROLLER_STYLE), this.controllerCfg.timeTypeControllerStyle || {});\n var _d = timeTypeControllerStyle.scale,\n scale = _d === void 0 ? 1 : _d,\n _e = timeTypeControllerStyle.offsetX,\n offsetX = _e === void 0 ? 0 : _e,\n _f = timeTypeControllerStyle.offsetY,\n offsetY = _f === void 0 ? 0 : _f,\n _g = timeTypeControllerStyle.box,\n box = _g === void 0 ? {} : _g,\n _h = timeTypeControllerStyle.check,\n check = _h === void 0 ? {} : _h,\n _j = timeTypeControllerStyle.text,\n text = _j === void 0 ? {} : _j;\n this.toggleGroup = this.controllerGroup.addGroup({\n name: 'toggle-group'\n });\n var isChecked = defaultTimeType === TIME_TYPE.SINGLE;\n this.toggleGroup.addShape('rect', {\n attrs: __assign({\n x: width - TOGGLE_MODEL_OFFSET,\n y: this.speedAxisY[0] + 3.5\n }, box),\n isChecked: isChecked,\n name: 'toggle-model'\n });\n this.checkedIcon = this.toggleGroup.addShape('path', {\n attrs: __assign({\n path: [['M', width - TOGGLE_MODEL_OFFSET + 3, this.speedAxisY[1] + 6], ['L', width - TOGGLE_MODEL_OFFSET + 7, this.speedAxisY[1] + 10], ['L', width - TOGGLE_MODEL_OFFSET + 12, this.speedAxisY[1] + 4]]\n }, check),\n capture: false,\n name: 'check-icon'\n });\n if (!isChecked) this.checkedIcon.hide();\n this.checkedText = this.toggleGroup.addShape('text', {\n attrs: __assign({\n text: isChecked ? ((_a = this.controllerCfg) === null || _a === void 0 ? void 0 : _a.timeRangeControllerText) || '时间范围' : ((_b = this.controllerCfg) === null || _b === void 0 ? void 0 : _b.timePointControllerText) || '单一时间',\n x: width - TOGGLE_MODEL_OFFSET + 15,\n y: this.speedAxisY[0] + 4,\n fontFamily: typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif'\n }, text),\n name: 'checked-text'\n });\n // 根据配置在 timeTypeControllerStyle 中的 scale offsetX offsetY 缩放和移动速度控制器\n var currentBBox = this.toggleGroup.getCanvasBBox();\n var centerX = (currentBBox.maxX + currentBBox.minX) / 2;\n var centerY = (currentBBox.maxY + currentBBox.minY) / 2;\n var matrix = this.toggleGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n matrix = transform(matrix, [['t', -centerX, -centerY], ['s', scale, scale], ['t', centerX + offsetX * scale, centerY + offsetY * scale]]);\n this.toggleGroup.setMatrix(matrix);\n };\n ControllerBtn.prototype.bindEvent = function () {\n var _this = this;\n this.speedGroup.on('speed-rect:click', function (evt) {\n var currentPointerY = evt.target.attr('y1');\n var pointerMatrix = _this.speedPoint.attr('matrix');\n var currentYIdx = _this.speedAxisY.indexOf(pointerMatrix[7] || 0);\n var targetYIdx = _this.speedAxisY.indexOf(currentPointerY);\n var yDiff = _this.speedAxisY[targetYIdx] - _this.speedAxisY[currentYIdx];\n pointerMatrix = transform(pointerMatrix, [['t', 0, yDiff]]);\n _this.speedPoint.setMatrix(pointerMatrix);\n _this.currentSpeed = _this.speedAxisY.length - targetYIdx;\n _this.speedText.attr('text', \"\".concat(_this.currentSpeed, \".0X\"));\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n speed: _this.currentSpeed,\n type: _this.currentType\n });\n });\n this.speedGroup.on('mousewheel', function (evt) {\n evt.preventDefault();\n var pointerMatrix = _this.speedPoint.attr('matrix') || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var currentPointerY = pointerMatrix[7];\n var currentYIdx = _this.speedAxisY.indexOf(currentPointerY);\n if (currentYIdx === -1) {\n // 找到最近的一个 y\n var minDist_1 = Infinity;\n _this.speedAxisY.forEach(function (y, idx) {\n var dist = Math.abs(y - currentPointerY);\n if (minDist_1 > dist) {\n minDist_1 = dist;\n currentYIdx = idx;\n }\n });\n }\n if (evt.originalEvent.deltaY > 0) currentYIdx = Math.max(0, currentYIdx - 1);else currentYIdx = Math.min(_this.speedAxisY.length - 1, currentYIdx + 1);\n var yDiff = _this.speedAxisY[currentYIdx] - currentPointerY;\n pointerMatrix = transform(pointerMatrix, [['t', 0, yDiff]]);\n _this.speedPoint.setMatrix(pointerMatrix);\n _this.currentSpeed = _this.speedAxisY.length - currentYIdx;\n _this.speedText.attr('text', \"\".concat(_this.currentSpeed, \".0X\"));\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n speed: _this.currentSpeed,\n type: _this.currentType\n });\n });\n if (this.toggleGroup) {\n this.toggleGroup.on('toggle-model:click', function (evt) {\n var _a, _b;\n var isChecked = evt.target.get('isChecked');\n if (!isChecked) {\n _this.checkedIcon.show();\n _this.checkedText.attr('text', ((_a = _this.controllerCfg) === null || _a === void 0 ? void 0 : _a.timeRangeControllerText) || '时间范围');\n _this.currentType = TIME_TYPE.SINGLE;\n } else {\n _this.checkedIcon.hide();\n _this.checkedText.attr('text', ((_b = _this.controllerCfg) === null || _b === void 0 ? void 0 : _b.timePointControllerText) || '单一时间');\n _this.currentType = TIME_TYPE.RANGE;\n }\n evt.target.set('isChecked', !isChecked);\n _this.group.emit(TIMEBAR_CONFIG_CHANGE, {\n type: _this.currentType,\n speed: _this.currentSpeed\n });\n });\n }\n };\n ControllerBtn.prototype.destroy = function () {\n this.speedGroup.off('speed-rect:click');\n if (this.toggleGroup) {\n this.toggleGroup.off('toggle-model:click');\n this.toggleGroup.destroy();\n }\n this.speedGroup.destroy();\n };\n return ControllerBtn;\n}();\nexport default ControllerBtn;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n/**\n * 基于 G 的刻度时间轴组件\n */\nimport { ext } from '@antv/matrix-util';\nimport { isNumber, isString } from '@antv/util';\nimport TimeBarTooltip from './timeBarTooltip';\nimport ControllerBtn from './controllerBtn';\nimport { VALUE_CHANGE, TIMELINE_START, TIMELINE_END, PLAY_PAUSE_BTN, NEXT_STEP_BTN, PRE_STEP_BTN, TIMEBAR_CONFIG_CHANGE } from './constant';\nvar transform = ext.transform;\nvar DEFAULT_SELECTEDTICK_STYLE = {\n fill: '#5B8FF9'\n};\nvar DEFAULT_UNSELECTEDTICK_STYLE = {\n fill: '#e6e8e9'\n};\nvar TimeBarSlice = /** @class */function () {\n function TimeBarSlice(cfgs) {\n this.frameCount = 0;\n this.fontFamily = 'Arial, sans-serif';\n var graph = cfgs.graph,\n canvas = cfgs.canvas,\n group = cfgs.group,\n width = cfgs.width,\n height = cfgs.height,\n padding = cfgs.padding,\n data = cfgs.data,\n start = cfgs.start,\n end = cfgs.end,\n _a = cfgs.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfgs.y,\n y = _b === void 0 ? 0 : _b,\n tickLabelFormatter = cfgs.tickLabelFormatter,\n _c = cfgs.selectedTickStyle,\n selectedTickStyle = _c === void 0 ? DEFAULT_SELECTEDTICK_STYLE : _c,\n _d = cfgs.unselectedTickStyle,\n unselectedTickStyle = _d === void 0 ? DEFAULT_UNSELECTEDTICK_STYLE : _d,\n tooltipBackgroundColor = cfgs.tooltipBackgroundColor,\n tooltipFomatter = cfgs.tooltipFomatter,\n tickLabelStyle = cfgs.tickLabelStyle,\n _e = cfgs.controllerCfg,\n controllerCfg = _e === void 0 ? {\n speed: 1\n } : _e;\n this.graph = graph;\n this.group = group;\n this.sliceGroup = group.addGroup({\n name: 'slice-group'\n });\n this.canvas = canvas;\n this.width = width;\n this.height = height;\n this.padding = padding;\n this.data = data;\n this.start = start;\n this.end = end;\n this.tickLabelFormatter = tickLabelFormatter;\n this.tickLabelStyle = tickLabelStyle || {};\n this.selectedTickStyle = selectedTickStyle;\n this.unselectedTickStyle = unselectedTickStyle;\n this.controllerCfg = controllerCfg;\n this.currentSpeed = controllerCfg.speed || 1;\n this.x = x;\n this.y = y;\n this.tooltipBackgroundColor = tooltipBackgroundColor;\n this.tooltipFomatter = tooltipFomatter;\n // 初始化 fontFamily,如果有浏览器,取 body 上的字体,防止文字更新时局部渲染造成的重影\n this.fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.renderSlices();\n this.initEvent();\n }\n TimeBarSlice.prototype.renderSlices = function () {\n var _this = this;\n var _a = this,\n width = _a.width,\n height = _a.height,\n padding = _a.padding,\n data = _a.data,\n start = _a.start,\n end = _a.end,\n tickLabelFormatter = _a.tickLabelFormatter,\n selectedTickStyle = _a.selectedTickStyle,\n unselectedTickStyle = _a.unselectedTickStyle,\n tickLabelStyle = _a.tickLabelStyle;\n var realWidth = width - 2 * padding;\n var fontSize = 10;\n var labelLineHeight = 4;\n var labelAreaHeight = 3 * padding + labelLineHeight + fontSize;\n var ticksAreaHeight = height - labelAreaHeight - 2 * padding;\n var gap = 2;\n var ticksLength = data.length;\n var tickWidth = (realWidth - gap * (ticksLength - 1)) / ticksLength;\n this.tickWidth = tickWidth;\n var sliceGroup = this.sliceGroup;\n var tickRects = [];\n var labels = [];\n var startTickId = Math.round(ticksLength * start);\n var endTickId = Math.round(ticksLength * end);\n this.startTickRectId = startTickId;\n this.endTickRectId = endTickId;\n var rotate = tickLabelStyle.rotate;\n delete tickLabelStyle.rotate;\n data.forEach(function (d, i) {\n // draw the tick rects\n var selected = i >= startTickId && i <= endTickId;\n var tickStyle = selected ? selectedTickStyle : unselectedTickStyle;\n var rect = sliceGroup.addShape('rect', {\n attrs: __assign({\n x: padding + i * (tickWidth + gap),\n y: padding,\n width: tickWidth,\n height: ticksAreaHeight\n }, tickStyle),\n draggable: true,\n name: \"tick-rect-\".concat(i)\n });\n // draw the pick tick rects\n var pickRect = sliceGroup.addShape('rect', {\n attrs: {\n x: padding + i * tickWidth + gap * (2 * i - 1) / 2,\n y: padding,\n width: i === 0 || i === ticksLength - 1 ? tickWidth + gap / 2 : tickWidth + gap,\n height: ticksAreaHeight,\n fill: '#fff',\n opacity: 0\n },\n draggable: true,\n name: \"pick-rect-\".concat(i)\n });\n pickRect.toFront();\n var rectBBox = rect.getBBox();\n var centerX = (rectBBox.minX + rectBBox.maxX) / 2;\n tickRects.push({\n rect: rect,\n pickRect: pickRect,\n value: d.date,\n x: centerX,\n y: rectBBox.minY\n });\n var label;\n if (tickLabelFormatter) {\n label = tickLabelFormatter(d);\n if (!isString(label) && label) {\n // return true\n label = d.date;\n }\n } else if (i % Math.round(ticksLength / 10) === 0) {\n label = d.date;\n }\n if (label) {\n labels.push(label);\n // draw tick lines\n var lineStartY = rectBBox.maxY + padding * 2;\n sliceGroup.addShape('line', {\n attrs: {\n stroke: '#BFBFBF',\n x1: centerX,\n y1: lineStartY,\n x2: centerX,\n y2: lineStartY + labelLineHeight\n },\n name: 'tick-line'\n });\n var labelStartY = lineStartY + labelLineHeight + padding;\n var text = sliceGroup.addShape('text', {\n attrs: __assign({\n fill: '#8c8c8c',\n stroke: '#fff',\n lineWidth: 1,\n x: centerX,\n y: labelStartY,\n textAlign: 'center',\n text: label,\n textBaseline: 'top',\n fontSize: 10,\n fontFamily: _this.fontFamily || 'Arial, sans-serif'\n }, tickLabelStyle),\n capture: false,\n name: 'tick-label'\n });\n var textBBox = text.getBBox();\n if (textBBox.maxX > width) {\n text.attr('textAlign', 'right');\n } else if (textBBox.minX < 0) {\n text.attr('textAlign', 'left');\n }\n if (isNumber(rotate) && labels.length !== 10) {\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -centerX, -labelStartY], ['r', rotate], ['t', centerX - 5, labelStartY + 2]]);\n text.attr({\n textAlign: 'left',\n matrix: matrix\n });\n }\n if (labels.length === 1) {\n text.attr({\n textAlign: 'left'\n });\n } else if (labels.length === 10) {\n text.attr({\n textAlign: 'right'\n });\n }\n // draw tick labels\n }\n });\n\n this.tickRects = tickRects;\n // 渲染播放、快进和后退的控制按钮\n var group = this.group;\n this.currentSpeed = 1;\n this.controllerBtnGroup = new ControllerBtn(__assign({\n group: group,\n x: this.x,\n y: this.y + height + 5,\n width: width,\n height: 40,\n hideTimeTypeController: true,\n speed: this.currentSpeed,\n fontFamily: this.fontFamily || 'Arial, sans-serif'\n }, this.controllerCfg));\n };\n TimeBarSlice.prototype.initEvent = function () {\n var _this = this;\n var sliceGroup = this.sliceGroup;\n sliceGroup.on('click', function (e) {\n var targetRect = e.target;\n if (targetRect.get('type') !== 'rect' || !targetRect.get('name')) return;\n var id = parseInt(targetRect.get('name').split('-')[2], 10);\n if (!isNaN(id)) {\n var tickRects_1 = _this.tickRects;\n // cancel the selected ticks\n var unselectedTickStyle_1 = _this.unselectedTickStyle;\n tickRects_1.forEach(function (tickRect) {\n tickRect.rect.attr(unselectedTickStyle_1);\n });\n var selectedTickStyle = _this.selectedTickStyle;\n tickRects_1[id].rect.attr(selectedTickStyle);\n _this.startTickRectId = id;\n _this.endTickRectId = id;\n var ticksLength = tickRects_1.length;\n var start = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, start]\n });\n }\n });\n sliceGroup.on('dragstart', function (e) {\n var tickRects = _this.tickRects;\n // cancel the selected ticks\n var unselectedTickStyle = _this.unselectedTickStyle;\n tickRects.forEach(function (tickRect) {\n tickRect.rect.attr(unselectedTickStyle);\n });\n var targetRect = e.target;\n var id = parseInt(targetRect.get('name').split('-')[2], 10);\n var selectedTickStyle = _this.selectedTickStyle;\n tickRects[id].rect.attr(selectedTickStyle);\n _this.startTickRectId = id;\n var ticksLength = tickRects.length;\n var start = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, start]\n });\n _this.dragging = true;\n });\n sliceGroup.on('dragover', function (e) {\n if (!_this.dragging) return;\n if (e.target.get('type') !== 'rect') return;\n var id = parseInt(e.target.get('name').split('-')[2], 10);\n var startTickRectId = _this.startTickRectId;\n var tickRects = _this.tickRects;\n var selectedTickStyle = _this.selectedTickStyle;\n var unselectedTickStyle = _this.unselectedTickStyle;\n for (var i = 0; i < tickRects.length; i++) {\n var style = i >= startTickRectId && i <= id ? selectedTickStyle : unselectedTickStyle;\n tickRects[i].rect.attr(style);\n }\n var ticksLength = tickRects.length;\n _this.endTickRectId = id;\n var start = startTickRectId / ticksLength;\n var end = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n });\n sliceGroup.on('drop', function (e) {\n if (!_this.dragging) return;\n _this.dragging = false;\n if (e.target.get('type') !== 'rect') return;\n var startTickRectId = _this.startTickRectId;\n var id = parseInt(e.target.get('name').split('-')[2], 10);\n if (id < startTickRectId) return;\n var selectedTickStyle = _this.selectedTickStyle;\n var tickRects = _this.tickRects;\n tickRects[id].rect.attr(selectedTickStyle);\n _this.endTickRectId = id;\n var ticksLength = tickRects.length;\n var start = startTickRectId / ticksLength;\n var end = id / ticksLength;\n _this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n });\n // tooltip\n var _a = this,\n tooltipBackgroundColor = _a.tooltipBackgroundColor,\n tooltipFomatter = _a.tooltipFomatter,\n canvas = _a.canvas;\n var tooltip = new TimeBarTooltip({\n container: canvas.get('container'),\n backgroundColor: tooltipBackgroundColor\n });\n var tickRects = this.tickRects;\n tickRects.forEach(function (tickRect) {\n var pickRect = tickRect.pickRect;\n pickRect.on('mouseenter', function (e) {\n var rect = e.target;\n if (rect.get('type') !== 'rect') return;\n var id = parseInt(rect.get('name').split('-')[2], 10);\n var clientPoint = canvas.getClientByPoint(tickRects[id].x, tickRects[id].y);\n tooltip.show({\n x: tickRects[id].x,\n y: tickRects[id].y,\n clientX: clientPoint.x,\n clientY: clientPoint.y,\n text: tooltipFomatter ? tooltipFomatter(tickRects[id].value) : tickRects[id].value\n });\n });\n pickRect.on('mouseleave', function (e) {\n tooltip.hide();\n });\n });\n // play controller events\n var group = this.group;\n // 播放区按钮控制\n /** 播放/暂停事件 */\n group.on(\"\".concat(PLAY_PAUSE_BTN, \":click\"), function () {\n _this.isPlay = !_this.isPlay;\n _this.changePlayStatus();\n });\n // 处理前进一步的事件\n group.on(\"\".concat(NEXT_STEP_BTN, \":click\"), function () {\n _this.updateStartEnd(1);\n });\n // 处理后退一步的事件\n group.on(\"\".concat(PRE_STEP_BTN, \":click\"), function () {\n _this.updateStartEnd(-1);\n });\n group.on(TIMEBAR_CONFIG_CHANGE, function (_a) {\n var type = _a.type,\n speed = _a.speed;\n _this.currentSpeed = speed;\n });\n };\n TimeBarSlice.prototype.changePlayStatus = function (isSync) {\n if (isSync === void 0) {\n isSync = true;\n }\n this.controllerBtnGroup.playButton.update({\n isPlay: this.isPlay\n });\n if (this.isPlay) {\n // 开始播放\n this.playHandler = this.startPlay();\n this.graph.emit(TIMELINE_START, null);\n } else {\n // 结束播放\n if (this.playHandler) {\n if (typeof window !== 'undefined') window.cancelAnimationFrame(this.playHandler);\n if (isSync) {\n this.graph.emit(TIMELINE_END, null);\n }\n }\n }\n };\n TimeBarSlice.prototype.startPlay = function () {\n var _this = this;\n return typeof window !== 'undefined' ? window.requestAnimationFrame(function () {\n var speed = _this.currentSpeed;\n // 一分钟刷新一次\n if (_this.frameCount % (60 / speed) === 0) {\n _this.frameCount = 0;\n _this.updateStartEnd(1);\n }\n _this.frameCount++;\n if (_this.isPlay) {\n _this.playHandler = _this.startPlay();\n }\n }) : undefined;\n };\n TimeBarSlice.prototype.updateStartEnd = function (sign) {\n var self = this;\n var tickRects = this.tickRects;\n var ticksLength = tickRects.length;\n var unselectedTickStyle = this.unselectedTickStyle;\n var selectedTickStyle = this.selectedTickStyle;\n var previousEndTickRectId = self.endTickRectId;\n if (sign > 0) {\n self.endTickRectId++;\n } else {\n tickRects[self.endTickRectId].rect.attr(unselectedTickStyle);\n self.endTickRectId--;\n }\n // 若此时 start 与 end 不同,范围前进/后退/播放\n if (previousEndTickRectId !== self.startTickRectId) {\n if (self.endTickRectId < self.startTickRectId) {\n self.startTickRectId = self.endTickRectId;\n }\n } else {\n // 否则是单帧的前进/后退/播放\n for (var i = self.startTickRectId; i <= self.endTickRectId - 1; i++) {\n tickRects[i].rect.attr(unselectedTickStyle);\n }\n self.startTickRectId = self.endTickRectId;\n }\n if (tickRects[self.endTickRectId]) {\n tickRects[self.endTickRectId].rect.attr(selectedTickStyle);\n var start = self.startTickRectId / ticksLength;\n var end = self.endTickRectId / ticksLength;\n this.graph.emit(VALUE_CHANGE, {\n value: [start, end]\n });\n }\n };\n TimeBarSlice.prototype.destory = function () {\n var group = this.sliceGroup;\n group.off('click');\n group.off('dragstart');\n group.off('dragover');\n group.off('drop');\n this.tickRects.forEach(function (tickRect) {\n var pickRect = tickRect.pickRect;\n pickRect.off('mouseenter');\n pickRect.off('mouseleave');\n });\n this.tickRects.length = 0;\n group.off(\"\".concat(PLAY_PAUSE_BTN, \":click\"));\n group.off(\"\".concat(NEXT_STEP_BTN, \":click\"));\n group.off(\"\".concat(PRE_STEP_BTN, \":click\"));\n group.off(TIMEBAR_CONFIG_CHANGE);\n this.sliceGroup.destroy();\n };\n return TimeBarSlice;\n}();\nexport default TimeBarSlice;","var methodCache = {};\n/**\n * 获取计算 ticks 的方法\n * @param key 键值\n * @returns 计算 ticks 的方法\n */\nexport function getTickMethod(key) {\n return methodCache[key];\n}\n/**\n * 注册计算 ticks 的方法\n * @param key 键值\n * @param method 方法\n */\nexport function registerTickMethod(key, method) {\n methodCache[key] = method;\n}\n//# sourceMappingURL=register.js.map","import { assign, isEmpty, isFunction, isNil, isNumber, isObject, isString, map } from '@antv/util';\nimport { getTickMethod } from './tick-method/register';\nvar Scale = /** @class */ (function () {\n function Scale(cfg) {\n /**\n * 度量的类型\n */\n this.type = 'base';\n /**\n * 是否分类类型的度量\n */\n this.isCategory = false;\n /**\n * 是否线性度量,有linear, time 度量\n */\n this.isLinear = false;\n /**\n * 是否连续类型的度量,linear,time,log, pow, quantile, quantize 都支持\n */\n this.isContinuous = false;\n /**\n * 是否是常量的度量,传入和传出一致\n */\n this.isIdentity = false;\n this.values = [];\n this.range = [0, 1];\n this.ticks = [];\n this.__cfg__ = cfg;\n this.initCfg();\n this.init();\n }\n // 对于原始值的必要转换,如分类、时间字段需转换成数值,用transform/map命名可能更好\n Scale.prototype.translate = function (v) {\n return v;\n };\n /** 重新初始化 */\n Scale.prototype.change = function (cfg) {\n // 覆盖配置项,而不替代\n assign(this.__cfg__, cfg);\n this.init();\n };\n Scale.prototype.clone = function () {\n return this.constructor(this.__cfg__);\n };\n /** 获取坐标轴需要的ticks */\n Scale.prototype.getTicks = function () {\n var _this = this;\n return map(this.ticks, function (tick, idx) {\n if (isObject(tick)) {\n // 仅当符合Tick类型时才有意义\n return tick;\n }\n return {\n text: _this.getText(tick, idx),\n tickValue: tick,\n value: _this.scale(tick),\n };\n });\n };\n /** 获取Tick的格式化结果 */\n Scale.prototype.getText = function (value, key) {\n var formatter = this.formatter;\n var res = formatter ? formatter(value, key) : value;\n if (isNil(res) || !isFunction(res.toString)) {\n return '';\n }\n return res.toString();\n };\n // 获取配置项中的值,当前 scale 上的值可能会被修改\n Scale.prototype.getConfig = function (key) {\n return this.__cfg__[key];\n };\n // scale初始化\n Scale.prototype.init = function () {\n assign(this, this.__cfg__);\n this.setDomain();\n if (isEmpty(this.getConfig('ticks'))) {\n this.ticks = this.calculateTicks();\n }\n };\n // 子类上覆盖某些属性,不能直接在类上声明,否则会被覆盖\n Scale.prototype.initCfg = function () { };\n Scale.prototype.setDomain = function () { };\n Scale.prototype.calculateTicks = function () {\n var tickMethod = this.tickMethod;\n var ticks = [];\n if (isString(tickMethod)) {\n var method = getTickMethod(tickMethod);\n if (!method) {\n throw new Error('There is no method to to calculate ticks!');\n }\n ticks = method(this);\n }\n else if (isFunction(tickMethod)) {\n ticks = tickMethod(this);\n }\n return ticks;\n };\n // range 的最小值\n Scale.prototype.rangeMin = function () {\n return this.range[0];\n };\n // range 的最大值\n Scale.prototype.rangeMax = function () {\n return this.range[1];\n };\n /** 定义域转 0~1 */\n Scale.prototype.calcPercent = function (value, min, max) {\n if (isNumber(value)) {\n return (value - min) / (max - min);\n }\n return NaN;\n };\n /** 0~1转定义域 */\n Scale.prototype.calcValue = function (percent, min, max) {\n return min + percent * (max - min);\n };\n return Scale;\n}());\nexport default Scale;\n//# sourceMappingURL=base.js.map","import { __extends, __spreadArrays } from \"tslib\";\nimport { isNil, isNumber } from '@antv/util';\nimport Base from '../base';\n/**\n * 分类度量\n * @class\n */\nvar Category = /** @class */ (function (_super) {\n __extends(Category, _super);\n function Category() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'cat';\n _this.isCategory = true;\n return _this;\n }\n Category.prototype.buildIndexMap = function () {\n if (!this.translateIndexMap) {\n this.translateIndexMap = new Map();\n // 重新构建缓存\n for (var i = 0; i < this.values.length; i++) {\n this.translateIndexMap.set(this.values[i], i);\n }\n }\n };\n Category.prototype.translate = function (value) {\n // 按需构建 map\n this.buildIndexMap();\n // 找得到\n var idx = this.translateIndexMap.get(value);\n if (idx === undefined) {\n idx = isNumber(value) ? value : NaN;\n }\n return idx;\n };\n Category.prototype.scale = function (value) {\n var order = this.translate(value);\n // 分类数据允许 0.5 范围内调整\n // if (order < this.min - 0.5 || order > this.max + 0.5) {\n // return NaN;\n // }\n var percent = this.calcPercent(order, this.min, this.max);\n return this.calcValue(percent, this.rangeMin(), this.rangeMax());\n };\n Category.prototype.invert = function (scaledValue) {\n var domainRange = this.max - this.min;\n var percent = this.calcPercent(scaledValue, this.rangeMin(), this.rangeMax());\n var idx = Math.round(domainRange * percent) + this.min;\n if (idx < this.min || idx > this.max) {\n return NaN;\n }\n return this.values[idx];\n };\n Category.prototype.getText = function (value) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var v = value;\n // value为index\n if (isNumber(value) && !this.values.includes(value)) {\n v = this.values[v];\n }\n return _super.prototype.getText.apply(this, __spreadArrays([v], args));\n };\n // 复写属性\n Category.prototype.initCfg = function () {\n this.tickMethod = 'cat';\n };\n // 设置 min, max\n Category.prototype.setDomain = function () {\n // 用户有可能设置 min\n if (isNil(this.getConfig('min'))) {\n this.min = 0;\n }\n if (isNil(this.getConfig('max'))) {\n var size = this.values.length;\n this.max = size > 1 ? size - 1 : size;\n }\n // scale.init 的时候清除缓存\n if (this.translateIndexMap) {\n this.translateIndexMap = undefined;\n }\n };\n return Category;\n}(Base));\nexport default Category;\n//# sourceMappingURL=base.js.map","var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nvar twoDigitsOptional = \"\\\\d\\\\d?\";\nvar twoDigits = \"\\\\d\\\\d\";\nvar threeDigits = \"\\\\d{3}\";\nvar fourDigits = \"\\\\d{4}\";\nvar word = \"[^\\\\s]+\";\nvar literal = /\\[([^]*?)\\]/gm;\nfunction shorten(arr, sLen) {\n var newArr = [];\n for (var i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\nvar monthUpdate = function (arrName) { return function (v, i18n) {\n var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); });\n var index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n}; };\nfunction assign(origObj) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var obj = args_1[_a];\n for (var key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\nvar dayNames = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nvar monthNames = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\nvar monthNamesShort = shorten(monthNames, 3);\nvar dayNamesShort = shorten(dayNames, 3);\nvar defaultI18n = {\n dayNamesShort: dayNamesShort,\n dayNames: dayNames,\n monthNamesShort: monthNamesShort,\n monthNames: monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn: function (dayOfMonth) {\n return (dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]);\n }\n};\nvar globalI18n = assign({}, defaultI18n);\nvar setGlobalDateI18n = function (i18n) {\n return (globalI18n = assign(globalI18n, i18n));\n};\nvar regexEscape = function (str) {\n return str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n};\nvar pad = function (val, len) {\n if (len === void 0) { len = 2; }\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\nvar formatFlags = {\n D: function (dateObj) { return String(dateObj.getDate()); },\n DD: function (dateObj) { return pad(dateObj.getDate()); },\n Do: function (dateObj, i18n) {\n return i18n.DoFn(dateObj.getDate());\n },\n d: function (dateObj) { return String(dateObj.getDay()); },\n dd: function (dateObj) { return pad(dateObj.getDay()); },\n ddd: function (dateObj, i18n) {\n return i18n.dayNamesShort[dateObj.getDay()];\n },\n dddd: function (dateObj, i18n) {\n return i18n.dayNames[dateObj.getDay()];\n },\n M: function (dateObj) { return String(dateObj.getMonth() + 1); },\n MM: function (dateObj) { return pad(dateObj.getMonth() + 1); },\n MMM: function (dateObj, i18n) {\n return i18n.monthNamesShort[dateObj.getMonth()];\n },\n MMMM: function (dateObj, i18n) {\n return i18n.monthNames[dateObj.getMonth()];\n },\n YY: function (dateObj) {\n return pad(String(dateObj.getFullYear()), 4).substr(2);\n },\n YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); },\n h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); },\n hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); },\n H: function (dateObj) { return String(dateObj.getHours()); },\n HH: function (dateObj) { return pad(dateObj.getHours()); },\n m: function (dateObj) { return String(dateObj.getMinutes()); },\n mm: function (dateObj) { return pad(dateObj.getMinutes()); },\n s: function (dateObj) { return String(dateObj.getSeconds()); },\n ss: function (dateObj) { return pad(dateObj.getSeconds()); },\n S: function (dateObj) {\n return String(Math.round(dateObj.getMilliseconds() / 100));\n },\n SS: function (dateObj) {\n return pad(Math.round(dateObj.getMilliseconds() / 10), 2);\n },\n SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); },\n a: function (dateObj, i18n) {\n return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];\n },\n A: function (dateObj, i18n) {\n return dateObj.getHours() < 12\n ? i18n.amPm[0].toUpperCase()\n : i18n.amPm[1].toUpperCase();\n },\n ZZ: function (dateObj) {\n var offset = dateObj.getTimezoneOffset();\n return ((offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4));\n },\n Z: function (dateObj) {\n var offset = dateObj.getTimezoneOffset();\n return ((offset > 0 ? \"-\" : \"+\") +\n pad(Math.floor(Math.abs(offset) / 60), 2) +\n \":\" +\n pad(Math.abs(offset) % 60, 2));\n }\n};\nvar monthParse = function (v) { return +v - 1; };\nvar emptyDigits = [null, twoDigitsOptional];\nvar emptyWord = [null, word];\nvar amPm = [\n \"isPm\",\n word,\n function (v, i18n) {\n var val = v.toLowerCase();\n if (val === i18n.amPm[0]) {\n return 0;\n }\n else if (val === i18n.amPm[1]) {\n return 1;\n }\n return null;\n }\n];\nvar timezoneOffset = [\n \"timezoneOffset\",\n \"[^\\\\s]*?[\\\\+\\\\-]\\\\d\\\\d:?\\\\d\\\\d|[^\\\\s]*?Z?\",\n function (v) {\n var parts = (v + \"\").match(/([+-]|\\d\\d)/gi);\n if (parts) {\n var minutes = +parts[1] * 60 + parseInt(parts[2], 10);\n return parts[0] === \"+\" ? minutes : -minutes;\n }\n return 0;\n }\n];\nvar parseFlags = {\n D: [\"day\", twoDigitsOptional],\n DD: [\"day\", twoDigits],\n Do: [\"day\", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }],\n M: [\"month\", twoDigitsOptional, monthParse],\n MM: [\"month\", twoDigits, monthParse],\n YY: [\n \"year\",\n twoDigits,\n function (v) {\n var now = new Date();\n var cent = +(\"\" + now.getFullYear()).substr(0, 2);\n return +(\"\" + (+v > 68 ? cent - 1 : cent) + v);\n }\n ],\n h: [\"hour\", twoDigitsOptional, undefined, \"isPm\"],\n hh: [\"hour\", twoDigits, undefined, \"isPm\"],\n H: [\"hour\", twoDigitsOptional],\n HH: [\"hour\", twoDigits],\n m: [\"minute\", twoDigitsOptional],\n mm: [\"minute\", twoDigits],\n s: [\"second\", twoDigitsOptional],\n ss: [\"second\", twoDigits],\n YYYY: [\"year\", fourDigits],\n S: [\"millisecond\", \"\\\\d\", function (v) { return +v * 100; }],\n SS: [\"millisecond\", twoDigits, function (v) { return +v * 10; }],\n SSS: [\"millisecond\", threeDigits],\n d: emptyDigits,\n dd: emptyDigits,\n ddd: emptyWord,\n dddd: emptyWord,\n MMM: [\"month\", word, monthUpdate(\"monthNamesShort\")],\n MMMM: [\"month\", word, monthUpdate(\"monthNames\")],\n a: amPm,\n A: amPm,\n ZZ: timezoneOffset,\n Z: timezoneOffset\n};\n// Some common format strings\nvar globalMasks = {\n default: \"ddd MMM DD YYYY HH:mm:ss\",\n shortDate: \"M/D/YY\",\n mediumDate: \"MMM D, YYYY\",\n longDate: \"MMMM D, YYYY\",\n fullDate: \"dddd, MMMM D, YYYY\",\n isoDate: \"YYYY-MM-DD\",\n isoDateTime: \"YYYY-MM-DDTHH:mm:ssZ\",\n shortTime: \"HH:mm\",\n mediumTime: \"HH:mm:ss\",\n longTime: \"HH:mm:ss.SSS\"\n};\nvar setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); };\n/***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n * @returns {string} Formatted date string\n */\nvar format = function (dateObj, mask, i18n) {\n if (mask === void 0) { mask = globalMasks[\"default\"]; }\n if (i18n === void 0) { i18n = {}; }\n if (typeof dateObj === \"number\") {\n dateObj = new Date(dateObj);\n }\n if (Object.prototype.toString.call(dateObj) !== \"[object Date]\" ||\n isNaN(dateObj.getTime())) {\n throw new Error(\"Invalid Date pass to format\");\n }\n mask = globalMasks[mask] || mask;\n var literals = [];\n // Make literals inactive by replacing them with @@@\n mask = mask.replace(literal, function ($0, $1) {\n literals.push($1);\n return \"@@@\";\n });\n var combinedI18nSettings = assign(assign({}, globalI18n), i18n);\n // Apply formatting rules\n mask = mask.replace(token, function ($0) {\n return formatFlags[$0](dateObj, combinedI18nSettings);\n });\n // Inline literal values back into the formatted value\n return mask.replace(/@@@/g, function () { return literals.shift(); });\n};\n/**\n * Parse a date string into a Javascript Date object /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @param {i18n} I18nSettingsOptional Full or subset of I18N settings\n * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format\n */\nfunction parse(dateStr, format, i18n) {\n if (i18n === void 0) { i18n = {}; }\n if (typeof format !== \"string\") {\n throw new Error(\"Invalid format in fecha parse\");\n }\n // Check to see if the format is actually a mask\n format = globalMasks[format] || format;\n // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n if (dateStr.length > 1000) {\n return null;\n }\n // Default to the beginning of the year.\n var today = new Date();\n var dateInfo = {\n year: today.getFullYear(),\n month: 0,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n isPm: null,\n timezoneOffset: null\n };\n var parseInfo = [];\n var literals = [];\n // Replace all the literals with @@@. Hopefully a string that won't exist in the format\n var newFormat = format.replace(literal, function ($0, $1) {\n literals.push(regexEscape($1));\n return \"@@@\";\n });\n var specifiedFields = {};\n var requiredFields = {};\n // Change every token that we find into the correct regex\n newFormat = regexEscape(newFormat).replace(token, function ($0) {\n var info = parseFlags[$0];\n var field = info[0], regex = info[1], requiredField = info[3];\n // Check if the person has specified the same field twice. This will lead to confusing results.\n if (specifiedFields[field]) {\n throw new Error(\"Invalid format. \" + field + \" specified twice in format\");\n }\n specifiedFields[field] = true;\n // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified\n if (requiredField) {\n requiredFields[requiredField] = true;\n }\n parseInfo.push(info);\n return \"(\" + regex + \")\";\n });\n // Check all the required fields are present\n Object.keys(requiredFields).forEach(function (field) {\n if (!specifiedFields[field]) {\n throw new Error(\"Invalid format. \" + field + \" is required in specified format\");\n }\n });\n // Add back all the literals after\n newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); });\n // Check if the date string matches the format. If it doesn't return null\n var matches = dateStr.match(new RegExp(newFormat, \"i\"));\n if (!matches) {\n return null;\n }\n var combinedI18nSettings = assign(assign({}, globalI18n), i18n);\n // For each match, call the parser function for that date part\n for (var i = 1; i < matches.length; i++) {\n var _a = parseInfo[i - 1], field = _a[0], parser = _a[2];\n var value = parser\n ? parser(matches[i], combinedI18nSettings)\n : +matches[i];\n // If the parser can't make sense of the value, return null\n if (value == null) {\n return null;\n }\n dateInfo[field] = value;\n }\n if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n }\n else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n var dateTZ;\n if (dateInfo.timezoneOffset == null) {\n dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond);\n var validateFields = [\n [\"month\", \"getMonth\"],\n [\"day\", \"getDate\"],\n [\"hour\", \"getHours\"],\n [\"minute\", \"getMinutes\"],\n [\"second\", \"getSeconds\"]\n ];\n for (var i = 0, len = validateFields.length; i < len; i++) {\n // Check to make sure the date field is within the allowed range. Javascript dates allows values\n // outside the allowed range. If the values don't match the value was invalid\n if (specifiedFields[validateFields[i][0]] &&\n dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) {\n return null;\n }\n }\n }\n else {\n dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond));\n // We can't validate dates in another timezone unfortunately. Do a basic check instead\n if (dateInfo.month > 11 ||\n dateInfo.month < 0 ||\n dateInfo.day > 31 ||\n dateInfo.day < 1 ||\n dateInfo.hour > 23 ||\n dateInfo.hour < 0 ||\n dateInfo.minute > 59 ||\n dateInfo.minute < 0 ||\n dateInfo.second > 59 ||\n dateInfo.second < 0) {\n return null;\n }\n }\n // Don't allow invalid dates\n return dateTZ;\n}\nvar fecha = {\n format: format,\n parse: parse,\n defaultI18n: defaultI18n,\n setGlobalDateI18n: setGlobalDateI18n,\n setGlobalDateMasks: setGlobalDateMasks\n};\n\nexport default fecha;\nexport { assign, format, parse, defaultI18n, setGlobalDateI18n, setGlobalDateMasks };\n//# sourceMappingURL=fecha.js.map\n","import { isNil } from '@antv/util';\n/**\n * 二分右侧查找\n * https://github.com/d3/d3-array/blob/master/src/bisector.js\n */\nexport default function (getter) {\n /**\n * x: 目标值\n * lo: 起始位置\n * hi: 结束位置\n */\n return function (a, x, _lo, _hi) {\n var lo = isNil(_lo) ? 0 : _lo;\n var hi = isNil(_hi) ? a.length : _hi;\n while (lo < hi) {\n var mid = (lo + hi) >>> 1;\n if (getter(a[mid]) > x) {\n hi = mid;\n }\n else {\n lo = mid + 1;\n }\n }\n return lo;\n };\n}\n//# sourceMappingURL=bisector.js.map","import { isDate, isString, last } from '@antv/util';\nimport fecha from 'fecha';\nimport * as fecha1 from 'fecha';\nimport bisector from './bisector';\nvar FORMAT_METHOD = 'format';\nexport function timeFormat(time, mask) {\n var method = fecha1[FORMAT_METHOD] || fecha[FORMAT_METHOD];\n return method(time, mask);\n}\n/**\n * 转换成时间戳\n * @param value 时间值\n */\nexport function toTimeStamp(value) {\n if (isString(value)) {\n if (value.indexOf('T') > 0) {\n value = new Date(value).getTime();\n }\n else {\n // new Date('2010/01/10') 和 new Date('2010-01-10') 的差别在于:\n // 如果仅有年月日时,前者是带有时区的: Fri Jan 10 2020 02:40:13 GMT+0800 (中国标准时间)\n // 后者会格式化成 Sun Jan 10 2010 08:00:00 GMT+0800 (中国标准时间)\n value = new Date(value.replace(/-/gi, '/')).getTime();\n }\n }\n if (isDate(value)) {\n value = value.getTime();\n }\n return value;\n}\nvar SECOND = 1000;\nvar MINUTE = 60 * SECOND;\nvar HOUR = 60 * MINUTE;\nvar DAY = 24 * HOUR;\nvar MONTH = DAY * 31;\nvar YEAR = DAY * 365;\nexport { SECOND, MINUTE, HOUR, DAY, MONTH, YEAR };\nvar intervals = [\n ['HH:mm:ss', SECOND],\n ['HH:mm:ss', SECOND * 10],\n ['HH:mm:ss', SECOND * 30],\n ['HH:mm', MINUTE],\n ['HH:mm', MINUTE * 10],\n ['HH:mm', MINUTE * 30],\n ['HH', HOUR],\n ['HH', HOUR * 6],\n ['HH', HOUR * 12],\n ['YYYY-MM-DD', DAY],\n ['YYYY-MM-DD', DAY * 4],\n ['YYYY-WW', DAY * 7],\n ['YYYY-MM', MONTH],\n ['YYYY-MM', MONTH * 4],\n ['YYYY-MM', MONTH * 6],\n ['YYYY', DAY * 380],\n];\nexport function getTickInterval(min, max, tickCount) {\n var target = (max - min) / tickCount;\n var idx = bisector(function (o) { return o[1]; })(intervals, target) - 1;\n var interval = intervals[idx];\n if (idx < 0) {\n interval = intervals[0];\n }\n else if (idx >= intervals.length) {\n interval = last(intervals);\n }\n return interval;\n}\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { each, isNumber } from '@antv/util';\nimport { timeFormat, toTimeStamp } from '../util/time';\nimport Category from './base';\n/**\n * 时间分类度量\n * @class\n */\nvar TimeCat = /** @class */ (function (_super) {\n __extends(TimeCat, _super);\n function TimeCat() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'timeCat';\n return _this;\n }\n /**\n * @override\n */\n TimeCat.prototype.translate = function (value) {\n value = toTimeStamp(value);\n var index = this.values.indexOf(value);\n if (index === -1) {\n if (isNumber(value) && value < this.values.length) {\n index = value;\n }\n else {\n index = NaN;\n }\n }\n return index;\n };\n /**\n * 由于时间类型数据需要转换一下,所以复写 getText\n * @override\n */\n TimeCat.prototype.getText = function (value, tickIndex) {\n var index = this.translate(value);\n if (index > -1) {\n var result = this.values[index];\n var formatter = this.formatter;\n result = formatter ? formatter(result, tickIndex) : timeFormat(result, this.mask);\n return result;\n }\n return value;\n };\n TimeCat.prototype.initCfg = function () {\n this.tickMethod = 'time-cat';\n this.mask = 'YYYY-MM-DD';\n this.tickCount = 7; // 一般时间数据会显示 7, 14, 30 天的数字\n };\n TimeCat.prototype.setDomain = function () {\n var values = this.values;\n // 针对时间分类类型,会将时间统一转换为时间戳\n each(values, function (v, i) {\n values[i] = toTimeStamp(v);\n });\n values.sort(function (v1, v2) {\n return v1 - v2;\n });\n _super.prototype.setDomain.call(this);\n };\n return TimeCat;\n}(Category));\nexport default TimeCat;\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { filter, getRange, head, isNil, last } from '@antv/util';\nimport Base from '../base';\n/**\n * 连续度量的基类\n * @class\n */\nvar Continuous = /** @class */ (function (_super) {\n __extends(Continuous, _super);\n function Continuous() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.isContinuous = true;\n return _this;\n }\n Continuous.prototype.scale = function (value) {\n if (isNil(value)) {\n return NaN;\n }\n var rangeMin = this.rangeMin();\n var rangeMax = this.rangeMax();\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return rangeMin;\n }\n var percent = this.getScalePercent(value);\n return rangeMin + percent * (rangeMax - rangeMin);\n };\n Continuous.prototype.init = function () {\n _super.prototype.init.call(this);\n // init 完成后保证 min, max 包含 ticks 的范围\n var ticks = this.ticks;\n var firstTick = head(ticks);\n var lastTick = last(ticks);\n if (firstTick < this.min) {\n this.min = firstTick;\n }\n if (lastTick > this.max) {\n this.max = lastTick;\n }\n // strict-limit 方式\n if (!isNil(this.minLimit)) {\n this.min = firstTick;\n }\n if (!isNil(this.maxLimit)) {\n this.max = lastTick;\n }\n };\n Continuous.prototype.setDomain = function () {\n var _a = getRange(this.values), min = _a.min, max = _a.max;\n if (isNil(this.min)) {\n this.min = min;\n }\n if (isNil(this.max)) {\n this.max = max;\n }\n if (this.min > this.max) {\n this.min = min;\n this.max = max;\n }\n };\n Continuous.prototype.calculateTicks = function () {\n var _this = this;\n var ticks = _super.prototype.calculateTicks.call(this);\n if (!this.nice) {\n ticks = filter(ticks, function (tick) {\n return tick >= _this.min && tick <= _this.max;\n });\n }\n return ticks;\n };\n // 计算原始值值占的百分比\n Continuous.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n return (value - min) / (max - min);\n };\n Continuous.prototype.getInvertPercent = function (value) {\n return (value - this.rangeMin()) / (this.rangeMax() - this.rangeMin());\n };\n return Continuous;\n}(Base));\nexport default Continuous;\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport Continuous from './base';\n/**\n * 线性度量\n * @class\n */\nvar Linear = /** @class */ (function (_super) {\n __extends(Linear, _super);\n function Linear() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'linear';\n _this.isLinear = true;\n return _this;\n }\n Linear.prototype.invert = function (value) {\n var percent = this.getInvertPercent(value);\n return this.min + percent * (this.max - this.min);\n };\n Linear.prototype.initCfg = function () {\n this.tickMethod = 'wilkinson-extended';\n this.nice = false;\n };\n return Linear;\n}(Continuous));\nexport default Linear;\n//# sourceMappingURL=linear.js.map","import { each, isNil } from '@antv/util';\n// 求以a为次幂,结果为b的基数,如 x^^a = b;求x\n// 虽然数学上 b 不支持负数,但是这里需要支持 负数\nexport function calBase(a, b) {\n var e = Math.E;\n var value;\n if (b >= 0) {\n value = Math.pow(e, Math.log(b) / a); // 使用换底公式求底\n }\n else {\n value = Math.pow(e, Math.log(-b) / a) * -1; // 使用换底公式求底\n }\n return value;\n}\nexport function log(a, b) {\n if (a === 1) {\n return 1;\n }\n return Math.log(b) / Math.log(a);\n}\nexport function getLogPositiveMin(values, base, max) {\n if (isNil(max)) {\n max = Math.max.apply(null, values);\n }\n var positiveMin = max;\n each(values, function (value) {\n if (value > 0 && value < positiveMin) {\n positiveMin = value;\n }\n });\n if (positiveMin === max) {\n positiveMin = max / base;\n }\n if (positiveMin > 1) {\n positiveMin = 1;\n }\n return positiveMin;\n}\nfunction digitLength(num) {\n // Get digit length of e\n var eSplit = num.toString().split(/[eE]/);\n var len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);\n return len > 0 ? len : 0;\n}\n/**\n * 高精度加法,解决 0.1 + 0.2 !== 0.3 的经典问题\n *\n * @param num1 加数\n * @param num2 被加数\n * @return {number} 返回值\n */\nexport function precisionAdd(num1, num2) {\n var num1Digits = digitLength(num1);\n var num2Digits = digitLength(num2);\n var baseNum = Math.pow(10, Math.max(num1Digits, num2Digits));\n return (num1 * baseNum + num2 * baseNum) / baseNum;\n}\n//# sourceMappingURL=math.js.map","import { __extends } from \"tslib\";\nimport { getLogPositiveMin, log } from '../util/math';\nimport Continuous from './base';\n/**\n * Log 度量,处理非均匀分布\n */\nvar Log = /** @class */ (function (_super) {\n __extends(Log, _super);\n function Log() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'log';\n return _this;\n }\n /**\n * @override\n */\n Log.prototype.invert = function (value) {\n var base = this.base;\n var max = log(base, this.max);\n var rangeMin = this.rangeMin();\n var range = this.rangeMax() - rangeMin;\n var min;\n var positiveMin = this.positiveMin;\n if (positiveMin) {\n if (value === 0) {\n return 0;\n }\n min = log(base, positiveMin / base);\n var appendPercent = (1 / (max - min)) * range; // 0 到 positiveMin的占比\n if (value < appendPercent) {\n // 落到 0 - positiveMin 之间\n return (value / appendPercent) * positiveMin;\n }\n }\n else {\n min = log(base, this.min);\n }\n var percent = (value - rangeMin) / range;\n var tmp = percent * (max - min) + min;\n return Math.pow(base, tmp);\n };\n Log.prototype.initCfg = function () {\n this.tickMethod = 'log';\n this.base = 10;\n this.tickCount = 6;\n this.nice = true;\n };\n // 设置\n Log.prototype.setDomain = function () {\n _super.prototype.setDomain.call(this);\n var min = this.min;\n if (min < 0) {\n throw new Error('When you use log scale, the minimum value must be greater than zero!');\n }\n if (min === 0) {\n this.positiveMin = getLogPositiveMin(this.values, this.base, this.max);\n }\n };\n // 根据当前值获取占比\n Log.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return 0;\n }\n // 如果值小于等于0,则按照0处理\n if (value <= 0) {\n return 0;\n }\n var base = this.base;\n var positiveMin = this.positiveMin;\n // 如果min == 0, 则根据比0大的最小值,计算比例关系。这个最小值作为坐标轴上的第二个tick,第一个是0但是不显示\n if (positiveMin) {\n min = (positiveMin * 1) / base;\n }\n var percent;\n // 如果数值小于次小值,那么就计算 value / 次小值 占整体的比例\n if (value < positiveMin) {\n percent = value / positiveMin / (log(base, max) - log(base, min));\n }\n else {\n percent = (log(base, value) - log(base, min)) / (log(base, max) - log(base, min));\n }\n return percent;\n };\n return Log;\n}(Continuous));\nexport default Log;\n//# sourceMappingURL=log.js.map","import { __extends } from \"tslib\";\nimport { calBase } from '../util/math';\nimport Continuous from './base';\n/**\n * Pow 度量,处理非均匀分布\n */\nvar Pow = /** @class */ (function (_super) {\n __extends(Pow, _super);\n function Pow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'pow';\n return _this;\n }\n /**\n * @override\n */\n Pow.prototype.invert = function (value) {\n var percent = this.getInvertPercent(value);\n var exponent = this.exponent;\n var max = calBase(exponent, this.max);\n var min = calBase(exponent, this.min);\n var tmp = percent * (max - min) + min;\n var factor = tmp >= 0 ? 1 : -1;\n return Math.pow(tmp, exponent) * factor;\n };\n Pow.prototype.initCfg = function () {\n this.tickMethod = 'pow';\n this.exponent = 2;\n this.tickCount = 5;\n this.nice = true;\n };\n // 获取度量计算时,value占的定义域百分比\n Pow.prototype.getScalePercent = function (value) {\n var max = this.max;\n var min = this.min;\n if (max === min) {\n return 0;\n }\n var exponent = this.exponent;\n var percent = (calBase(exponent, value) - calBase(exponent, min)) / (calBase(exponent, max) - calBase(exponent, min));\n return percent;\n };\n return Pow;\n}(Continuous));\nexport default Pow;\n//# sourceMappingURL=pow.js.map","import { __extends } from \"tslib\";\nimport { each, isDate, isNil, isNumber, isString } from '@antv/util';\nimport { timeFormat, toTimeStamp } from '../util/time';\nimport Linear from './linear';\n/**\n * 时间度量\n * @class\n */\nvar Time = /** @class */ (function (_super) {\n __extends(Time, _super);\n function Time() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'time';\n return _this;\n }\n /**\n * @override\n */\n Time.prototype.getText = function (value, index) {\n var numberValue = this.translate(value);\n var formatter = this.formatter;\n return formatter ? formatter(numberValue, index) : timeFormat(numberValue, this.mask);\n };\n /**\n * @override\n */\n Time.prototype.scale = function (value) {\n var v = value;\n if (isString(v) || isDate(v)) {\n v = this.translate(v);\n }\n return _super.prototype.scale.call(this, v);\n };\n /**\n * 将时间转换成数字\n * @override\n */\n Time.prototype.translate = function (v) {\n return toTimeStamp(v);\n };\n Time.prototype.initCfg = function () {\n this.tickMethod = 'time-pretty';\n this.mask = 'YYYY-MM-DD';\n this.tickCount = 7;\n this.nice = false;\n };\n Time.prototype.setDomain = function () {\n var values = this.values;\n // 是否设置了 min, max,而不是直接取 this.min, this.max\n var minConfig = this.getConfig('min');\n var maxConfig = this.getConfig('max');\n // 如果设置了 min,max 则转换成时间戳\n if (!isNil(minConfig) || !isNumber(minConfig)) {\n this.min = this.translate(this.min);\n }\n if (!isNil(maxConfig) || !isNumber(maxConfig)) {\n this.max = this.translate(this.max);\n }\n // 没有设置 min, max 时\n if (values && values.length) {\n // 重新计算最大最小值\n var timeStamps_1 = [];\n var min_1 = Infinity; // 最小值\n var secondMin_1 = min_1; // 次小值\n var max_1 = 0;\n // 使用一个循环,计算min,max,secondMin\n each(values, function (v) {\n var timeStamp = toTimeStamp(v);\n if (isNaN(timeStamp)) {\n throw new TypeError(\"Invalid Time: \" + v + \" in time scale!\");\n }\n if (min_1 > timeStamp) {\n secondMin_1 = min_1;\n min_1 = timeStamp;\n }\n else if (secondMin_1 > timeStamp) {\n secondMin_1 = timeStamp;\n }\n if (max_1 < timeStamp) {\n max_1 = timeStamp;\n }\n timeStamps_1.push(timeStamp);\n });\n // 存在多个值时,设置最小间距\n if (values.length > 1) {\n this.minTickInterval = secondMin_1 - min_1;\n }\n if (isNil(minConfig)) {\n this.min = min_1;\n }\n if (isNil(maxConfig)) {\n this.max = max_1;\n }\n }\n };\n return Time;\n}(Linear));\nexport default Time;\n//# sourceMappingURL=time.js.map","import { __extends } from \"tslib\";\nimport { each, head, last } from '@antv/util';\nimport Continuous from './base';\n/**\n * 分段度量\n */\nvar Quantize = /** @class */ (function (_super) {\n __extends(Quantize, _super);\n function Quantize() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'quantize';\n return _this;\n }\n Quantize.prototype.invert = function (value) {\n var ticks = this.ticks;\n var length = ticks.length;\n var percent = this.getInvertPercent(value);\n var minIndex = Math.floor(percent * (length - 1));\n // 最后一个\n if (minIndex >= length - 1) {\n return last(ticks);\n }\n // 超出左边界, 则取第一个\n if (minIndex < 0) {\n return head(ticks);\n }\n var minTick = ticks[minIndex];\n var nextTick = ticks[minIndex + 1];\n // 比当前值小的 tick 在度量上的占比\n var minIndexPercent = minIndex / (length - 1);\n var maxIndexPercent = (minIndex + 1) / (length - 1);\n return minTick + (percent - minIndexPercent) / (maxIndexPercent - minIndexPercent) * (nextTick - minTick);\n };\n Quantize.prototype.initCfg = function () {\n this.tickMethod = 'r-pretty';\n this.tickCount = 5;\n this.nice = true;\n };\n Quantize.prototype.calculateTicks = function () {\n var ticks = _super.prototype.calculateTicks.call(this);\n if (!this.nice) { // 如果 nice = false ,补充 min, max\n if (last(ticks) !== this.max) {\n ticks.push(this.max);\n }\n if (head(ticks) !== this.min) {\n ticks.unshift(this.min);\n }\n }\n return ticks;\n };\n // 计算当前值在刻度中的占比\n Quantize.prototype.getScalePercent = function (value) {\n var ticks = this.ticks;\n // 超出左边界\n if (value < head(ticks)) {\n return 0;\n }\n // 超出右边界\n if (value > last(ticks)) {\n return 1;\n }\n var minIndex = 0;\n each(ticks, function (tick, index) {\n if (value >= tick) {\n minIndex = index;\n }\n else {\n return false;\n }\n });\n return minIndex / (ticks.length - 1);\n };\n return Quantize;\n}(Continuous));\nexport default Quantize;\n//# sourceMappingURL=quantize.js.map","import { __extends } from \"tslib\";\nimport Quantize from './quantize';\nvar Quantile = /** @class */ (function (_super) {\n __extends(Quantile, _super);\n function Quantile() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'quantile';\n return _this;\n }\n Quantile.prototype.initCfg = function () {\n this.tickMethod = 'quantile';\n this.tickCount = 5;\n this.nice = true;\n };\n return Quantile;\n}(Quantize));\nexport default Quantile;\n//# sourceMappingURL=quantile.js.map","import Scale from './base';\nvar map = {};\nfunction getClass(key) {\n return map[key];\n}\nfunction registerClass(key, cls) {\n if (getClass(key)) {\n throw new Error(\"type '\" + key + \"' existed.\");\n }\n map[key] = cls;\n}\nexport { Scale, getClass as getScale, registerClass as registerScale };\n//# sourceMappingURL=factory.js.map","import { __extends } from \"tslib\";\nimport { isNumber } from '@antv/util';\nimport Base from '../base';\n/**\n * identity scale原则上是定义域和值域一致,scale/invert方法也是一致的\n * 参考R的实现:https://github.com/r-lib/scales/blob/master/R/pal-identity.r\n * 参考d3的实现(做了下转型):https://github.com/d3/d3-scale/blob/master/src/identity.js\n */\nvar Identity = /** @class */ (function (_super) {\n __extends(Identity, _super);\n function Identity() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'identity';\n _this.isIdentity = true;\n return _this;\n }\n Identity.prototype.calculateTicks = function () {\n return this.values;\n };\n Identity.prototype.scale = function (value) {\n // 如果传入的值不等于 identity 的值,则直接返回,用于一维图时的 dodge\n if (this.values[0] !== value && isNumber(value)) {\n return value;\n }\n return this.range[0];\n };\n Identity.prototype.invert = function (value) {\n var range = this.range;\n if (value < range[0] || value > range[1]) {\n return NaN;\n }\n return this.values[0];\n };\n return Identity;\n}(Base));\nexport default Identity;\n//# sourceMappingURL=index.js.map","import { filter, isNil, isNumber, last } from '@antv/util';\n/**\n * 计算分类 ticks\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculateCatTicks(cfg) {\n var values = cfg.values, tickInterval = cfg.tickInterval, tickCount = cfg.tickCount, showLast = cfg.showLast;\n if (isNumber(tickInterval)) {\n var ticks_1 = filter(values, function (__, i) { return i % tickInterval === 0; });\n var lastValue = last(values);\n if (showLast && last(ticks_1) !== lastValue) {\n ticks_1.push(lastValue);\n }\n return ticks_1;\n }\n var len = values.length;\n var min = cfg.min, max = cfg.max;\n if (isNil(min)) {\n min = 0;\n }\n if (isNil(max)) {\n max = values.length - 1;\n }\n if (!isNumber(tickCount) || tickCount >= len)\n return values.slice(min, max + 1);\n if (tickCount <= 0 || max <= 0)\n return [];\n var interval = tickCount === 1 ? len : Math.floor(len / (tickCount - 1));\n var ticks = [];\n var idx = min;\n for (var i = 0; i < tickCount; i++) {\n if (idx >= max)\n break;\n idx = Math.min(min + i * interval, max);\n if (i === tickCount - 1 && showLast)\n ticks.push(values[max]);\n else\n ticks.push(values[idx]);\n }\n return ticks;\n}\n//# sourceMappingURL=cat.js.map","export default function d3Linear(cfg) {\n var min = cfg.min, max = cfg.max, nice = cfg.nice, tickCount = cfg.tickCount;\n var linear = new D3Linear();\n linear.domain([min, max]);\n if (nice) {\n linear.nice(tickCount);\n }\n return linear.ticks(tickCount);\n}\nvar DEFAULT_COUNT = 5;\nvar e10 = Math.sqrt(50);\nvar e5 = Math.sqrt(10);\nvar e2 = Math.sqrt(2);\n// https://github.com/d3/d3-scale\nvar D3Linear = /** @class */ (function () {\n function D3Linear() {\n this._domain = [0, 1];\n }\n D3Linear.prototype.domain = function (domain) {\n if (domain) {\n this._domain = Array.from(domain, Number);\n return this;\n }\n return this._domain.slice();\n };\n D3Linear.prototype.nice = function (count) {\n var _a, _b;\n if (count === void 0) { count = DEFAULT_COUNT; }\n var d = this._domain.slice();\n var i0 = 0;\n var i1 = this._domain.length - 1;\n var start = this._domain[i0];\n var stop = this._domain[i1];\n var step;\n if (stop < start) {\n _a = [stop, start], start = _a[0], stop = _a[1];\n _b = [i1, i0], i0 = _b[0], i1 = _b[1];\n }\n step = tickIncrement(start, stop, count);\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n }\n else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n this.domain(d);\n }\n else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n this.domain(d);\n }\n return this;\n };\n D3Linear.prototype.ticks = function (count) {\n if (count === void 0) { count = DEFAULT_COUNT; }\n return d3ArrayTicks(this._domain[0], this._domain[this._domain.length - 1], count || DEFAULT_COUNT);\n };\n return D3Linear;\n}());\nexport { D3Linear };\nfunction d3ArrayTicks(start, stop, count) {\n var reverse;\n var i = -1;\n var n;\n var ticks;\n var step;\n (stop = +stop), (start = +start), (count = +count);\n if (start === stop && count > 0) {\n return [start];\n }\n // tslint:disable-next-line\n if ((reverse = stop < start)) {\n (n = start), (start = stop), (stop = n);\n }\n // tslint:disable-next-line\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) {\n return [];\n }\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array((n = Math.ceil(stop - start + 1)));\n while (++i < n) {\n ticks[i] = (start + i) * step;\n }\n }\n else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array((n = Math.ceil(start - stop + 1)));\n while (++i < n) {\n ticks[i] = (start - i) / step;\n }\n }\n if (reverse) {\n ticks.reverse();\n }\n return ticks;\n}\nfunction tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count);\n var power = Math.floor(Math.log(step) / Math.LN10);\n var error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n//# sourceMappingURL=d3-linear.js.map","import { fixedBase } from '@antv/util';\nfunction snapMultiple(v, base, snapType) {\n var div;\n if (snapType === 'ceil') {\n div = Math.ceil(v / base);\n }\n else if (snapType === 'floor') {\n div = Math.floor(v / base);\n }\n else {\n div = Math.round(v / base);\n }\n return div * base;\n}\nexport default function intervalTicks(min, max, interval) {\n // 变成 interval 的倍数\n var minTick = snapMultiple(min, interval, 'floor');\n var maxTick = snapMultiple(max, interval, 'ceil');\n // 统一小数位数\n minTick = fixedBase(minTick, interval);\n maxTick = fixedBase(maxTick, interval);\n var ticks = [];\n // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Errors/Invalid_array_length\n var availableInterval = Math.max((maxTick - minTick) / (Math.pow(2, 12) - 1), interval);\n for (var i = minTick; i <= maxTick; i = i + availableInterval) {\n var tickValue = fixedBase(i, availableInterval); // 防止浮点数加法出现问题\n ticks.push(tickValue);\n }\n return {\n min: minTick,\n max: maxTick,\n ticks: ticks\n };\n}\n//# sourceMappingURL=interval.js.map","import { isNil } from '@antv/util';\n/**\n * 按照给定的 minLimit/maxLimit/tickCount 均匀计算出刻度 ticks\n *\n * @param cfg Scale 配置项\n * @return ticks\n */\nexport default function strictLimit(cfg, defaultMin, defaultMax) {\n var _a;\n var minLimit = cfg.minLimit, maxLimit = cfg.maxLimit, min = cfg.min, max = cfg.max, _b = cfg.tickCount, tickCount = _b === void 0 ? 5 : _b;\n var tickMin = isNil(minLimit) ? (isNil(defaultMin) ? min : defaultMin) : minLimit;\n var tickMax = isNil(maxLimit) ? (isNil(defaultMax) ? max : defaultMax) : maxLimit;\n if (tickMin > tickMax) {\n _a = [tickMin, tickMax], tickMax = _a[0], tickMin = _a[1];\n }\n if (tickCount <= 2) {\n return [tickMin, tickMax];\n }\n var step = (tickMax - tickMin) / (tickCount - 1);\n var ticks = [];\n for (var i = 0; i < tickCount; i++) {\n ticks.push(tickMin + step * i);\n }\n return ticks;\n}\n//# sourceMappingURL=strict-limit.js.map","import { head, isNil, last } from '@antv/util';\nimport d3Linear from '../util/d3-linear';\nimport interval from '../util/interval';\nimport strictLimit from '../util/strict-limit';\nexport default function d3LinearTickMethod(cfg) {\n var min = cfg.min, max = cfg.max, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = d3Linear(cfg);\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=d3-linear.js.map","// 为了解决 js 运算的精度问题\nexport function prettyNumber(n) {\n return Math.abs(n) < 1e-15 ? n : parseFloat(n.toFixed(15));\n}\n//# sourceMappingURL=pretty-number.js.map","import { head, indexOf, size, last } from '@antv/util';\nimport { prettyNumber } from './pretty-number';\nexport var DEFAULT_Q = [1, 5, 2, 2.5, 4, 3];\nexport var ALL_Q = [1, 5, 2, 2.5, 4, 3, 1.5, 7, 6, 8, 9];\nvar eps = Number.EPSILON * 100;\nfunction mod(n, m) {\n return ((n % m) + m) % m;\n}\nfunction round(n) {\n return Math.round(n * 1e12) / 1e12;\n}\nfunction simplicity(q, Q, j, lmin, lmax, lstep) {\n var n = size(Q);\n var i = indexOf(Q, q);\n var v = 0;\n var m = mod(lmin, lstep);\n if ((m < eps || lstep - m < eps) && lmin <= 0 && lmax >= 0) {\n v = 1;\n }\n return 1 - i / (n - 1) - j + v;\n}\nfunction simplicityMax(q, Q, j) {\n var n = size(Q);\n var i = indexOf(Q, q);\n var v = 1;\n return 1 - i / (n - 1) - j + v;\n}\nfunction density(k, m, dMin, dMax, lMin, lMax) {\n var r = (k - 1) / (lMax - lMin);\n var rt = (m - 1) / (Math.max(lMax, dMax) - Math.min(dMin, lMin));\n return 2 - Math.max(r / rt, rt / r);\n}\nfunction densityMax(k, m) {\n if (k >= m) {\n return 2 - (k - 1) / (m - 1);\n }\n return 1;\n}\nfunction coverage(dMin, dMax, lMin, lMax) {\n var range = dMax - dMin;\n return 1 - (0.5 * (Math.pow((dMax - lMax), 2) + Math.pow((dMin - lMin), 2))) / Math.pow((0.1 * range), 2);\n}\nfunction coverageMax(dMin, dMax, span) {\n var range = dMax - dMin;\n if (span > range) {\n var half = (span - range) / 2;\n return 1 - Math.pow(half, 2) / Math.pow((0.1 * range), 2);\n }\n return 1;\n}\nfunction legibility() {\n return 1;\n}\n/**\n * An Extension of Wilkinson's Algorithm for Position Tick Labels on Axes\n * https://www.yuque.com/preview/yuque/0/2019/pdf/185317/1546999150858-45c3b9c2-4e86-4223-bf1a-8a732e8195ed.pdf\n * @param dMin 最小值\n * @param dMax 最大值\n * @param m tick个数\n * @param onlyLoose 是否允许扩展min、max,不绝对强制,例如[3, 97]\n * @param Q nice numbers集合\n * @param w 四个优化组件的权重\n */\nexport default function extended(dMin, dMax, n, onlyLoose, Q, w) {\n if (n === void 0) { n = 5; }\n if (onlyLoose === void 0) { onlyLoose = true; }\n if (Q === void 0) { Q = DEFAULT_Q; }\n if (w === void 0) { w = [0.25, 0.2, 0.5, 0.05]; }\n // 处理小于 0 和小数的 tickCount\n var m = n < 0 ? 0 : Math.round(n);\n // nan 也会导致异常\n if (Number.isNaN(dMin) || Number.isNaN(dMax) || typeof dMin !== 'number' || typeof dMax !== 'number' || !m) {\n return {\n min: 0,\n max: 0,\n ticks: [],\n };\n }\n // js 极大值极小值问题,差值小于 1e-15 会导致计算出错\n if (dMax - dMin < 1e-15 || m === 1) {\n return {\n min: dMin,\n max: dMax,\n ticks: [dMin],\n };\n }\n // js 超大值问题\n if (dMax - dMin > 1e148) {\n var count = n || 5;\n var step_1 = (dMax - dMin) / count;\n return {\n min: dMin,\n max: dMax,\n ticks: Array(count).fill(null).map(function (_, idx) {\n return prettyNumber(dMin + step_1 * idx);\n }),\n };\n }\n var best = {\n score: -2,\n lmin: 0,\n lmax: 0,\n lstep: 0,\n };\n var j = 1;\n while (j < Infinity) {\n for (var i = 0; i < Q.length; i += 1) {\n var q = Q[i];\n var sm = simplicityMax(q, Q, j);\n if (w[0] * sm + w[1] + w[2] + w[3] < best.score) {\n j = Infinity;\n break;\n }\n var k = 2;\n while (k < Infinity) {\n var dm = densityMax(k, m);\n if (w[0] * sm + w[1] + w[2] * dm + w[3] < best.score) {\n break;\n }\n var delta = (dMax - dMin) / (k + 1) / j / q;\n var z = Math.ceil(Math.log10(delta));\n while (z < Infinity) {\n var step = j * q * Math.pow(10, z);\n var cm = coverageMax(dMin, dMax, step * (k - 1));\n if (w[0] * sm + w[1] * cm + w[2] * dm + w[3] < best.score) {\n break;\n }\n var minStart = Math.floor(dMax / step) * j - (k - 1) * j;\n var maxStart = Math.ceil(dMin / step) * j;\n if (minStart <= maxStart) {\n var count = maxStart - minStart;\n for (var i_1 = 0; i_1 <= count; i_1 += 1) {\n var start = minStart + i_1;\n var lMin = start * (step / j);\n var lMax = lMin + step * (k - 1);\n var lStep = step;\n var s = simplicity(q, Q, j, lMin, lMax, lStep);\n var c = coverage(dMin, dMax, lMin, lMax);\n var g = density(k, m, dMin, dMax, lMin, lMax);\n var l = legibility();\n var score = w[0] * s + w[1] * c + w[2] * g + w[3] * l;\n if (score > best.score && (!onlyLoose || (lMin <= dMin && lMax >= dMax))) {\n best.lmin = lMin;\n best.lmax = lMax;\n best.lstep = lStep;\n best.score = score;\n }\n }\n }\n z += 1;\n }\n k += 1;\n }\n }\n j += 1;\n }\n // 处理精度问题,保证这三个数没有精度问题\n var lmax = prettyNumber(best.lmax);\n var lmin = prettyNumber(best.lmin);\n var lstep = prettyNumber(best.lstep);\n // 加 round 是为处理 extended(0.94, 1, 5)\n // 保证生成的 tickCount 没有精度问题\n var tickCount = Math.floor(round((lmax - lmin) / lstep)) + 1;\n var ticks = new Array(tickCount);\n // 少用乘法:防止出现 -1.2 + 1.2 * 3 = 2.3999999999999995 的情况\n ticks[0] = prettyNumber(lmin);\n for (var i = 1; i < tickCount; i++) {\n ticks[i] = prettyNumber(ticks[i - 1] + lstep);\n }\n return {\n min: Math.min(dMin, head(ticks)),\n max: Math.max(dMax, last(ticks)),\n ticks: ticks,\n };\n}\n//# sourceMappingURL=extended.js.map","import { head, isNil, last } from '@antv/util';\nimport extended from '../util/extended';\nimport interval from '../util/interval';\nimport strictLimit from '../util/strict-limit';\n/**\n * 计算线性的 ticks,使用 wilkinson extended 方法\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function linear(cfg) {\n var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, nice = cfg.nice, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = extended(min, max, tickCount, nice).ticks;\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=linear.js.map","import { getLogPositiveMin, log } from '../util/math';\n/**\n * 计算 log 的 ticks,考虑 min = 0 的场景\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculateLogTicks(cfg) {\n var base = cfg.base, tickCount = cfg.tickCount, min = cfg.min, max = cfg.max, values = cfg.values;\n var minTick;\n var maxTick = log(base, max);\n if (min > 0) {\n minTick = Math.floor(log(base, min));\n }\n else {\n var positiveMin = getLogPositiveMin(values, base, max);\n minTick = Math.floor(log(base, positiveMin));\n }\n var count = maxTick - minTick;\n var avg = Math.ceil(count / tickCount);\n var ticks = [];\n for (var i = minTick; i < maxTick + avg; i = i + avg) {\n ticks.push(Math.pow(base, i));\n }\n if (min <= 0) {\n // 最小值 <= 0 时显示 0\n ticks.unshift(0);\n }\n return ticks;\n}\n//# sourceMappingURL=log.js.map","import { prettyNumber } from './pretty-number';\nexport default function pretty(min, max, m) {\n if (m === void 0) { m = 5; }\n if (min === max) {\n return {\n max: max,\n min: min,\n ticks: [min],\n };\n }\n var n = m < 0 ? 0 : Math.round(m);\n if (n === 0)\n return { max: max, min: min, ticks: [] };\n /*\n R pretty:\n https://svn.r-project.org/R/trunk/src/appl/pretty.c\n https://www.rdocumentation.org/packages/base/versions/3.5.2/topics/pretty\n */\n var h = 1.5; // high.u.bias\n var h5 = 0.5 + 1.5 * h; // u5.bias\n // 反正我也不会调参,跳过所有判断步骤\n var d = max - min;\n var c = d / n;\n // 当d非常小的时候触发,但似乎没什么用\n // const min_n = Math.floor(n / 3);\n // const shrink_sml = Math.pow(2, 5);\n // if (Math.log10(d) < -2) {\n // c = (_.max([ Math.abs(max), Math.abs(min) ]) * shrink_sml) / min_n;\n // }\n var base = Math.pow(10, Math.floor(Math.log10(c)));\n var unit = base;\n if (2 * base - c < h * (c - unit)) {\n unit = 2 * base;\n if (5 * base - c < h5 * (c - unit)) {\n unit = 5 * base;\n if (10 * base - c < h * (c - unit)) {\n unit = 10 * base;\n }\n }\n }\n var nu = Math.ceil(max / unit);\n var ns = Math.floor(min / unit);\n var hi = Math.max(nu * unit, max);\n var lo = Math.min(ns * unit, min);\n var size = Math.floor((hi - lo) / unit) + 1;\n var ticks = new Array(size);\n for (var i = 0; i < size; i++) {\n ticks[i] = prettyNumber(lo + i * unit);\n }\n return {\n min: lo,\n max: hi,\n ticks: ticks,\n };\n}\n//# sourceMappingURL=pretty.js.map","import { calBase } from '../util/math';\nimport pretty from '../util/pretty';\n/**\n * 计算 Pow 的 ticks\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function calculatePowTicks(cfg) {\n var exponent = cfg.exponent, tickCount = cfg.tickCount;\n var max = Math.ceil(calBase(exponent, cfg.max));\n var min = Math.floor(calBase(exponent, cfg.min));\n var ticks = pretty(min, max, tickCount).ticks;\n return ticks.map(function (tick) {\n var factor = tick >= 0 ? 1 : -1;\n return Math.pow(tick, exponent) * factor;\n });\n}\n//# sourceMappingURL=pow.js.map","/**\n * 计算几分位 https://github.com/simple-statistics/simple-statistics/blob/master/src/quantile_sorted.js\n * @param x 数组\n * @param p 百分比\n */\nfunction quantileSorted(x, p) {\n var idx = x.length * p;\n /*if (x.length === 0) { // 当前场景这些条件不可能命中\n throw new Error('quantile requires at least one value.');\n } else if (p < 0 || p > 1) {\n throw new Error('quantiles must be between 0 and 1');\n } else */\n if (p === 1) {\n // If p is 1, directly return the last element\n return x[x.length - 1];\n }\n else if (p === 0) {\n // If p is 0, directly return the first element\n return x[0];\n }\n else if (idx % 1 !== 0) {\n // If p is not integer, return the next element in array\n return x[Math.ceil(idx) - 1];\n }\n else if (x.length % 2 === 0) {\n // If the list has even-length, we'll take the average of this number\n // and the next value, if there is one\n return (x[idx - 1] + x[idx]) / 2;\n }\n else {\n // Finally, in the simple case of an integer value\n // with an odd-length list, return the x value at the index.\n return x[idx];\n }\n}\nexport default function calculateTicks(cfg) {\n var tickCount = cfg.tickCount, values = cfg.values;\n if (!values || !values.length) {\n return [];\n }\n var sorted = values.slice().sort(function (a, b) {\n return a - b;\n });\n var ticks = [];\n for (var i = 0; i < tickCount; i++) {\n var p = i / (tickCount - 1);\n ticks.push(quantileSorted(sorted, p));\n }\n return ticks;\n}\n//# sourceMappingURL=quantile.js.map","import { head, isNil, last } from '@antv/util';\nimport interval from '../util/interval';\nimport pretty from '../util/pretty';\nimport strictLimit from '../util/strict-limit';\n/**\n * 计算线性的 ticks,使用 R's pretty 方法\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function linearPretty(cfg) {\n var min = cfg.min, max = cfg.max, tickCount = cfg.tickCount, tickInterval = cfg.tickInterval, minLimit = cfg.minLimit, maxLimit = cfg.maxLimit;\n var ticks = pretty(min, max, tickCount).ticks;\n if (!isNil(minLimit) || !isNil(maxLimit)) {\n return strictLimit(cfg, head(ticks), last(ticks));\n }\n if (tickInterval) {\n return interval(min, max, tickInterval).ticks;\n }\n return ticks;\n}\n//# sourceMappingURL=r-prettry.js.map","import { getTickInterval } from '../util/time';\nexport default function calculateTimeTicks(cfg) {\n var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval;\n var tickInterval = cfg.tickInterval;\n var tickCount = cfg.tickCount;\n // 指定 tickInterval 后 tickCount 不生效,需要重新计算\n if (tickInterval) {\n tickCount = Math.ceil((max - min) / tickInterval);\n }\n else {\n tickInterval = getTickInterval(min, max, tickCount)[1];\n var count = (max - min) / tickInterval;\n var ratio = count / tickCount;\n if (ratio > 1) {\n tickInterval = tickInterval * Math.ceil(ratio);\n }\n // 如果设置了最小间距,则使用最小间距\n if (minTickInterval && tickInterval < minTickInterval) {\n tickInterval = minTickInterval;\n }\n }\n tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);\n var ticks = [];\n for (var i = min; i < max + tickInterval; i += tickInterval) {\n ticks.push(i);\n }\n return ticks;\n}\n//# sourceMappingURL=time.js.map","import { __assign } from \"tslib\";\nimport catTicks from './cat';\n/**\n * 计算时间分类的 ticks, 保头,保尾\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function timeCat(cfg) {\n // 默认保留最后一条\n var ticks = catTicks(__assign({ showLast: true }, cfg));\n return ticks;\n}\n//# sourceMappingURL=time-cat.js.map","import { DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } from '../util/time';\nfunction getYear(date) {\n return new Date(date).getFullYear();\n}\nfunction createYear(year) {\n return new Date(year, 0, 1).getTime();\n}\nfunction getMonth(date) {\n return new Date(date).getMonth();\n}\nfunction diffMonth(min, max) {\n var minYear = getYear(min);\n var maxYear = getYear(max);\n var minMonth = getMonth(min);\n var maxMonth = getMonth(max);\n return (maxYear - minYear) * 12 + ((maxMonth - minMonth) % 12);\n}\nfunction creatMonth(year, month) {\n return new Date(year, month, 1).getTime();\n}\nfunction diffDay(min, max) {\n return Math.ceil((max - min) / DAY);\n}\nfunction diffHour(min, max) {\n return Math.ceil((max - min) / HOUR);\n}\nfunction diffMinus(min, max) {\n return Math.ceil((max - min) / (60 * 1000));\n}\n/**\n * 计算 time 的 ticks,对 month, year 进行 pretty 处理\n * @param cfg 度量的配置项\n * @returns 计算后的 ticks\n */\nexport default function timePretty(cfg) {\n var min = cfg.min, max = cfg.max, minTickInterval = cfg.minTickInterval, tickCount = cfg.tickCount;\n var tickInterval = cfg.tickInterval;\n var ticks = [];\n // 指定 tickInterval 后 tickCount 不生效,需要重新计算\n if (!tickInterval) {\n tickInterval = (max - min) / tickCount;\n // 如果设置了最小间距,则使用最小间距\n if (minTickInterval && tickInterval < minTickInterval) {\n tickInterval = minTickInterval;\n }\n }\n tickInterval = Math.max(Math.floor((max - min) / (Math.pow(2, 12) - 1)), tickInterval);\n var minYear = getYear(min);\n // 如果间距大于 1 年,则将开始日期从整年开始\n if (tickInterval > YEAR) {\n var maxYear = getYear(max);\n var yearInterval = Math.ceil(tickInterval / YEAR);\n for (var i = minYear; i <= maxYear + yearInterval; i = i + yearInterval) {\n ticks.push(createYear(i));\n }\n }\n else if (tickInterval > MONTH) {\n // 大于月时\n var monthInterval = Math.ceil(tickInterval / MONTH);\n var mmMoth = getMonth(min);\n var dMonths = diffMonth(min, max);\n for (var i = 0; i <= dMonths + monthInterval; i = i + monthInterval) {\n ticks.push(creatMonth(minYear, i + mmMoth));\n }\n }\n else if (tickInterval > DAY) {\n // 大于天\n var date = new Date(min);\n var year = date.getFullYear();\n var month = date.getMonth();\n var mday = date.getDate();\n var day = Math.ceil(tickInterval / DAY);\n var ddays = diffDay(min, max);\n for (var i = 0; i < ddays + day; i = i + day) {\n ticks.push(new Date(year, month, mday + i).getTime());\n }\n }\n else if (tickInterval > HOUR) {\n // 大于小时\n var date = new Date(min);\n var year = date.getFullYear();\n var month = date.getMonth();\n var day = date.getDate();\n var hour = date.getHours();\n var hours = Math.ceil(tickInterval / HOUR);\n var dHours = diffHour(min, max);\n for (var i = 0; i <= dHours + hours; i = i + hours) {\n ticks.push(new Date(year, month, day, hour + i).getTime());\n }\n }\n else if (tickInterval > MINUTE) {\n // 大于分钟\n var dMinus = diffMinus(min, max);\n var minutes = Math.ceil(tickInterval / MINUTE);\n for (var i = 0; i <= dMinus + minutes; i = i + minutes) {\n ticks.push(min + i * MINUTE);\n }\n }\n else {\n // 小于分钟\n var interval = tickInterval;\n if (interval < SECOND) {\n interval = SECOND;\n }\n var minSecond = Math.floor(min / SECOND) * SECOND;\n var dSeconds = Math.ceil((max - min) / SECOND);\n var seconds = Math.ceil(interval / SECOND);\n for (var i = 0; i < dSeconds + seconds; i = i + seconds) {\n ticks.push(minSecond + i * SECOND);\n }\n }\n // 最好是能从算法能解决这个问题,但是如果指定了 tickInterval,计算 ticks,也只能这么算,所以\n // 打印警告提示\n if (ticks.length >= 512) {\n console.warn(\"Notice: current ticks length(\" + ticks.length + \") >= 512, may cause performance issues, even out of memory. Because of the configure \\\"tickInterval\\\"(in milliseconds, current is \" + tickInterval + \") is too small, increase the value to solve the problem!\");\n }\n return ticks;\n}\n//# sourceMappingURL=time-pretty.js.map","import cat from './cat';\nimport d3Linear from './d3-linear';\nimport linear from './linear';\nimport log from './log';\nimport pow from './pow';\nimport quantile from './quantile';\nimport rPretty from './r-prettry';\nimport { getTickMethod, registerTickMethod } from './register';\nimport time from './time';\nimport timeCat from './time-cat';\nimport timePretty from './time-pretty';\nregisterTickMethod('cat', cat);\nregisterTickMethod('time-cat', timeCat);\nregisterTickMethod('wilkinson-extended', linear);\nregisterTickMethod('r-pretty', rPretty);\nregisterTickMethod('time', time);\nregisterTickMethod('time-pretty', timePretty);\nregisterTickMethod('log', log);\nregisterTickMethod('pow', pow);\nregisterTickMethod('quantile', quantile);\nregisterTickMethod('d3-linear', d3Linear);\nexport { getTickMethod, registerTickMethod };\n//# sourceMappingURL=index.js.map","import Scale from './base';\nimport Category from './category/base';\nimport TimeCat from './category/time';\nimport Linear from './continuous/linear';\nimport Log from './continuous/log';\nimport Pow from './continuous/pow';\nimport Time from './continuous/time';\nimport Quantize from './continuous/quantize';\nimport Quantile from './continuous/quantile';\nimport { getScale, registerScale } from './factory';\nimport Identity from './identity/index';\nimport { getTickMethod, registerTickMethod } from './tick-method/index';\nregisterScale('cat', Category);\nregisterScale('category', Category);\nregisterScale('identity', Identity);\nregisterScale('linear', Linear);\nregisterScale('log', Log);\nregisterScale('pow', Pow);\nregisterScale('time', Time);\nregisterScale('timeCat', TimeCat);\nregisterScale('quantize', Quantize);\nregisterScale('quantile', Quantile);\nexport { Category, Identity, Linear, Log, Pow, Time, TimeCat, Quantile, Quantize, Scale, getScale, registerScale, getTickMethod, registerTickMethod, };\n//# sourceMappingURL=index.js.map","var __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport * as pathUtil from '@antv/path-util';\nimport { Category, Linear } from '@antv/scale';\nimport { map, each, isEqual, head, isArray } from '@antv/util';\n/**\n * 点数组转 path\n * @param points\n */\nfunction pointsToPath(points) {\n return map(points, function (p, idx) {\n var command = idx === 0 ? 'M' : 'L';\n var x = p[0],\n y = p[1];\n return [command, x, y];\n });\n}\n/**\n * 将点连接成路径 path\n * @param points\n */\nexport function getLinePath(points) {\n return pointsToPath(points);\n}\n/**\n * 将点连成平滑的曲线\n * @param points\n */\nexport function getSmoothLinePath(points) {\n if (points.length <= 2) {\n // 两点以内直接绘制成路径\n return getLinePath(points);\n }\n var data = [];\n each(points, function (p) {\n // 当前点和上一个点一样的时候,忽略掉\n if (!isEqual(p, data.slice(data.length - 2))) {\n data.push(p[0], p[1]);\n }\n });\n var path = pathUtil.catmullRom2Bezier(data, false);\n var _a = head(points),\n x = _a[0],\n y = _a[1];\n path.unshift(['M', x, y]);\n return path;\n}\n/**\n * 将数据转成 path,利用 scale 的归一化能力\n * @param data\n * @param width\n * @param height\n * @param smooth\n */\nexport function dataToPath(data, width, height, smooth) {\n if (smooth === void 0) {\n smooth = true;\n }\n // 利用 scale 来获取 y 上的映射\n var y = new Linear({\n values: data\n });\n var x = new Category({\n values: map(data, function (v, idx) {\n return idx;\n })\n });\n var points = map(data, function (v, idx) {\n return [x.scale(idx) * width, height - y.scale(v) * height];\n });\n return smooth ? getSmoothLinePath(points) : getLinePath(points);\n}\nexport function dataToRectPath(data, width, height, barWidth) {\n if (barWidth === void 0) {\n barWidth = 5;\n }\n // 利用 scale 来获取 y 上的映射\n var y = new Linear({\n values: data\n });\n var x = new Category({\n values: map(data, function (v, idx) {\n return idx;\n })\n });\n var points = map(data, function (v, idx) {\n return [x.scale(idx) * width, height - y.scale(v) * height];\n });\n var rectPoints = [];\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n var param = {\n x: point[0],\n y: point[1],\n y0: height,\n size: barWidth\n };\n var rectPoint = getRectPoints(param);\n rectPoints.push.apply(rectPoints, rectPoint);\n }\n return getRectPath(rectPoints);\n}\n/**\n * 获得 area 面积的横向连接线的 px 位置\n * @param data\n * @param width\n * @param height\n */\nexport function getAreaLineY(data, height) {\n var y = new Linear({\n values: data\n });\n var lineY = Math.max(0, y.min);\n return height - y.scale(lineY) * height;\n}\n/**\n * 线 path 转 area path\n * @param path\n * @param width\n * @param height\n */\nexport function linePathToAreaPath(path, width, height, data) {\n var areaPath = __spreadArray([], path, true);\n var lineYPx = getAreaLineY(data, height);\n areaPath.push(['L', width, lineYPx]);\n areaPath.push(['L', 0, lineYPx]);\n areaPath.push(['Z']);\n return areaPath;\n}\n/**\n * @ignore\n * 根据数据点生成矩形的四个关键点\n * @param pointInfo 数据点信息\n * @returns rect points 返回矩形四个顶点信息\n */\nexport function getRectPoints(pointInfo) {\n var x = pointInfo.x,\n y = pointInfo.y,\n y0 = pointInfo.y0,\n size = pointInfo.size;\n // 有 4 种情况,\n // 1. x, y 都不是数组\n // 2. y是数组,x不是\n // 3. x是数组,y不是\n // 4. x, y 都是数组\n var yMin;\n var yMax;\n if (isArray(y)) {\n yMin = y[0], yMax = y[1];\n } else {\n yMin = y0;\n yMax = y;\n }\n var xMin;\n var xMax;\n if (isArray(x)) {\n xMin = x[0], xMax = x[1];\n } else {\n xMin = x - size / 2;\n xMax = x + size / 2;\n }\n var points = [{\n x: xMin,\n y: yMin\n }, {\n x: xMin,\n y: yMax\n }];\n // 矩形的四个关键点,结构如下(左下角顺时针连接)\n // 1 ---- 2\n // | |\n // 0 ---- 3\n points.push({\n x: xMax,\n y: yMax\n }, {\n x: xMax,\n y: yMin\n });\n return points;\n}\n/**\n * @ignore\n * 根据矩形关键点绘制 path\n * @param points 关键点数组\n * @param isClosed path 是否需要闭合\n * @returns 返回矩形的 path\n */\nexport function getRectPath(points, isClosed) {\n if (isClosed === void 0) {\n isClosed = true;\n }\n var path = [];\n var firstPoint = points[0];\n path.push(['M', firstPoint.x, firstPoint.y]);\n for (var i = 1, len = points.length; i < len; i++) {\n path.push(['L', points[i].x, points[i].y]);\n }\n // 对于 shape=\"line\" path 不应该闭合,否则会造成 lineCap 绘图属性失效\n if (isClosed) {\n path.push(['L', firstPoint.x, firstPoint.y]); // 需要闭合\n path.push(['z']);\n }\n return path;\n}","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { dataToPath, linePathToAreaPath, dataToRectPath } from './path';\nexport var LINE_STYLE = {\n stroke: '#C5C5C5',\n strokeOpacity: 0.85\n};\nexport var AREA_STYLE = {\n fill: '#CACED4',\n opacity: 0.85\n};\n/**\n * 缩略趋势图\n */\nvar Trend = /** @class */function () {\n function Trend(cfg) {\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 200 : _c,\n _d = cfg.height,\n height = _d === void 0 ? 26 : _d,\n _e = cfg.smooth,\n smooth = _e === void 0 ? true : _e,\n _f = cfg.isArea,\n isArea = _f === void 0 ? false : _f,\n _g = cfg.data,\n data = _g === void 0 ? [] : _g,\n lineStyle = cfg.lineStyle,\n areaStyle = cfg.areaStyle,\n group = cfg.group,\n _h = cfg.interval,\n interval = _h === void 0 ? null : _h;\n this.group = group;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.data = data;\n this.smooth = smooth;\n this.isArea = isArea;\n this.lineStyle = Object.assign({}, LINE_STYLE, lineStyle);\n this.areaStyle = Object.assign({}, AREA_STYLE, areaStyle);\n this.intervalConfig = interval;\n this.renderLine();\n }\n /**\n * 构造\n * @private\n */\n Trend.prototype.renderLine = function () {\n var _a = this,\n x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height,\n barWidth = _a.barWidth,\n data = _a.data,\n smooth = _a.smooth,\n isArea = _a.isArea,\n lineStyle = _a.lineStyle,\n areaStyle = _a.areaStyle;\n var trendGroup = this.group.addGroup({\n name: 'trend-group'\n });\n if (data) {\n var path = dataToPath(data, width, height, smooth);\n // 线\n trendGroup.addShape('path', {\n attrs: __assign({\n path: path\n }, lineStyle),\n name: 'trend-line'\n });\n // 在 line 的基础上,绘制面积图\n if (isArea) {\n var areaPath = linePathToAreaPath(path, width, height, data);\n trendGroup.addShape('path', {\n attrs: __assign({\n path: areaPath\n }, areaStyle),\n name: 'trend-area'\n });\n }\n }\n // 绘制柱状图📊\n if (this.intervalConfig) {\n trendGroup.addShape('path', {\n attrs: __assign({\n path: dataToRectPath(this.intervalConfig.data, width, height, this.intervalConfig.style.barWidth)\n }, this.intervalConfig.style),\n name: 'trend-interval'\n });\n }\n // 统一移动到对应的位置\n trendGroup.move(x, y);\n };\n Trend.prototype.destory = function () {\n this.group.destroy();\n };\n return Trend;\n}();\nexport default Trend;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { isNumber } from '@antv/util';\nvar DEFAULT_STYLE = {\n fill: '#1890ff',\n stroke: '#1890ff',\n type: 'trend',\n radius: 2,\n opacity: 1,\n cursor: 'ew-resize',\n // 高亮的颜色\n highLightFill: '#0050b3'\n};\nvar SIMPLE_DEFAULT_STYLE = {\n fill: '#fff',\n stroke: '#1890ff',\n radius: 2,\n opacity: 1,\n cursor: 'ew-resize',\n // 高亮的颜色\n highLightFill: '#0050b3'\n};\nvar Handler = /** @class */function () {\n function Handler(cfg) {\n var group = cfg.group,\n name = cfg.name,\n type = cfg.type,\n _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 2 : _c,\n _d = cfg.height,\n height = _d === void 0 ? 24 : _d,\n _e = cfg.style,\n style = _e === void 0 ? {} : _e;\n this.group = group;\n this.name = name;\n this.handleType = type;\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n if (type === 'trend') {\n this.style = __assign(__assign({}, DEFAULT_STYLE), style);\n } else if (type === 'simple') {\n this.style = __assign(__assign({}, SIMPLE_DEFAULT_STYLE), style);\n }\n this.renderHandle();\n }\n /**\n * 设置位置 x\n * @param x\n */\n Handler.prototype.setX = function (x) {\n this.setXY(x, undefined);\n };\n /**\n * 设置位置 y\n * @param y\n */\n Handler.prototype.setY = function (y) {\n this.setXY(undefined, y);\n };\n Handler.prototype.setXY = function (x, y) {\n if (isNumber(x)) {\n this.x = x;\n }\n if (isNumber(y)) {\n this.y = y;\n }\n this.updateXY();\n };\n /**\n * 初始化组件\n * @private\n */\n Handler.prototype.renderHandle = function () {\n var _a = this,\n width = _a.width,\n height = _a.height,\n style = _a.style,\n name = _a.name;\n var fill = style.fill,\n stroke = style.stroke,\n radius = style.radius,\n opacity = style.opacity,\n cursor = style.cursor;\n this.handleGroup = this.group.addGroup();\n // 趋势图时的 handle\n if (this.handleType === 'trend') {\n // 垂直线\n this.verticalLine = this.handleGroup.addShape('rect', {\n attrs: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor\n },\n name: \"\".concat(name, \"-handler\")\n });\n this.topCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: 0,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor,\n lineAppendWidth: 12\n },\n name: \"\".concat(name, \"-handler\")\n });\n this.bottomCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: height,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor\n },\n name: \"\".concat(name, \"-handler\")\n });\n } else if (this.handleType === 'simple') {\n this.topCircle = this.handleGroup.addShape('circle', {\n attrs: {\n x: width / 2,\n y: height / 2,\n r: 2 * width,\n fill: fill,\n stroke: stroke,\n radius: radius,\n opacity: opacity,\n cursor: cursor,\n lineWidth: 2\n },\n name: \"\".concat(name, \"-handler\")\n });\n }\n // 移动到对应的位置\n this.updateXY();\n if (this.handleType === 'trend') {\n this.bindTrendEvents();\n } else if (this.handleType === 'simple') {\n this.bindSimpleEvents();\n }\n };\n Handler.prototype.bindSimpleEvents = function () {\n var _this = this;\n var name = this.name;\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseenter\"), function () {\n var highLightFill = _this.style.highLightFill;\n _this.topCircle.attr('fill', highLightFill);\n });\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseleave\"), function () {\n var fill = _this.style.fill;\n _this.topCircle.attr('fill', fill);\n });\n };\n Handler.prototype.bindTrendEvents = function () {\n var _this = this;\n var name = this.name;\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseenter\"), function () {\n var highLightFill = _this.style.highLightFill;\n _this.verticalLine.attr('fill', highLightFill);\n _this.topCircle.attr('fill', highLightFill);\n _this.bottomCircle.attr('fill', highLightFill);\n });\n this.handleGroup.on(\"\".concat(name, \"-handler:mouseleave\"), function () {\n var fill = _this.style.fill;\n _this.verticalLine.attr('fill', fill);\n _this.topCircle.attr('fill', fill);\n _this.bottomCircle.attr('fill', fill);\n });\n };\n Handler.prototype.show = function () {\n this.handleGroup.show();\n };\n Handler.prototype.hide = function () {\n this.handleGroup.hide();\n };\n Handler.prototype.updateXY = function () {\n this.handleGroup.setMatrix([1, 0, 0, 0, 1, 0, this.x, this.y, 1]);\n };\n return Handler;\n}();\nexport default Handler;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { get, size, assign, each, isNumber } from '@antv/util';\nimport { ext } from '@antv/matrix-util';\nimport Trend from './trend';\nimport Handler from './handler';\nimport { isString } from '@antv/util';\nimport ControllerBtn, { TIME_TYPE } from './controllerBtn';\nimport { VALUE_CHANGE, TIMELINE_START, TIMEBAR_CONFIG_CHANGE, PLAY_PAUSE_BTN, NEXT_STEP_BTN, PRE_STEP_BTN, TIMELINE_END } from './constant';\nvar transform = ext.transform;\n/**\n * 一些默认的样式配置\n */\nexport var BACKGROUND_STYLE = {\n fill: '#416180',\n opacity: 0.05\n};\nvar SIMPLE_BACKGROUND_STYLE = {\n fill: '#416180',\n opacity: 0.15,\n radius: 5\n};\nexport var FOREGROUND_STYLE = {\n fill: '#5B8FF9',\n opacity: 0.3,\n cursor: 'grab'\n};\nexport var DEFAULT_HANDLER_WIDTH = 2;\nexport var HANDLER_STYLE = {\n width: DEFAULT_HANDLER_WIDTH,\n height: 24\n};\nexport var TEXT_STYLE = {\n textBaseline: 'middle',\n fill: '#000',\n opacity: 0.45\n};\nexport var TICK_LABEL_STYLE = {\n textAlign: 'center',\n textBaseline: 'top',\n fill: '#607889',\n opacity: 0.35\n};\nexport var TICK_LINE_STYLE = {\n lineWidth: 1,\n stroke: '#ccc'\n};\nvar TrendTimeBar = /** @class */function () {\n function TrendTimeBar(cfg) {\n var _this = this;\n this.prevX = 0;\n this.onMouseDown = function (handler) {\n return function (e) {\n // 1. 记录点击的滑块\n _this.currentHandler = handler;\n var event = e.originalEvent;\n // 2. 存储当前点击位置\n event.stopPropagation();\n event.preventDefault();\n // 兼容移动端获取数据\n _this.prevX = get(event, 'touches.0.pageX', event.pageX);\n // 3. 开始滑动的时候,绑定 move 和 up 事件\n var containerDOM = _this.canvas.get('container');\n containerDOM.addEventListener('mousemove', _this.onMouseMove);\n containerDOM.addEventListener('mouseup', _this.onMouseUp);\n containerDOM.addEventListener('mouseleave', _this.onMouseUp);\n // 移动端事件\n containerDOM.addEventListener('touchmove', _this.onMouseMove);\n containerDOM.addEventListener('touchend', _this.onMouseUp);\n containerDOM.addEventListener('touchcancel', _this.onMouseUp);\n };\n };\n this.onMouseMove = function (e) {\n // 滑动过程中,计算偏移,更新滑块,然后 emit 数据出去\n e.stopPropagation();\n e.preventDefault();\n var x = get(e, 'touches.0.pageX', e.pageX);\n // 横向的 slider 只处理 x\n var offsetX = x - _this.prevX;\n var offsetXRange = _this.adjustOffsetRange(offsetX / _this.width);\n // 更新 start end range 范围\n _this.updateStartEnd(offsetXRange);\n // 更新 ui\n _this.updateUI();\n _this.prevX = x;\n };\n this.onMouseUp = function () {\n // 结束之后,取消绑定的事件\n if (_this.currentHandler) {\n _this.currentHandler = undefined;\n }\n var containerDOM = _this.canvas.get('container');\n if (containerDOM) {\n containerDOM.removeEventListener('mousemove', _this.onMouseMove);\n containerDOM.removeEventListener('mouseup', _this.onMouseUp);\n // 防止滑动到 canvas 外部之后,状态丢失\n containerDOM.removeEventListener('mouseleave', _this.onMouseUp);\n // 移动端事件\n containerDOM.removeEventListener('touchmove', _this.onMouseMove);\n containerDOM.removeEventListener('touchend', _this.onMouseUp);\n containerDOM.removeEventListener('touchcancel', _this.onMouseUp);\n }\n };\n var _a = cfg.x,\n x = _a === void 0 ? 0 : _a,\n _b = cfg.y,\n y = _b === void 0 ? 0 : _b,\n _c = cfg.width,\n width = _c === void 0 ? 100 : _c,\n height = cfg.height,\n _d = cfg.padding,\n padding = _d === void 0 ? 10 : _d,\n trendCfg = cfg.trendCfg,\n _e = cfg.controllerCfg,\n controllerCfg = _e === void 0 ? {\n speed: 1\n } : _e,\n _f = cfg.backgroundStyle,\n backgroundStyle = _f === void 0 ? {} : _f,\n _g = cfg.foregroundStyle,\n foregroundStyle = _g === void 0 ? {} : _g,\n _h = cfg.handlerStyle,\n handlerStyle = _h === void 0 ? {} : _h,\n _j = cfg.textStyle,\n textStyle = _j === void 0 ? {} : _j,\n // 缩略轴的初始位置\n _k = cfg.start,\n // 缩略轴的初始位置\n start = _k === void 0 ? 0 : _k,\n _l = cfg.end,\n end = _l === void 0 ? 1 : _l,\n _m = cfg.minText,\n minText = _m === void 0 ? '' : _m,\n _o = cfg.maxText,\n maxText = _o === void 0 ? '' : _o,\n group = cfg.group,\n graph = cfg.graph,\n canvas = cfg.canvas,\n _p = cfg.tick,\n tick = _p === void 0 ? {\n tickLabelStyle: {},\n tickLineStyle: {},\n tickLabelFormatter: function tickLabelFormatter(d) {\n return d;\n },\n ticks: []\n } : _p,\n type = cfg.type;\n this.graph = graph;\n this.canvas = canvas;\n this.group = group;\n this.timeBarType = type;\n // position size\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.padding = padding;\n this.ticks = tick.ticks;\n this.trendCfg = trendCfg;\n this.controllerCfg = controllerCfg;\n this.currentSpeed = controllerCfg.speed || 1;\n this.tickLabelFormatter = tick.tickLabelFormatter;\n // style\n if (type === 'trend') {\n this.backgroundStyle = __assign(__assign({}, BACKGROUND_STYLE), backgroundStyle);\n } else if (type === 'simple') {\n this.backgroundStyle = __assign(__assign({}, SIMPLE_BACKGROUND_STYLE), backgroundStyle);\n }\n this.foregroundStyle = __assign(__assign({}, FOREGROUND_STYLE), foregroundStyle);\n this.handlerStyle = __assign(__assign({}, HANDLER_STYLE), handlerStyle);\n this.textStyle = __assign(__assign({}, TEXT_STYLE), textStyle);\n this.tickLabelStyle = __assign(__assign({}, TICK_LABEL_STYLE), tick.tickLabelStyle);\n this.tickLineStyle = __assign(__assign({}, TICK_LINE_STYLE), tick.tickLineStyle);\n this.currentMode = controllerCfg.defaultTimeType || TIME_TYPE.RANGE;\n // 初始信息\n this.start = start;\n this.end = end;\n this.minText = minText;\n this.maxText = maxText;\n // 初始化 fontFamily,如果有浏览器,取 body 上的字体,防止文字更新时局部渲染造成的重影\n this.fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.renderSlider();\n }\n /**\n * 更新配置\n * @param cfg\n */\n TrendTimeBar.prototype.update = function (cfg) {\n var x = cfg.x,\n y = cfg.y,\n width = cfg.width,\n height = cfg.height,\n minText = cfg.minText,\n maxText = cfg.maxText,\n start = cfg.start,\n end = cfg.end;\n // start、end 只能是 0~1 范围\n this.start = Math.min(1, Math.max(start, 0));\n this.end = Math.min(1, Math.max(end, 0));\n // 如果传了则更新,没有传则不更新\n // @ts-ignore\n assign(this, {\n x: x,\n y: y,\n width: width,\n height: height,\n minText: minText,\n maxText: maxText\n });\n // 更新 ui,不自动绘制\n this.updateUI();\n };\n TrendTimeBar.prototype.setText = function (minText, maxText) {\n this.minTextShape.attr('text', minText);\n this.maxTextShape.attr('text', maxText);\n };\n /**\n * 初始化组件结构\n * @private\n */\n TrendTimeBar.prototype.renderSlider = function () {\n var _this = this;\n var _a = this,\n width = _a.width,\n height = _a.height,\n timeBarType = _a.timeBarType;\n // 趋势图数据\n if (timeBarType === 'trend' && size(get(this.trendCfg, 'data'))) {\n var trendComponent = new Trend(__assign(__assign({\n x: this.x,\n y: this.y,\n width: width,\n height: height\n }, this.trendCfg), {\n group: this.group\n }));\n this.trendComponent = trendComponent;\n }\n var sliderGroup = this.group.addGroup({\n name: 'slider-group'\n });\n // 1. 背景\n sliderGroup.addShape('rect', {\n attrs: __assign({\n x: 0,\n y: 0,\n width: width,\n height: height\n }, this.backgroundStyle),\n name: 'background'\n });\n var textGroup = this.group.addGroup();\n // 2. 左右文字\n if (timeBarType === 'trend') {\n this.minTextShape = textGroup.addShape('text', {\n attrs: __assign({\n x: 0,\n y: height / 2 + this.y,\n textAlign: 'right',\n text: this.minText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'min-text-shape'\n });\n this.maxTextShape = textGroup.addShape('text', {\n attrs: __assign({\n y: height / 2 + this.y,\n textAlign: 'left',\n text: this.maxText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'max-text-shape'\n });\n } else {\n this.minTextShape = textGroup.addShape('text', {\n attrs: __assign({\n x: 0,\n y: this.y - 10,\n textAlign: 'center',\n text: this.minText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'min-text-shape'\n });\n this.maxTextShape = textGroup.addShape('text', {\n attrs: __assign({\n y: this.y - 10,\n textAlign: 'center',\n text: this.maxText,\n silent: false,\n fontFamily: this.fontFamily || 'Arial, sans-serif',\n stroke: '#fff',\n lineWidth: 5\n }, this.textStyle),\n capture: false,\n name: 'max-text-shape'\n });\n }\n // 3. 前景 选中背景框\n this.foregroundShape = this.group.addGroup().addShape('rect', {\n attrs: __assign({\n x: 0,\n y: this.y,\n height: height\n }, this.foregroundStyle),\n name: 'foreground-shape'\n });\n this.foregroundShape.on('mousedown', function (e) {\n e.target.attr('cursor', 'grabbing');\n });\n this.foregroundShape.on('mouseup', function (e) {\n e.target.attr('cursor', _this.foregroundStyle.cursor || 'grab');\n });\n // 滑块相关的大小信息\n var handlerWidth = get(this.handlerStyle, 'width', 2);\n var handlerHeight = get(this.handlerStyle, 'height', 24);\n var minHandleGroup = this.group.addGroup({\n name: 'minHandlerShape'\n });\n // 4. 左右滑块\n this.minHandlerShape = new Handler({\n name: 'minHandlerShape',\n group: minHandleGroup,\n type: timeBarType,\n x: this.x,\n y: this.y,\n width: handlerWidth,\n height: handlerHeight,\n style: this.handlerStyle\n });\n var maxHandleGroup = this.group.addGroup({\n name: 'maxHandlerShape'\n });\n this.maxHandlerShape = new Handler({\n name: 'maxHandlerShape',\n group: maxHandleGroup,\n type: timeBarType,\n x: this.x,\n y: this.y,\n width: handlerWidth,\n height: handlerHeight,\n style: this.handlerStyle\n });\n // 缩略图下面的时间刻度\n var tickData = this.ticks;\n var interval = width / (tickData.length - 1);\n this.tickPosList = [];\n if (this.textList && this.textList.length) {\n this.textList.forEach(function (text) {\n text.destroy();\n });\n }\n var lastX = -Infinity;\n var rotate = this.tickLabelStyle.rotate;\n delete this.tickLabelStyle.rotate;\n this.textList = tickData.map(function (data, index) {\n _this.tickPosList.push(_this.x + index * interval);\n var label;\n if (_this.tickLabelFormatter) {\n label = _this.tickLabelFormatter(data);\n if (!isString(label) && label) {\n // return true\n label = data.date;\n }\n } else {\n label = data.date;\n }\n // 文本刻度\n var textX = _this.x + index * interval,\n textY = _this.y + height + 5;\n var text = _this.group.addShape('text', {\n attrs: __assign({\n x: textX,\n y: textY,\n text: label,\n fontFamily: _this.fontFamily || 'Arial, sans-serif'\n }, _this.tickLabelStyle),\n name: 'tick-label'\n });\n if (isNumber(rotate) && index !== tickData.length - 1) {\n var matrix = transform([1, 0, 0, 0, 1, 0, 0, 0, 1], [['t', -textX, -textY], ['r', rotate], ['t', textX - 5, textY + 2]]);\n text.attr({\n textAlign: 'left',\n matrix: matrix\n });\n }\n if (index === 0) {\n text.attr({\n textAlign: 'left'\n });\n } else if (index !== tickData.length - 1) {\n text.attr({\n textAlign: 'right'\n });\n }\n // 文本刻度上面的竖线\n var line = _this.group.addShape('line', {\n attrs: __assign({\n x1: _this.x + index * interval,\n y1: _this.y + height + 2,\n x2: _this.x + index * interval,\n y2: _this.y + height + 6\n }, _this.tickLineStyle),\n name: 'tick-line'\n });\n line.toBack();\n var bbox = text.getBBox();\n // 抽样,标签与标签间距不小于 10\n if (bbox.minX > lastX) {\n text.show();\n line.show();\n lastX = bbox.minX + bbox.width + 10;\n } else {\n text.hide();\n line.hide();\n }\n return text;\n });\n // 渲染播放、快进和后退的控制按钮\n this.controllerBtnGroup = new ControllerBtn(__assign({\n group: this.group,\n x: this.x,\n y: this.y + height + 25,\n width: width,\n height: 35\n }, this.controllerCfg));\n // 初始化 minText 和 maxText,方便计算它们的 bbox\n this.updateStartEnd(0);\n // 根据 start end 更新 ui 的位置信息\n this.updateUI();\n // 移动到对应的位置\n sliderGroup.move(this.x, this.y);\n // 绑定事件鼠标事件\n this.bindEvents();\n if (this.currentMode === TIME_TYPE.SINGLE) {\n this.minHandlerShape.hide();\n this.foregroundShape.hide();\n this.minTextShape.hide();\n }\n };\n /**\n * 绑定事件:\n * - 点击\n * - 滑动\n * - 拖拽\n * - 滚动\n * @private\n */\n TrendTimeBar.prototype.bindEvents = function () {\n var _this = this;\n // 1. 左滑块的滑动\n var minHandleShapeGroup = this.group.find(function (group) {\n return group.get('name') === 'minHandlerShape';\n });\n if (minHandleShapeGroup) {\n minHandleShapeGroup.on('minHandlerShape-handler:mousedown', this.onMouseDown(this.minHandlerShape));\n minHandleShapeGroup.on('minHandlerShape-handler:touchstart', this.onMouseDown(this.minHandlerShape));\n }\n var maxHandleShapeGroup = this.group.find(function (group) {\n return group.get('name') === 'maxHandlerShape';\n });\n // 2. 右滑块的滑动\n if (maxHandleShapeGroup) {\n maxHandleShapeGroup.on('maxHandlerShape-handler:mousedown', this.onMouseDown(this.maxHandlerShape));\n maxHandleShapeGroup.on('maxHandlerShape-handler:touchstart', this.onMouseDown(this.maxHandlerShape));\n }\n // 3. 前景选中区域\n this.foregroundShape.on('mousedown', this.onMouseDown(this.foregroundShape));\n this.foregroundShape.on('touchstart', this.onMouseDown(this.foregroundShape));\n // 播放区按钮控制\n /** 播放/暂停事件 */\n this.group.on(\"\".concat(PLAY_PAUSE_BTN, \":click\"), function () {\n _this.isPlay = !_this.isPlay;\n _this.currentHandler = _this.maxHandlerShape;\n _this.changePlayStatus();\n });\n // 处理前进一步的事件\n this.group.on(\"\".concat(NEXT_STEP_BTN, \":click\"), function () {\n _this.currentHandler = _this.maxHandlerShape;\n _this.updateStartEnd(0.01);\n _this.updateUI();\n });\n // 处理后退一步的事件\n this.group.on(\"\".concat(PRE_STEP_BTN, \":click\"), function () {\n _this.currentHandler = _this.maxHandlerShape;\n _this.updateStartEnd(-0.01);\n _this.updateUI();\n });\n this.group.on(TIMEBAR_CONFIG_CHANGE, function (_a) {\n var type = _a.type,\n speed = _a.speed;\n _this.currentSpeed = speed;\n _this.currentMode = type;\n if (type === TIME_TYPE.SINGLE) {\n _this.minHandlerShape.hide();\n _this.foregroundShape.hide();\n _this.minTextShape.hide();\n } else if (type === TIME_TYPE.RANGE) {\n _this.minHandlerShape.show();\n _this.foregroundShape.show();\n _this.minTextShape.show();\n }\n });\n };\n /** 输入当前圆点位置,输出离哪个 tick 的位置最近 */\n TrendTimeBar.prototype.adjustTickIndex = function (timeSelectX) {\n for (var i = 0; i < this.tickPosList.length - 1; i++) {\n if (this.tickPosList[i] <= timeSelectX && timeSelectX <= this.tickPosList[i + 1]) {\n return Math.abs(this.tickPosList[i] - timeSelectX) < Math.abs(timeSelectX - this.tickPosList[i + 1]) ? i : i + 1;\n }\n }\n return 0;\n };\n /**\n * 调整 offsetRange,因为一些范围的限制\n * @param offsetRange\n */\n TrendTimeBar.prototype.adjustOffsetRange = function (offsetRange) {\n // 针对不同的滑动组件,处理的方式不同\n switch (this.currentHandler) {\n case this.minHandlerShape:\n {\n var min = 0 - this.start;\n var max = 1 - this.start;\n return Math.min(max, Math.max(min, offsetRange));\n }\n case this.maxHandlerShape:\n {\n var min = 0 - this.end;\n var max = 1 - this.end;\n return Math.min(max, Math.max(min, offsetRange));\n }\n case this.foregroundShape:\n {\n var min = 0 - this.start;\n var max = 1 - this.end;\n return Math.min(max, Math.max(min, offsetRange));\n }\n default:\n return 0;\n }\n };\n /**\n * 更新起始、结束的控制块位置、文本、范围值(原始值)\n * @param offsetRange\n */\n TrendTimeBar.prototype.updateStartEnd = function (offsetRange) {\n var minData = this.ticks[this.adjustTickIndex(this.start * this.width)];\n var maxData = this.ticks[this.adjustTickIndex(this.end * this.width)];\n if (!this.currentHandler) {\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData === null || minData === void 0 ? void 0 : minData.date;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData === null || maxData === void 0 ? void 0 : maxData.date;\n return;\n }\n // 操作不同的组件,反馈不一样\n switch (this.currentHandler) {\n case this.minHandlerShape:\n // 拖动最小滑块时使用当前最大值设置最大值的文本,以便恢复到默认值\n this.maxText = this.maxTextShape.attr('text');\n this.start += offsetRange;\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData.date;\n break;\n case this.maxHandlerShape:\n // 拖动最大滑块时使用当前最小值设置最小值的文本,以便恢复到默认值\n this.minText = this.minTextShape.attr('text');\n this.end += offsetRange;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData.date;\n break;\n case this.foregroundShape:\n this.start += offsetRange;\n this.end += offsetRange;\n this.minText = this.tickLabelFormatter ? this.tickLabelFormatter(minData) : minData.date;\n this.maxText = this.tickLabelFormatter ? this.tickLabelFormatter(maxData) : maxData.date;\n break;\n default:\n break;\n }\n };\n /**\n * 根据移动的比例来更新 ui,更新范围(0-1 范围的比例值)\n * @private\n */\n TrendTimeBar.prototype.updateUI = function () {\n var _this = this;\n if (this.start < 0) {\n this.start = 0;\n }\n if (this.start > 1) {\n this.start = 1;\n }\n if (this.end > 1) {\n this.end = 1;\n }\n if (this.end < 0) {\n this.end = 0;\n }\n var min = this.x + this.start * this.width;\n var max = this.x + this.end * this.width;\n // 1. foreground\n this.foregroundShape.attr('x', min);\n this.foregroundShape.attr('width', max - min);\n // 滑块相关的大小信息\n var handlerWidth = get(this.handlerStyle, 'width', DEFAULT_HANDLER_WIDTH);\n // 设置文本\n this.setText(this.minText, this.maxText);\n var _a = this.dodgeText([min, max]),\n minAttrs = _a[0],\n maxAttrs = _a[1];\n // 2. 左侧滑块和文字位置\n this.minHandlerShape.setX(min - handlerWidth / 2);\n each(minAttrs, function (v, k) {\n return _this.minTextShape.attr(k, v);\n });\n // 3. 右侧滑块和文字位置\n this.maxHandlerShape.setX(max - handlerWidth / 2);\n each(maxAttrs, function (v, k) {\n return _this.maxTextShape.attr(k, v);\n });\n if (this.currentMode === TIME_TYPE.RANGE) {\n // 因为存储的 start、end 可能不一定是按大小存储的,所以排序一下,对外是 end >= start\n this.graph.emit(VALUE_CHANGE, {\n value: [this.start, this.end].sort()\n });\n } else if (this.currentMode === TIME_TYPE.SINGLE) {\n this.graph.emit(VALUE_CHANGE, {\n value: [this.end, this.end]\n });\n }\n };\n /**\n * 调整 text 的位置,自动躲避\n * 根据位置,调整返回新的位置\n * @param range\n */\n TrendTimeBar.prototype.dodgeText = function (range) {\n var _a, _b;\n var TEXTPADDING = 2;\n var handlerWidth = get(this.handlerStyle, 'width', DEFAULT_HANDLER_WIDTH);\n var minTextShape = this.minTextShape;\n var maxTextShape = this.maxTextShape;\n var min = range[0],\n max = range[1];\n var sorted = false;\n // 如果交换了位置,则对应的 min max 也交换\n if (min > max) {\n _a = [max, min], min = _a[0], max = _a[1];\n _b = [maxTextShape, minTextShape], minTextShape = _b[0], maxTextShape = _b[1];\n sorted = true;\n }\n // 避让规则,优先显示在两侧,只有显示不下的时候,才显示在中间\n var minBBox = minTextShape.getBBox();\n var maxBBox = maxTextShape.getBBox();\n var minAttrs = null;\n var maxAttrs = null;\n if (this.timeBarType === 'trend') {\n minAttrs = min - minBBox.width < this.x + TEXTPADDING ? {\n x: min + handlerWidth / 2 + TEXTPADDING,\n textAlign: 'left'\n } : {\n x: min - handlerWidth / 2 - TEXTPADDING,\n textAlign: 'right'\n };\n maxAttrs = max + maxBBox.width > this.x + this.width ? {\n x: max - handlerWidth / 2 - TEXTPADDING,\n textAlign: 'right'\n } : {\n x: max + handlerWidth / 2 + TEXTPADDING,\n textAlign: 'left'\n };\n } else if (this.timeBarType === 'simple') {\n minAttrs = minTextShape.attr('x') > minBBox.width // 左边滑块文本位置小于其宽度代表文字超过左边届\n ? {\n x: min,\n textAlign: 'center'\n } : {\n x: min,\n textAlign: 'left'\n };\n maxAttrs = maxTextShape.attr('x') > this.width - maxBBox.width // 有边滑块文本位置大于宽度代表文字超过右边界\n ? {\n x: max,\n textAlign: 'right'\n } : {\n x: max,\n textAlign: 'center'\n };\n }\n return !sorted ? [minAttrs, maxAttrs] : [maxAttrs, minAttrs];\n };\n TrendTimeBar.prototype.startPlay = function () {\n var _this = this;\n return typeof window !== 'undefined' ? window.requestAnimationFrame(function () {\n var _a = _this,\n ticks = _a.ticks,\n width = _a.width;\n var speed = _this.currentSpeed;\n var tickInterval = width / ticks.length;\n var offsetX = tickInterval / ((10 - speed) * 1000 / 60);\n var offsetXRange = _this.adjustOffsetRange(offsetX / _this.width);\n _this.updateStartEnd(offsetXRange);\n _this.updateUI();\n if (_this.isPlay) {\n _this.playHandler = _this.startPlay();\n }\n }) : undefined;\n };\n TrendTimeBar.prototype.changePlayStatus = function (isSync) {\n if (isSync === void 0) {\n isSync = true;\n }\n this.controllerBtnGroup.playButton.update({\n isPlay: this.isPlay\n });\n if (this.isPlay) {\n // 开始播放\n this.playHandler = this.startPlay();\n this.graph.emit(TIMELINE_START, null);\n } else {\n // 结束播放\n if (this.playHandler) {\n if (typeof window !== 'undefined') window.cancelAnimationFrame(this.playHandler);\n if (isSync) {\n this.graph.emit(TIMELINE_END, null);\n }\n }\n }\n };\n TrendTimeBar.prototype.destory = function () {\n this.graph.off(VALUE_CHANGE, function () {});\n var group = this.group;\n var minHandleShapeGroup = group.find(function (g) {\n return g.get('name') === 'minHandlerShape';\n });\n if (minHandleShapeGroup) {\n minHandleShapeGroup.off('minHandlerShape-handler:mousedown');\n minHandleShapeGroup.off('minHandlerShape-handler:touchstart');\n minHandleShapeGroup.destroy();\n }\n var maxHandleShapeGroup = group.find(function (g) {\n return g.get('name') === 'maxHandlerShape';\n });\n // 2. 右滑块的滑动\n if (maxHandleShapeGroup) {\n maxHandleShapeGroup.off('maxHandlerShape-handler:mousedown');\n maxHandleShapeGroup.off('maxHandlerShape-handler:touchstart');\n maxHandleShapeGroup.destroy();\n }\n // 3. 前景选中区域\n this.foregroundShape.off('mousedown');\n this.foregroundShape.off('touchstart');\n this.foregroundShape.destroy();\n group.off(\"\".concat(PLAY_PAUSE_BTN, \":click\"));\n group.off(\"\".concat(NEXT_STEP_BTN, \":click\"));\n group.off(\"\".concat(PRE_STEP_BTN, \":click\"));\n group.off(TIMEBAR_CONFIG_CHANGE);\n group.destroy();\n if (this.trendComponent) {\n this.trendComponent.destory();\n }\n };\n return TrendTimeBar;\n}();\nexport default TrendTimeBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/**\n * 基于 G 的时间轴组件\n */\nimport { createDom, modifyCSS } from '@antv/dom-util';\nimport { Canvas as GCanvas } from '@antv/g-canvas';\nimport { Canvas as GSVGCanvas } from '@antv/g-svg';\nimport { isString, throttle } from '@antv/util';\nimport Base from '../base';\nimport { VALUE_CHANGE } from './constant';\nimport TimeBarSlice from './timeBarSlice';\nimport TrendTimeBar from './trendTimeBar';\n// simple 版本默认高度\nvar DEFAULT_SIMPLE_HEIGHT = 4;\n// trend 版本默认高度\nvar DEFAULT_TREND_HEIGHT = 26;\nvar TimeBar = /** @class */function (_super) {\n __extends(TimeBar, _super);\n function TimeBar(config) {\n var _this = _super.call(this, config) || this;\n _this.afterrenderListener = function (e) {\n return _this.filterData({});\n };\n _this.valueChangeListener = throttle(function (e) {\n return _this.filterData(e);\n },\n // 不可简写,否则 filterData 中 this 指针不对\n 200, {\n trailing: true,\n leading: true\n });\n _this.changeData = function (e) {\n var graph = _this.get('graph');\n _this.cacheGraphData = graph.get('data');\n _this.filterData({});\n };\n return _this;\n }\n TimeBar.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-component-timebar',\n padding: 10,\n type: 'trend',\n trend: {\n data: [],\n isArea: false,\n smooth: true\n },\n controllerCfg: {\n speed: 1,\n loop: false\n },\n slider: {\n start: 0.1,\n end: 0.9,\n minText: 'min',\n maxText: 'max'\n },\n tick: {\n start: 0.1,\n end: 0.9,\n data: []\n },\n textStyle: {},\n filterEdge: false,\n filterItemTypes: ['node'],\n containerCSS: {},\n putInGraphContainer: true\n };\n };\n /**\n * 初始化 TimeBar 的容器\n */\n TimeBar.prototype.initContainer = function () {\n var graph = this.get('graph');\n var _a = this._cfgs,\n width = _a.width,\n height = _a.height,\n putInGraphContainer = _a.putInGraphContainer;\n var className = this.get('className') || 'g6-component-timebar';\n var container = this.get('container');\n var timeBarContainer;\n if (!container) {\n timeBarContainer = createDom(\"
\"));\n modifyCSS(timeBarContainer, {\n position: 'relative'\n });\n } else {\n if (isString(container)) {\n container = document.getElementById(container);\n }\n timeBarContainer = container;\n }\n if (putInGraphContainer) {\n var graphContainer = this.get('graph').get('container');\n graphContainer.appendChild(timeBarContainer);\n }\n this.set('timeBarContainer', timeBarContainer);\n var canvas;\n var renderer = graph.get('renderer');\n if (renderer === 'SVG') {\n canvas = new GSVGCanvas({\n container: timeBarContainer,\n width: width,\n height: height\n });\n } else {\n canvas = new GCanvas({\n container: timeBarContainer,\n width: width,\n height: height\n });\n }\n // 根据传入的参数修改容器 CSS 样式\n if (this.get('containerCSS')) modifyCSS(timeBarContainer, this.get('containerCSS'));\n this.set('canvas', canvas);\n };\n TimeBar.prototype.init = function () {\n this.initContainer();\n var canvas = this.get('canvas');\n var timeBarGroup = canvas.addGroup({\n name: 'timebar-group'\n });\n this.set('timeBarGroup', timeBarGroup);\n this.renderTrend();\n this.initEvent();\n var fontFamily = typeof window !== 'undefined' ? window.getComputedStyle(document.body, null).getPropertyValue('font-family') || 'Arial, sans-serif' : 'Arial, sans-serif';\n this.set('fontFamily', fontFamily);\n };\n /**\n * 触发时间轴播放\n */\n TimeBar.prototype.play = function () {\n this.togglePlay(true);\n };\n /**\n * 触发时间轴暂停\n */\n TimeBar.prototype.pause = function () {\n this.togglePlay(false);\n };\n /**\n * 时间轴播放状态(播放/暂停)的切换\n */\n TimeBar.prototype.togglePlay = function (play) {\n var timebar = this.get('timebar');\n if (!timebar) return;\n timebar.isPlay = !!play;\n timebar.changePlayStatus();\n };\n TimeBar.prototype.renderTrend = function () {\n var _this = this;\n var _a = this._cfgs,\n width = _a.width,\n x = _a.x,\n y = _a.y,\n padding = _a.padding,\n type = _a.type,\n trend = _a.trend,\n slider = _a.slider,\n controllerCfg = _a.controllerCfg,\n textStyle = _a.textStyle,\n tick = _a.tick,\n backgroundStyle = _a.backgroundStyle,\n foregroundStyle = _a.foregroundStyle;\n var data = trend.data,\n other = __rest(trend, [\"data\"]);\n var realWidth = width - 2 * padding;\n var defaultHeight = type === 'trend' ? DEFAULT_TREND_HEIGHT : DEFAULT_SIMPLE_HEIGHT;\n var graph = this.get('graph');\n var group = this.get('timeBarGroup');\n var canvas = this.get('canvas');\n var timebar = null;\n if (type === 'trend' || type === 'simple') {\n var getValue_1 = this.get('getValue');\n timebar = new TrendTimeBar(__assign(__assign({\n graph: graph,\n canvas: canvas,\n group: group,\n type: type,\n x: x + padding,\n y: type === 'trend' ? y + padding : y + padding + 15,\n width: realWidth,\n height: defaultHeight,\n padding: padding,\n backgroundStyle: backgroundStyle,\n foregroundStyle: foregroundStyle,\n trendCfg: __assign(__assign({}, other), {\n data: data.map(function (d) {\n return (getValue_1 === null || getValue_1 === void 0 ? void 0 : getValue_1(d)) || d.value;\n })\n })\n }, slider), {\n tick: {\n ticks: data,\n tickLabelFormatter: tick.tickLabelFormatter,\n tickLabelStyle: tick.tickLabelStyle,\n tickLineStyle: tick.tickLineStyle\n },\n handlerStyle: __assign(__assign({}, slider.handlerStyle), {\n height: slider.height || defaultHeight\n }),\n controllerCfg: controllerCfg,\n textStyle: textStyle\n }));\n } else if (type === 'tick') {\n // 刻度时间轴\n timebar = new TimeBarSlice(__assign({\n graph: graph,\n canvas: canvas,\n group: group,\n x: x + padding,\n y: y + padding,\n width: width,\n height: 42,\n padding: 2,\n controllerCfg: controllerCfg\n }, tick));\n }\n // 鼠标按下左/右滑块或范围条后在任意地方释放,都触发暂停播放\n var handleMouseUp = function handleMouseUp() {\n var timebarInstance = _this.get('timebar');\n timebarInstance.draggingHandler = false;\n if (timebarInstance.isPlay) {\n timebarInstance.isPlay = false;\n timebarInstance.currentHandler = timebarInstance.maxHandlerShape;\n timebarInstance.changePlayStatus();\n }\n document.removeEventListener('mouseup', handleMouseUp);\n };\n canvas.on('mousedown', function (e) {\n if (e.target.get('name') === 'maxHandlerShape-handler' || e.target.get('name') === 'minHandlerShape-handler' || e.target === timebar.foregroundShape) {\n document.addEventListener('mouseup', handleMouseUp);\n }\n });\n this.set('timebar', timebar);\n };\n TimeBar.prototype.filterData = function (evt) {\n var _a;\n var value = evt.value;\n if (!value) {\n value = [];\n var type_1 = this._cfgs.type;\n if (!type_1 || type_1 === 'trend' || type_1 === 'simple') {\n value[0] = this._cfgs.slider.start;\n value[1] = this._cfgs.slider.end;\n } else if (type_1 === 'tick') {\n value[0] = this._cfgs.tick.start;\n value[1] = this._cfgs.tick.end;\n }\n }\n var trendData = null;\n var type = this._cfgs.type;\n if (type === 'trend' || type === 'simple') {\n trendData = this._cfgs.trend.data;\n } else if (type === 'tick') {\n trendData = this._cfgs.tick.data;\n }\n if (!trendData || trendData.length === 0) {\n console.warn('请配置 TimeBar 组件的数据');\n return;\n }\n var rangeChange = this.get('rangeChange');\n var graph = this.get('graph');\n var min = Math.round(trendData.length * value[0]);\n var max = Math.round(trendData.length * value[1]);\n max = max >= trendData.length ? trendData.length - 1 : max;\n min = min >= trendData.length ? trendData.length - 1 : min;\n var tickLabelFormatter = (_a = this._cfgs.tick) === null || _a === void 0 ? void 0 : _a.tickLabelFormatter;\n var minText = tickLabelFormatter ? tickLabelFormatter(trendData[min]) : trendData[min].date;\n var maxText = tickLabelFormatter ? tickLabelFormatter(trendData[max]) : trendData[max].date;\n if (type !== 'tick') {\n var timebar = this.get('timebar');\n timebar.setText(minText, maxText);\n }\n if (rangeChange) {\n rangeChange(graph, minText, maxText);\n } else {\n // 自动过滤数据,并渲染 graph\n if (!this.cacheGraphData || this.cacheGraphData.nodes && this.cacheGraphData.nodes.length === 0) {\n this.cacheGraphData = graph.get('data'); // graph.save() as GraphData;\n }\n\n var filterItemTypes = this.get('filterItemTypes');\n var changeData = this.get('changeData');\n // 过滤不在 min 和 max 范围内的节点\n var getDate_1 = this.get('getDate');\n var shouldIgnore_1 = this.get('shouldIgnore');\n var minDate_1 = trendData[min].date,\n maxDate_1 = trendData[max].date;\n if (changeData || changeData === undefined) {\n var originNodes = this.cacheGraphData.nodes;\n var originEdges = this.cacheGraphData.edges;\n var currentNodeExistMap_1 = {};\n var currentEdgeExistMap_1 = {};\n graph.getNodes().forEach(function (node) {\n return currentNodeExistMap_1[node.getID()] = true;\n });\n graph.getEdges().forEach(function (edge) {\n return currentEdgeExistMap_1[edge.getID()] = true;\n });\n if (filterItemTypes.includes('node')) {\n originNodes === null || originNodes === void 0 ? void 0 : originNodes.forEach(function (node) {\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(node)) || node.date);\n var hitRange = date >= minDate_1 && date <= maxDate_1 || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('node', node, {\n min: minDate_1,\n max: maxDate_1\n }));\n var exist = currentNodeExistMap_1[node.id];\n if (exist && !hitRange) {\n graph.removeItem(node.id);\n currentNodeExistMap_1[node.id] = false;\n } else if (!exist && hitRange) {\n graph.addItem('node', node);\n currentNodeExistMap_1[node.id] = true;\n }\n });\n // 过滤 source 或 target 不在 min 和 max 范围内的边\n originEdges === null || originEdges === void 0 ? void 0 : originEdges.forEach(function (edge) {\n var shouldShow = currentNodeExistMap_1[edge.source] && currentNodeExistMap_1[edge.target] || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', edge, {\n min: minDate_1,\n max: maxDate_1\n }));\n var exist = !!graph.findById(edge.id);\n if (exist && !shouldShow) {\n graph.removeItem(edge.id);\n currentEdgeExistMap_1[edge.id] = false;\n } else if (!exist && shouldShow) {\n graph.addItem('edge', edge);\n currentEdgeExistMap_1[edge.id] = true;\n } else if (!exist) {\n currentEdgeExistMap_1[edge.id] = false;\n }\n });\n }\n if (this.get('filterEdge') || filterItemTypes.includes('edge')) {\n originEdges === null || originEdges === void 0 ? void 0 : originEdges.filter(function (edge) {\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(edge)) || edge.date);\n var hitRange = date >= minDate_1 && date <= maxDate_1 || (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', edge, {\n min: minDate_1,\n max: maxDate_1\n }));\n var endsExist = currentNodeExistMap_1[edge.source] && currentNodeExistMap_1[edge.target];\n var shouldShow = hitRange && endsExist;\n var exist = currentEdgeExistMap_1[edge.id];\n if (exist && !shouldShow) {\n currentEdgeExistMap_1[edge.id] = false;\n graph.removeItem(edge.id);\n } else if (!exist && shouldShow) {\n currentEdgeExistMap_1[edge.id] = true;\n graph.addItem('edge', edge);\n }\n });\n }\n } else {\n if (filterItemTypes.includes('node')) {\n graph.getNodes().forEach(function (node) {\n var model = node.getModel();\n if (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('node', model, {\n min: minDate_1,\n max: maxDate_1\n })) return;\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(model)) || model.date);\n if (date < minDate_1 || date > maxDate_1) {\n graph.hideItem(node);\n } else {\n graph.showItem(node);\n }\n });\n }\n if (this.get('filterEdge') || filterItemTypes.includes('edge')) {\n graph.getEdges().forEach(function (edge) {\n var model = edge.getModel();\n if (shouldIgnore_1 === null || shouldIgnore_1 === void 0 ? void 0 : shouldIgnore_1('edge', model, {\n min: trendData[min].date,\n max: trendData[max].date\n })) return;\n var date = +((getDate_1 === null || getDate_1 === void 0 ? void 0 : getDate_1(model)) || model.date);\n if (date < trendData[min].date || date > trendData[max].date) {\n graph.hideItem(edge);\n } else {\n var sourceVisible = edge.getSource().isVisible();\n var targetVisible = edge.getTarget().isVisible();\n if (sourceVisible && targetVisible) graph.showItem(edge);\n }\n });\n }\n }\n }\n };\n TimeBar.prototype.initEvent = function () {\n var graph = this.get('graph');\n // 图数据变化,更新时间轴的原始数据\n graph.on('afterchangedata', this.changeData);\n // 图渲染,触发时间轴筛选\n graph.on('afterrender', this.afterrenderListener);\n // 时间轴的值发生改变的事件,触发筛选\n graph.on(VALUE_CHANGE, this.valueChangeListener);\n };\n TimeBar.prototype.destroy = function () {\n var graph = this.get('graph');\n graph.off('afterchangedata', this.changeData);\n graph.off('afterrender', this.afterrenderListener);\n graph.off(VALUE_CHANGE, this.valueChangeListener);\n var timebar = this.get('timebar');\n if (timebar && timebar.destory) {\n timebar.destory();\n }\n _super.prototype.destroy.call(this);\n var timeBarContainer = this.get('timeBarContainer');\n if (timeBarContainer) {\n var container = this.get('container');\n if (!container) {\n container = this.get('graph').get('container');\n }\n if (isString(container)) {\n container = document.getElementById(container);\n }\n if (container === timeBarContainer) {\n container = container.parentElement;\n }\n container.removeChild(timeBarContainer);\n }\n };\n return TimeBar;\n}(Base);\nexport default TimeBar;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport Base from '../base';\nimport { isString, isNil } from '@antv/util';\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport { Util } from '@antv/g6-core';\nimport { mat3 } from '@antv/matrix-util';\nvar applyMatrix = Util.applyMatrix;\nfunction getImgNaturalDimension(img, callback) {\n var nWidth, nHeight;\n if (img.naturalWidth) {\n // 现代浏览器\n nWidth = img.naturalWidth;\n nHeight = img.naturalHeight;\n } else {\n // IE6/7/8\n var image_1 = new Image();\n image_1.src = img.src;\n image_1.onload = function () {\n if (callback) callback(image_1.width, image_1.height);\n };\n }\n return [nWidth, nHeight];\n}\nvar ImageMiniMap = /** @class */function (_super) {\n __extends(ImageMiniMap, _super);\n function ImageMiniMap(config) {\n return _super.call(this, config) || this;\n }\n ImageMiniMap.prototype.getDefaultCfgs = function () {\n return {\n container: null,\n className: 'g6-minimap',\n viewportClassName: 'g6-minimap-viewport',\n width: 200,\n delegateStyle: {\n fill: '#40a9ff',\n stroke: '#096dd9'\n },\n refresh: true\n };\n };\n ImageMiniMap.prototype.getEvents = function () {\n return {\n beforepaint: 'updateViewport',\n beforeanimate: 'disableRefresh',\n afteranimate: 'enableRefresh',\n viewportchange: 'disableOneRefresh'\n };\n };\n // 若是正在进行动画,不刷新缩略图\n ImageMiniMap.prototype.disableRefresh = function () {\n this.set('refresh', false);\n };\n ImageMiniMap.prototype.enableRefresh = function () {\n this.set('refresh', true);\n this.updateCanvas();\n };\n ImageMiniMap.prototype.disableOneRefresh = function () {\n this.set('viewportChange', true);\n };\n ImageMiniMap.prototype.initViewport = function () {\n var _this = this;\n var cfgs = this._cfgs;\n // cWidth and cHeight are the width and height of the minimap's container\n var graph = cfgs.graph;\n if (this.destroyed) return;\n var containerDOM = this.get('container');\n if (isString(containerDOM)) {\n containerDOM = document.getElementById(containerDOM);\n }\n var viewport = createDom(\"
\"));\n // 计算拖拽水平方向距离\n var x = 0;\n // 计算拖拽垂直方向距离\n var y = 0;\n // 是否在拖拽minimap的视口\n var dragging = false;\n // 缓存viewport当前对于画布的x\n var left = 0;\n // 缓存viewport当前对于画布的y\n var top = 0;\n // 缓存viewport当前宽度\n var width = 0;\n // 缓存viewport当前高度\n var height = 0;\n var ratio = 0;\n var zoom = 0;\n containerDOM.addEventListener('mousedown', function (e) {\n cfgs.refresh = false;\n if (e.target !== viewport) {\n return;\n }\n // 如果视口已经最大了,不需要拖拽\n var style = viewport.style;\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n var cWidth = _this.get('width');\n var cHeight = _this.get('height');\n if (width > cWidth || height > cHeight) {\n return;\n }\n zoom = graph.getZoom();\n ratio = _this.get('ratio');\n dragging = true;\n x = e.clientX;\n y = e.clientY;\n }, false);\n containerDOM.addEventListener('mousemove', function (e) {\n if (!dragging || isNil(e.clientX) || isNil(e.clientY)) {\n return;\n }\n var cWidth = _this.get('width');\n var cHeight = _this.get('height');\n var style = viewport.style;\n left = parseInt(style.left, 10);\n top = parseInt(style.top, 10);\n width = parseInt(style.width, 10);\n height = parseInt(style.height, 10);\n var dx = x - e.clientX;\n var dy = y - e.clientY;\n // 若视口移动到最左边或最右边了,仅移动到边界\n if (left - dx < 0) {\n dx = left;\n } else if (left - dx + width >= cWidth) {\n dx = 0;\n }\n // 若视口移动到最上或最下边了,仅移动到边界\n if (top - dy < 0) {\n dy = top;\n } else if (top - dy + height >= cHeight) {\n dy = 0;\n }\n left -= dx;\n top -= dy;\n // 先移动视口,避免移动到边上以后出现视口闪烁\n modifyCSS(viewport, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\")\n });\n // graph 移动需要偏移量 dx/dy * 缩放比例才会得到正确的移动距离\n graph.translate(dx * zoom / ratio, dy * zoom / ratio);\n x = e.clientX;\n y = e.clientY;\n }, false);\n containerDOM.addEventListener('mouseleave', function () {\n dragging = false;\n cfgs.refresh = true;\n }, false);\n containerDOM.addEventListener('mouseup', function () {\n dragging = false;\n cfgs.refresh = true;\n }, false);\n this.set('viewport', viewport);\n containerDOM.appendChild(viewport);\n };\n /**\n * 更新 viewport 视图\n */\n ImageMiniMap.prototype.updateViewport = function () {\n if (this.destroyed) return;\n var ratio = this.get('ratio');\n var cWidth = this.get('width');\n var cHeight = this.get('height');\n var graph = this.get('graph');\n var graphWidth = graph.get('width');\n var graphHeight = graph.get('height');\n var aspectRatio = graphWidth / graphHeight;\n var graphGroup = graph.getGroup();\n // 主图的 bbox(矩阵变换相关的 bbox)\n var graphCanvasBBox = graphGroup.getCanvasBBox();\n // 扩展 graphBBox 到和 graphWidth / graphHeight 等比\n var graphCanvasBBoxMean = [(graphCanvasBBox.minX + graphCanvasBBox.maxX) / 2, (graphCanvasBBox.minY + graphCanvasBBox.maxY) / 2];\n var graphCanvasBBoxSize = [graphCanvasBBox.maxX - graphCanvasBBox.minX, graphCanvasBBox.maxY - graphCanvasBBox.minY];\n var expandedGraphCanvasBBox = {\n centerX: graphCanvasBBoxMean[0],\n centerY: graphCanvasBBoxMean[1],\n width: 0,\n height: 0,\n minX: 0,\n minY: 0\n };\n if (graphCanvasBBox[0] / graphCanvasBBox[1] > aspectRatio) {\n expandedGraphCanvasBBox.width = graphCanvasBBoxSize[0];\n expandedGraphCanvasBBox.height = expandedGraphCanvasBBox.width / aspectRatio;\n } else {\n expandedGraphCanvasBBox.height = graphCanvasBBoxSize[1];\n expandedGraphCanvasBBox.width = expandedGraphCanvasBBox.height * aspectRatio;\n }\n expandedGraphCanvasBBox.minX = graphCanvasBBoxMean[0] - expandedGraphCanvasBBox.width / 2;\n expandedGraphCanvasBBox.minY = graphCanvasBBoxMean[1] - expandedGraphCanvasBBox.height / 2;\n var graphMatrix = graphGroup.getMatrix();\n if (!graphMatrix) graphMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var invertGraphMatrix = mat3.invert([1, 0, 0, 0, 1, 0, 0, 0, 1], graphMatrix);\n var minXY = applyMatrix({\n x: expandedGraphCanvasBBox.minX,\n y: expandedGraphCanvasBBox.minY\n }, invertGraphMatrix);\n // 扩展 graphBBox 后的 bbox 的左上角对应的 canvas container 坐标\n var topLeft = graph.getCanvasByPoint(minXY.x, minXY.y);\n var viewport = this.get('viewport');\n if (!viewport) {\n this.initViewport();\n }\n // Viewport 与 minimap container 的比例 = Graph container 与 expandedGraphBBox 比例\n var vpToMc = graphWidth / expandedGraphCanvasBBox.width;\n // viewport 宽高 = vpToMc * minimap container 宽高\n var width = vpToMc * cWidth;\n var height = vpToMc * cHeight;\n // vierport 左上角到 minimap container 的距离 / minimap container 宽高\n // = 主图 expandedBBox 左上角 canvas container 坐标距离 / expandedBBox 宽高\n var left = cWidth * -topLeft.x / expandedGraphCanvasBBox.width;\n var top = cHeight * -topLeft.y / expandedGraphCanvasBBox.height;\n var right = left + width;\n var bottom = top + height;\n if (left < 0) {\n width += left;\n left = 0;\n }\n if (right > cWidth) {\n width = width - (right - cWidth);\n }\n if (top < 0) {\n height += top;\n top = 0;\n }\n if (bottom > cHeight) {\n height = height - (bottom - cHeight);\n }\n // 缓存目前缩放比,在移动 minimap 视窗时就不用再计算大图的移动量\n this.set('ratio', ratio);\n var correctLeft = \"\".concat(left, \"px\");\n var correctTop = \"\".concat(top, \"px\");\n modifyCSS(viewport, {\n left: correctLeft,\n top: correctTop,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\")\n });\n };\n ImageMiniMap.prototype.init = function () {\n this.initContainer();\n };\n /**\n * 初始化 Minimap 的容器\n */\n ImageMiniMap.prototype.initContainer = function () {\n var self = this;\n var graph = self.get('graph');\n var graphWidth = graph.get('width');\n var graphHeight = graph.get('height');\n var aspectRatio = graphHeight / graphWidth;\n var className = self.get('className');\n var parentNode = self.get('container');\n // size of the minimap's container\n var cWidth = self.get('width');\n var cHeight = self.get('height');\n if (!cWidth && !cHeight) {\n cWidth = 200;\n }\n if (cWidth) {\n cHeight = aspectRatio * cWidth;\n self.set('height', cHeight);\n } else {\n cWidth = 1 / aspectRatio * cHeight;\n self.set('width', cWidth);\n }\n var container = createDom(\"
\"));\n if (isString(parentNode)) {\n parentNode = document.getElementById(parentNode);\n }\n if (parentNode) {\n parentNode.appendChild(container);\n } else {\n graph.get('container').appendChild(container);\n }\n self.set('container', container);\n var containerDOM = createDom(\"
\");\n container.appendChild(containerDOM);\n var span = createDom(\"\");\n containerDOM.appendChild(span);\n self.set('containerDOM', containerDOM);\n self.set('containerSpan', span);\n var img = createDom(\"\\\"\\\"\"));\n self.set('imgDOM', img);\n self.updateImgSize();\n span.appendChild(img);\n self.updateCanvas();\n };\n ImageMiniMap.prototype.updateImgSize = function () {\n var self = this;\n var imgDOM = self.get('imgDOM');\n var cWidth = self.get('width');\n var cHeight = self.get('height');\n imgDOM.onload = function () {\n var naturalSize = getImgNaturalDimension(imgDOM);\n if (naturalSize[0] > naturalSize[1]) {\n imgDOM.width = cWidth;\n } else {\n imgDOM.height = cHeight;\n }\n };\n };\n ImageMiniMap.prototype.updateCanvas = function () {\n // 如果是在动画,则不刷新视图\n var isRefresh = this.get('refresh');\n if (!isRefresh) {\n return;\n }\n var graph = this.get('graph');\n if (graph.get('destroyed')) {\n return;\n }\n // 如果是视口变换,也不刷新视图,但是需要重置视口大小和位置\n if (this.get('viewportChange')) {\n this.set('viewportChange', false);\n this.updateViewport();\n }\n var cWidth = this.get('width');\n var graphBBox = graph.get('canvas').getCanvasBBox();\n var width = graphBBox.width;\n var ratio = cWidth / width;\n // // 更新minimap视口\n this.set('ratio', ratio);\n this.updateViewport();\n };\n /**\n * 获取minimap的窗口\n * @return {HTMLElement} 窗口的dom实例\n */\n ImageMiniMap.prototype.getViewport = function () {\n return this.get('viewport');\n };\n /**\n * 获取minimap的容器dom\n * @return {HTMLElement} dom\n */\n ImageMiniMap.prototype.getContainer = function () {\n return this.get('container');\n };\n ImageMiniMap.prototype.updateGraphImg = function (img) {\n var self = this;\n var oriImgDOM = self.get('imgDOM');\n oriImgDOM.remove();\n self.set('graphImg', img);\n var imgDOM = createDom(\"\\\"\\\"\"));\n self.set('imgDOM', imgDOM);\n imgDOM.src = img;\n self.updateImgSize();\n var span = self.get('containerSpan');\n span.appendChild(imgDOM);\n self.updateCanvas();\n };\n ImageMiniMap.prototype.destroy = function () {\n var container = this.get('container');\n container.parentNode.removeChild(container);\n };\n return ImageMiniMap;\n}(Base);\nexport default ImageMiniMap;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { clone } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport Base from '../base';\nvar distance = Util.distance;\nvar DELTA = 0.05;\nvar lensDelegateStyle = {\n stroke: '#000',\n strokeOpacity: 0.8,\n lineWidth: 2,\n fillOpacity: 1,\n fill: '#fff'\n};\nvar EdgeFilterLens = /** @class */function (_super) {\n __extends(EdgeFilterLens, _super);\n function EdgeFilterLens(config) {\n return _super.call(this, config) || this;\n }\n EdgeFilterLens.prototype.getDefaultCfgs = function () {\n return {\n type: 'both',\n trigger: 'mousemove',\n r: 60,\n delegateStyle: clone(lensDelegateStyle),\n showLabel: 'edge',\n scaleRBy: 'wheel'\n };\n };\n // class-methods-use-this\n EdgeFilterLens.prototype.getEvents = function () {\n var events;\n switch (this.get('trigger')) {\n case 'click':\n events = {\n click: 'filter'\n };\n break;\n case 'drag':\n events = {\n click: 'createDelegate'\n };\n break;\n default:\n events = {\n mousemove: 'filter'\n };\n break;\n }\n return events;\n };\n EdgeFilterLens.prototype.init = function () {\n var self = this;\n var showLabel = self.get('showLabel');\n var showNodeLabel = showLabel === 'node' || showLabel === 'both';\n var showEdgeLabel = showLabel === 'edge' || showLabel === 'both';\n self.set('showNodeLabel', showNodeLabel);\n self.set('showEdgeLabel', showEdgeLabel);\n var shouldShow = self.get('shouldShow');\n if (!shouldShow) self.set('shouldShow', function () {\n return true;\n });\n };\n // Create the delegate when the trigger is drag\n EdgeFilterLens.prototype.createDelegate = function (e) {\n var self = this;\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n self.filter(e);\n lensDelegate = self.get('delegate');\n // drag to move the lens\n lensDelegate.on('dragstart', function (evt) {});\n lensDelegate.on('drag', function (evt) {\n self.filter(evt);\n });\n // 绑定调整范围(r)\n // 由于 drag 用于改变 lens 位置,因此在此模式下,drag 不能用于调整 r\n // scaling r\n if (this.get('scaleRBy') === 'wheel') {\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n };\n /**\n * Scale the range by wheel\n * @param e mouse wheel event\n */\n EdgeFilterLens.prototype.scaleRByWheel = function (e) {\n var self = this;\n if (!e || !e.originalEvent) return;\n if (e.preventDefault) e.preventDefault();\n var graph = self.get('graph');\n var ratio;\n var lensDelegate = self.get('delegate');\n var lensCenter = lensDelegate ? {\n x: lensDelegate.attr('x'),\n y: lensDelegate.attr('y')\n } : undefined;\n var mousePos = lensCenter || graph.getPointByClient(e.clientX, e.clientY);\n if (e.originalEvent.wheelDelta < 0) {\n ratio = 1 - DELTA;\n } else {\n ratio = 1 / (1 - DELTA);\n }\n var maxR = self.get('maxR');\n var minR = self.get('minR');\n var r = self.get('r');\n if (r > (maxR || graph.get('height')) && ratio > 1 || r < (minR || graph.get('height') * 0.05) && ratio < 1) {\n ratio = 1;\n }\n r *= ratio;\n self.set('r', r);\n self.filter(e);\n };\n /**\n * Response function for mousemove, click, or drag to filter out the edges\n * @param e mouse event\n */\n EdgeFilterLens.prototype.filter = function (e) {\n var self = this;\n var graph = self.get('graph');\n var nodes = graph.getNodes();\n var hitNodesMap = {};\n var r = self.get('r');\n var type = self.get('type');\n var fCenter = {\n x: e.x,\n y: e.y\n };\n self.updateDelegate(fCenter, r);\n var shouldShow = self.get('shouldShow');\n var vShapes = self.get('vShapes');\n if (vShapes) {\n vShapes.forEach(function (shape) {\n shape.remove();\n shape.destroy();\n });\n }\n vShapes = [];\n nodes.forEach(function (node) {\n var model = node.getModel();\n var x = model.x,\n y = model.y;\n if (distance({\n x: x,\n y: y\n }, fCenter) < r) {\n hitNodesMap[model.id] = node;\n }\n });\n var edges = graph.getEdges();\n var hitEdges = [];\n edges.forEach(function (edge) {\n var model = edge.getModel();\n var sourceId = model.source;\n var targetId = model.target;\n if (shouldShow(model)) {\n if (type === 'only-source' || type === 'one') {\n if (hitNodesMap[sourceId] && !hitNodesMap[targetId]) hitEdges.push(edge);\n } else if (type === 'only-target' || type === 'one') {\n if (hitNodesMap[targetId] && !hitNodesMap[sourceId]) hitEdges.push(edge);\n } else if (type === 'both' && hitNodesMap[sourceId] && hitNodesMap[targetId]) {\n hitEdges.push(edge);\n }\n }\n });\n var showNodeLabel = self.get('showNodeLabel');\n var showEdgeLabel = self.get('showEdgelabel');\n // copy the shapes in hitEdges\n var group = graph.get('group');\n hitEdges.forEach(function (edge) {\n var shapes = edge.get('group').get('children');\n shapes.forEach(function (shape) {\n var shapeType = shape.get('type');\n var vShape = group.addShape(shapeType, {\n attrs: shape.attr()\n });\n vShapes.push(vShape);\n if (showNodeLabel && shapeType === 'text') {\n vShape.set('visible', true);\n }\n });\n });\n // copy the shape sof hitNodes\n Object.keys(hitNodesMap).forEach(function (key) {\n var node = hitNodesMap[key];\n var clonedGroup = node.get('group').clone();\n group.add(clonedGroup);\n vShapes.push(clonedGroup);\n if (showEdgeLabel) {\n var shapes = clonedGroup.get('children');\n for (var j = 0; j < shapes.length; j++) {\n var shape = shapes[j];\n if (shape.get('type') === 'text') {\n shape.set('visible', true);\n }\n }\n }\n });\n self.set('vShapes', vShapes);\n };\n /**\n * Adjust part of the parameters, including trigger, type, r, maxR, minR, shouldShow, showLabel, and scaleRBy\n * @param {EdgeFilterLensConfig} cfg\n */\n EdgeFilterLens.prototype.updateParams = function (cfg) {\n var self = this;\n var r = cfg.r,\n trigger = cfg.trigger,\n minR = cfg.minR,\n maxR = cfg.maxR,\n scaleRBy = cfg.scaleRBy,\n showLabel = cfg.showLabel,\n shouldShow = cfg.shouldShow;\n if (!isNaN(cfg.r)) {\n self.set('r', r);\n }\n if (!isNaN(maxR)) {\n self.set('maxR', maxR);\n }\n if (!isNaN(minR)) {\n self.set('minR', minR);\n }\n if (trigger === 'mousemove' || trigger === 'click') {\n self.set('trigger', trigger);\n }\n if (scaleRBy === 'wheel' || scaleRBy === 'unset') {\n self.set('scaleRBy', scaleRBy);\n self.get('delegate').remove();\n self.get('delegate').destroy();\n var dPercentText = self.get('dPercentText');\n if (dPercentText) {\n dPercentText.remove();\n dPercentText.destroy();\n }\n }\n if (showLabel === 'node' || showLabel === 'both') {\n self.set('showNodeLabel', true);\n }\n if (showLabel === 'edge' || showLabel === 'both') {\n self.set('showEdgeLabel', true);\n }\n if (shouldShow) {\n self.set('shouldShow', shouldShow);\n }\n };\n /**\n * Update the delegate shape of the lens\n * @param {Point} mCenter the center of the shape\n * @param {number} r the radius of the shape\n */\n EdgeFilterLens.prototype.updateDelegate = function (mCenter, r) {\n var self = this;\n var graph = self.get('graph');\n var lensDelegate = self.get('delegate');\n if (!lensDelegate || lensDelegate.destroyed) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = self.get('delegateStyle') || lensDelegateStyle;\n // model上的x, y是相对于图形中心的,delegateShape是g实例,x,y是绝对坐标\n lensDelegate = parent_1.addShape('circle', {\n attrs: __assign({\n r: r,\n x: mCenter.x,\n y: mCenter.y\n }, attrs),\n name: 'lens-shape',\n draggable: true\n });\n if (this.get('trigger') !== 'drag') {\n // 调整范围 r 的监听\n if (this.get('scaleRBy') === 'wheel') {\n // 使用滚轮调整 r\n lensDelegate.on('mousewheel', function (evt) {\n self.scaleRByWheel(evt);\n });\n }\n }\n } else {\n lensDelegate.attr({\n x: mCenter.x,\n y: mCenter.y,\n r: r\n });\n }\n self.set('delegate', lensDelegate);\n };\n /**\n * Clear the filtering\n */\n EdgeFilterLens.prototype.clear = function () {\n var self = this;\n var vShapes = self.get('vShapes');\n if (vShapes) {\n vShapes.forEach(function (shape) {\n shape.remove();\n shape.destroy();\n });\n }\n vShapes = [];\n self.set('vShapes', vShapes);\n var lensDelegate = self.get('delegate');\n if (lensDelegate && !lensDelegate.destroyed) {\n lensDelegate.remove();\n lensDelegate.destroy();\n }\n };\n /**\n * Destroy the component\n */\n EdgeFilterLens.prototype.destroy = function () {\n this.clear();\n };\n return EdgeFilterLens;\n}(Base);\nexport default EdgeFilterLens;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nimport { each, mix } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport Base from '../base';\nvar pointLineDistance = Util.pointLineDistance;\n// 对齐线样式\nvar alignLineStyle = {\n stroke: '#FA8C16',\n lineWidth: 1\n};\nvar SnapLine = /** @class */function (_super) {\n __extends(SnapLine, _super);\n function SnapLine(props) {\n return _super.call(this, props) || this;\n }\n SnapLine.prototype.getDefaultCfgs = function () {\n return {\n line: alignLineStyle,\n /**\n * item align type\n * @type {String|True|False}\n */\n itemAlignType: 'center',\n /**\n * tolerance to item force align\n * @type {String|True|False}\n */\n tolerance: 5,\n horizontalLines: {},\n verticalLines: {},\n alignLines: []\n };\n };\n SnapLine.prototype.init = function () {};\n // class-methods-use-this\n SnapLine.prototype.getEvents = function () {\n return {\n 'node:dragstart': 'onDragStart',\n 'node:drag': 'onDrag',\n 'node:dragend': 'onDragEnd'\n };\n };\n SnapLine.prototype.onDragStart = function () {\n this.initBoxLine();\n };\n SnapLine.prototype.onDrag = function (e) {\n var item = e.item;\n // 计算辅助线位置,拖动过程中更新辅助线\n var delegateShape = item.get('delegateShape') || item;\n var bbox = delegateShape.getBBox();\n var model = item.getModel();\n var dx = model.x - bbox.x;\n var dy = model.y - bbox.y;\n this.show({\n x: bbox.minX + dx,\n y: bbox.minY + dy\n }, {\n width: bbox.width,\n height: bbox.height\n });\n };\n SnapLine.prototype.onDragEnd = function () {\n // 拖动结束时候删除辅助线\n this.destory();\n };\n /**\n * 每次开始拖动之前,计算出所有节点在水平和垂直方向上,左中右三条中线,并缓存起来\n *\n * @param {object} item Node节点\n * @memberof AlignLine\n */\n SnapLine.prototype.initBoxLine = function () {\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines,\n itemAlignType = _a.itemAlignType;\n var graph = this.get('graph');\n var nodes = graph.getNodes();\n nodes.forEach(function (item) {\n var bbox = item.getBBox();\n var nodeId = item.get('id');\n // 设置水平方向辅助线\n if (itemAlignType === true || itemAlignType === 'horizontal') {\n // tltr: top left top right\n // lcrc: left center right center\n // blbr: bottom left bottom right\n horizontalLines[\"\".concat(nodeId, \"tltr\")] = [bbox.minX, bbox.minY, bbox.maxX, bbox.minY, item];\n horizontalLines[\"\".concat(nodeId, \"lcrc\")] = [bbox.minX, bbox.centerY, bbox.maxX, bbox.centerY, item];\n horizontalLines[\"\".concat(nodeId, \"blbr\")] = [bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY, item];\n } else if (itemAlignType === 'center') {\n horizontalLines[\"\".concat(nodeId, \"lcrc\")] = [bbox.minX, bbox.centerY, bbox.maxX, bbox.centerY, item];\n }\n // 设置垂直方向辅助线\n if (itemAlignType === true || itemAlignType === 'vertical') {\n // tlbl: top left bottom left\n // tcbc: top center bottom center\n // trbr: top right bottom right\n verticalLines[\"\".concat(nodeId, \"tlbl\")] = [bbox.minX, bbox.minY, bbox.minX, bbox.maxY, item];\n verticalLines[\"\".concat(nodeId, \"tcbc\")] = [bbox.centerX, bbox.minY, bbox.centerX, bbox.maxY, item];\n verticalLines[\"\".concat(nodeId, \"trbr\")] = [bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY, item];\n } else if (itemAlignType === 'center') {\n verticalLines[\"\".concat(nodeId, \"tcbc\")] = [bbox.centerX, bbox.minY, bbox.centerX, bbox.maxY, item];\n }\n });\n };\n /**\n * 显示AlignLine\n *\n * @param {object} point 起始点\n * @param {object} bbox BBox\n * @returns\n * @memberof AlignLine\n */\n SnapLine.prototype.show = function (point, bbox) {\n var originPoint = mix({}, point);\n this.itemAlign(point, bbox, originPoint);\n return point;\n };\n /**\n * 拖动拖出中添加辅助线\n *\n * @param {object} point 起始点\n * @param {object} bbox 代理形状的bbox\n * @param {object} originPoint 原始点,同point\n * @memberof AlignLine\n */\n SnapLine.prototype.itemAlign = function (point, bbox, originPoint) {\n var _this = this;\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines,\n tolerance = _a.tolerance;\n var tc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y\n };\n var cc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y + bbox.height / 2\n };\n var bc = {\n x: originPoint.x + bbox.width / 2,\n y: originPoint.y + bbox.height\n };\n var lc = {\n x: originPoint.x,\n y: originPoint.y + bbox.height / 2\n };\n var rc = {\n x: originPoint.x + bbox.width,\n y: originPoint.y + bbox.height / 2\n };\n var horizontalDis = [];\n var verticalDis = [];\n var alignCfg = null;\n this.clearAlignLine();\n each(horizontalLines, function (line) {\n if (line[4].isVisible) {\n horizontalDis.push(_this.getLineDisObject(line, tc));\n horizontalDis.push(_this.getLineDisObject(line, cc));\n horizontalDis.push(_this.getLineDisObject(line, bc));\n }\n });\n each(verticalLines, function (line) {\n if (line[4].isVisible) {\n verticalDis.push(_this.getLineDisObject(line, lc));\n verticalDis.push(_this.getLineDisObject(line, cc));\n verticalDis.push(_this.getLineDisObject(line, rc));\n }\n });\n horizontalDis.sort(function (a, b) {\n return a.dis - b.dis;\n });\n verticalDis.sort(function (a, b) {\n return a.dis - b.dis;\n });\n if (horizontalDis.length !== 0 && horizontalDis[0].dis < tolerance) {\n point.y = horizontalDis[0].line[1] - horizontalDis[0].point.y + originPoint.y;\n alignCfg = {\n type: 'item',\n horizontals: [horizontalDis[0]]\n };\n for (var i = 1; i < 3; i++) {\n if (horizontalDis[0].dis === horizontalDis[i].dis) {\n alignCfg.horizontals.push(horizontalDis[i]);\n }\n }\n }\n if (verticalDis.length !== 0 && verticalDis[0].dis < tolerance) {\n point.x = verticalDis[0].line[0] - verticalDis[0].point.x + originPoint.x;\n if (!alignCfg) {\n alignCfg = {\n type: 'item',\n verticals: [verticalDis[0]]\n };\n } else {\n alignCfg.verticals = [verticalDis[0]];\n }\n for (var i = 1; i < 3; i++) {\n if (verticalDis[0].dis === verticalDis[i].dis) {\n alignCfg.verticals.push(verticalDis[i]);\n }\n }\n }\n if (alignCfg) {\n alignCfg.bbox = bbox;\n this.addAlignLine(alignCfg);\n }\n };\n /**\n * 根据配置项添加辅助线\n *\n * @param {object} cfg\n * @memberof AlignLine\n */\n SnapLine.prototype.addAlignLine = function (cfg) {\n var bbox = cfg.bbox,\n type = cfg.type,\n horizontals = cfg.horizontals,\n verticals = cfg.verticals;\n var _a = this._cfgs,\n lineStyle = _a.line,\n alignLines = _a.alignLines;\n var graph = this.get('graph');\n var group = graph.get('group');\n if (type === 'item') {\n if (horizontals) {\n each(horizontals, function (horizontal) {\n var refLine = horizontal.line,\n refPoint = horizontal.point;\n var lineCenterX = (refLine[0] + refLine[2]) / 2;\n var x1;\n var x2;\n if (refPoint.x < lineCenterX) {\n x1 = refPoint.x - bbox.width / 2;\n x2 = Math.max(refLine[0], refLine[2]);\n } else {\n x1 = refPoint.x + bbox.width / 2;\n x2 = Math.min(refLine[0], refLine[2]);\n }\n var lineAttrs = mix({\n x1: x1,\n y1: refLine[1],\n x2: x2,\n y2: refLine[1]\n }, lineStyle);\n var line = group.addShape('line', {\n attrs: lineAttrs,\n capture: false\n });\n alignLines.push(line);\n });\n }\n if (verticals) {\n each(verticals, function (vertical) {\n var refLine = vertical.line,\n refPoint = vertical.point;\n var lineCenterY = (refLine[1] + refLine[3]) / 2;\n var y1;\n var y2;\n if (refPoint.y < lineCenterY) {\n y1 = refPoint.y - bbox.height / 2;\n y2 = Math.max(refLine[1], refLine[3]);\n } else {\n y1 = refPoint.y + bbox.height / 2;\n y2 = Math.min(refLine[1], refLine[3]);\n }\n var lineAtts = mix({\n x1: refLine[0],\n y1: y1,\n x2: refLine[0],\n y2: y2\n }, lineStyle);\n var line = group.addShape('line', {\n attrs: lineAtts,\n capture: false\n });\n alignLines.push(line);\n });\n }\n }\n };\n /**\n * 获取点到线的距离\n *\n * @param {array} line [x1, y1, x2, y2] 线的四个点\n * @param {object} point 点的x和y坐标点 {x, y}\n * @returns\n * @memberof AlignLine\n */\n SnapLine.prototype.getLineDisObject = function (line, point) {\n return {\n line: line,\n point: point,\n dis: pointLineDistance(line, point)\n };\n };\n SnapLine.prototype.getContainer = function () {\n return this.get('container');\n };\n /**\n * 拖动过程中,清楚上次绘制的线\n *\n * @memberof AlignLine\n */\n SnapLine.prototype.clearAlignLine = function () {\n var alignLines = this._cfgs.alignLines;\n each(alignLines, function (line) {\n line.remove();\n });\n alignLines.length = 0;\n };\n /**\n * 拖动结束时候,情况缓存的节点的辅助线,同时删除绘制的线\n *\n * @memberof AlignLine\n */\n SnapLine.prototype.destory = function () {\n var _a = this._cfgs,\n horizontalLines = _a.horizontalLines,\n verticalLines = _a.verticalLines;\n var graph = this.get('graph');\n var nodes = graph.getNodes();\n nodes.forEach(function (node) {\n var itemId = node.get('id');\n delete horizontalLines[\"\".concat(itemId, \"tltr\")];\n delete horizontalLines[\"\".concat(itemId, \"lcrc\")];\n delete horizontalLines[\"\".concat(itemId, \"blbr\")];\n delete verticalLines[\"\".concat(itemId, \"tlbl\")];\n delete verticalLines[\"\".concat(itemId, \"tcbc\")];\n delete verticalLines[\"\".concat(itemId, \"trbr\")];\n });\n this.clearAlignLine();\n };\n return SnapLine;\n}(Base);\nexport default SnapLine;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport Base from '../base';\nimport { isArray, isNumber, uniqueId } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport { Canvas } from '@antv/g-canvas';\nvar ALLOW_EVENTS = ['click', 'mouseenter'];\nvar Legend = /** @class */function (_super) {\n __extends(Legend, _super);\n function Legend(config) {\n return _super.call(this, config) || this;\n }\n Legend.prototype.getDefaultCfgs = function () {\n return {\n data: {},\n position: 'top',\n padding: 8,\n margin: 8,\n offsetX: 0,\n offsetY: 0,\n layout: 'horizontal',\n flipPage: false,\n containerStyle: {},\n align: undefined,\n horiSep: 8,\n vertiSep: 8,\n filter: {\n enable: false,\n trigger: 'click'\n }\n };\n };\n Legend.prototype.init = function () {\n this.formatArray('padding');\n this.formatArray('margin');\n var filter = this.get('filter') || {};\n var multiple = filter.multiple;\n if (multiple && filter.trigger === 'mouseenter') this.set('multiple', false);\n var align = this.get('align');\n if (!align) {\n var positions = this.get('position').split('-');\n if (positions.includes('left')) align = 'left';\n if (positions.includes('right')) align = 'right';else align = 'center';\n this.set('align', align);\n }\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = createDom(\"
\");\n graphContainer.appendChild(container);\n this.set('container', container);\n var size = this.render();\n modifyCSS(container, this.getContainerPos(size));\n this.bindEvents();\n };\n Legend.prototype.getContainerPos = function (size) {\n if (size === void 0) {\n size = [0, 0];\n }\n var self = this;\n var graph = self.get('graph');\n var offsetX = this.get('offsetX');\n var offsetY = this.get('offsetY');\n var margin = this.get('margin');\n var positions = this.get('position').split('-');\n var posIdxMap = {\n 'top': 0,\n 'right': 1,\n 'bottom': 2,\n 'left': 3\n };\n var x = 0,\n y = 0;\n var containerCSS = {\n left: (graph.getWidth() - size[0]) / 2 + x,\n top: (graph.getHeight() - size[1]) / 2 + y\n };\n positions.forEach(function (pos) {\n var marginValue = margin[posIdxMap[pos]];\n var key = pos;\n switch (pos) {\n case 'top':\n marginValue += y;\n break;\n case 'left':\n marginValue += x;\n break;\n case 'bottom':\n marginValue = graph.getHeight() - size[1] - marginValue + y;\n key = 'top';\n break;\n default:\n marginValue = graph.getWidth() - size[0] - marginValue + x;\n key = 'left';\n break;\n }\n containerCSS[key] = marginValue;\n });\n containerCSS.top += offsetY + graph.getContainer().offsetTop;\n containerCSS.left += offsetX + graph.getContainer().offsetLeft;\n Object.keys(containerCSS).forEach(function (key) {\n containerCSS[key] = \"\".concat(containerCSS[key], \"px\");\n });\n return containerCSS;\n };\n // class-methods-use-this\n Legend.prototype.bindEvents = function () {\n var self = this;\n var filter = self.get('filter');\n if (!filter || !filter.enable) return;\n var trigger = filter.trigger || 'click';\n if (!ALLOW_EVENTS.includes(trigger)) {\n console.warn('Trigger for legend filterling must be \\'click\\' or \\'mouseenter\\', \\'click\\' will take effect by default.');\n trigger = 'click';\n }\n var lc = self.get('legendCanvas');\n if (trigger === 'mouseenter') {\n lc.on('node-container:mouseenter', function (e) {\n return self.filterData(e);\n });\n lc.on('node-container:mouseleave', function (e) {\n self.clearFilter();\n self.clearActiveLegend();\n });\n } else {\n lc.on('node-container:click', function (e) {\n return self.filterData(e);\n });\n lc.on('click', function (e) {\n if (e.target && e.target.isCanvas && e.target.isCanvas()) {\n self.clearFilter();\n self.clearActiveLegend();\n }\n });\n }\n };\n /**\n * 更新 legend 数据,开放给用户控制\n * @param param\n */\n Legend.prototype.changeData = function (data) {\n this.set('data', data);\n var size = this.render();\n modifyCSS(this.get('container'), this.getContainerPos(size));\n };\n Legend.prototype.activateLegend = function (shape) {\n var filter = this.get('filter');\n var multiple = filter === null || filter === void 0 ? void 0 : filter.multiple;\n if (!multiple) this.clearActiveLegend();\n var shapeGroup = shape.get('parent');\n // 若被高亮元素已经处于 active 状态,则取消它的 active 状态\n // 并根据目前是否有其他 active 状态的元素决定是否要设置为 inactive 状态\n if (shapeGroup.get('active')) {\n shapeGroup.set('active', false);\n if (this.findLegendItemsByState('active').length) shapeGroup.set('inactive', true);\n } else {\n shapeGroup.set('inactive', false);\n shapeGroup.set('active', true);\n }\n // 当目前有元素为 active 状态时,将非 active 的元素设置为 inactive\n if (this.findLegendItemsByState('active').length) {\n this.findLegendItemsByState('active', 'all', false).forEach(function (subGroup) {\n subGroup.set('inactive', true);\n });\n } else {\n this.clearActiveLegend();\n }\n // 设置样式\n var stateStyles = (filter === null || filter === void 0 ? void 0 : filter.legendStateStyles) || {};\n var legendInactive = (stateStyles === null || stateStyles === void 0 ? void 0 : stateStyles.inactive) || {\n opacity: 0.5,\n 'text-shape': {\n opacity: 0.5\n }\n };\n var legendTextInactive = legendInactive['text-shape'] || {};\n this.findLegendItemsByState('inactive').forEach(function (subGroup) {\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(__assign(__assign({}, keyShape.get('oriAttrs')), legendInactive));\n text.attr(__assign(__assign({}, text.get('oriAttrs')), legendTextInactive));\n });\n var legendActive = (stateStyles === null || stateStyles === void 0 ? void 0 : stateStyles.active) || {\n stroke: '#000',\n lineWidth: 2,\n 'text-shape': {\n fontWeight: 'bold'\n }\n };\n var legendTextActive = legendActive['text-shape'] || {};\n this.findLegendItemsByState('active').forEach(function (subGroup) {\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(__assign(__assign({}, keyShape.get('oriAttrs')), legendActive));\n text.attr(__assign(__assign({}, text.get('oriAttrs')), legendTextActive));\n });\n };\n Legend.prototype.findLegendItemsByState = function (stateName, type, value) {\n if (type === void 0) {\n type = 'all';\n }\n if (value === void 0) {\n value = true;\n }\n var group = this.get('legendCanvas').find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n if (type === 'node') return nodeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n });\n if (type === 'edge') return edgeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n });\n return nodeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n }).concat(edgeGroup.get('children').filter(function (g) {\n return !!g.get(stateName) === value;\n }));\n };\n Legend.prototype.clearActiveLegend = function () {\n var lg = this.get('legendCanvas');\n var group = lg.find(function (e) {\n return e.get('name') === 'root';\n });\n var groups = [group.find(function (e) {\n return e.get('name') === 'node-group';\n }), group.find(function (e) {\n return e.get('name') === 'edge-group';\n })];\n groups.forEach(function (itemGroup) {\n itemGroup.get('children').forEach(function (subGroup) {\n subGroup.set('active', false);\n subGroup.set('inactive', false);\n var _a = subGroup.get('children'),\n keyShape = _a[0],\n text = _a[1];\n keyShape.attr(keyShape.get('oriAttrs'));\n text.attr(text.get('oriAttrs'));\n });\n });\n };\n /**\n * 高亮和置灰图例,并过滤主图元素\n * @param param\n */\n Legend.prototype.filterData = function (e) {\n var filter = this.get('filter');\n var filterFunctions = filter === null || filter === void 0 ? void 0 : filter.filterFunctions;\n if (!filter || !filterFunctions) return;\n var lc = this.get('legendCanvas');\n var graph = this.get('graph');\n var activeState = filter.graphActiveState || 'active';\n var inactiveState = filter.graphInactiveState || 'inactive';\n var multiple = filter.multiple;\n this.clearFilter();\n if (!multiple) this.clearActiveLegend();\n // 设置 legend 的高亮状态\n this.activateLegend(e.target);\n var group = lc.find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n var activeNodeLegend = nodeGroup.get('children').filter(function (e) {\n return e.get('active');\n });\n var activeEdgeLegend = edgeGroup.get('children').filter(function (e) {\n return e.get('active');\n });\n var activeCount = 0;\n var typeFuncs = ['getNodes', 'getEdges'];\n typeFuncs.forEach(function (typeFunc) {\n graph[typeFunc]().forEach(function (graphItem) {\n var active = false;\n var activeLegend = typeFunc === 'getNodes' ? activeNodeLegend : activeEdgeLegend;\n activeLegend.forEach(function (itemGroup) {\n var func = filterFunctions[itemGroup.get('id')];\n active = active || func(graphItem.getModel());\n });\n if (active) {\n graph.setItemState(graphItem, inactiveState, false);\n graph.setItemState(graphItem, activeState, true);\n activeCount++;\n } else {\n graph.setItemState(graphItem, activeState, false);\n graph.setItemState(graphItem, inactiveState, true);\n }\n });\n });\n if (!activeCount) typeFuncs.forEach(function (typeFunc) {\n graph[typeFunc]().forEach(function (graphItem) {\n graph.clearItemStates(graphItem, [inactiveState]);\n });\n });\n };\n /**\n * 清除主图相关状态\n * @param param\n */\n Legend.prototype.clearFilter = function () {\n // 清除 legend 的高亮状态\n var graph = this.get('graph');\n var filter = this.get('filter');\n if (!filter) return;\n var activeState = filter.graphActiveState || 'active';\n var inactiveState = filter.graphInactiveState || 'inactive';\n graph.getNodes().forEach(function (node) {\n graph.clearItemStates(node, [activeState, inactiveState]);\n });\n graph.getEdges().forEach(function (edge) {\n graph.clearItemStates(edge, [activeState, inactiveState]);\n });\n };\n /**\n * 渲染 legend 图\n * @param param\n */\n Legend.prototype.render = function () {\n var _this = this;\n this.processData();\n var lc = this.get('legendCanvas');\n if (!lc) {\n lc = new Canvas({\n container: this.get('container'),\n width: 200,\n height: 200\n });\n } else {\n lc.clear();\n }\n var group = lc.addGroup({\n name: 'root'\n });\n var nodeGroup = group.addGroup({\n name: 'node-group'\n });\n var edgeGroup = group.addGroup({\n name: 'edge-group'\n });\n this.set('legendCanvas', lc);\n var itemsData = this.get('itemsData');\n var itemTypes = ['nodes', 'edges'];\n var itemGroup = [nodeGroup, edgeGroup];\n itemTypes.forEach(function (itemType, i) {\n itemsData[itemType].forEach(function (data) {\n var _a;\n var subGroup = itemGroup[i].addGroup({\n id: data.id,\n name: 'node-container'\n });\n var attrs;\n var shapeType = data.type;\n var _b = _this.getShapeSize(data),\n width = _b.width,\n height = _b.height,\n r = _b.r;\n var style = _this.getStyle(itemType.substr(0, 4), data);\n switch (data.type) {\n case 'circle':\n attrs = {\n r: r,\n x: 0,\n y: 0\n };\n break;\n case 'rect':\n attrs = {\n width: width,\n height: height,\n x: -width / 2,\n y: -height / 2\n };\n break;\n case 'ellipse':\n attrs = {\n rx: width,\n ry: height,\n x: 0,\n y: 0\n };\n shapeType = 'ellipse';\n break;\n case 'line':\n attrs = {\n x1: -width / 2,\n y1: 0,\n x2: width / 2,\n y2: 0\n };\n shapeType = 'line';\n break;\n case 'quadratic':\n attrs = {\n path: [['M', -width / 2, 0], ['Q', 0, width / 2, width / 2, 0]]\n };\n shapeType = 'path';\n break;\n case 'cubic':\n attrs = {\n path: [['M', -width / 2, 0], ['C', -width / 6, width / 2, width / 6, -width / 2, width / 2, 0]]\n };\n shapeType = 'path';\n break;\n case 'diamond':\n attrs = {\n path: [['M', 0, -height], ['L', width, 0], ['L', 0, height], ['L', -width, 0], ['Z']]\n };\n shapeType = 'path';\n break;\n case 'triangle':\n attrs = {\n path: [['M', -width, height], ['L', 0, -height], ['L', width, height], ['Z']]\n };\n shapeType = 'path';\n break;\n case 'star':\n attrs = {\n path: Util.getStarPath(r * 3, r * 1.2)\n };\n shapeType = 'path';\n break;\n default:\n attrs = {\n r: r,\n x: 0,\n y: 0\n };\n break;\n }\n var keyShape = subGroup.addShape(shapeType, {\n attrs: __assign(__assign({}, attrs), style),\n name: \"\".concat(data.type, \"-node-keyShape\"),\n oriAttrs: __assign({\n opacity: 1\n }, style)\n });\n if (data.label) {\n var keyShapeBBox = keyShape.getBBox();\n var labelStyle = ((_a = data.labelCfg) === null || _a === void 0 ? void 0 : _a.style) || {};\n var attrs_1 = __assign({\n textAlign: 'begin',\n fontSize: 12,\n textBaseline: 'middle',\n fill: '#000',\n opacity: 1,\n fontWeight: 'normal'\n }, labelStyle);\n subGroup.addShape('text', {\n attrs: __assign({\n x: keyShapeBBox.maxX + 4,\n y: 0,\n text: data.label\n }, attrs_1),\n className: 'legend-label',\n name: \"\".concat(data.type, \"-node-text\"),\n oriAttrs: attrs_1\n });\n }\n });\n });\n var padding = this.get('padding');\n var titleShape;\n var titleGroup = group.find(function (e) {\n return e.get('name') === 'title-container';\n });\n var titleGroupBBox = {\n height: 0,\n maxY: 0,\n width: 0\n };\n if (this.get('title')) {\n if (!titleGroup) {\n titleGroup = group.addGroup({\n name: 'title-container'\n });\n }\n var defaultTitleStyle = {\n fontSize: 20,\n fontFamily: 'Arial',\n fontWeight: 300,\n textBaseline: 'top',\n textAlign: 'center',\n fill: \"#000\",\n x: 0,\n y: padding[0]\n };\n var titleConfig = this.get('titleConfig') || {};\n var style = Object.assign(defaultTitleStyle, titleConfig.style || {});\n titleShape = titleGroup.addShape('text', {\n attrs: __assign({\n text: this.get('title')\n }, style)\n });\n titleGroupBBox = titleGroup.getCanvasBBox();\n titleGroup.setMatrix([1, 0, 0, 0, 1, 0, titleConfig.offsetX, titleConfig.offsetY, 1]);\n }\n this.layoutItems();\n var lcBBox = group.getCanvasBBox();\n var nodeGroupBBox = nodeGroup.getCanvasBBox();\n // 若有图形超过边界的情况,平移回来\n var nodeGroupBeginX = nodeGroupBBox.minX < 0 ? Math.abs(nodeGroupBBox.minX) + padding[3] : padding[3];\n var nodeGroupBeginY = titleGroupBBox.maxY < nodeGroupBBox.minY ? Math.abs(titleGroupBBox.maxY - nodeGroupBBox.minY) + padding[0] : titleGroupBBox.maxY + padding[0];\n var nodeGroupMatrix = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n nodeGroup.setMatrix(nodeGroupMatrix);\n lcBBox = group.getCanvasBBox();\n var size = [lcBBox.minX + lcBBox.width + padding[1], lcBBox.minY + lcBBox.height + padding[2]];\n // 根据 size 和 titleConfig 调整 title 位置,再调整 nodeGroup 位置\n if (titleShape) {\n var titleConfig = __assign({\n position: 'center',\n offsetX: 0,\n offsetY: 0\n }, this.get('titleConfig'));\n titleGroupBBox = titleGroup.getCanvasBBox();\n var titleGroupMatrix = titleGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (titleConfig.position === 'center') {\n titleGroupMatrix[6] = size[0] / 2 + titleConfig.offsetX;\n } else if (titleConfig.position === 'right') {\n titleGroupMatrix[6] = size[0] - padding[3] + titleConfig.offsetX;\n titleShape.attr({\n textAlign: 'right'\n });\n } else {\n titleGroupMatrix[6] = padding[3] + titleConfig.offsetX;\n titleShape.attr({\n textAlign: 'left'\n });\n }\n titleGroup.setMatrix(titleGroupMatrix);\n titleGroupBBox = titleGroup.getCanvasBBox();\n // 若有图形超过边界的情况,平移回来\n nodeGroupBeginX = nodeGroupBBox.minX < 0 ? Math.abs(nodeGroupBBox.minX) + padding[3] : padding[3];\n nodeGroupBeginY = nodeGroupBBox.minY < titleGroupBBox.maxY ? Math.abs(titleGroupBBox.maxY - nodeGroupBBox.minY) + padding[0] : titleGroupBBox.maxY + padding[0];\n nodeGroupMatrix = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n nodeGroup.setMatrix(nodeGroupMatrix);\n var edgeGroupMatrix_1 = [1, 0, 0, 0, 1, 0, nodeGroupBeginX, nodeGroupBeginY, 1];\n if (this.get('layout') === 'vertical') edgeGroupMatrix_1[6] += nodeGroupBBox.maxX + this.get('horiSep');else edgeGroupMatrix_1[7] += nodeGroupBBox.maxY + this.get('vertiSep');\n edgeGroup.setMatrix(edgeGroupMatrix_1);\n } else {\n // 没有 title,也需要平移 edgeGroup\n nodeGroupBBox = nodeGroup.getCanvasBBox();\n var edgeGroupMatrix_2 = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (this.get('layout') === 'vertical') edgeGroupMatrix_2[6] += nodeGroupMatrix[6] + nodeGroupBBox.maxX + this.get('horiSep');else edgeGroupMatrix_2[7] += nodeGroupMatrix[7] + nodeGroupBBox.maxY + this.get('vertiSep');\n edgeGroup.setMatrix(edgeGroupMatrix_2);\n }\n lcBBox = group.getCanvasBBox();\n nodeGroupBBox = nodeGroup.getCanvasBBox();\n nodeGroupMatrix = nodeGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var edgeGroupMatrix = edgeGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var edgeGroupBBox = edgeGroup.getCanvasBBox();\n size = [Math.max(nodeGroupBBox.width + nodeGroupMatrix[6], edgeGroupBBox.width + edgeGroupMatrix[6]) + padding[1], Math.max(nodeGroupBBox.height + nodeGroupMatrix[7], edgeGroupBBox.height + edgeGroupMatrix[7]) + padding[2]];\n lc.changeSize(size[0], size[1]);\n // 更新容器背景样式\n var containerStyle = this.get('containerStyle');\n var viewportMatrix = group.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var beginPos = Util.invertMatrix({\n x: 0,\n y: 0\n }, viewportMatrix);\n var backRect = group.addShape('rect', {\n attrs: __assign({\n x: beginPos.x + (containerStyle.lineWidth || 1),\n y: beginPos.y + (containerStyle.lineWidth || 1),\n width: size[0] - 2 * (containerStyle.lineWidth || 1),\n height: size[1] - 2 * (containerStyle.lineWidth || 1),\n fill: \"#f00\",\n stroke: '#000',\n lineWidth: 1,\n opacity: 0.5\n }, containerStyle),\n name: 'legend-back-rect',\n capture: false\n });\n backRect.toBack();\n return size;\n };\n Legend.prototype.layoutItems = function () {\n var lc = this.get('legendCanvas');\n var horiSep = this.get('horiSep');\n var vertiSep = this.get('vertiSep');\n var layout = this.get('layout');\n var align = this.get('align');\n var begin = [0, 0];\n var group = lc.find(function (e) {\n return e.get('name') === 'root';\n });\n var nodeGroup = group.find(function (e) {\n return e.get('name') === 'node-group';\n });\n var edgeGroup = group.find(function (e) {\n return e.get('name') === 'edge-group';\n });\n var nodeLegendSize = {\n min: 0,\n max: -Infinity\n };\n var rowMaxY = -Infinity;\n nodeGroup.get('children').forEach(function (cNodeGroup, i) {\n if (i === 0) nodeLegendSize.min = begin[0];\n var keyShape = cNodeGroup.get('children')[0];\n var bbox = cNodeGroup.getCanvasBBox();\n var _a = keyShape.getBBox(),\n keyShapeWidth = _a.width,\n keyShapeHeight = _a.height;\n var curHeight = 0,\n x = 0,\n y = 0;\n if (layout === 'vertical') {\n x = begin[1];\n y = begin[0] + keyShapeWidth / 2;\n begin[0] = y + bbox.height + vertiSep;\n curHeight = bbox.maxX + x + keyShapeWidth / 2;\n } else {\n x = begin[0] + keyShapeWidth / 2;\n y = begin[1];\n begin[0] = x + bbox.width + horiSep;\n curHeight = bbox.maxY + y + keyShapeHeight / 2;\n }\n if (begin[0] > nodeLegendSize.max) nodeLegendSize.max = begin[0];\n if (curHeight > rowMaxY) rowMaxY = curHeight;\n cNodeGroup.setMatrix([1, 0, 0, 0, 1, 0, x, y, 1]);\n });\n var nw = nodeLegendSize.max - nodeLegendSize.min;\n var edgeLegendSize = {\n min: 0,\n max: -Infinity\n };\n var nodeGroupBBox = nodeGroup.getCanvasBBox();\n begin[0] = 0;\n begin[1] = layout === 'vertical' ? nodeGroupBBox.maxX + horiSep : nodeGroupBBox.maxY + vertiSep;\n edgeGroup.get('children').forEach(function (subGroup, i) {\n if (i === 0) edgeLegendSize.min = begin[0];\n var keyShape = subGroup.get('children')[0];\n var bbox = subGroup.getCanvasBBox();\n var _a = keyShape.getBBox(),\n keyShapeWidth = _a.width,\n keyShapeHeight = _a.height;\n var x = 0,\n y = 0;\n if (layout === 'vertical') {\n x = begin[1];\n y = begin[0];\n begin[0] = y + bbox.height + vertiSep;\n subGroup.setMatrix([1, 0, 0, 0, 1, 0, 0, y + keyShapeHeight / 2, 1]);\n } else {\n x = begin[0];\n y = begin[1];\n begin[0] = x + bbox.width + horiSep;\n subGroup.setMatrix([1, 0, 0, 0, 1, 0, x + keyShapeWidth / 2, 0, 1]);\n }\n if (begin[0] > edgeLegendSize.max) edgeLegendSize.max = begin[0];\n });\n var ew = edgeLegendSize.max - edgeLegendSize.min;\n if (align && align !== '' && align !== 'left') {\n var widthDiff = nw - ew;\n var movement_1 = align === 'center' ? Math.abs(widthDiff) / 2 : Math.abs(widthDiff);\n var shouldAdjustGroup = widthDiff < 0 ? nodeGroup : edgeGroup;\n shouldAdjustGroup.get('children').forEach(function (subGroup) {\n var matrix = subGroup.getMatrix() || [1, 0, 0, 0, 1, 0, 0, 0, 1];\n if (layout === 'vertical') matrix[7] += movement_1;else matrix[6] += movement_1;\n subGroup.setMatrix(matrix);\n });\n }\n };\n Legend.prototype.processData = function () {\n var data = this.get('data');\n var itemsData = {\n nodes: [],\n edges: []\n };\n if (data.nodes) {\n data.nodes.sort(function (a, b) {\n return a.order - b.order;\n });\n data.nodes.forEach(function (node) {\n var _a, _b, _c, _d, _e;\n var size = node.size || [((_a = node.style) === null || _a === void 0 ? void 0 : _a.width) || ((_b = node.style) === null || _b === void 0 ? void 0 : _b.r) || 8, ((_c = node.style) === null || _c === void 0 ? void 0 : _c.height) || ((_d = node.style) === null || _d === void 0 ? void 0 : _d.r) || 8];\n var labelStyle = ((_e = node.labelCfg) === null || _e === void 0 ? void 0 : _e.style) || {};\n itemsData.nodes.push({\n id: node.id || uniqueId(),\n type: node.type || 'circle',\n style: __assign({}, node.style),\n order: node.order,\n label: node.label,\n itemType: 'node',\n size: size,\n labelCfg: {\n position: 'right',\n style: __assign({\n fontFamily: \"Arial\"\n }, labelStyle)\n }\n });\n });\n }\n if (data.edges) {\n data.edges.sort(function (a, b) {\n return a.order - b.order;\n });\n data.edges.forEach(function (edge) {\n var _a, _b;\n var type = edge.type || 'line';\n if (edge.type === 'cubic-horizontal') type = 'cubic';\n var labelStyle = ((_a = edge.labelCfg) === null || _a === void 0 ? void 0 : _a.style) || {};\n var size = edge.size || [((_b = edge.style) === null || _b === void 0 ? void 0 : _b.width) || 8, 1];\n itemsData.edges.push({\n id: edge.id || uniqueId(),\n type: type,\n size: size,\n style: __assign({\n lineWidth: isArray(size) ? size[1] : 1\n }, edge.style),\n order: edge.order,\n label: edge.label,\n itemType: 'edge',\n labelCfg: {\n position: 'right',\n style: __assign({\n fontFamily: \"Arial\"\n }, labelStyle)\n }\n });\n });\n }\n this.set('itemsData', itemsData);\n };\n Legend.prototype.getContainer = function () {\n return this.get('container');\n };\n Legend.prototype.formatArray = function (key) {\n var value = this.get(key);\n if (isNumber(value)) this.set(key, [value, value, value, value]);else if (isArray(value)) {\n switch (value.length) {\n case 0:\n this.set(key, [0, 0, 0, 0]);\n break;\n case 1:\n this.set(key, [value[0], value[0], value[0], value[0]]);\n break;\n case 2:\n this.set(key, [value[0], value[1], value[0], value[1]]);\n break;\n case 3:\n this.set(key, [value[0], value[1], value[2], value[1]]);\n break;\n default:\n break;\n }\n }\n return this.get(key);\n };\n Legend.prototype.getShapeSize = function (data) {\n var width, height, r;\n if (data.size) {\n if (isArray(data.size)) {\n width = data.size[0];\n height = data.size[1] || data.size[0];\n r = data.size[0] / 2;\n } else if (isNumber(data.size)) {\n width = data.size;\n height = data.size;\n r = data.size / 2;\n }\n }\n if (data.style) {\n if (data.style.width) width = data.style.width;\n if (data.style.height) height = data.style.height;\n if (data.style.r) r = data.style.r;\n }\n if (!r) r = 5;\n if (!width) width = r;\n if (!height) height = r;\n return {\n width: width,\n height: height,\n r: r\n };\n };\n Legend.prototype.getStyle = function (type, data) {\n var defaultStyle = type === 'node' ? {\n fill: '#ccc',\n lineWidth: 0\n } : {\n stroke: '#000',\n lineWidth: 1\n };\n return __assign(__assign({}, defaultStyle), data.style || {});\n };\n Legend.prototype.destroy = function () {\n var lc = this.get('legendCanvas');\n lc === null || lc === void 0 ? void 0 : lc.destroy();\n var graph = this.get('graph');\n var graphContainer = graph.get('container');\n var container = this.get('container');\n graphContainer.removeChild(container);\n };\n return Legend;\n}(Base);\nexport default Legend;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isNumber, debounce } from '@antv/util';\nimport { Util } from '@antv/g6-core';\nimport { modifyCSS, createDom } from '@antv/dom-util';\nimport insertCss from 'insert-css';\nimport { Canvas } from '@antv/g-canvas';\nimport Base from '../base';\ntypeof document !== 'undefined' && insertCss(\"\\n .g6-annotation-container {\\n background-color: rgba(255, 255, 255, 0.3);\\n padding: 8px;\\n }\\n .g6-annotation-wrapper {\\n background-color: #fff;\\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.85);\\n }\\n .g6-annotation-header-wapper {\\n height: fit-content;\\n width: 100%;\\n background-color: #5B8FF9;\\n display: inline-flex;\\n cursor: move;\\n }\\n .g6-annotation-title {\\n margin: 4px 40px 4px 8px;\\n cursor: text;\\n min-width: 32px;\\n }\\n .g6-annotation-collapse {\\n margin: 4px;\\n cursor: pointer;\\n }\\n .g6-annotation-expand {\\n margin: 4px;\\n cursor: pointer;\\n }\\n .g6-annotation-close {\\n margin: 4px 8px 4px 0;\\n cursor: pointer;\\n }\\n .g6-annotation-content {\\n padding: 8px;\\n width: fit-content;\\n cursor: text;\\n word-break: break-all;\\n min-width: 32px;\\n }\\n .g6-annotation-title-input-wrapper {\\n margin: 4px 40px 4px 8px;\\n }\\n .g6-annotation-content-input {\\n height: 100%;\\n word-break: break-all;\\n }\\n .g6-annotation-content-input-wrapper {\\n margin: 8px;\\n height: 100%;\\n }\\n\");\nvar CANVAS_ANNOTATION_ID = 'canvas-annotation';\nvar Annotation = /** @class */function (_super) {\n __extends(Annotation, _super);\n function Annotation(config) {\n return _super.call(this, config) || this;\n }\n Annotation.prototype.getDefaultCfgs = function () {\n return {\n trigger: 'click',\n editable: true,\n itemHighlightState: 'highlight',\n linkHighlightStyle: {\n shadowColor: '#5B8FF9',\n shadowBlur: 10\n },\n cardCfg: {\n minHeight: 60,\n width: 'fit-content',\n height: 'fit-content',\n collapseType: 'minimize',\n closeType: 'hide',\n borderRadius: 5,\n maxTitleLength: 20\n }\n };\n };\n // class-methods-use-this\n Annotation.prototype.getEvents = function () {\n var events = {\n 'viewportchange': 'updateLinks',\n 'afterlayout': 'updateLinks',\n 'aftergraphrefreshposition': 'updateLinks',\n 'afterupdateitem': 'updateLink',\n 'afterchangedata': 'onGraphDataChange',\n 'afteritemvisibilitychange': 'onGraphItemVisibilityChange'\n };\n switch (this.get('trigger')) {\n case 'click':\n events = __assign(__assign({}, events), {\n 'node:click': 'showAnnotation',\n 'edge:click': 'showAnnotation'\n });\n }\n return events;\n };\n Annotation.prototype.getDOMContent = function (cfg) {\n if (this.destroyed) return;\n var collapsed = cfg.collapsed,\n maxWidth = cfg.maxWidth,\n _a = cfg.title,\n title = _a === void 0 ? '' : _a,\n _b = cfg.content,\n content = _b === void 0 ? '' : _b,\n _c = cfg.borderRadius,\n r = _c === void 0 ? 5 : _c;\n var collapseExpandDOM = collapsed ? \"

+

\" : \"

-

\";\n var contentDOM = collapsed ? '' : \"

\".concat(content, \"

\");\n var closeDOM = \"

x

\";\n var borderRadius = collapsed ? \"\".concat(r, \"px\") : \"\".concat(r, \"px \").concat(r, \"px 0 0\");\n return \"
\\n \\n

\").concat(title, \"

\\n \").concat(collapseExpandDOM, \"\\n \").concat(closeDOM, \"\\n
\\n \").concat(contentDOM, \"\\n
\");\n };\n Annotation.prototype.init = function () {\n var self = this;\n if (self.destroyed) return;\n var graph = self.get('graph');\n var graphCantainer = graph.getContainer();\n var container = self.get('container');\n var containerCfg = this.get('containerCfg');\n if (containerCfg) {\n container = this.createContainer();\n graphCantainer.appendChild(container);\n } else {\n container = graphCantainer;\n }\n this.set('container', container);\n // 绘制连接 annotation 和元素的连线的画布\n var graphContainerBBox = graphCantainer.getBoundingClientRect();\n var linkCanvas = new Canvas({\n container: graphCantainer,\n width: graphContainerBBox.right - graphContainerBBox.left,\n height: graphContainerBBox.bottom - graphContainerBBox.top\n });\n modifyCSS(linkCanvas.get('el'), {\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none'\n });\n // 需要传入 self,无法 removeEventListener,只能在内部判断 self 被销毁则不继续\n window.addEventListener('resize', debounce(function () {\n return self.resizeCanvas(self);\n }, 100));\n var linkGroup = linkCanvas.addGroup({\n id: 'annotation-link-group'\n });\n self.set('linkGroup', linkGroup);\n self.set('canvas', linkCanvas);\n if (!self.get('getTitle')) {\n self.set('getTitle', function (item) {\n var _a;\n var _b = ((_a = item === null || item === void 0 ? void 0 : item.getModel) === null || _a === void 0 ? void 0 : _a.call(item)) || {},\n label = _b.label,\n id = _b.id;\n return label || id || '-';\n });\n }\n if (!self.get('getContent')) {\n self.set('getContent', function (item) {\n var _a, _b;\n if (!item) return '-';\n var _c = ((_a = item.getModel) === null || _a === void 0 ? void 0 : _a.call(item)) || {},\n label = _c.label,\n id = _c.id;\n var type = (_b = item.getType) === null || _b === void 0 ? void 0 : _b.call(item);\n var suffix = type ? \"\".concat(type, \": \") : '';\n return \"\".concat(suffix).concat(label || id || '');\n });\n }\n // init with defaultData\n var defaultData = self.get('defaultData');\n if (defaultData) this.readData(defaultData);\n };\n Annotation.prototype.createContainer = function () {\n var _this = this;\n if (this.destroyed) return;\n var containerCfg = this.get('containerCfg');\n var graph = this.get('graph');\n var graphContainer = graph.getContainer();\n var _a = graphContainer.getBoundingClientRect(),\n gLeft = _a.left,\n gRight = _a.right,\n gTop = _a.top,\n gBottom = _a.bottom;\n var graphContainerHeight = gBottom - gTop;\n var graphContainerWidth = gRight - gLeft;\n var _b = containerCfg.position,\n position = _b === void 0 ? 'top' : _b,\n _c = containerCfg.offsetX,\n offsetX = _c === void 0 ? 0 : _c,\n _d = containerCfg.offsetY,\n offsetY = _d === void 0 ? 0 : _d,\n otherStyle = __rest(containerCfg, [\"position\", \"offsetX\", \"offsetY\"]);\n var _e = containerCfg.height,\n height = _e === void 0 ? 'fit-content' : _e,\n _f = containerCfg.width,\n width = _f === void 0 ? graph.getWidth() : _f;\n if (height === '100%') height = graphContainerHeight;\n if (width === '100%') width = graphContainerWidth;\n var maxHeight = 'unset',\n maxWidth = 'unset';\n var containerPosition = {};\n switch (position) {\n case 'right':\n maxHeight = \"\".concat(graphContainerHeight, \"px\");\n containerPosition = {\n top: 0,\n right: 0\n };\n containerPosition.right += gLeft + offsetX;\n containerPosition.top += gTop + offsetY;\n break;\n case 'bottom':\n maxWidth = \"\".concat(graphContainerWidth, \"px\");\n containerPosition = {\n bottom: 0,\n left: 0\n };\n containerPosition.left += gLeft + offsetX;\n containerPosition.bottom += gTop + offsetY;\n break;\n case 'top':\n maxWidth = \"\".concat(graphContainerWidth, \"px\");\n case 'left':\n maxHeight = \"\".concat(graphContainerHeight, \"px\");\n default:\n containerPosition = {\n top: 0,\n left: 0\n };\n containerPosition.left += gLeft + offsetX;\n containerPosition.top += gTop + offsetY;\n break;\n }\n Object.keys(containerPosition).forEach(function (key) {\n containerPosition[key] = \"\".concat(containerPosition[key], \"px\");\n });\n var container = createDom(\"
\"));\n modifyCSS(container, __assign(__assign({\n position: 'absolute',\n display: position === 'top' || position === 'bottom' ? 'inline-flex' : 'unset',\n width: isNumber(width) ? \"\".concat(width, \"px\") : width,\n height: isNumber(height) ? \"\".concat(height, \"px\") : height,\n maxHeight: maxHeight,\n maxWidth: maxWidth,\n overflow: 'scroll'\n }, containerPosition), otherStyle));\n graphContainer.appendChild(container);\n container.addEventListener('scroll', function (e) {\n _this.updateLinks();\n });\n return container;\n };\n Annotation.prototype.resizeCanvas = function (self) {\n // 仅在 resize 完成后进行调整\n clearTimeout(self.resizeTimer);\n self.resizeTimer = setTimeout(function () {\n if (!self || self.destroyed) return;\n var cBBox = self.get('container').getBoundingClientRect();\n var newWidth = cBBox.right - cBBox.left;\n var newHeight = cBBox.bottom - cBBox.top;\n self.get('canvas').changeSize(newWidth, newHeight);\n self.updateOutsideCards(self);\n }, 250);\n };\n /**\n * 更新超出视口范围的卡片位置\n * @param selfObj 当前 annotation 插件对象。外部调用不需要传入该参数\n */\n Annotation.prototype.updateOutsideCards = function (selfObj) {\n var self = selfObj || this;\n var cardInfoMap = self.get('cardInfoMap') || {};\n var graph = self.get('graph');\n var graphLeftTopCanvas = graph.getPointByCanvas(0, 0);\n var graphRightBottomCanvas = graph.getPointByCanvas(graph.getWidth(), graph.getHeight());\n var _a = graph.getClientByPoint(graphLeftTopCanvas.x, graphLeftTopCanvas.y),\n graphLeft = _a.x,\n graphTop = _a.y;\n var _b = graph.getClientByPoint(graphRightBottomCanvas.x, graphRightBottomCanvas.y),\n graphRight = _b.x,\n graphBottom = _b.y;\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var card = cardInfo.card;\n if (!card) return;\n var style = card.style;\n var left = px2Num(style.left);\n var top = px2Num(style.top);\n var _a = card.getBoundingClientRect(),\n width = _a.width,\n height = _a.height;\n var newLeft = left;\n var newTop = top;\n if (left + width > graphRight - graphLeft) {\n newLeft = graphRight - graphLeft - width;\n }\n if (left < 0) {\n newLeft = 0;\n }\n if (top + height > graphBottom - graphTop) {\n newTop = graphBottom - graphTop - height;\n }\n if (top < 0) {\n newTop = 0;\n }\n modifyCSS(card, {\n left: \"\".concat(newLeft, \"px\"),\n top: \"\".concat(newTop, \"px\")\n });\n });\n self.updateLinks();\n };\n Annotation.prototype.showAnnotation = function (evt) {\n if (this.destroyed) return;\n var item = evt.item;\n this.toggleAnnotation(item);\n };\n Annotation.prototype.hideCards = function () {\n var self = this;\n if (self.destroyed) return;\n var cardInfoMap = self.get('cardInfoMap') || {};\n Object.keys(cardInfoMap).forEach(function (itemId) {\n self.hideCard(itemId);\n });\n };\n Annotation.prototype.toggleAnnotation = function (item, cfg) {\n var _a, _b;\n if (cfg === void 0) {\n cfg = {};\n }\n var self = this;\n if (self.destroyed) return;\n var cardInfoMap = self.get('cardInfoMap') || {};\n var graph = self.get('graph');\n var container = self.get('container');\n var containerCfg = self.get('containerCfg');\n var _c = Object.assign({}, self.get('cardCfg') || {}, cfg),\n minHeight = _c.minHeight,\n minWidth = _c.minWidth,\n width = _c.width,\n height = _c.height,\n _d = _c.collapsed,\n collapsed = _d === void 0 ? false : _d,\n propsX = _c.x,\n propsY = _c.y,\n propsTitle = _c.title,\n propsContent = _c.content,\n maxTitleLength = _c.maxTitleLength,\n defaultBegin = _c.defaultBegin,\n otherCardCfg = __rest(_c, [\"minHeight\", \"minWidth\", \"width\", \"height\", \"collapsed\", \"x\", \"y\", \"title\", \"content\", \"maxTitleLength\", \"defaultBegin\"]);\n var linkGroup = self.get('linkGroup');\n var rows = this.get('rows') || [[]];\n var isCanvas = (_a = item.isCanvas) === null || _a === void 0 ? void 0 : _a.call(item);\n var itemId = isCanvas ? CANVAS_ANNOTATION_ID : item.getID();\n var _e = cardInfoMap[itemId] || {},\n card = _e.card,\n link = _e.link,\n x = _e.x,\n y = _e.y,\n title = _e.title,\n content = _e.content;\n var getTitle = this.get('getTitle');\n var getContent = this.get('getContent');\n var getContentPlaceholder = this.get('getContentPlaceholder') || function () {\n return '';\n };\n var getTitlePlaceHolder = this.get('getTitlePlaceHolder') || function () {\n return '';\n };\n var contentPlaceholder = getContentPlaceholder(item);\n var titlePlaceholder = getTitlePlaceHolder(item);\n var newCard = createDom(this.getDOMContent(__assign({\n itemId: itemId,\n collapsed: collapsed,\n title: ((_b = title || propsTitle || (getTitle === null || getTitle === void 0 ? void 0 : getTitle(item))) === null || _b === void 0 ? void 0 : _b.substr(0, maxTitleLength)) || titlePlaceholder,\n content: content || propsContent || (getContent === null || getContent === void 0 ? void 0 : getContent(item)) || contentPlaceholder\n }, otherCardCfg)));\n var minHeightPx = isNumber(minHeight) ? \"\".concat(minHeight, \"px\") : minHeight;\n modifyCSS(newCard, {\n minHeight: collapsed ? 'unset' : minHeightPx,\n minWidth: isNumber(minWidth) ? \"\".concat(minWidth, \"px\") : minWidth,\n height: height,\n width: width\n });\n var exist = !!card;\n if (exist) {\n // 移除相应连线\n link === null || link === void 0 ? void 0 : link.remove(true);\n // 替换原来的卡片\n container.replaceChild(newCard, card);\n } else {\n container.appendChild(newCard);\n }\n var containerBBox;\n if (!containerCfg) {\n containerBBox = container.getBoundingClientRect() || {};\n if (propsX !== undefined && propsY !== undefined) {\n // 使用配置的位置\n x = propsX;\n y = propsY;\n } else if (!exist && !isCanvas) {\n // 第一次创建,且无 conatiner,初始化位置\n var containerTop = containerBBox.top;\n var _f = defaultBegin || {},\n beginLeft = _f.left,\n _g = _f.right,\n propsBeginRight = _g === void 0 ? 16 : _g,\n _h = _f.top,\n propsBeginTop = _h === void 0 ? 8 : _h,\n beginBottom = _f.bottom;\n var beginRight = propsBeginRight;\n var beginTop = propsBeginTop;\n if (!isNaN(beginLeft)) {\n beginRight = container.scrollWidth - beginLeft;\n }\n if (!isNaN(beginBottom)) {\n beginTop = container.scrollHeight - beginBottom;\n }\n var cardWidth = isNumber(minWidth) ? minWidth : 100;\n x = container.scrollWidth - newCard.scrollWidth - (rows.length - 1) * cardWidth - beginRight;\n var currentRow = rows[rows.length - 1];\n var lastCardBBox = (currentRow[currentRow.length - 1] || {}).bbox;\n y = (lastCardBBox === null || lastCardBBox === void 0 ? void 0 : lastCardBBox.bottom) - containerTop || beginTop;\n }\n modifyCSS(newCard, {\n position: 'absolute',\n left: \"\".concat(x, \"px\"),\n top: \"\".concat(y, \"px\"),\n cusor: containerCfg ? 'unset' : 'move'\n });\n }\n this.bindListener(newCard, itemId);\n var cardBBox = newCard.getBoundingClientRect();\n if (!isCanvas) {\n // 创建相关连线\n var path = getPathItem2Card(item, cardBBox, graph, this.get('canvas'));\n var linkStyle = this.get('linkStyle');\n link = linkGroup.addShape('path', {\n attrs: __assign({\n lineWidth: 1,\n lineDash: [5, 5],\n stroke: '#ccc',\n path: path\n }, linkStyle)\n });\n }\n cardInfoMap[itemId] = __assign(__assign({}, cardInfoMap[itemId] || {}), {\n id: itemId,\n collapsed: collapsed,\n card: newCard,\n link: link,\n x: x,\n y: y,\n cardBBox: cardBBox,\n content: content || propsContent,\n title: title || propsTitle,\n contentPlaceholder: contentPlaceholder,\n titlePlaceholder: titlePlaceholder,\n isCanvas: isCanvas\n });\n self.set('cardInfoMap', cardInfoMap);\n if (containerCfg) {\n this.updateCardPositionsInConatainer();\n this.updateLinks();\n } else {\n var hasPropsPosition = !isNaN(propsX) && !isNaN(propsY);\n if (!exist && !isCanvas && !hasPropsPosition) {\n // 没有 container、新增 card 时,记录当前列中最下方位置,方便换行\n var _j = containerBBox.bottom,\n containerBottom = _j === void 0 ? 0 : _j,\n containerTop = containerBBox.top;\n rows[rows.length - 1].push({\n id: itemId,\n bbox: cardBBox\n });\n if (cardBBox.top > containerBottom - containerTop - cardBBox.height - 16) rows.push([]);\n this.set('rows', rows);\n }\n }\n this.updateCardSize(itemId);\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfoMap[itemId], exist ? 'update' : 'create');\n };\n Annotation.prototype.updateCardPositionsInConatainer = function () {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var container = this.get('container');\n var position = this.get('containerCfg').position;\n var containerWidth = container.getBoundingClientRect().width;\n var computeStyle = getComputedStyle(container);\n var sidePadding = px2Num(computeStyle['paddingLeft']) + px2Num(computeStyle['paddingRight']);\n containerWidth -= sidePadding;\n Object.values(cardInfoMap).forEach(function (_a) {\n var card = _a.card;\n var cardWidth = card.getBoundingClientRect().width;\n switch (position) {\n case 'right':\n modifyCSS(card, {\n marginLeft: containerWidth ? \"\".concat(containerWidth - cardWidth, \"px\") : '0px'\n });\n break;\n case 'top':\n case 'bottom':\n modifyCSS(card, {\n marginLeft: '8px'\n });\n default:\n break;\n }\n });\n };\n Annotation.prototype.handleExpandCollapseCard = function (id) {\n if (this.destroyed) return;\n var graph = this.get('graph');\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var collapsed = cardInfoMap[id].collapsed;\n var item = graph.findById(id);\n if (!item) return;\n var collapseType = this.get('cardCfg').collapseType;\n if (collapseType === 'hide' && !collapsed) {\n // collapse 行为被配置为隐藏\n this.hideCard(id);\n } else {\n this.toggleAnnotation(item, {\n collapsed: !collapsed\n });\n }\n cardInfoMap[id] = __assign(__assign({}, cardInfoMap[id]), {\n collapsed: !collapsed\n });\n };\n /**\n * 隐藏标注卡片,下次打开还保留隐藏前的配置,包括文本内容、位置等\n * @param id 卡片 id,即元素(节点/边)的 id\n * @returns\n */\n Annotation.prototype.hideCard = function (id) {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap || !cardInfoMap[id]) return;\n var _a = cardInfoMap[id],\n card = _a.card,\n link = _a.link;\n modifyCSS(card, {\n display: 'none'\n });\n link === null || link === void 0 ? void 0 : link.hide();\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange(cardInfoMap[id], 'hide');\n };\n /**\n * 移除标注卡片,下一次生成时将被初始化\n * @param id 卡片 id,即元素(节点/边)的 id\n * @returns\n */\n Annotation.prototype.removeCard = function (id) {\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var cardInfo = cardInfoMap[id];\n var card = cardInfo.card,\n link = cardInfo.link;\n var container = this.get('container');\n container.removeChild(card);\n link === null || link === void 0 ? void 0 : link.remove(true);\n delete cardInfoMap[id];\n var onAnnotationChange = this.get('onAnnotationChange');\n onAnnotationChange(cardInfo, 'remove');\n };\n Annotation.prototype.bindListener = function (card, itemId) {\n var _this = this;\n if (this.destroyed) return;\n card.addEventListener('mousemove', function (e) {\n // icon 的鼠标进入监听,方便外部加 tooltip\n var iconType;\n if (e.target.className === 'g6-annotation-collapse') {\n iconType = 'collapse';\n } else if (e.target.className === 'g6-annotation-expand') {\n iconType = 'expand';\n } else if (e.target.className === 'g6-annotation-close') {\n iconType = 'close';\n }\n if (iconType) {\n var _a = _this.get('cardCfg').onMouseEnterIcon,\n onMouseEnterIcon = _a === void 0 ? function () {} : _a;\n onMouseEnterIcon(e, itemId, iconType);\n }\n });\n card.addEventListener('mouseout', function (e) {\n // icon 的鼠标移出监听,方便外部加 tooltip\n var iconType;\n if (e.target.className === 'g6-annotation-collapse') {\n iconType = 'collapse';\n } else if (e.target.className === 'g6-annotation-expand') {\n iconType = 'expand';\n } else if (e.target.className === 'g6-annotation-close') {\n iconType = 'close';\n }\n if (iconType) {\n var _a = _this.get('cardCfg').onMouseLeaveIcon,\n onMouseLeaveIcon = _a === void 0 ? function () {} : _a;\n onMouseLeaveIcon(e, itemId, iconType);\n }\n });\n // mouseenter and mouseleave to highlight the corresponding items\n card.addEventListener('mouseenter', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = _this.get('graph');\n var item = graph.findById(itemId);\n if (item) {\n var itemHighlightState = _this.get('itemHighlightState');\n graph.setItemState(item, itemHighlightState, true);\n }\n var link = cardInfoMap[itemId].link;\n if (link) {\n var linkHighlightStyle = _this.get('linkHighlightStyle') || {};\n link.attr(linkHighlightStyle);\n }\n });\n card.addEventListener('mouseleave', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = _this.get('graph');\n var item = graph.findById(itemId);\n if (item) {\n var itemHighlightState = _this.get('itemHighlightState');\n graph.setItemState(item, itemHighlightState, false);\n }\n var link = cardInfoMap[itemId].link;\n if (link) {\n var linkHighlightStyle = _this.get('linkHighlightStyle') || {};\n Object.keys(linkHighlightStyle).forEach(function (key) {\n link.attr(key, undefined);\n link.attr(key, undefined);\n });\n var linkStyle = _this.get('linkStyle');\n link.attr(linkStyle);\n }\n });\n card.addEventListener('click', function (e) {\n var onClickIcon = (_this.get('cardCfg') || {}).onClickIcon;\n if (e.target.className === 'g6-annotation-collapse' || e.target.className === 'g6-annotation-expand') {\n // collapse & expand\n var collapseType = _this.get('cardCfg').collapseType;\n if (collapseType === 'hide') {\n _this.hideCard(itemId);\n } else {\n _this.handleExpandCollapseCard(itemId);\n }\n onClickIcon === null || onClickIcon === void 0 ? void 0 : onClickIcon(e, itemId, e.target.className === 'g6-annotation-collapse' ? 'collapse' : 'expand');\n } else if (e.target.className === 'g6-annotation-close') {\n // close\n var closeType = _this.get('cardCfg').closeType;\n if (closeType === 'remove') {\n _this.removeCard(itemId);\n } else {\n _this.hideCard(itemId);\n }\n onClickIcon === null || onClickIcon === void 0 ? void 0 : onClickIcon(e, itemId, 'close');\n }\n });\n // dblclick to edit the title and content text\n var editable = this.get('editable');\n if (editable) {\n card.addEventListener('dblclick', function (e) {\n var cardInfoMap = _this.get('cardInfoMap');\n var _a = (_this.get('cardCfg') || {}).maxTitleLength,\n maxTitleLength = _a === void 0 ? 20 : _a;\n if (!cardInfoMap) return;\n var target = e.target;\n var targetClass = target.className;\n if (targetClass !== 'g6-annotation-title' && targetClass !== 'g6-annotation-content') return;\n var _b = targetClass === 'g6-annotation-title' ? target.getBoundingClientRect() : target.parentNode.getBoundingClientRect(),\n width = _b.width,\n height = _b.height;\n var computeStyle = getComputedStyle(target);\n var inputTag = targetClass === 'g6-annotation-title' ? 'input' : 'textarea';\n var input = createDom(\"<\".concat(inputTag, \" class=\\\"\").concat(targetClass, \"-input\\\" type=\\\"textarea\\\" style=\\\"width:\").concat(width, \"px; height: \").concat(height, \"px; min-width: 16px;\\\"/>\"));\n var inputWrapper = createDom(\"
\"));\n inputWrapper.appendChild(input);\n target.parentNode.replaceChild(inputWrapper, target);\n var cardInfo = cardInfoMap[itemId];\n var contentPlaceholder = cardInfo.contentPlaceholder,\n titlePlaceholder = cardInfo.titlePlaceholder,\n content = cardInfo.content,\n title = cardInfo.title;\n var value = content;\n if (targetClass === 'g6-annotation-title') {\n input.name = 'title';\n input.maxLength = maxTitleLength;\n value = title;\n } else {\n input.name = 'content';\n }\n if (value) {\n input.innerHTML = target.innerHTML;\n input.value = target.innerHTML;\n } else {\n input.placeholder = targetClass === 'g6-annotation-title' ? titlePlaceholder : contentPlaceholder;\n }\n input.focus();\n input.addEventListener('blur', function (blurEvt) {\n if (input.value) {\n target.innerHTML = input.value;\n cardInfo[input.name || 'title'] = input.value;\n }\n inputWrapper.parentNode.replaceChild(target, inputWrapper);\n _this.updateCardSize(itemId);\n var onAnnotationChange = _this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfo, 'update');\n });\n });\n }\n var unmovableClasses = ['g6-annotation-title', 'g6-annotation-content', 'g6-annotation-title-input', 'g6-annotation-content-input'];\n card.draggable = true;\n card.addEventListener('dragstart', function (e) {\n var targetClass = e.target.className;\n if (unmovableClasses.includes(targetClass)) return;\n var style = card.style;\n _this.set('dragging', {\n card: card,\n x: e.clientX,\n y: e.clientY,\n left: px2Num(style.left),\n top: px2Num(style.top)\n });\n });\n card.addEventListener('drag', function (e) {\n e.preventDefault();\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var clientX = e.clientX,\n clientY = e.clientY;\n var dragging = _this.get('dragging');\n if (isNaN(clientX) || isNaN(clientY) || !dragging) return;\n var x = dragging.x,\n y = dragging.y,\n left = dragging.left,\n top = dragging.top,\n draggingCard = dragging.card;\n var dx = clientX - x;\n var dy = clientY - y;\n left += dx;\n top += dy;\n var graph = _this.get('graph');\n var graphLeftTopCanvas = graph.getPointByCanvas(0, 0);\n var graphRightBottomCanvas = graph.getPointByCanvas(graph.getWidth(), graph.getHeight());\n var _a = graph.getClientByPoint(graphLeftTopCanvas.x, graphLeftTopCanvas.y),\n graphLeft = _a.x,\n graphTop = _a.y;\n var _b = graph.getClientByPoint(graphRightBottomCanvas.x, graphRightBottomCanvas.y),\n graphRight = _b.x,\n graphBottom = _b.y;\n var cardBBox = draggingCard.getBoundingClientRect();\n var cardWidth = cardBBox.right - cardBBox.left;\n var cardHeight = cardBBox.bottom - cardBBox.top;\n if (left > graphRight - graphLeft - cardWidth && dx > 0 || left < 0 && dx < 0) left -= dx;\n if (top > graphBottom - graphTop - cardHeight && dy > 0 || top < 0 && dy < 0) top -= dy;\n // 更新卡片位置\n modifyCSS(draggingCard, {\n left: \"\".concat(left, \"px\"),\n top: \"\".concat(top, \"px\"),\n visibility: 'hidden'\n });\n x = clientX;\n y = clientY;\n // 更新连线位置\n var link = (cardInfoMap[itemId] || {}).link;\n if (link) {\n var item = graph.findById(itemId);\n link.attr('path', getPathItem2Card(item, cardBBox, graph, _this.get('canvas')));\n }\n _this.set('dragging', {\n x: x,\n y: y,\n left: left,\n top: top,\n card: draggingCard\n });\n });\n var dragendListener = function dragendListener(e) {\n var cardInfoMap = _this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var dragging = _this.get('dragging');\n if (dragging) {\n // = dragend\n var left = dragging.left,\n top_1 = dragging.top,\n draggingCard = dragging.card;\n cardInfoMap[itemId].x = left;\n cardInfoMap[itemId].y = top_1;\n modifyCSS(draggingCard, {\n visibility: 'visible'\n });\n _this.set('dragging', false);\n // 移动过的卡片从 rows 中移除,避免影响后续卡片出生位置\n var rows = _this.get(\"rows\");\n rows === null || rows === void 0 ? void 0 : rows.forEach(function (rowItems) {\n for (var i = rowItems.length - 1; i >= 0; i--) {\n if (rowItems[i].id === itemId) rowItems.splice(i, 1);\n }\n });\n var onAnnotationChange = _this.get('onAnnotationChange');\n onAnnotationChange === null || onAnnotationChange === void 0 ? void 0 : onAnnotationChange(cardInfoMap[itemId], 'update');\n }\n };\n card.addEventListener('dragend', dragendListener);\n };\n Annotation.prototype.updateCardSize = function (id) {\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var card = cardInfoMap[id].card;\n var width = card.getBoundingClientRect().width;\n var title = card.getElementsByClassName('g6-annotation-title')[0];\n if (title) {\n var computeStyle = getComputedStyle(title);\n var sideMargin = px2Num(computeStyle['marginLeft']);\n var titleWidth = title.getBoundingClientRect().width;\n modifyCSS(title, {\n marginRight: \"\".concat(width - sideMargin - 24 - 16 - titleWidth, \"px\")\n });\n }\n };\n Annotation.prototype.updateLink = function (_a) {\n var item = _a.item;\n if (!item) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var canvas = this.get('canvas');\n var graph = this.get('graph');\n var id = item.getID();\n var _b = cardInfoMap[id] || {},\n link = _b.link,\n card = _b.card;\n if (link) {\n var path = getPathItem2Card(item, card.getBoundingClientRect(), graph, canvas);\n link.attr('path', path);\n }\n };\n Annotation.prototype.updateLinks = function () {\n var _this = this;\n if (this.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var id = cardInfo.id;\n var item = graph.findById(id);\n _this.updateLink({\n item: item\n });\n });\n };\n Annotation.prototype.onGraphDataChange = function () {\n var _this = this;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n Object.values(cardInfoMap).forEach(function (info) {\n var id = info.id,\n card = info.card,\n isCanvas = info.isCanvas;\n if (!card || isCanvas || card.style.display === 'none') return;\n var item = graph.findById(id);\n if (item && item.isVisible()) {\n _this.toggleAnnotation(item);\n } else {\n _this.hideCard(id);\n }\n });\n };\n Annotation.prototype.onGraphItemVisibilityChange = function (_a) {\n var item = _a.item,\n visible = _a.visible;\n if (!item || item.destroyed) return;\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var id = item.getID();\n if (!cardInfoMap[id]) return;\n if (!visible) this.hideCard(id);\n };\n Annotation.prototype.saveData = function (saveClosed) {\n if (saveClosed === void 0) {\n saveClosed = false;\n }\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var graph = this.get('graph');\n var getTitle = this.get('getTitle');\n var getContent = this.get('getContent');\n var data = [];\n Object.values(cardInfoMap).forEach(function (info) {\n var title = info.title,\n content = info.content,\n x = info.x,\n y = info.y,\n id = info.id,\n collapsed = info.collapsed,\n card = info.card;\n if (card && card.style.display === 'none' && !saveClosed) return;\n var item = graph.findById(id) || graph.get('canvas');\n data.push({\n id: id,\n x: x,\n y: y,\n collapsed: collapsed,\n title: title || (getTitle === null || getTitle === void 0 ? void 0 : getTitle(item)),\n content: content || (getContent === null || getContent === void 0 ? void 0 : getContent(item)),\n visible: card && card.style.display !== 'none'\n });\n });\n return data;\n };\n Annotation.prototype.readData = function (data) {\n var _this = this;\n var graph = this.get('graph');\n data.forEach(function (info) {\n var id = info.id,\n x = info.x,\n y = info.y,\n title = info.title,\n content = info.content,\n collapsed = info.collapsed,\n visible = info.visible;\n var item = graph.findById(id);\n if (!item && id === CANVAS_ANNOTATION_ID) {\n item = graph.get('canvas');\n }\n if (!item) {\n var cardInfoMap = _this.get('cardInfoMap') || {};\n cardInfoMap[id] = info;\n _this.set('cardInfoMap', cardInfoMap);\n return;\n }\n _this.toggleAnnotation(item, {\n x: x,\n y: y,\n title: title,\n content: content,\n collapsed: collapsed\n });\n if (!visible) _this.hideCard(id);\n });\n };\n /**\n * Clear the cards and links\n */\n Annotation.prototype.clear = function () {\n var cardInfoMap = this.get('cardInfoMap');\n if (!cardInfoMap) return;\n var container = this.get('container');\n Object.values(cardInfoMap).forEach(function (cardInfo) {\n var card = cardInfo.card,\n link = cardInfo.link;\n container.removeChild(card);\n link === null || link === void 0 ? void 0 : link.remove(true);\n });\n this.set('cardInfoMap', {});\n };\n /**\n * Destroy the component\n */\n Annotation.prototype.destroy = function () {\n var _a;\n this.clear();\n (_a = this.get('canvas')) === null || _a === void 0 ? void 0 : _a.destroy();\n var graph = this.get('graph');\n if (!graph || graph.destroyed) return;\n if (this.get('containerCfg')) {\n graph.getContainer().removeChild(this.get('container'));\n }\n this.destroyed = true;\n };\n return Annotation;\n}(Base);\nexport default Annotation;\nvar getPath = function getPath(startPoints, endPoints) {\n var startPoint,\n endPoint,\n posKeys,\n distance = Infinity;\n Object.keys(startPoints).forEach(function (skey) {\n var spos = startPoints[skey];\n Object.keys(endPoints).forEach(function (ekey) {\n var epos = endPoints[ekey];\n var xdist = spos.x - epos.x;\n var ydist = spos.y - epos.y;\n var dist = xdist * xdist + ydist * ydist;\n if (distance > dist) {\n distance = dist;\n startPoint = spos;\n endPoint = epos;\n posKeys = [skey, ekey];\n }\n });\n });\n var curveOffset = 20;\n var controlPoint = Util.getControlPoint(startPoint, endPoint, 0.5, curveOffset);\n return [['M', startPoint.x, startPoint.y], ['Q', controlPoint.x, controlPoint.y, endPoint.x, endPoint.y]];\n};\nvar getPathItem2Card = function getPathItem2Card(item, cardBBox, graph, annotationCanvas) {\n var _a;\n var itemLinkPoints;\n var itemType = item.getType();\n if (itemType === 'edge') {\n itemLinkPoints = [item.getKeyShape().getPoint(0.5)];\n } else {\n var _b = (_a = item.getKeyShape) === null || _a === void 0 ? void 0 : _a.call(item).getBBox(),\n minX = _b.minX,\n minY = _b.minY,\n maxX = _b.maxX,\n maxY = _b.maxY;\n var _c = item.getModel(),\n x = _c.x,\n y = _c.y;\n minX += x;\n minY += y;\n maxX += x;\n maxY += y;\n itemLinkPoints = {\n left: {\n x: minX,\n y: (minY + maxY) / 2\n },\n right: {\n x: maxX,\n y: (minY + maxY) / 2\n },\n top: {\n x: (minX + maxX) / 2,\n y: minY\n },\n bottom: {\n x: (minX + maxX) / 2,\n y: maxY\n }\n };\n }\n // 由 graph 所在 canvas 转换为 Client 坐标系,然后再由 annotation 所在 canvas 转换为绘制坐标系\n Object.keys(itemLinkPoints).forEach(function (key) {\n var _a = itemLinkPoints[key],\n x = _a.x,\n y = _a.y;\n var clientPos = graph.getClientByPoint(x, y);\n itemLinkPoints[key] = annotationCanvas.getPointByClient(clientPos.x, clientPos.y);\n });\n var _d = cardBBox.top,\n cardTop = _d === void 0 ? 0 : _d,\n _e = cardBBox.left,\n cardLeft = _e === void 0 ? 0 : _e,\n _f = cardBBox.right,\n cardRight = _f === void 0 ? 0 : _f,\n _g = cardBBox.bottom,\n cardBottom = _g === void 0 ? 0 : _g;\n var cardLinkPoints = {\n left: annotationCanvas.getPointByClient(cardLeft, (cardTop + cardBottom) / 2),\n right: annotationCanvas.getPointByClient(cardRight, (cardTop + cardBottom) / 2),\n top: annotationCanvas.getPointByClient((cardLeft + cardRight) / 2, cardTop),\n bottom: annotationCanvas.getPointByClient((cardLeft + cardRight) / 2, cardBottom)\n };\n return getPath(itemLinkPoints, cardLinkPoints);\n};\nvar px2Num = function px2Num(px) {\n return Number(px.replace(/\\s+|px/gi, \"\")) || 0;\n};","import Grid from './grid';\nimport Menu from './menu';\nimport Minimap from './minimap';\nimport Bundling from './bundling';\nimport Fisheye from './fisheye';\nimport ToolBar from './toolBar';\nimport Tooltip from './tooltip';\nimport TimeBar from './timeBar';\nimport ImageMinimap from './imageMinimap';\nimport EdgeFilterLens from './edgeFilterLens';\nimport SnapLine from './snapline';\nimport PluginBase from './base';\nimport Legend from './legend';\nimport Annotation from './annotation';\nexport { PluginBase, Menu, Grid, Minimap, Bundling, ToolBar, Tooltip, Fisheye, TimeBar, ImageMinimap, EdgeFilterLens, SnapLine, Legend, Annotation };\nvar Plugin = {\n PluginBase: PluginBase,\n Menu: Menu,\n Grid: Grid,\n Minimap: Minimap,\n Bundling: Bundling,\n ToolBar: ToolBar,\n Tooltip: Tooltip,\n Fisheye: Fisheye,\n TimeBar: TimeBar,\n ImageMinimap: ImageMinimap,\n EdgeFilterLens: EdgeFilterLens,\n SnapLine: SnapLine,\n Legend: Legend,\n Annotation: Annotation\n};\nexport default Plugin;","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\n// 带有图标的圆,可用于拓扑图中\nregisterNode('circle', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n defaultIcon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var icon = deepMix({}, defaultIcon, cfg.icon);\n var name = \"\".concat(this.type, \"-keyShape\");\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: name,\n name: name,\n draggable: true\n });\n group['shapeMap'][name] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n var iconName = \"\".concat(this.type, \"-icon\");\n if (text) {\n group['shapeMap'][iconName] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: iconName,\n name: iconName,\n draggable: true\n });\n } else {\n group['shapeMap'][iconName] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: iconName,\n name: iconName,\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var linkPoints = (this.mergeStyle || this.getOptions(cfg)).linkPoints;\n if (!linkPoints) return;\n var _a = linkPoints || {},\n top = _a.top,\n left = _a.left,\n right = _a.right,\n bottom = _a.bottom,\n markSize = _a.size,\n markR = _a.r,\n markStyle = __rest(_a, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n if (left) {\n // left circle\n var name_1 = 'link-point-left';\n group['shapeMap'][name_1] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -r,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: name_1,\n name: name_1,\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n var name_2 = 'link-point-right';\n group['shapeMap'][name_2] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: r,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: name_2,\n name: name_2,\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n var name_3 = 'link-point-top';\n group['shapeMap'][name_3] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -r,\n r: markSize / 2 || markR || 5\n }),\n className: name_3,\n name: name_3,\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n var name_4 = 'link-point-bottom';\n group['shapeMap'][name_4] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: r,\n r: markSize / 2 || markR || 5\n }),\n className: name_4,\n name: name_4,\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = deepMix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var r = size[0] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n r: r\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n var size = this.getSize(cfg);\n var style = __assign({}, cfg.style);\n if (cfg.style.stroke === undefined && cfg.color) {\n style.stroke = cfg.color;\n }\n if (cfg.style.r === undefined && !isNaN(size[0])) {\n style.r = size[0] / 2;\n }\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { mix } from '@antv/util';\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nregisterNode('rect', {\n // 自定义节点时的配置\n options: {\n size: [100, 30],\n style: {\n radius: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]],\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'rect',\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var size = this.getSize(cfg);\n var keyShape = item.get('keyShape');\n if (!cfg.size) {\n size[0] = keyShape.attr('width') || defaultStyle.width;\n size[1] = keyShape.attr('height') || defaultStyle.height;\n }\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n x: -size[0] / 2,\n y: -size[1] / 2,\n width: size[0],\n height: size[1]\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, false, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n/**\n * 基本的椭圆,可以添加文本,默认文本居中\n */\nregisterNode('ellipse', {\n // 自定义节点时的配置\n options: {\n size: [80, 40],\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'ellipse',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('ellipse', {\n attrs: style,\n className: 'ellipse-keyShape',\n name: 'ellipse-keyShape',\n draggable: true\n });\n group['shapeMap']['ellipse-keyShape'] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var rx = size[0] / 2;\n var ry = size[1] / 2;\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -rx,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: rx,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -ry,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: ry,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var rx = size[0] / 2;\n var ry = size[1] / 2;\n var styles = __assign({\n x: 0,\n y: 0,\n rx: rx,\n ry: ry\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var size = this.getSize(cfg);\n var strokeStyle = {\n stroke: cfg.color,\n rx: size[0] / 2,\n ry: size[1] / 2\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 菱形shape\nregisterNode('diamond', {\n // 自定义节点时的配置\n options: {\n size: [80, 80],\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'diamond',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -w / 2,\n y: -h / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n getPath: function getPath(cfg) {\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var path = [['M', 0, -height / 2], ['L', width / 2, 0], ['L', 0, height / 2], ['L', -width / 2, 0], ['Z'] // 封闭\n ];\n\n return path;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 三角形\nregisterNode('triangle', {\n // 自定义节点时的配置\n options: {\n size: 40,\n direction: 'up',\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize\n },\n offset: 15\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20,\n offset: 6\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'triangle',\n // 文本位置\n labelPosition: 'bottom',\n drawShape: function drawShape(cfg, group) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.icon,\n icon = _b === void 0 ? {} : _b,\n defaultDirection = _a.direction;\n var style = this.getShapeStyle(cfg);\n var direction = cfg.direction || defaultDirection;\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n offset = icon.offset,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n var iconW = -w / 2;\n var iconH = -h / 2;\n if (direction === 'up' || direction === 'down') {\n iconH += offset;\n }\n if (direction === 'left' || direction === 'right') {\n iconW += offset;\n }\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: iconW,\n y: iconH\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.linkPoints,\n linkPoints = _b === void 0 ? {} : _b,\n defaultDirection = _a.direction;\n var direction = cfg.direction || defaultDirection;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var len = size[0];\n if (left) {\n // up down left right 四个方向的坐标均不相同\n var leftPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n leftPos = [-r, diffY];\n } else if (direction === 'down') {\n leftPos = [-r, -diffY];\n } else if (direction === 'left') {\n leftPos = [-r, r - diffY];\n }\n if (leftPos) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: leftPos[0],\n y: leftPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left'\n });\n }\n }\n if (right) {\n // right circle\n // up down left right 四个方向的坐标均不相同\n var rightPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n rightPos = [r, diffY];\n } else if (direction === 'down') {\n rightPos = [r, -diffY];\n } else if (direction === 'right') {\n rightPos = [r, r - diffY];\n }\n if (rightPos) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: rightPos[0],\n y: rightPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right'\n });\n }\n }\n if (top) {\n // up down left right 四个方向的坐标均不相同\n var topPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n topPos = [r - diffY, -diffY];\n } else if (direction === 'left') {\n topPos = [r, -diffY];\n } else if (direction === 'right') {\n topPos = [-r, -diffY];\n }\n if (topPos) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: topPos[0],\n y: topPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top'\n });\n }\n }\n if (bottom) {\n // up down left right 四个方向的坐标均不相同\n var bottomPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'down') {\n bottomPos = [-r + diffY, diffY];\n } else if (direction === 'left') {\n bottomPos = [r, diffY];\n } else if (direction === 'right') {\n bottomPos = [-r, diffY];\n }\n if (bottomPos) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: bottomPos[0],\n y: bottomPos[1],\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom'\n });\n }\n }\n },\n getPath: function getPath(cfg) {\n var defaultDirection = (this.mergeStyle || this.getOptions(cfg)).direction;\n var direction = cfg.direction || defaultDirection;\n var size = this.getSize(cfg);\n var len = size[0];\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n var path = [['M', -r, diffY], ['L', 0, -diffY], ['L', r, diffY], ['Z'] // 封闭\n ];\n\n if (direction === 'down') {\n path = [['M', -r, -diffY], ['L', r, -diffY], ['L', 0, diffY], ['Z'] // 封闭\n ];\n } else if (direction === 'left') {\n path = [['M', -r, r - diffY], ['L', r, -r], ['L', r, r], ['Z'] // 封闭\n ];\n } else if (direction === 'right') {\n path = [['M', r, r - diffY], ['L', -r, r], ['L', -r, -r], ['Z'] // 封闭\n ];\n }\n\n return path;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var _a = this.getOptions({}),\n defaultLinkPoints = _a.linkPoints,\n defaultDirection = _a.direction;\n var direction = cfg.direction || defaultDirection;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markBottom = group['shapeMap']['link-point-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-bottom';\n });\n var currentLinkPoints = defaultLinkPoints;\n var existLinkPoint = markLeft || markRight || markTop || markBottom;\n if (existLinkPoint) {\n currentLinkPoints = existLinkPoint.attr();\n }\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _b = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n bottom: undefined\n },\n left = _b.left,\n right = _b.right,\n top = _b.top,\n bottom = _b.bottom;\n var size = this.getSize(cfg);\n var len = size[0];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n var leftPos = null;\n var diffY = len * Math.sin(1 / 3 * Math.PI);\n var r = len * Math.sin(1 / 3 * Math.PI);\n if (direction === 'up') {\n leftPos = [-r, diffY];\n } else if (direction === 'down') {\n leftPos = [-r, -diffY];\n } else if (direction === 'left') {\n leftPos = [-r, r - diffY];\n }\n if (leftPos) {\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: leftPos[0],\n y: leftPos[1]\n }));\n }\n } else if (left) {\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: leftPos[0],\n y: leftPos[1]\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n }\n var rightPos = null;\n if (direction === 'up') {\n rightPos = [r, diffY];\n } else if (direction === 'down') {\n rightPos = [r, -diffY];\n } else if (direction === 'right') {\n rightPos = [r, r - diffY];\n }\n if (rightPos) {\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n } else {\n markRight.attr(__assign(__assign({}, styles), {\n x: rightPos[0],\n y: rightPos[1]\n }));\n }\n } else if (right) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: rightPos[0],\n y: rightPos[1]\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n }\n var topPos = null;\n if (direction === 'up') {\n topPos = [r - diffY, -diffY];\n } else if (direction === 'left') {\n topPos = [r, -diffY];\n } else if (direction === 'right') {\n topPos = [-r, -diffY];\n }\n if (topPos) {\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n } else {\n // top circle\n markTop.attr(__assign(__assign({}, styles), {\n x: topPos[0],\n y: topPos[1]\n }));\n }\n } else if (top) {\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: topPos[0],\n y: topPos[1]\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n }\n var bottomPos = null;\n if (direction === 'down') {\n bottomPos = [-r + diffY, diffY];\n } else if (direction === 'left') {\n bottomPos = [r, diffY];\n } else if (direction === 'right') {\n bottomPos = [-r, diffY];\n }\n if (bottomPos) {\n if (markBottom) {\n if (!bottom && bottom !== undefined) {\n markBottom.remove();\n delete group['shapeMap']['link-point-bottom'];\n } else {\n markBottom.attr(__assign(__assign({}, styles), {\n x: bottomPos[0],\n y: bottomPos[1]\n }));\n }\n } else if (bottom) {\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: bottomPos[0],\n y: bottomPos[1]\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n }\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { mix, isString, deepMix } from '@antv/util';\nimport { registerNode, BaseGlobal as Global } from '@antv/g6-core';\nregisterNode('modelRect', {\n // 自定义节点时的配置\n options: {\n size: [185, 70],\n style: {\n radius: 5,\n stroke: '#69c0ff',\n fill: '#ffffff',\n lineWidth: Global.defaultNode.style.lineWidth,\n fillOpacity: 1\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: '#595959',\n fontSize: 14,\n fontFamily: Global.windowFontFamily\n },\n offset: 30 // 距离左侧的 offset,没有设置 y 轴上移动的配置\n },\n\n descriptionCfg: {\n style: {\n fontSize: 12,\n fill: '#bfbfbf',\n fontFamily: Global.windowFontFamily\n },\n paddingTop: 0\n },\n preRect: {\n show: true,\n width: 4,\n fill: '#40a9ff',\n radius: 2\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: 10,\n lineWidth: 1,\n fill: '#72CC4A',\n stroke: '#72CC4A'\n },\n // 节点中icon配置\n logoIcon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: true,\n x: 0,\n y: 0,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/basement_prod/4f81893c-1806-4de4-aff3-9a6b266bc8a2.svg',\n width: 16,\n height: 16,\n // 用于调整图标的左右位置\n offset: 0\n },\n // 节点中表示状态的icon配置\n stateIcon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: true,\n x: 0,\n y: 0,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/basement_prod/300a2523-67e0-4cbf-9d4a-67c077b40395.svg',\n width: 16,\n height: 16,\n // 用于调整图标的左右位置\n offset: -5\n },\n // 连接点,默认为左右\n // anchorPoints: [{ x: 0, y: 0.5 }, { x: 1, y: 0.5 }]\n anchorPoints: [[0, 0.5], [1, 0.5]]\n },\n shapeType: 'modelRect',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).preRect,\n preRect = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var keyShape = group.addShape('rect', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var preRectShow = preRect.show,\n preRectStyle = __rest(preRect, [\"show\"]);\n if (preRectShow) {\n group['shapeMap']['pre-rect'] = group.addShape('rect', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2,\n height: height\n }, preRectStyle),\n className: 'pre-rect',\n name: 'pre-rect',\n draggable: true\n });\n }\n this.drawLogoIcon(cfg, group);\n this.drawStateIcon(cfg, group);\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制模型矩形左边的logo图标\n * @param {Object} cfg 数据配置项\n * @param {Group} group Group实例\n */\n drawLogoIcon: function drawLogoIcon(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).logoIcon,\n logoIcon = _a === void 0 ? {} : _a;\n var size = this.getSize(cfg);\n var width = size[0];\n if (logoIcon.show) {\n var w = logoIcon.width,\n h = logoIcon.height,\n x = logoIcon.x,\n y = logoIcon.y,\n offset = logoIcon.offset,\n text = logoIcon.text,\n logoIconStyle = __rest(logoIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\", \"text\"]);\n if (text) {\n group['shapeMap']['rect-logo-icon'] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, logoIconStyle),\n className: 'rect-logo-icon',\n name: 'rect-logo-icon',\n draggable: true\n });\n } else {\n group['shapeMap']['rect-logo-icon'] = group.addShape('image', {\n attrs: __assign(__assign({}, logoIconStyle), {\n x: x || -width / 2 + w + offset,\n y: y || -h / 2,\n width: w,\n height: h\n }),\n className: 'rect-logo-icon',\n name: 'rect-logo-icon',\n draggable: true\n });\n }\n }\n },\n /**\n * 绘制模型矩形右边的状态图标\n * @param {Object} cfg 数据配置项\n * @param {Group} group Group实例\n */\n drawStateIcon: function drawStateIcon(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).stateIcon,\n stateIcon = _a === void 0 ? {} : _a;\n var size = this.getSize(cfg);\n var width = size[0];\n if (stateIcon.show) {\n var w = stateIcon.width,\n h = stateIcon.height,\n x = stateIcon.x,\n y = stateIcon.y,\n offset = stateIcon.offset,\n text = stateIcon.text,\n iconStyle = __rest(stateIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\", \"text\"]);\n if (text) {\n group['shapeMap']['rect-state-icon'] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, iconStyle),\n className: 'rect-state-icon',\n name: 'rect-state-icon',\n draggable: true\n });\n } else {\n group['shapeMap']['rect-state-icon'] = group.addShape('image', {\n attrs: __assign(__assign({}, iconStyle), {\n x: x || width / 2 - w + offset,\n y: y || -h / 2,\n width: w,\n height: h\n }),\n className: 'rect-state-icon',\n name: 'rect-state-icon',\n draggable: true\n });\n }\n }\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n bottom = linkPoints.bottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"bottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n if (left) {\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: -width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n if (right) {\n // right circle\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: width / 2,\n y: 0,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n if (top) {\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: -height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n if (bottom) {\n // bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: 0,\n y: height / 2,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-bottom',\n name: 'link-point-bottom',\n isAnchorPoint: true\n });\n }\n },\n drawLabel: function drawLabel(cfg, group) {\n var _a = this.getOptions(cfg),\n _b = _a.labelCfg,\n labelCfg = _b === void 0 ? {} : _b,\n _c = _a.logoIcon,\n logoIcon = _c === void 0 ? {} : _c,\n _d = _a.descriptionCfg,\n descriptionCfg = _d === void 0 ? {} : _d;\n var size = this.getSize(cfg);\n var width = size[0];\n var label = null;\n var show = logoIcon.show,\n w = logoIcon.width;\n var offsetX = -width / 2 + labelCfg.offset;\n if (show) {\n offsetX = -width / 2 + w + labelCfg.offset;\n }\n var fontStyle = labelCfg.style;\n var descriptionStyle = descriptionCfg.style,\n descriptionPaddingTop = descriptionCfg.paddingTop;\n if (isString(cfg.description)) {\n label = group.addShape('text', {\n attrs: __assign(__assign({}, fontStyle), {\n x: offsetX,\n y: -5,\n text: cfg.label\n }),\n className: 'text-shape',\n name: 'text-shape',\n draggable: true,\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n group['shapeMap']['rect-description'] = group.addShape('text', {\n attrs: __assign(__assign({}, descriptionStyle), {\n x: offsetX,\n y: 17 + (descriptionPaddingTop || 0),\n text: cfg.description\n }),\n className: 'rect-description',\n name: 'rect-description',\n draggable: true,\n labelRelated: true\n });\n } else {\n label = group.addShape('text', {\n attrs: __assign(__assign({}, fontStyle), {\n x: offsetX,\n y: 7,\n text: cfg.label\n }),\n className: 'text-shape',\n name: 'text-shape',\n draggable: true,\n labelRelated: true\n });\n group['shapeMap']['text-shape'] = label;\n }\n return label;\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖默认的stroke属性\n var style = mix({}, defaultStyle, strokeStyle);\n var size = this.getSize(cfg);\n var width = style.width || size[0];\n var height = style.height || size[1];\n var styles = __assign({\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }, style);\n return styles;\n },\n update: function update(cfg, item) {\n var _a = this.mergeStyle || this.getOptions(cfg),\n _b = _a.style,\n style = _b === void 0 ? {} : _b,\n _c = _a.labelCfg,\n labelCfg = _c === void 0 ? {} : _c,\n _d = _a.descriptionCfg,\n descriptionCfg = _d === void 0 ? {} : _d;\n var size = this.getSize(cfg);\n var width = size[0];\n var height = size[1];\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign(__assign({}, style), {\n x: -width / 2,\n y: -height / 2,\n width: width,\n height: height\n }));\n var group = item.getContainer();\n var logoIconShape = group['shapeMap']['rect-logo-icon'] || group.find(function (element) {\n return element.get('className') === 'rect-logo-icon';\n });\n var currentLogoIconAttr = logoIconShape ? logoIconShape.attr() : {};\n var logoIcon = mix({}, currentLogoIconAttr, cfg.logoIcon);\n var w = logoIcon.width;\n if (w === undefined) {\n w = this.options.logoIcon.width;\n }\n var show = cfg.logoIcon ? cfg.logoIcon.show : undefined;\n var offset = labelCfg.offset;\n var offsetX = -width / 2 + w + offset;\n if (!show && show !== undefined) {\n offsetX = -width / 2 + offset;\n }\n var label = group['shapeMap']['node-label'] || group.find(function (element) {\n return element.get('className') === 'node-label';\n });\n var description = group['shapeMap']['rect-description'] || group.find(function (element) {\n return element.get('className') === 'rect-description';\n });\n if (cfg.label) {\n if (!label) {\n group['shapeMap']['node-label'] = group.addShape('text', {\n attrs: __assign(__assign({}, labelCfg.style), {\n x: offsetX,\n y: cfg.description ? -5 : 7,\n text: cfg.label\n }),\n className: 'node-label',\n name: 'node-label',\n draggable: true,\n labelRelated: true\n });\n } else {\n var cfgStyle = cfg.labelCfg ? cfg.labelCfg.style : {};\n var labelStyle = mix({}, label.attr(), cfgStyle);\n if (cfg.label) labelStyle.text = cfg.label;\n labelStyle.x = offsetX;\n if (isString(cfg.description)) labelStyle.y = -5;\n if (description) {\n description.resetMatrix();\n description.attr({\n x: offsetX\n });\n }\n label.resetMatrix();\n label.attr(labelStyle);\n }\n }\n if (isString(cfg.description)) {\n var paddingTop = descriptionCfg.paddingTop;\n if (!description) {\n group['shapeMap']['rect-description'] = group.addShape('text', {\n attrs: __assign(__assign({}, descriptionCfg.style), {\n x: offsetX,\n y: 17 + (paddingTop || 0),\n text: cfg.description\n }),\n className: 'rect-description',\n name: 'rect-description',\n draggable: true,\n labelRelated: true\n });\n } else {\n var cfgStyle = cfg.descriptionCfg ? cfg.descriptionCfg.style : {};\n var descriptionStyle = mix({}, description.attr(), cfgStyle);\n if (isString(cfg.description)) descriptionStyle.text = cfg.description;\n descriptionStyle.x = offsetX;\n description.resetMatrix();\n description.attr(__assign(__assign({}, descriptionStyle), {\n y: 17 + (paddingTop || 0)\n }));\n }\n }\n var preRectShape = group['shapeMap']['pre-rect'] || group.find(function (element) {\n return element.get('className') === 'pre-rect';\n });\n if (preRectShape && !preRectShape.destroyed) {\n var preRect = mix({}, preRectShape.attr(), cfg.preRect);\n preRectShape.attr(__assign(__assign({}, preRect), {\n x: -width / 2,\n y: -height / 2,\n height: height\n }));\n }\n if (logoIconShape && !logoIconShape.destroyed) {\n if (!show && show !== undefined) {\n logoIconShape.remove();\n delete group['shapeMap']['pre-rect'];\n } else {\n var logoW = logoIcon.width,\n h = logoIcon.height,\n x = logoIcon.x,\n y = logoIcon.y,\n logoOffset = logoIcon.offset,\n logoIconStyle = __rest(logoIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\"]);\n logoIconShape.attr(__assign(__assign({}, logoIconStyle), {\n x: x || -width / 2 + logoW + logoOffset,\n y: y || -h / 2,\n width: logoW,\n height: h\n }));\n }\n } else if (show) {\n this.drawLogoIcon(cfg, group);\n }\n var stateIconShape = group['shapeMap']['rect-state-icon'] || group.find(function (element) {\n return element.get('className') === 'rect-state-icon';\n });\n var currentStateIconAttr = stateIconShape ? stateIconShape.attr() : {};\n var stateIcon = mix({}, currentStateIconAttr, cfg.stateIcon);\n if (stateIconShape) {\n if (!stateIcon.show && stateIcon.show !== undefined) {\n stateIconShape.remove();\n delete group['shapeMap']['rect-state-icon'];\n }\n var stateW = stateIcon.width,\n h = stateIcon.height,\n x = stateIcon.x,\n y = stateIcon.y,\n stateOffset = stateIcon.offset,\n stateIconStyle = __rest(stateIcon, [\"width\", \"height\", \"x\", \"y\", \"offset\"]);\n stateIconShape.attr(__assign(__assign({}, stateIconStyle), {\n x: x || width / 2 - stateW + stateOffset,\n y: y || -h / 2,\n width: stateW,\n height: h\n }));\n } else if (stateIcon.show) {\n this.drawStateIcon(cfg, group);\n }\n this.updateLinkPoints(cfg, group);\n },\n getOptions: function getOptions(cfg, updateType) {\n if (updateType === 'move') return cfg;\n // different from baseShape, the config should be mixed when the updateType is not 'move'\n return deepMix({}, this.options, this.getCustomConfig(cfg) || {}, cfg);\n }\n}, 'single-node');","import { __assign, __rest } from \"tslib\";\nimport { registerNode, BaseGlobal as Global, Util } from '@antv/g6-core';\nimport { mix } from '@antv/util';\n// 五角星shape\nregisterNode('star', {\n // 自定义节点时的配置\n options: {\n size: 60,\n style: {\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'star',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n icon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var keyShape = group.addShape('path', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n name: \"\".concat(this.type, \"-keyShape\"),\n draggable: true\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var w = icon.width,\n h = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -w / 2,\n y: -h / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n /**\n * 绘制节点上的LinkPoints\n * @param {Object} cfg data数据配置项\n * @param {Group} group Group实例\n */\n drawLinkPoints: function drawLinkPoints(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).linkPoints,\n linkPoints = _a === void 0 ? {} : _a;\n var top = linkPoints.top,\n left = linkPoints.left,\n right = linkPoints.right,\n leftBottom = linkPoints.leftBottom,\n rightBottom = linkPoints.rightBottom,\n markSize = linkPoints.size,\n markR = linkPoints.r,\n markStyle = __rest(linkPoints, [\"top\", \"left\", \"right\", \"leftBottom\", \"rightBottom\", \"size\", \"r\"]);\n var size = this.getSize(cfg);\n var outerR = size[0];\n if (right) {\n // right circle\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 0) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 0) / 180 * Math.PI) * outerR;\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right',\n name: 'link-point-right'\n });\n }\n if (top) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 1) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 1) / 180 * Math.PI) * outerR;\n // top circle\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-top',\n name: 'link-point-top'\n });\n }\n if (left) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 2) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 2) / 180 * Math.PI) * outerR;\n // left circle\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left',\n name: 'link-point-left'\n });\n }\n if (leftBottom) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 3) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 3) / 180 * Math.PI) * outerR;\n // left bottom circle\n group['shapeMap']['link-point-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-left-bottom',\n name: 'link-point-left-bottom'\n });\n }\n if (rightBottom) {\n // up down left right 四个方向的坐标均不相同\n var x1 = Math.cos((18 + 72 * 4) / 180 * Math.PI) * outerR;\n var y1 = Math.sin((18 + 72 * 4) / 180 * Math.PI) * outerR;\n // left bottom circle\n group['shapeMap']['link-point-right-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, markStyle), {\n x: x1,\n y: -y1,\n r: markSize / 2 || markR || 5\n }),\n className: 'link-point-right-bottom',\n name: 'link-point-right-bottom'\n });\n }\n },\n getPath: function getPath(cfg) {\n var size = this.getSize(cfg);\n var outerR = size[0];\n var defaultInnerR = outerR * 3 / 8;\n var innerR = cfg.innerR || defaultInnerR;\n return Util.getStarPath(outerR, innerR);\n },\n /**\n * 获取节点的样式,供基于该节点自定义时使用\n * @param {Object} cfg 节点数据模型\n * @return {Object} 节点的样式\n */\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style;\n var strokeStyle = {\n stroke: cfg.color\n };\n // 如果设置了color,则覆盖原来默认的 stroke 属性。但 cfg 中但 stroke 属性优先级更高\n var style = mix({}, defaultStyle, strokeStyle);\n var path = this.getPath(cfg);\n var styles = __assign({\n path: path\n }, style);\n return styles;\n },\n update: function update(cfg, item, updateType) {\n var group = item.getContainer();\n // 这里不传 cfg 参数是因为 cfg.style 需要最后覆盖样式\n var defaultStyle = this.getOptions({}).style;\n var path = this.getPath(cfg);\n // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。\n var strokeStyle = {\n stroke: cfg.color,\n path: path\n };\n // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。\n var keyShape = item.get('keyShape');\n var style = mix({}, defaultStyle, keyShape.attr(), strokeStyle);\n style = mix(style, cfg.style);\n this.updateShape(cfg, item, style, true, updateType);\n this.updateLinkPoints(cfg, group);\n },\n /**\n * 更新linkPoints\n * @param {Object} cfg 节点数据配置项\n * @param {Group} group Item所在的group\n */\n updateLinkPoints: function updateLinkPoints(cfg, group) {\n var defaultLinkPoints = this.getOptions({}).linkPoints;\n var markLeft = group['shapeMap']['link-point-left'] || group.find(function (element) {\n return element.get('className') === 'link-point-left';\n });\n var markRight = group['shapeMap']['link-point-right'] || group.find(function (element) {\n return element.get('className') === 'link-point-right';\n });\n var markTop = group['shapeMap']['link-point-top'] || group.find(function (element) {\n return element.get('className') === 'link-point-top';\n });\n var markLeftBottom = group['shapeMap']['link-point-left-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-left-bottom';\n });\n var markRightBottom = group['shapeMap']['link-point-left-bottom'] || group.find(function (element) {\n return element.get('className') === 'link-point-right-bottom';\n });\n var currentLinkPoints = defaultLinkPoints;\n var existLinkPoint = markLeft || markRight || markTop || markLeftBottom || markRightBottom;\n if (existLinkPoint) {\n currentLinkPoints = existLinkPoint.attr();\n }\n var linkPoints = mix({}, currentLinkPoints, cfg.linkPoints);\n var markFill = linkPoints.fill,\n markStroke = linkPoints.stroke,\n borderWidth = linkPoints.lineWidth;\n var markSize = linkPoints.size / 2;\n if (!markSize) markSize = linkPoints.r;\n var _a = cfg.linkPoints ? cfg.linkPoints : {\n left: undefined,\n right: undefined,\n top: undefined,\n leftBottom: undefined,\n rightBottom: undefined\n },\n left = _a.left,\n right = _a.right,\n top = _a.top,\n leftBottom = _a.leftBottom,\n rightBottom = _a.rightBottom;\n var size = this.getSize(cfg);\n var outerR = size[0];\n var styles = {\n r: markSize,\n fill: markFill,\n stroke: markStroke,\n lineWidth: borderWidth\n };\n var x = Math.cos((18 + 72 * 0) / 180 * Math.PI) * outerR;\n var y = Math.sin((18 + 72 * 0) / 180 * Math.PI) * outerR;\n if (markRight) {\n if (!right && right !== undefined) {\n markRight.remove();\n delete group['shapeMap']['link-point-right'];\n } else {\n markRight.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (right) {\n group['shapeMap']['link-point-right'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-right',\n name: 'link-point-right',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 1) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 1) / 180 * Math.PI) * outerR;\n if (markTop) {\n if (!top && top !== undefined) {\n markTop.remove();\n delete group['shapeMap']['link-point-top'];\n } else {\n markTop.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (top) {\n group['shapeMap']['link-point-top'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-top',\n name: 'link-point-top',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 2) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 2) / 180 * Math.PI) * outerR;\n if (markLeft) {\n if (!left && left !== undefined) {\n markLeft.remove();\n delete group['shapeMap']['link-point-left'];\n } else {\n markLeft.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (left) {\n group['shapeMap']['link-point-left'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-left',\n name: 'link-point-left',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 3) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 3) / 180 * Math.PI) * outerR;\n if (markLeftBottom) {\n if (!leftBottom && leftBottom !== undefined) {\n markLeftBottom.remove();\n delete group['shapeMap']['link-point-left-bottom'];\n } else {\n markLeftBottom.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (leftBottom) {\n group['shapeMap']['link-point-left-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-left-bottom',\n name: 'link-point-left-bottom',\n isAnchorPoint: true\n });\n }\n x = Math.cos((18 + 72 * 4) / 180 * Math.PI) * outerR;\n y = Math.sin((18 + 72 * 4) / 180 * Math.PI) * outerR;\n if (markRightBottom) {\n if (!rightBottom && rightBottom !== undefined) {\n markRightBottom.remove();\n delete group['shapeMap']['link-point-right-bottom'];\n } else {\n markRightBottom.attr(__assign(__assign({}, styles), {\n x: x,\n y: -y\n }));\n }\n } else if (rightBottom) {\n group['shapeMap']['link-point-right-bottom'] = group.addShape('circle', {\n attrs: __assign(__assign({}, styles), {\n x: x,\n y: -y\n }),\n className: 'link-point-right-bottom',\n name: 'link-point-right-bottom',\n isAnchorPoint: true\n });\n }\n }\n}, 'single-node');","import { __assign } from \"tslib\";\nimport { registerNode, BaseGlobal as Global, Util } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\nvar defaultSubjectColors = Util.defaultSubjectColors;\nvar FAN_NAME_PREFIX = 'fan-shape-';\n// 饼图节点\nregisterNode('donut', {\n // 自定义节点时的配置\n options: {\n size: Global.defaultNode.size,\n style: {\n x: 0,\n y: 0,\n stroke: Global.defaultNode.style.stroke,\n fill: Global.defaultNode.style.fill,\n lineWidth: Global.defaultNode.style.lineWidth\n },\n labelCfg: {\n style: {\n fill: Global.nodeLabel.style.fill,\n fontSize: Global.nodeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n // 节点上左右上下四个方向上的链接circle配置\n linkPoints: {\n top: false,\n right: false,\n bottom: false,\n left: false,\n // circle的大小\n size: Global.defaultNode.linkPoints.size,\n lineWidth: Global.defaultNode.linkPoints.lineWidth,\n fill: Global.defaultNode.linkPoints.fill,\n stroke: Global.defaultNode.linkPoints.stroke\n },\n // 节点中icon配置\n icon: {\n // 是否显示icon,值为 false 则不渲染icon\n show: false,\n // icon的地址,字符串类型\n img: 'https://gw.alipayobjects.com/zos/bmw-prod/5d015065-8505-4e7a-baec-976f81e3c41d.svg',\n width: 20,\n height: 20\n },\n stateStyles: __assign({}, Global.nodeStateStyles)\n },\n shapeType: 'circle',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var _a = (this.mergeStyle || this.getOptions(cfg)).icon,\n defaultIcon = _a === void 0 ? {} : _a;\n var style = this.getShapeStyle(cfg);\n var icon = deepMix({}, defaultIcon, cfg.icon);\n var keyShape = group.addShape('circle', {\n attrs: style,\n className: \"\".concat(this.type, \"-keyShape\"),\n draggable: true,\n name: \"\".concat(this.type, \"-keyShape\")\n });\n group['shapeMap'][\"\".concat(this.type, \"-keyShape\")] = keyShape;\n var width = icon.width,\n height = icon.height,\n show = icon.show,\n text = icon.text;\n if (show) {\n if (text) {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('text', {\n attrs: __assign({\n x: 0,\n y: 0,\n fontSize: 12,\n fill: '#000',\n stroke: '#000',\n textBaseline: 'middle',\n textAlign: 'center'\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n } else {\n group['shapeMap'][\"\".concat(this.type, \"-icon\")] = group.addShape('image', {\n attrs: __assign({\n x: -width / 2,\n y: -height / 2\n }, icon),\n className: \"\".concat(this.type, \"-icon\"),\n name: \"\".concat(this.type, \"-icon\"),\n draggable: true\n });\n }\n }\n // draw the fan shapes\n drawFans(cfg, group, keyShape);\n this.drawLinkPoints(cfg, group);\n return keyShape;\n },\n updateShape: function updateShape(cfg, item, keyShapeStyle, hasIcon, updateType) {\n // here cfg is merged configure including old model and new configs\n var keyShape = item.get('keyShape');\n keyShape.attr(__assign({}, keyShapeStyle));\n updateFans(cfg, item, keyShape);\n if (!undefined || (updateType === null || updateType === void 0 ? void 0 : updateType.includes('label'))) {\n this.updateLabel(cfg, item, updateType);\n }\n if (hasIcon) {\n this.updateIcon(cfg, item);\n }\n }\n}, 'circle');\n/**\n * draws the fan shapes\n * @param cfg\n * @param group\n * @param keyShape\n * @returns\n */\nvar drawFans = function drawFans(cfg, group, keyShape) {\n var _a = cfg.donutAttrs,\n donutAttrs = _a === void 0 ? {} : _a,\n _b = cfg.donutColorMap,\n donutColorMap = _b === void 0 ? {} : _b;\n var attrNum = Object.keys(donutAttrs).length;\n if (donutAttrs && attrNum > 1) {\n var _c = getDonutConfig(donutAttrs, donutColorMap),\n configs = _c.configs,\n totalValue = _c.totalValue;\n if (totalValue) {\n var _d = getDonutSize(keyShape),\n lineWidth = _d.lineWidth,\n arcR = _d.arcR;\n var arcBegin = [arcR, 0];\n var beginAngle = 0;\n if (attrNum === 1) {\n // draw a path represents a circle\n drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[0],\n fanIndex: 0,\n lineWidth: lineWidth,\n totalValue: totalValue,\n drawWhole: true\n });\n return;\n }\n for (var i = 0; i < configs.length; i++) {\n var result = drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[i],\n fanIndex: i,\n lineWidth: lineWidth,\n totalValue: totalValue\n });\n if (result.shouldEnd) return;\n arcBegin = result.arcBegin;\n beginAngle = result.beginAngle;\n }\n }\n }\n};\n/**\n * draws one fan shape and returns the next position and angle\n * @param group\n * @param fanConfig\n * @returns\n */\nvar drawFan = function drawFan(group, fanConfig) {\n var arcR = fanConfig.arcR,\n arcBegin = fanConfig.arcBegin,\n beginAngle = fanConfig.beginAngle,\n config = fanConfig.config,\n fanIndex = fanConfig.fanIndex,\n lineWidth = fanConfig.lineWidth,\n totalValue = fanConfig.totalValue,\n _a = fanConfig.drawWhole,\n drawWhole = _a === void 0 ? false : _a,\n _b = fanConfig.updateShape,\n updateShape = _b === void 0 ? undefined : _b;\n var percent = config.value / totalValue;\n if (percent < 0.001) {\n // too small to add a fan\n return {\n beginAngle: beginAngle,\n arcBegin: arcBegin,\n shape: undefined,\n shouldEnd: false\n };\n }\n var arcEnd, endAngle, isBig;\n // draw a path represents the whole circle, or the percentage is close to 1\n if (drawWhole || percent > 0.999) {\n arcEnd = [arcR, 0.0001]; // [arcR * cos(2 * PI), -arcR * sin(2 * PI)]\n isBig = 1;\n } else {\n var angle = percent * Math.PI * 2;\n endAngle = beginAngle + angle;\n arcEnd = [arcR * Math.cos(endAngle), -arcR * Math.sin(endAngle)];\n isBig = angle > Math.PI ? 1 : 0;\n }\n var style = {\n path: [['M', arcBegin[0], arcBegin[1]], ['A', arcR, arcR, 0, isBig, 0, arcEnd[0], arcEnd[1]]],\n stroke: config.color || (updateShape === null || updateShape === void 0 ? void 0 : updateShape.attr('stroke')) || defaultSubjectColors[fanIndex % defaultSubjectColors.length],\n lineWidth: lineWidth\n };\n if (updateShape) {\n // update\n updateShape.attr(style);\n } else {\n // draw\n group['shapeMap'][\"\".concat(FAN_NAME_PREFIX).concat(fanIndex)] = group.addShape('path', {\n attrs: style,\n name: \"\".concat(FAN_NAME_PREFIX).concat(fanIndex),\n draggable: true\n });\n }\n return {\n beginAngle: endAngle,\n arcBegin: arcEnd,\n shape: group['shapeMap'][\"\".concat(FAN_NAME_PREFIX).concat(fanIndex)],\n shouldEnd: drawWhole || percent > 0.999\n };\n};\n/**\n * utilizes the existing fan shapes, update them with new configs\n * removes the redundent fan shapes\n * or adds more fan shapes\n * @param cfg\n * @param item\n * @param keyShape\n */\nvar updateFans = function updateFans(cfg, item, keyShape) {\n var donutAttrs = cfg.donutAttrs,\n _a = cfg.donutColorMap,\n donutColorMap = _a === void 0 ? {} : _a;\n var visitMap = {};\n var group = item.getContainer();\n if (donutAttrs) {\n var _b = getDonutConfig(donutAttrs, donutColorMap),\n configs = _b.configs,\n totalValue = _b.totalValue;\n if (totalValue) {\n var _c = getDonutSize(keyShape),\n lineWidth = _c.lineWidth,\n arcR = _c.arcR;\n var arcBegin = [arcR, 0];\n var beginAngle = 0;\n for (var i = 0; i < configs.length; i++) {\n var shapeName = \"\".concat(FAN_NAME_PREFIX).concat(i);\n var result = drawFan(group, {\n arcR: arcR,\n arcBegin: arcBegin,\n beginAngle: beginAngle,\n config: configs[i],\n fanIndex: i,\n lineWidth: lineWidth,\n totalValue: totalValue,\n drawWhole: configs.length === 1,\n updateShape: group['shapeMap'][shapeName]\n });\n if (result.shape) visitMap[shapeName] = true;\n if (result.shouldEnd) break;\n arcBegin = result.arcBegin;\n beginAngle = result.beginAngle;\n }\n }\n }\n // remove the old shapes which are not visited, including the situation taht donutAttrs is empty\n var fanKeys = Object.keys(group['shapeMap']).filter(function (key) {\n return key.includes(FAN_NAME_PREFIX);\n });\n fanKeys.forEach(function (key) {\n if (!visitMap[key]) {\n group['shapeMap'][key].remove(true);\n delete group['shapeMap'][key];\n }\n });\n};\n/**\n * calculate the total value and format single value for each fan\n * @param donutAttrs\n * @param donutColorMap\n * @returns\n */\nvar getDonutConfig = function getDonutConfig(donutAttrs, donutColorMap) {\n var totalValue = 0;\n var configs = [];\n Object.keys(donutAttrs).forEach(function (name) {\n var value = +donutAttrs[name];\n if (isNaN(value)) return;\n configs.push({\n key: name,\n value: value,\n color: donutColorMap[name]\n });\n totalValue += value;\n });\n return {\n totalValue: totalValue,\n configs: configs\n };\n};\n/**\n * calculate the lineWidth and radius for fan shapes according to the keyShape's radius\n * @param keyShape\n * @returns\n */\nvar getDonutSize = function getDonutSize(keyShape) {\n var keyShapeR = keyShape.attr('r');\n var innerR = 0.6 * keyShapeR; // 甜甜圈的内环半径\n var arcR = (keyShapeR + innerR) / 2; // 内环半径与外环半径的平均值\n var lineWidth = keyShapeR - innerR;\n return {\n lineWidth: lineWidth,\n arcR: arcR\n };\n};","export var getBBoxFromPoint = function getBBoxFromPoint(point) {\n var x = point.x,\n y = point.y;\n return {\n x: x,\n y: y,\n centerX: x,\n centerY: y,\n minX: x,\n minY: y,\n maxX: x,\n maxY: y,\n height: 0,\n width: 0\n };\n};\nexport var getBBoxFromPoints = function getBBoxFromPoints(points) {\n if (points === void 0) {\n points = [];\n }\n var xs = [];\n var ys = [];\n points.forEach(function (p) {\n xs.push(p.x);\n ys.push(p.y);\n });\n var minX = Math.min.apply(Math, xs);\n var maxX = Math.max.apply(Math, xs);\n var minY = Math.min.apply(Math, ys);\n var maxY = Math.max.apply(Math, ys);\n return {\n centerX: (minX + maxX) / 2,\n centerY: (minY + maxY) / 2,\n maxX: maxX,\n maxY: maxY,\n minX: minX,\n minY: minY,\n height: maxY - minY,\n width: maxX - minX\n };\n};\nexport var isBBoxesOverlapping = function isBBoxesOverlapping(b1, b2) {\n return Math.abs(b1.centerX - b2.centerX) * 2 < b1.width + b2.width && Math.abs(b1.centerY - b2.centerY) * 2 < b1.height + b2.height;\n};\nexport var filterConnectPoints = function filterConnectPoints(points) {\n // pre-process: remove duplicated points\n var result = [];\n var map = {};\n var pointsLength = points.length;\n for (var i = pointsLength - 1; i >= 0; i--) {\n var p = points[i];\n p.id = \"\".concat(p.x, \"|||\").concat(p.y);\n if (!map[p.id]) {\n map[p.id] = p;\n result.push(p);\n }\n }\n return result;\n};\nexport var simplifyPolyline = function simplifyPolyline(points) {\n return filterConnectPoints(points);\n};\nexport var getSimplePolyline = function getSimplePolyline(sPoint, tPoint) {\n return [sPoint, {\n x: sPoint.x,\n y: tPoint.y\n }, tPoint];\n};\nexport var getExpandedBBox = function getExpandedBBox(bbox, offset) {\n if (bbox.width || bbox.height) {\n return {\n centerX: bbox.centerX,\n centerY: bbox.centerY,\n minX: bbox.minX - offset,\n minY: bbox.minY - offset,\n maxX: bbox.maxX + offset,\n maxY: bbox.maxY + offset,\n height: bbox.height + 2 * offset,\n width: bbox.width + 2 * offset\n };\n }\n // when it is a point\n return bbox;\n};\nexport var isHorizontalPort = function isHorizontalPort(port, bbox) {\n var dx = Math.abs(port.x - bbox.centerX);\n var dy = Math.abs(port.y - bbox.centerY);\n if (dx === 0 && dy === 0) return 0;\n return dx / bbox.width > dy / bbox.height;\n};\nexport var getExpandedBBoxPoint = function getExpandedBBoxPoint(bbox,\n// 将原来节点 bbox 扩展了 offset 后的 bbox,且被 gridSize 格式化\npoint,\n// 被 gridSize 格式化后的位置(anchorPoint)\nanotherPoint) {\n var isHorizontal = isHorizontalPort(point, bbox);\n if (isHorizontal === 0) {\n // 说明锚点是节点中心,linkCenter: true。需要根据两个节点的相对关系决定方向\n var x = bbox.centerX;\n var y = bbox.centerY;\n if (anotherPoint.y < point.y) {\n // 另一端在左上/右上方时,总是从上方走\n y = bbox.minY;\n } else if (anotherPoint.x > point.x) {\n // 另一端在右下方,往右边走\n x = bbox.maxX;\n } else if (anotherPoint.x < point.x) {\n // 另一端在左下方,往左边走\n x = bbox.minX;\n } else if (anotherPoint.x === point.x) {\n // 另一段在正下方,往下走\n y = bbox.maxY;\n }\n return {\n x: x,\n y: y\n };\n }\n if (isHorizontal) {\n return {\n x: point.x > bbox.centerX ? bbox.maxX : bbox.minX,\n y: point.y\n };\n }\n return {\n x: point.x,\n y: point.y > bbox.centerY ? bbox.maxY : bbox.minY\n };\n};\n/**\n *\n * @param b1\n * @param b2\n */\nexport var mergeBBox = function mergeBBox(b1, b2) {\n var minX = Math.min(b1.minX, b2.minX);\n var minY = Math.min(b1.minY, b2.minY);\n var maxX = Math.max(b1.maxX, b2.maxX);\n var maxY = Math.max(b1.maxY, b2.maxY);\n return {\n centerX: (minX + maxX) / 2,\n centerY: (minY + maxY) / 2,\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY,\n height: maxY - minY,\n width: maxX - minX\n };\n};\nexport var getPointsFromBBox = function getPointsFromBBox(bbox) {\n // anticlockwise\n return [{\n x: bbox.minX,\n y: bbox.minY\n }, {\n x: bbox.maxX,\n y: bbox.minY\n }, {\n x: bbox.maxX,\n y: bbox.maxY\n }, {\n x: bbox.minX,\n y: bbox.maxY\n }];\n};\nexport var isPointOutsideBBox = function isPointOutsideBBox(point, bbox) {\n var x = point.x,\n y = point.y;\n return x < bbox.minX || x > bbox.maxX || y < bbox.minY || y > bbox.maxY;\n};\nexport var getBBoxXCrossPoints = function getBBoxXCrossPoints(bbox, x) {\n if (x < bbox.minX || x > bbox.maxX) {\n return [];\n }\n return [{\n x: x,\n y: bbox.minY\n }, {\n x: x,\n y: bbox.maxY\n }];\n};\nexport var getBBoxYCrossPoints = function getBBoxYCrossPoints(bbox, y) {\n if (y < bbox.minY || y > bbox.maxY) {\n return [];\n }\n return [{\n x: bbox.minX,\n y: y\n }, {\n x: bbox.maxX,\n y: y\n }];\n};\nexport var getBBoxCrossPointsByPoint = function getBBoxCrossPointsByPoint(bbox, point) {\n return getBBoxXCrossPoints(bbox, point.x).concat(getBBoxYCrossPoints(bbox, point.y));\n};\n/**\n * 曼哈顿距离\n */\nexport var distance = function distance(p1, p2) {\n return Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n};\n/**\n * 如果 points 中的一个节点 x 与 p 相等,则消耗 -2。y 同\n * 即优先选择和 points 在同一水平线 / 垂直线上的点\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport var _costByPoints = function _costByPoints(p, points) {\n var offset = -2;\n var result = 0;\n points.forEach(function (point) {\n if (point) {\n if (p.x === point.x) {\n result += offset;\n }\n if (p.y === point.y) {\n result += offset;\n }\n }\n });\n return result;\n};\n/**\n * ps 经过 p 到 pt 的距离,减去其他路过节点造成的消耗\n */\nexport var heuristicCostEstimate = function heuristicCostEstimate(p, ps, pt, source, target) {\n return distance(p, ps) + distance(p, pt) + _costByPoints(p, [ps, pt, source, target]);\n};\nexport var reconstructPath = function reconstructPath(pathPoints, pointById, cameFrom, currentId, iterator) {\n if (iterator === void 0) {\n iterator = 0;\n }\n pathPoints.unshift(pointById[currentId]);\n if (cameFrom[currentId] && cameFrom[currentId] !== currentId && iterator <= 100) {\n reconstructPath(pathPoints, pointById, cameFrom, cameFrom[currentId], iterator + 1);\n }\n};\n/**\n * 从 arr 中删去 item\n */\nexport var removeFrom = function removeFrom(arr, item) {\n var index = arr.indexOf(item);\n if (index > -1) {\n arr.splice(index, 1);\n }\n};\nexport var isSegmentsIntersected = function isSegmentsIntersected(p0, p1, p2, p3) {\n var v1x = p2.x - p0.x;\n var v1y = p2.y - p0.y;\n var v2x = p3.x - p0.x;\n var v2y = p3.y - p0.y;\n var v3x = p2.x - p1.x;\n var v3y = p2.y - p1.y;\n var v4x = p3.x - p1.x;\n var v4y = p3.y - p1.y;\n var pd1 = v1x * v2y - v1y * v2x;\n var pd2 = v3x * v4y - v3y * v4x;\n var pd3 = v1x * v3y - v1y * v3x;\n var pd4 = v2x * v4y - v2y * v4x;\n return pd1 * pd2 <= 0 && pd3 * pd4 <= 0;\n};\nexport var isSegmentCrossingBBox = function isSegmentCrossingBBox(p1, p2, bbox) {\n if (bbox.width || bbox.height) {\n var _a = getPointsFromBBox(bbox),\n pa = _a[0],\n pb = _a[1],\n pc = _a[2],\n pd = _a[3];\n return isSegmentsIntersected(p1, p2, pa, pb) || isSegmentsIntersected(p1, p2, pa, pd) || isSegmentsIntersected(p1, p2, pb, pc) || isSegmentsIntersected(p1, p2, pc, pd);\n }\n return false;\n};\n/**\n * 在 points 中找到满足 x 或 y 和 point 的 x 或 y 相等,且与 point 连线不经过 bbox1 与 bbox2 的点\n */\nexport var getNeighborPoints = function getNeighborPoints(points, point, bbox1, bbox2) {\n var neighbors = [];\n points.forEach(function (p) {\n if (p === point) return;\n if (p.x === point.x || p.y === point.y) {\n if (isSegmentCrossingBBox(p, point, bbox1) || isSegmentCrossingBBox(p, point, bbox2)) return;\n neighbors.push(p);\n }\n });\n return filterConnectPoints(neighbors);\n};\nexport var pathFinder = function pathFinder(points, start, goal, sBBox, tBBox, os, ot) {\n var _a;\n // A-Star Algorithm\n var closedSet = [];\n var openSet = (_a = {}, _a[start.id] = start, _a);\n var cameFrom = {};\n var gScore = {}; // all default values are Infinity\n var fScore = {}; // all default values are Infinity\n gScore[start.id] = 0;\n fScore[start.id] = heuristicCostEstimate(start, goal, start);\n var sortedOpenSet = new SortedArray();\n sortedOpenSet.add({\n id: start.id,\n value: fScore[start.id]\n });\n var pointById = {};\n points.forEach(function (p) {\n pointById[p.id] = p;\n });\n var current;\n while (Object.keys(openSet).length) {\n var minId = sortedOpenSet.minId(false);\n if (minId) {\n current = openSet[minId];\n } else {\n break;\n }\n // 若 openSet 中 fScore 最小的点就是终点\n if (current === goal) {\n // ending condition\n var pathPoints = [];\n reconstructPath(pathPoints, pointById, cameFrom, goal.id);\n return pathPoints;\n }\n delete openSet[current.id];\n sortedOpenSet.remove(current.id);\n closedSet.push(current);\n var neighborPoints = getNeighborPoints(points, current, sBBox, tBBox);\n var iterateNeighbors = function iterateNeighbors(items) {\n items.forEach(function (neighbor) {\n if (closedSet.indexOf(neighbor) !== -1) {\n return;\n }\n var neighborId = neighbor.id;\n if (!openSet[neighborId]) {\n openSet[neighborId] = neighbor;\n }\n var tentativeGScore = fScore[current.id] + distance(current, neighbor); // + distance(neighbor, goal);\n if (gScore[neighborId] && tentativeGScore >= gScore[neighborId]) {\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n return;\n }\n cameFrom[neighborId] = current.id;\n gScore[neighborId] = tentativeGScore;\n fScore[neighborId] = gScore[neighborId] + heuristicCostEstimate(neighbor, goal, start, os, ot);\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n });\n };\n iterateNeighbors(neighborPoints);\n }\n // throw new Error('Cannot find path');\n return [start, goal];\n};\nexport var isBending = function isBending(p0, p1, p2) {\n return !(p0.x === p1.x && p1.x === p2.x || p0.y === p1.y && p1.y === p2.y);\n};\nexport var getBorderRadiusPoints = function getBorderRadiusPoints(p0, p1, p2, r) {\n var d0 = distance(p0, p1);\n var d1 = distance(p2, p1);\n if (d0 < r) {\n r = d0;\n }\n if (d1 < r) {\n r = d1;\n }\n var ps = {\n x: p1.x - r / d0 * (p1.x - p0.x),\n y: p1.y - r / d0 * (p1.y - p0.y)\n };\n var pt = {\n x: p1.x - r / d1 * (p1.x - p2.x),\n y: p1.y - r / d1 * (p1.y - p2.y)\n };\n return [ps, pt];\n};\nexport var getPathWithBorderRadiusByPolyline = function getPathWithBorderRadiusByPolyline(points, borderRadius) {\n var pathSegments = [];\n var startPoint = points[0];\n pathSegments.push(\"M\".concat(startPoint.x, \" \").concat(startPoint.y));\n points.forEach(function (p, i) {\n var p1 = points[i + 1];\n var p2 = points[i + 2];\n if (p1 && p2) {\n if (isBending(p, p1, p2)) {\n var _a = getBorderRadiusPoints(p, p1, p2, borderRadius),\n ps = _a[0],\n pt = _a[1];\n pathSegments.push(\"L\".concat(ps.x, \" \").concat(ps.y));\n pathSegments.push(\"Q\".concat(p1.x, \" \").concat(p1.y, \" \").concat(pt.x, \" \").concat(pt.y));\n pathSegments.push(\"L\".concat(pt.x, \" \").concat(pt.y));\n } else {\n pathSegments.push(\"L\".concat(p1.x, \" \").concat(p1.y));\n }\n } else if (p1) {\n pathSegments.push(\"L\".concat(p1.x, \" \").concat(p1.y));\n }\n });\n return pathSegments.join('');\n};\nexport var getPolylinePoints = function getPolylinePoints(start, end, sNode, tNode, offset) {\n var sBBox, tBBox;\n if (!sNode || !sNode.getType()) {\n sBBox = getBBoxFromPoint(start);\n } else if (sNode.getType() === 'combo') {\n var sKeyShapeBBox = sNode.getKeyShape().getBBox();\n if (sKeyShapeBBox) {\n var _a = sNode.getModel(),\n sx = _a.x,\n sy = _a.y;\n sBBox = {\n x: sx,\n y: sy,\n width: sKeyShapeBBox.width,\n height: sKeyShapeBBox.height,\n minX: sKeyShapeBBox.minX + sx,\n maxX: sKeyShapeBBox.maxX + sx,\n minY: sKeyShapeBBox.minY + sy,\n maxY: sKeyShapeBBox.maxY + sy\n };\n sBBox.centerX = (sBBox.minX + sBBox.maxX) / 2;\n sBBox.centerY = (sBBox.minY + sBBox.maxY) / 2;\n } else {\n sBBox = getBBoxFromPoint(start);\n }\n } else {\n sBBox = sNode && sNode.getBBox();\n }\n if (!tNode || !tNode.getType()) {\n tBBox = getBBoxFromPoint(end);\n } else if (tNode.getType() === 'combo') {\n var tKeyShapeBBox = tNode.getKeyShape().getBBox();\n if (tKeyShapeBBox) {\n var _b = tNode.getModel(),\n tx = _b.x,\n ty = _b.y;\n tBBox = {\n x: tx,\n y: ty,\n width: tKeyShapeBBox.width,\n height: tKeyShapeBBox.height,\n minX: tKeyShapeBBox.minX + tx,\n maxX: tKeyShapeBBox.maxX + tx,\n minY: tKeyShapeBBox.minY + ty,\n maxY: tKeyShapeBBox.maxY + ty\n };\n tBBox.centerX = (tBBox.minX + tBBox.maxX) / 2;\n tBBox.centerY = (tBBox.minY + tBBox.maxY) / 2;\n } else {\n tBBox = getBBoxFromPoint(end);\n }\n } else {\n tBBox = tNode && tNode.getBBox();\n }\n // if (isBBoxesOverlapping(sBBox, tBBox)) {\n // // source and target nodes are overlapping\n // return simplifyPolyline(getSimplePolyline(start, end));\n // }\n var sxBBox = getExpandedBBox(sBBox, offset);\n var txBBox = getExpandedBBox(tBBox, offset);\n // if (isBBoxesOverlapping(sxBBox, txBBox)) {\n // // the expanded bounding boxes of source and target nodes are overlapping\n // return simplifyPolyline(getSimplePolyline(start, end));\n // }\n var sPoint = getExpandedBBoxPoint(sxBBox, start, end);\n var tPoint = getExpandedBBoxPoint(txBBox, end, start);\n var lineBBox = getBBoxFromPoints([sPoint, tPoint]);\n var sMixBBox = mergeBBox(sxBBox, lineBBox);\n var tMixBBox = mergeBBox(txBBox, lineBBox);\n var connectPoints = [];\n connectPoints = connectPoints.concat(getPointsFromBBox(sMixBBox)).concat(getPointsFromBBox(tMixBBox));\n var centerPoint = {\n x: (start.x + end.x) / 2,\n y: (start.y + end.y) / 2\n };\n [lineBBox, sMixBBox, tMixBBox].forEach(function (bbox) {\n connectPoints = connectPoints.concat(getBBoxCrossPointsByPoint(bbox, centerPoint).filter(function (p) {\n return isPointOutsideBBox(p, sxBBox) && isPointOutsideBBox(p, txBBox);\n }));\n });\n [{\n x: sPoint.x,\n y: tPoint.y\n }, {\n x: tPoint.x,\n y: sPoint.y\n }].forEach(function (p) {\n // impossible!!\n if (isPointOutsideBBox(p, sxBBox) && isPointOutsideBBox(p, txBBox) // &&\n // isPointInsideBBox(p, sMixBBox) && isPointInsideBBox(p, tMixBBox)\n ) {\n connectPoints.push(p);\n }\n });\n connectPoints.unshift(sPoint);\n connectPoints.push(tPoint);\n // filter out dulplicated points in connectPoints\n connectPoints = filterConnectPoints(connectPoints); // , sxBBox, txBBox, outerBBox\n var pathPoints = pathFinder(connectPoints, sPoint, tPoint, sBBox, tBBox, start, end);\n pathPoints.unshift(start);\n pathPoints.push(end);\n return simplifyPolyline(pathPoints);\n};\n/**\n * 去除连续同 x 不同 y 的中间点;去除连续同 y 不同 x 的中间点\n * @param points 坐标集合 { x: number, y: number, id: string }[]\n * @returns\n */\nexport var removeRedundantPoint = function removeRedundantPoint(points) {\n if (!(points === null || points === void 0 ? void 0 : points.length)) return points;\n var beginPoint = points[points.length - 1];\n var current = {\n x: beginPoint.x,\n y: beginPoint.y\n };\n var continueSameX = [beginPoint];\n var continueSameY = [beginPoint];\n for (var i = points.length - 2; i >= 0; i--) {\n var point = points[i];\n if (point.x === current.x) {\n continueSameX.push(point);\n } else {\n continueSameX = [point];\n current.x = point.x;\n }\n if (point.y === current.y) {\n continueSameY.push(point);\n } else {\n continueSameY = [point];\n current.y = point.y;\n }\n if (continueSameX.length > 2) {\n var removeIdx = points.indexOf(continueSameX[1]);\n if (removeIdx > -1) points.splice(removeIdx, 1);\n continue;\n }\n if (continueSameY.length > 2) {\n var removeIdx = points.indexOf(continueSameY[1]);\n if (removeIdx > -1) points.splice(removeIdx, 1);\n }\n }\n return points;\n};\n/**\n * sorted array ascendly\n * add new item to proper index when calling add\n */\nvar SortedArray = /** @class */function () {\n function SortedArray() {\n this.arr = [];\n this.map = {};\n this.arr = [];\n this.map = {};\n }\n SortedArray.prototype._innerAdd = function (item, length) {\n var idxRange = [0, length - 1];\n while (idxRange[1] - idxRange[0] > 1) {\n var midIdx = Math.floor((idxRange[0] + idxRange[1]) / 2);\n if (this.arr[midIdx].value > item.value) {\n idxRange[1] = midIdx;\n } else if (this.arr[midIdx].value < item.value) {\n idxRange[0] = midIdx;\n } else {\n this.arr.splice(midIdx, 0, item);\n this.map[item.id] = true;\n return;\n }\n }\n this.arr.splice(idxRange[1], 0, item);\n this.map[item.id] = true;\n };\n SortedArray.prototype.add = function (item) {\n // 已经存在,先移除\n delete this.map[item.id];\n var length = this.arr.length;\n if (!length) {\n this.arr.push(item);\n this.map[item.id] = true;\n return;\n }\n // 比最后一个大,加入尾部\n if (this.arr[length - 1].value < item.value) {\n this.arr.push(item);\n this.map[item.id] = true;\n return;\n }\n this._innerAdd(item, length);\n };\n // only remove from the map to avoid cost\n // clear the invalid (not in the map) item when calling minId(true)\n SortedArray.prototype.remove = function (id) {\n if (!this.map[id]) return;\n delete this.map[id];\n };\n SortedArray.prototype._clearAndGetMinId = function () {\n var res;\n for (var i = this.arr.length - 1; i >= 0; i--) {\n if (this.map[this.arr[i].id]) res = this.arr[i].id;else this.arr.splice(i, 1);\n }\n return res;\n };\n SortedArray.prototype._findFirstId = function () {\n while (this.arr.length) {\n var first = this.arr.shift();\n if (this.map[first.id]) return first.id;\n }\n };\n SortedArray.prototype.minId = function (clear) {\n if (clear) {\n return this._clearAndGetMinId();\n } else {\n return this._findFirstId();\n }\n };\n return SortedArray;\n}();\nexport { SortedArray };","/**\n * 通过配置不同的 costFunc, distFunc, constraints 可以得到不同效果的 router\n * generalRouter: 不限制搜索时的移动方向,避开障碍即可\n * orthogonal: 线必须沿着竖直或水平方向(4个方向)\n * octolinearRouter: 线沿着竖直、水平、对角线方向(8个方向)\n */\nimport { Util } from '@antv/g6-core';\nimport { deepMix } from '@antv/util';\nimport { getExpandedBBox, getExpandedBBoxPoint, getPolylinePoints, simplifyPolyline, isSegmentCrossingBBox, SortedArray } from './polyline-util';\nvar manhattanDist = function manhattanDist(p1, p2) {\n return Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n};\nvar eucliDist = function eucliDist(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n};\nvar straightPath = function straightPath(start, end) {\n // console.warn('fallbackRoute: straight path');\n return [start, end];\n};\nvar simplePolyline = function simplePolyline(start, end, startNode, endNode, cfg) {\n return simplifyPolyline(getPolylinePoints(start, end, startNode, endNode, cfg.offset));\n};\n// getPolylinePoints\nvar defaultCfg = {\n offset: 20,\n maxAllowedDirectionChange: Math.PI / 2,\n maximumLoops: 2000,\n gridSize: 10,\n directions: [{\n stepX: 1,\n stepY: 0\n }, {\n stepX: -1,\n stepY: 0\n }, {\n stepX: 0,\n stepY: 1\n }, {\n stepX: 0,\n stepY: -1\n } // top\n ],\n\n get penalties() {\n return {\n 0: 0,\n 45: this.gridSize / 2,\n 90: this.gridSize / 2\n };\n },\n distFunc: manhattanDist,\n fallbackRoute: simplePolyline\n};\nexport var octolinearCfg = {\n maxAllowedDirectionChange: Math.PI / 4,\n // 8 个方向: 上下左右 + 45度斜线方向\n directions: [{\n stepX: 1,\n stepY: 0\n }, {\n stepX: 1,\n stepY: 1\n }, {\n stepX: 0,\n stepY: 1\n }, {\n stepX: -1,\n stepY: 1\n }, {\n stepX: -1,\n stepY: 0\n }, {\n stepX: -1,\n stepY: -1\n }, {\n stepX: 0,\n stepY: -1\n }, {\n stepX: 1,\n stepY: -1\n }],\n distFunc: eucliDist,\n fallbackRoute: straightPath\n};\nvar pos2GridIx = function pos2GridIx(pos, gridSize) {\n var gridIx = Math.round(Math.abs(pos / gridSize));\n var sign = pos < 0 ? -1 : 1;\n return gridIx < 0 ? 0 : sign * gridIx;\n};\nvar getObstacleMap = function getObstacleMap(items, gridSize, offset) {\n var map = {};\n items.forEach(function (item) {\n // create-edge 时,当边类型为 polyline 时 endNode 为 null\n if (!item) return;\n var bbox = getExpandedBBox(item.getBBox(), offset);\n for (var x = pos2GridIx(bbox.minX, gridSize); x <= pos2GridIx(bbox.maxX, gridSize); x += 1) {\n for (var y = pos2GridIx(bbox.minY, gridSize); y <= pos2GridIx(bbox.maxY, gridSize); y += 1) {\n map[\"\".concat(x, \"|||\").concat(y)] = true;\n }\n }\n });\n return map;\n};\n/**\n * 方向角:计算从 p1 到 p2 的射线与水平线形成的夹角度数(顺时针从右侧0°转到该射线的角度)\n * @param p1 PolyPoint\n * @param p2 PolyPoint\n */\nvar getDirectionAngle = function getDirectionAngle(p1, p2) {\n var deltaX = p2.x - p1.x;\n var deltaY = p2.y - p1.y;\n if (deltaX || deltaY) {\n return Math.atan2(deltaY, deltaX);\n }\n return 0;\n};\n/**\n * 方向角的改变,取小于180度角\n * @param angle1\n * @param angle2\n */\nvar getAngleDiff = function getAngleDiff(angle1, angle2) {\n var directionChange = Math.abs(angle1 - angle2);\n return directionChange > Math.PI ? 2 * Math.PI - directionChange : directionChange;\n // return directionChange > 180 ? 360 - directionChange : directionChange;\n};\n// Path finder //\nvar estimateCost = function estimateCost(from, endPoints, distFunc) {\n var min = Infinity;\n for (var i = 0, len = endPoints.length; i < len; i++) {\n var cost = distFunc(from, endPoints[i]);\n if (cost < min) {\n min = cost;\n }\n }\n return min;\n};\n// 计算考虑 offset 后的 BBox 上的连接点\nvar getBoxPoints = function getBoxPoints(point,\n// 被 gridSize 格式化后的位置(anchorPoint)\noriPoint,\n// 未被 gridSize 格式化的位置(anchorPoint)\nnode,\n// 原始节点,用于获取 bbox\nanotherPoint,\n// 另一端被 gridSize 格式化后的位置\ncfg) {\n var points = [];\n // create-edge 生成边的过程中,endNode 为 null\n if (!node) {\n return [point];\n }\n var directions = cfg.directions,\n offset = cfg.offset;\n var bbox = node.getBBox();\n var isInside = oriPoint.x > bbox.minX && oriPoint.x < bbox.maxX && oriPoint.y > bbox.minY && oriPoint.y < bbox.maxY;\n var expandBBox = getExpandedBBox(bbox, offset);\n for (var i in expandBBox) {\n expandBBox[i] = pos2GridIx(expandBBox[i], cfg.gridSize);\n }\n if (isInside) {\n // 如果 anchorPoint 在节点内部,允许第一段线穿过节点\n for (var _i = 0, directions_1 = directions; _i < directions_1.length; _i++) {\n var dir = directions_1[_i];\n var bounds = [[{\n x: expandBBox.minX,\n y: expandBBox.minY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.minY\n }], [{\n x: expandBBox.minX,\n y: expandBBox.minY\n }, {\n x: expandBBox.minX,\n y: expandBBox.maxY\n }], [{\n x: expandBBox.maxX,\n y: expandBBox.minY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.maxY\n }], [{\n x: expandBBox.minX,\n y: expandBBox.maxY\n }, {\n x: expandBBox.maxX,\n y: expandBBox.maxY\n }]];\n for (var i = 0; i < 4; i++) {\n var boundLine = bounds[i];\n var insterctP_1 = Util.getLineIntersect(point, {\n x: point.x + dir.stepX * expandBBox.width,\n y: point.y + dir.stepY * expandBBox.height\n }, boundLine[0], boundLine[1]);\n if (insterctP_1 && !isSegmentCrossingBBox(point, insterctP_1, bbox)) {\n insterctP_1.id = \"\".concat(insterctP_1.x, \"|||\").concat(insterctP_1.y);\n points.push(insterctP_1);\n }\n }\n }\n return points;\n }\n // 如果 anchorPoint 在节点上,只有一个可选方向\n var insterctP = getExpandedBBoxPoint(expandBBox, point, anotherPoint);\n insterctP.id = \"\".concat(insterctP.x, \"|||\").concat(insterctP.y);\n return [insterctP];\n};\nvar getDirectionChange = function getDirectionChange(current, neighbor, cameFrom, scaleStartPoint) {\n var directionAngle = getDirectionAngle(current, neighbor);\n var currentCameFrom = cameFrom[current.id];\n if (!currentCameFrom) {\n var startAngle = getDirectionAngle(scaleStartPoint, current);\n return getAngleDiff(startAngle, directionAngle);\n }\n var prevDirectionAngle = getDirectionAngle({\n x: currentCameFrom.x,\n y: currentCameFrom.y\n }, current);\n return getAngleDiff(prevDirectionAngle, directionAngle);\n};\nvar getControlPoints = function getControlPoints(current, cameFrom, scaleStartPoint, endPoint, startPoint, scaleEndPoint, gridSize) {\n var controlPoints = [endPoint];\n var pointZero = endPoint;\n var currentId = current.id;\n var currentX = current.x;\n var currentY = current.y;\n var lastPoint = {\n x: currentX,\n y: currentY,\n id: currentId\n };\n if (getDirectionChange(lastPoint, scaleEndPoint, cameFrom, scaleStartPoint)) {\n pointZero = {\n x: scaleEndPoint.x === endPoint.x ? endPoint.x : lastPoint.x * gridSize,\n y: scaleEndPoint.y === endPoint.y ? endPoint.y : lastPoint.y * gridSize\n };\n controlPoints.unshift(pointZero);\n }\n var currentCameFrom = cameFrom[currentId];\n while (currentCameFrom && currentCameFrom.id !== currentId) {\n var point = {\n x: currentX,\n y: currentY,\n id: currentId\n };\n var prePoint = {\n x: currentCameFrom.x,\n y: currentCameFrom.y,\n id: currentCameFrom.id\n };\n var directionChange = getDirectionChange(prePoint, point, cameFrom, scaleStartPoint);\n if (directionChange) {\n pointZero = {\n x: prePoint.x === point.x ? pointZero.x : prePoint.x * gridSize,\n y: prePoint.y === point.y ? pointZero.y : prePoint.y * gridSize\n };\n controlPoints.unshift(pointZero);\n }\n currentId = prePoint.id;\n currentX = prePoint.x;\n currentY = prePoint.y;\n currentCameFrom = cameFrom[currentId];\n }\n // 和startNode对齐\n controlPoints[0].x = currentX === scaleStartPoint.x ? startPoint.x : pointZero.x;\n controlPoints[0].y = currentY === scaleStartPoint.y ? startPoint.y : pointZero.y;\n controlPoints.unshift(startPoint);\n return controlPoints;\n};\nexport var pathFinder = function pathFinder(startPoint, endPoint, startNode, endNode, routerCfg) {\n if (isNaN(startPoint.x) || isNaN(endPoint.x)) return [];\n var cfg = deepMix(defaultCfg, routerCfg);\n cfg.obstacles = cfg.obstacles || [];\n var penalties = cfg.penalties,\n gridSize = cfg.gridSize;\n var map = getObstacleMap(cfg.obstacles.concat([startNode, endNode]), gridSize, cfg.offset);\n var scaleStartPoint = {\n x: pos2GridIx(startPoint.x, gridSize),\n y: pos2GridIx(startPoint.y, gridSize)\n };\n var scaleEndPoint = {\n x: pos2GridIx(endPoint.x, gridSize),\n y: pos2GridIx(endPoint.y, gridSize)\n };\n startPoint.id = \"\".concat(scaleStartPoint.x, \"|||\").concat(scaleStartPoint.y);\n endPoint.id = \"\".concat(scaleEndPoint.x, \"|||\").concat(scaleEndPoint.y);\n var startPoints = getBoxPoints(scaleStartPoint, startPoint, startNode, scaleEndPoint, cfg);\n var endPoints = getBoxPoints(scaleEndPoint, endPoint, endNode, scaleStartPoint, cfg);\n startPoints.forEach(function (point) {\n delete map[point.id];\n });\n endPoints.forEach(function (point) {\n delete map[point.id];\n });\n var openSet = {};\n var closedSet = {};\n var cameFrom = {};\n // 从起点到当前点已产生的 cost, default: Infinity\n var gScore = {};\n // 起点经过当前点到达终点预估的 cost, default: Infinity\n var fScore = {};\n var sortedOpenSet = new SortedArray();\n // initialize\n for (var i = 0; i < startPoints.length; i++) {\n var firstStep = startPoints[i];\n openSet[firstStep.id] = firstStep;\n gScore[firstStep.id] = 0;\n fScore[firstStep.id] = estimateCost(firstStep, endPoints, cfg.distFunc);\n sortedOpenSet.add({\n id: firstStep.id,\n value: fScore[firstStep.id]\n });\n }\n var remainLoops = cfg.maximumLoops;\n var current, direction, neighbor, neighborCost, costFromStart, directionChange;\n var curCost = Infinity;\n var endPointMap = {};\n endPoints.forEach(function (point) {\n endPointMap[\"\".concat(point.x, \"|||\").concat(point.y)] = true;\n });\n Object.keys(openSet).forEach(function (key) {\n var id = openSet[key].id;\n if (fScore[id] <= curCost) {\n curCost = fScore[id];\n current = openSet[id];\n }\n });\n while (Object.keys(openSet).length > 0 && remainLoops > 0) {\n var minId = sortedOpenSet.minId((remainLoops + 1) % 30 === 0);\n if (minId) {\n current = openSet[minId];\n } else {\n break;\n }\n // 如果 fScore 最小的点就是终点\n if (endPointMap[\"\".concat(current.x, \"|||\").concat(current.y)]) {\n return getControlPoints(current, cameFrom, scaleStartPoint, endPoint, startPoint, scaleEndPoint, gridSize);\n }\n delete openSet[current.id];\n sortedOpenSet.remove(current.id);\n closedSet[current.id] = true;\n // 获取符合条件的下一步的候选连接点\n // 沿候选方向走一步\n for (var i = 0; i < cfg.directions.length; i++) {\n direction = cfg.directions[i];\n var neighborId = \"\".concat(Math.round(current.x) + direction.stepX, \"|||\").concat(Math.round(current.y) + direction.stepY);\n neighbor = {\n x: current.x + direction.stepX,\n y: current.y + direction.stepY,\n id: neighborId\n };\n if (closedSet[neighborId]) continue;\n directionChange = getDirectionChange(current, neighbor, cameFrom, scaleStartPoint);\n if (directionChange > cfg.maxAllowedDirectionChange) continue;\n if (map[neighborId]) continue; // 如果交叉则跳过\n // 将候选点加入 openSet, 并计算每个候选点的 cost\n if (!openSet[neighborId]) {\n openSet[neighborId] = neighbor;\n }\n var directionPenalties = penalties[directionChange];\n neighborCost = cfg.distFunc(current, neighbor) + (isNaN(directionPenalties) ? gridSize : directionPenalties);\n costFromStart = gScore[current.id] + neighborCost;\n var neighborGScore = gScore[neighborId];\n if (neighborGScore && costFromStart >= neighborGScore) {\n continue;\n }\n cameFrom[neighborId] = current;\n gScore[neighborId] = costFromStart;\n fScore[neighborId] = costFromStart + estimateCost(neighbor, endPoints, cfg.distFunc);\n sortedOpenSet.add({\n id: neighborId,\n value: fScore[neighborId]\n });\n }\n remainLoops -= 1;\n }\n return cfg.fallbackRoute(startPoint, endPoint, startNode, endNode, cfg);\n};","import { __assign } from \"tslib\";\nimport { mix, each, isArray, isString } from '@antv/util';\nimport { registerEdge, Util, BaseGlobal as Global } from '@antv/g6-core';\nimport { getPathWithBorderRadiusByPolyline, getPolylinePoints, removeRedundantPoint } from './polyline-util';\nimport { pathFinder } from './router';\n// 折线\nregisterEdge('polyline', {\n options: {\n color: Global.defaultEdge.color,\n size: Global.defaultEdge.size,\n style: {\n radius: 0,\n offset: 15,\n x: 0,\n y: 0,\n stroke: Global.defaultEdge.style.stroke,\n lineAppendWidth: Global.defaultEdge.style.lineAppendWidth\n },\n // 文本样式配置\n labelCfg: {\n style: {\n fill: Global.edgeLabel.style.fill,\n fontSize: Global.edgeLabel.style.fontSize,\n fontFamily: Global.windowFontFamily\n }\n },\n routeCfg: {\n obstacles: [],\n maxAllowedDirectionChange: Math.PI,\n maximumLoops: 500,\n gridSize: 10 // 指定精度\n },\n\n stateStyles: __assign({}, Global.edgeStateStyles)\n },\n shapeType: 'polyline',\n // 文本位置\n labelPosition: 'center',\n drawShape: function drawShape(cfg, group) {\n var shapeStyle = this.getShapeStyle(cfg);\n if (shapeStyle.radius === 0) delete shapeStyle.radius;\n var keyShape = group.addShape('path', {\n className: 'edge-shape',\n name: 'edge-shape',\n attrs: shapeStyle\n });\n group['shapeMap']['edge-shape'] = keyShape;\n return keyShape;\n },\n getShapeStyle: function getShapeStyle(cfg) {\n var defaultStyle = this.options.style;\n var strokeStyle = {\n stroke: cfg.color\n };\n var style = mix({}, defaultStyle, strokeStyle, cfg.style);\n cfg = this.getPathPoints(cfg);\n this.radius = style.radius;\n this.offset = style.offset;\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg);\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var radius = style.radius;\n var defaultRouteCfg = this.options.routeCfg;\n var routeCfg = mix({}, defaultRouteCfg, cfg.routeCfg);\n routeCfg.offset = style.offset;\n var path = this.getPath(points, source, target, radius, routeCfg, !Boolean(controlPoints));\n if (isArray(path) && path.length <= 1 || isString(path) && path.indexOf('L') === -1) {\n path = 'M0 0, L0 0';\n }\n if (isNaN(startPoint.x) || isNaN(startPoint.y) || isNaN(endPoint.x) || isNaN(endPoint.y)) {\n path = 'M0 0, L0 0';\n }\n var attrs = mix({}, Global.defaultEdge.style, style, {\n lineWidth: cfg.size,\n path: path\n });\n return attrs;\n },\n updateShapeStyle: function updateShapeStyle(cfg, item) {\n var group = item.getContainer();\n if (!item.isVisible()) return;\n var strokeStyle = {\n stroke: cfg.color\n };\n var shape = group['shapeMap']['edge-shape'] || group.find(function (element) {\n return element.get('className') === 'edge-shape';\n }) || item.getKeyShape();\n var size = cfg.size;\n cfg = this.getPathPoints(cfg);\n var startPoint = cfg.startPoint,\n endPoint = cfg.endPoint;\n var controlPoints = this.getControlPoints(cfg); // || cfg.controlPoints;\n var points = [startPoint]; // 添加起始点\n // 添加控制点\n if (controlPoints) {\n points = points.concat(controlPoints);\n }\n // 添加结束点\n points.push(endPoint);\n var currentAttr = shape.attr();\n var previousStyle = mix({}, strokeStyle, currentAttr, cfg.style);\n var source = cfg.sourceNode;\n var target = cfg.targetNode;\n var radius = previousStyle.radius;\n var defaultRouteCfg = this.options.routeCfg;\n var routeCfg = mix({}, defaultRouteCfg, cfg.routeCfg);\n routeCfg.offset = previousStyle.offset;\n var path = this.getPath(points, source, target, radius, routeCfg, !Boolean(controlPoints));\n if (isArray(path) && path.length <= 1 || isString(path) && path.indexOf('L') === -1) {\n path = 'M0 0, L0 0';\n }\n if (isNaN(startPoint.x) || isNaN(startPoint.y) || isNaN(endPoint.x) || isNaN(endPoint.y)) {\n path = 'M0 0, L0 0';\n }\n if (currentAttr.endArrow && previousStyle.endArrow === false) {\n cfg.style.endArrow = {\n path: ''\n };\n }\n if (currentAttr.startArrow && previousStyle.startArrow === false) {\n cfg.style.startArrow = {\n path: ''\n };\n }\n var style = mix(strokeStyle, shape.attr(), {\n lineWidth: size,\n path: path\n }, cfg.style);\n if (shape) {\n shape.attr(style);\n }\n },\n getPath: function getPath(points, source, target, radius, routeCfg, auto) {\n var offset = routeCfg.offset,\n obstacles = routeCfg.obstacles;\n var simple = routeCfg.simple;\n // 指定了控制点\n if (!offset || points.length > 2 || auto === false) {\n if (radius) {\n return getPathWithBorderRadiusByPolyline(points, radius);\n }\n var pathArray_1 = [];\n each(points, function (point, index) {\n if (index === 0) {\n pathArray_1.push(['M', point.x, point.y]);\n } else {\n pathArray_1.push(['L', point.x, point.y]);\n }\n });\n return pathArray_1;\n }\n // 未指定控制点\n if (simple !== false && !(obstacles === null || obstacles === void 0 ? void 0 : obstacles.length)) simple = true;\n var polylinePoints = simple ? getPolylinePoints(points[points.length - 1], points[0], target, source, offset) : pathFinder(points[0], points[points.length - 1], source, target, routeCfg);\n if (!polylinePoints || !polylinePoints.length) return 'M0 0, L0 0';\n if (radius) {\n var res_1 = getPathWithBorderRadiusByPolyline(polylinePoints, radius);\n return res_1;\n }\n // 去除连续同 x 不同 y 的中间点;去除连续同 y 不同 x 的中间点\n polylinePoints = removeRedundantPoint(polylinePoints);\n var res = Util.pointsToPolygon(polylinePoints);\n return res;\n }\n}, 'single-edge');","import { isBoolean, isObject } from '@antv/util';\nimport Util from '../util';\nvar cloneEvent = Util.cloneEvent,\n isNaN = Util.isNaN;\nvar abs = Math.abs;\nvar DRAG_OFFSET = 10;\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n direction: 'both',\n enableOptimize: false,\n // drag-canvas 可拖动的扩展范围,默认为 0,即最多可以拖动一屏的位置\n // 当设置的值大于 0 时,即拖动可以超过一屏\n // 当设置的值小于 0 时,相当于缩小了可拖动范围\n // 具体实例可参考:https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IFfoS67_HssAAAAAAAAAAAAAARQnAQ\n scalableRange: 0,\n allowDragOnItem: false\n };\n },\n getEvents: function getEvents() {\n return {\n 'mousedown': 'onMouseDown',\n 'drag': 'onDragMove',\n 'dragend': 'onMouseUp',\n 'canvas:click': 'onMouseUp',\n 'keyup': 'onKeyUp',\n 'focus': 'onKeyUp',\n 'keydown': 'onKeyDown',\n 'touchstart': 'onTouchStart',\n 'touchmove': 'onTouchMove',\n 'touchend': 'onMouseUp'\n };\n },\n updateViewport: function updateViewport(e) {\n var origin = this.origin;\n var clientX = +e.clientX;\n var clientY = +e.clientY;\n if (isNaN(clientX) || isNaN(clientY)) {\n return;\n }\n var dx = clientX - origin.x;\n var dy = clientY - origin.y;\n if (this.get('direction') === 'x') {\n dy = 0;\n } else if (this.get('direction') === 'y') {\n dx = 0;\n }\n this.origin = {\n x: clientX,\n y: clientY\n };\n var width = this.graph.get('width');\n var height = this.graph.get('height');\n var graphCanvasBBox = this.graph.get('canvas').getCanvasBBox();\n var expandWidth = this.scalableRange;\n var expandHeight = this.scalableRange;\n // 若 scalableRange 是 0~1 的小数,则作为比例考虑\n if (expandWidth < 1 && expandWidth > -1) {\n expandWidth = width * expandWidth;\n expandHeight = height * expandHeight;\n }\n if (graphCanvasBBox.minX <= width + expandWidth && graphCanvasBBox.minX + dx > width + expandWidth || graphCanvasBBox.maxX + expandWidth >= 0 && graphCanvasBBox.maxX + expandWidth + dx < 0) {\n dx = 0;\n }\n if (graphCanvasBBox.minY <= height + expandHeight && graphCanvasBBox.minY + dy > height + expandHeight || graphCanvasBBox.maxY + expandHeight >= 0 && graphCanvasBBox.maxY + expandHeight + dy < 0) {\n dy = 0;\n }\n this.graph.translate(dx, dy);\n },\n onTouchStart: function onTouchStart(e) {\n var self = this;\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n // 如果是双指操作,不允许拖拽画布\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n this.mousedown = true;\n self.onDragStart(e);\n },\n onMouseDown: function onMouseDown(e) {\n this.mousedown = true;\n },\n onDragMove: function onDragMove(evt) {\n if (!this.mousedown) return;\n if (!this.dragstart) {\n // dragstart\n this.dragstart = true;\n this.onDragStart(evt);\n } else {\n // drag\n this.onDrag(evt);\n }\n },\n onDragStart: function onDragStart(e) {\n var self = this;\n var event = e.originalEvent;\n // TODO: 'name' doesn't exist on `IG6GraphEvent`, we should consider typing it so users get autocomplete and other benefits\n if (event && e.name !== 'touchstart' && event.button !== 0) {\n return;\n }\n if (e.name !== 'touchstart' && typeof window !== 'undefined' && window.event && !window.event.buttons && !window.event.button) {\n return;\n }\n if (!this.shouldBegin(e, this)) {\n return;\n }\n if (self.keydown) return;\n if (!this.allowDrag(e)) return;\n self.origin = {\n x: e.clientX,\n y: e.clientY\n };\n self.dragging = false;\n if (this.enableOptimize) {\n // 拖动 canvas 过程中隐藏所有的边及label\n var graph = this.graph;\n var edges = graph.getEdges();\n for (var i = 0, len = edges.length; i < len; i++) {\n var shapes = edges[i].get('group').get('children');\n if (!shapes) continue;\n shapes.forEach(function (shape) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n });\n }\n var nodes = graph.getNodes();\n for (var j = 0, nodeLen = nodes.length; j < nodeLen; j++) {\n var container = nodes[j].getContainer();\n var children = container.get('children');\n for (var _i = 0, children_1 = children; _i < children_1.length; _i++) {\n var child = children_1[_i];\n var isKeyShape = child.get('isKeyShape');\n if (!isKeyShape) {\n child.set('ori-visibility', child.get('ori-visibility') || child.get('visible'));\n child.hide();\n }\n }\n }\n }\n // 绑定浏览器右键监听,触发拖拽结束,结束拖拽时移除\n if (typeof window !== 'undefined') {\n var self_1 = this;\n this.handleDOMContextMenu = function (e) {\n return self_1.onMouseUp(e);\n };\n document.body.addEventListener('contextmenu', this.handleDOMContextMenu);\n }\n },\n onTouchMove: function onTouchMove(e) {\n var self = this;\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n // 如果是双指操作,不允许拖拽画布,结束拖拽\n if (event1 && event2) {\n this.onMouseUp(e);\n return;\n }\n e.preventDefault();\n self.onDrag(e);\n },\n onDrag: function onDrag(e) {\n if (!this.mousedown) return;\n var graph = this.graph;\n if (this.keydown) return;\n if (!this.allowDrag(e)) return;\n e = cloneEvent(e);\n if (!this.origin) {\n return;\n }\n if (!this.dragging) {\n if (abs(this.origin.x - e.clientX) + abs(this.origin.y - e.clientY) < DRAG_OFFSET) {\n return;\n }\n if (this.shouldBegin(e, this)) {\n e.type = 'dragstart';\n graph.emit('canvas:dragstart', e);\n this.originPosition = {\n x: e.clientX,\n y: e.clientY\n };\n this.dragging = true;\n }\n } else {\n e.type = 'drag';\n graph.emit('canvas:drag', e);\n }\n if (this.shouldUpdate(e, this)) {\n this.updateViewport(e);\n }\n },\n onMouseUp: function onMouseUp(e) {\n var _a, _b;\n this.mousedown = false;\n this.dragstart = false;\n var graph = this.graph;\n if (this.keydown) return;\n var currentZoom = graph.getZoom();\n var modeController = graph.get('modeController');\n var zoomCanvas = (_b = (_a = modeController === null || modeController === void 0 ? void 0 : modeController.modes[modeController.mode]) === null || _a === void 0 ? void 0 : _a.filter(function (behavior) {\n return behavior.type === 'zoom-canvas';\n })) === null || _b === void 0 ? void 0 : _b[0];\n var optimizeZoom = zoomCanvas ? zoomCanvas.optimizeZoom || 0.1 : 0;\n if (this.enableOptimize) {\n // 拖动结束后显示所有的边\n var edges = graph.getEdges();\n for (var i = 0, len = edges.length; i < len; i++) {\n var shapes = edges[i].get('group').get('children');\n if (!shapes) continue;\n shapes.forEach(function (shape) {\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (oriVis) shape.show();\n });\n }\n if (currentZoom > optimizeZoom) {\n var nodes = graph.getNodes();\n for (var j = 0, nodeLen = nodes.length; j < nodeLen; j++) {\n var container = nodes[j].getContainer();\n var children = container.get('children');\n for (var _i = 0, children_2 = children; _i < children_2.length; _i++) {\n var child = children_2[_i];\n var isKeyShape = child.get('isKeyShape');\n if (!isKeyShape) {\n var oriVis = child.get('ori-visibility');\n child.set('ori-visibility', undefined);\n if (oriVis) child.show();\n }\n }\n }\n }\n }\n if (!this.dragging) {\n this.origin = null;\n return;\n }\n e = cloneEvent(e);\n if (this.shouldEnd(e, this)) {\n this.updateViewport(e);\n }\n e.type = 'dragend';\n e.dx = e.clientX - this.originPosition.x;\n e.dy = e.clientY - this.originPosition.y;\n graph.emit('canvas:dragend', e);\n this.endDrag();\n // 结束拖拽时移除浏览器右键监听\n if (typeof window !== 'undefined') {\n document.body.removeEventListener('contextmenu', this.handleDOMContextMenu);\n }\n },\n endDrag: function endDrag() {\n this.origin = null;\n this.dragging = false;\n this.dragbegin = false;\n this.mousedown = false;\n this.dragstart = false;\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (ALLOW_EVENTS.indexOf(code.toLowerCase()) > -1) {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n this.keydown = false;\n this.origin = null;\n this.dragging = false;\n this.dragbegin = false;\n },\n allowDrag: function allowDrag(evt) {\n var _a, _b;\n var target = evt.target;\n var targetIsCanvas = target && target.isCanvas && target.isCanvas();\n if (isBoolean(this.allowDragOnItem) && !this.allowDragOnItem && !targetIsCanvas) return false;\n if (isObject(this.allowDragOnItem)) {\n var _c = this.allowDragOnItem,\n node = _c.node,\n edge = _c.edge,\n combo = _c.combo;\n var itemType = (_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (!node && itemType === 'node') return false;\n if (!edge && itemType === 'edge') return false;\n if (!combo && itemType === 'combo') return false;\n }\n return true;\n }\n};","import { __assign } from \"tslib\";\nimport { clone, debounce, deepMix } from '@antv/util';\nimport Global from '../global';\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n updateEdge: true,\n delegateStyle: {},\n // 是否开启delegate\n enableDelegate: false,\n // 拖动节点过程中是否只改变 Combo 的大小,而不改变其结构\n onlyChangeComboSize: false,\n // 拖动过程中目标 combo 状态样式\n comboActiveState: '',\n selectedState: 'selected',\n enableOptimize: false,\n enableDebounce: false,\n enableStack: true\n };\n },\n getEvents: function getEvents() {\n return {\n 'node:mousedown': 'onMouseDown',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n 'combo:dragenter': 'onDragEnter',\n 'combo:dragleave': 'onDragLeave',\n 'combo:drop': 'onDropCombo',\n 'node:drop': 'onDropNode',\n 'canvas:drop': 'onDropCanvas',\n touchstart: 'onTouchStart',\n touchmove: 'onTouchMove',\n touchend: 'onDragEnd',\n afterchangedata: 'onDragEnd'\n };\n },\n validationCombo: function validationCombo(item) {\n if (!this.origin || !item || item.destroyed) {\n return false;\n }\n var type = item.getType();\n if (type !== 'combo') {\n return false;\n }\n return true;\n },\n onTouchStart: function onTouchStart(evt) {\n if (!evt.item) return;\n var self = this;\n try {\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n evt.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n this.mousedown = {\n item: evt.item,\n target: evt.target,\n origin: {\n x: evt.x,\n y: evt.y\n }\n };\n this.dragstart = true;\n self.onDragStart(evt);\n },\n onTouchMove: function onTouchMove(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n self.onDragEnd(e);\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.onDrag(e);\n },\n /**\n * cache the manipulated item and target, since drag and dragend are global events but not node:*\n * @param evt event param\n */\n onMouseDown: function onMouseDown(evt) {\n this.mousedown = {\n item: evt.item,\n target: evt.target,\n origin: {\n x: evt.x,\n y: evt.y\n }\n };\n // 绑定浏览器监听,触发拖拽结束,结束拖拽时移除\n if (typeof window !== 'undefined' && !this.windowEventBinded) {\n this.windowEventBinded = true;\n document.body.addEventListener('contextmenu', this.onDragEnd.bind(this));\n document.body.addEventListener('mouseup', this.onDragEnd.bind(this));\n }\n },\n /**\n * trigger dragstart/drag by mousedown and drag events\n * @param evt event param\n */\n onDragMove: function onDragMove(evt) {\n var _a, _b;\n if (((_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a)) !== 'node') {\n this.onDragEnd();\n return;\n }\n if (!this.mousedown) return;\n if (!this.dragstart) {\n // dragstart\n this.dragstart = true;\n this.onDragStart(evt);\n } else {\n // drag\n this.onDrag(__assign(__assign({}, evt), this.mousedown));\n }\n },\n /**\n * 开始拖动节点\n * @param evt\n */\n onDragStart: function onDragStart(evt) {\n var _this = this;\n this.currentShouldEnd = true;\n if (!this.shouldBegin(__assign(__assign({}, evt), this.mousedown), this)) {\n return;\n }\n var _a = this.mousedown,\n item = _a.item,\n target = _a.target;\n if (!item || item.destroyed || item.hasLocked()) {\n return;\n }\n // 拖动时,设置拖动元素的 capture 为false,则不拾取拖动的元素\n var group = item.getContainer();\n group.set('capture', false);\n if (!this.cachedCaptureItems) this.cachedCaptureItems = [];\n this.cachedCaptureItems.push(item);\n // 如果拖动的target 是linkPoints / anchorPoints 则不允许拖动\n if (target) {\n var isAnchorPoint = target.get('isAnchorPoint');\n if (isAnchorPoint) {\n return;\n }\n }\n var graph = this.graph;\n this.targets = [];\n // 将节点拖入到指定的 Combo\n this.targetCombo = null;\n // 获取所有选中的元素\n var nodes = graph.findAllByState('node', this.selectedState);\n var currentNodeId = item.get('id');\n // 当前拖动的节点是否是选中的节点\n var dragNodes = nodes.filter(function (node) {\n var nodeId = node.get('id');\n return currentNodeId === nodeId;\n });\n // 只拖动当前节点\n if (dragNodes.length === 0) {\n this.targets.push(item);\n } else if (nodes.length > 1) {\n // 拖动多个节点\n nodes.forEach(function (node) {\n var locked = node.hasLocked();\n if (!locked) {\n _this.targets.push(node);\n }\n });\n } else {\n this.targets.push(item);\n }\n if (this.graph.get('enabledStack') && this.enableStack) {\n var beforeDragNodes_1 = [];\n this.targets.forEach(function (t) {\n var _a = t.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n beforeDragNodes_1.push({\n x: x,\n y: y,\n id: id\n });\n });\n this.set('beforeDragNodes', beforeDragNodes_1);\n }\n this.hidenEdge = {};\n if (this.get('updateEdge') && this.enableOptimize && !this.enableDelegate) {\n this.targets.forEach(function (node) {\n var edges = node.getEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return;\n _this.hidenEdge[edge.getID()] = true;\n edge.hide();\n });\n });\n }\n this.origin = this.mousedown.origin;\n this.point = {};\n this.originPoint = {};\n },\n /**\n * 持续拖动节点\n * @param evt\n */\n onDrag: function onDrag(evt) {\n var _this = this;\n if (!this.mousedown || !this.origin) return;\n if (!this.shouldUpdate(evt, this)) return;\n if (this.get('enableDelegate')) {\n this.updateDelegate(evt);\n } else {\n if (this.enableDebounce) {\n this.debounceUpdate({\n targets: this.targets,\n graph: this.graph,\n point: this.point,\n origin: this.origin,\n evt: evt,\n updateEdge: this.get('updateEdge'),\n onlyChangeComboSize: this.onlyChangeComboSize,\n updateParentCombos: this.updateParentCombos\n });\n } else {\n var parentComboMap_1 = {};\n this.targets.map(function (target) {\n _this.update(target, evt);\n var parentComboId = target.getModel().comboId;\n if (parentComboId) parentComboMap_1[parentComboId] = _this.graph.findById(parentComboId);\n });\n if (this.onlyChangeComboSize) {\n // 拖动节点过程中,动态改变 Combo 的大小\n this.updateParentCombos();\n }\n }\n }\n },\n /**\n * 拖动结束,设置拖动元素capture为true,更新元素位置,如果是拖动涉及到 combo,则更新 combo 结构\n * @param evt\n */\n onDragEnd: function onDragEnd(evt) {\n var _this = this;\n var _a;\n this.mousedown = false;\n this.dragstart = false;\n // 移除浏览器监听\n if (typeof window !== 'undefined' && this.windowEventBinded) {\n this.windowEventBinded = false;\n document.body.removeEventListener('contextmenu', this.onDragEnd.bind(this));\n document.body.removeEventListener('mouseup', this.onDragEnd.bind(this));\n }\n if (!this.origin) {\n return;\n }\n // 拖动结束后,设置拖动元素 group 的 capture 为 true,允许拾取拖动元素\n (_a = this.cachedCaptureItems) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {\n var group = item.getContainer();\n group.set('capture', true);\n });\n this.cachedCaptureItems = [];\n if (this.delegateRect) {\n this.delegateRect.remove();\n this.delegateRect = null;\n }\n if (this.get('updateEdge') && this.enableOptimize && !this.enableDelegate) {\n this.targets.forEach(function (node) {\n var edges = node.getEdges();\n edges.forEach(function (edge) {\n if (_this.hidenEdge[edge.getID()]) edge.show();\n edge.refresh();\n });\n });\n }\n this.hidenEdge = {};\n var graph = this.graph;\n // 拖动结束后,入栈\n if (graph.get('enabledStack') && this.enableStack) {\n var stackData_1 = {\n before: {\n nodes: [],\n edges: [],\n combos: []\n },\n after: {\n nodes: [],\n edges: [],\n combos: []\n }\n };\n this.get('beforeDragNodes').forEach(function (model) {\n stackData_1.before.nodes.push(model);\n });\n this.targets.forEach(function (target) {\n var _a = target.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n stackData_1.after.nodes.push({\n x: x,\n y: y,\n id: id\n });\n });\n graph.pushStack('update', clone(stackData_1));\n }\n // 拖动结束后emit事件,将当前操作的节点抛出去,目标节点为null\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: null\n });\n this.point = {};\n this.origin = null;\n this.originPoint = {};\n this.targets.length = 0;\n this.targetCombo = null;\n },\n /**\n * 拖动过程中将节点放置到 combo 上\n * @param evt\n */\n onDropCombo: function onDropCombo(evt) {\n var item = evt.item;\n this.currentShouldEnd = this.shouldEnd(evt, item, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd || !this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, false);\n }\n this.targetCombo = item;\n // 拖动结束后是动态改变 Combo 大小还是将节点从 Combo 中删除\n if (this.onlyChangeComboSize) {\n // 拖动节点结束后,动态改变 Combo 的大小\n graph.updateCombos();\n } else {\n var targetComboModel_1 = item.getModel();\n this.targets.map(function (node) {\n var nodeModel = node.getModel();\n if (nodeModel.comboId !== targetComboModel_1.id) {\n graph.updateComboTree(node, targetComboModel_1.id);\n }\n });\n graph.updateCombo(item);\n }\n // 将节点拖动到 combo 上面,emit事件抛出当前操作的节点及目标 combo\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: this.targetCombo\n });\n },\n onDropCanvas: function onDropCanvas(evt) {\n var graph = this.graph;\n this.currentShouldEnd = this.shouldEnd(evt, undefined, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.targets || this.targets.length === 0 || !this.currentShouldEnd) return;\n if (this.onlyChangeComboSize) {\n this.updateParentCombos();\n } else {\n this.targets.map(function (node) {\n // 拖动的节点有 comboId,即是从其他 combo 中拖出时才处理\n var model = node.getModel();\n if (model.comboId) {\n graph.updateComboTree(node);\n }\n });\n }\n },\n /**\n * 拖动放置到某个 combo 中的子 node 上\n * @param evt\n */\n onDropNode: function onDropNode(evt) {\n if (!this.targets || this.targets.length === 0) return;\n var self = this;\n var item = evt.item;\n var graph = self.graph;\n var comboId = item.getModel().comboId;\n var newParentCombo = comboId ? graph.findById(comboId) : undefined;\n this.currentShouldEnd = this.shouldEnd(evt, newParentCombo, this);\n // 若不允许结束,则将节点位置设置回初识位置。后面的逻辑仍需要执行\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd) return;\n if (this.onlyChangeComboSize) {\n this.updateParentCombos();\n } else if (comboId) {\n var combo = graph.findById(comboId);\n if (self.comboActiveState) {\n graph.setItemState(combo, self.comboActiveState, false);\n }\n this.targets.map(function (node) {\n var nodeModel = node.getModel();\n if (comboId !== nodeModel.comboId) {\n graph.updateComboTree(node, comboId);\n }\n });\n graph.updateCombo(combo);\n } else {\n this.targets.map(function (node) {\n var model = node.getModel();\n if (model.comboId) {\n graph.updateComboTree(node);\n }\n });\n }\n // 将节点拖动到另外个节点上面,emit 事件抛出当前操作的节点及目标节点\n graph.emit('dragnodeend', {\n items: this.targets,\n targetItem: item\n });\n },\n /**\n * 将节点拖入到 Combo 中\n * @param evt\n */\n onDragEnter: function onDragEnter(evt) {\n var item = evt.item;\n if (!this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, true);\n }\n },\n /**\n * 将节点从 Combo 中拖出\n * @param evt\n */\n onDragLeave: function onDragLeave(evt) {\n var item = evt.item;\n if (!this.validationCombo(item)) return;\n var graph = this.graph;\n if (this.comboActiveState) {\n graph.setItemState(item, this.comboActiveState, false);\n }\n },\n updatePositions: function updatePositions(evt, restore) {\n var _this = this;\n if (!this.targets || this.targets.length === 0) return;\n // 当开启 delegate 时,拖动结束后需要更新所有已选中节点的位置\n if (this.get('enableDelegate')) {\n if (this.enableDebounce) this.debounceUpdate({\n targets: this.targets,\n graph: this.graph,\n point: this.point,\n origin: this.origin,\n evt: evt,\n updateEdge: this.get('updateEdge'),\n onlyChangeComboSize: this.onlyChangeComboSize,\n updateParentCombos: this.updateParentCombos\n });else if (!restore) this.targets.map(function (node) {\n return _this.update(node, evt);\n });\n } else this.targets.map(function (node) {\n return _this.update(node, evt, restore);\n });\n },\n /**\n * 更新节点\n * @param item 拖动的节点实例\n * @param evt\n */\n update: function update(item, evt, restore) {\n var origin = this.origin;\n var model = item.get('model');\n var nodeId = item.get('id');\n if (!this.point[nodeId]) {\n this.point[nodeId] = {\n x: model.x || 0,\n y: model.y || 0\n };\n }\n var x = evt.x - origin.x + this.point[nodeId].x;\n var y = evt.y - origin.y + this.point[nodeId].y;\n if (restore) {\n x += origin.x - evt.x;\n y += origin.y - evt.y;\n }\n var pos = {\n x: x,\n y: y\n };\n if (this.get('updateEdge')) {\n this.graph.updateItem(item, pos, false);\n } else {\n item.updatePosition(pos);\n }\n },\n /**\n * 限流更新节点\n * @param item 拖动的节点实例\n * @param evt\n */\n debounceUpdate: debounce(function (event) {\n var targets = event.targets,\n graph = event.graph,\n point = event.point,\n origin = event.origin,\n evt = event.evt,\n updateEdge = event.updateEdge,\n onlyChangeComboSize = event.onlyChangeComboSize,\n updateParentCombos = event.updateParentCombos;\n targets.map(function (item) {\n var model = item.get('model');\n var nodeId = item.get('id');\n if (!point[nodeId]) {\n point[nodeId] = {\n x: model.x || 0,\n y: model.y || 0\n };\n }\n var x = evt.x - origin.x + point[nodeId].x;\n var y = evt.y - origin.y + point[nodeId].y;\n var pos = {\n x: x,\n y: y\n };\n if (updateEdge) {\n graph.updateItem(item, pos, false);\n } else {\n item.updatePosition(pos);\n }\n });\n if (onlyChangeComboSize) {\n updateParentCombos(graph, targets);\n }\n }, 50, true),\n /**\n * 更新拖动元素时的delegate\n * @param {Event} evt 事件句柄\n * @param {number} x 拖动单个元素时候的x坐标\n * @param {number} y 拖动单个元素时候的y坐标\n */\n updateDelegate: function updateDelegate(evt) {\n var graph = this.graph;\n if (!this.delegateRect) {\n // 拖动多个\n var parent_1 = graph.get('group');\n var attrs = deepMix({}, Global.delegateStyle, this.delegateStyle);\n var _a = this.calculationGroupPosition(evt),\n cx = _a.x,\n cy = _a.y,\n width = _a.width,\n height = _a.height,\n minX = _a.minX,\n minY = _a.minY;\n this.originPoint = {\n x: cx,\n y: cy,\n width: width,\n height: height,\n minX: minX,\n minY: minY\n };\n // model上的x, y是相对于图形中心的,delegateShape是g实例,x,y是绝对坐标\n this.delegateRect = parent_1.addShape('rect', {\n attrs: __assign({\n width: width,\n height: height,\n x: cx,\n y: cy\n }, attrs),\n name: 'rect-delegate-shape'\n });\n this.delegate = this.delegateRect;\n this.delegateRect.set('capture', false);\n } else {\n var clientX = evt.x - this.origin.x + this.originPoint.minX;\n var clientY = evt.y - this.origin.y + this.originPoint.minY;\n this.delegateRect.attr({\n x: clientX,\n y: clientY\n });\n }\n },\n /**\n * 计算delegate位置,包括左上角左边及宽度和高度\n * @memberof ItemGroup\n * @return {object} 计算出来的delegate坐标信息及宽高\n */\n calculationGroupPosition: function calculationGroupPosition(evt) {\n var nodes = this.targets;\n if (nodes.length === 0) {\n nodes.push(evt.item);\n }\n var minx = Infinity;\n var maxx = -Infinity;\n var miny = Infinity;\n var maxy = -Infinity;\n // 获取已节点的所有最大最小x y值\n for (var i = 0; i < nodes.length; i++) {\n var element = nodes[i];\n var bbox = element.getBBox();\n var minX = bbox.minX,\n minY = bbox.minY,\n maxX = bbox.maxX,\n maxY = bbox.maxY;\n if (minX < minx) {\n minx = minX;\n }\n if (minY < miny) {\n miny = minY;\n }\n if (maxX > maxx) {\n maxx = maxX;\n }\n if (maxY > maxy) {\n maxy = maxY;\n }\n }\n var x = Math.floor(minx);\n var y = Math.floor(miny);\n var width = Math.ceil(maxx) - Math.floor(minx);\n var height = Math.ceil(maxy) - Math.floor(miny);\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minx,\n minY: miny\n };\n },\n /**\n * updates the parent combos' size and position\n * @param paramGraph param for debounce function, where 'this' is not available\n * @param paramTargets param for debounce function, where 'this' is not available\n */\n updateParentCombos: function updateParentCombos(paramGraph, paramTargets) {\n var graph = paramGraph || this.graph;\n var targets = paramTargets || this.targets;\n var comboParentMap = {};\n targets === null || targets === void 0 ? void 0 : targets.forEach(function (target) {\n var comboId = target.getModel().comboId;\n if (comboId) comboParentMap[comboId] = graph.findById(comboId);\n });\n Object.values(comboParentMap).forEach(function (combo) {\n if (combo) graph.updateCombo(combo);\n });\n }\n};","import { throttle } from '@antv/util';\nvar clickNodeId = null;\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n // 可选 mouseenter || click\n // 选择 click 会监听 touch,mouseenter 不会监听\n trigger: 'mouseenter',\n activeState: 'active',\n inactiveState: 'inactive',\n resetSelected: false,\n shouldClearStatusOnSecond: false,\n shouldUpdate: function shouldUpdate() {\n return true;\n }\n };\n },\n getEvents: function getEvents() {\n if (this.get('trigger') === 'mouseenter') {\n return {\n 'node:mouseenter': 'setAllItemStates',\n 'combo:mouseenter': 'setAllItemStates',\n 'node:mouseleave': 'clearActiveState',\n 'combo:mouseleave': 'clearActiveState'\n };\n }\n return {\n 'node:click': 'setAllItemStates',\n 'combo:click': 'setAllItemStates',\n 'canvas:click': 'clearActiveState',\n 'node:touchstart': 'setOnTouchStart',\n 'combo:touchstart': 'setOnTouchStart',\n 'canvas:touchstart': 'clearOnTouchStart'\n };\n },\n setOnTouchStart: function setOnTouchStart(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.setAllItemStates(e);\n },\n clearOnTouchStart: function clearOnTouchStart(e) {\n var self = this;\n try {\n var touches = e.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (event1 && event2) {\n return;\n }\n e.preventDefault();\n } catch (e) {\n console.warn('Touch original event not exist!');\n }\n self.clearActiveState(e);\n },\n setAllItemStates: function setAllItemStates(e) {\n clearTimeout(this.timer);\n this.throttleSetAllItemStates(e, this);\n },\n clearActiveState: function clearActiveState(e) {\n var _this = this;\n // avoid clear state frequently, it costs a lot since all the items' states on the graph need to be cleared\n var shouldClearStatusOnSecond = this.shouldClearStatusOnSecond;\n if (shouldClearStatusOnSecond) {\n clickNodeId = null;\n }\n this.timer = setTimeout(function () {\n _this.throttleClearActiveState(e, _this);\n }, 50);\n },\n throttleSetAllItemStates: throttle(function (e, self) {\n var item = e.item;\n var graph = self.graph;\n if (!graph || graph.destroyed) return;\n self.item = item;\n if (!self.shouldUpdate(e.item, {\n event: e,\n action: 'activate'\n }, self)) {\n return;\n }\n var shouldClearStatusOnSecond = self.shouldClearStatusOnSecond;\n var currentNodeId = item.getModel().id;\n if (clickNodeId === currentNodeId && shouldClearStatusOnSecond) {\n self.throttleClearActiveState(e, self);\n clickNodeId = null;\n return;\n }\n var activeState = self.activeState;\n var inactiveState = self.inactiveState;\n var nodes = graph.getNodes();\n var combos = graph.getCombos();\n var edges = graph.getEdges();\n var vEdges = graph.get('vedges');\n var nodeLength = nodes.length;\n var comboLength = combos.length;\n var edgeLength = edges.length;\n var vEdgeLength = vEdges.length;\n var inactiveItems = self.inactiveItems || {};\n var activeItems = self.activeItems || {};\n for (var i = 0; i < nodeLength; i++) {\n var node = nodes[i];\n var nodeId = node.getID();\n var hasSelected = node.hasState('selected');\n if (self.resetSelected) {\n if (hasSelected) {\n graph.setItemState(node, 'selected', false);\n }\n }\n if (activeItems[nodeId]) {\n graph.setItemState(node, activeState, false);\n delete activeItems[nodeId];\n }\n if (inactiveState && !inactiveItems[nodeId]) {\n graph.setItemState(node, inactiveState, true);\n inactiveItems[nodeId] = node;\n }\n }\n for (var i = 0; i < comboLength; i++) {\n var combo = combos[i];\n var comboId = combo.getID();\n var hasSelected = combo.hasState('selected');\n if (self.resetSelected) {\n if (hasSelected) {\n graph.setItemState(combo, 'selected', false);\n }\n }\n if (activeItems[comboId]) {\n graph.setItemState(combo, activeState, false);\n delete activeItems[comboId];\n }\n if (inactiveState && !inactiveItems[comboId]) {\n graph.setItemState(combo, inactiveState, true);\n inactiveItems[comboId] = combo;\n }\n }\n for (var i = 0; i < edgeLength; i++) {\n var edge = edges[i];\n var edgeId = edge.getID();\n if (activeItems[edgeId]) {\n graph.setItemState(edge, activeState, false);\n delete activeItems[edgeId];\n }\n if (inactiveState && !inactiveItems[edgeId]) {\n graph.setItemState(edge, inactiveState, true);\n inactiveItems[edgeId] = edge;\n }\n }\n for (var i = 0; i < vEdgeLength; i++) {\n var vEdge = vEdges[i];\n var vEdgeId = vEdge.getID();\n if (activeItems[vEdgeId]) {\n graph.setItemState(vEdge, activeState, false);\n delete activeItems[vEdgeId];\n }\n if (inactiveState && !inactiveItems[vEdgeId]) {\n graph.setItemState(vEdge, inactiveState, true);\n inactiveItems[vEdgeId] = vEdge;\n }\n }\n if (item && !item.destroyed) {\n if (inactiveState) {\n graph.setItemState(item, inactiveState, false);\n delete inactiveItems[item.getID()];\n }\n if (!activeItems[item.getID()]) {\n graph.setItemState(item, activeState, true);\n activeItems[item.getID()] = item;\n }\n var rEdges = item.getEdges();\n var rEdgeLegnth = rEdges.length;\n for (var i = 0; i < rEdgeLegnth; i++) {\n var edge = rEdges[i];\n var edgeId = edge.getID();\n var otherEnd = void 0;\n if (edge.getSource() === item) {\n otherEnd = edge.getTarget();\n } else {\n otherEnd = edge.getSource();\n }\n var otherEndId = otherEnd.getID();\n if (inactiveState && inactiveItems[otherEndId]) {\n graph.setItemState(otherEnd, inactiveState, false);\n delete inactiveItems[otherEndId];\n }\n if (!activeItems[otherEndId]) {\n graph.setItemState(otherEnd, activeState, true);\n activeItems[otherEndId] = otherEnd;\n }\n if (inactiveItems[edgeId]) {\n graph.setItemState(edge, inactiveState, false);\n delete inactiveItems[edgeId];\n }\n if (!activeItems[edgeId]) {\n graph.setItemState(edge, activeState, true);\n activeItems[edgeId] = edge;\n }\n edge.toFront();\n }\n }\n self.activeItems = activeItems;\n self.inactiveItems = inactiveItems;\n if (shouldClearStatusOnSecond) {\n clickNodeId = item.getModel().id;\n }\n graph.emit('afteractivaterelations', {\n item: e.item,\n action: 'activate'\n });\n }, 50, {\n trailing: true,\n leading: true\n }),\n throttleClearActiveState: throttle(function (e, self) {\n var graph = self.get('graph');\n if (!graph || graph.destroyed) return;\n if (!self.shouldUpdate(e.item, {\n event: e,\n action: 'deactivate'\n }, self)) return;\n var activeState = self.activeState;\n var inactiveState = self.inactiveState;\n var activeItems = self.activeItems || {};\n var inactiveItems = self.inactiveItems || {};\n Object.values(activeItems).filter(function (item) {\n return !item.destroyed;\n }).forEach(function (item) {\n graph.clearItemStates(item, activeState);\n });\n Object.values(inactiveItems).filter(function (item) {\n return !item.destroyed;\n }).forEach(function (item) {\n graph.clearItemStates(item, inactiveState);\n });\n self.activeItems = {};\n self.inactiveItems = {};\n graph.emit('afteractivaterelations', {\n item: e.item || self.get('item'),\n action: 'deactivate'\n });\n }, 50, {\n trailing: true,\n leading: true\n })\n};","var min = Math.min,\n max = Math.max,\n abs = Math.abs;\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['drag', 'shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n brushStyle: {\n fill: '#EEF6FF',\n fillOpacity: 0.4,\n stroke: '#DDEEFE',\n lineWidth: 1\n },\n onSelect: function onSelect() {},\n onDeselect: function onDeselect() {},\n selectedState: 'selected',\n trigger: DEFAULT_TRIGGER,\n includeEdges: true,\n includeCombos: false,\n selectOnCombo: false,\n selectedEdges: [],\n selectedNodes: [],\n selectedCombos: []\n };\n },\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior brush-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (this.trigger === 'drag') {\n return {\n dragstart: 'onMouseDown',\n drag: 'onMouseMove',\n dragend: 'onMouseUp',\n 'canvas:click': 'clearStates'\n };\n }\n return {\n dragstart: 'onMouseDown',\n drag: 'onMouseMove',\n dragend: 'onMouseUp',\n 'canvas:click': 'clearStates',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onMouseDown: function onMouseDown(e) {\n // 按在node上面拖动时候不应该是框选\n var item = e.item;\n var brush = this.brush;\n var selectOnCombo = this.selectOnCombo;\n var isCombo = (item === null || item === void 0 ? void 0 : item.getType()) === 'combo';\n // 若在 combo 上操作,且不允许在 combo 上选择,则不继续\n if (isCombo && !selectOnCombo) {\n return;\n }\n // 若不在 combo 上操作,而是其他的 item ,则不继续\n if (!isCombo && item) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n if (this.selectedNodes && this.selectedNodes.length !== 0) {\n this.clearStates();\n }\n if (!brush) {\n brush = this.createBrush();\n }\n this.originPoint = {\n x: e.canvasX,\n y: e.canvasY\n };\n brush.attr({\n width: 0,\n height: 0\n });\n brush.show();\n this.dragging = true;\n },\n onMouseMove: function onMouseMove(e) {\n if (!this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.updateBrush(e);\n },\n onMouseUp: function onMouseUp(e) {\n var graph = this.graph;\n // TODO: 触发了 canvas:click 导致 clearStates\n if (!this.brush && !this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.brush.remove(true); // remove and destroy\n this.brush = null;\n this.getSelectedNodes(e);\n this.dragging = false;\n },\n clearStates: function clearStates() {\n var _a = this,\n graph = _a.graph,\n selectedState = _a.selectedState;\n var nodes = graph.findAllByState('node', selectedState);\n var edges = graph.findAllByState('edge', selectedState);\n var combos = graph.findAllByState('combo', selectedState);\n nodes.forEach(function (node) {\n return graph.setItemState(node, selectedState, false);\n });\n edges.forEach(function (edge) {\n return graph.setItemState(edge, selectedState, false);\n });\n combos.forEach(function (combo) {\n return graph.setItemState(combo, selectedState, false);\n });\n this.selectedNodes = [];\n this.selectedEdges = [];\n this.selectedCombos = [];\n if (this.onDeselect) {\n this.onDeselect(this.selectedNodes, this.selectedEdges, this.selectedCombos);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: [],\n combos: []\n },\n select: false\n });\n },\n isBBoxCenterInRect: function isBBoxCenterInRect(item, left, right, top, bottom) {\n var bbox = item.getBBox();\n return bbox.centerX >= left && bbox.centerX <= right && bbox.centerY >= top && bbox.centerY <= bottom;\n },\n getSelectedNodes: function getSelectedNodes(e) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n originPoint = _a.originPoint,\n shouldUpdate = _a.shouldUpdate,\n isBBoxCenterInRect = _a.isBBoxCenterInRect;\n var state = this.selectedState;\n var p1 = {\n x: e.x,\n y: e.y\n };\n var p2 = graph.getPointByCanvas(originPoint.x, originPoint.y);\n var left = min(p1.x, p2.x);\n var right = max(p1.x, p2.x);\n var top = min(p1.y, p2.y);\n var bottom = max(p1.y, p2.y);\n var selectedNodes = [];\n var selectedIds = [];\n graph.getNodes().forEach(function (node) {\n if (node.isVisible() &&\n // 隐藏节点不能被选中\n isBBoxCenterInRect(node, left, right, top, bottom) && shouldUpdate(node, 'select', _this)) {\n selectedNodes.push(node);\n var model = node.getModel();\n selectedIds.push(model.id);\n graph.setItemState(node, state, true);\n }\n });\n var selectedEdges = [];\n if (this.includeEdges) {\n // 选中边,边的source和target都在选中的节点中时才选中\n selectedNodes.forEach(function (node) {\n var edges = node.getOutEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return; // 隐藏边不能够被选中\n var model = edge.getModel();\n var source = model.source,\n target = model.target;\n if (selectedIds.includes(source) && selectedIds.includes(target) && shouldUpdate(edge, 'select', _this)) {\n selectedEdges.push(edge);\n graph.setItemState(edge, _this.selectedState, true);\n }\n });\n });\n }\n var selectedCombos = [];\n if (this.includeCombos) {\n graph.getCombos().forEach(function (combo) {\n if (combo.isVisible() &&\n // 隐藏节点不能被选中\n isBBoxCenterInRect(combo, left, right, top, bottom) && shouldUpdate(combo, 'select', _this)) {\n selectedCombos.push(combo);\n var model = combo.getModel();\n selectedIds.push(model.id);\n graph.setItemState(combo, state, true);\n }\n });\n }\n this.selectedEdges = selectedEdges;\n this.selectedNodes = selectedNodes;\n this.selectedCombos = selectedCombos;\n if (this.onSelect) {\n this.onSelect(selectedNodes, selectedEdges, selectedCombos);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: true\n });\n },\n createBrush: function createBrush() {\n var self = this;\n var brush = self.graph.get('canvas').addShape('rect', {\n attrs: self.brushStyle,\n capture: false,\n name: 'brush-shape'\n });\n this.brush = brush;\n this.delegate = brush;\n return brush;\n },\n updateBrush: function updateBrush(e) {\n var originPoint = this.originPoint;\n this.brush.attr({\n width: abs(e.canvasX - originPoint.x),\n height: abs(e.canvasY - originPoint.y),\n x: min(e.canvasX, originPoint.x),\n y: min(e.canvasY, originPoint.y)\n });\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n var triggerLowerCase = this.trigger.toLowerCase();\n var codeLowerCase = code.toLowerCase();\n // 按住 control 键时,允许用户设置 trigger 为 ctrl\n if (codeLowerCase === triggerLowerCase || codeLowerCase === 'control' && triggerLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && triggerLowerCase === 'control') {\n this.keydown = true;\n } else {\n this.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.brush) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的brush\n this.brush.remove(true);\n this.brush = null;\n this.dragging = false;\n }\n this.keydown = false;\n }\n};","import { each } from '@antv/util';\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n multiple: true,\n trigger: DEFAULT_TRIGGER,\n selectedState: 'selected',\n selectNode: true,\n selectEdge: false,\n selectCombo: true\n };\n },\n getEvents: function getEvents() {\n var self = this;\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(self.trigger.toLowerCase()) > -1)) {\n self.trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior click-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (!self.multiple) {\n return {\n 'node:click': 'onClick',\n 'combo:click': 'onClick',\n 'edge:click': 'onClick',\n 'canvas:click': 'onCanvasClick'\n };\n }\n return {\n 'node:click': 'onClick',\n 'combo:click': 'onClick',\n 'edge:click': 'onClick',\n 'canvas:click': 'onCanvasClick',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onClick: function onClick(evt) {\n var self = this;\n var item = evt.item;\n if (!item || item.destroyed) {\n return;\n }\n var type = item.getType();\n var graph = self.graph,\n keydown = self.keydown,\n multiple = self.multiple,\n shouldUpdate = self.shouldUpdate,\n shouldBegin = self.shouldBegin;\n if (!shouldBegin(evt, self)) {\n return;\n }\n // allow to select multiple nodes but did not press a key || do not allow the select multiple nodes\n if (!keydown || !multiple) {\n var selected = graph.findAllByState('node', self.selectedState).concat(graph.findAllByState('edge', self.selectedState)).concat(graph.findAllByState('combo', self.selectedState));\n each(selected, function (selectedItem) {\n if (selectedItem !== item) {\n graph.setItemState(selectedItem, self.selectedState, false);\n }\n });\n }\n // check if the item could be selected, given the current cfg\n var itemSelectable = function () {\n switch (type) {\n case 'node':\n return self.selectNode;\n case 'edge':\n return self.selectEdge;\n case 'combo':\n return self.selectCombo;\n default:\n return false;\n }\n }();\n if (!itemSelectable) {\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: false\n });\n return;\n }\n if (item.hasState(self.selectedState)) {\n if (shouldUpdate(evt, self)) {\n graph.setItemState(item, self.selectedState, false);\n }\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n target: item,\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: false\n });\n } else {\n if (shouldUpdate(evt, self)) {\n graph.setItemState(item, self.selectedState, true);\n }\n var selectedNodes = graph.findAllByState('node', self.selectedState);\n var selectedEdges = graph.findAllByState('edge', self.selectedState);\n var selectedCombos = graph.findAllByState('combo', self.selectedState);\n graph.emit('nodeselectchange', {\n target: item,\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges,\n combos: selectedCombos\n },\n select: true\n });\n }\n },\n onCanvasClick: function onCanvasClick(evt) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n shouldBegin = _a.shouldBegin;\n if (!shouldBegin(evt, this)) {\n return;\n }\n var selected = graph.findAllByState('node', this.selectedState);\n each(selected, function (node) {\n graph.setItemState(node, _this.selectedState, false);\n });\n var selectedEdges = graph.findAllByState('edge', this.selectedState);\n each(selectedEdges, function (edge) {\n graph.setItemState(edge, _this.selectedState, false);\n });\n var selectedCombos = graph.findAllByState('combo', this.selectedState);\n each(selectedCombos, function (combo) {\n graph.setItemState(combo, _this.selectedState, false);\n });\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: [],\n combos: []\n },\n select: false\n });\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (code.toLowerCase() === this.trigger.toLowerCase() || code.toLowerCase() === 'control') {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n var self = this;\n self.keydown = false;\n }\n};","import { ext } from '@antv/matrix-util';\nimport { clone } from '@antv/util';\nimport { getBrowserName } from '../util/browser';\nvar transform = ext.transform;\nvar DELTA = 0.05;\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n this.isFireFox = getBrowserName() === 'firefox';\n return {\n sensitivity: 2,\n minZoom: undefined,\n maxZoom: undefined,\n enableOptimize: false,\n optimizeZoom: 0.1,\n fixSelectedItems: {\n fixAll: false,\n fixLineWidth: false,\n fixLabel: false,\n fixState: 'selected'\n },\n animate: false,\n animateCfg: {\n duration: 500\n }\n };\n },\n getEvents: function getEvents() {\n var fixSelectedItems = this.fixSelectedItems;\n if (!fixSelectedItems.fixState) fixSelectedItems.fixState = 'selected';\n if (fixSelectedItems.fixAll) {\n fixSelectedItems.fixLineWidth = true;\n fixSelectedItems.fixLabel = true;\n }\n return {\n wheel: 'onWheel',\n touchstart: 'onTouchStart',\n touchmove: 'onTouchMove',\n touchend: 'onTouchEnd'\n };\n },\n onTouchStart: function onTouchStart(evt) {\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n evt.preventDefault();\n // 如果不是缩放事件则禁止继续执行\n if (!event2) {\n return;\n }\n if (this.shouldBegin && !this.shouldBegin(evt, this)) {\n return;\n }\n // 第一个触摸点位置\n this.startPoint = {\n pageX: event1.pageX,\n pageY: event1.pageY\n };\n this.moveable = true;\n if (event2) {\n this.endPoint = {\n pageX: event2.pageX,\n pageY: event2.pageY\n };\n }\n this.originScale = this.graph.getZoom() || this.currentScale || 1;\n },\n onTouchMove: function onTouchMove(evt) {\n if (!this.moveable) {\n return;\n }\n evt.preventDefault();\n var touches = evt.originalEvent.touches;\n var event1 = touches[0];\n var event2 = touches[1];\n if (!event2) {\n return;\n }\n if (!this.endPoint) {\n this.endPoint = {\n pageX: event2.pageX,\n pageY: event2.pageY\n };\n }\n // 获取坐标之间的距离\n var getDistance = function getDistance(start, end) {\n return Math.hypot(end.x - start.x, end.y - start.y);\n };\n // 双指缩放比例\n var scale = getDistance({\n x: event1.pageX,\n y: event1.pageY\n }, {\n x: event2.pageX,\n y: event2.pageY\n }) / getDistance({\n x: this.startPoint.pageX,\n y: this.startPoint.pageY\n }, {\n x: this.endPoint.pageX,\n y: this.endPoint.pageY\n });\n // 应用到画布上的缩放比例\n var zoom = this.originScale * scale;\n // 缓存当前的缩放比例\n this.currentScale = zoom;\n var minZoom = this.get('minZoom') || this.graph.get('minZoom');\n var maxZoom = this.get('maxZoom') || this.graph.get('maxZoom');\n if (zoom > maxZoom || zoom < minZoom) {\n return;\n }\n var animate = this.get('animate');\n var animateCfg = this.get('animateCfg');\n var canvas = this.graph.get('canvas');\n var point = canvas.getPointByClient(evt.clientX, evt.clientY);\n this.graph.zoomTo(zoom, {\n x: point.x,\n y: point.y\n }, animate, animateCfg);\n this.graph.emit('wheelzoom', evt);\n },\n onTouchEnd: function onTouchEnd() {\n this.moveable = false;\n this.endPoint = null;\n },\n onWheel: function onWheel(e) {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n fixSelectedItems = _a.fixSelectedItems;\n if (this.shouldBegin && !this.shouldBegin(e, this)) {\n return;\n }\n if (!this.shouldUpdate(e, this)) {\n return;\n }\n e.preventDefault();\n var canvas = graph.get('canvas');\n var point = canvas.getPointByClient(e.clientX, e.clientY);\n var sensitivity = this.get('sensitivity');\n var graphZoom = graph.getZoom();\n var ratio = graphZoom;\n var zoom = graphZoom;\n // 兼容IE、Firefox及Chrome\n if (this.isFireFox) {\n if (e.deltaY > 0 || e.wheelDelta < 0) {\n ratio = 1 - DELTA * sensitivity;\n } else {\n ratio = 1 / (1 - DELTA * sensitivity);\n }\n } else {\n if (e.wheelDelta < 0) {\n ratio = 1 - DELTA * sensitivity;\n } else {\n ratio = 1 / (1 - DELTA * sensitivity);\n }\n }\n zoom = graphZoom * ratio;\n var minZoom = this.get('minZoom') || graph.get('minZoom');\n var maxZoom = this.get('maxZoom') || graph.get('maxZoom');\n if (zoom > maxZoom) {\n zoom = maxZoom;\n } else if (zoom < minZoom) {\n zoom = minZoom;\n }\n // hide the shapes when the zoom ratio is smaller than optimizeZoom\n // hide the shapes when zoomming\n var enableOptimize = this.get('enableOptimize');\n if (enableOptimize) {\n var optimizeZoom_1 = this.get('optimizeZoom');\n var optimized = this.get('optimized');\n var nodes_1 = graph.getNodes();\n var edges_1 = graph.getEdges();\n var nodesLength_1 = nodes_1.length;\n var edgesLength_1 = edges_1.length;\n // hiding\n if (!optimized) {\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n if (!node.destroyed) {\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.destoryed && !shape.get('isKeyShape')) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n this.set('optimized', true);\n }\n // showing after 100ms\n clearTimeout(this.get('timeout'));\n var timeout = setTimeout(function () {\n var currentZoom = graph.getZoom();\n var curOptimized = _this.get('optimized');\n if (curOptimized) {\n _this.set('optimized', false);\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = node.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n keyShape.set('ori-visibility', undefined);\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (!shape.get('visible') && oriVis) {\n if (oriVis) shape.show();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = edge.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n keyShape.set('ori-visibility', undefined);\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.get('visible')) {\n var oriVis = shape.get('ori-visibility');\n shape.set('ori-visibility', undefined);\n if (oriVis) shape.show();\n }\n }\n }\n }\n }\n }, 100);\n this.set('timeout', timeout);\n }\n // fix the items when zooming\n if (graphZoom <= 1) {\n var fixNodes = void 0,\n fixEdges = void 0;\n if (fixSelectedItems.fixAll || fixSelectedItems.fixLineWidth || fixSelectedItems.fixLabel) {\n fixNodes = graph.findAllByState('node', fixSelectedItems.fixState);\n fixEdges = graph.findAllByState('edge', fixSelectedItems.fixState);\n var scale = graphZoom / zoom;\n var fixNodesLength = fixNodes.length;\n for (var fn = 0; fn < fixNodesLength; fn++) {\n var node = fixNodes[fn];\n var group = node.getContainer();\n var nodeModel = node.getModel();\n var originStyle = node.getOriginStyle();\n var itemStateStyle = node.getStateStyle(fixSelectedItems.fixState);\n var shapeStateStyle = node.get('shapeFactory').getShape(nodeModel.type).getStateStyle(fixSelectedItems.fixState, node)[fixSelectedItems.fixState];\n if (fixSelectedItems.fixAll) {\n if (zoom <= 1) {\n var groupMatrix = clone(group.getMatrix());\n if (!groupMatrix) groupMatrix = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n var _b = node.getModel(),\n x = _b.x,\n y = _b.y;\n groupMatrix = transform(groupMatrix, [['t', -x, -y], ['s', scale, scale], ['t', x, y]]);\n group.setMatrix(groupMatrix);\n }\n } else {\n var children = group.get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var fontSize = void 0,\n lineWidth = void 0;\n if (fixSelectedItems.fixLabel) {\n var shapeType = shape.get('type');\n if (shapeType === 'text') {\n fontSize = shape.attr('fontSize') || 12;\n var itemStyle = itemStateStyle[shape.get('name')];\n var shapeStyle = shapeStateStyle[shape.get('name')];\n var itemFontSize = itemStyle ? itemStyle.fontSize : 12;\n var shapeFontSize = shapeStyle ? shapeStyle.fontSize : 12;\n var oriFontSize = itemFontSize || shapeFontSize || 12;\n if (zoom <= 1) shape.attr('fontSize', oriFontSize / zoom); // * graphZoom / zoom\n if (lineWidth) break;\n }\n }\n if (fixSelectedItems.fixLineWidth) {\n if (shape.get('isKeyShape')) {\n lineWidth = shape.attr('lineWidth') || 0;\n var oriLineWidth = itemStateStyle.lineWidth || shapeStateStyle.lineWidth || originStyle.lineWidth || 0;\n if (zoom <= 1) shape.attr('lineWidth', oriLineWidth / zoom); // * graphZoom / zoom\n if (fontSize) break;\n }\n }\n }\n }\n }\n var fixEdgesLength = fixEdges.length;\n for (var fe = 0; fe < fixEdgesLength; fe++) {\n var edge = fixEdges[fe];\n var group = edge.getContainer();\n var children = group.get('children');\n var nodeModel = edge.getModel();\n var itemStateStyle = edge.getStateStyle(fixSelectedItems.fixState);\n var shapeStateStyle = edge.get('shapeFactory').getShape(nodeModel.type).getStateStyle(fixSelectedItems.fixState, edge)[fixSelectedItems.fixState];\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var fontSize = void 0,\n lineWidth = void 0;\n if (fixSelectedItems.fixLabel || fixSelectedItems.fixAll) {\n var shapeType = shape.get('type');\n if (shapeType === 'text') {\n fontSize = shape.attr('fontSize') || 12;\n var itemStyle = itemStateStyle[shape.get('name')];\n var shapeStyle = shapeStateStyle[shape.get('name')];\n var itemFontSize = itemStyle ? itemStyle.fontSize : 12;\n var shapeFontSize = shapeStyle ? shapeStyle.fontSize : 12;\n var oriFontSize = itemFontSize || shapeFontSize || 12;\n if (zoom <= 1) shape.attr('fontSize', oriFontSize / zoom);\n if (lineWidth) break;\n }\n }\n if (fixSelectedItems.fixLineWidth || fixSelectedItems.fixAll) {\n if (shape.get('isKeyShape')) {\n lineWidth = shape.attr('lineWidth') || 0;\n var oriLineWidth = itemStateStyle.lineWidth || shapeStateStyle.lineWidth || 1;\n if (zoom <= 1) shape.attr('lineWidth', oriLineWidth / zoom);\n if (fontSize) break;\n }\n }\n }\n }\n }\n }\n var animate = this.get('animate');\n var animateCfg = this.get('animateCfg');\n graph.zoomTo(zoom, {\n x: point.x,\n y: point.y\n }, animate, animateCfg);\n graph.emit('wheelzoom', e);\n }\n};","import { modifyCSS, createDom } from '@antv/dom-util';\nexport default {\n onMouseEnter: function onMouseEnter(e) {\n var item = e.item;\n this.currentTarget = item;\n this.showTooltip(e);\n this.graph.emit('tooltipchange', {\n item: e.item,\n action: 'show'\n });\n },\n onMouseMove: function onMouseMove(e) {\n if (!this.shouldUpdate(e, this)) {\n this.hideTooltip();\n return;\n }\n if (!this.currentTarget || e.item !== this.currentTarget) {\n return;\n }\n this.updatePosition(e);\n },\n onMouseLeave: function onMouseLeave(e) {\n if (!this.shouldEnd(e, this)) {\n return;\n }\n this.hideTooltip();\n this.graph.emit('tooltipchange', {\n item: this.currentTarget,\n action: 'hide'\n });\n this.currentTarget = null;\n },\n showTooltip: function showTooltip(e) {\n var container = this.container;\n if (!e.item || e.item.destroyed) {\n return;\n }\n if (!container) {\n container = this.createTooltip(this.graph.get('canvas'));\n this.container = container;\n }\n var text = this.formatText(e.item.get('model'), e);\n container.innerHTML = text;\n modifyCSS(this.container, {\n visibility: 'visible'\n });\n this.updatePosition(e);\n },\n hideTooltip: function hideTooltip() {\n modifyCSS(this.container, {\n visibility: 'hidden'\n });\n },\n updatePosition: function updatePosition(e) {\n var shouldBegin = this.get('shouldBegin');\n var _a = this,\n width = _a.width,\n height = _a.height,\n container = _a.container,\n graph = _a.graph;\n if (!shouldBegin(e, this)) {\n modifyCSS(container, {\n visibility: 'hidden'\n });\n return;\n }\n var point = graph.getPointByClient(e.clientX, e.clientY);\n var _b = graph.getCanvasByPoint(point.x, point.y),\n x = _b.x,\n y = _b.y;\n var bbox = container.getBoundingClientRect();\n if (x > width / 2) {\n x -= bbox.width;\n } else {\n x += this.offset;\n }\n if (y > height / 2) {\n y -= bbox.height;\n } else {\n y += this.offset;\n }\n var left = \"\".concat(x, \"px\");\n var top = \"\".concat(y, \"px\");\n modifyCSS(this.container, {\n left: left,\n top: top,\n visibility: 'visible'\n });\n },\n createTooltip: function createTooltip(canvas) {\n var el = canvas.get('el');\n el.style.position = 'relative';\n var container = createDom(\"
\"));\n el.parentNode.appendChild(container);\n modifyCSS(container, {\n position: 'absolute',\n visibility: 'visible'\n });\n this.width = canvas.get('width');\n this.height = canvas.get('height');\n this.container = container;\n this.graph.get('tooltips').push(container);\n return container;\n }\n};","import { __assign } from \"tslib\";\nimport base from './tooltip-base';\nexport default __assign({\n getDefaultCfg: function getDefaultCfg() {\n return {\n item: 'node',\n offset: 12,\n formatText: function formatText(model) {\n return model.label;\n }\n };\n },\n getEvents: function getEvents() {\n return {\n 'node:mouseenter': 'onMouseEnter',\n 'node:mouseleave': 'onMouseLeave',\n 'node:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave'\n };\n }\n}, base);","import { __assign } from \"tslib\";\nimport base from './tooltip-base';\nexport default __assign({\n getDefaultCfg: function getDefaultCfg() {\n return {\n item: 'edge',\n offset: 12,\n formatText: function formatText(model) {\n return \"source: \".concat(model.source, \" target: \").concat(model.target);\n }\n };\n },\n getEvents: function getEvents() {\n return {\n 'edge:mouseenter': 'onMouseEnter',\n 'edge:mouseleave': 'onMouseLeave',\n 'edge:mousemove': 'onMouseMove',\n afterremoveitem: 'onMouseLeave'\n };\n }\n}, base);","var DEFAULT_TRIGGER = 'click';\nvar ALLOW_EVENTS = ['click', 'dblclick'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n /**\n * 发生收缩/扩展变化时的回调\n */\n trigger: DEFAULT_TRIGGER,\n onChange: function onChange() {}\n };\n },\n getEvents: function getEvents() {\n var _a;\n var trigger;\n // 检测输入是否合法\n if (ALLOW_EVENTS.includes(this.trigger)) {\n trigger = this.trigger;\n } else {\n trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior collapse-expand 的 trigger 参数不合法,请输入 'click' 或 'dblclick'\");\n }\n return _a = {}, _a[\"node:\".concat(trigger)] = 'onNodeClick',\n // 支持移动端事件\n _a.touchstart = 'onNodeClick', _a;\n },\n onNodeClick: function onNodeClick(e) {\n var _this = this;\n // avoid click being triggered on dblclick\n if (this.trigger === 'click') {\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = 0;\n return;\n }\n this.timer = setTimeout(function () {\n _this.toggle(e);\n clearTimeout(_this.timer);\n _this.timer = 0;\n }, 200);\n } else {\n this.toggle(e);\n }\n },\n toggle: function toggle(e) {\n var item = e.item;\n if (!item) return;\n // 如果节点进行过更新,model 会进行 merge,直接改 model 就不能改布局,所以需要去改源数据\n var sourceData = this.graph.findDataById(item.get('id'));\n if (!sourceData) {\n return;\n }\n var children = sourceData.children;\n // 叶子节点的收缩和展开没有意义\n if (!children || children.length === 0) {\n return;\n }\n var collapsed = !sourceData.collapsed;\n if (!this.shouldBegin(e, collapsed, this)) {\n return;\n }\n sourceData.collapsed = collapsed;\n item.getModel().collapsed = collapsed;\n this.graph.emit('itemcollapsed', {\n item: e.item,\n collapsed: collapsed\n });\n if (!this.shouldUpdate(e, collapsed, this)) {\n return;\n }\n this.onChange(item, collapsed, this);\n this.graph.layout();\n }\n};","import { __assign } from \"tslib\";\n/*\n * @Author: moyee\n * @LastEditors: moyee\n * @Description: 拖动 Combo\n */\nimport { each } from '@antv/util';\nimport Util from '../util';\nimport Global from '../global';\nvar calculationItemsBBox = Util.calculationItemsBBox;\n/**\n * 遍历拖动的 Combo 下的所有 Combo\n * @param data 拖动的 Combo\n * @param fn\n */\nvar traverseCombo = function traverseCombo(data, fn) {\n if (fn(data) === false) {\n return;\n }\n if (data) {\n var combos = data.get('combos');\n if (combos.length === 0) {\n return false;\n }\n each(combos, function (child) {\n traverseCombo(child, fn);\n });\n }\n};\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n enableDelegate: false,\n delegateStyle: {},\n // 拖动节点过程中是否只改变 Combo 的大小,而不改变其结构\n onlyChangeComboSize: false,\n // 拖动过程中目标 combo 状态样式\n activeState: '',\n selectedState: 'selected',\n enableStack: true\n };\n },\n getEvents: function getEvents() {\n return {\n 'combo:mousedown': 'onMouseDown',\n 'combo:dragstart': 'onDragStart',\n 'combo:drag': 'onDrag',\n 'combo:dragend': 'onDragEnd',\n 'combo:drop': 'onDrop',\n 'node:drop': 'onNodeDrop',\n 'combo:dragenter': 'onDragEnter',\n 'combo:dragleave': 'onDragLeave'\n };\n },\n validationCombo: function validationCombo(evt) {\n var item = evt.item;\n if (!item || item.destroyed) {\n return false;\n }\n if (!this.shouldUpdate(evt, this)) {\n return false;\n }\n var type = item.getType();\n if (type !== 'combo') {\n return false;\n }\n return true;\n },\n onMouseDown: function onMouseDown(evt) {\n this.origin = {\n x: evt.x,\n y: evt.y\n };\n },\n onDragStart: function onDragStart(evt) {\n var _this = this;\n var graph = this.graph;\n var item = evt.item;\n this.currentShouldEnd = true;\n if (!this.validationCombo(evt)) return;\n this.targets = [];\n // 获取所有选中的 Combo\n var combos = graph.findAllByState('combo', this.selectedState);\n var currentCombo = item.get('id');\n var dragCombos = combos.filter(function (combo) {\n var comboId = combo.get('id');\n return currentCombo === comboId;\n });\n if (dragCombos.length === 0) {\n this.targets.push(item);\n } else {\n this.targets = combos;\n }\n var beforeDragItems = [];\n this.targets.forEach(function (t) {\n var _a = t.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n beforeDragItems.push({\n x: x,\n y: y,\n id: id\n });\n });\n this.set('beforeDragItems', beforeDragItems);\n if (this.activeState) {\n this.targets.map(function (combo) {\n var model = combo.getModel();\n if (model.parentId) {\n var parentCombo = graph.findById(model.parentId);\n if (parentCombo) {\n graph.setItemState(parentCombo, _this.activeState, true);\n }\n }\n });\n }\n this.point = {};\n this.originPoint = {};\n this.currentItemChildCombos = [];\n traverseCombo(item, function (param) {\n if (param.destroyed) {\n return false;\n }\n var model = param.getModel();\n _this.currentItemChildCombos.push(model.id);\n return true;\n });\n },\n onDrag: function onDrag(evt) {\n var _this = this;\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n if (this.enableDelegate) {\n this.updateDelegate(evt);\n } else {\n if (this.activeState) {\n var graph_1 = this.graph;\n var item = evt.item;\n var model_1 = item.getModel();\n // 拖动过程中实时计算距离\n var combos = graph_1.getCombos();\n var sourceBBox = item.getBBox();\n var centerX_1 = sourceBBox.centerX,\n centerY_1 = sourceBBox.centerY,\n width_1 = sourceBBox.width;\n // 参与计算的 Combo,需要排除掉:\n // 1、拖动 combo 自己\n // 2、拖动 combo 的 parent\n // 3、拖动 Combo 的 children\n var calcCombos = combos.filter(function (combo) {\n var cmodel = combo.getModel();\n // 被拖动的是最外层的 Combo,无 parent,排除自身和子元素\n if (!model_1.parentId) {\n return cmodel.id !== model_1.id && !_this.currentItemChildCombos.includes(cmodel.id);\n }\n return cmodel.id !== model_1.id && !_this.currentItemChildCombos.includes(cmodel.id);\n });\n calcCombos.map(function (combo) {\n var _a = combo.getBBox(),\n cx = _a.centerX,\n cy = _a.centerY,\n w = _a.width;\n // 拖动的 combo 和要进入的 combo 之间的距离\n var disX = centerX_1 - cx;\n var disY = centerY_1 - cy;\n // 圆心距离\n var distance = 2 * Math.sqrt(disX * disX + disY * disY);\n if (width_1 + w - distance > 0.8 * width_1) {\n graph_1.setItemState(combo, _this.activeState, true);\n } else {\n graph_1.setItemState(combo, _this.activeState, false);\n }\n });\n }\n each(this.targets, function (item) {\n _this.updateCombo(item, evt);\n });\n if (this.onlyChangeComboSize) {\n // 拖动节点过程中,动态改变 Combo 的大小\n this.updateParentCombos();\n }\n }\n },\n updatePositions: function updatePositions(evt, restore) {\n var _this = this;\n // 当启用 delegate 时,拖动结束时需要更新 combo\n if (this.enableDelegate || restore) {\n each(this.targets, function (item) {\n _this.updateCombo(item, evt, restore);\n });\n }\n },\n onDrop: function onDrop(evt) {\n var _this = this;\n // 被放下的目标 combo\n var item = evt.item;\n this.currentShouldEnd = this.shouldEnd(evt, item, this);\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd || !item || !this.targets || item.destroyed) return;\n var graph = this.graph;\n var targetModel = item.getModel();\n this.targets.map(function (combo) {\n var model = combo.getModel();\n if (model.parentId !== targetModel.id) {\n if (_this.activeState) {\n graph.setItemState(item, _this.activeState, false);\n }\n // 将 Combo 放置到某个 Combo 上面时,只有当 onlyChangeComboSize 为 false 时候才更新 Combo 结构\n if (!_this.onlyChangeComboSize) {\n graph.updateComboTree(combo, targetModel.id, false);\n } else {\n graph.updateCombo(combo);\n }\n } else {\n graph.updateCombo(item);\n }\n });\n this.end(item, evt);\n // 如果已经拖放下了,则不需要再通过距离判断了\n this.endComparison = true;\n },\n onNodeDrop: function onNodeDrop(evt) {\n var _this = this;\n if (!this.targets || this.targets.length === 0) return;\n var graph = this.graph;\n var item = evt.item;\n var comboId = item.getModel().comboId;\n var newParentCombo = comboId ? graph.findById(comboId) : undefined;\n this.currentShouldEnd = this.shouldEnd(evt, newParentCombo, this);\n this.updatePositions(evt, !this.currentShouldEnd);\n if (!this.currentShouldEnd) return;\n var droppedCombo;\n // 如果被放置的的节点有 comboId,且这个 comboId 与正在被拖拽的 combo 的父 id 不相同,则更新父亲为 comboId\n if (comboId) {\n if (this.activeState) {\n var combo = graph.findById(comboId);\n graph.setItemState(combo, this.activeState, false);\n }\n this.targets.map(function (combo) {\n if (!_this.onlyChangeComboSize) {\n if (comboId !== combo.getID()) {\n droppedCombo = graph.findById(comboId);\n if (comboId !== combo.getModel().parentId) graph.updateComboTree(combo, comboId, false);\n }\n } else {\n graph.updateCombo(combo);\n }\n });\n } else {\n // 如果被放置的节点没有 comboId,且正在被拖拽的 combo 有父 id,则更新父亲为 undefined\n this.targets.map(function (combo) {\n if (!_this.onlyChangeComboSize) {\n var model = combo.getModel();\n if (model.comboId) {\n graph.updateComboTree(combo, undefined, false);\n }\n } else {\n graph.updateCombo(combo);\n }\n });\n }\n // 如果已经拖放下了,则不需要再通过距离判断了\n this.endComparison = true;\n this.end(droppedCombo, evt);\n },\n onDragEnter: function onDragEnter(evt) {\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n var item = evt.item;\n var graph = this.graph;\n if (this.activeState) {\n graph.setItemState(item, this.activeState, true);\n }\n },\n onDragLeave: function onDragLeave(evt) {\n if (!this.origin) {\n return;\n }\n if (!this.validationCombo(evt)) return;\n var item = evt.item;\n var graph = this.graph;\n if (this.activeState) {\n graph.setItemState(item, this.activeState, false);\n }\n },\n onDragEnd: function onDragEnd(evt) {\n if (!this.targets || this.targets.length === 0) return;\n var item = evt.item;\n if (this.currentShouldEnd) {\n this.updatePositions(evt);\n }\n var parentCombo = this.getParentCombo(item.getModel().parentId);\n var graph = this.graph;\n if (parentCombo && this.activeState) {\n graph.setItemState(parentCombo, this.activeState, false);\n }\n this.end(undefined, evt);\n },\n end: function end(comboDropedOn, evt) {\n var _this = this;\n if (!this.origin) return;\n var graph = this.graph;\n // 删除delegate shape\n if (this.delegateShape) {\n var delegateGroup = graph.get('delegateGroup');\n delegateGroup.clear();\n this.delegateShape = null;\n }\n if (comboDropedOn && this.activeState) {\n graph.setItemState(comboDropedOn, this.activeState, false);\n }\n // 若没有被放置的 combo,则是被放置在画布上\n if (!comboDropedOn) {\n var stack_1 = graph.get('enabledStack') && this.enableStack;\n var stackData_1 = {\n before: {\n nodes: [],\n edges: [],\n combos: [].concat(this.get('beforeDragItems'))\n },\n after: {\n nodes: [],\n edges: [],\n combos: []\n }\n };\n this.targets.map(function (combo) {\n // 将 Combo 放置到某个 Combo 上面时,只有当 onlyChangeComboSize 为 false 时候才更新 Combo 结构\n if (!_this.onlyChangeComboSize) {\n graph.updateComboTree(combo, undefined, stack_1);\n } else {\n graph.updateCombo(combo);\n var _a = combo.getModel(),\n x = _a.x,\n y = _a.y,\n id = _a.id;\n stackData_1.after.combos.push({\n x: x,\n y: y,\n id: id\n });\n graph.pushStack('update', stackData_1);\n }\n });\n }\n this.point = [];\n this.origin = null;\n this.originPoint = null;\n this.targets.length = 0;\n },\n /**\n * 遍历 comboTree,分别更新 node 和 combo\n * @param data\n * @param fn\n */\n traverse: function traverse(data, fn, edgesToBeUpdate) {\n var _this = this;\n if (edgesToBeUpdate === void 0) {\n edgesToBeUpdate = {};\n }\n if (fn(data, edgesToBeUpdate) === false) {\n return;\n }\n if (data) {\n var combos = data.get('combos');\n each(combos, function (child) {\n _this.traverse(child, fn, edgesToBeUpdate);\n });\n var nodes = data.get('nodes');\n each(nodes, function (child) {\n _this.traverse(child, fn, edgesToBeUpdate);\n });\n }\n },\n updateCombo: function updateCombo(item, evt, restore) {\n this.updateSingleItem(item, evt, restore);\n var edgesToBeUpdate = {};\n this.traverse(item, function (paramItem, paramEdgesMap) {\n if (paramItem.destroyed) {\n return false;\n }\n paramItem.getEdges().forEach(function (edge) {\n return paramEdgesMap[edge.getID()] = edge;\n });\n return true;\n }, edgesToBeUpdate);\n Object.values(edgesToBeUpdate).forEach(function (edge) {\n return edge.refresh();\n });\n },\n /**\n *\n * @param item 当前正在拖动的元素\n * @param evt\n */\n updateSingleItem: function updateSingleItem(item, evt, restore) {\n var origin = this.origin;\n var graph = this.graph;\n var model = item.getModel();\n var itemId = item.get('id');\n if (!this.point[itemId]) {\n this.point[itemId] = {\n x: model.x,\n y: model.y\n };\n }\n var x = evt.x - origin.x + this.point[itemId].x;\n var y = evt.y - origin.y + this.point[itemId].y;\n if (restore) {\n x += origin.x - evt.x;\n y += origin.y - evt.y;\n }\n graph.updateItem(item, {\n x: x,\n y: y\n }, false);\n // item.getEdges()?.forEach(edge => edge.refresh());\n },\n\n /**\n * 根据 ID 获取父 Combo\n * @param parentId 父 Combo ID\n */\n getParentCombo: function getParentCombo(parentId) {\n var graph = this.graph;\n if (!parentId) {\n return undefined;\n }\n var parentCombo = graph.findById(parentId);\n if (!parentCombo) {\n return undefined;\n }\n return parentCombo;\n },\n updateDelegate: function updateDelegate(evt) {\n var graph = this.graph;\n // 当没有 delegate shape 时创建\n if (!this.delegateShape) {\n var delegateGroup = graph.get('delegateGroup');\n var bbox = null;\n if (this.targets.length > 1) {\n bbox = calculationItemsBBox(this.targets);\n } else {\n bbox = this.targets[0].getBBox();\n }\n var x = bbox.x,\n y = bbox.y,\n width = bbox.width,\n height = bbox.height,\n minX = bbox.minX,\n minY = bbox.minY;\n this.originPoint = {\n x: x,\n y: y,\n width: width,\n height: height,\n minX: minX,\n minY: minY\n };\n var attrs = __assign(__assign({}, Global.delegateStyle), this.delegateStyle);\n this.delegateShape = delegateGroup.addShape('rect', {\n attrs: __assign({\n width: bbox.width,\n height: bbox.height,\n x: bbox.x,\n y: bbox.y\n }, attrs),\n name: 'combo-delegate-shape'\n });\n this.delegateShape.set('capture', false);\n this.delegate = this.delegateShape;\n } else {\n var clientX = evt.x - this.origin.x + this.originPoint.minX;\n var clientY = evt.y - this.origin.y + this.originPoint.minY;\n this.delegateShape.attr({\n x: clientX,\n y: clientY\n });\n }\n },\n /**\n * updates the parent combos' size and position\n */\n updateParentCombos: function updateParentCombos() {\n var _a = this,\n graph = _a.graph,\n targets = _a.targets;\n var comboParentMap = {};\n targets === null || targets === void 0 ? void 0 : targets.forEach(function (target) {\n var comboId = target.getModel().parentId;\n if (comboId) comboParentMap[comboId] = graph.findById(comboId);\n });\n Object.values(comboParentMap).forEach(function (combo) {\n if (combo) graph.updateCombo(combo);\n });\n }\n};","/*\n * @Author: Shiwu\n * @Description: 收起和展开 Combo\n */\nvar DEFAULT_TRIGGER = 'dblclick';\nvar ALLOW_EVENTS = ['click', 'dblclick'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n relayout: true\n };\n },\n getEvents: function getEvents() {\n var _a;\n var trigger;\n // 检测输入是否合法\n if (ALLOW_EVENTS.includes(this.trigger)) {\n trigger = this.trigger;\n } else {\n trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior collapse-expand-group 的 trigger 参数不合法,请输入 'click' 或 'dblclick'\");\n }\n return _a = {}, _a[\"combo:\".concat(trigger)] = 'onComboClick', _a;\n },\n onComboClick: function onComboClick(evt) {\n var item = evt.item;\n var _a = this,\n graph = _a.graph,\n relayout = _a.relayout;\n if (!item || item.destroyed || item.getType() !== 'combo') return;\n var model = item.getModel();\n var comboId = model.id;\n if (!comboId) {\n return;\n }\n graph.collapseExpandCombo(comboId);\n if (relayout && graph.get('layout')) graph.layout();else graph.refreshPositions();\n }\n};","import { __assign } from \"tslib\";\nimport Util from '../util';\nvar isPolygonsIntersect = Util.isPolygonsIntersect,\n pathToPoints = Util.pathToPoints;\nvar DEFAULT_TRIGGER = 'shift';\nvar ALLOW_EVENTS = ['drag', 'shift', 'ctrl', 'alt', 'control'];\nvar isItemIntersecPolygon = function isItemIntersecPolygon(item, polyPoints) {\n var shapePoints;\n var shape = item.getKeyShape();\n if (item.get('type') === 'path') {\n shapePoints = pathToPoints(shape.attr('path'));\n } else {\n var shapeBBox = shape.getCanvasBBox();\n shapePoints = [[shapeBBox.minX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.minY], [shapeBBox.maxX, shapeBBox.maxY], [shapeBBox.minX, shapeBBox.maxY]];\n }\n return isPolygonsIntersect(polyPoints, shapePoints);\n};\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n delegateStyle: {\n fill: '#EEF6FF',\n fillOpacity: 0.4,\n stroke: '#DDEEFE',\n lineWidth: 1\n },\n onSelect: function onSelect() {},\n onDeselect: function onDeselect() {},\n shouldDeselect: undefined,\n selectedState: 'selected',\n trigger: DEFAULT_TRIGGER,\n includeEdges: true,\n selectedEdges: [],\n selectedNodes: []\n // multiple: false,\n };\n },\n\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior lasso-select 的 trigger 参数不合法,请输入 'drag'、'shift'、'ctrl' 或 'alt'\");\n }\n if (this.trigger === 'drag') {\n return {\n dragstart: 'onDragStart',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n 'canvas:click': 'clearStates'\n };\n }\n return {\n dragstart: 'onDragStart',\n drag: 'onDragMove',\n dragend: 'onDragEnd',\n keyup: 'onKeyUp',\n keydown: 'onKeyDown',\n 'canvas:click': 'clearStates'\n };\n },\n onDragStart: function onDragStart(e) {\n var lasso = this.lasso;\n var item = e.item;\n // 排除在节点上拖动\n if (item) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n if (this.selectedNodes && this.selectedNodes.length !== 0) {\n this.clearStates('dragstart');\n }\n if (!lasso) {\n lasso = this.createLasso();\n }\n this.dragging = true;\n this.originPoint = {\n x: e.x,\n y: e.y\n };\n this.points.push(this.originPoint);\n lasso.show();\n },\n onDragMove: function onDragMove(e) {\n if (!this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.points.push({\n x: e.x,\n y: e.y\n });\n this.updateLasso(e);\n },\n onDragEnd: function onDragEnd(e) {\n if (!this.lasso && !this.dragging) {\n return;\n }\n if (this.trigger !== 'drag' && !this.keydown) {\n return;\n }\n this.points.push(this.originPoint);\n this.getSelectedItems();\n this.lasso.remove(true);\n this.lasso = null;\n this.points = [];\n this.dragging = false;\n },\n getLassoPath: function getLassoPath() {\n var points = this.points;\n var path = [];\n if (points.length) {\n points.forEach(function (point, index) {\n if (index === 0) {\n path.push(['M', point.x, point.y]);\n } else {\n path.push(['L', point.x, point.y]);\n }\n });\n path.push(['L', points[0].x, points[0].y]);\n }\n return path;\n },\n clearStates: function clearStates(action) {\n if (action === void 0) {\n action = 'canvas:click';\n }\n var _a = this,\n graph = _a.graph,\n selectedState = _a.selectedState,\n shouldDeselect = _a.shouldDeselect;\n var nodes = graph.findAllByState('node', selectedState);\n var edges = graph.findAllByState('edge', selectedState);\n if (!shouldDeselect || shouldDeselect({\n action: action,\n nodes: nodes,\n edges: edges\n })) {\n nodes.forEach(function (node) {\n return graph.setItemState(node, selectedState, false);\n });\n edges.forEach(function (edge) {\n return graph.setItemState(edge, selectedState, false);\n });\n }\n if (this.onDeselect) {\n this.onDeselect(this.selectedNodes, this.selectedEdges);\n }\n this.selectedNodes = [];\n this.selectedEdges = [];\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: [],\n edges: []\n },\n select: false\n });\n },\n getSelectedItems: function getSelectedItems() {\n var _this = this;\n var _a = this,\n graph = _a.graph,\n shouldUpdate = _a.shouldUpdate;\n var lassoContour = this.points.map(function (point) {\n return [graph.getCanvasByPoint(point.x, point.y).x, graph.getCanvasByPoint(point.x, point.y).y];\n });\n var state = this.selectedState;\n var selectedNodes = [];\n var selectedIds = [];\n graph.getNodes().forEach(function (node) {\n if (!node.isVisible()) return; // 隐藏节点不能被选中\n if (isItemIntersecPolygon(node, lassoContour)) {\n if (shouldUpdate(node, 'select', _this)) {\n selectedNodes.push(node);\n var model = node.getModel();\n selectedIds.push(model.id);\n graph.setItemState(node, state, true);\n }\n }\n });\n var selectedEdges = [];\n if (this.includeEdges) {\n // 选中边,边的source和target都在选中的节点中时才选中\n selectedNodes.forEach(function (node) {\n var edges = node.getOutEdges();\n edges.forEach(function (edge) {\n if (!edge.isVisible()) return; // 隐藏边不能够被选中\n var model = edge.getModel();\n var source = model.source,\n target = model.target;\n if (selectedIds.includes(source) && selectedIds.includes(target) && shouldUpdate(edge, 'select', _this)) {\n selectedEdges.push(edge);\n graph.setItemState(edge, _this.selectedState, true);\n }\n });\n });\n }\n this.selectedEdges = selectedEdges;\n this.selectedNodes = selectedNodes;\n if (this.onSelect) {\n this.onSelect(selectedNodes, selectedEdges);\n }\n graph.emit('nodeselectchange', {\n selectedItems: {\n nodes: selectedNodes,\n edges: selectedEdges\n },\n select: true\n });\n },\n createLasso: function createLasso() {\n var self = this;\n var lasso = self.graph.get('delegateGroup').addShape('path', {\n attrs: __assign({\n path: []\n }, self.delegateStyle),\n capture: false,\n name: 'lasso-shape'\n });\n this.lasso = lasso;\n this.delegate = lasso;\n this.points = [];\n return lasso;\n },\n updateLasso: function updateLasso(e) {\n var self = this;\n this.lasso.attr({\n path: self.getLassoPath()\n });\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n // if (this.selectedNodes && this.selectedNodes.length !== 0) {\n // this.clearStates();\n // }\n if (code.toLowerCase() === this.trigger.toLowerCase()) {\n this.keydown = true;\n } else {\n this.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.lasso) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的lasso\n this.lasso.remove(true);\n this.lasso = null;\n this.points = [];\n this.dragging = false;\n }\n this.keydown = false;\n }\n};","import { __assign } from \"tslib\";\nimport { isFunction } from '@antv/util';\nvar DEFAULT_TRIGGER = 'click';\nvar ALLOW_EVENTS = ['click', 'drag'];\nvar DEFAULT_KEY = undefined;\nvar ALLOW_KEYS = ['shift', 'ctrl', 'control', 'alt', 'meta', undefined];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n key: DEFAULT_KEY,\n edgeConfig: {},\n getEdgeConfig: undefined\n };\n },\n getEvents: function getEvents() {\n var self = this;\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(self.trigger.toLowerCase()) > -1)) {\n self.trigger = DEFAULT_TRIGGER;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior create-edge 的 trigger 参数不合法,请输入 'click','drag'\");\n }\n if (self.key && ALLOW_KEYS.indexOf(self.key.toLowerCase()) === -1) {\n self.trigger = DEFAULT_KEY;\n // eslint-disable-next-line no-console\n console.warn(\"Behavior create-edge 的 key 参数不合法,请输入 'shift','ctrl','alt','control',或 undefined\");\n }\n var events;\n if (self.trigger === 'drag') {\n events = {\n 'node:dragstart': 'onClick',\n 'combo:dragstart': 'onClick',\n drag: 'updateEndPoint',\n 'node:drop': 'onClick',\n 'combo:drop': 'onClick',\n dragend: 'onDragEnd'\n };\n } else if (self.trigger === 'click') {\n events = {\n 'node:click': 'onClick',\n mousemove: 'updateEndPoint',\n 'edge:click': 'cancelCreating',\n 'canvas:click': 'cancelCreating',\n 'combo:click': 'onClick'\n };\n }\n if (self.key) {\n events.keydown = 'onKeyDown';\n events.keyup = 'onKeyUp';\n }\n return events;\n },\n onDragEnd: function onDragEnd(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n var item = ev.item;\n if (!item || item.getID() === self.source || item.getType() !== 'node') self.cancelCreating({\n item: self.edge,\n x: ev.x,\n y: ev.y\n });\n },\n // 如果边的起点没有指定,则根据起点创建新边;如果起点已经指定而终点未指定,则指定终点\n onClick: function onClick(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n var node = ev.item;\n var graph = self.graph;\n var model = node.getModel();\n var getEdgeConfig = self.getEdgeConfig;\n // 如果起点已经指定而终点未指定,则指定终点\n if (self.addingEdge && self.edge) {\n if (!self.shouldEnd(ev, self)) return;\n var edgeConfig = void 0;\n if (getEdgeConfig && isFunction(getEdgeConfig)) {\n edgeConfig = getEdgeConfig({\n source: self.source,\n target: model.id\n }, self);\n } else {\n edgeConfig = self.edgeConfig;\n }\n var updateCfg = __assign({\n target: model.id\n }, edgeConfig);\n if (self.source === model.id) {\n updateCfg.type = 'loop';\n }\n graph.emit('beforecreateedge', {});\n graph.updateItem(self.edge, updateCfg, false);\n if (graph.get('enabledStack')) {\n var addedModel = __assign(__assign({}, self.edge.getModel()), {\n itemType: 'edge'\n });\n var after = {};\n after.edges = [addedModel];\n graph.pushStack('add', {\n before: {},\n after: after\n });\n }\n graph.emit('aftercreateedge', {\n edge: self.edge\n });\n // 暂时将该边的 capture 恢复为 true\n self.edge.getKeyShape().set('capture', true);\n self.edge = null;\n self.addingEdge = false;\n } else {\n // 如果边的起点没有指定,则根据起点创建新边\n if (!self.shouldBegin(ev, self)) return;\n // 获取自定义 edge 配置\n var edgeConfig = void 0;\n if (getEdgeConfig && isFunction(getEdgeConfig)) {\n edgeConfig = getEdgeConfig({\n source: model.id,\n target: model.id\n }, self);\n } else {\n edgeConfig = self.edgeConfig;\n }\n self.edge = graph.addItem('edge', __assign({\n source: model.id,\n target: model.id\n }, edgeConfig), false);\n self.source = model.id;\n self.addingEdge = true;\n // 暂时将该边的 capture 设置为 false,这样可以拾取到后面的元素\n self.edge.getKeyShape().set('capture', false);\n }\n },\n // 边的起点已经确定,边的末端跟随鼠标移动\n updateEndPoint: function updateEndPoint(ev) {\n var self = this;\n if (self.key && !self.keydown) return;\n if (self.edge && self.edge.destroyed) self.cancelCreating({\n item: self.edge\n });\n var point = {\n x: ev.x,\n y: ev.y\n };\n // 若此时 source 节点已经被移除,结束添加边\n if (!self.graph.findById(self.source)) {\n self.addingEdge = false;\n return;\n }\n if (self.addingEdge && self.edge) {\n // 更新边的终点为鼠标位置\n self.graph.updateItem(self.edge, {\n target: point\n }, false);\n }\n },\n // 取消增加边,删除该边;或指定终点\n cancelCreating: function cancelCreating(ev) {\n var _a, _b;\n var self = this;\n if (self.key && !self.keydown) return;\n var graph = self.graph;\n var currentEdge = ev.item;\n if (self.addingEdge && (self.edge === currentEdge || ((_b = (_a = ev.target) === null || _a === void 0 ? void 0 : _a.isCanvas) === null || _b === void 0 ? void 0 : _b.call(_a)))) {\n if (self.edge && !self.edge.destroyed) graph.removeItem(self.edge, false);\n self.edge = null;\n self.addingEdge = false;\n return;\n }\n },\n onKeyDown: function onKeyDown(e) {\n var self = this;\n var code = e.key;\n if (!code) {\n return;\n }\n if (code.toLowerCase() === self.key.toLowerCase()) {\n self.keydown = true;\n } else {\n self.keydown = false;\n }\n },\n onKeyUp: function onKeyUp() {\n var self = this;\n if (self.addingEdge && self.edge) {\n // 清除正在增加的边\n self.graph.removeItem(self.edge, false);\n self.addingEdge = false;\n self.edge = null;\n }\n this.keydown = false;\n }\n};","var DEFAULT_TRIGGER = 'ctrl';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control'];\nvar DEFAULT_COMBINED_KEY = '1';\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n trigger: DEFAULT_TRIGGER,\n combinedKey: DEFAULT_COMBINED_KEY,\n functionName: 'fitView',\n functionParams: []\n };\n },\n getEvents: function getEvents() {\n // 检测输入是否合法\n if (!(ALLOW_EVENTS.indexOf(this.trigger.toLowerCase()) > -1)) {\n this.trigger = DEFAULT_TRIGGER;\n console.warn(\"Behavior shortcuts-fit-view \\u7684 trigger \\u53C2\\u6570 '\".concat(this.trigger, \"' \\u4E0D\\u5408\\u6CD5\\uFF0C\\u8BF7\\u8F93\\u5165 'drag'\\u3001'shift'\\u3001'ctrl' \\u6216 'alt'\"));\n }\n if (this.combinedKey === this.trigger) {\n this.combinedKey = undefined;\n }\n return {\n keyup: 'onKeyUp',\n keydown: 'onKeyDown'\n };\n },\n onKeyDown: function onKeyDown(e) {\n var code = e.key;\n if (!code) {\n return;\n }\n var triggerLowerCase = this.trigger.toLowerCase();\n var codeLowerCase = code.toLowerCase();\n // 按住 control 键时,允许用户设置 trigger 为 ctrl\n if (!this.triggerKeydown) {\n if (codeLowerCase === triggerLowerCase || codeLowerCase === 'control' && triggerLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && triggerLowerCase === 'control') {\n this.triggerKeydown = true;\n } else {\n this.triggerKeydown = false;\n }\n }\n var graph = this.graph;\n if (!graph[this.functionName]) {\n console.warn(\"Behavior shortcuts-fit-view \\u7684 functionName \\u53C2\\u6570 '\".concat(this.functionName, \"' \\u4E0D\\u5408\\u6CD5\\uFF0C\\u5B83\\u4E0D\\u662F Graph \\u7684\\u4E00\\u4E2A\\u51FD\\u6570\\u540D\"));\n return {};\n }\n // 未配置 combinedKey,直接 fitView\n if (this.triggerKeydown && !this.combinedKey) {\n if (this.functionParams && this.functionParams.length) graph[this.functionName].apply(graph, this.functionParams);else graph[this.functionName]();\n return;\n }\n var combinedKeyLowerCase = this.combinedKey.toLowerCase();\n if (this.triggerKeydown) {\n if (codeLowerCase === combinedKeyLowerCase || codeLowerCase === 'control' && combinedKeyLowerCase === 'ctrl' || codeLowerCase === 'ctrl' && combinedKeyLowerCase === 'control') {\n if (this.functionParams && this.functionParams.length) graph[this.functionName].apply(graph, this.functionParams);else graph[this.functionName]();\n }\n }\n },\n onKeyUp: function onKeyUp() {\n if (this.brush) {\n // 清除所有选中状态后,设置拖得动状态为false,并清除框选的brush\n this.brush.remove(true);\n this.brush = null;\n this.dragging = false;\n }\n this.triggerKeydown = false;\n }\n};","import { isBoolean, isObject } from '@antv/util';\nvar ALLOW_EVENTS = ['shift', 'ctrl', 'alt', 'control', 'meta'];\nexport default {\n getDefaultCfg: function getDefaultCfg() {\n return {\n direction: 'both',\n enableOptimize: false,\n zoomKey: 'ctrl',\n // scroll-canvas 可滚动的扩展范围,默认为 0,即最多可以滚动一屏的位置\n // 当设置的值大于 0 时,即滚动可以超过一屏\n // 当设置的值小于 0 时,相当于缩小了可滚动范围\n // 具体实例可参考:https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*IFfoS67_HssAAAAAAAAAAAAAARQnAQ\n scalableRange: 0,\n allowDragOnItem: true\n };\n },\n getEvents: function getEvents() {\n if (!this.zoomKey || ALLOW_EVENTS.indexOf(this.zoomKey) === -1) this.zoomKey = 'ctrl';\n return {\n wheel: 'onWheel'\n };\n },\n onWheel: function onWheel(ev) {\n var _this = this;\n if (!this.allowDrag(ev)) return;\n var graph = this.graph;\n var zoomKeys = Array.isArray(this.zoomKey) ? [].concat(this.zoomKey) : [this.zoomKey];\n if (zoomKeys.includes('control')) zoomKeys.push('ctrl');\n var keyDown = zoomKeys.some(function (ele) {\n return ev[\"\".concat(ele, \"Key\")];\n });\n if (keyDown) {\n var canvas = graph.get('canvas');\n var point = canvas.getPointByClient(ev.clientX, ev.clientY);\n var ratio = graph.getZoom();\n if (ev.wheelDelta > 0) {\n ratio = ratio + ratio * 0.05;\n } else {\n ratio = ratio - ratio * 0.05;\n }\n graph.zoomTo(ratio, {\n x: point.x,\n y: point.y\n });\n } else {\n var dx = ev.deltaX || ev.movementX;\n var dy = ev.deltaY || ev.movementY;\n if (!dy && navigator.userAgent.indexOf('Firefox') > -1) dy = -ev.wheelDelta * 125 / 3;\n var width = this.graph.get('width');\n var height = this.graph.get('height');\n var graphCanvasBBox = this.graph.get('canvas').getCanvasBBox();\n var expandWidth = this.scalableRange;\n var expandHeight = this.scalableRange;\n // 若 scalableRange 是 0~1 的小数,则作为比例考虑\n if (expandWidth < 1 && expandWidth > -1) {\n expandWidth = width * expandWidth;\n expandHeight = height * expandHeight;\n }\n var minX = graphCanvasBBox.minX,\n maxX = graphCanvasBBox.maxX,\n minY = graphCanvasBBox.minY,\n maxY = graphCanvasBBox.maxY;\n if (dx > 0) {\n if (maxX < -expandWidth) {\n dx = 0;\n } else if (maxX - dx < -expandWidth) {\n dx = maxX + expandWidth;\n }\n } else if (dx < 0) {\n if (minX > width + expandWidth) {\n dx = 0;\n } else if (minX - dx > width + expandWidth) {\n dx = minX - (width + expandWidth);\n }\n }\n if (dy > 0) {\n if (maxY < -expandHeight) {\n dy = 0;\n } else if (maxY - dy < -expandHeight) {\n dy = maxY + expandHeight;\n }\n } else if (dy < 0) {\n if (minY > height + expandHeight) {\n dy = 0;\n } else if (minY - dy > height + expandHeight) {\n dy = minY - (height + expandHeight);\n }\n }\n if (this.get('direction') === 'x') {\n dy = 0;\n } else if (this.get('direction') === 'y') {\n dx = 0;\n }\n graph.translate(-dx, -dy);\n }\n ev.preventDefault();\n // hide the shapes when the zoom ratio is smaller than optimizeZoom\n // hide the shapes when zoomming\n var enableOptimize = this.get('enableOptimize');\n if (enableOptimize) {\n var optimizeZoom_1 = this.get('optimizeZoom');\n var optimized = this.get('optimized');\n var nodes_1 = graph.getNodes();\n var edges_1 = graph.getEdges();\n var nodesLength_1 = nodes_1.length;\n var edgesLength_1 = edges_1.length;\n // hiding\n if (!optimized) {\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n if (!node.destroyed) {\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.destoryed && !shape.get('isKeyShape')) {\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n shape.set('ori-visibility', shape.get('ori-visibility') || shape.get('visible'));\n shape.hide();\n }\n }\n this.set('optimized', true);\n }\n // showing after 100ms\n clearTimeout(this.get('timeout'));\n var timeout = setTimeout(function () {\n var currentZoom = graph.getZoom();\n var curOptimized = _this.get('optimized');\n if (curOptimized) {\n _this.set('optimized', false);\n for (var n = 0; n < nodesLength_1; n++) {\n var node = nodes_1[n];\n var children = node.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = node.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n var oriVis = shape.get('ori-visibility');\n if (!shape.get('visible') && oriVis) {\n if (oriVis) shape.show();\n }\n }\n }\n }\n for (var edgeIndex = 0; edgeIndex < edgesLength_1; edgeIndex++) {\n var edge = edges_1[edgeIndex];\n var children = edge.get('group').get('children');\n var childrenLength = children.length;\n if (currentZoom < optimizeZoom_1) {\n var keyShape = edge.getKeyShape();\n var oriVis = keyShape.get('ori-visibility');\n if (oriVis) keyShape.show();\n } else {\n for (var c = 0; c < childrenLength; c++) {\n var shape = children[c];\n if (!shape.get('visible')) {\n var oriVis = shape.get('ori-visibility');\n if (oriVis) shape.show();\n }\n }\n }\n }\n }\n }, 100);\n this.set('timeout', timeout);\n }\n },\n allowDrag: function allowDrag(evt) {\n var _a, _b;\n var target = evt.target;\n var targetIsCanvas = target && target.isCanvas && target.isCanvas();\n if (isBoolean(this.allowDragOnItem) && !this.allowDragOnItem && !targetIsCanvas) return false;\n if (isObject(this.allowDragOnItem)) {\n var _c = this.allowDragOnItem,\n node = _c.node,\n edge = _c.edge,\n combo = _c.combo;\n var itemType = (_b = (_a = evt.item) === null || _a === void 0 ? void 0 : _a.getType) === null || _b === void 0 ? void 0 : _b.call(_a);\n if (!node && itemType === 'node') return false;\n if (!edge && itemType === 'edge') return false;\n if (!combo && itemType === 'combo') return false;\n }\n return true;\n }\n};","import { each } from '@antv/util';\nimport { registerBehavior } from '@antv/g6-core';\n// import Behavior from './behavior';\nimport DragCanvas from './drag-canvas';\nimport DragNode from './drag-node';\nimport ActivateRelations from './activate-relations';\nimport BrushSelect from './brush-select';\nimport ClickSelect from './click-select';\nimport ZoomCanvas from './zoom-canvas';\nimport Tooltip from './tooltip';\nimport EdgeTooltip from './edge-tooltip';\nimport CollapseExpand from './collapse-expand';\nimport DragCombo from './drag-combo';\nimport CollapseExpandCombo from './collapse-expand-combo';\nimport LassoSelect from './lasso-select';\nimport CreateEdge from './create-edge';\nimport ShortcutsCall from './shortcuts-call';\nimport ScrollCanvas from './scroll-canvas';\nvar behaviors = {\n 'drag-canvas': DragCanvas,\n 'zoom-canvas': ZoomCanvas,\n 'drag-node': DragNode,\n 'activate-relations': ActivateRelations,\n 'brush-select': BrushSelect,\n 'click-select': ClickSelect,\n 'lasso-select': LassoSelect,\n tooltip: Tooltip,\n 'edge-tooltip': EdgeTooltip,\n 'collapse-expand': CollapseExpand,\n 'drag-combo': DragCombo,\n 'collapse-expand-combo': CollapseExpandCombo,\n 'create-edge': CreateEdge,\n 'shortcuts-call': ShortcutsCall,\n 'scroll-canvas': ScrollCanvas\n};\neach(behaviors, function (behavior, type) {\n registerBehavior(type, behavior);\n});\n// export default Behavior;","import { __assign } from \"tslib\";\nimport { registerBehavior, registerCombo, registerEdge, registerNode, Arrow, Marker, Shape } from '@antv/g6-core';\nimport * as AlgorithmSync from '@antv/algorithm';\nimport * as AlgorithmAsync from '@antv/algorithm/lib/asyncIndex';\nimport Graph from './graph/graph';\nimport TreeGraph from './graph/tree-graph';\nimport { TreeLayout, Layout, registerLayout } from './layout';\nimport Global from './global';\nimport Util from './util';\nimport Plugin from './plugin';\nimport './element';\nimport './behavior';\nvar Algorithm = __assign(__assign({}, AlgorithmSync), AlgorithmAsync);\nvar Grid = Plugin.Grid;\nvar Minimap = Plugin.Minimap;\nvar Bundling = Plugin.Bundling;\nvar Menu = Plugin.Menu;\nvar Fisheye = Plugin.Fisheye;\nvar ToolBar = Plugin.ToolBar;\nvar Tooltip = Plugin.Tooltip;\nvar TimeBar = Plugin.TimeBar;\nvar ImageMinimap = Plugin.ImageMinimap;\nvar EdgeFilterLens = Plugin.EdgeFilterLens;\nvar SnapLine = Plugin.SnapLine;\nvar Legend = Plugin.Legend;\nvar Annotation = Plugin.Annotation;\nexport * from '@antv/g6-core';\nexport * from './types';\nexport * from './interface/graph';\nexport { Graph, TreeGraph, Util, Layout, TreeLayout, registerLayout, Global, Minimap, Grid, Bundling, Menu, Fisheye, Algorithm, ToolBar, Tooltip, TimeBar, ImageMinimap, EdgeFilterLens, SnapLine, Legend, Annotation, Arrow, Marker, Shape };\nexport default {\n version: Global.version,\n Graph: Graph,\n TreeGraph: TreeGraph,\n Util: Util,\n Layout: Layout,\n TreeLayout: TreeLayout,\n registerLayout: registerLayout,\n Global: Global,\n registerBehavior: registerBehavior,\n registerCombo: registerCombo,\n registerEdge: registerEdge,\n registerNode: registerNode,\n Minimap: Plugin.Minimap,\n Grid: Plugin.Grid,\n Bundling: Plugin.Bundling,\n Menu: Plugin.Menu,\n ToolBar: Plugin.ToolBar,\n Tooltip: Plugin.Tooltip,\n Legend: Plugin.Legend,\n TimeBar: TimeBar,\n SnapLine: SnapLine,\n Fisheye: Fisheye,\n ImageMinimap: ImageMinimap,\n EdgeFilterLens: EdgeFilterLens,\n Annotation: Annotation,\n Algorithm: Algorithm,\n Arrow: Arrow,\n Marker: Marker,\n Shape: Shape\n};","import G6 from '@antv/g6-pc';\nG6.version = '4.8.23';\nexport * from '@antv/g6-pc';\nexport default G6;\nexport var version = '4.8.23';","import G6 from '@antv/g6';\n\nG6.registerNode('file-node', {\n draw(cfg, group) {\n const keyShape = group.addShape('rect', {\n name: 'rect-shape',\n attrs: {\n x: 0,\n y: 0,\n fill: '#fff',\n stroke: null,\n },\n });\n let isLeaf = (cfg.children as []).length == 0;\n if (!isLeaf) {\n group.addShape('marker', {\n name: 'marker-shape',\n attrs: {\n symbol: 'triangle-down',\n x: 0,\n y: 0,\n r: 4,\n fill: '#767c82',\n },\n });\n }\n const shape = group.addShape('text', {\n name: 'text-shape',\n attrs: {\n x: 6,\n y: 8,\n fontSize: 16,\n text: cfg.label,\n fill: cfg.tracked ? `#00f` : '#333639',\n textAlign: 'left',\n fontFamily: window\n .getComputedStyle(document.body, null)\n .getPropertyValue('font-family'),\n },\n });\n return keyShape;\n },\n});\nG6.registerEdge(\n 'step-line',\n {\n getControlPoints(cfg) {\n const startPoint = cfg.startPoint!;\n const endPoint = cfg.endPoint!;\n return [\n startPoint,\n {\n x: startPoint?.x,\n y: endPoint?.y,\n },\n endPoint,\n ];\n },\n },\n 'polyline',\n);\n","\n\n","\n\n"],"names":["createDataKey","key","_arrayLikeToArray","arr","len","i","arr2","_unsupportedIterableToArray","o","minLen","arrayLikeToArray","n","_classCallCheck","instance","Constructor","_toPrimitive","input","hint","_typeof","prim","res","_toPropertyKey","arg","toPrimitive","_defineProperties","target","props","descriptor","toPropertyKey","_createClass","protoProps","staticProps","_defineProperty","obj","value","ChevronLeftIcon","defineComponent","h","SwitcherIcon","zero","n1","createLeftBorderStyle","type","cM","c","cB","cE","createTopBorderStyle","style$3","cNotM","buttonGroupProps","NButtonGroup","mergedClsPrefixRef","mergedRtlRef","useConfig","useStyle","style","provide","buttonGroupInjectionKey","useRtl","mergedClsPrefix","self","vars","fontWeight","textColor1","textColor2","textColorDisabled","dividerColor","fontSize","collapseLight","commonLight","collapseLight$1","style$2","fadeInHeightExpandTransition","collapseProps","useTheme","collapseInjectionKey","createInjectionKey","NCollapse","slots","inlineThemeDisabled","uncontrolledExpandedNamesRef","ref","controlledExpandedNamesRef","computed","mergedExpandedNamesRef","useMergedState","themeRef","doUpdateExpandedNames","names","_onUpdateExpandedNames","onUpdateExpandedNames","onExpandedNamesChange","call","doItemHeaderClick","info","onItemHeaderClick","toggleItem","collapse","name","event","accordion","expandedNames","activeNames","index","activeName","rtlEnabledRef","cssVarsRef","cubicBezierEaseInOut","titleFontWeight","titlePadding","titleTextColor","titleTextColorDisabled","textColor","arrowColor","titleFontSize","arrowColorDisabled","itemMargin","themeClassHandle","useThemeClass","_a","NCollapseItemContent","useFalseUntilTruthy","toRef","NFadeInExpandTransition","show","displayDirective","onceTrue","clsPrefix","useVShow","contentNode","withDirectives","vShow","collapseItemProps","NCollapseItem","randomName","createId","mergedNameRef","useMemo","inject","throwError","expandedNamesRef","collapseSlots","collapsedRef","expandedName","e","happensInArea","happensIn","$slots","arrowPlacement","collapsed","mergedDisplayDirective","disabled","triggerAreas","headerNode","resolveSlotWithProps","headerExtraSlot","arrowSlot","area","NBaseIcon","ArrowLeftIcon","ArrowRightIcon","resolveWrappedSlotWithProps","children","module","sizeVariables","cardColor","modalColor","popoverColor","tableHeaderColor","tableColorStriped","borderRadius","fontWeightStrong","lineHeight","fontSizeSmall","fontSizeMedium","fontSizeLarge","composite","tableLight","tableLight$1","borderRadiusSmall","hoverColor","pressedColor","primaryColor","textColor3","changeColor","treeLight","createTheme","checkboxLight","scrollbarLight","emptyLight","treeLight$1","style$1","insideModal","insidePopover","tableProps","NTable","size","borderColor","tdColor","tdColorModal","tdColorPopover","thColor","thColorModal","thColorPopover","thTextColor","tdTextColor","thFontWeight","borderColorModal","borderColorPopover","tdColorStriped","tdColorStripedModal","tdColorStripedPopover","createKey","tdPadding","thPadding","NTh","NTr","NTd","NThead","NTbody","treeSelectInjectionKey","treeInjectionKey","NTreeNodeSwitcher","renderSwitcherIconRef","expanded","hide","indent","onClick","NIconSwitchTransition","NBaseLoading","renderSwitcherIcon","NTreeNodeCheckbox","NTree","doCheck","onCheck","handleUpdateValue","mergedTheme","checked","indeterminate","focusable","NCheckbox","NTreeNodeContent","renderLabelRef","renderPrefixRef","renderSuffixRef","labelFieldRef","selfRef","doClick","handleClick","labelField","nodeProps","selected","renderLabel","renderPrefix","renderSuffix","onDragstart","rawNode","prefix","suffix","label","render","renderDropMark","position","offsetLevel","el","cssPosition","defaultAllowDrop","dropPosition","node","useMergedCheckStrategy","isNodeDisabled","disabledField","traverse","nodes","childrenField","callback","callbackAfter","keysWithFilter","pattern","keyField","filter","keys","highlightKeySet","path","isBrowser","emptyImage","filterTree","tree","visitedTailKeys","visitedNonTailKeys","expandedKeys","filteredTree","visit","t","build","sibs","isVisitedTail","isVisitedNonTail","clonedNode","TreeNode","droppingNodeParentRef","droppingMouseNodeRef","draggingNodeRef","droppingPositionRef","droppingOffsetLevelRef","nodePropsRef","indentRef","blockLineRef","checkboxPlacementRef","checkOnClickRef","disabledFieldRef","showLineRef","overrideDefaultNodeClickBehaviorRef","checkboxDisabledRef","nodeIsDisabledRef","disabledRef","resolvedNodePropsRef","contentInstRef","contentElRef","onMounted","handleSwitcherClick","tmNode","onLoad","selectableRef","checkableRef","checkedRef","mergedCheckOnClickRef","checkable","checkOnClick","_handleClick","expandOnClick","selectable","mergedCheckOnClick","handleCheck","handleNodeClick","_b","overrideDefaultNodeClickBehavior","shouldOverride","handleContentClick","handleLineClick","handleDragStart","handleDragEnter","handleDragOver","handleDragEnd","handleDragLeave","handleDrop","indentNodes","cursor","repeat","draggingNode","droppingPosition","droppingMouseNode","droppingNodeParent","highlight","draggable","blockLine","pending","internalScrollable","checkboxPlacement","dragEventHandlers","dataKey","checkboxOnRight","checkboxNode","NTreeNode","useKeyboard","fNodesRef","mergedExpandedKeysRef","mergedSelectedKeysRef","mergedCheckedKeysRef","handleSelect","mergedSelectedKeys","treeSelectInjection","pendingNodeKeyRef","handleKeydown","pendingNodeKey","enterBehavior","fNodes","fIndex","pendingNode","parentTmNode","MotionWrapper","FadeInExpandTransition","pxfy","iconSwitchTransitionNode","iconSwitchTransition","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","reject","fulfilled","step","rejected","result","createTreeMateOptions","getChildren","treeSharedProps","treeProps","selfElRef","scrollbarInstRef","virtualListInstRef","getScrollContainer","getScrollContent","mergedFilterRef","filteredTreeInfoRef","displayTreeMateRef","createTreeMate","dataTreeMateRef","watchProps","uncontrolledCheckedKeysRef","watchEffect","controlledCheckedKeysRef","checkedStatusRef","mergedCheckStrategyRef","displayedCheckedKeysRef","displayedIndeterminateKeysRef","indeterminateKeys","uncontrolledSelectedKeysRef","controlledSelectedKeysRef","uncontrolledExpandedKeysRef","initUncontrolledExpandedKeys","controlledExpandedKeysRef","expandTimerId","nodeKeyToBeExpanded","uncontrolledHighlightKeySetRef","controlledHighlightKeySetRef","mergedHighlightKeySetRef","loadingKeysRef","expandedNonLoadingKeysRef","dragStartX","droppingNodeRef","droppingNode","isDataReset","watch","nextTick","resetDndState","expandAnimationDisabled","disableExpandAnimationForOneTick","memoizedExpandedKeys","oldValue","expandedKeysAfterChange","doUpdateExpandedKeys","getOptionsByKeys","triggerLoading","loadingKeys","resetDragExpandState","loadError","displayTreeMate","getNode","aipRef","afNodesRef","prevValue","syncScrollbar","nodeHeight","depx","prevVSet","addedKey","removedKey","expandedKey","currentVSet","virtualScroll","viewportHeight","viewportItemCount","baseExpandedKeys","expandedNodeIndex","expandedChildren","flatten","collapsedNodeIndex","collapsedNodeChildren","collapsedChildren","getFIndexRef","createIndexGetter","mergedFNodesRef","scrollbarInst","handleAfterEnter","option","meta","_onUpdateExpandedKeys","onUpdateExpandedKeys","doUpdateCheckedKeys","_onUpdateCheckedKeys","onUpdateCheckedKeys","doUpdateIndeterminateKeys","_onUpdateIndeterminateKeys","onUpdateIndeterminateKeys","doUpdateSelectedKeys","_onUpdateSelectedKeys","onUpdateSelectedKeys","doDragEnter","onDragenter","doDragLeave","onDragleave","doDragEnd","onDragend","doDragStart","doDragOver","onDragover","doDrop","onDrop","resetDragState","resetDropState","checkedAction","checkedKeys","toggleExpand","mergedExpandedKeys","expandNodeId","nodeToBeExpanded","nextKeys","siblingKeySet","selectedKeys","expandDragEnterNode","expand","handleDragLeaveTree","emit","allowDrop","elOffsetHeight","elClientTop","eventOffsetY","mousePosition","getFindex","finalDropNode","finalDropPosition","hoverNodeFIndex","mouseAtExpandedNonLeafNode","offset","nextNode","prevNode","handleScroll","handleResize","handleFocusout","selfEl","targetEl","scrollTo","options","y","exposedMethods","nodeBorderRadius","nodeColorHover","nodeColorPressed","nodeColorActive","loadingColor","nodeTextColor","nodeTextColorDisabled","dropMarkColor","nodeWrapperPadding","lineColor","lineOffsetTop","getPadding","lineOffsetBottom","nodeContentHeight","internalRenderEmpty","blockNode","internalFocusable","rtlEnabled","scrollbarProps","mergedFocusable","tabindex","treeClass","createNode","internalScrollablePadding","padding","NxScrollbar","VVirtualList","item","resolveSlot","NEmpty","__props","isLeft","isTop","prevOffset","shallowReactive","currentStyle","xStyle","yStyle","prevEv","startMove","ev","move","dx","dy","endMove","box","shallowRef","preventSelection","transitions","windowEndMove","top","bottom","left","right","boxDiv","onUnmounted","newValue","oldvalue","updateTarget","lenAttrNames","attrs","attr","attrDesc","qfAttrs","imgRef","clickImg","img","imgRect","innerHeight","offsetTop","ox","oy","childNode","findNodeByXy","percent","positionStyle","imgHover","hoverPosition","imgMove","hoverPositionStyle","router","useRouter","selectorText","selectorResults","searchBySelector","errorTry","message","text","enableSearchBySelector","selector","errorWrap","parseSelector","s","results","stack","getNodeLabel","allKeys","newKeys","k","generateRules","jpgUrl","githubJpgStorage","githubUrlToSelfUrl","zipUrl","githubZipStorage","rule","dayjs","copy","JSON5","_1vw","focusNode","focusCount","id","then","delay","treeRef","behavior","debounce","parent","Set","add","length","every","v","has","treeFilter","treeNodeProps","onUpdateFocusNode","color","extendStatics","d","b","p","__extends","__","__assign","__rest","__decorate","decorators","desc","r","__param","paramIndex","decorator","__esDecorate","ctor","descriptorIn","contextIn","initializers","extraInitializers","accept","f","kind","_","done","context","__runInitializers","useValue","__propKey","x","__setFunctionName","__metadata","metadataKey","metadataValue","__generator","body","g","verb","op","__createBinding","m","k2","__exportStar","__values","__read","ar","error","__spread","__spreadArrays","il","j","jl","__spreadArray","to","from","pack","l","__await","__asyncGenerator","q","a","resume","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","mod","__importDefault","__classPrivateFieldGet","receiver","state","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","env","async","dispose","_SuppressedError","suppressed","__disposeResources","fail","next","rec","tslib_es6","isArrayLike","contains","func","difference","values","toString","isType","isFunction$2","isNil","isArray$2","isObject$1","each","elements","rst","isArray","isObject","isFunction","isMatch","_keys","isObjectLike","isPlainObject","proto","find","predicate","_predicate","findIndex","fromIndex","firstValue","data","flattenDeep","max$6","prev","curr","min$5","getRange","filterValues","tmp","max","getMax","min","getMin","arrPrototype","splice","indexOf","pull","_i","pullAt","indexes","last","previous","reduce","fn","init","remove","isString$2","str","sortBy","comparer","keys_1","isString","prop","uniq","cache","union","sources","valuesOfKey$1","tmpMap","val","head","startsWith","endsWith","some","hasOwnProperty","groupBy","condition","groupToMap","paramscondition_1","row","unique","group$1","groups","array","getWrapBehavior","action","wrapBehavior","method","numColorCache","numberToColor","num","parseRadius","radius","r1","r2","r3","r4","clamp","fixedBase","base","isNumber","isDecimal","isEven","isInteger","isNegative","PRECISION","isNumberEqual","precision","isOdd","isPositive","maxBy$1","maxItem","minBy$1","minItem","DEGREE","toDegree","radian","parseInt$2","RADIAN","toRadian","degree","has$1","hasValue$1","toString$5","lowerCase","lowerFirst","substitute","match","upperCase","upperFirst","getType","isArguments","isBoolean","isDate","isError","isFinite$2","isNull","objectProto","isPrototype","Ctor","isRegExp","isUndefined","isElement","requestAnimationFrame","cancelAnimationFrame","handler","_mix","dist","mix","src1","src2","src3","augment","args","clone","wait","immediate","timeout","later","callNow","memoize$1","resolver","memoized","MAX_MIX_LEVEL","_deepMix","src","level","maxLevel","deepMix","extend","subclass","superclass","overrides","staticOverrides","create","Tmp","superObj","isEmpty","isEqual","other","valueKeys","otherKeys","isEqualWith$1","map","identity","mapValues$1","object","get$2","defaultValue","keyArr","set$b","idx","pick$1","omit$1","throttle$1","throttled","now","remaining","toArray$1","uniqueId$4","noop$2","identity$8","isArraylike","ctx","measureTextWidth","memoize","font","fontFamily","fontStyle","fontVariant","getEllipsisText","maxWidth","STEP","PLACEHOLDER_WIDTH","leftText","leftWidth","currentText","currentWidth","default_1","def","behaviorOption","cfg","graph","_this","events","Behavior","prototype","eventsToBind","handle","WILDCARD","EventEmitter","evt","once","wildcardEvents","doEmit","es","length_1","EPSILON","ARRAY_TYPE","RANDOM","setMatrixArrayType","equals","out","glMatrix.ARRAY_TYPE","fromValues","m00","m01","m10","m11","set","transpose","a1","invert","a0","a2","a3","det","adjoint","determinant","multiply","b0","b1","b2","b3","rotate","rad","scale","v0","v1","fromRotation","fromScaling","frob","LDU","L","D","U","subtract","exactEquals","glMatrix.EPSILON","multiplyScalar","multiplyScalarAndAdd","mul","sub","tx","ty","aa","ab","ac","ad","atx","aty","a4","a5","b4","b5","translate","fromTranslation","fromMat4","m02","m12","m20","m21","m22","a01","a02","a12","a00","a10","a11","a20","a21","a22","b01","b11","b21","b00","b02","b10","b12","b20","b22","fromMat2d","fromQuat","z","w","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","normalFromMat4","a03","a13","a23","a30","a31","a32","a33","b03","b04","b05","b06","b07","b08","b09","projection","width","height","a6","a7","a8","b6","b7","b8","m03","m13","m23","m30","m31","m32","m33","axis","rotateX","rotateY","rotateZ","fromXRotation","fromYRotation","fromZRotation","fromRotationTranslation","xy","xz","yz","fromQuat2","translation","bx","by","bz","bw","ax","ay","az","aw","magnitude","getTranslation","mat","getScaling","getRotation","scaling","is1","is2","is3","sm11","sm12","sm13","sm21","sm22","sm23","sm31","sm32","sm33","trace","S","fromRotationTranslationScale","sx","sy","sz","fromRotationTranslationScaleOrigin","oz","out0","out1","out2","out4","out5","out6","out8","out9","out10","frustum","near","far","rl","tb","nf","perspectiveNO","fovy","aspect","perspective","perspectiveZO","perspectiveFromFieldOfView","fov","upTan","downTan","leftTan","rightTan","xScale","yScale","orthoNO","lr","bt","ortho","orthoZO","lookAt","eye","center","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","targetTo","a9","a14","a15","b9","b13","b14","b15","divide","ceil","floor","round","scaleAndAdd","distance","squaredDistance","squaredLength","negate","inverse","normalize","dot","cross","lerp","hermite","factorTimes2","factor1","factor2","factor3","factor4","bezier","inverseFactor","inverseFactorTimesTwo","random","glMatrix.RANDOM","zScale","transformMat4","transformMat3","transformQuat","qx","qy","qz","qw","uvx","uvy","uvz","uuvx","uuvy","uuvz","w2","angle","mag1","mag2","mag","cosine","div","sqrDist","sqrLen","forEach","vec","stride","count","u","A","B","C","E","F","G","H","I","J","v2","v3","v4","s1","s2","ix","iy","iz","iw","setAxisAngle","getAxisAngle","out_axis","getAngle","dotproduct","calculateW","exp","et","ln","pow","slerp","omega","cosom","sinom","scale0","scale1","u1","u2","u3","sqrt1MinusU1","sqrtU1","invDot","conjugate","fromMat3","fTrace","fRoot","fromEuler","halfToRad","cx","cy","cz","vec4.clone","vec4.fromValues","vec4.copy","vec4.set","vec4.add","vec4.scale","vec4.dot","vec4.lerp","vec4.length","vec4.squaredLength","vec4.normalize","vec4.exactEquals","vec4.equals","rotationTo","tmpvec3","vec3.create","xUnitVec3","vec3.fromValues","yUnitVec3","vec3.dot","vec3.cross","vec3.len","vec3.normalize","sqlerp","temp1","temp2","setAxes","matr","mat3.create","view","dq","w1","fromRotationTranslationValues","outer","quat.create","mat4.getRotation","mat4.getTranslation","getReal","quat.copy","getDual","setReal","setDual","ax1","ay1","az1","aw1","bx1","by1","bz1","ax2","ay2","az2","aw2","quat.rotateX","quat.rotateY","quat.rotateZ","rotateByQuatAppend","rotateByQuatPrepend","rotateAroundAxis","axisLength","ax0","ay0","az0","aw0","bw1","bx0","by0","bz0","bw0","quat.dot","mt","sqlen","quat.length","quat.squaredLength","a_dot_b","transformMat2","transformMat2d","p0","p1","sinC","cosC","leftTranslate","transMat","mat3.fromTranslation","mat3.multiply","leftRotate","rotateMat","mat3.fromRotation","leftScale","scaleMat","mat3.fromScaling","leftMultiply","transform","actions","matrix","adjMatrix","graphData","directed","edges","nodeMap","edge","source","sIndex","tIndex","defaultComparator","LinkedListNode","LinkedList","comparator","newNode","deleteNode","currentNode","_c","deletedTail","deletedHead","Queue","removeHead","getNeighbors","nodeId","currentEdges","neighhborsConverter_1","neighhborsConverter_2","neighhborsConverter","getOutEdgesNodeId","getEdgesByNodeId","uniqueId","random1","random2","initCallbacks","callbacks","initiatedCallback","stubCallback","allowTraversalCallback","seen","breadthFirstSearch","startNodeId","originalCallbacks","nodeQueue","previousNode","_loop_1","detectConnectedComponents","allComponents","visited","nodeStack","getComponent","neighbors","neighbor","targetNode","component","detectStrongConnectComponents","inStack","indices","lowLink","_loop_2","targetNodeID","tmpNode","nodes_1","getConnectedComponents","degrees","getInDegree","nodeDegree","getOutDegree","depthFirstSearchRecursive","depthFirstSearch","detectDirectedCycle","cycle","dfsParentMap","unvisitedSet","visitingSet","visitedSet","currentCycleNode","previousCycleNode","firsetUnVisitedKey","dfs","detectAllUndirectedCycle","nodeIds","include","allCycles","components","components_1","root","rootId","parent_1","used","curNode","curNodeId","neighborId","cycleValid","cyclePath","detectAllDirectedCycle","blocked","idx2Node","node2Idx","unblock","thisNode","circuit","start","adjList","closed","getMinComponentAdj","minCompIdx","minIdx","comp","nodeIdx_1","nodeIdx","subgraphNodes","sccs","scc","startNode","detectAllCycles","minVertex","marks","minDis","minNode","dijkstra","weightPropertyName","prevs","nodeNum","minNodeId","relatedEdges","edgeTarget","edgeSource","weight","paths","findAllPaths","foundPaths","prevPaths","prevPaths_1","prePath","findShortestPath","end","allPath","findAllPath","isVisited","child","floydWarshall","adjacentMatrix","getAdjMatrix","labelPropagation","maxIteration","clusters","cid","iid","entry","jid","iter","changed","neighborClusters","neighborWeight","neighborNode","neighborClusterId","maxWeight","bestClusterIds","clusterId","selfClusterIdx","selfCluster","nodeInSelfClusterIdx","randomIdx","bestCluster","state_1","cluster","clusterEdges","clusterEdgeMap","sourceClusterId","targetClusterId","newEdgeId","newEdge","clustersArray","Vector","otherVector","otherArr","cloneArr","getAllProperties","allProperties","DistanceType","getAllKeyValueMap","dataList","involvedKeys","uninvolvedKeys","allKeyValueMap","oneHot","oneHotCode","allValue","isAllNumber","code","keyValue","allKeyValue","valueIndex","subCode","getDistance","otherItem","distanceType","getModularity","ks","param","modularity","clusteri","clusterj","ki","kj","getInertialModularity","allPropertiesWeight","totalProperties","avgProperties","variance","propertiesi","squareEuclideanDistance","squareEuclideanDistanceInfo","propertiesj","inertialModularity","inertial","louvain","threshold","propertyKey","inertialWeight","nodeTypeInfo_1","nodeType","properties","totalModularity","previousModularity","finalNodes","finalClusters","increaseWithinThreshold","sumTot","bestIncrease","commonParam","kiin","selfClusterNodes","scNode","scNodeIdx","removeModurarity","selfClusterNodesAfterRemove","nodeRemove","removeInertialModularity","nodeNeighborIds","neighborNodeId","neighborCluster","clusterNodes","neighborClusterKiin","cNode","cNodeIdx","addModurarity","clusterNodesAfterAdd","nodeAdd","addInertialModularity","increase","previousClusterId_1","neighborClusterSumTot_1","selfClusterSumTot_1","newClusterIdMap","clusterIdx","newId","nodeInfo","iLouvain","kCore","minIndexId","originIndex","getCentroid","centroid","kMeans","defaultClusterInfo","allPropertiesWeightUniq","finalK","centroids","centroidIndexList","randomIndex","maxDistance","maxDistanceNodeIndex","totalDistance","avgDistance","iterations","minDistanceIndex","minDistance","centroidsEqualAvg","totalVector","avgVector","cosineSimilarity","targetItem","targetItemVector","targetNodeNorm2","itemVector","itemNorm2","norm2Product","nodesCosineSimilarity","seedNode","similarNodes","seedNodeIndex","seedNodeProperties","allCosineSimilarity","nodeProperties","cosineSimilarityValue","UnionFind","items","items_1","rootA","rootB","defaultCompare","MinBinaryHeap","compareFn","element","primMST","selectedEdges","currNode","compareWeight","edgeQueue","currEdge","kruskalMST","weightEdges","disjointSet","curEdge","minimumSpanningTree","algo","algos","pageRank","epsilon","linkProb","leakedRank","maxIterations","nodesCount","currentRank","curRanks","prevRanks","outDegree","VACANT_EDGE_ID","VACANT_NODE_ID","VACANT_EDGE_LABEL","VACANT_NODE_LABEL","VACANT_GRAPH_ID","Edge","Node","Graph","edgeIdAutoIncrease","rEdge","DFSedge","fromNode","toNode","fromNodeLabel","edgeLabel","toNodeLabel","DFScode","aLength","bLength","graphId","dfsEdge","fromNodeId","toNodeId","nodeLabel1","nodeLabel2","oldFrom","selfLength","fromNodeIdx","toNodeIdx","History","pdfs","GSpan","graphs","minSupport","minNodeNum","_d","maxNodeNum","_e","_f","_g","verbose","edge1","edge2","history","edge2To","edge2ToEdges","edgeLength","rightmostEdge","minNodeLabel","rightmostEdgeToId","newToNodeLabel","projected","graphMap","pro","minLabel","nodeEdgeNodeLabel","dfsCode","dfsCodeMin","forwardEdges","otherNode","projectIsMin","rmpath","maxToC","backwardRoot","flag","newTo","backwardEdge","minBackwardEdgeLabel","idx_1","forwardRoot","newFrom","forwardPureEdges","pathLength","forwardRmpathEdges","state_2","forwardMinEdgeNodeLabel","support","_loop_3","frequentSize1Subgraphs","nodeLabelCounter","nodeEdgeNodeCounter","nodeLableCounted","nodeLabel","graphNodeKey","counter","nodeEdgeNodeKey","forwardRootEdges","formatGraphs","nodeLabelProp","edgeLabelProp","fGraph","nodeIdxMap","sourceIdx","targetIdx","toGraphDatas","DEFAULT_LABEL_NAME","gSpan","params","formattedGraphs","algoParams","calculator","findKNeighborUnits","spm","units","findKNeighborUnit","unitNodeIdxs","labelCountMap","findNodePairsRandomly","maxNodePairNum","kNeighborUnits","nodePairNumEachNode","nodePairMap","foundNodePairCount","unit","nodePairForICount","outerLoopCount","neighborNum","oidx","innerLoopCount","gap","getIntersectNeighborInducedGraph","neighborUnits","cachedInducedGraphMap","pair","startUnitNodeIds","endUnitNodeIds","endSet","intersect","intersectIdMap","intersectLength","getMatchedCount","structure","sourceLabel","targetLabel","strNodeLabel1","strNodeLabel2","strEdgeLabel","findRepresentStructure","matchedCountMap","structureNum","structures","maxOffset","representClusterType","countMapI","sortedGraphKeys","groupNum","aveIntraDist","aveCounts","graphsInCluster","aveCount","aveIntraPerCluster","graphsNum","graphKey1","graph1Count","graphKey2","aveInterDist","aveCount1","aveCount2","getNodeMaps","nodeLabelMap","getEdgeMaps","edgeMap","edgeLabelMap","sourceNode","getSpmMap","iId","jId","getNDSDist","node1","node2","spDist","cachedNDSMap","cachedInterInducedGraph","interInducedGraph","pairMap","stashPatternNodeLabelDegreeMap","minPatternNodeLabelDegreeMap","neighborLabel","patternNodeMap","patternNodeLabelMap","minPatternNodeLabelDegree","minPatternNodeLabelInDegree","minPatternNodeLabelOutDegree","patternNodeWithLabel","patternNodeDegree","patternNodeInDegree","patternNodeOutDegree","GADDI","patternSpm","spmMap","patternSpmMap","patternEdgeLabelMap","patternSpmSpread","patternKNeighborUnits","nodePairsMap","intGMap","freStructures","subStructureCount","dsG","ndsDist","beginPNode","candidates","maxNodeNumWithSameLabel","pLabel","nodesWithSameLabel","patternIntGraphMap","patternNDSDist","patternNDSDistMap","patternSpDist","patternSpDistBack","label2","patternNodesWithLabel2","patternNodePairMap","nodeWithLabel2","distBack","currentPatternNDSDistArray","patternIntGraph","candidatesNum","_loop_4","graphNeighborUnit","graphNeighborUnitCountMap","patternLabel2Num","prune2Invalid","cNodePairMap","currentNDSDistArray","intGraph","prune3Invalid","candidateGraphs","candidate","lengthNeighborUnit","neighborNodes","unmatched","distToCandidate","maxDistWithLabelInPattern","keyBack","distFromCandidate","maxBackDistWithLabelInPattern","ndsToCandidate","patternKey","minNdsWithLabelInPattern","undirectedLengthsToBeginPNode","undirectedLengthsToBeginPNodeLabelMap","candidateGraphNum","candidateGraph","candidateNodeLabelCountMap","candidateNodeMap","cNodeLabel","candidateEdges","edgeLabelCountMap","pattenrEdgeLabelNum","prunedByEdgeLabel","label_1","candidateEdgeNum","candidateGraphInvalid","_loop_5","patternEdgesWithLabel","edgeMatched","patternEdge","patternSource","patternTarget","lengthsToCandidate","targetId","targetNodeLabel","nLabel","degreeChanged","loopCount","currentCandidateNodeNum","cgNode","nodeInDegree","nodeOutDegree","deleteCondition","cedge","currentLength","cg1","cg1EdgeMap","_loop_6","cg2","cg2EdgeMap","same","Stack","maxStep","detectCycle","index$5","connectedComponent","getDegree","ext.transform","compare","attributeName","isBetween","getLineIntersect","p2","p3","tolerance","D0","D1","kross","sqrKross","invertKross","sqrLen0","sqrLen1","getRectIntersectByPoint","rect","point","points","getCircleIntersectByPoint","circle","getEllipseIntersectByPoint","ellipse","applyMatrix","tag","vector","vec3.transformMat3","invertMatrix","inversedMatrix","mat3.invert","getCircleCenterByPoints","denominator","vx","vy","scaleMatrix","ratio","newRow","group","animate","animateCfg","bbox","dx_1","dy_1","lastX_1","lastY_1","newX_1","newY_1","movedMatrix","scaleXY","onSegment","isPointInPolygon","isHit","dcmp","xValue","intersectBBox","box1","box2","lineIntersectPolygon","lines","line","isIntersect","isPolygonsIntersect","points1","points2","getBBox","xArr","yArr","parseToLines","first","bbox1","bbox2","isIn","lines1","lines2","Line","minX","minY","maxX","maxY","getBBoxBoundLine","direction","bounds","fractionAlongLineA","la","lb","uaT","ubT","uB","ua","ub","itemIntersectByLine","directions","countIntersections","intersections","fractionToLine","testDistance","getPointsCenter","centerX","centerY","points_1","squareDist","pointLineSquareDist","px","py","dotprod","projlenSq","lenSq","isPointsOverlap","pointRectSquareDist","isRight","isBottom","isPointOutside","pointLineDistance","vec2.exactEquals","vec2.normalize","vec2.dot","alpha","lerpArray","subjectColor","backColor","activeFill","nodeMainFill","comboFill","disabledFill","edgeMainStroke","edgeInactiveStroke","edgeDisablesStroke","inactiveStroke","highlightStroke","highlightFill","colorSet","Global$1","letterAspectRatio","PI","sin","cos","SELF_LINK_SIN","SELF_LINK_COS","leftTop","rightBottom","lx","ly","rx","ry","getLoopCfgs","container","containerMatrix","keyShape","loopCfg","Global","startPoint","endPoint","halfOfHeight","halfOfWidth","rstart","rend","sinDeltaStart","cosDeltaStart","sinDeltaEnd","cosDeltaEnd","shapeType","defaultPointPadding","maxPointPadding","pointPadding","swap","startVec","scaleRateStart","scaleRateEnd","startExtendVec","vec2.scale","controlPoint1","endVec","endExtendVec","controlPoint2","getLabelPosition","pathShape","refX","refY","TAN_OFFSET","offsetPoint","normal","traverseUp","traverseTree","traverseTreeUp","getLetterWidth","letter","getTextSize","truncateLabelByLength","plainCombosToTrees","addedMap","modelMap","cd","mappedObj","mappedParent","parent_2","pa","combo","cnode","maxDepth","itemType","oriNodeModel","reconstructTree","trees","subtreeId","newParentId","brothers","subtree","comboChildsMap","foundSubTree","oldParentId","found_1","newParentDepth_1","currentDepth_1","getComboBBox","comboBBox","comboModel","fixSize","fixCollapseSize","useFixSize","halfSize","childItem","childBBox","shouldRefreshEdge","refreshEdge","cloneBesidesImg","clonedObj","key1","obj2","clonedObj2_1","key2","getAnimateCfgWithCallback","animateConfig","animateCfgCallback_1","dataValidation","combos","validated_1","nonNode","comboIds","ids","nonEdges","singleDataValidation","ModeController","modes","mode","behaviors","behaves","behave","BehaviorInstance","modeBehaviors","current","isAdd","currentMode","newCfg","behaviorSet","length_2","SPACES","PATH_COMMAND","PATH_VALUES","parsePathString","pathString","paramCounts","catmullRomToBezier","crp","iLen","ellipsePath","pathToAbsolute","pathArray","mx","my","pa0","dots","crz","ii","jj","kk","l2c","q2c","_13","_23","a2c","large_arc_flag","sweep_flag","recursive","_120","f1","f2","X","Y","rx2","ry2","df","f2old","x2old","y2old","c1","c2","hx","hy","m1","m2","m3","m4","newres","pathToCurve","path2","attrs2","pcoms1","pcoms2","pfirst","pcom","processPath","nx","ny","fixArc","pp","pi","fixM","path1","seg","seg2","seglen","seg2len","p2s","parsePathArray","base3","p4","t1","t2","bezlen","x3","y3","x4","y4","Tvalues","Cvalues","sum","ct","xbase","ybase","comb","curveDim","tvalues","b2ac","sqrtb2ac","jlen","px2","py2","isPointInsideBBox","rectPath","isBBoxIntersect","bezierBBox","p1x","p1y","c1x","c1y","c2x","c2y","p2x","p2y","findDotsAtSegment","t13","t12","t3","interHelper","bez1","bez2","justCount","l1","l2","n2","dots1","dots2","di","di1","dj","dj1","ci","cj","is","interPathHelper","x1m","y1m","x2m","y2m","pj","intr","intersection","decasteljau","recurse","middlePoints","splitCurve","segments","leftSegments","rt","split","segment","cmd","splitSegment","temp","fillPath","sourceLen","targetLen","segmentsToFill","filled","obj1","getMinDiff","del","modify","levenshteinDistance","sourceSegment","targetSegment","fillPathByDiff","diffMatrix","changes","minPos","diff","_splitPoints","former","formerEnd","_getSegmentPoints","formatPath","fromPath","toPath","GraphEvent","removeFromArray","isParent","shape","isAllowCapture","Base","_super","defaultCfg","EE","BrowserInfo","version","os","NodeInfo","SearchBotDeviceInfo","bot","BotInfo","ReactNativeInfo","SEARCHBOX_UA_REGEX","SEARCHBOT_OS_REGEX","REQUIRED_VERSION_PARTS","userAgentRules","operatingSystemRules","detect","userAgent","parseUserAgent","getNodeVersion","matchUserAgent","matched","browser","regex","uaMatch","matchedRule","versionParts","createVersionParts","detectOS","searchBotMatch","isNode","output","multiplyMatrix","multiplyVec2","MATRIX","CLONE_CFGS","RESERVED_PORPS","DELEGATION_SPLIT","_cloneArrayAttr","getFormatFromAttrs","toAttrs","fromAttrs","getFormatToAttrs","checkExistedAttrs","animations","animation","startTime","duration","Element","changeType","clip","originValue","targetAttrs","applyTo","zIndex","destroy","totalMatrix","currentMatrix","parentMatrix","clipCfg","canvas","clipShape","ShapeBase","Cons","originAttrs","cons","cfgName","destroyed","timeline","easing","noop","onFrame","pauseCallback","resumeCallback","formatToAttrs","toEnd","pauseTime","eventObj","relativeShape","name_1","subName","this_1","eventName","translateX","translateY","newMatrix","targetX","targetY","ratioX","ratioY","SHAPE_MAP","INDEX","setCanvas","setTimeline","removeChild","getComparer","Container","childMinX","childMaxX","childMinY","childMaxY","preTotalMatrix","groupClass","tmpCfg","TmpGroupClass","preParent","className","frame","interval","pokeDelay","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","setFrame","clearNow","Timer","timer","time","sleep","timerFlush","wake","nap","poke","t0","define","constructor","factory","definition","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","channels","color_formatHex","color_formatHsl","color_formatRgb","hslConvert","format","rgbn","Rgb","rgba","hsla","rgbConvert","rgb","opacity","rgb_formatHex","rgb_formatRgb","hex","Hsl","hsl","hsl2rgb","constant$2","linear","exponential","gamma","nogamma","constant","rgbGamma","colorRgb","numberArray","isNumberArray","interpolateArray","genericArray","nb","na","date","number$1","object$1","reA","reB","one","string$1","bi","am","bm","bs","number","interpolate","string","quadIn","quadOut","quadInOut","cubicIn","cubicOut","cubicInOut","exponent","polyIn","custom","polyOut","polyInOut","halfPi","sinIn","sinOut","sinInOut","tpmt","expIn","expOut","expInOut","circleIn","circleOut","circleInOut","bounceIn","bounceOut","bounceInOut","overshoot","backIn","backOut","backInOut","tau","amplitude","period","elasticIn","elasticOut","elasticInOut","EASING_MAP","getEasing","d3Ease","isColorProp","isGradientColor","IDENTITY_MATRIX","_update","cProps","interf","PathUtil.parsePathString","PathUtil.fillPathByDiff","PathUtil.formatPath","toPathPoint","fromPathPoint","cPathPoint","matrixFn","update","elapsed","easeFn","Timeline","isFinished","d3Timer.timer","autoDraw","animator","CLICK_OFFSET","LEFT_BTN_CODE","EVENTS","emitTargetEvent","bubbleEvent","isOverEvent","EventController","pointInfo","fromShape","toShape","clientPoint","leaveCanvas","preShape","isCanvasEmit","draggingShape","mousedownPoint","mousedownShape","timeWindow","PX_SUFFIX","isFirefox","Canvas","eventController","supportCSSTransform","clientX","clientY","clientInfo","AbstractGroup","AbstractShape","canvasBBox","topLeft","topRight","bottomLeft","bottomRight","shadowBlur","shadowOffsetX","shadowOffsetY","shadowLeft","shadowRight","shadowTop","shadowBottom","startArrowShape","endArrowShape","inBBox","register","getMethod","getBBoxByArray","piMod","LineUtil","lengthSquare","nearestPoint","tCallback","segNum","increaseRate","_t","d1","d2","snapLength","totalLength","nextX","nextY","quadraticAt","onet","extrema","derivativeAt","divideQuadratic","xt","yt","quadraticLength","iterationCount","quadratics","QuadUtil","xExtrema","yExtrema","cubicAt","extremas","discSqrt","disc","divideCubic","c3","c12","c23","cubicLength","cubics","CubicUtil","copysign","absv","ellipse$1","relativeX","relativeY","squareA","squareB","nearestX","nearestY","ex","ey","rx1","ry1","delta_c","delta_t","tangentAngle","derivativeXAt","xRotation","startAngle","endAngle","derivativeYAt","xAt","yAt","getPoint","EllipseArcUtil","xDim","xs","xAngle","yDim","ys","yAngle","relativeVector","relativePoint","analyzePoints","lengthOfSegment","pointAtSegments","startRatio","currentRatio","localRatio","angleAtSegments","distanceAtSegment","nextPoint","distance_1","PolylineUtil","mergeBBox","mergeArrowBBox","startArrowBBox","endArrowBBox","polyline","Util.getBBoxByArray","polygon","offScreenCtx","getOffScreenContext","getTextHeight","lineCount","spaceingY","getLineSpaceing","getTextWidth","textArr","subText","measureWidth","assembleFont","textAlign","textBaseline","regexTags","regexDot","parsePath","smoothBezier","smooth","isLoop","constraint","cps","hasConstraint","prevPoint","nextCp0","cp1","cp0","vec2.min","vec2.max","prevIdx","vec2.sub","d0","vec2.distance","vec2.add","catmullRom2Bezier","pointList","controlPointList","cp2","REGEX_MD","toSymmetry","needProcess","preParams","upCmd","symetricT","symetricS","vMag","vRatio","vAngle","isSamePoint","point1","point2","getArcParams","arcFlag","sweepFlag","xp","yp","lambda","cxp","cyp","theta","dTheta","getSegments","currentPoint","nextParams","startMovePoint","lastStartMovePointIndex","command","arcParams","prePoint","cp","preSegment","_h","dx1","dy1","dx2","dy2","getPathBox","lineWidth","segmentsWithAngle","extra","getExtraFromSegmentWithAngle","currentAndPre","currentAndNext","preAndNext","currentAngle","stroke","path2Segments","G6GraphEvent","formatPadding","intPadding","cloneEvent","isViewportChanged","MATRIX_LEN","ORIGIN_MATRIX","isNaN","calculationItemsBBox","minx","maxx","miny","maxy","processParallelEdges","offsetDiff","multiEdgeType","singleEdgeType","loopEdgeType","cod","loopPosition","tags","reverses","sourceTarget","sedge","dst","arcEdges","sign","ext","gl_matrix_1","require$$0","transform_1","angleTo","direct","ang","angleLargeThanPI","vertical","ViewController","minX_1","minY_1","maxX_1","maxY_1","transMinX","transMinY","transMaxX","transMaxY","viewCenter","groupCenter","startMatrix","zoomToFit","translatedMatrix","animationConfig_1","minZoom","maxZoom","realRatio","zoomedMatrix","animationConfig","minX_2","minY_2","maxX_2","maxY_2","rules","onlyOutOfViewPort","ratioRule","minX_3","minY_3","maxX_3","maxY_3","wRatio","hRatio","initZoomRatio","endZoom","modelCenter","viewportMatrix","canvasX","canvasY","canvasPoint","sourceMatrix","targetMatrix","itemBBox","plugins","plugin","looseJSONParse","safeParse","firstAttempt","tail","objectStack","syntaxStack","isLastPair","syntaxes","syntax","getValueStore","nowChar","isInString","isLastTranslate","isInObject","isInArray","isWaitingValue","tempArr","keyConvert","xmlDataRenderer","xml","get","parseXML","tagName","childrenBBox","shapeHeight","shapeWidth","generateTarget","lastOffset","defaultBbox","marginTop","compareTwoTarget","nowTarget","formerTarget","formerChildren","nowChildren","formerKeys","nowKeys","createNodeFromXML","gen","compileXML","rawStr","xmlParser","resultTarget","keyshape","renderTarget","rest","newTarget","lastTarget","diffResult","addShape","delShape","targetShape","originAttr","ucfirst","ShapeFactoryBase","updateType","ShapeFramework","defaultAnchorPoints","anchorPoints","Shape","factoryType","factoryBase","shapeFactory","nodeDefinition","extendShapeType","shapeObj","autoNodeDefinition","jsx","extendShape","edgeDefinition","comboDefinition","CACHE_BBOX","CACHE_CANVAS_BBOX","ItemBase","model","styles","visible","keyShapeName","styles_1","currentStatesStyle_1","name_2","shapeAttrs","shapeStateStyle_1","shapeAttrs_1","keyShapeStateStyles_1","styleKey","subStyle","originStyles","keyShapeStyle","shapeName","states","currentShape","styles_2","newModel","stateStyle","stateName","filterStateName","newStates","filterStates","originStates","enableOptimize","oriVisible","cfgVisible","originPosition","stateStyles","updateCfg","enable","END_MAP","ITEM_NAME_SUFFIX","POINT_NAME_SUFFIX","ANCHOR_NAME_SUFFIX","pointName","itemName","preItem","controlPoints","anchorName","anchorIndex","oppositeName","sourcePoint","targetPoint","linkCenter","sourceItem","Item","CACHE_ANCHOR_POINTS","curPoint","dis","neighborsConverter_1","neighborsConverter_2","neighborsConverter","intersectPoint","linkPoint","bbox_1","shapeCfg","pointArr","existX","existY","updateLabel","bboxAffectedStyleKeys","beforeAttrs","bboxAffectedStyleBefore","afterAttrs","CACHE_SIZE","Combo","modelSize","modelFixSize","useModelSize","cacheBBox","oriX","oriY","cacheSize","NODE","EDGE","VEDGE","COMBO","CFG_PREFIX","MAPPER_SUFFIX","STATE_SUFFIX","ItemController","throttle","edgeToBeUpdateMap","edgeValues","vType","upperType","defaultModel","mapper","mappedModel_1","bboxX","bboxY","comboGroup","comboModel_1","mappedModel","edges_1","comboAnimate","followCombo","comboX","comboY","combEdges","comboId","kids","comboTrees","subTree","childModel","edgeSet","itemModel","vitems","vindex","itemId","itemMap","brothers_1","ctree","bidx","parentId","comboInTree_1","found_2","currentItem","comboModels","id_1","children_1","found_3","StateController","enabled","graphStates","itemInState","stateNames","getSpline","spliePath","getControlPoint","tangent","perpendicular","pointsToPolygon","pathToPoints","getClosedSpline","second","lastSecond","closedPath","cp1x","cp1y","cp2x","cp2y","vecScaleTo","unitNormal","nLength","vecFrom","roundedHull","polyPoints","roundedHull1","roundedHull2","offsetVector","invOffsetVector","segmentIndex","arcData","pathFragment","paddedHull","pointCount","smoothHull1","smoothHull2","extensionVec","extension0","extension1","tangentHalfLength","controlDelta","invControlDelta","control0","control1","control3","hullPoints","pNext","priorIndex","getStarPath","outerR","innerR","genConvexHull","pointMap","lower","upper","strictHull","defaultOps","MarchingSquares","contour","potentialArea","marched","getVal","getState","squareVal","doMarch","xPos","yPos","prevX","prevY","initGridCells","pixelGroupSize","scaleWidth","scaleHeight","gridCells","pickBestNeighbor","nonMembers","closestNeighbour","minCost","neighbourItem","itemP","neighbourItemP","directLine","numberObstacles","_item","getIntersectItem","closestItem","computeRoute","maxRoutingIterations","morphBuffer","checkedLines","linesToCheck","hasIntersection","pointExists","isPointInNonMembers","_nonMembers","_nonMembers_1","itemContour","intersections_1","testReroute","isFirst","tempMorphBuffer","virtualNode","rerouteLine","exist","pointInside","getRoute","optimalNeighbor","mergeLines","finalRoute","line1","line2","mergeLine","genBubbleSet","members","ops","virtualEdges","activeRegion","getActiveRregion","hull","fillPotentialArea","marchedPath","isContourValid","members_1","bboxes","bboxes_1","pos2GridIx","gridIx","gridIx2Pos","nodeInfA","edgeInfA","getAffectedRegion","thresholdR","startX","startY","endX","endY","addItemInfluence","influenceFactor","tempX","tempY","distanceSq","dr","addEdgeInfluence","minDistanceSq","mdr","buffer","wrapNormal","topIntersect","leftIntersect","bottomIntersect","rightIntersect","cornerPos","totalArea","calcHalfArea","intersect1","intersect2","topArea","leftArea","Hull","nodeSize","nodeItem","shapePoints","shapeBBox","AbstractGraph","comboSorted","depthMap","dataDepthMap","cTree","edgeItem","sourceDepth","targetDepth","depth","viewController","modeController","itemController","stateController","edgeGroup","nodeGroup","delegateGroup","nodeFn","edgeFn","comboFn","additionalFilter","currentZoom","targetZoom","finalRatio","failed","aniMatrix_1","initialRatio_1","targetRatio_1","toRatio","isAnimate","curAniamteCfg","before","after","auto","deletedModel","newComboTrees","itemMap_1","foundParent_1","newCombo","parentCombo","itemMap_2","foundParent_2","foundNode_1","cloneNode","sortCombo","currentComboSorted","addedModel","returnItems","returnItem","stackEnabled","unupdatedModel","afterModel","layoutController","success","nodesArr","edgesArr","models","propsData","localRefresh","combosData","comboItems","combosLength","relayoutAtChangeData","childrenIds","comboConfig","shouldStack","childrenParentCache","childId","childType","childrenIdsSet","pulledComboTreesById","treeNode","parentTreeNode","parentItem","newChildrenParent","elementId","cItem","comboItem","treeToBeUncombo","edgeIds","edgeId","childrenParentCache_1","childNewParent_1","uItem","valid_1","itemSubTree_1","beforeData","afterData","vedges","vedge","referComboModel","toNodes","updatedNodes","updateItems","sourceModel","targetModel","avoidEmit","align","alignPoint","toPoint_1","forceTypes","bboxPoint","oriLayoutCfg","layoutCfg","cNodesCombos","found","addedVEdgeMap","isVEdge","otherEnd","otherEndIsSource","otherEndModel","otherEndPId","otherEndCId","otherEndParentId","otherEndId","vEdgeInfo","edgeInfo","sourceId","selfEnd","selfEndModel","selfEndPId","selfEndCId","selfEndParentId","selfEndId","vedgeId","parentModel","refresh","nodeDegrees","stackType","stackData","currentAdjMatrix","getAdjacentMatrix","currentShourtestPathMatrix","hullMap","hullId","hullInstance","hulls","CLS_SHAPE_SUFFIX","CLS_LABEL_SUFFIX","ARROWS","SHAPE_DEFAULT_ATTRS","PATH_SHAPE_DEFAULT_ATTRS","SHAPES_DEFAULT_ATTRS","CLS_LABEL_BG_SUFFIX","shapeBase","defaultLabelCfg","labelCfg","labelStyle","labelBBox","labelMatrix","labelBgClassname","calculateStyle","attrName","defaultStyle","shapeStyle","subShape","labelClassName","ele","labelBg","cfgStyle","rotateMatrix","calculateBgStyle","newLabel","shapeStateStyle","itemStateStyle","keptAttrs","enableStatesStyle","originStyle_1","keyShapeName_1","keyShapeStyles_1","filtetDisableStatesStyle","subShape_1","subShapeStyles_1","value_1","value_2","value_3","enableStyle","originstyles","keyShapeSetted","originKey","value_4","modelStateStyle","singleNode","labelMaxLength","labelPosition","backgroundStyle","backgroundWidth","backgroundHeight","defaultLinkPoints","markLeft","markRight","markTop","markBottom","currentLinkPoints","linkPoints","markFill","markStroke","borderWidth","markSize","name_3","name_4","hasIcon","icon","iconShape","iconConfig","name_5","labelShape","singleNodeDef","CLS_SHAPE","revertAlign","singleEdge","strokeStyle","currentAttr","previousStyle","routeCfg","pointPercent","offsetX","offsetY","autoRotate","offsetStyle","singleEdgeDef","midPoint","arcPoint","edgeAngle","innerPoint","innerPoint1","innerPoint2","yDist","curveOffset","xDist","singleCombo","collapsedSubstituteIcon","substituteIconConfig","collapsedIconShape","iconShapeExist","sizeAttr","itemAnimate","singleComboDef","itemCacheSize","rectX","rectY","shapeClassName","Arrow$1","begin","tWidth","tLength","rWidth","rLength","rectBegin","Marker$2","defaultSubjectColors","isForce","layoutType","Util","BaseUtil","GraphicUtil","PathUtil","MathUtil","ColorUtil","LayoutUtil","mat3","LayoutController","pipes","pipe","preHasPipes","currentHasPipes","isDefaultAnimateLayout","forceAnimate","disableTriggerLayout","otherCfgs","layoutMethods","destroyedLayoutTypes","layoutMethod","hiddenNodes","hiddenEdges","comboEdges","hiddenCombos","nodeItems","edgeItems","nodeLength","comboLength","reloadData","currentCfg","relayoutPromise","nodesFilter","edegsFilter","nodesMap_1","acc","cur","graphGroupNodes","layoutNodes","groupNodes","meanCenter","nodesToInit","horiNum","vertiNum","horiGap","vertiGap","beginX","beginY","registerNode","registerEdge","registerCombo","registerBehavior","BaseGlobal","ALGORITHM","MESSAGE","_default","linkedList","queue","_linkedList","_interopRequireDefault","util","bfs","_queue","_util","require$$1","degree_1","_dfs","_connectedComponent","_interopRequireWildcard","require$$2","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","newObj","hasPropertyDescriptor","dijkstra_1","_tslib","_util2","findPath","_dijkstra","floydWarshall_1","_adjacentMatrix","labelPropagation_1","secondReg","dateReg","_time","getAllSortProperties","propertyKeyInfo","sortKeys","processProperty","propertyKeys","getPropertyWeight","types","dataPreprocessing","_types","_vector","louvain_1","_nodeProperties","require$$3","_dataPreprocessing","require$$4","unionFind","binaryHeap","mts","_unionFind","_binaryHeap","pageRank_1","_degree","struct","AUTO_EDGE_ID","gSpan_1","_struct","gaddi","_floydWarshall","_gSpan","exports","_gaddi","_bfs","_detectCycle","_findPath","_labelPropagation","_louvain","_mts","_pageRank","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","index_worker","algorithm","_constant","_algorithmType","createWorker_1","_index","createWorker","worker","workers","_createWorker","getAdjMatrixAsync","connectedComponentAsync","getDegreeAsync","getInDegreeAsync","getOutDegreeAsync","detectCycleAsync","detectAllCyclesAsync","detectAllDirectedCycleAsync","detectAllUndirectedCycleAsync","dijkstraAsync","findAllPathAsync","findShortestPathAsync","floydWarshallAsync","labelPropagationAsync","louvainAsync","minimumSpanningTreeAsync","pageRankAsync","getNeighborsAsync","GADDIAsync","detectDirectedCycleAsync","getPixelRatio","inBox","intersectRect","mergeRegion","region1","region2","regexLG","regexRG","regexPR","regexColorStop","addStop","steps","gradient","itemArr","parseLineGradient","gradientStr","tanTheta","tanTheta2","parseRadialGradient","fx","fy","fr","colors","parsePattern","patternStr","onload","parseStyle","atan2","_addDefaultArrow","isStart","arrowShape","Path","_addCustomizedArrow","startArrow","endArrow","arrowAttrs","arrowFill","arrowStroke","arrowLineWidth","restAttrs","getShortenOffset","addStartArrow","addEndArrow","SHAPE_ATTRS_MAP","applyAttrsToContext","drawChildren","region","checkRefresh","refreshElements","setChildrenRefresh","checkChildrenRefresh","checkElementRefresh","clearChanged","isAllow","drawPath","arcParamsCache","ArrowUtil.getShortenOffset","lastPath","scaleX","scaleY","refreshElement","getRefreshRegion","cacheBox","validCache","validBBox","getMergedRegion","minXArr","minYArr","maxXArr","maxYArr","mergeView","viewRegion","Group","viewRange","allowDraw","bboxMethod","getBBoxMethod","halfLineWidth","isInView","strokeOpacity","fillOpacity","isStroke","isFill","Circle","absDistance","ellipseDistance","squareX","squareY","Ellipse","halfLineWith","isCanvas","dom","ImageShape","image_1","swidth","sheight","inLine","halfWidth","ArrowUtil.addStartArrow","ArrowUtil.addEndArrow","startArrowDistance","endArrowDistance","Symbols","diffY","Marker","symbol","path2Absolute","paramsCache","isPointInPath","isInPolygon","arc","hasArc","isPointInStroke","qDistance","cDistance","inArc","extractPolygons","polygons","polylines","isInPolygons","extractResutl","tCache","subt","curve","nextSeg","tempLength","segmentT","segmentL","segmentN","inPolyline","isClose","Polygon","PolyLine","inRect","rectWithRadius","Rect","inRectWithRadius","Text","subY","invertFromMatrix","getRefXY","preTest","getShape","curShape","pixelRatio","clipView","drawFrame","clearAnimationFrame","AbstractCanvas","SHAPE_TO_TAGS","SVG_ATTR_MAP","createSVGElement","createDom","parentNode","sortDom","sorter","childList","toArray","fragment","moveTo","targetIndex","siblings","currentIndex","targetNext","setShadow","setTransform","setClip","parentChildren","isClipShape","clipPathEl","defsEl","fill","fillStyle","shadowColor","lineAppendWidth","Dom","Image","symbolsFactory","Polyline","completed","pathRelatedAttrs","LETTER_SPACING","BASELINE_MAP","BASELINE_MAP_FOR_FIREFOX","ANCHOR_MAP","baseline","textLen_1","arr_1","stops","Gradient","ATTR_MAP","SHADOW_DIMENSION","Shadow","config","Arrow","Clip","shapeEl","Pattern","Defs","arrow","shadow","addEventListener","eventType","TABLE","TABLE_TR","FRAGMENT_REG","CONTAINERS","initConstants","modifyCSS","css","colorName","isArrayish","concat","slice","swizzle","simpleSwizzleModule","colorNames","reverseNames","cs","colorStringModule","abbr","per","keyword","hexAlpha","i2","hwb","hexDouble","hwba","cssKeywords","reverseKeywords","convert","conversionsModule","labels","delta","rdif","gdif","bdif","diffc","comparativeDistance","reversed","currentClosestDistance","currentClosestKeyword","xyz","smin","lmin","sv","hsv","hi","vmin","sl","wh","bl","cmyk","lab","hr","lch","ansi","mult","rem","integer","colorString","char","chroma","grayscale","hue","hcg","pure","mg","apple","gray","conversions","buildGraph","deriveBFS","fromModel","adjacents","adjacent","link","wrapConversion","toModel","route","conversion","wrapRaw","wrappedFn","wrapRounded","routes","routeModels","colorConvert","_slice","skippedModels","hashedModelKeys","limiters","newArr","zeroArray","hashedKeys","limit","places","roundToPlace","getset","maxfn","lum","chan","color2","lum1","lum2","contrastRatio","yiq","mixinColor","color1","newAlpha","assertArray","roundTo","channel","modifier","trimLeft","trimRight","tinycolor","opts","inputToRGB","RsRGB","GsRGB","BsRGB","R","boundAlpha","rgbToHsv","rgbToHsl","allow3Char","rgbToHex","allow4Char","rgbaToHex","bound01","hexNames","secondColor","hex8String","rgbaToArgbHex","secondHex8String","gradientType","formatSet","formattedString","hasAlpha","needsAlphaFormat","_lighten","_brighten","_darken","_desaturate","_saturate","_greyscale","_spin","_analogous","_complement","_monochromatic","_splitcomplement","polyad","newColor","convertToPercentage","ok","stringInputToObject","isValidCSSUnit","rgbToRgb","hsvToRgb","hslToRgb","hue2rgb","pad2","convertDecimalToHex","amount","clamp01","slices","part","ret","modification","rgb1","rgb2","wcag2","readability","wcag2Parms","validateWCAG2Parms","baseColor","colorList","bestColor","bestScore","includeFallbackColors","flip","flipped","isOnePointZero","processPercent","isPercentage","parseIntFromHex","convertHexToDecimal","matchers","CSS_INTEGER","CSS_NUMBER","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","parms","hueStep","saturationStep","saturationStep2","brightnessStep1","brightnessStep2","lightColorCount","darkColorCount","darkColorMap","getHue","light","getSaturation","saturation","getValue","generate","patterns","pColor","_hsv","_colorString","_ref","darkColorString","presetPrimaryColors","presetPalettes","presetDarkPalettes","mixColor","frontColor","frontAlpha","bc","fc","getColorsWithDefaultTheme","disableColor","subjectColor005","subjectColor01","subjectColor02","subjectColor04","disableColor002","disableColor005","disableColor01","disableColor02","disableColor03","paletteFromSubject","subjectHex","subjectIdx","deeperSubject","getColorsWithDarkTheme","subjectColor03","subjectColor06","subjectColor08","disableColor025","disableColor04","disableColor05","getColorsWithSubjectColor","theme","getColorSetsBySubjectColors","subjectColors","sets","sColor","cloneGElement","vElement","applyCloneClip","clonedElement","clonedChild","clonedType","extendEvents","canvasHandler","originHandler","wheelHandler","itemShape","AbstractEvent","cacheStringFunction","hit","camelizeRE","toNumber","this","cp_1","cp_2","array_1","number_1","object_1","getEdgeTerminal","terminal","getDegreeMap","degreesMap","getLayoutBBox","getAvgNodePosition","totalNodes","getCoreNode","getRelativeNodeIds","coreNode","relativeNodes","getSameTypeNodes","nodeClusterBy","typeName","sameTypeNodes","getCoreNodeAndRelativeLeafNodes","inDegree","relativeLeafNodes","sameTypeLeafNodes","_1","getFunc","resultFunc","getFuncByUnknownType","resultIsNumber","registy","base_1","util_1","registerLayout","layoutOverride","GLayout","unRegisterLayout","getLayoutByName","grid","GridLayout","condense","preventOverlapPadding","preventOverlap","paramNodeSpacing","paramNodeSize","values_1","oRows","oCols","sm","lg","nodeSpacing_1","nodeSize_1","nodeW","nodeH","rcPos","pos","rows","cols","col","cellWidth","cellHeight","RandomLayout","layoutScale","gForce","proccessToFunc","defaultV","GForceLayout","nodeSizeFunc","nodeSpacingFunc_1","mass","workerEnabled","minMovement","previousPos","iter_1","movement","accArray","velArray","stepInterval","getMass","factor","coulombDisScale","collideStrength","nodeStrength","ni","massi","nj","vecX","vecY","lengthSqr","vecLength","nVecLength","direX","direY","massj","paramOverlap","linkDistance","edgeStrength","massSource","massTarget","defaultGravity","gravity","customCenterOpt","vLength","param2","distX","distY","tree_add","leaf","xm","ym","addAll","tree_cover","tree_data","tree_extent","Quad$1","tree_find","quads","Quad","tree_remove","retainer","removeAll","tree_root","tree_size","tree_visit","tree_visitAfter","defaultX","tree_x","defaultY","tree_y","quadtree","Quadtree","leaf_copy","treeProto","tree_addAll","tree_removeAll","ForceNBody","d3_quadtree_1","theta2","forceNBody","coulombDisScale2","weightParam","mappedNode","nodeData","accumulate","computeForce","quad","accWeight","accX","accY","apply","len2","len3","force2","ForceNBody_1","Force2Layout","leafCluster","clustering","propsClusterNodeStrength","getClusterNodeStrength","centripetalOptions","sameTypeLeafMap","relativeNodesType_1","centerNode","centerNodeInfo_1","single","others","defSpringLen","massWeight","relatedEdges_1","maxIter","silence","monitor","energy","speed2","edgeInfos","sourceMassRatio","targetMassRatio","disX","disY","forceCenter","strength","centriCenter","centriX","centriY","centerStrength","singleStrength","leafStrength","othersStrength","defSideCoe","currentMinY","currentMaxY","sideCoe","damping","maxSpeed","distanceThresholdMode","distanceMagnitude","force","jiggle","collide","radii","xi","yi","ri","ri2","prepare","rj","initialize","_nodes","_random","nodeById","links","defaultStrength","strengths","distances","bias","initializeStrength","initializeDistance","dispatch","Dispatch","parseTypenames","typenames","typename","T","that","lcg","initialRadius","initialAngle","simulation","alphaMin","alphaDecay","alphaTarget","velocityDecay","forces","stepper","tick","initializeNodes","initializeForce","closest","manyBody","distanceMin2","distanceMax2","radial$2","radiuses","x$1","y$1","forceInABox_1","d3Force","forceInABox","forceNodeSize","forceCharge","forceLinkDistance","forceLinkStrength","nodesMap","foci","templateNodes","templateForce","template","enableGrouping","getFocisFromTemplate","initializeWithForce","net","getGroupsGraph","gnodes","glinks","dNodes","clustersList","clustersCounts","clustersLinks","computeClustersNodeCounts","computeClustersLinkCounts","sourceTerminal","targetTerminal","tmpCount","dClusterLinks","clusterLinks","getLinkKey","entries","sourceID","targetID","genNodesMap","setTemplate","setGroupBy","setEnableGrouping","setStrength","setCenterX","setCenterY","setNodes","setLinks","setForceNodeSize","setForceCharge","setForceLinkDistance","setForceLinkStrength","setOffset","constants","force_in_a_box_1","constants_1","ForceLayout","expectKeys","edgeForce","nodeForce","clusterForce","isInWorker","totalTicks","getSimulationTicks","currentTick","nodeSpacing","nodeSpacingFunc","larger","radius_1","radius_2","totalTicksFloat","circular","initHierarchy","sourceChildren","targetChildren","connect","compareDegree","aDegree","bDegree","CircularLayout","startRadius","endRadius","divisions","angleRatio","ordering","clockwise","angleStep","maxNodeSize_1","nSize","astep","divN","cnodes","orderedCNodes","resNodes","pickFlags","foundChild","childIdx","orderedNodes","list","filterOutLinks","unlink","List","shortcut","strs","sentinel","GraphEnum","incrementOrInitEntry","decrementOrRemoveEntry","edgeArgsToId","isDirected","v_","w_","edgeArgsToObj","strV","strW","edgeObj","edgeObjToId","nodeToJSON","edgeToJSON","write","json","read","ownKeys","enumerableOnly","symbols","sym","_objectSpread","defaultOption","newDefault","_this$inEdgesMap$get","_this$outEdgesMap$get","_this$parentMap","targetParent","_this$parentMap2","_this$childrenMap","realParent","checkNode","realParentChilren","_this$childrenMap2","preds","succs","_this$predecessors","_this$neighbors","_this$successors","multigraph","compound","copyGraph","findParent","inV","outW","_this$inEdges","inEdges","outEdges","resultOptions","nodesLabelMap","defaultNodeLabelFn","isCompound","parentMap","childrenMap","inEdgesMap","outEdgesMap","predecessorsMap","successorsMap","_childrenMap$get","_this2","cleanEdge","_this$parentMap3","_this$children","_this$childrenMap3","inE","outE","_this$inEdgesMap$get2","_this$outEdgesMap$get2","_edgeArgsToObj","_get","property","_superPropBase","_getPrototypeOf","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","_assertThisInitialized","GraphWithEvent","_Graph","_len","_key","_len2","_key2","PriorityQueue","keyIndice","originI","originJ","priority","_arr$parent","largest","weightFn","parents","pq","updateNeighbors","pri","edgeWeight","_graph$nodeEdges","resultComponents","componentsArr","waitingList","_graph$successors","_graph$predecessors","doDFS","postorder","navigator","order","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arr","_n","_s","err","DEFAULT_WEIGHT_FUNC","runDijkstra","vEntry","wEntry","_ref2","dijkstraAll","tarjan","_visited$get","_wEntry","cmpt","findCycles","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","Parent","CycleException","_Error","topsort","isAcyclic","preorder","runFloydWarshall","nodek","rowK","nodei","rowI","nodej","ik","ij","altDistance","containSameNodes","aGraph","bGraph","aNodes","aNode","containSameEdges","aEdges","aEdge","getSameNodes","sameNodes","getSameEdges","sameEdges","isGraphOptionSame","containAllSameNodes","containAllSameEdges","isGraphSame","isGraphContainsAnother","originGraph","targetGraph","isGraph","isSimpleGraph","edgeStack","_sort","_sort2","isNullGraph","hasSelfLoop","isGraphComplement","nodeCount","getGraphComplement","complementGraph","greedyFas","list_1","graphlib_1","StateGraph","DEFAULT_WEIGHT_FN","greedyFAS","buildState","doGreedyFAS","buckets","zeroIdx","sinks","removeNode","collectPredecessors","uEntry","assignBucket","fasGraph","maxIn","maxOut","prevWeight","rangeMax","acyclic","greedy_fas_1","run","fas","dfsFAS","undo","forwardName","graph_1","safeSort","valueA","valueB","addDummyNode","simplify","simplified","simpleLabel","asNonCompoundGraph","zipObject","successorWeights","weightsMap","sucs","predecessorWeights","weightMap","buildLayerMatrix","layeringNodes","rankMax","rank","va","vb","normalizeRanks","nodeRanks","removeEmptyRanks","layers","nodeRankFactor","vs","addBorderNode","maxRank","partition","collection","notime","minBy","valA","valB","normalizeEdge","vRank","wRank","labelRank","dummy","origLabel","currentV","longestPath","longestPathWithLayer","minRank","forwardVisited","dfsForward","nextRank","currRank","slack","feasibleTree_1","util_2","feasibleTree","tightTree","findMinSlackEdge","shiftRanks","edgeV","feasibleTreeWithLayer","tightTreeWithLayer","feasible_tree_1","networkSimplex","og","initCutValues","assignCutValue","childLab","calcCutValue","childIsTail","graphEdge","cutValue","isOutEdge","pointsToHead","otherWeight","isTreeEdge","otherCutValue","initLowLimValues","dfsAssignLowLim","nextLim","low","useNextLim","leaveEdge","enterEdge","vLabel","wLabel","tailLabel","isDescendant","exchangeEdges","updateRanks","rootLabel","rank_1","network_simplex_1","networkSimplexRanker","tightTreeRanker","longestPathRanker","parentDummyChains_1","dfsBothOrder","lim","postorderNums","vPath","wPath","lca","parentDummyChains","startV","pathData","pathIdx","pathV","ascending","nestingGraph","depths","treeDepths","nodeSep","sumWeights","childTop","childBottom","thisWeight","minlen","cleanup","graphLabel","addBorderSegments_1","addBorderSegments","sg","sgNode","coordinateSystem","adjust","rankDir","swapWidthHeight","reverseY","swapXY","swapWidthHeightOne","reverseYOne","swapXYOne","rgb2arr","toHex","x16Value","arr2rgb","contains$1","difference$1","isArray$1","keys$1","isObjectLike$5","isPlainObject$2","firstValue$1","flatten$1","flattenDeep$1","getRange$1","pull$1","pullAt$1","reduce$1","remove$1","union$1","valuesOfKey","every$1","some$1","clamp$1","fixedBase$1","isDecimal$1","isEven$1","isInteger$1","isNegative$1","isOdd$1","isPositive$1","maxBy","mod$2","toDegree$1","parseInt$1","toRadian$1","hasValue","toString$2","lowerCase$1","lowerFirst$1","upperCase$1","upperFirst$1","getType$1","isArguments$1","isBoolean$1","isDate$1","isError$1","isFinite$1","isNull$1","isPrototype$1","isRegExp$1","isUndefined$1","isElement$1","augment$1","clone$1","flru","keep","reset","isPartial","maxSize","hasOwn","deepMix$1","extend$1","indexOf$1","isEqual$1","isEqualWith","map$3","mapValues","pick","omit","default_1$1","RGB_REG","createTmp","iEl","toRGBString","matches","cArray","toRGB","calColor","fixedPercent","colorArray","toCSSGradient","gradientColor","cssColor_1","colorStops_1","vec2.angle","roundPath","path2String","paramsParser","allPathCommands","paramsCount","isPathArray","lk","isAbsoluteArray","isNormalizedArray","pc","finalizeSegment","pathCommand","LK","scanFlag","pathValue","isDigitStart","isDigit","scanParam","zeroFirst","hasCeiling","hasDecimal","hasDot","ch","isSpace","specialSpaces","skipSpaces","isPathCommand","isArcCommand","scanSegment","cmdCode","reqParams","PathParser","pathInput","absCommand","absoluteSegment","absValues","segLength","normalizeSegment","px1","py1","nqx","nqy","normalizePath","isCurveArray","rotateVector","arcToCubic","X1","Y1","RX","RY","LAF","SF","X2","Y2","d120","quadToCubic","r13","r23","lineToCubic","mid","segmentToCubic","path2Curve","needZCommandIndexes","cloned","zCommandIndexes","curveSegment","clonePath","reverseCurve","rotatedCurve","curveOnly","distanceSquareRoot","segmentLineFactory","angleBetween","v0x","v0y","v1x","v1y","getPointAtArcSegmentLength","abs","sqrt","xRot","xRotRad","transformedPoint","radiiCheck","cSquareNumerator","cSquareRootDenom","cRadicand","cCoef","transformedCenter","startVector","endVector","sweepAngle","ellipseComponentX","ellipseComponentY","segmentArcFactory","sampleSize","distanceIsNumber","LENGTH","POINT","POINTS","dv","getPointAtCubicSegmentLength","segmentCubicFactory","getPointAtQuadSegmentLength","segmentQuadFactory","pathLengthFactory","isM","MIN","MAX","ll","getPathBBox","xMin","yMin","xMax","yMax","getTotalLength","getPathBBoxTotalLength","getRotations","segCount","oldSegIdx","getRotatedCurve","lineLengths","computedIndex","sumLensSqrd","rotations","getCubicSegArea","getPathArea","getDrawDirection","getPointAtLength","getPropertiesAtLength","pathTemp","lengthAtSegment","getPropertiesAtPoint","normalPath","distanceTo","scan","scanDistance","bestLength","bestDistance","scanLength","beforeLength","afterLength","beforeDistance","afterDistance","splitCubic","pts","p5","p6","p7","p8","p9","getCurveArray","segmentData","curveLength","subsegs","equalizeSegments","TL","L1","L2","tl","mm","dif","canSplit","createDOM","initOrder_1","initOrder","simpleNodes","orderedVs","beforeSort","fixOrderNodes","crossCount_1","twoLayerCrossCount","northLayer","southLayer","southPos","unflat","unsort","southEntries","firstIndex","treeSize","cc","weightSum","crossCount","layering","buildLayerGraph_1","buildLayerGraph","relationship","createRootNode","addSubgraphConstraints_1","addSubgraphConstraints","cg","rootPrev","prevChild","barycenter_1","barycenter","movable","result_1","nodeU","resolveConflicts_1","resolveConflicts","mappedEntries","entryV","entryW","sourceSet","doResolveConflicts","handleIn","mergeEntries","handleOut","filtered","picked","sort_1","sort","biasRight","usePrev","keepNodeOrder","parts","hasFixOrder","sortable","unsortable","vsIndex","compareWithBias","consumeUnsortable","iindex","sortSubgraph_1","resolve_conflicts_1","sortSubgraph","br","subgraphs","barycenters","subgraphResult","mergeBarycenters","expandSubgraphs","blPred","brPred","vss","order_1","init_order_1","cross_count_1","build_layer_graph_1","add_subgraph_constraints_1","sort_subgraph_1","mxRank","range1","range2","downLayerGraphs","buildLayerGraphs","upLayerGraphs","assignOrder","bestCC","best","lastBest","sweepLayerGraphs","ranks","layerGraphs","sorted","lnode","layer","BlockGraph","findType1Conflicts","conflicts","visitLayer","prevLayer","k0","scanPos","prevLayerLength","lastNode","k1","scanNode","uLabel","uPos","findType2Conflicts","south","southEnd","prevNorthBorder","nextNorthBorder","uNode","getScannedKey","scanIfNeeded","scanCache","cacheKey","north","prevNorthPos","nextNorthPos","scanned","southLookahead","predecessors","findOtherInnerSegmentNode","addConflict","vv","ww","conflictsV","hasConflict","verticalAlignment","neighborFn","ws","mp","horizontalCompaction","reverseSep","blockG","borderType","iterate","setXsFunc","nextNodesFunc","elem","pass1","pass2","buildBlockGraph","blockGraph","sepFn","vRoot","uRoot","prevMax","findSmallestWidthAlignment","xss","alignCoordinates","alignTo","alignToVals","alignToMin","alignToMax","vert","horiz","alignment","xsVals","balance","positionX","adjustedLayering","inner","smallestWidth","sep","edgeSep","position_1","bk_1","positionY","rankSep","heights","maxHeight","xsKey","ng","initDataOrder_1","initDataOrder","nodeOrder","layout_1","acyclic_1","normalize_1","parent_dummy_chains_1","nesting_graph_1","add_border_segments_1","coordinate_system_1","init_data_order_1","layout","inheritOrder","layoutGraph","buildLayoutGraph","makeSpaceForEdgeLabels","runLayout","updateInputGraph","removeSelfEdges","injectEdgeLabelProxies","assignRankMinMax","removeEdgeLabelProxies","insertSelfEdges","positionSelfEdges","removeBorderNodes","fixupEdgeLabelCoords","translateGraph","assignNodeIntersects","reversePointsForReversedEdges","currG","prevG","inputGraph","inputLabel","layoutLabel","graphNumAttrs","graphDefaults","graphAttrs","nodeNumAttrs","nodeDefaults","edgeNumAttrs","edgeDefaults","edgeAttrs","canonicalize","pickedProperties","selectNumberAttrs","defaultNode","defaultAttrs","marginX","marginY","getExtremes","nodeV","orderShift","selfEdge","selfNode","newAttrs","dagre","index_1","DagreLayout","rankdir","radial","nodeComboMap","sortedNodes","visitedMap","ranksepfunc","nodesepfunc","horisep","vertisep","comboMap","verti","hori","comboEdge","targets","prevGraph","dBegin","coord","isHorizontal","ranksep","getRadialPos_1","focusId","focusLayer_1","layers_1","dim_1","sizeDim_1","min_1","max_1","currentNodesep","diffLayer","diffLayerAbs","leftPos","rightPos","radiusMap_1","rangeLength_1","range_1","processNodes_1","layerNodes","propsMaxRanksep","arcRange","maxRanksep","newX","newY","currentNodeRanksep","isFirstLevel_1","lastLayerMaxNodeSize_1","leftRatio","it","otherDim_1","newControlPoints_1","sourceOtherDimValue_1","otherDimDist_1","sourceRadius_1","radiusDist_1","cRadius","newPos","layerCoords_1","isInvert","layerCoordSort","ndata","layerCoordsArr_1","isDifferentLayer_1","filterControlPointsOutOfBoundary_1","ps","getControlPoints","dimValue","range","rangeLength","dimRatio","layerCoordsArr","isDifferentLayer","filterControlPointsOutOfBoundary","sourceX","sourceY","sourceLayer","sourceNextLayerCoord","firstControlPoint","insertStartControlPoint","targetLayer","layerDiff","targetLastLayerCoord","lastControlPoints","insertEndControlPoint","N","O","M","V","$","W","K","Q","Z","ee","ne","te","re","oe","ie","ae","ue","ce","se","de","fe","he","le","ve","pe","ge","ye","be","me","we","Ee","je","xe","Ne","Oe","ke","Ie","Se","Me","Ce","Ge","Be","Ae","Le","Re","Te","De","Pe","ze","Fe","Ue","Ve","$e","He","We","qe","Ye","Je","Xe","Ke","Qe","Ze","en","nn","tn","rn","on","an","un","cn","sn","dn","hn","vn","pn","gn","yn","bn","mn","wn","En","jn","xn","Nn","On","kn","In","Sn","Mn","Cn","Gn","Bn","An","Ln","Rn","Tn","Dn","Pn","zn","Fn","Un","Vn","$n","Hn","Wn","qn","Yn","Jn","Xn","Kn","Qn","Zn","nt","tt","ot","at","ut","st","dt","ft","ht","lt","vt","pt","gt","wt","Et","jt","Nt","Ot","kt","It","St","Mt","Ct","Gt","Bt","At","Lt","Rt","Tt","Dt","Pt","zt","Ft","Ut","Vt","$t","Ht","Wt","qt","Yt","Jt","Xt","Kt","Qt","Zt","er","nr","tr","rr","or","ir","ur","cr","sr","vr","pr","gr","yr","mr","wr","Er","_r","jr","xr","Nr","Or","kr","Ir","Sr","Mr","Cr","Gr","Br","Ar","Lr","Rr","Tr","Dr","Pr","zr","Fr","Ur","Vr","$r","Hr","Wr","qr","Yr","Jr","Xr","Kr","Qr","Zr","eo","no","ro","oo","io","ao","uo","co","so","fo","ho","lo","vo","po","go","yo","bo","mo","wo","Eo","_o","jo","xo","No","Oo","ko","Io","So","Mo","Co","Go","Bo","Ao","Lo","Ro","To","Do","Po","zo","Fo","Uo","Vo","$o","Ho","Wo","qo","Yo","Jo","Xo","Ko","Qo","Zo","ei","ti","oi","ai","ui","si","fi","li","vi","gi","mi","wi","Ei","ji","Ni","Oi","Ii","Si","Mi","Ci","Gi","Bi","Ai","Li","Ri","Ti","Di","Pi","zi","Fi","Ui","Vi","$i","Hi","Wi","qi","Yi","Ji","Xi","Ki","ea","Qi","Zi","ta","ra","oa","ia","ca","sa","da","fa","ha","ga","ya","ba","ma","wa","Ea","xa","Oa","Ia","ka","ja","Na","Sa","Ma","Ca","Ba","Ga","Aa","La","Ra","Ta","Da","Pa","za","Ua","Va","Fa","$a","Ha","Wa","qa","Ya","Ja","Xa","Ka","Qa","Za","eu","nu","tu","ru","iu","ou","au","uu","cu","su","hu","lu","vu","pu","gu","du","fu","yu","bu","mu","wu","Eu","_u","ju","Bu","Nu","Gu","xu","Ou","ku","Iu","Mu","Su","Cu","Au","Lu","Ru","Tu","Du","Pu","zu","Fu","Hu","Uu","Vu","$u","Wu","Yu","qu","Ju","Qu","Ku","Xu","Zu","ec","nc","tc","rc","oc","ic","uc","dagreCompound","dagre_compound_1","DagreCompoundLayout","hc","graphDef","graphOption","graphSettings","renderInfo","flattenedRenderInfo","fullPath","edgesep","nodesep","settings","pre","matchedNodes","matchedCombos","comboSizeFunc","metaWidth","metaHeight","subSceneMeta","paddingTop","paddingRight","paddingBottom","paddingLeft","graphMetaConfig","flattenedGraph","flattenedNodes","flattenedEdges","anchorPoint","coreBox","anchorPoints_1","outEdge","firstPoint","anchorPointX","anchorPointY","baseEdge","inEdge","lastPoint","sourceEdge","sortedEdges","sourceNodePath","targetNodePath","lastExistingSource_1","fNode","lastExistingTarget_1","oedge","isAnyArray","_options$fromIndex","_options$toIndex","toIndex","maxValue","minValue","rescale","currentMin","currentMax","_options$min","_options$max","indentData","inspectMatrix","inspectMatrixWithOptions","maxRows","maxColumns","maxNumSize","inspectData","columns","maxI","maxJ","formatNumber","numStr","precise","eIndex","installMathOperations","AbstractMatrix","Matrix","arg0","checkRowIndex","checkColumnIndex","checkRowVector","checkColumnVector","checkIndices","rowIndices","columnIndices","checkRowIndices","checkColumnIndices","checkRange","startRow","endRow","startColumn","endColumn","checkNumber","newArray","sumByRow","sumByColumn","sumAll","productByRow","productByColumn","productAll","varianceByRow","unbiased","mean","sum1","sum2","varianceByColumn","varianceAll","centerByRow","centerByColumn","centerAll","getScaleByRow","scaleByRow","getScaleByColumn","scaleByColumn","getScaleAll","divider","scaleAll","newRows","newColumns","newData","column","matrix1","matrix2","previousColumn","isEchelonForm","isReducedEchelonForm","iMax","pivot","row1","row2","column1","column2","diag","vector2","vector1","Bcolj","m5","m6","m7","c00","c01","c10","c11","m8","m9","m14","m15","m16","m17","m18","m19","c02","c20","c21","c22","embed","resultat","blockMult","halfRows","halfCols","middle","compareFunction","compareNumbers","rowIndex","columnIndex","nRows","nColumns","arrayData","BaseView","MatrixColumnView","MatrixColumnSelectionView","MatrixFlipColumnView","MatrixFlipRowView","MatrixRowView","MatrixRowSelectionView","MatrixSelectionView","MatrixSubView","MatrixTransposeView","WrapperMatrix1D","WrapperMatrix2D","wrap","LuDecomposition","pivotVector","pivotSign","LUcolj","kmax","hypotenuse","QrDecomposition","rdiag","nrm","SingularValueDecomposition","computeLeftSingularVectors","computeRightSingularVectors","autoTranspose","wantu","wantv","swapped","aux","work","nct","nrt","mrc","eps","kase","sp","spm1","epm1","sk","ek","shift","scols","Ls","VL","vrows","urows","VLU","vcols","ucols","tol","useSVD","solve","leftHandSide","rightHandSide","subMatrix0","subMatrix1","subMatrix2","xrange","exception","dependenciesOneRow","thresholdValue","thresholdError","returnArray","linearDependencies","Abis","pseudoInverse","svdSolution","SVD","covariance","xMatrix","yMatrix","yIsSame","cov","correlation","sdx","sdy","corr","EigenvalueDecomposition","assumeSymmetric","isSymmetric","tred2","tql2","ort","orthes","hqr2","hh","dl1","el1","tst1","high","exshift","norm","notlast","cdivres","cdiv","CholeskyDecomposition","dimension","positiveDefinite","nipals","scaleScores","terminationCriteria","tOld","xResidual","residual","yResidual","mds","ml_matrix_1","MDS","rowMeans","colMeans","totalMean","eigenValues_1","radialNonoverlapForce","SPEED_DIVISOR","RadialNonoverlapForce","positions","disp","maxDisplace","vecx","vecy","common","speed","strictRadial","vpx","vpy","diLength","tdispLength","distLength","limitedDist","nfDis","mds_1","radialNonoverlapForce_1","getWeightMatrix","getIndexById","getEDistance","RadialLayout","focusIndex","focusNodeD","semiWidth","semiHeight","maxRadius","maxD","eIdealD","nonoverlapForceParams","nonoverlapForce","eIdealDis","vparam","originDis","reciODis","xMolecule","yMolecule","edis","reciEdis","idealDis","reciR","linkDis","unitRadius","iValue","jValue","minus","concentric","ConcentricLayout","maxNodeSize","maxNodeSpacing","indexMap","levels","currentLevel","minDist","firstLvlHasMulti","maxR","rStep","sweep","dcos","dsin","rMin","rDeltaMax_1","rr_1","rDelta","MDSLayout","scaledD","eigenValues","fruchterman","FruchtermanLayout","clusterMap","displacements","clusterGravity_1","gravityForce","vecLengthSqr","uIndex","vIndex","asyncGeneratorStep","_next","_throw","_asyncToGenerator","freeGlobal","global","_freeGlobal","freeSelf","_root","Symbol","_Symbol","nativeObjectToString","symToStringTag","getRawTag","isOwn","unmasked","_getRawTag","objectToString","_objectToString","nullTag","undefinedTag","baseGetTag","_baseGetTag","MAX_SAFE_INTEGER","isLength","isLength_1","isObjectLike_1","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","_baseIsTypedArray","baseUnary","_baseUnary","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsTypedArray","isTypedArray","isTypedArray_1","isNumber_1","isArray_1","_regeneratorRuntime","Generator","Context","makeInvokeMethod","tryCatch","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","AsyncIterator","invoke","callInvokeWithMethodAndArg","maybeInvokeDelegate","pushTryEntry","resetTryEntry","runtime","regenerator","entitySequence","createEntity","gl","ConfigService","AST_TOKEN_TYPES","AST_NODE_TYPES","STORAGE_CLASS","Target","DefineValuePlaceholder","createCanvas","Kernel","engine","configService","_this$configService$g","engineOptions","bundle","isNumberLikeData","_isNumber","_isTypedArray","_isArray","existedDefine","existedBinding","_execute","_callee","iteration","_args","_context","isReferer","execute","_getOutput","_callee2","_context2","getOutput","_compile","_callee3","shader","_context3","valuePlaceHolder","uniform","sizePerElement","compile","endl","decodeB64","raise","check","pred","encolon","checkParameter","possibilities","checkIsTypedArray","standardTypeEh","checkTypeOf","checkNonNegativeInt","checkOneOf","constructorKeys","checkConstructor","leftPad","ShaderFile","ShaderLine","ShaderError","fileNumber","lineNumber","guessCommand","pat","pat2","guessCallSite","parseSource","files","lineNumberInfo","nameInfo","file","parseErrorLog","errLog","errMsg","annotateFiles","errors","checkShaderError","checkCommandType","strings","push","token","tokenPat","checkLinkError","program","fragShader","vertShader","fragParse","vertParse","header","saveCommandRef","saveDrawCommandInfo","uniforms","attributes","stringStore","addProps","dict","uniformSet","attributeSet","commandRaise","callSite","checkCommand","checkParameterCommand","checkOptional","block","checkFramebufferFormat","attachment","texFormats","rbFormats","GL_CLAMP_TO_EDGE","GL_NEAREST","GL_NEAREST_MIPMAP_NEAREST","GL_LINEAR_MIPMAP_NEAREST","GL_NEAREST_MIPMAP_LINEAR","GL_LINEAR_MIPMAP_LINEAR","GL_BYTE","GL_UNSIGNED_BYTE","GL_SHORT","GL_UNSIGNED_SHORT","GL_INT","GL_UNSIGNED_INT","GL_FLOAT","GL_UNSIGNED_SHORT_4_4_4_4","GL_UNSIGNED_SHORT_5_5_5_1","GL_UNSIGNED_SHORT_5_6_5","GL_UNSIGNED_INT_24_8_WEBGL","GL_HALF_FLOAT_OES","TYPE_SIZE","pixelSize","isPow2","checkTexture2D","mipData","limits","mipimages","mw","mh","rowSize","checkTextureCube","texture","faces","face","mipmaps","check$1","VARIABLE_COUNTER","DYN_FUNC","DYN_CONSTANT","DYN_ARRAY","DynamicVariable","escapeStr","splitParts","firstChar","lastChar","subparts","toAccessorString","defineDynamic","isDynamic","unbox","dynamic","raf","cb","createStringStore","stringIds","stringValues","onDone","resize","resizeObserver","onDestroy","createContext","contextAttributes","isHTMLElement","isWebGLContext","parseExtensions","getElement","parseArgs","args_","extensions","optionalExtensions","profile","createExtensionCache","tryLoadExtension","name_","loop","GL_BYTE$1","GL_UNSIGNED_BYTE$2","GL_SHORT$1","GL_UNSIGNED_SHORT$1","GL_INT$1","GL_UNSIGNED_INT$1","GL_FLOAT$2","nextPow16","log2","createPool","bufferPool","alloc","bin","free","buf","allocType","freeType","pool","GL_SUBPIXEL_BITS","GL_RED_BITS","GL_GREEN_BITS","GL_BLUE_BITS","GL_ALPHA_BITS","GL_DEPTH_BITS","GL_STENCIL_BITS","GL_ALIASED_POINT_SIZE_RANGE","GL_ALIASED_LINE_WIDTH_RANGE","GL_MAX_TEXTURE_SIZE","GL_MAX_VIEWPORT_DIMS","GL_MAX_VERTEX_ATTRIBS","GL_MAX_VERTEX_UNIFORM_VECTORS","GL_MAX_VARYING_VECTORS","GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS","GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS","GL_MAX_TEXTURE_IMAGE_UNITS","GL_MAX_FRAGMENT_UNIFORM_VECTORS","GL_MAX_CUBE_MAP_TEXTURE_SIZE","GL_MAX_RENDERBUFFER_SIZE","GL_VENDOR","GL_RENDERER","GL_VERSION","GL_SHADING_LANGUAGE_VERSION","GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT","GL_MAX_COLOR_ATTACHMENTS_WEBGL","GL_MAX_DRAW_BUFFERS_WEBGL","GL_TEXTURE_2D","GL_TEXTURE_CUBE_MAP","GL_TEXTURE_CUBE_MAP_POSITIVE_X","GL_TEXTURE0","GL_RGBA","GL_FLOAT$1","GL_UNSIGNED_BYTE$1","GL_FRAMEBUFFER","GL_FRAMEBUFFER_COMPLETE","GL_COLOR_ATTACHMENT0","GL_COLOR_BUFFER_BIT$1","wrapLimits","maxAnisotropic","maxDrawbuffers","maxColorAttachments","readFloat","readFloatTexture","fbo","pixels","isIE","npotTextureCube","cubeTexture","isNDArrayLike","flattenUtils","arrayShape$1","flattenArray","flatten1D","flatten2D","ptr","flatten3D","nz","ptr_","flattenRec","out_","array_","arrayTypes","int8","int16","int32","uint8","uint16","uint32","float","float32","glTypes","dynamic$1","stream","usageTypes","arrayFlatten","arrayShape","GL_STATIC_DRAW","GL_STREAM_DRAW","GL_UNSIGNED_BYTE$3","GL_FLOAT$3","DTYPES_SIZES","typedArrayCode","copyArray","inp","shapeX","shapeY","strideX","strideY","wrapBufferState","stats","destroyBuffer","bufferCount","bufferSet","REGLBuffer","streamPool","createStream","initBufferFromData","destroyStream","stream$$1","initBufferFromTypedArray","usage","dtype","persist","flatData","dim","typedData","transposeData","createBuffer","deferInit","persistent","reglBuffer","byteLength","setSubData","subdata","offset_","converted","restoreBuffers","total","wrapper","triangles","triangle","primTypes","GL_POINTS","GL_LINES","GL_TRIANGLES","GL_BYTE$2","GL_UNSIGNED_BYTE$4","GL_SHORT$2","GL_UNSIGNED_SHORT$2","GL_INT$2","GL_UNSIGNED_INT$2","GL_ELEMENT_ARRAY_BUFFER","GL_STREAM_DRAW$1","GL_STATIC_DRAW$1","wrapElementsState","bufferState","elementSet","elementCount","elementTypes","REGLElementBuffer","createElementStream","initElements","destroyElementStream","predictedType","vertCount","primType","destroyElements","createElements","reglElements","FLOAT","INT","GL_UNSIGNED_SHORT$4","convertToHalfFloat","ushorts","sgn","frac","isPow2$1","GL_COMPRESSED_TEXTURE_FORMATS","GL_TEXTURE_2D$1","GL_TEXTURE_CUBE_MAP$1","GL_TEXTURE_CUBE_MAP_POSITIVE_X$1","GL_RGBA$1","GL_ALPHA","GL_RGB","GL_LUMINANCE","GL_LUMINANCE_ALPHA","GL_RGBA4","GL_RGB5_A1","GL_RGB565","GL_UNSIGNED_SHORT_4_4_4_4$1","GL_UNSIGNED_SHORT_5_5_5_1$1","GL_UNSIGNED_SHORT_5_6_5$1","GL_UNSIGNED_INT_24_8_WEBGL$1","GL_DEPTH_COMPONENT","GL_DEPTH_STENCIL","GL_SRGB_EXT","GL_SRGB_ALPHA_EXT","GL_HALF_FLOAT_OES$1","GL_COMPRESSED_RGB_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT1_EXT","GL_COMPRESSED_RGBA_S3TC_DXT3_EXT","GL_COMPRESSED_RGBA_S3TC_DXT5_EXT","GL_COMPRESSED_RGB_ATC_WEBGL","GL_COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL","GL_COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL","GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","GL_COMPRESSED_RGB_ETC1_WEBGL","GL_UNSIGNED_BYTE$5","GL_UNSIGNED_SHORT$3","GL_UNSIGNED_INT$3","GL_FLOAT$4","GL_TEXTURE_WRAP_S","GL_TEXTURE_WRAP_T","GL_REPEAT","GL_CLAMP_TO_EDGE$1","GL_MIRRORED_REPEAT","GL_TEXTURE_MAG_FILTER","GL_TEXTURE_MIN_FILTER","GL_NEAREST$1","GL_LINEAR","GL_NEAREST_MIPMAP_NEAREST$1","GL_LINEAR_MIPMAP_NEAREST$1","GL_NEAREST_MIPMAP_LINEAR$1","GL_LINEAR_MIPMAP_LINEAR$1","GL_GENERATE_MIPMAP_HINT","GL_DONT_CARE","GL_FASTEST","GL_NICEST","GL_TEXTURE_MAX_ANISOTROPY_EXT","GL_UNPACK_ALIGNMENT","GL_UNPACK_FLIP_Y_WEBGL","GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL","GL_UNPACK_COLORSPACE_CONVERSION_WEBGL","GL_BROWSER_DEFAULT_WEBGL","GL_TEXTURE0$1","MIPMAP_FILTERS","CHANNELS_FORMAT","FORMAT_CHANNELS","objectName","CANVAS_CLASS","OFFSCREENCANVAS_CLASS","CONTEXT2D_CLASS","BITMAP_CLASS","IMAGE_CLASS","VIDEO_CLASS","PIXEL_CLASSES","TYPE_SIZES","FORMAT_SIZES_SPECIAL","isNumericArray","isRectArray","classString","isCanvasElement","isOffscreenCanvas","isContext2D","isBitmap","isImageElement","isVideoElement","isPixelData","typedArrayCode$1","convertData","preConvert","image","postConvert","strideC","getTextureSize","isMipmap","isCube","createTextureSet","reglPoll","contextState","mipmapHint","wrapModes","magFilters","minFilters","colorSpace","textureTypes","textureFormats","compressedTextureFormats","supportedCompressedFormats","supportedFormats","textureFormatsInvert","textureTypesInvert","magFiltersInvert","minFiltersInvert","wrapModesInvert","colorFormats","glenum","TexFlags","copyFlags","parseFlags","flags","hasChannels","hasFormat","formatStr","internalformat","setFlags","TexImage","parseImage","viewW","viewH","shapeC","dd","allocData","setImage","miplevel","setSubImage","imagePool","allocImage","freeImage","MipMap","parseMipMapFromShape","mipmap","parseMipMapFromObject","imgData","setMipMap","images","mipPool","allocMipMap","freeMipMap","TexInfo","parseTexInfo","minFilter","magFilter","wrapS","wrapT","optWrapS","optWrapT","anisotropic","hasMipMap","setTexInfo","textureCount","textureSet","numTexUnits","textureUnits","REGLTexture","tempBind","tempRestore","createTexture2D","reglTexture2D","texInfo","subimage","x_","y_","level_","imageData","h_","_w","createTextureCube","reglTextureCube","faceInput","radius_","destroyTextures","restoreTextures","tex","refreshTextures","GL_RENDERBUFFER","GL_RGBA4$1","GL_RGB5_A1$1","GL_RGB565$1","GL_DEPTH_COMPONENT16","GL_STENCIL_INDEX8","GL_DEPTH_STENCIL$1","GL_SRGB8_ALPHA8_EXT","GL_RGBA32F_EXT","GL_RGBA16F_EXT","GL_RGB16F_EXT","FORMAT_SIZES","getRenderbufferSize","wrapRenderbuffers","formatTypes","formatTypesInvert","renderbufferCount","renderbufferSet","REGLRenderbuffer","renderbuffer","rb","createRenderbuffer","reglRenderbuffer","restoreRenderbuffers","GL_FRAMEBUFFER$1","GL_RENDERBUFFER$1","GL_TEXTURE_2D$2","GL_TEXTURE_CUBE_MAP_POSITIVE_X$2","GL_COLOR_ATTACHMENT0$1","GL_DEPTH_ATTACHMENT","GL_STENCIL_ATTACHMENT","GL_DEPTH_STENCIL_ATTACHMENT","GL_FRAMEBUFFER_COMPLETE$1","GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT","GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT","GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS","GL_FRAMEBUFFER_UNSUPPORTED","GL_HALF_FLOAT_OES$2","GL_UNSIGNED_BYTE$6","GL_FLOAT$5","GL_RGB$1","GL_RGBA$2","GL_DEPTH_COMPONENT$1","colorTextureFormatEnums","textureFormatChannels","textureTypeSizes","GL_RGBA4$2","GL_RGB5_A1$2","GL_RGB565$2","GL_DEPTH_COMPONENT16$1","GL_STENCIL_INDEX8$1","GL_DEPTH_STENCIL$2","GL_SRGB8_ALPHA8_EXT$1","GL_RGBA32F_EXT$1","GL_RGBA16F_EXT$1","GL_RGB16F_EXT$1","colorRenderbufferFormatEnums","statusCode","wrapFBOState","textureState","renderbufferState","framebufferState","colorTextureFormats","colorRenderbufferFormats","colorTypes","FramebufferAttachment","decRef","incRefAndCheckShape","tw","th","attach","location","parseAttachment","allocAttachment","isTexture","unwrapAttachment","resizeAttachment","framebufferCount","framebufferSet","REGLFramebuffer","decFBORefs","framebuffer","updateFramebuffer","colorAttachments","status","createFBO","reglFramebuffer","needsDepth","needsStencil","colorBuffer","colorTexture","colorFormat","colorType","colorCount","depthBuffer","stencilBuffer","depthStencilBuffer","depthStencilTexture","depthAttachment","stencilAttachment","depthStencilAttachment","commonColorAttachmentSize","colorAttachmentSize","createCubeFBO","reglFramebufferCube","colorCubes","cubeMapParams","cube","restoreFramebuffers","fb","GL_FLOAT$6","GL_ARRAY_BUFFER$1","AttributeRecord","wrapAttributeState","NUM_ATTRIBUTES","attributeBindings","vaoCount","vaoSet","extVAO","restoreVAO","createVAO","getVAO","setVAOEXT","setVAOEmulated","destroyVAOEXT","record","extInstanced","vao","exti","binding","REGLVAO","extension","_attr","updateVAO","bufUpdated","nattributes","spec","GL_FRAGMENT_SHADER","GL_VERTEX_SHADER","GL_ACTIVE_UNIFORMS","GL_ACTIVE_ATTRIBUTES","wrapShaderState","fragShaders","vertShaders","ActiveInfo","insertActiveInfo","getShader","programCache","programList","PROGRAM_COUNTER","REGLProgram","fragId","vertId","linkProgram","attributeLocations","numUniforms","numAttributes","restoreShaders","deleteShader","attribLocations","prevProgram","GL_RGBA$3","GL_UNSIGNED_BYTE$7","GL_PACK_ALIGNMENT","GL_FLOAT$7","wrapReadPixels","glAttributes","readPixelsImpl","readPixelsFBO","readPixels","join","createEnvironment","varCounter","linkedNames","linkedValues","scope","exit","entryToString","exitToString","save","conditional","thenBlock","elseBlock","thenToString","elseToString","elseClause","globalBlock","procedures","proc","bodyToString","CUTE_COMPONENTS","GL_UNSIGNED_BYTE$8","ATTRIB_STATE_POINTER","ATTRIB_STATE_CONSTANT","DYN_FUNC$1","DYN_PROP$1","DYN_CONTEXT$1","DYN_STATE$1","DYN_THUNK","DYN_CONSTANT$1","DYN_ARRAY$1","S_DITHER","S_BLEND_ENABLE","S_BLEND_COLOR","S_BLEND_EQUATION","S_BLEND_FUNC","S_DEPTH_ENABLE","S_DEPTH_FUNC","S_DEPTH_RANGE","S_DEPTH_MASK","S_COLOR_MASK","S_CULL_ENABLE","S_CULL_FACE","S_FRONT_FACE","S_LINE_WIDTH","S_POLYGON_OFFSET_ENABLE","S_POLYGON_OFFSET_OFFSET","S_SAMPLE_ALPHA","S_SAMPLE_ENABLE","S_SAMPLE_COVERAGE","S_STENCIL_ENABLE","S_STENCIL_MASK","S_STENCIL_FUNC","S_STENCIL_OPFRONT","S_STENCIL_OPBACK","S_SCISSOR_ENABLE","S_SCISSOR_BOX","S_VIEWPORT","S_PROFILE","S_FRAMEBUFFER","S_VERT","S_FRAG","S_ELEMENTS","S_PRIMITIVE","S_COUNT","S_OFFSET","S_INSTANCES","S_VAO","SUFFIX_WIDTH","SUFFIX_HEIGHT","S_FRAMEBUFFER_WIDTH","S_FRAMEBUFFER_HEIGHT","S_VIEWPORT_WIDTH","S_VIEWPORT_HEIGHT","S_DRAWINGBUFFER","S_DRAWINGBUFFER_WIDTH","S_DRAWINGBUFFER_HEIGHT","NESTED_OPTIONS","GL_ARRAY_BUFFER$2","GL_ELEMENT_ARRAY_BUFFER$1","GL_FRAGMENT_SHADER$1","GL_VERTEX_SHADER$1","GL_TEXTURE_2D$3","GL_TEXTURE_CUBE_MAP$2","GL_CULL_FACE","GL_BLEND","GL_DITHER","GL_STENCIL_TEST","GL_DEPTH_TEST","GL_SCISSOR_TEST","GL_POLYGON_OFFSET_FILL","GL_SAMPLE_ALPHA_TO_COVERAGE","GL_SAMPLE_COVERAGE","GL_FLOAT$8","GL_FLOAT_VEC2","GL_FLOAT_VEC3","GL_FLOAT_VEC4","GL_INT$3","GL_INT_VEC2","GL_INT_VEC3","GL_INT_VEC4","GL_BOOL","GL_BOOL_VEC2","GL_BOOL_VEC3","GL_BOOL_VEC4","GL_FLOAT_MAT2","GL_FLOAT_MAT3","GL_FLOAT_MAT4","GL_SAMPLER_2D","GL_SAMPLER_CUBE","GL_TRIANGLES$1","GL_FRONT","GL_BACK","GL_CW","GL_CCW","GL_MIN_EXT","GL_MAX_EXT","GL_ALWAYS","GL_KEEP","GL_ZERO","GL_ONE","GL_FUNC_ADD","GL_LESS","GL_FRAMEBUFFER$2","GL_COLOR_ATTACHMENT0$2","blendFuncs","invalidBlendCombinations","compareFuncs","stencilOps","shaderType","orientationType","isBufferArgs","sortState","Declaration","thisDep","contextDep","propDep","append","isStatic","decl","createStaticDecl","createDynamicDecl","dyn","numArgs","subDyn","subArgs","SCOPE_DECL","reglCore","elementState","uniformState","attributeState","shaderState","drawState","blendEquations","extInstancing","extDrawBuffers","currentState","nextState","GL_STATE_NAMES","GL_FLAGS","GL_VARIABLES","propName","stateFlag","sname","cap","stateVariable","sharedState","sharedConstants","drawCallCounter","createREGLEnvironment","SHARED","shared","nextVars","currentVars","variable","argList","scopeAttribs","parseProfile","staticOptions","dynamicOptions","profileEnable","parseFramebuffer","FRAMEBUFFER","CONTEXT","FRAMEBUFFER_FUNC","FRAMEBUFFER_STATE","parseViewportScissor","parseBox","BOX_W","BOX_H","dynBox","BOX","BOX_X","BOX_Y","viewport","prevViewport","VIEWPORT","parseAttribLocations","staticProgram","staticAttributes","sAttributes","bindings","parseProgram","parseShader","frag","progVar","SHADER_STATE","progDef","parseDraw","parseElements","IS_BUFFER_ARGS","ELEMENT_STATE","elementDefn","elementStream","ifte","parsePrimitive","primitive","dynPrimitive","PRIM_TYPES","parseParam","isOffset","dynValue","OFFSET","parseVertCount","dynCount","parseGLState","STATE","parseStatic","parseDynamic","COMPARE_FUNCS","Z_NEAR","Z_FAR","srcRGB","srcAlpha","dstRGB","dstAlpha","BLEND_FUNCS","INVALID_BLEND_COMBINATIONS","SRC_RGB","SRC_ALPHA","DST_RGB","DST_ALPHA","BLEND_EQUATIONS","RGB","ALPHA","checkProp","cmp","mask","assert","zfail","zpass","STENCIL_OPS","FACTOR","UNITS","sampleValue","sampleInvert","VALUE","INVERT","parseUniforms","staticUniforms","dynamicUniforms","UNIFORMS","reglType","ITEM","parseAttributes","dynamicAttributes","attributeDefs","attribute","normalized","divisor","VALID_KEYS","appendAttributeCode","BUFFER_STATE","defaultRecord","BUFFER","TYPE","emitReadRecord","parseVAO","vaoRef","parseContext","staticContext","dynamicContext","parseArguments","KEY_NAMES","checkKeys","viewportAndScissor","draw","copyBox","defn","dirty","useVAO","staticBindings","emitContext","contextEnter","emitPollFramebuffer","skipCheck","GL","EXT_DRAW_BUFFERS","DRAW_BUFFERS","BACK_BUFFER","NEXT","emitPollState","CURRENT_VARS","NEXT_VARS","CURRENT_STATE","NEXT_STATE","CURRENT","emitSetOptions","injectExtensions","emitProfile","useScope","incrementCounter","STATS","TIMER","profileArg","perfCounter","CPU_START","QUERY_COUNTER","emitProfileStart","emitProfileEnd","scopeProfile","USE_PROFILE","emitAttributes","typeLength","emitBindAttribute","ATTRIBUTE","LOCATION","BINDING","CONST_COMPONENTS","COMMON_KEYS","emitBuffer","SIZE","DIVISOR","emitConstant","scopeAttrib","emitUniforms","infix","UNIFORM","TEX_VALUE","MAT_VALUE","emitCheck","checkType","checkVector","checkTexture","unroll","TEX","matSize","STORAGE","emitDraw","DRAW_STATE","drawOptions","emitElements","ELEMENTS","emitCount","COUNT","emitValue","PRIMITIVE","INSTANCES","EXT_INSTANCING","ELEMENT_TYPE","elementsStatic","emitInstancing","drawElements","drawArrays","emitRegular","createBody","emitBody","parentEnv","emitDrawBody","emitDrawProc","drawCache","PROG_ID","CACHED_PROC","emitBatchDynamicShaderBody","all","emitBatchBody","contextDynamic","BATCH_ID","PROP_LIST","NUM_PROPS","PROPS","isInnerDefn","isOuterDefn","progCache","PROGRAM","emitBatchProc","batch","needsContext","needsFramebuffer","progDefn","batchCache","emitScopeProc","opt","saveShader","isDynamicObject","splatObject","globals","objectRef","deps","appendBlock","compileCommand","poll","INSTANCING","GL_QUERY_RESULT_EXT","GL_QUERY_RESULT_AVAILABLE_EXT","GL_TIME_ELAPSED_EXT","createTimer","queryPool","allocQuery","freeQuery","query","pendingQueries","beginQuery","pushScopeStats","endQuery","PendingStats","pendingStatsPool","allocPendingStats","freePendingStats","pendingStats","timeSum","queryPtr","queryTime","startPtr","endPtr","GL_COLOR_BUFFER_BIT","GL_DEPTH_BUFFER_BIT","GL_STENCIL_BUFFER_BIT","GL_ARRAY_BUFFER","CONTEXT_LOST_EVENT","CONTEXT_RESTORED_EVENT","DYN_PROP","DYN_CONTEXT","DYN_STATE","haystack","needle","wrapREGL","contextLost","extensionState","stats$$1","START_TIME","WIDTH","HEIGHT","core","rafCallbacks","lossCallbacks","restoreCallbacks","destroyCallbacks","activeRAF","handleRAF","startRAF","stopRAF","handleContextLoss","handleContextRestored","compileProcedure","flattenNestedOptions","merge","separateDynamic","useArrays","staticItems","dynamicItems","compiled","EMPTY_ARRAY","reserve","REGLCommand","setFBO","clearImpl","clearFlags","clear","cancel","pendingCancel","pollViewport","scissorBox","addListener","regl","ReglAttribute","_primitiveMap","_usageMap","_dataTypeMap","_formatMap","_mipmapMap","_filterMap","_wrapModeMap","_colorSpaceMap","_depthFuncMap","_blendEquationMap","_blendFuncMap","_stencilFuncMap","_stencilOpMap","_cullFaceMap","primitiveMap","usageMap","dataTypeMap","formatMap","mipmapMap","filterMap","wrapModeMap","colorSpaceMap","depthFuncMap","blendEquationMap","blendFuncMap","stencilFuncMap","stencilOpMap","cullFaceMap","ReglBuffer","reGl","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","_toConsumableArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","quadVert","textureId","ReglComputeModel","storageClass","_this$textureCache$na","isOutput","_this$getOuputDataTex","textureWidth","texelCount","drawParams","_readData","_this3","_this$getOuputDataTex2","originalDataLength","elementsPerTexel","_this$getOuputDataTex3","typedArrayConstructor","formattedPixels","readData","inputName","inputModel","bufferName","_this$calcDataTexture","paddingData","outputTextureUniformName","paddingTexelCount","ReglElements","ReglFramebuffer","framebufferOptions","overArg","_overArg","getPrototype","_getPrototype","funcProto","funcToString","objectCtorString","isPlainObject_1","extractUniforms","extractedUniforms","uniformName","extractUniformsRecursively","uniformValue","_isPlainObject","childName","ReglModel","fs","defines","blend","stencil","cull","instances","scissor","reglUniforms","reglAttributes","defineStmts","reglDrawProps","equation","_blend$color","_ref3","_stencil$mask","_stencil$func","_stencil$opFront","opFront","_stencil$opBack","opBack","_ref4","_cull$face","ReglTexture2D","_options$type","_options$flipY","flipY","_options$format","_options$mipmap","_options$wrapS","_options$wrapT","_options$aniso","aniso","_options$alignment","_options$premultiplyA","premultiplyAlpha","_options$mag","_options$colorSpace","textureOptions","WebGLEngine","_x2","_x","drawCommands","_x3","_options$framebuffer","reglClearOptions","readPixelsOptions","_init","_callee4","_context4","_x4","World","_createEntity","precompiledBundle","kernel","world","gpu","math_1","buildTextureData","dataArray","nodeDict","mapIdPos","maxEdgePerVetex","dests","dest","buildTextureDataWithTwoEdgeAttr","attrs1","attributesToTextureData","attributeNames","attributeNum","attributteStringMap","arrayToTextureData","valueArrays","itemNum","valueArray","fruchtermanShader","g_webgpu_1","gpu_1","fruchtermanShader_1","FruchtermanGPULayout","attributeArray","clusterCount","numParticles","nodesEdgesArray","onLayoutEnd","clusterCenters","kernelFruchterman","kernelCluster","finalParticleData","gForceShader","gForceShader_1","GForceGPULayout","masses","nodeStrengths","centerXs","centerYs","centerGravities","fxs","fys","nodeAttributeArray1","nodeAttributeArray2","initPreviousData","kernelGForce","kernelAveMovement","nodeGravity","customCenter","comboForce","ComboForceLayout","centerOffset","mapped","oriComboMap","comboSpacing","comboSpacingFunc","comboPadding","comboPaddingFunc","linkDistanceFunc","edgeStrengthFunc","nodeStrengthFunc","treeChildren","oriCombo","childCombo","comboGravity","gravityScale","vecMap","vl2","vl","preventComboOverlap","nodeMinX","nodeMinY","nodeMaxX","nodeMaxY","minSize","maxLength","comboTree","comboCollideStrength","cv","rv","ru2","rv2","vnodes","unodes_1","sqrtl","xl_1","yl_1","rratio_1","irratio_1","uindex","nodeCollideStrength","preventNodeOverlap","depthDiff","depthParam","rj2","rratio","xl","yl","comboCombined","ComboCombinedLayout","innerGraphs","outerNodeIds","outerNodes","nodeAncestorIdMap","allHaveNoPosition","innerNode","oNode","outerEdges","sourceAncestorId","targetAncestorId","outerData","outerLayout","outerLayoutType","outerLayoutPreset","outerNode","innerGraph","innerGraphIds","spacing","innerGraphLayout","innerGraphNodes","oriNode","innerGraphNodeIds_1","innerGraphData","minNodeSize_1","center_1","innerGraphWidth","innerGraphHeight","treeNodeSize","spacingFunc","Body","nenwMass","dg","halfLen","NW","NE","SW","SE","quadTree","QuadTree","forceAtlas2","body_1","quad_1","quadTree_1","ForceAtlas2Layout","prune","sizes","nodeWidth","nonLoopEdges","esize","idMap","edgeEndsIdMap","Es","sIdx","tIdx","barnesHut","krPrime","prevoIter","preForces","bodies","dissuadeHubs","dir","eucliDis","Fa1","Fa2","kg","dir_1","eucliDis_1","Fg","quadParams","tao","ksmax","swgns","trans","swgG","traG","minusNorm","addNorm","preSG","absForce","dnx","dny","Grid","gridSize","cell","forceGrid","grid_1","nodeMinGap","CELL_W","CELL_H","gridpoint","addGridSize","realAdd","hasColumn","mysqlWorkbench","graphWidth","graphHeight","OVERLAP_QUOT","MIN_DIST","M_PI","M_PI_2","PI_38","PI_58","nodeEdgeMap","T_MIN","distanceToNode","isHoriz","x11","y11","x12","y12","x21","y21","x22","y22","cx1","cy1","cx2","cy2","dcx","aqr","newHoriz","calcNodePair","nodeA","nodeB","isLinked","areaA","areaB","isoverlap","sx1","sy1","sx2","sy2","dsx","dsy","sov","calcEnergy","isCorrectPosition","newPosition","relateEdges","relateNodes","otherNodeId","newDelta","isHor","newIsHor","isVer","newIsVer","shuffle","foundSmallerEnergy","wstep","hstep","wsteps","hsteps","nodeEnergy","calcNodeEnergy","ns","rdm","relateEdge","minEnergy","deSameCount","prevEnergy","MAX_COUNT","forceGrid_1","mysqlWorkbench_1","dagre_1","noLeafNodes","noLeafEdge","graphLayout","nodesTmp","copyNodes","copyEdges","layoutPromise","scalex","scaley","core_1","ERLayout","registy_1","random_1","force2_1","gForce_1","force_1","circular_1","radial_1","concentric_1","fruchterman_1","fruchterman_2","gForce_2","comboForce_1","comboCombined_1","require$$15","forceAtlas2_1","require$$16","er_1","require$$17","dagreCompound_1","require$$18","require$$19","Layout","layoutClass","minLayer","hasLayerNodes","layerOffset_1","modules","installedModules","__webpack_require__","moduleId","getter","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__is_type__","_require","getHeight","preNode","heightField","__WEBPACK_IMPORTED_MODULE_0__is_array__","__WEBPACK_IMPORTED_MODULE_1__is_object__","__WEBPACK_IMPORTED_MODULE_0__is_nil__","__WEBPACK_IMPORTED_MODULE_0__is_object_like__","__WEBPACK_IMPORTED_MODULE_1__is_type__","hierarchy","_proto","__WEBPACK_IMPORTED_MODULE_0__is_array_like__","__WEBPACK_IMPORTED_MODULE_0__each__","__WEBPACK_IMPORTED_MODULE_1__is_function__","separateTree","VALID_DIRECTIONS","HORIZONTAL_DIRECTIONS","DEFAULT_DIRECTION","layoutAlgrithm","_separateTree","bb","fixedRoot","PEM","DEFAULT_HEIGHT","DEFAULT_GAP","DEFAULT_OPTIONS","hgap","vgap","isolated","__WEBPACK_IMPORTED_MODULE_1__keys__","__WEBPACK_IMPORTED_MODULE_1__is_array__","__WEBPACK_IMPORTED_MODULE_2__is_plain_object__","__WEBPACK_IMPORTED_MODULE_2__group_by__","__WEBPACK_IMPORTED_MODULE_0__is_function__","__WEBPACK_IMPORTED_MODULE_1__is_array_like__","__WEBPACK_IMPORTED_MODULE_2__is_string__","__WEBPACK_IMPORTED_MODULE_0_tslib__","__WEBPACK_IMPORTED_MODULE_1__values__","__WEBPACK_IMPORTED_MODULE_2__memoize__","__WEBPACK_IMPORTED_MODULE_3__is_string__","rightTreeSize","getSide","side","_inheritsLoose","TreeLayout","nonLayeredTidyTree","doTreeLayout","CompactBoxTreeLayout","_TreeLayout","compactBoxLayout","__WEBPACK_IMPORTED_MODULE_0__contains__","__WEBPACK_IMPORTED_MODULE_1__difference__","__WEBPACK_IMPORTED_MODULE_2__find__","__WEBPACK_IMPORTED_MODULE_3__find_index__","__WEBPACK_IMPORTED_MODULE_4__first_value__","__WEBPACK_IMPORTED_MODULE_5__flatten__","__WEBPACK_IMPORTED_MODULE_6__flatten_deep__","__WEBPACK_IMPORTED_MODULE_7__get_range__","__WEBPACK_IMPORTED_MODULE_8__pull__","__WEBPACK_IMPORTED_MODULE_9__pull_at__","__WEBPACK_IMPORTED_MODULE_10__reduce__","__WEBPACK_IMPORTED_MODULE_11__remove__","__WEBPACK_IMPORTED_MODULE_12__sort_by__","__WEBPACK_IMPORTED_MODULE_13__union__","__WEBPACK_IMPORTED_MODULE_14__uniq__","__WEBPACK_IMPORTED_MODULE_15__values_of_key__","__WEBPACK_IMPORTED_MODULE_16__head__","__WEBPACK_IMPORTED_MODULE_17__last__","__WEBPACK_IMPORTED_MODULE_18__starts_with__","__WEBPACK_IMPORTED_MODULE_19__ends_with__","__WEBPACK_IMPORTED_MODULE_20__filter__","__WEBPACK_IMPORTED_MODULE_21__every__","__WEBPACK_IMPORTED_MODULE_22__some__","__WEBPACK_IMPORTED_MODULE_23__group__","__WEBPACK_IMPORTED_MODULE_24__group_by__","__WEBPACK_IMPORTED_MODULE_25__group_to_map__","__WEBPACK_IMPORTED_MODULE_26__get_wrap_behavior__","__WEBPACK_IMPORTED_MODULE_27__wrap_behavior__","__WEBPACK_IMPORTED_MODULE_28__number2color__","__WEBPACK_IMPORTED_MODULE_29__parse_radius__","__WEBPACK_IMPORTED_MODULE_30__clamp__","__WEBPACK_IMPORTED_MODULE_31__fixed_base__","__WEBPACK_IMPORTED_MODULE_32__is_decimal__","__WEBPACK_IMPORTED_MODULE_33__is_even__","__WEBPACK_IMPORTED_MODULE_34__is_integer__","__WEBPACK_IMPORTED_MODULE_35__is_negative__","__WEBPACK_IMPORTED_MODULE_36__is_number_equal__","__WEBPACK_IMPORTED_MODULE_37__is_odd__","__WEBPACK_IMPORTED_MODULE_38__is_positive__","__WEBPACK_IMPORTED_MODULE_39__max__","__WEBPACK_IMPORTED_MODULE_40__max_by__","__WEBPACK_IMPORTED_MODULE_41__min__","__WEBPACK_IMPORTED_MODULE_42__min_by__","__WEBPACK_IMPORTED_MODULE_43__mod__","__WEBPACK_IMPORTED_MODULE_44__to_degree__","__WEBPACK_IMPORTED_MODULE_45__to_integer__","__WEBPACK_IMPORTED_MODULE_46__to_radian__","__WEBPACK_IMPORTED_MODULE_47__for_in__","__WEBPACK_IMPORTED_MODULE_48__has__","__WEBPACK_IMPORTED_MODULE_49__has_key__","__WEBPACK_IMPORTED_MODULE_50__has_value__","__WEBPACK_IMPORTED_MODULE_51__keys__","__WEBPACK_IMPORTED_MODULE_52__is_match__","__WEBPACK_IMPORTED_MODULE_53__values__","__WEBPACK_IMPORTED_MODULE_54__lower_case__","__WEBPACK_IMPORTED_MODULE_55__lower_first__","__WEBPACK_IMPORTED_MODULE_56__substitute__","__WEBPACK_IMPORTED_MODULE_57__upper_case__","__WEBPACK_IMPORTED_MODULE_58__upper_first__","__WEBPACK_IMPORTED_MODULE_59__get_type__","__WEBPACK_IMPORTED_MODULE_60__is_arguments__","__WEBPACK_IMPORTED_MODULE_61__is_array__","__WEBPACK_IMPORTED_MODULE_62__is_array_like__","__WEBPACK_IMPORTED_MODULE_63__is_boolean__","__WEBPACK_IMPORTED_MODULE_64__is_date__","__WEBPACK_IMPORTED_MODULE_65__is_error__","__WEBPACK_IMPORTED_MODULE_66__is_function__","__WEBPACK_IMPORTED_MODULE_67__is_finite__","__WEBPACK_IMPORTED_MODULE_68__is_nil__","__WEBPACK_IMPORTED_MODULE_69__is_null__","__WEBPACK_IMPORTED_MODULE_70__is_number__","__WEBPACK_IMPORTED_MODULE_71__is_object__","__WEBPACK_IMPORTED_MODULE_72__is_object_like__","__WEBPACK_IMPORTED_MODULE_73__is_plain_object__","__WEBPACK_IMPORTED_MODULE_74__is_prototype__","__WEBPACK_IMPORTED_MODULE_75__is_reg_exp__","__WEBPACK_IMPORTED_MODULE_76__is_string__","__WEBPACK_IMPORTED_MODULE_77__is_type__","__WEBPACK_IMPORTED_MODULE_78__is_undefined__","__WEBPACK_IMPORTED_MODULE_79__is_element__","__WEBPACK_IMPORTED_MODULE_80__request_animation_frame__","__WEBPACK_IMPORTED_MODULE_81__clear_animation_frame__","__WEBPACK_IMPORTED_MODULE_82__augment__","__WEBPACK_IMPORTED_MODULE_83__clone__","__WEBPACK_IMPORTED_MODULE_84__debounce__","__WEBPACK_IMPORTED_MODULE_85__memoize__","__WEBPACK_IMPORTED_MODULE_86__deep_mix__","__WEBPACK_IMPORTED_MODULE_87__each__","__WEBPACK_IMPORTED_MODULE_88__extend__","__WEBPACK_IMPORTED_MODULE_89__index_of__","__WEBPACK_IMPORTED_MODULE_90__is_empty__","__WEBPACK_IMPORTED_MODULE_91__is_equal__","__WEBPACK_IMPORTED_MODULE_92__is_equal_with__","__WEBPACK_IMPORTED_MODULE_93__map__","__WEBPACK_IMPORTED_MODULE_94__map_values__","__WEBPACK_IMPORTED_MODULE_95__mix__","__WEBPACK_IMPORTED_MODULE_96__get__","__WEBPACK_IMPORTED_MODULE_97__set__","__WEBPACK_IMPORTED_MODULE_98__pick__","__WEBPACK_IMPORTED_MODULE_99__omit__","__WEBPACK_IMPORTED_MODULE_100__throttle__","__WEBPACK_IMPORTED_MODULE_101__to_array__","__WEBPACK_IMPORTED_MODULE_102__to_string__","__WEBPACK_IMPORTED_MODULE_103__unique_id__","__WEBPACK_IMPORTED_MODULE_104__noop__","__WEBPACK_IMPORTED_MODULE_105__identity__","__WEBPACK_IMPORTED_MODULE_106__size__","__WEBPACK_IMPORTED_MODULE_107__measure_text_width__","__WEBPACK_IMPORTED_MODULE_108__get_ellipsis_text__","__WEBPACK_IMPORTED_MODULE_109__cache__","__WEBPACK_IMPORTED_MODULE_0__filter__","__WEBPACK_IMPORTED_MODULE_1__contains__","__WEBPACK_IMPORTED_MODULE_1__is_match__","__WEBPACK_IMPORTED_MODULE_2__is_array__","__WEBPACK_IMPORTED_MODULE_3__is_plain_object__","__WEBPACK_IMPORTED_MODULE_1__max__","__WEBPACK_IMPORTED_MODULE_2__min__","__WEBPACK_IMPORTED_MODULE_1__pull_at__","__WEBPACK_IMPORTED_MODULE_1__is_string__","__WEBPACK_IMPORTED_MODULE_2__is_function__","__WEBPACK_IMPORTED_MODULE_0__uniq__","__WEBPACK_IMPORTED_MODULE_1__is_nil__","__WEBPACK_IMPORTED_MODULE_0__group_to_map__","__WEBPACK_IMPORTED_MODULE_0__is_number__","__WEBPACK_IMPORTED_MODULE_0__has__","__WEBPACK_IMPORTED_MODULE_0__to_string__","__WEBPACK_IMPORTED_MODULE_0__mix__","__WEBPACK_IMPORTED_MODULE_1__is_plain_object__","__WEBPACK_IMPORTED_MODULE_2__get_type__","__WEBPACK_IMPORTED_MODULE_3__is_prototype__","__WEBPACK_IMPORTED_MODULE_1__is_equal__","__WEBPACK_IMPORTED_MODULE_0__is_string__","__WEBPACK_IMPORTED_MODULE_0__is_object__","__WEBPACK_IMPORTED_MODULE_2__is_number__","__WEBPACK_IMPORTED_MODULE_0__reduce__","__WEBPACK_IMPORTED_MODULE_1__to_string__","__WEBPACK_IMPORTED_MODULE_2__measure_text_width__","WrappedTree","moveRight","convertBack","firstWalk","setExtremes","ih","updateIYL","separate","positionRoot","mssr","cl","mscl","moveSubtree","nextRightContour","nextLeftContour","setLeftThread","setRightThread","distributeExtra","modsumcl","modsumsr","secondWalk","modsum","addChildSpacing","modsumdelta","dendrogram","DendrogramLayout","dendrogramLayout","wrappedTreeFromNode","childrenCount","childWT","getDrawingDepth","minChildDepth","prevLeaf","indentedTree","IndentedLayout","_options$indent","_options$dropCap","dropCap","_options$direction","indentedLayout","positionNode","displacementX","prevParent","preY","mindmap","MindmapLayout","mindmapLayout","totalHeight","thirdWalk","childrenHeight","childrenTotalHeight","buildTextureDataWithOneEdgeAttr","attributeStringMap","radialLayout","VERTICAL_LAYOUTS","rScale","radScale","avgRad","radDiff","gpuDetector","parameters","getBrowserName","G6Util","GpuUtil","BrowserUtil","layoutData","Hierarchy","oRegisterLayout","WebWorker","workerScirptURL","blob","LayoutWorker","workerScriptURL","workerCode","LAYOUT_MESSAGE","isLayoutMessage","handleLayoutMessage","LayoutClass","layoutMethod_1","layoutWorker","mockRaf","mockCaf","reqId","helper","requestId","GPU_LAYOUT_NAMES","LAYOUT_PIPES_ADJUST_NAMES","workerData","reslove","onTick_1","animate_1","isDefaultAnimateLayout_1","enableTick","onTick_2","hasGPUVersion","addLayoutOrder","onTick_3","animate_2","isDefaultAnimateLayout_2","prevHasNodes","preLayoutTypes","initHiddenPromise","getGPUEnabled","layoutEndFormatted","hasLayout","positionMap","sourcePosition","targetPosition","hasPresetCallback","noPresetCallback","preset","isGPU","presetLayout","allData","offScreenCanvas","gpuWorkerAbility","filteredLayoutCfg","filterObject","offscreen","eventData","onTick","updateLayoutPosition","updateGPUWorkerLayoutPosition","otherCfg","preNodes","AbstractLayout","vertexEdgeData","layoutName","enableGPU","SVG","clientWidth","clientHeight","renderer","GSVGCanvas","canvasCfg","GCanvas","watermarker","watermarkStr","watermarkbase64","backgroundColor","widths","vCanvasEl","canvasDom","dataURL","svgDocType","svgDoc","svgData","compositeOperation","imageConfig","vContainerDOM","vHeight","vWidth","canvasOptions","vCanvas","vGroup","wmWidth","wmHeight","fileName","mime","bstr","u8arr","blobObj_1","imgURL","waterMarkerConfig","compatible","texts","displayTexts","tooltipDOMs","traverseClone","hash","cloneObj","deepClone","TreeGraph","treeData","origin_1","childrenList","toPoint","fitView","layoutConfig","cacheChidMap_1","isHidden","cachedItems","parentData","origin_2","clearStack","PluginBase","cfgs","bindEvents","PluginBase$1","_extendStatics","GRID_PNG","graphContainer","gridContainer","gridContainerWidth","gridContainerHeight","isFollow","Grid$1","containers","styleElements","insertCss","containerId","styleElement","createStyleElement","insertCssModule","Menu","menu","itemTypes","shouldBegin","menuDom","getContent","handleMenuClick","handleMenuClickWrapper","graphTop","graphLeft","triggeredByFirstClick","Menu$1","DEFAULT_MODE","KEYSHAPE_MODE","DELEGATE_MODE","MiniMap","containerDOM","isFireFox","isSafari","dragging","zoom","dragstartevent","dragListener","dragendListener","dragendevent","totaldx","totaldy","graphCanvasEl","correctLeft","correctTop","graphGroup","clonedGroup","comboGroup_1","mappedItem","cKeyShape","comboGroup_2","delegateStyle","isRefresh","graphBBox","graphZoom","Minimap","getEucliDis","pointA","pointB","getDotProduct","ej","projectPointToEdge","Bundling","nodeIdMap","divRate","edgePoints","edgeBundles","iterRate","divisionLength_1","currentDivisonLength_1","newEdgePoints_1","ep","oriDivisionLength","edgePoint","bundleThreshold","iSource","iTarget","jSource","jTarget","score","aScore","sScore","pScore","vScore","dotProduct","iMid","jMid","vij","vji","pMid","eidx","kp","edgePointForces","spring","electrostatic","pidx","edgeBundle","resForce","eb","Bundling$1","DELTA","lensDelegateStyle","Fisheye","lensDelegate","lensCenter","mousePos","minR","dragPrePos","newD","minD","cachedMagnifiedModels","cachedOriginPositions","showLabel","molecularParam","mCenter","delegateCenterDiff","dist2","magnifiedDist","shapes","shapeLength","cacheLength","ori","textLength","trigger","scaleDBy","scaleRBy","nd","dPercentText","textY","Fisheye$2","getEventPath","ToolBar","toolBar","toolBarDOM","undoDom","undoDomIcon","redoDom","redoDomIcon","undoStack","redoStack","undoStackLen","redoStackLen","currentData","data_1","afterCombos","createdCombo","targetCombo_1","data_2","beforeCombos","targertCombo","ratioOut","ratioIn","ToolBar$1","Tooltip","tooltip","fixToNode","Tooltip$2","TIMELINE_START","TIMELINE_END","VALUE_CHANGE","TIMEBAR_CONFIG_CHANGE","PLAY_PAUSE_BTN","NEXT_STEP_BTN","PRE_STEP_BTN","TimeBarTooltip","background","arrowWidth","arrowHeight","TimeBarTooltip$1","Button","buttonGroup","sideLength","Button$1","DEFAULT_RECT_FILL","DEFAULT_RECT_STROKE","DEFAULT_PLAYBTN_STYLE","DEFAULT_PREBTN_STYLE","DEFAULT_NEXTBTN_STYLE","DEFAULT_SPEED_CONTROLLER_STYLE","DEFAULT_TIMETYPE_CONTROLLER_STYLE","DEFAULT_CONTROLLER_CONFIG","SPEED_CONTROLLER_OFFSET","TOGGLE_MODEL_OFFSET","TIME_TYPE","ControllerBtn","controllerCfg","hideTimeTypeController","containerStyle","playBtnStyle","preBtnStyle","nextBtnStyle","realY","prePaddingX","prePaddingY","preR","nxtPaddingX","nxtPaddingY","nxtR","currentBBox","speedControllerStyle","scroller","pointer","speedGroup","axisY","defaultTimeType","timeTypeControllerStyle","_j","isChecked","currentPointerY","pointerMatrix","currentYIdx","targetYIdx","yDiff","minDist_1","ControllerBtn$1","DEFAULT_SELECTEDTICK_STYLE","DEFAULT_UNSELECTEDTICK_STYLE","TimeBarSlice","tickLabelFormatter","selectedTickStyle","unselectedTickStyle","tooltipBackgroundColor","tooltipFomatter","tickLabelStyle","realWidth","labelLineHeight","labelAreaHeight","ticksAreaHeight","ticksLength","tickWidth","sliceGroup","tickRects","startTickId","endTickId","tickStyle","pickRect","rectBBox","lineStartY","labelStartY","textBBox","targetRect","tickRects_1","unselectedTickStyle_1","tickRect","startTickRectId","isSync","previousEndTickRectId","TimeBarSlice$1","methodCache","getTickMethod","registerTickMethod","Scale","assign","formatter","tickMethod","ticks","Category","scaledValue","domainRange","twoDigitsOptional","twoDigits","threeDigits","fourDigits","word","literal","shorten","sLen","monthUpdate","arrName","i18n","lowerCaseArr","origObj","args_1","dayNames","monthNames","monthNamesShort","dayNamesShort","defaultI18n","dayOfMonth","globalI18n","setGlobalDateI18n","regexEscape","pad","formatFlags","dateObj","monthParse","emptyDigits","emptyWord","amPm","timezoneOffset","minutes","cent","globalMasks","setGlobalDateMasks","masks","literals","$0","$1","combinedI18nSettings","parse","dateStr","today","dateInfo","parseInfo","newFormat","specifiedFields","requiredFields","field","requiredField","parser","dateTZ","validateFields","fecha","bisector","_lo","_hi","FORMAT_METHOD","timeFormat","fecha1","toTimeStamp","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","intervals","getTickInterval","tickCount","TimeCat","tickIndex","Continuous","rangeMin","firstTick","lastTick","Linear","calBase","log","getLogPositiveMin","positiveMin","Log","appendPercent","Pow","Time","numberValue","minConfig","maxConfig","timeStamps_1","secondMin_1","timeStamp","Quantize","minIndex","minTick","minIndexPercent","maxIndexPercent","Quantile","getClass","registerClass","cls","Identity","calculateCatTicks","tickInterval","showLast","ticks_1","lastValue","d3Linear","nice","D3Linear","DEFAULT_COUNT","e10","e5","e2","domain","i0","i1","stop","tickIncrement","d3ArrayTicks","reverse","power","snapMultiple","snapType","intervalTicks","maxTick","availableInterval","tickValue","strictLimit","defaultMin","defaultMax","minLimit","maxLimit","tickMin","tickMax","d3LinearTickMethod","prettyNumber","DEFAULT_Q","simplicity","lmax","lstep","simplicityMax","density","dMin","dMax","lMin","lMax","densityMax","coverage","coverageMax","span","half","legibility","extended","onlyLoose","step_1","dm","cm","minStart","maxStart","i_1","lStep","calculateLogTicks","avg","pretty","h5","calculatePowTicks","quantileSorted","calculateTicks","linearPretty","calculateTimeTicks","minTickInterval","timeCat","catTicks","getYear","createYear","year","getMonth","diffMonth","minYear","maxYear","minMonth","maxMonth","creatMonth","month","diffDay","diffHour","diffMinus","timePretty","yearInterval","monthInterval","mmMoth","dMonths","mday","day","ddays","hour","hours","dHours","dMinus","minSecond","dSeconds","seconds","cat","rPretty","quantile","registerScale","pointsToPath","getLinePath","getSmoothLinePath","pathUtil.catmullRom2Bezier","dataToPath","dataToRectPath","barWidth","rectPoints","rectPoint","getRectPoints","getRectPath","getAreaLineY","lineY","linePathToAreaPath","areaPath","lineYPx","isClosed","LINE_STYLE","AREA_STYLE","Trend","isArea","lineStyle","areaStyle","trendGroup","Trend$1","DEFAULT_STYLE","SIMPLE_DEFAULT_STYLE","Handler","highLightFill","Handler$1","BACKGROUND_STYLE","SIMPLE_BACKGROUND_STYLE","FOREGROUND_STYLE","DEFAULT_HANDLER_WIDTH","HANDLER_STYLE","TEXT_STYLE","TICK_LABEL_STYLE","TICK_LINE_STYLE","TrendTimeBar","offsetXRange","trendCfg","foregroundStyle","handlerStyle","textStyle","_k","_l","_m","minText","maxText","_p","timeBarType","trendComponent","sliderGroup","textGroup","handlerWidth","handlerHeight","minHandleGroup","maxHandleGroup","tickData","lastX","textX","minHandleShapeGroup","maxHandleShapeGroup","timeSelectX","offsetRange","minData","maxData","minAttrs","maxAttrs","TEXTPADDING","minTextShape","maxTextShape","minBBox","maxBBox","TrendTimeBar$1","DEFAULT_SIMPLE_HEIGHT","DEFAULT_TREND_HEIGHT","TimeBar","putInGraphContainer","timeBarContainer","timeBarGroup","play","timebar","trend","slider","defaultHeight","getValue_1","handleMouseUp","timebarInstance","type_1","trendData","rangeChange","filterItemTypes","changeData","getDate_1","shouldIgnore_1","minDate_1","maxDate_1","originNodes","originEdges","currentNodeExistMap_1","currentEdgeExistMap_1","hitRange","shouldShow","endsExist","sourceVisible","targetVisible","TimeBar$2","getImgNaturalDimension","nWidth","nHeight","ImageMiniMap","cWidth","cHeight","aspectRatio","graphCanvasBBox","graphCanvasBBoxMean","graphCanvasBBoxSize","expandedGraphCanvasBBox","graphMatrix","invertGraphMatrix","minXY","vpToMc","imgDOM","naturalSize","oriImgDOM","ImageMinimap$1","EdgeFilterLens","showNodeLabel","showEdgeLabel","hitNodesMap","fCenter","vShapes","hitEdges","vShape","EdgeFilterLens$2","alignLineStyle","SnapLine","delegateShape","horizontalLines","verticalLines","itemAlignType","originPoint","lc","horizontalDis","verticalDis","alignCfg","horizontals","verticals","alignLines","horizontal","refLine","refPoint","lineCenterX","lineAttrs","lineCenterY","lineAtts","SnapLine$2","ALLOW_EVENTS","Legend","multiple","margin","posIdxMap","containerCSS","marginValue","shapeGroup","subGroup","legendInactive","legendTextInactive","legendActive","legendTextActive","itemGroup","filterFunctions","activeState","inactiveState","activeNodeLegend","activeEdgeLegend","activeCount","typeFuncs","typeFunc","graphItem","active","activeLegend","itemsData","keyShapeBBox","attrs_1","titleShape","titleGroup","titleGroupBBox","defaultTitleStyle","titleConfig","lcBBox","nodeGroupBBox","nodeGroupBeginX","nodeGroupBeginY","nodeGroupMatrix","titleGroupMatrix","edgeGroupMatrix_1","edgeGroupMatrix_2","edgeGroupMatrix","edgeGroupBBox","beginPos","backRect","horiSep","vertiSep","nodeLegendSize","cNodeGroup","keyShapeWidth","keyShapeHeight","nw","edgeLegendSize","ew","widthDiff","movement_1","shouldAdjustGroup","Legend$1","CANVAS_ANNOTATION_ID","Annotation","title","content","collapseExpandDOM","contentDOM","closeDOM","graphCantainer","containerCfg","graphContainerBBox","linkCanvas","linkGroup","defaultData","gLeft","gRight","gTop","gBottom","graphContainerHeight","graphContainerWidth","otherStyle","containerPosition","cBBox","newWidth","newHeight","selfObj","cardInfoMap","graphLeftTopCanvas","graphRightBottomCanvas","graphRight","graphBottom","cardInfo","card","px2Num","newLeft","newTop","minHeight","minWidth","propsX","propsY","propsTitle","propsContent","maxTitleLength","defaultBegin","otherCardCfg","getTitle","getContentPlaceholder","getTitlePlaceHolder","contentPlaceholder","titlePlaceholder","newCard","minHeightPx","containerBBox","containerTop","beginLeft","propsBeginRight","propsBeginTop","beginBottom","beginRight","beginTop","cardWidth","currentRow","lastCardBBox","cardBBox","getPathItem2Card","linkStyle","hasPropsPosition","containerBottom","onAnnotationChange","containerWidth","computeStyle","sidePadding","collapseType","iconType","onMouseEnterIcon","onMouseLeaveIcon","itemHighlightState","linkHighlightStyle","onClickIcon","closeType","editable","targetClass","inputTag","inputWrapper","blurEvt","unmovableClasses","draggingCard","cardHeight","top_1","rowItems","sideMargin","titleWidth","saveClosed","Annotation$2","getPath","startPoints","endPoints","skey","spos","ekey","epos","xdist","ydist","controlPoint","annotationCanvas","itemLinkPoints","clientPos","cardTop","cardLeft","cardRight","cardBottom","cardLinkPoints","Plugin","ImageMinimap","defaultIcon","iconName","markR","markStyle","defaultDirection","iconW","iconH","topPos","bottomPos","existLinkPoint","preRect","preRectShow","preRectStyle","logoIcon","logoIconStyle","stateIcon","iconStyle","descriptionCfg","descriptionStyle","descriptionPaddingTop","logoIconShape","currentLogoIconAttr","description","preRectShape","logoW","logoOffset","stateIconShape","currentStateIconAttr","stateW","stateOffset","stateIconStyle","leftBottom","defaultInnerR","markLeftBottom","markRightBottom","FAN_NAME_PREFIX","drawFans","updateFans","donutAttrs","donutColorMap","attrNum","getDonutConfig","configs","totalValue","getDonutSize","arcR","arcBegin","beginAngle","drawFan","fanConfig","fanIndex","drawWhole","updateShape","arcEnd","isBig","visitMap","fanKeys","keyShapeR","getBBoxFromPoint","getBBoxFromPoints","filterConnectPoints","pointsLength","simplifyPolyline","getExpandedBBox","isHorizontalPort","port","getExpandedBBoxPoint","anotherPoint","getPointsFromBBox","isPointOutsideBBox","getBBoxXCrossPoints","getBBoxYCrossPoints","getBBoxCrossPointsByPoint","_costByPoints","heuristicCostEstimate","reconstructPath","pathPoints","pointById","cameFrom","currentId","iterator","isSegmentsIntersected","v2x","v2y","v3x","v3y","v4x","v4y","pd1","pd2","pd3","pd4","isSegmentCrossingBBox","pb","pd","getNeighborPoints","pathFinder","goal","sBBox","tBBox","closedSet","openSet","gScore","fScore","sortedOpenSet","SortedArray","minId","neighborPoints","iterateNeighbors","tentativeGScore","isBending","getBorderRadiusPoints","getPathWithBorderRadiusByPolyline","pathSegments","getPolylinePoints","sNode","tNode","sKeyShapeBBox","tKeyShapeBBox","sxBBox","txBBox","sPoint","tPoint","lineBBox","sMixBBox","tMixBBox","connectPoints","centerPoint","removeRedundantPoint","beginPoint","continueSameX","continueSameY","removeIdx","idxRange","midIdx","manhattanDist","simplePolyline","endNode","getObstacleMap","getDirectionAngle","deltaX","deltaY","getAngleDiff","angle1","angle2","directionChange","estimateCost","distFunc","cost","getBoxPoints","oriPoint","isInside","expandBBox","directions_1","boundLine","insterctP_1","insterctP","getDirectionChange","scaleStartPoint","directionAngle","currentCameFrom","prevDirectionAngle","scaleEndPoint","pointZero","currentX","currentY","routerCfg","penalties","firstStep","remainLoops","neighborCost","costFromStart","curCost","endPointMap","directionPenalties","neighborGScore","defaultRouteCfg","obstacles","simple","pathArray_1","polylinePoints","res_1","DRAG_OFFSET","DragCanvas","origin","expandWidth","expandHeight","touches","event1","event2","nodeLen","isKeyShape","self_1","zoomCanvas","optimizeZoom","oriVis","children_2","targetIsCanvas","DragNode","isAnchorPoint","currentNodeId","dragNodes","locked","beforeDragNodes_1","parentComboMap_1","parentComboId","stackData_1","targetComboModel_1","nodeModel","newParentCombo","restore","updateEdge","onlyChangeComboSize","updateParentCombos","paramGraph","paramTargets","comboParentMap","clickNodeId","ActivateRelations","shouldClearStatusOnSecond","vEdges","vEdgeLength","inactiveItems","activeItems","hasSelected","vEdge","vEdgeId","rEdges","rEdgeLegnth","DEFAULT_TRIGGER","BrushSelect","brush","selectOnCombo","isCombo","selectedState","shouldUpdate","isBBoxCenterInRect","selectedNodes","selectedIds","selectedCombos","triggerLowerCase","codeLowerCase","ClickSelect","keydown","selectedItem","itemSelectable","ZoomCanvas","fixSelectedItems","sensitivity","optimizeZoom_1","optimized","nodesLength_1","edgesLength_1","childrenLength","edgeIndex","curOptimized","fixNodes","fixEdges","fixNodesLength","originStyle","groupMatrix","itemStyle","itemFontSize","shapeFontSize","oriFontSize","oriLineWidth","fixEdgesLength","EdgeTooltip","CollapseExpand","sourceData","traverseCombo","DragCombo","currentCombo","dragCombos","beforeDragItems","model_1","sourceBBox","centerX_1","centerY_1","width_1","calcCombos","cmodel","droppedCombo","comboDropedOn","stack_1","edgesToBeUpdate","paramItem","paramEdgesMap","CollapseExpandCombo","relayout","isItemIntersecPolygon","LassoSelect","lasso","shouldDeselect","lassoContour","DEFAULT_KEY","ALLOW_KEYS","CreateEdge","getEdgeConfig","edgeConfig","currentEdge","DEFAULT_COMBINED_KEY","ShortcutsCall","combinedKeyLowerCase","ScrollCanvas","zoomKeys","keyDown","Algorithm","AlgorithmSync","AlgorithmAsync","G6","visibleNodes","trackId","topNode","tempNode","subNodes","graphNodes","getLimitLabel","rawGroup","insert","connectKeys","edgeCountMap","tempId","useRoute","useTitle","snapshotId","showSize","screenshotUrl","snapshot","localSnapshot","snapshotStorage","gmOk","exportSnapshotAsJpgUrl","exportSnapshotAsZipUrl","bf","screenshotStorage","rootNode","listToTree","onDelete","track","trackVisible"],"mappings":"myEAAO,SAASA,GAAcC,EAAK,CACjC,OAAO,OAAOA,GAAQ,SAAW,KAAKA,CAAG,GAAK,KAAKA,CAAG,EACxD,CCFe,SAASC,GAAkBC,EAAKC,EAAK,EAC9CA,GAAO,MAAQA,EAAMD,EAAI,UAAQC,EAAMD,EAAI,QAC/C,QAASE,EAAI,EAAGC,EAAO,IAAI,MAAMF,CAAG,EAAGC,EAAID,EAAKC,IAAKC,EAAKD,CAAC,EAAIF,EAAIE,CAAC,EACpE,OAAOC,CACT,CCHe,SAASC,GAA4BC,EAAGC,EAAQ,CAC7D,GAAKD,EACL,IAAI,OAAOA,GAAM,SAAU,OAAOE,GAAiBF,EAAGC,CAAM,EAC5D,IAAIE,EAAI,OAAO,UAAU,SAAS,KAAKH,CAAC,EAAE,MAAM,EAAG,EAAE,EAErD,GADIG,IAAM,UAAYH,EAAE,cAAaG,EAAIH,EAAE,YAAY,MACnDG,IAAM,OAASA,IAAM,MAAO,OAAO,MAAM,KAAKH,CAAC,EACnD,GAAIG,IAAM,aAAe,2CAA2C,KAAKA,CAAC,EAAG,OAAOD,GAAiBF,EAAGC,CAAM,EAChH,CCRe,SAASG,GAAgBC,EAAUC,EAAa,CAC7D,GAAI,EAAED,aAAoBC,GACxB,MAAM,IAAI,UAAU,mCAAmC,CAE3D,CCHe,SAASC,GAAaC,EAAOC,EAAM,CAChD,GAAIC,GAAQF,CAAK,IAAM,UAAYA,IAAU,KAAM,OAAOA,EAC1D,IAAIG,EAAOH,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pR,GAAiBgpR,EAAc,EAAE,GACpCI,GACG,MAAMH,GAAgB,QAAQL,EAAW,KAAK,CAAA,GAGlD,GAAI,EAELI,EAAc,MAAM,OAASH,EAAS,QAChC/pR,GAAA,QACN,YAAY+pR,EAAS,KAAK;AAAA,KACxBG,EAAc,MAAM,OAASH,EAAS,KACxC;AAAA,uBAAA,EAEFG,EAAc,MAAQA,EAAc,MAAM,MAAM,EAAGH,EAAS,KAAK,GAEnE,MAAMQ,EAAK,MAAMC,GAAkB,QAAQV,EAAW,KAAK,EAC3D,GAAI,CAACS,EAAI,CACPvqR,GAAQ,OAAO,QAAQ,EACvB,MACF,CACAgqR,EAAc,MAAQ,IAAI,gBACxB,IAAI,KAAK,CAACO,CAAE,EAAG,CACb,KAAM,WAAA,CACP,CAAA,EAEHN,EAAS,MAAQC,EACRO,EAAA,MAAQC,GAAWR,EAAc,KAAK,EAC/Cxb,EAAM,MAAQ,MAAQwb,EAAc,SAAWA,EAAc,MAC7D,MAAMtoR,GAAM,GAAG,EACVJ,EAAU,QACbA,EAAU,MAAQipR,EAAS,MAC7B,CACD,EAED,MAAMA,EAAWjtR,KACXgE,EAAYhE,KACZiE,EAAajE,GAAW,CAAC,EAEzBmtR,EAAW,SAAY,CAC3B3qR,GAAQ,QAAQ,aAAa,EAC7B,MAAM4B,GAAM,GAAI,EAChBlC,EAAO,QAAQ,CACb,KAAM,GAAA,CACP,CAAA,EAGGkrR,EAAQptR,KAIRqtR,EAAertR,GAAW,EAAK,EACrC,OAAA5K,GAAY,IAAM,CACZg4R,EAAM,QACRC,EAAa,MAAQ,GACvB,CACD","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885]} \ No newline at end of file diff --git a/assets/_404Page-b8tPorP5.js b/assets/_404Page-v_OEFicH.js similarity index 81% rename from assets/_404Page-b8tPorP5.js rename to assets/_404Page-v_OEFicH.js index 07b4630..837e654 100644 --- a/assets/_404Page-b8tPorP5.js +++ b/assets/_404Page-v_OEFicH.js @@ -1,2 +1,2 @@ -import{d as i,f as e,u as r,m as p,h as c,aq as d,ar as l,o as t}from"./index-KbMk1nPu.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},_={key:0},u={key:1},x=i({__name:"_404Page",setup(m){const a=l(),{fullPath:o}=a.redirectedFrom??{};return(n,s)=>(t(),e("div",f,[r(o)?(t(),e("div",_,p("访问的地址 "+r(o)+" 不存在"),1)):(t(),e("div",u,"欢迎来到404页面")),c("a",{href:"/",onClick:s[0]||(s[0]=d(h=>n.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{x as default}; -//# sourceMappingURL=_404Page-b8tPorP5.js.map +import{d as i,f as e,u as r,m as p,h as c,aq as d,ar as l,o as t}from"./index-O1rtA3Eg.js";const f={flex:"","flex-col":"","flex-items-center":"","w-100vw":"","pt-50px":"","gap-20px":""},_={key:0},u={key:1},x=i({__name:"_404Page",setup(m){const a=l(),{fullPath:o}=a.redirectedFrom??{};return(n,s)=>(t(),e("div",f,[r(o)?(t(),e("div",_,p("访问的地址 "+r(o)+" 不存在"),1)):(t(),e("div",u,"欢迎来到404页面")),c("a",{href:"/",onClick:s[0]||(s[0]=d(h=>n.$router.replace({path:"/"}),["prevent"]))}," 回到首页 ")]))}});export{x as default}; +//# sourceMappingURL=_404Page-v_OEFicH.js.map diff --git a/assets/_404Page-b8tPorP5.js.map b/assets/_404Page-v_OEFicH.js.map similarity index 90% rename from assets/_404Page-b8tPorP5.js.map rename to assets/_404Page-v_OEFicH.js.map index 0029891..5b55a48 100644 --- a/assets/_404Page-b8tPorP5.js.map +++ b/assets/_404Page-v_OEFicH.js.map @@ -1 +1 @@ -{"version":3,"file":"_404Page-b8tPorP5.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["\n\n"],"names":["route","useRoute","fullPath"],"mappings":"8OAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,EAAAF,EAAM,gBAAkB,CAAA"} \ No newline at end of file +{"version":3,"file":"_404Page-v_OEFicH.js","sources":["../../src/views/_404Page.vue"],"sourcesContent":["\n\n"],"names":["route","useRoute","fullPath"],"mappings":"8OAGA,MAAMA,EAAQC,IAER,CAAE,SAAAC,CAAa,EAAAF,EAAM,gBAAkB,CAAA"} \ No newline at end of file diff --git a/assets/import-sCnXcRHq.js b/assets/import-kVHJH7rF.js similarity index 97% rename from assets/import-sCnXcRHq.js rename to assets/import-kVHJH7rF.js index 434a67e..e4e6ee3 100644 --- a/assets/import-sCnXcRHq.js +++ b/assets/import-kVHJH7rF.js @@ -1,2 +1,2 @@ -import{j as v}from"./jszip.min-Er0t4O-W.js";import{q as _,u as A,a as E,o as S,m,w as P}from"./storage-I0hkGMKT.js";const g=(()=>{if(typeof self>"u")return!1;if("top"in self&&self!==top)try{top.window.document._=0}catch{return!1}return"showOpenFilePicker"in self})(),x=g?Promise.resolve().then(function(){return j}):Promise.resolve().then(function(){return z});async function L(...e){return(await x).default(...e)}g?Promise.resolve().then(function(){return I}):Promise.resolve().then(function(){return $});g?Promise.resolve().then(function(){return N}):Promise.resolve().then(function(){return D});const F=async e=>{const t=await e.getFile();return t.handle=e,t};var T=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((a,i)=>{t[i]={description:a.description||"Files",accept:{}},a.mimeTypes?a.mimeTypes.map(s=>{t[i].accept[s]=a.extensions||[]}):t[i].accept["*/*"]=a.extensions||[]});const r=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),n=await Promise.all(r.map(F));return e[0].multiple?n:n[0]},j={__proto__:null,default:T};function w(e){function t(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(a){return{value:a,done:n}})}return w=function(r){this.s=r,this.n=r.next},w.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return n===void 0?Promise.resolve({value:r,done:!0}):t(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return n===void 0?Promise.reject(r):t(n.apply(this.s,arguments))}},new w(e)}const k=async(e,t,r=e.name,n)=>{const a=[],i=[];var s,o=!1,c=!1;try{for(var p,l=function(u){var y,f,d,h=2;for(typeof Symbol<"u"&&(f=Symbol.asyncIterator,d=Symbol.iterator);h--;){if(f&&(y=u[f])!=null)return y.call(u);if(d&&(y=u[d])!=null)return new w(y.call(u));f="@@asyncIterator",d="@@iterator"}throw new TypeError("Object is not async iterable")}(e.values());o=!(p=await l.next()).done;o=!1){const u=p.value,y=`${r}/${u.name}`;u.kind==="file"?i.push(u.getFile().then(f=>(f.directoryHandle=e,f.handle=u,Object.defineProperty(f,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>y})))):u.kind!=="directory"||!t||n&&n(u)||a.push(k(u,t,y,n))}}catch(u){c=!0,s=u}finally{try{o&&l.return!=null&&await l.return()}finally{if(c)throw s}}return[...(await Promise.all(a)).flat(),...await Promise.all(i)]};var O=async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||"read";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:k(t,e.recursive,void 0,e.skipDirectory)},I={__proto__:null,default:O},R=async(e,t=[{}],r=null,n=!1,a=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";const i=[];let s=null;if(e instanceof Blob&&e.type?s=e.type:e.headers&&e.headers.get("content-type")&&(s=e.headers.get("content-type")),t.forEach((p,l)=>{i[l]={description:p.description||"Files",accept:{}},p.mimeTypes?(l===0&&s&&p.mimeTypes.push(s),p.mimeTypes.map(u=>{i[l].accept[u]=p.extensions||[]})):s?i[l].accept[s]=p.extensions||[]:i[l].accept["*/*"]=p.extensions||[]}),r)try{await r.getFile()}catch(p){if(r=null,n)throw p}const o=r||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!r&&a&&a(o);const c=await o.createWritable();return"stream"in e?(await e.stream().pipeTo(c),o):"body"in e?(await e.body.pipeTo(c),o):(await c.write(await e),await c.close(),o)},N={__proto__:null,default:R},U=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,r)=>{const n=document.createElement("input");n.type="file";const a=[...e.map(c=>c.mimeTypes||[]),...e.map(c=>c.extensions||[])].join();n.multiple=e[0].multiple||!1,n.accept=a||"",n.style.display="none",document.body.append(n);const i=c=>{typeof s=="function"&&s(),t(c)},s=e[0].legacySetup&&e[0].legacySetup(i,()=>s(r),n),o=()=>{window.removeEventListener("focus",o),n.remove()};n.addEventListener("click",()=>{window.addEventListener("focus",o)}),n.addEventListener("change",()=>{window.removeEventListener("focus",o),n.remove(),i(n.multiple?Array.from(n.files):n.files[0])}),"showPicker"in HTMLInputElement.prototype?n.showPicker():n.click()})),z={__proto__:null,default:U},W=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,r)=>{const n=document.createElement("input");n.type="file",n.webkitdirectory=!0;const a=s=>{typeof i=="function"&&i(),t(s)},i=e[0].legacySetup&&e[0].legacySetup(a,()=>i(r),n);n.addEventListener("change",()=>{let s=Array.from(n.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(s=s.filter(o=>o.webkitRelativePath.split("/").every(c=>!e[0].skipDirectory({name:c,kind:"directory"})))):s=s.filter(o=>o.webkitRelativePath.split("/").length===2),a(s)}),"showPicker"in HTMLInputElement.prototype?n.showPicker():n.click()})),$={__proto__:null,default:W},B=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const r=document.createElement("a");let n=e;"body"in e&&(n=await async function(s,o){const c=s.getReader(),p=new ReadableStream({start:y=>async function f(){return c.read().then(({done:d,value:h})=>{if(!d)return y.enqueue(h),f();y.close()})}()}),l=new Response(p),u=await l.blob();return c.releaseLock(),new Blob([u],{type:o})}(e.body,e.headers.get("content-type"))),r.download=t.fileName||"Untitled",r.href=URL.createObjectURL(await n);const a=()=>{typeof i=="function"&&i()},i=t.legacySetup&&t.legacySetup(a,()=>i(),r);return r.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(r.href),3e4),a()}),r.click(),null},D={__proto__:null,default:B};const H=(e,t)=>e.length==t.length&&e.every((r,n)=>r==t[n]),q=(e,t)=>H(new Uint8Array(e.slice(0,t.length)),t),Z=new Uint8Array([80,75,3,4]),J=e=>q(e,Z),b=async e=>{const t=e.filter(i=>i.endsWith(".json"))[0],r=e.filter(i=>i.endsWith(".png"))[0];if(!t||!r)return!1;const n=JSON.parse(await t.async("string")),a=await r.async("arraybuffer");return await P(n,a),!0},G=async()=>{const t=(await L({multiple:!0,mimeTypes:["application/zip"]})).filter(n=>n.name.endsWith(".zip"));if(t.length==0){m.warning("没有发现可导入文件");return}let r=0;t.length>0&&await Promise.any(t.map(async n=>{const a=await v.loadAsync(n);await b(a)&&r++;const i=a.filter(s=>s.endsWith(".zip"));i.length>0&&await Promise.any(i.map(async s=>{const o=await v.loadAsync(s.async("blob"));await b(o)&&r++}))})),r>0?m.success(`导入${r}条记录`):m.warning("没有发现可导入记录")},K=async(e=[])=>{if(typeof e=="string"&&(e=[e]),e.length==0)return;e=[...new Set(e)];const t=_(2);let r=0;const n=await Promise.allSettled(e.map(a=>t(async()=>{const i=A[a];if(i){const l=await E.getItem(i);if(l)return r++,l}const o=await(await S(a,void 0,{proxy:!0}).catch(l=>{throw m.error(`网络异常: ${new URL(a).host}/${l.message||""}`),console.warn(["download failed",a,l]),l})).arrayBuffer();let c,p;if(J(o)){const l=await v.loadAsync(o),[u]=l.filter(f=>f.endsWith(".json")),[y]=l.filter(f=>f.endsWith(".png"));if(!u||!y)return;p=await y.async("arraybuffer"),c=JSON.parse(await u.async("string"))}else throw new Error("file must be png or zip");return await P(c,p),r++,c})));return r==0?m.warning("没有发现可导入记录"):r==e.length?m.success(`导入${r}条快照`):r{if(typeof self>"u")return!1;if("top"in self&&self!==top)try{top.window.document._=0}catch{return!1}return"showOpenFilePicker"in self})(),x=g?Promise.resolve().then(function(){return j}):Promise.resolve().then(function(){return z});async function L(...e){return(await x).default(...e)}g?Promise.resolve().then(function(){return I}):Promise.resolve().then(function(){return $});g?Promise.resolve().then(function(){return N}):Promise.resolve().then(function(){return D});const F=async e=>{const t=await e.getFile();return t.handle=e,t};var T=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((a,i)=>{t[i]={description:a.description||"Files",accept:{}},a.mimeTypes?a.mimeTypes.map(s=>{t[i].accept[s]=a.extensions||[]}):t[i].accept["*/*"]=a.extensions||[]});const r=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),n=await Promise.all(r.map(F));return e[0].multiple?n:n[0]},j={__proto__:null,default:T};function w(e){function t(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(a){return{value:a,done:n}})}return w=function(r){this.s=r,this.n=r.next},w.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return n===void 0?Promise.resolve({value:r,done:!0}):t(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return n===void 0?Promise.reject(r):t(n.apply(this.s,arguments))}},new w(e)}const k=async(e,t,r=e.name,n)=>{const a=[],i=[];var s,o=!1,c=!1;try{for(var p,l=function(u){var y,f,d,h=2;for(typeof Symbol<"u"&&(f=Symbol.asyncIterator,d=Symbol.iterator);h--;){if(f&&(y=u[f])!=null)return y.call(u);if(d&&(y=u[d])!=null)return new w(y.call(u));f="@@asyncIterator",d="@@iterator"}throw new TypeError("Object is not async iterable")}(e.values());o=!(p=await l.next()).done;o=!1){const u=p.value,y=`${r}/${u.name}`;u.kind==="file"?i.push(u.getFile().then(f=>(f.directoryHandle=e,f.handle=u,Object.defineProperty(f,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>y})))):u.kind!=="directory"||!t||n&&n(u)||a.push(k(u,t,y,n))}}catch(u){c=!0,s=u}finally{try{o&&l.return!=null&&await l.return()}finally{if(c)throw s}}return[...(await Promise.all(a)).flat(),...await Promise.all(i)]};var O=async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||"read";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:k(t,e.recursive,void 0,e.skipDirectory)},I={__proto__:null,default:O},R=async(e,t=[{}],r=null,n=!1,a=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";const i=[];let s=null;if(e instanceof Blob&&e.type?s=e.type:e.headers&&e.headers.get("content-type")&&(s=e.headers.get("content-type")),t.forEach((p,l)=>{i[l]={description:p.description||"Files",accept:{}},p.mimeTypes?(l===0&&s&&p.mimeTypes.push(s),p.mimeTypes.map(u=>{i[l].accept[u]=p.extensions||[]})):s?i[l].accept[s]=p.extensions||[]:i[l].accept["*/*"]=p.extensions||[]}),r)try{await r.getFile()}catch(p){if(r=null,n)throw p}const o=r||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!r&&a&&a(o);const c=await o.createWritable();return"stream"in e?(await e.stream().pipeTo(c),o):"body"in e?(await e.body.pipeTo(c),o):(await c.write(await e),await c.close(),o)},N={__proto__:null,default:R},U=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,r)=>{const n=document.createElement("input");n.type="file";const a=[...e.map(c=>c.mimeTypes||[]),...e.map(c=>c.extensions||[])].join();n.multiple=e[0].multiple||!1,n.accept=a||"",n.style.display="none",document.body.append(n);const i=c=>{typeof s=="function"&&s(),t(c)},s=e[0].legacySetup&&e[0].legacySetup(i,()=>s(r),n),o=()=>{window.removeEventListener("focus",o),n.remove()};n.addEventListener("click",()=>{window.addEventListener("focus",o)}),n.addEventListener("change",()=>{window.removeEventListener("focus",o),n.remove(),i(n.multiple?Array.from(n.files):n.files[0])}),"showPicker"in HTMLInputElement.prototype?n.showPicker():n.click()})),z={__proto__:null,default:U},W=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,r)=>{const n=document.createElement("input");n.type="file",n.webkitdirectory=!0;const a=s=>{typeof i=="function"&&i(),t(s)},i=e[0].legacySetup&&e[0].legacySetup(a,()=>i(r),n);n.addEventListener("change",()=>{let s=Array.from(n.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(s=s.filter(o=>o.webkitRelativePath.split("/").every(c=>!e[0].skipDirectory({name:c,kind:"directory"})))):s=s.filter(o=>o.webkitRelativePath.split("/").length===2),a(s)}),"showPicker"in HTMLInputElement.prototype?n.showPicker():n.click()})),$={__proto__:null,default:W},B=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const r=document.createElement("a");let n=e;"body"in e&&(n=await async function(s,o){const c=s.getReader(),p=new ReadableStream({start:y=>async function f(){return c.read().then(({done:d,value:h})=>{if(!d)return y.enqueue(h),f();y.close()})}()}),l=new Response(p),u=await l.blob();return c.releaseLock(),new Blob([u],{type:o})}(e.body,e.headers.get("content-type"))),r.download=t.fileName||"Untitled",r.href=URL.createObjectURL(await n);const a=()=>{typeof i=="function"&&i()},i=t.legacySetup&&t.legacySetup(a,()=>i(),r);return r.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(r.href),3e4),a()}),r.click(),null},D={__proto__:null,default:B};const H=(e,t)=>e.length==t.length&&e.every((r,n)=>r==t[n]),q=(e,t)=>H(new Uint8Array(e.slice(0,t.length)),t),Z=new Uint8Array([80,75,3,4]),J=e=>q(e,Z),b=async e=>{const t=e.filter(i=>i.endsWith(".json"))[0],r=e.filter(i=>i.endsWith(".png"))[0];if(!t||!r)return!1;const n=JSON.parse(await t.async("string")),a=await r.async("arraybuffer");return await P(n,a),!0},G=async()=>{const t=(await L({multiple:!0,mimeTypes:["application/zip"]})).filter(n=>n.name.endsWith(".zip"));if(t.length==0){m.warning("没有发现可导入文件");return}let r=0;t.length>0&&await Promise.any(t.map(async n=>{const a=await v.loadAsync(n);await b(a)&&r++;const i=a.filter(s=>s.endsWith(".zip"));i.length>0&&await Promise.any(i.map(async s=>{const o=await v.loadAsync(s.async("blob"));await b(o)&&r++}))})),r>0?m.success(`导入${r}条记录`):m.warning("没有发现可导入记录")},K=async(e=[])=>{if(typeof e=="string"&&(e=[e]),e.length==0)return;e=[...new Set(e)];const t=_(2);let r=0;const n=await Promise.allSettled(e.map(a=>t(async()=>{const i=A[a];if(i){const l=await E.getItem(i);if(l)return r++,l}const o=await(await S(a,void 0,{proxy:!0}).catch(l=>{throw m.error(`网络异常: ${new URL(a).host}/${l.message||""}`),console.warn(["download failed",a,l]),l})).arrayBuffer();let c,p;if(J(o)){const l=await v.loadAsync(o),[u]=l.filter(f=>f.endsWith(".json")),[y]=l.filter(f=>f.endsWith(".png"));if(!u||!y)return;p=await y.async("arraybuffer"),c=JSON.parse(await u.async("string"))}else throw new Error("file must be png or zip");return await P(c,p),r++,c})));return r==0?m.warning("没有发现可导入记录"):r==e.length?m.success(`导入${r}条快照`):r{if(\"undefined\"==typeof self)return!1;if(\"top\"in self&&self!==top)try{top.window.document._=0}catch(e){return!1}return\"showOpenFilePicker\"in self})(),t=e?Promise.resolve().then(function(){return l}):Promise.resolve().then(function(){return v});async function n(...e){return(await t).default(...e)}const r=e?Promise.resolve().then(function(){return y}):Promise.resolve().then(function(){return b});async function i(...e){return(await r).default(...e)}const a=e?Promise.resolve().then(function(){return m}):Promise.resolve().then(function(){return k});async function o(...e){return(await a).default(...e)}const s=async e=>{const t=await e.getFile();return t.handle=e,t};var c=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((e,n)=>{t[n]={description:e.description||\"Files\",accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept[\"*/*\"]=e.extensions||[]});const n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(s));return e[0].multiple?r:r[0]},l={__proto__:null,default:c};function u(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+\" is not an object.\"));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return u=function(e){this.s=e,this.n=e.next},u.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new u(e)}const p=async(e,t,n=e.name,r)=>{const i=[],a=[];var o,s=!1,c=!1;try{for(var l,d=function(e){var t,n,r,i=2;for(\"undefined\"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new u(t.call(e));n=\"@@asyncIterator\",r=\"@@iterator\"}throw new TypeError(\"Object is not async iterable\")}(e.values());s=!(l=await d.next()).done;s=!1){const o=l.value,s=`${n}/${o.name}`;\"file\"===o.kind?a.push(o.getFile().then(t=>(t.directoryHandle=e,t.handle=o,Object.defineProperty(t,\"webkitRelativePath\",{configurable:!0,enumerable:!0,get:()=>s})))):\"directory\"!==o.kind||!t||r&&r(o)||i.push(p(o,t,s,r))}}catch(e){c=!0,o=e}finally{try{s&&null!=d.return&&await d.return()}finally{if(c)throw o}}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]};var d=async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||\"read\";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:p(t,e.recursive,void 0,e.skipDirectory)},y={__proto__:null,default:d},f=async(e,t=[{}],n=null,r=!1,i=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||\"Untitled\";const a=[];let o=null;if(e instanceof Blob&&e.type?o=e.type:e.headers&&e.headers.get(\"content-type\")&&(o=e.headers.get(\"content-type\")),t.forEach((e,t)=>{a[t]={description:e.description||\"Files\",accept:{}},e.mimeTypes?(0===t&&o&&e.mimeTypes.push(o),e.mimeTypes.map(n=>{a[t].accept[n]=e.extensions||[]})):o?a[t].accept[o]=e.extensions||[]:a[t].accept[\"*/*\"]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}const s=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&i&&i(s);const c=await s.createWritable();if(\"stream\"in e){const t=e.stream();return await t.pipeTo(c),s}return\"body\"in e?(await e.body.pipeTo(c),s):(await c.write(await e),await c.close(),s)},m={__proto__:null,default:f},w=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\";const i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||\"\",r.style.display=\"none\",document.body.append(r);const a=e=>{\"function\"==typeof o&&o(),t(e)},o=e[0].legacySetup&&e[0].legacySetup(a,()=>o(n),r),s=()=>{window.removeEventListener(\"focus\",s),r.remove()};r.addEventListener(\"click\",()=>{window.addEventListener(\"focus\",s)}),r.addEventListener(\"change\",()=>{window.removeEventListener(\"focus\",s),r.remove(),a(r.multiple?Array.from(r.files):r.files[0])}),\"showPicker\"in HTMLInputElement.prototype?r.showPicker():r.click()})),v={__proto__:null,default:w},h=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\",r.webkitdirectory=!0;const i=e=>{\"function\"==typeof a&&a(),t(e)},a=e[0].legacySetup&&e[0].legacySetup(i,()=>a(n),r);r.addEventListener(\"change\",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split(\"/\").every(t=>!e[0].skipDirectory({name:t,kind:\"directory\"})))):t=t.filter(e=>2===e.webkitRelativePath.split(\"/\").length),i(t)}),\"showPicker\"in HTMLInputElement.prototype?r.showPicker():r.click()})),b={__proto__:null,default:h},P=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const n=document.createElement(\"a\");let r=e;\"body\"in e&&(r=await async function(e,t){const n=e.getReader(),r=new ReadableStream({start:e=>async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})}()}),i=new Response(r),a=await i.blob();return n.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get(\"content-type\"))),n.download=t.fileName||\"Untitled\",n.href=URL.createObjectURL(await r);const i=()=>{\"function\"==typeof a&&a()},a=t.legacySetup&&t.legacySetup(i,()=>a(),n);return n.addEventListener(\"click\",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),i()}),n.click(),null},k={__proto__:null,default:P};export{i as directoryOpen,h as directoryOpenLegacy,d as directoryOpenModern,n as fileOpen,w as fileOpenLegacy,c as fileOpenModern,o as fileSave,P as fileSaveLegacy,f as fileSaveModern,e as supported};\n","const eqU8 = (a: Uint8Array, b: Uint8Array) => {\n return a.length == b.length && a.every((v, i) => v == b[i]);\n};\nconst startWith = (a: ArrayBuffer, b: Uint8Array) => {\n return eqU8(new Uint8Array(a.slice(0, b.length)), b);\n};\nconst blobStartWith = async (a: Blob, b: Uint8Array) => {\n const bf = await a.slice(0, b.length).arrayBuffer();\n return eqU8(new Uint8Array(bf), b);\n};\nconst zipHeader = new Uint8Array([0x50, 0x4b, 0x03, 0x04]);\n\nexport const isZipBf = (bf: ArrayBuffer) => startWith(bf, zipHeader);\nexport const isZipBlob = async (blob: Blob) => blobStartWith(blob, zipHeader);\n","import { fileOpen } from 'browser-fs-access';\nimport JSZip, { loadAsync } from 'jszip';\nimport pLimit from 'p-limit';\nimport { message } from './discrete';\nimport { enhanceFetch } from './fetch';\nimport { isZipBf } from './file_type';\nimport { setSnapshot, snapshotStorage, urlStorage } from './storage';\nimport type { Snapshot } from './types';\n\nconst parseZip = async (zip: JSZip) => {\n const snapshotFile = zip.filter((s) => s.endsWith(`.json`))[0];\n const screenshotFile = zip.filter((s) => s.endsWith(`.png`))[0];\n if (!snapshotFile || !screenshotFile) {\n return false;\n }\n const snapshot = JSON.parse(await snapshotFile.async('string')) as Snapshot;\n const screenshotBf = await screenshotFile.async('arraybuffer');\n await setSnapshot(snapshot, screenshotBf);\n return true;\n};\n\nexport const importFromLocal = async () => {\n const files = await fileOpen({\n multiple: true,\n mimeTypes: [`application/zip`],\n });\n const zipfiles = files.filter((f) => f.name.endsWith(`.zip`));\n if (zipfiles.length == 0) {\n message.warning(`没有发现可导入文件`);\n return;\n }\n let importNum = 0;\n if (zipfiles.length > 0) {\n await Promise.any(\n zipfiles.map(async (file) => {\n const zip = await loadAsync(file);\n if (await parseZip(zip)) {\n importNum++;\n }\n const subZips = zip.filter((s) => s.endsWith('.zip'));\n if (subZips.length > 0) {\n await Promise.any(\n subZips.map(async (subZip) => {\n const subFile = await loadAsync(subZip.async('blob'));\n if (await parseZip(subFile)) {\n importNum++;\n }\n }),\n );\n }\n }),\n );\n }\n if (importNum > 0) {\n message.success(`导入${importNum}条记录`);\n } else {\n message.warning(`没有发现可导入记录`);\n }\n};\n\nexport const importFromNetwork = async (urls: string[] | string = []) => {\n if (typeof urls == 'string') {\n urls = [urls];\n }\n if (urls.length == 0) {\n return;\n }\n urls = [...new Set(urls)];\n const limit = pLimit(2);\n let importNum = 0;\n const result = await Promise.allSettled(\n urls.map((url) => {\n return limit(async () => {\n const snapshotId = urlStorage[url];\n if (snapshotId) {\n const snapshot = await snapshotStorage.getItem(snapshotId);\n if (snapshot) {\n importNum++;\n return snapshot;\n }\n }\n const resp = await enhanceFetch(url, undefined, { proxy: true }).catch(\n (e) => {\n message.error(`网络异常: ${new URL(url).host}/${e.message || ''}`);\n console.warn([`download failed`, url, e]);\n throw e;\n },\n );\n const bf = await resp.arrayBuffer();\n let snapshot: Snapshot;\n let screenshotBf: ArrayBuffer;\n if (isZipBf(bf)) {\n const zip = await loadAsync(bf);\n const [snapshotFile] = zip.filter((p) => p.endsWith(`.json`));\n const [screenshotFile] = zip.filter((p) => p.endsWith(`.png`));\n if (!snapshotFile || !screenshotFile) {\n return;\n }\n screenshotBf = await screenshotFile.async('arraybuffer');\n snapshot = JSON.parse(await snapshotFile.async('string')) as Snapshot;\n } else {\n throw new Error(`file must be png or zip`);\n }\n await setSnapshot(snapshot, screenshotBf);\n importNum++;\n return snapshot;\n });\n }),\n );\n if (importNum == 0) {\n message.warning(`没有发现可导入记录`);\n } else if (importNum == urls.length) {\n message.success(`导入${importNum}条快照`);\n } else if (importNum < urls.length) {\n message.success(`导入${importNum}条快照,失败${urls.length - importNum}`);\n }\n return result;\n};\n"],"names":["e","t","l","v","n","y","b","m","k","s","c","r","u","p","i","a","o","d","f","w","h","P","eqU8","startWith","zipHeader","isZipBf","bf","parseZip","zip","snapshotFile","screenshotFile","snapshot","screenshotBf","setSnapshot","importFromLocal","zipfiles","fileOpen","message","importNum","file","loadAsync","subZips","subZip","subFile","importFromNetwork","urls","limit","pLimit","result","url","snapshotId","urlStorage","snapshotStorage","enhanceFetch"],"mappings":"oHAAA,MAAMA,GAAG,IAAI,CAAC,GAAgB,OAAO,KAApB,IAAyB,MAAM,GAAG,GAAG,QAAQ,MAAM,OAAO,IAAI,GAAG,CAAC,IAAI,OAAO,SAAS,EAAE,CAAC,MAAS,CAAC,MAAM,EAAE,CAAC,MAAM,uBAAuB,IAAI,GAAI,EAACC,EAAED,EAAE,QAAQ,QAAS,EAAC,KAAK,UAAU,CAAC,OAAOE,CAAC,CAAC,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAAE,eAAeC,KAAK,EAAE,CAAC,OAAO,MAAMH,GAAG,QAAQ,GAAG,CAAC,CAAC,CAASD,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOK,CAAC,CAAC,EAAE,QAAQ,UAAU,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAA+DN,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOO,CAAC,CAAC,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAAuD,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m/browser-fs-access@0.35.0/node_modules/browser-fs-access/dist/index.modern.js","../../src/utils/file_type.ts","../../src/utils/import.ts"],"sourcesContent":["const e=(()=>{if(\"undefined\"==typeof self)return!1;if(\"top\"in self&&self!==top)try{top.window.document._=0}catch(e){return!1}return\"showOpenFilePicker\"in self})(),t=e?Promise.resolve().then(function(){return l}):Promise.resolve().then(function(){return v});async function n(...e){return(await t).default(...e)}const r=e?Promise.resolve().then(function(){return y}):Promise.resolve().then(function(){return b});async function i(...e){return(await r).default(...e)}const a=e?Promise.resolve().then(function(){return m}):Promise.resolve().then(function(){return k});async function o(...e){return(await a).default(...e)}const s=async e=>{const t=await e.getFile();return t.handle=e,t};var c=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((e,n)=>{t[n]={description:e.description||\"Files\",accept:{}},e.mimeTypes?e.mimeTypes.map(r=>{t[n].accept[r]=e.extensions||[]}):t[n].accept[\"*/*\"]=e.extensions||[]});const n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(s));return e[0].multiple?r:r[0]},l={__proto__:null,default:c};function u(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+\" is not an object.\"));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return u=function(e){this.s=e,this.n=e.next},u.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new u(e)}const p=async(e,t,n=e.name,r)=>{const i=[],a=[];var o,s=!1,c=!1;try{for(var l,d=function(e){var t,n,r,i=2;for(\"undefined\"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new u(t.call(e));n=\"@@asyncIterator\",r=\"@@iterator\"}throw new TypeError(\"Object is not async iterable\")}(e.values());s=!(l=await d.next()).done;s=!1){const o=l.value,s=`${n}/${o.name}`;\"file\"===o.kind?a.push(o.getFile().then(t=>(t.directoryHandle=e,t.handle=o,Object.defineProperty(t,\"webkitRelativePath\",{configurable:!0,enumerable:!0,get:()=>s})))):\"directory\"!==o.kind||!t||r&&r(o)||i.push(p(o,t,s,r))}}catch(e){c=!0,o=e}finally{try{s&&null!=d.return&&await d.return()}finally{if(c)throw o}}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]};var d=async(e={})=>{e.recursive=e.recursive||!1,e.mode=e.mode||\"read\";const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn,mode:e.mode});return(await(await t.values()).next()).done?[t]:p(t,e.recursive,void 0,e.skipDirectory)},y={__proto__:null,default:d},f=async(e,t=[{}],n=null,r=!1,i=null)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||\"Untitled\";const a=[];let o=null;if(e instanceof Blob&&e.type?o=e.type:e.headers&&e.headers.get(\"content-type\")&&(o=e.headers.get(\"content-type\")),t.forEach((e,t)=>{a[t]={description:e.description||\"Files\",accept:{}},e.mimeTypes?(0===t&&o&&e.mimeTypes.push(o),e.mimeTypes.map(n=>{a[t].accept[n]=e.extensions||[]})):o?a[t].accept[o]=e.extensions||[]:a[t].accept[\"*/*\"]=e.extensions||[]}),n)try{await n.getFile()}catch(e){if(n=null,r)throw e}const s=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:a,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1});!n&&i&&i(s);const c=await s.createWritable();if(\"stream\"in e){const t=e.stream();return await t.pipeTo(c),s}return\"body\"in e?(await e.body.pipeTo(c),s):(await c.write(await e),await c.close(),s)},m={__proto__:null,default:f},w=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\";const i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||\"\",r.style.display=\"none\",document.body.append(r);const a=e=>{\"function\"==typeof o&&o(),t(e)},o=e[0].legacySetup&&e[0].legacySetup(a,()=>o(n),r),s=()=>{window.removeEventListener(\"focus\",s),r.remove()};r.addEventListener(\"click\",()=>{window.addEventListener(\"focus\",s)}),r.addEventListener(\"change\",()=>{window.removeEventListener(\"focus\",s),r.remove(),a(r.multiple?Array.from(r.files):r.files[0])}),\"showPicker\"in HTMLInputElement.prototype?r.showPicker():r.click()})),v={__proto__:null,default:w},h=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{const r=document.createElement(\"input\");r.type=\"file\",r.webkitdirectory=!0;const i=e=>{\"function\"==typeof a&&a(),t(e)},a=e[0].legacySetup&&e[0].legacySetup(i,()=>a(n),r);r.addEventListener(\"change\",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(t=>t.webkitRelativePath.split(\"/\").every(t=>!e[0].skipDirectory({name:t,kind:\"directory\"})))):t=t.filter(e=>2===e.webkitRelativePath.split(\"/\").length),i(t)}),\"showPicker\"in HTMLInputElement.prototype?r.showPicker():r.click()})),b={__proto__:null,default:h},P=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const n=document.createElement(\"a\");let r=e;\"body\"in e&&(r=await async function(e,t){const n=e.getReader(),r=new ReadableStream({start:e=>async function t(){return n.read().then(({done:n,value:r})=>{if(!n)return e.enqueue(r),t();e.close()})}()}),i=new Response(r),a=await i.blob();return n.releaseLock(),new Blob([a],{type:t})}(e.body,e.headers.get(\"content-type\"))),n.download=t.fileName||\"Untitled\",n.href=URL.createObjectURL(await r);const i=()=>{\"function\"==typeof a&&a()},a=t.legacySetup&&t.legacySetup(i,()=>a(),n);return n.addEventListener(\"click\",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),3e4),i()}),n.click(),null},k={__proto__:null,default:P};export{i as directoryOpen,h as directoryOpenLegacy,d as directoryOpenModern,n as fileOpen,w as fileOpenLegacy,c as fileOpenModern,o as fileSave,P as fileSaveLegacy,f as fileSaveModern,e as supported};\n","const eqU8 = (a: Uint8Array, b: Uint8Array) => {\n return a.length == b.length && a.every((v, i) => v == b[i]);\n};\nconst startWith = (a: ArrayBuffer, b: Uint8Array) => {\n return eqU8(new Uint8Array(a.slice(0, b.length)), b);\n};\nconst blobStartWith = async (a: Blob, b: Uint8Array) => {\n const bf = await a.slice(0, b.length).arrayBuffer();\n return eqU8(new Uint8Array(bf), b);\n};\nconst zipHeader = new Uint8Array([0x50, 0x4b, 0x03, 0x04]);\n\nexport const isZipBf = (bf: ArrayBuffer) => startWith(bf, zipHeader);\nexport const isZipBlob = async (blob: Blob) => blobStartWith(blob, zipHeader);\n","import { fileOpen } from 'browser-fs-access';\nimport JSZip, { loadAsync } from 'jszip';\nimport pLimit from 'p-limit';\nimport { message } from './discrete';\nimport { enhanceFetch } from './fetch';\nimport { isZipBf } from './file_type';\nimport { setSnapshot, snapshotStorage, urlStorage } from './storage';\nimport type { Snapshot } from './types';\n\nconst parseZip = async (zip: JSZip) => {\n const snapshotFile = zip.filter((s) => s.endsWith(`.json`))[0];\n const screenshotFile = zip.filter((s) => s.endsWith(`.png`))[0];\n if (!snapshotFile || !screenshotFile) {\n return false;\n }\n const snapshot = JSON.parse(await snapshotFile.async('string')) as Snapshot;\n const screenshotBf = await screenshotFile.async('arraybuffer');\n await setSnapshot(snapshot, screenshotBf);\n return true;\n};\n\nexport const importFromLocal = async () => {\n const files = await fileOpen({\n multiple: true,\n mimeTypes: [`application/zip`],\n });\n const zipfiles = files.filter((f) => f.name.endsWith(`.zip`));\n if (zipfiles.length == 0) {\n message.warning(`没有发现可导入文件`);\n return;\n }\n let importNum = 0;\n if (zipfiles.length > 0) {\n await Promise.any(\n zipfiles.map(async (file) => {\n const zip = await loadAsync(file);\n if (await parseZip(zip)) {\n importNum++;\n }\n const subZips = zip.filter((s) => s.endsWith('.zip'));\n if (subZips.length > 0) {\n await Promise.any(\n subZips.map(async (subZip) => {\n const subFile = await loadAsync(subZip.async('blob'));\n if (await parseZip(subFile)) {\n importNum++;\n }\n }),\n );\n }\n }),\n );\n }\n if (importNum > 0) {\n message.success(`导入${importNum}条记录`);\n } else {\n message.warning(`没有发现可导入记录`);\n }\n};\n\nexport const importFromNetwork = async (urls: string[] | string = []) => {\n if (typeof urls == 'string') {\n urls = [urls];\n }\n if (urls.length == 0) {\n return;\n }\n urls = [...new Set(urls)];\n const limit = pLimit(2);\n let importNum = 0;\n const result = await Promise.allSettled(\n urls.map((url) => {\n return limit(async () => {\n const snapshotId = urlStorage[url];\n if (snapshotId) {\n const snapshot = await snapshotStorage.getItem(snapshotId);\n if (snapshot) {\n importNum++;\n return snapshot;\n }\n }\n const resp = await enhanceFetch(url, undefined, { proxy: true }).catch(\n (e) => {\n message.error(`网络异常: ${new URL(url).host}/${e.message || ''}`);\n console.warn([`download failed`, url, e]);\n throw e;\n },\n );\n const bf = await resp.arrayBuffer();\n let snapshot: Snapshot;\n let screenshotBf: ArrayBuffer;\n if (isZipBf(bf)) {\n const zip = await loadAsync(bf);\n const [snapshotFile] = zip.filter((p) => p.endsWith(`.json`));\n const [screenshotFile] = zip.filter((p) => p.endsWith(`.png`));\n if (!snapshotFile || !screenshotFile) {\n return;\n }\n screenshotBf = await screenshotFile.async('arraybuffer');\n snapshot = JSON.parse(await snapshotFile.async('string')) as Snapshot;\n } else {\n throw new Error(`file must be png or zip`);\n }\n await setSnapshot(snapshot, screenshotBf);\n importNum++;\n return snapshot;\n });\n }),\n );\n if (importNum == 0) {\n message.warning(`没有发现可导入记录`);\n } else if (importNum == urls.length) {\n message.success(`导入${importNum}条快照`);\n } else if (importNum < urls.length) {\n message.success(`导入${importNum}条快照,失败${urls.length - importNum}`);\n }\n return result;\n};\n"],"names":["e","t","l","v","n","y","b","m","k","s","c","r","u","p","i","a","o","d","f","w","h","P","eqU8","startWith","zipHeader","isZipBf","bf","parseZip","zip","snapshotFile","screenshotFile","snapshot","screenshotBf","setSnapshot","importFromLocal","zipfiles","fileOpen","message","importNum","file","loadAsync","subZips","subZip","subFile","importFromNetwork","urls","limit","pLimit","result","url","snapshotId","urlStorage","snapshotStorage","enhanceFetch"],"mappings":"oHAAA,MAAMA,GAAG,IAAI,CAAC,GAAgB,OAAO,KAApB,IAAyB,MAAM,GAAG,GAAG,QAAQ,MAAM,OAAO,IAAI,GAAG,CAAC,IAAI,OAAO,SAAS,EAAE,CAAC,MAAS,CAAC,MAAM,EAAE,CAAC,MAAM,uBAAuB,IAAI,GAAI,EAACC,EAAED,EAAE,QAAQ,QAAS,EAAC,KAAK,UAAU,CAAC,OAAOE,CAAC,CAAC,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAAE,eAAeC,KAAK,EAAE,CAAC,OAAO,MAAMH,GAAG,QAAQ,GAAG,CAAC,CAAC,CAASD,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOK,CAAC,CAAC,EAAE,QAAQ,UAAU,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAA+DN,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOO,CAAC,CAAC,EAAE,QAAQ,QAAO,EAAG,KAAK,UAAU,CAAC,OAAOC,CAAC,CAAC,EAAuD,MAAMC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAO,EAAG,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAIC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,CAAE,EAAC,EAAE,QAAQ,CAACV,EAAEI,IAAI,CAAC,EAAEA,CAAC,EAAE,CAAC,YAAYJ,EAAE,aA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AAAqC,EAAA,MAAM,SAAS,IAAI,IAAIY,CAAG,EAAE,IAAI,IAAIjD,EAAE,SAAW,EAAE,EAAE,EAC7D,QAAQ,KAAK,CAAC,kBAAmBiD,EAAKjD,CAAC,CAAC,EAClCA,CACR,CAAA,GAEoB,cAClB,IAAA+B,EACAC,EACA,GAAAP,EAAQC,CAAE,EAAG,CACT,MAAAE,EAAM,MAAMY,YAAUd,CAAE,EACxB,CAACG,CAAY,EAAID,EAAI,OAAQf,GAAMA,EAAE,SAAS,OAAO,CAAC,EACtD,CAACiB,CAAc,EAAIF,EAAI,OAAQf,GAAMA,EAAE,SAAS,MAAM,CAAC,EACzD,GAAA,CAACgB,GAAgB,CAACC,EACpB,OAEaE,EAAA,MAAMF,EAAe,MAAM,aAAa,EACvDC,EAAW,KAAK,MAAM,MAAMF,EAAa,MAAM,QAAQ,CAAC,CAAA,KAElD,OAAA,IAAI,MAAM,yBAAyB,EAErC,aAAAI,EAAYF,EAAUC,CAAY,EACxCM,IACOP,CAAA,CACR,CACF,CAAA,EAEH,OAAIO,GAAa,EACfD,EAAQ,QAAQ,WAAW,EAClBC,GAAaO,EAAK,OACnBR,EAAA,QAAQ,KAAKC,CAAS,KAAK,EAC1BA,EAAYO,EAAK,QAC1BR,EAAQ,QAAQ,KAAKC,CAAS,SAASO,EAAK,OAASP,CAAS,EAAE,EAE3DU,CACT","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/assets/index-AzMi55Pv.js b/assets/index-Lw3EAuUv.js similarity index 99% rename from assets/index-AzMi55Pv.js rename to assets/index-Lw3EAuUv.js index 5b23225..a008117 100644 --- a/assets/index-AzMi55Pv.js +++ b/assets/index-Lw3EAuUv.js @@ -1,4 +1,4 @@ -import{m as ve}from"./storage-I0hkGMKT.js";import{u as _o,O as ho,az as Ya,a_ as Do,H as hr,ax as vo,aa as Qa,ai as ts,a$ as po,b0 as mo,e as Dr,b1 as ns,s as Co,c as Eo}from"./index-KbMk1nPu.js";const U_=(t,n,u)=>{try{return t()}catch(r){if(typeof n=="string")ve.error(n);else{const e=(n==null?void 0:n(r))??r;typeof e=="string"?ve.error(e):e instanceof Error&&ve.error(e.message)}throw r}finally{u==null||u()}},H_=t=>(...n)=>{try{t(...n)}catch(u){console.error(u)}};typeof ArrayBuffer.isView>"u"&&(ArrayBuffer.isView=function(t){return t!=null&&t.__proto__!=null&&t.__proto__.__proto__===Int8Array.prototype.__proto__});typeof Array.prototype.fill>"u"&&Object.defineProperty(Array.prototype,"fill",{value:function(t){if(this==null)throw new TypeError("this is null or not defined");for(var n=Object(this),u=n.length>>>0,r=arguments[1],e=r>>0,a=e<0?Math.max(u+e,0):Math.min(e,u),s=arguments[2],l=s===void 0?u:s>>0,c=l<0?Math.max(u+l,0):Math.min(l,u);a"u"&&Object.defineProperty(t.prototype,"fill",{value:Array.prototype.fill})});typeof Math.clz32>"u"&&(Math.clz32=function(t,n){return function(u){var r=u>>>0;return r===0?32:31-(t(r)/n|0)|0}}(Math.log,Math.LN2));typeof String.prototype.endsWith>"u"&&Object.defineProperty(String.prototype,"endsWith",{value:function(t,n){var u=this.toString();(n===void 0||n>u.length)&&(n=u.length),n-=t.length;var r=u.indexOf(t,n);return r!==-1&&r===n}});typeof String.prototype.startsWith>"u"&&Object.defineProperty(String.prototype,"startsWith",{value:function(t,n){return n=n||0,this.lastIndexOf(t,n)===n}});typeof Math.imul>"u"&&(Math.imul=function(n,u){return(n&4294901760)*(u&65535)+(n&65535)*(u|0)|0});var us=Math.clz32,H=Math.imul,Ao=ArrayBuffer.isView;f(pi,"CharSequence",St);f(Pu,"Comparable",St);f(er,"Number",D);f(mi,"Unit",g);f(hu,"IntCompanionObject",g);f(Vn,"Comparator",St);f(W,"Collection",St);f(Dn,"AbstractCollection",D,o,[W]);f(Zt,"AbstractMutableCollection",D,Dn,[Dn,W]);f(Zn,"IteratorImpl",D);f(as,"ListIteratorImpl",D,Zn);f(Sn,"List",St,o,[W]);f(Bt,"AbstractMutableList",D,Zt,[Zt,W,Sn]);f(cn,"Map",St);f(qt,"AbstractMap",D,o,[cn]);f(ir,"AbstractMutableMap",D,qt,[qt,cn]);f($n,"Set",St,o,[W]);f(on,"AbstractMutableSet",D,Zt,[Zt,$n,W]);f(ls,"Companion",g);f(rt,"ArrayList",D,Bt,[Bt,W,Sn],at);f(Xt,"HashMap",D,ir,[ir,cn],To);f(Nt,"HashMapEntrySetBase",D,on,[$n,W,on]);f(Ai,"HashMapEntrySet",D,Nt);f(Ut,"HashSet",D,on,[on,$n,W],Lo);f(As,"Companion",g);f(Bn,"Itr",D);f(Bi,"KeysItr",D,Bn);f(Lu,"EntriesItr",D,Bn);f(fn,"Entry",St);f(Xn,"EntryRef",D,o,[fn]);function Fo(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p(),a=e,s;if(a!=null&&I(a,fn)?s=this.j4(a):s=!1,!s){n=!1;break t}}n=!0}return n}f(Fs,"InternalMap",St);f(ct,"InternalHashMap",D,o,[Fs],di);f(zu,"LinkedHashMap",D,Xt,[Xt,cn],ds);f(kn,"LinkedHashSet",D,Ut,[Ut,$n,W],pr);f(mr,"KProperty1",St);f(jt,"StringBuilder",D,o,[pi],Cr);f(bs,"Companion",g);f(Ru,"Regex",D);f(ki,"sam$kotlin_Comparator$0",D,o,[Vn]);f($i,o,D);f(qs,"Companion",g);f(ft,"Char",D,o,[Pu]);f(Z1,"Companion",g);f(_n,"Enum",D,o,[Pu]);f(dr,o,D);f(Ws,"Companion",g);f(P,"Long",D,er,[er,Pu]);f(el,"Digit",g);f(Ku,"Continuation",St);f(it,"CoroutineImpl",D,o,[Ku]);f(Cu,"CompletedContinuation",g,o,[Ku]);f(Li,o,D,it);f(mn,"Exception",D,Error,o,sl);f(Ft,"RuntimeException",D,mn,o,hl);f(Yn,"IllegalArgumentException",D,Ft,o,ol);f(Au,"IndexOutOfBoundsException",D,Ft,o,cl);f(Fu,"IllegalStateException",D,Ft,o,_l);f(br,"UnsupportedOperationException",D,Ft,o,du);f(yu,"NoSuchElementException",D,Ft,o,Dt);f(bu,"Error",D,Error,o,vl);f(Qn,"NumberFormatException",D,Yn,o,pl);f(Bu,"ArithmeticException",D,Ft,o,Cl);f(Br,"ConcurrentModificationException",D,Ft,o,Ui);f(kr,"NullPointerException",D,Ft,o,Hi);f(Sr,"ClassCastException",D,Ft,o,Wi);f(In,"Companion",g);f(c0,"Companion",g);f($r,"Companion",g);f(Ir,"EmptyIterator",g);f(Cn,"ArrayAsCollection",D,o,[W]);f(Ht,"EmptyList",g,o,[Sn]);f(jn,"IndexedValue",D);f(Nr,"IntIterator",D);f(Hu,"CharIterator",D);f(kt,"SequenceScope",D,o,o,o,o,o,[1]);f(Gt,"SequenceBuilderIterator",D,kt,[kt,Ku],Gt,o,o,[1]);f(Vi,o,D);f(Tr,o,D);f(Pr,"TransformingSequence",D);f(Mr,o,D);f(Zi,"TakeWhileSequence",D);f(nu,"DropTakeSequence",St);f(Lr,o,D);f(Tn,"DropSequence",D,o,[nu]);f(zr,o,D);f(Xi,"DropWhileSequence",D);f(Rr,o,D);f(Gi,"FilteringSequence",D);f(Ur,o,D);f(Yi,"IndexingSequence",D);f(Hr,o,D);f(Ln,"TakeSequence",D,o,[nu]);f(Wu,"EmptySequence",g,o,[nu]);f(Kr,o,D);f(wn,"SubSequence",D,o,[nu]);f(tn,"EmptySet",g,o,[$n]);f(Jr,"NaturalOrderComparator",g,o,[Vn]);f(xl,"Key",g);f(g0,"ContinuationInterceptor",St);f(Ju,"EmptyCoroutineContext",g);f(rr,"CoroutineSingletons",D,_n);f(Tl,"Companion",g);f(Yt,"IntProgression",D);f(gn,"IntRange",D,Yt);f(Pl,"Companion",g);f(vn,"CharProgression",D);f(yn,"CharRange",D,vn);f(Vr,"IntProgressionIterator",D,Nr);f(Zr,"CharProgressionIterator",D,Hu);f(na,"Companion",g);f($0,"Companion",g);f(Vu,"UnsafeLazyImpl",D);f(Jl,"UNINITIALIZED_VALUE",g);f(L0,"Companion",g);f(pn,"Failure",D);f(Re,"NotImplementedError",D,bu,o,Re);f(zt,"Pair",D);function pi(){}function Pu(){}function er(){}function mi(){}i(mi).toString=function(){return"kotlin.Unit"};var M;function hu(){this.MIN_VALUE=-2147483648,this.MAX_VALUE=2147483647,this.SIZE_BYTES=4,this.SIZE_BITS=32}i(hu).e=function(){return this.MIN_VALUE};i(hu).f=function(){return this.MAX_VALUE};i(hu).g=function(){return this.SIZE_BYTES};i(hu).h=function(){return this.SIZE_BITS};var En;function Vn(){}function wo(t){return t!==t}function go(t){var n;if(t===0)n=0;else{var u=31;n=1<<(u-us(t)|0)}return n}function rs(t){return h0(t)}function Du(t){return D0([t])}function Ot(t){var n;return t.toArray!==void 0?n=t.toArray():n=rs(t),n}function Ci(t){return t<0&&m0(),t}function yo(t){is(t,Il())}function bo(t,n){is(t,n)}function es(t){return F0([t])}function is(t,n){if(t.i()<=1)return M;var u=Ot(t);os(u,n);var r=0,e=u.length;if(r=0};i(Bt).j1=function(t){var n;t:{for(var u=0,r=this.n();r.o();){var e=r.p();if(b(e,t)){n=u;break t}u=u+1|0}n=-1}return n};i(Bt).k1=function(t){return new as(this,t)};i(Bt).i1=function(t,n){var u=this.k1(t),r=n-t|0,e=0;if(e=0)){var n="capacity must be non-negative.";throw ut(nt(n))}return Ni(Array(t),null)}function Sa(t,n,u){t.fill(null,n,u)}function $a(t,n){return Rf(t,n)}function ls(){ye=this;var t=this,n=vu(0);n.c2_1=!0,t.d2_1=n}var ye;function Bo(){return ye==null&&new ls,ye}function ko(t){var n=[];return rt.call(t,n),t}function at(){return ko(x(i(rt)))}function So(t,n){var u=[];if(rt.call(n,u),!(t>=0)){var r="Negative initial capacity: "+t;throw ut(nt(r))}return n}function vu(t){return So(t,x(i(rt)))}function $o(t,n){var u=Ot(t);return rt.call(n,u),n}function vr(t){return $o(t,x(i(rt)))}function Io(t,n){var u=t.i();return t.b2_1.length=t.i()+n|0,u}function Ei(t,n){return qn.e2(n,t.i()),n}function qo(t,n){return qn.f1(n,t.i()),n}function rt(t){Bo(),Bt.call(this),this.b2_1=t,this.c2_1=!1}i(rt).i=function(){return this.b2_1.length};i(rt).w=function(t){var n=this.b2_1[Ei(this,t)];return n==null||n!=null?n:d()};i(rt).j=function(t,n){this.m(),Ei(this,t);var u=this.b2_1[t];this.b2_1[t]=n;var r=u;return r==null||r!=null?r:d()};i(rt).k=function(t){return this.m(),this.b2_1.push(t),this.y_1=this.y_1+1|0,!0};i(rt).g1=function(t,n){this.m(),this.b2_1.splice(qo(this,t),0,n),this.y_1=this.y_1+1|0};i(rt).l=function(t){if(this.m(),t.s())return!1;for(var n=Io(this,t.i()),u=0,r=t.n();r.o();){var e=r.p(),a=u;u=a+1|0;var s=Ci(a);this.b2_1[n+s|0]=e}return this.y_1=this.y_1+1|0,!0};i(rt).z=function(t){this.m(),Ei(this,t),this.y_1=this.y_1+1|0;var n;return t===xr(this)?n=this.b2_1.pop():n=this.b2_1.splice(t,1)[0],n};i(rt).i1=function(t,n){this.m(),this.y_1=this.y_1+1|0,this.b2_1.splice(t,n-t|0)};i(rt).h1=function(){this.m();var t=this;t.b2_1=[],this.y_1=this.y_1+1|0};i(rt).j1=function(t){return ks(this.b2_1,t)};i(rt).toString=function(){return uf(this.b2_1)};i(rt).f2=function(){return[].slice.call(this.b2_1)};i(rt).toArray=function(){return this.f2()};i(rt).m=function(){if(this.c2_1)throw du()};var ur;function os(t,n){if(fs()){var u=Oo(n);t.sort(u)}else cs(t,0,Bs(t),n)}function xo(t){if(fs()){var n=No;t.sort(n)}else cs(t,0,Bs(t),Il())}function fs(){var t=ur;if(t!=null)return t;ur=!1;var n=[],u=0;if(u<600)do{var r=u;u=u+1|0,n.push(r)}while(u<600);var e=jo;n.sort(e);var a=1,s=n.length;if(a=_)return!1}while(a0)){var r="Non-positive load factor: "+n;throw ut(nt(r))}return u}function Cs(t,n){return Ko(t,n,x(i(ct)))}function ou(t){return t.w2_1.length}function Jt(t){return t.z2_1.length}function Es(t){t.d3_1=t.d3_1+1|0}function Jo(t,n){Vo(t,n)?yi(t,Jt(t)):Zo(t,t.b3_1+n|0)}function Vo(t,n){var u=ou(t)-t.b3_1|0,r=t.b3_1-t.i()|0;return u=n?r>=(ou(t)/4|0):!1}function Zo(t,n){if(n<0)throw Dl("too many elements");if(n>ou(t)){var u=qn.g3(ou(t),n);t.w2_1=$a(t.w2_1,u);var r=t,e=t.x2_1;r.x2_1=e==null?null:$a(e,u),t.y2_1=zf(t.y2_1,u);var a=ps(Mu,u);a>Jt(t)&&yi(t,a)}}function Xo(t){var n=t.x2_1;if(n!=null)return n;var u=ss(ou(t));return t.x2_1=u,u}function gi(t,n){return n==null?0:H(tt(n),-1640531527)>>>t.c3_1|0}function Go(t){for(var n=0,u=0,r=t.x2_1;n=0&&(t.w2_1[u]=t.w2_1[n],r!=null&&(r[u]=r[n]),u=u+1|0),n=n+1|0;Sa(t.w2_1,u,t.b3_1),r==null||Sa(r,u,t.b3_1),t.b3_1=u}function yi(t,n){Es(t),t.b3_1>t.e3_1&&Go(t),n!==Jt(t)?(t.z2_1=new Int32Array(n),t.c3_1=ms(Mu,n)):Pf(t.z2_1,0,0,Jt(t));for(var u=0;u0&&b(t.w2_1[e-1|0],n))return e-1|0;if(r=r-1|0,r<0)return-1;var a=u;u=a-1|0,a===0&&(u=Jt(t)-1|0)}}function Qo(t,n){t.m();t:for(;;)for(var u=gi(t,n),r=ke(H(t.a3_1,2),Jt(t)/2|0),e=0;;){var a=t.z2_1[u];if(a<=0){if(t.b3_1>=ou(t)){Jo(t,1);continue t}var s=t.b3_1;t.b3_1=s+1|0;var l=s;return t.w2_1[l]=n,t.y2_1[l]=u,t.z2_1[u]=l+1|0,t.e3_1=t.e3_1+1|0,Es(t),e>t.a3_1&&(t.a3_1=e),l}if(b(t.w2_1[a-1|0],n))return-a|0;if(e=e+1|0,e>r){yi(t,H(Jt(t),2));continue t}var c=u;u=c-1|0,c===0&&(u=Jt(t)-1|0)}}function t1(t,n){return t.e3_1===n.i()?t.t2(n.x1()):!1}function As(){this.h3_1=-1640531527,this.i3_1=8,this.j3_1=2,this.k3_1=-1}var Mu;function Bn(t){this.l3_1=t,this.m3_1=0,this.n3_1=-1,this.o3_1=this.l3_1.d3_1,this.p3()}i(Bn).p3=function(){for(;this.m3_1=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=this.l3_1.w2_1[this.n3_1];return this.p3(),u};function Lu(t){Bn.call(this,t)}i(Lu).p=function(){if(this.q3(),this.m3_1>=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=new Xn(this.l3_1,this.n3_1);return this.p3(),u};i(Lu).z3=function(){if(this.m3_1>=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=this.l3_1.w2_1[this.n3_1],r=u==null?null:tt(u),e=r??0,a=_t(this.l3_1.x2_1)[this.n3_1],s=a==null?null:tt(a),l=e^(s??0);return this.p3(),l};i(Lu).a4=function(t){if(this.m3_1>=this.l3_1.b3_1)throw Dt();var n=this,u=this.m3_1;this.m3_1=u+1|0,n.n3_1=u;var r=this.l3_1.w2_1[this.n3_1];b(r,this.l3_1)?t.d4("(this Map)"):t.c4(r),t.e4(61);var e=_t(this.l3_1.x2_1)[this.n3_1];b(e,this.l3_1)?t.d4("(this Map)"):t.c4(e),this.p3()};function Xn(t,n){this.f4_1=t,this.g4_1=n}i(Xn).h4=function(){return this.f4_1.w2_1[this.g4_1]};i(Xn).i4=function(){return _t(this.f4_1.x2_1)[this.g4_1]};i(Xn).equals=function(t){var n,u;return t!=null&&I(t,fn)?u=b(t.h4(),this.h4()):u=!1,u?n=b(t.i4(),this.i4()):n=!1,n};i(Xn).hashCode=function(){var t=this.h4(),n=t==null?null:tt(t),u=n??0,r=this.i4(),e=r==null?null:tt(r);return u^(e??0)};i(Xn).toString=function(){return""+this.h4()+"="+this.i4()};function ct(t,n,u,r,e,a){this.w2_1=t,this.x2_1=n,this.y2_1=u,this.z2_1=r,this.a3_1=e,this.b3_1=a,this.c3_1=ms(Mu,Jt(this)),this.d3_1=0,this.e3_1=0,this.f3_1=!1}i(ct).i=function(){return this.e3_1};i(ct).w1=function(t){var n=bi(this,t);return n<0?null:_t(this.x2_1)[n]};i(ct).m2=function(t){return bi(this,t)>=0};i(ct).r1=function(t,n){var u=Qo(this,t),r=Xo(this);if(u<0){var e=r[(-u|0)-1|0];return r[(-u|0)-1|0]=n,e}else return r[u]=n,null};i(ct).equals=function(t){var n;if(t===this)n=!0;else{var u;t!=null&&I(t,cn)?u=t1(this,t):u=!1,n=u}return n};i(ct).hashCode=function(){for(var t=0,n=this.p2();n.o();)t=t+n.z3()|0;return t};i(ct).toString=function(){var t=_1(2+H(this.e3_1,3)|0);t.d4("{");for(var n=0,u=this.p2();u.o();)n>0&&t.d4(", "),u.a4(t),n=n+1|0;return t.d4("}"),t.toString()};i(ct).m=function(){if(this.f3_1)throw du()};i(ct).s2=function(t){var n=bi(this,t.h4());return n<0?!1:b(_t(this.x2_1)[n],t.i4())};i(ct).j4=function(t){return this.s2(I(t,fn)?t:d())};i(ct).v2=function(){return new Bi(this)};i(ct).p2=function(){return new Lu(this)};function Fs(){}function n1(t){return hs(t),zu.call(t),t}function ds(){return n1(x(i(zu)))}function u1(t,n){return Mo(t,n),zu.call(n),n}function r1(t){return u1(t,x(i(zu)))}function zu(){}function e1(t){return Ds(t),kn.call(t),t}function pr(){return e1(x(i(kn)))}function i1(t,n){return zo(t,n),kn.call(n),n}function a1(t){return i1(t,x(i(kn)))}function s1(t,n,u){return vs(t,n,u),kn.call(u),u}function l1(t,n){return s1(t,1,n),n}function o1(t){return l1(t,x(i(kn)))}i(kn).m=function(){return this.u2_1.m()};function kn(){}function mr(){}function f1(t){t.lastIndex=0}function c1(t,n){return ws(n),n}function _1(t){return c1(t,x(i(jt)))}function ws(t){return jt.call(t,""),t}function Cr(){return ws(x(i(jt)))}function jt(t){this.b4_1=t!==void 0?t:""}i(jt).a=function(){return this.b4_1.length};i(jt).b=function(t){var n=this.b4_1,u;if(t>=0&&t<=Xr(n))u=w(n,t);else throw Eu("index: "+t+", length: "+this.a()+"}");return u};i(jt).c=function(t,n){return this.b4_1.substring(t,n)};i(jt).e4=function(t){return this.b4_1=this.b4_1+V(t),this};i(jt).l4=function(t){return this.b4_1=this.b4_1+hn(t),this};i(jt).c4=function(t){return this.b4_1=this.b4_1+hn(t),this};i(jt).d4=function(t){var n=this,u=this.b4_1;return n.b4_1=u+(t??"null"),this};i(jt).toString=function(){return this.b4_1};function Ia(t){var n=V(t).toUpperCase();return n.length>1?t:w(n,0)}function gs(t){return Wf(t)}function qa(t,n){return t.toString(ys(n))}function ys(t){if(!(2<=t&&t<=36))throw ut("radix "+t+" was not in valid range 2..36");return t}function h1(t){var n=I0(t),u;return n==null?Rl(t):u=n,u}function xa(t,n){var u=Ul(t,n),r;return u==null?Rl(t):r=u,r}function D1(t,n){var u=st(t,48)>=0&&st(t,57)<=0?Su(t,48):st(t,65)>=0&&st(t,90)<=0?Su(t,65)+10|0:st(t,97)>=0&&st(t,122)<=0?Su(t,97)+10|0:st(t,128)<0?-1:st(t,65313)>=0&&st(t,65338)<=0?Su(t,65313)+10|0:st(t,65345)>=0&&st(t,65370)<=0?Su(t,65345)+10|0:Uf(t);return u>=n?-1:u}function v1(t,n){return Ru.call(n,t,Qi()),n}function p1(t){return v1(t,x(i(Ru)))}function bs(){Be=this,this.m4_1=new RegExp("[\\\\^$*+?.()|[\\]{}]","g"),this.n4_1=new RegExp("[\\\\$]","g"),this.o4_1=new RegExp("\\$","g")}var Be;function m1(){return Be==null&&new bs,Be}function Ru(t,n){m1(),this.p4_1=t,this.q4_1=O1(n),this.r4_1=new RegExp(t,C1(n,"gu")),this.s4_1=null,this.t4_1=null}i(Ru).u4=function(t){f1(this.r4_1);var n=this.r4_1.exec(nt(t));return n!=null&&n.index===0?this.r4_1.lastIndex===U(t):!1};i(Ru).toString=function(){return this.r4_1.toString()};function C1(t,n){return Wt(t,"",n,o,o,o,E1)}function E1(t){return t.x4_1}function A1(t,n){return T0(t,n)}function ki(t){this.y4_1=t}i(ki).z4=function(t,n){return this.y4_1(t,n)};i(ki).compare=function(t,n){return this.z4(t,n)};function F1(t){var n;if(U(t)===0)n=!0;else{var u;t:{var r=j0(t),e;if(I(r,W)?e=r.s():e=!1,e){u=!0;break t}for(var a=r.n();a.o();){var s=a.p();if(!gs(w(t,s))){u=!1;break t}}u=!0}n=u}return n}function Si(t,n,u,r){return r=r===o?!1:r,r?Er(t,u,n,0,n.length,r):t.startsWith(n,u)}function d1(t,n,u){return u=u===o?!1:u,u?Er(t,0,n,0,n.length,u):t.startsWith(n,0)}function w1(t,n,u){return u=u===o?!1:u,u?Er(t,t.length-n.length|0,n,0,n.length,u):t.endsWith(n)}function Er(t,n,u,r,e,a){return a=a===o?!1:a,Gr(t,n,u,r,e,a)}function g1(t){return t.length===0?jr():new $i(t)}function Bs(t){return t.length-1|0}function y1(t){var n;switch(t.length){case 0:throw gu("Array is empty.");case 1:n=t[0];break;default:throw ut("Array has more than one element.")}return n}function b1(t,n){return ks(t,n)>=0}function ks(t,n){if(n==null){var u=0,r=t.length-1|0;if(u<=r)do{var e=u;if(u=u+1|0,t[e]==null)return e}while(u<=r)}else{var a=0,s=t.length-1|0;if(a<=s)do{var l=a;if(a=a+1|0,b(n,t[l]))return l}while(a<=s)}return-1}function B1(t,n){for(var u=0,r=t.length;u1&&n.l4(u),a<0||c<=a)Ll(n,v,l);else break t}return a>=0&&c>a&&n.l4(s),n.l4(e),n}function $i(t){this.a5_1=t}i($i).n=function(){return Os(this.a5_1)};function Wt(t,n,u,r,e,a,s){return n=n===o?", ":n,u=u===o?"":u,r=r===o?"":r,e=e===o?-1:e,a=a===o?"...":a,s=s===o?null:s,$1(t,Cr(),n,u,r,e,a,s).toString()}function $1(t,n,u,r,e,a,s,l){u=u===o?", ":u,r=r===o?"":r,e=e===o?"":e,a=a===o?-1:a,s=s===o?"...":s,l=l===o?null:l,n.l4(r);var c=0,_=t.n();t:for(;_.o();){var h=_.p();if(c=c+1|0,c>1&&n.l4(u),a<0||c<=a)Ll(n,h,l);else break t}return a>=0&&c>a&&n.l4(s),n.l4(e),n}function Pn(t){if(t.s())throw gu("List is empty.");return t.w(xr(t))}function I1(t){return qi(x1(t))}function su(t){return t.s()?null:t.w(0)}function Ss(t,n){if(I(n,W)){var u=vu(t.i()+n.i()|0);return u.l(t),u.l(n),u}else{var r=vr(t);return wl(r,n),r}}function q1(t){if(I(t,W)){if(t.i()<=1)return qi(t);var n=Ot(t),u=Gn(n)?n:d();return Mf(u),Mi(u)}var r=Oi(t);return yo(r),r}function fu(t){if(t.s())throw gu("List is empty.");return t.w(0)}function Ii(t){return vr(t)}function qi(t){if(I(t,W)){var n;switch(t.i()){case 0:n=Mt();break;case 1:var u;I(t,Sn)?u=t.w(0):u=t.n().p(),n=Du(u);break;default:n=Ii(t);break}return n}return p0(Oi(t))}function x1(t){var n;return I(t,W)?n=a1(t):n=ar(t,pr()),n}function xi(t,n){if(I(t,W)){if(t.i()<=1)return qi(t);var u=Ot(t),r=Gn(u)?u:d();return Lf(r,n),Mi(r)}var e=Oi(t);return bo(e,n),e}function Oi(t){return I(t,W)?Ii(t):ar(t,at())}function ar(t,n){for(var u=t.n();u.o();){var r=u.p();n.k(r)}return n}function O1(t){if(I(t,W)){var n;switch(t.i()){case 0:n=Qi();break;case 1:var u;I(t,Sn)?u=t.w(0):u=t.n().p(),n=es(u);break;default:n=ar(t,o1(t.i()));break}return n}return d0(ar(t,pr()))}function N1(t,n){return Ml.b5(t,n,-1)}function ke(t,n){return t>n?n:t}function sr(t,n){return t=0)){var u="Requested element count "+n+" is less than zero.";throw ut(nt(u))}var r;return n===0?r=t:I(t,nu)?r=t.c5(n):r=new Tn(t,n),r}function M1(t,n){return new Xi(t,n)}function L1(t,n){var u=new Yi(t),r=new Gi(u,!0,U1(n));return new Pr(r,H1)}function z1(t,n){if(!(n>=0)){var u="Requested element count "+n+" is less than zero.";throw ut(nt(u))}var r;return n===0?r=jr():I(t,nu)?r=t.d5(n):r=new Ln(t,n),r}function R1(t,n){for(var u=t.n();u.o();){var r=u.p();n.k(r)}return n}function U1(t){return function(n){return t(n.e5_1,n.f5_1)}}function H1(t){return t.f5_1}function Fr(t,n){return n>=0&&n<=Xr(t)?w(t,n):null}function W1(t){var n=t&65535;return n}function st(t,n){return t-n|0}function K1(t,n){return st(t.g5_1,n instanceof ft?n.g5_1:d())}function Su(t,n){return t-n|0}function pe(t,n){return new yn(t,n)}function mt(t){return t}function J1(t,n){return n instanceof ft?t===n.g5_1:!1}function V1(t){return t}function V(t){return String.fromCharCode(t)}function qs(){Se=this,this.h5_1=0,this.i5_1=65535,this.j5_1=55296,this.k5_1=56319,this.l5_1=56320,this.m5_1=57343,this.n5_1=55296,this.o5_1=57343,this.p5_1=2,this.q5_1=16}var Se;function $e(){return Se==null&&new qs,Se}function ft(t){$e(),this.g5_1=t}i(ft).r5=function(t){return st(this.g5_1,t)};i(ft).d=function(t){return K1(this,t)};i(ft).equals=function(t){return J1(this.g5_1,t)};i(ft).hashCode=function(){return V1(this.g5_1)};i(ft).toString=function(){return V(this.g5_1)};function Sn(){}function W(){}function fn(){}function cn(){}function $n(){}function Z1(){}function _n(t,n){this.s5_1=t,this.t5_1=n}i(_n).u5=function(t){return wr(this.t5_1,t.t5_1)};i(_n).d=function(t){return this.u5(t instanceof _n?t:d())};i(_n).equals=function(t){return this===t};i(_n).hashCode=function(){return af(this)};i(_n).toString=function(){return this.s5_1};function hn(t){var n=t==null?null:nt(t);return n??"null"}function xs(t){for(var n=1,u=[],r=0,e=t.length;rn&&(n=s)}return G1(n,u)}function X1(t){var n=t>>5,u=new Int32Array(n+1|0),r=t&31,e=1<>5;if(u>t.length)return!1;var r=n&31,e=1<mt(s)}if(e)throw ut("Invalid Char code: "+r);u=Tu(r)}else u=t.b(n);return u}function ji(t){return typeof t=="string"}function U(t){var n;return ji(t)?n=t.length:n=t.a(),n}function Rs(t,n,u){var r;return ji(t)?r=t.substring(n,u):r=t.c(n,u),r}function uf(t){return k1(t,", ","[","]",o,o,rf)}function rf(t){return nt(t)}function wr(t,n){var u;switch(typeof t){case"number":var r;typeof n=="number"?r=Na(t,n):n instanceof P?r=Na(t,n.z5()):r=ja(t,n),u=r;break;case"string":case"boolean":u=ja(t,n);break;default:u=ef(t,n);break}return u}function Na(t,n){var u;if(tn)u=1;else if(t===n){var r;if(t!==0)r=0;else{var e=1/t,a;e===1/n?a=0:e<0?a=-1:a=1,r=a}u=r}else t!==t?u=n!==n?0:1:u=-1;return u}function ja(t,n){return tn?1:0}function ef(t,n){return t.d(n)}function af(t){return qe(t)}function qe(t){if(!("kotlinHashCodeValue$"in t)){var n=Us(),u=new Object;u.value=n,u.enumerable=!1,Object.defineProperty(t,"kotlinHashCodeValue$",u)}return t.kotlinHashCodeValue$}function Us(){return Math.random()*4294967296|0}function nt(t){var n;return t==null?n="null":Of(t)?n="[...]":typeof t.toString!="function"?n=sf(t):n=t.toString(),n}function sf(t){return Object.prototype.toString.call(t)}function tt(t){if(t==null)return 0;var n=typeof t,u;switch(n){case"object":u=typeof t.hashCode=="function"?t.hashCode():qe(t);break;case"function":u=qe(t);break;case"number":u=nf(t);break;case"boolean":u=Hs(t);break;case"string":u=cu(String(t));break;case"bigint":u=lf(t);break;case"symbol":u=of(t);break;default:u=function(){throw new Error("Unexpected typeof `"+n+"`")}();break}return u}function Hs(t){return t?1231:1237}function cu(t){var n=0,u=t.length,r=0,e=u-1|0;if(r<=e)do{var a=r;r=r+1|0;var s=t.charCodeAt(a);n=H(n,31)+s|0}while(a!==e);return n}function lf(t){for(var n=BigInt(32),u=BigInt(4294967295),r=t<0?-t:t,e=0,a=t<0?-1:1;r!=0;){var s=Number(r&u);e=H(31,e)+s|0,r=r>>n}return H(e,a)}function of(t){var n=ff(t)?cf():_f(),u=n.get(t);if(u!==o)return u;var r=Us();return n.set(t,r),r}function ff(t){return Symbol.keyFor(t)!=o}function cf(){return Ce===o&&(Ce=new Map),Ce}function _f(){return Ee===o&&(Ee=new WeakMap),Ee}var Ce,Ee;function b(t,n){if(t==null)return n==null;if(n==null)return!1;if(typeof t=="object"&&typeof t.equals=="function")return t.equals(n);if(t!==t)return n!==n;if(typeof t=="number"&&typeof n=="number"){var u;if(t===n){var r;if(t!==0)r=!0;else{var e=1/t;r=e===1/n}u=r}else u=!1;return u}return t===n}function j(t,n){Error.captureStackTrace!=null?Error.captureStackTrace(t,n):t.stack=new Error().stack}function i(t){return t.prototype}function hf(t,n,u,r){return Object.defineProperty(t,n,{configurable:!0,get:u,set:r})}function x(t){return Object.create(t)}function gr(t,n,u){Error.call(t),Df(t,n,u)}function Df(t,n,u){var r=ul(Object.getPrototypeOf(t));if(!(r&1)){var e;if(n==null){var a;if(n!==null){var s=u==null?null:u.toString();a=s??o}else a=o;e=a}else e=n;t.message=e}r&2||(t.cause=u),t.name=Object.getPrototypeOf(t).constructor.name}function _t(t){var n;return t==null?vf():n=t,n}function vf(){throw Hi()}function d(){throw Wi()}function Ae(t){return new Vu(t)}function pf(t,n){for(var u=t.length,r=n.length,e=0,a=n;ee)for(r.length=n;e>>16|0,r=t.y5_1&65535,e=t.x5_1>>>16|0,a=t.x5_1&65535,s=n.y5_1>>>16|0,l=n.y5_1&65535,c=n.x5_1>>>16|0,_=n.x5_1&65535,h=0,v=0,m=0,C=0;return C=C+(a+_|0)|0,m=m+(C>>>16|0)|0,C=C&65535,m=m+(e+c|0)|0,v=v+(m>>>16|0)|0,m=m&65535,v=v+(r+l|0)|0,h=h+(v>>>16|0)|0,v=v&65535,h=h+(u+s|0)|0,h=h&65535,new P(m<<16|C,h<<16|v)}function Ou(t,n){return J(),lr(t,n.h6())}function An(t,n){if(J(),Nn(t))return en();if(Nn(n))return en();if(Pt(t,Kt()))return Ma(n)?Kt():en();if(Pt(n,Kt()))return Ma(t)?Kt():en();if($t(t)){var u;return $t(n)?u=An(dt(t),dt(n)):u=dt(An(dt(t),n)),u}else if($t(n))return dt(An(t,dt(n)));if(La(t,Pa())&&La(n,Pa()))return ju(Nu(t)*Nu(n));var r=t.y5_1>>>16|0,e=t.y5_1&65535,a=t.x5_1>>>16|0,s=t.x5_1&65535,l=n.y5_1>>>16|0,c=n.y5_1&65535,_=n.x5_1>>>16|0,h=n.x5_1&65535,v=0,m=0,C=0,k=0;return k=k+H(s,h)|0,C=C+(k>>>16|0)|0,k=k&65535,C=C+H(a,h)|0,m=m+(C>>>16|0)|0,C=C&65535,C=C+H(s,_)|0,m=m+(C>>>16|0)|0,C=C&65535,m=m+H(e,h)|0,v=v+(m>>>16|0)|0,m=m&65535,m=m+H(a,_)|0,v=v+(m>>>16|0)|0,m=m&65535,m=m+H(s,c)|0,v=v+(m>>>16|0)|0,m=m&65535,v=v+(((H(r,h)+H(e,_)|0)+H(a,c)|0)+H(s,l)|0)|0,v=v&65535,new P(C<<16|k,v<<16|m)}function Af(t,n){if(J(),Nn(n))throw Ri("division by zero");if(Nn(t))return en();if(Pt(t,Kt())){if(Pt(n,Yu())||Pt(n,Ta()))return Kt();if(Pt(n,Kt()))return Yu();var u=df(t,1),r=Ff(u.g6(n),1);if(Pt(r,en()))return $t(n)?Yu():Ta();var e=Ou(t,An(n,r));return lr(r,e.g6(n))}else if(Pt(n,Kt()))return en();if($t(t)){var a;return $t(n)?a=dt(t).g6(dt(n)):a=dt(dt(t).g6(n)),a}else if($t(n))return dt(t.g6(dt(n)));for(var s=en(),l=t;yf(l,n);){for(var c=Nu(l)/Nu(n),_=Math.max(1,Math.floor(c)),h=Math.ceil(Math.log(_)/Math.LN2),v=h<=48?1:Math.pow(2,h-48),m=ju(_),C=An(m,n);$t(C)||gf(C,l);)_=_-v,m=ju(_),C=An(m,n);Nn(m)&&(m=Yu()),s=lr(s,m),l=Ou(l,C)}return s}function Ff(t,n){J();var u=n&63;return u===0?t:u<32?new P(t.x5_1<>>(32-u|0)|0)):new P(0,t.x5_1<<(u-32|0))}function df(t,n){J();var u=n&63;return u===0?t:u<32?new P(t.x5_1>>>u|0|t.y5_1<<(32-u|0),t.y5_1>>u):new P(t.y5_1>>(u-32|0),t.y5_1>=0?0:-1)}function Nu(t){return J(),t.y5_1*4294967296+bf(t)}function Pt(t,n){return J(),t.y5_1===n.y5_1?t.x5_1===n.x5_1:!1}function wf(t){return J(),t.x5_1^t.y5_1}function Oe(t,n){if(J(),n<2||36=9223372036854776e3)return Ef();if(t<0)return dt(ju(-t));var n=4294967296,u=t%n|0,r=t/n|0;return new P(u,r)}function gf(t,n){return J(),yr(t,n)>0}function yf(t,n){return J(),yr(t,n)>=0}function bf(t){return J(),t.x5_1>=0?t.x5_1:4294967296+t.x5_1}var za;function J(){za||(za=!0,Ks=Iu(0),Js=Iu(1),Vs=Iu(-1),Zs=new P(-1,2147483647),Xs=new P(0,-2147483648),Gs=Iu(16777216))}function D(t,n,u,r,e){return Ti("class",t,n,u,r,e,null)}function Ti(t,n,u,r,e,a,s){var l=o;return{kind:t,simpleName:n,associatedObjectKey:r,associatedObjects:e,suspendArity:a,$kClass$:l,defaultConstructor:u,iid:s}}function f(t,n,u,r,e,a,s,l,c){r!=null&&(t.prototype=Object.create(r.prototype),t.prototype.constructor=t);var _=u(n,a,s,l,c??[]);if(t.$metadata$=_,e!=null){var h=_.iid!=null?t:t.prototype;h.$imask$=xs(e)}}function St(t,n,u,r,e){return Ti("interface",t,n,u,r,e,Bf())}function Bf(){return $u===o&&($u=0),$u=$u+1|0,$u}var $u;function g(t,n,u,r,e){return Ti("object",t,n,u,r,e,null)}function Ys(t){var n;return t instanceof P?n=t.j6():n=kf(t),n}function kf(t){var n;return t>2147483647?n=2147483647:t<-2147483648?n=-2147483648:n=t|0,n}function Sf(t){return t<<16>>16}function Tu(t){var n=Ys(t),u=Sf(n);return W1(u)}function Qs(t,n){return new gn(t,n)}function $f(){return mu(),tl}var tl;function au(){return mu(),D(o,o,o,o,o)}function Pi(t,n,u,r,e){return mu(),r.get=r,r.set=e,r.callableName=t,If(r,qf(n,e),xf(r,u))}function If(t,n,u){return mu(),t.$metadata$=n,t.constructor=t,t.$imask$=u,t}function qf(t,n){return mu(),$f()[t][n==null?0:1]}function xf(t,n){mu();var u=t.$imask$,r;if(u==null){var e=[n];r=xs(e)}else r=u;return r}var Ra;function mu(){if(!Ra){Ra=!0;var t=[au(),au()],n=[au(),au()];tl=[t,n,[au(),au()]]}}function Of(t){return nl(t)?!0:Ao(t)}function nl(t){return Array.isArray(t)}function I(t,n){return Nf(t,n.$metadata$.iid)}function Nf(t,n){var u=t.$imask$,r;if(u==null)return!1;r=u;var e=r;return Y1(e,n)}function Gn(t){var n;return nl(t)?n=!t.$type$:n=!1,n}function jf(t){var n;return typeof t=="number"?n=!0:n=t instanceof P,n}function Ne(t){var n=typeof t;return n==="string"||n==="boolean"||jf(t)?!0:I(t,Pu)}function Ct(t){return typeof t=="string"?!0:I(t,pi)}function ul(t){var n=t.constructor,u=n==null?null:n.$metadata$,r=u==null?null:u.errorInfo;if(r!=null)return r;var e=0;if(Ua(t,"message")&&(e=e|1),Ua(t,"cause")&&(e=e|2),e!==3){var a=Tf(t);a!=Error.prototype&&(e=e|ul(a))}return u!=null&&(u.errorInfo=e),e}function Ua(t,n){return t.hasOwnProperty(n)}function Tf(t){return Object.getPrototypeOf(t)}var o;function Pf(t,n,u,r){u=u===o?0:u,r=r===o?t.length:r,qn.k6(u,r,t.length),t.fill(n,u,r)}function Mi(t){return new rt(t)}function Mf(t){t.length>1&&xo(t)}function Lf(t,n){t.length>1&&os(t,n)}function zf(t,n){if(!(n>=0)){var u="Invalid new array size: "+n+".";throw ut(nt(u))}return pf(t,new Int32Array(n))}function Rf(t,n){if(!(n>=0)){var u="Invalid new array size: "+n+".";throw ut(nt(u))}return mf(t,n,null)}function rl(t){var n=(t.i()/2|0)-1|0;if(n<0)return M;var u=xr(t),r=0;if(r<=n)do{var e=r;r=r+1|0;var a=t.w(e);t.j(e,t.w(u)),t.j(u,a),u=u-1|0}while(e!==n)}function Uf(t){var n=mt(t),u=Hf(Ha().l6_1,n),r=n-Ha().l6_1[u]|0;return r<10?r:-1}function Hf(t,n){for(var u=0,r=t.length-1|0,e=-1,a=0;u<=r;)if(e=(u+r|0)/2|0,a=t[e],n>a)u=e+1|0;else{if(n===a)return e;r=e-1|0}return e-(n4096?n===5760||8192<=n&&n<=8202||n===8232||n===8233||n===8239||n===8287?!0:n===12288:!1}function Kf(t){var n=t.t6_1;n!=null&&n!==t&&_t(t.u6().v6(Ol)).w6(n),t.t6_1=il}function it(t){this.m6_1=t,this.n6_1=0,this.o6_1=0,this.p6_1=null,this.q6_1=null,this.r6_1=null;var n=this,u=this.m6_1;n.s6_1=u==null?null:u.u6(),this.t6_1=null}i(it).u6=function(){return _t(this.s6_1)};i(it).x6=function(t){var n=this,u;if(P0(t))u=null;else{var r=t;u=r==null||r!=null?r:d()}for(var e=u,a=M0(t);;){var s=n;a==null?s.p6_1=e:(s.n6_1=s.o6_1,s.q6_1=a);try{var l=s.y6();if(l===xt())return M;e=l,a=null}catch(k){var c=k;e=null,a=c}Kf(s);var _=_t(s.m6_1);if(_ instanceof it)n=_;else{if(a!=null){var h=_t(a),v=z0(h);_.z6(v)}else{var m=e,C=m;_.z6(C)}return M}}};i(it).z6=function(t){return this.x6(t)};function Cu(){}i(Cu).u6=function(){var t="This continuation is already complete";throw Mn(nt(t))};i(Cu).x6=function(t){var n="This continuation is already complete";throw Mn(nt(n))};i(Cu).z6=function(t){return this.x6(t)};i(Cu).toString=function(){return"This continuation is already complete"};var il;function Jf(t,n,u){return new Li(u,t,n,u)}function Li(t,n,u,r){this.i7_1=n,this.j7_1=u,this.k7_1=r,it.call(this,I(t,Ku)?t:d())}i(Li).y6=function(){if(this.q6_1!=null)throw this.q6_1;var t=this.i7_1;return typeof t=="function"?t(this.j7_1,this.k7_1):this.i7_1.l7(this.j7_1,this.k7_1)};function al(t){return gr(t),mn.call(t),t}function sl(){var t=al(x(i(mn)));return j(t,sl),t}function zi(t,n){return gr(n,t),mn.call(n),n}function Ri(t){var n=zi(t,x(i(mn)));return j(n,Ri),n}function mn(){j(this,mn)}function ll(t){return Qt(t),Yn.call(t),t}function ol(){var t=ll(x(i(Yn)));return j(t,ol),t}function fl(t,n){return wu(t,n),Yn.call(n),n}function ut(t){var n=fl(t,x(i(Yn)));return j(n,ut),n}function Yn(){j(this,Yn)}function Vf(t){return Qt(t),Au.call(t),t}function cl(){var t=Vf(x(i(Au)));return j(t,cl),t}function Zf(t,n){return wu(t,n),Au.call(n),n}function Eu(t){var n=Zf(t,x(i(Au)));return j(n,Eu),n}function Au(){j(this,Au)}function Xf(t){return Qt(t),Fu.call(t),t}function _l(){var t=Xf(x(i(Fu)));return j(t,_l),t}function Gf(t,n){return wu(t,n),Fu.call(n),n}function Mn(t){var n=Gf(t,x(i(Fu)));return j(n,Mn),n}function Fu(){j(this,Fu)}function Yf(t){return Qt(t),br.call(t),t}function du(){var t=Yf(x(i(br)));return j(t,du),t}function br(){j(this,br)}function Qt(t){return al(t),Ft.call(t),t}function hl(){var t=Qt(x(i(Ft)));return j(t,hl),t}function wu(t,n){return zi(t,n),Ft.call(n),n}function Dl(t){var n=wu(t,x(i(Ft)));return j(n,Dl),n}function Ft(){j(this,Ft)}function Qf(t){return Qt(t),yu.call(t),t}function Dt(){var t=Qf(x(i(yu)));return j(t,Dt),t}function t0(t,n){return wu(t,n),yu.call(n),n}function gu(t){var n=t0(t,x(i(yu)));return j(n,gu),n}function yu(){j(this,yu)}function n0(t){return gr(t),bu.call(t),t}function vl(){var t=n0(x(i(bu)));return j(t,vl),t}function u0(t,n){return gr(n,t),bu.call(n),n}function bu(){j(this,bu)}function r0(t){return ll(t),Qn.call(t),t}function pl(){var t=r0(x(i(Qn)));return j(t,pl),t}function e0(t,n){return fl(t,n),Qn.call(n),n}function ml(t){var n=e0(t,x(i(Qn)));return j(n,ml),n}function Qn(){j(this,Qn)}function i0(t){return Qt(t),Bu.call(t),t}function Cl(){var t=i0(x(i(Bu)));return j(t,Cl),t}function a0(t,n){return wu(t,n),Bu.call(n),n}function El(t){var n=a0(t,x(i(Bu)));return j(n,El),n}function Bu(){j(this,Bu)}function s0(t){return Qt(t),Br.call(t),t}function Ui(){var t=s0(x(i(Br)));return j(t,Ui),t}function Br(){j(this,Br)}function l0(t){return Qt(t),kr.call(t),t}function Hi(){var t=l0(x(i(kr)));return j(t,Hi),t}function kr(){j(this,kr)}function o0(t){return Qt(t),Sr.call(t),t}function Wi(){var t=o0(x(i(Sr)));return j(t,Wi),t}function Sr(){j(this,Sr)}function f0(t){return function(n){return n===t?"(this Collection)":hn(n)}}function Dn(){}i(Dn).q=function(t){var n;t:{var u;if(I(this,W)?u=this.s():u=!1,u){n=!1;break t}for(var r=this.n();r.o();){var e=r.p();if(b(e,t)){n=!0;break t}}n=!1}return n};i(Dn).r=function(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p();if(!this.q(e)){n=!1;break t}}n=!0}return n};i(Dn).s=function(){return this.i()===0};i(Dn).toString=function(){return Wt(this,", ","[","]",o,o,f0(this))};i(Dn).toArray=function(){return rs(this)};function In(){this.e1_1=2147483639}i(In).e2=function(t,n){if(t<0||t>=n)throw Eu("index: "+t+", size: "+n)};i(In).f1=function(t,n){if(t<0||t>n)throw Eu("index: "+t+", size: "+n)};i(In).k6=function(t,n,u){if(t<0||n>u)throw Eu("fromIndex: "+t+", toIndex: "+n+", size: "+u);if(t>n)throw ut("fromIndex: "+t+" > toIndex: "+n)};i(In).g3=function(t,n){var u=t+(t>>1)|0;return(u-n|0)<0&&(u=n),(u-2147483639|0)>0&&(u=n>2147483639?En.MAX_VALUE:2147483639),u};i(In).m1=function(t){for(var n=1,u=t.n();u.o();){var r=u.p(),e=H(31,n),a=r==null?null:tt(r);n=e+(a??0)|0}return n};i(In).l1=function(t,n){if(t.i()!==n.i())return!1;for(var u=n.n(),r=t.n();r.o();){var e=r.p(),a=u.p();if(!b(e,a))return!1}return!0};var qn;function Wa(t,n){return n===t?"(this Map)":hn(n)}function Al(t,n){var u;t:{for(var r=t.x1().n();r.o();){var e=r.p();if(b(e.h4(),n)){u=e;break t}}u=null}return u}function c0(){}function _0(t){return function(n){return t.o7(n)}}function qt(){this.s1_1=null,this.t1_1=null}i(qt).u1=function(t){return Al(this,t)!=null};i(qt).v1=function(t){if(!(t!=null&&I(t,fn)))return!1;var n=t.h4(),u=t.i4(),r=(I(this,cn)?this:d()).w1(n);if(!b(u,r))return!1;var e;return r==null?e=!(I(this,cn)?this:d()).u1(n):e=!1,!e};i(qt).equals=function(t){if(t===this)return!0;if(!(t!=null&&I(t,cn))||this.i()!==t.i())return!1;var n;t:{var u=t.x1(),r;if(I(u,W)?r=u.s():r=!1,r){n=!0;break t}for(var e=u.n();e.o();){var a=e.p();if(!this.v1(a)){n=!1;break t}}n=!0}return n};i(qt).w1=function(t){var n=Al(this,t);return n==null?null:n.i4()};i(qt).hashCode=function(){return tt(this.x1())};i(qt).i=function(){return this.x1().i()};i(qt).toString=function(){var t=this.x1();return Wt(t,", ","{","}",o,o,_0(this))};i(qt).o7=function(t){return Wa(this,t.h4())+"="+Wa(this,t.i4())};function $r(){}i($r).z1=function(t){for(var n=0,u=t.n();u.o();){var r=u.p(),e=n,a=r==null?null:tt(r);n=e+(a??0)|0}return n};i($r).y1=function(t,n){return t.i()!==n.i()?!1:t.r(n)};var Ki;function h0(t){if(t.s())return[];for(var n=t.i(),u=Ni(Array(n),null),r=t.n(),e=0;r.o();){var a=e;e=a+1|0,u[a]=r.p()}return u}function Fl(t){return t.length===0?at():vr(new Cn(t,!0))}function Ji(t){return t.length>0?Mi(t):Mt()}function Mt(){return v0()}function D0(t){return t.length===0?at():vr(new Cn(t,!0))}function Ir(){}i(Ir).o=function(){return!1};i(Ir).p=function(){throw Dt()};var qr;function Cn(t,n){this.p7_1=t,this.q7_1=n}i(Cn).i=function(){return this.p7_1.length};i(Cn).s=function(){return this.p7_1.length===0};i(Cn).r7=function(t){return b1(this.p7_1,t)};i(Cn).s7=function(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p();if(!this.r7(e)){n=!1;break t}}n=!0}return n};i(Cn).r=function(t){return this.s7(t)};i(Cn).n=function(){return Os(this.p7_1)};function Ht(){Te=this,this.t7_1=new P(-1478467534,-1720727600)}i(Ht).equals=function(t){var n;return t!=null&&I(t,Sn)?n=t.s():n=!1,n};i(Ht).hashCode=function(){return 1};i(Ht).toString=function(){return"[]"};i(Ht).i=function(){return 0};i(Ht).s=function(){return!0};i(Ht).u7=function(t){return t.s()};i(Ht).r=function(t){return this.u7(t)};i(Ht).w=function(t){throw Eu("Empty list doesn't contain element at index "+t+".")};i(Ht).n=function(){return qr};var Te;function v0(){return Te==null&&new Ht,Te}function xr(t){return t.i()-1|0}function p0(t){switch(t.i()){case 0:return Mt();case 1:return Du(t.w(0));default:return t}}function m0(){throw El("Index overflow has happened.")}function jn(t,n){this.e5_1=t,this.f5_1=n}i(jn).toString=function(){return"IndexedValue(index="+this.e5_1+", value="+this.f5_1+")"};i(jn).hashCode=function(){var t=this.e5_1;return t=H(t,31)+(this.f5_1==null?0:tt(this.f5_1))|0,t};i(jn).equals=function(t){if(this===t)return!0;if(!(t instanceof jn))return!1;var n=t instanceof jn?t:d();return!(this.e5_1!==n.e5_1||!b(this.f5_1,n.f5_1))};function C0(t){for(var n=at(),u=t.n();u.o();){var r=u.p();wl(n,r)}return n}function Or(t,n){var u;return I(t,W)?u=t.i():u=n,u}function dl(t){var n;if(t.s())throw gu("List is empty.");return n=t.z(xr(t)),n}function wl(t,n){if(I(n,W))return t.l(n);for(var u=!1,r=n.n();r.o();){var e=r.p();t.k(e)&&(u=!0)}return u}function Nr(){}i(Nr).p=function(){return this.v7()};function Hu(){}i(Hu).w7=function(){return this.x7()};i(Hu).p=function(){return new ft(this.w7())};function tu(t){return new Vi(t)}function kt(){}i(kt).a8=function(t,n){var u;return I(t,W)?u=t.s():u=!1,u?M:this.z7(t.n(),n)};i(kt).b8=function(t,n){return this.z7(t.n(),n)};function E0(t){var n=new Gt;return n.f8_1=Jf(t,n,n),n}function A0(t){if(t.o())return t.p();throw Dt()}function gl(t){switch(t.c8_1){case 4:return Dt();case 5:return Mn("Iterator has failed.");default:return Mn("Unexpected state of the iterator: "+t.c8_1)}}function Gt(){kt.call(this),this.c8_1=0,this.d8_1=null,this.e8_1=null,this.f8_1=null}i(Gt).o=function(){for(;;){switch(this.c8_1){case 0:break;case 1:if(_t(this.e8_1).o())return this.c8_1=2,!0;this.e8_1=null;break;case 4:return!1;case 3:case 2:return!0;default:throw gl(this)}this.c8_1=5;var t=_t(this.f8_1);this.f8_1=null;var n=M;t.z6(n)}};i(Gt).p=function(){switch(this.c8_1){case 0:case 1:return A0(this);case 2:return this.c8_1=1,_t(this.e8_1).p();case 3:this.c8_1=0;var t=this.d8_1,n=t==null||t!=null?t:d();return this.d8_1=null,n;default:throw gl(this)}};i(Gt).y7=function(t,n){return this.d8_1=t,this.c8_1=3,this.f8_1=n,xt()};i(Gt).z7=function(t,n){return t.o()?(this.e8_1=t,this.c8_1=2,this.f8_1=n,xt()):M};i(Gt).g8=function(t){R0(t);var n=t;n==null||n!=null||d(),this.c8_1=4};i(Gt).z6=function(t){return this.g8(t)};i(Gt).u6=function(){return y0()};function Vi(t){this.h8_1=t}i(Vi).n=function(){return E0(this.h8_1)};function jr(){return Wr}function Tr(t){this.j8_1=t,this.i8_1=t.k8_1.n()}i(Tr).p=function(){return this.j8_1.l8_1(this.i8_1.p())};i(Tr).o=function(){return this.i8_1.o()};function Pr(t,n){this.k8_1=t,this.l8_1=n}i(Pr).n=function(){return new Tr(this)};function yl(t){if(t.m8_1.o()){var n=t.m8_1.p();if(t.p8_1.r8_1(n))return t.n8_1=1,t.o8_1=n,M}t.n8_1=0}function Mr(t){this.p8_1=t,this.m8_1=t.q8_1.n(),this.n8_1=-1,this.o8_1=null}i(Mr).p=function(){if(this.n8_1===-1&&yl(this),this.n8_1===0)throw Dt();var t=this.o8_1,n=t==null||t!=null?t:d();return this.o8_1=null,this.n8_1=-1,n};i(Mr).o=function(){return this.n8_1===-1&&yl(this),this.n8_1===1};function Zi(t,n){this.q8_1=t,this.r8_1=n}i(Zi).n=function(){return new Mr(this)};function nu(){}function bl(t){for(;t.t8_1>0&&t.s8_1.o();)t.s8_1.p(),t.t8_1=t.t8_1-1|0}function Lr(t){this.s8_1=t.u8_1.n(),this.t8_1=t.v8_1}i(Lr).p=function(){return bl(this),this.s8_1.p()};i(Lr).o=function(){return bl(this),this.s8_1.o()};function Tn(t,n){if(this.u8_1=t,this.v8_1=n,!(this.v8_1>=0)){var u="count must be non-negative, but was "+this.v8_1+".";throw ut(nt(u))}}i(Tn).c5=function(t){var n=this.v8_1+t|0;return n<0?new Tn(this,t):new Tn(this.u8_1,n)};i(Tn).d5=function(t){var n=this.v8_1+t|0;return n<0?new Ln(this,t):new wn(this.u8_1,this.v8_1,n)};i(Tn).n=function(){return new Lr(this)};function Bl(t){for(;t.w8_1.o();){var n=t.w8_1.p();if(!t.z8_1.b9_1(n))return t.y8_1=n,t.x8_1=1,M}t.x8_1=0}function zr(t){this.z8_1=t,this.w8_1=t.a9_1.n(),this.x8_1=-1,this.y8_1=null}i(zr).p=function(){if(this.x8_1===-1&&Bl(this),this.x8_1===1){var t=this.y8_1,n=t==null||t!=null?t:d();return this.y8_1=null,this.x8_1=0,n}return this.w8_1.p()};i(zr).o=function(){return this.x8_1===-1&&Bl(this),this.x8_1===1?!0:this.w8_1.o()};function Xi(t,n){this.a9_1=t,this.b9_1=n}i(Xi).n=function(){return new zr(this)};function kl(t){for(;t.c9_1.o();){var n=t.c9_1.p();if(t.f9_1.i9_1(n)===t.f9_1.h9_1)return t.e9_1=n,t.d9_1=1,M}t.d9_1=0}function Rr(t){this.f9_1=t,this.c9_1=t.g9_1.n(),this.d9_1=-1,this.e9_1=null}i(Rr).p=function(){if(this.d9_1===-1&&kl(this),this.d9_1===0)throw Dt();var t=this.e9_1;return this.e9_1=null,this.d9_1=-1,t==null||t!=null?t:d()};i(Rr).o=function(){return this.d9_1===-1&&kl(this),this.d9_1===1};function Gi(t,n,u){n=n===o?!0:n,this.g9_1=t,this.h9_1=n,this.i9_1=u}i(Gi).n=function(){return new Rr(this)};function Ur(t){this.j9_1=t.l9_1.n(),this.k9_1=0}i(Ur).p=function(){var t=this.k9_1;return this.k9_1=t+1|0,new jn(Ci(t),this.j9_1.p())};i(Ur).o=function(){return this.j9_1.o()};function Yi(t){this.l9_1=t}i(Yi).n=function(){return new Ur(this)};function Hr(t){this.m9_1=t.p9_1,this.n9_1=t.o9_1.n()}i(Hr).p=function(){if(this.m9_1===0)throw Dt();return this.m9_1=this.m9_1-1|0,this.n9_1.p()};i(Hr).o=function(){return this.m9_1>0?this.n9_1.o():!1};function Ln(t,n){if(this.o9_1=t,this.p9_1=n,!(this.p9_1>=0)){var u="count must be non-negative, but was "+this.p9_1+".";throw ut(nt(u))}}i(Ln).c5=function(t){return t>=this.p9_1?jr():new wn(this.o9_1,t,this.p9_1)};i(Ln).d5=function(t){return t>=this.p9_1?this:new Ln(this.o9_1,t)};i(Ln).n=function(){return new Hr(this)};function Wu(){}i(Wu).n=function(){return qr};i(Wu).c5=function(t){return Wr};i(Wu).d5=function(t){return Wr};var Wr;function Sl(t){for(;t.r9_1=this.s9_1.v9_1)throw Dt();return this.r9_1=this.r9_1+1|0,this.q9_1.p()};function wn(t,n,u){if(this.t9_1=t,this.u9_1=n,this.v9_1=u,!(this.u9_1>=0)){var r="startIndex should be non-negative, but is "+this.u9_1;throw ut(nt(r))}if(!(this.v9_1>=0)){var e="endIndex should be non-negative, but is "+this.v9_1;throw ut(nt(e))}if(!(this.v9_1>=this.u9_1)){var a="endIndex should be not less than startIndex, but was "+this.v9_1+" < "+this.u9_1;throw ut(nt(a))}}i(wn).c5=function(t){return t>=$l(this)?jr():new wn(this.t9_1,this.u9_1+t|0,this.v9_1)};i(wn).d5=function(t){return t>=$l(this)?this:new wn(this.t9_1,this.u9_1,this.u9_1+t|0)};i(wn).n=function(){return new Kr(this)};function Qi(){return w0()}function F0(t){return B1(t,Uo(t.length))}function d0(t){switch(t.i()){case 0:return Qi();case 1:return es(t.n().p());default:return t}}function tn(){Pe=this,this.w9_1=new P(1993859828,793161749)}i(tn).equals=function(t){var n;return t!=null&&I(t,$n)?n=t.s():n=!1,n};i(tn).hashCode=function(){return 0};i(tn).toString=function(){return"[]"};i(tn).i=function(){return 0};i(tn).s=function(){return!0};i(tn).u7=function(t){return t.s()};i(tn).r=function(t){return this.u7(t)};i(tn).n=function(){return qr};var Pe;function w0(){return Pe==null&&new tn,Pe}function Il(){var t=ql;return I(t,Vn)?t:d()}function Jr(){}i(Jr).x9=function(t,n){return wr(t,n)};i(Jr).compare=function(t,n){var u=t!=null&&Ne(t)?t:d();return this.x9(u,n!=null&&Ne(n)?n:d())};var ql;function ta(t,n){return t===n?0:t==null?-1:n==null?1:wr(t!=null&&Ne(t)?t:d(),n)}function Ku(){}function xl(){}var Ol;function g0(){}function Ju(){Me=this,this.y9_1=new P(0,0)}i(Ju).v6=function(t){return null};i(Ju).hashCode=function(){return 0};i(Ju).toString=function(){return"EmptyCoroutineContext"};var Me;function y0(){return Me==null&&new Ju,Me}function xt(){return B0()}var Nl,Ka;function b0(){if(Ka)return M;Ka=!0,Nl=new rr("COROUTINE_SUSPENDED",0),new rr("UNDECIDED",1),new rr("RESUMED",2)}function rr(t,n){_n.call(this,t,n)}function B0(){return b0(),Nl}function jl(t,n,u){var r;if(u>0)r=t>=n?n:n-Ja(n,t,u)|0;else if(u<0)r=t<=n?n:n+Ja(t,n,-u|0)|0;else throw ut("Step is zero.");return r}function Ja(t,n,u){return Fe(Fe(t,u)-Fe(n,u)|0,u)}function Fe(t,n){var u=t%n|0;return u>=0?u:u+n|0}function Tl(){Le=this,this.z9_1=new gn(1,0)}var Le;function k0(){return Le==null&&new Tl,Le}function gn(t,n){k0(),Yt.call(this,t,n,1)}i(gn).s=function(){return this.da_1>this.ea_1};i(gn).equals=function(t){var n;return t instanceof gn?n=this.s()&&t.s()?!0:this.da_1===t.da_1?this.ea_1===t.ea_1:!1:n=!1,n};i(gn).hashCode=function(){return this.s()?-1:H(31,this.da_1)+this.ea_1|0};i(gn).toString=function(){return""+this.da_1+".."+this.ea_1};function Pl(){ze=this,this.ga_1=new yn(1,0)}var ze;function S0(){return ze==null&&new Pl,ze}function yn(t,n){S0(),vn.call(this,t,n,1)}i(yn).s=function(){return st(this.ka_1,this.la_1)>0};i(yn).equals=function(t){var n;return t instanceof yn?n=this.s()&&t.s()?!0:this.ka_1===t.ka_1?this.la_1===t.la_1:!1:n=!1,n};i(yn).hashCode=function(){var t;if(this.s())t=-1;else{var n=this.ka_1,u=mt(n),r=H(31,u),e=this.la_1;t=r+mt(e)|0}return t};i(yn).toString=function(){return V(this.ka_1)+".."+V(this.la_1)};function Vr(t,n,u){Nr.call(this),this.na_1=u,this.oa_1=n,this.pa_1=this.na_1>0?t<=n:t>=n,this.qa_1=this.pa_1?t:this.oa_1}i(Vr).o=function(){return this.pa_1};i(Vr).v7=function(){var t=this.qa_1;if(t===this.oa_1){if(!this.pa_1)throw Dt();this.pa_1=!1}else this.qa_1=this.qa_1+this.na_1|0;return t};function Zr(t,n,u){Hu.call(this),this.ra_1=u;var r=this;r.sa_1=mt(n),this.ta_1=this.ra_1>0?st(t,n)<=0:st(t,n)>=0;var e=this,a;this.ta_1?a=mt(t):a=this.sa_1,e.ua_1=a}i(Zr).o=function(){return this.ta_1};i(Zr).x7=function(){var t=this.ua_1;if(t===this.sa_1){if(!this.ta_1)throw Dt();this.ta_1=!1}else this.ua_1=this.ua_1+this.ra_1|0;return Tu(t)};function na(){}i(na).b5=function(t,n,u){return new Yt(t,n,u)};var Ml;function Yt(t,n,u){if(u===0)throw ut("Step must be non-zero.");if(u===En.MIN_VALUE)throw ut("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.da_1=t,this.ea_1=jl(t,n,u),this.fa_1=u}i(Yt).n=function(){return new Vr(this.da_1,this.ea_1,this.fa_1)};i(Yt).s=function(){return this.fa_1>0?this.da_1>this.ea_1:this.da_10?""+this.da_1+".."+this.ea_1+" step "+this.fa_1:""+this.da_1+" downTo "+this.ea_1+" step "+(-this.fa_1|0)};function $0(){}function vn(t,n,u){if(u===0)throw ut("Step must be non-zero.");if(u===En.MIN_VALUE)throw ut("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.ka_1=t;var r=this,e=mt(t),a=mt(n);r.la_1=Tu(jl(e,a,u)),this.ma_1=u}i(vn).n=function(){return new Zr(this.ka_1,this.la_1,this.ma_1)};i(vn).s=function(){return this.ma_1>0?st(this.ka_1,this.la_1)>0:st(this.ka_1,this.la_1)<0};i(vn).equals=function(t){var n;return t instanceof vn?n=this.s()&&t.s()?!0:this.ka_1===t.ka_1&&this.la_1===t.la_1?this.ma_1===t.ma_1:!1:n=!1,n};i(vn).hashCode=function(){var t;if(this.s())t=-1;else{var n=this.ka_1,u=mt(n),r=H(31,u),e=this.la_1,a=mt(e);t=H(31,r+a|0)+this.ma_1|0}return t};i(vn).toString=function(){return this.ma_1>0?V(this.ka_1)+".."+V(this.la_1)+" step "+this.ma_1:V(this.ka_1)+" downTo "+V(this.la_1)+" step "+(-this.ma_1|0)};function Ll(t,n,u){u!=null?t.l4(u(n)):n==null||Ct(n)?t.l4(n):n instanceof ft?t.e4(n.g5_1):t.l4(hn(n))}function zl(t,n,u){if(u=u===o?!1:u,t===n)return!0;if(!u)return!1;var r=Ia(t),e=Ia(n),a;if(r===e)a=!0;else{var s=V(r).toLowerCase(),l=w(s,0),c=V(e).toLowerCase();a=l===w(c,0)}return a}function I0(t){return Ul(t,10)}function Rl(t){throw ml("Invalid number format: '"+t+"'")}function Ul(t,n){ys(n);var u=t.length;if(u===0)return null;var r,e,a,s=w(t,0);if(st(s,48)<0){if(u===1)return null;if(r=1,s===45)e=!0,a=En.MIN_VALUE;else if(s===43)e=!1,a=-En.MAX_VALUE|0;else return null}else r=0,e=!1,a=-En.MAX_VALUE|0;var l=(-En.MAX_VALUE|0)/36|0,c=l,_=0,h=r;if(h=0}function Hl(t,n,u){u=u===o?!1:u;var r,e;return u?e=!1:e=typeof t=="string",e?r=typeof n=="string":r=!1,r?d1(t,n):Gr(t,0,n,0,U(n),u)}function Wl(t,n,u){u=u===o?!1:u;var r;return typeof n=="string"?r=x0(t,n,o,u)>=0:r=Kl(t,n,0,U(t),u)>=0,r}function ua(t,n,u){u=u===o?!1:u;var r,e;return u?e=!1:e=typeof t=="string",e?r=typeof n=="string":r=!1,r?w1(t,n):Gr(t,U(t)-U(n)|0,n,0,U(n),u)}function q0(t,n,u,r){u=u===o?0:u,r=r===o?!1:r;var e,a;if(r?a=!0:a=typeof t!="string",a){var s=Q1([n]);e=N0(t,s,u,r)}else{var l=V(n);e=t.indexOf(l,u)}return e}function Gr(t,n,u,r,e,a){if(r<0||n<0||n>(U(t)-e|0)||r>(U(u)-e|0))return!1;var s=0;if(s0&&c<=_||h<0&&_<=c)do{var v=c;if(c=c+h|0,Er(n,0,t,v,U(n),e))return v}while(v!==_)}else{var m=s.da_1,C=s.ea_1,k=s.fa_1;if(k>0&&m<=C||k<0&&C<=m)do{var A=m;if(m=m+k|0,Gr(n,0,t,A,U(n),e))return A}while(A!==C)}return-1}function O0(t){var n=0,u=U(t)-1|0,r=!1;t:for(;n<=u;){var e=r?u:n,a=gs(w(t,e));if(!r)a?n=n+1|0:r=!0;else if(a)u=u-1|0;else break t}return Rs(t,n,u+1|0)}function N0(t,n,u,r){u=u===o?0:u,r=r===o?!1:r;var e;if(!r&&n.length===1?e=typeof t=="string":e=!1,e){var a=y1(n),s=V(a);return t.indexOf(s,u)}var l=sr(u,0),c=Xr(t);if(l<=c)do{var _=l;l=l+1|0;var h=w(t,_),v;t:{for(var m=0,C=n.length;m$lambda$slambda",D,it,o,o,o,o,[1]);f(Rn,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Un,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Hn,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Wn,"Transform$querySelectorAll$lambda$slambda",D,it,o,o,o,o,[1]);f(Kn,"Transform$querySelectorTrackAll$lambda$slambda",D,it,o,o,o,o,[1]);f(Zl,"Transform",D);f(Lt,"Expression",D);f(bt,"BinaryExpression",D,Lt);f(ne,"sam$kotlin_Comparator$0",D,o,[Vn]);f(Xl,"Companion",g);f(Z,"CompareOperator",D);f(ea,"Equal",g,Z);f(ia,"NotEqual",g,Z);f(aa,"Start",g,Z);f(sa,"NotStart",g,Z);f(la,"Include",g,Z);f(oa,"NotInclude",g,Z);f(fa,"End",g,Z);f(ca,"NotEnd",g,Z);f(_a,"Less",g,Z);f(ha,"LessEqual",g,Z);f(Da,"More",g,Z);f(va,"MoreEqual",g,Z);f(Zu,"ConnectExpression",D);f(re,"sam$kotlin_Comparator$0",D,o,[Vn]);f(to,"Companion",g);f(Tt,"ConnectOperator",D);f(ee,"BeforeBrother",g,Tt);f(ie,"AfterBrother",g,Tt);f(ae,"Ancestor",g,Tt);f(se,"Child",g,Tt);f(le,"Descendant",g,Tt);f(Jn,"ConnectSegment$traversal$o$invoke$slambda",D,it,o,o,o,o,[1]);f(Ca,o,D);f(Ea,o,D);f(an,"ConnectSegment",D,o,o,an);f(Fn,"ConnectWrapper",D);f(It,"LogicalExpression",D,Lt);f(oe,"sam$kotlin_Comparator$0",D,o,[Vn]);f(no,"Companion",g);f(ru,"LogicalOperator",D);f(Aa,"AndOperator",g,ru);f(fe,"OrOperator",g,ru);f(Fa,o,D);f(At,"PolynomialExpression",D,Zu,o,At);f(da,o,D);f(wa,o,D);f(dn,"PropertySegment",D);f(sn,"PropertyWrapper",D);f(ga,o,D);f(Vt,"TupleExpression",D,Zu);f(K,"Parser",D);f(R,"ParserResult",D);f(ya,"ParserSet",g);f(Xu,o,D);f(ba,"FilterIndexesSequence",D);function Qr(){}i(Qr).parse=function(t){return new gt(ra.db(t))};i(Qr).parseOrNull=function(t){var n=ra.eb(t),u;return n==null?u=null:u=new gt(n),u};var Vl;function U0(){return Vl}function gt(t){this.fb_1=t,this.tracks=this.fb_1.qb(),this.trackIndex=this.fb_1.ib_1,this.connectKeys=this.fb_1.rb(),this.propertyNames=this.fb_1.sb()}i(gt).tb=function(){return this.fb_1};i(gt).qb=function(){return this.tracks};i(gt).ub=function(){return this.trackIndex};i(gt).rb=function(){return this.connectKeys};i(gt).sb=function(){return this.propertyNames};i(gt).match=function(t,n){return this.fb_1.wb(t,n.vb_1)};i(gt).matchTrack=function(t,n){var u=this.fb_1.xb(t,n.vb_1),r;u==null?r=null:r=Ot(u);var e=r;return e==null||Gn(e)?e:d()};i(gt).toString=function(){return this.fb_1.toString()};function H0(t){return function(n){return g1(t(n))}}function W0(t){return function(n,u){var r=$s(t.vb_1.kc_1(n,u.fb_1)),e=Ot(r);return Gn(e)?e:d()}}function K0(t){return function(n,u){return Ar(t.vb_1.kc_1(n,u.fb_1))}}function J0(t){var n=Ot(t);return Gn(n)?n:d()}function V0(t){return function(n,u){var r=t.vb_1.mc_1(n,u.fb_1),e=$s(j1(r,J0)),a=Ot(e);return Gn(a)?a:d()}}function Z0(t){return function(n,u){var r=Ar(t.vb_1.mc_1(n,u.fb_1)),e;r==null?e=null:e=Ot(r);var a=e;return a==null||Gn(a)?a:d()}}function uu(t,n,u,r){var e=this;e.vb_1=new Zl(t,n,H0(u),o,r);var a=this;a.querySelectorAll=W0(this);var s=this;s.querySelector=K0(this);var l=this;l.querySelectorTrackAll=V0(this);var c=this;c.querySelectorTrack=Z0(this)}i(uu).oc=function(){return this.vb_1};i(uu).pc=function(){return this.querySelectorAll};i(uu).qc=function(){return this.querySelector};i(uu).rc=function(){return this.querySelectorTrackAll};i(uu).sc=function(){return this.querySelectorTrack};function ku(){}i(ku).tc=function(t,n,u,r){var e;if(n>=t.length)e=!0;else{var a;U(u)>0?a=!wt(u,w(t,n)):a=!1,e=a}if(e)throw new ot(r??u,n,t)};i(ku).assert=function(t,n,u,r,e){return u=u===o?"":u,r=r===o?null:r,this.tc(t,n,u,r)};i(ku).uc=function(t,n,u){throw new ot(u,n,t)};i(ku).throwError=function(t,n,u,r){return u=u===o?"":u,this.uc(t,n,u)};var B;function ot(t,n,u){var r=Fr(u,n);zi("expected "+t+" in selector at position "+n+", but got "+hn(r==null?null:new ft(r)),this),j(this,ot),this.expectedValue=t,this.position=n,this.source=u}i(ot).vc=function(){return this.expectedValue};i(ot).wc=function(){return this.position};i(ot).xc=function(){return this.source};i(ot).bb=function(){return this.expectedValue};i(ot).cb=function(){return this.position};i(ot).yc=function(){return this.source};i(ot).zc=function(t,n,u){return new ot(t,n,u)};i(ot).copy=function(t,n,u,r){return t=t===o?this.expectedValue:t,n=n===o?this.position:n,u=u===o?this.source:u,this.zc(t,n,u)};i(ot).toString=function(){return"ExtSyntaxError(expectedValue="+this.expectedValue+", position="+this.position+", source="+this.source+")"};i(ot).hashCode=function(){var t=cu(this.expectedValue);return t=ht(t,31)+this.position|0,t=ht(t,31)+cu(this.source)|0,t};i(ot).equals=function(t){if(this===t)return!0;if(!(t instanceof ot))return!1;var n=t instanceof ot?t:d();return!(this.expectedValue!==n.expectedValue||this.position!==n.position||this.source!==n.source)};function te(){}i(te).db=function(t){return y().xd_1(t)};i(te).eb=function(t){var n;try{n=y().xd_1(t)}catch(r){var u;if(r instanceof mn)u=null;else throw r;n=u}return n};var ra;function X0(t){return function(){var n=Fl([t.gb_1]);t:for(;;){var u=Pn(n).zd_1,r=u==null?null:u.be_1,e;if(r==null)break t;e=r,n.k(e)}for(var a=vu(Or(n,10)),s=n.n();s.o();){var l=s.p(),c=l.yd_1.ce_1;a.k(c)}return Ot(a)}}function G0(t){return function(){for(var n=t.gb_1.zd_1,u=at();n!=null;){_t(n).ae_1.je_1,u.k(_t(n).ae_1.ie_1.le_1);var r=n,e=r==null?null:r.be_1;n=e==null?null:e.zd_1}return Ot(u)}}function Y0(t){return function(){for(var n=t.gb_1,u=pr();n!=null;){var r=_t(n).yd_1,e=_t(n).zd_1;n=e==null?null:e.be_1,u.l(r.ge_1)}var a=I1(u);return Ot(a)}}function nn(t){this.gb_1=t;var n=this;n.hb_1=Ae(X0(this));var u=this,r;t:{var e=this.qb(),a=0,s=e.length-1|0;if(a<=s)do{var l=a;if(a=a+1|0,e[l]){r=l;break t}}while(a<=s);r=-1}var c=r;u.ib_1=c<0?0:c;var _=this;_.jb_1=Ae(G0(this));var h=this;h.kb_1=Ae(Y0(this));var v=this,m=su(this.gb_1.yd_1.ee_1),C,k,A,F;if(m instanceof bt?F=m.me_1==="id":F=!1,F?A=b(m.ne_1,lu()):A=!1,A){var E=m.oe_1;k=E!=null?typeof E=="string":!1}else k=!1;k?C=m.oe_1:C=null,v.lb_1=C;var q=this,T=su(this.gb_1.yd_1.ee_1),O,z,Q,vt;if(T instanceof bt?vt=T.me_1==="vid":vt=!1,vt?Q=b(T.ne_1,lu()):Q=!1,Q){var pt=T.oe_1;z=pt!=null?typeof pt=="string":!1}else z=!1;z?O=T.oe_1:O=null,q.mb_1=O;var L=this,X=su(this.gb_1.yd_1.ee_1),yt,eu,iu,ce;if(X instanceof bt?ce=X.me_1==="text":ce=!1,ce?iu=b(X.ne_1,lu())||b(X.ne_1,Gl())||b(X.ne_1,Yl())?!0:b(X.ne_1,Ql()):iu=!1,iu){var ka=X.oe_1;eu=ka!=null?typeof ka=="string":!1}else eu=!1;eu?yt=X.oe_1:yt=null,L.nb_1=yt,this.ob_1=this.lb_1!=null||this.mb_1!=null?!0:this.nb_1!=null;var co=this,Gu=su(this.gb_1.yd_1.ee_1),_e,he,De;Gu instanceof bt?De=Gu.me_1==="depth":De=!1,De?he=b(Gu.ne_1,lu()):he=!1,he?_e=b(Gu.oe_1,0):_e=!1,co.pb_1=_e}i(nn).toString=function(){return this.gb_1.toString()};i(nn).qb=function(){var t=this.hb_1;return Q0(),t.i4()};i(nn).rb=function(){var t=this.jb_1;return tc(),t.i4()};i(nn).sb=function(){var t=this.kb_1;return nc(),t.i4()};i(nn).qe=function(t,n,u){var r=this.re(t,n,u),e;if(r==null)return null;e=r;var a=e;return a.w(this.ib_1)};i(nn).wb=function(t,n,u,r){var e;return u===o?e=at():e=u,u=e,r===o?this.qe(t,n,u):r.qe.call(this,t,n,u)};i(nn).re=function(t,n,u){return this.gb_1.re(t,n,u)};i(nn).xb=function(t,n,u,r){var e;return u===o?e=at():e=u,u=e,r===o?this.re(t,n,u):r.re.call(this,t,n,u)};function Q0(){return Pi("tracks",1,mr,function(t){return t.qb()},null)}function tc(){return Pi("connectKeys",1,mr,function(t){return t.rb()},null)}function nc(){return Pi("propertyNames",1,mr,function(t){return t.sb()},null)}function uc(t){return function(n){return!b(n,t)}}function rc(t){return function(n){return!b(n,t)}}function ec(t){return function(n,u){return Uu(t(n),u)}}function zn(t,n,u){this.af_1=t,this.bf_1=n,it.call(this,u)}i(zn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(zn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(zn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=5;var u=this,r=this.af_1(this.bf_1),e;if(r==null)return M;e=r,u.df_1=e,this.n6_1=1;continue t;case 1:if(this.df_1==null){this.n6_1=4;continue t}if(this.ef_1=this.df_1,this.ef_1==null){this.ff_1=null,this.n6_1=3;continue t}else{var a=this;a.gf_1=this.ef_1;var s=this;if(s.hf_1=this.gf_1,this.n6_1=2,t=this.cf_1.y7(this.hf_1,this),t===xt())return t;continue t}case 2:var l=this;this.df_1=this.af_1(this.hf_1),l.ff_1=M,this.n6_1=3;continue t;case 3:this.n6_1=1;continue t;case 4:return M;case 5:throw this.q6_1}}catch(_){var c=_;if(this.o6_1===5)throw c;this.n6_1=this.o6_1,this.q6_1=c}while(!0)};i(zn).jf=function(t,n){var u=new zn(this.af_1,this.bf_1,n);return u.cf_1=t,u};function ic(t,n,u){var r=new zn(t,n,u),e=function(a,s){return r.if(a,s)};return e.$arity=1,e}function ac(t){return function(n){return tu(ic(t,n,null))}}function sc(t){return function(n,u){return Uu(t(n),u)}}function Rn(t,n,u,r){this.sf_1=t,this.tf_1=n,this.uf_1=u,it.call(this,r)}i(Rn).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Rn).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Rn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=2;var u=this,r=this.sf_1(this.tf_1),e;if(r==null)return M;e=r,u.wf_1=e;var a=this,s=this.uf_1(this.wf_1);if(a.xf_1=Is(T1(s,uc(this.tf_1))),rl(this.xf_1),this.n6_1=1,t=this.vf_1.a8(this.xf_1,this),t===xt())return t;continue t;case 1:return M;case 2:throw this.q6_1}}catch(c){var l=c;if(this.o6_1===2)throw l;this.n6_1=this.o6_1,this.q6_1=l}while(!0)};i(Rn).zf=function(t,n){var u=new Rn(this.sf_1,this.tf_1,this.uf_1,n);return u.vf_1=t,u};function lc(t,n,u,r){var e=new Rn(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function oc(t,n){return function(u){return tu(lc(t,u,n,null))}}function fc(t){return function(n,u){return Uu(t(n),u)}}function Un(t,n,u,r){this.ig_1=t,this.jg_1=n,this.kg_1=u,it.call(this,r)}i(Un).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Un).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Un).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=2;var u=this,r=this.ig_1(this.jg_1),e;if(r==null)return M;e=r,u.mg_1=e,this.n6_1=1;var a=this.kg_1(this.mg_1);if(t=this.lg_1.b8(P1(M1(a,rc(this.jg_1)),1),this),t===xt())return t;continue t;case 1:return M;case 2:throw this.q6_1}}catch(l){var s=l;if(this.o6_1===2)throw s;this.n6_1=this.o6_1,this.q6_1=s}while(!0)};i(Un).zf=function(t,n){var u=new Un(this.ig_1,this.jg_1,this.kg_1,n);return u.lg_1=t,u};function cc(t,n,u,r){var e=new Un(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function _c(t,n){return function(u){return tu(cc(t,u,n,null))}}function hc(t){return function(n,u){return Uu(t(n),u)}}function Hn(t,n,u){this.vg_1=t,this.wg_1=n,it.call(this,u)}i(Hn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Hn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(Hn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=4,this.yg_1=Is(this.vg_1(this.wg_1)),this.yg_1.s())return M;rl(this.yg_1);var u=this;u.zg_1=at(),this.n6_1=1;continue t;case 1:if(this.ah_1=dl(this.yg_1),this.n6_1=2,t=this.xg_1.y7(this.ah_1,this),t===xt())return t;continue t;case 2:for(var r=this.vg_1(this.ah_1).n();r.o();){var e=r.p();this.zg_1.k(e)}if(!this.zg_1.s()){var a=this.zg_1.i()-1|0;if(0<=a)do{var s=a;a=a+-1|0,this.yg_1.k(this.zg_1.w(s))}while(0<=a);this.zg_1.h1()}if(!this.yg_1.s()){this.n6_1=1;continue t}this.n6_1=3;continue t;case 3:return M;case 4:throw this.q6_1}}catch(c){var l=c;if(this.o6_1===4)throw l;this.n6_1=this.o6_1,this.q6_1=l}while(!0)};i(Hn).jf=function(t,n){var u=new Hn(this.vg_1,this.wg_1,n);return u.xg_1=t,u};function Dc(t,n,u){var r=new Hn(t,n,u),e=function(a,s){return r.if(a,s)};return e.$arity=1,e}function vc(t){return function(n){return tu(Dc(t,n,null))}}function Wn(t,n,u,r){this.jh_1=t,this.kh_1=n,this.lh_1=u,it.call(this,r)}i(Wn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Wn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(Wn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=7;var u=this;if(u.nh_1=at(),this.oh_1=this.jh_1.qe(this.kh_1,this.lh_1,this.nh_1),this.oh_1!=null){if(this.n6_1=1,t=this.mh_1.y7(this.oh_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:var r=this;r.ph_1=this.lh_1.jc_1(this.kh_1),this.qh_1=this.ph_1.n(),this.n6_1=3;continue t;case 3:if(!this.qh_1.o()){this.n6_1=6;continue t}this.rh_1=this.qh_1.p();var e=this;if(e.sh_1=this.rh_1,this.nh_1.h1(),this.th_1=this.jh_1.qe(this.sh_1,this.lh_1,this.nh_1),this.th_1!=null){if(this.n6_1=4,t=this.mh_1.y7(this.th_1,this),t===xt())return t;continue t}else{this.n6_1=5;continue t}case 4:this.n6_1=5;continue t;case 5:this.n6_1=3;continue t;case 6:return M;case 7:throw this.q6_1}}catch(s){var a=s;if(this.o6_1===7)throw a;this.n6_1=this.o6_1,this.q6_1=a}while(!0)};i(Wn).jf=function(t,n){var u=new Wn(this.jh_1,this.kh_1,this.lh_1,n);return u.mh_1=t,u};function pc(t,n,u,r){var e=new Wn(t,n,u,r),a=function(s,l){return e.if(s,l)};return a.$arity=1,a}function mc(t){return function(n,u){return tu(pc(u,n,t,null))}}function Cc(t){return function(n,u){return Ar(t.kc_1(n,u))}}function Kn(t,n,u,r){this.ci_1=t,this.di_1=n,this.ei_1=u,it.call(this,r)}i(Kn).mi=function(t,n){var u=this.ni(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Kn).l7=function(t,n){return this.mi(t instanceof kt?t:d(),n)};i(Kn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=7,this.gi_1=this.ci_1.xb(this.di_1,this.ei_1),this.gi_1!=null){if(this.n6_1=1,t=this.fi_1.y7(this.gi_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:var u=this;u.hi_1=this.ei_1.jc_1(this.di_1),this.ii_1=this.hi_1.n(),this.n6_1=3;continue t;case 3:if(!this.ii_1.o()){this.n6_1=6;continue t}this.ji_1=this.ii_1.p();var r=this;if(r.ki_1=this.ji_1,this.li_1=this.ci_1.xb(this.ki_1,this.ei_1),this.li_1!=null){if(this.n6_1=4,t=this.fi_1.y7(this.li_1,this),t===xt())return t;continue t}else{this.n6_1=5;continue t}case 4:this.n6_1=5;continue t;case 5:this.n6_1=3;continue t;case 6:return M;case 7:throw this.q6_1}}catch(a){var e=a;if(this.o6_1===7)throw e;this.n6_1=this.o6_1,this.q6_1=e}while(!0)};i(Kn).ni=function(t,n){var u=new Kn(this.ci_1,this.di_1,this.ei_1,n);return u.fi_1=t,u};function Ec(t,n,u,r){var e=new Kn(t,n,u,r),a=function(s,l){return e.mi(s,l)};return a.$arity=1,a}function Ac(t){return function(n,u){return tu(Ec(u,n,t,null))}}function Fc(t){return function(n,u){return Ar(t.mc_1(n,u))}}function Zl(t,n,u,r,e,a,s,l,c,_,h,v){var m;r===o?m=ec(u):m=r,r=m;var C;a===o?C=ac(e):C=a,a=C;var k;s===o?k=sc(a):k=s,s=k;var A;l===o?A=oc(e,u):A=l,l=A;var F;c===o?F=fc(l):F=c,c=F;var E;_===o?E=_c(e,u):E=_,_=E;var q;h===o?q=hc(_):q=h,h=q;var T;v===o?T=vc(u):T=v,v=T,this.yb_1=t,this.zb_1=n,this.ac_1=u,this.bc_1=r,this.cc_1=e,this.dc_1=a,this.ec_1=s,this.fc_1=l,this.gc_1=c,this.hc_1=_,this.ic_1=h,this.jc_1=v;var O=this;O.kc_1=mc(this);var z=this;z.lc_1=Cc(this);var Q=this;Q.mc_1=Ac(this);var vt=this;vt.nc_1=Fc(this)}function bt(t,n,u){Lt.call(this),this.me_1=t,this.ne_1=n,this.oe_1=u,this.pe_1=Du(this.me_1)}i(bt).oi=function(t,n){return this.ne_1.qi(n.yb_1(t,this.me_1),this.oe_1)};i(bt).sb=function(){return this.pe_1};i(bt).toString=function(){var t,n=this.oe_1;if(n!=null&&typeof n=="string"){var u=34,r=Cr();r.e4(u);for(var e=this.oe_1,a=0;a")}i(Da).qi=function(t,n){var u,r;return t!=null&&typeof t=="number"?r=n!=null?typeof n=="number":!1:r=!1,r?u=t>n:u=!1,u};var ti;function $c(){return ti==null&&new Da,ti}function va(){ni=this,Z.call(this,">=")}i(va).qi=function(t,n){var u,r;return t!=null&&typeof t=="number"?r=n!=null?typeof n=="number":!1:r=!1,r?u=t>=n:u=!1,u};var ni;function Ic(){return ni==null&&new va,ni}function Z(t){ue(),this.pi_1=t}i(Z).toString=function(){return this.pi_1};function Zu(){}function re(t){this.ij_1=t}i(re).z4=function(t,n){return this.ij_1(t,n)};i(re).compare=function(t,n){return this.z4(t,n)};function qc(t,n){var u=-t.le_1.length|0,r=-n.le_1.length|0;return ta(u,r)}function to(){ui=this;var t=this,n=Ji([xc(),Oc(),ma(),Nc(),jc()]),u=qc,r=new re(u);t.jj_1=xi(n,r)}var ui;function pa(){return ui==null&&new to,ui}function ee(){ri=this,Tt.call(this,"+")}i(ee).lj=function(t,n){return n.fc_1(t)};i(ee).mj=function(t,n,u){return n.gc_1(t,u)};var ri;function xc(){return ri==null&&new ee,ri}function ie(){ei=this,Tt.call(this,"-")}i(ie).lj=function(t,n){return n.hc_1(t)};i(ie).mj=function(t,n,u){return n.ic_1(t,u)};var ei;function Oc(){return ei==null&&new ie,ei}function ae(){ii=this,Tt.call(this,">")}i(ae).lj=function(t,n){return n.dc_1(t)};i(ae).mj=function(t,n,u){return n.ec_1(t,u)};var ii;function ma(){return ii==null&&new ae,ii}function se(){ai=this,Tt.call(this,"<")}i(se).lj=function(t,n){return n.ac_1(t)};i(se).mj=function(t,n,u){return n.bc_1(t,u)};var ai;function Nc(){return ai==null&&new se,ai}function le(){si=this,Tt.call(this,"<<")}i(le).lj=function(t,n){return n.jc_1(t)};i(le).mj=function(t,n,u){return Uu(n.jc_1(t),u)};var si;function jc(){return si==null&&new le,si}function Tt(t){pa(),this.le_1=t}i(Tt).toString=function(){return this.le_1};function Jn(t,n,u,r){this.zj_1=t,this.ak_1=n,this.bk_1=u,it.call(this,r)}i(Jn).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Jn).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Jn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=3,this.dk_1=this.zj_1.ie_1.mj(this.ak_1,this.bk_1,this.zj_1.je_1.gj()),this.dk_1!=null){if(this.n6_1=1,t=this.ck_1.y7(this.dk_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:return M;case 3:throw this.q6_1}}catch(r){var u=r;if(this.o6_1===3)throw u;this.n6_1=this.o6_1,this.q6_1=u}while(!0)};i(Jn).zf=function(t,n){var u=new Jn(this.zj_1,this.ak_1,this.bk_1,n);return u.ck_1=t,u};function Tc(t,n,u,r){var e=new Jn(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function Ca(t){this.ek_1=t}i(Ca).fk=function(t,n){return tu(Tc(this.ek_1,t,n,null))};function Ea(t){this.gk_1=t}i(Ea).fk=function(t,n){return this.gk_1.je_1.hj().hk(this.gk_1.ie_1.lj(t,n))};function an(t,n){t=t===o?ma():t,n=n===o?new At:n,this.ie_1=t,this.je_1=n;var u=this,r;this.je_1.fj()?r=new Ca(this):r=new Ea(this),u.ke_1=r}i(an).toString=function(){var t,n,u;if(b(this.ie_1,ma())){var r=this.je_1;u=r instanceof At}else u=!1;return u?n=this.je_1.ik_1===1:n=!1,n?t=this.je_1.jk_1===0:t=!1,t?"":this.ie_1.toString()+nt(this.je_1)};i(an).hashCode=function(){var t=tt(this.ie_1);return t=ht(t,31)+tt(this.je_1)|0,t};i(an).equals=function(t){if(this===t)return!0;if(!(t instanceof an))return!1;var n=t instanceof an?t:d();return!(!b(this.ie_1,n.ie_1)||!b(this.je_1,n.je_1))};function Fn(t,n){this.ae_1=t,this.be_1=n}i(Fn).toString=function(){var t=this.be_1.toString()+" "+this.ae_1.toString();return nt(O0(Ct(t)?t:d()))};i(Fn).re=function(t,n,u){for(var r=this.ae_1.ke_1.fk(t,n).n();r.o();){var e=r.p();t:{if(e==null)break t;var a=this.be_1.re(e,n,u);if(a!=null)return a}}return null};i(Fn).hashCode=function(){var t=this.ae_1.hashCode();return t=ht(t,31)+this.be_1.hashCode()|0,t};i(Fn).equals=function(t){if(this===t)return!0;if(!(t instanceof Fn))return!1;var n=t instanceof Fn?t:d();return!(!this.ae_1.equals(n.ae_1)||!this.be_1.equals(n.be_1))};function Lt(){}function It(t,n,u){Lt.call(this),this.qk_1=t,this.rk_1=n,this.sk_1=u,this.tk_1=Ss(this.qk_1.sb(),this.sk_1.sb())}i(It).oi=function(t,n){return this.rk_1.vk(t,n,this.qk_1,this.sk_1)};i(It).sb=function(){return this.tk_1};i(It).toString=function(){var t,n,u=this.qk_1;u instanceof It?n=!b(this.qk_1.rk_1,this.rk_1):n=!1,n?t="("+this.qk_1+")":t=nt(this.qk_1);var r=t,e,a,s=this.sk_1;s instanceof It?a=!b(this.sk_1.rk_1,this.rk_1):a=!1,a?e="("+this.sk_1+")":e=nt(this.sk_1);var l=e;return r+" "+this.rk_1+" "+l};i(It).hashCode=function(){var t=tt(this.qk_1);return t=ht(t,31)+tt(this.rk_1)|0,t=ht(t,31)+tt(this.sk_1)|0,t};i(It).equals=function(t){if(this===t)return!0;if(!(t instanceof It))return!1;var n=t instanceof It?t:d();return!(!b(this.qk_1,n.qk_1)||!b(this.rk_1,n.rk_1)||!b(this.sk_1,n.sk_1))};function oe(t){this.wk_1=t}i(oe).z4=function(t,n){return this.wk_1(t,n)};i(oe).compare=function(t,n){return this.z4(t,n)};function Pc(t,n){var u=-t.uk_1.length|0,r=-n.uk_1.length|0;return ta(u,r)}function no(){li=this;var t=this,n=Ji([fi(),Mc()]),u=Pc,r=new oe(u);t.xk_1=xi(n,r)}var li;function uo(){return li==null&&new no,li}function Aa(){oi=this,ru.call(this,"&&")}i(Aa).vk=function(t,n,u,r){return u.oi(t,n)?r.oi(t,n):!1};var oi;function fi(){return oi==null&&new Aa,oi}function fe(){ci=this,ru.call(this,"||")}i(fe).vk=function(t,n,u,r){return u.oi(t,n)?!0:r.oi(t,n)};var ci;function Mc(){return ci==null&&new fe,ci}function ru(t){uo(),this.uk_1=t}i(ru).toString=function(){return this.uk_1};function Lc(t){return function(n,u){return(n-t.nk_1|0)%t.ik_1|0?!1:((n-t.nk_1|0)/t.ik_1|0)>0}}function Fa(t){this.al_1=t}i(Fa).hk=function(t){var n;this.al_1.ik_1>0?n=t:n=z1(t,this.al_1.ok_1);var u=n;return L1(u,Lc(this.al_1))};function At(t,n){t=t===o?0:t,n=n===o?1:n,Zu.call(this),this.ik_1=t,this.jk_1=n;var u=this,r;if(this.ik_1<0){var e;if(this.jk_1<0)e=Mt();else if(this.jk_1>0){var a;if(this.jk_1<=(-this.ik_1|0))a=Mt();else{for(var s=at(),l=1;(ht(this.ik_1,l)+this.jk_1|0)>0;)s.k(ht(this.ik_1,l)+this.jk_1|0),l=l+1|0;a=q1(s)}e=a}else e=Mt();r=e}else if(this.ik_1>0)r=Mt();else{var c;this.jk_1<0?c=Mt():this.jk_1>0?c=Du(this.jk_1):c=Mt(),r=c}u.kk_1=r,this.lk_1=this.kk_1.i()===1;var _=this,h=su(this.kk_1);_.mk_1=(h??1)-1|0,this.nk_1=this.jk_1-1|0,this.ok_1=this.ik_1+this.jk_1|0;var v=this;v.pk_1=new Fa(this)}i(At).toString=function(){if(this.ik_1===0&&this.jk_1===0)return"0";if(this.ik_1===1&&this.jk_1===1)return"(n+1)";if(this.jk_1===0){if(this.ik_1===1)return"n";var t;return this.ik_1>0?t=""+this.ik_1+"n":t="("+this.ik_1+"n)",t}if(this.ik_1===0){if(this.jk_1===1)return"";var n;return this.jk_1>0?n=this.jk_1.toString():n="("+this.jk_1+")",n}var u=this.jk_1>=0?"+":"";return"("+this.ik_1+"n"+u+this.jk_1+")"};i(At).fj=function(){return this.lk_1};i(At).gj=function(){return this.mk_1};i(At).hj=function(){return this.pk_1};i(At).hashCode=function(){var t=this.ik_1;return t=ht(t,31)+this.jk_1|0,t};i(At).equals=function(t){if(this===t)return!0;if(!(t instanceof At))return!1;var n=t instanceof At?t:d();return!(this.ik_1!==n.ik_1||this.jk_1!==n.jk_1)};function zc(t){return"["+t+"]"}function da(){}i(da).fk=function(t,n){return!0};function wa(t){this.bl_1=t}i(wa).fk=function(t,n){var u=n.zb_1(t),r;if(u==null)return!1;r=u;var e=r;return U(e)===this.bl_1.de_1.length?A1(e,this.bl_1.de_1):U(e)>this.bl_1.de_1.length&&w(e,(U(e)-this.bl_1.de_1.length|0)-1|0)===46?ua(e,this.bl_1.de_1):!1};function dn(t,n,u){this.ce_1=t,this.de_1=n,this.ee_1=u,this.fe_1=F1(this.de_1)?!0:this.de_1==="*";for(var r=this,e=this.fe_1?Du("name"):Mt(),a=this.ee_1,s=vu(Or(a,10)),l=a.n();l.o();){var c=l.p(),_=c.sb();s.k(_)}r.ge_1=Ss(e,C0(s));var h=this,v;this.fe_1?v=new da:v=new wa(this),h.he_1=v}i(dn).toString=function(){var t=this.ce_1?"@":"",n=t+this.de_1;return n+Wt(this.ee_1,"",o,o,o,o,zc)};i(dn).oi=function(t,n){var u;if(this.he_1.fk(t,n)){var r;t:{var e=this.ee_1,a;if(I(e,W)?a=e.s():a=!1,a){r=!0;break t}for(var s=e.n();s.o();){var l=s.p();if(!l.oi(t,n)){r=!1;break t}}r=!0}u=r}else u=!1;return u};i(dn).hashCode=function(){var t=Hs(this.ce_1);return t=ht(t,31)+cu(this.de_1)|0,t=ht(t,31)+tt(this.ee_1)|0,t};i(dn).equals=function(t){if(this===t)return!0;if(!(t instanceof dn))return!1;var n=t instanceof dn?t:d();return!(this.ce_1!==n.ce_1||this.de_1!==n.de_1||!b(this.ee_1,n.ee_1))};function sn(t,n){n=n===o?null:n,this.yd_1=t,this.zd_1=n}i(sn).toString=function(){var t;return this.zd_1!=null?t=this.zd_1.toString()+" ":t="",t+this.yd_1.toString()};i(sn).re=function(t,n,u){if(!this.yd_1.oi(t,n))return null;if(u.k(t),this.zd_1==null)return u;var r=this.zd_1.re(t,n,u);return r==null&&dl(u),r};i(sn).hashCode=function(){var t=this.yd_1.hashCode();return t=ht(t,31)+(this.zd_1==null?0:this.zd_1.hashCode())|0,t};i(sn).equals=function(t){if(this===t)return!0;if(!(t instanceof sn))return!1;var n=t instanceof sn?t:d();return!(!this.yd_1.equals(n.yd_1)||!b(this.zd_1,n.zd_1))};function ga(t){this.cl_1=t}i(ga).hk=function(t){return c_(t,this.cl_1.gl_1)};function Vt(t){Zu.call(this),this.dl_1=t,this.el_1=this.dl_1.i()===1;var n=this,u=su(this.dl_1);n.fl_1=(u??1)-1|0;for(var r=this,e=this.dl_1,a=vu(Or(e,10)),s=e.n();s.o();){var l=s.p(),c=l-1|0;a.k(c)}r.gl_1=a;var _=this;_.hl_1=new ga(this)}i(Vt).fj=function(){return this.el_1};i(Vt).gj=function(){return this.fl_1};i(Vt).hj=function(){return this.hl_1};i(Vt).toString=function(){if(this.dl_1.i()===1){var t;return fu(this.dl_1)===1?t="":t=fu(this.dl_1).toString(),t}return"("+Wt(this.dl_1,",")+")"};i(Vt).hashCode=function(){return tt(this.dl_1)};i(Vt).equals=function(t){if(this===t)return!0;if(!(t instanceof Vt))return!1;var n=t instanceof Vt?t:d();return!!b(this.dl_1,n.dl_1)};function K(t,n){t=t===o?"":t,this.il_1=t,this.jl_1=n}i(K).kl=function(t,n){return this.jl_1(t,n,this.il_1)};i(K).toString=function(){return"Parser(prefix="+this.il_1+", temp="+this.jl_1+")"};i(K).hashCode=function(){var t=cu(this.il_1);return t=ht(t,31)+tt(this.jl_1)|0,t};i(K).equals=function(t){if(this===t)return!0;if(!(t instanceof K))return!1;var n=t instanceof K?t:d();return!(this.il_1!==n.il_1||!b(this.jl_1,n.jl_1))};function R(t,n){n=n===o?0:n,this.ll_1=t,this.ml_1=n}i(R).toString=function(){return"ParserResult(data="+this.ll_1+", length="+this.ml_1+")"};i(R).hashCode=function(){var t=this.ll_1==null?0:tt(this.ll_1);return t=ht(t,31)+this.ml_1|0,t};i(R).equals=function(t){if(this===t)return!0;if(!(t instanceof R))return!1;var n=t instanceof R?t:d();return!(!b(this.ll_1,n.ll_1)||this.ml_1!==n.ml_1)};function Rc(t,n,u){for(var r=n,e="";r0&&B.assert(t,r,"+-");var a=y().fd_1.kl(t,r);e.k(a),r=r+a.ml_1|0,r=r+y().ad_1.kl(t,r).ml_1|0,r>=t.length&&B.assert(t,r,")")}r=r+1|0}else{var s=y().fd_1.kl(t,r);e.k(s),r=r+s.ml_1|0}for(var l=ds(),c=e.n();c.o();){var _=c.p(),h=_.ll_1,v=h.bb(),m=h.cb(),C=l.w1(v),k=(C??0)+m|0;l.r1(v,k)}for(var A=r1(l.i()),F=l.x1().n();F.o();){var E=F.p();E.h4()>1&&B.throwError(t,n,"power must be 0 or 1");var q=E.i4();A.r1(M,q)}var T=l.w1(1),O=T??0,z=l.w1(0),Q=new At(O,z??0),vt;if(Q.ik_1<=0&&Q.kk_1.s())vt=!0;else{var pt;Q.kk_1.s()?pt=!1:pt=fu(Q.kk_1)<=0,vt=pt}return vt&&B.throwError(t,n,"valid polynomialExpression"),new R(Q,r-n|0)}function Xc(t,n,u){var r=n;B.assert(t,r,"("),r=r+1|0;for(var e=at();r"+Pn(e)),r=r+a.ml_1|0,e.k(a.ll_1),r=r+y().ad_1.kl(t,r).ml_1|0;var s=Fr(t,r);b(s==null?null:new ft(s),new ft(44))&&(r=r+1|0,r=r+y().ad_1.kl(t,r).ml_1|0,B.assert(t,r,y().ed_1.il_1+")"))}return B.assert(t,r,")"),r=r+1|0,new R(new Vt(e),r-n|0)}function Gc(t,n,u){var r=n,e;if(y().id_1.u4(Rs(t,n,t.length))){var a=y().hd_1.kl(t,r);r=r+a.ml_1|0,e=new R(a.ll_1,r-n|0)}else{var s=y().gd_1.kl(t,n);r=r+s.ml_1|0,e=new R(s.ll_1,r-n|0)}return e}function Yc(t,n,u){var r=n,e=y().dd_1.kl(t,r);r=r+e.ml_1|0;var a=null;r=t.length&&B.throwError(t,r,"any char");var a="";t:for(;w(t,r)!==e;){if(r>=(t.length-1|0)){B.assert(t,r,V(e));break t}var s=w(t,r),l=mt(s);if(0<=l&&l<=31&&B.throwError(t,r,"0-1f escape char"),w(t,r)===92){r=r+1|0,B.assert(t,r);var c=a,_=w(t,r),h;if(_===92)h=92;else if(_===39)h=39;else if(_===34)h=34;else if(_===96)h=96;else if(_===110)h=10;else if(_===114)h=13;else if(_===116)h=9;else if(_===98)h=8;else if(_===120){var v=0;if(v<2)do v=v+1|0,r=r+1|0,B.assert(t,r,"0123456789abcdefABCDEF");while(v<2);var m=(r-2|0)+1|0,C=r+1|0,k=t.substring(m,C);h=Tu(xa(k,16))}else if(_===117){var A=0;if(A<4)do A=A+1|0,r=r+1|0,B.assert(t,r,"0123456789abcdefABCDEF");while(A<4);var F=(r-4|0)+1|0,E=r+1|0,q=t.substring(F,E);h=Tu(xa(q,16))}else B.throwError(t,r,"escape char");a=c+V(h)}else a=a+V(w(t,r));r=r+1|0}return r=r+1|0,new R(a,r-n|0)}function u_(t,n,u){var r=n;B.assert(t,r,u);var e=V(w(t,r));for(r=r+1|0;r=t.length)break t;var s;if(wt(y().kd_1.il_1,w(t,r))){var l=y().kd_1.kl(t,r);r=r+l.ml_1|0,r=r+y().bd_1.kl(t,r).ml_1|0,s=l.ll_1}else s=new an(o,new At(1,0));var c=s,_=y().ud_1.kl(t,r);r=r+_.ml_1|0,a.k(Va(c,_.ll_1))}return new R(Va(e.ll_1,a),r-n|0)}function o_(t,n,u){return n!==t.length&&B.throwError(t,n,"EOF"),new R(M,0)}function f_(t){var n=0;n=n+y().ad_1.kl(t,n).ml_1|0;var u=y().vd_1.kl(t,n);n=n+u.ml_1|0,n=n+y().ad_1.kl(t,n).ml_1|0,n=n+y().wd_1.kl(t,n).ml_1|0;var r=u.ll_1,e=at(),a=at();e.k(r.za_1);for(var s=r.ab_1.n();s.o();){var l=s.p();e.k(l.ab_1),a.k(l.za_1)}for(var c=Fl([new sn(fu(e))]),_=0,h=a.n();h.o();){var v=h.p(),m=_;_=m+1|0;var C=Ci(m),k=new Fn(v,Pn(c)),A=new sn(e.w(C+1|0),k);c.k(A)}return new nn(Pn(c))}function ya(){_i=this;var t=this;t.ad_1=new K(` \r +import{m as ve}from"./storage-HvXPlwOB.js";import{u as _o,O as ho,az as Ya,a_ as Do,H as hr,ax as vo,aa as Qa,ai as ts,a$ as po,b0 as mo,e as Dr,b1 as ns,s as Co,c as Eo}from"./index-O1rtA3Eg.js";const U_=(t,n,u)=>{try{return t()}catch(r){if(typeof n=="string")ve.error(n);else{const e=(n==null?void 0:n(r))??r;typeof e=="string"?ve.error(e):e instanceof Error&&ve.error(e.message)}throw r}finally{u==null||u()}},H_=t=>(...n)=>{try{t(...n)}catch(u){console.error(u)}};typeof ArrayBuffer.isView>"u"&&(ArrayBuffer.isView=function(t){return t!=null&&t.__proto__!=null&&t.__proto__.__proto__===Int8Array.prototype.__proto__});typeof Array.prototype.fill>"u"&&Object.defineProperty(Array.prototype,"fill",{value:function(t){if(this==null)throw new TypeError("this is null or not defined");for(var n=Object(this),u=n.length>>>0,r=arguments[1],e=r>>0,a=e<0?Math.max(u+e,0):Math.min(e,u),s=arguments[2],l=s===void 0?u:s>>0,c=l<0?Math.max(u+l,0):Math.min(l,u);a"u"&&Object.defineProperty(t.prototype,"fill",{value:Array.prototype.fill})});typeof Math.clz32>"u"&&(Math.clz32=function(t,n){return function(u){var r=u>>>0;return r===0?32:31-(t(r)/n|0)|0}}(Math.log,Math.LN2));typeof String.prototype.endsWith>"u"&&Object.defineProperty(String.prototype,"endsWith",{value:function(t,n){var u=this.toString();(n===void 0||n>u.length)&&(n=u.length),n-=t.length;var r=u.indexOf(t,n);return r!==-1&&r===n}});typeof String.prototype.startsWith>"u"&&Object.defineProperty(String.prototype,"startsWith",{value:function(t,n){return n=n||0,this.lastIndexOf(t,n)===n}});typeof Math.imul>"u"&&(Math.imul=function(n,u){return(n&4294901760)*(u&65535)+(n&65535)*(u|0)|0});var us=Math.clz32,H=Math.imul,Ao=ArrayBuffer.isView;f(pi,"CharSequence",St);f(Pu,"Comparable",St);f(er,"Number",D);f(mi,"Unit",g);f(hu,"IntCompanionObject",g);f(Vn,"Comparator",St);f(W,"Collection",St);f(Dn,"AbstractCollection",D,o,[W]);f(Zt,"AbstractMutableCollection",D,Dn,[Dn,W]);f(Zn,"IteratorImpl",D);f(as,"ListIteratorImpl",D,Zn);f(Sn,"List",St,o,[W]);f(Bt,"AbstractMutableList",D,Zt,[Zt,W,Sn]);f(cn,"Map",St);f(qt,"AbstractMap",D,o,[cn]);f(ir,"AbstractMutableMap",D,qt,[qt,cn]);f($n,"Set",St,o,[W]);f(on,"AbstractMutableSet",D,Zt,[Zt,$n,W]);f(ls,"Companion",g);f(rt,"ArrayList",D,Bt,[Bt,W,Sn],at);f(Xt,"HashMap",D,ir,[ir,cn],To);f(Nt,"HashMapEntrySetBase",D,on,[$n,W,on]);f(Ai,"HashMapEntrySet",D,Nt);f(Ut,"HashSet",D,on,[on,$n,W],Lo);f(As,"Companion",g);f(Bn,"Itr",D);f(Bi,"KeysItr",D,Bn);f(Lu,"EntriesItr",D,Bn);f(fn,"Entry",St);f(Xn,"EntryRef",D,o,[fn]);function Fo(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p(),a=e,s;if(a!=null&&I(a,fn)?s=this.j4(a):s=!1,!s){n=!1;break t}}n=!0}return n}f(Fs,"InternalMap",St);f(ct,"InternalHashMap",D,o,[Fs],di);f(zu,"LinkedHashMap",D,Xt,[Xt,cn],ds);f(kn,"LinkedHashSet",D,Ut,[Ut,$n,W],pr);f(mr,"KProperty1",St);f(jt,"StringBuilder",D,o,[pi],Cr);f(bs,"Companion",g);f(Ru,"Regex",D);f(ki,"sam$kotlin_Comparator$0",D,o,[Vn]);f($i,o,D);f(qs,"Companion",g);f(ft,"Char",D,o,[Pu]);f(Z1,"Companion",g);f(_n,"Enum",D,o,[Pu]);f(dr,o,D);f(Ws,"Companion",g);f(P,"Long",D,er,[er,Pu]);f(el,"Digit",g);f(Ku,"Continuation",St);f(it,"CoroutineImpl",D,o,[Ku]);f(Cu,"CompletedContinuation",g,o,[Ku]);f(Li,o,D,it);f(mn,"Exception",D,Error,o,sl);f(Ft,"RuntimeException",D,mn,o,hl);f(Yn,"IllegalArgumentException",D,Ft,o,ol);f(Au,"IndexOutOfBoundsException",D,Ft,o,cl);f(Fu,"IllegalStateException",D,Ft,o,_l);f(br,"UnsupportedOperationException",D,Ft,o,du);f(yu,"NoSuchElementException",D,Ft,o,Dt);f(bu,"Error",D,Error,o,vl);f(Qn,"NumberFormatException",D,Yn,o,pl);f(Bu,"ArithmeticException",D,Ft,o,Cl);f(Br,"ConcurrentModificationException",D,Ft,o,Ui);f(kr,"NullPointerException",D,Ft,o,Hi);f(Sr,"ClassCastException",D,Ft,o,Wi);f(In,"Companion",g);f(c0,"Companion",g);f($r,"Companion",g);f(Ir,"EmptyIterator",g);f(Cn,"ArrayAsCollection",D,o,[W]);f(Ht,"EmptyList",g,o,[Sn]);f(jn,"IndexedValue",D);f(Nr,"IntIterator",D);f(Hu,"CharIterator",D);f(kt,"SequenceScope",D,o,o,o,o,o,[1]);f(Gt,"SequenceBuilderIterator",D,kt,[kt,Ku],Gt,o,o,[1]);f(Vi,o,D);f(Tr,o,D);f(Pr,"TransformingSequence",D);f(Mr,o,D);f(Zi,"TakeWhileSequence",D);f(nu,"DropTakeSequence",St);f(Lr,o,D);f(Tn,"DropSequence",D,o,[nu]);f(zr,o,D);f(Xi,"DropWhileSequence",D);f(Rr,o,D);f(Gi,"FilteringSequence",D);f(Ur,o,D);f(Yi,"IndexingSequence",D);f(Hr,o,D);f(Ln,"TakeSequence",D,o,[nu]);f(Wu,"EmptySequence",g,o,[nu]);f(Kr,o,D);f(wn,"SubSequence",D,o,[nu]);f(tn,"EmptySet",g,o,[$n]);f(Jr,"NaturalOrderComparator",g,o,[Vn]);f(xl,"Key",g);f(g0,"ContinuationInterceptor",St);f(Ju,"EmptyCoroutineContext",g);f(rr,"CoroutineSingletons",D,_n);f(Tl,"Companion",g);f(Yt,"IntProgression",D);f(gn,"IntRange",D,Yt);f(Pl,"Companion",g);f(vn,"CharProgression",D);f(yn,"CharRange",D,vn);f(Vr,"IntProgressionIterator",D,Nr);f(Zr,"CharProgressionIterator",D,Hu);f(na,"Companion",g);f($0,"Companion",g);f(Vu,"UnsafeLazyImpl",D);f(Jl,"UNINITIALIZED_VALUE",g);f(L0,"Companion",g);f(pn,"Failure",D);f(Re,"NotImplementedError",D,bu,o,Re);f(zt,"Pair",D);function pi(){}function Pu(){}function er(){}function mi(){}i(mi).toString=function(){return"kotlin.Unit"};var M;function hu(){this.MIN_VALUE=-2147483648,this.MAX_VALUE=2147483647,this.SIZE_BYTES=4,this.SIZE_BITS=32}i(hu).e=function(){return this.MIN_VALUE};i(hu).f=function(){return this.MAX_VALUE};i(hu).g=function(){return this.SIZE_BYTES};i(hu).h=function(){return this.SIZE_BITS};var En;function Vn(){}function wo(t){return t!==t}function go(t){var n;if(t===0)n=0;else{var u=31;n=1<<(u-us(t)|0)}return n}function rs(t){return h0(t)}function Du(t){return D0([t])}function Ot(t){var n;return t.toArray!==void 0?n=t.toArray():n=rs(t),n}function Ci(t){return t<0&&m0(),t}function yo(t){is(t,Il())}function bo(t,n){is(t,n)}function es(t){return F0([t])}function is(t,n){if(t.i()<=1)return M;var u=Ot(t);os(u,n);var r=0,e=u.length;if(r=0};i(Bt).j1=function(t){var n;t:{for(var u=0,r=this.n();r.o();){var e=r.p();if(b(e,t)){n=u;break t}u=u+1|0}n=-1}return n};i(Bt).k1=function(t){return new as(this,t)};i(Bt).i1=function(t,n){var u=this.k1(t),r=n-t|0,e=0;if(e=0)){var n="capacity must be non-negative.";throw ut(nt(n))}return Ni(Array(t),null)}function Sa(t,n,u){t.fill(null,n,u)}function $a(t,n){return Rf(t,n)}function ls(){ye=this;var t=this,n=vu(0);n.c2_1=!0,t.d2_1=n}var ye;function Bo(){return ye==null&&new ls,ye}function ko(t){var n=[];return rt.call(t,n),t}function at(){return ko(x(i(rt)))}function So(t,n){var u=[];if(rt.call(n,u),!(t>=0)){var r="Negative initial capacity: "+t;throw ut(nt(r))}return n}function vu(t){return So(t,x(i(rt)))}function $o(t,n){var u=Ot(t);return rt.call(n,u),n}function vr(t){return $o(t,x(i(rt)))}function Io(t,n){var u=t.i();return t.b2_1.length=t.i()+n|0,u}function Ei(t,n){return qn.e2(n,t.i()),n}function qo(t,n){return qn.f1(n,t.i()),n}function rt(t){Bo(),Bt.call(this),this.b2_1=t,this.c2_1=!1}i(rt).i=function(){return this.b2_1.length};i(rt).w=function(t){var n=this.b2_1[Ei(this,t)];return n==null||n!=null?n:d()};i(rt).j=function(t,n){this.m(),Ei(this,t);var u=this.b2_1[t];this.b2_1[t]=n;var r=u;return r==null||r!=null?r:d()};i(rt).k=function(t){return this.m(),this.b2_1.push(t),this.y_1=this.y_1+1|0,!0};i(rt).g1=function(t,n){this.m(),this.b2_1.splice(qo(this,t),0,n),this.y_1=this.y_1+1|0};i(rt).l=function(t){if(this.m(),t.s())return!1;for(var n=Io(this,t.i()),u=0,r=t.n();r.o();){var e=r.p(),a=u;u=a+1|0;var s=Ci(a);this.b2_1[n+s|0]=e}return this.y_1=this.y_1+1|0,!0};i(rt).z=function(t){this.m(),Ei(this,t),this.y_1=this.y_1+1|0;var n;return t===xr(this)?n=this.b2_1.pop():n=this.b2_1.splice(t,1)[0],n};i(rt).i1=function(t,n){this.m(),this.y_1=this.y_1+1|0,this.b2_1.splice(t,n-t|0)};i(rt).h1=function(){this.m();var t=this;t.b2_1=[],this.y_1=this.y_1+1|0};i(rt).j1=function(t){return ks(this.b2_1,t)};i(rt).toString=function(){return uf(this.b2_1)};i(rt).f2=function(){return[].slice.call(this.b2_1)};i(rt).toArray=function(){return this.f2()};i(rt).m=function(){if(this.c2_1)throw du()};var ur;function os(t,n){if(fs()){var u=Oo(n);t.sort(u)}else cs(t,0,Bs(t),n)}function xo(t){if(fs()){var n=No;t.sort(n)}else cs(t,0,Bs(t),Il())}function fs(){var t=ur;if(t!=null)return t;ur=!1;var n=[],u=0;if(u<600)do{var r=u;u=u+1|0,n.push(r)}while(u<600);var e=jo;n.sort(e);var a=1,s=n.length;if(a=_)return!1}while(a0)){var r="Non-positive load factor: "+n;throw ut(nt(r))}return u}function Cs(t,n){return Ko(t,n,x(i(ct)))}function ou(t){return t.w2_1.length}function Jt(t){return t.z2_1.length}function Es(t){t.d3_1=t.d3_1+1|0}function Jo(t,n){Vo(t,n)?yi(t,Jt(t)):Zo(t,t.b3_1+n|0)}function Vo(t,n){var u=ou(t)-t.b3_1|0,r=t.b3_1-t.i()|0;return u=n?r>=(ou(t)/4|0):!1}function Zo(t,n){if(n<0)throw Dl("too many elements");if(n>ou(t)){var u=qn.g3(ou(t),n);t.w2_1=$a(t.w2_1,u);var r=t,e=t.x2_1;r.x2_1=e==null?null:$a(e,u),t.y2_1=zf(t.y2_1,u);var a=ps(Mu,u);a>Jt(t)&&yi(t,a)}}function Xo(t){var n=t.x2_1;if(n!=null)return n;var u=ss(ou(t));return t.x2_1=u,u}function gi(t,n){return n==null?0:H(tt(n),-1640531527)>>>t.c3_1|0}function Go(t){for(var n=0,u=0,r=t.x2_1;n=0&&(t.w2_1[u]=t.w2_1[n],r!=null&&(r[u]=r[n]),u=u+1|0),n=n+1|0;Sa(t.w2_1,u,t.b3_1),r==null||Sa(r,u,t.b3_1),t.b3_1=u}function yi(t,n){Es(t),t.b3_1>t.e3_1&&Go(t),n!==Jt(t)?(t.z2_1=new Int32Array(n),t.c3_1=ms(Mu,n)):Pf(t.z2_1,0,0,Jt(t));for(var u=0;u0&&b(t.w2_1[e-1|0],n))return e-1|0;if(r=r-1|0,r<0)return-1;var a=u;u=a-1|0,a===0&&(u=Jt(t)-1|0)}}function Qo(t,n){t.m();t:for(;;)for(var u=gi(t,n),r=ke(H(t.a3_1,2),Jt(t)/2|0),e=0;;){var a=t.z2_1[u];if(a<=0){if(t.b3_1>=ou(t)){Jo(t,1);continue t}var s=t.b3_1;t.b3_1=s+1|0;var l=s;return t.w2_1[l]=n,t.y2_1[l]=u,t.z2_1[u]=l+1|0,t.e3_1=t.e3_1+1|0,Es(t),e>t.a3_1&&(t.a3_1=e),l}if(b(t.w2_1[a-1|0],n))return-a|0;if(e=e+1|0,e>r){yi(t,H(Jt(t),2));continue t}var c=u;u=c-1|0,c===0&&(u=Jt(t)-1|0)}}function t1(t,n){return t.e3_1===n.i()?t.t2(n.x1()):!1}function As(){this.h3_1=-1640531527,this.i3_1=8,this.j3_1=2,this.k3_1=-1}var Mu;function Bn(t){this.l3_1=t,this.m3_1=0,this.n3_1=-1,this.o3_1=this.l3_1.d3_1,this.p3()}i(Bn).p3=function(){for(;this.m3_1=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=this.l3_1.w2_1[this.n3_1];return this.p3(),u};function Lu(t){Bn.call(this,t)}i(Lu).p=function(){if(this.q3(),this.m3_1>=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=new Xn(this.l3_1,this.n3_1);return this.p3(),u};i(Lu).z3=function(){if(this.m3_1>=this.l3_1.b3_1)throw Dt();var t=this,n=this.m3_1;this.m3_1=n+1|0,t.n3_1=n;var u=this.l3_1.w2_1[this.n3_1],r=u==null?null:tt(u),e=r??0,a=_t(this.l3_1.x2_1)[this.n3_1],s=a==null?null:tt(a),l=e^(s??0);return this.p3(),l};i(Lu).a4=function(t){if(this.m3_1>=this.l3_1.b3_1)throw Dt();var n=this,u=this.m3_1;this.m3_1=u+1|0,n.n3_1=u;var r=this.l3_1.w2_1[this.n3_1];b(r,this.l3_1)?t.d4("(this Map)"):t.c4(r),t.e4(61);var e=_t(this.l3_1.x2_1)[this.n3_1];b(e,this.l3_1)?t.d4("(this Map)"):t.c4(e),this.p3()};function Xn(t,n){this.f4_1=t,this.g4_1=n}i(Xn).h4=function(){return this.f4_1.w2_1[this.g4_1]};i(Xn).i4=function(){return _t(this.f4_1.x2_1)[this.g4_1]};i(Xn).equals=function(t){var n,u;return t!=null&&I(t,fn)?u=b(t.h4(),this.h4()):u=!1,u?n=b(t.i4(),this.i4()):n=!1,n};i(Xn).hashCode=function(){var t=this.h4(),n=t==null?null:tt(t),u=n??0,r=this.i4(),e=r==null?null:tt(r);return u^(e??0)};i(Xn).toString=function(){return""+this.h4()+"="+this.i4()};function ct(t,n,u,r,e,a){this.w2_1=t,this.x2_1=n,this.y2_1=u,this.z2_1=r,this.a3_1=e,this.b3_1=a,this.c3_1=ms(Mu,Jt(this)),this.d3_1=0,this.e3_1=0,this.f3_1=!1}i(ct).i=function(){return this.e3_1};i(ct).w1=function(t){var n=bi(this,t);return n<0?null:_t(this.x2_1)[n]};i(ct).m2=function(t){return bi(this,t)>=0};i(ct).r1=function(t,n){var u=Qo(this,t),r=Xo(this);if(u<0){var e=r[(-u|0)-1|0];return r[(-u|0)-1|0]=n,e}else return r[u]=n,null};i(ct).equals=function(t){var n;if(t===this)n=!0;else{var u;t!=null&&I(t,cn)?u=t1(this,t):u=!1,n=u}return n};i(ct).hashCode=function(){for(var t=0,n=this.p2();n.o();)t=t+n.z3()|0;return t};i(ct).toString=function(){var t=_1(2+H(this.e3_1,3)|0);t.d4("{");for(var n=0,u=this.p2();u.o();)n>0&&t.d4(", "),u.a4(t),n=n+1|0;return t.d4("}"),t.toString()};i(ct).m=function(){if(this.f3_1)throw du()};i(ct).s2=function(t){var n=bi(this,t.h4());return n<0?!1:b(_t(this.x2_1)[n],t.i4())};i(ct).j4=function(t){return this.s2(I(t,fn)?t:d())};i(ct).v2=function(){return new Bi(this)};i(ct).p2=function(){return new Lu(this)};function Fs(){}function n1(t){return hs(t),zu.call(t),t}function ds(){return n1(x(i(zu)))}function u1(t,n){return Mo(t,n),zu.call(n),n}function r1(t){return u1(t,x(i(zu)))}function zu(){}function e1(t){return Ds(t),kn.call(t),t}function pr(){return e1(x(i(kn)))}function i1(t,n){return zo(t,n),kn.call(n),n}function a1(t){return i1(t,x(i(kn)))}function s1(t,n,u){return vs(t,n,u),kn.call(u),u}function l1(t,n){return s1(t,1,n),n}function o1(t){return l1(t,x(i(kn)))}i(kn).m=function(){return this.u2_1.m()};function kn(){}function mr(){}function f1(t){t.lastIndex=0}function c1(t,n){return ws(n),n}function _1(t){return c1(t,x(i(jt)))}function ws(t){return jt.call(t,""),t}function Cr(){return ws(x(i(jt)))}function jt(t){this.b4_1=t!==void 0?t:""}i(jt).a=function(){return this.b4_1.length};i(jt).b=function(t){var n=this.b4_1,u;if(t>=0&&t<=Xr(n))u=w(n,t);else throw Eu("index: "+t+", length: "+this.a()+"}");return u};i(jt).c=function(t,n){return this.b4_1.substring(t,n)};i(jt).e4=function(t){return this.b4_1=this.b4_1+V(t),this};i(jt).l4=function(t){return this.b4_1=this.b4_1+hn(t),this};i(jt).c4=function(t){return this.b4_1=this.b4_1+hn(t),this};i(jt).d4=function(t){var n=this,u=this.b4_1;return n.b4_1=u+(t??"null"),this};i(jt).toString=function(){return this.b4_1};function Ia(t){var n=V(t).toUpperCase();return n.length>1?t:w(n,0)}function gs(t){return Wf(t)}function qa(t,n){return t.toString(ys(n))}function ys(t){if(!(2<=t&&t<=36))throw ut("radix "+t+" was not in valid range 2..36");return t}function h1(t){var n=I0(t),u;return n==null?Rl(t):u=n,u}function xa(t,n){var u=Ul(t,n),r;return u==null?Rl(t):r=u,r}function D1(t,n){var u=st(t,48)>=0&&st(t,57)<=0?Su(t,48):st(t,65)>=0&&st(t,90)<=0?Su(t,65)+10|0:st(t,97)>=0&&st(t,122)<=0?Su(t,97)+10|0:st(t,128)<0?-1:st(t,65313)>=0&&st(t,65338)<=0?Su(t,65313)+10|0:st(t,65345)>=0&&st(t,65370)<=0?Su(t,65345)+10|0:Uf(t);return u>=n?-1:u}function v1(t,n){return Ru.call(n,t,Qi()),n}function p1(t){return v1(t,x(i(Ru)))}function bs(){Be=this,this.m4_1=new RegExp("[\\\\^$*+?.()|[\\]{}]","g"),this.n4_1=new RegExp("[\\\\$]","g"),this.o4_1=new RegExp("\\$","g")}var Be;function m1(){return Be==null&&new bs,Be}function Ru(t,n){m1(),this.p4_1=t,this.q4_1=O1(n),this.r4_1=new RegExp(t,C1(n,"gu")),this.s4_1=null,this.t4_1=null}i(Ru).u4=function(t){f1(this.r4_1);var n=this.r4_1.exec(nt(t));return n!=null&&n.index===0?this.r4_1.lastIndex===U(t):!1};i(Ru).toString=function(){return this.r4_1.toString()};function C1(t,n){return Wt(t,"",n,o,o,o,E1)}function E1(t){return t.x4_1}function A1(t,n){return T0(t,n)}function ki(t){this.y4_1=t}i(ki).z4=function(t,n){return this.y4_1(t,n)};i(ki).compare=function(t,n){return this.z4(t,n)};function F1(t){var n;if(U(t)===0)n=!0;else{var u;t:{var r=j0(t),e;if(I(r,W)?e=r.s():e=!1,e){u=!0;break t}for(var a=r.n();a.o();){var s=a.p();if(!gs(w(t,s))){u=!1;break t}}u=!0}n=u}return n}function Si(t,n,u,r){return r=r===o?!1:r,r?Er(t,u,n,0,n.length,r):t.startsWith(n,u)}function d1(t,n,u){return u=u===o?!1:u,u?Er(t,0,n,0,n.length,u):t.startsWith(n,0)}function w1(t,n,u){return u=u===o?!1:u,u?Er(t,t.length-n.length|0,n,0,n.length,u):t.endsWith(n)}function Er(t,n,u,r,e,a){return a=a===o?!1:a,Gr(t,n,u,r,e,a)}function g1(t){return t.length===0?jr():new $i(t)}function Bs(t){return t.length-1|0}function y1(t){var n;switch(t.length){case 0:throw gu("Array is empty.");case 1:n=t[0];break;default:throw ut("Array has more than one element.")}return n}function b1(t,n){return ks(t,n)>=0}function ks(t,n){if(n==null){var u=0,r=t.length-1|0;if(u<=r)do{var e=u;if(u=u+1|0,t[e]==null)return e}while(u<=r)}else{var a=0,s=t.length-1|0;if(a<=s)do{var l=a;if(a=a+1|0,b(n,t[l]))return l}while(a<=s)}return-1}function B1(t,n){for(var u=0,r=t.length;u1&&n.l4(u),a<0||c<=a)Ll(n,v,l);else break t}return a>=0&&c>a&&n.l4(s),n.l4(e),n}function $i(t){this.a5_1=t}i($i).n=function(){return Os(this.a5_1)};function Wt(t,n,u,r,e,a,s){return n=n===o?", ":n,u=u===o?"":u,r=r===o?"":r,e=e===o?-1:e,a=a===o?"...":a,s=s===o?null:s,$1(t,Cr(),n,u,r,e,a,s).toString()}function $1(t,n,u,r,e,a,s,l){u=u===o?", ":u,r=r===o?"":r,e=e===o?"":e,a=a===o?-1:a,s=s===o?"...":s,l=l===o?null:l,n.l4(r);var c=0,_=t.n();t:for(;_.o();){var h=_.p();if(c=c+1|0,c>1&&n.l4(u),a<0||c<=a)Ll(n,h,l);else break t}return a>=0&&c>a&&n.l4(s),n.l4(e),n}function Pn(t){if(t.s())throw gu("List is empty.");return t.w(xr(t))}function I1(t){return qi(x1(t))}function su(t){return t.s()?null:t.w(0)}function Ss(t,n){if(I(n,W)){var u=vu(t.i()+n.i()|0);return u.l(t),u.l(n),u}else{var r=vr(t);return wl(r,n),r}}function q1(t){if(I(t,W)){if(t.i()<=1)return qi(t);var n=Ot(t),u=Gn(n)?n:d();return Mf(u),Mi(u)}var r=Oi(t);return yo(r),r}function fu(t){if(t.s())throw gu("List is empty.");return t.w(0)}function Ii(t){return vr(t)}function qi(t){if(I(t,W)){var n;switch(t.i()){case 0:n=Mt();break;case 1:var u;I(t,Sn)?u=t.w(0):u=t.n().p(),n=Du(u);break;default:n=Ii(t);break}return n}return p0(Oi(t))}function x1(t){var n;return I(t,W)?n=a1(t):n=ar(t,pr()),n}function xi(t,n){if(I(t,W)){if(t.i()<=1)return qi(t);var u=Ot(t),r=Gn(u)?u:d();return Lf(r,n),Mi(r)}var e=Oi(t);return bo(e,n),e}function Oi(t){return I(t,W)?Ii(t):ar(t,at())}function ar(t,n){for(var u=t.n();u.o();){var r=u.p();n.k(r)}return n}function O1(t){if(I(t,W)){var n;switch(t.i()){case 0:n=Qi();break;case 1:var u;I(t,Sn)?u=t.w(0):u=t.n().p(),n=es(u);break;default:n=ar(t,o1(t.i()));break}return n}return d0(ar(t,pr()))}function N1(t,n){return Ml.b5(t,n,-1)}function ke(t,n){return t>n?n:t}function sr(t,n){return t=0)){var u="Requested element count "+n+" is less than zero.";throw ut(nt(u))}var r;return n===0?r=t:I(t,nu)?r=t.c5(n):r=new Tn(t,n),r}function M1(t,n){return new Xi(t,n)}function L1(t,n){var u=new Yi(t),r=new Gi(u,!0,U1(n));return new Pr(r,H1)}function z1(t,n){if(!(n>=0)){var u="Requested element count "+n+" is less than zero.";throw ut(nt(u))}var r;return n===0?r=jr():I(t,nu)?r=t.d5(n):r=new Ln(t,n),r}function R1(t,n){for(var u=t.n();u.o();){var r=u.p();n.k(r)}return n}function U1(t){return function(n){return t(n.e5_1,n.f5_1)}}function H1(t){return t.f5_1}function Fr(t,n){return n>=0&&n<=Xr(t)?w(t,n):null}function W1(t){var n=t&65535;return n}function st(t,n){return t-n|0}function K1(t,n){return st(t.g5_1,n instanceof ft?n.g5_1:d())}function Su(t,n){return t-n|0}function pe(t,n){return new yn(t,n)}function mt(t){return t}function J1(t,n){return n instanceof ft?t===n.g5_1:!1}function V1(t){return t}function V(t){return String.fromCharCode(t)}function qs(){Se=this,this.h5_1=0,this.i5_1=65535,this.j5_1=55296,this.k5_1=56319,this.l5_1=56320,this.m5_1=57343,this.n5_1=55296,this.o5_1=57343,this.p5_1=2,this.q5_1=16}var Se;function $e(){return Se==null&&new qs,Se}function ft(t){$e(),this.g5_1=t}i(ft).r5=function(t){return st(this.g5_1,t)};i(ft).d=function(t){return K1(this,t)};i(ft).equals=function(t){return J1(this.g5_1,t)};i(ft).hashCode=function(){return V1(this.g5_1)};i(ft).toString=function(){return V(this.g5_1)};function Sn(){}function W(){}function fn(){}function cn(){}function $n(){}function Z1(){}function _n(t,n){this.s5_1=t,this.t5_1=n}i(_n).u5=function(t){return wr(this.t5_1,t.t5_1)};i(_n).d=function(t){return this.u5(t instanceof _n?t:d())};i(_n).equals=function(t){return this===t};i(_n).hashCode=function(){return af(this)};i(_n).toString=function(){return this.s5_1};function hn(t){var n=t==null?null:nt(t);return n??"null"}function xs(t){for(var n=1,u=[],r=0,e=t.length;rn&&(n=s)}return G1(n,u)}function X1(t){var n=t>>5,u=new Int32Array(n+1|0),r=t&31,e=1<>5;if(u>t.length)return!1;var r=n&31,e=1<mt(s)}if(e)throw ut("Invalid Char code: "+r);u=Tu(r)}else u=t.b(n);return u}function ji(t){return typeof t=="string"}function U(t){var n;return ji(t)?n=t.length:n=t.a(),n}function Rs(t,n,u){var r;return ji(t)?r=t.substring(n,u):r=t.c(n,u),r}function uf(t){return k1(t,", ","[","]",o,o,rf)}function rf(t){return nt(t)}function wr(t,n){var u;switch(typeof t){case"number":var r;typeof n=="number"?r=Na(t,n):n instanceof P?r=Na(t,n.z5()):r=ja(t,n),u=r;break;case"string":case"boolean":u=ja(t,n);break;default:u=ef(t,n);break}return u}function Na(t,n){var u;if(tn)u=1;else if(t===n){var r;if(t!==0)r=0;else{var e=1/t,a;e===1/n?a=0:e<0?a=-1:a=1,r=a}u=r}else t!==t?u=n!==n?0:1:u=-1;return u}function ja(t,n){return tn?1:0}function ef(t,n){return t.d(n)}function af(t){return qe(t)}function qe(t){if(!("kotlinHashCodeValue$"in t)){var n=Us(),u=new Object;u.value=n,u.enumerable=!1,Object.defineProperty(t,"kotlinHashCodeValue$",u)}return t.kotlinHashCodeValue$}function Us(){return Math.random()*4294967296|0}function nt(t){var n;return t==null?n="null":Of(t)?n="[...]":typeof t.toString!="function"?n=sf(t):n=t.toString(),n}function sf(t){return Object.prototype.toString.call(t)}function tt(t){if(t==null)return 0;var n=typeof t,u;switch(n){case"object":u=typeof t.hashCode=="function"?t.hashCode():qe(t);break;case"function":u=qe(t);break;case"number":u=nf(t);break;case"boolean":u=Hs(t);break;case"string":u=cu(String(t));break;case"bigint":u=lf(t);break;case"symbol":u=of(t);break;default:u=function(){throw new Error("Unexpected typeof `"+n+"`")}();break}return u}function Hs(t){return t?1231:1237}function cu(t){var n=0,u=t.length,r=0,e=u-1|0;if(r<=e)do{var a=r;r=r+1|0;var s=t.charCodeAt(a);n=H(n,31)+s|0}while(a!==e);return n}function lf(t){for(var n=BigInt(32),u=BigInt(4294967295),r=t<0?-t:t,e=0,a=t<0?-1:1;r!=0;){var s=Number(r&u);e=H(31,e)+s|0,r=r>>n}return H(e,a)}function of(t){var n=ff(t)?cf():_f(),u=n.get(t);if(u!==o)return u;var r=Us();return n.set(t,r),r}function ff(t){return Symbol.keyFor(t)!=o}function cf(){return Ce===o&&(Ce=new Map),Ce}function _f(){return Ee===o&&(Ee=new WeakMap),Ee}var Ce,Ee;function b(t,n){if(t==null)return n==null;if(n==null)return!1;if(typeof t=="object"&&typeof t.equals=="function")return t.equals(n);if(t!==t)return n!==n;if(typeof t=="number"&&typeof n=="number"){var u;if(t===n){var r;if(t!==0)r=!0;else{var e=1/t;r=e===1/n}u=r}else u=!1;return u}return t===n}function j(t,n){Error.captureStackTrace!=null?Error.captureStackTrace(t,n):t.stack=new Error().stack}function i(t){return t.prototype}function hf(t,n,u,r){return Object.defineProperty(t,n,{configurable:!0,get:u,set:r})}function x(t){return Object.create(t)}function gr(t,n,u){Error.call(t),Df(t,n,u)}function Df(t,n,u){var r=ul(Object.getPrototypeOf(t));if(!(r&1)){var e;if(n==null){var a;if(n!==null){var s=u==null?null:u.toString();a=s??o}else a=o;e=a}else e=n;t.message=e}r&2||(t.cause=u),t.name=Object.getPrototypeOf(t).constructor.name}function _t(t){var n;return t==null?vf():n=t,n}function vf(){throw Hi()}function d(){throw Wi()}function Ae(t){return new Vu(t)}function pf(t,n){for(var u=t.length,r=n.length,e=0,a=n;ee)for(r.length=n;e>>16|0,r=t.y5_1&65535,e=t.x5_1>>>16|0,a=t.x5_1&65535,s=n.y5_1>>>16|0,l=n.y5_1&65535,c=n.x5_1>>>16|0,_=n.x5_1&65535,h=0,v=0,m=0,C=0;return C=C+(a+_|0)|0,m=m+(C>>>16|0)|0,C=C&65535,m=m+(e+c|0)|0,v=v+(m>>>16|0)|0,m=m&65535,v=v+(r+l|0)|0,h=h+(v>>>16|0)|0,v=v&65535,h=h+(u+s|0)|0,h=h&65535,new P(m<<16|C,h<<16|v)}function Ou(t,n){return J(),lr(t,n.h6())}function An(t,n){if(J(),Nn(t))return en();if(Nn(n))return en();if(Pt(t,Kt()))return Ma(n)?Kt():en();if(Pt(n,Kt()))return Ma(t)?Kt():en();if($t(t)){var u;return $t(n)?u=An(dt(t),dt(n)):u=dt(An(dt(t),n)),u}else if($t(n))return dt(An(t,dt(n)));if(La(t,Pa())&&La(n,Pa()))return ju(Nu(t)*Nu(n));var r=t.y5_1>>>16|0,e=t.y5_1&65535,a=t.x5_1>>>16|0,s=t.x5_1&65535,l=n.y5_1>>>16|0,c=n.y5_1&65535,_=n.x5_1>>>16|0,h=n.x5_1&65535,v=0,m=0,C=0,k=0;return k=k+H(s,h)|0,C=C+(k>>>16|0)|0,k=k&65535,C=C+H(a,h)|0,m=m+(C>>>16|0)|0,C=C&65535,C=C+H(s,_)|0,m=m+(C>>>16|0)|0,C=C&65535,m=m+H(e,h)|0,v=v+(m>>>16|0)|0,m=m&65535,m=m+H(a,_)|0,v=v+(m>>>16|0)|0,m=m&65535,m=m+H(s,c)|0,v=v+(m>>>16|0)|0,m=m&65535,v=v+(((H(r,h)+H(e,_)|0)+H(a,c)|0)+H(s,l)|0)|0,v=v&65535,new P(C<<16|k,v<<16|m)}function Af(t,n){if(J(),Nn(n))throw Ri("division by zero");if(Nn(t))return en();if(Pt(t,Kt())){if(Pt(n,Yu())||Pt(n,Ta()))return Kt();if(Pt(n,Kt()))return Yu();var u=df(t,1),r=Ff(u.g6(n),1);if(Pt(r,en()))return $t(n)?Yu():Ta();var e=Ou(t,An(n,r));return lr(r,e.g6(n))}else if(Pt(n,Kt()))return en();if($t(t)){var a;return $t(n)?a=dt(t).g6(dt(n)):a=dt(dt(t).g6(n)),a}else if($t(n))return dt(t.g6(dt(n)));for(var s=en(),l=t;yf(l,n);){for(var c=Nu(l)/Nu(n),_=Math.max(1,Math.floor(c)),h=Math.ceil(Math.log(_)/Math.LN2),v=h<=48?1:Math.pow(2,h-48),m=ju(_),C=An(m,n);$t(C)||gf(C,l);)_=_-v,m=ju(_),C=An(m,n);Nn(m)&&(m=Yu()),s=lr(s,m),l=Ou(l,C)}return s}function Ff(t,n){J();var u=n&63;return u===0?t:u<32?new P(t.x5_1<>>(32-u|0)|0)):new P(0,t.x5_1<<(u-32|0))}function df(t,n){J();var u=n&63;return u===0?t:u<32?new P(t.x5_1>>>u|0|t.y5_1<<(32-u|0),t.y5_1>>u):new P(t.y5_1>>(u-32|0),t.y5_1>=0?0:-1)}function Nu(t){return J(),t.y5_1*4294967296+bf(t)}function Pt(t,n){return J(),t.y5_1===n.y5_1?t.x5_1===n.x5_1:!1}function wf(t){return J(),t.x5_1^t.y5_1}function Oe(t,n){if(J(),n<2||36=9223372036854776e3)return Ef();if(t<0)return dt(ju(-t));var n=4294967296,u=t%n|0,r=t/n|0;return new P(u,r)}function gf(t,n){return J(),yr(t,n)>0}function yf(t,n){return J(),yr(t,n)>=0}function bf(t){return J(),t.x5_1>=0?t.x5_1:4294967296+t.x5_1}var za;function J(){za||(za=!0,Ks=Iu(0),Js=Iu(1),Vs=Iu(-1),Zs=new P(-1,2147483647),Xs=new P(0,-2147483648),Gs=Iu(16777216))}function D(t,n,u,r,e){return Ti("class",t,n,u,r,e,null)}function Ti(t,n,u,r,e,a,s){var l=o;return{kind:t,simpleName:n,associatedObjectKey:r,associatedObjects:e,suspendArity:a,$kClass$:l,defaultConstructor:u,iid:s}}function f(t,n,u,r,e,a,s,l,c){r!=null&&(t.prototype=Object.create(r.prototype),t.prototype.constructor=t);var _=u(n,a,s,l,c??[]);if(t.$metadata$=_,e!=null){var h=_.iid!=null?t:t.prototype;h.$imask$=xs(e)}}function St(t,n,u,r,e){return Ti("interface",t,n,u,r,e,Bf())}function Bf(){return $u===o&&($u=0),$u=$u+1|0,$u}var $u;function g(t,n,u,r,e){return Ti("object",t,n,u,r,e,null)}function Ys(t){var n;return t instanceof P?n=t.j6():n=kf(t),n}function kf(t){var n;return t>2147483647?n=2147483647:t<-2147483648?n=-2147483648:n=t|0,n}function Sf(t){return t<<16>>16}function Tu(t){var n=Ys(t),u=Sf(n);return W1(u)}function Qs(t,n){return new gn(t,n)}function $f(){return mu(),tl}var tl;function au(){return mu(),D(o,o,o,o,o)}function Pi(t,n,u,r,e){return mu(),r.get=r,r.set=e,r.callableName=t,If(r,qf(n,e),xf(r,u))}function If(t,n,u){return mu(),t.$metadata$=n,t.constructor=t,t.$imask$=u,t}function qf(t,n){return mu(),$f()[t][n==null?0:1]}function xf(t,n){mu();var u=t.$imask$,r;if(u==null){var e=[n];r=xs(e)}else r=u;return r}var Ra;function mu(){if(!Ra){Ra=!0;var t=[au(),au()],n=[au(),au()];tl=[t,n,[au(),au()]]}}function Of(t){return nl(t)?!0:Ao(t)}function nl(t){return Array.isArray(t)}function I(t,n){return Nf(t,n.$metadata$.iid)}function Nf(t,n){var u=t.$imask$,r;if(u==null)return!1;r=u;var e=r;return Y1(e,n)}function Gn(t){var n;return nl(t)?n=!t.$type$:n=!1,n}function jf(t){var n;return typeof t=="number"?n=!0:n=t instanceof P,n}function Ne(t){var n=typeof t;return n==="string"||n==="boolean"||jf(t)?!0:I(t,Pu)}function Ct(t){return typeof t=="string"?!0:I(t,pi)}function ul(t){var n=t.constructor,u=n==null?null:n.$metadata$,r=u==null?null:u.errorInfo;if(r!=null)return r;var e=0;if(Ua(t,"message")&&(e=e|1),Ua(t,"cause")&&(e=e|2),e!==3){var a=Tf(t);a!=Error.prototype&&(e=e|ul(a))}return u!=null&&(u.errorInfo=e),e}function Ua(t,n){return t.hasOwnProperty(n)}function Tf(t){return Object.getPrototypeOf(t)}var o;function Pf(t,n,u,r){u=u===o?0:u,r=r===o?t.length:r,qn.k6(u,r,t.length),t.fill(n,u,r)}function Mi(t){return new rt(t)}function Mf(t){t.length>1&&xo(t)}function Lf(t,n){t.length>1&&os(t,n)}function zf(t,n){if(!(n>=0)){var u="Invalid new array size: "+n+".";throw ut(nt(u))}return pf(t,new Int32Array(n))}function Rf(t,n){if(!(n>=0)){var u="Invalid new array size: "+n+".";throw ut(nt(u))}return mf(t,n,null)}function rl(t){var n=(t.i()/2|0)-1|0;if(n<0)return M;var u=xr(t),r=0;if(r<=n)do{var e=r;r=r+1|0;var a=t.w(e);t.j(e,t.w(u)),t.j(u,a),u=u-1|0}while(e!==n)}function Uf(t){var n=mt(t),u=Hf(Ha().l6_1,n),r=n-Ha().l6_1[u]|0;return r<10?r:-1}function Hf(t,n){for(var u=0,r=t.length-1|0,e=-1,a=0;u<=r;)if(e=(u+r|0)/2|0,a=t[e],n>a)u=e+1|0;else{if(n===a)return e;r=e-1|0}return e-(n4096?n===5760||8192<=n&&n<=8202||n===8232||n===8233||n===8239||n===8287?!0:n===12288:!1}function Kf(t){var n=t.t6_1;n!=null&&n!==t&&_t(t.u6().v6(Ol)).w6(n),t.t6_1=il}function it(t){this.m6_1=t,this.n6_1=0,this.o6_1=0,this.p6_1=null,this.q6_1=null,this.r6_1=null;var n=this,u=this.m6_1;n.s6_1=u==null?null:u.u6(),this.t6_1=null}i(it).u6=function(){return _t(this.s6_1)};i(it).x6=function(t){var n=this,u;if(P0(t))u=null;else{var r=t;u=r==null||r!=null?r:d()}for(var e=u,a=M0(t);;){var s=n;a==null?s.p6_1=e:(s.n6_1=s.o6_1,s.q6_1=a);try{var l=s.y6();if(l===xt())return M;e=l,a=null}catch(k){var c=k;e=null,a=c}Kf(s);var _=_t(s.m6_1);if(_ instanceof it)n=_;else{if(a!=null){var h=_t(a),v=z0(h);_.z6(v)}else{var m=e,C=m;_.z6(C)}return M}}};i(it).z6=function(t){return this.x6(t)};function Cu(){}i(Cu).u6=function(){var t="This continuation is already complete";throw Mn(nt(t))};i(Cu).x6=function(t){var n="This continuation is already complete";throw Mn(nt(n))};i(Cu).z6=function(t){return this.x6(t)};i(Cu).toString=function(){return"This continuation is already complete"};var il;function Jf(t,n,u){return new Li(u,t,n,u)}function Li(t,n,u,r){this.i7_1=n,this.j7_1=u,this.k7_1=r,it.call(this,I(t,Ku)?t:d())}i(Li).y6=function(){if(this.q6_1!=null)throw this.q6_1;var t=this.i7_1;return typeof t=="function"?t(this.j7_1,this.k7_1):this.i7_1.l7(this.j7_1,this.k7_1)};function al(t){return gr(t),mn.call(t),t}function sl(){var t=al(x(i(mn)));return j(t,sl),t}function zi(t,n){return gr(n,t),mn.call(n),n}function Ri(t){var n=zi(t,x(i(mn)));return j(n,Ri),n}function mn(){j(this,mn)}function ll(t){return Qt(t),Yn.call(t),t}function ol(){var t=ll(x(i(Yn)));return j(t,ol),t}function fl(t,n){return wu(t,n),Yn.call(n),n}function ut(t){var n=fl(t,x(i(Yn)));return j(n,ut),n}function Yn(){j(this,Yn)}function Vf(t){return Qt(t),Au.call(t),t}function cl(){var t=Vf(x(i(Au)));return j(t,cl),t}function Zf(t,n){return wu(t,n),Au.call(n),n}function Eu(t){var n=Zf(t,x(i(Au)));return j(n,Eu),n}function Au(){j(this,Au)}function Xf(t){return Qt(t),Fu.call(t),t}function _l(){var t=Xf(x(i(Fu)));return j(t,_l),t}function Gf(t,n){return wu(t,n),Fu.call(n),n}function Mn(t){var n=Gf(t,x(i(Fu)));return j(n,Mn),n}function Fu(){j(this,Fu)}function Yf(t){return Qt(t),br.call(t),t}function du(){var t=Yf(x(i(br)));return j(t,du),t}function br(){j(this,br)}function Qt(t){return al(t),Ft.call(t),t}function hl(){var t=Qt(x(i(Ft)));return j(t,hl),t}function wu(t,n){return zi(t,n),Ft.call(n),n}function Dl(t){var n=wu(t,x(i(Ft)));return j(n,Dl),n}function Ft(){j(this,Ft)}function Qf(t){return Qt(t),yu.call(t),t}function Dt(){var t=Qf(x(i(yu)));return j(t,Dt),t}function t0(t,n){return wu(t,n),yu.call(n),n}function gu(t){var n=t0(t,x(i(yu)));return j(n,gu),n}function yu(){j(this,yu)}function n0(t){return gr(t),bu.call(t),t}function vl(){var t=n0(x(i(bu)));return j(t,vl),t}function u0(t,n){return gr(n,t),bu.call(n),n}function bu(){j(this,bu)}function r0(t){return ll(t),Qn.call(t),t}function pl(){var t=r0(x(i(Qn)));return j(t,pl),t}function e0(t,n){return fl(t,n),Qn.call(n),n}function ml(t){var n=e0(t,x(i(Qn)));return j(n,ml),n}function Qn(){j(this,Qn)}function i0(t){return Qt(t),Bu.call(t),t}function Cl(){var t=i0(x(i(Bu)));return j(t,Cl),t}function a0(t,n){return wu(t,n),Bu.call(n),n}function El(t){var n=a0(t,x(i(Bu)));return j(n,El),n}function Bu(){j(this,Bu)}function s0(t){return Qt(t),Br.call(t),t}function Ui(){var t=s0(x(i(Br)));return j(t,Ui),t}function Br(){j(this,Br)}function l0(t){return Qt(t),kr.call(t),t}function Hi(){var t=l0(x(i(kr)));return j(t,Hi),t}function kr(){j(this,kr)}function o0(t){return Qt(t),Sr.call(t),t}function Wi(){var t=o0(x(i(Sr)));return j(t,Wi),t}function Sr(){j(this,Sr)}function f0(t){return function(n){return n===t?"(this Collection)":hn(n)}}function Dn(){}i(Dn).q=function(t){var n;t:{var u;if(I(this,W)?u=this.s():u=!1,u){n=!1;break t}for(var r=this.n();r.o();){var e=r.p();if(b(e,t)){n=!0;break t}}n=!1}return n};i(Dn).r=function(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p();if(!this.q(e)){n=!1;break t}}n=!0}return n};i(Dn).s=function(){return this.i()===0};i(Dn).toString=function(){return Wt(this,", ","[","]",o,o,f0(this))};i(Dn).toArray=function(){return rs(this)};function In(){this.e1_1=2147483639}i(In).e2=function(t,n){if(t<0||t>=n)throw Eu("index: "+t+", size: "+n)};i(In).f1=function(t,n){if(t<0||t>n)throw Eu("index: "+t+", size: "+n)};i(In).k6=function(t,n,u){if(t<0||n>u)throw Eu("fromIndex: "+t+", toIndex: "+n+", size: "+u);if(t>n)throw ut("fromIndex: "+t+" > toIndex: "+n)};i(In).g3=function(t,n){var u=t+(t>>1)|0;return(u-n|0)<0&&(u=n),(u-2147483639|0)>0&&(u=n>2147483639?En.MAX_VALUE:2147483639),u};i(In).m1=function(t){for(var n=1,u=t.n();u.o();){var r=u.p(),e=H(31,n),a=r==null?null:tt(r);n=e+(a??0)|0}return n};i(In).l1=function(t,n){if(t.i()!==n.i())return!1;for(var u=n.n(),r=t.n();r.o();){var e=r.p(),a=u.p();if(!b(e,a))return!1}return!0};var qn;function Wa(t,n){return n===t?"(this Map)":hn(n)}function Al(t,n){var u;t:{for(var r=t.x1().n();r.o();){var e=r.p();if(b(e.h4(),n)){u=e;break t}}u=null}return u}function c0(){}function _0(t){return function(n){return t.o7(n)}}function qt(){this.s1_1=null,this.t1_1=null}i(qt).u1=function(t){return Al(this,t)!=null};i(qt).v1=function(t){if(!(t!=null&&I(t,fn)))return!1;var n=t.h4(),u=t.i4(),r=(I(this,cn)?this:d()).w1(n);if(!b(u,r))return!1;var e;return r==null?e=!(I(this,cn)?this:d()).u1(n):e=!1,!e};i(qt).equals=function(t){if(t===this)return!0;if(!(t!=null&&I(t,cn))||this.i()!==t.i())return!1;var n;t:{var u=t.x1(),r;if(I(u,W)?r=u.s():r=!1,r){n=!0;break t}for(var e=u.n();e.o();){var a=e.p();if(!this.v1(a)){n=!1;break t}}n=!0}return n};i(qt).w1=function(t){var n=Al(this,t);return n==null?null:n.i4()};i(qt).hashCode=function(){return tt(this.x1())};i(qt).i=function(){return this.x1().i()};i(qt).toString=function(){var t=this.x1();return Wt(t,", ","{","}",o,o,_0(this))};i(qt).o7=function(t){return Wa(this,t.h4())+"="+Wa(this,t.i4())};function $r(){}i($r).z1=function(t){for(var n=0,u=t.n();u.o();){var r=u.p(),e=n,a=r==null?null:tt(r);n=e+(a??0)|0}return n};i($r).y1=function(t,n){return t.i()!==n.i()?!1:t.r(n)};var Ki;function h0(t){if(t.s())return[];for(var n=t.i(),u=Ni(Array(n),null),r=t.n(),e=0;r.o();){var a=e;e=a+1|0,u[a]=r.p()}return u}function Fl(t){return t.length===0?at():vr(new Cn(t,!0))}function Ji(t){return t.length>0?Mi(t):Mt()}function Mt(){return v0()}function D0(t){return t.length===0?at():vr(new Cn(t,!0))}function Ir(){}i(Ir).o=function(){return!1};i(Ir).p=function(){throw Dt()};var qr;function Cn(t,n){this.p7_1=t,this.q7_1=n}i(Cn).i=function(){return this.p7_1.length};i(Cn).s=function(){return this.p7_1.length===0};i(Cn).r7=function(t){return b1(this.p7_1,t)};i(Cn).s7=function(t){var n;t:{var u;if(I(t,W)?u=t.s():u=!1,u){n=!0;break t}for(var r=t.n();r.o();){var e=r.p();if(!this.r7(e)){n=!1;break t}}n=!0}return n};i(Cn).r=function(t){return this.s7(t)};i(Cn).n=function(){return Os(this.p7_1)};function Ht(){Te=this,this.t7_1=new P(-1478467534,-1720727600)}i(Ht).equals=function(t){var n;return t!=null&&I(t,Sn)?n=t.s():n=!1,n};i(Ht).hashCode=function(){return 1};i(Ht).toString=function(){return"[]"};i(Ht).i=function(){return 0};i(Ht).s=function(){return!0};i(Ht).u7=function(t){return t.s()};i(Ht).r=function(t){return this.u7(t)};i(Ht).w=function(t){throw Eu("Empty list doesn't contain element at index "+t+".")};i(Ht).n=function(){return qr};var Te;function v0(){return Te==null&&new Ht,Te}function xr(t){return t.i()-1|0}function p0(t){switch(t.i()){case 0:return Mt();case 1:return Du(t.w(0));default:return t}}function m0(){throw El("Index overflow has happened.")}function jn(t,n){this.e5_1=t,this.f5_1=n}i(jn).toString=function(){return"IndexedValue(index="+this.e5_1+", value="+this.f5_1+")"};i(jn).hashCode=function(){var t=this.e5_1;return t=H(t,31)+(this.f5_1==null?0:tt(this.f5_1))|0,t};i(jn).equals=function(t){if(this===t)return!0;if(!(t instanceof jn))return!1;var n=t instanceof jn?t:d();return!(this.e5_1!==n.e5_1||!b(this.f5_1,n.f5_1))};function C0(t){for(var n=at(),u=t.n();u.o();){var r=u.p();wl(n,r)}return n}function Or(t,n){var u;return I(t,W)?u=t.i():u=n,u}function dl(t){var n;if(t.s())throw gu("List is empty.");return n=t.z(xr(t)),n}function wl(t,n){if(I(n,W))return t.l(n);for(var u=!1,r=n.n();r.o();){var e=r.p();t.k(e)&&(u=!0)}return u}function Nr(){}i(Nr).p=function(){return this.v7()};function Hu(){}i(Hu).w7=function(){return this.x7()};i(Hu).p=function(){return new ft(this.w7())};function tu(t){return new Vi(t)}function kt(){}i(kt).a8=function(t,n){var u;return I(t,W)?u=t.s():u=!1,u?M:this.z7(t.n(),n)};i(kt).b8=function(t,n){return this.z7(t.n(),n)};function E0(t){var n=new Gt;return n.f8_1=Jf(t,n,n),n}function A0(t){if(t.o())return t.p();throw Dt()}function gl(t){switch(t.c8_1){case 4:return Dt();case 5:return Mn("Iterator has failed.");default:return Mn("Unexpected state of the iterator: "+t.c8_1)}}function Gt(){kt.call(this),this.c8_1=0,this.d8_1=null,this.e8_1=null,this.f8_1=null}i(Gt).o=function(){for(;;){switch(this.c8_1){case 0:break;case 1:if(_t(this.e8_1).o())return this.c8_1=2,!0;this.e8_1=null;break;case 4:return!1;case 3:case 2:return!0;default:throw gl(this)}this.c8_1=5;var t=_t(this.f8_1);this.f8_1=null;var n=M;t.z6(n)}};i(Gt).p=function(){switch(this.c8_1){case 0:case 1:return A0(this);case 2:return this.c8_1=1,_t(this.e8_1).p();case 3:this.c8_1=0;var t=this.d8_1,n=t==null||t!=null?t:d();return this.d8_1=null,n;default:throw gl(this)}};i(Gt).y7=function(t,n){return this.d8_1=t,this.c8_1=3,this.f8_1=n,xt()};i(Gt).z7=function(t,n){return t.o()?(this.e8_1=t,this.c8_1=2,this.f8_1=n,xt()):M};i(Gt).g8=function(t){R0(t);var n=t;n==null||n!=null||d(),this.c8_1=4};i(Gt).z6=function(t){return this.g8(t)};i(Gt).u6=function(){return y0()};function Vi(t){this.h8_1=t}i(Vi).n=function(){return E0(this.h8_1)};function jr(){return Wr}function Tr(t){this.j8_1=t,this.i8_1=t.k8_1.n()}i(Tr).p=function(){return this.j8_1.l8_1(this.i8_1.p())};i(Tr).o=function(){return this.i8_1.o()};function Pr(t,n){this.k8_1=t,this.l8_1=n}i(Pr).n=function(){return new Tr(this)};function yl(t){if(t.m8_1.o()){var n=t.m8_1.p();if(t.p8_1.r8_1(n))return t.n8_1=1,t.o8_1=n,M}t.n8_1=0}function Mr(t){this.p8_1=t,this.m8_1=t.q8_1.n(),this.n8_1=-1,this.o8_1=null}i(Mr).p=function(){if(this.n8_1===-1&&yl(this),this.n8_1===0)throw Dt();var t=this.o8_1,n=t==null||t!=null?t:d();return this.o8_1=null,this.n8_1=-1,n};i(Mr).o=function(){return this.n8_1===-1&&yl(this),this.n8_1===1};function Zi(t,n){this.q8_1=t,this.r8_1=n}i(Zi).n=function(){return new Mr(this)};function nu(){}function bl(t){for(;t.t8_1>0&&t.s8_1.o();)t.s8_1.p(),t.t8_1=t.t8_1-1|0}function Lr(t){this.s8_1=t.u8_1.n(),this.t8_1=t.v8_1}i(Lr).p=function(){return bl(this),this.s8_1.p()};i(Lr).o=function(){return bl(this),this.s8_1.o()};function Tn(t,n){if(this.u8_1=t,this.v8_1=n,!(this.v8_1>=0)){var u="count must be non-negative, but was "+this.v8_1+".";throw ut(nt(u))}}i(Tn).c5=function(t){var n=this.v8_1+t|0;return n<0?new Tn(this,t):new Tn(this.u8_1,n)};i(Tn).d5=function(t){var n=this.v8_1+t|0;return n<0?new Ln(this,t):new wn(this.u8_1,this.v8_1,n)};i(Tn).n=function(){return new Lr(this)};function Bl(t){for(;t.w8_1.o();){var n=t.w8_1.p();if(!t.z8_1.b9_1(n))return t.y8_1=n,t.x8_1=1,M}t.x8_1=0}function zr(t){this.z8_1=t,this.w8_1=t.a9_1.n(),this.x8_1=-1,this.y8_1=null}i(zr).p=function(){if(this.x8_1===-1&&Bl(this),this.x8_1===1){var t=this.y8_1,n=t==null||t!=null?t:d();return this.y8_1=null,this.x8_1=0,n}return this.w8_1.p()};i(zr).o=function(){return this.x8_1===-1&&Bl(this),this.x8_1===1?!0:this.w8_1.o()};function Xi(t,n){this.a9_1=t,this.b9_1=n}i(Xi).n=function(){return new zr(this)};function kl(t){for(;t.c9_1.o();){var n=t.c9_1.p();if(t.f9_1.i9_1(n)===t.f9_1.h9_1)return t.e9_1=n,t.d9_1=1,M}t.d9_1=0}function Rr(t){this.f9_1=t,this.c9_1=t.g9_1.n(),this.d9_1=-1,this.e9_1=null}i(Rr).p=function(){if(this.d9_1===-1&&kl(this),this.d9_1===0)throw Dt();var t=this.e9_1;return this.e9_1=null,this.d9_1=-1,t==null||t!=null?t:d()};i(Rr).o=function(){return this.d9_1===-1&&kl(this),this.d9_1===1};function Gi(t,n,u){n=n===o?!0:n,this.g9_1=t,this.h9_1=n,this.i9_1=u}i(Gi).n=function(){return new Rr(this)};function Ur(t){this.j9_1=t.l9_1.n(),this.k9_1=0}i(Ur).p=function(){var t=this.k9_1;return this.k9_1=t+1|0,new jn(Ci(t),this.j9_1.p())};i(Ur).o=function(){return this.j9_1.o()};function Yi(t){this.l9_1=t}i(Yi).n=function(){return new Ur(this)};function Hr(t){this.m9_1=t.p9_1,this.n9_1=t.o9_1.n()}i(Hr).p=function(){if(this.m9_1===0)throw Dt();return this.m9_1=this.m9_1-1|0,this.n9_1.p()};i(Hr).o=function(){return this.m9_1>0?this.n9_1.o():!1};function Ln(t,n){if(this.o9_1=t,this.p9_1=n,!(this.p9_1>=0)){var u="count must be non-negative, but was "+this.p9_1+".";throw ut(nt(u))}}i(Ln).c5=function(t){return t>=this.p9_1?jr():new wn(this.o9_1,t,this.p9_1)};i(Ln).d5=function(t){return t>=this.p9_1?this:new Ln(this.o9_1,t)};i(Ln).n=function(){return new Hr(this)};function Wu(){}i(Wu).n=function(){return qr};i(Wu).c5=function(t){return Wr};i(Wu).d5=function(t){return Wr};var Wr;function Sl(t){for(;t.r9_1=this.s9_1.v9_1)throw Dt();return this.r9_1=this.r9_1+1|0,this.q9_1.p()};function wn(t,n,u){if(this.t9_1=t,this.u9_1=n,this.v9_1=u,!(this.u9_1>=0)){var r="startIndex should be non-negative, but is "+this.u9_1;throw ut(nt(r))}if(!(this.v9_1>=0)){var e="endIndex should be non-negative, but is "+this.v9_1;throw ut(nt(e))}if(!(this.v9_1>=this.u9_1)){var a="endIndex should be not less than startIndex, but was "+this.v9_1+" < "+this.u9_1;throw ut(nt(a))}}i(wn).c5=function(t){return t>=$l(this)?jr():new wn(this.t9_1,this.u9_1+t|0,this.v9_1)};i(wn).d5=function(t){return t>=$l(this)?this:new wn(this.t9_1,this.u9_1,this.u9_1+t|0)};i(wn).n=function(){return new Kr(this)};function Qi(){return w0()}function F0(t){return B1(t,Uo(t.length))}function d0(t){switch(t.i()){case 0:return Qi();case 1:return es(t.n().p());default:return t}}function tn(){Pe=this,this.w9_1=new P(1993859828,793161749)}i(tn).equals=function(t){var n;return t!=null&&I(t,$n)?n=t.s():n=!1,n};i(tn).hashCode=function(){return 0};i(tn).toString=function(){return"[]"};i(tn).i=function(){return 0};i(tn).s=function(){return!0};i(tn).u7=function(t){return t.s()};i(tn).r=function(t){return this.u7(t)};i(tn).n=function(){return qr};var Pe;function w0(){return Pe==null&&new tn,Pe}function Il(){var t=ql;return I(t,Vn)?t:d()}function Jr(){}i(Jr).x9=function(t,n){return wr(t,n)};i(Jr).compare=function(t,n){var u=t!=null&&Ne(t)?t:d();return this.x9(u,n!=null&&Ne(n)?n:d())};var ql;function ta(t,n){return t===n?0:t==null?-1:n==null?1:wr(t!=null&&Ne(t)?t:d(),n)}function Ku(){}function xl(){}var Ol;function g0(){}function Ju(){Me=this,this.y9_1=new P(0,0)}i(Ju).v6=function(t){return null};i(Ju).hashCode=function(){return 0};i(Ju).toString=function(){return"EmptyCoroutineContext"};var Me;function y0(){return Me==null&&new Ju,Me}function xt(){return B0()}var Nl,Ka;function b0(){if(Ka)return M;Ka=!0,Nl=new rr("COROUTINE_SUSPENDED",0),new rr("UNDECIDED",1),new rr("RESUMED",2)}function rr(t,n){_n.call(this,t,n)}function B0(){return b0(),Nl}function jl(t,n,u){var r;if(u>0)r=t>=n?n:n-Ja(n,t,u)|0;else if(u<0)r=t<=n?n:n+Ja(t,n,-u|0)|0;else throw ut("Step is zero.");return r}function Ja(t,n,u){return Fe(Fe(t,u)-Fe(n,u)|0,u)}function Fe(t,n){var u=t%n|0;return u>=0?u:u+n|0}function Tl(){Le=this,this.z9_1=new gn(1,0)}var Le;function k0(){return Le==null&&new Tl,Le}function gn(t,n){k0(),Yt.call(this,t,n,1)}i(gn).s=function(){return this.da_1>this.ea_1};i(gn).equals=function(t){var n;return t instanceof gn?n=this.s()&&t.s()?!0:this.da_1===t.da_1?this.ea_1===t.ea_1:!1:n=!1,n};i(gn).hashCode=function(){return this.s()?-1:H(31,this.da_1)+this.ea_1|0};i(gn).toString=function(){return""+this.da_1+".."+this.ea_1};function Pl(){ze=this,this.ga_1=new yn(1,0)}var ze;function S0(){return ze==null&&new Pl,ze}function yn(t,n){S0(),vn.call(this,t,n,1)}i(yn).s=function(){return st(this.ka_1,this.la_1)>0};i(yn).equals=function(t){var n;return t instanceof yn?n=this.s()&&t.s()?!0:this.ka_1===t.ka_1?this.la_1===t.la_1:!1:n=!1,n};i(yn).hashCode=function(){var t;if(this.s())t=-1;else{var n=this.ka_1,u=mt(n),r=H(31,u),e=this.la_1;t=r+mt(e)|0}return t};i(yn).toString=function(){return V(this.ka_1)+".."+V(this.la_1)};function Vr(t,n,u){Nr.call(this),this.na_1=u,this.oa_1=n,this.pa_1=this.na_1>0?t<=n:t>=n,this.qa_1=this.pa_1?t:this.oa_1}i(Vr).o=function(){return this.pa_1};i(Vr).v7=function(){var t=this.qa_1;if(t===this.oa_1){if(!this.pa_1)throw Dt();this.pa_1=!1}else this.qa_1=this.qa_1+this.na_1|0;return t};function Zr(t,n,u){Hu.call(this),this.ra_1=u;var r=this;r.sa_1=mt(n),this.ta_1=this.ra_1>0?st(t,n)<=0:st(t,n)>=0;var e=this,a;this.ta_1?a=mt(t):a=this.sa_1,e.ua_1=a}i(Zr).o=function(){return this.ta_1};i(Zr).x7=function(){var t=this.ua_1;if(t===this.sa_1){if(!this.ta_1)throw Dt();this.ta_1=!1}else this.ua_1=this.ua_1+this.ra_1|0;return Tu(t)};function na(){}i(na).b5=function(t,n,u){return new Yt(t,n,u)};var Ml;function Yt(t,n,u){if(u===0)throw ut("Step must be non-zero.");if(u===En.MIN_VALUE)throw ut("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.da_1=t,this.ea_1=jl(t,n,u),this.fa_1=u}i(Yt).n=function(){return new Vr(this.da_1,this.ea_1,this.fa_1)};i(Yt).s=function(){return this.fa_1>0?this.da_1>this.ea_1:this.da_10?""+this.da_1+".."+this.ea_1+" step "+this.fa_1:""+this.da_1+" downTo "+this.ea_1+" step "+(-this.fa_1|0)};function $0(){}function vn(t,n,u){if(u===0)throw ut("Step must be non-zero.");if(u===En.MIN_VALUE)throw ut("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.ka_1=t;var r=this,e=mt(t),a=mt(n);r.la_1=Tu(jl(e,a,u)),this.ma_1=u}i(vn).n=function(){return new Zr(this.ka_1,this.la_1,this.ma_1)};i(vn).s=function(){return this.ma_1>0?st(this.ka_1,this.la_1)>0:st(this.ka_1,this.la_1)<0};i(vn).equals=function(t){var n;return t instanceof vn?n=this.s()&&t.s()?!0:this.ka_1===t.ka_1&&this.la_1===t.la_1?this.ma_1===t.ma_1:!1:n=!1,n};i(vn).hashCode=function(){var t;if(this.s())t=-1;else{var n=this.ka_1,u=mt(n),r=H(31,u),e=this.la_1,a=mt(e);t=H(31,r+a|0)+this.ma_1|0}return t};i(vn).toString=function(){return this.ma_1>0?V(this.ka_1)+".."+V(this.la_1)+" step "+this.ma_1:V(this.ka_1)+" downTo "+V(this.la_1)+" step "+(-this.ma_1|0)};function Ll(t,n,u){u!=null?t.l4(u(n)):n==null||Ct(n)?t.l4(n):n instanceof ft?t.e4(n.g5_1):t.l4(hn(n))}function zl(t,n,u){if(u=u===o?!1:u,t===n)return!0;if(!u)return!1;var r=Ia(t),e=Ia(n),a;if(r===e)a=!0;else{var s=V(r).toLowerCase(),l=w(s,0),c=V(e).toLowerCase();a=l===w(c,0)}return a}function I0(t){return Ul(t,10)}function Rl(t){throw ml("Invalid number format: '"+t+"'")}function Ul(t,n){ys(n);var u=t.length;if(u===0)return null;var r,e,a,s=w(t,0);if(st(s,48)<0){if(u===1)return null;if(r=1,s===45)e=!0,a=En.MIN_VALUE;else if(s===43)e=!1,a=-En.MAX_VALUE|0;else return null}else r=0,e=!1,a=-En.MAX_VALUE|0;var l=(-En.MAX_VALUE|0)/36|0,c=l,_=0,h=r;if(h=0}function Hl(t,n,u){u=u===o?!1:u;var r,e;return u?e=!1:e=typeof t=="string",e?r=typeof n=="string":r=!1,r?d1(t,n):Gr(t,0,n,0,U(n),u)}function Wl(t,n,u){u=u===o?!1:u;var r;return typeof n=="string"?r=x0(t,n,o,u)>=0:r=Kl(t,n,0,U(t),u)>=0,r}function ua(t,n,u){u=u===o?!1:u;var r,e;return u?e=!1:e=typeof t=="string",e?r=typeof n=="string":r=!1,r?w1(t,n):Gr(t,U(t)-U(n)|0,n,0,U(n),u)}function q0(t,n,u,r){u=u===o?0:u,r=r===o?!1:r;var e,a;if(r?a=!0:a=typeof t!="string",a){var s=Q1([n]);e=N0(t,s,u,r)}else{var l=V(n);e=t.indexOf(l,u)}return e}function Gr(t,n,u,r,e,a){if(r<0||n<0||n>(U(t)-e|0)||r>(U(u)-e|0))return!1;var s=0;if(s0&&c<=_||h<0&&_<=c)do{var v=c;if(c=c+h|0,Er(n,0,t,v,U(n),e))return v}while(v!==_)}else{var m=s.da_1,C=s.ea_1,k=s.fa_1;if(k>0&&m<=C||k<0&&C<=m)do{var A=m;if(m=m+k|0,Gr(n,0,t,A,U(n),e))return A}while(A!==C)}return-1}function O0(t){var n=0,u=U(t)-1|0,r=!1;t:for(;n<=u;){var e=r?u:n,a=gs(w(t,e));if(!r)a?n=n+1|0:r=!0;else if(a)u=u-1|0;else break t}return Rs(t,n,u+1|0)}function N0(t,n,u,r){u=u===o?0:u,r=r===o?!1:r;var e;if(!r&&n.length===1?e=typeof t=="string":e=!1,e){var a=y1(n),s=V(a);return t.indexOf(s,u)}var l=sr(u,0),c=Xr(t);if(l<=c)do{var _=l;l=l+1|0;var h=w(t,_),v;t:{for(var m=0,C=n.length;m$lambda$slambda",D,it,o,o,o,o,[1]);f(Rn,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Un,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Hn,"Transform$$lambda$slambda",D,it,o,o,o,o,[1]);f(Wn,"Transform$querySelectorAll$lambda$slambda",D,it,o,o,o,o,[1]);f(Kn,"Transform$querySelectorTrackAll$lambda$slambda",D,it,o,o,o,o,[1]);f(Zl,"Transform",D);f(Lt,"Expression",D);f(bt,"BinaryExpression",D,Lt);f(ne,"sam$kotlin_Comparator$0",D,o,[Vn]);f(Xl,"Companion",g);f(Z,"CompareOperator",D);f(ea,"Equal",g,Z);f(ia,"NotEqual",g,Z);f(aa,"Start",g,Z);f(sa,"NotStart",g,Z);f(la,"Include",g,Z);f(oa,"NotInclude",g,Z);f(fa,"End",g,Z);f(ca,"NotEnd",g,Z);f(_a,"Less",g,Z);f(ha,"LessEqual",g,Z);f(Da,"More",g,Z);f(va,"MoreEqual",g,Z);f(Zu,"ConnectExpression",D);f(re,"sam$kotlin_Comparator$0",D,o,[Vn]);f(to,"Companion",g);f(Tt,"ConnectOperator",D);f(ee,"BeforeBrother",g,Tt);f(ie,"AfterBrother",g,Tt);f(ae,"Ancestor",g,Tt);f(se,"Child",g,Tt);f(le,"Descendant",g,Tt);f(Jn,"ConnectSegment$traversal$o$invoke$slambda",D,it,o,o,o,o,[1]);f(Ca,o,D);f(Ea,o,D);f(an,"ConnectSegment",D,o,o,an);f(Fn,"ConnectWrapper",D);f(It,"LogicalExpression",D,Lt);f(oe,"sam$kotlin_Comparator$0",D,o,[Vn]);f(no,"Companion",g);f(ru,"LogicalOperator",D);f(Aa,"AndOperator",g,ru);f(fe,"OrOperator",g,ru);f(Fa,o,D);f(At,"PolynomialExpression",D,Zu,o,At);f(da,o,D);f(wa,o,D);f(dn,"PropertySegment",D);f(sn,"PropertyWrapper",D);f(ga,o,D);f(Vt,"TupleExpression",D,Zu);f(K,"Parser",D);f(R,"ParserResult",D);f(ya,"ParserSet",g);f(Xu,o,D);f(ba,"FilterIndexesSequence",D);function Qr(){}i(Qr).parse=function(t){return new gt(ra.db(t))};i(Qr).parseOrNull=function(t){var n=ra.eb(t),u;return n==null?u=null:u=new gt(n),u};var Vl;function U0(){return Vl}function gt(t){this.fb_1=t,this.tracks=this.fb_1.qb(),this.trackIndex=this.fb_1.ib_1,this.connectKeys=this.fb_1.rb(),this.propertyNames=this.fb_1.sb()}i(gt).tb=function(){return this.fb_1};i(gt).qb=function(){return this.tracks};i(gt).ub=function(){return this.trackIndex};i(gt).rb=function(){return this.connectKeys};i(gt).sb=function(){return this.propertyNames};i(gt).match=function(t,n){return this.fb_1.wb(t,n.vb_1)};i(gt).matchTrack=function(t,n){var u=this.fb_1.xb(t,n.vb_1),r;u==null?r=null:r=Ot(u);var e=r;return e==null||Gn(e)?e:d()};i(gt).toString=function(){return this.fb_1.toString()};function H0(t){return function(n){return g1(t(n))}}function W0(t){return function(n,u){var r=$s(t.vb_1.kc_1(n,u.fb_1)),e=Ot(r);return Gn(e)?e:d()}}function K0(t){return function(n,u){return Ar(t.vb_1.kc_1(n,u.fb_1))}}function J0(t){var n=Ot(t);return Gn(n)?n:d()}function V0(t){return function(n,u){var r=t.vb_1.mc_1(n,u.fb_1),e=$s(j1(r,J0)),a=Ot(e);return Gn(a)?a:d()}}function Z0(t){return function(n,u){var r=Ar(t.vb_1.mc_1(n,u.fb_1)),e;r==null?e=null:e=Ot(r);var a=e;return a==null||Gn(a)?a:d()}}function uu(t,n,u,r){var e=this;e.vb_1=new Zl(t,n,H0(u),o,r);var a=this;a.querySelectorAll=W0(this);var s=this;s.querySelector=K0(this);var l=this;l.querySelectorTrackAll=V0(this);var c=this;c.querySelectorTrack=Z0(this)}i(uu).oc=function(){return this.vb_1};i(uu).pc=function(){return this.querySelectorAll};i(uu).qc=function(){return this.querySelector};i(uu).rc=function(){return this.querySelectorTrackAll};i(uu).sc=function(){return this.querySelectorTrack};function ku(){}i(ku).tc=function(t,n,u,r){var e;if(n>=t.length)e=!0;else{var a;U(u)>0?a=!wt(u,w(t,n)):a=!1,e=a}if(e)throw new ot(r??u,n,t)};i(ku).assert=function(t,n,u,r,e){return u=u===o?"":u,r=r===o?null:r,this.tc(t,n,u,r)};i(ku).uc=function(t,n,u){throw new ot(u,n,t)};i(ku).throwError=function(t,n,u,r){return u=u===o?"":u,this.uc(t,n,u)};var B;function ot(t,n,u){var r=Fr(u,n);zi("expected "+t+" in selector at position "+n+", but got "+hn(r==null?null:new ft(r)),this),j(this,ot),this.expectedValue=t,this.position=n,this.source=u}i(ot).vc=function(){return this.expectedValue};i(ot).wc=function(){return this.position};i(ot).xc=function(){return this.source};i(ot).bb=function(){return this.expectedValue};i(ot).cb=function(){return this.position};i(ot).yc=function(){return this.source};i(ot).zc=function(t,n,u){return new ot(t,n,u)};i(ot).copy=function(t,n,u,r){return t=t===o?this.expectedValue:t,n=n===o?this.position:n,u=u===o?this.source:u,this.zc(t,n,u)};i(ot).toString=function(){return"ExtSyntaxError(expectedValue="+this.expectedValue+", position="+this.position+", source="+this.source+")"};i(ot).hashCode=function(){var t=cu(this.expectedValue);return t=ht(t,31)+this.position|0,t=ht(t,31)+cu(this.source)|0,t};i(ot).equals=function(t){if(this===t)return!0;if(!(t instanceof ot))return!1;var n=t instanceof ot?t:d();return!(this.expectedValue!==n.expectedValue||this.position!==n.position||this.source!==n.source)};function te(){}i(te).db=function(t){return y().xd_1(t)};i(te).eb=function(t){var n;try{n=y().xd_1(t)}catch(r){var u;if(r instanceof mn)u=null;else throw r;n=u}return n};var ra;function X0(t){return function(){var n=Fl([t.gb_1]);t:for(;;){var u=Pn(n).zd_1,r=u==null?null:u.be_1,e;if(r==null)break t;e=r,n.k(e)}for(var a=vu(Or(n,10)),s=n.n();s.o();){var l=s.p(),c=l.yd_1.ce_1;a.k(c)}return Ot(a)}}function G0(t){return function(){for(var n=t.gb_1.zd_1,u=at();n!=null;){_t(n).ae_1.je_1,u.k(_t(n).ae_1.ie_1.le_1);var r=n,e=r==null?null:r.be_1;n=e==null?null:e.zd_1}return Ot(u)}}function Y0(t){return function(){for(var n=t.gb_1,u=pr();n!=null;){var r=_t(n).yd_1,e=_t(n).zd_1;n=e==null?null:e.be_1,u.l(r.ge_1)}var a=I1(u);return Ot(a)}}function nn(t){this.gb_1=t;var n=this;n.hb_1=Ae(X0(this));var u=this,r;t:{var e=this.qb(),a=0,s=e.length-1|0;if(a<=s)do{var l=a;if(a=a+1|0,e[l]){r=l;break t}}while(a<=s);r=-1}var c=r;u.ib_1=c<0?0:c;var _=this;_.jb_1=Ae(G0(this));var h=this;h.kb_1=Ae(Y0(this));var v=this,m=su(this.gb_1.yd_1.ee_1),C,k,A,F;if(m instanceof bt?F=m.me_1==="id":F=!1,F?A=b(m.ne_1,lu()):A=!1,A){var E=m.oe_1;k=E!=null?typeof E=="string":!1}else k=!1;k?C=m.oe_1:C=null,v.lb_1=C;var q=this,T=su(this.gb_1.yd_1.ee_1),O,z,Q,vt;if(T instanceof bt?vt=T.me_1==="vid":vt=!1,vt?Q=b(T.ne_1,lu()):Q=!1,Q){var pt=T.oe_1;z=pt!=null?typeof pt=="string":!1}else z=!1;z?O=T.oe_1:O=null,q.mb_1=O;var L=this,X=su(this.gb_1.yd_1.ee_1),yt,eu,iu,ce;if(X instanceof bt?ce=X.me_1==="text":ce=!1,ce?iu=b(X.ne_1,lu())||b(X.ne_1,Gl())||b(X.ne_1,Yl())?!0:b(X.ne_1,Ql()):iu=!1,iu){var ka=X.oe_1;eu=ka!=null?typeof ka=="string":!1}else eu=!1;eu?yt=X.oe_1:yt=null,L.nb_1=yt,this.ob_1=this.lb_1!=null||this.mb_1!=null?!0:this.nb_1!=null;var co=this,Gu=su(this.gb_1.yd_1.ee_1),_e,he,De;Gu instanceof bt?De=Gu.me_1==="depth":De=!1,De?he=b(Gu.ne_1,lu()):he=!1,he?_e=b(Gu.oe_1,0):_e=!1,co.pb_1=_e}i(nn).toString=function(){return this.gb_1.toString()};i(nn).qb=function(){var t=this.hb_1;return Q0(),t.i4()};i(nn).rb=function(){var t=this.jb_1;return tc(),t.i4()};i(nn).sb=function(){var t=this.kb_1;return nc(),t.i4()};i(nn).qe=function(t,n,u){var r=this.re(t,n,u),e;if(r==null)return null;e=r;var a=e;return a.w(this.ib_1)};i(nn).wb=function(t,n,u,r){var e;return u===o?e=at():e=u,u=e,r===o?this.qe(t,n,u):r.qe.call(this,t,n,u)};i(nn).re=function(t,n,u){return this.gb_1.re(t,n,u)};i(nn).xb=function(t,n,u,r){var e;return u===o?e=at():e=u,u=e,r===o?this.re(t,n,u):r.re.call(this,t,n,u)};function Q0(){return Pi("tracks",1,mr,function(t){return t.qb()},null)}function tc(){return Pi("connectKeys",1,mr,function(t){return t.rb()},null)}function nc(){return Pi("propertyNames",1,mr,function(t){return t.sb()},null)}function uc(t){return function(n){return!b(n,t)}}function rc(t){return function(n){return!b(n,t)}}function ec(t){return function(n,u){return Uu(t(n),u)}}function zn(t,n,u){this.af_1=t,this.bf_1=n,it.call(this,u)}i(zn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(zn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(zn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=5;var u=this,r=this.af_1(this.bf_1),e;if(r==null)return M;e=r,u.df_1=e,this.n6_1=1;continue t;case 1:if(this.df_1==null){this.n6_1=4;continue t}if(this.ef_1=this.df_1,this.ef_1==null){this.ff_1=null,this.n6_1=3;continue t}else{var a=this;a.gf_1=this.ef_1;var s=this;if(s.hf_1=this.gf_1,this.n6_1=2,t=this.cf_1.y7(this.hf_1,this),t===xt())return t;continue t}case 2:var l=this;this.df_1=this.af_1(this.hf_1),l.ff_1=M,this.n6_1=3;continue t;case 3:this.n6_1=1;continue t;case 4:return M;case 5:throw this.q6_1}}catch(_){var c=_;if(this.o6_1===5)throw c;this.n6_1=this.o6_1,this.q6_1=c}while(!0)};i(zn).jf=function(t,n){var u=new zn(this.af_1,this.bf_1,n);return u.cf_1=t,u};function ic(t,n,u){var r=new zn(t,n,u),e=function(a,s){return r.if(a,s)};return e.$arity=1,e}function ac(t){return function(n){return tu(ic(t,n,null))}}function sc(t){return function(n,u){return Uu(t(n),u)}}function Rn(t,n,u,r){this.sf_1=t,this.tf_1=n,this.uf_1=u,it.call(this,r)}i(Rn).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Rn).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Rn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=2;var u=this,r=this.sf_1(this.tf_1),e;if(r==null)return M;e=r,u.wf_1=e;var a=this,s=this.uf_1(this.wf_1);if(a.xf_1=Is(T1(s,uc(this.tf_1))),rl(this.xf_1),this.n6_1=1,t=this.vf_1.a8(this.xf_1,this),t===xt())return t;continue t;case 1:return M;case 2:throw this.q6_1}}catch(c){var l=c;if(this.o6_1===2)throw l;this.n6_1=this.o6_1,this.q6_1=l}while(!0)};i(Rn).zf=function(t,n){var u=new Rn(this.sf_1,this.tf_1,this.uf_1,n);return u.vf_1=t,u};function lc(t,n,u,r){var e=new Rn(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function oc(t,n){return function(u){return tu(lc(t,u,n,null))}}function fc(t){return function(n,u){return Uu(t(n),u)}}function Un(t,n,u,r){this.ig_1=t,this.jg_1=n,this.kg_1=u,it.call(this,r)}i(Un).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Un).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Un).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=2;var u=this,r=this.ig_1(this.jg_1),e;if(r==null)return M;e=r,u.mg_1=e,this.n6_1=1;var a=this.kg_1(this.mg_1);if(t=this.lg_1.b8(P1(M1(a,rc(this.jg_1)),1),this),t===xt())return t;continue t;case 1:return M;case 2:throw this.q6_1}}catch(l){var s=l;if(this.o6_1===2)throw s;this.n6_1=this.o6_1,this.q6_1=s}while(!0)};i(Un).zf=function(t,n){var u=new Un(this.ig_1,this.jg_1,this.kg_1,n);return u.lg_1=t,u};function cc(t,n,u,r){var e=new Un(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function _c(t,n){return function(u){return tu(cc(t,u,n,null))}}function hc(t){return function(n,u){return Uu(t(n),u)}}function Hn(t,n,u){this.vg_1=t,this.wg_1=n,it.call(this,u)}i(Hn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Hn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(Hn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=4,this.yg_1=Is(this.vg_1(this.wg_1)),this.yg_1.s())return M;rl(this.yg_1);var u=this;u.zg_1=at(),this.n6_1=1;continue t;case 1:if(this.ah_1=dl(this.yg_1),this.n6_1=2,t=this.xg_1.y7(this.ah_1,this),t===xt())return t;continue t;case 2:for(var r=this.vg_1(this.ah_1).n();r.o();){var e=r.p();this.zg_1.k(e)}if(!this.zg_1.s()){var a=this.zg_1.i()-1|0;if(0<=a)do{var s=a;a=a+-1|0,this.yg_1.k(this.zg_1.w(s))}while(0<=a);this.zg_1.h1()}if(!this.yg_1.s()){this.n6_1=1;continue t}this.n6_1=3;continue t;case 3:return M;case 4:throw this.q6_1}}catch(c){var l=c;if(this.o6_1===4)throw l;this.n6_1=this.o6_1,this.q6_1=l}while(!0)};i(Hn).jf=function(t,n){var u=new Hn(this.vg_1,this.wg_1,n);return u.xg_1=t,u};function Dc(t,n,u){var r=new Hn(t,n,u),e=function(a,s){return r.if(a,s)};return e.$arity=1,e}function vc(t){return function(n){return tu(Dc(t,n,null))}}function Wn(t,n,u,r){this.jh_1=t,this.kh_1=n,this.lh_1=u,it.call(this,r)}i(Wn).if=function(t,n){var u=this.jf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Wn).l7=function(t,n){return this.if(t instanceof kt?t:d(),n)};i(Wn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:this.o6_1=7;var u=this;if(u.nh_1=at(),this.oh_1=this.jh_1.qe(this.kh_1,this.lh_1,this.nh_1),this.oh_1!=null){if(this.n6_1=1,t=this.mh_1.y7(this.oh_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:var r=this;r.ph_1=this.lh_1.jc_1(this.kh_1),this.qh_1=this.ph_1.n(),this.n6_1=3;continue t;case 3:if(!this.qh_1.o()){this.n6_1=6;continue t}this.rh_1=this.qh_1.p();var e=this;if(e.sh_1=this.rh_1,this.nh_1.h1(),this.th_1=this.jh_1.qe(this.sh_1,this.lh_1,this.nh_1),this.th_1!=null){if(this.n6_1=4,t=this.mh_1.y7(this.th_1,this),t===xt())return t;continue t}else{this.n6_1=5;continue t}case 4:this.n6_1=5;continue t;case 5:this.n6_1=3;continue t;case 6:return M;case 7:throw this.q6_1}}catch(s){var a=s;if(this.o6_1===7)throw a;this.n6_1=this.o6_1,this.q6_1=a}while(!0)};i(Wn).jf=function(t,n){var u=new Wn(this.jh_1,this.kh_1,this.lh_1,n);return u.mh_1=t,u};function pc(t,n,u,r){var e=new Wn(t,n,u,r),a=function(s,l){return e.if(s,l)};return a.$arity=1,a}function mc(t){return function(n,u){return tu(pc(u,n,t,null))}}function Cc(t){return function(n,u){return Ar(t.kc_1(n,u))}}function Kn(t,n,u,r){this.ci_1=t,this.di_1=n,this.ei_1=u,it.call(this,r)}i(Kn).mi=function(t,n){var u=this.ni(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Kn).l7=function(t,n){return this.mi(t instanceof kt?t:d(),n)};i(Kn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=7,this.gi_1=this.ci_1.xb(this.di_1,this.ei_1),this.gi_1!=null){if(this.n6_1=1,t=this.fi_1.y7(this.gi_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:var u=this;u.hi_1=this.ei_1.jc_1(this.di_1),this.ii_1=this.hi_1.n(),this.n6_1=3;continue t;case 3:if(!this.ii_1.o()){this.n6_1=6;continue t}this.ji_1=this.ii_1.p();var r=this;if(r.ki_1=this.ji_1,this.li_1=this.ci_1.xb(this.ki_1,this.ei_1),this.li_1!=null){if(this.n6_1=4,t=this.fi_1.y7(this.li_1,this),t===xt())return t;continue t}else{this.n6_1=5;continue t}case 4:this.n6_1=5;continue t;case 5:this.n6_1=3;continue t;case 6:return M;case 7:throw this.q6_1}}catch(a){var e=a;if(this.o6_1===7)throw e;this.n6_1=this.o6_1,this.q6_1=e}while(!0)};i(Kn).ni=function(t,n){var u=new Kn(this.ci_1,this.di_1,this.ei_1,n);return u.fi_1=t,u};function Ec(t,n,u,r){var e=new Kn(t,n,u,r),a=function(s,l){return e.mi(s,l)};return a.$arity=1,a}function Ac(t){return function(n,u){return tu(Ec(u,n,t,null))}}function Fc(t){return function(n,u){return Ar(t.mc_1(n,u))}}function Zl(t,n,u,r,e,a,s,l,c,_,h,v){var m;r===o?m=ec(u):m=r,r=m;var C;a===o?C=ac(e):C=a,a=C;var k;s===o?k=sc(a):k=s,s=k;var A;l===o?A=oc(e,u):A=l,l=A;var F;c===o?F=fc(l):F=c,c=F;var E;_===o?E=_c(e,u):E=_,_=E;var q;h===o?q=hc(_):q=h,h=q;var T;v===o?T=vc(u):T=v,v=T,this.yb_1=t,this.zb_1=n,this.ac_1=u,this.bc_1=r,this.cc_1=e,this.dc_1=a,this.ec_1=s,this.fc_1=l,this.gc_1=c,this.hc_1=_,this.ic_1=h,this.jc_1=v;var O=this;O.kc_1=mc(this);var z=this;z.lc_1=Cc(this);var Q=this;Q.mc_1=Ac(this);var vt=this;vt.nc_1=Fc(this)}function bt(t,n,u){Lt.call(this),this.me_1=t,this.ne_1=n,this.oe_1=u,this.pe_1=Du(this.me_1)}i(bt).oi=function(t,n){return this.ne_1.qi(n.yb_1(t,this.me_1),this.oe_1)};i(bt).sb=function(){return this.pe_1};i(bt).toString=function(){var t,n=this.oe_1;if(n!=null&&typeof n=="string"){var u=34,r=Cr();r.e4(u);for(var e=this.oe_1,a=0;a")}i(Da).qi=function(t,n){var u,r;return t!=null&&typeof t=="number"?r=n!=null?typeof n=="number":!1:r=!1,r?u=t>n:u=!1,u};var ti;function $c(){return ti==null&&new Da,ti}function va(){ni=this,Z.call(this,">=")}i(va).qi=function(t,n){var u,r;return t!=null&&typeof t=="number"?r=n!=null?typeof n=="number":!1:r=!1,r?u=t>=n:u=!1,u};var ni;function Ic(){return ni==null&&new va,ni}function Z(t){ue(),this.pi_1=t}i(Z).toString=function(){return this.pi_1};function Zu(){}function re(t){this.ij_1=t}i(re).z4=function(t,n){return this.ij_1(t,n)};i(re).compare=function(t,n){return this.z4(t,n)};function qc(t,n){var u=-t.le_1.length|0,r=-n.le_1.length|0;return ta(u,r)}function to(){ui=this;var t=this,n=Ji([xc(),Oc(),ma(),Nc(),jc()]),u=qc,r=new re(u);t.jj_1=xi(n,r)}var ui;function pa(){return ui==null&&new to,ui}function ee(){ri=this,Tt.call(this,"+")}i(ee).lj=function(t,n){return n.fc_1(t)};i(ee).mj=function(t,n,u){return n.gc_1(t,u)};var ri;function xc(){return ri==null&&new ee,ri}function ie(){ei=this,Tt.call(this,"-")}i(ie).lj=function(t,n){return n.hc_1(t)};i(ie).mj=function(t,n,u){return n.ic_1(t,u)};var ei;function Oc(){return ei==null&&new ie,ei}function ae(){ii=this,Tt.call(this,">")}i(ae).lj=function(t,n){return n.dc_1(t)};i(ae).mj=function(t,n,u){return n.ec_1(t,u)};var ii;function ma(){return ii==null&&new ae,ii}function se(){ai=this,Tt.call(this,"<")}i(se).lj=function(t,n){return n.ac_1(t)};i(se).mj=function(t,n,u){return n.bc_1(t,u)};var ai;function Nc(){return ai==null&&new se,ai}function le(){si=this,Tt.call(this,"<<")}i(le).lj=function(t,n){return n.jc_1(t)};i(le).mj=function(t,n,u){return Uu(n.jc_1(t),u)};var si;function jc(){return si==null&&new le,si}function Tt(t){pa(),this.le_1=t}i(Tt).toString=function(){return this.le_1};function Jn(t,n,u,r){this.zj_1=t,this.ak_1=n,this.bk_1=u,it.call(this,r)}i(Jn).yf=function(t,n){var u=this.zf(t,n);return u.p6_1=M,u.q6_1=null,u.y6()};i(Jn).l7=function(t,n){return this.yf(t instanceof kt?t:d(),n)};i(Jn).y6=function(){var t=this.p6_1;t:do try{var n=this.n6_1;switch(n){case 0:if(this.o6_1=3,this.dk_1=this.zj_1.ie_1.mj(this.ak_1,this.bk_1,this.zj_1.je_1.gj()),this.dk_1!=null){if(this.n6_1=1,t=this.ck_1.y7(this.dk_1,this),t===xt())return t;continue t}else{this.n6_1=2;continue t}case 1:this.n6_1=2;continue t;case 2:return M;case 3:throw this.q6_1}}catch(r){var u=r;if(this.o6_1===3)throw u;this.n6_1=this.o6_1,this.q6_1=u}while(!0)};i(Jn).zf=function(t,n){var u=new Jn(this.zj_1,this.ak_1,this.bk_1,n);return u.ck_1=t,u};function Tc(t,n,u,r){var e=new Jn(t,n,u,r),a=function(s,l){return e.yf(s,l)};return a.$arity=1,a}function Ca(t){this.ek_1=t}i(Ca).fk=function(t,n){return tu(Tc(this.ek_1,t,n,null))};function Ea(t){this.gk_1=t}i(Ea).fk=function(t,n){return this.gk_1.je_1.hj().hk(this.gk_1.ie_1.lj(t,n))};function an(t,n){t=t===o?ma():t,n=n===o?new At:n,this.ie_1=t,this.je_1=n;var u=this,r;this.je_1.fj()?r=new Ca(this):r=new Ea(this),u.ke_1=r}i(an).toString=function(){var t,n,u;if(b(this.ie_1,ma())){var r=this.je_1;u=r instanceof At}else u=!1;return u?n=this.je_1.ik_1===1:n=!1,n?t=this.je_1.jk_1===0:t=!1,t?"":this.ie_1.toString()+nt(this.je_1)};i(an).hashCode=function(){var t=tt(this.ie_1);return t=ht(t,31)+tt(this.je_1)|0,t};i(an).equals=function(t){if(this===t)return!0;if(!(t instanceof an))return!1;var n=t instanceof an?t:d();return!(!b(this.ie_1,n.ie_1)||!b(this.je_1,n.je_1))};function Fn(t,n){this.ae_1=t,this.be_1=n}i(Fn).toString=function(){var t=this.be_1.toString()+" "+this.ae_1.toString();return nt(O0(Ct(t)?t:d()))};i(Fn).re=function(t,n,u){for(var r=this.ae_1.ke_1.fk(t,n).n();r.o();){var e=r.p();t:{if(e==null)break t;var a=this.be_1.re(e,n,u);if(a!=null)return a}}return null};i(Fn).hashCode=function(){var t=this.ae_1.hashCode();return t=ht(t,31)+this.be_1.hashCode()|0,t};i(Fn).equals=function(t){if(this===t)return!0;if(!(t instanceof Fn))return!1;var n=t instanceof Fn?t:d();return!(!this.ae_1.equals(n.ae_1)||!this.be_1.equals(n.be_1))};function Lt(){}function It(t,n,u){Lt.call(this),this.qk_1=t,this.rk_1=n,this.sk_1=u,this.tk_1=Ss(this.qk_1.sb(),this.sk_1.sb())}i(It).oi=function(t,n){return this.rk_1.vk(t,n,this.qk_1,this.sk_1)};i(It).sb=function(){return this.tk_1};i(It).toString=function(){var t,n,u=this.qk_1;u instanceof It?n=!b(this.qk_1.rk_1,this.rk_1):n=!1,n?t="("+this.qk_1+")":t=nt(this.qk_1);var r=t,e,a,s=this.sk_1;s instanceof It?a=!b(this.sk_1.rk_1,this.rk_1):a=!1,a?e="("+this.sk_1+")":e=nt(this.sk_1);var l=e;return r+" "+this.rk_1+" "+l};i(It).hashCode=function(){var t=tt(this.qk_1);return t=ht(t,31)+tt(this.rk_1)|0,t=ht(t,31)+tt(this.sk_1)|0,t};i(It).equals=function(t){if(this===t)return!0;if(!(t instanceof It))return!1;var n=t instanceof It?t:d();return!(!b(this.qk_1,n.qk_1)||!b(this.rk_1,n.rk_1)||!b(this.sk_1,n.sk_1))};function oe(t){this.wk_1=t}i(oe).z4=function(t,n){return this.wk_1(t,n)};i(oe).compare=function(t,n){return this.z4(t,n)};function Pc(t,n){var u=-t.uk_1.length|0,r=-n.uk_1.length|0;return ta(u,r)}function no(){li=this;var t=this,n=Ji([fi(),Mc()]),u=Pc,r=new oe(u);t.xk_1=xi(n,r)}var li;function uo(){return li==null&&new no,li}function Aa(){oi=this,ru.call(this,"&&")}i(Aa).vk=function(t,n,u,r){return u.oi(t,n)?r.oi(t,n):!1};var oi;function fi(){return oi==null&&new Aa,oi}function fe(){ci=this,ru.call(this,"||")}i(fe).vk=function(t,n,u,r){return u.oi(t,n)?!0:r.oi(t,n)};var ci;function Mc(){return ci==null&&new fe,ci}function ru(t){uo(),this.uk_1=t}i(ru).toString=function(){return this.uk_1};function Lc(t){return function(n,u){return(n-t.nk_1|0)%t.ik_1|0?!1:((n-t.nk_1|0)/t.ik_1|0)>0}}function Fa(t){this.al_1=t}i(Fa).hk=function(t){var n;this.al_1.ik_1>0?n=t:n=z1(t,this.al_1.ok_1);var u=n;return L1(u,Lc(this.al_1))};function At(t,n){t=t===o?0:t,n=n===o?1:n,Zu.call(this),this.ik_1=t,this.jk_1=n;var u=this,r;if(this.ik_1<0){var e;if(this.jk_1<0)e=Mt();else if(this.jk_1>0){var a;if(this.jk_1<=(-this.ik_1|0))a=Mt();else{for(var s=at(),l=1;(ht(this.ik_1,l)+this.jk_1|0)>0;)s.k(ht(this.ik_1,l)+this.jk_1|0),l=l+1|0;a=q1(s)}e=a}else e=Mt();r=e}else if(this.ik_1>0)r=Mt();else{var c;this.jk_1<0?c=Mt():this.jk_1>0?c=Du(this.jk_1):c=Mt(),r=c}u.kk_1=r,this.lk_1=this.kk_1.i()===1;var _=this,h=su(this.kk_1);_.mk_1=(h??1)-1|0,this.nk_1=this.jk_1-1|0,this.ok_1=this.ik_1+this.jk_1|0;var v=this;v.pk_1=new Fa(this)}i(At).toString=function(){if(this.ik_1===0&&this.jk_1===0)return"0";if(this.ik_1===1&&this.jk_1===1)return"(n+1)";if(this.jk_1===0){if(this.ik_1===1)return"n";var t;return this.ik_1>0?t=""+this.ik_1+"n":t="("+this.ik_1+"n)",t}if(this.ik_1===0){if(this.jk_1===1)return"";var n;return this.jk_1>0?n=this.jk_1.toString():n="("+this.jk_1+")",n}var u=this.jk_1>=0?"+":"";return"("+this.ik_1+"n"+u+this.jk_1+")"};i(At).fj=function(){return this.lk_1};i(At).gj=function(){return this.mk_1};i(At).hj=function(){return this.pk_1};i(At).hashCode=function(){var t=this.ik_1;return t=ht(t,31)+this.jk_1|0,t};i(At).equals=function(t){if(this===t)return!0;if(!(t instanceof At))return!1;var n=t instanceof At?t:d();return!(this.ik_1!==n.ik_1||this.jk_1!==n.jk_1)};function zc(t){return"["+t+"]"}function da(){}i(da).fk=function(t,n){return!0};function wa(t){this.bl_1=t}i(wa).fk=function(t,n){var u=n.zb_1(t),r;if(u==null)return!1;r=u;var e=r;return U(e)===this.bl_1.de_1.length?A1(e,this.bl_1.de_1):U(e)>this.bl_1.de_1.length&&w(e,(U(e)-this.bl_1.de_1.length|0)-1|0)===46?ua(e,this.bl_1.de_1):!1};function dn(t,n,u){this.ce_1=t,this.de_1=n,this.ee_1=u,this.fe_1=F1(this.de_1)?!0:this.de_1==="*";for(var r=this,e=this.fe_1?Du("name"):Mt(),a=this.ee_1,s=vu(Or(a,10)),l=a.n();l.o();){var c=l.p(),_=c.sb();s.k(_)}r.ge_1=Ss(e,C0(s));var h=this,v;this.fe_1?v=new da:v=new wa(this),h.he_1=v}i(dn).toString=function(){var t=this.ce_1?"@":"",n=t+this.de_1;return n+Wt(this.ee_1,"",o,o,o,o,zc)};i(dn).oi=function(t,n){var u;if(this.he_1.fk(t,n)){var r;t:{var e=this.ee_1,a;if(I(e,W)?a=e.s():a=!1,a){r=!0;break t}for(var s=e.n();s.o();){var l=s.p();if(!l.oi(t,n)){r=!1;break t}}r=!0}u=r}else u=!1;return u};i(dn).hashCode=function(){var t=Hs(this.ce_1);return t=ht(t,31)+cu(this.de_1)|0,t=ht(t,31)+tt(this.ee_1)|0,t};i(dn).equals=function(t){if(this===t)return!0;if(!(t instanceof dn))return!1;var n=t instanceof dn?t:d();return!(this.ce_1!==n.ce_1||this.de_1!==n.de_1||!b(this.ee_1,n.ee_1))};function sn(t,n){n=n===o?null:n,this.yd_1=t,this.zd_1=n}i(sn).toString=function(){var t;return this.zd_1!=null?t=this.zd_1.toString()+" ":t="",t+this.yd_1.toString()};i(sn).re=function(t,n,u){if(!this.yd_1.oi(t,n))return null;if(u.k(t),this.zd_1==null)return u;var r=this.zd_1.re(t,n,u);return r==null&&dl(u),r};i(sn).hashCode=function(){var t=this.yd_1.hashCode();return t=ht(t,31)+(this.zd_1==null?0:this.zd_1.hashCode())|0,t};i(sn).equals=function(t){if(this===t)return!0;if(!(t instanceof sn))return!1;var n=t instanceof sn?t:d();return!(!this.yd_1.equals(n.yd_1)||!b(this.zd_1,n.zd_1))};function ga(t){this.cl_1=t}i(ga).hk=function(t){return c_(t,this.cl_1.gl_1)};function Vt(t){Zu.call(this),this.dl_1=t,this.el_1=this.dl_1.i()===1;var n=this,u=su(this.dl_1);n.fl_1=(u??1)-1|0;for(var r=this,e=this.dl_1,a=vu(Or(e,10)),s=e.n();s.o();){var l=s.p(),c=l-1|0;a.k(c)}r.gl_1=a;var _=this;_.hl_1=new ga(this)}i(Vt).fj=function(){return this.el_1};i(Vt).gj=function(){return this.fl_1};i(Vt).hj=function(){return this.hl_1};i(Vt).toString=function(){if(this.dl_1.i()===1){var t;return fu(this.dl_1)===1?t="":t=fu(this.dl_1).toString(),t}return"("+Wt(this.dl_1,",")+")"};i(Vt).hashCode=function(){return tt(this.dl_1)};i(Vt).equals=function(t){if(this===t)return!0;if(!(t instanceof Vt))return!1;var n=t instanceof Vt?t:d();return!!b(this.dl_1,n.dl_1)};function K(t,n){t=t===o?"":t,this.il_1=t,this.jl_1=n}i(K).kl=function(t,n){return this.jl_1(t,n,this.il_1)};i(K).toString=function(){return"Parser(prefix="+this.il_1+", temp="+this.jl_1+")"};i(K).hashCode=function(){var t=cu(this.il_1);return t=ht(t,31)+tt(this.jl_1)|0,t};i(K).equals=function(t){if(this===t)return!0;if(!(t instanceof K))return!1;var n=t instanceof K?t:d();return!(this.il_1!==n.il_1||!b(this.jl_1,n.jl_1))};function R(t,n){n=n===o?0:n,this.ll_1=t,this.ml_1=n}i(R).toString=function(){return"ParserResult(data="+this.ll_1+", length="+this.ml_1+")"};i(R).hashCode=function(){var t=this.ll_1==null?0:tt(this.ll_1);return t=ht(t,31)+this.ml_1|0,t};i(R).equals=function(t){if(this===t)return!0;if(!(t instanceof R))return!1;var n=t instanceof R?t:d();return!(!b(this.ll_1,n.ll_1)||this.ml_1!==n.ml_1)};function Rc(t,n,u){for(var r=n,e="";r0&&B.assert(t,r,"+-");var a=y().fd_1.kl(t,r);e.k(a),r=r+a.ml_1|0,r=r+y().ad_1.kl(t,r).ml_1|0,r>=t.length&&B.assert(t,r,")")}r=r+1|0}else{var s=y().fd_1.kl(t,r);e.k(s),r=r+s.ml_1|0}for(var l=ds(),c=e.n();c.o();){var _=c.p(),h=_.ll_1,v=h.bb(),m=h.cb(),C=l.w1(v),k=(C??0)+m|0;l.r1(v,k)}for(var A=r1(l.i()),F=l.x1().n();F.o();){var E=F.p();E.h4()>1&&B.throwError(t,n,"power must be 0 or 1");var q=E.i4();A.r1(M,q)}var T=l.w1(1),O=T??0,z=l.w1(0),Q=new At(O,z??0),vt;if(Q.ik_1<=0&&Q.kk_1.s())vt=!0;else{var pt;Q.kk_1.s()?pt=!1:pt=fu(Q.kk_1)<=0,vt=pt}return vt&&B.throwError(t,n,"valid polynomialExpression"),new R(Q,r-n|0)}function Xc(t,n,u){var r=n;B.assert(t,r,"("),r=r+1|0;for(var e=at();r"+Pn(e)),r=r+a.ml_1|0,e.k(a.ll_1),r=r+y().ad_1.kl(t,r).ml_1|0;var s=Fr(t,r);b(s==null?null:new ft(s),new ft(44))&&(r=r+1|0,r=r+y().ad_1.kl(t,r).ml_1|0,B.assert(t,r,y().ed_1.il_1+")"))}return B.assert(t,r,")"),r=r+1|0,new R(new Vt(e),r-n|0)}function Gc(t,n,u){var r=n,e;if(y().id_1.u4(Rs(t,n,t.length))){var a=y().hd_1.kl(t,r);r=r+a.ml_1|0,e=new R(a.ll_1,r-n|0)}else{var s=y().gd_1.kl(t,n);r=r+s.ml_1|0,e=new R(s.ll_1,r-n|0)}return e}function Yc(t,n,u){var r=n,e=y().dd_1.kl(t,r);r=r+e.ml_1|0;var a=null;r=t.length&&B.throwError(t,r,"any char");var a="";t:for(;w(t,r)!==e;){if(r>=(t.length-1|0)){B.assert(t,r,V(e));break t}var s=w(t,r),l=mt(s);if(0<=l&&l<=31&&B.throwError(t,r,"0-1f escape char"),w(t,r)===92){r=r+1|0,B.assert(t,r);var c=a,_=w(t,r),h;if(_===92)h=92;else if(_===39)h=39;else if(_===34)h=34;else if(_===96)h=96;else if(_===110)h=10;else if(_===114)h=13;else if(_===116)h=9;else if(_===98)h=8;else if(_===120){var v=0;if(v<2)do v=v+1|0,r=r+1|0,B.assert(t,r,"0123456789abcdefABCDEF");while(v<2);var m=(r-2|0)+1|0,C=r+1|0,k=t.substring(m,C);h=Tu(xa(k,16))}else if(_===117){var A=0;if(A<4)do A=A+1|0,r=r+1|0,B.assert(t,r,"0123456789abcdefABCDEF");while(A<4);var F=(r-4|0)+1|0,E=r+1|0,q=t.substring(F,E);h=Tu(xa(q,16))}else B.throwError(t,r,"escape char");a=c+V(h)}else a=a+V(w(t,r));r=r+1|0}return r=r+1|0,new R(a,r-n|0)}function u_(t,n,u){var r=n;B.assert(t,r,u);var e=V(w(t,r));for(r=r+1|0;r=t.length)break t;var s;if(wt(y().kd_1.il_1,w(t,r))){var l=y().kd_1.kl(t,r);r=r+l.ml_1|0,r=r+y().bd_1.kl(t,r).ml_1|0,s=l.ll_1}else s=new an(o,new At(1,0));var c=s,_=y().ud_1.kl(t,r);r=r+_.ml_1|0,a.k(Va(c,_.ll_1))}return new R(Va(e.ll_1,a),r-n|0)}function o_(t,n,u){return n!==t.length&&B.throwError(t,n,"EOF"),new R(M,0)}function f_(t){var n=0;n=n+y().ad_1.kl(t,n).ml_1|0;var u=y().vd_1.kl(t,n);n=n+u.ml_1|0,n=n+y().ad_1.kl(t,n).ml_1|0,n=n+y().wd_1.kl(t,n).ml_1|0;var r=u.ll_1,e=at(),a=at();e.k(r.za_1);for(var s=r.ab_1.n();s.o();){var l=s.p();e.k(l.ab_1),a.k(l.za_1)}for(var c=Fl([new sn(fu(e))]),_=0,h=a.n();h.o();){var v=h.p(),m=_;_=m+1|0;var C=Ci(m),k=new Fn(v,Pn(c)),A=new sn(e.w(C+1|0),k);c.k(A)}return new nn(Pn(c))}function ya(){_i=this;var t=this;t.ad_1=new K(` \r `,Rc);var n=this;n.bd_1=new K(` \r `,Uc);var u=this;u.cd_1=new K("*1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_",Hc);var r=this,e=pa().jj_1,a=Wt(e,"",o,o,o,o,Wc);r.dd_1=new K(a,Kc);var s=this;s.ed_1=new K("1234567890",Jc);var l=this;l.fd_1=new K("+-1234567890n",Vc);var c=this;c.gd_1=new K("(0123456789n",Zc);var _=this;_.hd_1=new K(o,Xc),this.id_1=p1("^\\(\\s*\\d+,.*$");var h=this;h.jd_1=new K(this.gd_1.il_1,Gc);var v=this;v.kd_1=new K(this.dd_1.il_1,Yc);var m=this,C=ue().si_1,k=Wt(C,"",o,o,o,o,Qc);m.ld_1=new K(k,t_);var A=this;A.md_1=new K("`'\"",n_),this.nd_1="_"+Wt(pe(97,122),"")+Wt(pe(65,90),""),this.od_1=this.nd_1+V(46)+Wt(pe(48,57),"");var F=this;F.pd_1=new K(this.nd_1,u_);var E=this,q="tfn"+this.md_1.il_1+this.ed_1.il_1;E.qd_1=new K(q,r_);var T=this;T.rd_1=new K(o,e_);var O=this;O.sd_1=new K(o,i_);var z=this;z.td_1=new K("[",a_);var Q=this;Q.ud_1=new K(o,s_);var vt=this;vt.vd_1=new K(o,l_);var pt=this;pt.wd_1=new K(o,o_);var L=this;L.xd_1=f_}i(ya).nl=function(t,n){var u=n;u=u+this.ad_1.kl(t,u).ml_1|0;for(var r=at();u=l&&wt(this.ad_1.il_1,w(t,(u-1|0)-l|0));)l=l+1|0;B.throwError(t,(u-l|0)-a.ml_1|0,"LogicalOperator")}}u=u+1|0;var c=this.nl(t,u);u=u+c.ml_1|0,r.k(c),B.assert(t,u,")"),u=u+1|0}else if(wt("|&",e)){var _=this.sd_1.kl(t,u);u=u+_.ml_1|0,r.k(_),u=u+this.ad_1.kl(t,u).ml_1|0,B.assert(t,u,"("+this.pd_1.il_1)}else{var h=this.rd_1.kl(t,u);u=u+h.ml_1|0,r.k(h)}u=u+this.ad_1.kl(t,u).ml_1|0}if(r.s()&&B.throwError(t,u-n|0,"Expression"),r.i()===1){var v=fu(r).ll_1;return new R(v instanceof Lt?v:d(),u-n|0)}for(var m=vu(Or(r,10)),C=r.n();C.o();){var k=C.p(),A=k.ll_1;m.k(A)}for(var F=Ii(m),E=0;E1;){var pt=F.w(0),L=pt instanceof Lt?pt:d(),X=F.w(1),yt=X instanceof fe?X:d(),eu=F.w(2);F.j(1,new It(L,yt,eu instanceof Lt?eu:d())),F.z(0),F.z(1)}var iu=fu(F);return new R(iu instanceof Lt?iu:d(),u-n|0)};var _i;function y(){return _i==null&&new ya,_i}function Xu(t){this.sl_1=t,this.ol_1=t.tl_1.n(),this.pl_1=0,this.ql_1=0,this.rl_1=null}i(Xu).vl=function(){if(this.pl_1>Pn(this.sl_1.ul_1))return null;for(;this.ol_1.o();){var t=this.ol_1.p();if(this.sl_1.ul_1.w(this.ql_1)===this.pl_1)return this.ql_1=this.ql_1+1|0,this.pl_1=this.pl_1+1|0,t;this.pl_1=this.pl_1+1|0}return null};i(Xu).p=function(){var t=this.rl_1;this.rl_1=null;var n=t??this.vl(),u;if(n==null)throw Dt();return u=n,u};i(Xu).o=function(){var t=this,n=this.rl_1;return t.rl_1=n??this.vl(),this.rl_1!=null};function ba(t,n){this.tl_1=t,this.ul_1=n}i(ba).n=function(){return new Xu(this)};function c_(t,n){return new ba(t,n)}Vl=new Qr;B=new ku;ra=new te;hf(gt,"Companion",U0);const de=new uu((t,n)=>{var e;const[u,r]=n.split(".");return r?(e=t.attr[u])==null?void 0:e[r]:t.attr[u]},t=>t.attr.name,t=>t.children,t=>t.parent),W_=t=>{const n=gt.Companion.parse(t);return{tracks:n.tracks,trackIndex:n.trackIndex,connectKeys:n.connectKeys,toString:()=>n.toString(),match:r=>n.match(r,de)??void 0,querySelectorAll:r=>de.querySelectorAll(r,n),querySelectorTrackAll:r=>de.querySelectorTrackAll(r,n)}},K_=t=>gt.Companion.parseOrNull(t)!=null;var __=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,h_=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\u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-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,D_=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\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\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]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D869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,we={Space_Separator:__,ID_Start:h_,ID_Continue:D_},et={isSpaceSeparator(t){return typeof t=="string"&&we.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||we.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="‌"||t==="‍"||we.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let hi,Et,rn,or,bn,Rt,lt,Ba,xu;var v_=function(n,u){hi=String(n),Et="start",rn=[],or=0,bn=1,Rt=0,lt=void 0,Ba=void 0,xu=void 0;do lt=p_(),E_[Et]();while(lt.type!=="eof");return typeof u=="function"?Di({"":xu},"",u):xu};function Di(t,n,u){const r=t[n];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let e=0;ew_.call(t)==="[object Object]",cr=()=>{};function so(t,n){function u(...r){return new Promise((e,a)=>{Promise.resolve(t(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})).then(e).catch(a)})}return u}const lo=t=>t();function y_(t,n={}){let u,r,e=cr;const a=l=>{clearTimeout(l),e(),e=cr};return l=>{const c=_u(t),_=_u(n.maxWait);return u&&a(u),c<=0||_!==void 0&&_<=0?(r&&(a(r),r=null),Promise.resolve(l())):new Promise((h,v)=>{e=n.rejectOnCancel?v:h,_&&!r&&(r=setTimeout(()=>{u&&a(u),r=null,h(l())},_)),u=setTimeout(()=>{r&&a(r),r=null,h(l())},c)})}}function b_(t=lo){const n=hr(!0);function u(){n.value=!1}function r(){n.value=!0}const e=(...a)=>{n.value&&t(...a)};return{isActive:Ya(n),pause:u,resume:r,eventFilter:e}}function oo(t){return t||ns()}function B_(...t){if(t.length!==1)return ho(...t);const n=t[0];return typeof n=="function"?Ya(Do(()=>({get:n,set:cr}))):hr(n)}function V_(t,n=200,u={}){return so(y_(n,u),t)}function k_(t,n,u={}){const{eventFilter:r=lo,...e}=u;return Dr(t,so(r,n),e)}function S_(t,n,u={}){const{eventFilter:r,...e}=u,{eventFilter:a,pause:s,resume:l,isActive:c}=b_(r);return{stop:k_(t,n,{...e,eventFilter:a}),pause:s,resume:l,isActive:c}}function $_(t,n){oo(n)&&vo(t,n)}function I_(t,n=!0,u){oo()?Qa(t,u):n?t():ts(t)}function fo(t){var n;const u=_u(t);return(n=u==null?void 0:u.$el)!=null?n:u}const _r=ao?window:void 0,q_=ao?window.document:void 0;function Xa(...t){let n,u,r,e;if(typeof t[0]=="string"||Array.isArray(t[0])?([u,r,e]=t,n=_r):[n,u,r,e]=t,!n)return cr;Array.isArray(u)||(u=[u]),Array.isArray(r)||(r=[r]);const a=[],s=()=>{a.forEach(h=>h()),a.length=0},l=(h,v,m,C)=>(h.addEventListener(v,m,C),()=>h.removeEventListener(v,m,C)),c=Dr(()=>[fo(n),_u(e)],([h,v])=>{if(s(),!h)return;const m=g_(v)?{...v}:v;a.push(...u.flatMap(C=>r.map(k=>l(h,C,k,m))))},{immediate:!0,flush:"post"}),_=()=>{c(),s()};return io(_),_}function x_(){const t=hr(!1);return ns()&&Qa(()=>{t.value=!0}),t}function O_(t){const n=x_();return Eo(()=>(n.value,!!t()))}const tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nr="__vueuse_ssr_handlers__",N_=j_();function j_(){return nr in tr||(tr[nr]=tr[nr]||{}),tr[nr]}function T_(t,n){return N_[t]||n}function P_(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const M_={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Ga="vueuse-storage";function Z_(t,n,u,r={}){var e;const{flush:a="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:_=!1,shallow:h,window:v=_r,eventFilter:m,onError:C=L=>{console.error(L)},initOnMounted:k}=r,A=(h?Co:hr)(typeof n=="function"?n():n);if(!u)try{u=T_("getDefaultStorage",()=>{var L;return(L=_r)==null?void 0:L.localStorage})()}catch(L){C(L)}if(!u)return A;const F=_u(n),E=P_(F),q=(e=r.serializer)!=null?e:M_[E],{pause:T,resume:O}=S_(A,()=>z(A.value),{flush:a,deep:s,eventFilter:m});return v&&l&&I_(()=>{Xa(v,"storage",pt),Xa(v,Ga,vt),k&&pt()}),k||pt(),A;function z(L){try{if(L==null)u.removeItem(t);else{const X=q.write(L),yt=u.getItem(t);yt!==X&&(u.setItem(t,X),v&&v.dispatchEvent(new CustomEvent(Ga,{detail:{key:t,oldValue:yt,newValue:X,storageArea:u}})))}}catch(X){C(X)}}function Q(L){const X=L?L.newValue:u.getItem(t);if(X==null)return c&&F!=null&&u.setItem(t,q.write(F)),F;if(!L&&_){const yt=q.read(X);return typeof _=="function"?_(yt,F):E==="object"&&!Array.isArray(yt)?{...F,...yt}:yt}else return typeof X!="string"?X:q.read(X)}function vt(L){pt(L.detail)}function pt(L){if(!(L&&L.storageArea!==u)){if(L&&L.key==null){A.value=F;return}if(!(L&&L.key!==t)){T();try{(L==null?void 0:L.newValue)!==q.write(A.value)&&(A.value=Q(L))}catch(X){C(X)}finally{L?ts(O):O()}}}}}function L_(t,n,u={}){const{window:r=_r,...e}=u;let a;const s=O_(()=>r&&"MutationObserver"in r),l=()=>{a&&(a.disconnect(),a=void 0)},c=Dr(()=>fo(t),v=>{l(),s.value&&r&&v&&(a=new MutationObserver(n),a.observe(v,e))},{immediate:!0}),_=()=>a==null?void 0:a.takeRecords(),h=()=>{l(),c()};return io(h),{isSupported:s,stop:h,takeRecords:_}}function X_(t=null,n={}){var u,r,e;const{document:a=q_,restoreOnUnmount:s=v=>v}=n,l=(u=a==null?void 0:a.title)!=null?u:"",c=B_((r=t??(a==null?void 0:a.title))!=null?r:null),_=t&&typeof t=="function";function h(v){if(!("titleTemplate"in n))return v;const m=n.titleTemplate||"%s";return typeof m=="function"?m(v):_u(m).replace(/%s/g,v)}return Dr(c,(v,m)=>{v!==m&&a&&(a.title=h(typeof v=="string"?v:""))},{immediate:!0}),n.observe&&!n.titleTemplate&&a&&!_&&L_((e=a.head)==null?void 0:e.querySelector("title"),()=>{a&&a.title!==c.value&&(c.value=h(a.title))},{childList:!0}),$_(()=>{if(s){const v=s(l,c.value||"");v!=null&&a&&(a.title=v)}}),c}export{U_ as a,Z_ as b,V_ as c,K_ as d,H_ as e,J_ as l,W_ as p,X_ as u}; -//# sourceMappingURL=index-AzMi55Pv.js.map +//# sourceMappingURL=index-Lw3EAuUv.js.map diff --git a/assets/index-AzMi55Pv.js.map b/assets/index-Lw3EAuUv.js.map similarity index 99% rename from assets/index-AzMi55Pv.js.map rename to assets/index-Lw3EAuUv.js.map index b53651b..46a3864 100644 --- a/assets/index-AzMi55Pv.js.map +++ b/assets/index-Lw3EAuUv.js.map @@ -1 +1 @@ -{"version":3,"file":"index-AzMi55Pv.js","sources":["../../src/utils/error.ts","../../node_modules/.pnpm/@gkd-kit+selector@0.0.18/node_modules/@gkd-kit/selector/kotlin/kotlin-kotlin-stdlib.mjs","../../node_modules/.pnpm/@gkd-kit+selector@0.0.18/node_modules/@gkd-kit/selector/kotlin/gkd-selector.mjs","../../src/utils/selector.ts","../../node_modules/.pnpm/json5@2.2.3/node_modules/json5/dist/index.mjs","../../node_modules/.pnpm/@vueuse+shared@10.7.2_vue@3.4.14/node_modules/@vueuse/shared/index.mjs","../../node_modules/.pnpm/@vueuse+core@10.7.2_vue@3.4.14/node_modules/@vueuse/core/index.mjs"],"sourcesContent":["import { message } from '@/utils/discrete';\n\nexport const errorWrap = (\n getter: () => T,\n catchHandler?: ((e: unknown) => unknown) | string,\n finallyHandler?: () => void,\n) => {\n try {\n return getter();\n } catch (e) {\n if (typeof catchHandler == 'string') {\n message.error(catchHandler);\n } else {\n const error = catchHandler?.(e) ?? e;\n if (typeof error == 'string') {\n message.error(error);\n } else if (error instanceof Error) {\n message.error(error.message);\n }\n }\n throw e;\n } finally {\n finallyHandler?.();\n }\n};\n\nexport const errorTry = any>(fn: T) => {\n return (...args: Parameters) => {\n try {\n fn(...args);\n } catch (e) {\n console.error(e);\n }\n };\n};\n","//region block: polyfills\nif (typeof ArrayBuffer.isView === 'undefined') {\n ArrayBuffer.isView = function (a) {\n return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__;\n };\n}\nif (typeof Array.prototype.fill === 'undefined') {\n // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill\n Object.defineProperty(Array.prototype, 'fill', {value: function (value) {\n // Steps 1-2.\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n var O = Object(this); // Steps 3-5.\n var len = O.length >>> 0; // Steps 6-7.\n var start = arguments[1];\n var relativeStart = start >> 0; // Step 8.\n var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10.\n var end = arguments[2];\n var relativeEnd = end === undefined ? len : end >> 0; // Step 11.\n var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12.\n while (k < finalValue) {\n O[k] = value;\n k++;\n }\n ; // Step 13.\n return O;\n }});\n}\n[Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) {\n if (typeof TypedArray.prototype.fill === 'undefined') {\n Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});\n }\n});\nif (typeof Math.clz32 === 'undefined') {\n Math.clz32 = function (log, LN2) {\n return function (x) {\n var asUint = x >>> 0;\n if (asUint === 0) {\n return 32;\n }\n return 31 - (log(asUint) / LN2 | 0) | 0; // the \"| 0\" acts like math.floor\n };\n }(Math.log, Math.LN2);\n}\nif (typeof String.prototype.endsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {\n var subjectString = this.toString();\n if (position === undefined || position > subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n }});\n}\nif (typeof String.prototype.startsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {\n position = position || 0;\n return this.lastIndexOf(searchString, position) === position;\n }});\n}\nif (typeof Math.imul === 'undefined') {\n Math.imul = function imul(a, b) {\n return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0;\n };\n}\n//endregion\n//region block: imports\nvar clz32 = Math.clz32;\nvar imul_0 = Math.imul;\nvar isView = ArrayBuffer.isView;\n//endregion\n//region block: pre-declaration\nsetMetadataFor(CharSequence, 'CharSequence', interfaceMeta);\nsetMetadataFor(Comparable, 'Comparable', interfaceMeta);\nsetMetadataFor(Number_0, 'Number', classMeta);\nsetMetadataFor(Unit, 'Unit', objectMeta);\nsetMetadataFor(IntCompanionObject, 'IntCompanionObject', objectMeta);\nsetMetadataFor(Comparator, 'Comparator', interfaceMeta);\nsetMetadataFor(Collection, 'Collection', interfaceMeta);\nsetMetadataFor(AbstractCollection, 'AbstractCollection', classMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableCollection, 'AbstractMutableCollection', classMeta, AbstractCollection, [AbstractCollection, Collection]);\nsetMetadataFor(IteratorImpl, 'IteratorImpl', classMeta);\nsetMetadataFor(ListIteratorImpl, 'ListIteratorImpl', classMeta, IteratorImpl);\nsetMetadataFor(List, 'List', interfaceMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableList, 'AbstractMutableList', classMeta, AbstractMutableCollection, [AbstractMutableCollection, Collection, List]);\nsetMetadataFor(Map_0, 'Map', interfaceMeta);\nsetMetadataFor(AbstractMap, 'AbstractMap', classMeta, VOID, [Map_0]);\nsetMetadataFor(AbstractMutableMap, 'AbstractMutableMap', classMeta, AbstractMap, [AbstractMap, Map_0]);\nsetMetadataFor(Set, 'Set', interfaceMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableSet, 'AbstractMutableSet', classMeta, AbstractMutableCollection, [AbstractMutableCollection, Set, Collection]);\nsetMetadataFor(Companion, 'Companion', objectMeta);\nsetMetadataFor(ArrayList, 'ArrayList', classMeta, AbstractMutableList, [AbstractMutableList, Collection, List], ArrayList_init_$Create$);\nsetMetadataFor(HashMap, 'HashMap', classMeta, AbstractMutableMap, [AbstractMutableMap, Map_0], HashMap_init_$Create$);\nsetMetadataFor(HashMapEntrySetBase, 'HashMapEntrySetBase', classMeta, AbstractMutableSet, [Set, Collection, AbstractMutableSet]);\nsetMetadataFor(HashMapEntrySet, 'HashMapEntrySet', classMeta, HashMapEntrySetBase);\nsetMetadataFor(HashSet, 'HashSet', classMeta, AbstractMutableSet, [AbstractMutableSet, Set, Collection], HashSet_init_$Create$);\nsetMetadataFor(Companion_0, 'Companion', objectMeta);\nsetMetadataFor(Itr, 'Itr', classMeta);\nsetMetadataFor(KeysItr, 'KeysItr', classMeta, Itr);\nsetMetadataFor(EntriesItr, 'EntriesItr', classMeta, Itr);\nsetMetadataFor(Entry, 'Entry', interfaceMeta);\nsetMetadataFor(EntryRef, 'EntryRef', classMeta, VOID, [Entry]);\nfunction containsAllEntries(m) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(m, Collection)) {\n tmp = m.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = m.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.InternalMap.containsAllEntries.' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var entry = element;\n var tmp_0;\n if (!(entry == null) ? isInterface(entry, Entry) : false) {\n tmp_0 = this.j4(entry);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n}\nsetMetadataFor(InternalMap, 'InternalMap', interfaceMeta);\nsetMetadataFor(InternalHashMap, 'InternalHashMap', classMeta, VOID, [InternalMap], InternalHashMap_init_$Create$);\nsetMetadataFor(LinkedHashMap, 'LinkedHashMap', classMeta, HashMap, [HashMap, Map_0], LinkedHashMap_init_$Create$);\nsetMetadataFor(LinkedHashSet, 'LinkedHashSet', classMeta, HashSet, [HashSet, Set, Collection], LinkedHashSet_init_$Create$);\nsetMetadataFor(KProperty1, 'KProperty1', interfaceMeta);\nsetMetadataFor(StringBuilder, 'StringBuilder', classMeta, VOID, [CharSequence], StringBuilder_init_$Create$_0);\nsetMetadataFor(Companion_1, 'Companion', objectMeta);\nsetMetadataFor(Regex, 'Regex', classMeta);\nsetMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(_no_name_provided__qut3iv, VOID, classMeta);\nsetMetadataFor(Companion_2, 'Companion', objectMeta);\nsetMetadataFor(Char, 'Char', classMeta, VOID, [Comparable]);\nsetMetadataFor(Companion_3, 'Companion', objectMeta);\nsetMetadataFor(Enum, 'Enum', classMeta, VOID, [Comparable]);\nsetMetadataFor(arrayIterator$1, VOID, classMeta);\nsetMetadataFor(Companion_4, 'Companion', objectMeta);\nsetMetadataFor(Long, 'Long', classMeta, Number_0, [Number_0, Comparable]);\nsetMetadataFor(Digit, 'Digit', objectMeta);\nsetMetadataFor(Continuation, 'Continuation', interfaceMeta);\nsetMetadataFor(CoroutineImpl, 'CoroutineImpl', classMeta, VOID, [Continuation]);\nsetMetadataFor(CompletedContinuation, 'CompletedContinuation', objectMeta, VOID, [Continuation]);\nsetMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, CoroutineImpl);\nsetMetadataFor(Exception, 'Exception', classMeta, Error, VOID, Exception_init_$Create$);\nsetMetadataFor(RuntimeException, 'RuntimeException', classMeta, Exception, VOID, RuntimeException_init_$Create$);\nsetMetadataFor(IllegalArgumentException, 'IllegalArgumentException', classMeta, RuntimeException, VOID, IllegalArgumentException_init_$Create$);\nsetMetadataFor(IndexOutOfBoundsException, 'IndexOutOfBoundsException', classMeta, RuntimeException, VOID, IndexOutOfBoundsException_init_$Create$);\nsetMetadataFor(IllegalStateException, 'IllegalStateException', classMeta, RuntimeException, VOID, IllegalStateException_init_$Create$);\nsetMetadataFor(UnsupportedOperationException, 'UnsupportedOperationException', classMeta, RuntimeException, VOID, UnsupportedOperationException_init_$Create$);\nsetMetadataFor(NoSuchElementException, 'NoSuchElementException', classMeta, RuntimeException, VOID, NoSuchElementException_init_$Create$);\nsetMetadataFor(Error_0, 'Error', classMeta, Error, VOID, Error_init_$Create$);\nsetMetadataFor(NumberFormatException, 'NumberFormatException', classMeta, IllegalArgumentException, VOID, NumberFormatException_init_$Create$);\nsetMetadataFor(ArithmeticException, 'ArithmeticException', classMeta, RuntimeException, VOID, ArithmeticException_init_$Create$);\nsetMetadataFor(ConcurrentModificationException, 'ConcurrentModificationException', classMeta, RuntimeException, VOID, ConcurrentModificationException_init_$Create$);\nsetMetadataFor(NullPointerException, 'NullPointerException', classMeta, RuntimeException, VOID, NullPointerException_init_$Create$);\nsetMetadataFor(ClassCastException, 'ClassCastException', classMeta, RuntimeException, VOID, ClassCastException_init_$Create$);\nsetMetadataFor(Companion_5, 'Companion', objectMeta);\nsetMetadataFor(Companion_6, 'Companion', objectMeta);\nsetMetadataFor(Companion_7, 'Companion', objectMeta);\nsetMetadataFor(EmptyIterator, 'EmptyIterator', objectMeta);\nsetMetadataFor(ArrayAsCollection, 'ArrayAsCollection', classMeta, VOID, [Collection]);\nsetMetadataFor(EmptyList, 'EmptyList', objectMeta, VOID, [List]);\nsetMetadataFor(IndexedValue, 'IndexedValue', classMeta);\nsetMetadataFor(IntIterator, 'IntIterator', classMeta);\nsetMetadataFor(CharIterator, 'CharIterator', classMeta);\nsetMetadataFor(SequenceScope, 'SequenceScope', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(SequenceBuilderIterator, 'SequenceBuilderIterator', classMeta, SequenceScope, [SequenceScope, Continuation], SequenceBuilderIterator, VOID, VOID, [1]);\nsetMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta);\nsetMetadataFor(TransformingSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TransformingSequence, 'TransformingSequence', classMeta);\nsetMetadataFor(TakeWhileSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TakeWhileSequence, 'TakeWhileSequence', classMeta);\nsetMetadataFor(DropTakeSequence, 'DropTakeSequence', interfaceMeta);\nsetMetadataFor(DropSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(DropSequence, 'DropSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(DropWhileSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(DropWhileSequence, 'DropWhileSequence', classMeta);\nsetMetadataFor(FilteringSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(FilteringSequence, 'FilteringSequence', classMeta);\nsetMetadataFor(IndexingSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(IndexingSequence, 'IndexingSequence', classMeta);\nsetMetadataFor(TakeSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TakeSequence, 'TakeSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(EmptySequence, 'EmptySequence', objectMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(SubSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(SubSequence, 'SubSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(EmptySet, 'EmptySet', objectMeta, VOID, [Set]);\nsetMetadataFor(NaturalOrderComparator, 'NaturalOrderComparator', objectMeta, VOID, [Comparator]);\nsetMetadataFor(Key, 'Key', objectMeta);\nfunction releaseInterceptedContinuation(continuation) {\n}\nsetMetadataFor(ContinuationInterceptor, 'ContinuationInterceptor', interfaceMeta);\nsetMetadataFor(EmptyCoroutineContext, 'EmptyCoroutineContext', objectMeta);\nsetMetadataFor(CoroutineSingletons, 'CoroutineSingletons', classMeta, Enum);\nsetMetadataFor(Companion_8, 'Companion', objectMeta);\nsetMetadataFor(IntProgression, 'IntProgression', classMeta);\nsetMetadataFor(IntRange, 'IntRange', classMeta, IntProgression);\nsetMetadataFor(Companion_9, 'Companion', objectMeta);\nsetMetadataFor(CharProgression, 'CharProgression', classMeta);\nsetMetadataFor(CharRange, 'CharRange', classMeta, CharProgression);\nsetMetadataFor(IntProgressionIterator, 'IntProgressionIterator', classMeta, IntIterator);\nsetMetadataFor(CharProgressionIterator, 'CharProgressionIterator', classMeta, CharIterator);\nsetMetadataFor(Companion_10, 'Companion', objectMeta);\nsetMetadataFor(Companion_11, 'Companion', objectMeta);\nsetMetadataFor(UnsafeLazyImpl, 'UnsafeLazyImpl', classMeta);\nsetMetadataFor(UNINITIALIZED_VALUE, 'UNINITIALIZED_VALUE', objectMeta);\nsetMetadataFor(Companion_12, 'Companion', objectMeta);\nsetMetadataFor(Failure, 'Failure', classMeta);\nsetMetadataFor(NotImplementedError, 'NotImplementedError', classMeta, Error_0, VOID, NotImplementedError);\nsetMetadataFor(Pair, 'Pair', classMeta);\n//endregion\nfunction CharSequence() {\n}\nfunction Comparable() {\n}\nfunction Number_0() {\n}\nfunction Unit() {\n}\nprotoOf(Unit).toString = function () {\n return 'kotlin.Unit';\n};\nvar Unit_instance;\nfunction Unit_getInstance() {\n return Unit_instance;\n}\nfunction IntCompanionObject() {\n this.MIN_VALUE = -2147483648;\n this.MAX_VALUE = 2147483647;\n this.SIZE_BYTES = 4;\n this.SIZE_BITS = 32;\n}\nprotoOf(IntCompanionObject).e = function () {\n return this.MIN_VALUE;\n};\nprotoOf(IntCompanionObject).f = function () {\n return this.MAX_VALUE;\n};\nprotoOf(IntCompanionObject).g = function () {\n return this.SIZE_BYTES;\n};\nprotoOf(IntCompanionObject).h = function () {\n return this.SIZE_BITS;\n};\nvar IntCompanionObject_instance;\nfunction IntCompanionObject_getInstance() {\n return IntCompanionObject_instance;\n}\nfunction Comparator() {\n}\nfunction isNaN_0(_this__u8e3s4) {\n return !(_this__u8e3s4 === _this__u8e3s4);\n}\nfunction takeHighestOneBit(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 === 0) {\n tmp = 0;\n } else {\n var tmp_0 = 32 - 1 | 0;\n // Inline function 'kotlin.countLeadingZeroBits' call\n tmp = 1 << (tmp_0 - clz32(_this__u8e3s4) | 0);\n }\n return tmp;\n}\nfunction collectionToArray(collection) {\n return collectionToArrayCommonImpl(collection);\n}\nfunction listOf(element) {\n return arrayListOf([element]);\n}\nfunction copyToArray(collection) {\n var tmp;\n // Inline function 'kotlin.js.asDynamic' call\n if (collection.toArray !== undefined) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collection.toArray();\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collectionToArray(collection);\n }\n return tmp;\n}\nfunction checkIndexOverflow(index) {\n if (index < 0) {\n throwIndexOverflow();\n }\n return index;\n}\nfunction sort(_this__u8e3s4) {\n collectionsSort(_this__u8e3s4, naturalOrder());\n}\nfunction sortWith(_this__u8e3s4, comparator) {\n collectionsSort(_this__u8e3s4, comparator);\n}\nfunction mapCapacity(expectedSize) {\n return expectedSize;\n}\nfunction setOf(element) {\n return hashSetOf([element]);\n}\nfunction collectionsSort(list, comparator) {\n if (list.i() <= 1)\n return Unit_instance;\n var array = copyToArray(list);\n sortArrayWith(array, comparator);\n var inductionVariable = 0;\n var last = array.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n list.j(i, array[i]);\n }\n while (inductionVariable < last);\n}\nfunction AbstractMutableCollection() {\n AbstractCollection.call(this);\n}\nprotoOf(AbstractMutableCollection).l = function (elements) {\n this.m();\n var modified = false;\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n if (this.k(element))\n modified = true;\n }\n return modified;\n};\nprotoOf(AbstractMutableCollection).toJSON = function () {\n return this.toArray();\n};\nprotoOf(AbstractMutableCollection).m = function () {\n};\nfunction IteratorImpl($outer) {\n this.v_1 = $outer;\n this.t_1 = 0;\n this.u_1 = -1;\n}\nprotoOf(IteratorImpl).o = function () {\n return this.t_1 < this.v_1.i();\n};\nprotoOf(IteratorImpl).p = function () {\n if (!this.o())\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.t_1;\n this.t_1 = tmp1 + 1 | 0;\n tmp.u_1 = tmp1;\n return this.v_1.w(this.u_1);\n};\nprotoOf(IteratorImpl).x = function () {\n // Inline function 'kotlin.check' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!(this.u_1 === -1)) {\n // Inline function 'kotlin.collections.IteratorImpl.remove.' call\n var message = 'Call next() or previous() before removing element from the iterator.';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n }\n this.v_1.z(this.u_1);\n this.t_1 = this.u_1;\n this.u_1 = -1;\n};\nfunction ListIteratorImpl($outer, index) {\n this.d1_1 = $outer;\n IteratorImpl.call(this, $outer);\n Companion_instance_5.f1(index, this.d1_1.i());\n this.t_1 = index;\n}\nfunction AbstractMutableList() {\n AbstractMutableCollection.call(this);\n this.y_1 = 0;\n}\nprotoOf(AbstractMutableList).k = function (element) {\n this.m();\n this.g1(this.i(), element);\n return true;\n};\nprotoOf(AbstractMutableList).h1 = function () {\n this.m();\n this.i1(0, this.i());\n};\nprotoOf(AbstractMutableList).n = function () {\n return new IteratorImpl(this);\n};\nprotoOf(AbstractMutableList).q = function (element) {\n return this.j1(element) >= 0;\n};\nprotoOf(AbstractMutableList).j1 = function (element) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = this.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMutableList.indexOf.' call\n if (equals(item, element)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$1 = -1;\n }\n return tmp$ret$1;\n};\nprotoOf(AbstractMutableList).k1 = function (index) {\n return new ListIteratorImpl(this, index);\n};\nprotoOf(AbstractMutableList).i1 = function (fromIndex, toIndex) {\n var iterator = this.k1(fromIndex);\n // Inline function 'kotlin.repeat' call\n var times = toIndex - fromIndex | 0;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.AbstractMutableList.removeRange.' call\n iterator.p();\n iterator.x();\n }\n while (inductionVariable < times);\n};\nprotoOf(AbstractMutableList).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, List) : false))\n return false;\n return Companion_instance_5.l1(this, other);\n};\nprotoOf(AbstractMutableList).hashCode = function () {\n return Companion_instance_5.m1(this);\n};\nfunction AbstractMutableMap() {\n AbstractMap.call(this);\n this.p1_1 = null;\n this.q1_1 = null;\n}\nfunction AbstractMutableSet() {\n AbstractMutableCollection.call(this);\n}\nprotoOf(AbstractMutableSet).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Set) : false))\n return false;\n return Companion_instance_7.y1(this, other);\n};\nprotoOf(AbstractMutableSet).hashCode = function () {\n return Companion_instance_7.z1(this);\n};\nfunction arrayOfUninitializedElements(capacity) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(capacity >= 0)) {\n // Inline function 'kotlin.collections.arrayOfUninitializedElements.' call\n var message = 'capacity must be non-negative.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n // Inline function 'kotlin.js.asDynamic' call\n return fillArrayVal(Array(capacity), null);\n}\nfunction resetRange(_this__u8e3s4, fromIndex, toIndex) {\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(null, fromIndex, toIndex);\n}\nfunction copyOfUninitializedElements(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return copyOf_0(_this__u8e3s4, newSize);\n}\nfunction Companion() {\n Companion_instance = this;\n var tmp = this;\n // Inline function 'kotlin.also' call\n var this_0 = ArrayList_init_$Create$_0(0);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.Companion.Empty.' call\n this_0.c2_1 = true;\n tmp.d2_1 = this_0;\n}\nvar Companion_instance;\nfunction Companion_getInstance() {\n if (Companion_instance == null)\n new Companion();\n return Companion_instance;\n}\nfunction ArrayList_init_$Init$($this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n return $this;\n}\nfunction ArrayList_init_$Create$() {\n return ArrayList_init_$Init$(objectCreate(protoOf(ArrayList)));\n}\nfunction ArrayList_init_$Init$_0(initialCapacity, $this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(initialCapacity >= 0)) {\n // Inline function 'kotlin.collections.ArrayList..' call\n var message = 'Negative initial capacity: ' + initialCapacity;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return $this;\n}\nfunction ArrayList_init_$Create$_0(initialCapacity) {\n return ArrayList_init_$Init$_0(initialCapacity, objectCreate(protoOf(ArrayList)));\n}\nfunction ArrayList_init_$Init$_1(elements, $this) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(elements);\n ArrayList.call($this, tmp$ret$0);\n return $this;\n}\nfunction ArrayList_init_$Create$_1(elements) {\n return ArrayList_init_$Init$_1(elements, objectCreate(protoOf(ArrayList)));\n}\nfunction increaseLength($this, amount) {\n var previous = $this.i();\n // Inline function 'kotlin.js.asDynamic' call\n $this.b2_1.length = $this.i() + amount | 0;\n return previous;\n}\nfunction rangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.rangeCheck.' call\n Companion_instance_5.e2(index, $this.i());\n return index;\n}\nfunction insertionRangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.insertionRangeCheck.' call\n Companion_instance_5.f1(index, $this.i());\n return index;\n}\nfunction ArrayList(array) {\n Companion_getInstance();\n AbstractMutableList.call(this);\n this.b2_1 = array;\n this.c2_1 = false;\n}\nprotoOf(ArrayList).i = function () {\n return this.b2_1.length;\n};\nprotoOf(ArrayList).w = function (index) {\n var tmp = this.b2_1[rangeCheck(this, index)];\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(ArrayList).j = function (index, element) {\n this.m();\n rangeCheck(this, index);\n // Inline function 'kotlin.apply' call\n var this_0 = this.b2_1[index];\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.set.' call\n this.b2_1[index] = element;\n var tmp = this_0;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(ArrayList).k = function (element) {\n this.m();\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.push(element);\n this.y_1 = this.y_1 + 1 | 0;\n return true;\n};\nprotoOf(ArrayList).g1 = function (index, element) {\n this.m();\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.splice(insertionRangeCheck(this, index), 0, element);\n this.y_1 = this.y_1 + 1 | 0;\n};\nprotoOf(ArrayList).l = function (elements) {\n this.m();\n if (elements.s())\n return false;\n var offset = increaseLength(this, elements.i());\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'kotlin.collections.ArrayList.addAll.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var index_0 = checkIndexOverflow(tmp1);\n this.b2_1[offset + index_0 | 0] = item;\n }\n this.y_1 = this.y_1 + 1 | 0;\n return true;\n};\nprotoOf(ArrayList).z = function (index) {\n this.m();\n rangeCheck(this, index);\n this.y_1 = this.y_1 + 1 | 0;\n var tmp;\n if (index === get_lastIndex_0(this)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.b2_1.pop();\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.b2_1.splice(index, 1)[0];\n }\n return tmp;\n};\nprotoOf(ArrayList).i1 = function (fromIndex, toIndex) {\n this.m();\n this.y_1 = this.y_1 + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.splice(fromIndex, toIndex - fromIndex | 0);\n};\nprotoOf(ArrayList).h1 = function () {\n this.m();\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.b2_1 = [];\n this.y_1 = this.y_1 + 1 | 0;\n};\nprotoOf(ArrayList).j1 = function (element) {\n return indexOf(this.b2_1, element);\n};\nprotoOf(ArrayList).toString = function () {\n return arrayToString(this.b2_1);\n};\nprotoOf(ArrayList).f2 = function () {\n return [].slice.call(this.b2_1);\n};\nprotoOf(ArrayList).toArray = function () {\n return this.f2();\n};\nprotoOf(ArrayList).m = function () {\n if (this.c2_1)\n throw UnsupportedOperationException_init_$Create$();\n};\nvar _stableSortingIsSupported;\nfunction sortArrayWith(array, comparator) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArrayWith$lambda(comparator);\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), comparator);\n }\n}\nfunction sortArray(array) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArray$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), naturalOrder());\n }\n}\nfunction getStableSortingIsSupported() {\n var tmp0_safe_receiver = _stableSortingIsSupported;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver;\n }\n _stableSortingIsSupported = false;\n // Inline function 'kotlin.js.unsafeCast' call\n var array = [];\n var inductionVariable = 0;\n if (inductionVariable < 600)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n array.push(index);\n }\n while (inductionVariable < 600);\n var comparison = getStableSortingIsSupported$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n var inductionVariable_0 = 1;\n var last = array.length;\n if (inductionVariable_0 < last)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var a = array[index_0 - 1 | 0];\n var b = array[index_0];\n if ((a & 3) === (b & 3) ? a >= b : false)\n return false;\n }\n while (inductionVariable_0 < last);\n _stableSortingIsSupported = true;\n return true;\n}\nfunction mergeSort(array, start, endInclusive, comparator) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = array.length;\n // Inline function 'kotlin.js.asDynamic' call\n var buffer = fillArrayVal(Array(size), null);\n var result = mergeSort_0(array, buffer, start, endInclusive, comparator);\n if (!(result === array)) {\n var inductionVariable = start;\n if (inductionVariable <= endInclusive)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = result[i];\n }\n while (!(i === endInclusive));\n }\n}\nfunction mergeSort_0(array, buffer, start, end, comparator) {\n if (start === end) {\n return array;\n }\n var median = (start + end | 0) / 2 | 0;\n var left = mergeSort_0(array, buffer, start, median, comparator);\n var right = mergeSort_0(array, buffer, median + 1 | 0, end, comparator);\n var target = left === buffer ? array : buffer;\n var leftIndex = start;\n var rightIndex = median + 1 | 0;\n var inductionVariable = start;\n if (inductionVariable <= end)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (leftIndex <= median ? rightIndex <= end : false) {\n var leftValue = left[leftIndex];\n var rightValue = right[rightIndex];\n if (comparator.compare(leftValue, rightValue) <= 0) {\n target[i] = leftValue;\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = rightValue;\n rightIndex = rightIndex + 1 | 0;\n }\n } else if (leftIndex <= median) {\n target[i] = left[leftIndex];\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = right[rightIndex];\n rightIndex = rightIndex + 1 | 0;\n }\n }\n while (!(i === end));\n return target;\n}\nfunction sortArrayWith$lambda($comparator) {\n return function (a, b) {\n return $comparator.compare(a, b);\n };\n}\nfunction sortArray$lambda(a, b) {\n return compareTo_0(a, b);\n}\nfunction getStableSortingIsSupported$lambda(a, b) {\n return (a & 3) - (b & 3) | 0;\n}\nfunction HashMap_init_$Init$(internalMap, $this) {\n AbstractMutableMap.call($this);\n HashMap.call($this);\n $this.k2_1 = internalMap;\n return $this;\n}\nfunction HashMap_init_$Init$_0($this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n}\nfunction HashMap_init_$Create$() {\n return HashMap_init_$Init$_0(objectCreate(protoOf(HashMap)));\n}\nfunction HashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$_1(initialCapacity, loadFactor), $this);\n return $this;\n}\nfunction HashMap_init_$Init$_2(initialCapacity, $this) {\n HashMap_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n}\nprotoOf(HashMap).u1 = function (key) {\n return this.k2_1.m2(key);\n};\nprotoOf(HashMap).x1 = function () {\n var tmp0_elvis_lhs = this.l2_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n var this_0 = new HashMapEntrySet(this.k2_1);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.HashMap..' call\n this.l2_1 = this_0;\n tmp = this_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n};\nprotoOf(HashMap).w1 = function (key) {\n return this.k2_1.w1(key);\n};\nprotoOf(HashMap).r1 = function (key, value) {\n return this.k2_1.r1(key, value);\n};\nprotoOf(HashMap).i = function () {\n return this.k2_1.i();\n};\nfunction HashMap() {\n this.l2_1 = null;\n}\nfunction HashMapEntrySet(backing) {\n HashMapEntrySetBase.call(this, backing);\n}\nprotoOf(HashMapEntrySet).n = function () {\n return this.o2_1.p2();\n};\nfunction HashMapEntrySetBase(backing) {\n AbstractMutableSet.call(this);\n this.o2_1 = backing;\n}\nprotoOf(HashMapEntrySetBase).i = function () {\n return this.o2_1.i();\n};\nprotoOf(HashMapEntrySetBase).s = function () {\n return this.o2_1.i() === 0;\n};\nprotoOf(HashMapEntrySetBase).q2 = function (element) {\n return this.o2_1.s2(element);\n};\nprotoOf(HashMapEntrySetBase).q = function (element) {\n if (!(!(element == null) ? isInterface(element, Entry) : false))\n return false;\n return this.q2((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n};\nprotoOf(HashMapEntrySetBase).r2 = function (element) {\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(HashMapEntrySetBase).k = function (element) {\n return this.r2((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n};\nprotoOf(HashMapEntrySetBase).l = function (elements) {\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(HashMapEntrySetBase).r = function (elements) {\n return this.o2_1.t2(elements);\n};\nprotoOf(HashMapEntrySetBase).m = function () {\n return this.o2_1.m();\n};\nfunction HashSet_init_$Init$(map, $this) {\n AbstractMutableSet.call($this);\n HashSet.call($this);\n $this.u2_1 = map;\n return $this;\n}\nfunction HashSet_init_$Init$_0($this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n}\nfunction HashSet_init_$Create$() {\n return HashSet_init_$Init$_0(objectCreate(protoOf(HashSet)));\n}\nfunction HashSet_init_$Init$_1(elements, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_0(elements.i()), $this);\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n $this.u2_1.r1(element, true);\n }\n return $this;\n}\nfunction HashSet_init_$Init$_2(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_1(initialCapacity, loadFactor), $this);\n return $this;\n}\nfunction HashSet_init_$Init$_3(initialCapacity, $this) {\n HashSet_init_$Init$_2(initialCapacity, 1.0, $this);\n return $this;\n}\nfunction HashSet_init_$Create$_0(initialCapacity) {\n return HashSet_init_$Init$_3(initialCapacity, objectCreate(protoOf(HashSet)));\n}\nprotoOf(HashSet).k = function (element) {\n return this.u2_1.r1(element, true) == null;\n};\nprotoOf(HashSet).q = function (element) {\n return this.u2_1.m2(element);\n};\nprotoOf(HashSet).s = function () {\n return this.u2_1.i() === 0;\n};\nprotoOf(HashSet).n = function () {\n return this.u2_1.v2();\n};\nprotoOf(HashSet).i = function () {\n return this.u2_1.i();\n};\nfunction HashSet() {\n}\nfunction computeHashSize($this, capacity) {\n return takeHighestOneBit(imul_0(coerceAtLeast(capacity, 1), 3));\n}\nfunction computeShift($this, hashSize) {\n // Inline function 'kotlin.countLeadingZeroBits' call\n return clz32(hashSize) + 1 | 0;\n}\nfunction InternalHashMap_init_$Init$($this) {\n InternalHashMap_init_$Init$_0(8, $this);\n return $this;\n}\nfunction InternalHashMap_init_$Create$() {\n return InternalHashMap_init_$Init$(objectCreate(protoOf(InternalHashMap)));\n}\nfunction InternalHashMap_init_$Init$_0(initialCapacity, $this) {\n InternalHashMap.call($this, arrayOfUninitializedElements(initialCapacity), null, new Int32Array(initialCapacity), new Int32Array(computeHashSize(Companion_instance_0, initialCapacity)), 2, 0);\n return $this;\n}\nfunction InternalHashMap_init_$Create$_0(initialCapacity) {\n return InternalHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(InternalHashMap)));\n}\nfunction InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n InternalHashMap_init_$Init$_0(initialCapacity, $this);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(loadFactor > 0.0)) {\n // Inline function 'kotlin.collections.InternalHashMap..' call\n var message = 'Non-positive load factor: ' + loadFactor;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return $this;\n}\nfunction InternalHashMap_init_$Create$_1(initialCapacity, loadFactor) {\n return InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, objectCreate(protoOf(InternalHashMap)));\n}\nfunction _get_capacity__a9k9f3($this) {\n return $this.w2_1.length;\n}\nfunction _get_hashSize__tftcho($this) {\n return $this.z2_1.length;\n}\nfunction registerModification($this) {\n $this.d3_1 = $this.d3_1 + 1 | 0;\n}\nfunction ensureExtraCapacity($this, n) {\n if (shouldCompact($this, n)) {\n rehash($this, _get_hashSize__tftcho($this));\n } else {\n ensureCapacity($this, $this.b3_1 + n | 0);\n }\n}\nfunction shouldCompact($this, extraCapacity) {\n var spareCapacity = _get_capacity__a9k9f3($this) - $this.b3_1 | 0;\n var gaps = $this.b3_1 - $this.i() | 0;\n return (spareCapacity < extraCapacity ? (gaps + spareCapacity | 0) >= extraCapacity : false) ? gaps >= (_get_capacity__a9k9f3($this) / 4 | 0) : false;\n}\nfunction ensureCapacity($this, minCapacity) {\n if (minCapacity < 0)\n throw RuntimeException_init_$Create$_0('too many elements');\n if (minCapacity > _get_capacity__a9k9f3($this)) {\n var newSize = Companion_instance_5.g3(_get_capacity__a9k9f3($this), minCapacity);\n $this.w2_1 = copyOfUninitializedElements($this.w2_1, newSize);\n var tmp = $this;\n var tmp0_safe_receiver = $this.x2_1;\n tmp.x2_1 = tmp0_safe_receiver == null ? null : copyOfUninitializedElements(tmp0_safe_receiver, newSize);\n $this.y2_1 = copyOf($this.y2_1, newSize);\n var newHashSize = computeHashSize(Companion_instance_0, newSize);\n if (newHashSize > _get_hashSize__tftcho($this)) {\n rehash($this, newHashSize);\n }\n }\n}\nfunction allocateValuesArray($this) {\n var curValuesArray = $this.x2_1;\n if (!(curValuesArray == null))\n return curValuesArray;\n var newValuesArray = arrayOfUninitializedElements(_get_capacity__a9k9f3($this));\n $this.x2_1 = newValuesArray;\n return newValuesArray;\n}\nfunction hash($this, key) {\n return key == null ? 0 : imul_0(hashCode(key), -1640531527) >>> $this.c3_1 | 0;\n}\nfunction compact($this) {\n var i = 0;\n var j = 0;\n var valuesArray = $this.x2_1;\n while (i < $this.b3_1) {\n if ($this.y2_1[i] >= 0) {\n $this.w2_1[j] = $this.w2_1[i];\n if (!(valuesArray == null)) {\n valuesArray[j] = valuesArray[i];\n }\n j = j + 1 | 0;\n }\n i = i + 1 | 0;\n }\n resetRange($this.w2_1, j, $this.b3_1);\n if (valuesArray == null)\n null;\n else {\n resetRange(valuesArray, j, $this.b3_1);\n }\n $this.b3_1 = j;\n}\nfunction rehash($this, newHashSize) {\n registerModification($this);\n if ($this.b3_1 > $this.e3_1) {\n compact($this);\n }\n if (!(newHashSize === _get_hashSize__tftcho($this))) {\n $this.z2_1 = new Int32Array(newHashSize);\n $this.c3_1 = computeShift(Companion_instance_0, newHashSize);\n } else {\n fill($this.z2_1, 0, 0, _get_hashSize__tftcho($this));\n }\n var i = 0;\n while (i < $this.b3_1) {\n var tmp0 = i;\n i = tmp0 + 1 | 0;\n if (!putRehash($this, tmp0)) {\n throw IllegalStateException_init_$Create$_0('This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?');\n }\n }\n}\nfunction putRehash($this, i) {\n var hash_0 = hash($this, $this.w2_1[i]);\n var probesLeft = $this.a3_1;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index === 0) {\n $this.z2_1[hash_0] = i + 1 | 0;\n $this.y2_1[i] = hash_0;\n return true;\n }\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return false;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n}\nfunction findKey($this, key) {\n var hash_0 = hash($this, key);\n var probesLeft = $this.a3_1;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index === 0)\n return -1;\n if (index > 0 ? equals($this.w2_1[index - 1 | 0], key) : false)\n return index - 1 | 0;\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return -1;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n}\nfunction addKey($this, key) {\n $this.m();\n retry: while (true) {\n var hash_0 = hash($this, key);\n var tentativeMaxProbeDistance = coerceAtMost(imul_0($this.a3_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n var probeDistance = 0;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index <= 0) {\n if ($this.b3_1 >= _get_capacity__a9k9f3($this)) {\n ensureExtraCapacity($this, 1);\n continue retry;\n }\n var tmp1 = $this.b3_1;\n $this.b3_1 = tmp1 + 1 | 0;\n var putIndex = tmp1;\n $this.w2_1[putIndex] = key;\n $this.y2_1[putIndex] = hash_0;\n $this.z2_1[hash_0] = putIndex + 1 | 0;\n $this.e3_1 = $this.e3_1 + 1 | 0;\n registerModification($this);\n if (probeDistance > $this.a3_1)\n $this.a3_1 = probeDistance;\n return putIndex;\n }\n if (equals($this.w2_1[index - 1 | 0], key)) {\n return -index | 0;\n }\n probeDistance = probeDistance + 1 | 0;\n if (probeDistance > tentativeMaxProbeDistance) {\n rehash($this, imul_0(_get_hashSize__tftcho($this), 2));\n continue retry;\n }\n var tmp4 = hash_0;\n hash_0 = tmp4 - 1 | 0;\n if (tmp4 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n }\n}\nfunction contentEquals($this, other) {\n return $this.e3_1 === other.i() ? $this.t2(other.x1()) : false;\n}\nfunction Companion_0() {\n this.h3_1 = -1640531527;\n this.i3_1 = 8;\n this.j3_1 = 2;\n this.k3_1 = -1;\n}\nvar Companion_instance_0;\nfunction Companion_getInstance_0() {\n return Companion_instance_0;\n}\nfunction Itr(map) {\n this.l3_1 = map;\n this.m3_1 = 0;\n this.n3_1 = -1;\n this.o3_1 = this.l3_1.d3_1;\n this.p3();\n}\nprotoOf(Itr).p3 = function () {\n while (this.m3_1 < this.l3_1.b3_1 ? this.l3_1.y2_1[this.m3_1] < 0 : false) {\n this.m3_1 = this.m3_1 + 1 | 0;\n }\n};\nprotoOf(Itr).o = function () {\n return this.m3_1 < this.l3_1.b3_1;\n};\nprotoOf(Itr).q3 = function () {\n if (!(this.l3_1.d3_1 === this.o3_1))\n throw ConcurrentModificationException_init_$Create$();\n};\nfunction KeysItr(map) {\n Itr.call(this, map);\n}\nprotoOf(KeysItr).p = function () {\n this.q3();\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var result = this.l3_1.w2_1[this.n3_1];\n this.p3();\n return result;\n};\nfunction EntriesItr(map) {\n Itr.call(this, map);\n}\nprotoOf(EntriesItr).p = function () {\n this.q3();\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var result = new EntryRef(this.l3_1, this.n3_1);\n this.p3();\n return result;\n};\nprotoOf(EntriesItr).z3 = function () {\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.l3_1.w2_1[this.n3_1];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = ensureNotNull(this.l3_1.x2_1)[this.n3_1];\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n var result = tmp_0 ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n this.p3();\n return result;\n};\nprotoOf(EntriesItr).a4 = function (sb) {\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var key = this.l3_1.w2_1[this.n3_1];\n if (equals(key, this.l3_1)) {\n sb.d4('(this Map)');\n } else {\n sb.c4(key);\n }\n sb.e4(_Char___init__impl__6a9atx(61));\n var value = ensureNotNull(this.l3_1.x2_1)[this.n3_1];\n if (equals(value, this.l3_1)) {\n sb.d4('(this Map)');\n } else {\n sb.c4(value);\n }\n this.p3();\n};\nfunction EntryRef(map, index) {\n this.f4_1 = map;\n this.g4_1 = index;\n}\nprotoOf(EntryRef).h4 = function () {\n return this.f4_1.w2_1[this.g4_1];\n};\nprotoOf(EntryRef).i4 = function () {\n return ensureNotNull(this.f4_1.x2_1)[this.g4_1];\n};\nprotoOf(EntryRef).equals = function (other) {\n var tmp;\n var tmp_0;\n if (!(other == null) ? isInterface(other, Entry) : false) {\n tmp_0 = equals(other.h4(), this.h4());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = equals(other.i4(), this.i4());\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EntryRef).hashCode = function () {\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.h4();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = this.i4();\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n return tmp ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n};\nprotoOf(EntryRef).toString = function () {\n return '' + this.h4() + '=' + this.i4();\n};\nfunction InternalHashMap(keysArray, valuesArray, presenceArray, hashArray, maxProbeDistance, length) {\n this.w2_1 = keysArray;\n this.x2_1 = valuesArray;\n this.y2_1 = presenceArray;\n this.z2_1 = hashArray;\n this.a3_1 = maxProbeDistance;\n this.b3_1 = length;\n this.c3_1 = computeShift(Companion_instance_0, _get_hashSize__tftcho(this));\n this.d3_1 = 0;\n this.e3_1 = 0;\n this.f3_1 = false;\n}\nprotoOf(InternalHashMap).i = function () {\n return this.e3_1;\n};\nprotoOf(InternalHashMap).w1 = function (key) {\n var index = findKey(this, key);\n if (index < 0)\n return null;\n return ensureNotNull(this.x2_1)[index];\n};\nprotoOf(InternalHashMap).m2 = function (key) {\n return findKey(this, key) >= 0;\n};\nprotoOf(InternalHashMap).r1 = function (key, value) {\n var index = addKey(this, key);\n var valuesArray = allocateValuesArray(this);\n if (index < 0) {\n var oldValue = valuesArray[(-index | 0) - 1 | 0];\n valuesArray[(-index | 0) - 1 | 0] = value;\n return oldValue;\n } else {\n valuesArray[index] = value;\n return null;\n }\n};\nprotoOf(InternalHashMap).equals = function (other) {\n var tmp;\n if (other === this) {\n tmp = true;\n } else {\n var tmp_0;\n if (!(other == null) ? isInterface(other, Map_0) : false) {\n tmp_0 = contentEquals(this, other);\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n return tmp;\n};\nprotoOf(InternalHashMap).hashCode = function () {\n var result = 0;\n var it = this.p2();\n while (it.o()) {\n result = result + it.z3() | 0;\n }\n return result;\n};\nprotoOf(InternalHashMap).toString = function () {\n var sb = StringBuilder_init_$Create$(2 + imul_0(this.e3_1, 3) | 0);\n sb.d4('{');\n var i = 0;\n var it = this.p2();\n while (it.o()) {\n if (i > 0) {\n sb.d4(', ');\n }\n it.a4(sb);\n i = i + 1 | 0;\n }\n sb.d4('}');\n return sb.toString();\n};\nprotoOf(InternalHashMap).m = function () {\n if (this.f3_1)\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(InternalHashMap).s2 = function (entry) {\n var index = findKey(this, entry.h4());\n if (index < 0)\n return false;\n return equals(ensureNotNull(this.x2_1)[index], entry.i4());\n};\nprotoOf(InternalHashMap).j4 = function (entry) {\n return this.s2(isInterface(entry, Entry) ? entry : THROW_CCE());\n};\nprotoOf(InternalHashMap).v2 = function () {\n return new KeysItr(this);\n};\nprotoOf(InternalHashMap).p2 = function () {\n return new EntriesItr(this);\n};\nfunction InternalMap() {\n}\nfunction LinkedHashMap_init_$Init$($this) {\n HashMap_init_$Init$_0($this);\n LinkedHashMap.call($this);\n return $this;\n}\nfunction LinkedHashMap_init_$Create$() {\n return LinkedHashMap_init_$Init$(objectCreate(protoOf(LinkedHashMap)));\n}\nfunction LinkedHashMap_init_$Init$_0(initialCapacity, $this) {\n HashMap_init_$Init$_2(initialCapacity, $this);\n LinkedHashMap.call($this);\n return $this;\n}\nfunction LinkedHashMap_init_$Create$_0(initialCapacity) {\n return LinkedHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(LinkedHashMap)));\n}\nfunction LinkedHashMap() {\n}\nfunction LinkedHashSet_init_$Init$($this) {\n HashSet_init_$Init$_0($this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$() {\n return LinkedHashSet_init_$Init$(objectCreate(protoOf(LinkedHashSet)));\n}\nfunction LinkedHashSet_init_$Init$_0(elements, $this) {\n HashSet_init_$Init$_1(elements, $this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$_0(elements) {\n return LinkedHashSet_init_$Init$_0(elements, objectCreate(protoOf(LinkedHashSet)));\n}\nfunction LinkedHashSet_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$_2(initialCapacity, loadFactor, $this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Init$_2(initialCapacity, $this) {\n LinkedHashSet_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$_1(initialCapacity) {\n return LinkedHashSet_init_$Init$_2(initialCapacity, objectCreate(protoOf(LinkedHashSet)));\n}\nprotoOf(LinkedHashSet).m = function () {\n return this.u2_1.m();\n};\nfunction LinkedHashSet() {\n}\nfunction KProperty1() {\n}\nfunction reset(_this__u8e3s4) {\n _this__u8e3s4.lastIndex = 0;\n}\nfunction StringBuilder_init_$Init$(capacity, $this) {\n StringBuilder_init_$Init$_0($this);\n return $this;\n}\nfunction StringBuilder_init_$Create$(capacity) {\n return StringBuilder_init_$Init$(capacity, objectCreate(protoOf(StringBuilder)));\n}\nfunction StringBuilder_init_$Init$_0($this) {\n StringBuilder.call($this, '');\n return $this;\n}\nfunction StringBuilder_init_$Create$_0() {\n return StringBuilder_init_$Init$_0(objectCreate(protoOf(StringBuilder)));\n}\nfunction StringBuilder(content) {\n this.b4_1 = !(content === undefined) ? content : '';\n}\nprotoOf(StringBuilder).a = function () {\n // Inline function 'kotlin.js.asDynamic' call\n return this.b4_1.length;\n};\nprotoOf(StringBuilder).b = function (index) {\n // Inline function 'kotlin.text.getOrElse' call\n var this_0 = this.b4_1;\n var tmp;\n if (index >= 0 ? index <= get_lastIndex_1(this_0) : false) {\n tmp = charSequenceGet(this_0, index);\n } else {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', length: ' + this.a() + '}');\n }\n return tmp;\n};\nprotoOf(StringBuilder).c = function (startIndex, endIndex) {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n return this.b4_1.substring(startIndex, endIndex);\n};\nprotoOf(StringBuilder).e4 = function (value) {\n this.b4_1 = this.b4_1 + toString_0(value);\n return this;\n};\nprotoOf(StringBuilder).l4 = function (value) {\n this.b4_1 = this.b4_1 + toString_1(value);\n return this;\n};\nprotoOf(StringBuilder).c4 = function (value) {\n this.b4_1 = this.b4_1 + toString_1(value);\n return this;\n};\nprotoOf(StringBuilder).d4 = function (value) {\n var tmp = this;\n var tmp_0 = this.b4_1;\n tmp.b4_1 = tmp_0 + (value == null ? 'null' : value);\n return this;\n};\nprotoOf(StringBuilder).toString = function () {\n return this.b4_1;\n};\nfunction uppercaseChar(_this__u8e3s4) {\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var uppercase = toString_0(_this__u8e3s4).toUpperCase();\n return uppercase.length > 1 ? _this__u8e3s4 : charSequenceGet(uppercase, 0);\n}\nfunction isWhitespace(_this__u8e3s4) {\n return isWhitespaceImpl(_this__u8e3s4);\n}\nfunction toString(_this__u8e3s4, radix) {\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.toString(checkRadix(radix));\n}\nfunction checkRadix(radix) {\n if (!(2 <= radix ? radix <= 36 : false)) {\n throw IllegalArgumentException_init_$Create$_0('radix ' + radix + ' was not in valid range 2..36');\n }\n return radix;\n}\nfunction toInt(_this__u8e3s4) {\n var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nfunction toInt_0(_this__u8e3s4, radix) {\n var tmp0_elvis_lhs = toIntOrNull_0(_this__u8e3s4, radix);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nfunction digitOf(char, radix) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.digitOf.' call\n var it = (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(48)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(57)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(48)) : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(90)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(97)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(122)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(97)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(128)) < 0 ? -1 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65313)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65338)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65313)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65345)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65370)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65345)) + 10 | 0 : digitToIntImpl(char);\n return it >= radix ? -1 : it;\n}\nfunction Regex_init_$Init$(pattern, $this) {\n Regex.call($this, pattern, emptySet());\n return $this;\n}\nfunction Regex_init_$Create$(pattern) {\n return Regex_init_$Init$(pattern, objectCreate(protoOf(Regex)));\n}\nfunction Companion_1() {\n Companion_instance_1 = this;\n this.m4_1 = new RegExp('[\\\\\\\\^$*+?.()|[\\\\]{}]', 'g');\n this.n4_1 = new RegExp('[\\\\\\\\$]', 'g');\n this.o4_1 = new RegExp('\\\\$', 'g');\n}\nvar Companion_instance_1;\nfunction Companion_getInstance_1() {\n if (Companion_instance_1 == null)\n new Companion_1();\n return Companion_instance_1;\n}\nfunction Regex(pattern, options) {\n Companion_getInstance_1();\n this.p4_1 = pattern;\n this.q4_1 = toSet(options);\n this.r4_1 = new RegExp(pattern, toFlags(options, 'gu'));\n this.s4_1 = null;\n this.t4_1 = null;\n}\nprotoOf(Regex).u4 = function (input) {\n reset(this.r4_1);\n var match = this.r4_1.exec(toString_2(input));\n return (!(match == null) ? match.index === 0 : false) ? this.r4_1.lastIndex === charSequenceLength(input) : false;\n};\nprotoOf(Regex).toString = function () {\n return this.r4_1.toString();\n};\nfunction toFlags(_this__u8e3s4, prepend) {\n return joinToString_0(_this__u8e3s4, '', prepend, VOID, VOID, VOID, toFlags$lambda);\n}\nfunction toFlags$lambda(it) {\n return it.x4_1;\n}\nvar STRING_CASE_INSENSITIVE_ORDER;\nfunction compareTo(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n _init_properties_stringJs_kt__bg7zye();\n if (ignoreCase) {\n var n1 = _this__u8e3s4.length;\n var n2 = other.length;\n // Inline function 'kotlin.comparisons.minOf' call\n var min = Math.min(n1, n2);\n if (min === 0)\n return n1 - n2 | 0;\n var inductionVariable = 0;\n if (inductionVariable < min)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var thisChar = charSequenceGet(_this__u8e3s4, index);\n var otherChar = charSequenceGet(other, index);\n if (!(thisChar === otherChar)) {\n thisChar = uppercaseChar(thisChar);\n otherChar = uppercaseChar(otherChar);\n if (!(thisChar === otherChar)) {\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n var this_0 = thisChar;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = toString_0(this_0).toLowerCase();\n thisChar = charSequenceGet(tmp$ret$3, 0);\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n var this_1 = otherChar;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$7 = toString_0(this_1).toLowerCase();\n otherChar = charSequenceGet(tmp$ret$7, 0);\n if (!(thisChar === otherChar)) {\n return Char__compareTo_impl_ypi4mb(thisChar, otherChar);\n }\n }\n }\n }\n while (inductionVariable < min);\n return n1 - n2 | 0;\n } else {\n return compareTo_0(_this__u8e3s4, other);\n }\n}\nfunction contentEquals_0(_this__u8e3s4, other) {\n _init_properties_stringJs_kt__bg7zye();\n return contentEqualsImpl(_this__u8e3s4, other);\n}\nfunction sam$kotlin_Comparator$0(function_0) {\n this.y4_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0).z4 = function (a, b) {\n return this.y4_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction STRING_CASE_INSENSITIVE_ORDER$lambda(a, b) {\n _init_properties_stringJs_kt__bg7zye();\n return compareTo(a, b, true);\n}\nvar properties_initialized_stringJs_kt_nta8o4;\nfunction _init_properties_stringJs_kt__bg7zye() {\n if (!properties_initialized_stringJs_kt_nta8o4) {\n properties_initialized_stringJs_kt_nta8o4 = true;\n var tmp = STRING_CASE_INSENSITIVE_ORDER$lambda;\n STRING_CASE_INSENSITIVE_ORDER = new sam$kotlin_Comparator$0(tmp);\n }\n}\nfunction isBlank(_this__u8e3s4) {\n var tmp;\n if (charSequenceLength(_this__u8e3s4) === 0) {\n tmp = true;\n } else {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = get_indices(_this__u8e3s4);\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.s();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.text.isBlank.' call\n if (!isWhitespace(charSequenceGet(_this__u8e3s4, element))) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n }\n return tmp;\n}\nfunction startsWith(_this__u8e3s4, prefix, startIndex, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeStartsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.startsWith(prefix, startIndex);\n } else\n return regionMatches(_this__u8e3s4, startIndex, prefix, 0, prefix.length, ignoreCase);\n}\nfunction startsWith_0(_this__u8e3s4, prefix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeStartsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.startsWith(prefix, 0);\n } else\n return regionMatches(_this__u8e3s4, 0, prefix, 0, prefix.length, ignoreCase);\n}\nfunction endsWith(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeEndsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.endsWith(suffix);\n } else\n return regionMatches(_this__u8e3s4, _this__u8e3s4.length - suffix.length | 0, suffix, 0, suffix.length, ignoreCase);\n}\nfunction regionMatches(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase);\n}\nfunction asSequence(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return emptySequence();\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv(_this__u8e3s4);\n}\nfunction get_lastIndex(_this__u8e3s4) {\n return _this__u8e3s4.length - 1 | 0;\n}\nfunction single(_this__u8e3s4) {\n var tmp;\n switch (_this__u8e3s4.length) {\n case 0:\n throw NoSuchElementException_init_$Create$_0('Array is empty.');\n case 1:\n tmp = _this__u8e3s4[0];\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('Array has more than one element.');\n }\n return tmp;\n}\nfunction contains(_this__u8e3s4, element) {\n return indexOf(_this__u8e3s4, element) >= 0;\n}\nfunction indexOf(_this__u8e3s4, element) {\n if (element == null) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (_this__u8e3s4[index] == null) {\n return index;\n }\n }\n while (inductionVariable <= last);\n } else {\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (equals(element, _this__u8e3s4[index_0])) {\n return index_0;\n }\n }\n while (inductionVariable_0 <= last_0);\n }\n return -1;\n}\nfunction toCollection(_this__u8e3s4, destination) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var item = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n destination.k(item);\n }\n return destination;\n}\nfunction joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n}\nfunction joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.l4(prefix);\n var count = 0;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n $l$loop: while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n count = count + 1 | 0;\n if (count > 1) {\n buffer.l4(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.l4(truncated);\n }\n buffer.l4(postfix);\n return buffer;\n}\nfunction _no_name_provided__qut3iv($this_asSequence) {\n this.a5_1 = $this_asSequence;\n}\nprotoOf(_no_name_provided__qut3iv).n = function () {\n // Inline function 'kotlin.collections.asSequence.' call\n return arrayIterator(this.a5_1);\n};\nfunction joinToString_0(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo_0(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n}\nfunction joinTo_0(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.l4(prefix);\n var count = 0;\n var tmp0_iterator = _this__u8e3s4.n();\n $l$loop: while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n count = count + 1 | 0;\n if (count > 1) {\n buffer.l4(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.l4(truncated);\n }\n buffer.l4(postfix);\n return buffer;\n}\nfunction last(_this__u8e3s4) {\n if (_this__u8e3s4.s())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.w(get_lastIndex_0(_this__u8e3s4));\n}\nfunction distinct(_this__u8e3s4) {\n return toList(toMutableSet(_this__u8e3s4));\n}\nfunction firstOrNull(_this__u8e3s4) {\n return _this__u8e3s4.s() ? null : _this__u8e3s4.w(0);\n}\nfunction plus(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection)) {\n var result = ArrayList_init_$Create$_0(_this__u8e3s4.i() + elements.i() | 0);\n result.l(_this__u8e3s4);\n result.l(elements);\n return result;\n } else {\n var result_0 = ArrayList_init_$Create$_1(_this__u8e3s4);\n addAll(result_0, elements);\n return result_0;\n }\n}\nfunction sorted(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.i() <= 1)\n return toList(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort_0(this_0);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_0(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort(this_1);\n return this_1;\n}\nfunction first(_this__u8e3s4) {\n if (_this__u8e3s4.s())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.w(0);\n}\nfunction toMutableList(_this__u8e3s4) {\n return ArrayList_init_$Create$_1(_this__u8e3s4);\n}\nfunction toList(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.i()) {\n case 0:\n tmp = emptyList();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.w(0);\n } else {\n tmp_0 = _this__u8e3s4.n().p();\n }\n\n tmp = listOf(tmp_0);\n break;\n default:\n tmp = toMutableList(_this__u8e3s4);\n break;\n }\n return tmp;\n }\n return optimizeReadOnlyList(toMutableList_0(_this__u8e3s4));\n}\nfunction toMutableSet(_this__u8e3s4) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = LinkedHashSet_init_$Create$_0(_this__u8e3s4);\n } else {\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$());\n }\n return tmp;\n}\nfunction sortedWith(_this__u8e3s4, comparator) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.i() <= 1)\n return toList(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith_0(this_0, comparator);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_0(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith(this_1, comparator);\n return this_1;\n}\nfunction toMutableList_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection))\n return toMutableList(_this__u8e3s4);\n return toCollection_0(_this__u8e3s4, ArrayList_init_$Create$());\n}\nfunction toCollection_0(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n destination.k(item);\n }\n return destination;\n}\nfunction toSet(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.i()) {\n case 0:\n tmp = emptySet();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.w(0);\n } else {\n tmp_0 = _this__u8e3s4.n().p();\n }\n\n tmp = setOf(tmp_0);\n break;\n default:\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.i())));\n break;\n }\n return tmp;\n }\n return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));\n}\nfunction downTo(_this__u8e3s4, to) {\n return Companion_instance_10.b5(_this__u8e3s4, to, -1);\n}\nfunction coerceAtMost(_this__u8e3s4, maximumValue) {\n return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4;\n}\nfunction coerceAtLeast(_this__u8e3s4, minimumValue) {\n return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;\n}\nfunction toList_0(_this__u8e3s4) {\n var it = _this__u8e3s4.n();\n if (!it.o())\n return emptyList();\n var element = it.p();\n if (!it.o())\n return listOf(element);\n var dst = ArrayList_init_$Create$();\n dst.k(element);\n while (it.o()) {\n dst.k(it.p());\n }\n return dst;\n}\nfunction firstOrNull_0(_this__u8e3s4) {\n var iterator = _this__u8e3s4.n();\n if (!iterator.o())\n return null;\n return iterator.p();\n}\nfunction map(_this__u8e3s4, transform) {\n return new TransformingSequence(_this__u8e3s4, transform);\n}\nfunction elementAtOrNull(_this__u8e3s4, index) {\n if (index < 0)\n return null;\n var iterator = _this__u8e3s4.n();\n var count = 0;\n while (iterator.o()) {\n var element = iterator.p();\n var tmp0 = count;\n count = tmp0 + 1 | 0;\n if (index === tmp0)\n return element;\n }\n return null;\n}\nfunction toMutableList_1(_this__u8e3s4) {\n return toCollection_1(_this__u8e3s4, ArrayList_init_$Create$());\n}\nfunction takeWhile(_this__u8e3s4, predicate) {\n return new TakeWhileSequence(_this__u8e3s4, predicate);\n}\nfunction drop(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.sequences.drop.' call\n var message = 'Requested element count ' + n + ' is less than zero.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n var tmp;\n if (n === 0) {\n tmp = _this__u8e3s4;\n } else {\n if (isInterface(_this__u8e3s4, DropTakeSequence)) {\n tmp = _this__u8e3s4.c5(n);\n } else {\n tmp = new DropSequence(_this__u8e3s4, n);\n }\n }\n return tmp;\n}\nfunction dropWhile(_this__u8e3s4, predicate) {\n return new DropWhileSequence(_this__u8e3s4, predicate);\n}\nfunction filterIndexed(_this__u8e3s4, predicate) {\n var tmp = new IndexingSequence(_this__u8e3s4);\n var tmp_0 = new FilteringSequence(tmp, true, filterIndexed$lambda(predicate));\n return new TransformingSequence(tmp_0, filterIndexed$lambda_0);\n}\nfunction take(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.sequences.take.' call\n var message = 'Requested element count ' + n + ' is less than zero.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n var tmp;\n if (n === 0) {\n tmp = emptySequence();\n } else {\n if (isInterface(_this__u8e3s4, DropTakeSequence)) {\n tmp = _this__u8e3s4.d5(n);\n } else {\n tmp = new TakeSequence(_this__u8e3s4, n);\n }\n }\n return tmp;\n}\nfunction toCollection_1(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n destination.k(item);\n }\n return destination;\n}\nfunction filterIndexed$lambda($predicate) {\n return function (it) {\n return $predicate(it.e5_1, it.f5_1);\n };\n}\nfunction filterIndexed$lambda_0(it) {\n return it.f5_1;\n}\nfunction getOrNull(_this__u8e3s4, index) {\n return (index >= 0 ? index <= get_lastIndex_1(_this__u8e3s4) : false) ? charSequenceGet(_this__u8e3s4, index) : null;\n}\nfunction _Char___init__impl__6a9atx(value) {\n return value;\n}\nfunction _get_value__a43j40($this) {\n return $this;\n}\nfunction _Char___init__impl__6a9atx_0(code) {\n // Inline function 'kotlin.UShort.toInt' call\n var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535;\n return _Char___init__impl__6a9atx(tmp$ret$0);\n}\nfunction Char__compareTo_impl_ypi4mb($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n}\nfunction Char__compareTo_impl_ypi4mb_0($this, other) {\n return Char__compareTo_impl_ypi4mb($this.g5_1, other instanceof Char ? other.g5_1 : THROW_CCE());\n}\nfunction Char__minus_impl_a2frrh($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n}\nfunction Char__rangeTo_impl_tkncvp($this, other) {\n return new CharRange($this, other);\n}\nfunction Char__toInt_impl_vasixd($this) {\n return _get_value__a43j40($this);\n}\nfunction Char__equals_impl_x6719k($this, other) {\n if (!(other instanceof Char))\n return false;\n return _get_value__a43j40($this) === _get_value__a43j40(other.g5_1);\n}\nfunction Char__hashCode_impl_otmys($this) {\n return _get_value__a43j40($this);\n}\nfunction toString_0($this) {\n // Inline function 'kotlin.js.unsafeCast' call\n return String.fromCharCode(_get_value__a43j40($this));\n}\nfunction Companion_2() {\n Companion_instance_2 = this;\n this.h5_1 = _Char___init__impl__6a9atx(0);\n this.i5_1 = _Char___init__impl__6a9atx(65535);\n this.j5_1 = _Char___init__impl__6a9atx(55296);\n this.k5_1 = _Char___init__impl__6a9atx(56319);\n this.l5_1 = _Char___init__impl__6a9atx(56320);\n this.m5_1 = _Char___init__impl__6a9atx(57343);\n this.n5_1 = _Char___init__impl__6a9atx(55296);\n this.o5_1 = _Char___init__impl__6a9atx(57343);\n this.p5_1 = 2;\n this.q5_1 = 16;\n}\nvar Companion_instance_2;\nfunction Companion_getInstance_2() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n}\nfunction Char(value) {\n Companion_getInstance_2();\n this.g5_1 = value;\n}\nprotoOf(Char).r5 = function (other) {\n return Char__compareTo_impl_ypi4mb(this.g5_1, other);\n};\nprotoOf(Char).d = function (other) {\n return Char__compareTo_impl_ypi4mb_0(this, other);\n};\nprotoOf(Char).equals = function (other) {\n return Char__equals_impl_x6719k(this.g5_1, other);\n};\nprotoOf(Char).hashCode = function () {\n return Char__hashCode_impl_otmys(this.g5_1);\n};\nprotoOf(Char).toString = function () {\n return toString_0(this.g5_1);\n};\nfunction List() {\n}\nfunction Collection() {\n}\nfunction Entry() {\n}\nfunction Map_0() {\n}\nfunction Set() {\n}\nfunction Companion_3() {\n}\nvar Companion_instance_3;\nfunction Companion_getInstance_3() {\n return Companion_instance_3;\n}\nfunction Enum(name, ordinal) {\n this.s5_1 = name;\n this.t5_1 = ordinal;\n}\nprotoOf(Enum).u5 = function (other) {\n return compareTo_0(this.t5_1, other.t5_1);\n};\nprotoOf(Enum).d = function (other) {\n return this.u5(other instanceof Enum ? other : THROW_CCE());\n};\nprotoOf(Enum).equals = function (other) {\n return this === other;\n};\nprotoOf(Enum).hashCode = function () {\n return identityHashCode(this);\n};\nprotoOf(Enum).toString = function () {\n return this.s5_1;\n};\nfunction toString_1(_this__u8e3s4) {\n var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_2(_this__u8e3s4);\n return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n}\nfunction implement(interfaces) {\n var maxSize = 1;\n var masks = [];\n var inductionVariable = 0;\n var last = interfaces.length;\n while (inductionVariable < last) {\n var i = interfaces[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var currentSize = maxSize;\n var tmp1_elvis_lhs = i.prototype.$imask$;\n var imask = tmp1_elvis_lhs == null ? i.$imask$ : tmp1_elvis_lhs;\n if (!(imask == null)) {\n masks.push(imask);\n currentSize = imask.length;\n }\n var iid = i.$metadata$.iid;\n var tmp;\n if (iid == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.implement.' call\n tmp = bitMaskWith(iid);\n }\n var iidImask = tmp;\n if (!(iidImask == null)) {\n masks.push(iidImask);\n currentSize = Math.max(currentSize, iidImask.length);\n }\n if (currentSize > maxSize) {\n maxSize = currentSize;\n }\n }\n return compositeBitMask(maxSize, masks);\n}\nfunction bitMaskWith(activeBit) {\n var numberIndex = activeBit >> 5;\n var intArray = new Int32Array(numberIndex + 1 | 0);\n var positionInNumber = activeBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n intArray[numberIndex] = intArray[numberIndex] | numberWithSettledBit;\n return intArray;\n}\nfunction compositeBitMask(capacity, masks) {\n var tmp = 0;\n var tmp_0 = new Int32Array(capacity);\n while (tmp < capacity) {\n var tmp_1 = tmp;\n var result = 0;\n var inductionVariable = 0;\n var last = masks.length;\n while (inductionVariable < last) {\n var mask = masks[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (tmp_1 < mask.length) {\n result = result | mask[tmp_1];\n }\n }\n tmp_0[tmp_1] = result;\n tmp = tmp + 1 | 0;\n }\n return tmp_0;\n}\nfunction isBitSet(_this__u8e3s4, possibleActiveBit) {\n var numberIndex = possibleActiveBit >> 5;\n if (numberIndex > _this__u8e3s4.length)\n return false;\n var positionInNumber = possibleActiveBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n return !((_this__u8e3s4[numberIndex] & numberWithSettledBit) === 0);\n}\nfunction fillArrayVal(array, initValue) {\n var inductionVariable = 0;\n var last = array.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = initValue;\n }\n while (!(i === last));\n return array;\n}\nfunction arrayIterator(array) {\n return new arrayIterator$1(array);\n}\nfunction charArrayOf(arr) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'CharArray';\n var array = new Uint16Array(arr);\n array.$type$ = type;\n return array;\n}\nfunction arrayIterator$1($array) {\n this.w5_1 = $array;\n this.v5_1 = 0;\n}\nprotoOf(arrayIterator$1).o = function () {\n return !(this.v5_1 === this.w5_1.length);\n};\nprotoOf(arrayIterator$1).p = function () {\n var tmp;\n if (!(this.v5_1 === this.w5_1.length)) {\n var tmp1 = this.v5_1;\n this.v5_1 = tmp1 + 1 | 0;\n tmp = this.w5_1[tmp1];\n } else {\n throw NoSuchElementException_init_$Create$_0('' + this.v5_1);\n }\n return tmp;\n};\nfunction get_buf() {\n _init_properties_bitUtils_kt__nfcg4k();\n return buf;\n}\nvar buf;\nfunction get_bufFloat64() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufFloat64;\n}\nvar bufFloat64;\nvar bufFloat32;\nfunction get_bufInt32() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufInt32;\n}\nvar bufInt32;\nfunction get_lowIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return lowIndex;\n}\nvar lowIndex;\nfunction get_highIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return highIndex;\n}\nvar highIndex;\nfunction getNumberHashCode(obj) {\n _init_properties_bitUtils_kt__nfcg4k();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.jsBitwiseOr' call\n // Inline function 'kotlin.js.asDynamic' call\n if ((obj | 0) === obj) {\n return numberToInt(obj);\n }\n get_bufFloat64()[0] = obj;\n return imul_0(get_bufInt32()[get_highIndex()], 31) + get_bufInt32()[get_lowIndex()] | 0;\n}\nvar properties_initialized_bitUtils_kt_i2bo3e;\nfunction _init_properties_bitUtils_kt__nfcg4k() {\n if (!properties_initialized_bitUtils_kt_i2bo3e) {\n properties_initialized_bitUtils_kt_i2bo3e = true;\n buf = new ArrayBuffer(8);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat64 = new Float64Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat32 = new Float32Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufInt32 = new Int32Array(get_buf());\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.lowIndex.' call\n get_bufFloat64()[0] = -1.0;\n lowIndex = !(get_bufInt32()[0] === 0) ? 1 : 0;\n highIndex = 1 - get_lowIndex() | 0;\n }\n}\nfunction charSequenceGet(a, index) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.Char' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var code = a.charCodeAt(index);\n var tmp_0;\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_0 = _Char___init__impl__6a9atx(0);\n if (code < Char__toInt_impl_vasixd(this_0)) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_1 = _Char___init__impl__6a9atx(65535);\n tmp_0 = code > Char__toInt_impl_vasixd(this_1);\n }\n if (tmp_0) {\n throw IllegalArgumentException_init_$Create$_0('Invalid Char code: ' + code);\n }\n tmp = numberToChar(code);\n } else {\n tmp = a.b(index);\n }\n return tmp;\n}\nfunction isString(a) {\n return typeof a === 'string';\n}\nfunction charSequenceLength(a) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.length;\n } else {\n tmp = a.a();\n }\n return tmp;\n}\nfunction charSequenceSubSequence(a, startIndex, endIndex) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.substring(startIndex, endIndex);\n } else {\n tmp = a.c(startIndex, endIndex);\n }\n return tmp;\n}\nfunction arrayToString(array) {\n return joinToString(array, ', ', '[', ']', VOID, VOID, arrayToString$lambda);\n}\nfunction arrayToString$lambda(it) {\n return toString_2(it);\n}\nfunction compareTo_0(a, b) {\n var tmp;\n switch (typeof a) {\n case 'number':\n var tmp_0;\n if (typeof b === 'number') {\n tmp_0 = doubleCompareTo(a, b);\n } else {\n if (b instanceof Long) {\n tmp_0 = doubleCompareTo(a, b.z5());\n } else {\n tmp_0 = primitiveCompareTo(a, b);\n }\n }\n\n tmp = tmp_0;\n break;\n case 'string':\n case 'boolean':\n tmp = primitiveCompareTo(a, b);\n break;\n default:\n tmp = compareToDoNotIntrinsicify(a, b);\n break;\n }\n return tmp;\n}\nfunction doubleCompareTo(a, b) {\n var tmp;\n if (a < b) {\n tmp = -1;\n } else if (a > b) {\n tmp = 1;\n } else if (a === b) {\n var tmp_0;\n if (a !== 0) {\n tmp_0 = 0;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var ia = 1 / a;\n var tmp_1;\n // Inline function 'kotlin.js.asDynamic' call\n if (ia === 1 / b) {\n tmp_1 = 0;\n } else {\n if (ia < 0) {\n tmp_1 = -1;\n } else {\n tmp_1 = 1;\n }\n }\n tmp_0 = tmp_1;\n }\n tmp = tmp_0;\n } else if (a !== a) {\n tmp = b !== b ? 0 : 1;\n } else {\n tmp = -1;\n }\n return tmp;\n}\nfunction primitiveCompareTo(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction compareToDoNotIntrinsicify(a, b) {\n return a.d(b);\n}\nfunction identityHashCode(obj) {\n return getObjectHashCode(obj);\n}\nfunction getObjectHashCode(obj) {\n // Inline function 'kotlin.js.jsIn' call\n if (!('kotlinHashCodeValue$' in obj)) {\n var hash = calculateRandomHash();\n var descriptor = new Object();\n descriptor.value = hash;\n descriptor.enumerable = false;\n Object.defineProperty(obj, 'kotlinHashCodeValue$', descriptor);\n }\n // Inline function 'kotlin.js.unsafeCast' call\n return obj['kotlinHashCodeValue$'];\n}\nfunction calculateRandomHash() {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n return Math.random() * 4.294967296E9 | 0;\n}\nfunction toString_2(o) {\n var tmp;\n if (o == null) {\n tmp = 'null';\n } else if (isArrayish(o)) {\n tmp = '[...]';\n } else if (!(typeof o.toString === 'function')) {\n tmp = anyToString(o);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n tmp = o.toString();\n }\n return tmp;\n}\nfunction anyToString(o) {\n return Object.prototype.toString.call(o);\n}\nfunction hashCode(obj) {\n if (obj == null)\n return 0;\n var typeOf = typeof obj;\n var tmp;\n switch (typeOf) {\n case 'object':\n tmp = 'function' === typeof obj.hashCode ? obj.hashCode() : getObjectHashCode(obj);\n break;\n case 'function':\n tmp = getObjectHashCode(obj);\n break;\n case 'number':\n tmp = getNumberHashCode(obj);\n break;\n case 'boolean':\n // Inline function 'kotlin.js.unsafeCast' call\n\n tmp = getBooleanHashCode(obj);\n break;\n case 'string':\n tmp = getStringHashCode(String(obj));\n break;\n case 'bigint':\n tmp = getBigIntHashCode(obj);\n break;\n case 'symbol':\n tmp = getSymbolHashCode(obj);\n break;\n default:\n tmp = function () {\n throw new Error('Unexpected typeof `' + typeOf + '`');\n }();\n break;\n }\n return tmp;\n}\nfunction getBooleanHashCode(value) {\n return value ? 1231 : 1237;\n}\nfunction getStringHashCode(str) {\n var hash = 0;\n var length = str.length;\n var inductionVariable = 0;\n var last = length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var code = str.charCodeAt(i);\n hash = imul_0(hash, 31) + code | 0;\n }\n while (!(i === last));\n return hash;\n}\nfunction getBigIntHashCode(value) {\n var shiftNumber = BigInt(32);\n var MASK = BigInt(4.294967295E9);\n var bigNumber = value < 0 ? -value : value;\n var hashCode = 0;\n var signum = value < 0 ? -1 : 1;\n while (bigNumber != 0) {\n // Inline function 'kotlin.js.unsafeCast' call\n var chunk = Number(bigNumber & MASK);\n hashCode = imul_0(31, hashCode) + chunk | 0;\n bigNumber = bigNumber >> shiftNumber;\n }\n return imul_0(hashCode, signum);\n}\nfunction getSymbolHashCode(value) {\n var hashCodeMap = symbolIsSharable(value) ? getSymbolMap() : getSymbolWeakMap();\n var cachedHashCode = hashCodeMap.get(value);\n if (cachedHashCode !== VOID)\n return cachedHashCode;\n var hash = calculateRandomHash();\n hashCodeMap.set(value, hash);\n return hash;\n}\nfunction symbolIsSharable(symbol) {\n return Symbol.keyFor(symbol) != VOID;\n}\nfunction getSymbolMap() {\n if (symbolMap === VOID) {\n symbolMap = new Map();\n }\n return symbolMap;\n}\nfunction getSymbolWeakMap() {\n if (symbolWeakMap === VOID) {\n symbolWeakMap = new WeakMap();\n }\n return symbolWeakMap;\n}\nvar symbolMap;\nvar symbolWeakMap;\nfunction equals(obj1, obj2) {\n if (obj1 == null) {\n return obj2 == null;\n }\n if (obj2 == null) {\n return false;\n }\n if (typeof obj1 === 'object' ? typeof obj1.equals === 'function' : false) {\n return obj1.equals(obj2);\n }\n if (obj1 !== obj1) {\n return obj2 !== obj2;\n }\n if (typeof obj1 === 'number' ? typeof obj2 === 'number' : false) {\n var tmp;\n if (obj1 === obj2) {\n var tmp_0;\n if (obj1 !== 0) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_1 = 1 / obj1;\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = tmp_1 === 1 / obj2;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n return tmp;\n }\n return obj1 === obj2;\n}\nfunction boxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n}\nfunction unboxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n}\nfunction captureStack(instance, constructorFunction) {\n if (Error.captureStackTrace != null) {\n Error.captureStackTrace(instance, constructorFunction);\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n instance.stack = (new Error()).stack;\n }\n}\nfunction protoOf(constructor) {\n return constructor.prototype;\n}\nfunction defineProp(obj, name, getter, setter) {\n return Object.defineProperty(obj, name, {configurable: true, get: getter, set: setter});\n}\nfunction objectCreate(proto) {\n return Object.create(proto);\n}\nfunction extendThrowable(this_, message, cause) {\n Error.call(this_);\n setPropertiesToThrowableInstance(this_, message, cause);\n}\nfunction setPropertiesToThrowableInstance(this_, message, cause) {\n var errorInfo = calculateErrorInfo(Object.getPrototypeOf(this_));\n if ((errorInfo & 1) === 0) {\n var tmp;\n if (message == null) {\n var tmp_0;\n if (!(message === null)) {\n var tmp1_elvis_lhs = cause == null ? null : cause.toString();\n tmp_0 = tmp1_elvis_lhs == null ? VOID : tmp1_elvis_lhs;\n } else {\n tmp_0 = VOID;\n }\n tmp = tmp_0;\n } else {\n tmp = message;\n }\n this_.message = tmp;\n }\n if ((errorInfo & 2) === 0) {\n this_.cause = cause;\n }\n this_.name = Object.getPrototypeOf(this_).constructor.name;\n}\nfunction ensureNotNull(v) {\n var tmp;\n if (v == null) {\n THROW_NPE();\n } else {\n tmp = v;\n }\n return tmp;\n}\nfunction THROW_NPE() {\n throw NullPointerException_init_$Create$();\n}\nfunction THROW_CCE() {\n throw ClassCastException_init_$Create$();\n}\nfunction lazy(initializer) {\n return new UnsafeLazyImpl(initializer);\n}\nfunction fillFrom(src, dst) {\n var srcLen = src.length;\n var dstLen = dst.length;\n var index = 0;\n // Inline function 'kotlin.js.unsafeCast' call\n var arr = dst;\n while (index < srcLen ? index < dstLen : false) {\n var tmp = index;\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n arr[tmp] = src[tmp0];\n }\n return dst;\n}\nfunction arrayCopyResize(source, newSize, defaultValue) {\n // Inline function 'kotlin.js.unsafeCast' call\n var result = source.slice(0, newSize);\n // Inline function 'kotlin.copyArrayType' call\n if (source.$type$ !== undefined) {\n result.$type$ = source.$type$;\n }\n var index = source.length;\n if (newSize > index) {\n // Inline function 'kotlin.js.asDynamic' call\n result.length = newSize;\n while (index < newSize) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n result[tmp0] = defaultValue;\n }\n }\n return result;\n}\nfunction Companion_4() {\n Companion_instance_4 = this;\n this.a6_1 = new Long(0, -2147483648);\n this.b6_1 = new Long(-1, 2147483647);\n this.c6_1 = 8;\n this.d6_1 = 64;\n}\nvar Companion_instance_4;\nfunction Companion_getInstance_4() {\n if (Companion_instance_4 == null)\n new Companion_4();\n return Companion_instance_4;\n}\nfunction Long(low, high) {\n Companion_getInstance_4();\n Number_0.call(this);\n this.x5_1 = low;\n this.y5_1 = high;\n}\nprotoOf(Long).e6 = function (other) {\n return compare(this, other);\n};\nprotoOf(Long).d = function (other) {\n return this.e6(other instanceof Long ? other : THROW_CCE());\n};\nprotoOf(Long).f6 = function (other) {\n return add(this, other);\n};\nprotoOf(Long).g6 = function (other) {\n return divide(this, other);\n};\nprotoOf(Long).h6 = function () {\n return this.i6().f6(new Long(1, 0));\n};\nprotoOf(Long).i6 = function () {\n return new Long(~this.x5_1, ~this.y5_1);\n};\nprotoOf(Long).j6 = function () {\n return this.x5_1;\n};\nprotoOf(Long).z5 = function () {\n return toNumber(this);\n};\nprotoOf(Long).valueOf = function () {\n return this.z5();\n};\nprotoOf(Long).equals = function (other) {\n var tmp;\n if (other instanceof Long) {\n tmp = equalsLong(this, other);\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(Long).hashCode = function () {\n return hashCode_0(this);\n};\nprotoOf(Long).toString = function () {\n return toStringImpl(this, 10);\n};\nfunction get_ZERO() {\n _init_properties_longjs_kt__tqrzid();\n return ZERO;\n}\nvar ZERO;\nfunction get_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return ONE;\n}\nvar ONE;\nfunction get_NEG_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return NEG_ONE;\n}\nvar NEG_ONE;\nfunction get_MAX_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MAX_VALUE;\n}\nvar MAX_VALUE;\nfunction get_MIN_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MIN_VALUE;\n}\nvar MIN_VALUE;\nfunction get_TWO_PWR_24_() {\n _init_properties_longjs_kt__tqrzid();\n return TWO_PWR_24_;\n}\nvar TWO_PWR_24_;\nfunction compare(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (equalsLong(_this__u8e3s4, other)) {\n return 0;\n }\n var thisNeg = isNegative(_this__u8e3s4);\n var otherNeg = isNegative(other);\n return (thisNeg ? !otherNeg : false) ? -1 : (!thisNeg ? otherNeg : false) ? 1 : isNegative(subtract(_this__u8e3s4, other)) ? -1 : 1;\n}\nfunction add(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n var a48 = _this__u8e3s4.y5_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.y5_1 & 65535;\n var a16 = _this__u8e3s4.x5_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.x5_1 & 65535;\n var b48 = other.y5_1 >>> 16 | 0;\n var b32 = other.y5_1 & 65535;\n var b16 = other.x5_1 >>> 16 | 0;\n var b00 = other.x5_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + (a00 + b00 | 0) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + (a16 + b16 | 0) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + (a32 + b32 | 0) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (a48 + b48 | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n}\nfunction subtract(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return add(_this__u8e3s4, other.h6());\n}\nfunction multiply(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n } else if (isZero(other)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n return isOdd(other) ? get_MIN_VALUE() : get_ZERO();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return isOdd(_this__u8e3s4) ? get_MIN_VALUE() : get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = multiply(negate(_this__u8e3s4), negate(other));\n } else {\n tmp = negate(multiply(negate(_this__u8e3s4), other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(multiply(_this__u8e3s4, negate(other)));\n }\n if (lessThan(_this__u8e3s4, get_TWO_PWR_24_()) ? lessThan(other, get_TWO_PWR_24_()) : false) {\n return fromNumber(toNumber(_this__u8e3s4) * toNumber(other));\n }\n var a48 = _this__u8e3s4.y5_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.y5_1 & 65535;\n var a16 = _this__u8e3s4.x5_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.x5_1 & 65535;\n var b48 = other.y5_1 >>> 16 | 0;\n var b32 = other.y5_1 & 65535;\n var b16 = other.x5_1 >>> 16 | 0;\n var b00 = other.x5_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + imul_0(a00, b00) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + imul_0(a16, b00) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c16 = c16 + imul_0(a00, b16) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + imul_0(a32, b00) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul_0(a16, b16) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul_0(a00, b32) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (((imul_0(a48, b00) + imul_0(a32, b16) | 0) + imul_0(a16, b32) | 0) + imul_0(a00, b48) | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n}\nfunction divide(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(other)) {\n throw Exception_init_$Create$_0('division by zero');\n } else if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n if (equalsLong(other, get_ONE()) ? true : equalsLong(other, get_NEG_ONE())) {\n return get_MIN_VALUE();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ONE();\n } else {\n var halfThis = shiftRight(_this__u8e3s4, 1);\n var approx = shiftLeft(halfThis.g6(other), 1);\n if (equalsLong(approx, get_ZERO())) {\n return isNegative(other) ? get_ONE() : get_NEG_ONE();\n } else {\n var rem = subtract(_this__u8e3s4, multiply(other, approx));\n return add(approx, rem.g6(other));\n }\n }\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = negate(_this__u8e3s4).g6(negate(other));\n } else {\n tmp = negate(negate(_this__u8e3s4).g6(other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(_this__u8e3s4.g6(negate(other)));\n }\n var res = get_ZERO();\n var rem_0 = _this__u8e3s4;\n while (greaterThanOrEqual(rem_0, other)) {\n var approxDouble = toNumber(rem_0) / toNumber(other);\n var approx2 = Math.max(1.0, Math.floor(approxDouble));\n var log2 = Math.ceil(Math.log(approx2) / Math.LN2);\n var delta = log2 <= 48.0 ? 1.0 : Math.pow(2.0, log2 - 48);\n var approxRes = fromNumber(approx2);\n var approxRem = multiply(approxRes, other);\n while (isNegative(approxRem) ? true : greaterThan(approxRem, rem_0)) {\n approx2 = approx2 - delta;\n approxRes = fromNumber(approx2);\n approxRem = multiply(approxRes, other);\n }\n if (isZero(approxRes)) {\n approxRes = get_ONE();\n }\n res = add(res, approxRes);\n rem_0 = subtract(rem_0, approxRem);\n }\n return res;\n}\nfunction shiftLeft(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.x5_1 << numBits_0, _this__u8e3s4.y5_1 << numBits_0 | (_this__u8e3s4.x5_1 >>> (32 - numBits_0 | 0) | 0));\n } else {\n return new Long(0, _this__u8e3s4.x5_1 << (numBits_0 - 32 | 0));\n }\n }\n}\nfunction shiftRight(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.x5_1 >>> numBits_0 | 0 | _this__u8e3s4.y5_1 << (32 - numBits_0 | 0), _this__u8e3s4.y5_1 >> numBits_0);\n } else {\n return new Long(_this__u8e3s4.y5_1 >> (numBits_0 - 32 | 0), _this__u8e3s4.y5_1 >= 0 ? 0 : -1);\n }\n }\n}\nfunction toNumber(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 * 4.294967296E9 + getLowBitsUnsigned(_this__u8e3s4);\n}\nfunction equalsLong(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 === other.y5_1 ? _this__u8e3s4.x5_1 === other.x5_1 : false;\n}\nfunction hashCode_0(l) {\n _init_properties_longjs_kt__tqrzid();\n return l.x5_1 ^ l.y5_1;\n}\nfunction toStringImpl(_this__u8e3s4, radix) {\n _init_properties_longjs_kt__tqrzid();\n if (radix < 2 ? true : 36 < radix) {\n throw Exception_init_$Create$_0('radix out of range: ' + radix);\n }\n if (isZero(_this__u8e3s4)) {\n return '0';\n }\n if (isNegative(_this__u8e3s4)) {\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n var radixLong = fromInt(radix);\n var div = _this__u8e3s4.g6(radixLong);\n var rem = subtract(multiply(div, radixLong), _this__u8e3s4).j6();\n var tmp = toStringImpl(div, radix);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return tmp + rem.toString(radix);\n } else {\n return '-' + toStringImpl(negate(_this__u8e3s4), radix);\n }\n }\n var digitsPerTime = radix === 2 ? 31 : radix <= 10 ? 9 : radix <= 21 ? 7 : radix <= 35 ? 6 : 5;\n var radixToPower = fromNumber(Math.pow(radix, digitsPerTime));\n var rem_0 = _this__u8e3s4;\n var result = '';\n while (true) {\n var remDiv = rem_0.g6(radixToPower);\n var intval = subtract(rem_0, multiply(remDiv, radixToPower)).j6();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var digits = intval.toString(radix);\n rem_0 = remDiv;\n if (isZero(rem_0)) {\n return digits + result;\n } else {\n while (digits.length < digitsPerTime) {\n digits = '0' + digits;\n }\n result = digits + result;\n }\n }\n}\nfunction fromInt(value) {\n _init_properties_longjs_kt__tqrzid();\n return new Long(value, value < 0 ? -1 : 0);\n}\nfunction isNegative(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 < 0;\n}\nfunction isZero(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 === 0 ? _this__u8e3s4.x5_1 === 0 : false;\n}\nfunction isOdd(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return (_this__u8e3s4.x5_1 & 1) === 1;\n}\nfunction negate(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.h6();\n}\nfunction lessThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) < 0;\n}\nfunction fromNumber(value) {\n _init_properties_longjs_kt__tqrzid();\n if (isNaN_0(value)) {\n return get_ZERO();\n } else if (value <= -9.223372036854776E18) {\n return get_MIN_VALUE();\n } else if (value + 1 >= 9.223372036854776E18) {\n return get_MAX_VALUE();\n } else if (value < 0.0) {\n return negate(fromNumber(-value));\n } else {\n var twoPwr32 = 4.294967296E9;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp = value % twoPwr32 | 0;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp$ret$1 = value / twoPwr32 | 0;\n return new Long(tmp, tmp$ret$1);\n }\n}\nfunction greaterThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) > 0;\n}\nfunction greaterThanOrEqual(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) >= 0;\n}\nfunction getLowBitsUnsigned(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.x5_1 >= 0 ? _this__u8e3s4.x5_1 : 4.294967296E9 + _this__u8e3s4.x5_1;\n}\nvar properties_initialized_longjs_kt_5aju7t;\nfunction _init_properties_longjs_kt__tqrzid() {\n if (!properties_initialized_longjs_kt_5aju7t) {\n properties_initialized_longjs_kt_5aju7t = true;\n ZERO = fromInt(0);\n ONE = fromInt(1);\n NEG_ONE = fromInt(-1);\n MAX_VALUE = new Long(-1, 2147483647);\n MIN_VALUE = new Long(0, -2147483648);\n TWO_PWR_24_ = fromInt(16777216);\n }\n}\nfunction classMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('class', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n}\nfunction createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, iid) {\n var undef = VOID;\n return {kind: kind, simpleName: name, associatedObjectKey: associatedObjectKey, associatedObjects: associatedObjects, suspendArity: suspendArity, $kClass$: undef, defaultConstructor: defaultConstructor, iid: iid};\n}\nfunction setMetadataFor(ctor, name, metadataConstructor, parent, interfaces, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n if (!(parent == null)) {\n ctor.prototype = Object.create(parent.prototype);\n ctor.prototype.constructor = ctor;\n }\n var metadata = metadataConstructor(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity == null ? [] : suspendArity);\n ctor.$metadata$ = metadata;\n if (!(interfaces == null)) {\n var receiver = !(metadata.iid == null) ? ctor : ctor.prototype;\n receiver.$imask$ = implement(interfaces);\n }\n}\nfunction interfaceMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('interface', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, generateInterfaceId());\n}\nfunction generateInterfaceId() {\n if (iid === VOID) {\n iid = 0;\n }\n // Inline function 'kotlin.js.unsafeCast' call\n iid = iid + 1 | 0;\n // Inline function 'kotlin.js.unsafeCast' call\n return iid;\n}\nvar iid;\nfunction objectMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('object', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n}\nfunction numberToInt(a) {\n var tmp;\n if (a instanceof Long) {\n tmp = a.j6();\n } else {\n tmp = doubleToInt(a);\n }\n return tmp;\n}\nfunction doubleToInt(a) {\n var tmp;\n if (a > 2.147483647E9) {\n tmp = 2147483647;\n } else if (a < -2.147483648E9) {\n tmp = -2147483648;\n } else {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n tmp = a | 0;\n }\n return tmp;\n}\nfunction toShort(a) {\n // Inline function 'kotlin.js.unsafeCast' call\n return a << 16 >> 16;\n}\nfunction numberToChar(a) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = numberToInt(a);\n var tmp$ret$0 = _UShort___init__impl__jigrne(toShort(this_0));\n return _Char___init__impl__6a9atx_0(tmp$ret$0);\n}\nfunction numberRangeToNumber(start, endInclusive) {\n return new IntRange(start, endInclusive);\n}\nfunction get_propertyRefClassMetadataCache() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return propertyRefClassMetadataCache;\n}\nvar propertyRefClassMetadataCache;\nfunction metadataObject() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return classMeta(VOID, VOID, VOID, VOID, VOID);\n}\nfunction getPropertyCallableRef(name, paramCount, superType, getter, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n getter.get = getter;\n getter.set = setter;\n getter.callableName = name;\n // Inline function 'kotlin.js.unsafeCast' call\n return getPropertyRefClass(getter, getKPropMetadata(paramCount, setter), getInterfaceMaskFor(getter, superType));\n}\nfunction getPropertyRefClass(obj, metadata, imask) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n obj.$metadata$ = metadata;\n obj.constructor = obj;\n obj.$imask$ = imask;\n return obj;\n}\nfunction getKPropMetadata(paramCount, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return get_propertyRefClassMetadataCache()[paramCount][setter == null ? 0 : 1];\n}\nfunction getInterfaceMaskFor(obj, superType) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [superType];\n tmp = implement(tmp$ret$2);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nvar properties_initialized_reflectRuntime_kt_inkhwd;\nfunction _init_properties_reflectRuntime_kt__5r4uu3() {\n if (!properties_initialized_reflectRuntime_kt_inkhwd) {\n properties_initialized_reflectRuntime_kt_inkhwd = true;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n propertyRefClassMetadataCache = [tmp, tmp_0, [metadataObject(), metadataObject()]];\n }\n}\nfunction isArrayish(o) {\n return isJsArray(o) ? true : isView(o);\n}\nfunction isJsArray(obj) {\n // Inline function 'kotlin.js.unsafeCast' call\n return Array.isArray(obj);\n}\nfunction isInterface(obj, iface) {\n return isInterfaceImpl(obj, iface.$metadata$.iid);\n}\nfunction isInterfaceImpl(obj, iface) {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var mask = tmp;\n return isBitSet(mask, iface);\n}\nfunction isArray(obj) {\n var tmp;\n if (isJsArray(obj)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = !obj.$type$;\n } else {\n tmp = false;\n }\n return tmp;\n}\nfunction isNumber(a) {\n var tmp;\n if (typeof a === 'number') {\n tmp = true;\n } else {\n tmp = a instanceof Long;\n }\n return tmp;\n}\nfunction isComparable(value) {\n var type = typeof value;\n return ((type === 'string' ? true : type === 'boolean') ? true : isNumber(value)) ? true : isInterface(value, Comparable);\n}\nfunction isCharSequence(value) {\n return typeof value === 'string' ? true : isInterface(value, CharSequence);\n}\nfunction calculateErrorInfo(proto) {\n var tmp0_safe_receiver = proto.constructor;\n var metadata = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.$metadata$;\n var tmp2_safe_receiver = metadata == null ? null : metadata.errorInfo;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp2_safe_receiver;\n }\n var result = 0;\n if (hasProp(proto, 'message'))\n result = result | 1;\n if (hasProp(proto, 'cause'))\n result = result | 2;\n if (!(result === 3)) {\n var parentProto = getPrototypeOf(proto);\n if (parentProto != Error.prototype) {\n result = result | calculateErrorInfo(parentProto);\n }\n }\n if (!(metadata == null)) {\n metadata.errorInfo = result;\n }\n return result;\n}\nfunction hasProp(proto, propName) {\n return proto.hasOwnProperty(propName);\n}\nfunction getPrototypeOf(obj) {\n return Object.getPrototypeOf(obj);\n}\nfunction get_VOID() {\n _init_properties_void_kt__3zg9as();\n return VOID;\n}\nvar VOID;\nvar properties_initialized_void_kt_e4ret2;\nfunction _init_properties_void_kt__3zg9as() {\n if (!properties_initialized_void_kt_e4ret2) {\n properties_initialized_void_kt_e4ret2 = true;\n VOID = void 0;\n }\n}\nfunction fill(_this__u8e3s4, element, fromIndex, toIndex) {\n fromIndex = fromIndex === VOID ? 0 : fromIndex;\n toIndex = toIndex === VOID ? _this__u8e3s4.length : toIndex;\n Companion_instance_5.k6(fromIndex, toIndex, _this__u8e3s4.length);\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(element, fromIndex, toIndex);\n}\nfunction asList(_this__u8e3s4) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return new ArrayList(_this__u8e3s4);\n}\nfunction sort_0(_this__u8e3s4) {\n if (_this__u8e3s4.length > 1) {\n sortArray(_this__u8e3s4);\n }\n}\nfunction sortWith_0(_this__u8e3s4, comparator) {\n if (_this__u8e3s4.length > 1) {\n sortArrayWith(_this__u8e3s4, comparator);\n }\n}\nfunction copyOf(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return fillFrom(_this__u8e3s4, new Int32Array(newSize));\n}\nfunction copyOf_0(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return arrayCopyResize(_this__u8e3s4, newSize, null);\n}\nfunction reverse(_this__u8e3s4) {\n var midPoint = (_this__u8e3s4.i() / 2 | 0) - 1 | 0;\n if (midPoint < 0)\n return Unit_instance;\n var reverseIndex = get_lastIndex_0(_this__u8e3s4);\n var inductionVariable = 0;\n if (inductionVariable <= midPoint)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = _this__u8e3s4.w(index);\n _this__u8e3s4.j(index, _this__u8e3s4.w(reverseIndex));\n _this__u8e3s4.j(reverseIndex, tmp);\n reverseIndex = reverseIndex - 1 | 0;\n }\n while (!(index === midPoint));\n}\nfunction digitToIntImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n var index = binarySearchRange(Digit_getInstance().l6_1, ch);\n var diff = ch - Digit_getInstance().l6_1[index] | 0;\n return diff < 10 ? diff : -1;\n}\nfunction binarySearchRange(array, needle) {\n var bottom = 0;\n var top = array.length - 1 | 0;\n var middle = -1;\n var value = 0;\n while (bottom <= top) {\n middle = (bottom + top | 0) / 2 | 0;\n value = array[middle];\n if (needle > value)\n bottom = middle + 1 | 0;\n else if (needle === value)\n return middle;\n else\n top = middle - 1 | 0;\n }\n return middle - (needle < value ? 1 : 0) | 0;\n}\nfunction Digit() {\n Digit_instance = this;\n var tmp = this;\n // Inline function 'kotlin.intArrayOf' call\n tmp.l6_1 = new Int32Array([48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296]);\n}\nvar Digit_instance;\nfunction Digit_getInstance() {\n if (Digit_instance == null)\n new Digit();\n return Digit_instance;\n}\nfunction isWhitespaceImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n return (((9 <= ch ? ch <= 13 : false) ? true : 28 <= ch ? ch <= 32 : false) ? true : ch === 160) ? true : ch > 4096 ? (((((ch === 5760 ? true : 8192 <= ch ? ch <= 8202 : false) ? true : ch === 8232) ? true : ch === 8233) ? true : ch === 8239) ? true : ch === 8287) ? true : ch === 12288 : false;\n}\nfunction releaseIntercepted($this) {\n var intercepted = $this.t6_1;\n if (!(intercepted == null) ? !(intercepted === $this) : false) {\n ensureNotNull($this.u6().v6(Key_instance)).w6(intercepted);\n }\n $this.t6_1 = CompletedContinuation_instance;\n}\nfunction CoroutineImpl(resultContinuation) {\n this.m6_1 = resultContinuation;\n this.n6_1 = 0;\n this.o6_1 = 0;\n this.p6_1 = null;\n this.q6_1 = null;\n this.r6_1 = null;\n var tmp = this;\n var tmp0_safe_receiver = this.m6_1;\n tmp.s6_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u6();\n this.t6_1 = null;\n}\nprotoOf(CoroutineImpl).u6 = function () {\n return ensureNotNull(this.s6_1);\n};\nprotoOf(CoroutineImpl).x6 = function (result) {\n var current = this;\n // Inline function 'kotlin.Result.getOrNull' call\n var tmp;\n if (_Result___get_isFailure__impl__jpiriv(result)) {\n tmp = null;\n } else {\n var tmp_0 = _Result___get_value__impl__bjfvqg(result);\n tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();\n }\n var currentResult = tmp;\n var currentException = Result__exceptionOrNull_impl_p6xea9(result);\n while (true) {\n // Inline function 'kotlin.with' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$with = current;\n if (currentException == null) {\n $this$with.p6_1 = currentResult;\n } else {\n $this$with.n6_1 = $this$with.o6_1;\n $this$with.q6_1 = currentException;\n }\n try {\n var outcome = $this$with.y6();\n if (outcome === get_COROUTINE_SUSPENDED())\n return Unit_instance;\n currentResult = outcome;\n currentException = null;\n } catch ($p) {\n var exception = $p;\n currentResult = null;\n // Inline function 'kotlin.js.unsafeCast' call\n currentException = exception;\n }\n releaseIntercepted($this$with);\n var completion = ensureNotNull($this$with.m6_1);\n var tmp_1;\n if (completion instanceof CoroutineImpl) {\n current = completion;\n tmp_1 = Unit_instance;\n } else {\n if (!(currentException == null)) {\n // Inline function 'kotlin.coroutines.resumeWithException' call\n // Inline function 'kotlin.Companion.failure' call\n var exception_0 = ensureNotNull(currentException);\n var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(exception_0));\n completion.z6(tmp$ret$2);\n } else {\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var value = currentResult;\n var tmp$ret$4 = _Result___init__impl__xyqfz8(value);\n completion.z6(tmp$ret$4);\n }\n return Unit_instance;\n }\n }\n};\nprotoOf(CoroutineImpl).z6 = function (result) {\n return this.x6(result);\n};\nfunction CompletedContinuation() {\n}\nprotoOf(CompletedContinuation).u6 = function () {\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n};\nprotoOf(CompletedContinuation).x6 = function (result) {\n // Inline function 'kotlin.error' call\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n};\nprotoOf(CompletedContinuation).z6 = function (result) {\n return this.x6(result);\n};\nprotoOf(CompletedContinuation).toString = function () {\n return 'This continuation is already complete';\n};\nvar CompletedContinuation_instance;\nfunction CompletedContinuation_getInstance() {\n return CompletedContinuation_instance;\n}\nfunction createCoroutineUnintercepted(_this__u8e3s4, receiver, completion) {\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineFromSuspendFunction' call\n return new _no_name_provided__qut3iv_0(completion, _this__u8e3s4, receiver, completion);\n}\nfunction invokeSuspendSuperTypeWithReceiver(_this__u8e3s4, receiver, completion) {\n throw new NotImplementedError('It is intrinsic method');\n}\nfunction _no_name_provided__qut3iv_0($completion, $this_createCoroutineUnintercepted, $receiver, $completion$1) {\n this.i7_1 = $this_createCoroutineUnintercepted;\n this.j7_1 = $receiver;\n this.k7_1 = $completion$1;\n CoroutineImpl.call(this, isInterface($completion, Continuation) ? $completion : THROW_CCE());\n}\nprotoOf(_no_name_provided__qut3iv_0).y6 = function () {\n if (this.q6_1 != null)\n throw this.q6_1;\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineUnintercepted.' call\n // Inline function 'kotlin.js.asDynamic' call\n var a = this.i7_1;\n return typeof a === 'function' ? a(this.j7_1, this.k7_1) : this.i7_1.l7(this.j7_1, this.k7_1);\n};\nfunction Exception_init_$Init$($this) {\n extendThrowable($this);\n Exception.call($this);\n return $this;\n}\nfunction Exception_init_$Create$() {\n var tmp = Exception_init_$Init$(objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$);\n return tmp;\n}\nfunction Exception_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Exception.call($this);\n return $this;\n}\nfunction Exception_init_$Create$_0(message) {\n var tmp = Exception_init_$Init$_0(message, objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$_0);\n return tmp;\n}\nfunction Exception() {\n captureStack(this, Exception);\n}\nfunction IllegalArgumentException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalArgumentException.call($this);\n return $this;\n}\nfunction IllegalArgumentException_init_$Create$() {\n var tmp = IllegalArgumentException_init_$Init$(objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$);\n return tmp;\n}\nfunction IllegalArgumentException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalArgumentException.call($this);\n return $this;\n}\nfunction IllegalArgumentException_init_$Create$_0(message) {\n var tmp = IllegalArgumentException_init_$Init$_0(message, objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$_0);\n return tmp;\n}\nfunction IllegalArgumentException() {\n captureStack(this, IllegalArgumentException);\n}\nfunction IndexOutOfBoundsException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IndexOutOfBoundsException.call($this);\n return $this;\n}\nfunction IndexOutOfBoundsException_init_$Create$() {\n var tmp = IndexOutOfBoundsException_init_$Init$(objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$);\n return tmp;\n}\nfunction IndexOutOfBoundsException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IndexOutOfBoundsException.call($this);\n return $this;\n}\nfunction IndexOutOfBoundsException_init_$Create$_0(message) {\n var tmp = IndexOutOfBoundsException_init_$Init$_0(message, objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$_0);\n return tmp;\n}\nfunction IndexOutOfBoundsException() {\n captureStack(this, IndexOutOfBoundsException);\n}\nfunction IllegalStateException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalStateException.call($this);\n return $this;\n}\nfunction IllegalStateException_init_$Create$() {\n var tmp = IllegalStateException_init_$Init$(objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$);\n return tmp;\n}\nfunction IllegalStateException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalStateException.call($this);\n return $this;\n}\nfunction IllegalStateException_init_$Create$_0(message) {\n var tmp = IllegalStateException_init_$Init$_0(message, objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$_0);\n return tmp;\n}\nfunction IllegalStateException() {\n captureStack(this, IllegalStateException);\n}\nfunction UnsupportedOperationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n UnsupportedOperationException.call($this);\n return $this;\n}\nfunction UnsupportedOperationException_init_$Create$() {\n var tmp = UnsupportedOperationException_init_$Init$(objectCreate(protoOf(UnsupportedOperationException)));\n captureStack(tmp, UnsupportedOperationException_init_$Create$);\n return tmp;\n}\nfunction UnsupportedOperationException() {\n captureStack(this, UnsupportedOperationException);\n}\nfunction RuntimeException_init_$Init$($this) {\n Exception_init_$Init$($this);\n RuntimeException.call($this);\n return $this;\n}\nfunction RuntimeException_init_$Create$() {\n var tmp = RuntimeException_init_$Init$(objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$);\n return tmp;\n}\nfunction RuntimeException_init_$Init$_0(message, $this) {\n Exception_init_$Init$_0(message, $this);\n RuntimeException.call($this);\n return $this;\n}\nfunction RuntimeException_init_$Create$_0(message) {\n var tmp = RuntimeException_init_$Init$_0(message, objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$_0);\n return tmp;\n}\nfunction RuntimeException() {\n captureStack(this, RuntimeException);\n}\nfunction NoSuchElementException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NoSuchElementException.call($this);\n return $this;\n}\nfunction NoSuchElementException_init_$Create$() {\n var tmp = NoSuchElementException_init_$Init$(objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$);\n return tmp;\n}\nfunction NoSuchElementException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n NoSuchElementException.call($this);\n return $this;\n}\nfunction NoSuchElementException_init_$Create$_0(message) {\n var tmp = NoSuchElementException_init_$Init$_0(message, objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$_0);\n return tmp;\n}\nfunction NoSuchElementException() {\n captureStack(this, NoSuchElementException);\n}\nfunction Error_init_$Init$($this) {\n extendThrowable($this);\n Error_0.call($this);\n return $this;\n}\nfunction Error_init_$Create$() {\n var tmp = Error_init_$Init$(objectCreate(protoOf(Error_0)));\n captureStack(tmp, Error_init_$Create$);\n return tmp;\n}\nfunction Error_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Error_0.call($this);\n return $this;\n}\nfunction Error_0() {\n captureStack(this, Error_0);\n}\nfunction NumberFormatException_init_$Init$($this) {\n IllegalArgumentException_init_$Init$($this);\n NumberFormatException.call($this);\n return $this;\n}\nfunction NumberFormatException_init_$Create$() {\n var tmp = NumberFormatException_init_$Init$(objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$);\n return tmp;\n}\nfunction NumberFormatException_init_$Init$_0(message, $this) {\n IllegalArgumentException_init_$Init$_0(message, $this);\n NumberFormatException.call($this);\n return $this;\n}\nfunction NumberFormatException_init_$Create$_0(message) {\n var tmp = NumberFormatException_init_$Init$_0(message, objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$_0);\n return tmp;\n}\nfunction NumberFormatException() {\n captureStack(this, NumberFormatException);\n}\nfunction ArithmeticException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ArithmeticException.call($this);\n return $this;\n}\nfunction ArithmeticException_init_$Create$() {\n var tmp = ArithmeticException_init_$Init$(objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$);\n return tmp;\n}\nfunction ArithmeticException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n ArithmeticException.call($this);\n return $this;\n}\nfunction ArithmeticException_init_$Create$_0(message) {\n var tmp = ArithmeticException_init_$Init$_0(message, objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$_0);\n return tmp;\n}\nfunction ArithmeticException() {\n captureStack(this, ArithmeticException);\n}\nfunction ConcurrentModificationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ConcurrentModificationException.call($this);\n return $this;\n}\nfunction ConcurrentModificationException_init_$Create$() {\n var tmp = ConcurrentModificationException_init_$Init$(objectCreate(protoOf(ConcurrentModificationException)));\n captureStack(tmp, ConcurrentModificationException_init_$Create$);\n return tmp;\n}\nfunction ConcurrentModificationException() {\n captureStack(this, ConcurrentModificationException);\n}\nfunction NullPointerException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NullPointerException.call($this);\n return $this;\n}\nfunction NullPointerException_init_$Create$() {\n var tmp = NullPointerException_init_$Init$(objectCreate(protoOf(NullPointerException)));\n captureStack(tmp, NullPointerException_init_$Create$);\n return tmp;\n}\nfunction NullPointerException() {\n captureStack(this, NullPointerException);\n}\nfunction ClassCastException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ClassCastException.call($this);\n return $this;\n}\nfunction ClassCastException_init_$Create$() {\n var tmp = ClassCastException_init_$Init$(objectCreate(protoOf(ClassCastException)));\n captureStack(tmp, ClassCastException_init_$Create$);\n return tmp;\n}\nfunction ClassCastException() {\n captureStack(this, ClassCastException);\n}\nfunction AbstractCollection$toString$lambda(this$0) {\n return function (it) {\n return it === this$0 ? '(this Collection)' : toString_1(it);\n };\n}\nfunction AbstractCollection() {\n}\nprotoOf(AbstractCollection).q = function (element) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp;\n if (isInterface(this, Collection)) {\n tmp = this.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this.n();\n while (tmp0_iterator.o()) {\n var element_0 = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractCollection.contains.' call\n if (equals(element_0, element)) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractCollection).r = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractCollection.containsAll.' call\n if (!this.q(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractCollection).s = function () {\n return this.i() === 0;\n};\nprotoOf(AbstractCollection).toString = function () {\n return joinToString_0(this, ', ', '[', ']', VOID, VOID, AbstractCollection$toString$lambda(this));\n};\nprotoOf(AbstractCollection).toArray = function () {\n return collectionToArray(this);\n};\nfunction Companion_5() {\n this.e1_1 = 2147483639;\n}\nprotoOf(Companion_5).e2 = function (index, size) {\n if (index < 0 ? true : index >= size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n};\nprotoOf(Companion_5).f1 = function (index, size) {\n if (index < 0 ? true : index > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n};\nprotoOf(Companion_5).k6 = function (fromIndex, toIndex, size) {\n if (fromIndex < 0 ? true : toIndex > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('fromIndex: ' + fromIndex + ', toIndex: ' + toIndex + ', size: ' + size);\n }\n if (fromIndex > toIndex) {\n throw IllegalArgumentException_init_$Create$_0('fromIndex: ' + fromIndex + ' > toIndex: ' + toIndex);\n }\n};\nprotoOf(Companion_5).g3 = function (oldCapacity, minCapacity) {\n var newCapacity = oldCapacity + (oldCapacity >> 1) | 0;\n if ((newCapacity - minCapacity | 0) < 0)\n newCapacity = minCapacity;\n if ((newCapacity - 2147483639 | 0) > 0)\n newCapacity = minCapacity > 2147483639 ? IntCompanionObject_instance.MAX_VALUE : 2147483639;\n return newCapacity;\n};\nprotoOf(Companion_5).m1 = function (c) {\n var hashCode_0 = 1;\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var e = tmp0_iterator.p();\n var tmp = imul_0(31, hashCode_0);\n var tmp2_elvis_lhs = e == null ? null : hashCode(e);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n};\nprotoOf(Companion_5).l1 = function (c, other) {\n if (!(c.i() === other.i()))\n return false;\n var otherIterator = other.n();\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var elem = tmp0_iterator.p();\n var elemOther = otherIterator.p();\n if (!equals(elem, elemOther)) {\n return false;\n }\n }\n return true;\n};\nvar Companion_instance_5;\nfunction Companion_getInstance_5() {\n return Companion_instance_5;\n}\nfunction toString_3($this, o) {\n return o === $this ? '(this Map)' : toString_1(o);\n}\nfunction implFindEntry($this, key) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = $this.x1().n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMap.implFindEntry.' call\n if (equals(element.h4(), key)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n}\nfunction Companion_6() {\n}\nvar Companion_instance_6;\nfunction Companion_getInstance_6() {\n return Companion_instance_6;\n}\nfunction AbstractMap$toString$lambda(this$0) {\n return function (it) {\n return this$0.o7(it);\n };\n}\nfunction AbstractMap() {\n this.s1_1 = null;\n this.t1_1 = null;\n}\nprotoOf(AbstractMap).u1 = function (key) {\n return !(implFindEntry(this, key) == null);\n};\nprotoOf(AbstractMap).v1 = function (entry) {\n if (!(!(entry == null) ? isInterface(entry, Entry) : false))\n return false;\n var key = entry.h4();\n var value = entry.i4();\n // Inline function 'kotlin.collections.get' call\n var ourValue = (isInterface(this, Map_0) ? this : THROW_CCE()).w1(key);\n if (!equals(value, ourValue)) {\n return false;\n }\n var tmp;\n if (ourValue == null) {\n // Inline function 'kotlin.collections.containsKey' call\n tmp = !(isInterface(this, Map_0) ? this : THROW_CCE()).u1(key);\n } else {\n tmp = false;\n }\n if (tmp) {\n return false;\n }\n return true;\n};\nprotoOf(AbstractMap).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Map_0) : false))\n return false;\n if (!(this.i() === other.i()))\n return false;\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = other.x1();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMap.equals.' call\n if (!this.v1(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractMap).w1 = function (key) {\n var tmp0_safe_receiver = implFindEntry(this, key);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i4();\n};\nprotoOf(AbstractMap).hashCode = function () {\n return hashCode(this.x1());\n};\nprotoOf(AbstractMap).i = function () {\n return this.x1().i();\n};\nprotoOf(AbstractMap).toString = function () {\n var tmp = this.x1();\n return joinToString_0(tmp, ', ', '{', '}', VOID, VOID, AbstractMap$toString$lambda(this));\n};\nprotoOf(AbstractMap).o7 = function (entry) {\n return toString_3(this, entry.h4()) + '=' + toString_3(this, entry.i4());\n};\nfunction Companion_7() {\n}\nprotoOf(Companion_7).z1 = function (c) {\n var hashCode_0 = 0;\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n var tmp = hashCode_0;\n var tmp2_elvis_lhs = element == null ? null : hashCode(element);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n};\nprotoOf(Companion_7).y1 = function (c, other) {\n if (!(c.i() === other.i()))\n return false;\n // Inline function 'kotlin.collections.containsAll' call\n return c.r(other);\n};\nvar Companion_instance_7;\nfunction Companion_getInstance_7() {\n return Companion_instance_7;\n}\nfunction collectionToArrayCommonImpl(collection) {\n if (collection.s()) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.arrayOfNulls' call\n var size = collection.i();\n var destination = fillArrayVal(Array(size), null);\n var iterator = collection.n();\n var index = 0;\n while (iterator.o()) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n destination[tmp0] = iterator.p();\n }\n return destination;\n}\nfunction mutableListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n}\nfunction listOf_0(elements) {\n return elements.length > 0 ? asList(elements) : emptyList();\n}\nfunction emptyList() {\n return EmptyList_getInstance();\n}\nfunction arrayListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n}\nfunction EmptyIterator() {\n}\nprotoOf(EmptyIterator).o = function () {\n return false;\n};\nprotoOf(EmptyIterator).p = function () {\n throw NoSuchElementException_init_$Create$();\n};\nvar EmptyIterator_instance;\nfunction EmptyIterator_getInstance() {\n return EmptyIterator_instance;\n}\nfunction ArrayAsCollection(values, isVarargs) {\n this.p7_1 = values;\n this.q7_1 = isVarargs;\n}\nprotoOf(ArrayAsCollection).i = function () {\n return this.p7_1.length;\n};\nprotoOf(ArrayAsCollection).s = function () {\n // Inline function 'kotlin.collections.isEmpty' call\n return this.p7_1.length === 0;\n};\nprotoOf(ArrayAsCollection).r7 = function (element) {\n return contains(this.p7_1, element);\n};\nprotoOf(ArrayAsCollection).s7 = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.ArrayAsCollection.containsAll.' call\n if (!this.r7(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(ArrayAsCollection).r = function (elements) {\n return this.s7(elements);\n};\nprotoOf(ArrayAsCollection).n = function () {\n return arrayIterator(this.p7_1);\n};\nfunction EmptyList() {\n EmptyList_instance = this;\n this.t7_1 = new Long(-1478467534, -1720727600);\n}\nprotoOf(EmptyList).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, List) : false) {\n tmp = other.s();\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EmptyList).hashCode = function () {\n return 1;\n};\nprotoOf(EmptyList).toString = function () {\n return '[]';\n};\nprotoOf(EmptyList).i = function () {\n return 0;\n};\nprotoOf(EmptyList).s = function () {\n return true;\n};\nprotoOf(EmptyList).u7 = function (elements) {\n return elements.s();\n};\nprotoOf(EmptyList).r = function (elements) {\n return this.u7(elements);\n};\nprotoOf(EmptyList).w = function (index) {\n throw IndexOutOfBoundsException_init_$Create$_0(\"Empty list doesn't contain element at index \" + index + '.');\n};\nprotoOf(EmptyList).n = function () {\n return EmptyIterator_instance;\n};\nvar EmptyList_instance;\nfunction EmptyList_getInstance() {\n if (EmptyList_instance == null)\n new EmptyList();\n return EmptyList_instance;\n}\nfunction get_lastIndex_0(_this__u8e3s4) {\n return _this__u8e3s4.i() - 1 | 0;\n}\nfunction optimizeReadOnlyList(_this__u8e3s4) {\n switch (_this__u8e3s4.i()) {\n case 0:\n return emptyList();\n case 1:\n return listOf(_this__u8e3s4.w(0));\n default:\n return _this__u8e3s4;\n }\n}\nfunction throwIndexOverflow() {\n throw ArithmeticException_init_$Create$_0('Index overflow has happened.');\n}\nfunction IndexedValue(index, value) {\n this.e5_1 = index;\n this.f5_1 = value;\n}\nprotoOf(IndexedValue).toString = function () {\n return 'IndexedValue(index=' + this.e5_1 + ', value=' + this.f5_1 + ')';\n};\nprotoOf(IndexedValue).hashCode = function () {\n var result = this.e5_1;\n result = imul_0(result, 31) + (this.f5_1 == null ? 0 : hashCode(this.f5_1)) | 0;\n return result;\n};\nprotoOf(IndexedValue).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof IndexedValue))\n return false;\n var tmp0_other_with_cast = other instanceof IndexedValue ? other : THROW_CCE();\n if (!(this.e5_1 === tmp0_other_with_cast.e5_1))\n return false;\n if (!equals(this.f5_1, tmp0_other_with_cast.f5_1))\n return false;\n return true;\n};\nfunction flatten(_this__u8e3s4) {\n var result = ArrayList_init_$Create$();\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n addAll(result, element);\n }\n return result;\n}\nfunction collectionSizeOrDefault(_this__u8e3s4, default_0) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = _this__u8e3s4.i();\n } else {\n tmp = default_0;\n }\n return tmp;\n}\nfunction removeLast(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.s()) {\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n } else {\n tmp = _this__u8e3s4.z(get_lastIndex_0(_this__u8e3s4));\n }\n return tmp;\n}\nfunction addAll(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection))\n return _this__u8e3s4.l(elements);\n else {\n var result = false;\n var tmp1_iterator = elements.n();\n while (tmp1_iterator.o()) {\n var item = tmp1_iterator.p();\n if (_this__u8e3s4.k(item))\n result = true;\n }\n return result;\n }\n}\nfunction IntIterator() {\n}\nprotoOf(IntIterator).p = function () {\n return this.v7();\n};\nfunction CharIterator() {\n}\nprotoOf(CharIterator).w7 = function () {\n return this.x7();\n};\nprotoOf(CharIterator).p = function () {\n return new Char(this.w7());\n};\nfunction sequence(block) {\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv_1(block);\n}\nfunction SequenceScope() {\n}\nprotoOf(SequenceScope).a8 = function (elements, $completion) {\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp)\n return Unit_instance;\n return this.z7(elements.n(), $completion);\n};\nprotoOf(SequenceScope).b8 = function (sequence, $completion) {\n return this.z7(sequence.n(), $completion);\n};\nfunction iterator(block) {\n var iterator = new SequenceBuilderIterator();\n iterator.f8_1 = createCoroutineUnintercepted(block, iterator, iterator);\n return iterator;\n}\nfunction nextNotReady($this) {\n if (!$this.o())\n throw NoSuchElementException_init_$Create$();\n else\n return $this.p();\n}\nfunction exceptionalState($this) {\n switch ($this.c8_1) {\n case 4:\n return NoSuchElementException_init_$Create$();\n case 5:\n return IllegalStateException_init_$Create$_0('Iterator has failed.');\n default:\n return IllegalStateException_init_$Create$_0('Unexpected state of the iterator: ' + $this.c8_1);\n }\n}\nfunction SequenceBuilderIterator() {\n SequenceScope.call(this);\n this.c8_1 = 0;\n this.d8_1 = null;\n this.e8_1 = null;\n this.f8_1 = null;\n}\nprotoOf(SequenceBuilderIterator).o = function () {\n while (true) {\n switch (this.c8_1) {\n case 0:\n break;\n case 1:\n if (ensureNotNull(this.e8_1).o()) {\n this.c8_1 = 2;\n return true;\n } else {\n this.e8_1 = null;\n }\n\n break;\n case 4:\n return false;\n case 3:\n case 2:\n return true;\n default:\n throw exceptionalState(this);\n }\n this.c8_1 = 5;\n var step = ensureNotNull(this.f8_1);\n this.f8_1 = null;\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);\n step.z6(tmp$ret$0);\n }\n};\nprotoOf(SequenceBuilderIterator).p = function () {\n switch (this.c8_1) {\n case 0:\n case 1:\n return nextNotReady(this);\n case 2:\n this.c8_1 = 1;\n return ensureNotNull(this.e8_1).p();\n case 3:\n this.c8_1 = 0;\n var tmp = this.d8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.d8_1 = null;\n return result;\n default:\n throw exceptionalState(this);\n }\n};\nprotoOf(SequenceBuilderIterator).y7 = function (value, $completion) {\n this.d8_1 = value;\n this.c8_1 = 3;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yield.' call\n this.f8_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n};\nprotoOf(SequenceBuilderIterator).z7 = function (iterator, $completion) {\n if (!iterator.o())\n return Unit_instance;\n this.e8_1 = iterator;\n this.c8_1 = 2;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yieldAll.' call\n this.f8_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n};\nprotoOf(SequenceBuilderIterator).g8 = function (result) {\n // Inline function 'kotlin.getOrThrow' call\n throwOnFailure(result);\n var tmp = _Result___get_value__impl__bjfvqg(result);\n (tmp == null ? true : !(tmp == null)) || THROW_CCE();\n this.c8_1 = 4;\n};\nprotoOf(SequenceBuilderIterator).z6 = function (result) {\n return this.g8(result);\n};\nprotoOf(SequenceBuilderIterator).u6 = function () {\n return EmptyCoroutineContext_getInstance();\n};\nfunction _no_name_provided__qut3iv_1($block) {\n this.h8_1 = $block;\n}\nprotoOf(_no_name_provided__qut3iv_1).n = function () {\n // Inline function 'kotlin.sequences.sequence.' call\n return iterator(this.h8_1);\n};\nfunction emptySequence() {\n return EmptySequence_instance;\n}\nfunction TransformingSequence$iterator$1(this$0) {\n this.j8_1 = this$0;\n this.i8_1 = this$0.k8_1.n();\n}\nprotoOf(TransformingSequence$iterator$1).p = function () {\n return this.j8_1.l8_1(this.i8_1.p());\n};\nprotoOf(TransformingSequence$iterator$1).o = function () {\n return this.i8_1.o();\n};\nfunction TransformingSequence(sequence, transformer) {\n this.k8_1 = sequence;\n this.l8_1 = transformer;\n}\nprotoOf(TransformingSequence).n = function () {\n return new TransformingSequence$iterator$1(this);\n};\nfunction calcNext($this) {\n if ($this.m8_1.o()) {\n var item = $this.m8_1.p();\n if ($this.p8_1.r8_1(item)) {\n $this.n8_1 = 1;\n $this.o8_1 = item;\n return Unit_instance;\n }\n }\n $this.n8_1 = 0;\n}\nfunction TakeWhileSequence$iterator$1(this$0) {\n this.p8_1 = this$0;\n this.m8_1 = this$0.q8_1.n();\n this.n8_1 = -1;\n this.o8_1 = null;\n}\nprotoOf(TakeWhileSequence$iterator$1).p = function () {\n if (this.n8_1 === -1) {\n calcNext(this);\n }\n if (this.n8_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var tmp = this.o8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.o8_1 = null;\n this.n8_1 = -1;\n return result;\n};\nprotoOf(TakeWhileSequence$iterator$1).o = function () {\n if (this.n8_1 === -1) {\n calcNext(this);\n }\n return this.n8_1 === 1;\n};\nfunction TakeWhileSequence(sequence, predicate) {\n this.q8_1 = sequence;\n this.r8_1 = predicate;\n}\nprotoOf(TakeWhileSequence).n = function () {\n return new TakeWhileSequence$iterator$1(this);\n};\nfunction DropTakeSequence() {\n}\nfunction drop_0($this) {\n while ($this.t8_1 > 0 ? $this.s8_1.o() : false) {\n $this.s8_1.p();\n $this.t8_1 = $this.t8_1 - 1 | 0;\n }\n}\nfunction DropSequence$iterator$1(this$0) {\n this.s8_1 = this$0.u8_1.n();\n this.t8_1 = this$0.v8_1;\n}\nprotoOf(DropSequence$iterator$1).p = function () {\n drop_0(this);\n return this.s8_1.p();\n};\nprotoOf(DropSequence$iterator$1).o = function () {\n drop_0(this);\n return this.s8_1.o();\n};\nfunction DropSequence(sequence, count) {\n this.u8_1 = sequence;\n this.v8_1 = count;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v8_1 >= 0)) {\n // Inline function 'kotlin.sequences.DropSequence.' call\n var message = 'count must be non-negative, but was ' + this.v8_1 + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n}\nprotoOf(DropSequence).c5 = function (n) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.sequences.DropSequence.drop.' call\n var n1 = this.v8_1 + n | 0;\n return n1 < 0 ? new DropSequence(this, n) : new DropSequence(this.u8_1, n1);\n};\nprotoOf(DropSequence).d5 = function (n) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.sequences.DropSequence.take.' call\n var n1 = this.v8_1 + n | 0;\n return n1 < 0 ? new TakeSequence(this, n) : new SubSequence(this.u8_1, this.v8_1, n1);\n};\nprotoOf(DropSequence).n = function () {\n return new DropSequence$iterator$1(this);\n};\nfunction drop_1($this) {\n while ($this.w8_1.o()) {\n var item = $this.w8_1.p();\n if (!$this.z8_1.b9_1(item)) {\n $this.y8_1 = item;\n $this.x8_1 = 1;\n return Unit_instance;\n }\n }\n $this.x8_1 = 0;\n}\nfunction DropWhileSequence$iterator$1(this$0) {\n this.z8_1 = this$0;\n this.w8_1 = this$0.a9_1.n();\n this.x8_1 = -1;\n this.y8_1 = null;\n}\nprotoOf(DropWhileSequence$iterator$1).p = function () {\n if (this.x8_1 === -1) {\n drop_1(this);\n }\n if (this.x8_1 === 1) {\n var tmp = this.y8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.y8_1 = null;\n this.x8_1 = 0;\n return result;\n }\n return this.w8_1.p();\n};\nprotoOf(DropWhileSequence$iterator$1).o = function () {\n if (this.x8_1 === -1) {\n drop_1(this);\n }\n return this.x8_1 === 1 ? true : this.w8_1.o();\n};\nfunction DropWhileSequence(sequence, predicate) {\n this.a9_1 = sequence;\n this.b9_1 = predicate;\n}\nprotoOf(DropWhileSequence).n = function () {\n return new DropWhileSequence$iterator$1(this);\n};\nfunction calcNext_0($this) {\n while ($this.c9_1.o()) {\n var item = $this.c9_1.p();\n if ($this.f9_1.i9_1(item) === $this.f9_1.h9_1) {\n $this.e9_1 = item;\n $this.d9_1 = 1;\n return Unit_instance;\n }\n }\n $this.d9_1 = 0;\n}\nfunction FilteringSequence$iterator$1(this$0) {\n this.f9_1 = this$0;\n this.c9_1 = this$0.g9_1.n();\n this.d9_1 = -1;\n this.e9_1 = null;\n}\nprotoOf(FilteringSequence$iterator$1).p = function () {\n if (this.d9_1 === -1) {\n calcNext_0(this);\n }\n if (this.d9_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var result = this.e9_1;\n this.e9_1 = null;\n this.d9_1 = -1;\n return (result == null ? true : !(result == null)) ? result : THROW_CCE();\n};\nprotoOf(FilteringSequence$iterator$1).o = function () {\n if (this.d9_1 === -1) {\n calcNext_0(this);\n }\n return this.d9_1 === 1;\n};\nfunction FilteringSequence(sequence, sendWhen, predicate) {\n sendWhen = sendWhen === VOID ? true : sendWhen;\n this.g9_1 = sequence;\n this.h9_1 = sendWhen;\n this.i9_1 = predicate;\n}\nprotoOf(FilteringSequence).n = function () {\n return new FilteringSequence$iterator$1(this);\n};\nfunction IndexingSequence$iterator$1(this$0) {\n this.j9_1 = this$0.l9_1.n();\n this.k9_1 = 0;\n}\nprotoOf(IndexingSequence$iterator$1).p = function () {\n var tmp1 = this.k9_1;\n this.k9_1 = tmp1 + 1 | 0;\n return new IndexedValue(checkIndexOverflow(tmp1), this.j9_1.p());\n};\nprotoOf(IndexingSequence$iterator$1).o = function () {\n return this.j9_1.o();\n};\nfunction IndexingSequence(sequence) {\n this.l9_1 = sequence;\n}\nprotoOf(IndexingSequence).n = function () {\n return new IndexingSequence$iterator$1(this);\n};\nfunction TakeSequence$iterator$1(this$0) {\n this.m9_1 = this$0.p9_1;\n this.n9_1 = this$0.o9_1.n();\n}\nprotoOf(TakeSequence$iterator$1).p = function () {\n if (this.m9_1 === 0)\n throw NoSuchElementException_init_$Create$();\n this.m9_1 = this.m9_1 - 1 | 0;\n return this.n9_1.p();\n};\nprotoOf(TakeSequence$iterator$1).o = function () {\n return this.m9_1 > 0 ? this.n9_1.o() : false;\n};\nfunction TakeSequence(sequence, count) {\n this.o9_1 = sequence;\n this.p9_1 = count;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.p9_1 >= 0)) {\n // Inline function 'kotlin.sequences.TakeSequence.' call\n var message = 'count must be non-negative, but was ' + this.p9_1 + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n}\nprotoOf(TakeSequence).c5 = function (n) {\n return n >= this.p9_1 ? emptySequence() : new SubSequence(this.o9_1, n, this.p9_1);\n};\nprotoOf(TakeSequence).d5 = function (n) {\n return n >= this.p9_1 ? this : new TakeSequence(this.o9_1, n);\n};\nprotoOf(TakeSequence).n = function () {\n return new TakeSequence$iterator$1(this);\n};\nfunction EmptySequence() {\n}\nprotoOf(EmptySequence).n = function () {\n return EmptyIterator_instance;\n};\nprotoOf(EmptySequence).c5 = function (n) {\n return EmptySequence_instance;\n};\nprotoOf(EmptySequence).d5 = function (n) {\n return EmptySequence_instance;\n};\nvar EmptySequence_instance;\nfunction EmptySequence_getInstance() {\n return EmptySequence_instance;\n}\nfunction drop_2($this) {\n while ($this.r9_1 < $this.s9_1.u9_1 ? $this.q9_1.o() : false) {\n $this.q9_1.p();\n $this.r9_1 = $this.r9_1 + 1 | 0;\n }\n}\nfunction _get_count__iw3m8u($this) {\n return $this.v9_1 - $this.u9_1 | 0;\n}\nfunction SubSequence$iterator$1(this$0) {\n this.s9_1 = this$0;\n this.q9_1 = this$0.t9_1.n();\n this.r9_1 = 0;\n}\nprotoOf(SubSequence$iterator$1).o = function () {\n drop_2(this);\n return this.r9_1 < this.s9_1.v9_1 ? this.q9_1.o() : false;\n};\nprotoOf(SubSequence$iterator$1).p = function () {\n drop_2(this);\n if (this.r9_1 >= this.s9_1.v9_1)\n throw NoSuchElementException_init_$Create$();\n this.r9_1 = this.r9_1 + 1 | 0;\n return this.q9_1.p();\n};\nfunction SubSequence(sequence, startIndex, endIndex) {\n this.t9_1 = sequence;\n this.u9_1 = startIndex;\n this.v9_1 = endIndex;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.u9_1 >= 0)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message = 'startIndex should be non-negative, but is ' + this.u9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v9_1 >= 0)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message_0 = 'endIndex should be non-negative, but is ' + this.v9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message_0));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v9_1 >= this.u9_1)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message_1 = 'endIndex should be not less than startIndex, but was ' + this.v9_1 + ' < ' + this.u9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message_1));\n }\n}\nprotoOf(SubSequence).c5 = function (n) {\n return n >= _get_count__iw3m8u(this) ? emptySequence() : new SubSequence(this.t9_1, this.u9_1 + n | 0, this.v9_1);\n};\nprotoOf(SubSequence).d5 = function (n) {\n return n >= _get_count__iw3m8u(this) ? this : new SubSequence(this.t9_1, this.u9_1, this.u9_1 + n | 0);\n};\nprotoOf(SubSequence).n = function () {\n return new SubSequence$iterator$1(this);\n};\nfunction emptySet() {\n return EmptySet_getInstance();\n}\nfunction hashSetOf(elements) {\n return toCollection(elements, HashSet_init_$Create$_0(mapCapacity(elements.length)));\n}\nfunction optimizeReadOnlySet(_this__u8e3s4) {\n switch (_this__u8e3s4.i()) {\n case 0:\n return emptySet();\n case 1:\n return setOf(_this__u8e3s4.n().p());\n default:\n return _this__u8e3s4;\n }\n}\nfunction EmptySet() {\n EmptySet_instance = this;\n this.w9_1 = new Long(1993859828, 793161749);\n}\nprotoOf(EmptySet).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, Set) : false) {\n tmp = other.s();\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EmptySet).hashCode = function () {\n return 0;\n};\nprotoOf(EmptySet).toString = function () {\n return '[]';\n};\nprotoOf(EmptySet).i = function () {\n return 0;\n};\nprotoOf(EmptySet).s = function () {\n return true;\n};\nprotoOf(EmptySet).u7 = function (elements) {\n return elements.s();\n};\nprotoOf(EmptySet).r = function (elements) {\n return this.u7(elements);\n};\nprotoOf(EmptySet).n = function () {\n return EmptyIterator_instance;\n};\nvar EmptySet_instance;\nfunction EmptySet_getInstance() {\n if (EmptySet_instance == null)\n new EmptySet();\n return EmptySet_instance;\n}\nfunction naturalOrder() {\n var tmp = NaturalOrderComparator_instance;\n return isInterface(tmp, Comparator) ? tmp : THROW_CCE();\n}\nfunction NaturalOrderComparator() {\n}\nprotoOf(NaturalOrderComparator).x9 = function (a, b) {\n return compareTo_0(a, b);\n};\nprotoOf(NaturalOrderComparator).compare = function (a, b) {\n var tmp = (!(a == null) ? isComparable(a) : false) ? a : THROW_CCE();\n return this.x9(tmp, (!(b == null) ? isComparable(b) : false) ? b : THROW_CCE());\n};\nvar NaturalOrderComparator_instance;\nfunction NaturalOrderComparator_getInstance() {\n return NaturalOrderComparator_instance;\n}\nfunction compareValues(a, b) {\n if (a === b)\n return 0;\n if (a == null)\n return -1;\n if (b == null)\n return 1;\n return compareTo_0((!(a == null) ? isComparable(a) : false) ? a : THROW_CCE(), b);\n}\nfunction Continuation() {\n}\nfunction Key() {\n}\nvar Key_instance;\nfunction Key_getInstance() {\n return Key_instance;\n}\nfunction ContinuationInterceptor() {\n}\nfunction EmptyCoroutineContext() {\n EmptyCoroutineContext_instance = this;\n this.y9_1 = new Long(0, 0);\n}\nprotoOf(EmptyCoroutineContext).v6 = function (key) {\n return null;\n};\nprotoOf(EmptyCoroutineContext).hashCode = function () {\n return 0;\n};\nprotoOf(EmptyCoroutineContext).toString = function () {\n return 'EmptyCoroutineContext';\n};\nvar EmptyCoroutineContext_instance;\nfunction EmptyCoroutineContext_getInstance() {\n if (EmptyCoroutineContext_instance == null)\n new EmptyCoroutineContext();\n return EmptyCoroutineContext_instance;\n}\nfunction get_COROUTINE_SUSPENDED() {\n return CoroutineSingletons_COROUTINE_SUSPENDED_getInstance();\n}\nvar CoroutineSingletons_COROUTINE_SUSPENDED_instance;\nvar CoroutineSingletons_UNDECIDED_instance;\nvar CoroutineSingletons_RESUMED_instance;\nvar CoroutineSingletons_entriesInitialized;\nfunction CoroutineSingletons_initEntries() {\n if (CoroutineSingletons_entriesInitialized)\n return Unit_instance;\n CoroutineSingletons_entriesInitialized = true;\n CoroutineSingletons_COROUTINE_SUSPENDED_instance = new CoroutineSingletons('COROUTINE_SUSPENDED', 0);\n CoroutineSingletons_UNDECIDED_instance = new CoroutineSingletons('UNDECIDED', 1);\n CoroutineSingletons_RESUMED_instance = new CoroutineSingletons('RESUMED', 2);\n}\nfunction CoroutineSingletons(name, ordinal) {\n Enum.call(this, name, ordinal);\n}\nfunction CoroutineSingletons_COROUTINE_SUSPENDED_getInstance() {\n CoroutineSingletons_initEntries();\n return CoroutineSingletons_COROUTINE_SUSPENDED_instance;\n}\nfunction getProgressionLastElement(start, end, step) {\n var tmp;\n if (step > 0) {\n tmp = start >= end ? end : end - differenceModulo(end, start, step) | 0;\n } else if (step < 0) {\n tmp = start <= end ? end : end + differenceModulo(start, end, -step | 0) | 0;\n } else {\n throw IllegalArgumentException_init_$Create$_0('Step is zero.');\n }\n return tmp;\n}\nfunction differenceModulo(a, b, c) {\n return mod(mod(a, c) - mod(b, c) | 0, c);\n}\nfunction mod(a, b) {\n var mod = a % b | 0;\n return mod >= 0 ? mod : mod + b | 0;\n}\nfunction Companion_8() {\n Companion_instance_8 = this;\n this.z9_1 = new IntRange(1, 0);\n}\nvar Companion_instance_8;\nfunction Companion_getInstance_8() {\n if (Companion_instance_8 == null)\n new Companion_8();\n return Companion_instance_8;\n}\nfunction IntRange(start, endInclusive) {\n Companion_getInstance_8();\n IntProgression.call(this, start, endInclusive, 1);\n}\nprotoOf(IntRange).s = function () {\n return this.da_1 > this.ea_1;\n};\nprotoOf(IntRange).equals = function (other) {\n var tmp;\n if (other instanceof IntRange) {\n tmp = (this.s() ? other.s() : false) ? true : this.da_1 === other.da_1 ? this.ea_1 === other.ea_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(IntRange).hashCode = function () {\n return this.s() ? -1 : imul_0(31, this.da_1) + this.ea_1 | 0;\n};\nprotoOf(IntRange).toString = function () {\n return '' + this.da_1 + '..' + this.ea_1;\n};\nfunction Companion_9() {\n Companion_instance_9 = this;\n this.ga_1 = new CharRange(_Char___init__impl__6a9atx(1), _Char___init__impl__6a9atx(0));\n}\nvar Companion_instance_9;\nfunction Companion_getInstance_9() {\n if (Companion_instance_9 == null)\n new Companion_9();\n return Companion_instance_9;\n}\nfunction CharRange(start, endInclusive) {\n Companion_getInstance_9();\n CharProgression.call(this, start, endInclusive, 1);\n}\nprotoOf(CharRange).s = function () {\n return Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) > 0;\n};\nprotoOf(CharRange).equals = function (other) {\n var tmp;\n if (other instanceof CharRange) {\n tmp = (this.s() ? other.s() : false) ? true : this.ka_1 === other.ka_1 ? this.la_1 === other.la_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(CharRange).hashCode = function () {\n var tmp;\n if (this.s()) {\n tmp = -1;\n } else {\n // Inline function 'kotlin.code' call\n var this_0 = this.ka_1;\n var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);\n var tmp_0 = imul_0(31, tmp$ret$0);\n // Inline function 'kotlin.code' call\n var this_1 = this.la_1;\n tmp = tmp_0 + Char__toInt_impl_vasixd(this_1) | 0;\n }\n return tmp;\n};\nprotoOf(CharRange).toString = function () {\n return toString_0(this.ka_1) + '..' + toString_0(this.la_1);\n};\nfunction IntProgressionIterator(first, last, step) {\n IntIterator.call(this);\n this.na_1 = step;\n this.oa_1 = last;\n this.pa_1 = this.na_1 > 0 ? first <= last : first >= last;\n this.qa_1 = this.pa_1 ? first : this.oa_1;\n}\nprotoOf(IntProgressionIterator).o = function () {\n return this.pa_1;\n};\nprotoOf(IntProgressionIterator).v7 = function () {\n var value = this.qa_1;\n if (value === this.oa_1) {\n if (!this.pa_1)\n throw NoSuchElementException_init_$Create$();\n this.pa_1 = false;\n } else {\n this.qa_1 = this.qa_1 + this.na_1 | 0;\n }\n return value;\n};\nfunction CharProgressionIterator(first, last, step) {\n CharIterator.call(this);\n this.ra_1 = step;\n var tmp = this;\n // Inline function 'kotlin.code' call\n tmp.sa_1 = Char__toInt_impl_vasixd(last);\n this.ta_1 = this.ra_1 > 0 ? Char__compareTo_impl_ypi4mb(first, last) <= 0 : Char__compareTo_impl_ypi4mb(first, last) >= 0;\n var tmp_0 = this;\n var tmp_1;\n if (this.ta_1) {\n // Inline function 'kotlin.code' call\n tmp_1 = Char__toInt_impl_vasixd(first);\n } else {\n tmp_1 = this.sa_1;\n }\n tmp_0.ua_1 = tmp_1;\n}\nprotoOf(CharProgressionIterator).o = function () {\n return this.ta_1;\n};\nprotoOf(CharProgressionIterator).x7 = function () {\n var value = this.ua_1;\n if (value === this.sa_1) {\n if (!this.ta_1)\n throw NoSuchElementException_init_$Create$();\n this.ta_1 = false;\n } else {\n this.ua_1 = this.ua_1 + this.ra_1 | 0;\n }\n return numberToChar(value);\n};\nfunction Companion_10() {\n}\nprotoOf(Companion_10).b5 = function (rangeStart, rangeEnd, step) {\n return new IntProgression(rangeStart, rangeEnd, step);\n};\nvar Companion_instance_10;\nfunction Companion_getInstance_10() {\n return Companion_instance_10;\n}\nfunction IntProgression(start, endInclusive, step) {\n if (step === 0)\n throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n if (step === IntCompanionObject_instance.MIN_VALUE)\n throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n this.da_1 = start;\n this.ea_1 = getProgressionLastElement(start, endInclusive, step);\n this.fa_1 = step;\n}\nprotoOf(IntProgression).n = function () {\n return new IntProgressionIterator(this.da_1, this.ea_1, this.fa_1);\n};\nprotoOf(IntProgression).s = function () {\n return this.fa_1 > 0 ? this.da_1 > this.ea_1 : this.da_1 < this.ea_1;\n};\nprotoOf(IntProgression).equals = function (other) {\n var tmp;\n if (other instanceof IntProgression) {\n tmp = (this.s() ? other.s() : false) ? true : (this.da_1 === other.da_1 ? this.ea_1 === other.ea_1 : false) ? this.fa_1 === other.fa_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(IntProgression).hashCode = function () {\n return this.s() ? -1 : imul_0(31, imul_0(31, this.da_1) + this.ea_1 | 0) + this.fa_1 | 0;\n};\nprotoOf(IntProgression).toString = function () {\n return this.fa_1 > 0 ? '' + this.da_1 + '..' + this.ea_1 + ' step ' + this.fa_1 : '' + this.da_1 + ' downTo ' + this.ea_1 + ' step ' + (-this.fa_1 | 0);\n};\nfunction Companion_11() {\n}\nvar Companion_instance_11;\nfunction Companion_getInstance_11() {\n return Companion_instance_11;\n}\nfunction CharProgression(start, endInclusive, step) {\n if (step === 0)\n throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n if (step === IntCompanionObject_instance.MIN_VALUE)\n throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n this.ka_1 = start;\n var tmp = this;\n // Inline function 'kotlin.code' call\n var tmp_0 = Char__toInt_impl_vasixd(start);\n // Inline function 'kotlin.code' call\n var tmp$ret$1 = Char__toInt_impl_vasixd(endInclusive);\n tmp.la_1 = numberToChar(getProgressionLastElement(tmp_0, tmp$ret$1, step));\n this.ma_1 = step;\n}\nprotoOf(CharProgression).n = function () {\n return new CharProgressionIterator(this.ka_1, this.la_1, this.ma_1);\n};\nprotoOf(CharProgression).s = function () {\n return this.ma_1 > 0 ? Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) > 0 : Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) < 0;\n};\nprotoOf(CharProgression).equals = function (other) {\n var tmp;\n if (other instanceof CharProgression) {\n tmp = (this.s() ? other.s() : false) ? true : (this.ka_1 === other.ka_1 ? this.la_1 === other.la_1 : false) ? this.ma_1 === other.ma_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(CharProgression).hashCode = function () {\n var tmp;\n if (this.s()) {\n tmp = -1;\n } else {\n // Inline function 'kotlin.code' call\n var this_0 = this.ka_1;\n var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);\n var tmp_0 = imul_0(31, tmp$ret$0);\n // Inline function 'kotlin.code' call\n var this_1 = this.la_1;\n var tmp$ret$1 = Char__toInt_impl_vasixd(this_1);\n tmp = imul_0(31, tmp_0 + tmp$ret$1 | 0) + this.ma_1 | 0;\n }\n return tmp;\n};\nprotoOf(CharProgression).toString = function () {\n return this.ma_1 > 0 ? toString_0(this.ka_1) + '..' + toString_0(this.la_1) + ' step ' + this.ma_1 : toString_0(this.ka_1) + ' downTo ' + toString_0(this.la_1) + ' step ' + (-this.ma_1 | 0);\n};\nfunction appendElement(_this__u8e3s4, element, transform) {\n if (!(transform == null)) {\n _this__u8e3s4.l4(transform(element));\n } else {\n if (element == null ? true : isCharSequence(element)) {\n _this__u8e3s4.l4(element);\n } else {\n if (element instanceof Char) {\n _this__u8e3s4.e4(element.g5_1);\n } else {\n _this__u8e3s4.l4(toString_1(element));\n }\n }\n }\n}\nfunction equals_0(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (_this__u8e3s4 === other)\n return true;\n if (!ignoreCase)\n return false;\n var thisUpper = uppercaseChar(_this__u8e3s4);\n var otherUpper = uppercaseChar(other);\n var tmp;\n if (thisUpper === otherUpper) {\n tmp = true;\n } else {\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = toString_0(thisUpper).toLowerCase();\n var tmp_0 = charSequenceGet(tmp$ret$2, 0);\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = toString_0(otherUpper).toLowerCase();\n tmp = tmp_0 === charSequenceGet(tmp$ret$6, 0);\n }\n return tmp;\n}\nfunction toIntOrNull(_this__u8e3s4) {\n return toIntOrNull_0(_this__u8e3s4, 10);\n}\nfunction numberFormatError(input) {\n throw NumberFormatException_init_$Create$_0(\"Invalid number format: '\" + input + \"'\");\n}\nfunction toIntOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n var start;\n var isNegative;\n var limit;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1)\n return null;\n start = 1;\n if (firstChar === _Char___init__impl__6a9atx(45)) {\n isNegative = true;\n limit = IntCompanionObject_instance.MIN_VALUE;\n } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n } else\n return null;\n } else {\n start = 0;\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n }\n var limitForMaxRadix = (-IntCompanionObject_instance.MAX_VALUE | 0) / 36 | 0;\n var limitBeforeMul = limitForMaxRadix;\n var result = 0;\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n if (result < limitBeforeMul) {\n if (limitBeforeMul === limitForMaxRadix) {\n limitBeforeMul = limit / radix | 0;\n if (result < limitBeforeMul) {\n return null;\n }\n } else {\n return null;\n }\n }\n result = imul_0(result, radix);\n if (result < (limit + digit | 0))\n return null;\n result = result - digit | 0;\n }\n while (inductionVariable < length);\n return isNegative ? result : -result | 0;\n}\nfunction get_lastIndex_1(_this__u8e3s4) {\n return charSequenceLength(_this__u8e3s4) - 1 | 0;\n}\nfunction contains_0(_this__u8e3s4, char, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return indexOf_0(_this__u8e3s4, char, VOID, ignoreCase) >= 0;\n}\nfunction startsWith_1(_this__u8e3s4, prefix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (!ignoreCase) {\n tmp_0 = typeof _this__u8e3s4 === 'string';\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = typeof prefix === 'string';\n } else {\n tmp = false;\n }\n if (tmp)\n return startsWith_0(_this__u8e3s4, prefix);\n else {\n return regionMatchesImpl(_this__u8e3s4, 0, prefix, 0, charSequenceLength(prefix), ignoreCase);\n }\n}\nfunction contains_1(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (typeof other === 'string') {\n tmp = indexOf_1(_this__u8e3s4, other, VOID, ignoreCase) >= 0;\n } else {\n tmp = indexOf_2(_this__u8e3s4, other, 0, charSequenceLength(_this__u8e3s4), ignoreCase) >= 0;\n }\n return tmp;\n}\nfunction endsWith_0(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (!ignoreCase) {\n tmp_0 = typeof _this__u8e3s4 === 'string';\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = typeof suffix === 'string';\n } else {\n tmp = false;\n }\n if (tmp)\n return endsWith(_this__u8e3s4, suffix);\n else {\n return regionMatchesImpl(_this__u8e3s4, charSequenceLength(_this__u8e3s4) - charSequenceLength(suffix) | 0, suffix, 0, charSequenceLength(suffix), ignoreCase);\n }\n}\nfunction indexOf_0(_this__u8e3s4, char, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n // Inline function 'kotlin.charArrayOf' call\n var tmp$ret$0 = charArrayOf([char]);\n tmp = indexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString_0(char);\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(str, startIndex);\n }\n return tmp;\n}\nfunction regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n if (((otherOffset < 0 ? true : thisOffset < 0) ? true : thisOffset > (charSequenceLength(_this__u8e3s4) - length | 0)) ? true : otherOffset > (charSequenceLength(other) - length | 0)) {\n return false;\n }\n var inductionVariable = 0;\n if (inductionVariable < length)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!equals_0(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))\n return false;\n }\n while (inductionVariable < length);\n return true;\n}\nfunction indexOf_1(_this__u8e3s4, string, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n tmp = indexOf_2(_this__u8e3s4, string, startIndex, charSequenceLength(_this__u8e3s4), ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(string, startIndex);\n }\n return tmp;\n}\nfunction indexOf_2(_this__u8e3s4, other, startIndex, endIndex, ignoreCase, last) {\n last = last === VOID ? false : last;\n var indices = !last ? numberRangeToNumber(coerceAtLeast(startIndex, 0), coerceAtMost(endIndex, charSequenceLength(_this__u8e3s4))) : downTo(coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4)), coerceAtLeast(endIndex, 0));\n var tmp;\n if (typeof _this__u8e3s4 === 'string') {\n tmp = typeof other === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var inductionVariable = indices.da_1;\n var last_0 = indices.ea_1;\n var step = indices.fa_1;\n if ((step > 0 ? inductionVariable <= last_0 : false) ? true : step < 0 ? last_0 <= inductionVariable : false)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + step | 0;\n if (regionMatches(other, 0, _this__u8e3s4, index, charSequenceLength(other), ignoreCase))\n return index;\n }\n while (!(index === last_0));\n } else {\n var inductionVariable_0 = indices.da_1;\n var last_1 = indices.ea_1;\n var step_0 = indices.fa_1;\n if ((step_0 > 0 ? inductionVariable_0 <= last_1 : false) ? true : step_0 < 0 ? last_1 <= inductionVariable_0 : false)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + step_0 | 0;\n if (regionMatchesImpl(other, 0, _this__u8e3s4, index_0, charSequenceLength(other), ignoreCase))\n return index_0;\n }\n while (!(index_0 === last_1));\n }\n return -1;\n}\nfunction trim(_this__u8e3s4) {\n // Inline function 'kotlin.text.trim' call\n var startIndex = 0;\n var endIndex = charSequenceLength(_this__u8e3s4) - 1 | 0;\n var startFound = false;\n $l$loop: while (startIndex <= endIndex) {\n var index = !startFound ? startIndex : endIndex;\n var match = isWhitespace(charSequenceGet(_this__u8e3s4, index));\n if (!startFound) {\n if (!match)\n startFound = true;\n else\n startIndex = startIndex + 1 | 0;\n } else {\n if (!match)\n break $l$loop;\n else\n endIndex = endIndex - 1 | 0;\n }\n }\n return charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex + 1 | 0);\n}\nfunction indexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (!ignoreCase ? chars.length === 1 : false) {\n tmp = typeof _this__u8e3s4 === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var char = single(chars);\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString_0(char);\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.indexOf(str, startIndex);\n }\n var inductionVariable = coerceAtLeast(startIndex, 0);\n var last = get_lastIndex_1(_this__u8e3s4);\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var charAtIndex = charSequenceGet(_this__u8e3s4, index);\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = chars.length;\n while (inductionVariable_0 < last_0) {\n var element = chars[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.text.indexOfAny.' call\n if (equals_0(element, charAtIndex, ignoreCase)) {\n tmp$ret$4 = true;\n break $l$block;\n }\n }\n tmp$ret$4 = false;\n }\n if (tmp$ret$4)\n return index;\n }\n while (!(index === last));\n return -1;\n}\nfunction get_indices(_this__u8e3s4) {\n return numberRangeToNumber(0, charSequenceLength(_this__u8e3s4) - 1 | 0);\n}\nfunction contentEqualsImpl(_this__u8e3s4, other) {\n var tmp;\n if (!(_this__u8e3s4 == null) ? typeof _this__u8e3s4 === 'string' : false) {\n tmp = !(other == null) ? typeof other === 'string' : false;\n } else {\n tmp = false;\n }\n if (tmp) {\n return equals(_this__u8e3s4, other);\n }\n if (_this__u8e3s4 === other)\n return true;\n if ((_this__u8e3s4 == null ? true : other == null) ? true : !(charSequenceLength(_this__u8e3s4) === charSequenceLength(other)))\n return false;\n var inductionVariable = 0;\n var last = charSequenceLength(_this__u8e3s4);\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(charSequenceGet(_this__u8e3s4, i) === charSequenceGet(other, i))) {\n return false;\n }\n }\n while (inductionVariable < last);\n return true;\n}\nfunction UnsafeLazyImpl(initializer) {\n this.va_1 = initializer;\n this.wa_1 = UNINITIALIZED_VALUE_instance;\n}\nprotoOf(UnsafeLazyImpl).i4 = function () {\n if (this.wa_1 === UNINITIALIZED_VALUE_instance) {\n this.wa_1 = ensureNotNull(this.va_1)();\n this.va_1 = null;\n }\n var tmp = this.wa_1;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(UnsafeLazyImpl).xa = function () {\n return !(this.wa_1 === UNINITIALIZED_VALUE_instance);\n};\nprotoOf(UnsafeLazyImpl).toString = function () {\n return this.xa() ? toString_1(this.i4()) : 'Lazy value not initialized yet.';\n};\nfunction UNINITIALIZED_VALUE() {\n}\nvar UNINITIALIZED_VALUE_instance;\nfunction UNINITIALIZED_VALUE_getInstance() {\n return UNINITIALIZED_VALUE_instance;\n}\nfunction _Result___init__impl__xyqfz8(value) {\n return value;\n}\nfunction _Result___get_value__impl__bjfvqg($this) {\n return $this;\n}\nfunction _Result___get_isFailure__impl__jpiriv($this) {\n var tmp = _Result___get_value__impl__bjfvqg($this);\n return tmp instanceof Failure;\n}\nfunction Result__exceptionOrNull_impl_p6xea9($this) {\n var tmp;\n if (_Result___get_value__impl__bjfvqg($this) instanceof Failure) {\n tmp = _Result___get_value__impl__bjfvqg($this).ya_1;\n } else {\n tmp = null;\n }\n return tmp;\n}\nfunction Companion_12() {\n}\nvar Companion_instance_12;\nfunction Companion_getInstance_12() {\n return Companion_instance_12;\n}\nfunction Failure(exception) {\n this.ya_1 = exception;\n}\nprotoOf(Failure).equals = function (other) {\n var tmp;\n if (other instanceof Failure) {\n tmp = equals(this.ya_1, other.ya_1);\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(Failure).hashCode = function () {\n return hashCode(this.ya_1);\n};\nprotoOf(Failure).toString = function () {\n return 'Failure(' + this.ya_1 + ')';\n};\nfunction createFailure(exception) {\n return new Failure(exception);\n}\nfunction throwOnFailure(_this__u8e3s4) {\n var tmp = _Result___get_value__impl__bjfvqg(_this__u8e3s4);\n if (tmp instanceof Failure)\n throw _Result___get_value__impl__bjfvqg(_this__u8e3s4).ya_1;\n}\nfunction NotImplementedError(message) {\n message = message === VOID ? 'An operation is not implemented.' : message;\n Error_init_$Init$_0(message, this);\n captureStack(this, NotImplementedError);\n}\nfunction Pair(first, second) {\n this.za_1 = first;\n this.ab_1 = second;\n}\nprotoOf(Pair).toString = function () {\n return '(' + this.za_1 + ', ' + this.ab_1 + ')';\n};\nprotoOf(Pair).bb = function () {\n return this.za_1;\n};\nprotoOf(Pair).cb = function () {\n return this.ab_1;\n};\nprotoOf(Pair).hashCode = function () {\n var result = this.za_1 == null ? 0 : hashCode(this.za_1);\n result = imul_0(result, 31) + (this.ab_1 == null ? 0 : hashCode(this.ab_1)) | 0;\n return result;\n};\nprotoOf(Pair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Pair))\n return false;\n var tmp0_other_with_cast = other instanceof Pair ? other : THROW_CCE();\n if (!equals(this.za_1, tmp0_other_with_cast.za_1))\n return false;\n if (!equals(this.ab_1, tmp0_other_with_cast.ab_1))\n return false;\n return true;\n};\nfunction to(_this__u8e3s4, that) {\n return new Pair(_this__u8e3s4, that);\n}\nfunction _UShort___init__impl__jigrne(data) {\n return data;\n}\nfunction _UShort___get_data__impl__g0245($this) {\n return $this;\n}\n//region block: post-declaration\nprotoOf(InternalHashMap).t2 = containsAllEntries;\n//endregion\n//region block: init\nUnit_instance = new Unit();\nIntCompanionObject_instance = new IntCompanionObject();\n_stableSortingIsSupported = null;\nCompanion_instance_0 = new Companion_0();\nCompanion_instance_3 = new Companion_3();\nCompletedContinuation_instance = new CompletedContinuation();\nCompanion_instance_5 = new Companion_5();\nCompanion_instance_6 = new Companion_6();\nCompanion_instance_7 = new Companion_7();\nEmptyIterator_instance = new EmptyIterator();\nEmptySequence_instance = new EmptySequence();\nNaturalOrderComparator_instance = new NaturalOrderComparator();\nKey_instance = new Key();\nCompanion_instance_10 = new Companion_10();\nCompanion_instance_11 = new Companion_11();\nUNINITIALIZED_VALUE_instance = new UNINITIALIZED_VALUE();\nCompanion_instance_12 = new Companion_12();\n//endregion\n//region block: exports\nexport {\n VOID as VOID7hggqo3abtya,\n ArrayList_init_$Create$_0 as ArrayList_init_$Create$1s1wkrw82c0iw,\n ArrayList_init_$Create$ as ArrayList_init_$Create$2qnngtk1et9r9,\n LinkedHashMap_init_$Create$_0 as LinkedHashMap_init_$Create$7ps311k1ff73,\n LinkedHashMap_init_$Create$ as LinkedHashMap_init_$Create$1p3p95clvi93w,\n LinkedHashSet_init_$Create$ as LinkedHashSet_init_$Create$3qv13l7kzf0ni,\n Regex_init_$Create$ as Regex_init_$Create$xe1wdfnzfij1,\n StringBuilder_init_$Create$_0 as StringBuilder_init_$Create$2mwec1027v00x,\n Exception_init_$Init$_0 as Exception_init_$Init$32vb8wlewqrmh,\n NoSuchElementException_init_$Create$ as NoSuchElementException_init_$Create$wjvpfebkn9od,\n _Char___init__impl__6a9atx as _Char___init__impl__6a9atx281r2pd9o601g,\n Char__rangeTo_impl_tkncvp as Char__rangeTo_impl_tkncvp940rgm6i9zbm,\n Char__toInt_impl_vasixd as Char__toInt_impl_vasixd2xlaiz5u3itpv,\n toString_0 as toString35i91qxh73cps,\n Unit_instance as Unit_instance1fbcbse1fwigr,\n Collection as Collection1k04j3hzsbod0,\n asSequence as asSequence2jzw5xbq99nu9,\n checkIndexOverflow as checkIndexOverflow3frtmheghr0th,\n collectionSizeOrDefault as collectionSizeOrDefault36dulx8yinfqm,\n copyToArray as copyToArray2j022khrow2yi,\n distinct as distinct10qe1scfdvu5k,\n emptyList as emptyList1g2z5xcrvp2zy,\n firstOrNull as firstOrNull1982767dljvdy,\n first as first58ocm7j58k3q,\n flatten as flatten2dh4kibw1u0qq,\n joinToString_0 as joinToString1cxrrlmo0chqs,\n last as last1vo29oleiqj36,\n listOf as listOfvhqybd2zx248,\n listOf_0 as listOf1jh22dvmctj1r,\n mapCapacity as mapCapacity1h45rc3eh9p2l,\n mutableListOf as mutableListOf6oorvk2mtdmp,\n plus as plus310ted5e4i90h,\n removeLast as removeLast3759euu1xvfa3,\n reverse as reversenv3adafjrtzo,\n sortedWith as sortedWith2csnbbb21k0lg,\n sorted as sorted354mfsiv4s7x5,\n toMutableList as toMutableList20rdgwi7d3cwi,\n compareValues as compareValues1n2ayl87ihzfk,\n get_COROUTINE_SUSPENDED as get_COROUTINE_SUSPENDED3ujt3p13qm4iy,\n CoroutineImpl as CoroutineImpl2sn3kjnwmfr10,\n captureStack as captureStack1fzi4aczwc4hg,\n charSequenceGet as charSequenceGet1vxk1y5n17t1z,\n charSequenceLength as charSequenceLength3278n89t01tmv,\n charSequenceSubSequence as charSequenceSubSequence1iwpdba8s3jc7,\n classMeta as classMetawt99a3kyl3us,\n defineProp as defineProp3hxgpk2knu2px,\n equals as equals2au1ep9vhcato,\n getBooleanHashCode as getBooleanHashCode1bbj3u6b3v0a7,\n getPropertyCallableRef as getPropertyCallableRef1ajb9in178r5r,\n getStringHashCode as getStringHashCode26igk1bx568vk,\n hashCode as hashCodeq5arwsb9dgti,\n isArray as isArray1hxjqtqy632bc,\n isCharSequence as isCharSequence1ju9jr1w86plq,\n isInterface as isInterface3d6p8outrmvmk,\n numberToChar as numberToChar93r9buh19yek,\n objectMeta as objectMeta213120oau977m,\n protoOf as protoOf180f3jzyo7rfj,\n setMetadataFor as setMetadataForzkg9su7xd76l,\n toString_2 as toString1pkumu07cwy4m,\n KProperty1 as KProperty1ca4yb4wlo496,\n SequenceScope as SequenceScope1coiso86pqzq2,\n dropWhile as dropWhilemi4a7vbhep44,\n drop as drop1psm9p6la89df,\n elementAtOrNull as elementAtOrNull1ix22i58uw5uy,\n filterIndexed as filterIndexed1jls5lyem8w69,\n firstOrNull_0 as firstOrNull175qkyx53x0vd,\n map as mapsbvh18eqox7a,\n sequence as sequence2vgswtrxvqoa7,\n takeWhile as takeWhile17zwcj046i086,\n take as take2rh6pen3z50h7,\n toList_0 as toListx6x8nvfmvvht,\n toMutableList_1 as toMutableList1nmhgz6cua3pe,\n contains_1 as contains3ue2qo8xhmpf1,\n contains_0 as contains2el4s70rdq4ld,\n contentEquals_0 as contentEquals22p01ii2h7ey0,\n endsWith_0 as endsWith1a79dp5rc3sfv,\n getOrNull as getOrNull1cdnsfrisdp41,\n isBlank as isBlank1dvkhjjvox3p0,\n startsWith as startsWith5hna0vjiqaqm,\n startsWith_1 as startsWith38d3sbg25w0lx,\n toInt as toInt2q8uldh7sc951,\n toInt_0 as toInt5qdj874w69jh,\n toString as toString1h6jjoch8cjt8,\n trim as trim11nh7r46at6sx,\n Char as Char19o2r8palgjof,\n Comparator as Comparator2b3maoeh98xtg,\n Exception as Exceptiondt2hlxn7j7vw,\n NumberFormatException as NumberFormatException3bgsm2s9o4t55,\n Pair as Paire9pteg33gng7,\n THROW_CCE as THROW_CCE2g6jy02ryeudk,\n ensureNotNull as ensureNotNull1e947j3ixpazm,\n lazy as lazy2hsh8ze7j6ikd,\n toString_1 as toString30pk9tzaqopn,\n to as to2cs3ny02qtbcb,\n};\n//endregion\n\n//# sourceMappingURL=kotlin-kotlin-stdlib.mjs.map\n","import {\n protoOf180f3jzyo7rfj as protoOf,\n objectMeta213120oau977m as objectMeta,\n setMetadataForzkg9su7xd76l as setMetadataFor,\n copyToArray2j022khrow2yi as copyToArray,\n THROW_CCE2g6jy02ryeudk as THROW_CCE,\n isArray1hxjqtqy632bc as isArray,\n classMetawt99a3kyl3us as classMeta,\n defineProp3hxgpk2knu2px as defineProp,\n asSequence2jzw5xbq99nu9 as asSequence,\n toListx6x8nvfmvvht as toList,\n Unit_instance1fbcbse1fwigr as Unit_instance,\n firstOrNull175qkyx53x0vd as firstOrNull,\n mapsbvh18eqox7a as map,\n VOID7hggqo3abtya as VOID,\n charSequenceLength3278n89t01tmv as charSequenceLength,\n charSequenceGet1vxk1y5n17t1z as charSequenceGet,\n contains2el4s70rdq4ld as contains,\n Exceptiondt2hlxn7j7vw as Exception,\n getOrNull1cdnsfrisdp41 as getOrNull,\n Char19o2r8palgjof as Char,\n toString30pk9tzaqopn as toString,\n Exception_init_$Init$32vb8wlewqrmh as Exception_init_$Init$,\n captureStack1fzi4aczwc4hg as captureStack,\n getStringHashCode26igk1bx568vk as getStringHashCode,\n mutableListOf6oorvk2mtdmp as mutableListOf,\n last1vo29oleiqj36 as last,\n collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,\n ArrayList_init_$Create$1s1wkrw82c0iw as ArrayList_init_$Create$,\n ArrayList_init_$Create$2qnngtk1et9r9 as ArrayList_init_$Create$_0,\n ensureNotNull1e947j3ixpazm as ensureNotNull,\n LinkedHashSet_init_$Create$3qv13l7kzf0ni as LinkedHashSet_init_$Create$,\n distinct10qe1scfdvu5k as distinct,\n lazy2hsh8ze7j6ikd as lazy,\n firstOrNull1982767dljvdy as firstOrNull_0,\n equals2au1ep9vhcato as equals,\n KProperty1ca4yb4wlo496 as KProperty1,\n getPropertyCallableRef1ajb9in178r5r as getPropertyCallableRef,\n elementAtOrNull1ix22i58uw5uy as elementAtOrNull,\n CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,\n SequenceScope1coiso86pqzq2 as SequenceScope,\n get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,\n sequence2vgswtrxvqoa7 as sequence,\n takeWhile17zwcj046i086 as takeWhile,\n toMutableList1nmhgz6cua3pe as toMutableList,\n reversenv3adafjrtzo as reverse,\n dropWhilemi4a7vbhep44 as dropWhile,\n drop1psm9p6la89df as drop,\n removeLast3759euu1xvfa3 as removeLast,\n listOfvhqybd2zx248 as listOf,\n _Char___init__impl__6a9atx281r2pd9o601g as _Char___init__impl__6a9atx,\n StringBuilder_init_$Create$2mwec1027v00x as StringBuilder_init_$Create$,\n Char__toInt_impl_vasixd2xlaiz5u3itpv as Char__toInt_impl_vasixd,\n toString1h6jjoch8cjt8 as toString_0,\n hashCodeq5arwsb9dgti as hashCode,\n Comparator2b3maoeh98xtg as Comparator,\n compareValues1n2ayl87ihzfk as compareValues,\n listOf1jh22dvmctj1r as listOf_0,\n sortedWith2csnbbb21k0lg as sortedWith,\n isCharSequence1ju9jr1w86plq as isCharSequence,\n startsWith38d3sbg25w0lx as startsWith,\n contains3ue2qo8xhmpf1 as contains_0,\n endsWith1a79dp5rc3sfv as endsWith,\n toString1pkumu07cwy4m as toString_1,\n trim11nh7r46at6sx as trim,\n plus310ted5e4i90h as plus,\n take2rh6pen3z50h7 as take,\n filterIndexed1jls5lyem8w69 as filterIndexed,\n emptyList1g2z5xcrvp2zy as emptyList,\n sorted354mfsiv4s7x5 as sorted,\n contentEquals22p01ii2h7ey0 as contentEquals,\n isBlank1dvkhjjvox3p0 as isBlank,\n flatten2dh4kibw1u0qq as flatten,\n joinToString1cxrrlmo0chqs as joinToString,\n Collection1k04j3hzsbod0 as Collection,\n isInterface3d6p8outrmvmk as isInterface,\n getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,\n first58ocm7j58k3q as first,\n toString35i91qxh73cps as toString_2,\n startsWith5hna0vjiqaqm as startsWith_0,\n toInt2q8uldh7sc951 as toInt,\n NumberFormatException3bgsm2s9o4t55 as NumberFormatException,\n Paire9pteg33gng7 as Pair,\n LinkedHashMap_init_$Create$1p3p95clvi93w as LinkedHashMap_init_$Create$,\n mapCapacity1h45rc3eh9p2l as mapCapacity,\n LinkedHashMap_init_$Create$7ps311k1ff73 as LinkedHashMap_init_$Create$_0,\n charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,\n toInt5qdj874w69jh as toInt_0,\n numberToChar93r9buh19yek as numberToChar,\n to2cs3ny02qtbcb as to,\n checkIndexOverflow3frtmheghr0th as checkIndexOverflow,\n Regex_init_$Create$xe1wdfnzfij1 as Regex_init_$Create$,\n Char__rangeTo_impl_tkncvp940rgm6i9zbm as Char__rangeTo_impl_tkncvp,\n toMutableList20rdgwi7d3cwi as toMutableList_0,\n NoSuchElementException_init_$Create$wjvpfebkn9od as NoSuchElementException_init_$Create$,\n} from './kotlin-kotlin-stdlib.mjs';\n//region block: imports\nvar imul = Math.imul;\n//endregion\n//region block: pre-declaration\nsetMetadataFor(Companion, 'Companion', objectMeta);\nsetMetadataFor(CommonSelector, 'CommonSelector', classMeta);\nsetMetadataFor(CommonTransform, 'CommonTransform', classMeta);\nsetMetadataFor(Companion_0, 'Companion', objectMeta);\nsetMetadataFor(ExtSyntaxError, 'ExtSyntaxError', classMeta, Exception);\nsetMetadataFor(Companion_1, 'Companion', objectMeta);\nsetMetadataFor(Selector, 'Selector', classMeta);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_1, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_3, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_5, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$querySelectorAll$lambda$slambda, 'Transform$querySelectorAll$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$querySelectorTrackAll$lambda$slambda, 'Transform$querySelectorTrackAll$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform, 'Transform', classMeta);\nsetMetadataFor(Expression, 'Expression', classMeta);\nsetMetadataFor(BinaryExpression, 'BinaryExpression', classMeta, Expression);\nsetMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_2, 'Companion', objectMeta);\nsetMetadataFor(CompareOperator, 'CompareOperator', classMeta);\nsetMetadataFor(Equal, 'Equal', objectMeta, CompareOperator);\nsetMetadataFor(NotEqual, 'NotEqual', objectMeta, CompareOperator);\nsetMetadataFor(Start, 'Start', objectMeta, CompareOperator);\nsetMetadataFor(NotStart, 'NotStart', objectMeta, CompareOperator);\nsetMetadataFor(Include, 'Include', objectMeta, CompareOperator);\nsetMetadataFor(NotInclude, 'NotInclude', objectMeta, CompareOperator);\nsetMetadataFor(End, 'End', objectMeta, CompareOperator);\nsetMetadataFor(NotEnd, 'NotEnd', objectMeta, CompareOperator);\nsetMetadataFor(Less, 'Less', objectMeta, CompareOperator);\nsetMetadataFor(LessEqual, 'LessEqual', objectMeta, CompareOperator);\nsetMetadataFor(More, 'More', objectMeta, CompareOperator);\nsetMetadataFor(MoreEqual, 'MoreEqual', objectMeta, CompareOperator);\nsetMetadataFor(ConnectExpression, 'ConnectExpression', classMeta);\nsetMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_3, 'Companion', objectMeta);\nsetMetadataFor(ConnectOperator, 'ConnectOperator', classMeta);\nsetMetadataFor(BeforeBrother, 'BeforeBrother', objectMeta, ConnectOperator);\nsetMetadataFor(AfterBrother, 'AfterBrother', objectMeta, ConnectOperator);\nsetMetadataFor(Ancestor, 'Ancestor', objectMeta, ConnectOperator);\nsetMetadataFor(Child, 'Child', objectMeta, ConnectOperator);\nsetMetadataFor(Descendant, 'Descendant', objectMeta, ConnectOperator);\nsetMetadataFor(ConnectSegment$traversal$o$invoke$slambda, 'ConnectSegment$traversal$o$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(ConnectSegment$traversal$1, VOID, classMeta);\nsetMetadataFor(ConnectSegment$traversal$2, VOID, classMeta);\nsetMetadataFor(ConnectSegment, 'ConnectSegment', classMeta, VOID, VOID, ConnectSegment);\nsetMetadataFor(ConnectWrapper, 'ConnectWrapper', classMeta);\nsetMetadataFor(LogicalExpression, 'LogicalExpression', classMeta, Expression);\nsetMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_4, 'Companion', objectMeta);\nsetMetadataFor(LogicalOperator, 'LogicalOperator', classMeta);\nsetMetadataFor(AndOperator, 'AndOperator', objectMeta, LogicalOperator);\nsetMetadataFor(OrOperator, 'OrOperator', objectMeta, LogicalOperator);\nsetMetadataFor(PolynomialExpression$traversal$1, VOID, classMeta);\nsetMetadataFor(PolynomialExpression, 'PolynomialExpression', classMeta, ConnectExpression, VOID, PolynomialExpression);\nsetMetadataFor(PropertySegment$matchName$1, VOID, classMeta);\nsetMetadataFor(PropertySegment$matchName$2, VOID, classMeta);\nsetMetadataFor(PropertySegment, 'PropertySegment', classMeta);\nsetMetadataFor(PropertyWrapper, 'PropertyWrapper', classMeta);\nsetMetadataFor(TupleExpression$traversal$1, VOID, classMeta);\nsetMetadataFor(TupleExpression, 'TupleExpression', classMeta, ConnectExpression);\nsetMetadataFor(Parser, 'Parser', classMeta);\nsetMetadataFor(ParserResult, 'ParserResult', classMeta);\nsetMetadataFor(ParserSet, 'ParserSet', objectMeta);\nsetMetadataFor(FilterIndexesSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(FilterIndexesSequence, 'FilterIndexesSequence', classMeta);\n//endregion\nfunction Companion() {\n}\nprotoOf(Companion).parse = function (source) {\n return new CommonSelector(Companion_instance_1.db(source));\n};\nprotoOf(Companion).parseOrNull = function (source) {\n var tmp0_safe_receiver = Companion_instance_1.eb(source);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp = new CommonSelector(tmp0_safe_receiver);\n }\n return tmp;\n};\nvar Companion_instance;\nfunction Companion_getInstance() {\n return Companion_instance;\n}\nfunction CommonSelector(selector) {\n this.fb_1 = selector;\n this.tracks = this.fb_1.qb();\n this.trackIndex = this.fb_1.ib_1;\n this.connectKeys = this.fb_1.rb();\n this.propertyNames = this.fb_1.sb();\n}\nprotoOf(CommonSelector).tb = function () {\n return this.fb_1;\n};\nprotoOf(CommonSelector).qb = function () {\n return this.tracks;\n};\nprotoOf(CommonSelector).ub = function () {\n return this.trackIndex;\n};\nprotoOf(CommonSelector).rb = function () {\n return this.connectKeys;\n};\nprotoOf(CommonSelector).sb = function () {\n return this.propertyNames;\n};\nprotoOf(CommonSelector).match = function (node, transform) {\n return this.fb_1.wb(node, transform.vb_1);\n};\nprotoOf(CommonSelector).matchTrack = function (node, transform) {\n var tmp0_safe_receiver = this.fb_1.xb(node, transform.vb_1);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp_0 = tmp;\n return (tmp_0 == null ? true : isArray(tmp_0)) ? tmp_0 : THROW_CCE();\n};\nprotoOf(CommonSelector).toString = function () {\n return this.fb_1.toString();\n};\nfunction CommonTransform$transform$lambda($getChildren) {\n return function (node) {\n return asSequence($getChildren(node));\n };\n}\nfunction CommonTransform$querySelectorAll$lambda(this$0) {\n return function (node, selector) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList(this$0.vb_1.kc_1(node, selector.fb_1));\n var result = copyToArray(this_0);\n return isArray(result) ? result : THROW_CCE();\n };\n}\nfunction CommonTransform$querySelector$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.vb_1.kc_1(node, selector.fb_1));\n };\n}\nfunction CommonTransform$querySelectorTrackAll$lambda$lambda(it) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(it);\n return isArray(tmp) ? tmp : THROW_CCE();\n}\nfunction CommonTransform$querySelectorTrackAll$lambda(this$0) {\n return function (node, selector) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = this$0.vb_1.mc_1(node, selector.fb_1);\n var this_0 = toList(map(tmp, CommonTransform$querySelectorTrackAll$lambda$lambda));\n var result = copyToArray(this_0);\n return isArray(result) ? result : THROW_CCE();\n };\n}\nfunction CommonTransform$querySelectorTrack$lambda(this$0) {\n return function (node, selector) {\n var tmp0_safe_receiver = firstOrNull(this$0.vb_1.mc_1(node, selector.fb_1));\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp_0 = tmp;\n return (tmp_0 == null ? true : isArray(tmp_0)) ? tmp_0 : THROW_CCE();\n };\n}\nfunction CommonTransform(getAttr, getName, getChildren, getParent) {\n var tmp = this;\n tmp.vb_1 = new Transform(getAttr, getName, CommonTransform$transform$lambda(getChildren), VOID, getParent);\n var tmp_0 = this;\n tmp_0.querySelectorAll = CommonTransform$querySelectorAll$lambda(this);\n var tmp_1 = this;\n tmp_1.querySelector = CommonTransform$querySelector$lambda(this);\n var tmp_2 = this;\n tmp_2.querySelectorTrackAll = CommonTransform$querySelectorTrackAll$lambda(this);\n var tmp_3 = this;\n tmp_3.querySelectorTrack = CommonTransform$querySelectorTrack$lambda(this);\n}\nprotoOf(CommonTransform).oc = function () {\n return this.vb_1;\n};\nprotoOf(CommonTransform).pc = function () {\n return this.querySelectorAll;\n};\nprotoOf(CommonTransform).qc = function () {\n return this.querySelector;\n};\nprotoOf(CommonTransform).rc = function () {\n return this.querySelectorTrackAll;\n};\nprotoOf(CommonTransform).sc = function () {\n return this.querySelectorTrack;\n};\nfunction Companion_0() {\n}\nprotoOf(Companion_0).tc = function (source, offset, value, expectedValue) {\n var tmp;\n if (offset >= source.length) {\n tmp = true;\n } else {\n var tmp_0;\n // Inline function 'kotlin.text.isNotEmpty' call\n if (charSequenceLength(value) > 0) {\n tmp_0 = !contains(value, charSequenceGet(source, offset));\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n if (tmp) {\n throw new ExtSyntaxError(expectedValue == null ? value : expectedValue, offset, source);\n }\n};\nprotoOf(Companion_0).assert = function (source, offset, value, expectedValue, $super) {\n value = value === VOID ? '' : value;\n expectedValue = expectedValue === VOID ? null : expectedValue;\n return this.tc(source, offset, value, expectedValue);\n};\nprotoOf(Companion_0).uc = function (source, offset, expectedValue) {\n throw new ExtSyntaxError(expectedValue, offset, source);\n};\nprotoOf(Companion_0).throwError = function (source, offset, expectedValue, $super) {\n expectedValue = expectedValue === VOID ? '' : expectedValue;\n return this.uc(source, offset, expectedValue);\n};\nvar Companion_instance_0;\nfunction Companion_getInstance_0() {\n return Companion_instance_0;\n}\nfunction ExtSyntaxError(expectedValue, position, source) {\n var tmp = getOrNull(source, position);\n Exception_init_$Init$('expected ' + expectedValue + ' in selector at position ' + position + ', but got ' + toString(tmp == null ? null : new Char(tmp)), this);\n captureStack(this, ExtSyntaxError);\n this.expectedValue = expectedValue;\n this.position = position;\n this.source = source;\n}\nprotoOf(ExtSyntaxError).vc = function () {\n return this.expectedValue;\n};\nprotoOf(ExtSyntaxError).wc = function () {\n return this.position;\n};\nprotoOf(ExtSyntaxError).xc = function () {\n return this.source;\n};\nprotoOf(ExtSyntaxError).bb = function () {\n return this.expectedValue;\n};\nprotoOf(ExtSyntaxError).cb = function () {\n return this.position;\n};\nprotoOf(ExtSyntaxError).yc = function () {\n return this.source;\n};\nprotoOf(ExtSyntaxError).zc = function (expectedValue, position, source) {\n return new ExtSyntaxError(expectedValue, position, source);\n};\nprotoOf(ExtSyntaxError).copy = function (expectedValue, position, source, $super) {\n expectedValue = expectedValue === VOID ? this.expectedValue : expectedValue;\n position = position === VOID ? this.position : position;\n source = source === VOID ? this.source : source;\n return this.zc(expectedValue, position, source);\n};\nprotoOf(ExtSyntaxError).toString = function () {\n return 'ExtSyntaxError(expectedValue=' + this.expectedValue + ', position=' + this.position + ', source=' + this.source + ')';\n};\nprotoOf(ExtSyntaxError).hashCode = function () {\n var result = getStringHashCode(this.expectedValue);\n result = imul(result, 31) + this.position | 0;\n result = imul(result, 31) + getStringHashCode(this.source) | 0;\n return result;\n};\nprotoOf(ExtSyntaxError).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ExtSyntaxError))\n return false;\n var tmp0_other_with_cast = other instanceof ExtSyntaxError ? other : THROW_CCE();\n if (!(this.expectedValue === tmp0_other_with_cast.expectedValue))\n return false;\n if (!(this.position === tmp0_other_with_cast.position))\n return false;\n if (!(this.source === tmp0_other_with_cast.source))\n return false;\n return true;\n};\nfunction Companion_1() {\n}\nprotoOf(Companion_1).db = function (source) {\n return ParserSet_getInstance().xd_1(source);\n};\nprotoOf(Companion_1).eb = function (source) {\n var tmp;\n try {\n tmp = ParserSet_getInstance().xd_1(source);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof Exception) {\n var e = $p;\n tmp_0 = null;\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return tmp;\n};\nvar Companion_instance_1;\nfunction Companion_getInstance_1() {\n return Companion_instance_1;\n}\nfunction Selector$tracks$delegate$lambda(this$0) {\n return function () {\n var list = mutableListOf([this$0.gb_1]);\n $l$loop: while (true) {\n var tmp0_safe_receiver = last(list).zd_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n break $l$loop;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n list.k(tmp);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(list, 10));\n var tmp0_iterator = list.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.Selector.tracks$delegate..' call\n var tmp$ret$0 = item.yd_1.ce_1;\n destination.k(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n}\nfunction Selector$connectKeys$delegate$lambda(this$0) {\n return function () {\n var c = this$0.gb_1.zd_1;\n // Inline function 'kotlin.collections.mutableListOf' call\n var keys = ArrayList_init_$Create$_0();\n while (!(c == null)) {\n ensureNotNull(c).ae_1.je_1;\n keys.k(ensureNotNull(c).ae_1.ie_1.le_1);\n var tmp0_safe_receiver = c;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n c = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zd_1;\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(keys);\n };\n}\nfunction Selector$propertyNames$delegate$lambda(this$0) {\n return function () {\n var p = this$0.gb_1;\n // Inline function 'kotlin.collections.mutableSetOf' call\n var names = LinkedHashSet_init_$Create$();\n while (!(p == null)) {\n var s = ensureNotNull(p).yd_1;\n var tmp0_safe_receiver = ensureNotNull(p).zd_1;\n p = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n names.l(s.ge_1);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = distinct(names);\n return copyToArray(this_0);\n };\n}\nfunction Selector(propertyWrapper) {\n this.gb_1 = propertyWrapper;\n var tmp = this;\n tmp.hb_1 = lazy(Selector$tracks$delegate$lambda(this));\n var tmp_0 = this;\n // Inline function 'kotlin.let' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var this_0 = this.qb();\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.Selector.trackIndex.' call\n if (this_0[index]) {\n tmp$ret$1 = index;\n break $l$block;\n }\n }\n while (inductionVariable <= last);\n tmp$ret$1 = -1;\n }\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.trackIndex.' call\n var i = tmp$ret$1;\n tmp_0.ib_1 = i < 0 ? 0 : i;\n var tmp_1 = this;\n tmp_1.jb_1 = lazy(Selector$connectKeys$delegate$lambda(this));\n var tmp_2 = this;\n tmp_2.kb_1 = lazy(Selector$propertyNames$delegate$lambda(this));\n var tmp_3 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfIdValue.' call\n var e = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_4;\n var tmp_5;\n var tmp_6;\n var tmp_7;\n if (e instanceof BinaryExpression) {\n tmp_7 = e.me_1 === 'id';\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n tmp_6 = equals(e.ne_1, Equal_getInstance());\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n var tmp_8 = e.oe_1;\n tmp_5 = !(tmp_8 == null) ? typeof tmp_8 === 'string' : false;\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = e.oe_1;\n } else {\n tmp_4 = null;\n }\n tmp_3.lb_1 = tmp_4;\n var tmp_9 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfVidValue.' call\n var e_0 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_10;\n var tmp_11;\n var tmp_12;\n var tmp_13;\n if (e_0 instanceof BinaryExpression) {\n tmp_13 = e_0.me_1 === 'vid';\n } else {\n tmp_13 = false;\n }\n if (tmp_13) {\n tmp_12 = equals(e_0.ne_1, Equal_getInstance());\n } else {\n tmp_12 = false;\n }\n if (tmp_12) {\n var tmp_14 = e_0.oe_1;\n tmp_11 = !(tmp_14 == null) ? typeof tmp_14 === 'string' : false;\n } else {\n tmp_11 = false;\n }\n if (tmp_11) {\n tmp_10 = e_0.oe_1;\n } else {\n tmp_10 = null;\n }\n tmp_9.mb_1 = tmp_10;\n var tmp_15 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfTextValue.' call\n var e_1 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_16;\n var tmp_17;\n var tmp_18;\n var tmp_19;\n if (e_1 instanceof BinaryExpression) {\n tmp_19 = e_1.me_1 === 'text';\n } else {\n tmp_19 = false;\n }\n if (tmp_19) {\n tmp_18 = ((equals(e_1.ne_1, Equal_getInstance()) ? true : equals(e_1.ne_1, Start_getInstance())) ? true : equals(e_1.ne_1, Include_getInstance())) ? true : equals(e_1.ne_1, End_getInstance());\n } else {\n tmp_18 = false;\n }\n if (tmp_18) {\n var tmp_20 = e_1.oe_1;\n tmp_17 = !(tmp_20 == null) ? typeof tmp_20 === 'string' : false;\n } else {\n tmp_17 = false;\n }\n if (tmp_17) {\n tmp_16 = e_1.oe_1;\n } else {\n tmp_16 = null;\n }\n tmp_15.nb_1 = tmp_16;\n this.ob_1 = (!(this.lb_1 == null) ? true : !(this.mb_1 == null)) ? true : !(this.nb_1 == null);\n var tmp_21 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.isMatchRoot.' call\n var e_2 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_22;\n var tmp_23;\n var tmp_24;\n if (e_2 instanceof BinaryExpression) {\n tmp_24 = e_2.me_1 === 'depth';\n } else {\n tmp_24 = false;\n }\n if (tmp_24) {\n tmp_23 = equals(e_2.ne_1, Equal_getInstance());\n } else {\n tmp_23 = false;\n }\n if (tmp_23) {\n tmp_22 = equals(e_2.oe_1, 0);\n } else {\n tmp_22 = false;\n }\n tmp_21.pb_1 = tmp_22;\n}\nprotoOf(Selector).toString = function () {\n return this.gb_1.toString();\n};\nprotoOf(Selector).qb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.hb_1;\n tracks$factory();\n return this_0.i4();\n};\nprotoOf(Selector).rb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.jb_1;\n connectKeys$factory();\n return this_0.i4();\n};\nprotoOf(Selector).sb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.kb_1;\n propertyNames$factory();\n return this_0.i4();\n};\nprotoOf(Selector).qe = function (node, transform, trackNodes) {\n var tmp0_elvis_lhs = this.re(node, transform, trackNodes);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var trackTempNodes = tmp;\n return trackTempNodes.w(this.ib_1);\n};\nprotoOf(Selector).wb = function (node, transform, trackNodes, $super) {\n var tmp;\n if (trackNodes === VOID) {\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp = ArrayList_init_$Create$_0();\n } else {\n tmp = trackNodes;\n }\n trackNodes = tmp;\n return $super === VOID ? this.qe(node, transform, trackNodes) : $super.qe.call(this, node, transform, trackNodes);\n};\nprotoOf(Selector).re = function (node, transform, trackNodes) {\n return this.gb_1.re(node, transform, trackNodes);\n};\nprotoOf(Selector).xb = function (node, transform, trackNodes, $super) {\n var tmp;\n if (trackNodes === VOID) {\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp = ArrayList_init_$Create$_0();\n } else {\n tmp = trackNodes;\n }\n trackNodes = tmp;\n return $super === VOID ? this.re(node, transform, trackNodes) : $super.re.call(this, node, transform, trackNodes);\n};\nfunction tracks$factory() {\n return getPropertyCallableRef('tracks', 1, KProperty1, function (receiver) {\n return receiver.qb();\n }, null);\n}\nfunction connectKeys$factory() {\n return getPropertyCallableRef('connectKeys', 1, KProperty1, function (receiver) {\n return receiver.rb();\n }, null);\n}\nfunction propertyNames$factory() {\n return getPropertyCallableRef('propertyNames', 1, KProperty1, function (receiver) {\n return receiver.sb();\n }, null);\n}\nfunction Transform$_init_$lambda$slambda$lambda_6maxik($node) {\n return function (it) {\n return !equals(it, $node);\n };\n}\nfunction Transform$_init_$lambda$slambda$lambda_6maxik_0($node) {\n return function (it) {\n return !equals(it, $node);\n };\n}\nfunction Transform$_init_$lambda_wpwstd($getChildren) {\n return function (node, offset) {\n return elementAtOrNull($getChildren(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj($getParent, $node, resultContinuation) {\n this.af_1 = $getParent;\n this.bf_1 = $node;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 5;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.af_1(this.bf_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.df_1 = tmp_1;\n this.n6_1 = 1;\n continue $sm;\n case 1:\n if (!!(this.df_1 == null)) {\n this.n6_1 = 4;\n continue $sm;\n }\n\n this.ef_1 = this.df_1;\n if (this.ef_1 == null) {\n this.ff_1 = null;\n this.n6_1 = 3;\n continue $sm;\n } else {\n var tmp_2 = this;\n tmp_2.gf_1 = this.ef_1;\n var tmp_3 = this;\n tmp_3.hf_1 = this.gf_1;\n this.n6_1 = 2;\n suspendResult = this.cf_1.y7(this.hf_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n }\n\n case 2:\n var tmp_4 = this;\n this.df_1 = this.af_1(this.hf_1);\n tmp_4.ff_1 = Unit_instance;\n this.n6_1 = 3;\n continue $sm;\n case 3:\n this.n6_1 = 1;\n continue $sm;\n case 4:\n return Unit_instance;\n case 5:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 5) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).jf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj(this.af_1, this.bf_1, completion);\n i.cf_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_0($getParent, $node, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj($getParent, $node, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_0($getParent) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_0($getParent, node, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_1($getAncestors) {\n return function (node, offset) {\n return elementAtOrNull($getAncestors(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_1($getParent, $node, $getChildren, resultContinuation) {\n this.sf_1 = $getParent;\n this.tf_1 = $node;\n this.uf_1 = $getChildren;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 2;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.sf_1(this.tf_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.wf_1 = tmp_1;\n var tmp_2 = this;\n var tmp_3 = this.uf_1(this.wf_1);\n tmp_2.xf_1 = toMutableList(takeWhile(tmp_3, Transform$_init_$lambda$slambda$lambda_6maxik(this.tf_1)));\n reverse(this.xf_1);\n this.n6_1 = 1;\n suspendResult = this.vf_1.a8(this.xf_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n return Unit_instance;\n case 2:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 2) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).zf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_1(this.sf_1, this.tf_1, this.uf_1, completion);\n i.vf_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_2($getParent, $node, $getChildren, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_1($getParent, $node, $getChildren, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_2($getParent, $getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_2($getParent, node, $getChildren, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_3($getBeforeBrothers) {\n return function (node, offset) {\n return elementAtOrNull($getBeforeBrothers(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_3($getParent, $node, $getChildren, resultContinuation) {\n this.ig_1 = $getParent;\n this.jg_1 = $node;\n this.kg_1 = $getChildren;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 2;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.ig_1(this.jg_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.mg_1 = tmp_1;\n this.n6_1 = 1;\n var tmp_2 = this.kg_1(this.mg_1);\n suspendResult = this.lg_1.b8(drop(dropWhile(tmp_2, Transform$_init_$lambda$slambda$lambda_6maxik_0(this.jg_1)), 1), this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n return Unit_instance;\n case 2:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 2) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).zf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_3(this.ig_1, this.jg_1, this.kg_1, completion);\n i.lg_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_4($getParent, $node, $getChildren, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_3($getParent, $node, $getChildren, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_4($getParent, $getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_4($getParent, node, $getChildren, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_5($getAfterBrothers) {\n return function (node, offset) {\n return elementAtOrNull($getAfterBrothers(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_5($getChildren, $node, resultContinuation) {\n this.vg_1 = $getChildren;\n this.wg_1 = $node;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 4;\n this.yg_1 = toMutableList(this.vg_1(this.wg_1));\n if (this.yg_1.s())\n return Unit_instance;\n reverse(this.yg_1);\n var tmp_0 = this;\n tmp_0.zg_1 = ArrayList_init_$Create$_0();\n this.n6_1 = 1;\n continue $sm;\n case 1:\n this.ah_1 = removeLast(this.yg_1);\n this.n6_1 = 2;\n suspendResult = this.xg_1.y7(this.ah_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 2:\n var tmp0_iterator = this.vg_1(this.ah_1).n();\n while (tmp0_iterator.o()) {\n var childNode = tmp0_iterator.p();\n this.zg_1.k(childNode);\n }\n\n if (!this.zg_1.s()) {\n var inductionVariable = this.zg_1.i() - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n this.yg_1.k(this.zg_1.w(i));\n }\n while (0 <= inductionVariable);\n this.zg_1.h1();\n }\n\n if (!this.yg_1.s()) {\n this.n6_1 = 1;\n continue $sm;\n }\n\n this.n6_1 = 3;\n continue $sm;\n case 3:\n return Unit_instance;\n case 4:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 4) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).jf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_5(this.vg_1, this.wg_1, completion);\n i.xg_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_6($getChildren, $node, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_5($getChildren, $node, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_6($getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_6($getChildren, node, null));\n };\n}\nfunction Transform$querySelectorAll$lambda$slambda($selector, $node, this$0, resultContinuation) {\n this.jh_1 = $selector;\n this.kh_1 = $node;\n this.lh_1 = this$0;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$querySelectorAll$lambda$slambda).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 7;\n var tmp_0 = this;\n tmp_0.nh_1 = ArrayList_init_$Create$_0();\n this.oh_1 = this.jh_1.qe(this.kh_1, this.lh_1, this.nh_1);\n if (!(this.oh_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.mh_1.y7(this.oh_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n var tmp_1 = this;\n tmp_1.ph_1 = this.lh_1.jc_1(this.kh_1);\n this.qh_1 = this.ph_1.n();\n this.n6_1 = 3;\n continue $sm;\n case 3:\n if (!this.qh_1.o()) {\n this.n6_1 = 6;\n continue $sm;\n }\n\n this.rh_1 = this.qh_1.p();\n var tmp_2 = this;\n tmp_2.sh_1 = this.rh_1;\n this.nh_1.h1();\n this.th_1 = this.jh_1.qe(this.sh_1, this.lh_1, this.nh_1);\n if (!(this.th_1 == null)) {\n this.n6_1 = 4;\n suspendResult = this.mh_1.y7(this.th_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 5;\n continue $sm;\n }\n\n case 4:\n this.n6_1 = 5;\n continue $sm;\n case 5:\n this.n6_1 = 3;\n continue $sm;\n case 6:\n return Unit_instance;\n case 7:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 7) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).jf = function ($this$sequence, completion) {\n var i = new Transform$querySelectorAll$lambda$slambda(this.jh_1, this.kh_1, this.lh_1, completion);\n i.mh_1 = $this$sequence;\n return i;\n};\nfunction Transform$querySelectorAll$lambda$slambda_0($selector, $node, this$0, resultContinuation) {\n var i = new Transform$querySelectorAll$lambda$slambda($selector, $node, this$0, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$querySelectorAll$lambda(this$0) {\n return function (node, selector) {\n return sequence(Transform$querySelectorAll$lambda$slambda_0(selector, node, this$0, null));\n };\n}\nfunction Transform$querySelector$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.kc_1(node, selector));\n };\n}\nfunction Transform$querySelectorTrackAll$lambda$slambda($selector, $node, this$0, resultContinuation) {\n this.ci_1 = $selector;\n this.di_1 = $node;\n this.ei_1 = this$0;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).mi = function ($this$sequence, $completion) {\n var tmp = this.ni($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).l7 = function (p1, $completion) {\n return this.mi(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 7;\n this.gi_1 = this.ci_1.xb(this.di_1, this.ei_1);\n if (!(this.gi_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.fi_1.y7(this.gi_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n var tmp_0 = this;\n tmp_0.hi_1 = this.ei_1.jc_1(this.di_1);\n this.ii_1 = this.hi_1.n();\n this.n6_1 = 3;\n continue $sm;\n case 3:\n if (!this.ii_1.o()) {\n this.n6_1 = 6;\n continue $sm;\n }\n\n this.ji_1 = this.ii_1.p();\n var tmp_1 = this;\n tmp_1.ki_1 = this.ji_1;\n this.li_1 = this.ci_1.xb(this.ki_1, this.ei_1);\n if (!(this.li_1 == null)) {\n this.n6_1 = 4;\n suspendResult = this.fi_1.y7(this.li_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 5;\n continue $sm;\n }\n\n case 4:\n this.n6_1 = 5;\n continue $sm;\n case 5:\n this.n6_1 = 3;\n continue $sm;\n case 6:\n return Unit_instance;\n case 7:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 7) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).ni = function ($this$sequence, completion) {\n var i = new Transform$querySelectorTrackAll$lambda$slambda(this.ci_1, this.di_1, this.ei_1, completion);\n i.fi_1 = $this$sequence;\n return i;\n};\nfunction Transform$querySelectorTrackAll$lambda$slambda_0($selector, $node, this$0, resultContinuation) {\n var i = new Transform$querySelectorTrackAll$lambda$slambda($selector, $node, this$0, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.mi($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$querySelectorTrackAll$lambda(this$0) {\n return function (node, selector) {\n return sequence(Transform$querySelectorTrackAll$lambda$slambda_0(selector, node, this$0, null));\n };\n}\nfunction Transform$querySelectorTrack$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.mc_1(node, selector));\n };\n}\nfunction Transform(getAttr, getName, getChildren, getChild, getParent, getAncestors, getAncestor, getBeforeBrothers, getBeforeBrother, getAfterBrothers, getAfterBrother, getDescendants) {\n var tmp;\n if (getChild === VOID) {\n tmp = Transform$_init_$lambda_wpwstd(getChildren);\n } else {\n tmp = getChild;\n }\n getChild = tmp;\n var tmp_0;\n if (getAncestors === VOID) {\n tmp_0 = Transform$_init_$lambda_wpwstd_0(getParent);\n } else {\n tmp_0 = getAncestors;\n }\n getAncestors = tmp_0;\n var tmp_1;\n if (getAncestor === VOID) {\n tmp_1 = Transform$_init_$lambda_wpwstd_1(getAncestors);\n } else {\n tmp_1 = getAncestor;\n }\n getAncestor = tmp_1;\n var tmp_2;\n if (getBeforeBrothers === VOID) {\n tmp_2 = Transform$_init_$lambda_wpwstd_2(getParent, getChildren);\n } else {\n tmp_2 = getBeforeBrothers;\n }\n getBeforeBrothers = tmp_2;\n var tmp_3;\n if (getBeforeBrother === VOID) {\n tmp_3 = Transform$_init_$lambda_wpwstd_3(getBeforeBrothers);\n } else {\n tmp_3 = getBeforeBrother;\n }\n getBeforeBrother = tmp_3;\n var tmp_4;\n if (getAfterBrothers === VOID) {\n tmp_4 = Transform$_init_$lambda_wpwstd_4(getParent, getChildren);\n } else {\n tmp_4 = getAfterBrothers;\n }\n getAfterBrothers = tmp_4;\n var tmp_5;\n if (getAfterBrother === VOID) {\n tmp_5 = Transform$_init_$lambda_wpwstd_5(getAfterBrothers);\n } else {\n tmp_5 = getAfterBrother;\n }\n getAfterBrother = tmp_5;\n var tmp_6;\n if (getDescendants === VOID) {\n tmp_6 = Transform$_init_$lambda_wpwstd_6(getChildren);\n } else {\n tmp_6 = getDescendants;\n }\n getDescendants = tmp_6;\n this.yb_1 = getAttr;\n this.zb_1 = getName;\n this.ac_1 = getChildren;\n this.bc_1 = getChild;\n this.cc_1 = getParent;\n this.dc_1 = getAncestors;\n this.ec_1 = getAncestor;\n this.fc_1 = getBeforeBrothers;\n this.gc_1 = getBeforeBrother;\n this.hc_1 = getAfterBrothers;\n this.ic_1 = getAfterBrother;\n this.jc_1 = getDescendants;\n var tmp_7 = this;\n tmp_7.kc_1 = Transform$querySelectorAll$lambda(this);\n var tmp_8 = this;\n tmp_8.lc_1 = Transform$querySelector$lambda(this);\n var tmp_9 = this;\n tmp_9.mc_1 = Transform$querySelectorTrackAll$lambda(this);\n var tmp_10 = this;\n tmp_10.nc_1 = Transform$querySelectorTrack$lambda(this);\n}\nfunction BinaryExpression(name, operator, value) {\n Expression.call(this);\n this.me_1 = name;\n this.ne_1 = operator;\n this.oe_1 = value;\n this.pe_1 = listOf(this.me_1);\n}\nprotoOf(BinaryExpression).oi = function (node, transform) {\n return this.ne_1.qi(transform.yb_1(node, this.me_1), this.oe_1);\n};\nprotoOf(BinaryExpression).sb = function () {\n return this.pe_1;\n};\nprotoOf(BinaryExpression).toString = function () {\n var tmp;\n var tmp_0 = this.oe_1;\n if (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) {\n var wrapChar = _Char___init__impl__6a9atx(34);\n var sb = StringBuilder_init_$Create$();\n sb.e4(wrapChar);\n // Inline function 'kotlin.text.forEach' call\n var indexedObject = this.oe_1;\n var inductionVariable = 0;\n while (inductionVariable < charSequenceLength(indexedObject)) {\n var element = charSequenceGet(indexedObject, inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.data.BinaryExpression.toString.' call\n var escapeChar = element === wrapChar ? wrapChar : element === _Char___init__impl__6a9atx(10) ? _Char___init__impl__6a9atx(110) : element === _Char___init__impl__6a9atx(13) ? _Char___init__impl__6a9atx(114) : element === _Char___init__impl__6a9atx(9) ? _Char___init__impl__6a9atx(116) : element === _Char___init__impl__6a9atx(8) ? _Char___init__impl__6a9atx(98) : element === _Char___init__impl__6a9atx(92) ? _Char___init__impl__6a9atx(92) : null;\n var tmp_1 = escapeChar;\n if (!((tmp_1 == null ? null : new Char(tmp_1)) == null)) {\n var tmp_2 = escapeChar;\n sb.d4('\\\\' + toString(tmp_2 == null ? null : new Char(tmp_2)));\n } else {\n // Inline function 'kotlin.code' call\n var tmp1_subject = Char__toInt_impl_vasixd(element);\n if (0 <= tmp1_subject ? tmp1_subject <= 15 : false) {\n // Inline function 'kotlin.code' call\n var tmp$ret$1 = Char__toInt_impl_vasixd(element);\n sb.d4('\\\\x0' + toString_0(tmp$ret$1, 16));\n } else if (10 <= tmp1_subject ? tmp1_subject <= 31 : false) {\n // Inline function 'kotlin.code' call\n var tmp$ret$2 = Char__toInt_impl_vasixd(element);\n sb.d4('\\\\x' + toString_0(tmp$ret$2, 16));\n } else {\n sb.e4(element);\n }\n }\n }\n sb.e4(wrapChar);\n tmp = sb.toString();\n } else {\n tmp = this.oe_1;\n }\n return this.me_1 + this.ne_1 + toString(tmp);\n};\nprotoOf(BinaryExpression).hashCode = function () {\n var result = getStringHashCode(this.me_1);\n result = imul(result, 31) + hashCode(this.ne_1) | 0;\n result = imul(result, 31) + (this.oe_1 == null ? 0 : hashCode(this.oe_1)) | 0;\n return result;\n};\nprotoOf(BinaryExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof BinaryExpression))\n return false;\n var tmp0_other_with_cast = other instanceof BinaryExpression ? other : THROW_CCE();\n if (!(this.me_1 === tmp0_other_with_cast.me_1))\n return false;\n if (!equals(this.ne_1, tmp0_other_with_cast.ne_1))\n return false;\n if (!equals(this.oe_1, tmp0_other_with_cast.oe_1))\n return false;\n return true;\n};\nfunction contentReversedEquals(_this__u8e3s4, $this, other) {\n if (_this__u8e3s4 === other)\n return true;\n if (!(charSequenceLength(_this__u8e3s4) === charSequenceLength(other)))\n return false;\n var inductionVariable = charSequenceLength(_this__u8e3s4) - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n if (!(charSequenceGet(_this__u8e3s4, i) === charSequenceGet(other, i)))\n return false;\n }\n while (0 <= inductionVariable);\n return true;\n}\nfunction sam$kotlin_Comparator$0(function_0) {\n this.ri_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0).z4 = function (a, b) {\n return this.ri_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction CompareOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.pi_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.pi_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_2() {\n Companion_instance_2 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([Equal_getInstance(), NotEqual_getInstance(), Start_getInstance(), NotStart_getInstance(), Include_getInstance(), NotInclude_getInstance(), End_getInstance(), NotEnd_getInstance(), Less_getInstance(), LessEqual_getInstance(), More_getInstance(), MoreEqual_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = CompareOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp_0);\n tmp.si_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_2;\nfunction Companion_getInstance_2() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n}\nfunction Equal() {\n Equal_instance = this;\n CompareOperator.call(this, '=');\n}\nprotoOf(Equal).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentReversedEquals(left, Companion_getInstance_2(), right);\n } else {\n tmp = equals(left, right);\n }\n return tmp;\n};\nvar Equal_instance;\nfunction Equal_getInstance() {\n if (Equal_instance == null)\n new Equal();\n return Equal_instance;\n}\nfunction NotEqual() {\n NotEqual_instance = this;\n CompareOperator.call(this, '!=');\n}\nprotoOf(NotEqual).qi = function (left, right) {\n return !Equal_getInstance().qi(left, right);\n};\nvar NotEqual_instance;\nfunction NotEqual_getInstance() {\n if (NotEqual_instance == null)\n new NotEqual();\n return NotEqual_instance;\n}\nfunction Start() {\n Start_instance = this;\n CompareOperator.call(this, '^=');\n}\nprotoOf(Start).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = startsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Start_instance;\nfunction Start_getInstance() {\n if (Start_instance == null)\n new Start();\n return Start_instance;\n}\nfunction NotStart() {\n NotStart_instance = this;\n CompareOperator.call(this, '!^=');\n}\nprotoOf(NotStart).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !startsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotStart_instance;\nfunction NotStart_getInstance() {\n if (NotStart_instance == null)\n new NotStart();\n return NotStart_instance;\n}\nfunction Include() {\n Include_instance = this;\n CompareOperator.call(this, '*=');\n}\nprotoOf(Include).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contains_0(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Include_instance;\nfunction Include_getInstance() {\n if (Include_instance == null)\n new Include();\n return Include_instance;\n}\nfunction NotInclude() {\n NotInclude_instance = this;\n CompareOperator.call(this, '!*=');\n}\nprotoOf(NotInclude).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !contains_0(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotInclude_instance;\nfunction NotInclude_getInstance() {\n if (NotInclude_instance == null)\n new NotInclude();\n return NotInclude_instance;\n}\nfunction End() {\n End_instance = this;\n CompareOperator.call(this, '$=');\n}\nprotoOf(End).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = endsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar End_instance;\nfunction End_getInstance() {\n if (End_instance == null)\n new End();\n return End_instance;\n}\nfunction NotEnd() {\n NotEnd_instance = this;\n CompareOperator.call(this, '!$=');\n}\nprotoOf(NotEnd).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !endsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotEnd_instance;\nfunction NotEnd_getInstance() {\n if (NotEnd_instance == null)\n new NotEnd();\n return NotEnd_instance;\n}\nfunction Less() {\n Less_instance = this;\n CompareOperator.call(this, '<');\n}\nprotoOf(Less).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left < right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Less_instance;\nfunction Less_getInstance() {\n if (Less_instance == null)\n new Less();\n return Less_instance;\n}\nfunction LessEqual() {\n LessEqual_instance = this;\n CompareOperator.call(this, '<=');\n}\nprotoOf(LessEqual).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left <= right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar LessEqual_instance;\nfunction LessEqual_getInstance() {\n if (LessEqual_instance == null)\n new LessEqual();\n return LessEqual_instance;\n}\nfunction More() {\n More_instance = this;\n CompareOperator.call(this, '>');\n}\nprotoOf(More).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left > right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar More_instance;\nfunction More_getInstance() {\n if (More_instance == null)\n new More();\n return More_instance;\n}\nfunction MoreEqual() {\n MoreEqual_instance = this;\n CompareOperator.call(this, '>=');\n}\nprotoOf(MoreEqual).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left >= right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar MoreEqual_instance;\nfunction MoreEqual_getInstance() {\n if (MoreEqual_instance == null)\n new MoreEqual();\n return MoreEqual_instance;\n}\nfunction CompareOperator(key) {\n Companion_getInstance_2();\n this.pi_1 = key;\n}\nprotoOf(CompareOperator).toString = function () {\n return this.pi_1;\n};\nfunction ConnectExpression() {\n}\nfunction sam$kotlin_Comparator$0_0(function_0) {\n this.ij_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0_0).z4 = function (a, b) {\n return this.ij_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction ConnectOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.le_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.le_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_3() {\n Companion_instance_3 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([BeforeBrother_getInstance(), AfterBrother_getInstance(), Ancestor_getInstance(), Child_getInstance(), Descendant_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = ConnectOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_0(tmp_0);\n tmp.jj_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_3;\nfunction Companion_getInstance_3() {\n if (Companion_instance_3 == null)\n new Companion_3();\n return Companion_instance_3;\n}\nfunction BeforeBrother() {\n BeforeBrother_instance = this;\n ConnectOperator.call(this, '+');\n}\nprotoOf(BeforeBrother).lj = function (node, transform) {\n return transform.fc_1(node);\n};\nprotoOf(BeforeBrother).mj = function (node, transform, offset) {\n return transform.gc_1(node, offset);\n};\nvar BeforeBrother_instance;\nfunction BeforeBrother_getInstance() {\n if (BeforeBrother_instance == null)\n new BeforeBrother();\n return BeforeBrother_instance;\n}\nfunction AfterBrother() {\n AfterBrother_instance = this;\n ConnectOperator.call(this, '-');\n}\nprotoOf(AfterBrother).lj = function (node, transform) {\n return transform.hc_1(node);\n};\nprotoOf(AfterBrother).mj = function (node, transform, offset) {\n return transform.ic_1(node, offset);\n};\nvar AfterBrother_instance;\nfunction AfterBrother_getInstance() {\n if (AfterBrother_instance == null)\n new AfterBrother();\n return AfterBrother_instance;\n}\nfunction Ancestor() {\n Ancestor_instance = this;\n ConnectOperator.call(this, '>');\n}\nprotoOf(Ancestor).lj = function (node, transform) {\n return transform.dc_1(node);\n};\nprotoOf(Ancestor).mj = function (node, transform, offset) {\n return transform.ec_1(node, offset);\n};\nvar Ancestor_instance;\nfunction Ancestor_getInstance() {\n if (Ancestor_instance == null)\n new Ancestor();\n return Ancestor_instance;\n}\nfunction Child() {\n Child_instance = this;\n ConnectOperator.call(this, '<');\n}\nprotoOf(Child).lj = function (node, transform) {\n return transform.ac_1(node);\n};\nprotoOf(Child).mj = function (node, transform, offset) {\n return transform.bc_1(node, offset);\n};\nvar Child_instance;\nfunction Child_getInstance() {\n if (Child_instance == null)\n new Child();\n return Child_instance;\n}\nfunction Descendant() {\n Descendant_instance = this;\n ConnectOperator.call(this, '<<');\n}\nprotoOf(Descendant).lj = function (node, transform) {\n return transform.jc_1(node);\n};\nprotoOf(Descendant).mj = function (node, transform, offset) {\n return elementAtOrNull(transform.jc_1(node), offset);\n};\nvar Descendant_instance;\nfunction Descendant_getInstance() {\n if (Descendant_instance == null)\n new Descendant();\n return Descendant_instance;\n}\nfunction ConnectOperator(key) {\n Companion_getInstance_3();\n this.le_1 = key;\n}\nprotoOf(ConnectOperator).toString = function () {\n return this.le_1;\n};\nfunction ConnectSegment$traversal$o$invoke$slambda(this$0, $node, $transform, resultContinuation) {\n this.zj_1 = this$0;\n this.ak_1 = $node;\n this.bk_1 = $transform;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 3;\n this.dk_1 = this.zj_1.ie_1.mj(this.ak_1, this.bk_1, this.zj_1.je_1.gj());\n if (!(this.dk_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.ck_1.y7(this.dk_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n return Unit_instance;\n case 3:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 3) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).zf = function ($this$sequence, completion) {\n var i = new ConnectSegment$traversal$o$invoke$slambda(this.zj_1, this.ak_1, this.bk_1, completion);\n i.ck_1 = $this$sequence;\n return i;\n};\nfunction ConnectSegment$traversal$o$invoke$slambda_0(this$0, $node, $transform, resultContinuation) {\n var i = new ConnectSegment$traversal$o$invoke$slambda(this$0, $node, $transform, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction ConnectSegment$traversal$1(this$0) {\n this.ek_1 = this$0;\n}\nprotoOf(ConnectSegment$traversal$1).fk = function (node, transform) {\n return sequence(ConnectSegment$traversal$o$invoke$slambda_0(this.ek_1, node, transform, null));\n};\nfunction ConnectSegment$traversal$2(this$0) {\n this.gk_1 = this$0;\n}\nprotoOf(ConnectSegment$traversal$2).fk = function (node, transform) {\n return this.gk_1.je_1.hj().hk(this.gk_1.ie_1.lj(node, transform));\n};\nfunction ConnectSegment(operator, connectExpression) {\n operator = operator === VOID ? Ancestor_getInstance() : operator;\n connectExpression = connectExpression === VOID ? new PolynomialExpression() : connectExpression;\n this.ie_1 = operator;\n this.je_1 = connectExpression;\n var tmp = this;\n var tmp_0;\n if (this.je_1.fj()) {\n tmp_0 = new ConnectSegment$traversal$1(this);\n } else {\n tmp_0 = new ConnectSegment$traversal$2(this);\n }\n tmp.ke_1 = tmp_0;\n}\nprotoOf(ConnectSegment).toString = function () {\n var tmp;\n var tmp_0;\n var tmp_1;\n if (equals(this.ie_1, Ancestor_getInstance())) {\n var tmp_2 = this.je_1;\n tmp_1 = tmp_2 instanceof PolynomialExpression;\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = this.je_1.ik_1 === 1;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = this.je_1.jk_1 === 0;\n } else {\n tmp = false;\n }\n if (tmp) {\n return '';\n }\n return this.ie_1.toString() + toString_1(this.je_1);\n};\nprotoOf(ConnectSegment).hashCode = function () {\n var result = hashCode(this.ie_1);\n result = imul(result, 31) + hashCode(this.je_1) | 0;\n return result;\n};\nprotoOf(ConnectSegment).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectSegment))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectSegment ? other : THROW_CCE();\n if (!equals(this.ie_1, tmp0_other_with_cast.ie_1))\n return false;\n if (!equals(this.je_1, tmp0_other_with_cast.je_1))\n return false;\n return true;\n};\nfunction ConnectWrapper(connectSegment, to) {\n this.ae_1 = connectSegment;\n this.be_1 = to;\n}\nprotoOf(ConnectWrapper).toString = function () {\n // Inline function 'kotlin.text.trim' call\n var this_0 = this.be_1.toString() + ' ' + this.ae_1.toString();\n return toString_1(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));\n};\nprotoOf(ConnectWrapper).re = function (node, transform, trackNodes) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.ae_1.ke_1.fk(node, transform).n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n $l$block: {\n // Inline function 'li.songe.selector.data.ConnectWrapper.matchTracks.' call\n if (element == null) {\n break $l$block;\n }\n var r = this.be_1.re(element, transform, trackNodes);\n if (!(r == null))\n return r;\n }\n }\n return null;\n};\nprotoOf(ConnectWrapper).hashCode = function () {\n var result = this.ae_1.hashCode();\n result = imul(result, 31) + this.be_1.hashCode() | 0;\n return result;\n};\nprotoOf(ConnectWrapper).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectWrapper))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectWrapper ? other : THROW_CCE();\n if (!this.ae_1.equals(tmp0_other_with_cast.ae_1))\n return false;\n if (!this.be_1.equals(tmp0_other_with_cast.be_1))\n return false;\n return true;\n};\nfunction Expression() {\n}\nfunction LogicalExpression(left, operator, right) {\n Expression.call(this);\n this.qk_1 = left;\n this.rk_1 = operator;\n this.sk_1 = right;\n this.tk_1 = plus(this.qk_1.sb(), this.sk_1.sb());\n}\nprotoOf(LogicalExpression).oi = function (node, transform) {\n return this.rk_1.vk(node, transform, this.qk_1, this.sk_1);\n};\nprotoOf(LogicalExpression).sb = function () {\n return this.tk_1;\n};\nprotoOf(LogicalExpression).toString = function () {\n var tmp;\n var tmp_0;\n var tmp_1 = this.qk_1;\n if (tmp_1 instanceof LogicalExpression) {\n tmp_0 = !equals(this.qk_1.rk_1, this.rk_1);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = '(' + this.qk_1 + ')';\n } else {\n tmp = toString_1(this.qk_1);\n }\n var leftStr = tmp;\n var tmp_2;\n var tmp_3;\n var tmp_4 = this.sk_1;\n if (tmp_4 instanceof LogicalExpression) {\n tmp_3 = !equals(this.sk_1.rk_1, this.rk_1);\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = '(' + this.sk_1 + ')';\n } else {\n tmp_2 = toString_1(this.sk_1);\n }\n var rightStr = tmp_2;\n return leftStr + ' ' + this.rk_1 + ' ' + rightStr;\n};\nprotoOf(LogicalExpression).hashCode = function () {\n var result = hashCode(this.qk_1);\n result = imul(result, 31) + hashCode(this.rk_1) | 0;\n result = imul(result, 31) + hashCode(this.sk_1) | 0;\n return result;\n};\nprotoOf(LogicalExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof LogicalExpression))\n return false;\n var tmp0_other_with_cast = other instanceof LogicalExpression ? other : THROW_CCE();\n if (!equals(this.qk_1, tmp0_other_with_cast.qk_1))\n return false;\n if (!equals(this.rk_1, tmp0_other_with_cast.rk_1))\n return false;\n if (!equals(this.sk_1, tmp0_other_with_cast.sk_1))\n return false;\n return true;\n};\nfunction sam$kotlin_Comparator$0_1(function_0) {\n this.wk_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0_1).z4 = function (a, b) {\n return this.wk_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction LogicalOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.uk_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.uk_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_4() {\n Companion_instance_4 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([AndOperator_getInstance(), OrOperator_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = LogicalOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);\n tmp.xk_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_4;\nfunction Companion_getInstance_4() {\n if (Companion_instance_4 == null)\n new Companion_4();\n return Companion_instance_4;\n}\nfunction AndOperator() {\n AndOperator_instance = this;\n LogicalOperator.call(this, '&&');\n}\nprotoOf(AndOperator).vk = function (node, transform, left, right) {\n return left.oi(node, transform) ? right.oi(node, transform) : false;\n};\nvar AndOperator_instance;\nfunction AndOperator_getInstance() {\n if (AndOperator_instance == null)\n new AndOperator();\n return AndOperator_instance;\n}\nfunction OrOperator() {\n OrOperator_instance = this;\n LogicalOperator.call(this, '||');\n}\nprotoOf(OrOperator).vk = function (node, transform, left, right) {\n return left.oi(node, transform) ? true : right.oi(node, transform);\n};\nvar OrOperator_instance;\nfunction OrOperator_getInstance() {\n if (OrOperator_instance == null)\n new OrOperator();\n return OrOperator_instance;\n}\nfunction LogicalOperator(key) {\n Companion_getInstance_4();\n this.uk_1 = key;\n}\nprotoOf(LogicalOperator).toString = function () {\n return this.uk_1;\n};\nfunction PolynomialExpression$traversal$o$invoke$lambda(this$0) {\n return function (x, _anonymous_parameter_1__qggqgd) {\n return ((x - this$0.nk_1 | 0) % this$0.ik_1 | 0) === 0 ? ((x - this$0.nk_1 | 0) / this$0.ik_1 | 0) > 0 : false;\n };\n}\nfunction PolynomialExpression$traversal$1(this$0) {\n this.al_1 = this$0;\n}\nprotoOf(PolynomialExpression$traversal$1).hk = function (sq) {\n var tmp;\n if (this.al_1.ik_1 > 0) {\n tmp = sq;\n } else {\n tmp = take(sq, this.al_1.ok_1);\n }\n var tmp_0 = tmp;\n return filterIndexed(tmp_0, PolynomialExpression$traversal$o$invoke$lambda(this.al_1));\n};\nfunction PolynomialExpression(a, b) {\n a = a === VOID ? 0 : a;\n b = b === VOID ? 1 : b;\n ConnectExpression.call(this);\n this.ik_1 = a;\n this.jk_1 = b;\n var tmp = this;\n var tmp_0;\n if (this.ik_1 < 0) {\n var tmp_1;\n if (this.jk_1 < 0) {\n tmp_1 = emptyList();\n } else if (this.jk_1 > 0) {\n var tmp_2;\n if (this.jk_1 <= (-this.ik_1 | 0)) {\n tmp_2 = emptyList();\n } else {\n // Inline function 'kotlin.collections.mutableListOf' call\n var list = ArrayList_init_$Create$_0();\n var n = 1;\n while ((imul(this.ik_1, n) + this.jk_1 | 0) > 0) {\n list.k(imul(this.ik_1, n) + this.jk_1 | 0);\n n = n + 1 | 0;\n }\n tmp_2 = sorted(list);\n }\n tmp_1 = tmp_2;\n } else {\n tmp_1 = emptyList();\n }\n tmp_0 = tmp_1;\n } else if (this.ik_1 > 0) {\n tmp_0 = emptyList();\n } else {\n var tmp_3;\n if (this.jk_1 < 0) {\n tmp_3 = emptyList();\n } else if (this.jk_1 > 0) {\n tmp_3 = listOf(this.jk_1);\n } else {\n tmp_3 = emptyList();\n }\n tmp_0 = tmp_3;\n }\n tmp.kk_1 = tmp_0;\n this.lk_1 = this.kk_1.i() === 1;\n var tmp_4 = this;\n var tmp0_elvis_lhs = firstOrNull_0(this.kk_1);\n tmp_4.mk_1 = (tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) - 1 | 0;\n this.nk_1 = this.jk_1 - 1 | 0;\n this.ok_1 = this.ik_1 + this.jk_1 | 0;\n var tmp_5 = this;\n tmp_5.pk_1 = new PolynomialExpression$traversal$1(this);\n}\nprotoOf(PolynomialExpression).toString = function () {\n if (this.ik_1 === 0 ? this.jk_1 === 0 : false)\n return '0';\n if (this.ik_1 === 1 ? this.jk_1 === 1 : false)\n return '(n+1)';\n if (this.jk_1 === 0) {\n if (this.ik_1 === 1)\n return 'n';\n var tmp;\n if (this.ik_1 > 0) {\n tmp = '' + this.ik_1 + 'n';\n } else {\n tmp = '(' + this.ik_1 + 'n)';\n }\n return tmp;\n }\n if (this.ik_1 === 0) {\n if (this.jk_1 === 1)\n return '';\n var tmp_0;\n if (this.jk_1 > 0) {\n tmp_0 = this.jk_1.toString();\n } else {\n tmp_0 = '(' + this.jk_1 + ')';\n }\n return tmp_0;\n }\n var bOp = this.jk_1 >= 0 ? '+' : '';\n return '(' + this.ik_1 + 'n' + bOp + this.jk_1 + ')';\n};\nprotoOf(PolynomialExpression).fj = function () {\n return this.lk_1;\n};\nprotoOf(PolynomialExpression).gj = function () {\n return this.mk_1;\n};\nprotoOf(PolynomialExpression).hj = function () {\n return this.pk_1;\n};\nprotoOf(PolynomialExpression).hashCode = function () {\n var result = this.ik_1;\n result = imul(result, 31) + this.jk_1 | 0;\n return result;\n};\nprotoOf(PolynomialExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PolynomialExpression))\n return false;\n var tmp0_other_with_cast = other instanceof PolynomialExpression ? other : THROW_CCE();\n if (!(this.ik_1 === tmp0_other_with_cast.ik_1))\n return false;\n if (!(this.jk_1 === tmp0_other_with_cast.jk_1))\n return false;\n return true;\n};\nfunction PropertySegment$toString$lambda(it) {\n return '[' + it + ']';\n}\nfunction PropertySegment$matchName$1() {\n}\nprotoOf(PropertySegment$matchName$1).fk = function (node, transform) {\n return true;\n};\nfunction PropertySegment$matchName$2(this$0) {\n this.bl_1 = this$0;\n}\nprotoOf(PropertySegment$matchName$2).fk = function (node, transform) {\n var tmp0_elvis_lhs = transform.zb_1(node);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var str = tmp;\n if (charSequenceLength(str) === this.bl_1.de_1.length) {\n return contentEquals(str, this.bl_1.de_1);\n } else if (charSequenceLength(str) > this.bl_1.de_1.length) {\n return charSequenceGet(str, (charSequenceLength(str) - this.bl_1.de_1.length | 0) - 1 | 0) === _Char___init__impl__6a9atx(46) ? endsWith(str, this.bl_1.de_1) : false;\n }\n return false;\n};\nfunction PropertySegment(tracked, name, expressions) {\n this.ce_1 = tracked;\n this.de_1 = name;\n this.ee_1 = expressions;\n this.fe_1 = isBlank(this.de_1) ? true : this.de_1 === '*';\n var tmp = this;\n var tmp_0 = this.fe_1 ? listOf('name') : emptyList();\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.ee_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.PropertySegment.propertyNames.' call\n var tmp$ret$0 = item.sb();\n destination.k(tmp$ret$0);\n }\n tmp.ge_1 = plus(tmp_0, flatten(destination));\n var tmp_1 = this;\n var tmp_2;\n if (this.fe_1) {\n tmp_2 = new PropertySegment$matchName$1();\n } else {\n tmp_2 = new PropertySegment$matchName$2(this);\n }\n tmp_1.he_1 = tmp_2;\n}\nprotoOf(PropertySegment).toString = function () {\n var matchTag = this.ce_1 ? '@' : '';\n var tmp = matchTag + this.de_1;\n return tmp + joinToString(this.ee_1, '', VOID, VOID, VOID, VOID, PropertySegment$toString$lambda);\n};\nprotoOf(PropertySegment).oi = function (node, transform) {\n var tmp;\n if (this.he_1.fk(node, transform)) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = this.ee_1;\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.s();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.PropertySegment.match.' call\n if (!element.oi(node, transform)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(PropertySegment).hashCode = function () {\n var result = getBooleanHashCode(this.ce_1);\n result = imul(result, 31) + getStringHashCode(this.de_1) | 0;\n result = imul(result, 31) + hashCode(this.ee_1) | 0;\n return result;\n};\nprotoOf(PropertySegment).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PropertySegment))\n return false;\n var tmp0_other_with_cast = other instanceof PropertySegment ? other : THROW_CCE();\n if (!(this.ce_1 === tmp0_other_with_cast.ce_1))\n return false;\n if (!(this.de_1 === tmp0_other_with_cast.de_1))\n return false;\n if (!equals(this.ee_1, tmp0_other_with_cast.ee_1))\n return false;\n return true;\n};\nfunction PropertyWrapper(propertySegment, to) {\n to = to === VOID ? null : to;\n this.yd_1 = propertySegment;\n this.zd_1 = to;\n}\nprotoOf(PropertyWrapper).toString = function () {\n var tmp;\n if (!(this.zd_1 == null)) {\n tmp = this.zd_1.toString() + ' ';\n } else {\n tmp = '';\n }\n return tmp + this.yd_1.toString();\n};\nprotoOf(PropertyWrapper).re = function (node, transform, trackNodes) {\n if (!this.yd_1.oi(node, transform)) {\n return null;\n }\n trackNodes.k(node);\n if (this.zd_1 == null) {\n return trackNodes;\n }\n var r = this.zd_1.re(node, transform, trackNodes);\n if (r == null) {\n removeLast(trackNodes);\n }\n return r;\n};\nprotoOf(PropertyWrapper).hashCode = function () {\n var result = this.yd_1.hashCode();\n result = imul(result, 31) + (this.zd_1 == null ? 0 : this.zd_1.hashCode()) | 0;\n return result;\n};\nprotoOf(PropertyWrapper).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PropertyWrapper))\n return false;\n var tmp0_other_with_cast = other instanceof PropertyWrapper ? other : THROW_CCE();\n if (!this.yd_1.equals(tmp0_other_with_cast.yd_1))\n return false;\n if (!equals(this.zd_1, tmp0_other_with_cast.zd_1))\n return false;\n return true;\n};\nfunction TupleExpression$traversal$1(this$0) {\n this.cl_1 = this$0;\n}\nprotoOf(TupleExpression$traversal$1).hk = function (sq) {\n return filterIndexes(sq, this.cl_1.gl_1);\n};\nfunction TupleExpression(numbers) {\n ConnectExpression.call(this);\n this.dl_1 = numbers;\n this.el_1 = this.dl_1.i() === 1;\n var tmp = this;\n var tmp0_elvis_lhs = firstOrNull_0(this.dl_1);\n tmp.fl_1 = (tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) - 1 | 0;\n var tmp_0 = this;\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.dl_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.TupleExpression.indexes.' call\n var tmp$ret$0 = item - 1 | 0;\n destination.k(tmp$ret$0);\n }\n tmp_0.gl_1 = destination;\n var tmp_1 = this;\n tmp_1.hl_1 = new TupleExpression$traversal$1(this);\n}\nprotoOf(TupleExpression).fj = function () {\n return this.el_1;\n};\nprotoOf(TupleExpression).gj = function () {\n return this.fl_1;\n};\nprotoOf(TupleExpression).hj = function () {\n return this.hl_1;\n};\nprotoOf(TupleExpression).toString = function () {\n if (this.dl_1.i() === 1) {\n var tmp;\n if (first(this.dl_1) === 1) {\n tmp = '';\n } else {\n tmp = first(this.dl_1).toString();\n }\n return tmp;\n }\n return '(' + joinToString(this.dl_1, ',') + ')';\n};\nprotoOf(TupleExpression).hashCode = function () {\n return hashCode(this.dl_1);\n};\nprotoOf(TupleExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof TupleExpression))\n return false;\n var tmp0_other_with_cast = other instanceof TupleExpression ? other : THROW_CCE();\n if (!equals(this.dl_1, tmp0_other_with_cast.dl_1))\n return false;\n return true;\n};\nfunction Parser(prefix, temp) {\n prefix = prefix === VOID ? '' : prefix;\n this.il_1 = prefix;\n this.jl_1 = temp;\n}\nprotoOf(Parser).kl = function (source, offset) {\n return this.jl_1(source, offset, this.il_1);\n};\nprotoOf(Parser).toString = function () {\n return 'Parser(prefix=' + this.il_1 + ', temp=' + this.jl_1 + ')';\n};\nprotoOf(Parser).hashCode = function () {\n var result = getStringHashCode(this.il_1);\n result = imul(result, 31) + hashCode(this.jl_1) | 0;\n return result;\n};\nprotoOf(Parser).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Parser))\n return false;\n var tmp0_other_with_cast = other instanceof Parser ? other : THROW_CCE();\n if (!(this.il_1 === tmp0_other_with_cast.il_1))\n return false;\n if (!equals(this.jl_1, tmp0_other_with_cast.jl_1))\n return false;\n return true;\n};\nfunction ParserResult(data, length) {\n length = length === VOID ? 0 : length;\n this.ll_1 = data;\n this.ml_1 = length;\n}\nprotoOf(ParserResult).toString = function () {\n return 'ParserResult(data=' + this.ll_1 + ', length=' + this.ml_1 + ')';\n};\nprotoOf(ParserResult).hashCode = function () {\n var result = this.ll_1 == null ? 0 : hashCode(this.ll_1);\n result = imul(result, 31) + this.ml_1 | 0;\n return result;\n};\nprotoOf(ParserResult).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ParserResult))\n return false;\n var tmp0_other_with_cast = other instanceof ParserResult ? other : THROW_CCE();\n if (!equals(this.ll_1, tmp0_other_with_cast.ll_1))\n return false;\n if (!(this.ml_1 === tmp0_other_with_cast.ml_1))\n return false;\n return true;\n};\nfunction ParserSet$whiteCharParser$lambda(source, offset, prefix) {\n var i = offset;\n var data = '';\n while (i < source.length ? contains(prefix, charSequenceGet(source, i)) : false) {\n data = data + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$whiteCharStrictParser$lambda(source, offset, prefix) {\n Companion_instance_0.assert(source, offset, prefix, 'whitespace');\n return ParserSet_getInstance().ad_1.kl(source, offset);\n}\nfunction ParserSet$nameParser$lambda(source, offset, prefix) {\n var i = offset;\n var s0 = getOrNull(source, i);\n var tmp;\n var tmp_0 = s0;\n if (!((tmp_0 == null ? null : new Char(tmp_0)) == null)) {\n tmp = !contains(prefix, s0);\n } else {\n tmp = false;\n }\n if (tmp) {\n return new ParserResult('');\n }\n Companion_instance_0.assert(source, i, prefix, '*0-9a-zA-Z_');\n var data = toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n if (data === '*') {\n return new ParserResult(data, i - offset | 0);\n }\n var center = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_.';\n $l$loop: while (i < source.length) {\n if (charSequenceGet(data, (i - offset | 0) - 1 | 0) === _Char___init__impl__6a9atx(46)) {\n Companion_instance_0.assert(source, i, prefix, '[0-9a-zA-Z_]');\n }\n if (contains(center, charSequenceGet(source, i))) {\n data = data + toString_2(charSequenceGet(source, i));\n } else {\n break $l$loop;\n }\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$combinatorOperatorParser$lambda(it) {\n return it.le_1;\n}\nfunction ParserSet$combinatorOperatorParser$lambda_0(source, offset, _anonymous_parameter_2__qggqfi) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_3().jj_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.combinatorOperatorParser..' call\n if (startsWith_0(source, element.le_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'ConnectOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.le_1.length);\n}\nfunction ParserSet$integerParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix, 'number');\n var s = '';\n while (i < source.length ? contains(prefix, charSequenceGet(source, i)) : false) {\n s = s + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n var tmp;\n try {\n tmp = toInt(s);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof NumberFormatException) {\n var e = $p;\n Companion_instance_0.throwError(source, offset, 'valid format number');\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return new ParserResult(tmp, i - offset | 0);\n}\nfunction ParserSet$monomialParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var tmp0_subject = charSequenceGet(source, i);\n var tmp;\n if (tmp0_subject === _Char___init__impl__6a9atx(43)) {\n i = i + 1 | 0;\n tmp = 1;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(45)) {\n i = i + 1 | 0;\n tmp = -1;\n } else {\n tmp = 1;\n }\n var signal = tmp;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().ed_1.il_1 + 'n');\n var tmp_0;\n if (contains(ParserSet_getInstance().ed_1.il_1, charSequenceGet(source, i))) {\n var coefficientResult = ParserSet_getInstance().ed_1.kl(source, i);\n i = i + coefficientResult.ml_1 | 0;\n tmp_0 = coefficientResult.ll_1;\n } else {\n tmp_0 = 1;\n }\n var coefficient = imul(tmp_0, signal);\n var tmp_1;\n if (i < source.length ? charSequenceGet(source, i) === _Char___init__impl__6a9atx(110) : false) {\n i = i + 1 | 0;\n return new ParserResult(new Pair(1, coefficient), i - offset | 0);\n } else {\n return new ParserResult(new Pair(0, coefficient), i - offset | 0);\n }\n}\nfunction ParserSet$polynomialExpressionParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n // Inline function 'kotlin.collections.mutableListOf' call\n var monomialResultList = ArrayList_init_$Create$_0();\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(40)) {\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().fd_1.il_1);\n while (!(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41))) {\n if (monomialResultList.i() > 0) {\n Companion_instance_0.assert(source, i, '+-');\n }\n var monomialResult = ParserSet_getInstance().fd_1.kl(source, i);\n monomialResultList.k(monomialResult);\n i = i + monomialResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n if (i >= source.length) {\n Companion_instance_0.assert(source, i, ')');\n }\n }\n i = i + 1 | 0;\n } else {\n var monomialResult_0 = ParserSet_getInstance().fd_1.kl(source, i);\n monomialResultList.k(monomialResult_0);\n i = i + monomialResult_0.ml_1 | 0;\n }\n // Inline function 'kotlin.collections.mutableMapOf' call\n var map = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = monomialResultList.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n var tmp0_container = element.ll_1;\n var power = tmp0_container.bb();\n var coefficient = tmp0_container.cb();\n // Inline function 'kotlin.collections.set' call\n var tmp1_elvis_lhs = map.w1(power);\n var value = (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) + coefficient | 0;\n map.r1(power, value);\n }\n // Inline function 'kotlin.collections.mapKeys' call\n // Inline function 'kotlin.collections.mapKeysTo' call\n var destination = LinkedHashMap_init_$Create$_0(mapCapacity(map.i()));\n // Inline function 'kotlin.collections.associateByTo' call\n var tmp0_iterator_0 = map.x1().n();\n while (tmp0_iterator_0.o()) {\n var element_0 = tmp0_iterator_0.p();\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n if (element_0.h4() > 1) {\n Companion_instance_0.throwError(source, offset, 'power must be 0 or 1');\n }\n // Inline function 'kotlin.collections.mapKeysTo.' call\n var tmp$ret$2 = element_0.i4();\n destination.r1(Unit_instance, tmp$ret$2);\n }\n var tmp3_elvis_lhs = map.w1(1);\n var tmp = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n var tmp4_elvis_lhs = map.w1(0);\n var polynomialExpression = new PolynomialExpression(tmp, tmp4_elvis_lhs == null ? 0 : tmp4_elvis_lhs);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n var tmp_0;\n if (polynomialExpression.ik_1 <= 0 ? polynomialExpression.kk_1.s() : false) {\n tmp_0 = true;\n } else {\n var tmp_1;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!polynomialExpression.kk_1.s()) {\n tmp_1 = first(polynomialExpression.kk_1) <= 0;\n } else {\n tmp_1 = false;\n }\n tmp_0 = tmp_1;\n }\n if (tmp_0) {\n Companion_instance_0.throwError(source, offset, 'valid polynomialExpression');\n }\n return new ParserResult(polynomialExpression, i - offset | 0);\n}\nfunction ParserSet$tupleExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n Companion_instance_0.assert(source, i, '(');\n i = i + 1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var numbers = ArrayList_init_$Create$_0();\n while (i < source.length ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41)) : false) {\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var intResult = ParserSet_getInstance().ed_1.kl(source, i);\n if (numbers.s()) {\n if (intResult.ll_1 <= 0) {\n Companion_instance_0.throwError(source, i, 'positive integer');\n }\n } else {\n if (intResult.ll_1 <= last(numbers)) {\n Companion_instance_0.throwError(source, i, '>' + last(numbers));\n }\n }\n i = i + intResult.ml_1 | 0;\n numbers.k(intResult.ll_1);\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var tmp = getOrNull(source, i);\n if (equals(tmp == null ? null : new Char(tmp), new Char(_Char___init__impl__6a9atx(44)))) {\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().ed_1.il_1 + ')');\n }\n }\n Companion_instance_0.assert(source, i, ')');\n i = i + 1 | 0;\n return new ParserResult(new TupleExpression(numbers), i - offset | 0);\n}\nfunction ParserSet$connectExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var tmp;\n if (ParserSet_getInstance().id_1.u4(charSequenceSubSequence(source, offset, source.length))) {\n var tupleExpressionResult = ParserSet_getInstance().hd_1.kl(source, i);\n i = i + tupleExpressionResult.ml_1 | 0;\n tmp = new ParserResult(tupleExpressionResult.ll_1, i - offset | 0);\n } else {\n var polynomialExpressionResult = ParserSet_getInstance().gd_1.kl(source, offset);\n i = i + polynomialExpressionResult.ml_1 | 0;\n tmp = new ParserResult(polynomialExpressionResult.ll_1, i - offset | 0);\n }\n return tmp;\n}\nfunction ParserSet$combinatorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var operatorResult = ParserSet_getInstance().dd_1.kl(source, i);\n i = i + operatorResult.ml_1 | 0;\n var expressionResult = null;\n if (i < source.length ? contains(ParserSet_getInstance().jd_1.il_1, charSequenceGet(source, i)) : false) {\n expressionResult = ParserSet_getInstance().jd_1.kl(source, i);\n i = i + expressionResult.ml_1 | 0;\n }\n var tmp0_safe_receiver = expressionResult;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ll_1;\n return new ParserResult(new ConnectSegment(operatorResult.ll_1, tmp1_elvis_lhs == null ? new PolynomialExpression() : tmp1_elvis_lhs), i - offset | 0);\n}\nfunction ParserSet$attrOperatorParser$lambda(it) {\n return it.pi_1;\n}\nfunction ParserSet$attrOperatorParser$lambda_0(source, offset, _anonymous_parameter_2__qggqfi) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_2().si_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.attrOperatorParser..' call\n if (startsWith_0(source, element.pi_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'CompareOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.pi_1.length);\n}\nfunction ParserSet$stringParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var startChar = charSequenceGet(source, i);\n i = i + 1 | 0;\n if (i >= source.length) {\n Companion_instance_0.throwError(source, i, 'any char');\n }\n var data = '';\n $l$loop: while (!(charSequenceGet(source, i) === startChar)) {\n if (i >= (source.length - 1 | 0)) {\n Companion_instance_0.assert(source, i, toString_2(startChar));\n break $l$loop;\n }\n // Inline function 'kotlin.code' call\n var this_0 = charSequenceGet(source, i);\n var containsArg = Char__toInt_impl_vasixd(this_0);\n if (0 <= containsArg ? containsArg <= 31 : false) {\n Companion_instance_0.throwError(source, i, '0-1f escape char');\n }\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(92)) {\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i);\n var tmp = data;\n var tmp2_subject = charSequenceGet(source, i);\n var tmp_0;\n if (tmp2_subject === _Char___init__impl__6a9atx(92)) {\n tmp_0 = _Char___init__impl__6a9atx(92);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(39)) {\n tmp_0 = _Char___init__impl__6a9atx(39);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(34)) {\n tmp_0 = _Char___init__impl__6a9atx(34);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(96)) {\n tmp_0 = _Char___init__impl__6a9atx(96);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(110)) {\n tmp_0 = _Char___init__impl__6a9atx(10);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(114)) {\n tmp_0 = _Char___init__impl__6a9atx(13);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(116)) {\n tmp_0 = _Char___init__impl__6a9atx(9);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(98)) {\n tmp_0 = _Char___init__impl__6a9atx(8);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(120)) {\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < 2)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.stringParser..' call\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i, '0123456789abcdefABCDEF');\n }\n while (inductionVariable < 2);\n // Inline function 'kotlin.text.substring' call\n var startIndex = (i - 2 | 0) + 1 | 0;\n var endIndex = i + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = source.substring(startIndex, endIndex);\n tmp_0 = numberToChar(toInt_0(tmp$ret$2, 16));\n } else if (tmp2_subject === _Char___init__impl__6a9atx(117)) {\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable_0 = 0;\n if (inductionVariable_0 < 4)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.stringParser..' call\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i, '0123456789abcdefABCDEF');\n }\n while (inductionVariable_0 < 4);\n // Inline function 'kotlin.text.substring' call\n var startIndex_0 = (i - 4 | 0) + 1 | 0;\n var endIndex_0 = i + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = source.substring(startIndex_0, endIndex_0);\n tmp_0 = numberToChar(toInt_0(tmp$ret$4, 16));\n } else {\n Companion_instance_0.throwError(source, i, 'escape char');\n }\n data = tmp + toString_2(tmp_0);\n } else {\n data = data + toString_2(charSequenceGet(source, i));\n }\n i = i + 1 | 0;\n }\n i = i + 1 | 0;\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$propertyParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var data = toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n while (i < source.length ? contains(ParserSet_getInstance().od_1, charSequenceGet(source, i)) : false) {\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(46)) {\n Companion_instance_0.assert(source, i + 1 | 0, prefix);\n }\n data = data + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$valueParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var tmp0_subject = charSequenceGet(source, i);\n var tmp;\n if (tmp0_subject === _Char___init__impl__6a9atx(116)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable = 0;\n while (inductionVariable < charSequenceLength('rue')) {\n var element = charSequenceGet('rue', inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element));\n i = i + 1 | 0;\n }\n tmp = true;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(102)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable_0 = 0;\n while (inductionVariable_0 < charSequenceLength('alse')) {\n var element_0 = charSequenceGet('alse', inductionVariable_0);\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element_0));\n i = i + 1 | 0;\n }\n tmp = false;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(110)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable_1 = 0;\n while (inductionVariable_1 < charSequenceLength('ull')) {\n var element_1 = charSequenceGet('ull', inductionVariable_1);\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element_1));\n i = i + 1 | 0;\n }\n tmp = null;\n } else if (contains(ParserSet_getInstance().md_1.il_1, tmp0_subject)) {\n var s = ParserSet_getInstance().md_1.kl(source, i);\n i = i + s.ml_1 | 0;\n tmp = s.ll_1;\n } else if (contains(ParserSet_getInstance().ed_1.il_1, tmp0_subject)) {\n var n = ParserSet_getInstance().ed_1.kl(source, i);\n i = i + n.ml_1 | 0;\n tmp = n.ll_1;\n } else {\n Companion_instance_0.throwError(source, i, prefix);\n }\n var value = tmp;\n return new ParserResult(value, i - offset | 0);\n}\nfunction ParserSet$binaryExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var parserResult = ParserSet_getInstance().pd_1.kl(source, i);\n i = i + parserResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var operatorResult = ParserSet_getInstance().ld_1.kl(source, i);\n i = i + operatorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var valueResult = ParserSet_getInstance().qd_1.kl(source, i);\n i = i + valueResult.ml_1 | 0;\n return new ParserResult(new BinaryExpression(parserResult.ll_1, operatorResult.ll_1, valueResult.ll_1), i - offset | 0);\n}\nfunction ParserSet$logicalOperatorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_4().xk_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.logicalOperatorParser..' call\n if (startsWith_0(source, element.uk_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'LogicalOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.uk_1.length);\n}\nfunction ParserSet$attrParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var exp = ParserSet_getInstance().nl(source, i);\n i = i + exp.ml_1 | 0;\n Companion_instance_0.assert(source, i, ']');\n i = i + 1 | 0;\n return new ParserResult(exp.ll_1, i - offset | 0);\n}\nfunction ParserSet$selectorUnitParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var tracked = false;\n var tmp = getOrNull(source, i);\n if (equals(tmp == null ? null : new Char(tmp), new Char(_Char___init__impl__6a9atx(64)))) {\n tracked = true;\n i = i + 1 | 0;\n }\n var nameResult = ParserSet_getInstance().cd_1.kl(source, i);\n i = i + nameResult.ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var expressions = ArrayList_init_$Create$_0();\n while (i < source.length ? charSequenceGet(source, i) === _Char___init__impl__6a9atx(91) : false) {\n var attrResult = ParserSet_getInstance().td_1.kl(source, i);\n i = i + attrResult.ml_1 | 0;\n expressions.k(attrResult.ll_1);\n }\n if (nameResult.ml_1 === 0 ? expressions.i() === 0 : false) {\n Companion_instance_0.throwError(source, i, '[');\n }\n return new ParserResult(new PropertySegment(tracked, nameResult.ll_1, expressions), i - offset | 0);\n}\nfunction ParserSet$connectSelectorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var topSelector = ParserSet_getInstance().ud_1.kl(source, i);\n i = i + topSelector.ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var selectorList = ArrayList_init_$Create$_0();\n $l$loop: while (i < source.length ? contains(ParserSet_getInstance().ad_1.il_1, charSequenceGet(source, i)) : false) {\n i = i + ParserSet_getInstance().bd_1.kl(source, i).ml_1 | 0;\n if (i >= source.length) {\n break $l$loop;\n }\n var tmp;\n if (contains(ParserSet_getInstance().kd_1.il_1, charSequenceGet(source, i))) {\n var combinatorResult = ParserSet_getInstance().kd_1.kl(source, i);\n i = i + combinatorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().bd_1.kl(source, i).ml_1 | 0;\n tmp = combinatorResult.ll_1;\n } else {\n tmp = new ConnectSegment(VOID, new PolynomialExpression(1, 0));\n }\n var combinator = tmp;\n var selectorResult = ParserSet_getInstance().ud_1.kl(source, i);\n i = i + selectorResult.ml_1 | 0;\n selectorList.k(to(combinator, selectorResult.ll_1));\n }\n return new ParserResult(to(topSelector.ll_1, selectorList), i - offset | 0);\n}\nfunction ParserSet$endParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n if (!(offset === source.length)) {\n Companion_instance_0.throwError(source, offset, 'EOF');\n }\n return new ParserResult(Unit_instance, 0);\n}\nfunction ParserSet$selectorParser$lambda(source) {\n var i = 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var combinatorSelectorResult = ParserSet_getInstance().vd_1.kl(source, i);\n i = i + combinatorSelectorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n i = i + ParserSet_getInstance().wd_1.kl(source, i).ml_1 | 0;\n var data = combinatorSelectorResult.ll_1;\n // Inline function 'kotlin.collections.mutableListOf' call\n var propertySelectorList = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.mutableListOf' call\n var combinatorSelectorList = ArrayList_init_$Create$_0();\n propertySelectorList.k(data.za_1);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = data.ab_1.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.selectorParser..' call\n propertySelectorList.k(element.ab_1);\n combinatorSelectorList.k(element.za_1);\n }\n var wrapperList = mutableListOf([new PropertyWrapper(first(propertySelectorList))]);\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator_0 = combinatorSelectorList.n();\n while (tmp0_iterator_0.o()) {\n var item = tmp0_iterator_0.p();\n // Inline function 'li.songe.selector.parser.ParserSet.selectorParser..' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var index_0 = checkIndexOverflow(tmp1);\n var combinatorSelectorWrapper = new ConnectWrapper(item, last(wrapperList));\n var propertySelectorWrapper = new PropertyWrapper(propertySelectorList.w(index_0 + 1 | 0), combinatorSelectorWrapper);\n wrapperList.k(propertySelectorWrapper);\n }\n return new Selector(last(wrapperList));\n}\nfunction ParserSet() {\n ParserSet_instance = this;\n var tmp = this;\n tmp.ad_1 = new Parser(' \\t\\r\\n', ParserSet$whiteCharParser$lambda);\n var tmp_0 = this;\n tmp_0.bd_1 = new Parser(' \\t\\r\\n', ParserSet$whiteCharStrictParser$lambda);\n var tmp_1 = this;\n tmp_1.cd_1 = new Parser('*1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_', ParserSet$nameParser$lambda);\n var tmp_2 = this;\n var tmp_3 = Companion_getInstance_3().jj_1;\n var tmp_4 = joinToString(tmp_3, '', VOID, VOID, VOID, VOID, ParserSet$combinatorOperatorParser$lambda);\n tmp_2.dd_1 = new Parser(tmp_4, ParserSet$combinatorOperatorParser$lambda_0);\n var tmp_5 = this;\n tmp_5.ed_1 = new Parser('1234567890', ParserSet$integerParser$lambda);\n var tmp_6 = this;\n tmp_6.fd_1 = new Parser('+-1234567890n', ParserSet$monomialParser$lambda);\n var tmp_7 = this;\n tmp_7.gd_1 = new Parser('(0123456789n', ParserSet$polynomialExpressionParser$lambda);\n var tmp_8 = this;\n tmp_8.hd_1 = new Parser(VOID, ParserSet$tupleExpressionParser$lambda);\n this.id_1 = Regex_init_$Create$('^\\\\(\\\\s*\\\\d+,.*$');\n var tmp_9 = this;\n tmp_9.jd_1 = new Parser(this.gd_1.il_1, ParserSet$connectExpressionParser$lambda);\n var tmp_10 = this;\n tmp_10.kd_1 = new Parser(this.dd_1.il_1, ParserSet$combinatorParser$lambda);\n var tmp_11 = this;\n var tmp_12 = Companion_getInstance_2().si_1;\n var tmp_13 = joinToString(tmp_12, '', VOID, VOID, VOID, VOID, ParserSet$attrOperatorParser$lambda);\n tmp_11.ld_1 = new Parser(tmp_13, ParserSet$attrOperatorParser$lambda_0);\n var tmp_14 = this;\n tmp_14.md_1 = new Parser('`\\'\"', ParserSet$stringParser$lambda);\n this.nd_1 = '_' + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), '') + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90)), '');\n this.od_1 = this.nd_1 + toString_2(_Char___init__impl__6a9atx(46)) + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57)), '');\n var tmp_15 = this;\n tmp_15.pd_1 = new Parser(this.nd_1, ParserSet$propertyParser$lambda);\n var tmp_16 = this;\n var tmp_17 = 'tfn' + this.md_1.il_1 + this.ed_1.il_1;\n tmp_16.qd_1 = new Parser(tmp_17, ParserSet$valueParser$lambda);\n var tmp_18 = this;\n tmp_18.rd_1 = new Parser(VOID, ParserSet$binaryExpressionParser$lambda);\n var tmp_19 = this;\n tmp_19.sd_1 = new Parser(VOID, ParserSet$logicalOperatorParser$lambda);\n var tmp_20 = this;\n tmp_20.td_1 = new Parser('[', ParserSet$attrParser$lambda);\n var tmp_21 = this;\n tmp_21.ud_1 = new Parser(VOID, ParserSet$selectorUnitParser$lambda);\n var tmp_22 = this;\n tmp_22.vd_1 = new Parser(VOID, ParserSet$connectSelectorParser$lambda);\n var tmp_23 = this;\n tmp_23.wd_1 = new Parser(VOID, ParserSet$endParser$lambda);\n var tmp_24 = this;\n tmp_24.xd_1 = ParserSet$selectorParser$lambda;\n}\nprotoOf(ParserSet).nl = function (source, offset) {\n var i = offset;\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var parserResults = ArrayList_init_$Create$_0();\n while ((i < source.length ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(93)) : false) ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41)) : false) {\n var tmp0_subject = charSequenceGet(source, i);\n if (tmp0_subject === _Char___init__impl__6a9atx(40)) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!parserResults.s()) {\n var lastToken = last(parserResults);\n var tmp = lastToken.ll_1;\n if (!(tmp instanceof LogicalOperator)) {\n var count = 0;\n while ((i - 1 | 0) >= count ? contains(this.ad_1.il_1, charSequenceGet(source, (i - 1 | 0) - count | 0)) : false) {\n count = count + 1 | 0;\n }\n Companion_instance_0.throwError(source, (i - count | 0) - lastToken.ml_1 | 0, 'LogicalOperator');\n }\n }\n i = i + 1 | 0;\n // Inline function 'kotlin.apply' call\n var this_0 = this.nl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_0.ml_1 | 0;\n parserResults.k(this_0);\n Companion_instance_0.assert(source, i, ')');\n i = i + 1 | 0;\n } else if (contains('|&', tmp0_subject)) {\n // Inline function 'kotlin.apply' call\n var this_1 = this.sd_1.kl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_1.ml_1 | 0;\n parserResults.k(this_1);\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, '(' + this.pd_1.il_1);\n } else {\n // Inline function 'kotlin.apply' call\n var this_2 = this.rd_1.kl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_2.ml_1 | 0;\n parserResults.k(this_2);\n }\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n }\n if (parserResults.s()) {\n Companion_instance_0.throwError(source, i - offset | 0, 'Expression');\n }\n if (parserResults.i() === 1) {\n var tmp_0 = first(parserResults).ll_1;\n return new ParserResult(tmp_0 instanceof Expression ? tmp_0 : THROW_CCE(), i - offset | 0);\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(parserResults, 10));\n var tmp0_iterator = parserResults.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n var tmp$ret$5 = item.ll_1;\n destination.k(tmp$ret$5);\n }\n var tokens = toMutableList_0(destination);\n var index = 0;\n while (index < tokens.i()) {\n var token = tokens.w(index);\n if (equals(token, AndOperator_getInstance())) {\n var tmp_1 = index;\n var tmp_2 = tokens.w(index - 1 | 0);\n var tmp_3 = tmp_2 instanceof Expression ? tmp_2 : THROW_CCE();\n var tmp_4 = AndOperator_getInstance();\n var tmp_5 = tokens.w(index + 1 | 0);\n tokens.j(tmp_1, new LogicalExpression(tmp_3, tmp_4, tmp_5 instanceof Expression ? tmp_5 : THROW_CCE()));\n tokens.z(index - 1 | 0);\n tokens.z((index + 1 | 0) - 1 | 0);\n } else {\n index = index + 1 | 0;\n }\n }\n while (tokens.i() > 1) {\n var tmp_6 = tokens.w(0);\n var tmp_7 = tmp_6 instanceof Expression ? tmp_6 : THROW_CCE();\n var tmp_8 = tokens.w(1);\n var tmp_9 = tmp_8 instanceof OrOperator ? tmp_8 : THROW_CCE();\n var tmp_10 = tokens.w(2);\n tokens.j(1, new LogicalExpression(tmp_7, tmp_9, tmp_10 instanceof Expression ? tmp_10 : THROW_CCE()));\n tokens.z(0);\n tokens.z(1);\n }\n var tmp_11 = first(tokens);\n return new ParserResult(tmp_11 instanceof Expression ? tmp_11 : THROW_CCE(), i - offset | 0);\n};\nvar ParserSet_instance;\nfunction ParserSet_getInstance() {\n if (ParserSet_instance == null)\n new ParserSet();\n return ParserSet_instance;\n}\nfunction FilterIndexesSequence$iterator$1(this$0) {\n this.sl_1 = this$0;\n this.ol_1 = this$0.tl_1.n();\n this.pl_1 = 0;\n this.ql_1 = 0;\n this.rl_1 = null;\n}\nprotoOf(FilterIndexesSequence$iterator$1).vl = function () {\n if (this.pl_1 > last(this.sl_1.ul_1))\n return null;\n while (this.ol_1.o()) {\n var item = this.ol_1.p();\n if (this.sl_1.ul_1.w(this.ql_1) === this.pl_1) {\n this.ql_1 = this.ql_1 + 1 | 0;\n this.pl_1 = this.pl_1 + 1 | 0;\n return item;\n }\n this.pl_1 = this.pl_1 + 1 | 0;\n }\n return null;\n};\nprotoOf(FilterIndexesSequence$iterator$1).p = function () {\n var result = this.rl_1;\n this.rl_1 = null;\n var tmp1_elvis_lhs = result == null ? this.vl() : result;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n throw NoSuchElementException_init_$Create$();\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n};\nprotoOf(FilterIndexesSequence$iterator$1).o = function () {\n var tmp = this;\n var tmp0_elvis_lhs = this.rl_1;\n tmp.rl_1 = tmp0_elvis_lhs == null ? this.vl() : tmp0_elvis_lhs;\n return !(this.rl_1 == null);\n};\nfunction FilterIndexesSequence(sequence, indexes) {\n this.tl_1 = sequence;\n this.ul_1 = indexes;\n}\nprotoOf(FilterIndexesSequence).n = function () {\n return new FilterIndexesSequence$iterator$1(this);\n};\nfunction filterIndexes(_this__u8e3s4, indexes) {\n return new FilterIndexesSequence(_this__u8e3s4, indexes);\n}\n//region block: init\nCompanion_instance = new Companion();\nCompanion_instance_0 = new Companion_0();\nCompanion_instance_1 = new Companion_1();\n//endregion\n//region block: exports\ndefineProp(CommonSelector, 'Companion', Companion_getInstance);\nexport {\n CommonSelector as CommonSelector,\n CommonTransform as CommonTransform,\n ExtSyntaxError as ExtSyntaxError,\n};\n//endregion\n\n//# sourceMappingURL=gkd-selector.mjs.map\n","import { CommonSelector, CommonTransform } from '@gkd-kit/selector';\nimport type { RawNode } from './types';\n\nconst transform = new CommonTransform(\n (node, name) => {\n const [key, subKey] = name.split('.');\n if (subKey) {\n // @ts-ignore\n return node.attr[key]?.[subKey];\n }\n // @ts-ignore\n return node.attr[key];\n },\n (node) => node.attr.name,\n (node) => node.children,\n (node) => node.parent,\n);\n\nexport type Selector = {\n tracks: boolean[];\n trackIndex: number;\n connectKeys: string[];\n toString: () => string;\n match: (node: RawNode) => RawNode | undefined;\n querySelectorAll: (node: RawNode) => RawNode[];\n querySelectorTrackAll: (node: RawNode) => RawNode[][];\n};\n\nexport const parseSelector = (source: string): Selector => {\n const cs = CommonSelector.Companion.parse(source);\n const selector: Selector = {\n tracks: cs.tracks,\n trackIndex: cs.trackIndex,\n connectKeys: cs.connectKeys,\n toString: () => cs.toString(),\n match: (node) => {\n return cs.match(node, transform) ?? void 0;\n },\n querySelectorAll: (node) => {\n return transform.querySelectorAll(node, cs);\n },\n querySelectorTrackAll: (node) => {\n return transform.querySelectorTrackAll(node, cs);\n },\n };\n return selector;\n};\n\nexport const checkSelector = (source: string) => {\n return CommonSelector.Companion.parseOrNull(source) != null;\n};\n","// This is a generated file. Do not edit.\nvar Space_Separator = /[\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nvar ID_Start = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\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CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-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uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFF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6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/;\nvar ID_Continue = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u0A01-\\u0A03\\u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-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF9\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\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uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nvar unicode = {\n\tSpace_Separator: Space_Separator,\n\tID_Start: ID_Start,\n\tID_Continue: ID_Continue\n};\n\nvar util = {\n isSpaceSeparator (c) {\n return typeof c === 'string' && unicode.Space_Separator.test(c)\n },\n\n isIdStartChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c === '$') || (c === '_') ||\n unicode.ID_Start.test(c)\n )\n },\n\n isIdContinueChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= '0' && c <= '9') ||\n (c === '$') || (c === '_') ||\n (c === '\\u200C') || (c === '\\u200D') ||\n unicode.ID_Continue.test(c)\n )\n },\n\n isDigit (c) {\n return typeof c === 'string' && /[0-9]/.test(c)\n },\n\n isHexDigit (c) {\n return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)\n },\n};\n\nlet source;\nlet parseState;\nlet stack;\nlet pos;\nlet line;\nlet column;\nlet token;\nlet key;\nlet root;\n\nvar parse = function parse (text, reviver) {\n source = String(text);\n parseState = 'start';\n stack = [];\n pos = 0;\n line = 1;\n column = 0;\n token = undefined;\n key = undefined;\n root = undefined;\n\n do {\n token = lex();\n\n // This code is unreachable.\n // if (!parseStates[parseState]) {\n // throw invalidParseState()\n // }\n\n parseStates[parseState]();\n } while (token.type !== 'eof')\n\n if (typeof reviver === 'function') {\n return internalize({'': root}, '', reviver)\n }\n\n return root\n};\n\nfunction internalize (holder, name, reviver) {\n const value = holder[name];\n if (value != null && typeof value === 'object') {\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const key = String(i);\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n } else {\n for (const key in value) {\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n }\n }\n\n return reviver.call(holder, name, value)\n}\n\nlet lexState;\nlet buffer;\nlet doubleQuote;\nlet sign;\nlet c;\n\nfunction lex () {\n lexState = 'default';\n buffer = '';\n doubleQuote = false;\n sign = 1;\n\n for (;;) {\n c = peek();\n\n // This code is unreachable.\n // if (!lexStates[lexState]) {\n // throw invalidLexState(lexState)\n // }\n\n const token = lexStates[lexState]();\n if (token) {\n return token\n }\n }\n}\n\nfunction peek () {\n if (source[pos]) {\n return String.fromCodePoint(source.codePointAt(pos))\n }\n}\n\nfunction read () {\n const c = peek();\n\n if (c === '\\n') {\n line++;\n column = 0;\n } else if (c) {\n column += c.length;\n } else {\n column++;\n }\n\n if (c) {\n pos += c.length;\n }\n\n return c\n}\n\nconst lexStates = {\n default () {\n switch (c) {\n case '\\t':\n case '\\v':\n case '\\f':\n case ' ':\n case '\\u00A0':\n case '\\uFEFF':\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n return\n\n case '/':\n read();\n lexState = 'comment';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n if (util.isSpaceSeparator(c)) {\n read();\n return\n }\n\n // This code is unreachable.\n // if (!lexStates[parseState]) {\n // throw invalidLexState(parseState)\n // }\n\n return lexStates[parseState]()\n },\n\n comment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineComment';\n return\n\n case '/':\n read();\n lexState = 'singleLineComment';\n return\n }\n\n throw invalidChar(read())\n },\n\n multiLineComment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineCommentAsterisk';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n },\n\n multiLineCommentAsterisk () {\n switch (c) {\n case '*':\n read();\n return\n\n case '/':\n read();\n lexState = 'default';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n lexState = 'multiLineComment';\n },\n\n singleLineComment () {\n switch (c) {\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n lexState = 'default';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n read();\n },\n\n value () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n case 'n':\n read();\n literal('ull');\n return newToken('null', null)\n\n case 't':\n read();\n literal('rue');\n return newToken('boolean', true)\n\n case 'f':\n read();\n literal('alse');\n return newToken('boolean', false)\n\n case '-':\n case '+':\n if (read() === '-') {\n sign = -1;\n }\n\n lexState = 'sign';\n return\n\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n buffer = '';\n lexState = 'string';\n return\n }\n\n throw invalidChar(read())\n },\n\n identifierNameStartEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n break\n\n default:\n if (!util.isIdStartChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n identifierName () {\n switch (c) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n buffer += read();\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameEscape';\n return\n }\n\n if (util.isIdContinueChar(c)) {\n buffer += read();\n return\n }\n\n return newToken('identifier', buffer)\n },\n\n identifierNameEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n break\n\n default:\n if (!util.isIdContinueChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n sign () {\n switch (c) {\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', sign * Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n }\n\n throw invalidChar(read())\n },\n\n zero () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n\n case 'x':\n case 'X':\n buffer += read();\n lexState = 'hexadecimal';\n return\n }\n\n return newToken('numeric', sign * 0)\n },\n\n decimalInteger () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalPointLeading () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalPoint () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalFraction () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalExponent () {\n switch (c) {\n case '+':\n case '-':\n buffer += read();\n lexState = 'decimalExponentSign';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentSign () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentInteger () {\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n hexadecimal () {\n if (util.isHexDigit(c)) {\n buffer += read();\n lexState = 'hexadecimalInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n hexadecimalInteger () {\n if (util.isHexDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n string () {\n switch (c) {\n case '\\\\':\n read();\n buffer += escape();\n return\n\n case '\"':\n if (doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case \"'\":\n if (!doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case '\\n':\n case '\\r':\n throw invalidChar(read())\n\n case '\\u2028':\n case '\\u2029':\n separatorChar(c);\n break\n\n case undefined:\n throw invalidChar(read())\n }\n\n buffer += read();\n },\n\n start () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n // This code is unreachable since the default lexState handles eof.\n // case undefined:\n // return newToken('eof')\n }\n\n lexState = 'value';\n },\n\n beforePropertyName () {\n switch (c) {\n case '$':\n case '_':\n buffer = read();\n lexState = 'identifierName';\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameStartEscape';\n return\n\n case '}':\n return newToken('punctuator', read())\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n lexState = 'string';\n return\n }\n\n if (util.isIdStartChar(c)) {\n buffer += read();\n lexState = 'identifierName';\n return\n }\n\n throw invalidChar(read())\n },\n\n afterPropertyName () {\n if (c === ':') {\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforePropertyValue () {\n lexState = 'value';\n },\n\n afterPropertyValue () {\n switch (c) {\n case ',':\n case '}':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforeArrayValue () {\n if (c === ']') {\n return newToken('punctuator', read())\n }\n\n lexState = 'value';\n },\n\n afterArrayValue () {\n switch (c) {\n case ',':\n case ']':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n end () {\n // This code is unreachable since it's handled by the default lexState.\n // if (c === undefined) {\n // read()\n // return newToken('eof')\n // }\n\n throw invalidChar(read())\n },\n};\n\nfunction newToken (type, value) {\n return {\n type,\n value,\n line,\n column,\n }\n}\n\nfunction literal (s) {\n for (const c of s) {\n const p = peek();\n\n if (p !== c) {\n throw invalidChar(read())\n }\n\n read();\n }\n}\n\nfunction escape () {\n const c = peek();\n switch (c) {\n case 'b':\n read();\n return '\\b'\n\n case 'f':\n read();\n return '\\f'\n\n case 'n':\n read();\n return '\\n'\n\n case 'r':\n read();\n return '\\r'\n\n case 't':\n read();\n return '\\t'\n\n case 'v':\n read();\n return '\\v'\n\n case '0':\n read();\n if (util.isDigit(peek())) {\n throw invalidChar(read())\n }\n\n return '\\0'\n\n case 'x':\n read();\n return hexEscape()\n\n case 'u':\n read();\n return unicodeEscape()\n\n case '\\n':\n case '\\u2028':\n case '\\u2029':\n read();\n return ''\n\n case '\\r':\n read();\n if (peek() === '\\n') {\n read();\n }\n\n return ''\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n throw invalidChar(read())\n\n case undefined:\n throw invalidChar(read())\n }\n\n return read()\n}\n\nfunction hexEscape () {\n let buffer = '';\n let c = peek();\n\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nfunction unicodeEscape () {\n let buffer = '';\n let count = 4;\n\n while (count-- > 0) {\n const c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n }\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nconst parseStates = {\n start () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforePropertyName () {\n switch (token.type) {\n case 'identifier':\n case 'string':\n key = token.value;\n parseState = 'afterPropertyName';\n return\n\n case 'punctuator':\n // This code is unreachable since it's handled by the lexState.\n // if (token.value !== '}') {\n // throw invalidToken()\n // }\n\n pop();\n return\n\n case 'eof':\n throw invalidEOF()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterPropertyName () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator' || token.value !== ':') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n parseState = 'beforePropertyValue';\n },\n\n beforePropertyValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforeArrayValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n if (token.type === 'punctuator' && token.value === ']') {\n pop();\n return\n }\n\n push();\n },\n\n afterPropertyValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforePropertyName';\n return\n\n case '}':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterArrayValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforeArrayValue';\n return\n\n case ']':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n end () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'eof') {\n // throw invalidToken()\n // }\n },\n};\n\nfunction push () {\n let value;\n\n switch (token.type) {\n case 'punctuator':\n switch (token.value) {\n case '{':\n value = {};\n break\n\n case '[':\n value = [];\n break\n }\n\n break\n\n case 'null':\n case 'boolean':\n case 'numeric':\n case 'string':\n value = token.value;\n break\n\n // This code is unreachable.\n // default:\n // throw invalidToken()\n }\n\n if (root === undefined) {\n root = value;\n } else {\n const parent = stack[stack.length - 1];\n if (Array.isArray(parent)) {\n parent.push(value);\n } else {\n Object.defineProperty(parent, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n if (value !== null && typeof value === 'object') {\n stack.push(value);\n\n if (Array.isArray(value)) {\n parseState = 'beforeArrayValue';\n } else {\n parseState = 'beforePropertyName';\n }\n } else {\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n }\n}\n\nfunction pop () {\n stack.pop();\n\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n}\n\n// This code is unreachable.\n// function invalidParseState () {\n// return new Error(`JSON5: invalid parse state '${parseState}'`)\n// }\n\n// This code is unreachable.\n// function invalidLexState (state) {\n// return new Error(`JSON5: invalid lex state '${state}'`)\n// }\n\nfunction invalidChar (c) {\n if (c === undefined) {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n }\n\n return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n}\n\nfunction invalidEOF () {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n}\n\n// This code is unreachable.\n// function invalidToken () {\n// if (token.type === 'eof') {\n// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n// }\n\n// const c = String.fromCodePoint(token.value.codePointAt(0))\n// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n// }\n\nfunction invalidIdentifier () {\n column -= 5;\n return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)\n}\n\nfunction separatorChar (c) {\n console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);\n}\n\nfunction formatChar (c) {\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n if (replacements[c]) {\n return replacements[c]\n }\n\n if (c < ' ') {\n const hexString = c.charCodeAt(0).toString(16);\n return '\\\\x' + ('00' + hexString).substring(hexString.length)\n }\n\n return c\n}\n\nfunction syntaxError (message) {\n const err = new SyntaxError(message);\n err.lineNumber = line;\n err.columnNumber = column;\n return err\n}\n\nvar stringify = function stringify (value, replacer, space) {\n const stack = [];\n let indent = '';\n let propertyList;\n let replacerFunc;\n let gap = '';\n let quote;\n\n if (\n replacer != null &&\n typeof replacer === 'object' &&\n !Array.isArray(replacer)\n ) {\n space = replacer.space;\n quote = replacer.quote;\n replacer = replacer.replacer;\n }\n\n if (typeof replacer === 'function') {\n replacerFunc = replacer;\n } else if (Array.isArray(replacer)) {\n propertyList = [];\n for (const v of replacer) {\n let item;\n\n if (typeof v === 'string') {\n item = v;\n } else if (\n typeof v === 'number' ||\n v instanceof String ||\n v instanceof Number\n ) {\n item = String(v);\n }\n\n if (item !== undefined && propertyList.indexOf(item) < 0) {\n propertyList.push(item);\n }\n }\n }\n\n if (space instanceof Number) {\n space = Number(space);\n } else if (space instanceof String) {\n space = String(space);\n }\n\n if (typeof space === 'number') {\n if (space > 0) {\n space = Math.min(10, Math.floor(space));\n gap = ' '.substr(0, space);\n }\n } else if (typeof space === 'string') {\n gap = space.substr(0, 10);\n }\n\n return serializeProperty('', {'': value})\n\n function serializeProperty (key, holder) {\n let value = holder[key];\n if (value != null) {\n if (typeof value.toJSON5 === 'function') {\n value = value.toJSON5(key);\n } else if (typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n }\n\n if (replacerFunc) {\n value = replacerFunc.call(holder, key, value);\n }\n\n if (value instanceof Number) {\n value = Number(value);\n } else if (value instanceof String) {\n value = String(value);\n } else if (value instanceof Boolean) {\n value = value.valueOf();\n }\n\n switch (value) {\n case null: return 'null'\n case true: return 'true'\n case false: return 'false'\n }\n\n if (typeof value === 'string') {\n return quoteString(value, false)\n }\n\n if (typeof value === 'number') {\n return String(value)\n }\n\n if (typeof value === 'object') {\n return Array.isArray(value) ? serializeArray(value) : serializeObject(value)\n }\n\n return undefined\n }\n\n function quoteString (value) {\n const quotes = {\n \"'\": 0.1,\n '\"': 0.2,\n };\n\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n let product = '';\n\n for (let i = 0; i < value.length; i++) {\n const c = value[i];\n switch (c) {\n case \"'\":\n case '\"':\n quotes[c]++;\n product += c;\n continue\n\n case '\\0':\n if (util.isDigit(value[i + 1])) {\n product += '\\\\x00';\n continue\n }\n }\n\n if (replacements[c]) {\n product += replacements[c];\n continue\n }\n\n if (c < ' ') {\n let hexString = c.charCodeAt(0).toString(16);\n product += '\\\\x' + ('00' + hexString).substring(hexString.length);\n continue\n }\n\n product += c;\n }\n\n const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b);\n\n product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);\n\n return quoteChar + product + quoteChar\n }\n\n function serializeObject (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let keys = propertyList || Object.keys(value);\n let partial = [];\n for (const key of keys) {\n const propertyString = serializeProperty(key, value);\n if (propertyString !== undefined) {\n let member = serializeKey(key) + ':';\n if (gap !== '') {\n member += ' ';\n }\n member += propertyString;\n partial.push(member);\n }\n }\n\n let final;\n if (partial.length === 0) {\n final = '{}';\n } else {\n let properties;\n if (gap === '') {\n properties = partial.join(',');\n final = '{' + properties + '}';\n } else {\n let separator = ',\\n' + indent;\n properties = partial.join(separator);\n final = '{\\n' + indent + properties + ',\\n' + stepback + '}';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n\n function serializeKey (key) {\n if (key.length === 0) {\n return quoteString(key, true)\n }\n\n const firstChar = String.fromCodePoint(key.codePointAt(0));\n if (!util.isIdStartChar(firstChar)) {\n return quoteString(key, true)\n }\n\n for (let i = firstChar.length; i < key.length; i++) {\n if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {\n return quoteString(key, true)\n }\n }\n\n return key\n }\n\n function serializeArray (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let partial = [];\n for (let i = 0; i < value.length; i++) {\n const propertyString = serializeProperty(String(i), value);\n partial.push((propertyString !== undefined) ? propertyString : 'null');\n }\n\n let final;\n if (partial.length === 0) {\n final = '[]';\n } else {\n if (gap === '') {\n let properties = partial.join(',');\n final = '[' + properties + ']';\n } else {\n let separator = ',\\n' + indent;\n let properties = partial.join(separator);\n final = '[\\n' + indent + properties + ',\\n' + stepback + ']';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n};\n\nconst JSON5 = {\n parse,\n stringify,\n};\n\nvar lib = JSON5;\n\nexport default lib;\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, notNullish, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[k]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && permissionRead.value !== \"denied\") {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && permissionWrite.value !== \"denied\")\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), containerRect.width + container.scrollLeft - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), containerRect.height + container.scrollTop - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold: 0\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n ...gamepad,\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = target.document ? target.document.documentElement : (_a = target.documentElement) != null ? _a : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, initialOverflow);\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n var _a;\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = (_a = elInitialOverflow.get(el)) != null ? _a : \"\";\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n"],"names":["errorWrap","getter","catchHandler","finallyHandler","e","message","error","errorTry","fn","args","a","value","O","len","start","relativeStart","k","end","relativeEnd","finalValue","TypedArray","log","LN2","x","asUint","searchString","position","subjectString","lastIndex","b","clz32","imul_0","isView","setMetadataFor","CharSequence","interfaceMeta","Comparable","Number_0","classMeta","Unit","objectMeta","IntCompanionObject","Comparator","Collection","AbstractCollection","VOID","AbstractMutableCollection","IteratorImpl","ListIteratorImpl","List","AbstractMutableList","Map_0","AbstractMap","AbstractMutableMap","Set","AbstractMutableSet","Companion","ArrayList","ArrayList_init_$Create$","HashMap","HashMap_init_$Create$","HashMapEntrySetBase","HashMapEntrySet","HashSet","HashSet_init_$Create$","Companion_0","Itr","KeysItr","EntriesItr","Entry","EntryRef","containsAllEntries","m","tmp$ret$0","$l$block_0","tmp","isInterface","tmp0_iterator","element","entry","tmp_0","InternalMap","InternalHashMap","InternalHashMap_init_$Create$","LinkedHashMap","LinkedHashMap_init_$Create$","LinkedHashSet","LinkedHashSet_init_$Create$","KProperty1","StringBuilder","StringBuilder_init_$Create$_0","Companion_1","Regex","sam$kotlin_Comparator$0","_no_name_provided__qut3iv","Companion_2","Char","Companion_3","Enum","arrayIterator$1","Companion_4","Long","Digit","Continuation","CoroutineImpl","CompletedContinuation","_no_name_provided__qut3iv_0","Exception","Exception_init_$Create$","RuntimeException","RuntimeException_init_$Create$","IllegalArgumentException","IllegalArgumentException_init_$Create$","IndexOutOfBoundsException","IndexOutOfBoundsException_init_$Create$","IllegalStateException","IllegalStateException_init_$Create$","UnsupportedOperationException","UnsupportedOperationException_init_$Create$","NoSuchElementException","NoSuchElementException_init_$Create$","Error_0","Error_init_$Create$","NumberFormatException","NumberFormatException_init_$Create$","ArithmeticException","ArithmeticException_init_$Create$","ConcurrentModificationException","ConcurrentModificationException_init_$Create$","NullPointerException","NullPointerException_init_$Create$","ClassCastException","ClassCastException_init_$Create$","Companion_5","Companion_6","Companion_7","EmptyIterator","ArrayAsCollection","EmptyList","IndexedValue","IntIterator","CharIterator","SequenceScope","SequenceBuilderIterator","_no_name_provided__qut3iv_1","TransformingSequence$iterator$1","TransformingSequence","TakeWhileSequence$iterator$1","TakeWhileSequence","DropTakeSequence","DropSequence$iterator$1","DropSequence","DropWhileSequence$iterator$1","DropWhileSequence","FilteringSequence$iterator$1","FilteringSequence","IndexingSequence$iterator$1","IndexingSequence","TakeSequence$iterator$1","TakeSequence","EmptySequence","SubSequence$iterator$1","SubSequence","EmptySet","NaturalOrderComparator","Key","ContinuationInterceptor","EmptyCoroutineContext","CoroutineSingletons","Companion_8","IntProgression","IntRange","Companion_9","CharProgression","CharRange","IntProgressionIterator","CharProgressionIterator","Companion_10","Companion_11","UnsafeLazyImpl","UNINITIALIZED_VALUE","Companion_12","Failure","NotImplementedError","Pair","protoOf","Unit_instance","IntCompanionObject_instance","isNaN_0","_this__u8e3s4","takeHighestOneBit","collectionToArray","collection","collectionToArrayCommonImpl","listOf","arrayListOf","copyToArray","checkIndexOverflow","index","throwIndexOverflow","sort","collectionsSort","naturalOrder","sortWith","comparator","setOf","hashSetOf","list","array","sortArrayWith","inductionVariable","last","i","elements","modified","$outer","tmp1","IllegalStateException_init_$Create$_0","toString_2","Companion_instance_5","tmp$ret$1","$l$block","item","equals","fromIndex","toIndex","iterator","times","other","Companion_instance_7","arrayOfUninitializedElements","capacity","IllegalArgumentException_init_$Create$_0","fillArrayVal","resetRange","copyOfUninitializedElements","newSize","copyOf_0","Companion_instance","this_0","ArrayList_init_$Create$_0","Companion_getInstance","ArrayList_init_$Init$","$this","objectCreate","ArrayList_init_$Init$_0","initialCapacity","ArrayList_init_$Init$_1","ArrayList_init_$Create$_1","increaseLength","amount","previous","rangeCheck","insertionRangeCheck","THROW_CCE","offset","index_0","get_lastIndex_0","indexOf","arrayToString","_stableSortingIsSupported","getStableSortingIsSupported","comparison","sortArrayWith$lambda","mergeSort","get_lastIndex","sortArray","sortArray$lambda","tmp0_safe_receiver","getStableSortingIsSupported$lambda","inductionVariable_0","endInclusive","size","buffer","result","mergeSort_0","median","left","right","target","leftIndex","rightIndex","leftValue","rightValue","$comparator","compareTo_0","HashMap_init_$Init$","internalMap","HashMap_init_$Init$_0","HashMap_init_$Init$_1","loadFactor","InternalHashMap_init_$Create$_1","HashMap_init_$Init$_2","key","tmp0_elvis_lhs","backing","HashSet_init_$Init$","map","HashSet_init_$Init$_0","HashSet_init_$Init$_1","InternalHashMap_init_$Create$_0","HashSet_init_$Init$_2","HashSet_init_$Init$_3","HashSet_init_$Create$_0","computeHashSize","coerceAtLeast","computeShift","hashSize","InternalHashMap_init_$Init$","InternalHashMap_init_$Init$_0","Companion_instance_0","InternalHashMap_init_$Init$_1","_get_capacity__a9k9f3","_get_hashSize__tftcho","registerModification","ensureExtraCapacity","shouldCompact","rehash","ensureCapacity","extraCapacity","spareCapacity","gaps","minCapacity","RuntimeException_init_$Create$_0","copyOf","newHashSize","allocateValuesArray","curValuesArray","newValuesArray","hash","hashCode","compact","j","valuesArray","fill","tmp0","putRehash","hash_0","probesLeft","findKey","addKey","retry","tentativeMaxProbeDistance","coerceAtMost","probeDistance","putIndex","tmp4","contentEquals","tmp1_elvis_lhs","tmp0_safe_receiver_0","ensureNotNull","tmp1_elvis_lhs_0","sb","keysArray","presenceArray","hashArray","maxProbeDistance","length","oldValue","it","StringBuilder_init_$Create$","LinkedHashMap_init_$Init$","LinkedHashMap_init_$Init$_0","LinkedHashMap_init_$Create$_0","LinkedHashSet_init_$Init$","LinkedHashSet_init_$Init$_0","LinkedHashSet_init_$Create$_0","LinkedHashSet_init_$Init$_1","LinkedHashSet_init_$Init$_2","LinkedHashSet_init_$Create$_1","reset","StringBuilder_init_$Init$","StringBuilder_init_$Init$_0","content","get_lastIndex_1","charSequenceGet","IndexOutOfBoundsException_init_$Create$_0","startIndex","endIndex","toString_0","toString_1","uppercaseChar","uppercase","isWhitespace","isWhitespaceImpl","toString","radix","checkRadix","toInt","toIntOrNull","numberFormatError","toInt_0","toIntOrNull_0","digitOf","char","Char__compareTo_impl_ypi4mb","Char__minus_impl_a2frrh","digitToIntImpl","Regex_init_$Init$","pattern","emptySet","Regex_init_$Create$","Companion_instance_1","Companion_getInstance_1","options","toSet","toFlags","input","match","charSequenceLength","prepend","joinToString_0","toFlags$lambda","contentEquals_0","contentEqualsImpl","function_0","isBlank","get_indices","startsWith","prefix","ignoreCase","regionMatches","startsWith_0","endsWith","suffix","thisOffset","otherOffset","regionMatchesImpl","asSequence","emptySequence","single","NoSuchElementException_init_$Create$_0","contains","last_0","toCollection","destination","joinToString","separator","postfix","limit","truncated","transform","joinTo","count","$l$loop","appendElement","$this_asSequence","arrayIterator","joinTo_0","distinct","toList","toMutableSet","firstOrNull","plus","result_0","addAll","sorted","isArray","sort_0","asList","this_1","toMutableList_0","first","toMutableList","emptyList","optimizeReadOnlyList","toCollection_0","sortedWith","sortWith_0","optimizeReadOnlySet","downTo","to","Companion_instance_10","maximumValue","minimumValue","toList_0","dst","firstOrNull_0","elementAtOrNull","toMutableList_1","toCollection_1","takeWhile","predicate","drop","dropWhile","filterIndexed","filterIndexed$lambda","filterIndexed$lambda_0","take","$predicate","getOrNull","_Char___init__impl__6a9atx_0","code","Char__compareTo_impl_ypi4mb_0","Char__rangeTo_impl_tkncvp","Char__toInt_impl_vasixd","Char__equals_impl_x6719k","Char__hashCode_impl_otmys","Companion_instance_2","Companion_getInstance_2","name","ordinal","identityHashCode","implement","interfaces","maxSize","masks","currentSize","imask","iid","bitMaskWith","iidImask","compositeBitMask","activeBit","numberIndex","intArray","positionInNumber","numberWithSettledBit","tmp_1","mask","isBitSet","possibleActiveBit","initValue","charArrayOf","arr","type","$array","get_buf","_init_properties_bitUtils_kt__nfcg4k","buf","get_bufFloat64","bufFloat64","get_bufInt32","bufInt32","get_lowIndex","lowIndex","get_highIndex","highIndex","getNumberHashCode","obj","numberToInt","properties_initialized_bitUtils_kt_i2bo3e","isString","numberToChar","charSequenceSubSequence","arrayToString$lambda","doubleCompareTo","primitiveCompareTo","compareToDoNotIntrinsicify","ia","getObjectHashCode","calculateRandomHash","descriptor","o","isArrayish","anyToString","typeOf","getBooleanHashCode","getStringHashCode","getBigIntHashCode","getSymbolHashCode","str","shiftNumber","MASK","bigNumber","signum","chunk","hashCodeMap","symbolIsSharable","getSymbolMap","getSymbolWeakMap","cachedHashCode","symbol","symbolMap","symbolWeakMap","obj1","obj2","captureStack","instance","constructorFunction","constructor","defineProp","setter","proto","extendThrowable","this_","cause","setPropertiesToThrowableInstance","errorInfo","calculateErrorInfo","v","THROW_NPE","lazy","initializer","fillFrom","src","srcLen","dstLen","arrayCopyResize","source","defaultValue","Companion_instance_4","Companion_getInstance_4","low","high","compare","add","divide","toNumber","equalsLong","hashCode_0","toStringImpl","get_ZERO","_init_properties_longjs_kt__tqrzid","ZERO","get_ONE","ONE","get_NEG_ONE","NEG_ONE","get_MAX_VALUE","MAX_VALUE","get_MIN_VALUE","MIN_VALUE","get_TWO_PWR_24_","TWO_PWR_24_","thisNeg","isNegative","otherNeg","subtract","a48","a32","a16","a00","b48","b32","b16","b00","c48","c32","c16","c00","multiply","isZero","isOdd","negate","lessThan","fromNumber","Exception_init_$Create$_0","halfThis","shiftRight","approx","shiftLeft","rem","res","rem_0","greaterThanOrEqual","approxDouble","approx2","log2","delta","approxRes","approxRem","greaterThan","numBits","numBits_0","getLowBitsUnsigned","l","radixLong","fromInt","div","digitsPerTime","radixToPower","remDiv","intval","digits","twoPwr32","properties_initialized_longjs_kt_5aju7t","defaultConstructor","associatedObjectKey","associatedObjects","suspendArity","createMetadata","kind","undef","ctor","metadataConstructor","parent","metadata","receiver","generateInterfaceId","doubleToInt","toShort","numberRangeToNumber","get_propertyRefClassMetadataCache","_init_properties_reflectRuntime_kt__5r4uu3","propertyRefClassMetadataCache","metadataObject","getPropertyCallableRef","paramCount","superType","getPropertyRefClass","getKPropMetadata","getInterfaceMaskFor","tmp$ret$2","properties_initialized_reflectRuntime_kt_inkhwd","isJsArray","iface","isInterfaceImpl","isNumber","isComparable","isCharSequence","tmp2_safe_receiver","hasProp","parentProto","getPrototypeOf","propName","reverse","midPoint","reverseIndex","ch","binarySearchRange","Digit_getInstance","diff","needle","bottom","top","middle","Digit_instance","releaseIntercepted","intercepted","Key_instance","CompletedContinuation_instance","resultContinuation","current","_Result___get_isFailure__impl__jpiriv","currentResult","currentException","Result__exceptionOrNull_impl_p6xea9","$this$with","outcome","get_COROUTINE_SUSPENDED","$p","exception","completion","exception_0","createFailure","tmp$ret$4","createCoroutineUnintercepted","$completion","$this_createCoroutineUnintercepted","$receiver","$completion$1","Exception_init_$Init$","Exception_init_$Init$_0","IllegalArgumentException_init_$Init$","RuntimeException_init_$Init$","IllegalArgumentException_init_$Init$_0","RuntimeException_init_$Init$_0","IndexOutOfBoundsException_init_$Init$","IndexOutOfBoundsException_init_$Init$_0","IllegalStateException_init_$Init$","IllegalStateException_init_$Init$_0","UnsupportedOperationException_init_$Init$","NoSuchElementException_init_$Init$","NoSuchElementException_init_$Init$_0","Error_init_$Init$","Error_init_$Init$_0","NumberFormatException_init_$Init$","NumberFormatException_init_$Init$_0","NumberFormatException_init_$Create$_0","ArithmeticException_init_$Init$","ArithmeticException_init_$Init$_0","ArithmeticException_init_$Create$_0","ConcurrentModificationException_init_$Init$","NullPointerException_init_$Init$","ClassCastException_init_$Init$","AbstractCollection$toString$lambda","this$0","element_0","oldCapacity","newCapacity","c","tmp2_elvis_lhs","otherIterator","elem","elemOther","toString_3","implFindEntry","AbstractMap$toString$lambda","ourValue","mutableListOf","listOf_0","EmptyList_getInstance","EmptyIterator_instance","values","isVarargs","EmptyList_instance","tmp0_other_with_cast","flatten","collectionSizeOrDefault","default_0","removeLast","tmp1_iterator","sequence","block","nextNotReady","exceptionalState","step","throwOnFailure","EmptyCoroutineContext_getInstance","$block","EmptySequence_instance","transformer","calcNext","drop_0","n","n1","drop_1","calcNext_0","sendWhen","drop_2","_get_count__iw3m8u","message_0","message_1","EmptySet_getInstance","EmptySet_instance","NaturalOrderComparator_instance","compareValues","EmptyCoroutineContext_instance","CoroutineSingletons_COROUTINE_SUSPENDED_getInstance","CoroutineSingletons_COROUTINE_SUSPENDED_instance","CoroutineSingletons_entriesInitialized","CoroutineSingletons_initEntries","getProgressionLastElement","differenceModulo","mod","Companion_instance_8","Companion_getInstance_8","Companion_instance_9","Companion_getInstance_9","rangeStart","rangeEnd","equals_0","thisUpper","otherUpper","tmp$ret$6","firstChar","limitForMaxRadix","limitBeforeMul","digit","contains_0","indexOf_0","startsWith_1","contains_1","indexOf_1","indexOf_2","endsWith_0","indexOfAny","string","indices","last_1","step_0","trim","startFound","chars","charAtIndex","UNINITIALIZED_VALUE_instance","second","that","imul","CommonSelector","CommonTransform","ExtSyntaxError","Selector","Transform$_init_$lambda$slambda_haa4hj","Transform$_init_$lambda$slambda_haa4hj_1","Transform$_init_$lambda$slambda_haa4hj_3","Transform$_init_$lambda$slambda_haa4hj_5","Transform$querySelectorAll$lambda$slambda","Transform$querySelectorTrackAll$lambda$slambda","Transform","Expression","BinaryExpression","CompareOperator","Equal","NotEqual","Start","NotStart","Include","NotInclude","End","NotEnd","Less","LessEqual","More","MoreEqual","ConnectExpression","sam$kotlin_Comparator$0_0","ConnectOperator","BeforeBrother","AfterBrother","Ancestor","Child","Descendant","ConnectSegment$traversal$o$invoke$slambda","ConnectSegment$traversal$1","ConnectSegment$traversal$2","ConnectSegment","ConnectWrapper","LogicalExpression","sam$kotlin_Comparator$0_1","LogicalOperator","AndOperator","OrOperator","PolynomialExpression$traversal$1","PolynomialExpression","PropertySegment$matchName$1","PropertySegment$matchName$2","PropertySegment","PropertyWrapper","TupleExpression$traversal$1","TupleExpression","Parser","ParserResult","ParserSet","FilterIndexesSequence$iterator$1","FilterIndexesSequence","selector","node","CommonTransform$transform$lambda","$getChildren","CommonTransform$querySelectorAll$lambda","CommonTransform$querySelector$lambda","CommonTransform$querySelectorTrackAll$lambda$lambda","CommonTransform$querySelectorTrackAll$lambda","CommonTransform$querySelectorTrack$lambda","getAttr","getName","getChildren","getParent","tmp_2","tmp_3","expectedValue","$super","ParserSet_getInstance","Selector$tracks$delegate$lambda","Selector$connectKeys$delegate$lambda","keys","tmp1_safe_receiver","Selector$propertyNames$delegate$lambda","p","names","s","propertyWrapper","tmp_4","tmp_5","tmp_6","tmp_7","Equal_getInstance","tmp_8","tmp_9","e_0","tmp_10","tmp_11","tmp_12","tmp_13","tmp_14","tmp_15","e_1","tmp_16","tmp_17","tmp_18","tmp_19","Start_getInstance","Include_getInstance","End_getInstance","tmp_20","tmp_21","e_2","tmp_22","tmp_23","tmp_24","tracks$factory","connectKeys$factory","propertyNames$factory","trackNodes","trackTempNodes","Transform$_init_$lambda$slambda$lambda_6maxik","$node","Transform$_init_$lambda$slambda$lambda_6maxik_0","Transform$_init_$lambda_wpwstd","$getParent","$this$sequence","p1","suspendResult","$sm","Transform$_init_$lambda$slambda_haa4hj_0","Transform$_init_$lambda_wpwstd_0","Transform$_init_$lambda_wpwstd_1","$getAncestors","Transform$_init_$lambda$slambda_haa4hj_2","Transform$_init_$lambda_wpwstd_2","Transform$_init_$lambda_wpwstd_3","$getBeforeBrothers","Transform$_init_$lambda$slambda_haa4hj_4","Transform$_init_$lambda_wpwstd_4","Transform$_init_$lambda_wpwstd_5","$getAfterBrothers","childNode","Transform$_init_$lambda$slambda_haa4hj_6","Transform$_init_$lambda_wpwstd_6","$selector","Transform$querySelectorAll$lambda$slambda_0","Transform$querySelectorAll$lambda","Transform$querySelector$lambda","Transform$querySelectorTrackAll$lambda$slambda_0","Transform$querySelectorTrackAll$lambda","Transform$querySelectorTrack$lambda","getChild","getAncestors","getAncestor","getBeforeBrothers","getBeforeBrother","getAfterBrothers","getAfterBrother","getDescendants","operator","wrapChar","indexedObject","escapeChar","tmp1_subject","contentReversedEquals","CompareOperator$Companion$allSubClasses$lambda","NotEqual_getInstance","NotStart_getInstance","NotInclude_getInstance","NotEnd_getInstance","Less_getInstance","LessEqual_getInstance","More_getInstance","MoreEqual_getInstance","Equal_instance","NotEqual_instance","Start_instance","NotStart_instance","Include_instance","NotInclude_instance","End_instance","NotEnd_instance","Less_instance","LessEqual_instance","More_instance","MoreEqual_instance","ConnectOperator$Companion$allSubClasses$lambda","Companion_instance_3","BeforeBrother_getInstance","AfterBrother_getInstance","Ancestor_getInstance","Child_getInstance","Descendant_getInstance","Companion_getInstance_3","BeforeBrother_instance","AfterBrother_instance","Ancestor_instance","Child_instance","Descendant_instance","$transform","ConnectSegment$traversal$o$invoke$slambda_0","connectExpression","connectSegment","r","leftStr","rightStr","LogicalOperator$Companion$allSubClasses$lambda","AndOperator_getInstance","OrOperator_getInstance","AndOperator_instance","OrOperator_instance","PolynomialExpression$traversal$o$invoke$lambda","_anonymous_parameter_1__qggqgd","sq","bOp","PropertySegment$toString$lambda","tracked","expressions","matchTag","propertySegment","filterIndexes","numbers","temp","data","ParserSet$whiteCharParser$lambda","ParserSet$whiteCharStrictParser$lambda","ParserSet$nameParser$lambda","s0","center","ParserSet$combinatorOperatorParser$lambda","ParserSet$combinatorOperatorParser$lambda_0","_anonymous_parameter_2__qggqfi","ParserSet$integerParser$lambda","ParserSet$monomialParser$lambda","tmp0_subject","signal","coefficientResult","coefficient","ParserSet$polynomialExpressionParser$lambda","monomialResultList","monomialResult","monomialResult_0","tmp0_container","power","tmp0_iterator_0","tmp3_elvis_lhs","tmp4_elvis_lhs","polynomialExpression","ParserSet$tupleExpressionParser$lambda","intResult","ParserSet$connectExpressionParser$lambda","tupleExpressionResult","polynomialExpressionResult","ParserSet$combinatorParser$lambda","operatorResult","expressionResult","ParserSet$attrOperatorParser$lambda","ParserSet$attrOperatorParser$lambda_0","ParserSet$stringParser$lambda","startChar","containsArg","tmp2_subject","startIndex_0","endIndex_0","ParserSet$propertyParser$lambda","ParserSet$valueParser$lambda","inductionVariable_1","element_1","ParserSet$binaryExpressionParser$lambda","parserResult","valueResult","ParserSet$logicalOperatorParser$lambda","ParserSet$attrParser$lambda","exp","ParserSet$selectorUnitParser$lambda","nameResult","attrResult","ParserSet$connectSelectorParser$lambda","topSelector","selectorList","combinatorResult","combinator","selectorResult","ParserSet$endParser$lambda","ParserSet$selectorParser$lambda","combinatorSelectorResult","propertySelectorList","combinatorSelectorList","wrapperList","combinatorSelectorWrapper","propertySelectorWrapper","ParserSet_instance","parserResults","lastToken","this_2","tmp$ret$5","tokens","token","indexes","subKey","_a","parseSelector","cs","checkSelector","Space_Separator","ID_Start","ID_Continue","unicode","util","parseState","stack","pos","line","column","root","parse","text","reviver","lex","parseStates","internalize","holder","replacement","lexState","doubleQuote","sign","peek","lexStates","read","newToken","invalidChar","literal","u","unicodeEscape","invalidIdentifier","escape","separatorChar","hexEscape","invalidEOF","push","pop","syntaxError","formatChar","replacements","hexString","err","stringify","replacer","space","indent","propertyList","replacerFunc","gap","quote","serializeProperty","quoteString","serializeArray","serializeObject","quotes","product","quoteChar","stepback","partial","propertyString","member","serializeKey","final","properties","JSON5","lib","tryOnScopeDispose","getCurrentScope","onScopeDispose","toValue","unref","isClient","isObject","val","noop","createFilterWrapper","filter","wrapper","resolve","reject","bypassFilter","invoke","debounceFilter","ms","timer","maxTimer","lastRejector","_clearTimeout","timer2","duration","maxDuration","pausableFilter","extendFilter","isActive","ref","pause","resume","eventFilter","readonly","getLifeCycleTarget","getCurrentInstance","toRef","toRef$1","customRef","useDebounceFn","watchWithFilter","cb","watchOptions","watch","watchPausable","tryOnBeforeUnmount","onBeforeUnmount","tryOnMounted","sync","onMounted","nextTick","unrefElement","elRef","plain","defaultWindow","defaultDocument","useEventListener","events","listeners","cleanups","cleanup","register","el","event","listener","options2","stopWatch","optionsClone","stop","useMounted","isMounted","useSupported","callback","computed","_global","globalKey","handlers","getHandlers","getSSRHandler","fallback","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","defaults","storage","flush","deep","listenToStorageChanges","writeDefaults","mergeDefaults","shallow","window","onError","initOnMounted","shallowRef","_a2","serializer","pauseWatch","resumeWatch","pausableWatch","write","update","updateFromCustomEvent","serialized","rawValue","useMutationObserver","mutationOptions","observer","isSupported","takeRecords","useTitle","newTitle","_b","_c","document","restoreOnUnmount","t","originalTitle","title","isReadonly","format","template","restoredTitle"],"mappings":"oMAEO,MAAMA,GAAY,CACvBC,EACAC,EACAC,IACG,CACC,GAAA,CACF,OAAOF,EAAO,QACPG,EAAG,CACN,GAAA,OAAOF,GAAgB,SACzBG,GAAQ,MAAMH,CAAY,MACrB,CACC,MAAAI,GAAQJ,GAAA,YAAAA,EAAeE,KAAMA,EAC/B,OAAOE,GAAS,SAClBD,GAAQ,MAAMC,CAAK,EACVA,aAAiB,OAClBD,GAAA,MAAMC,EAAM,OAAO,CAE/B,CACM,MAAAF,CAAA,QACN,CACiBD,GAAA,MAAAA,GACnB,CACF,EAEaI,GAA+CC,GACnD,IAAIC,IAAwB,CAC7B,GAAA,CACFD,EAAG,GAAGC,CAAI,QACHL,EAAG,CACV,QAAQ,MAAMA,CAAC,CACjB,CAAA,EC/BA,OAAO,YAAY,OAAW,MAChC,YAAY,OAAS,SAAUM,EAAG,CAChC,OAAOA,GAAK,MAAQA,EAAE,WAAa,MAAQA,EAAE,UAAU,YAAc,UAAU,UAAU,SAC7F,GAEI,OAAO,MAAM,UAAU,KAAS,KAElC,OAAO,eAAe,MAAM,UAAW,OAAQ,CAAC,MAAO,SAAUC,EAAO,CAEtE,GAAI,MAAQ,KACV,MAAM,IAAI,UAAU,6BAA6B,EAUnD,QARIC,EAAI,OAAO,IAAI,EACfC,EAAMD,EAAE,SAAW,EACnBE,EAAQ,UAAU,CAAC,EACnBC,EAAgBD,GAAS,EACzBE,EAAID,EAAgB,EAAI,KAAK,IAAIF,EAAME,EAAe,CAAC,EAAI,KAAK,IAAIA,EAAeF,CAAG,EACtFI,EAAM,UAAU,CAAC,EACjBC,EAAcD,IAAQ,OAAYJ,EAAMI,GAAO,EAC/CE,EAAaD,EAAc,EAAI,KAAK,IAAIL,EAAMK,EAAa,CAAC,EAAI,KAAK,IAAIA,EAAaL,CAAG,EACtFG,EAAIG,GAC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MA,CACxB,EAAAt7B,EACEu7B,GAAiB5L,EAAKyL,GAAY,KAAO,OAASA,EAAS,QAAU,KAAOzL,EAAK,GACjF6L,EAAQpF,IAAO8E,EAAKD,IAA8BG,GAAY,KAAO,OAASA,EAAS,SAAU,KAAOF,EAAK,IAAI,EACjHO,EAAaR,GAAY,OAAOA,GAAa,WACnD,SAASS,EAAOJ,EAAG,CACjB,GAAI,EAAE,kBAAmBt7B,GAChB,OAAAs7B,EACH,MAAAK,EAAW37B,EAAQ,eAAiB,KACnC,OAAA,OAAO27B,GAAa,WAAaA,EAASL,CAAC,EAAIlH,GAAQuH,CAAQ,EAAE,QAAQ,MAAOL,CAAC,CAC1F,CACA,OAAA3E,GACE6E,EACA,CAACF,EAAGjyB,IAAM,CACJiyB,IAAMjyB,GAAK+xB,IACbA,EAAS,MAAQM,EAAO,OAAOJ,GAAM,SAAWA,EAAI,EAAE,EAC1D,EACA,CAAE,UAAW,EAAK,CAAA,EAEhBt7B,EAAQ,SAAW,CAACA,EAAQ,eAAiBo7B,GAAY,CAACK,GAC5Dd,IACGQ,EAAKC,EAAS,OAAS,KAAO,OAASD,EAAG,cAAc,OAAO,EAChE,IAAM,CACAC,GAAYA,EAAS,QAAUI,EAAM,QACjCA,EAAA,MAAQE,EAAON,EAAS,KAAK,EACvC,EACA,CAAE,UAAW,EAAK,CAAA,EAGtBvE,GAAmB,IAAM,CACvB,GAAIwE,EAAkB,CACpB,MAAMO,EAAgBP,EAAiBE,EAAeC,EAAM,OAAS,EAAE,EACnEI,GAAiB,MAAQR,IAC3BA,EAAS,MAAQQ,EACrB,CAAA,CACD,EACMJ,CACT","x_google_ignoreList":[1,2,4,5,6]} \ No newline at end of file +{"version":3,"file":"index-Lw3EAuUv.js","sources":["../../src/utils/error.ts","../../node_modules/.pnpm/@gkd-kit+selector@0.0.18/node_modules/@gkd-kit/selector/kotlin/kotlin-kotlin-stdlib.mjs","../../node_modules/.pnpm/@gkd-kit+selector@0.0.18/node_modules/@gkd-kit/selector/kotlin/gkd-selector.mjs","../../src/utils/selector.ts","../../node_modules/.pnpm/json5@2.2.3/node_modules/json5/dist/index.mjs","../../node_modules/.pnpm/@vueuse+shared@10.7.2_vue@3.4.14/node_modules/@vueuse/shared/index.mjs","../../node_modules/.pnpm/@vueuse+core@10.7.2_vue@3.4.14/node_modules/@vueuse/core/index.mjs"],"sourcesContent":["import { message } from '@/utils/discrete';\n\nexport const errorWrap = (\n getter: () => T,\n catchHandler?: ((e: unknown) => unknown) | string,\n finallyHandler?: () => void,\n) => {\n try {\n return getter();\n } catch (e) {\n if (typeof catchHandler == 'string') {\n message.error(catchHandler);\n } else {\n const error = catchHandler?.(e) ?? e;\n if (typeof error == 'string') {\n message.error(error);\n } else if (error instanceof Error) {\n message.error(error.message);\n }\n }\n throw e;\n } finally {\n finallyHandler?.();\n }\n};\n\nexport const errorTry = any>(fn: T) => {\n return (...args: Parameters) => {\n try {\n fn(...args);\n } catch (e) {\n console.error(e);\n }\n };\n};\n","//region block: polyfills\nif (typeof ArrayBuffer.isView === 'undefined') {\n ArrayBuffer.isView = function (a) {\n return a != null && a.__proto__ != null && a.__proto__.__proto__ === Int8Array.prototype.__proto__;\n };\n}\nif (typeof Array.prototype.fill === 'undefined') {\n // Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill#Polyfill\n Object.defineProperty(Array.prototype, 'fill', {value: function (value) {\n // Steps 1-2.\n if (this == null) {\n throw new TypeError('this is null or not defined');\n }\n var O = Object(this); // Steps 3-5.\n var len = O.length >>> 0; // Steps 6-7.\n var start = arguments[1];\n var relativeStart = start >> 0; // Step 8.\n var k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : Math.min(relativeStart, len); // Steps 9-10.\n var end = arguments[2];\n var relativeEnd = end === undefined ? len : end >> 0; // Step 11.\n var finalValue = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : Math.min(relativeEnd, len); // Step 12.\n while (k < finalValue) {\n O[k] = value;\n k++;\n }\n ; // Step 13.\n return O;\n }});\n}\n[Int8Array, Int16Array, Uint16Array, Int32Array, Float32Array, Float64Array].forEach(function (TypedArray) {\n if (typeof TypedArray.prototype.fill === 'undefined') {\n Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});\n }\n});\nif (typeof Math.clz32 === 'undefined') {\n Math.clz32 = function (log, LN2) {\n return function (x) {\n var asUint = x >>> 0;\n if (asUint === 0) {\n return 32;\n }\n return 31 - (log(asUint) / LN2 | 0) | 0; // the \"| 0\" acts like math.floor\n };\n }(Math.log, Math.LN2);\n}\nif (typeof String.prototype.endsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {\n var subjectString = this.toString();\n if (position === undefined || position > subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n }});\n}\nif (typeof String.prototype.startsWith === 'undefined') {\n Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {\n position = position || 0;\n return this.lastIndexOf(searchString, position) === position;\n }});\n}\nif (typeof Math.imul === 'undefined') {\n Math.imul = function imul(a, b) {\n return (a & 4.29490176E9) * (b & 65535) + (a & 65535) * (b | 0) | 0;\n };\n}\n//endregion\n//region block: imports\nvar clz32 = Math.clz32;\nvar imul_0 = Math.imul;\nvar isView = ArrayBuffer.isView;\n//endregion\n//region block: pre-declaration\nsetMetadataFor(CharSequence, 'CharSequence', interfaceMeta);\nsetMetadataFor(Comparable, 'Comparable', interfaceMeta);\nsetMetadataFor(Number_0, 'Number', classMeta);\nsetMetadataFor(Unit, 'Unit', objectMeta);\nsetMetadataFor(IntCompanionObject, 'IntCompanionObject', objectMeta);\nsetMetadataFor(Comparator, 'Comparator', interfaceMeta);\nsetMetadataFor(Collection, 'Collection', interfaceMeta);\nsetMetadataFor(AbstractCollection, 'AbstractCollection', classMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableCollection, 'AbstractMutableCollection', classMeta, AbstractCollection, [AbstractCollection, Collection]);\nsetMetadataFor(IteratorImpl, 'IteratorImpl', classMeta);\nsetMetadataFor(ListIteratorImpl, 'ListIteratorImpl', classMeta, IteratorImpl);\nsetMetadataFor(List, 'List', interfaceMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableList, 'AbstractMutableList', classMeta, AbstractMutableCollection, [AbstractMutableCollection, Collection, List]);\nsetMetadataFor(Map_0, 'Map', interfaceMeta);\nsetMetadataFor(AbstractMap, 'AbstractMap', classMeta, VOID, [Map_0]);\nsetMetadataFor(AbstractMutableMap, 'AbstractMutableMap', classMeta, AbstractMap, [AbstractMap, Map_0]);\nsetMetadataFor(Set, 'Set', interfaceMeta, VOID, [Collection]);\nsetMetadataFor(AbstractMutableSet, 'AbstractMutableSet', classMeta, AbstractMutableCollection, [AbstractMutableCollection, Set, Collection]);\nsetMetadataFor(Companion, 'Companion', objectMeta);\nsetMetadataFor(ArrayList, 'ArrayList', classMeta, AbstractMutableList, [AbstractMutableList, Collection, List], ArrayList_init_$Create$);\nsetMetadataFor(HashMap, 'HashMap', classMeta, AbstractMutableMap, [AbstractMutableMap, Map_0], HashMap_init_$Create$);\nsetMetadataFor(HashMapEntrySetBase, 'HashMapEntrySetBase', classMeta, AbstractMutableSet, [Set, Collection, AbstractMutableSet]);\nsetMetadataFor(HashMapEntrySet, 'HashMapEntrySet', classMeta, HashMapEntrySetBase);\nsetMetadataFor(HashSet, 'HashSet', classMeta, AbstractMutableSet, [AbstractMutableSet, Set, Collection], HashSet_init_$Create$);\nsetMetadataFor(Companion_0, 'Companion', objectMeta);\nsetMetadataFor(Itr, 'Itr', classMeta);\nsetMetadataFor(KeysItr, 'KeysItr', classMeta, Itr);\nsetMetadataFor(EntriesItr, 'EntriesItr', classMeta, Itr);\nsetMetadataFor(Entry, 'Entry', interfaceMeta);\nsetMetadataFor(EntryRef, 'EntryRef', classMeta, VOID, [Entry]);\nfunction containsAllEntries(m) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(m, Collection)) {\n tmp = m.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = m.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.InternalMap.containsAllEntries.' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var entry = element;\n var tmp_0;\n if (!(entry == null) ? isInterface(entry, Entry) : false) {\n tmp_0 = this.j4(entry);\n } else {\n tmp_0 = false;\n }\n if (!tmp_0) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n}\nsetMetadataFor(InternalMap, 'InternalMap', interfaceMeta);\nsetMetadataFor(InternalHashMap, 'InternalHashMap', classMeta, VOID, [InternalMap], InternalHashMap_init_$Create$);\nsetMetadataFor(LinkedHashMap, 'LinkedHashMap', classMeta, HashMap, [HashMap, Map_0], LinkedHashMap_init_$Create$);\nsetMetadataFor(LinkedHashSet, 'LinkedHashSet', classMeta, HashSet, [HashSet, Set, Collection], LinkedHashSet_init_$Create$);\nsetMetadataFor(KProperty1, 'KProperty1', interfaceMeta);\nsetMetadataFor(StringBuilder, 'StringBuilder', classMeta, VOID, [CharSequence], StringBuilder_init_$Create$_0);\nsetMetadataFor(Companion_1, 'Companion', objectMeta);\nsetMetadataFor(Regex, 'Regex', classMeta);\nsetMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(_no_name_provided__qut3iv, VOID, classMeta);\nsetMetadataFor(Companion_2, 'Companion', objectMeta);\nsetMetadataFor(Char, 'Char', classMeta, VOID, [Comparable]);\nsetMetadataFor(Companion_3, 'Companion', objectMeta);\nsetMetadataFor(Enum, 'Enum', classMeta, VOID, [Comparable]);\nsetMetadataFor(arrayIterator$1, VOID, classMeta);\nsetMetadataFor(Companion_4, 'Companion', objectMeta);\nsetMetadataFor(Long, 'Long', classMeta, Number_0, [Number_0, Comparable]);\nsetMetadataFor(Digit, 'Digit', objectMeta);\nsetMetadataFor(Continuation, 'Continuation', interfaceMeta);\nsetMetadataFor(CoroutineImpl, 'CoroutineImpl', classMeta, VOID, [Continuation]);\nsetMetadataFor(CompletedContinuation, 'CompletedContinuation', objectMeta, VOID, [Continuation]);\nsetMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, CoroutineImpl);\nsetMetadataFor(Exception, 'Exception', classMeta, Error, VOID, Exception_init_$Create$);\nsetMetadataFor(RuntimeException, 'RuntimeException', classMeta, Exception, VOID, RuntimeException_init_$Create$);\nsetMetadataFor(IllegalArgumentException, 'IllegalArgumentException', classMeta, RuntimeException, VOID, IllegalArgumentException_init_$Create$);\nsetMetadataFor(IndexOutOfBoundsException, 'IndexOutOfBoundsException', classMeta, RuntimeException, VOID, IndexOutOfBoundsException_init_$Create$);\nsetMetadataFor(IllegalStateException, 'IllegalStateException', classMeta, RuntimeException, VOID, IllegalStateException_init_$Create$);\nsetMetadataFor(UnsupportedOperationException, 'UnsupportedOperationException', classMeta, RuntimeException, VOID, UnsupportedOperationException_init_$Create$);\nsetMetadataFor(NoSuchElementException, 'NoSuchElementException', classMeta, RuntimeException, VOID, NoSuchElementException_init_$Create$);\nsetMetadataFor(Error_0, 'Error', classMeta, Error, VOID, Error_init_$Create$);\nsetMetadataFor(NumberFormatException, 'NumberFormatException', classMeta, IllegalArgumentException, VOID, NumberFormatException_init_$Create$);\nsetMetadataFor(ArithmeticException, 'ArithmeticException', classMeta, RuntimeException, VOID, ArithmeticException_init_$Create$);\nsetMetadataFor(ConcurrentModificationException, 'ConcurrentModificationException', classMeta, RuntimeException, VOID, ConcurrentModificationException_init_$Create$);\nsetMetadataFor(NullPointerException, 'NullPointerException', classMeta, RuntimeException, VOID, NullPointerException_init_$Create$);\nsetMetadataFor(ClassCastException, 'ClassCastException', classMeta, RuntimeException, VOID, ClassCastException_init_$Create$);\nsetMetadataFor(Companion_5, 'Companion', objectMeta);\nsetMetadataFor(Companion_6, 'Companion', objectMeta);\nsetMetadataFor(Companion_7, 'Companion', objectMeta);\nsetMetadataFor(EmptyIterator, 'EmptyIterator', objectMeta);\nsetMetadataFor(ArrayAsCollection, 'ArrayAsCollection', classMeta, VOID, [Collection]);\nsetMetadataFor(EmptyList, 'EmptyList', objectMeta, VOID, [List]);\nsetMetadataFor(IndexedValue, 'IndexedValue', classMeta);\nsetMetadataFor(IntIterator, 'IntIterator', classMeta);\nsetMetadataFor(CharIterator, 'CharIterator', classMeta);\nsetMetadataFor(SequenceScope, 'SequenceScope', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(SequenceBuilderIterator, 'SequenceBuilderIterator', classMeta, SequenceScope, [SequenceScope, Continuation], SequenceBuilderIterator, VOID, VOID, [1]);\nsetMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta);\nsetMetadataFor(TransformingSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TransformingSequence, 'TransformingSequence', classMeta);\nsetMetadataFor(TakeWhileSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TakeWhileSequence, 'TakeWhileSequence', classMeta);\nsetMetadataFor(DropTakeSequence, 'DropTakeSequence', interfaceMeta);\nsetMetadataFor(DropSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(DropSequence, 'DropSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(DropWhileSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(DropWhileSequence, 'DropWhileSequence', classMeta);\nsetMetadataFor(FilteringSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(FilteringSequence, 'FilteringSequence', classMeta);\nsetMetadataFor(IndexingSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(IndexingSequence, 'IndexingSequence', classMeta);\nsetMetadataFor(TakeSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(TakeSequence, 'TakeSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(EmptySequence, 'EmptySequence', objectMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(SubSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(SubSequence, 'SubSequence', classMeta, VOID, [DropTakeSequence]);\nsetMetadataFor(EmptySet, 'EmptySet', objectMeta, VOID, [Set]);\nsetMetadataFor(NaturalOrderComparator, 'NaturalOrderComparator', objectMeta, VOID, [Comparator]);\nsetMetadataFor(Key, 'Key', objectMeta);\nfunction releaseInterceptedContinuation(continuation) {\n}\nsetMetadataFor(ContinuationInterceptor, 'ContinuationInterceptor', interfaceMeta);\nsetMetadataFor(EmptyCoroutineContext, 'EmptyCoroutineContext', objectMeta);\nsetMetadataFor(CoroutineSingletons, 'CoroutineSingletons', classMeta, Enum);\nsetMetadataFor(Companion_8, 'Companion', objectMeta);\nsetMetadataFor(IntProgression, 'IntProgression', classMeta);\nsetMetadataFor(IntRange, 'IntRange', classMeta, IntProgression);\nsetMetadataFor(Companion_9, 'Companion', objectMeta);\nsetMetadataFor(CharProgression, 'CharProgression', classMeta);\nsetMetadataFor(CharRange, 'CharRange', classMeta, CharProgression);\nsetMetadataFor(IntProgressionIterator, 'IntProgressionIterator', classMeta, IntIterator);\nsetMetadataFor(CharProgressionIterator, 'CharProgressionIterator', classMeta, CharIterator);\nsetMetadataFor(Companion_10, 'Companion', objectMeta);\nsetMetadataFor(Companion_11, 'Companion', objectMeta);\nsetMetadataFor(UnsafeLazyImpl, 'UnsafeLazyImpl', classMeta);\nsetMetadataFor(UNINITIALIZED_VALUE, 'UNINITIALIZED_VALUE', objectMeta);\nsetMetadataFor(Companion_12, 'Companion', objectMeta);\nsetMetadataFor(Failure, 'Failure', classMeta);\nsetMetadataFor(NotImplementedError, 'NotImplementedError', classMeta, Error_0, VOID, NotImplementedError);\nsetMetadataFor(Pair, 'Pair', classMeta);\n//endregion\nfunction CharSequence() {\n}\nfunction Comparable() {\n}\nfunction Number_0() {\n}\nfunction Unit() {\n}\nprotoOf(Unit).toString = function () {\n return 'kotlin.Unit';\n};\nvar Unit_instance;\nfunction Unit_getInstance() {\n return Unit_instance;\n}\nfunction IntCompanionObject() {\n this.MIN_VALUE = -2147483648;\n this.MAX_VALUE = 2147483647;\n this.SIZE_BYTES = 4;\n this.SIZE_BITS = 32;\n}\nprotoOf(IntCompanionObject).e = function () {\n return this.MIN_VALUE;\n};\nprotoOf(IntCompanionObject).f = function () {\n return this.MAX_VALUE;\n};\nprotoOf(IntCompanionObject).g = function () {\n return this.SIZE_BYTES;\n};\nprotoOf(IntCompanionObject).h = function () {\n return this.SIZE_BITS;\n};\nvar IntCompanionObject_instance;\nfunction IntCompanionObject_getInstance() {\n return IntCompanionObject_instance;\n}\nfunction Comparator() {\n}\nfunction isNaN_0(_this__u8e3s4) {\n return !(_this__u8e3s4 === _this__u8e3s4);\n}\nfunction takeHighestOneBit(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4 === 0) {\n tmp = 0;\n } else {\n var tmp_0 = 32 - 1 | 0;\n // Inline function 'kotlin.countLeadingZeroBits' call\n tmp = 1 << (tmp_0 - clz32(_this__u8e3s4) | 0);\n }\n return tmp;\n}\nfunction collectionToArray(collection) {\n return collectionToArrayCommonImpl(collection);\n}\nfunction listOf(element) {\n return arrayListOf([element]);\n}\nfunction copyToArray(collection) {\n var tmp;\n // Inline function 'kotlin.js.asDynamic' call\n if (collection.toArray !== undefined) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collection.toArray();\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = collectionToArray(collection);\n }\n return tmp;\n}\nfunction checkIndexOverflow(index) {\n if (index < 0) {\n throwIndexOverflow();\n }\n return index;\n}\nfunction sort(_this__u8e3s4) {\n collectionsSort(_this__u8e3s4, naturalOrder());\n}\nfunction sortWith(_this__u8e3s4, comparator) {\n collectionsSort(_this__u8e3s4, comparator);\n}\nfunction mapCapacity(expectedSize) {\n return expectedSize;\n}\nfunction setOf(element) {\n return hashSetOf([element]);\n}\nfunction collectionsSort(list, comparator) {\n if (list.i() <= 1)\n return Unit_instance;\n var array = copyToArray(list);\n sortArrayWith(array, comparator);\n var inductionVariable = 0;\n var last = array.length;\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n list.j(i, array[i]);\n }\n while (inductionVariable < last);\n}\nfunction AbstractMutableCollection() {\n AbstractCollection.call(this);\n}\nprotoOf(AbstractMutableCollection).l = function (elements) {\n this.m();\n var modified = false;\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n if (this.k(element))\n modified = true;\n }\n return modified;\n};\nprotoOf(AbstractMutableCollection).toJSON = function () {\n return this.toArray();\n};\nprotoOf(AbstractMutableCollection).m = function () {\n};\nfunction IteratorImpl($outer) {\n this.v_1 = $outer;\n this.t_1 = 0;\n this.u_1 = -1;\n}\nprotoOf(IteratorImpl).o = function () {\n return this.t_1 < this.v_1.i();\n};\nprotoOf(IteratorImpl).p = function () {\n if (!this.o())\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.t_1;\n this.t_1 = tmp1 + 1 | 0;\n tmp.u_1 = tmp1;\n return this.v_1.w(this.u_1);\n};\nprotoOf(IteratorImpl).x = function () {\n // Inline function 'kotlin.check' call\n // Inline function 'kotlin.contracts.contract' call\n if (!!(this.u_1 === -1)) {\n // Inline function 'kotlin.collections.IteratorImpl.remove.' call\n var message = 'Call next() or previous() before removing element from the iterator.';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n }\n this.v_1.z(this.u_1);\n this.t_1 = this.u_1;\n this.u_1 = -1;\n};\nfunction ListIteratorImpl($outer, index) {\n this.d1_1 = $outer;\n IteratorImpl.call(this, $outer);\n Companion_instance_5.f1(index, this.d1_1.i());\n this.t_1 = index;\n}\nfunction AbstractMutableList() {\n AbstractMutableCollection.call(this);\n this.y_1 = 0;\n}\nprotoOf(AbstractMutableList).k = function (element) {\n this.m();\n this.g1(this.i(), element);\n return true;\n};\nprotoOf(AbstractMutableList).h1 = function () {\n this.m();\n this.i1(0, this.i());\n};\nprotoOf(AbstractMutableList).n = function () {\n return new IteratorImpl(this);\n};\nprotoOf(AbstractMutableList).q = function (element) {\n return this.j1(element) >= 0;\n};\nprotoOf(AbstractMutableList).j1 = function (element) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var index = 0;\n var tmp0_iterator = this.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMutableList.indexOf.' call\n if (equals(item, element)) {\n tmp$ret$1 = index;\n break $l$block;\n }\n index = index + 1 | 0;\n }\n tmp$ret$1 = -1;\n }\n return tmp$ret$1;\n};\nprotoOf(AbstractMutableList).k1 = function (index) {\n return new ListIteratorImpl(this, index);\n};\nprotoOf(AbstractMutableList).i1 = function (fromIndex, toIndex) {\n var iterator = this.k1(fromIndex);\n // Inline function 'kotlin.repeat' call\n var times = toIndex - fromIndex | 0;\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < times)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.collections.AbstractMutableList.removeRange.' call\n iterator.p();\n iterator.x();\n }\n while (inductionVariable < times);\n};\nprotoOf(AbstractMutableList).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, List) : false))\n return false;\n return Companion_instance_5.l1(this, other);\n};\nprotoOf(AbstractMutableList).hashCode = function () {\n return Companion_instance_5.m1(this);\n};\nfunction AbstractMutableMap() {\n AbstractMap.call(this);\n this.p1_1 = null;\n this.q1_1 = null;\n}\nfunction AbstractMutableSet() {\n AbstractMutableCollection.call(this);\n}\nprotoOf(AbstractMutableSet).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Set) : false))\n return false;\n return Companion_instance_7.y1(this, other);\n};\nprotoOf(AbstractMutableSet).hashCode = function () {\n return Companion_instance_7.z1(this);\n};\nfunction arrayOfUninitializedElements(capacity) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(capacity >= 0)) {\n // Inline function 'kotlin.collections.arrayOfUninitializedElements.' call\n var message = 'capacity must be non-negative.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n // Inline function 'kotlin.js.asDynamic' call\n return fillArrayVal(Array(capacity), null);\n}\nfunction resetRange(_this__u8e3s4, fromIndex, toIndex) {\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(null, fromIndex, toIndex);\n}\nfunction copyOfUninitializedElements(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return copyOf_0(_this__u8e3s4, newSize);\n}\nfunction Companion() {\n Companion_instance = this;\n var tmp = this;\n // Inline function 'kotlin.also' call\n var this_0 = ArrayList_init_$Create$_0(0);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.Companion.Empty.' call\n this_0.c2_1 = true;\n tmp.d2_1 = this_0;\n}\nvar Companion_instance;\nfunction Companion_getInstance() {\n if (Companion_instance == null)\n new Companion();\n return Companion_instance;\n}\nfunction ArrayList_init_$Init$($this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n return $this;\n}\nfunction ArrayList_init_$Create$() {\n return ArrayList_init_$Init$(objectCreate(protoOf(ArrayList)));\n}\nfunction ArrayList_init_$Init$_0(initialCapacity, $this) {\n // Inline function 'kotlin.emptyArray' call\n var tmp$ret$0 = [];\n ArrayList.call($this, tmp$ret$0);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(initialCapacity >= 0)) {\n // Inline function 'kotlin.collections.ArrayList..' call\n var message = 'Negative initial capacity: ' + initialCapacity;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return $this;\n}\nfunction ArrayList_init_$Create$_0(initialCapacity) {\n return ArrayList_init_$Init$_0(initialCapacity, objectCreate(protoOf(ArrayList)));\n}\nfunction ArrayList_init_$Init$_1(elements, $this) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp$ret$0 = copyToArray(elements);\n ArrayList.call($this, tmp$ret$0);\n return $this;\n}\nfunction ArrayList_init_$Create$_1(elements) {\n return ArrayList_init_$Init$_1(elements, objectCreate(protoOf(ArrayList)));\n}\nfunction increaseLength($this, amount) {\n var previous = $this.i();\n // Inline function 'kotlin.js.asDynamic' call\n $this.b2_1.length = $this.i() + amount | 0;\n return previous;\n}\nfunction rangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.rangeCheck.' call\n Companion_instance_5.e2(index, $this.i());\n return index;\n}\nfunction insertionRangeCheck($this, index) {\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.insertionRangeCheck.' call\n Companion_instance_5.f1(index, $this.i());\n return index;\n}\nfunction ArrayList(array) {\n Companion_getInstance();\n AbstractMutableList.call(this);\n this.b2_1 = array;\n this.c2_1 = false;\n}\nprotoOf(ArrayList).i = function () {\n return this.b2_1.length;\n};\nprotoOf(ArrayList).w = function (index) {\n var tmp = this.b2_1[rangeCheck(this, index)];\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(ArrayList).j = function (index, element) {\n this.m();\n rangeCheck(this, index);\n // Inline function 'kotlin.apply' call\n var this_0 = this.b2_1[index];\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.ArrayList.set.' call\n this.b2_1[index] = element;\n var tmp = this_0;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(ArrayList).k = function (element) {\n this.m();\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.push(element);\n this.y_1 = this.y_1 + 1 | 0;\n return true;\n};\nprotoOf(ArrayList).g1 = function (index, element) {\n this.m();\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.splice(insertionRangeCheck(this, index), 0, element);\n this.y_1 = this.y_1 + 1 | 0;\n};\nprotoOf(ArrayList).l = function (elements) {\n this.m();\n if (elements.s())\n return false;\n var offset = increaseLength(this, elements.i());\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'kotlin.collections.ArrayList.addAll.' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var index_0 = checkIndexOverflow(tmp1);\n this.b2_1[offset + index_0 | 0] = item;\n }\n this.y_1 = this.y_1 + 1 | 0;\n return true;\n};\nprotoOf(ArrayList).z = function (index) {\n this.m();\n rangeCheck(this, index);\n this.y_1 = this.y_1 + 1 | 0;\n var tmp;\n if (index === get_lastIndex_0(this)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.b2_1.pop();\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = this.b2_1.splice(index, 1)[0];\n }\n return tmp;\n};\nprotoOf(ArrayList).i1 = function (fromIndex, toIndex) {\n this.m();\n this.y_1 = this.y_1 + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n this.b2_1.splice(fromIndex, toIndex - fromIndex | 0);\n};\nprotoOf(ArrayList).h1 = function () {\n this.m();\n var tmp = this;\n // Inline function 'kotlin.emptyArray' call\n tmp.b2_1 = [];\n this.y_1 = this.y_1 + 1 | 0;\n};\nprotoOf(ArrayList).j1 = function (element) {\n return indexOf(this.b2_1, element);\n};\nprotoOf(ArrayList).toString = function () {\n return arrayToString(this.b2_1);\n};\nprotoOf(ArrayList).f2 = function () {\n return [].slice.call(this.b2_1);\n};\nprotoOf(ArrayList).toArray = function () {\n return this.f2();\n};\nprotoOf(ArrayList).m = function () {\n if (this.c2_1)\n throw UnsupportedOperationException_init_$Create$();\n};\nvar _stableSortingIsSupported;\nfunction sortArrayWith(array, comparator) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArrayWith$lambda(comparator);\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), comparator);\n }\n}\nfunction sortArray(array) {\n if (getStableSortingIsSupported()) {\n var comparison = sortArray$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n mergeSort(array, 0, get_lastIndex(array), naturalOrder());\n }\n}\nfunction getStableSortingIsSupported() {\n var tmp0_safe_receiver = _stableSortingIsSupported;\n if (tmp0_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp0_safe_receiver;\n }\n _stableSortingIsSupported = false;\n // Inline function 'kotlin.js.unsafeCast' call\n var array = [];\n var inductionVariable = 0;\n if (inductionVariable < 600)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n array.push(index);\n }\n while (inductionVariable < 600);\n var comparison = getStableSortingIsSupported$lambda;\n // Inline function 'kotlin.js.asDynamic' call\n array.sort(comparison);\n var inductionVariable_0 = 1;\n var last = array.length;\n if (inductionVariable_0 < last)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n var a = array[index_0 - 1 | 0];\n var b = array[index_0];\n if ((a & 3) === (b & 3) ? a >= b : false)\n return false;\n }\n while (inductionVariable_0 < last);\n _stableSortingIsSupported = true;\n return true;\n}\nfunction mergeSort(array, start, endInclusive, comparator) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.arrayOfNulls' call\n var size = array.length;\n // Inline function 'kotlin.js.asDynamic' call\n var buffer = fillArrayVal(Array(size), null);\n var result = mergeSort_0(array, buffer, start, endInclusive, comparator);\n if (!(result === array)) {\n var inductionVariable = start;\n if (inductionVariable <= endInclusive)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = result[i];\n }\n while (!(i === endInclusive));\n }\n}\nfunction mergeSort_0(array, buffer, start, end, comparator) {\n if (start === end) {\n return array;\n }\n var median = (start + end | 0) / 2 | 0;\n var left = mergeSort_0(array, buffer, start, median, comparator);\n var right = mergeSort_0(array, buffer, median + 1 | 0, end, comparator);\n var target = left === buffer ? array : buffer;\n var leftIndex = start;\n var rightIndex = median + 1 | 0;\n var inductionVariable = start;\n if (inductionVariable <= end)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (leftIndex <= median ? rightIndex <= end : false) {\n var leftValue = left[leftIndex];\n var rightValue = right[rightIndex];\n if (comparator.compare(leftValue, rightValue) <= 0) {\n target[i] = leftValue;\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = rightValue;\n rightIndex = rightIndex + 1 | 0;\n }\n } else if (leftIndex <= median) {\n target[i] = left[leftIndex];\n leftIndex = leftIndex + 1 | 0;\n } else {\n target[i] = right[rightIndex];\n rightIndex = rightIndex + 1 | 0;\n }\n }\n while (!(i === end));\n return target;\n}\nfunction sortArrayWith$lambda($comparator) {\n return function (a, b) {\n return $comparator.compare(a, b);\n };\n}\nfunction sortArray$lambda(a, b) {\n return compareTo_0(a, b);\n}\nfunction getStableSortingIsSupported$lambda(a, b) {\n return (a & 3) - (b & 3) | 0;\n}\nfunction HashMap_init_$Init$(internalMap, $this) {\n AbstractMutableMap.call($this);\n HashMap.call($this);\n $this.k2_1 = internalMap;\n return $this;\n}\nfunction HashMap_init_$Init$_0($this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n}\nfunction HashMap_init_$Create$() {\n return HashMap_init_$Init$_0(objectCreate(protoOf(HashMap)));\n}\nfunction HashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashMap_init_$Init$(InternalHashMap_init_$Create$_1(initialCapacity, loadFactor), $this);\n return $this;\n}\nfunction HashMap_init_$Init$_2(initialCapacity, $this) {\n HashMap_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n}\nprotoOf(HashMap).u1 = function (key) {\n return this.k2_1.m2(key);\n};\nprotoOf(HashMap).x1 = function () {\n var tmp0_elvis_lhs = this.l2_1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.also' call\n var this_0 = new HashMapEntrySet(this.k2_1);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.HashMap..' call\n this.l2_1 = this_0;\n tmp = this_0;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n};\nprotoOf(HashMap).w1 = function (key) {\n return this.k2_1.w1(key);\n};\nprotoOf(HashMap).r1 = function (key, value) {\n return this.k2_1.r1(key, value);\n};\nprotoOf(HashMap).i = function () {\n return this.k2_1.i();\n};\nfunction HashMap() {\n this.l2_1 = null;\n}\nfunction HashMapEntrySet(backing) {\n HashMapEntrySetBase.call(this, backing);\n}\nprotoOf(HashMapEntrySet).n = function () {\n return this.o2_1.p2();\n};\nfunction HashMapEntrySetBase(backing) {\n AbstractMutableSet.call(this);\n this.o2_1 = backing;\n}\nprotoOf(HashMapEntrySetBase).i = function () {\n return this.o2_1.i();\n};\nprotoOf(HashMapEntrySetBase).s = function () {\n return this.o2_1.i() === 0;\n};\nprotoOf(HashMapEntrySetBase).q2 = function (element) {\n return this.o2_1.s2(element);\n};\nprotoOf(HashMapEntrySetBase).q = function (element) {\n if (!(!(element == null) ? isInterface(element, Entry) : false))\n return false;\n return this.q2((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n};\nprotoOf(HashMapEntrySetBase).r2 = function (element) {\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(HashMapEntrySetBase).k = function (element) {\n return this.r2((!(element == null) ? isInterface(element, Entry) : false) ? element : THROW_CCE());\n};\nprotoOf(HashMapEntrySetBase).l = function (elements) {\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(HashMapEntrySetBase).r = function (elements) {\n return this.o2_1.t2(elements);\n};\nprotoOf(HashMapEntrySetBase).m = function () {\n return this.o2_1.m();\n};\nfunction HashSet_init_$Init$(map, $this) {\n AbstractMutableSet.call($this);\n HashSet.call($this);\n $this.u2_1 = map;\n return $this;\n}\nfunction HashSet_init_$Init$_0($this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$(), $this);\n return $this;\n}\nfunction HashSet_init_$Create$() {\n return HashSet_init_$Init$_0(objectCreate(protoOf(HashSet)));\n}\nfunction HashSet_init_$Init$_1(elements, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_0(elements.i()), $this);\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n $this.u2_1.r1(element, true);\n }\n return $this;\n}\nfunction HashSet_init_$Init$_2(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$(InternalHashMap_init_$Create$_1(initialCapacity, loadFactor), $this);\n return $this;\n}\nfunction HashSet_init_$Init$_3(initialCapacity, $this) {\n HashSet_init_$Init$_2(initialCapacity, 1.0, $this);\n return $this;\n}\nfunction HashSet_init_$Create$_0(initialCapacity) {\n return HashSet_init_$Init$_3(initialCapacity, objectCreate(protoOf(HashSet)));\n}\nprotoOf(HashSet).k = function (element) {\n return this.u2_1.r1(element, true) == null;\n};\nprotoOf(HashSet).q = function (element) {\n return this.u2_1.m2(element);\n};\nprotoOf(HashSet).s = function () {\n return this.u2_1.i() === 0;\n};\nprotoOf(HashSet).n = function () {\n return this.u2_1.v2();\n};\nprotoOf(HashSet).i = function () {\n return this.u2_1.i();\n};\nfunction HashSet() {\n}\nfunction computeHashSize($this, capacity) {\n return takeHighestOneBit(imul_0(coerceAtLeast(capacity, 1), 3));\n}\nfunction computeShift($this, hashSize) {\n // Inline function 'kotlin.countLeadingZeroBits' call\n return clz32(hashSize) + 1 | 0;\n}\nfunction InternalHashMap_init_$Init$($this) {\n InternalHashMap_init_$Init$_0(8, $this);\n return $this;\n}\nfunction InternalHashMap_init_$Create$() {\n return InternalHashMap_init_$Init$(objectCreate(protoOf(InternalHashMap)));\n}\nfunction InternalHashMap_init_$Init$_0(initialCapacity, $this) {\n InternalHashMap.call($this, arrayOfUninitializedElements(initialCapacity), null, new Int32Array(initialCapacity), new Int32Array(computeHashSize(Companion_instance_0, initialCapacity)), 2, 0);\n return $this;\n}\nfunction InternalHashMap_init_$Create$_0(initialCapacity) {\n return InternalHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(InternalHashMap)));\n}\nfunction InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, $this) {\n InternalHashMap_init_$Init$_0(initialCapacity, $this);\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(loadFactor > 0.0)) {\n // Inline function 'kotlin.collections.InternalHashMap..' call\n var message = 'Non-positive load factor: ' + loadFactor;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return $this;\n}\nfunction InternalHashMap_init_$Create$_1(initialCapacity, loadFactor) {\n return InternalHashMap_init_$Init$_1(initialCapacity, loadFactor, objectCreate(protoOf(InternalHashMap)));\n}\nfunction _get_capacity__a9k9f3($this) {\n return $this.w2_1.length;\n}\nfunction _get_hashSize__tftcho($this) {\n return $this.z2_1.length;\n}\nfunction registerModification($this) {\n $this.d3_1 = $this.d3_1 + 1 | 0;\n}\nfunction ensureExtraCapacity($this, n) {\n if (shouldCompact($this, n)) {\n rehash($this, _get_hashSize__tftcho($this));\n } else {\n ensureCapacity($this, $this.b3_1 + n | 0);\n }\n}\nfunction shouldCompact($this, extraCapacity) {\n var spareCapacity = _get_capacity__a9k9f3($this) - $this.b3_1 | 0;\n var gaps = $this.b3_1 - $this.i() | 0;\n return (spareCapacity < extraCapacity ? (gaps + spareCapacity | 0) >= extraCapacity : false) ? gaps >= (_get_capacity__a9k9f3($this) / 4 | 0) : false;\n}\nfunction ensureCapacity($this, minCapacity) {\n if (minCapacity < 0)\n throw RuntimeException_init_$Create$_0('too many elements');\n if (minCapacity > _get_capacity__a9k9f3($this)) {\n var newSize = Companion_instance_5.g3(_get_capacity__a9k9f3($this), minCapacity);\n $this.w2_1 = copyOfUninitializedElements($this.w2_1, newSize);\n var tmp = $this;\n var tmp0_safe_receiver = $this.x2_1;\n tmp.x2_1 = tmp0_safe_receiver == null ? null : copyOfUninitializedElements(tmp0_safe_receiver, newSize);\n $this.y2_1 = copyOf($this.y2_1, newSize);\n var newHashSize = computeHashSize(Companion_instance_0, newSize);\n if (newHashSize > _get_hashSize__tftcho($this)) {\n rehash($this, newHashSize);\n }\n }\n}\nfunction allocateValuesArray($this) {\n var curValuesArray = $this.x2_1;\n if (!(curValuesArray == null))\n return curValuesArray;\n var newValuesArray = arrayOfUninitializedElements(_get_capacity__a9k9f3($this));\n $this.x2_1 = newValuesArray;\n return newValuesArray;\n}\nfunction hash($this, key) {\n return key == null ? 0 : imul_0(hashCode(key), -1640531527) >>> $this.c3_1 | 0;\n}\nfunction compact($this) {\n var i = 0;\n var j = 0;\n var valuesArray = $this.x2_1;\n while (i < $this.b3_1) {\n if ($this.y2_1[i] >= 0) {\n $this.w2_1[j] = $this.w2_1[i];\n if (!(valuesArray == null)) {\n valuesArray[j] = valuesArray[i];\n }\n j = j + 1 | 0;\n }\n i = i + 1 | 0;\n }\n resetRange($this.w2_1, j, $this.b3_1);\n if (valuesArray == null)\n null;\n else {\n resetRange(valuesArray, j, $this.b3_1);\n }\n $this.b3_1 = j;\n}\nfunction rehash($this, newHashSize) {\n registerModification($this);\n if ($this.b3_1 > $this.e3_1) {\n compact($this);\n }\n if (!(newHashSize === _get_hashSize__tftcho($this))) {\n $this.z2_1 = new Int32Array(newHashSize);\n $this.c3_1 = computeShift(Companion_instance_0, newHashSize);\n } else {\n fill($this.z2_1, 0, 0, _get_hashSize__tftcho($this));\n }\n var i = 0;\n while (i < $this.b3_1) {\n var tmp0 = i;\n i = tmp0 + 1 | 0;\n if (!putRehash($this, tmp0)) {\n throw IllegalStateException_init_$Create$_0('This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?');\n }\n }\n}\nfunction putRehash($this, i) {\n var hash_0 = hash($this, $this.w2_1[i]);\n var probesLeft = $this.a3_1;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index === 0) {\n $this.z2_1[hash_0] = i + 1 | 0;\n $this.y2_1[i] = hash_0;\n return true;\n }\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return false;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n}\nfunction findKey($this, key) {\n var hash_0 = hash($this, key);\n var probesLeft = $this.a3_1;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index === 0)\n return -1;\n if (index > 0 ? equals($this.w2_1[index - 1 | 0], key) : false)\n return index - 1 | 0;\n probesLeft = probesLeft - 1 | 0;\n if (probesLeft < 0)\n return -1;\n var tmp0 = hash_0;\n hash_0 = tmp0 - 1 | 0;\n if (tmp0 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n}\nfunction addKey($this, key) {\n $this.m();\n retry: while (true) {\n var hash_0 = hash($this, key);\n var tentativeMaxProbeDistance = coerceAtMost(imul_0($this.a3_1, 2), _get_hashSize__tftcho($this) / 2 | 0);\n var probeDistance = 0;\n while (true) {\n var index = $this.z2_1[hash_0];\n if (index <= 0) {\n if ($this.b3_1 >= _get_capacity__a9k9f3($this)) {\n ensureExtraCapacity($this, 1);\n continue retry;\n }\n var tmp1 = $this.b3_1;\n $this.b3_1 = tmp1 + 1 | 0;\n var putIndex = tmp1;\n $this.w2_1[putIndex] = key;\n $this.y2_1[putIndex] = hash_0;\n $this.z2_1[hash_0] = putIndex + 1 | 0;\n $this.e3_1 = $this.e3_1 + 1 | 0;\n registerModification($this);\n if (probeDistance > $this.a3_1)\n $this.a3_1 = probeDistance;\n return putIndex;\n }\n if (equals($this.w2_1[index - 1 | 0], key)) {\n return -index | 0;\n }\n probeDistance = probeDistance + 1 | 0;\n if (probeDistance > tentativeMaxProbeDistance) {\n rehash($this, imul_0(_get_hashSize__tftcho($this), 2));\n continue retry;\n }\n var tmp4 = hash_0;\n hash_0 = tmp4 - 1 | 0;\n if (tmp4 === 0)\n hash_0 = _get_hashSize__tftcho($this) - 1 | 0;\n }\n }\n}\nfunction contentEquals($this, other) {\n return $this.e3_1 === other.i() ? $this.t2(other.x1()) : false;\n}\nfunction Companion_0() {\n this.h3_1 = -1640531527;\n this.i3_1 = 8;\n this.j3_1 = 2;\n this.k3_1 = -1;\n}\nvar Companion_instance_0;\nfunction Companion_getInstance_0() {\n return Companion_instance_0;\n}\nfunction Itr(map) {\n this.l3_1 = map;\n this.m3_1 = 0;\n this.n3_1 = -1;\n this.o3_1 = this.l3_1.d3_1;\n this.p3();\n}\nprotoOf(Itr).p3 = function () {\n while (this.m3_1 < this.l3_1.b3_1 ? this.l3_1.y2_1[this.m3_1] < 0 : false) {\n this.m3_1 = this.m3_1 + 1 | 0;\n }\n};\nprotoOf(Itr).o = function () {\n return this.m3_1 < this.l3_1.b3_1;\n};\nprotoOf(Itr).q3 = function () {\n if (!(this.l3_1.d3_1 === this.o3_1))\n throw ConcurrentModificationException_init_$Create$();\n};\nfunction KeysItr(map) {\n Itr.call(this, map);\n}\nprotoOf(KeysItr).p = function () {\n this.q3();\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var result = this.l3_1.w2_1[this.n3_1];\n this.p3();\n return result;\n};\nfunction EntriesItr(map) {\n Itr.call(this, map);\n}\nprotoOf(EntriesItr).p = function () {\n this.q3();\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var result = new EntryRef(this.l3_1, this.n3_1);\n this.p3();\n return result;\n};\nprotoOf(EntriesItr).z3 = function () {\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.l3_1.w2_1[this.n3_1];\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp_0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = ensureNotNull(this.l3_1.x2_1)[this.n3_1];\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n var result = tmp_0 ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n this.p3();\n return result;\n};\nprotoOf(EntriesItr).a4 = function (sb) {\n if (this.m3_1 >= this.l3_1.b3_1)\n throw NoSuchElementException_init_$Create$();\n var tmp = this;\n var tmp1 = this.m3_1;\n this.m3_1 = tmp1 + 1 | 0;\n tmp.n3_1 = tmp1;\n var key = this.l3_1.w2_1[this.n3_1];\n if (equals(key, this.l3_1)) {\n sb.d4('(this Map)');\n } else {\n sb.c4(key);\n }\n sb.e4(_Char___init__impl__6a9atx(61));\n var value = ensureNotNull(this.l3_1.x2_1)[this.n3_1];\n if (equals(value, this.l3_1)) {\n sb.d4('(this Map)');\n } else {\n sb.c4(value);\n }\n this.p3();\n};\nfunction EntryRef(map, index) {\n this.f4_1 = map;\n this.g4_1 = index;\n}\nprotoOf(EntryRef).h4 = function () {\n return this.f4_1.w2_1[this.g4_1];\n};\nprotoOf(EntryRef).i4 = function () {\n return ensureNotNull(this.f4_1.x2_1)[this.g4_1];\n};\nprotoOf(EntryRef).equals = function (other) {\n var tmp;\n var tmp_0;\n if (!(other == null) ? isInterface(other, Entry) : false) {\n tmp_0 = equals(other.h4(), this.h4());\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = equals(other.i4(), this.i4());\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EntryRef).hashCode = function () {\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver = this.h4();\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);\n var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;\n // Inline function 'kotlin.hashCode' call\n var tmp0_safe_receiver_0 = this.i4();\n var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);\n return tmp ^ (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0);\n};\nprotoOf(EntryRef).toString = function () {\n return '' + this.h4() + '=' + this.i4();\n};\nfunction InternalHashMap(keysArray, valuesArray, presenceArray, hashArray, maxProbeDistance, length) {\n this.w2_1 = keysArray;\n this.x2_1 = valuesArray;\n this.y2_1 = presenceArray;\n this.z2_1 = hashArray;\n this.a3_1 = maxProbeDistance;\n this.b3_1 = length;\n this.c3_1 = computeShift(Companion_instance_0, _get_hashSize__tftcho(this));\n this.d3_1 = 0;\n this.e3_1 = 0;\n this.f3_1 = false;\n}\nprotoOf(InternalHashMap).i = function () {\n return this.e3_1;\n};\nprotoOf(InternalHashMap).w1 = function (key) {\n var index = findKey(this, key);\n if (index < 0)\n return null;\n return ensureNotNull(this.x2_1)[index];\n};\nprotoOf(InternalHashMap).m2 = function (key) {\n return findKey(this, key) >= 0;\n};\nprotoOf(InternalHashMap).r1 = function (key, value) {\n var index = addKey(this, key);\n var valuesArray = allocateValuesArray(this);\n if (index < 0) {\n var oldValue = valuesArray[(-index | 0) - 1 | 0];\n valuesArray[(-index | 0) - 1 | 0] = value;\n return oldValue;\n } else {\n valuesArray[index] = value;\n return null;\n }\n};\nprotoOf(InternalHashMap).equals = function (other) {\n var tmp;\n if (other === this) {\n tmp = true;\n } else {\n var tmp_0;\n if (!(other == null) ? isInterface(other, Map_0) : false) {\n tmp_0 = contentEquals(this, other);\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n return tmp;\n};\nprotoOf(InternalHashMap).hashCode = function () {\n var result = 0;\n var it = this.p2();\n while (it.o()) {\n result = result + it.z3() | 0;\n }\n return result;\n};\nprotoOf(InternalHashMap).toString = function () {\n var sb = StringBuilder_init_$Create$(2 + imul_0(this.e3_1, 3) | 0);\n sb.d4('{');\n var i = 0;\n var it = this.p2();\n while (it.o()) {\n if (i > 0) {\n sb.d4(', ');\n }\n it.a4(sb);\n i = i + 1 | 0;\n }\n sb.d4('}');\n return sb.toString();\n};\nprotoOf(InternalHashMap).m = function () {\n if (this.f3_1)\n throw UnsupportedOperationException_init_$Create$();\n};\nprotoOf(InternalHashMap).s2 = function (entry) {\n var index = findKey(this, entry.h4());\n if (index < 0)\n return false;\n return equals(ensureNotNull(this.x2_1)[index], entry.i4());\n};\nprotoOf(InternalHashMap).j4 = function (entry) {\n return this.s2(isInterface(entry, Entry) ? entry : THROW_CCE());\n};\nprotoOf(InternalHashMap).v2 = function () {\n return new KeysItr(this);\n};\nprotoOf(InternalHashMap).p2 = function () {\n return new EntriesItr(this);\n};\nfunction InternalMap() {\n}\nfunction LinkedHashMap_init_$Init$($this) {\n HashMap_init_$Init$_0($this);\n LinkedHashMap.call($this);\n return $this;\n}\nfunction LinkedHashMap_init_$Create$() {\n return LinkedHashMap_init_$Init$(objectCreate(protoOf(LinkedHashMap)));\n}\nfunction LinkedHashMap_init_$Init$_0(initialCapacity, $this) {\n HashMap_init_$Init$_2(initialCapacity, $this);\n LinkedHashMap.call($this);\n return $this;\n}\nfunction LinkedHashMap_init_$Create$_0(initialCapacity) {\n return LinkedHashMap_init_$Init$_0(initialCapacity, objectCreate(protoOf(LinkedHashMap)));\n}\nfunction LinkedHashMap() {\n}\nfunction LinkedHashSet_init_$Init$($this) {\n HashSet_init_$Init$_0($this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$() {\n return LinkedHashSet_init_$Init$(objectCreate(protoOf(LinkedHashSet)));\n}\nfunction LinkedHashSet_init_$Init$_0(elements, $this) {\n HashSet_init_$Init$_1(elements, $this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$_0(elements) {\n return LinkedHashSet_init_$Init$_0(elements, objectCreate(protoOf(LinkedHashSet)));\n}\nfunction LinkedHashSet_init_$Init$_1(initialCapacity, loadFactor, $this) {\n HashSet_init_$Init$_2(initialCapacity, loadFactor, $this);\n LinkedHashSet.call($this);\n return $this;\n}\nfunction LinkedHashSet_init_$Init$_2(initialCapacity, $this) {\n LinkedHashSet_init_$Init$_1(initialCapacity, 1.0, $this);\n return $this;\n}\nfunction LinkedHashSet_init_$Create$_1(initialCapacity) {\n return LinkedHashSet_init_$Init$_2(initialCapacity, objectCreate(protoOf(LinkedHashSet)));\n}\nprotoOf(LinkedHashSet).m = function () {\n return this.u2_1.m();\n};\nfunction LinkedHashSet() {\n}\nfunction KProperty1() {\n}\nfunction reset(_this__u8e3s4) {\n _this__u8e3s4.lastIndex = 0;\n}\nfunction StringBuilder_init_$Init$(capacity, $this) {\n StringBuilder_init_$Init$_0($this);\n return $this;\n}\nfunction StringBuilder_init_$Create$(capacity) {\n return StringBuilder_init_$Init$(capacity, objectCreate(protoOf(StringBuilder)));\n}\nfunction StringBuilder_init_$Init$_0($this) {\n StringBuilder.call($this, '');\n return $this;\n}\nfunction StringBuilder_init_$Create$_0() {\n return StringBuilder_init_$Init$_0(objectCreate(protoOf(StringBuilder)));\n}\nfunction StringBuilder(content) {\n this.b4_1 = !(content === undefined) ? content : '';\n}\nprotoOf(StringBuilder).a = function () {\n // Inline function 'kotlin.js.asDynamic' call\n return this.b4_1.length;\n};\nprotoOf(StringBuilder).b = function (index) {\n // Inline function 'kotlin.text.getOrElse' call\n var this_0 = this.b4_1;\n var tmp;\n if (index >= 0 ? index <= get_lastIndex_1(this_0) : false) {\n tmp = charSequenceGet(this_0, index);\n } else {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', length: ' + this.a() + '}');\n }\n return tmp;\n};\nprotoOf(StringBuilder).c = function (startIndex, endIndex) {\n // Inline function 'kotlin.text.substring' call\n // Inline function 'kotlin.js.asDynamic' call\n return this.b4_1.substring(startIndex, endIndex);\n};\nprotoOf(StringBuilder).e4 = function (value) {\n this.b4_1 = this.b4_1 + toString_0(value);\n return this;\n};\nprotoOf(StringBuilder).l4 = function (value) {\n this.b4_1 = this.b4_1 + toString_1(value);\n return this;\n};\nprotoOf(StringBuilder).c4 = function (value) {\n this.b4_1 = this.b4_1 + toString_1(value);\n return this;\n};\nprotoOf(StringBuilder).d4 = function (value) {\n var tmp = this;\n var tmp_0 = this.b4_1;\n tmp.b4_1 = tmp_0 + (value == null ? 'null' : value);\n return this;\n};\nprotoOf(StringBuilder).toString = function () {\n return this.b4_1;\n};\nfunction uppercaseChar(_this__u8e3s4) {\n // Inline function 'kotlin.text.uppercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var uppercase = toString_0(_this__u8e3s4).toUpperCase();\n return uppercase.length > 1 ? _this__u8e3s4 : charSequenceGet(uppercase, 0);\n}\nfunction isWhitespace(_this__u8e3s4) {\n return isWhitespaceImpl(_this__u8e3s4);\n}\nfunction toString(_this__u8e3s4, radix) {\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.toString(checkRadix(radix));\n}\nfunction checkRadix(radix) {\n if (!(2 <= radix ? radix <= 36 : false)) {\n throw IllegalArgumentException_init_$Create$_0('radix ' + radix + ' was not in valid range 2..36');\n }\n return radix;\n}\nfunction toInt(_this__u8e3s4) {\n var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nfunction toInt_0(_this__u8e3s4, radix) {\n var tmp0_elvis_lhs = toIntOrNull_0(_this__u8e3s4, radix);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n numberFormatError(_this__u8e3s4);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nfunction digitOf(char, radix) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.text.digitOf.' call\n var it = (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(48)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(57)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(48)) : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(90)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(97)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(122)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(97)) + 10 | 0 : Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(128)) < 0 ? -1 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65313)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65338)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65313)) + 10 | 0 : (Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65345)) >= 0 ? Char__compareTo_impl_ypi4mb(char, _Char___init__impl__6a9atx(65370)) <= 0 : false) ? Char__minus_impl_a2frrh(char, _Char___init__impl__6a9atx(65345)) + 10 | 0 : digitToIntImpl(char);\n return it >= radix ? -1 : it;\n}\nfunction Regex_init_$Init$(pattern, $this) {\n Regex.call($this, pattern, emptySet());\n return $this;\n}\nfunction Regex_init_$Create$(pattern) {\n return Regex_init_$Init$(pattern, objectCreate(protoOf(Regex)));\n}\nfunction Companion_1() {\n Companion_instance_1 = this;\n this.m4_1 = new RegExp('[\\\\\\\\^$*+?.()|[\\\\]{}]', 'g');\n this.n4_1 = new RegExp('[\\\\\\\\$]', 'g');\n this.o4_1 = new RegExp('\\\\$', 'g');\n}\nvar Companion_instance_1;\nfunction Companion_getInstance_1() {\n if (Companion_instance_1 == null)\n new Companion_1();\n return Companion_instance_1;\n}\nfunction Regex(pattern, options) {\n Companion_getInstance_1();\n this.p4_1 = pattern;\n this.q4_1 = toSet(options);\n this.r4_1 = new RegExp(pattern, toFlags(options, 'gu'));\n this.s4_1 = null;\n this.t4_1 = null;\n}\nprotoOf(Regex).u4 = function (input) {\n reset(this.r4_1);\n var match = this.r4_1.exec(toString_2(input));\n return (!(match == null) ? match.index === 0 : false) ? this.r4_1.lastIndex === charSequenceLength(input) : false;\n};\nprotoOf(Regex).toString = function () {\n return this.r4_1.toString();\n};\nfunction toFlags(_this__u8e3s4, prepend) {\n return joinToString_0(_this__u8e3s4, '', prepend, VOID, VOID, VOID, toFlags$lambda);\n}\nfunction toFlags$lambda(it) {\n return it.x4_1;\n}\nvar STRING_CASE_INSENSITIVE_ORDER;\nfunction compareTo(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n _init_properties_stringJs_kt__bg7zye();\n if (ignoreCase) {\n var n1 = _this__u8e3s4.length;\n var n2 = other.length;\n // Inline function 'kotlin.comparisons.minOf' call\n var min = Math.min(n1, n2);\n if (min === 0)\n return n1 - n2 | 0;\n var inductionVariable = 0;\n if (inductionVariable < min)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var thisChar = charSequenceGet(_this__u8e3s4, index);\n var otherChar = charSequenceGet(other, index);\n if (!(thisChar === otherChar)) {\n thisChar = uppercaseChar(thisChar);\n otherChar = uppercaseChar(otherChar);\n if (!(thisChar === otherChar)) {\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n var this_0 = thisChar;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$3 = toString_0(this_0).toLowerCase();\n thisChar = charSequenceGet(tmp$ret$3, 0);\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n var this_1 = otherChar;\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$7 = toString_0(this_1).toLowerCase();\n otherChar = charSequenceGet(tmp$ret$7, 0);\n if (!(thisChar === otherChar)) {\n return Char__compareTo_impl_ypi4mb(thisChar, otherChar);\n }\n }\n }\n }\n while (inductionVariable < min);\n return n1 - n2 | 0;\n } else {\n return compareTo_0(_this__u8e3s4, other);\n }\n}\nfunction contentEquals_0(_this__u8e3s4, other) {\n _init_properties_stringJs_kt__bg7zye();\n return contentEqualsImpl(_this__u8e3s4, other);\n}\nfunction sam$kotlin_Comparator$0(function_0) {\n this.y4_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0).z4 = function (a, b) {\n return this.y4_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction STRING_CASE_INSENSITIVE_ORDER$lambda(a, b) {\n _init_properties_stringJs_kt__bg7zye();\n return compareTo(a, b, true);\n}\nvar properties_initialized_stringJs_kt_nta8o4;\nfunction _init_properties_stringJs_kt__bg7zye() {\n if (!properties_initialized_stringJs_kt_nta8o4) {\n properties_initialized_stringJs_kt_nta8o4 = true;\n var tmp = STRING_CASE_INSENSITIVE_ORDER$lambda;\n STRING_CASE_INSENSITIVE_ORDER = new sam$kotlin_Comparator$0(tmp);\n }\n}\nfunction isBlank(_this__u8e3s4) {\n var tmp;\n if (charSequenceLength(_this__u8e3s4) === 0) {\n tmp = true;\n } else {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = get_indices(_this__u8e3s4);\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.s();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.text.isBlank.' call\n if (!isWhitespace(charSequenceGet(_this__u8e3s4, element))) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n }\n return tmp;\n}\nfunction startsWith(_this__u8e3s4, prefix, startIndex, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeStartsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.startsWith(prefix, startIndex);\n } else\n return regionMatches(_this__u8e3s4, startIndex, prefix, 0, prefix.length, ignoreCase);\n}\nfunction startsWith_0(_this__u8e3s4, prefix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeStartsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.startsWith(prefix, 0);\n } else\n return regionMatches(_this__u8e3s4, 0, prefix, 0, prefix.length, ignoreCase);\n}\nfunction endsWith(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (!ignoreCase) {\n // Inline function 'kotlin.text.nativeEndsWith' call\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.endsWith(suffix);\n } else\n return regionMatches(_this__u8e3s4, _this__u8e3s4.length - suffix.length | 0, suffix, 0, suffix.length, ignoreCase);\n}\nfunction regionMatches(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase);\n}\nfunction asSequence(_this__u8e3s4) {\n // Inline function 'kotlin.collections.isEmpty' call\n if (_this__u8e3s4.length === 0)\n return emptySequence();\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv(_this__u8e3s4);\n}\nfunction get_lastIndex(_this__u8e3s4) {\n return _this__u8e3s4.length - 1 | 0;\n}\nfunction single(_this__u8e3s4) {\n var tmp;\n switch (_this__u8e3s4.length) {\n case 0:\n throw NoSuchElementException_init_$Create$_0('Array is empty.');\n case 1:\n tmp = _this__u8e3s4[0];\n break;\n default:\n throw IllegalArgumentException_init_$Create$_0('Array has more than one element.');\n }\n return tmp;\n}\nfunction contains(_this__u8e3s4, element) {\n return indexOf(_this__u8e3s4, element) >= 0;\n}\nfunction indexOf(_this__u8e3s4, element) {\n if (element == null) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (_this__u8e3s4[index] == null) {\n return index;\n }\n }\n while (inductionVariable <= last);\n } else {\n var inductionVariable_0 = 0;\n var last_0 = _this__u8e3s4.length - 1 | 0;\n if (inductionVariable_0 <= last_0)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n if (equals(element, _this__u8e3s4[index_0])) {\n return index_0;\n }\n }\n while (inductionVariable_0 <= last_0);\n }\n return -1;\n}\nfunction toCollection(_this__u8e3s4, destination) {\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n while (inductionVariable < last) {\n var item = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n destination.k(item);\n }\n return destination;\n}\nfunction joinToString(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n}\nfunction joinTo(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.l4(prefix);\n var count = 0;\n var inductionVariable = 0;\n var last = _this__u8e3s4.length;\n $l$loop: while (inductionVariable < last) {\n var element = _this__u8e3s4[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n count = count + 1 | 0;\n if (count > 1) {\n buffer.l4(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.l4(truncated);\n }\n buffer.l4(postfix);\n return buffer;\n}\nfunction _no_name_provided__qut3iv($this_asSequence) {\n this.a5_1 = $this_asSequence;\n}\nprotoOf(_no_name_provided__qut3iv).n = function () {\n // Inline function 'kotlin.collections.asSequence.' call\n return arrayIterator(this.a5_1);\n};\nfunction joinToString_0(_this__u8e3s4, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n return joinTo_0(_this__u8e3s4, StringBuilder_init_$Create$_0(), separator, prefix, postfix, limit, truncated, transform).toString();\n}\nfunction joinTo_0(_this__u8e3s4, buffer, separator, prefix, postfix, limit, truncated, transform) {\n separator = separator === VOID ? ', ' : separator;\n prefix = prefix === VOID ? '' : prefix;\n postfix = postfix === VOID ? '' : postfix;\n limit = limit === VOID ? -1 : limit;\n truncated = truncated === VOID ? '...' : truncated;\n transform = transform === VOID ? null : transform;\n buffer.l4(prefix);\n var count = 0;\n var tmp0_iterator = _this__u8e3s4.n();\n $l$loop: while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n count = count + 1 | 0;\n if (count > 1) {\n buffer.l4(separator);\n }\n if (limit < 0 ? true : count <= limit) {\n appendElement(buffer, element, transform);\n } else\n break $l$loop;\n }\n if (limit >= 0 ? count > limit : false) {\n buffer.l4(truncated);\n }\n buffer.l4(postfix);\n return buffer;\n}\nfunction last(_this__u8e3s4) {\n if (_this__u8e3s4.s())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.w(get_lastIndex_0(_this__u8e3s4));\n}\nfunction distinct(_this__u8e3s4) {\n return toList(toMutableSet(_this__u8e3s4));\n}\nfunction firstOrNull(_this__u8e3s4) {\n return _this__u8e3s4.s() ? null : _this__u8e3s4.w(0);\n}\nfunction plus(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection)) {\n var result = ArrayList_init_$Create$_0(_this__u8e3s4.i() + elements.i() | 0);\n result.l(_this__u8e3s4);\n result.l(elements);\n return result;\n } else {\n var result_0 = ArrayList_init_$Create$_1(_this__u8e3s4);\n addAll(result_0, elements);\n return result_0;\n }\n}\nfunction sorted(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.i() <= 1)\n return toList(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort_0(this_0);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_0(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sorted.' call\n sort(this_1);\n return this_1;\n}\nfunction first(_this__u8e3s4) {\n if (_this__u8e3s4.s())\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n return _this__u8e3s4.w(0);\n}\nfunction toMutableList(_this__u8e3s4) {\n return ArrayList_init_$Create$_1(_this__u8e3s4);\n}\nfunction toList(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.i()) {\n case 0:\n tmp = emptyList();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.w(0);\n } else {\n tmp_0 = _this__u8e3s4.n().p();\n }\n\n tmp = listOf(tmp_0);\n break;\n default:\n tmp = toMutableList(_this__u8e3s4);\n break;\n }\n return tmp;\n }\n return optimizeReadOnlyList(toMutableList_0(_this__u8e3s4));\n}\nfunction toMutableSet(_this__u8e3s4) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = LinkedHashSet_init_$Create$_0(_this__u8e3s4);\n } else {\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$());\n }\n return tmp;\n}\nfunction sortedWith(_this__u8e3s4, comparator) {\n if (isInterface(_this__u8e3s4, Collection)) {\n if (_this__u8e3s4.i() <= 1)\n return toList(_this__u8e3s4);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(_this__u8e3s4);\n var this_0 = isArray(tmp) ? tmp : THROW_CCE();\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith_0(this_0, comparator);\n return asList(this_0);\n }\n // Inline function 'kotlin.apply' call\n var this_1 = toMutableList_0(_this__u8e3s4);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.collections.sortedWith.' call\n sortWith(this_1, comparator);\n return this_1;\n}\nfunction toMutableList_0(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection))\n return toMutableList(_this__u8e3s4);\n return toCollection_0(_this__u8e3s4, ArrayList_init_$Create$());\n}\nfunction toCollection_0(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n destination.k(item);\n }\n return destination;\n}\nfunction toSet(_this__u8e3s4) {\n if (isInterface(_this__u8e3s4, Collection)) {\n var tmp;\n switch (_this__u8e3s4.i()) {\n case 0:\n tmp = emptySet();\n break;\n case 1:\n var tmp_0;\n if (isInterface(_this__u8e3s4, List)) {\n tmp_0 = _this__u8e3s4.w(0);\n } else {\n tmp_0 = _this__u8e3s4.n().p();\n }\n\n tmp = setOf(tmp_0);\n break;\n default:\n tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.i())));\n break;\n }\n return tmp;\n }\n return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));\n}\nfunction downTo(_this__u8e3s4, to) {\n return Companion_instance_10.b5(_this__u8e3s4, to, -1);\n}\nfunction coerceAtMost(_this__u8e3s4, maximumValue) {\n return _this__u8e3s4 > maximumValue ? maximumValue : _this__u8e3s4;\n}\nfunction coerceAtLeast(_this__u8e3s4, minimumValue) {\n return _this__u8e3s4 < minimumValue ? minimumValue : _this__u8e3s4;\n}\nfunction toList_0(_this__u8e3s4) {\n var it = _this__u8e3s4.n();\n if (!it.o())\n return emptyList();\n var element = it.p();\n if (!it.o())\n return listOf(element);\n var dst = ArrayList_init_$Create$();\n dst.k(element);\n while (it.o()) {\n dst.k(it.p());\n }\n return dst;\n}\nfunction firstOrNull_0(_this__u8e3s4) {\n var iterator = _this__u8e3s4.n();\n if (!iterator.o())\n return null;\n return iterator.p();\n}\nfunction map(_this__u8e3s4, transform) {\n return new TransformingSequence(_this__u8e3s4, transform);\n}\nfunction elementAtOrNull(_this__u8e3s4, index) {\n if (index < 0)\n return null;\n var iterator = _this__u8e3s4.n();\n var count = 0;\n while (iterator.o()) {\n var element = iterator.p();\n var tmp0 = count;\n count = tmp0 + 1 | 0;\n if (index === tmp0)\n return element;\n }\n return null;\n}\nfunction toMutableList_1(_this__u8e3s4) {\n return toCollection_1(_this__u8e3s4, ArrayList_init_$Create$());\n}\nfunction takeWhile(_this__u8e3s4, predicate) {\n return new TakeWhileSequence(_this__u8e3s4, predicate);\n}\nfunction drop(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.sequences.drop.' call\n var message = 'Requested element count ' + n + ' is less than zero.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n var tmp;\n if (n === 0) {\n tmp = _this__u8e3s4;\n } else {\n if (isInterface(_this__u8e3s4, DropTakeSequence)) {\n tmp = _this__u8e3s4.c5(n);\n } else {\n tmp = new DropSequence(_this__u8e3s4, n);\n }\n }\n return tmp;\n}\nfunction dropWhile(_this__u8e3s4, predicate) {\n return new DropWhileSequence(_this__u8e3s4, predicate);\n}\nfunction filterIndexed(_this__u8e3s4, predicate) {\n var tmp = new IndexingSequence(_this__u8e3s4);\n var tmp_0 = new FilteringSequence(tmp, true, filterIndexed$lambda(predicate));\n return new TransformingSequence(tmp_0, filterIndexed$lambda_0);\n}\nfunction take(_this__u8e3s4, n) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(n >= 0)) {\n // Inline function 'kotlin.sequences.take.' call\n var message = 'Requested element count ' + n + ' is less than zero.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n var tmp;\n if (n === 0) {\n tmp = emptySequence();\n } else {\n if (isInterface(_this__u8e3s4, DropTakeSequence)) {\n tmp = _this__u8e3s4.d5(n);\n } else {\n tmp = new TakeSequence(_this__u8e3s4, n);\n }\n }\n return tmp;\n}\nfunction toCollection_1(_this__u8e3s4, destination) {\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n destination.k(item);\n }\n return destination;\n}\nfunction filterIndexed$lambda($predicate) {\n return function (it) {\n return $predicate(it.e5_1, it.f5_1);\n };\n}\nfunction filterIndexed$lambda_0(it) {\n return it.f5_1;\n}\nfunction getOrNull(_this__u8e3s4, index) {\n return (index >= 0 ? index <= get_lastIndex_1(_this__u8e3s4) : false) ? charSequenceGet(_this__u8e3s4, index) : null;\n}\nfunction _Char___init__impl__6a9atx(value) {\n return value;\n}\nfunction _get_value__a43j40($this) {\n return $this;\n}\nfunction _Char___init__impl__6a9atx_0(code) {\n // Inline function 'kotlin.UShort.toInt' call\n var tmp$ret$0 = _UShort___get_data__impl__g0245(code) & 65535;\n return _Char___init__impl__6a9atx(tmp$ret$0);\n}\nfunction Char__compareTo_impl_ypi4mb($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n}\nfunction Char__compareTo_impl_ypi4mb_0($this, other) {\n return Char__compareTo_impl_ypi4mb($this.g5_1, other instanceof Char ? other.g5_1 : THROW_CCE());\n}\nfunction Char__minus_impl_a2frrh($this, other) {\n return _get_value__a43j40($this) - _get_value__a43j40(other) | 0;\n}\nfunction Char__rangeTo_impl_tkncvp($this, other) {\n return new CharRange($this, other);\n}\nfunction Char__toInt_impl_vasixd($this) {\n return _get_value__a43j40($this);\n}\nfunction Char__equals_impl_x6719k($this, other) {\n if (!(other instanceof Char))\n return false;\n return _get_value__a43j40($this) === _get_value__a43j40(other.g5_1);\n}\nfunction Char__hashCode_impl_otmys($this) {\n return _get_value__a43j40($this);\n}\nfunction toString_0($this) {\n // Inline function 'kotlin.js.unsafeCast' call\n return String.fromCharCode(_get_value__a43j40($this));\n}\nfunction Companion_2() {\n Companion_instance_2 = this;\n this.h5_1 = _Char___init__impl__6a9atx(0);\n this.i5_1 = _Char___init__impl__6a9atx(65535);\n this.j5_1 = _Char___init__impl__6a9atx(55296);\n this.k5_1 = _Char___init__impl__6a9atx(56319);\n this.l5_1 = _Char___init__impl__6a9atx(56320);\n this.m5_1 = _Char___init__impl__6a9atx(57343);\n this.n5_1 = _Char___init__impl__6a9atx(55296);\n this.o5_1 = _Char___init__impl__6a9atx(57343);\n this.p5_1 = 2;\n this.q5_1 = 16;\n}\nvar Companion_instance_2;\nfunction Companion_getInstance_2() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n}\nfunction Char(value) {\n Companion_getInstance_2();\n this.g5_1 = value;\n}\nprotoOf(Char).r5 = function (other) {\n return Char__compareTo_impl_ypi4mb(this.g5_1, other);\n};\nprotoOf(Char).d = function (other) {\n return Char__compareTo_impl_ypi4mb_0(this, other);\n};\nprotoOf(Char).equals = function (other) {\n return Char__equals_impl_x6719k(this.g5_1, other);\n};\nprotoOf(Char).hashCode = function () {\n return Char__hashCode_impl_otmys(this.g5_1);\n};\nprotoOf(Char).toString = function () {\n return toString_0(this.g5_1);\n};\nfunction List() {\n}\nfunction Collection() {\n}\nfunction Entry() {\n}\nfunction Map_0() {\n}\nfunction Set() {\n}\nfunction Companion_3() {\n}\nvar Companion_instance_3;\nfunction Companion_getInstance_3() {\n return Companion_instance_3;\n}\nfunction Enum(name, ordinal) {\n this.s5_1 = name;\n this.t5_1 = ordinal;\n}\nprotoOf(Enum).u5 = function (other) {\n return compareTo_0(this.t5_1, other.t5_1);\n};\nprotoOf(Enum).d = function (other) {\n return this.u5(other instanceof Enum ? other : THROW_CCE());\n};\nprotoOf(Enum).equals = function (other) {\n return this === other;\n};\nprotoOf(Enum).hashCode = function () {\n return identityHashCode(this);\n};\nprotoOf(Enum).toString = function () {\n return this.s5_1;\n};\nfunction toString_1(_this__u8e3s4) {\n var tmp1_elvis_lhs = _this__u8e3s4 == null ? null : toString_2(_this__u8e3s4);\n return tmp1_elvis_lhs == null ? 'null' : tmp1_elvis_lhs;\n}\nfunction implement(interfaces) {\n var maxSize = 1;\n var masks = [];\n var inductionVariable = 0;\n var last = interfaces.length;\n while (inductionVariable < last) {\n var i = interfaces[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n var currentSize = maxSize;\n var tmp1_elvis_lhs = i.prototype.$imask$;\n var imask = tmp1_elvis_lhs == null ? i.$imask$ : tmp1_elvis_lhs;\n if (!(imask == null)) {\n masks.push(imask);\n currentSize = imask.length;\n }\n var iid = i.$metadata$.iid;\n var tmp;\n if (iid == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.implement.' call\n tmp = bitMaskWith(iid);\n }\n var iidImask = tmp;\n if (!(iidImask == null)) {\n masks.push(iidImask);\n currentSize = Math.max(currentSize, iidImask.length);\n }\n if (currentSize > maxSize) {\n maxSize = currentSize;\n }\n }\n return compositeBitMask(maxSize, masks);\n}\nfunction bitMaskWith(activeBit) {\n var numberIndex = activeBit >> 5;\n var intArray = new Int32Array(numberIndex + 1 | 0);\n var positionInNumber = activeBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n intArray[numberIndex] = intArray[numberIndex] | numberWithSettledBit;\n return intArray;\n}\nfunction compositeBitMask(capacity, masks) {\n var tmp = 0;\n var tmp_0 = new Int32Array(capacity);\n while (tmp < capacity) {\n var tmp_1 = tmp;\n var result = 0;\n var inductionVariable = 0;\n var last = masks.length;\n while (inductionVariable < last) {\n var mask = masks[inductionVariable];\n inductionVariable = inductionVariable + 1 | 0;\n if (tmp_1 < mask.length) {\n result = result | mask[tmp_1];\n }\n }\n tmp_0[tmp_1] = result;\n tmp = tmp + 1 | 0;\n }\n return tmp_0;\n}\nfunction isBitSet(_this__u8e3s4, possibleActiveBit) {\n var numberIndex = possibleActiveBit >> 5;\n if (numberIndex > _this__u8e3s4.length)\n return false;\n var positionInNumber = possibleActiveBit & 31;\n var numberWithSettledBit = 1 << positionInNumber;\n return !((_this__u8e3s4[numberIndex] & numberWithSettledBit) === 0);\n}\nfunction fillArrayVal(array, initValue) {\n var inductionVariable = 0;\n var last = array.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n array[i] = initValue;\n }\n while (!(i === last));\n return array;\n}\nfunction arrayIterator(array) {\n return new arrayIterator$1(array);\n}\nfunction charArrayOf(arr) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'withType' call\n var type = 'CharArray';\n var array = new Uint16Array(arr);\n array.$type$ = type;\n return array;\n}\nfunction arrayIterator$1($array) {\n this.w5_1 = $array;\n this.v5_1 = 0;\n}\nprotoOf(arrayIterator$1).o = function () {\n return !(this.v5_1 === this.w5_1.length);\n};\nprotoOf(arrayIterator$1).p = function () {\n var tmp;\n if (!(this.v5_1 === this.w5_1.length)) {\n var tmp1 = this.v5_1;\n this.v5_1 = tmp1 + 1 | 0;\n tmp = this.w5_1[tmp1];\n } else {\n throw NoSuchElementException_init_$Create$_0('' + this.v5_1);\n }\n return tmp;\n};\nfunction get_buf() {\n _init_properties_bitUtils_kt__nfcg4k();\n return buf;\n}\nvar buf;\nfunction get_bufFloat64() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufFloat64;\n}\nvar bufFloat64;\nvar bufFloat32;\nfunction get_bufInt32() {\n _init_properties_bitUtils_kt__nfcg4k();\n return bufInt32;\n}\nvar bufInt32;\nfunction get_lowIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return lowIndex;\n}\nvar lowIndex;\nfunction get_highIndex() {\n _init_properties_bitUtils_kt__nfcg4k();\n return highIndex;\n}\nvar highIndex;\nfunction getNumberHashCode(obj) {\n _init_properties_bitUtils_kt__nfcg4k();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.jsBitwiseOr' call\n // Inline function 'kotlin.js.asDynamic' call\n if ((obj | 0) === obj) {\n return numberToInt(obj);\n }\n get_bufFloat64()[0] = obj;\n return imul_0(get_bufInt32()[get_highIndex()], 31) + get_bufInt32()[get_lowIndex()] | 0;\n}\nvar properties_initialized_bitUtils_kt_i2bo3e;\nfunction _init_properties_bitUtils_kt__nfcg4k() {\n if (!properties_initialized_bitUtils_kt_i2bo3e) {\n properties_initialized_bitUtils_kt_i2bo3e = true;\n buf = new ArrayBuffer(8);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat64 = new Float64Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufFloat32 = new Float32Array(get_buf());\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n bufInt32 = new Int32Array(get_buf());\n // Inline function 'kotlin.run' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.js.lowIndex.' call\n get_bufFloat64()[0] = -1.0;\n lowIndex = !(get_bufInt32()[0] === 0) ? 1 : 0;\n highIndex = 1 - get_lowIndex() | 0;\n }\n}\nfunction charSequenceGet(a, index) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.Char' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var code = a.charCodeAt(index);\n var tmp_0;\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_0 = _Char___init__impl__6a9atx(0);\n if (code < Char__toInt_impl_vasixd(this_0)) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.code' call\n Companion_getInstance_2();\n var this_1 = _Char___init__impl__6a9atx(65535);\n tmp_0 = code > Char__toInt_impl_vasixd(this_1);\n }\n if (tmp_0) {\n throw IllegalArgumentException_init_$Create$_0('Invalid Char code: ' + code);\n }\n tmp = numberToChar(code);\n } else {\n tmp = a.b(index);\n }\n return tmp;\n}\nfunction isString(a) {\n return typeof a === 'string';\n}\nfunction charSequenceLength(a) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.length;\n } else {\n tmp = a.a();\n }\n return tmp;\n}\nfunction charSequenceSubSequence(a, startIndex, endIndex) {\n var tmp;\n if (isString(a)) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = a.substring(startIndex, endIndex);\n } else {\n tmp = a.c(startIndex, endIndex);\n }\n return tmp;\n}\nfunction arrayToString(array) {\n return joinToString(array, ', ', '[', ']', VOID, VOID, arrayToString$lambda);\n}\nfunction arrayToString$lambda(it) {\n return toString_2(it);\n}\nfunction compareTo_0(a, b) {\n var tmp;\n switch (typeof a) {\n case 'number':\n var tmp_0;\n if (typeof b === 'number') {\n tmp_0 = doubleCompareTo(a, b);\n } else {\n if (b instanceof Long) {\n tmp_0 = doubleCompareTo(a, b.z5());\n } else {\n tmp_0 = primitiveCompareTo(a, b);\n }\n }\n\n tmp = tmp_0;\n break;\n case 'string':\n case 'boolean':\n tmp = primitiveCompareTo(a, b);\n break;\n default:\n tmp = compareToDoNotIntrinsicify(a, b);\n break;\n }\n return tmp;\n}\nfunction doubleCompareTo(a, b) {\n var tmp;\n if (a < b) {\n tmp = -1;\n } else if (a > b) {\n tmp = 1;\n } else if (a === b) {\n var tmp_0;\n if (a !== 0) {\n tmp_0 = 0;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var ia = 1 / a;\n var tmp_1;\n // Inline function 'kotlin.js.asDynamic' call\n if (ia === 1 / b) {\n tmp_1 = 0;\n } else {\n if (ia < 0) {\n tmp_1 = -1;\n } else {\n tmp_1 = 1;\n }\n }\n tmp_0 = tmp_1;\n }\n tmp = tmp_0;\n } else if (a !== a) {\n tmp = b !== b ? 0 : 1;\n } else {\n tmp = -1;\n }\n return tmp;\n}\nfunction primitiveCompareTo(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction compareToDoNotIntrinsicify(a, b) {\n return a.d(b);\n}\nfunction identityHashCode(obj) {\n return getObjectHashCode(obj);\n}\nfunction getObjectHashCode(obj) {\n // Inline function 'kotlin.js.jsIn' call\n if (!('kotlinHashCodeValue$' in obj)) {\n var hash = calculateRandomHash();\n var descriptor = new Object();\n descriptor.value = hash;\n descriptor.enumerable = false;\n Object.defineProperty(obj, 'kotlinHashCodeValue$', descriptor);\n }\n // Inline function 'kotlin.js.unsafeCast' call\n return obj['kotlinHashCodeValue$'];\n}\nfunction calculateRandomHash() {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n return Math.random() * 4.294967296E9 | 0;\n}\nfunction toString_2(o) {\n var tmp;\n if (o == null) {\n tmp = 'null';\n } else if (isArrayish(o)) {\n tmp = '[...]';\n } else if (!(typeof o.toString === 'function')) {\n tmp = anyToString(o);\n } else {\n // Inline function 'kotlin.js.unsafeCast' call\n tmp = o.toString();\n }\n return tmp;\n}\nfunction anyToString(o) {\n return Object.prototype.toString.call(o);\n}\nfunction hashCode(obj) {\n if (obj == null)\n return 0;\n var typeOf = typeof obj;\n var tmp;\n switch (typeOf) {\n case 'object':\n tmp = 'function' === typeof obj.hashCode ? obj.hashCode() : getObjectHashCode(obj);\n break;\n case 'function':\n tmp = getObjectHashCode(obj);\n break;\n case 'number':\n tmp = getNumberHashCode(obj);\n break;\n case 'boolean':\n // Inline function 'kotlin.js.unsafeCast' call\n\n tmp = getBooleanHashCode(obj);\n break;\n case 'string':\n tmp = getStringHashCode(String(obj));\n break;\n case 'bigint':\n tmp = getBigIntHashCode(obj);\n break;\n case 'symbol':\n tmp = getSymbolHashCode(obj);\n break;\n default:\n tmp = function () {\n throw new Error('Unexpected typeof `' + typeOf + '`');\n }();\n break;\n }\n return tmp;\n}\nfunction getBooleanHashCode(value) {\n return value ? 1231 : 1237;\n}\nfunction getStringHashCode(str) {\n var hash = 0;\n var length = str.length;\n var inductionVariable = 0;\n var last = length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var code = str.charCodeAt(i);\n hash = imul_0(hash, 31) + code | 0;\n }\n while (!(i === last));\n return hash;\n}\nfunction getBigIntHashCode(value) {\n var shiftNumber = BigInt(32);\n var MASK = BigInt(4.294967295E9);\n var bigNumber = value < 0 ? -value : value;\n var hashCode = 0;\n var signum = value < 0 ? -1 : 1;\n while (bigNumber != 0) {\n // Inline function 'kotlin.js.unsafeCast' call\n var chunk = Number(bigNumber & MASK);\n hashCode = imul_0(31, hashCode) + chunk | 0;\n bigNumber = bigNumber >> shiftNumber;\n }\n return imul_0(hashCode, signum);\n}\nfunction getSymbolHashCode(value) {\n var hashCodeMap = symbolIsSharable(value) ? getSymbolMap() : getSymbolWeakMap();\n var cachedHashCode = hashCodeMap.get(value);\n if (cachedHashCode !== VOID)\n return cachedHashCode;\n var hash = calculateRandomHash();\n hashCodeMap.set(value, hash);\n return hash;\n}\nfunction symbolIsSharable(symbol) {\n return Symbol.keyFor(symbol) != VOID;\n}\nfunction getSymbolMap() {\n if (symbolMap === VOID) {\n symbolMap = new Map();\n }\n return symbolMap;\n}\nfunction getSymbolWeakMap() {\n if (symbolWeakMap === VOID) {\n symbolWeakMap = new WeakMap();\n }\n return symbolWeakMap;\n}\nvar symbolMap;\nvar symbolWeakMap;\nfunction equals(obj1, obj2) {\n if (obj1 == null) {\n return obj2 == null;\n }\n if (obj2 == null) {\n return false;\n }\n if (typeof obj1 === 'object' ? typeof obj1.equals === 'function' : false) {\n return obj1.equals(obj2);\n }\n if (obj1 !== obj1) {\n return obj2 !== obj2;\n }\n if (typeof obj1 === 'number' ? typeof obj2 === 'number' : false) {\n var tmp;\n if (obj1 === obj2) {\n var tmp_0;\n if (obj1 !== 0) {\n tmp_0 = true;\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_1 = 1 / obj1;\n // Inline function 'kotlin.js.asDynamic' call\n tmp_0 = tmp_1 === 1 / obj2;\n }\n tmp = tmp_0;\n } else {\n tmp = false;\n }\n return tmp;\n }\n return obj1 === obj2;\n}\nfunction boxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n}\nfunction unboxIntrinsic(x) {\n var message = 'Should be lowered';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n}\nfunction captureStack(instance, constructorFunction) {\n if (Error.captureStackTrace != null) {\n Error.captureStackTrace(instance, constructorFunction);\n } else {\n // Inline function 'kotlin.js.asDynamic' call\n instance.stack = (new Error()).stack;\n }\n}\nfunction protoOf(constructor) {\n return constructor.prototype;\n}\nfunction defineProp(obj, name, getter, setter) {\n return Object.defineProperty(obj, name, {configurable: true, get: getter, set: setter});\n}\nfunction objectCreate(proto) {\n return Object.create(proto);\n}\nfunction extendThrowable(this_, message, cause) {\n Error.call(this_);\n setPropertiesToThrowableInstance(this_, message, cause);\n}\nfunction setPropertiesToThrowableInstance(this_, message, cause) {\n var errorInfo = calculateErrorInfo(Object.getPrototypeOf(this_));\n if ((errorInfo & 1) === 0) {\n var tmp;\n if (message == null) {\n var tmp_0;\n if (!(message === null)) {\n var tmp1_elvis_lhs = cause == null ? null : cause.toString();\n tmp_0 = tmp1_elvis_lhs == null ? VOID : tmp1_elvis_lhs;\n } else {\n tmp_0 = VOID;\n }\n tmp = tmp_0;\n } else {\n tmp = message;\n }\n this_.message = tmp;\n }\n if ((errorInfo & 2) === 0) {\n this_.cause = cause;\n }\n this_.name = Object.getPrototypeOf(this_).constructor.name;\n}\nfunction ensureNotNull(v) {\n var tmp;\n if (v == null) {\n THROW_NPE();\n } else {\n tmp = v;\n }\n return tmp;\n}\nfunction THROW_NPE() {\n throw NullPointerException_init_$Create$();\n}\nfunction THROW_CCE() {\n throw ClassCastException_init_$Create$();\n}\nfunction lazy(initializer) {\n return new UnsafeLazyImpl(initializer);\n}\nfunction fillFrom(src, dst) {\n var srcLen = src.length;\n var dstLen = dst.length;\n var index = 0;\n // Inline function 'kotlin.js.unsafeCast' call\n var arr = dst;\n while (index < srcLen ? index < dstLen : false) {\n var tmp = index;\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n arr[tmp] = src[tmp0];\n }\n return dst;\n}\nfunction arrayCopyResize(source, newSize, defaultValue) {\n // Inline function 'kotlin.js.unsafeCast' call\n var result = source.slice(0, newSize);\n // Inline function 'kotlin.copyArrayType' call\n if (source.$type$ !== undefined) {\n result.$type$ = source.$type$;\n }\n var index = source.length;\n if (newSize > index) {\n // Inline function 'kotlin.js.asDynamic' call\n result.length = newSize;\n while (index < newSize) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n result[tmp0] = defaultValue;\n }\n }\n return result;\n}\nfunction Companion_4() {\n Companion_instance_4 = this;\n this.a6_1 = new Long(0, -2147483648);\n this.b6_1 = new Long(-1, 2147483647);\n this.c6_1 = 8;\n this.d6_1 = 64;\n}\nvar Companion_instance_4;\nfunction Companion_getInstance_4() {\n if (Companion_instance_4 == null)\n new Companion_4();\n return Companion_instance_4;\n}\nfunction Long(low, high) {\n Companion_getInstance_4();\n Number_0.call(this);\n this.x5_1 = low;\n this.y5_1 = high;\n}\nprotoOf(Long).e6 = function (other) {\n return compare(this, other);\n};\nprotoOf(Long).d = function (other) {\n return this.e6(other instanceof Long ? other : THROW_CCE());\n};\nprotoOf(Long).f6 = function (other) {\n return add(this, other);\n};\nprotoOf(Long).g6 = function (other) {\n return divide(this, other);\n};\nprotoOf(Long).h6 = function () {\n return this.i6().f6(new Long(1, 0));\n};\nprotoOf(Long).i6 = function () {\n return new Long(~this.x5_1, ~this.y5_1);\n};\nprotoOf(Long).j6 = function () {\n return this.x5_1;\n};\nprotoOf(Long).z5 = function () {\n return toNumber(this);\n};\nprotoOf(Long).valueOf = function () {\n return this.z5();\n};\nprotoOf(Long).equals = function (other) {\n var tmp;\n if (other instanceof Long) {\n tmp = equalsLong(this, other);\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(Long).hashCode = function () {\n return hashCode_0(this);\n};\nprotoOf(Long).toString = function () {\n return toStringImpl(this, 10);\n};\nfunction get_ZERO() {\n _init_properties_longjs_kt__tqrzid();\n return ZERO;\n}\nvar ZERO;\nfunction get_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return ONE;\n}\nvar ONE;\nfunction get_NEG_ONE() {\n _init_properties_longjs_kt__tqrzid();\n return NEG_ONE;\n}\nvar NEG_ONE;\nfunction get_MAX_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MAX_VALUE;\n}\nvar MAX_VALUE;\nfunction get_MIN_VALUE() {\n _init_properties_longjs_kt__tqrzid();\n return MIN_VALUE;\n}\nvar MIN_VALUE;\nfunction get_TWO_PWR_24_() {\n _init_properties_longjs_kt__tqrzid();\n return TWO_PWR_24_;\n}\nvar TWO_PWR_24_;\nfunction compare(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (equalsLong(_this__u8e3s4, other)) {\n return 0;\n }\n var thisNeg = isNegative(_this__u8e3s4);\n var otherNeg = isNegative(other);\n return (thisNeg ? !otherNeg : false) ? -1 : (!thisNeg ? otherNeg : false) ? 1 : isNegative(subtract(_this__u8e3s4, other)) ? -1 : 1;\n}\nfunction add(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n var a48 = _this__u8e3s4.y5_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.y5_1 & 65535;\n var a16 = _this__u8e3s4.x5_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.x5_1 & 65535;\n var b48 = other.y5_1 >>> 16 | 0;\n var b32 = other.y5_1 & 65535;\n var b16 = other.x5_1 >>> 16 | 0;\n var b00 = other.x5_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + (a00 + b00 | 0) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + (a16 + b16 | 0) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + (a32 + b32 | 0) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (a48 + b48 | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n}\nfunction subtract(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return add(_this__u8e3s4, other.h6());\n}\nfunction multiply(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n } else if (isZero(other)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n return isOdd(other) ? get_MIN_VALUE() : get_ZERO();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return isOdd(_this__u8e3s4) ? get_MIN_VALUE() : get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = multiply(negate(_this__u8e3s4), negate(other));\n } else {\n tmp = negate(multiply(negate(_this__u8e3s4), other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(multiply(_this__u8e3s4, negate(other)));\n }\n if (lessThan(_this__u8e3s4, get_TWO_PWR_24_()) ? lessThan(other, get_TWO_PWR_24_()) : false) {\n return fromNumber(toNumber(_this__u8e3s4) * toNumber(other));\n }\n var a48 = _this__u8e3s4.y5_1 >>> 16 | 0;\n var a32 = _this__u8e3s4.y5_1 & 65535;\n var a16 = _this__u8e3s4.x5_1 >>> 16 | 0;\n var a00 = _this__u8e3s4.x5_1 & 65535;\n var b48 = other.y5_1 >>> 16 | 0;\n var b32 = other.y5_1 & 65535;\n var b16 = other.x5_1 >>> 16 | 0;\n var b00 = other.x5_1 & 65535;\n var c48 = 0;\n var c32 = 0;\n var c16 = 0;\n var c00 = 0;\n c00 = c00 + imul_0(a00, b00) | 0;\n c16 = c16 + (c00 >>> 16 | 0) | 0;\n c00 = c00 & 65535;\n c16 = c16 + imul_0(a16, b00) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c16 = c16 + imul_0(a00, b16) | 0;\n c32 = c32 + (c16 >>> 16 | 0) | 0;\n c16 = c16 & 65535;\n c32 = c32 + imul_0(a32, b00) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul_0(a16, b16) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c32 = c32 + imul_0(a00, b32) | 0;\n c48 = c48 + (c32 >>> 16 | 0) | 0;\n c32 = c32 & 65535;\n c48 = c48 + (((imul_0(a48, b00) + imul_0(a32, b16) | 0) + imul_0(a16, b32) | 0) + imul_0(a00, b48) | 0) | 0;\n c48 = c48 & 65535;\n return new Long(c16 << 16 | c00, c48 << 16 | c32);\n}\nfunction divide(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n if (isZero(other)) {\n throw Exception_init_$Create$_0('division by zero');\n } else if (isZero(_this__u8e3s4)) {\n return get_ZERO();\n }\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n if (equalsLong(other, get_ONE()) ? true : equalsLong(other, get_NEG_ONE())) {\n return get_MIN_VALUE();\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ONE();\n } else {\n var halfThis = shiftRight(_this__u8e3s4, 1);\n var approx = shiftLeft(halfThis.g6(other), 1);\n if (equalsLong(approx, get_ZERO())) {\n return isNegative(other) ? get_ONE() : get_NEG_ONE();\n } else {\n var rem = subtract(_this__u8e3s4, multiply(other, approx));\n return add(approx, rem.g6(other));\n }\n }\n } else if (equalsLong(other, get_MIN_VALUE())) {\n return get_ZERO();\n }\n if (isNegative(_this__u8e3s4)) {\n var tmp;\n if (isNegative(other)) {\n tmp = negate(_this__u8e3s4).g6(negate(other));\n } else {\n tmp = negate(negate(_this__u8e3s4).g6(other));\n }\n return tmp;\n } else if (isNegative(other)) {\n return negate(_this__u8e3s4.g6(negate(other)));\n }\n var res = get_ZERO();\n var rem_0 = _this__u8e3s4;\n while (greaterThanOrEqual(rem_0, other)) {\n var approxDouble = toNumber(rem_0) / toNumber(other);\n var approx2 = Math.max(1.0, Math.floor(approxDouble));\n var log2 = Math.ceil(Math.log(approx2) / Math.LN2);\n var delta = log2 <= 48.0 ? 1.0 : Math.pow(2.0, log2 - 48);\n var approxRes = fromNumber(approx2);\n var approxRem = multiply(approxRes, other);\n while (isNegative(approxRem) ? true : greaterThan(approxRem, rem_0)) {\n approx2 = approx2 - delta;\n approxRes = fromNumber(approx2);\n approxRem = multiply(approxRes, other);\n }\n if (isZero(approxRes)) {\n approxRes = get_ONE();\n }\n res = add(res, approxRes);\n rem_0 = subtract(rem_0, approxRem);\n }\n return res;\n}\nfunction shiftLeft(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.x5_1 << numBits_0, _this__u8e3s4.y5_1 << numBits_0 | (_this__u8e3s4.x5_1 >>> (32 - numBits_0 | 0) | 0));\n } else {\n return new Long(0, _this__u8e3s4.x5_1 << (numBits_0 - 32 | 0));\n }\n }\n}\nfunction shiftRight(_this__u8e3s4, numBits) {\n _init_properties_longjs_kt__tqrzid();\n var numBits_0 = numBits & 63;\n if (numBits_0 === 0) {\n return _this__u8e3s4;\n } else {\n if (numBits_0 < 32) {\n return new Long(_this__u8e3s4.x5_1 >>> numBits_0 | 0 | _this__u8e3s4.y5_1 << (32 - numBits_0 | 0), _this__u8e3s4.y5_1 >> numBits_0);\n } else {\n return new Long(_this__u8e3s4.y5_1 >> (numBits_0 - 32 | 0), _this__u8e3s4.y5_1 >= 0 ? 0 : -1);\n }\n }\n}\nfunction toNumber(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 * 4.294967296E9 + getLowBitsUnsigned(_this__u8e3s4);\n}\nfunction equalsLong(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 === other.y5_1 ? _this__u8e3s4.x5_1 === other.x5_1 : false;\n}\nfunction hashCode_0(l) {\n _init_properties_longjs_kt__tqrzid();\n return l.x5_1 ^ l.y5_1;\n}\nfunction toStringImpl(_this__u8e3s4, radix) {\n _init_properties_longjs_kt__tqrzid();\n if (radix < 2 ? true : 36 < radix) {\n throw Exception_init_$Create$_0('radix out of range: ' + radix);\n }\n if (isZero(_this__u8e3s4)) {\n return '0';\n }\n if (isNegative(_this__u8e3s4)) {\n if (equalsLong(_this__u8e3s4, get_MIN_VALUE())) {\n var radixLong = fromInt(radix);\n var div = _this__u8e3s4.g6(radixLong);\n var rem = subtract(multiply(div, radixLong), _this__u8e3s4).j6();\n var tmp = toStringImpl(div, radix);\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return tmp + rem.toString(radix);\n } else {\n return '-' + toStringImpl(negate(_this__u8e3s4), radix);\n }\n }\n var digitsPerTime = radix === 2 ? 31 : radix <= 10 ? 9 : radix <= 21 ? 7 : radix <= 35 ? 6 : 5;\n var radixToPower = fromNumber(Math.pow(radix, digitsPerTime));\n var rem_0 = _this__u8e3s4;\n var result = '';\n while (true) {\n var remDiv = rem_0.g6(radixToPower);\n var intval = subtract(rem_0, multiply(remDiv, radixToPower)).j6();\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var digits = intval.toString(radix);\n rem_0 = remDiv;\n if (isZero(rem_0)) {\n return digits + result;\n } else {\n while (digits.length < digitsPerTime) {\n digits = '0' + digits;\n }\n result = digits + result;\n }\n }\n}\nfunction fromInt(value) {\n _init_properties_longjs_kt__tqrzid();\n return new Long(value, value < 0 ? -1 : 0);\n}\nfunction isNegative(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 < 0;\n}\nfunction isZero(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.y5_1 === 0 ? _this__u8e3s4.x5_1 === 0 : false;\n}\nfunction isOdd(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return (_this__u8e3s4.x5_1 & 1) === 1;\n}\nfunction negate(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.h6();\n}\nfunction lessThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) < 0;\n}\nfunction fromNumber(value) {\n _init_properties_longjs_kt__tqrzid();\n if (isNaN_0(value)) {\n return get_ZERO();\n } else if (value <= -9.223372036854776E18) {\n return get_MIN_VALUE();\n } else if (value + 1 >= 9.223372036854776E18) {\n return get_MAX_VALUE();\n } else if (value < 0.0) {\n return negate(fromNumber(-value));\n } else {\n var twoPwr32 = 4.294967296E9;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp = value % twoPwr32 | 0;\n // Inline function 'kotlin.js.jsBitwiseOr' call\n var tmp$ret$1 = value / twoPwr32 | 0;\n return new Long(tmp, tmp$ret$1);\n }\n}\nfunction greaterThan(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) > 0;\n}\nfunction greaterThanOrEqual(_this__u8e3s4, other) {\n _init_properties_longjs_kt__tqrzid();\n return compare(_this__u8e3s4, other) >= 0;\n}\nfunction getLowBitsUnsigned(_this__u8e3s4) {\n _init_properties_longjs_kt__tqrzid();\n return _this__u8e3s4.x5_1 >= 0 ? _this__u8e3s4.x5_1 : 4.294967296E9 + _this__u8e3s4.x5_1;\n}\nvar properties_initialized_longjs_kt_5aju7t;\nfunction _init_properties_longjs_kt__tqrzid() {\n if (!properties_initialized_longjs_kt_5aju7t) {\n properties_initialized_longjs_kt_5aju7t = true;\n ZERO = fromInt(0);\n ONE = fromInt(1);\n NEG_ONE = fromInt(-1);\n MAX_VALUE = new Long(-1, 2147483647);\n MIN_VALUE = new Long(0, -2147483648);\n TWO_PWR_24_ = fromInt(16777216);\n }\n}\nfunction classMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('class', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n}\nfunction createMetadata(kind, name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, iid) {\n var undef = VOID;\n return {kind: kind, simpleName: name, associatedObjectKey: associatedObjectKey, associatedObjects: associatedObjects, suspendArity: suspendArity, $kClass$: undef, defaultConstructor: defaultConstructor, iid: iid};\n}\nfunction setMetadataFor(ctor, name, metadataConstructor, parent, interfaces, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n if (!(parent == null)) {\n ctor.prototype = Object.create(parent.prototype);\n ctor.prototype.constructor = ctor;\n }\n var metadata = metadataConstructor(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity == null ? [] : suspendArity);\n ctor.$metadata$ = metadata;\n if (!(interfaces == null)) {\n var receiver = !(metadata.iid == null) ? ctor : ctor.prototype;\n receiver.$imask$ = implement(interfaces);\n }\n}\nfunction interfaceMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('interface', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, generateInterfaceId());\n}\nfunction generateInterfaceId() {\n if (iid === VOID) {\n iid = 0;\n }\n // Inline function 'kotlin.js.unsafeCast' call\n iid = iid + 1 | 0;\n // Inline function 'kotlin.js.unsafeCast' call\n return iid;\n}\nvar iid;\nfunction objectMeta(name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity) {\n return createMetadata('object', name, defaultConstructor, associatedObjectKey, associatedObjects, suspendArity, null);\n}\nfunction numberToInt(a) {\n var tmp;\n if (a instanceof Long) {\n tmp = a.j6();\n } else {\n tmp = doubleToInt(a);\n }\n return tmp;\n}\nfunction doubleToInt(a) {\n var tmp;\n if (a > 2.147483647E9) {\n tmp = 2147483647;\n } else if (a < -2.147483648E9) {\n tmp = -2147483648;\n } else {\n // Inline function 'kotlin.js.jsBitwiseOr' call\n tmp = a | 0;\n }\n return tmp;\n}\nfunction toShort(a) {\n // Inline function 'kotlin.js.unsafeCast' call\n return a << 16 >> 16;\n}\nfunction numberToChar(a) {\n // Inline function 'kotlin.toUShort' call\n var this_0 = numberToInt(a);\n var tmp$ret$0 = _UShort___init__impl__jigrne(toShort(this_0));\n return _Char___init__impl__6a9atx_0(tmp$ret$0);\n}\nfunction numberRangeToNumber(start, endInclusive) {\n return new IntRange(start, endInclusive);\n}\nfunction get_propertyRefClassMetadataCache() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return propertyRefClassMetadataCache;\n}\nvar propertyRefClassMetadataCache;\nfunction metadataObject() {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return classMeta(VOID, VOID, VOID, VOID, VOID);\n}\nfunction getPropertyCallableRef(name, paramCount, superType, getter, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n getter.get = getter;\n getter.set = setter;\n getter.callableName = name;\n // Inline function 'kotlin.js.unsafeCast' call\n return getPropertyRefClass(getter, getKPropMetadata(paramCount, setter), getInterfaceMaskFor(getter, superType));\n}\nfunction getPropertyRefClass(obj, metadata, imask) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n obj.$metadata$ = metadata;\n obj.constructor = obj;\n obj.$imask$ = imask;\n return obj;\n}\nfunction getKPropMetadata(paramCount, setter) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n return get_propertyRefClassMetadataCache()[paramCount][setter == null ? 0 : 1];\n}\nfunction getInterfaceMaskFor(obj, superType) {\n _init_properties_reflectRuntime_kt__5r4uu3();\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = [superType];\n tmp = implement(tmp$ret$2);\n } else {\n tmp = tmp0_elvis_lhs;\n }\n return tmp;\n}\nvar properties_initialized_reflectRuntime_kt_inkhwd;\nfunction _init_properties_reflectRuntime_kt__5r4uu3() {\n if (!properties_initialized_reflectRuntime_kt_inkhwd) {\n properties_initialized_reflectRuntime_kt_inkhwd = true;\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp_0 = [metadataObject(), metadataObject()];\n // Inline function 'kotlin.arrayOf' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n propertyRefClassMetadataCache = [tmp, tmp_0, [metadataObject(), metadataObject()]];\n }\n}\nfunction isArrayish(o) {\n return isJsArray(o) ? true : isView(o);\n}\nfunction isJsArray(obj) {\n // Inline function 'kotlin.js.unsafeCast' call\n return Array.isArray(obj);\n}\nfunction isInterface(obj, iface) {\n return isInterfaceImpl(obj, iface.$metadata$.iid);\n}\nfunction isInterfaceImpl(obj, iface) {\n // Inline function 'kotlin.js.unsafeCast' call\n var tmp0_elvis_lhs = obj.$imask$;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var mask = tmp;\n return isBitSet(mask, iface);\n}\nfunction isArray(obj) {\n var tmp;\n if (isJsArray(obj)) {\n // Inline function 'kotlin.js.asDynamic' call\n tmp = !obj.$type$;\n } else {\n tmp = false;\n }\n return tmp;\n}\nfunction isNumber(a) {\n var tmp;\n if (typeof a === 'number') {\n tmp = true;\n } else {\n tmp = a instanceof Long;\n }\n return tmp;\n}\nfunction isComparable(value) {\n var type = typeof value;\n return ((type === 'string' ? true : type === 'boolean') ? true : isNumber(value)) ? true : isInterface(value, Comparable);\n}\nfunction isCharSequence(value) {\n return typeof value === 'string' ? true : isInterface(value, CharSequence);\n}\nfunction calculateErrorInfo(proto) {\n var tmp0_safe_receiver = proto.constructor;\n var metadata = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.$metadata$;\n var tmp2_safe_receiver = metadata == null ? null : metadata.errorInfo;\n if (tmp2_safe_receiver == null)\n null;\n else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n return tmp2_safe_receiver;\n }\n var result = 0;\n if (hasProp(proto, 'message'))\n result = result | 1;\n if (hasProp(proto, 'cause'))\n result = result | 2;\n if (!(result === 3)) {\n var parentProto = getPrototypeOf(proto);\n if (parentProto != Error.prototype) {\n result = result | calculateErrorInfo(parentProto);\n }\n }\n if (!(metadata == null)) {\n metadata.errorInfo = result;\n }\n return result;\n}\nfunction hasProp(proto, propName) {\n return proto.hasOwnProperty(propName);\n}\nfunction getPrototypeOf(obj) {\n return Object.getPrototypeOf(obj);\n}\nfunction get_VOID() {\n _init_properties_void_kt__3zg9as();\n return VOID;\n}\nvar VOID;\nvar properties_initialized_void_kt_e4ret2;\nfunction _init_properties_void_kt__3zg9as() {\n if (!properties_initialized_void_kt_e4ret2) {\n properties_initialized_void_kt_e4ret2 = true;\n VOID = void 0;\n }\n}\nfunction fill(_this__u8e3s4, element, fromIndex, toIndex) {\n fromIndex = fromIndex === VOID ? 0 : fromIndex;\n toIndex = toIndex === VOID ? _this__u8e3s4.length : toIndex;\n Companion_instance_5.k6(fromIndex, toIndex, _this__u8e3s4.length);\n // Inline function 'kotlin.js.nativeFill' call\n // Inline function 'kotlin.js.asDynamic' call\n _this__u8e3s4.fill(element, fromIndex, toIndex);\n}\nfunction asList(_this__u8e3s4) {\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n return new ArrayList(_this__u8e3s4);\n}\nfunction sort_0(_this__u8e3s4) {\n if (_this__u8e3s4.length > 1) {\n sortArray(_this__u8e3s4);\n }\n}\nfunction sortWith_0(_this__u8e3s4, comparator) {\n if (_this__u8e3s4.length > 1) {\n sortArrayWith(_this__u8e3s4, comparator);\n }\n}\nfunction copyOf(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return fillFrom(_this__u8e3s4, new Int32Array(newSize));\n}\nfunction copyOf_0(_this__u8e3s4, newSize) {\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(newSize >= 0)) {\n // Inline function 'kotlin.collections.copyOf.' call\n var message = 'Invalid new array size: ' + newSize + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n return arrayCopyResize(_this__u8e3s4, newSize, null);\n}\nfunction reverse(_this__u8e3s4) {\n var midPoint = (_this__u8e3s4.i() / 2 | 0) - 1 | 0;\n if (midPoint < 0)\n return Unit_instance;\n var reverseIndex = get_lastIndex_0(_this__u8e3s4);\n var inductionVariable = 0;\n if (inductionVariable <= midPoint)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var tmp = _this__u8e3s4.w(index);\n _this__u8e3s4.j(index, _this__u8e3s4.w(reverseIndex));\n _this__u8e3s4.j(reverseIndex, tmp);\n reverseIndex = reverseIndex - 1 | 0;\n }\n while (!(index === midPoint));\n}\nfunction digitToIntImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n var index = binarySearchRange(Digit_getInstance().l6_1, ch);\n var diff = ch - Digit_getInstance().l6_1[index] | 0;\n return diff < 10 ? diff : -1;\n}\nfunction binarySearchRange(array, needle) {\n var bottom = 0;\n var top = array.length - 1 | 0;\n var middle = -1;\n var value = 0;\n while (bottom <= top) {\n middle = (bottom + top | 0) / 2 | 0;\n value = array[middle];\n if (needle > value)\n bottom = middle + 1 | 0;\n else if (needle === value)\n return middle;\n else\n top = middle - 1 | 0;\n }\n return middle - (needle < value ? 1 : 0) | 0;\n}\nfunction Digit() {\n Digit_instance = this;\n var tmp = this;\n // Inline function 'kotlin.intArrayOf' call\n tmp.l6_1 = new Int32Array([48, 1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3558, 3664, 3792, 3872, 4160, 4240, 6112, 6160, 6470, 6608, 6784, 6800, 6992, 7088, 7232, 7248, 42528, 43216, 43264, 43472, 43504, 43600, 44016, 65296]);\n}\nvar Digit_instance;\nfunction Digit_getInstance() {\n if (Digit_instance == null)\n new Digit();\n return Digit_instance;\n}\nfunction isWhitespaceImpl(_this__u8e3s4) {\n // Inline function 'kotlin.code' call\n var ch = Char__toInt_impl_vasixd(_this__u8e3s4);\n return (((9 <= ch ? ch <= 13 : false) ? true : 28 <= ch ? ch <= 32 : false) ? true : ch === 160) ? true : ch > 4096 ? (((((ch === 5760 ? true : 8192 <= ch ? ch <= 8202 : false) ? true : ch === 8232) ? true : ch === 8233) ? true : ch === 8239) ? true : ch === 8287) ? true : ch === 12288 : false;\n}\nfunction releaseIntercepted($this) {\n var intercepted = $this.t6_1;\n if (!(intercepted == null) ? !(intercepted === $this) : false) {\n ensureNotNull($this.u6().v6(Key_instance)).w6(intercepted);\n }\n $this.t6_1 = CompletedContinuation_instance;\n}\nfunction CoroutineImpl(resultContinuation) {\n this.m6_1 = resultContinuation;\n this.n6_1 = 0;\n this.o6_1 = 0;\n this.p6_1 = null;\n this.q6_1 = null;\n this.r6_1 = null;\n var tmp = this;\n var tmp0_safe_receiver = this.m6_1;\n tmp.s6_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u6();\n this.t6_1 = null;\n}\nprotoOf(CoroutineImpl).u6 = function () {\n return ensureNotNull(this.s6_1);\n};\nprotoOf(CoroutineImpl).x6 = function (result) {\n var current = this;\n // Inline function 'kotlin.Result.getOrNull' call\n var tmp;\n if (_Result___get_isFailure__impl__jpiriv(result)) {\n tmp = null;\n } else {\n var tmp_0 = _Result___get_value__impl__bjfvqg(result);\n tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE();\n }\n var currentResult = tmp;\n var currentException = Result__exceptionOrNull_impl_p6xea9(result);\n while (true) {\n // Inline function 'kotlin.with' call\n // Inline function 'kotlin.contracts.contract' call\n var $this$with = current;\n if (currentException == null) {\n $this$with.p6_1 = currentResult;\n } else {\n $this$with.n6_1 = $this$with.o6_1;\n $this$with.q6_1 = currentException;\n }\n try {\n var outcome = $this$with.y6();\n if (outcome === get_COROUTINE_SUSPENDED())\n return Unit_instance;\n currentResult = outcome;\n currentException = null;\n } catch ($p) {\n var exception = $p;\n currentResult = null;\n // Inline function 'kotlin.js.unsafeCast' call\n currentException = exception;\n }\n releaseIntercepted($this$with);\n var completion = ensureNotNull($this$with.m6_1);\n var tmp_1;\n if (completion instanceof CoroutineImpl) {\n current = completion;\n tmp_1 = Unit_instance;\n } else {\n if (!(currentException == null)) {\n // Inline function 'kotlin.coroutines.resumeWithException' call\n // Inline function 'kotlin.Companion.failure' call\n var exception_0 = ensureNotNull(currentException);\n var tmp$ret$2 = _Result___init__impl__xyqfz8(createFailure(exception_0));\n completion.z6(tmp$ret$2);\n } else {\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var value = currentResult;\n var tmp$ret$4 = _Result___init__impl__xyqfz8(value);\n completion.z6(tmp$ret$4);\n }\n return Unit_instance;\n }\n }\n};\nprotoOf(CoroutineImpl).z6 = function (result) {\n return this.x6(result);\n};\nfunction CompletedContinuation() {\n}\nprotoOf(CompletedContinuation).u6 = function () {\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n};\nprotoOf(CompletedContinuation).x6 = function (result) {\n // Inline function 'kotlin.error' call\n var message = 'This continuation is already complete';\n throw IllegalStateException_init_$Create$_0(toString_2(message));\n};\nprotoOf(CompletedContinuation).z6 = function (result) {\n return this.x6(result);\n};\nprotoOf(CompletedContinuation).toString = function () {\n return 'This continuation is already complete';\n};\nvar CompletedContinuation_instance;\nfunction CompletedContinuation_getInstance() {\n return CompletedContinuation_instance;\n}\nfunction createCoroutineUnintercepted(_this__u8e3s4, receiver, completion) {\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineFromSuspendFunction' call\n return new _no_name_provided__qut3iv_0(completion, _this__u8e3s4, receiver, completion);\n}\nfunction invokeSuspendSuperTypeWithReceiver(_this__u8e3s4, receiver, completion) {\n throw new NotImplementedError('It is intrinsic method');\n}\nfunction _no_name_provided__qut3iv_0($completion, $this_createCoroutineUnintercepted, $receiver, $completion$1) {\n this.i7_1 = $this_createCoroutineUnintercepted;\n this.j7_1 = $receiver;\n this.k7_1 = $completion$1;\n CoroutineImpl.call(this, isInterface($completion, Continuation) ? $completion : THROW_CCE());\n}\nprotoOf(_no_name_provided__qut3iv_0).y6 = function () {\n if (this.q6_1 != null)\n throw this.q6_1;\n // Inline function 'kotlin.coroutines.intrinsics.createCoroutineUnintercepted.' call\n // Inline function 'kotlin.js.asDynamic' call\n var a = this.i7_1;\n return typeof a === 'function' ? a(this.j7_1, this.k7_1) : this.i7_1.l7(this.j7_1, this.k7_1);\n};\nfunction Exception_init_$Init$($this) {\n extendThrowable($this);\n Exception.call($this);\n return $this;\n}\nfunction Exception_init_$Create$() {\n var tmp = Exception_init_$Init$(objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$);\n return tmp;\n}\nfunction Exception_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Exception.call($this);\n return $this;\n}\nfunction Exception_init_$Create$_0(message) {\n var tmp = Exception_init_$Init$_0(message, objectCreate(protoOf(Exception)));\n captureStack(tmp, Exception_init_$Create$_0);\n return tmp;\n}\nfunction Exception() {\n captureStack(this, Exception);\n}\nfunction IllegalArgumentException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalArgumentException.call($this);\n return $this;\n}\nfunction IllegalArgumentException_init_$Create$() {\n var tmp = IllegalArgumentException_init_$Init$(objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$);\n return tmp;\n}\nfunction IllegalArgumentException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalArgumentException.call($this);\n return $this;\n}\nfunction IllegalArgumentException_init_$Create$_0(message) {\n var tmp = IllegalArgumentException_init_$Init$_0(message, objectCreate(protoOf(IllegalArgumentException)));\n captureStack(tmp, IllegalArgumentException_init_$Create$_0);\n return tmp;\n}\nfunction IllegalArgumentException() {\n captureStack(this, IllegalArgumentException);\n}\nfunction IndexOutOfBoundsException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IndexOutOfBoundsException.call($this);\n return $this;\n}\nfunction IndexOutOfBoundsException_init_$Create$() {\n var tmp = IndexOutOfBoundsException_init_$Init$(objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$);\n return tmp;\n}\nfunction IndexOutOfBoundsException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IndexOutOfBoundsException.call($this);\n return $this;\n}\nfunction IndexOutOfBoundsException_init_$Create$_0(message) {\n var tmp = IndexOutOfBoundsException_init_$Init$_0(message, objectCreate(protoOf(IndexOutOfBoundsException)));\n captureStack(tmp, IndexOutOfBoundsException_init_$Create$_0);\n return tmp;\n}\nfunction IndexOutOfBoundsException() {\n captureStack(this, IndexOutOfBoundsException);\n}\nfunction IllegalStateException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n IllegalStateException.call($this);\n return $this;\n}\nfunction IllegalStateException_init_$Create$() {\n var tmp = IllegalStateException_init_$Init$(objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$);\n return tmp;\n}\nfunction IllegalStateException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n IllegalStateException.call($this);\n return $this;\n}\nfunction IllegalStateException_init_$Create$_0(message) {\n var tmp = IllegalStateException_init_$Init$_0(message, objectCreate(protoOf(IllegalStateException)));\n captureStack(tmp, IllegalStateException_init_$Create$_0);\n return tmp;\n}\nfunction IllegalStateException() {\n captureStack(this, IllegalStateException);\n}\nfunction UnsupportedOperationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n UnsupportedOperationException.call($this);\n return $this;\n}\nfunction UnsupportedOperationException_init_$Create$() {\n var tmp = UnsupportedOperationException_init_$Init$(objectCreate(protoOf(UnsupportedOperationException)));\n captureStack(tmp, UnsupportedOperationException_init_$Create$);\n return tmp;\n}\nfunction UnsupportedOperationException() {\n captureStack(this, UnsupportedOperationException);\n}\nfunction RuntimeException_init_$Init$($this) {\n Exception_init_$Init$($this);\n RuntimeException.call($this);\n return $this;\n}\nfunction RuntimeException_init_$Create$() {\n var tmp = RuntimeException_init_$Init$(objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$);\n return tmp;\n}\nfunction RuntimeException_init_$Init$_0(message, $this) {\n Exception_init_$Init$_0(message, $this);\n RuntimeException.call($this);\n return $this;\n}\nfunction RuntimeException_init_$Create$_0(message) {\n var tmp = RuntimeException_init_$Init$_0(message, objectCreate(protoOf(RuntimeException)));\n captureStack(tmp, RuntimeException_init_$Create$_0);\n return tmp;\n}\nfunction RuntimeException() {\n captureStack(this, RuntimeException);\n}\nfunction NoSuchElementException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NoSuchElementException.call($this);\n return $this;\n}\nfunction NoSuchElementException_init_$Create$() {\n var tmp = NoSuchElementException_init_$Init$(objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$);\n return tmp;\n}\nfunction NoSuchElementException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n NoSuchElementException.call($this);\n return $this;\n}\nfunction NoSuchElementException_init_$Create$_0(message) {\n var tmp = NoSuchElementException_init_$Init$_0(message, objectCreate(protoOf(NoSuchElementException)));\n captureStack(tmp, NoSuchElementException_init_$Create$_0);\n return tmp;\n}\nfunction NoSuchElementException() {\n captureStack(this, NoSuchElementException);\n}\nfunction Error_init_$Init$($this) {\n extendThrowable($this);\n Error_0.call($this);\n return $this;\n}\nfunction Error_init_$Create$() {\n var tmp = Error_init_$Init$(objectCreate(protoOf(Error_0)));\n captureStack(tmp, Error_init_$Create$);\n return tmp;\n}\nfunction Error_init_$Init$_0(message, $this) {\n extendThrowable($this, message);\n Error_0.call($this);\n return $this;\n}\nfunction Error_0() {\n captureStack(this, Error_0);\n}\nfunction NumberFormatException_init_$Init$($this) {\n IllegalArgumentException_init_$Init$($this);\n NumberFormatException.call($this);\n return $this;\n}\nfunction NumberFormatException_init_$Create$() {\n var tmp = NumberFormatException_init_$Init$(objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$);\n return tmp;\n}\nfunction NumberFormatException_init_$Init$_0(message, $this) {\n IllegalArgumentException_init_$Init$_0(message, $this);\n NumberFormatException.call($this);\n return $this;\n}\nfunction NumberFormatException_init_$Create$_0(message) {\n var tmp = NumberFormatException_init_$Init$_0(message, objectCreate(protoOf(NumberFormatException)));\n captureStack(tmp, NumberFormatException_init_$Create$_0);\n return tmp;\n}\nfunction NumberFormatException() {\n captureStack(this, NumberFormatException);\n}\nfunction ArithmeticException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ArithmeticException.call($this);\n return $this;\n}\nfunction ArithmeticException_init_$Create$() {\n var tmp = ArithmeticException_init_$Init$(objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$);\n return tmp;\n}\nfunction ArithmeticException_init_$Init$_0(message, $this) {\n RuntimeException_init_$Init$_0(message, $this);\n ArithmeticException.call($this);\n return $this;\n}\nfunction ArithmeticException_init_$Create$_0(message) {\n var tmp = ArithmeticException_init_$Init$_0(message, objectCreate(protoOf(ArithmeticException)));\n captureStack(tmp, ArithmeticException_init_$Create$_0);\n return tmp;\n}\nfunction ArithmeticException() {\n captureStack(this, ArithmeticException);\n}\nfunction ConcurrentModificationException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ConcurrentModificationException.call($this);\n return $this;\n}\nfunction ConcurrentModificationException_init_$Create$() {\n var tmp = ConcurrentModificationException_init_$Init$(objectCreate(protoOf(ConcurrentModificationException)));\n captureStack(tmp, ConcurrentModificationException_init_$Create$);\n return tmp;\n}\nfunction ConcurrentModificationException() {\n captureStack(this, ConcurrentModificationException);\n}\nfunction NullPointerException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n NullPointerException.call($this);\n return $this;\n}\nfunction NullPointerException_init_$Create$() {\n var tmp = NullPointerException_init_$Init$(objectCreate(protoOf(NullPointerException)));\n captureStack(tmp, NullPointerException_init_$Create$);\n return tmp;\n}\nfunction NullPointerException() {\n captureStack(this, NullPointerException);\n}\nfunction ClassCastException_init_$Init$($this) {\n RuntimeException_init_$Init$($this);\n ClassCastException.call($this);\n return $this;\n}\nfunction ClassCastException_init_$Create$() {\n var tmp = ClassCastException_init_$Init$(objectCreate(protoOf(ClassCastException)));\n captureStack(tmp, ClassCastException_init_$Create$);\n return tmp;\n}\nfunction ClassCastException() {\n captureStack(this, ClassCastException);\n}\nfunction AbstractCollection$toString$lambda(this$0) {\n return function (it) {\n return it === this$0 ? '(this Collection)' : toString_1(it);\n };\n}\nfunction AbstractCollection() {\n}\nprotoOf(AbstractCollection).q = function (element) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.any' call\n var tmp;\n if (isInterface(this, Collection)) {\n tmp = this.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n var tmp0_iterator = this.n();\n while (tmp0_iterator.o()) {\n var element_0 = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractCollection.contains.' call\n if (equals(element_0, element)) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n }\n tmp$ret$0 = false;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractCollection).r = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractCollection.containsAll.' call\n if (!this.q(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractCollection).s = function () {\n return this.i() === 0;\n};\nprotoOf(AbstractCollection).toString = function () {\n return joinToString_0(this, ', ', '[', ']', VOID, VOID, AbstractCollection$toString$lambda(this));\n};\nprotoOf(AbstractCollection).toArray = function () {\n return collectionToArray(this);\n};\nfunction Companion_5() {\n this.e1_1 = 2147483639;\n}\nprotoOf(Companion_5).e2 = function (index, size) {\n if (index < 0 ? true : index >= size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n};\nprotoOf(Companion_5).f1 = function (index, size) {\n if (index < 0 ? true : index > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('index: ' + index + ', size: ' + size);\n }\n};\nprotoOf(Companion_5).k6 = function (fromIndex, toIndex, size) {\n if (fromIndex < 0 ? true : toIndex > size) {\n throw IndexOutOfBoundsException_init_$Create$_0('fromIndex: ' + fromIndex + ', toIndex: ' + toIndex + ', size: ' + size);\n }\n if (fromIndex > toIndex) {\n throw IllegalArgumentException_init_$Create$_0('fromIndex: ' + fromIndex + ' > toIndex: ' + toIndex);\n }\n};\nprotoOf(Companion_5).g3 = function (oldCapacity, minCapacity) {\n var newCapacity = oldCapacity + (oldCapacity >> 1) | 0;\n if ((newCapacity - minCapacity | 0) < 0)\n newCapacity = minCapacity;\n if ((newCapacity - 2147483639 | 0) > 0)\n newCapacity = minCapacity > 2147483639 ? IntCompanionObject_instance.MAX_VALUE : 2147483639;\n return newCapacity;\n};\nprotoOf(Companion_5).m1 = function (c) {\n var hashCode_0 = 1;\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var e = tmp0_iterator.p();\n var tmp = imul_0(31, hashCode_0);\n var tmp2_elvis_lhs = e == null ? null : hashCode(e);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n};\nprotoOf(Companion_5).l1 = function (c, other) {\n if (!(c.i() === other.i()))\n return false;\n var otherIterator = other.n();\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var elem = tmp0_iterator.p();\n var elemOther = otherIterator.p();\n if (!equals(elem, elemOther)) {\n return false;\n }\n }\n return true;\n};\nvar Companion_instance_5;\nfunction Companion_getInstance_5() {\n return Companion_instance_5;\n}\nfunction toString_3($this, o) {\n return o === $this ? '(this Map)' : toString_1(o);\n}\nfunction implFindEntry($this, key) {\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = $this.x1().n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMap.implFindEntry.' call\n if (equals(element.h4(), key)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n return tmp$ret$1;\n}\nfunction Companion_6() {\n}\nvar Companion_instance_6;\nfunction Companion_getInstance_6() {\n return Companion_instance_6;\n}\nfunction AbstractMap$toString$lambda(this$0) {\n return function (it) {\n return this$0.o7(it);\n };\n}\nfunction AbstractMap() {\n this.s1_1 = null;\n this.t1_1 = null;\n}\nprotoOf(AbstractMap).u1 = function (key) {\n return !(implFindEntry(this, key) == null);\n};\nprotoOf(AbstractMap).v1 = function (entry) {\n if (!(!(entry == null) ? isInterface(entry, Entry) : false))\n return false;\n var key = entry.h4();\n var value = entry.i4();\n // Inline function 'kotlin.collections.get' call\n var ourValue = (isInterface(this, Map_0) ? this : THROW_CCE()).w1(key);\n if (!equals(value, ourValue)) {\n return false;\n }\n var tmp;\n if (ourValue == null) {\n // Inline function 'kotlin.collections.containsKey' call\n tmp = !(isInterface(this, Map_0) ? this : THROW_CCE()).u1(key);\n } else {\n tmp = false;\n }\n if (tmp) {\n return false;\n }\n return true;\n};\nprotoOf(AbstractMap).equals = function (other) {\n if (other === this)\n return true;\n if (!(!(other == null) ? isInterface(other, Map_0) : false))\n return false;\n if (!(this.i() === other.i()))\n return false;\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = other.x1();\n var tmp;\n if (isInterface(this_0, Collection)) {\n tmp = this_0.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.AbstractMap.equals.' call\n if (!this.v1(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(AbstractMap).w1 = function (key) {\n var tmp0_safe_receiver = implFindEntry(this, key);\n return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i4();\n};\nprotoOf(AbstractMap).hashCode = function () {\n return hashCode(this.x1());\n};\nprotoOf(AbstractMap).i = function () {\n return this.x1().i();\n};\nprotoOf(AbstractMap).toString = function () {\n var tmp = this.x1();\n return joinToString_0(tmp, ', ', '{', '}', VOID, VOID, AbstractMap$toString$lambda(this));\n};\nprotoOf(AbstractMap).o7 = function (entry) {\n return toString_3(this, entry.h4()) + '=' + toString_3(this, entry.i4());\n};\nfunction Companion_7() {\n}\nprotoOf(Companion_7).z1 = function (c) {\n var hashCode_0 = 0;\n var tmp0_iterator = c.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n var tmp = hashCode_0;\n var tmp2_elvis_lhs = element == null ? null : hashCode(element);\n hashCode_0 = tmp + (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) | 0;\n }\n return hashCode_0;\n};\nprotoOf(Companion_7).y1 = function (c, other) {\n if (!(c.i() === other.i()))\n return false;\n // Inline function 'kotlin.collections.containsAll' call\n return c.r(other);\n};\nvar Companion_instance_7;\nfunction Companion_getInstance_7() {\n return Companion_instance_7;\n}\nfunction collectionToArrayCommonImpl(collection) {\n if (collection.s()) {\n // Inline function 'kotlin.emptyArray' call\n return [];\n }\n // Inline function 'kotlin.arrayOfNulls' call\n var size = collection.i();\n var destination = fillArrayVal(Array(size), null);\n var iterator = collection.n();\n var index = 0;\n while (iterator.o()) {\n var tmp0 = index;\n index = tmp0 + 1 | 0;\n destination[tmp0] = iterator.p();\n }\n return destination;\n}\nfunction mutableListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n}\nfunction listOf_0(elements) {\n return elements.length > 0 ? asList(elements) : emptyList();\n}\nfunction emptyList() {\n return EmptyList_getInstance();\n}\nfunction arrayListOf(elements) {\n return elements.length === 0 ? ArrayList_init_$Create$() : ArrayList_init_$Create$_1(new ArrayAsCollection(elements, true));\n}\nfunction EmptyIterator() {\n}\nprotoOf(EmptyIterator).o = function () {\n return false;\n};\nprotoOf(EmptyIterator).p = function () {\n throw NoSuchElementException_init_$Create$();\n};\nvar EmptyIterator_instance;\nfunction EmptyIterator_getInstance() {\n return EmptyIterator_instance;\n}\nfunction ArrayAsCollection(values, isVarargs) {\n this.p7_1 = values;\n this.q7_1 = isVarargs;\n}\nprotoOf(ArrayAsCollection).i = function () {\n return this.p7_1.length;\n};\nprotoOf(ArrayAsCollection).s = function () {\n // Inline function 'kotlin.collections.isEmpty' call\n return this.p7_1.length === 0;\n};\nprotoOf(ArrayAsCollection).r7 = function (element) {\n return contains(this.p7_1, element);\n};\nprotoOf(ArrayAsCollection).s7 = function (elements) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = elements.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'kotlin.collections.ArrayAsCollection.containsAll.' call\n if (!this.r7(element)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n return tmp$ret$0;\n};\nprotoOf(ArrayAsCollection).r = function (elements) {\n return this.s7(elements);\n};\nprotoOf(ArrayAsCollection).n = function () {\n return arrayIterator(this.p7_1);\n};\nfunction EmptyList() {\n EmptyList_instance = this;\n this.t7_1 = new Long(-1478467534, -1720727600);\n}\nprotoOf(EmptyList).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, List) : false) {\n tmp = other.s();\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EmptyList).hashCode = function () {\n return 1;\n};\nprotoOf(EmptyList).toString = function () {\n return '[]';\n};\nprotoOf(EmptyList).i = function () {\n return 0;\n};\nprotoOf(EmptyList).s = function () {\n return true;\n};\nprotoOf(EmptyList).u7 = function (elements) {\n return elements.s();\n};\nprotoOf(EmptyList).r = function (elements) {\n return this.u7(elements);\n};\nprotoOf(EmptyList).w = function (index) {\n throw IndexOutOfBoundsException_init_$Create$_0(\"Empty list doesn't contain element at index \" + index + '.');\n};\nprotoOf(EmptyList).n = function () {\n return EmptyIterator_instance;\n};\nvar EmptyList_instance;\nfunction EmptyList_getInstance() {\n if (EmptyList_instance == null)\n new EmptyList();\n return EmptyList_instance;\n}\nfunction get_lastIndex_0(_this__u8e3s4) {\n return _this__u8e3s4.i() - 1 | 0;\n}\nfunction optimizeReadOnlyList(_this__u8e3s4) {\n switch (_this__u8e3s4.i()) {\n case 0:\n return emptyList();\n case 1:\n return listOf(_this__u8e3s4.w(0));\n default:\n return _this__u8e3s4;\n }\n}\nfunction throwIndexOverflow() {\n throw ArithmeticException_init_$Create$_0('Index overflow has happened.');\n}\nfunction IndexedValue(index, value) {\n this.e5_1 = index;\n this.f5_1 = value;\n}\nprotoOf(IndexedValue).toString = function () {\n return 'IndexedValue(index=' + this.e5_1 + ', value=' + this.f5_1 + ')';\n};\nprotoOf(IndexedValue).hashCode = function () {\n var result = this.e5_1;\n result = imul_0(result, 31) + (this.f5_1 == null ? 0 : hashCode(this.f5_1)) | 0;\n return result;\n};\nprotoOf(IndexedValue).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof IndexedValue))\n return false;\n var tmp0_other_with_cast = other instanceof IndexedValue ? other : THROW_CCE();\n if (!(this.e5_1 === tmp0_other_with_cast.e5_1))\n return false;\n if (!equals(this.f5_1, tmp0_other_with_cast.f5_1))\n return false;\n return true;\n};\nfunction flatten(_this__u8e3s4) {\n var result = ArrayList_init_$Create$();\n var tmp0_iterator = _this__u8e3s4.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n addAll(result, element);\n }\n return result;\n}\nfunction collectionSizeOrDefault(_this__u8e3s4, default_0) {\n var tmp;\n if (isInterface(_this__u8e3s4, Collection)) {\n tmp = _this__u8e3s4.i();\n } else {\n tmp = default_0;\n }\n return tmp;\n}\nfunction removeLast(_this__u8e3s4) {\n var tmp;\n if (_this__u8e3s4.s()) {\n throw NoSuchElementException_init_$Create$_0('List is empty.');\n } else {\n tmp = _this__u8e3s4.z(get_lastIndex_0(_this__u8e3s4));\n }\n return tmp;\n}\nfunction addAll(_this__u8e3s4, elements) {\n if (isInterface(elements, Collection))\n return _this__u8e3s4.l(elements);\n else {\n var result = false;\n var tmp1_iterator = elements.n();\n while (tmp1_iterator.o()) {\n var item = tmp1_iterator.p();\n if (_this__u8e3s4.k(item))\n result = true;\n }\n return result;\n }\n}\nfunction IntIterator() {\n}\nprotoOf(IntIterator).p = function () {\n return this.v7();\n};\nfunction CharIterator() {\n}\nprotoOf(CharIterator).w7 = function () {\n return this.x7();\n};\nprotoOf(CharIterator).p = function () {\n return new Char(this.w7());\n};\nfunction sequence(block) {\n // Inline function 'kotlin.sequences.Sequence' call\n return new _no_name_provided__qut3iv_1(block);\n}\nfunction SequenceScope() {\n}\nprotoOf(SequenceScope).a8 = function (elements, $completion) {\n var tmp;\n if (isInterface(elements, Collection)) {\n tmp = elements.s();\n } else {\n tmp = false;\n }\n if (tmp)\n return Unit_instance;\n return this.z7(elements.n(), $completion);\n};\nprotoOf(SequenceScope).b8 = function (sequence, $completion) {\n return this.z7(sequence.n(), $completion);\n};\nfunction iterator(block) {\n var iterator = new SequenceBuilderIterator();\n iterator.f8_1 = createCoroutineUnintercepted(block, iterator, iterator);\n return iterator;\n}\nfunction nextNotReady($this) {\n if (!$this.o())\n throw NoSuchElementException_init_$Create$();\n else\n return $this.p();\n}\nfunction exceptionalState($this) {\n switch ($this.c8_1) {\n case 4:\n return NoSuchElementException_init_$Create$();\n case 5:\n return IllegalStateException_init_$Create$_0('Iterator has failed.');\n default:\n return IllegalStateException_init_$Create$_0('Unexpected state of the iterator: ' + $this.c8_1);\n }\n}\nfunction SequenceBuilderIterator() {\n SequenceScope.call(this);\n this.c8_1 = 0;\n this.d8_1 = null;\n this.e8_1 = null;\n this.f8_1 = null;\n}\nprotoOf(SequenceBuilderIterator).o = function () {\n while (true) {\n switch (this.c8_1) {\n case 0:\n break;\n case 1:\n if (ensureNotNull(this.e8_1).o()) {\n this.c8_1 = 2;\n return true;\n } else {\n this.e8_1 = null;\n }\n\n break;\n case 4:\n return false;\n case 3:\n case 2:\n return true;\n default:\n throw exceptionalState(this);\n }\n this.c8_1 = 5;\n var step = ensureNotNull(this.f8_1);\n this.f8_1 = null;\n // Inline function 'kotlin.coroutines.resume' call\n // Inline function 'kotlin.Companion.success' call\n var tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_instance);\n step.z6(tmp$ret$0);\n }\n};\nprotoOf(SequenceBuilderIterator).p = function () {\n switch (this.c8_1) {\n case 0:\n case 1:\n return nextNotReady(this);\n case 2:\n this.c8_1 = 1;\n return ensureNotNull(this.e8_1).p();\n case 3:\n this.c8_1 = 0;\n var tmp = this.d8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.d8_1 = null;\n return result;\n default:\n throw exceptionalState(this);\n }\n};\nprotoOf(SequenceBuilderIterator).y7 = function (value, $completion) {\n this.d8_1 = value;\n this.c8_1 = 3;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yield.' call\n this.f8_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n};\nprotoOf(SequenceBuilderIterator).z7 = function (iterator, $completion) {\n if (!iterator.o())\n return Unit_instance;\n this.e8_1 = iterator;\n this.c8_1 = 2;\n // Inline function 'kotlin.sequences.SequenceBuilderIterator.yieldAll.' call\n this.f8_1 = $completion;\n return get_COROUTINE_SUSPENDED();\n};\nprotoOf(SequenceBuilderIterator).g8 = function (result) {\n // Inline function 'kotlin.getOrThrow' call\n throwOnFailure(result);\n var tmp = _Result___get_value__impl__bjfvqg(result);\n (tmp == null ? true : !(tmp == null)) || THROW_CCE();\n this.c8_1 = 4;\n};\nprotoOf(SequenceBuilderIterator).z6 = function (result) {\n return this.g8(result);\n};\nprotoOf(SequenceBuilderIterator).u6 = function () {\n return EmptyCoroutineContext_getInstance();\n};\nfunction _no_name_provided__qut3iv_1($block) {\n this.h8_1 = $block;\n}\nprotoOf(_no_name_provided__qut3iv_1).n = function () {\n // Inline function 'kotlin.sequences.sequence.' call\n return iterator(this.h8_1);\n};\nfunction emptySequence() {\n return EmptySequence_instance;\n}\nfunction TransformingSequence$iterator$1(this$0) {\n this.j8_1 = this$0;\n this.i8_1 = this$0.k8_1.n();\n}\nprotoOf(TransformingSequence$iterator$1).p = function () {\n return this.j8_1.l8_1(this.i8_1.p());\n};\nprotoOf(TransformingSequence$iterator$1).o = function () {\n return this.i8_1.o();\n};\nfunction TransformingSequence(sequence, transformer) {\n this.k8_1 = sequence;\n this.l8_1 = transformer;\n}\nprotoOf(TransformingSequence).n = function () {\n return new TransformingSequence$iterator$1(this);\n};\nfunction calcNext($this) {\n if ($this.m8_1.o()) {\n var item = $this.m8_1.p();\n if ($this.p8_1.r8_1(item)) {\n $this.n8_1 = 1;\n $this.o8_1 = item;\n return Unit_instance;\n }\n }\n $this.n8_1 = 0;\n}\nfunction TakeWhileSequence$iterator$1(this$0) {\n this.p8_1 = this$0;\n this.m8_1 = this$0.q8_1.n();\n this.n8_1 = -1;\n this.o8_1 = null;\n}\nprotoOf(TakeWhileSequence$iterator$1).p = function () {\n if (this.n8_1 === -1) {\n calcNext(this);\n }\n if (this.n8_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var tmp = this.o8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.o8_1 = null;\n this.n8_1 = -1;\n return result;\n};\nprotoOf(TakeWhileSequence$iterator$1).o = function () {\n if (this.n8_1 === -1) {\n calcNext(this);\n }\n return this.n8_1 === 1;\n};\nfunction TakeWhileSequence(sequence, predicate) {\n this.q8_1 = sequence;\n this.r8_1 = predicate;\n}\nprotoOf(TakeWhileSequence).n = function () {\n return new TakeWhileSequence$iterator$1(this);\n};\nfunction DropTakeSequence() {\n}\nfunction drop_0($this) {\n while ($this.t8_1 > 0 ? $this.s8_1.o() : false) {\n $this.s8_1.p();\n $this.t8_1 = $this.t8_1 - 1 | 0;\n }\n}\nfunction DropSequence$iterator$1(this$0) {\n this.s8_1 = this$0.u8_1.n();\n this.t8_1 = this$0.v8_1;\n}\nprotoOf(DropSequence$iterator$1).p = function () {\n drop_0(this);\n return this.s8_1.p();\n};\nprotoOf(DropSequence$iterator$1).o = function () {\n drop_0(this);\n return this.s8_1.o();\n};\nfunction DropSequence(sequence, count) {\n this.u8_1 = sequence;\n this.v8_1 = count;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v8_1 >= 0)) {\n // Inline function 'kotlin.sequences.DropSequence.' call\n var message = 'count must be non-negative, but was ' + this.v8_1 + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n}\nprotoOf(DropSequence).c5 = function (n) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.sequences.DropSequence.drop.' call\n var n1 = this.v8_1 + n | 0;\n return n1 < 0 ? new DropSequence(this, n) : new DropSequence(this.u8_1, n1);\n};\nprotoOf(DropSequence).d5 = function (n) {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'kotlin.sequences.DropSequence.take.' call\n var n1 = this.v8_1 + n | 0;\n return n1 < 0 ? new TakeSequence(this, n) : new SubSequence(this.u8_1, this.v8_1, n1);\n};\nprotoOf(DropSequence).n = function () {\n return new DropSequence$iterator$1(this);\n};\nfunction drop_1($this) {\n while ($this.w8_1.o()) {\n var item = $this.w8_1.p();\n if (!$this.z8_1.b9_1(item)) {\n $this.y8_1 = item;\n $this.x8_1 = 1;\n return Unit_instance;\n }\n }\n $this.x8_1 = 0;\n}\nfunction DropWhileSequence$iterator$1(this$0) {\n this.z8_1 = this$0;\n this.w8_1 = this$0.a9_1.n();\n this.x8_1 = -1;\n this.y8_1 = null;\n}\nprotoOf(DropWhileSequence$iterator$1).p = function () {\n if (this.x8_1 === -1) {\n drop_1(this);\n }\n if (this.x8_1 === 1) {\n var tmp = this.y8_1;\n var result = (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n this.y8_1 = null;\n this.x8_1 = 0;\n return result;\n }\n return this.w8_1.p();\n};\nprotoOf(DropWhileSequence$iterator$1).o = function () {\n if (this.x8_1 === -1) {\n drop_1(this);\n }\n return this.x8_1 === 1 ? true : this.w8_1.o();\n};\nfunction DropWhileSequence(sequence, predicate) {\n this.a9_1 = sequence;\n this.b9_1 = predicate;\n}\nprotoOf(DropWhileSequence).n = function () {\n return new DropWhileSequence$iterator$1(this);\n};\nfunction calcNext_0($this) {\n while ($this.c9_1.o()) {\n var item = $this.c9_1.p();\n if ($this.f9_1.i9_1(item) === $this.f9_1.h9_1) {\n $this.e9_1 = item;\n $this.d9_1 = 1;\n return Unit_instance;\n }\n }\n $this.d9_1 = 0;\n}\nfunction FilteringSequence$iterator$1(this$0) {\n this.f9_1 = this$0;\n this.c9_1 = this$0.g9_1.n();\n this.d9_1 = -1;\n this.e9_1 = null;\n}\nprotoOf(FilteringSequence$iterator$1).p = function () {\n if (this.d9_1 === -1) {\n calcNext_0(this);\n }\n if (this.d9_1 === 0)\n throw NoSuchElementException_init_$Create$();\n var result = this.e9_1;\n this.e9_1 = null;\n this.d9_1 = -1;\n return (result == null ? true : !(result == null)) ? result : THROW_CCE();\n};\nprotoOf(FilteringSequence$iterator$1).o = function () {\n if (this.d9_1 === -1) {\n calcNext_0(this);\n }\n return this.d9_1 === 1;\n};\nfunction FilteringSequence(sequence, sendWhen, predicate) {\n sendWhen = sendWhen === VOID ? true : sendWhen;\n this.g9_1 = sequence;\n this.h9_1 = sendWhen;\n this.i9_1 = predicate;\n}\nprotoOf(FilteringSequence).n = function () {\n return new FilteringSequence$iterator$1(this);\n};\nfunction IndexingSequence$iterator$1(this$0) {\n this.j9_1 = this$0.l9_1.n();\n this.k9_1 = 0;\n}\nprotoOf(IndexingSequence$iterator$1).p = function () {\n var tmp1 = this.k9_1;\n this.k9_1 = tmp1 + 1 | 0;\n return new IndexedValue(checkIndexOverflow(tmp1), this.j9_1.p());\n};\nprotoOf(IndexingSequence$iterator$1).o = function () {\n return this.j9_1.o();\n};\nfunction IndexingSequence(sequence) {\n this.l9_1 = sequence;\n}\nprotoOf(IndexingSequence).n = function () {\n return new IndexingSequence$iterator$1(this);\n};\nfunction TakeSequence$iterator$1(this$0) {\n this.m9_1 = this$0.p9_1;\n this.n9_1 = this$0.o9_1.n();\n}\nprotoOf(TakeSequence$iterator$1).p = function () {\n if (this.m9_1 === 0)\n throw NoSuchElementException_init_$Create$();\n this.m9_1 = this.m9_1 - 1 | 0;\n return this.n9_1.p();\n};\nprotoOf(TakeSequence$iterator$1).o = function () {\n return this.m9_1 > 0 ? this.n9_1.o() : false;\n};\nfunction TakeSequence(sequence, count) {\n this.o9_1 = sequence;\n this.p9_1 = count;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.p9_1 >= 0)) {\n // Inline function 'kotlin.sequences.TakeSequence.' call\n var message = 'count must be non-negative, but was ' + this.p9_1 + '.';\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n}\nprotoOf(TakeSequence).c5 = function (n) {\n return n >= this.p9_1 ? emptySequence() : new SubSequence(this.o9_1, n, this.p9_1);\n};\nprotoOf(TakeSequence).d5 = function (n) {\n return n >= this.p9_1 ? this : new TakeSequence(this.o9_1, n);\n};\nprotoOf(TakeSequence).n = function () {\n return new TakeSequence$iterator$1(this);\n};\nfunction EmptySequence() {\n}\nprotoOf(EmptySequence).n = function () {\n return EmptyIterator_instance;\n};\nprotoOf(EmptySequence).c5 = function (n) {\n return EmptySequence_instance;\n};\nprotoOf(EmptySequence).d5 = function (n) {\n return EmptySequence_instance;\n};\nvar EmptySequence_instance;\nfunction EmptySequence_getInstance() {\n return EmptySequence_instance;\n}\nfunction drop_2($this) {\n while ($this.r9_1 < $this.s9_1.u9_1 ? $this.q9_1.o() : false) {\n $this.q9_1.p();\n $this.r9_1 = $this.r9_1 + 1 | 0;\n }\n}\nfunction _get_count__iw3m8u($this) {\n return $this.v9_1 - $this.u9_1 | 0;\n}\nfunction SubSequence$iterator$1(this$0) {\n this.s9_1 = this$0;\n this.q9_1 = this$0.t9_1.n();\n this.r9_1 = 0;\n}\nprotoOf(SubSequence$iterator$1).o = function () {\n drop_2(this);\n return this.r9_1 < this.s9_1.v9_1 ? this.q9_1.o() : false;\n};\nprotoOf(SubSequence$iterator$1).p = function () {\n drop_2(this);\n if (this.r9_1 >= this.s9_1.v9_1)\n throw NoSuchElementException_init_$Create$();\n this.r9_1 = this.r9_1 + 1 | 0;\n return this.q9_1.p();\n};\nfunction SubSequence(sequence, startIndex, endIndex) {\n this.t9_1 = sequence;\n this.u9_1 = startIndex;\n this.v9_1 = endIndex;\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.u9_1 >= 0)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message = 'startIndex should be non-negative, but is ' + this.u9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v9_1 >= 0)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message_0 = 'endIndex should be non-negative, but is ' + this.v9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message_0));\n }\n // Inline function 'kotlin.require' call\n // Inline function 'kotlin.contracts.contract' call\n if (!(this.v9_1 >= this.u9_1)) {\n // Inline function 'kotlin.sequences.SubSequence.' call\n var message_1 = 'endIndex should be not less than startIndex, but was ' + this.v9_1 + ' < ' + this.u9_1;\n throw IllegalArgumentException_init_$Create$_0(toString_2(message_1));\n }\n}\nprotoOf(SubSequence).c5 = function (n) {\n return n >= _get_count__iw3m8u(this) ? emptySequence() : new SubSequence(this.t9_1, this.u9_1 + n | 0, this.v9_1);\n};\nprotoOf(SubSequence).d5 = function (n) {\n return n >= _get_count__iw3m8u(this) ? this : new SubSequence(this.t9_1, this.u9_1, this.u9_1 + n | 0);\n};\nprotoOf(SubSequence).n = function () {\n return new SubSequence$iterator$1(this);\n};\nfunction emptySet() {\n return EmptySet_getInstance();\n}\nfunction hashSetOf(elements) {\n return toCollection(elements, HashSet_init_$Create$_0(mapCapacity(elements.length)));\n}\nfunction optimizeReadOnlySet(_this__u8e3s4) {\n switch (_this__u8e3s4.i()) {\n case 0:\n return emptySet();\n case 1:\n return setOf(_this__u8e3s4.n().p());\n default:\n return _this__u8e3s4;\n }\n}\nfunction EmptySet() {\n EmptySet_instance = this;\n this.w9_1 = new Long(1993859828, 793161749);\n}\nprotoOf(EmptySet).equals = function (other) {\n var tmp;\n if (!(other == null) ? isInterface(other, Set) : false) {\n tmp = other.s();\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(EmptySet).hashCode = function () {\n return 0;\n};\nprotoOf(EmptySet).toString = function () {\n return '[]';\n};\nprotoOf(EmptySet).i = function () {\n return 0;\n};\nprotoOf(EmptySet).s = function () {\n return true;\n};\nprotoOf(EmptySet).u7 = function (elements) {\n return elements.s();\n};\nprotoOf(EmptySet).r = function (elements) {\n return this.u7(elements);\n};\nprotoOf(EmptySet).n = function () {\n return EmptyIterator_instance;\n};\nvar EmptySet_instance;\nfunction EmptySet_getInstance() {\n if (EmptySet_instance == null)\n new EmptySet();\n return EmptySet_instance;\n}\nfunction naturalOrder() {\n var tmp = NaturalOrderComparator_instance;\n return isInterface(tmp, Comparator) ? tmp : THROW_CCE();\n}\nfunction NaturalOrderComparator() {\n}\nprotoOf(NaturalOrderComparator).x9 = function (a, b) {\n return compareTo_0(a, b);\n};\nprotoOf(NaturalOrderComparator).compare = function (a, b) {\n var tmp = (!(a == null) ? isComparable(a) : false) ? a : THROW_CCE();\n return this.x9(tmp, (!(b == null) ? isComparable(b) : false) ? b : THROW_CCE());\n};\nvar NaturalOrderComparator_instance;\nfunction NaturalOrderComparator_getInstance() {\n return NaturalOrderComparator_instance;\n}\nfunction compareValues(a, b) {\n if (a === b)\n return 0;\n if (a == null)\n return -1;\n if (b == null)\n return 1;\n return compareTo_0((!(a == null) ? isComparable(a) : false) ? a : THROW_CCE(), b);\n}\nfunction Continuation() {\n}\nfunction Key() {\n}\nvar Key_instance;\nfunction Key_getInstance() {\n return Key_instance;\n}\nfunction ContinuationInterceptor() {\n}\nfunction EmptyCoroutineContext() {\n EmptyCoroutineContext_instance = this;\n this.y9_1 = new Long(0, 0);\n}\nprotoOf(EmptyCoroutineContext).v6 = function (key) {\n return null;\n};\nprotoOf(EmptyCoroutineContext).hashCode = function () {\n return 0;\n};\nprotoOf(EmptyCoroutineContext).toString = function () {\n return 'EmptyCoroutineContext';\n};\nvar EmptyCoroutineContext_instance;\nfunction EmptyCoroutineContext_getInstance() {\n if (EmptyCoroutineContext_instance == null)\n new EmptyCoroutineContext();\n return EmptyCoroutineContext_instance;\n}\nfunction get_COROUTINE_SUSPENDED() {\n return CoroutineSingletons_COROUTINE_SUSPENDED_getInstance();\n}\nvar CoroutineSingletons_COROUTINE_SUSPENDED_instance;\nvar CoroutineSingletons_UNDECIDED_instance;\nvar CoroutineSingletons_RESUMED_instance;\nvar CoroutineSingletons_entriesInitialized;\nfunction CoroutineSingletons_initEntries() {\n if (CoroutineSingletons_entriesInitialized)\n return Unit_instance;\n CoroutineSingletons_entriesInitialized = true;\n CoroutineSingletons_COROUTINE_SUSPENDED_instance = new CoroutineSingletons('COROUTINE_SUSPENDED', 0);\n CoroutineSingletons_UNDECIDED_instance = new CoroutineSingletons('UNDECIDED', 1);\n CoroutineSingletons_RESUMED_instance = new CoroutineSingletons('RESUMED', 2);\n}\nfunction CoroutineSingletons(name, ordinal) {\n Enum.call(this, name, ordinal);\n}\nfunction CoroutineSingletons_COROUTINE_SUSPENDED_getInstance() {\n CoroutineSingletons_initEntries();\n return CoroutineSingletons_COROUTINE_SUSPENDED_instance;\n}\nfunction getProgressionLastElement(start, end, step) {\n var tmp;\n if (step > 0) {\n tmp = start >= end ? end : end - differenceModulo(end, start, step) | 0;\n } else if (step < 0) {\n tmp = start <= end ? end : end + differenceModulo(start, end, -step | 0) | 0;\n } else {\n throw IllegalArgumentException_init_$Create$_0('Step is zero.');\n }\n return tmp;\n}\nfunction differenceModulo(a, b, c) {\n return mod(mod(a, c) - mod(b, c) | 0, c);\n}\nfunction mod(a, b) {\n var mod = a % b | 0;\n return mod >= 0 ? mod : mod + b | 0;\n}\nfunction Companion_8() {\n Companion_instance_8 = this;\n this.z9_1 = new IntRange(1, 0);\n}\nvar Companion_instance_8;\nfunction Companion_getInstance_8() {\n if (Companion_instance_8 == null)\n new Companion_8();\n return Companion_instance_8;\n}\nfunction IntRange(start, endInclusive) {\n Companion_getInstance_8();\n IntProgression.call(this, start, endInclusive, 1);\n}\nprotoOf(IntRange).s = function () {\n return this.da_1 > this.ea_1;\n};\nprotoOf(IntRange).equals = function (other) {\n var tmp;\n if (other instanceof IntRange) {\n tmp = (this.s() ? other.s() : false) ? true : this.da_1 === other.da_1 ? this.ea_1 === other.ea_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(IntRange).hashCode = function () {\n return this.s() ? -1 : imul_0(31, this.da_1) + this.ea_1 | 0;\n};\nprotoOf(IntRange).toString = function () {\n return '' + this.da_1 + '..' + this.ea_1;\n};\nfunction Companion_9() {\n Companion_instance_9 = this;\n this.ga_1 = new CharRange(_Char___init__impl__6a9atx(1), _Char___init__impl__6a9atx(0));\n}\nvar Companion_instance_9;\nfunction Companion_getInstance_9() {\n if (Companion_instance_9 == null)\n new Companion_9();\n return Companion_instance_9;\n}\nfunction CharRange(start, endInclusive) {\n Companion_getInstance_9();\n CharProgression.call(this, start, endInclusive, 1);\n}\nprotoOf(CharRange).s = function () {\n return Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) > 0;\n};\nprotoOf(CharRange).equals = function (other) {\n var tmp;\n if (other instanceof CharRange) {\n tmp = (this.s() ? other.s() : false) ? true : this.ka_1 === other.ka_1 ? this.la_1 === other.la_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(CharRange).hashCode = function () {\n var tmp;\n if (this.s()) {\n tmp = -1;\n } else {\n // Inline function 'kotlin.code' call\n var this_0 = this.ka_1;\n var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);\n var tmp_0 = imul_0(31, tmp$ret$0);\n // Inline function 'kotlin.code' call\n var this_1 = this.la_1;\n tmp = tmp_0 + Char__toInt_impl_vasixd(this_1) | 0;\n }\n return tmp;\n};\nprotoOf(CharRange).toString = function () {\n return toString_0(this.ka_1) + '..' + toString_0(this.la_1);\n};\nfunction IntProgressionIterator(first, last, step) {\n IntIterator.call(this);\n this.na_1 = step;\n this.oa_1 = last;\n this.pa_1 = this.na_1 > 0 ? first <= last : first >= last;\n this.qa_1 = this.pa_1 ? first : this.oa_1;\n}\nprotoOf(IntProgressionIterator).o = function () {\n return this.pa_1;\n};\nprotoOf(IntProgressionIterator).v7 = function () {\n var value = this.qa_1;\n if (value === this.oa_1) {\n if (!this.pa_1)\n throw NoSuchElementException_init_$Create$();\n this.pa_1 = false;\n } else {\n this.qa_1 = this.qa_1 + this.na_1 | 0;\n }\n return value;\n};\nfunction CharProgressionIterator(first, last, step) {\n CharIterator.call(this);\n this.ra_1 = step;\n var tmp = this;\n // Inline function 'kotlin.code' call\n tmp.sa_1 = Char__toInt_impl_vasixd(last);\n this.ta_1 = this.ra_1 > 0 ? Char__compareTo_impl_ypi4mb(first, last) <= 0 : Char__compareTo_impl_ypi4mb(first, last) >= 0;\n var tmp_0 = this;\n var tmp_1;\n if (this.ta_1) {\n // Inline function 'kotlin.code' call\n tmp_1 = Char__toInt_impl_vasixd(first);\n } else {\n tmp_1 = this.sa_1;\n }\n tmp_0.ua_1 = tmp_1;\n}\nprotoOf(CharProgressionIterator).o = function () {\n return this.ta_1;\n};\nprotoOf(CharProgressionIterator).x7 = function () {\n var value = this.ua_1;\n if (value === this.sa_1) {\n if (!this.ta_1)\n throw NoSuchElementException_init_$Create$();\n this.ta_1 = false;\n } else {\n this.ua_1 = this.ua_1 + this.ra_1 | 0;\n }\n return numberToChar(value);\n};\nfunction Companion_10() {\n}\nprotoOf(Companion_10).b5 = function (rangeStart, rangeEnd, step) {\n return new IntProgression(rangeStart, rangeEnd, step);\n};\nvar Companion_instance_10;\nfunction Companion_getInstance_10() {\n return Companion_instance_10;\n}\nfunction IntProgression(start, endInclusive, step) {\n if (step === 0)\n throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n if (step === IntCompanionObject_instance.MIN_VALUE)\n throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n this.da_1 = start;\n this.ea_1 = getProgressionLastElement(start, endInclusive, step);\n this.fa_1 = step;\n}\nprotoOf(IntProgression).n = function () {\n return new IntProgressionIterator(this.da_1, this.ea_1, this.fa_1);\n};\nprotoOf(IntProgression).s = function () {\n return this.fa_1 > 0 ? this.da_1 > this.ea_1 : this.da_1 < this.ea_1;\n};\nprotoOf(IntProgression).equals = function (other) {\n var tmp;\n if (other instanceof IntProgression) {\n tmp = (this.s() ? other.s() : false) ? true : (this.da_1 === other.da_1 ? this.ea_1 === other.ea_1 : false) ? this.fa_1 === other.fa_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(IntProgression).hashCode = function () {\n return this.s() ? -1 : imul_0(31, imul_0(31, this.da_1) + this.ea_1 | 0) + this.fa_1 | 0;\n};\nprotoOf(IntProgression).toString = function () {\n return this.fa_1 > 0 ? '' + this.da_1 + '..' + this.ea_1 + ' step ' + this.fa_1 : '' + this.da_1 + ' downTo ' + this.ea_1 + ' step ' + (-this.fa_1 | 0);\n};\nfunction Companion_11() {\n}\nvar Companion_instance_11;\nfunction Companion_getInstance_11() {\n return Companion_instance_11;\n}\nfunction CharProgression(start, endInclusive, step) {\n if (step === 0)\n throw IllegalArgumentException_init_$Create$_0('Step must be non-zero.');\n if (step === IntCompanionObject_instance.MIN_VALUE)\n throw IllegalArgumentException_init_$Create$_0('Step must be greater than Int.MIN_VALUE to avoid overflow on negation.');\n this.ka_1 = start;\n var tmp = this;\n // Inline function 'kotlin.code' call\n var tmp_0 = Char__toInt_impl_vasixd(start);\n // Inline function 'kotlin.code' call\n var tmp$ret$1 = Char__toInt_impl_vasixd(endInclusive);\n tmp.la_1 = numberToChar(getProgressionLastElement(tmp_0, tmp$ret$1, step));\n this.ma_1 = step;\n}\nprotoOf(CharProgression).n = function () {\n return new CharProgressionIterator(this.ka_1, this.la_1, this.ma_1);\n};\nprotoOf(CharProgression).s = function () {\n return this.ma_1 > 0 ? Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) > 0 : Char__compareTo_impl_ypi4mb(this.ka_1, this.la_1) < 0;\n};\nprotoOf(CharProgression).equals = function (other) {\n var tmp;\n if (other instanceof CharProgression) {\n tmp = (this.s() ? other.s() : false) ? true : (this.ka_1 === other.ka_1 ? this.la_1 === other.la_1 : false) ? this.ma_1 === other.ma_1 : false;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(CharProgression).hashCode = function () {\n var tmp;\n if (this.s()) {\n tmp = -1;\n } else {\n // Inline function 'kotlin.code' call\n var this_0 = this.ka_1;\n var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);\n var tmp_0 = imul_0(31, tmp$ret$0);\n // Inline function 'kotlin.code' call\n var this_1 = this.la_1;\n var tmp$ret$1 = Char__toInt_impl_vasixd(this_1);\n tmp = imul_0(31, tmp_0 + tmp$ret$1 | 0) + this.ma_1 | 0;\n }\n return tmp;\n};\nprotoOf(CharProgression).toString = function () {\n return this.ma_1 > 0 ? toString_0(this.ka_1) + '..' + toString_0(this.la_1) + ' step ' + this.ma_1 : toString_0(this.ka_1) + ' downTo ' + toString_0(this.la_1) + ' step ' + (-this.ma_1 | 0);\n};\nfunction appendElement(_this__u8e3s4, element, transform) {\n if (!(transform == null)) {\n _this__u8e3s4.l4(transform(element));\n } else {\n if (element == null ? true : isCharSequence(element)) {\n _this__u8e3s4.l4(element);\n } else {\n if (element instanceof Char) {\n _this__u8e3s4.e4(element.g5_1);\n } else {\n _this__u8e3s4.l4(toString_1(element));\n }\n }\n }\n}\nfunction equals_0(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n if (_this__u8e3s4 === other)\n return true;\n if (!ignoreCase)\n return false;\n var thisUpper = uppercaseChar(_this__u8e3s4);\n var otherUpper = uppercaseChar(other);\n var tmp;\n if (thisUpper === otherUpper) {\n tmp = true;\n } else {\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = toString_0(thisUpper).toLowerCase();\n var tmp_0 = charSequenceGet(tmp$ret$2, 0);\n // Inline function 'kotlin.text.lowercaseChar' call\n // Inline function 'kotlin.text.lowercase' call\n // Inline function 'kotlin.js.unsafeCast' call\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$6 = toString_0(otherUpper).toLowerCase();\n tmp = tmp_0 === charSequenceGet(tmp$ret$6, 0);\n }\n return tmp;\n}\nfunction toIntOrNull(_this__u8e3s4) {\n return toIntOrNull_0(_this__u8e3s4, 10);\n}\nfunction numberFormatError(input) {\n throw NumberFormatException_init_$Create$_0(\"Invalid number format: '\" + input + \"'\");\n}\nfunction toIntOrNull_0(_this__u8e3s4, radix) {\n checkRadix(radix);\n var length = _this__u8e3s4.length;\n if (length === 0)\n return null;\n var start;\n var isNegative;\n var limit;\n var firstChar = charSequenceGet(_this__u8e3s4, 0);\n if (Char__compareTo_impl_ypi4mb(firstChar, _Char___init__impl__6a9atx(48)) < 0) {\n if (length === 1)\n return null;\n start = 1;\n if (firstChar === _Char___init__impl__6a9atx(45)) {\n isNegative = true;\n limit = IntCompanionObject_instance.MIN_VALUE;\n } else if (firstChar === _Char___init__impl__6a9atx(43)) {\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n } else\n return null;\n } else {\n start = 0;\n isNegative = false;\n limit = -IntCompanionObject_instance.MAX_VALUE | 0;\n }\n var limitForMaxRadix = (-IntCompanionObject_instance.MAX_VALUE | 0) / 36 | 0;\n var limitBeforeMul = limitForMaxRadix;\n var result = 0;\n var inductionVariable = start;\n if (inductionVariable < length)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var digit = digitOf(charSequenceGet(_this__u8e3s4, i), radix);\n if (digit < 0)\n return null;\n if (result < limitBeforeMul) {\n if (limitBeforeMul === limitForMaxRadix) {\n limitBeforeMul = limit / radix | 0;\n if (result < limitBeforeMul) {\n return null;\n }\n } else {\n return null;\n }\n }\n result = imul_0(result, radix);\n if (result < (limit + digit | 0))\n return null;\n result = result - digit | 0;\n }\n while (inductionVariable < length);\n return isNegative ? result : -result | 0;\n}\nfunction get_lastIndex_1(_this__u8e3s4) {\n return charSequenceLength(_this__u8e3s4) - 1 | 0;\n}\nfunction contains_0(_this__u8e3s4, char, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n return indexOf_0(_this__u8e3s4, char, VOID, ignoreCase) >= 0;\n}\nfunction startsWith_1(_this__u8e3s4, prefix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (!ignoreCase) {\n tmp_0 = typeof _this__u8e3s4 === 'string';\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = typeof prefix === 'string';\n } else {\n tmp = false;\n }\n if (tmp)\n return startsWith_0(_this__u8e3s4, prefix);\n else {\n return regionMatchesImpl(_this__u8e3s4, 0, prefix, 0, charSequenceLength(prefix), ignoreCase);\n }\n}\nfunction contains_1(_this__u8e3s4, other, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (typeof other === 'string') {\n tmp = indexOf_1(_this__u8e3s4, other, VOID, ignoreCase) >= 0;\n } else {\n tmp = indexOf_2(_this__u8e3s4, other, 0, charSequenceLength(_this__u8e3s4), ignoreCase) >= 0;\n }\n return tmp;\n}\nfunction endsWith_0(_this__u8e3s4, suffix, ignoreCase) {\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (!ignoreCase) {\n tmp_0 = typeof _this__u8e3s4 === 'string';\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = typeof suffix === 'string';\n } else {\n tmp = false;\n }\n if (tmp)\n return endsWith(_this__u8e3s4, suffix);\n else {\n return regionMatchesImpl(_this__u8e3s4, charSequenceLength(_this__u8e3s4) - charSequenceLength(suffix) | 0, suffix, 0, charSequenceLength(suffix), ignoreCase);\n }\n}\nfunction indexOf_0(_this__u8e3s4, char, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n // Inline function 'kotlin.charArrayOf' call\n var tmp$ret$0 = charArrayOf([char]);\n tmp = indexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString_0(char);\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(str, startIndex);\n }\n return tmp;\n}\nfunction regionMatchesImpl(_this__u8e3s4, thisOffset, other, otherOffset, length, ignoreCase) {\n if (((otherOffset < 0 ? true : thisOffset < 0) ? true : thisOffset > (charSequenceLength(_this__u8e3s4) - length | 0)) ? true : otherOffset > (charSequenceLength(other) - length | 0)) {\n return false;\n }\n var inductionVariable = 0;\n if (inductionVariable < length)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!equals_0(charSequenceGet(_this__u8e3s4, thisOffset + index | 0), charSequenceGet(other, otherOffset + index | 0), ignoreCase))\n return false;\n }\n while (inductionVariable < length);\n return true;\n}\nfunction indexOf_1(_this__u8e3s4, string, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n var tmp_0;\n if (ignoreCase) {\n tmp_0 = true;\n } else {\n tmp_0 = !(typeof _this__u8e3s4 === 'string');\n }\n if (tmp_0) {\n tmp = indexOf_2(_this__u8e3s4, string, startIndex, charSequenceLength(_this__u8e3s4), ignoreCase);\n } else {\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.js.asDynamic' call\n tmp = _this__u8e3s4.indexOf(string, startIndex);\n }\n return tmp;\n}\nfunction indexOf_2(_this__u8e3s4, other, startIndex, endIndex, ignoreCase, last) {\n last = last === VOID ? false : last;\n var indices = !last ? numberRangeToNumber(coerceAtLeast(startIndex, 0), coerceAtMost(endIndex, charSequenceLength(_this__u8e3s4))) : downTo(coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4)), coerceAtLeast(endIndex, 0));\n var tmp;\n if (typeof _this__u8e3s4 === 'string') {\n tmp = typeof other === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var inductionVariable = indices.da_1;\n var last_0 = indices.ea_1;\n var step = indices.fa_1;\n if ((step > 0 ? inductionVariable <= last_0 : false) ? true : step < 0 ? last_0 <= inductionVariable : false)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + step | 0;\n if (regionMatches(other, 0, _this__u8e3s4, index, charSequenceLength(other), ignoreCase))\n return index;\n }\n while (!(index === last_0));\n } else {\n var inductionVariable_0 = indices.da_1;\n var last_1 = indices.ea_1;\n var step_0 = indices.fa_1;\n if ((step_0 > 0 ? inductionVariable_0 <= last_1 : false) ? true : step_0 < 0 ? last_1 <= inductionVariable_0 : false)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + step_0 | 0;\n if (regionMatchesImpl(other, 0, _this__u8e3s4, index_0, charSequenceLength(other), ignoreCase))\n return index_0;\n }\n while (!(index_0 === last_1));\n }\n return -1;\n}\nfunction trim(_this__u8e3s4) {\n // Inline function 'kotlin.text.trim' call\n var startIndex = 0;\n var endIndex = charSequenceLength(_this__u8e3s4) - 1 | 0;\n var startFound = false;\n $l$loop: while (startIndex <= endIndex) {\n var index = !startFound ? startIndex : endIndex;\n var match = isWhitespace(charSequenceGet(_this__u8e3s4, index));\n if (!startFound) {\n if (!match)\n startFound = true;\n else\n startIndex = startIndex + 1 | 0;\n } else {\n if (!match)\n break $l$loop;\n else\n endIndex = endIndex - 1 | 0;\n }\n }\n return charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex + 1 | 0);\n}\nfunction indexOfAny(_this__u8e3s4, chars, startIndex, ignoreCase) {\n startIndex = startIndex === VOID ? 0 : startIndex;\n ignoreCase = ignoreCase === VOID ? false : ignoreCase;\n var tmp;\n if (!ignoreCase ? chars.length === 1 : false) {\n tmp = typeof _this__u8e3s4 === 'string';\n } else {\n tmp = false;\n }\n if (tmp) {\n var char = single(chars);\n // Inline function 'kotlin.text.nativeIndexOf' call\n // Inline function 'kotlin.text.nativeIndexOf' call\n var str = toString_0(char);\n // Inline function 'kotlin.js.asDynamic' call\n return _this__u8e3s4.indexOf(str, startIndex);\n }\n var inductionVariable = coerceAtLeast(startIndex, 0);\n var last = get_lastIndex_1(_this__u8e3s4);\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n var charAtIndex = charSequenceGet(_this__u8e3s4, index);\n var tmp$ret$4;\n $l$block: {\n // Inline function 'kotlin.collections.any' call\n var inductionVariable_0 = 0;\n var last_0 = chars.length;\n while (inductionVariable_0 < last_0) {\n var element = chars[inductionVariable_0];\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'kotlin.text.indexOfAny.' call\n if (equals_0(element, charAtIndex, ignoreCase)) {\n tmp$ret$4 = true;\n break $l$block;\n }\n }\n tmp$ret$4 = false;\n }\n if (tmp$ret$4)\n return index;\n }\n while (!(index === last));\n return -1;\n}\nfunction get_indices(_this__u8e3s4) {\n return numberRangeToNumber(0, charSequenceLength(_this__u8e3s4) - 1 | 0);\n}\nfunction contentEqualsImpl(_this__u8e3s4, other) {\n var tmp;\n if (!(_this__u8e3s4 == null) ? typeof _this__u8e3s4 === 'string' : false) {\n tmp = !(other == null) ? typeof other === 'string' : false;\n } else {\n tmp = false;\n }\n if (tmp) {\n return equals(_this__u8e3s4, other);\n }\n if (_this__u8e3s4 === other)\n return true;\n if ((_this__u8e3s4 == null ? true : other == null) ? true : !(charSequenceLength(_this__u8e3s4) === charSequenceLength(other)))\n return false;\n var inductionVariable = 0;\n var last = charSequenceLength(_this__u8e3s4);\n if (inductionVariable < last)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n if (!(charSequenceGet(_this__u8e3s4, i) === charSequenceGet(other, i))) {\n return false;\n }\n }\n while (inductionVariable < last);\n return true;\n}\nfunction UnsafeLazyImpl(initializer) {\n this.va_1 = initializer;\n this.wa_1 = UNINITIALIZED_VALUE_instance;\n}\nprotoOf(UnsafeLazyImpl).i4 = function () {\n if (this.wa_1 === UNINITIALIZED_VALUE_instance) {\n this.wa_1 = ensureNotNull(this.va_1)();\n this.va_1 = null;\n }\n var tmp = this.wa_1;\n return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE();\n};\nprotoOf(UnsafeLazyImpl).xa = function () {\n return !(this.wa_1 === UNINITIALIZED_VALUE_instance);\n};\nprotoOf(UnsafeLazyImpl).toString = function () {\n return this.xa() ? toString_1(this.i4()) : 'Lazy value not initialized yet.';\n};\nfunction UNINITIALIZED_VALUE() {\n}\nvar UNINITIALIZED_VALUE_instance;\nfunction UNINITIALIZED_VALUE_getInstance() {\n return UNINITIALIZED_VALUE_instance;\n}\nfunction _Result___init__impl__xyqfz8(value) {\n return value;\n}\nfunction _Result___get_value__impl__bjfvqg($this) {\n return $this;\n}\nfunction _Result___get_isFailure__impl__jpiriv($this) {\n var tmp = _Result___get_value__impl__bjfvqg($this);\n return tmp instanceof Failure;\n}\nfunction Result__exceptionOrNull_impl_p6xea9($this) {\n var tmp;\n if (_Result___get_value__impl__bjfvqg($this) instanceof Failure) {\n tmp = _Result___get_value__impl__bjfvqg($this).ya_1;\n } else {\n tmp = null;\n }\n return tmp;\n}\nfunction Companion_12() {\n}\nvar Companion_instance_12;\nfunction Companion_getInstance_12() {\n return Companion_instance_12;\n}\nfunction Failure(exception) {\n this.ya_1 = exception;\n}\nprotoOf(Failure).equals = function (other) {\n var tmp;\n if (other instanceof Failure) {\n tmp = equals(this.ya_1, other.ya_1);\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(Failure).hashCode = function () {\n return hashCode(this.ya_1);\n};\nprotoOf(Failure).toString = function () {\n return 'Failure(' + this.ya_1 + ')';\n};\nfunction createFailure(exception) {\n return new Failure(exception);\n}\nfunction throwOnFailure(_this__u8e3s4) {\n var tmp = _Result___get_value__impl__bjfvqg(_this__u8e3s4);\n if (tmp instanceof Failure)\n throw _Result___get_value__impl__bjfvqg(_this__u8e3s4).ya_1;\n}\nfunction NotImplementedError(message) {\n message = message === VOID ? 'An operation is not implemented.' : message;\n Error_init_$Init$_0(message, this);\n captureStack(this, NotImplementedError);\n}\nfunction Pair(first, second) {\n this.za_1 = first;\n this.ab_1 = second;\n}\nprotoOf(Pair).toString = function () {\n return '(' + this.za_1 + ', ' + this.ab_1 + ')';\n};\nprotoOf(Pair).bb = function () {\n return this.za_1;\n};\nprotoOf(Pair).cb = function () {\n return this.ab_1;\n};\nprotoOf(Pair).hashCode = function () {\n var result = this.za_1 == null ? 0 : hashCode(this.za_1);\n result = imul_0(result, 31) + (this.ab_1 == null ? 0 : hashCode(this.ab_1)) | 0;\n return result;\n};\nprotoOf(Pair).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Pair))\n return false;\n var tmp0_other_with_cast = other instanceof Pair ? other : THROW_CCE();\n if (!equals(this.za_1, tmp0_other_with_cast.za_1))\n return false;\n if (!equals(this.ab_1, tmp0_other_with_cast.ab_1))\n return false;\n return true;\n};\nfunction to(_this__u8e3s4, that) {\n return new Pair(_this__u8e3s4, that);\n}\nfunction _UShort___init__impl__jigrne(data) {\n return data;\n}\nfunction _UShort___get_data__impl__g0245($this) {\n return $this;\n}\n//region block: post-declaration\nprotoOf(InternalHashMap).t2 = containsAllEntries;\n//endregion\n//region block: init\nUnit_instance = new Unit();\nIntCompanionObject_instance = new IntCompanionObject();\n_stableSortingIsSupported = null;\nCompanion_instance_0 = new Companion_0();\nCompanion_instance_3 = new Companion_3();\nCompletedContinuation_instance = new CompletedContinuation();\nCompanion_instance_5 = new Companion_5();\nCompanion_instance_6 = new Companion_6();\nCompanion_instance_7 = new Companion_7();\nEmptyIterator_instance = new EmptyIterator();\nEmptySequence_instance = new EmptySequence();\nNaturalOrderComparator_instance = new NaturalOrderComparator();\nKey_instance = new Key();\nCompanion_instance_10 = new Companion_10();\nCompanion_instance_11 = new Companion_11();\nUNINITIALIZED_VALUE_instance = new UNINITIALIZED_VALUE();\nCompanion_instance_12 = new Companion_12();\n//endregion\n//region block: exports\nexport {\n VOID as VOID7hggqo3abtya,\n ArrayList_init_$Create$_0 as ArrayList_init_$Create$1s1wkrw82c0iw,\n ArrayList_init_$Create$ as ArrayList_init_$Create$2qnngtk1et9r9,\n LinkedHashMap_init_$Create$_0 as LinkedHashMap_init_$Create$7ps311k1ff73,\n LinkedHashMap_init_$Create$ as LinkedHashMap_init_$Create$1p3p95clvi93w,\n LinkedHashSet_init_$Create$ as LinkedHashSet_init_$Create$3qv13l7kzf0ni,\n Regex_init_$Create$ as Regex_init_$Create$xe1wdfnzfij1,\n StringBuilder_init_$Create$_0 as StringBuilder_init_$Create$2mwec1027v00x,\n Exception_init_$Init$_0 as Exception_init_$Init$32vb8wlewqrmh,\n NoSuchElementException_init_$Create$ as NoSuchElementException_init_$Create$wjvpfebkn9od,\n _Char___init__impl__6a9atx as _Char___init__impl__6a9atx281r2pd9o601g,\n Char__rangeTo_impl_tkncvp as Char__rangeTo_impl_tkncvp940rgm6i9zbm,\n Char__toInt_impl_vasixd as Char__toInt_impl_vasixd2xlaiz5u3itpv,\n toString_0 as toString35i91qxh73cps,\n Unit_instance as Unit_instance1fbcbse1fwigr,\n Collection as Collection1k04j3hzsbod0,\n asSequence as asSequence2jzw5xbq99nu9,\n checkIndexOverflow as checkIndexOverflow3frtmheghr0th,\n collectionSizeOrDefault as collectionSizeOrDefault36dulx8yinfqm,\n copyToArray as copyToArray2j022khrow2yi,\n distinct as distinct10qe1scfdvu5k,\n emptyList as emptyList1g2z5xcrvp2zy,\n firstOrNull as firstOrNull1982767dljvdy,\n first as first58ocm7j58k3q,\n flatten as flatten2dh4kibw1u0qq,\n joinToString_0 as joinToString1cxrrlmo0chqs,\n last as last1vo29oleiqj36,\n listOf as listOfvhqybd2zx248,\n listOf_0 as listOf1jh22dvmctj1r,\n mapCapacity as mapCapacity1h45rc3eh9p2l,\n mutableListOf as mutableListOf6oorvk2mtdmp,\n plus as plus310ted5e4i90h,\n removeLast as removeLast3759euu1xvfa3,\n reverse as reversenv3adafjrtzo,\n sortedWith as sortedWith2csnbbb21k0lg,\n sorted as sorted354mfsiv4s7x5,\n toMutableList as toMutableList20rdgwi7d3cwi,\n compareValues as compareValues1n2ayl87ihzfk,\n get_COROUTINE_SUSPENDED as get_COROUTINE_SUSPENDED3ujt3p13qm4iy,\n CoroutineImpl as CoroutineImpl2sn3kjnwmfr10,\n captureStack as captureStack1fzi4aczwc4hg,\n charSequenceGet as charSequenceGet1vxk1y5n17t1z,\n charSequenceLength as charSequenceLength3278n89t01tmv,\n charSequenceSubSequence as charSequenceSubSequence1iwpdba8s3jc7,\n classMeta as classMetawt99a3kyl3us,\n defineProp as defineProp3hxgpk2knu2px,\n equals as equals2au1ep9vhcato,\n getBooleanHashCode as getBooleanHashCode1bbj3u6b3v0a7,\n getPropertyCallableRef as getPropertyCallableRef1ajb9in178r5r,\n getStringHashCode as getStringHashCode26igk1bx568vk,\n hashCode as hashCodeq5arwsb9dgti,\n isArray as isArray1hxjqtqy632bc,\n isCharSequence as isCharSequence1ju9jr1w86plq,\n isInterface as isInterface3d6p8outrmvmk,\n numberToChar as numberToChar93r9buh19yek,\n objectMeta as objectMeta213120oau977m,\n protoOf as protoOf180f3jzyo7rfj,\n setMetadataFor as setMetadataForzkg9su7xd76l,\n toString_2 as toString1pkumu07cwy4m,\n KProperty1 as KProperty1ca4yb4wlo496,\n SequenceScope as SequenceScope1coiso86pqzq2,\n dropWhile as dropWhilemi4a7vbhep44,\n drop as drop1psm9p6la89df,\n elementAtOrNull as elementAtOrNull1ix22i58uw5uy,\n filterIndexed as filterIndexed1jls5lyem8w69,\n firstOrNull_0 as firstOrNull175qkyx53x0vd,\n map as mapsbvh18eqox7a,\n sequence as sequence2vgswtrxvqoa7,\n takeWhile as takeWhile17zwcj046i086,\n take as take2rh6pen3z50h7,\n toList_0 as toListx6x8nvfmvvht,\n toMutableList_1 as toMutableList1nmhgz6cua3pe,\n contains_1 as contains3ue2qo8xhmpf1,\n contains_0 as contains2el4s70rdq4ld,\n contentEquals_0 as contentEquals22p01ii2h7ey0,\n endsWith_0 as endsWith1a79dp5rc3sfv,\n getOrNull as getOrNull1cdnsfrisdp41,\n isBlank as isBlank1dvkhjjvox3p0,\n startsWith as startsWith5hna0vjiqaqm,\n startsWith_1 as startsWith38d3sbg25w0lx,\n toInt as toInt2q8uldh7sc951,\n toInt_0 as toInt5qdj874w69jh,\n toString as toString1h6jjoch8cjt8,\n trim as trim11nh7r46at6sx,\n Char as Char19o2r8palgjof,\n Comparator as Comparator2b3maoeh98xtg,\n Exception as Exceptiondt2hlxn7j7vw,\n NumberFormatException as NumberFormatException3bgsm2s9o4t55,\n Pair as Paire9pteg33gng7,\n THROW_CCE as THROW_CCE2g6jy02ryeudk,\n ensureNotNull as ensureNotNull1e947j3ixpazm,\n lazy as lazy2hsh8ze7j6ikd,\n toString_1 as toString30pk9tzaqopn,\n to as to2cs3ny02qtbcb,\n};\n//endregion\n\n//# sourceMappingURL=kotlin-kotlin-stdlib.mjs.map\n","import {\n protoOf180f3jzyo7rfj as protoOf,\n objectMeta213120oau977m as objectMeta,\n setMetadataForzkg9su7xd76l as setMetadataFor,\n copyToArray2j022khrow2yi as copyToArray,\n THROW_CCE2g6jy02ryeudk as THROW_CCE,\n isArray1hxjqtqy632bc as isArray,\n classMetawt99a3kyl3us as classMeta,\n defineProp3hxgpk2knu2px as defineProp,\n asSequence2jzw5xbq99nu9 as asSequence,\n toListx6x8nvfmvvht as toList,\n Unit_instance1fbcbse1fwigr as Unit_instance,\n firstOrNull175qkyx53x0vd as firstOrNull,\n mapsbvh18eqox7a as map,\n VOID7hggqo3abtya as VOID,\n charSequenceLength3278n89t01tmv as charSequenceLength,\n charSequenceGet1vxk1y5n17t1z as charSequenceGet,\n contains2el4s70rdq4ld as contains,\n Exceptiondt2hlxn7j7vw as Exception,\n getOrNull1cdnsfrisdp41 as getOrNull,\n Char19o2r8palgjof as Char,\n toString30pk9tzaqopn as toString,\n Exception_init_$Init$32vb8wlewqrmh as Exception_init_$Init$,\n captureStack1fzi4aczwc4hg as captureStack,\n getStringHashCode26igk1bx568vk as getStringHashCode,\n mutableListOf6oorvk2mtdmp as mutableListOf,\n last1vo29oleiqj36 as last,\n collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,\n ArrayList_init_$Create$1s1wkrw82c0iw as ArrayList_init_$Create$,\n ArrayList_init_$Create$2qnngtk1et9r9 as ArrayList_init_$Create$_0,\n ensureNotNull1e947j3ixpazm as ensureNotNull,\n LinkedHashSet_init_$Create$3qv13l7kzf0ni as LinkedHashSet_init_$Create$,\n distinct10qe1scfdvu5k as distinct,\n lazy2hsh8ze7j6ikd as lazy,\n firstOrNull1982767dljvdy as firstOrNull_0,\n equals2au1ep9vhcato as equals,\n KProperty1ca4yb4wlo496 as KProperty1,\n getPropertyCallableRef1ajb9in178r5r as getPropertyCallableRef,\n elementAtOrNull1ix22i58uw5uy as elementAtOrNull,\n CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,\n SequenceScope1coiso86pqzq2 as SequenceScope,\n get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,\n sequence2vgswtrxvqoa7 as sequence,\n takeWhile17zwcj046i086 as takeWhile,\n toMutableList1nmhgz6cua3pe as toMutableList,\n reversenv3adafjrtzo as reverse,\n dropWhilemi4a7vbhep44 as dropWhile,\n drop1psm9p6la89df as drop,\n removeLast3759euu1xvfa3 as removeLast,\n listOfvhqybd2zx248 as listOf,\n _Char___init__impl__6a9atx281r2pd9o601g as _Char___init__impl__6a9atx,\n StringBuilder_init_$Create$2mwec1027v00x as StringBuilder_init_$Create$,\n Char__toInt_impl_vasixd2xlaiz5u3itpv as Char__toInt_impl_vasixd,\n toString1h6jjoch8cjt8 as toString_0,\n hashCodeq5arwsb9dgti as hashCode,\n Comparator2b3maoeh98xtg as Comparator,\n compareValues1n2ayl87ihzfk as compareValues,\n listOf1jh22dvmctj1r as listOf_0,\n sortedWith2csnbbb21k0lg as sortedWith,\n isCharSequence1ju9jr1w86plq as isCharSequence,\n startsWith38d3sbg25w0lx as startsWith,\n contains3ue2qo8xhmpf1 as contains_0,\n endsWith1a79dp5rc3sfv as endsWith,\n toString1pkumu07cwy4m as toString_1,\n trim11nh7r46at6sx as trim,\n plus310ted5e4i90h as plus,\n take2rh6pen3z50h7 as take,\n filterIndexed1jls5lyem8w69 as filterIndexed,\n emptyList1g2z5xcrvp2zy as emptyList,\n sorted354mfsiv4s7x5 as sorted,\n contentEquals22p01ii2h7ey0 as contentEquals,\n isBlank1dvkhjjvox3p0 as isBlank,\n flatten2dh4kibw1u0qq as flatten,\n joinToString1cxrrlmo0chqs as joinToString,\n Collection1k04j3hzsbod0 as Collection,\n isInterface3d6p8outrmvmk as isInterface,\n getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,\n first58ocm7j58k3q as first,\n toString35i91qxh73cps as toString_2,\n startsWith5hna0vjiqaqm as startsWith_0,\n toInt2q8uldh7sc951 as toInt,\n NumberFormatException3bgsm2s9o4t55 as NumberFormatException,\n Paire9pteg33gng7 as Pair,\n LinkedHashMap_init_$Create$1p3p95clvi93w as LinkedHashMap_init_$Create$,\n mapCapacity1h45rc3eh9p2l as mapCapacity,\n LinkedHashMap_init_$Create$7ps311k1ff73 as LinkedHashMap_init_$Create$_0,\n charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,\n toInt5qdj874w69jh as toInt_0,\n numberToChar93r9buh19yek as numberToChar,\n to2cs3ny02qtbcb as to,\n checkIndexOverflow3frtmheghr0th as checkIndexOverflow,\n Regex_init_$Create$xe1wdfnzfij1 as Regex_init_$Create$,\n Char__rangeTo_impl_tkncvp940rgm6i9zbm as Char__rangeTo_impl_tkncvp,\n toMutableList20rdgwi7d3cwi as toMutableList_0,\n NoSuchElementException_init_$Create$wjvpfebkn9od as NoSuchElementException_init_$Create$,\n} from './kotlin-kotlin-stdlib.mjs';\n//region block: imports\nvar imul = Math.imul;\n//endregion\n//region block: pre-declaration\nsetMetadataFor(Companion, 'Companion', objectMeta);\nsetMetadataFor(CommonSelector, 'CommonSelector', classMeta);\nsetMetadataFor(CommonTransform, 'CommonTransform', classMeta);\nsetMetadataFor(Companion_0, 'Companion', objectMeta);\nsetMetadataFor(ExtSyntaxError, 'ExtSyntaxError', classMeta, Exception);\nsetMetadataFor(Companion_1, 'Companion', objectMeta);\nsetMetadataFor(Selector, 'Selector', classMeta);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_1, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_3, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$_init_$lambda$slambda_haa4hj_5, 'Transform$$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$querySelectorAll$lambda$slambda, 'Transform$querySelectorAll$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform$querySelectorTrackAll$lambda$slambda, 'Transform$querySelectorTrackAll$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(Transform, 'Transform', classMeta);\nsetMetadataFor(Expression, 'Expression', classMeta);\nsetMetadataFor(BinaryExpression, 'BinaryExpression', classMeta, Expression);\nsetMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_2, 'Companion', objectMeta);\nsetMetadataFor(CompareOperator, 'CompareOperator', classMeta);\nsetMetadataFor(Equal, 'Equal', objectMeta, CompareOperator);\nsetMetadataFor(NotEqual, 'NotEqual', objectMeta, CompareOperator);\nsetMetadataFor(Start, 'Start', objectMeta, CompareOperator);\nsetMetadataFor(NotStart, 'NotStart', objectMeta, CompareOperator);\nsetMetadataFor(Include, 'Include', objectMeta, CompareOperator);\nsetMetadataFor(NotInclude, 'NotInclude', objectMeta, CompareOperator);\nsetMetadataFor(End, 'End', objectMeta, CompareOperator);\nsetMetadataFor(NotEnd, 'NotEnd', objectMeta, CompareOperator);\nsetMetadataFor(Less, 'Less', objectMeta, CompareOperator);\nsetMetadataFor(LessEqual, 'LessEqual', objectMeta, CompareOperator);\nsetMetadataFor(More, 'More', objectMeta, CompareOperator);\nsetMetadataFor(MoreEqual, 'MoreEqual', objectMeta, CompareOperator);\nsetMetadataFor(ConnectExpression, 'ConnectExpression', classMeta);\nsetMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_3, 'Companion', objectMeta);\nsetMetadataFor(ConnectOperator, 'ConnectOperator', classMeta);\nsetMetadataFor(BeforeBrother, 'BeforeBrother', objectMeta, ConnectOperator);\nsetMetadataFor(AfterBrother, 'AfterBrother', objectMeta, ConnectOperator);\nsetMetadataFor(Ancestor, 'Ancestor', objectMeta, ConnectOperator);\nsetMetadataFor(Child, 'Child', objectMeta, ConnectOperator);\nsetMetadataFor(Descendant, 'Descendant', objectMeta, ConnectOperator);\nsetMetadataFor(ConnectSegment$traversal$o$invoke$slambda, 'ConnectSegment$traversal$o$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);\nsetMetadataFor(ConnectSegment$traversal$1, VOID, classMeta);\nsetMetadataFor(ConnectSegment$traversal$2, VOID, classMeta);\nsetMetadataFor(ConnectSegment, 'ConnectSegment', classMeta, VOID, VOID, ConnectSegment);\nsetMetadataFor(ConnectWrapper, 'ConnectWrapper', classMeta);\nsetMetadataFor(LogicalExpression, 'LogicalExpression', classMeta, Expression);\nsetMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);\nsetMetadataFor(Companion_4, 'Companion', objectMeta);\nsetMetadataFor(LogicalOperator, 'LogicalOperator', classMeta);\nsetMetadataFor(AndOperator, 'AndOperator', objectMeta, LogicalOperator);\nsetMetadataFor(OrOperator, 'OrOperator', objectMeta, LogicalOperator);\nsetMetadataFor(PolynomialExpression$traversal$1, VOID, classMeta);\nsetMetadataFor(PolynomialExpression, 'PolynomialExpression', classMeta, ConnectExpression, VOID, PolynomialExpression);\nsetMetadataFor(PropertySegment$matchName$1, VOID, classMeta);\nsetMetadataFor(PropertySegment$matchName$2, VOID, classMeta);\nsetMetadataFor(PropertySegment, 'PropertySegment', classMeta);\nsetMetadataFor(PropertyWrapper, 'PropertyWrapper', classMeta);\nsetMetadataFor(TupleExpression$traversal$1, VOID, classMeta);\nsetMetadataFor(TupleExpression, 'TupleExpression', classMeta, ConnectExpression);\nsetMetadataFor(Parser, 'Parser', classMeta);\nsetMetadataFor(ParserResult, 'ParserResult', classMeta);\nsetMetadataFor(ParserSet, 'ParserSet', objectMeta);\nsetMetadataFor(FilterIndexesSequence$iterator$1, VOID, classMeta);\nsetMetadataFor(FilterIndexesSequence, 'FilterIndexesSequence', classMeta);\n//endregion\nfunction Companion() {\n}\nprotoOf(Companion).parse = function (source) {\n return new CommonSelector(Companion_instance_1.db(source));\n};\nprotoOf(Companion).parseOrNull = function (source) {\n var tmp0_safe_receiver = Companion_instance_1.eb(source);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n tmp = new CommonSelector(tmp0_safe_receiver);\n }\n return tmp;\n};\nvar Companion_instance;\nfunction Companion_getInstance() {\n return Companion_instance;\n}\nfunction CommonSelector(selector) {\n this.fb_1 = selector;\n this.tracks = this.fb_1.qb();\n this.trackIndex = this.fb_1.ib_1;\n this.connectKeys = this.fb_1.rb();\n this.propertyNames = this.fb_1.sb();\n}\nprotoOf(CommonSelector).tb = function () {\n return this.fb_1;\n};\nprotoOf(CommonSelector).qb = function () {\n return this.tracks;\n};\nprotoOf(CommonSelector).ub = function () {\n return this.trackIndex;\n};\nprotoOf(CommonSelector).rb = function () {\n return this.connectKeys;\n};\nprotoOf(CommonSelector).sb = function () {\n return this.propertyNames;\n};\nprotoOf(CommonSelector).match = function (node, transform) {\n return this.fb_1.wb(node, transform.vb_1);\n};\nprotoOf(CommonSelector).matchTrack = function (node, transform) {\n var tmp0_safe_receiver = this.fb_1.xb(node, transform.vb_1);\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp_0 = tmp;\n return (tmp_0 == null ? true : isArray(tmp_0)) ? tmp_0 : THROW_CCE();\n};\nprotoOf(CommonSelector).toString = function () {\n return this.fb_1.toString();\n};\nfunction CommonTransform$transform$lambda($getChildren) {\n return function (node) {\n return asSequence($getChildren(node));\n };\n}\nfunction CommonTransform$querySelectorAll$lambda(this$0) {\n return function (node, selector) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = toList(this$0.vb_1.kc_1(node, selector.fb_1));\n var result = copyToArray(this_0);\n return isArray(result) ? result : THROW_CCE();\n };\n}\nfunction CommonTransform$querySelector$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.vb_1.kc_1(node, selector.fb_1));\n };\n}\nfunction CommonTransform$querySelectorTrackAll$lambda$lambda(it) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = copyToArray(it);\n return isArray(tmp) ? tmp : THROW_CCE();\n}\nfunction CommonTransform$querySelectorTrackAll$lambda(this$0) {\n return function (node, selector) {\n // Inline function 'kotlin.collections.toTypedArray' call\n var tmp = this$0.vb_1.mc_1(node, selector.fb_1);\n var this_0 = toList(map(tmp, CommonTransform$querySelectorTrackAll$lambda$lambda));\n var result = copyToArray(this_0);\n return isArray(result) ? result : THROW_CCE();\n };\n}\nfunction CommonTransform$querySelectorTrack$lambda(this$0) {\n return function (node, selector) {\n var tmp0_safe_receiver = firstOrNull(this$0.vb_1.mc_1(node, selector.fb_1));\n var tmp;\n if (tmp0_safe_receiver == null) {\n tmp = null;\n } else {\n // Inline function 'kotlin.collections.toTypedArray' call\n tmp = copyToArray(tmp0_safe_receiver);\n }\n var tmp_0 = tmp;\n return (tmp_0 == null ? true : isArray(tmp_0)) ? tmp_0 : THROW_CCE();\n };\n}\nfunction CommonTransform(getAttr, getName, getChildren, getParent) {\n var tmp = this;\n tmp.vb_1 = new Transform(getAttr, getName, CommonTransform$transform$lambda(getChildren), VOID, getParent);\n var tmp_0 = this;\n tmp_0.querySelectorAll = CommonTransform$querySelectorAll$lambda(this);\n var tmp_1 = this;\n tmp_1.querySelector = CommonTransform$querySelector$lambda(this);\n var tmp_2 = this;\n tmp_2.querySelectorTrackAll = CommonTransform$querySelectorTrackAll$lambda(this);\n var tmp_3 = this;\n tmp_3.querySelectorTrack = CommonTransform$querySelectorTrack$lambda(this);\n}\nprotoOf(CommonTransform).oc = function () {\n return this.vb_1;\n};\nprotoOf(CommonTransform).pc = function () {\n return this.querySelectorAll;\n};\nprotoOf(CommonTransform).qc = function () {\n return this.querySelector;\n};\nprotoOf(CommonTransform).rc = function () {\n return this.querySelectorTrackAll;\n};\nprotoOf(CommonTransform).sc = function () {\n return this.querySelectorTrack;\n};\nfunction Companion_0() {\n}\nprotoOf(Companion_0).tc = function (source, offset, value, expectedValue) {\n var tmp;\n if (offset >= source.length) {\n tmp = true;\n } else {\n var tmp_0;\n // Inline function 'kotlin.text.isNotEmpty' call\n if (charSequenceLength(value) > 0) {\n tmp_0 = !contains(value, charSequenceGet(source, offset));\n } else {\n tmp_0 = false;\n }\n tmp = tmp_0;\n }\n if (tmp) {\n throw new ExtSyntaxError(expectedValue == null ? value : expectedValue, offset, source);\n }\n};\nprotoOf(Companion_0).assert = function (source, offset, value, expectedValue, $super) {\n value = value === VOID ? '' : value;\n expectedValue = expectedValue === VOID ? null : expectedValue;\n return this.tc(source, offset, value, expectedValue);\n};\nprotoOf(Companion_0).uc = function (source, offset, expectedValue) {\n throw new ExtSyntaxError(expectedValue, offset, source);\n};\nprotoOf(Companion_0).throwError = function (source, offset, expectedValue, $super) {\n expectedValue = expectedValue === VOID ? '' : expectedValue;\n return this.uc(source, offset, expectedValue);\n};\nvar Companion_instance_0;\nfunction Companion_getInstance_0() {\n return Companion_instance_0;\n}\nfunction ExtSyntaxError(expectedValue, position, source) {\n var tmp = getOrNull(source, position);\n Exception_init_$Init$('expected ' + expectedValue + ' in selector at position ' + position + ', but got ' + toString(tmp == null ? null : new Char(tmp)), this);\n captureStack(this, ExtSyntaxError);\n this.expectedValue = expectedValue;\n this.position = position;\n this.source = source;\n}\nprotoOf(ExtSyntaxError).vc = function () {\n return this.expectedValue;\n};\nprotoOf(ExtSyntaxError).wc = function () {\n return this.position;\n};\nprotoOf(ExtSyntaxError).xc = function () {\n return this.source;\n};\nprotoOf(ExtSyntaxError).bb = function () {\n return this.expectedValue;\n};\nprotoOf(ExtSyntaxError).cb = function () {\n return this.position;\n};\nprotoOf(ExtSyntaxError).yc = function () {\n return this.source;\n};\nprotoOf(ExtSyntaxError).zc = function (expectedValue, position, source) {\n return new ExtSyntaxError(expectedValue, position, source);\n};\nprotoOf(ExtSyntaxError).copy = function (expectedValue, position, source, $super) {\n expectedValue = expectedValue === VOID ? this.expectedValue : expectedValue;\n position = position === VOID ? this.position : position;\n source = source === VOID ? this.source : source;\n return this.zc(expectedValue, position, source);\n};\nprotoOf(ExtSyntaxError).toString = function () {\n return 'ExtSyntaxError(expectedValue=' + this.expectedValue + ', position=' + this.position + ', source=' + this.source + ')';\n};\nprotoOf(ExtSyntaxError).hashCode = function () {\n var result = getStringHashCode(this.expectedValue);\n result = imul(result, 31) + this.position | 0;\n result = imul(result, 31) + getStringHashCode(this.source) | 0;\n return result;\n};\nprotoOf(ExtSyntaxError).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ExtSyntaxError))\n return false;\n var tmp0_other_with_cast = other instanceof ExtSyntaxError ? other : THROW_CCE();\n if (!(this.expectedValue === tmp0_other_with_cast.expectedValue))\n return false;\n if (!(this.position === tmp0_other_with_cast.position))\n return false;\n if (!(this.source === tmp0_other_with_cast.source))\n return false;\n return true;\n};\nfunction Companion_1() {\n}\nprotoOf(Companion_1).db = function (source) {\n return ParserSet_getInstance().xd_1(source);\n};\nprotoOf(Companion_1).eb = function (source) {\n var tmp;\n try {\n tmp = ParserSet_getInstance().xd_1(source);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof Exception) {\n var e = $p;\n tmp_0 = null;\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return tmp;\n};\nvar Companion_instance_1;\nfunction Companion_getInstance_1() {\n return Companion_instance_1;\n}\nfunction Selector$tracks$delegate$lambda(this$0) {\n return function () {\n var list = mutableListOf([this$0.gb_1]);\n $l$loop: while (true) {\n var tmp0_safe_receiver = last(list).zd_1;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n break $l$loop;\n } else {\n tmp = tmp1_elvis_lhs;\n }\n list.k(tmp);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(list, 10));\n var tmp0_iterator = list.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.Selector.tracks$delegate..' call\n var tmp$ret$0 = item.yd_1.ce_1;\n destination.k(tmp$ret$0);\n }\n return copyToArray(destination);\n };\n}\nfunction Selector$connectKeys$delegate$lambda(this$0) {\n return function () {\n var c = this$0.gb_1.zd_1;\n // Inline function 'kotlin.collections.mutableListOf' call\n var keys = ArrayList_init_$Create$_0();\n while (!(c == null)) {\n ensureNotNull(c).ae_1.je_1;\n keys.k(ensureNotNull(c).ae_1.ie_1.le_1);\n var tmp0_safe_receiver = c;\n var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n c = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zd_1;\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n return copyToArray(keys);\n };\n}\nfunction Selector$propertyNames$delegate$lambda(this$0) {\n return function () {\n var p = this$0.gb_1;\n // Inline function 'kotlin.collections.mutableSetOf' call\n var names = LinkedHashSet_init_$Create$();\n while (!(p == null)) {\n var s = ensureNotNull(p).yd_1;\n var tmp0_safe_receiver = ensureNotNull(p).zd_1;\n p = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.be_1;\n names.l(s.ge_1);\n }\n // Inline function 'kotlin.collections.toTypedArray' call\n var this_0 = distinct(names);\n return copyToArray(this_0);\n };\n}\nfunction Selector(propertyWrapper) {\n this.gb_1 = propertyWrapper;\n var tmp = this;\n tmp.hb_1 = lazy(Selector$tracks$delegate$lambda(this));\n var tmp_0 = this;\n // Inline function 'kotlin.let' call\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.indexOfFirst' call\n var this_0 = this.qb();\n var inductionVariable = 0;\n var last = this_0.length - 1 | 0;\n if (inductionVariable <= last)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.Selector.trackIndex.' call\n if (this_0[index]) {\n tmp$ret$1 = index;\n break $l$block;\n }\n }\n while (inductionVariable <= last);\n tmp$ret$1 = -1;\n }\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.trackIndex.' call\n var i = tmp$ret$1;\n tmp_0.ib_1 = i < 0 ? 0 : i;\n var tmp_1 = this;\n tmp_1.jb_1 = lazy(Selector$connectKeys$delegate$lambda(this));\n var tmp_2 = this;\n tmp_2.kb_1 = lazy(Selector$propertyNames$delegate$lambda(this));\n var tmp_3 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfIdValue.' call\n var e = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_4;\n var tmp_5;\n var tmp_6;\n var tmp_7;\n if (e instanceof BinaryExpression) {\n tmp_7 = e.me_1 === 'id';\n } else {\n tmp_7 = false;\n }\n if (tmp_7) {\n tmp_6 = equals(e.ne_1, Equal_getInstance());\n } else {\n tmp_6 = false;\n }\n if (tmp_6) {\n var tmp_8 = e.oe_1;\n tmp_5 = !(tmp_8 == null) ? typeof tmp_8 === 'string' : false;\n } else {\n tmp_5 = false;\n }\n if (tmp_5) {\n tmp_4 = e.oe_1;\n } else {\n tmp_4 = null;\n }\n tmp_3.lb_1 = tmp_4;\n var tmp_9 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfVidValue.' call\n var e_0 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_10;\n var tmp_11;\n var tmp_12;\n var tmp_13;\n if (e_0 instanceof BinaryExpression) {\n tmp_13 = e_0.me_1 === 'vid';\n } else {\n tmp_13 = false;\n }\n if (tmp_13) {\n tmp_12 = equals(e_0.ne_1, Equal_getInstance());\n } else {\n tmp_12 = false;\n }\n if (tmp_12) {\n var tmp_14 = e_0.oe_1;\n tmp_11 = !(tmp_14 == null) ? typeof tmp_14 === 'string' : false;\n } else {\n tmp_11 = false;\n }\n if (tmp_11) {\n tmp_10 = e_0.oe_1;\n } else {\n tmp_10 = null;\n }\n tmp_9.mb_1 = tmp_10;\n var tmp_15 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.qfTextValue.' call\n var e_1 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_16;\n var tmp_17;\n var tmp_18;\n var tmp_19;\n if (e_1 instanceof BinaryExpression) {\n tmp_19 = e_1.me_1 === 'text';\n } else {\n tmp_19 = false;\n }\n if (tmp_19) {\n tmp_18 = ((equals(e_1.ne_1, Equal_getInstance()) ? true : equals(e_1.ne_1, Start_getInstance())) ? true : equals(e_1.ne_1, Include_getInstance())) ? true : equals(e_1.ne_1, End_getInstance());\n } else {\n tmp_18 = false;\n }\n if (tmp_18) {\n var tmp_20 = e_1.oe_1;\n tmp_17 = !(tmp_20 == null) ? typeof tmp_20 === 'string' : false;\n } else {\n tmp_17 = false;\n }\n if (tmp_17) {\n tmp_16 = e_1.oe_1;\n } else {\n tmp_16 = null;\n }\n tmp_15.nb_1 = tmp_16;\n this.ob_1 = (!(this.lb_1 == null) ? true : !(this.mb_1 == null)) ? true : !(this.nb_1 == null);\n var tmp_21 = this;\n // Inline function 'kotlin.let' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.Selector.isMatchRoot.' call\n var e_2 = firstOrNull_0(this.gb_1.yd_1.ee_1);\n var tmp_22;\n var tmp_23;\n var tmp_24;\n if (e_2 instanceof BinaryExpression) {\n tmp_24 = e_2.me_1 === 'depth';\n } else {\n tmp_24 = false;\n }\n if (tmp_24) {\n tmp_23 = equals(e_2.ne_1, Equal_getInstance());\n } else {\n tmp_23 = false;\n }\n if (tmp_23) {\n tmp_22 = equals(e_2.oe_1, 0);\n } else {\n tmp_22 = false;\n }\n tmp_21.pb_1 = tmp_22;\n}\nprotoOf(Selector).toString = function () {\n return this.gb_1.toString();\n};\nprotoOf(Selector).qb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.hb_1;\n tracks$factory();\n return this_0.i4();\n};\nprotoOf(Selector).rb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.jb_1;\n connectKeys$factory();\n return this_0.i4();\n};\nprotoOf(Selector).sb = function () {\n // Inline function 'kotlin.getValue' call\n var this_0 = this.kb_1;\n propertyNames$factory();\n return this_0.i4();\n};\nprotoOf(Selector).qe = function (node, transform, trackNodes) {\n var tmp0_elvis_lhs = this.re(node, transform, trackNodes);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return null;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var trackTempNodes = tmp;\n return trackTempNodes.w(this.ib_1);\n};\nprotoOf(Selector).wb = function (node, transform, trackNodes, $super) {\n var tmp;\n if (trackNodes === VOID) {\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp = ArrayList_init_$Create$_0();\n } else {\n tmp = trackNodes;\n }\n trackNodes = tmp;\n return $super === VOID ? this.qe(node, transform, trackNodes) : $super.qe.call(this, node, transform, trackNodes);\n};\nprotoOf(Selector).re = function (node, transform, trackNodes) {\n return this.gb_1.re(node, transform, trackNodes);\n};\nprotoOf(Selector).xb = function (node, transform, trackNodes, $super) {\n var tmp;\n if (trackNodes === VOID) {\n // Inline function 'kotlin.collections.mutableListOf' call\n tmp = ArrayList_init_$Create$_0();\n } else {\n tmp = trackNodes;\n }\n trackNodes = tmp;\n return $super === VOID ? this.re(node, transform, trackNodes) : $super.re.call(this, node, transform, trackNodes);\n};\nfunction tracks$factory() {\n return getPropertyCallableRef('tracks', 1, KProperty1, function (receiver) {\n return receiver.qb();\n }, null);\n}\nfunction connectKeys$factory() {\n return getPropertyCallableRef('connectKeys', 1, KProperty1, function (receiver) {\n return receiver.rb();\n }, null);\n}\nfunction propertyNames$factory() {\n return getPropertyCallableRef('propertyNames', 1, KProperty1, function (receiver) {\n return receiver.sb();\n }, null);\n}\nfunction Transform$_init_$lambda$slambda$lambda_6maxik($node) {\n return function (it) {\n return !equals(it, $node);\n };\n}\nfunction Transform$_init_$lambda$slambda$lambda_6maxik_0($node) {\n return function (it) {\n return !equals(it, $node);\n };\n}\nfunction Transform$_init_$lambda_wpwstd($getChildren) {\n return function (node, offset) {\n return elementAtOrNull($getChildren(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj($getParent, $node, resultContinuation) {\n this.af_1 = $getParent;\n this.bf_1 = $node;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 5;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.af_1(this.bf_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.df_1 = tmp_1;\n this.n6_1 = 1;\n continue $sm;\n case 1:\n if (!!(this.df_1 == null)) {\n this.n6_1 = 4;\n continue $sm;\n }\n\n this.ef_1 = this.df_1;\n if (this.ef_1 == null) {\n this.ff_1 = null;\n this.n6_1 = 3;\n continue $sm;\n } else {\n var tmp_2 = this;\n tmp_2.gf_1 = this.ef_1;\n var tmp_3 = this;\n tmp_3.hf_1 = this.gf_1;\n this.n6_1 = 2;\n suspendResult = this.cf_1.y7(this.hf_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n }\n\n case 2:\n var tmp_4 = this;\n this.df_1 = this.af_1(this.hf_1);\n tmp_4.ff_1 = Unit_instance;\n this.n6_1 = 3;\n continue $sm;\n case 3:\n this.n6_1 = 1;\n continue $sm;\n case 4:\n return Unit_instance;\n case 5:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 5) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj).jf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj(this.af_1, this.bf_1, completion);\n i.cf_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_0($getParent, $node, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj($getParent, $node, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_0($getParent) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_0($getParent, node, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_1($getAncestors) {\n return function (node, offset) {\n return elementAtOrNull($getAncestors(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_1($getParent, $node, $getChildren, resultContinuation) {\n this.sf_1 = $getParent;\n this.tf_1 = $node;\n this.uf_1 = $getChildren;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 2;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.sf_1(this.tf_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.wf_1 = tmp_1;\n var tmp_2 = this;\n var tmp_3 = this.uf_1(this.wf_1);\n tmp_2.xf_1 = toMutableList(takeWhile(tmp_3, Transform$_init_$lambda$slambda$lambda_6maxik(this.tf_1)));\n reverse(this.xf_1);\n this.n6_1 = 1;\n suspendResult = this.vf_1.a8(this.xf_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n return Unit_instance;\n case 2:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 2) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_1).zf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_1(this.sf_1, this.tf_1, this.uf_1, completion);\n i.vf_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_2($getParent, $node, $getChildren, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_1($getParent, $node, $getChildren, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_2($getParent, $getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_2($getParent, node, $getChildren, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_3($getBeforeBrothers) {\n return function (node, offset) {\n return elementAtOrNull($getBeforeBrothers(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_3($getParent, $node, $getChildren, resultContinuation) {\n this.ig_1 = $getParent;\n this.jg_1 = $node;\n this.kg_1 = $getChildren;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 2;\n var tmp_0 = this;\n var tmp0_elvis_lhs = this.ig_1(this.jg_1);\n var tmp_1;\n if (tmp0_elvis_lhs == null) {\n return Unit_instance;\n } else {\n tmp_1 = tmp0_elvis_lhs;\n }\n\n tmp_0.mg_1 = tmp_1;\n this.n6_1 = 1;\n var tmp_2 = this.kg_1(this.mg_1);\n suspendResult = this.lg_1.b8(drop(dropWhile(tmp_2, Transform$_init_$lambda$slambda$lambda_6maxik_0(this.jg_1)), 1), this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 1:\n return Unit_instance;\n case 2:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 2) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_3).zf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_3(this.ig_1, this.jg_1, this.kg_1, completion);\n i.lg_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_4($getParent, $node, $getChildren, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_3($getParent, $node, $getChildren, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_4($getParent, $getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_4($getParent, node, $getChildren, null));\n };\n}\nfunction Transform$_init_$lambda_wpwstd_5($getAfterBrothers) {\n return function (node, offset) {\n return elementAtOrNull($getAfterBrothers(node), offset);\n };\n}\nfunction Transform$_init_$lambda$slambda_haa4hj_5($getChildren, $node, resultContinuation) {\n this.vg_1 = $getChildren;\n this.wg_1 = $node;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 4;\n this.yg_1 = toMutableList(this.vg_1(this.wg_1));\n if (this.yg_1.s())\n return Unit_instance;\n reverse(this.yg_1);\n var tmp_0 = this;\n tmp_0.zg_1 = ArrayList_init_$Create$_0();\n this.n6_1 = 1;\n continue $sm;\n case 1:\n this.ah_1 = removeLast(this.yg_1);\n this.n6_1 = 2;\n suspendResult = this.xg_1.y7(this.ah_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n\n continue $sm;\n case 2:\n var tmp0_iterator = this.vg_1(this.ah_1).n();\n while (tmp0_iterator.o()) {\n var childNode = tmp0_iterator.p();\n this.zg_1.k(childNode);\n }\n\n if (!this.zg_1.s()) {\n var inductionVariable = this.zg_1.i() - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n this.yg_1.k(this.zg_1.w(i));\n }\n while (0 <= inductionVariable);\n this.zg_1.h1();\n }\n\n if (!this.yg_1.s()) {\n this.n6_1 = 1;\n continue $sm;\n }\n\n this.n6_1 = 3;\n continue $sm;\n case 3:\n return Unit_instance;\n case 4:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 4) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$_init_$lambda$slambda_haa4hj_5).jf = function ($this$sequence, completion) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_5(this.vg_1, this.wg_1, completion);\n i.xg_1 = $this$sequence;\n return i;\n};\nfunction Transform$_init_$lambda$slambda_haa4hj_6($getChildren, $node, resultContinuation) {\n var i = new Transform$_init_$lambda$slambda_haa4hj_5($getChildren, $node, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$_init_$lambda_wpwstd_6($getChildren) {\n return function (node) {\n return sequence(Transform$_init_$lambda$slambda_haa4hj_6($getChildren, node, null));\n };\n}\nfunction Transform$querySelectorAll$lambda$slambda($selector, $node, this$0, resultContinuation) {\n this.jh_1 = $selector;\n this.kh_1 = $node;\n this.lh_1 = this$0;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$querySelectorAll$lambda$slambda).if = function ($this$sequence, $completion) {\n var tmp = this.jf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).l7 = function (p1, $completion) {\n return this.if(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 7;\n var tmp_0 = this;\n tmp_0.nh_1 = ArrayList_init_$Create$_0();\n this.oh_1 = this.jh_1.qe(this.kh_1, this.lh_1, this.nh_1);\n if (!(this.oh_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.mh_1.y7(this.oh_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n var tmp_1 = this;\n tmp_1.ph_1 = this.lh_1.jc_1(this.kh_1);\n this.qh_1 = this.ph_1.n();\n this.n6_1 = 3;\n continue $sm;\n case 3:\n if (!this.qh_1.o()) {\n this.n6_1 = 6;\n continue $sm;\n }\n\n this.rh_1 = this.qh_1.p();\n var tmp_2 = this;\n tmp_2.sh_1 = this.rh_1;\n this.nh_1.h1();\n this.th_1 = this.jh_1.qe(this.sh_1, this.lh_1, this.nh_1);\n if (!(this.th_1 == null)) {\n this.n6_1 = 4;\n suspendResult = this.mh_1.y7(this.th_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 5;\n continue $sm;\n }\n\n case 4:\n this.n6_1 = 5;\n continue $sm;\n case 5:\n this.n6_1 = 3;\n continue $sm;\n case 6:\n return Unit_instance;\n case 7:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 7) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$querySelectorAll$lambda$slambda).jf = function ($this$sequence, completion) {\n var i = new Transform$querySelectorAll$lambda$slambda(this.jh_1, this.kh_1, this.lh_1, completion);\n i.mh_1 = $this$sequence;\n return i;\n};\nfunction Transform$querySelectorAll$lambda$slambda_0($selector, $node, this$0, resultContinuation) {\n var i = new Transform$querySelectorAll$lambda$slambda($selector, $node, this$0, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.if($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$querySelectorAll$lambda(this$0) {\n return function (node, selector) {\n return sequence(Transform$querySelectorAll$lambda$slambda_0(selector, node, this$0, null));\n };\n}\nfunction Transform$querySelector$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.kc_1(node, selector));\n };\n}\nfunction Transform$querySelectorTrackAll$lambda$slambda($selector, $node, this$0, resultContinuation) {\n this.ci_1 = $selector;\n this.di_1 = $node;\n this.ei_1 = this$0;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).mi = function ($this$sequence, $completion) {\n var tmp = this.ni($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).l7 = function (p1, $completion) {\n return this.mi(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 7;\n this.gi_1 = this.ci_1.xb(this.di_1, this.ei_1);\n if (!(this.gi_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.fi_1.y7(this.gi_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n var tmp_0 = this;\n tmp_0.hi_1 = this.ei_1.jc_1(this.di_1);\n this.ii_1 = this.hi_1.n();\n this.n6_1 = 3;\n continue $sm;\n case 3:\n if (!this.ii_1.o()) {\n this.n6_1 = 6;\n continue $sm;\n }\n\n this.ji_1 = this.ii_1.p();\n var tmp_1 = this;\n tmp_1.ki_1 = this.ji_1;\n this.li_1 = this.ci_1.xb(this.ki_1, this.ei_1);\n if (!(this.li_1 == null)) {\n this.n6_1 = 4;\n suspendResult = this.fi_1.y7(this.li_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 5;\n continue $sm;\n }\n\n case 4:\n this.n6_1 = 5;\n continue $sm;\n case 5:\n this.n6_1 = 3;\n continue $sm;\n case 6:\n return Unit_instance;\n case 7:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 7) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(Transform$querySelectorTrackAll$lambda$slambda).ni = function ($this$sequence, completion) {\n var i = new Transform$querySelectorTrackAll$lambda$slambda(this.ci_1, this.di_1, this.ei_1, completion);\n i.fi_1 = $this$sequence;\n return i;\n};\nfunction Transform$querySelectorTrackAll$lambda$slambda_0($selector, $node, this$0, resultContinuation) {\n var i = new Transform$querySelectorTrackAll$lambda$slambda($selector, $node, this$0, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.mi($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction Transform$querySelectorTrackAll$lambda(this$0) {\n return function (node, selector) {\n return sequence(Transform$querySelectorTrackAll$lambda$slambda_0(selector, node, this$0, null));\n };\n}\nfunction Transform$querySelectorTrack$lambda(this$0) {\n return function (node, selector) {\n return firstOrNull(this$0.mc_1(node, selector));\n };\n}\nfunction Transform(getAttr, getName, getChildren, getChild, getParent, getAncestors, getAncestor, getBeforeBrothers, getBeforeBrother, getAfterBrothers, getAfterBrother, getDescendants) {\n var tmp;\n if (getChild === VOID) {\n tmp = Transform$_init_$lambda_wpwstd(getChildren);\n } else {\n tmp = getChild;\n }\n getChild = tmp;\n var tmp_0;\n if (getAncestors === VOID) {\n tmp_0 = Transform$_init_$lambda_wpwstd_0(getParent);\n } else {\n tmp_0 = getAncestors;\n }\n getAncestors = tmp_0;\n var tmp_1;\n if (getAncestor === VOID) {\n tmp_1 = Transform$_init_$lambda_wpwstd_1(getAncestors);\n } else {\n tmp_1 = getAncestor;\n }\n getAncestor = tmp_1;\n var tmp_2;\n if (getBeforeBrothers === VOID) {\n tmp_2 = Transform$_init_$lambda_wpwstd_2(getParent, getChildren);\n } else {\n tmp_2 = getBeforeBrothers;\n }\n getBeforeBrothers = tmp_2;\n var tmp_3;\n if (getBeforeBrother === VOID) {\n tmp_3 = Transform$_init_$lambda_wpwstd_3(getBeforeBrothers);\n } else {\n tmp_3 = getBeforeBrother;\n }\n getBeforeBrother = tmp_3;\n var tmp_4;\n if (getAfterBrothers === VOID) {\n tmp_4 = Transform$_init_$lambda_wpwstd_4(getParent, getChildren);\n } else {\n tmp_4 = getAfterBrothers;\n }\n getAfterBrothers = tmp_4;\n var tmp_5;\n if (getAfterBrother === VOID) {\n tmp_5 = Transform$_init_$lambda_wpwstd_5(getAfterBrothers);\n } else {\n tmp_5 = getAfterBrother;\n }\n getAfterBrother = tmp_5;\n var tmp_6;\n if (getDescendants === VOID) {\n tmp_6 = Transform$_init_$lambda_wpwstd_6(getChildren);\n } else {\n tmp_6 = getDescendants;\n }\n getDescendants = tmp_6;\n this.yb_1 = getAttr;\n this.zb_1 = getName;\n this.ac_1 = getChildren;\n this.bc_1 = getChild;\n this.cc_1 = getParent;\n this.dc_1 = getAncestors;\n this.ec_1 = getAncestor;\n this.fc_1 = getBeforeBrothers;\n this.gc_1 = getBeforeBrother;\n this.hc_1 = getAfterBrothers;\n this.ic_1 = getAfterBrother;\n this.jc_1 = getDescendants;\n var tmp_7 = this;\n tmp_7.kc_1 = Transform$querySelectorAll$lambda(this);\n var tmp_8 = this;\n tmp_8.lc_1 = Transform$querySelector$lambda(this);\n var tmp_9 = this;\n tmp_9.mc_1 = Transform$querySelectorTrackAll$lambda(this);\n var tmp_10 = this;\n tmp_10.nc_1 = Transform$querySelectorTrack$lambda(this);\n}\nfunction BinaryExpression(name, operator, value) {\n Expression.call(this);\n this.me_1 = name;\n this.ne_1 = operator;\n this.oe_1 = value;\n this.pe_1 = listOf(this.me_1);\n}\nprotoOf(BinaryExpression).oi = function (node, transform) {\n return this.ne_1.qi(transform.yb_1(node, this.me_1), this.oe_1);\n};\nprotoOf(BinaryExpression).sb = function () {\n return this.pe_1;\n};\nprotoOf(BinaryExpression).toString = function () {\n var tmp;\n var tmp_0 = this.oe_1;\n if (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) {\n var wrapChar = _Char___init__impl__6a9atx(34);\n var sb = StringBuilder_init_$Create$();\n sb.e4(wrapChar);\n // Inline function 'kotlin.text.forEach' call\n var indexedObject = this.oe_1;\n var inductionVariable = 0;\n while (inductionVariable < charSequenceLength(indexedObject)) {\n var element = charSequenceGet(indexedObject, inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.data.BinaryExpression.toString.' call\n var escapeChar = element === wrapChar ? wrapChar : element === _Char___init__impl__6a9atx(10) ? _Char___init__impl__6a9atx(110) : element === _Char___init__impl__6a9atx(13) ? _Char___init__impl__6a9atx(114) : element === _Char___init__impl__6a9atx(9) ? _Char___init__impl__6a9atx(116) : element === _Char___init__impl__6a9atx(8) ? _Char___init__impl__6a9atx(98) : element === _Char___init__impl__6a9atx(92) ? _Char___init__impl__6a9atx(92) : null;\n var tmp_1 = escapeChar;\n if (!((tmp_1 == null ? null : new Char(tmp_1)) == null)) {\n var tmp_2 = escapeChar;\n sb.d4('\\\\' + toString(tmp_2 == null ? null : new Char(tmp_2)));\n } else {\n // Inline function 'kotlin.code' call\n var tmp1_subject = Char__toInt_impl_vasixd(element);\n if (0 <= tmp1_subject ? tmp1_subject <= 15 : false) {\n // Inline function 'kotlin.code' call\n var tmp$ret$1 = Char__toInt_impl_vasixd(element);\n sb.d4('\\\\x0' + toString_0(tmp$ret$1, 16));\n } else if (10 <= tmp1_subject ? tmp1_subject <= 31 : false) {\n // Inline function 'kotlin.code' call\n var tmp$ret$2 = Char__toInt_impl_vasixd(element);\n sb.d4('\\\\x' + toString_0(tmp$ret$2, 16));\n } else {\n sb.e4(element);\n }\n }\n }\n sb.e4(wrapChar);\n tmp = sb.toString();\n } else {\n tmp = this.oe_1;\n }\n return this.me_1 + this.ne_1 + toString(tmp);\n};\nprotoOf(BinaryExpression).hashCode = function () {\n var result = getStringHashCode(this.me_1);\n result = imul(result, 31) + hashCode(this.ne_1) | 0;\n result = imul(result, 31) + (this.oe_1 == null ? 0 : hashCode(this.oe_1)) | 0;\n return result;\n};\nprotoOf(BinaryExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof BinaryExpression))\n return false;\n var tmp0_other_with_cast = other instanceof BinaryExpression ? other : THROW_CCE();\n if (!(this.me_1 === tmp0_other_with_cast.me_1))\n return false;\n if (!equals(this.ne_1, tmp0_other_with_cast.ne_1))\n return false;\n if (!equals(this.oe_1, tmp0_other_with_cast.oe_1))\n return false;\n return true;\n};\nfunction contentReversedEquals(_this__u8e3s4, $this, other) {\n if (_this__u8e3s4 === other)\n return true;\n if (!(charSequenceLength(_this__u8e3s4) === charSequenceLength(other)))\n return false;\n var inductionVariable = charSequenceLength(_this__u8e3s4) - 1 | 0;\n if (0 <= inductionVariable)\n do {\n var i = inductionVariable;\n inductionVariable = inductionVariable + -1 | 0;\n if (!(charSequenceGet(_this__u8e3s4, i) === charSequenceGet(other, i)))\n return false;\n }\n while (0 <= inductionVariable);\n return true;\n}\nfunction sam$kotlin_Comparator$0(function_0) {\n this.ri_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0).z4 = function (a, b) {\n return this.ri_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction CompareOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.pi_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.pi_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_2() {\n Companion_instance_2 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([Equal_getInstance(), NotEqual_getInstance(), Start_getInstance(), NotStart_getInstance(), Include_getInstance(), NotInclude_getInstance(), End_getInstance(), NotEnd_getInstance(), Less_getInstance(), LessEqual_getInstance(), More_getInstance(), MoreEqual_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = CompareOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp_0);\n tmp.si_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_2;\nfunction Companion_getInstance_2() {\n if (Companion_instance_2 == null)\n new Companion_2();\n return Companion_instance_2;\n}\nfunction Equal() {\n Equal_instance = this;\n CompareOperator.call(this, '=');\n}\nprotoOf(Equal).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contentReversedEquals(left, Companion_getInstance_2(), right);\n } else {\n tmp = equals(left, right);\n }\n return tmp;\n};\nvar Equal_instance;\nfunction Equal_getInstance() {\n if (Equal_instance == null)\n new Equal();\n return Equal_instance;\n}\nfunction NotEqual() {\n NotEqual_instance = this;\n CompareOperator.call(this, '!=');\n}\nprotoOf(NotEqual).qi = function (left, right) {\n return !Equal_getInstance().qi(left, right);\n};\nvar NotEqual_instance;\nfunction NotEqual_getInstance() {\n if (NotEqual_instance == null)\n new NotEqual();\n return NotEqual_instance;\n}\nfunction Start() {\n Start_instance = this;\n CompareOperator.call(this, '^=');\n}\nprotoOf(Start).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = startsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Start_instance;\nfunction Start_getInstance() {\n if (Start_instance == null)\n new Start();\n return Start_instance;\n}\nfunction NotStart() {\n NotStart_instance = this;\n CompareOperator.call(this, '!^=');\n}\nprotoOf(NotStart).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !startsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotStart_instance;\nfunction NotStart_getInstance() {\n if (NotStart_instance == null)\n new NotStart();\n return NotStart_instance;\n}\nfunction Include() {\n Include_instance = this;\n CompareOperator.call(this, '*=');\n}\nprotoOf(Include).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = contains_0(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Include_instance;\nfunction Include_getInstance() {\n if (Include_instance == null)\n new Include();\n return Include_instance;\n}\nfunction NotInclude() {\n NotInclude_instance = this;\n CompareOperator.call(this, '!*=');\n}\nprotoOf(NotInclude).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !contains_0(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotInclude_instance;\nfunction NotInclude_getInstance() {\n if (NotInclude_instance == null)\n new NotInclude();\n return NotInclude_instance;\n}\nfunction End() {\n End_instance = this;\n CompareOperator.call(this, '$=');\n}\nprotoOf(End).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = endsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar End_instance;\nfunction End_getInstance() {\n if (End_instance == null)\n new End();\n return End_instance;\n}\nfunction NotEnd() {\n NotEnd_instance = this;\n CompareOperator.call(this, '!$=');\n}\nprotoOf(NotEnd).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? isCharSequence(left) : false) {\n tmp_0 = !(right == null) ? isCharSequence(right) : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = !endsWith(left, right);\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar NotEnd_instance;\nfunction NotEnd_getInstance() {\n if (NotEnd_instance == null)\n new NotEnd();\n return NotEnd_instance;\n}\nfunction Less() {\n Less_instance = this;\n CompareOperator.call(this, '<');\n}\nprotoOf(Less).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left < right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar Less_instance;\nfunction Less_getInstance() {\n if (Less_instance == null)\n new Less();\n return Less_instance;\n}\nfunction LessEqual() {\n LessEqual_instance = this;\n CompareOperator.call(this, '<=');\n}\nprotoOf(LessEqual).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left <= right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar LessEqual_instance;\nfunction LessEqual_getInstance() {\n if (LessEqual_instance == null)\n new LessEqual();\n return LessEqual_instance;\n}\nfunction More() {\n More_instance = this;\n CompareOperator.call(this, '>');\n}\nprotoOf(More).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left > right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar More_instance;\nfunction More_getInstance() {\n if (More_instance == null)\n new More();\n return More_instance;\n}\nfunction MoreEqual() {\n MoreEqual_instance = this;\n CompareOperator.call(this, '>=');\n}\nprotoOf(MoreEqual).qi = function (left, right) {\n var tmp;\n var tmp_0;\n if (!(left == null) ? typeof left === 'number' : false) {\n tmp_0 = !(right == null) ? typeof right === 'number' : false;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = left >= right;\n } else {\n tmp = false;\n }\n return tmp;\n};\nvar MoreEqual_instance;\nfunction MoreEqual_getInstance() {\n if (MoreEqual_instance == null)\n new MoreEqual();\n return MoreEqual_instance;\n}\nfunction CompareOperator(key) {\n Companion_getInstance_2();\n this.pi_1 = key;\n}\nprotoOf(CompareOperator).toString = function () {\n return this.pi_1;\n};\nfunction ConnectExpression() {\n}\nfunction sam$kotlin_Comparator$0_0(function_0) {\n this.ij_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0_0).z4 = function (a, b) {\n return this.ij_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction ConnectOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.le_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.le_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_3() {\n Companion_instance_3 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([BeforeBrother_getInstance(), AfterBrother_getInstance(), Ancestor_getInstance(), Child_getInstance(), Descendant_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = ConnectOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_0(tmp_0);\n tmp.jj_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_3;\nfunction Companion_getInstance_3() {\n if (Companion_instance_3 == null)\n new Companion_3();\n return Companion_instance_3;\n}\nfunction BeforeBrother() {\n BeforeBrother_instance = this;\n ConnectOperator.call(this, '+');\n}\nprotoOf(BeforeBrother).lj = function (node, transform) {\n return transform.fc_1(node);\n};\nprotoOf(BeforeBrother).mj = function (node, transform, offset) {\n return transform.gc_1(node, offset);\n};\nvar BeforeBrother_instance;\nfunction BeforeBrother_getInstance() {\n if (BeforeBrother_instance == null)\n new BeforeBrother();\n return BeforeBrother_instance;\n}\nfunction AfterBrother() {\n AfterBrother_instance = this;\n ConnectOperator.call(this, '-');\n}\nprotoOf(AfterBrother).lj = function (node, transform) {\n return transform.hc_1(node);\n};\nprotoOf(AfterBrother).mj = function (node, transform, offset) {\n return transform.ic_1(node, offset);\n};\nvar AfterBrother_instance;\nfunction AfterBrother_getInstance() {\n if (AfterBrother_instance == null)\n new AfterBrother();\n return AfterBrother_instance;\n}\nfunction Ancestor() {\n Ancestor_instance = this;\n ConnectOperator.call(this, '>');\n}\nprotoOf(Ancestor).lj = function (node, transform) {\n return transform.dc_1(node);\n};\nprotoOf(Ancestor).mj = function (node, transform, offset) {\n return transform.ec_1(node, offset);\n};\nvar Ancestor_instance;\nfunction Ancestor_getInstance() {\n if (Ancestor_instance == null)\n new Ancestor();\n return Ancestor_instance;\n}\nfunction Child() {\n Child_instance = this;\n ConnectOperator.call(this, '<');\n}\nprotoOf(Child).lj = function (node, transform) {\n return transform.ac_1(node);\n};\nprotoOf(Child).mj = function (node, transform, offset) {\n return transform.bc_1(node, offset);\n};\nvar Child_instance;\nfunction Child_getInstance() {\n if (Child_instance == null)\n new Child();\n return Child_instance;\n}\nfunction Descendant() {\n Descendant_instance = this;\n ConnectOperator.call(this, '<<');\n}\nprotoOf(Descendant).lj = function (node, transform) {\n return transform.jc_1(node);\n};\nprotoOf(Descendant).mj = function (node, transform, offset) {\n return elementAtOrNull(transform.jc_1(node), offset);\n};\nvar Descendant_instance;\nfunction Descendant_getInstance() {\n if (Descendant_instance == null)\n new Descendant();\n return Descendant_instance;\n}\nfunction ConnectOperator(key) {\n Companion_getInstance_3();\n this.le_1 = key;\n}\nprotoOf(ConnectOperator).toString = function () {\n return this.le_1;\n};\nfunction ConnectSegment$traversal$o$invoke$slambda(this$0, $node, $transform, resultContinuation) {\n this.zj_1 = this$0;\n this.ak_1 = $node;\n this.bk_1 = $transform;\n CoroutineImpl.call(this, resultContinuation);\n}\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).yf = function ($this$sequence, $completion) {\n var tmp = this.zf($this$sequence, $completion);\n tmp.p6_1 = Unit_instance;\n tmp.q6_1 = null;\n return tmp.y6();\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).l7 = function (p1, $completion) {\n return this.yf(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).y6 = function () {\n var suspendResult = this.p6_1;\n $sm: do\n try {\n var tmp = this.n6_1;\n switch (tmp) {\n case 0:\n this.o6_1 = 3;\n this.dk_1 = this.zj_1.ie_1.mj(this.ak_1, this.bk_1, this.zj_1.je_1.gj());\n if (!(this.dk_1 == null)) {\n this.n6_1 = 1;\n suspendResult = this.ck_1.y7(this.dk_1, this);\n if (suspendResult === get_COROUTINE_SUSPENDED()) {\n return suspendResult;\n }\n continue $sm;\n } else {\n this.n6_1 = 2;\n continue $sm;\n }\n\n case 1:\n this.n6_1 = 2;\n continue $sm;\n case 2:\n return Unit_instance;\n case 3:\n throw this.q6_1;\n }\n } catch ($p) {\n var e = $p;\n if (this.o6_1 === 3) {\n throw e;\n } else {\n this.n6_1 = this.o6_1;\n this.q6_1 = e;\n }\n }\n while (true);\n};\nprotoOf(ConnectSegment$traversal$o$invoke$slambda).zf = function ($this$sequence, completion) {\n var i = new ConnectSegment$traversal$o$invoke$slambda(this.zj_1, this.ak_1, this.bk_1, completion);\n i.ck_1 = $this$sequence;\n return i;\n};\nfunction ConnectSegment$traversal$o$invoke$slambda_0(this$0, $node, $transform, resultContinuation) {\n var i = new ConnectSegment$traversal$o$invoke$slambda(this$0, $node, $transform, resultContinuation);\n var l = function ($this$sequence, $completion) {\n return i.yf($this$sequence, $completion);\n };\n l.$arity = 1;\n return l;\n}\nfunction ConnectSegment$traversal$1(this$0) {\n this.ek_1 = this$0;\n}\nprotoOf(ConnectSegment$traversal$1).fk = function (node, transform) {\n return sequence(ConnectSegment$traversal$o$invoke$slambda_0(this.ek_1, node, transform, null));\n};\nfunction ConnectSegment$traversal$2(this$0) {\n this.gk_1 = this$0;\n}\nprotoOf(ConnectSegment$traversal$2).fk = function (node, transform) {\n return this.gk_1.je_1.hj().hk(this.gk_1.ie_1.lj(node, transform));\n};\nfunction ConnectSegment(operator, connectExpression) {\n operator = operator === VOID ? Ancestor_getInstance() : operator;\n connectExpression = connectExpression === VOID ? new PolynomialExpression() : connectExpression;\n this.ie_1 = operator;\n this.je_1 = connectExpression;\n var tmp = this;\n var tmp_0;\n if (this.je_1.fj()) {\n tmp_0 = new ConnectSegment$traversal$1(this);\n } else {\n tmp_0 = new ConnectSegment$traversal$2(this);\n }\n tmp.ke_1 = tmp_0;\n}\nprotoOf(ConnectSegment).toString = function () {\n var tmp;\n var tmp_0;\n var tmp_1;\n if (equals(this.ie_1, Ancestor_getInstance())) {\n var tmp_2 = this.je_1;\n tmp_1 = tmp_2 instanceof PolynomialExpression;\n } else {\n tmp_1 = false;\n }\n if (tmp_1) {\n tmp_0 = this.je_1.ik_1 === 1;\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = this.je_1.jk_1 === 0;\n } else {\n tmp = false;\n }\n if (tmp) {\n return '';\n }\n return this.ie_1.toString() + toString_1(this.je_1);\n};\nprotoOf(ConnectSegment).hashCode = function () {\n var result = hashCode(this.ie_1);\n result = imul(result, 31) + hashCode(this.je_1) | 0;\n return result;\n};\nprotoOf(ConnectSegment).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectSegment))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectSegment ? other : THROW_CCE();\n if (!equals(this.ie_1, tmp0_other_with_cast.ie_1))\n return false;\n if (!equals(this.je_1, tmp0_other_with_cast.je_1))\n return false;\n return true;\n};\nfunction ConnectWrapper(connectSegment, to) {\n this.ae_1 = connectSegment;\n this.be_1 = to;\n}\nprotoOf(ConnectWrapper).toString = function () {\n // Inline function 'kotlin.text.trim' call\n var this_0 = this.be_1.toString() + ' ' + this.ae_1.toString();\n return toString_1(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));\n};\nprotoOf(ConnectWrapper).re = function (node, transform, trackNodes) {\n // Inline function 'kotlin.sequences.forEach' call\n var tmp0_iterator = this.ae_1.ke_1.fk(node, transform).n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n $l$block: {\n // Inline function 'li.songe.selector.data.ConnectWrapper.matchTracks.' call\n if (element == null) {\n break $l$block;\n }\n var r = this.be_1.re(element, transform, trackNodes);\n if (!(r == null))\n return r;\n }\n }\n return null;\n};\nprotoOf(ConnectWrapper).hashCode = function () {\n var result = this.ae_1.hashCode();\n result = imul(result, 31) + this.be_1.hashCode() | 0;\n return result;\n};\nprotoOf(ConnectWrapper).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ConnectWrapper))\n return false;\n var tmp0_other_with_cast = other instanceof ConnectWrapper ? other : THROW_CCE();\n if (!this.ae_1.equals(tmp0_other_with_cast.ae_1))\n return false;\n if (!this.be_1.equals(tmp0_other_with_cast.be_1))\n return false;\n return true;\n};\nfunction Expression() {\n}\nfunction LogicalExpression(left, operator, right) {\n Expression.call(this);\n this.qk_1 = left;\n this.rk_1 = operator;\n this.sk_1 = right;\n this.tk_1 = plus(this.qk_1.sb(), this.sk_1.sb());\n}\nprotoOf(LogicalExpression).oi = function (node, transform) {\n return this.rk_1.vk(node, transform, this.qk_1, this.sk_1);\n};\nprotoOf(LogicalExpression).sb = function () {\n return this.tk_1;\n};\nprotoOf(LogicalExpression).toString = function () {\n var tmp;\n var tmp_0;\n var tmp_1 = this.qk_1;\n if (tmp_1 instanceof LogicalExpression) {\n tmp_0 = !equals(this.qk_1.rk_1, this.rk_1);\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp = '(' + this.qk_1 + ')';\n } else {\n tmp = toString_1(this.qk_1);\n }\n var leftStr = tmp;\n var tmp_2;\n var tmp_3;\n var tmp_4 = this.sk_1;\n if (tmp_4 instanceof LogicalExpression) {\n tmp_3 = !equals(this.sk_1.rk_1, this.rk_1);\n } else {\n tmp_3 = false;\n }\n if (tmp_3) {\n tmp_2 = '(' + this.sk_1 + ')';\n } else {\n tmp_2 = toString_1(this.sk_1);\n }\n var rightStr = tmp_2;\n return leftStr + ' ' + this.rk_1 + ' ' + rightStr;\n};\nprotoOf(LogicalExpression).hashCode = function () {\n var result = hashCode(this.qk_1);\n result = imul(result, 31) + hashCode(this.rk_1) | 0;\n result = imul(result, 31) + hashCode(this.sk_1) | 0;\n return result;\n};\nprotoOf(LogicalExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof LogicalExpression))\n return false;\n var tmp0_other_with_cast = other instanceof LogicalExpression ? other : THROW_CCE();\n if (!equals(this.qk_1, tmp0_other_with_cast.qk_1))\n return false;\n if (!equals(this.rk_1, tmp0_other_with_cast.rk_1))\n return false;\n if (!equals(this.sk_1, tmp0_other_with_cast.sk_1))\n return false;\n return true;\n};\nfunction sam$kotlin_Comparator$0_1(function_0) {\n this.wk_1 = function_0;\n}\nprotoOf(sam$kotlin_Comparator$0_1).z4 = function (a, b) {\n return this.wk_1(a, b);\n};\nprotoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {\n return this.z4(a, b);\n};\nfunction LogicalOperator$Companion$allSubClasses$lambda(a, b) {\n // Inline function 'kotlin.comparisons.compareValuesBy' call\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp = -a.uk_1.length | 0;\n // Inline function 'li.songe.selector.data.Companion.allSubClasses.' call\n var tmp$ret$1 = -b.uk_1.length | 0;\n return compareValues(tmp, tmp$ret$1);\n}\nfunction Companion_4() {\n Companion_instance_4 = this;\n var tmp = this;\n // Inline function 'kotlin.collections.sortedBy' call\n var this_0 = listOf_0([AndOperator_getInstance(), OrOperator_getInstance()]);\n // Inline function 'kotlin.comparisons.compareBy' call\n var tmp_0 = LogicalOperator$Companion$allSubClasses$lambda;\n var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);\n tmp.xk_1 = sortedWith(this_0, tmp$ret$0);\n}\nvar Companion_instance_4;\nfunction Companion_getInstance_4() {\n if (Companion_instance_4 == null)\n new Companion_4();\n return Companion_instance_4;\n}\nfunction AndOperator() {\n AndOperator_instance = this;\n LogicalOperator.call(this, '&&');\n}\nprotoOf(AndOperator).vk = function (node, transform, left, right) {\n return left.oi(node, transform) ? right.oi(node, transform) : false;\n};\nvar AndOperator_instance;\nfunction AndOperator_getInstance() {\n if (AndOperator_instance == null)\n new AndOperator();\n return AndOperator_instance;\n}\nfunction OrOperator() {\n OrOperator_instance = this;\n LogicalOperator.call(this, '||');\n}\nprotoOf(OrOperator).vk = function (node, transform, left, right) {\n return left.oi(node, transform) ? true : right.oi(node, transform);\n};\nvar OrOperator_instance;\nfunction OrOperator_getInstance() {\n if (OrOperator_instance == null)\n new OrOperator();\n return OrOperator_instance;\n}\nfunction LogicalOperator(key) {\n Companion_getInstance_4();\n this.uk_1 = key;\n}\nprotoOf(LogicalOperator).toString = function () {\n return this.uk_1;\n};\nfunction PolynomialExpression$traversal$o$invoke$lambda(this$0) {\n return function (x, _anonymous_parameter_1__qggqgd) {\n return ((x - this$0.nk_1 | 0) % this$0.ik_1 | 0) === 0 ? ((x - this$0.nk_1 | 0) / this$0.ik_1 | 0) > 0 : false;\n };\n}\nfunction PolynomialExpression$traversal$1(this$0) {\n this.al_1 = this$0;\n}\nprotoOf(PolynomialExpression$traversal$1).hk = function (sq) {\n var tmp;\n if (this.al_1.ik_1 > 0) {\n tmp = sq;\n } else {\n tmp = take(sq, this.al_1.ok_1);\n }\n var tmp_0 = tmp;\n return filterIndexed(tmp_0, PolynomialExpression$traversal$o$invoke$lambda(this.al_1));\n};\nfunction PolynomialExpression(a, b) {\n a = a === VOID ? 0 : a;\n b = b === VOID ? 1 : b;\n ConnectExpression.call(this);\n this.ik_1 = a;\n this.jk_1 = b;\n var tmp = this;\n var tmp_0;\n if (this.ik_1 < 0) {\n var tmp_1;\n if (this.jk_1 < 0) {\n tmp_1 = emptyList();\n } else if (this.jk_1 > 0) {\n var tmp_2;\n if (this.jk_1 <= (-this.ik_1 | 0)) {\n tmp_2 = emptyList();\n } else {\n // Inline function 'kotlin.collections.mutableListOf' call\n var list = ArrayList_init_$Create$_0();\n var n = 1;\n while ((imul(this.ik_1, n) + this.jk_1 | 0) > 0) {\n list.k(imul(this.ik_1, n) + this.jk_1 | 0);\n n = n + 1 | 0;\n }\n tmp_2 = sorted(list);\n }\n tmp_1 = tmp_2;\n } else {\n tmp_1 = emptyList();\n }\n tmp_0 = tmp_1;\n } else if (this.ik_1 > 0) {\n tmp_0 = emptyList();\n } else {\n var tmp_3;\n if (this.jk_1 < 0) {\n tmp_3 = emptyList();\n } else if (this.jk_1 > 0) {\n tmp_3 = listOf(this.jk_1);\n } else {\n tmp_3 = emptyList();\n }\n tmp_0 = tmp_3;\n }\n tmp.kk_1 = tmp_0;\n this.lk_1 = this.kk_1.i() === 1;\n var tmp_4 = this;\n var tmp0_elvis_lhs = firstOrNull_0(this.kk_1);\n tmp_4.mk_1 = (tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) - 1 | 0;\n this.nk_1 = this.jk_1 - 1 | 0;\n this.ok_1 = this.ik_1 + this.jk_1 | 0;\n var tmp_5 = this;\n tmp_5.pk_1 = new PolynomialExpression$traversal$1(this);\n}\nprotoOf(PolynomialExpression).toString = function () {\n if (this.ik_1 === 0 ? this.jk_1 === 0 : false)\n return '0';\n if (this.ik_1 === 1 ? this.jk_1 === 1 : false)\n return '(n+1)';\n if (this.jk_1 === 0) {\n if (this.ik_1 === 1)\n return 'n';\n var tmp;\n if (this.ik_1 > 0) {\n tmp = '' + this.ik_1 + 'n';\n } else {\n tmp = '(' + this.ik_1 + 'n)';\n }\n return tmp;\n }\n if (this.ik_1 === 0) {\n if (this.jk_1 === 1)\n return '';\n var tmp_0;\n if (this.jk_1 > 0) {\n tmp_0 = this.jk_1.toString();\n } else {\n tmp_0 = '(' + this.jk_1 + ')';\n }\n return tmp_0;\n }\n var bOp = this.jk_1 >= 0 ? '+' : '';\n return '(' + this.ik_1 + 'n' + bOp + this.jk_1 + ')';\n};\nprotoOf(PolynomialExpression).fj = function () {\n return this.lk_1;\n};\nprotoOf(PolynomialExpression).gj = function () {\n return this.mk_1;\n};\nprotoOf(PolynomialExpression).hj = function () {\n return this.pk_1;\n};\nprotoOf(PolynomialExpression).hashCode = function () {\n var result = this.ik_1;\n result = imul(result, 31) + this.jk_1 | 0;\n return result;\n};\nprotoOf(PolynomialExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PolynomialExpression))\n return false;\n var tmp0_other_with_cast = other instanceof PolynomialExpression ? other : THROW_CCE();\n if (!(this.ik_1 === tmp0_other_with_cast.ik_1))\n return false;\n if (!(this.jk_1 === tmp0_other_with_cast.jk_1))\n return false;\n return true;\n};\nfunction PropertySegment$toString$lambda(it) {\n return '[' + it + ']';\n}\nfunction PropertySegment$matchName$1() {\n}\nprotoOf(PropertySegment$matchName$1).fk = function (node, transform) {\n return true;\n};\nfunction PropertySegment$matchName$2(this$0) {\n this.bl_1 = this$0;\n}\nprotoOf(PropertySegment$matchName$2).fk = function (node, transform) {\n var tmp0_elvis_lhs = transform.zb_1(node);\n var tmp;\n if (tmp0_elvis_lhs == null) {\n return false;\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var str = tmp;\n if (charSequenceLength(str) === this.bl_1.de_1.length) {\n return contentEquals(str, this.bl_1.de_1);\n } else if (charSequenceLength(str) > this.bl_1.de_1.length) {\n return charSequenceGet(str, (charSequenceLength(str) - this.bl_1.de_1.length | 0) - 1 | 0) === _Char___init__impl__6a9atx(46) ? endsWith(str, this.bl_1.de_1) : false;\n }\n return false;\n};\nfunction PropertySegment(tracked, name, expressions) {\n this.ce_1 = tracked;\n this.de_1 = name;\n this.ee_1 = expressions;\n this.fe_1 = isBlank(this.de_1) ? true : this.de_1 === '*';\n var tmp = this;\n var tmp_0 = this.fe_1 ? listOf('name') : emptyList();\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.ee_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.PropertySegment.propertyNames.' call\n var tmp$ret$0 = item.sb();\n destination.k(tmp$ret$0);\n }\n tmp.ge_1 = plus(tmp_0, flatten(destination));\n var tmp_1 = this;\n var tmp_2;\n if (this.fe_1) {\n tmp_2 = new PropertySegment$matchName$1();\n } else {\n tmp_2 = new PropertySegment$matchName$2(this);\n }\n tmp_1.he_1 = tmp_2;\n}\nprotoOf(PropertySegment).toString = function () {\n var matchTag = this.ce_1 ? '@' : '';\n var tmp = matchTag + this.de_1;\n return tmp + joinToString(this.ee_1, '', VOID, VOID, VOID, VOID, PropertySegment$toString$lambda);\n};\nprotoOf(PropertySegment).oi = function (node, transform) {\n var tmp;\n if (this.he_1.fk(node, transform)) {\n var tmp$ret$0;\n $l$block_0: {\n // Inline function 'kotlin.collections.all' call\n var this_0 = this.ee_1;\n var tmp_0;\n if (isInterface(this_0, Collection)) {\n tmp_0 = this_0.s();\n } else {\n tmp_0 = false;\n }\n if (tmp_0) {\n tmp$ret$0 = true;\n break $l$block_0;\n }\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.PropertySegment.match.' call\n if (!element.oi(node, transform)) {\n tmp$ret$0 = false;\n break $l$block_0;\n }\n }\n tmp$ret$0 = true;\n }\n tmp = tmp$ret$0;\n } else {\n tmp = false;\n }\n return tmp;\n};\nprotoOf(PropertySegment).hashCode = function () {\n var result = getBooleanHashCode(this.ce_1);\n result = imul(result, 31) + getStringHashCode(this.de_1) | 0;\n result = imul(result, 31) + hashCode(this.ee_1) | 0;\n return result;\n};\nprotoOf(PropertySegment).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PropertySegment))\n return false;\n var tmp0_other_with_cast = other instanceof PropertySegment ? other : THROW_CCE();\n if (!(this.ce_1 === tmp0_other_with_cast.ce_1))\n return false;\n if (!(this.de_1 === tmp0_other_with_cast.de_1))\n return false;\n if (!equals(this.ee_1, tmp0_other_with_cast.ee_1))\n return false;\n return true;\n};\nfunction PropertyWrapper(propertySegment, to) {\n to = to === VOID ? null : to;\n this.yd_1 = propertySegment;\n this.zd_1 = to;\n}\nprotoOf(PropertyWrapper).toString = function () {\n var tmp;\n if (!(this.zd_1 == null)) {\n tmp = this.zd_1.toString() + ' ';\n } else {\n tmp = '';\n }\n return tmp + this.yd_1.toString();\n};\nprotoOf(PropertyWrapper).re = function (node, transform, trackNodes) {\n if (!this.yd_1.oi(node, transform)) {\n return null;\n }\n trackNodes.k(node);\n if (this.zd_1 == null) {\n return trackNodes;\n }\n var r = this.zd_1.re(node, transform, trackNodes);\n if (r == null) {\n removeLast(trackNodes);\n }\n return r;\n};\nprotoOf(PropertyWrapper).hashCode = function () {\n var result = this.yd_1.hashCode();\n result = imul(result, 31) + (this.zd_1 == null ? 0 : this.zd_1.hashCode()) | 0;\n return result;\n};\nprotoOf(PropertyWrapper).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof PropertyWrapper))\n return false;\n var tmp0_other_with_cast = other instanceof PropertyWrapper ? other : THROW_CCE();\n if (!this.yd_1.equals(tmp0_other_with_cast.yd_1))\n return false;\n if (!equals(this.zd_1, tmp0_other_with_cast.zd_1))\n return false;\n return true;\n};\nfunction TupleExpression$traversal$1(this$0) {\n this.cl_1 = this$0;\n}\nprotoOf(TupleExpression$traversal$1).hk = function (sq) {\n return filterIndexes(sq, this.cl_1.gl_1);\n};\nfunction TupleExpression(numbers) {\n ConnectExpression.call(this);\n this.dl_1 = numbers;\n this.el_1 = this.dl_1.i() === 1;\n var tmp = this;\n var tmp0_elvis_lhs = firstOrNull_0(this.dl_1);\n tmp.fl_1 = (tmp0_elvis_lhs == null ? 1 : tmp0_elvis_lhs) - 1 | 0;\n var tmp_0 = this;\n // Inline function 'kotlin.collections.map' call\n var this_0 = this.dl_1;\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.data.TupleExpression.indexes.' call\n var tmp$ret$0 = item - 1 | 0;\n destination.k(tmp$ret$0);\n }\n tmp_0.gl_1 = destination;\n var tmp_1 = this;\n tmp_1.hl_1 = new TupleExpression$traversal$1(this);\n}\nprotoOf(TupleExpression).fj = function () {\n return this.el_1;\n};\nprotoOf(TupleExpression).gj = function () {\n return this.fl_1;\n};\nprotoOf(TupleExpression).hj = function () {\n return this.hl_1;\n};\nprotoOf(TupleExpression).toString = function () {\n if (this.dl_1.i() === 1) {\n var tmp;\n if (first(this.dl_1) === 1) {\n tmp = '';\n } else {\n tmp = first(this.dl_1).toString();\n }\n return tmp;\n }\n return '(' + joinToString(this.dl_1, ',') + ')';\n};\nprotoOf(TupleExpression).hashCode = function () {\n return hashCode(this.dl_1);\n};\nprotoOf(TupleExpression).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof TupleExpression))\n return false;\n var tmp0_other_with_cast = other instanceof TupleExpression ? other : THROW_CCE();\n if (!equals(this.dl_1, tmp0_other_with_cast.dl_1))\n return false;\n return true;\n};\nfunction Parser(prefix, temp) {\n prefix = prefix === VOID ? '' : prefix;\n this.il_1 = prefix;\n this.jl_1 = temp;\n}\nprotoOf(Parser).kl = function (source, offset) {\n return this.jl_1(source, offset, this.il_1);\n};\nprotoOf(Parser).toString = function () {\n return 'Parser(prefix=' + this.il_1 + ', temp=' + this.jl_1 + ')';\n};\nprotoOf(Parser).hashCode = function () {\n var result = getStringHashCode(this.il_1);\n result = imul(result, 31) + hashCode(this.jl_1) | 0;\n return result;\n};\nprotoOf(Parser).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof Parser))\n return false;\n var tmp0_other_with_cast = other instanceof Parser ? other : THROW_CCE();\n if (!(this.il_1 === tmp0_other_with_cast.il_1))\n return false;\n if (!equals(this.jl_1, tmp0_other_with_cast.jl_1))\n return false;\n return true;\n};\nfunction ParserResult(data, length) {\n length = length === VOID ? 0 : length;\n this.ll_1 = data;\n this.ml_1 = length;\n}\nprotoOf(ParserResult).toString = function () {\n return 'ParserResult(data=' + this.ll_1 + ', length=' + this.ml_1 + ')';\n};\nprotoOf(ParserResult).hashCode = function () {\n var result = this.ll_1 == null ? 0 : hashCode(this.ll_1);\n result = imul(result, 31) + this.ml_1 | 0;\n return result;\n};\nprotoOf(ParserResult).equals = function (other) {\n if (this === other)\n return true;\n if (!(other instanceof ParserResult))\n return false;\n var tmp0_other_with_cast = other instanceof ParserResult ? other : THROW_CCE();\n if (!equals(this.ll_1, tmp0_other_with_cast.ll_1))\n return false;\n if (!(this.ml_1 === tmp0_other_with_cast.ml_1))\n return false;\n return true;\n};\nfunction ParserSet$whiteCharParser$lambda(source, offset, prefix) {\n var i = offset;\n var data = '';\n while (i < source.length ? contains(prefix, charSequenceGet(source, i)) : false) {\n data = data + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$whiteCharStrictParser$lambda(source, offset, prefix) {\n Companion_instance_0.assert(source, offset, prefix, 'whitespace');\n return ParserSet_getInstance().ad_1.kl(source, offset);\n}\nfunction ParserSet$nameParser$lambda(source, offset, prefix) {\n var i = offset;\n var s0 = getOrNull(source, i);\n var tmp;\n var tmp_0 = s0;\n if (!((tmp_0 == null ? null : new Char(tmp_0)) == null)) {\n tmp = !contains(prefix, s0);\n } else {\n tmp = false;\n }\n if (tmp) {\n return new ParserResult('');\n }\n Companion_instance_0.assert(source, i, prefix, '*0-9a-zA-Z_');\n var data = toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n if (data === '*') {\n return new ParserResult(data, i - offset | 0);\n }\n var center = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_.';\n $l$loop: while (i < source.length) {\n if (charSequenceGet(data, (i - offset | 0) - 1 | 0) === _Char___init__impl__6a9atx(46)) {\n Companion_instance_0.assert(source, i, prefix, '[0-9a-zA-Z_]');\n }\n if (contains(center, charSequenceGet(source, i))) {\n data = data + toString_2(charSequenceGet(source, i));\n } else {\n break $l$loop;\n }\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$combinatorOperatorParser$lambda(it) {\n return it.le_1;\n}\nfunction ParserSet$combinatorOperatorParser$lambda_0(source, offset, _anonymous_parameter_2__qggqfi) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_3().jj_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.combinatorOperatorParser..' call\n if (startsWith_0(source, element.le_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'ConnectOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.le_1.length);\n}\nfunction ParserSet$integerParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix, 'number');\n var s = '';\n while (i < source.length ? contains(prefix, charSequenceGet(source, i)) : false) {\n s = s + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n var tmp;\n try {\n tmp = toInt(s);\n } catch ($p) {\n var tmp_0;\n if ($p instanceof NumberFormatException) {\n var e = $p;\n Companion_instance_0.throwError(source, offset, 'valid format number');\n } else {\n throw $p;\n }\n tmp = tmp_0;\n }\n return new ParserResult(tmp, i - offset | 0);\n}\nfunction ParserSet$monomialParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var tmp0_subject = charSequenceGet(source, i);\n var tmp;\n if (tmp0_subject === _Char___init__impl__6a9atx(43)) {\n i = i + 1 | 0;\n tmp = 1;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(45)) {\n i = i + 1 | 0;\n tmp = -1;\n } else {\n tmp = 1;\n }\n var signal = tmp;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().ed_1.il_1 + 'n');\n var tmp_0;\n if (contains(ParserSet_getInstance().ed_1.il_1, charSequenceGet(source, i))) {\n var coefficientResult = ParserSet_getInstance().ed_1.kl(source, i);\n i = i + coefficientResult.ml_1 | 0;\n tmp_0 = coefficientResult.ll_1;\n } else {\n tmp_0 = 1;\n }\n var coefficient = imul(tmp_0, signal);\n var tmp_1;\n if (i < source.length ? charSequenceGet(source, i) === _Char___init__impl__6a9atx(110) : false) {\n i = i + 1 | 0;\n return new ParserResult(new Pair(1, coefficient), i - offset | 0);\n } else {\n return new ParserResult(new Pair(0, coefficient), i - offset | 0);\n }\n}\nfunction ParserSet$polynomialExpressionParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n // Inline function 'kotlin.collections.mutableListOf' call\n var monomialResultList = ArrayList_init_$Create$_0();\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(40)) {\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().fd_1.il_1);\n while (!(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41))) {\n if (monomialResultList.i() > 0) {\n Companion_instance_0.assert(source, i, '+-');\n }\n var monomialResult = ParserSet_getInstance().fd_1.kl(source, i);\n monomialResultList.k(monomialResult);\n i = i + monomialResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n if (i >= source.length) {\n Companion_instance_0.assert(source, i, ')');\n }\n }\n i = i + 1 | 0;\n } else {\n var monomialResult_0 = ParserSet_getInstance().fd_1.kl(source, i);\n monomialResultList.k(monomialResult_0);\n i = i + monomialResult_0.ml_1 | 0;\n }\n // Inline function 'kotlin.collections.mutableMapOf' call\n var map = LinkedHashMap_init_$Create$();\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = monomialResultList.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n var tmp0_container = element.ll_1;\n var power = tmp0_container.bb();\n var coefficient = tmp0_container.cb();\n // Inline function 'kotlin.collections.set' call\n var tmp1_elvis_lhs = map.w1(power);\n var value = (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) + coefficient | 0;\n map.r1(power, value);\n }\n // Inline function 'kotlin.collections.mapKeys' call\n // Inline function 'kotlin.collections.mapKeysTo' call\n var destination = LinkedHashMap_init_$Create$_0(mapCapacity(map.i()));\n // Inline function 'kotlin.collections.associateByTo' call\n var tmp0_iterator_0 = map.x1().n();\n while (tmp0_iterator_0.o()) {\n var element_0 = tmp0_iterator_0.p();\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n if (element_0.h4() > 1) {\n Companion_instance_0.throwError(source, offset, 'power must be 0 or 1');\n }\n // Inline function 'kotlin.collections.mapKeysTo.' call\n var tmp$ret$2 = element_0.i4();\n destination.r1(Unit_instance, tmp$ret$2);\n }\n var tmp3_elvis_lhs = map.w1(1);\n var tmp = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;\n var tmp4_elvis_lhs = map.w1(0);\n var polynomialExpression = new PolynomialExpression(tmp, tmp4_elvis_lhs == null ? 0 : tmp4_elvis_lhs);\n // Inline function 'kotlin.apply' call\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.polynomialExpressionParser..' call\n var tmp_0;\n if (polynomialExpression.ik_1 <= 0 ? polynomialExpression.kk_1.s() : false) {\n tmp_0 = true;\n } else {\n var tmp_1;\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!polynomialExpression.kk_1.s()) {\n tmp_1 = first(polynomialExpression.kk_1) <= 0;\n } else {\n tmp_1 = false;\n }\n tmp_0 = tmp_1;\n }\n if (tmp_0) {\n Companion_instance_0.throwError(source, offset, 'valid polynomialExpression');\n }\n return new ParserResult(polynomialExpression, i - offset | 0);\n}\nfunction ParserSet$tupleExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n Companion_instance_0.assert(source, i, '(');\n i = i + 1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var numbers = ArrayList_init_$Create$_0();\n while (i < source.length ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41)) : false) {\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var intResult = ParserSet_getInstance().ed_1.kl(source, i);\n if (numbers.s()) {\n if (intResult.ll_1 <= 0) {\n Companion_instance_0.throwError(source, i, 'positive integer');\n }\n } else {\n if (intResult.ll_1 <= last(numbers)) {\n Companion_instance_0.throwError(source, i, '>' + last(numbers));\n }\n }\n i = i + intResult.ml_1 | 0;\n numbers.k(intResult.ll_1);\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var tmp = getOrNull(source, i);\n if (equals(tmp == null ? null : new Char(tmp), new Char(_Char___init__impl__6a9atx(44)))) {\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, ParserSet_getInstance().ed_1.il_1 + ')');\n }\n }\n Companion_instance_0.assert(source, i, ')');\n i = i + 1 | 0;\n return new ParserResult(new TupleExpression(numbers), i - offset | 0);\n}\nfunction ParserSet$connectExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var tmp;\n if (ParserSet_getInstance().id_1.u4(charSequenceSubSequence(source, offset, source.length))) {\n var tupleExpressionResult = ParserSet_getInstance().hd_1.kl(source, i);\n i = i + tupleExpressionResult.ml_1 | 0;\n tmp = new ParserResult(tupleExpressionResult.ll_1, i - offset | 0);\n } else {\n var polynomialExpressionResult = ParserSet_getInstance().gd_1.kl(source, offset);\n i = i + polynomialExpressionResult.ml_1 | 0;\n tmp = new ParserResult(polynomialExpressionResult.ll_1, i - offset | 0);\n }\n return tmp;\n}\nfunction ParserSet$combinatorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var operatorResult = ParserSet_getInstance().dd_1.kl(source, i);\n i = i + operatorResult.ml_1 | 0;\n var expressionResult = null;\n if (i < source.length ? contains(ParserSet_getInstance().jd_1.il_1, charSequenceGet(source, i)) : false) {\n expressionResult = ParserSet_getInstance().jd_1.kl(source, i);\n i = i + expressionResult.ml_1 | 0;\n }\n var tmp0_safe_receiver = expressionResult;\n var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ll_1;\n return new ParserResult(new ConnectSegment(operatorResult.ll_1, tmp1_elvis_lhs == null ? new PolynomialExpression() : tmp1_elvis_lhs), i - offset | 0);\n}\nfunction ParserSet$attrOperatorParser$lambda(it) {\n return it.pi_1;\n}\nfunction ParserSet$attrOperatorParser$lambda_0(source, offset, _anonymous_parameter_2__qggqfi) {\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_2().si_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.attrOperatorParser..' call\n if (startsWith_0(source, element.pi_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'CompareOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.pi_1.length);\n}\nfunction ParserSet$stringParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var startChar = charSequenceGet(source, i);\n i = i + 1 | 0;\n if (i >= source.length) {\n Companion_instance_0.throwError(source, i, 'any char');\n }\n var data = '';\n $l$loop: while (!(charSequenceGet(source, i) === startChar)) {\n if (i >= (source.length - 1 | 0)) {\n Companion_instance_0.assert(source, i, toString_2(startChar));\n break $l$loop;\n }\n // Inline function 'kotlin.code' call\n var this_0 = charSequenceGet(source, i);\n var containsArg = Char__toInt_impl_vasixd(this_0);\n if (0 <= containsArg ? containsArg <= 31 : false) {\n Companion_instance_0.throwError(source, i, '0-1f escape char');\n }\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(92)) {\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i);\n var tmp = data;\n var tmp2_subject = charSequenceGet(source, i);\n var tmp_0;\n if (tmp2_subject === _Char___init__impl__6a9atx(92)) {\n tmp_0 = _Char___init__impl__6a9atx(92);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(39)) {\n tmp_0 = _Char___init__impl__6a9atx(39);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(34)) {\n tmp_0 = _Char___init__impl__6a9atx(34);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(96)) {\n tmp_0 = _Char___init__impl__6a9atx(96);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(110)) {\n tmp_0 = _Char___init__impl__6a9atx(10);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(114)) {\n tmp_0 = _Char___init__impl__6a9atx(13);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(116)) {\n tmp_0 = _Char___init__impl__6a9atx(9);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(98)) {\n tmp_0 = _Char___init__impl__6a9atx(8);\n } else if (tmp2_subject === _Char___init__impl__6a9atx(120)) {\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable = 0;\n if (inductionVariable < 2)\n do {\n var index = inductionVariable;\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.stringParser..' call\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i, '0123456789abcdefABCDEF');\n }\n while (inductionVariable < 2);\n // Inline function 'kotlin.text.substring' call\n var startIndex = (i - 2 | 0) + 1 | 0;\n var endIndex = i + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$2 = source.substring(startIndex, endIndex);\n tmp_0 = numberToChar(toInt_0(tmp$ret$2, 16));\n } else if (tmp2_subject === _Char___init__impl__6a9atx(117)) {\n // Inline function 'kotlin.repeat' call\n // Inline function 'kotlin.contracts.contract' call\n var inductionVariable_0 = 0;\n if (inductionVariable_0 < 4)\n do {\n var index_0 = inductionVariable_0;\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.stringParser..' call\n i = i + 1 | 0;\n Companion_instance_0.assert(source, i, '0123456789abcdefABCDEF');\n }\n while (inductionVariable_0 < 4);\n // Inline function 'kotlin.text.substring' call\n var startIndex_0 = (i - 4 | 0) + 1 | 0;\n var endIndex_0 = i + 1 | 0;\n // Inline function 'kotlin.js.asDynamic' call\n var tmp$ret$4 = source.substring(startIndex_0, endIndex_0);\n tmp_0 = numberToChar(toInt_0(tmp$ret$4, 16));\n } else {\n Companion_instance_0.throwError(source, i, 'escape char');\n }\n data = tmp + toString_2(tmp_0);\n } else {\n data = data + toString_2(charSequenceGet(source, i));\n }\n i = i + 1 | 0;\n }\n i = i + 1 | 0;\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$propertyParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var data = toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n while (i < source.length ? contains(ParserSet_getInstance().od_1, charSequenceGet(source, i)) : false) {\n if (charSequenceGet(source, i) === _Char___init__impl__6a9atx(46)) {\n Companion_instance_0.assert(source, i + 1 | 0, prefix);\n }\n data = data + toString_2(charSequenceGet(source, i));\n i = i + 1 | 0;\n }\n return new ParserResult(data, i - offset | 0);\n}\nfunction ParserSet$valueParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n var tmp0_subject = charSequenceGet(source, i);\n var tmp;\n if (tmp0_subject === _Char___init__impl__6a9atx(116)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable = 0;\n while (inductionVariable < charSequenceLength('rue')) {\n var element = charSequenceGet('rue', inductionVariable);\n inductionVariable = inductionVariable + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element));\n i = i + 1 | 0;\n }\n tmp = true;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(102)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable_0 = 0;\n while (inductionVariable_0 < charSequenceLength('alse')) {\n var element_0 = charSequenceGet('alse', inductionVariable_0);\n inductionVariable_0 = inductionVariable_0 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element_0));\n i = i + 1 | 0;\n }\n tmp = false;\n } else if (tmp0_subject === _Char___init__impl__6a9atx(110)) {\n i = i + 1 | 0;\n // Inline function 'kotlin.text.forEach' call\n var inductionVariable_1 = 0;\n while (inductionVariable_1 < charSequenceLength('ull')) {\n var element_1 = charSequenceGet('ull', inductionVariable_1);\n inductionVariable_1 = inductionVariable_1 + 1 | 0;\n // Inline function 'li.songe.selector.parser.ParserSet.valueParser..' call\n Companion_instance_0.assert(source, i, toString_2(element_1));\n i = i + 1 | 0;\n }\n tmp = null;\n } else if (contains(ParserSet_getInstance().md_1.il_1, tmp0_subject)) {\n var s = ParserSet_getInstance().md_1.kl(source, i);\n i = i + s.ml_1 | 0;\n tmp = s.ll_1;\n } else if (contains(ParserSet_getInstance().ed_1.il_1, tmp0_subject)) {\n var n = ParserSet_getInstance().ed_1.kl(source, i);\n i = i + n.ml_1 | 0;\n tmp = n.ll_1;\n } else {\n Companion_instance_0.throwError(source, i, prefix);\n }\n var value = tmp;\n return new ParserResult(value, i - offset | 0);\n}\nfunction ParserSet$binaryExpressionParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var parserResult = ParserSet_getInstance().pd_1.kl(source, i);\n i = i + parserResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var operatorResult = ParserSet_getInstance().ld_1.kl(source, i);\n i = i + operatorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var valueResult = ParserSet_getInstance().qd_1.kl(source, i);\n i = i + valueResult.ml_1 | 0;\n return new ParserResult(new BinaryExpression(parserResult.ll_1, operatorResult.ll_1, valueResult.ll_1), i - offset | 0);\n}\nfunction ParserSet$logicalOperatorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n // Inline function 'kotlin.collections.find' call\n var this_0 = Companion_getInstance_4().xk_1;\n var tmp$ret$1;\n $l$block: {\n // Inline function 'kotlin.collections.firstOrNull' call\n var tmp0_iterator = this_0.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.logicalOperatorParser..' call\n if (startsWith_0(source, element.uk_1, offset)) {\n tmp$ret$1 = element;\n break $l$block;\n }\n }\n tmp$ret$1 = null;\n }\n var tmp0_elvis_lhs = tmp$ret$1;\n var tmp;\n if (tmp0_elvis_lhs == null) {\n Companion_instance_0.throwError(source, offset, 'LogicalOperator');\n } else {\n tmp = tmp0_elvis_lhs;\n }\n var operator = tmp;\n return new ParserResult(operator, operator.uk_1.length);\n}\nfunction ParserSet$attrParser$lambda(source, offset, prefix) {\n var i = offset;\n Companion_instance_0.assert(source, i, prefix);\n i = i + 1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var exp = ParserSet_getInstance().nl(source, i);\n i = i + exp.ml_1 | 0;\n Companion_instance_0.assert(source, i, ']');\n i = i + 1 | 0;\n return new ParserResult(exp.ll_1, i - offset | 0);\n}\nfunction ParserSet$selectorUnitParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n var tracked = false;\n var tmp = getOrNull(source, i);\n if (equals(tmp == null ? null : new Char(tmp), new Char(_Char___init__impl__6a9atx(64)))) {\n tracked = true;\n i = i + 1 | 0;\n }\n var nameResult = ParserSet_getInstance().cd_1.kl(source, i);\n i = i + nameResult.ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var expressions = ArrayList_init_$Create$_0();\n while (i < source.length ? charSequenceGet(source, i) === _Char___init__impl__6a9atx(91) : false) {\n var attrResult = ParserSet_getInstance().td_1.kl(source, i);\n i = i + attrResult.ml_1 | 0;\n expressions.k(attrResult.ll_1);\n }\n if (nameResult.ml_1 === 0 ? expressions.i() === 0 : false) {\n Companion_instance_0.throwError(source, i, '[');\n }\n return new ParserResult(new PropertySegment(tracked, nameResult.ll_1, expressions), i - offset | 0);\n}\nfunction ParserSet$connectSelectorParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n var i = offset;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var topSelector = ParserSet_getInstance().ud_1.kl(source, i);\n i = i + topSelector.ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var selectorList = ArrayList_init_$Create$_0();\n $l$loop: while (i < source.length ? contains(ParserSet_getInstance().ad_1.il_1, charSequenceGet(source, i)) : false) {\n i = i + ParserSet_getInstance().bd_1.kl(source, i).ml_1 | 0;\n if (i >= source.length) {\n break $l$loop;\n }\n var tmp;\n if (contains(ParserSet_getInstance().kd_1.il_1, charSequenceGet(source, i))) {\n var combinatorResult = ParserSet_getInstance().kd_1.kl(source, i);\n i = i + combinatorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().bd_1.kl(source, i).ml_1 | 0;\n tmp = combinatorResult.ll_1;\n } else {\n tmp = new ConnectSegment(VOID, new PolynomialExpression(1, 0));\n }\n var combinator = tmp;\n var selectorResult = ParserSet_getInstance().ud_1.kl(source, i);\n i = i + selectorResult.ml_1 | 0;\n selectorList.k(to(combinator, selectorResult.ll_1));\n }\n return new ParserResult(to(topSelector.ll_1, selectorList), i - offset | 0);\n}\nfunction ParserSet$endParser$lambda(source, offset, _anonymous_parameter_2__qggqfi) {\n if (!(offset === source.length)) {\n Companion_instance_0.throwError(source, offset, 'EOF');\n }\n return new ParserResult(Unit_instance, 0);\n}\nfunction ParserSet$selectorParser$lambda(source) {\n var i = 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n var combinatorSelectorResult = ParserSet_getInstance().vd_1.kl(source, i);\n i = i + combinatorSelectorResult.ml_1 | 0;\n i = i + ParserSet_getInstance().ad_1.kl(source, i).ml_1 | 0;\n i = i + ParserSet_getInstance().wd_1.kl(source, i).ml_1 | 0;\n var data = combinatorSelectorResult.ll_1;\n // Inline function 'kotlin.collections.mutableListOf' call\n var propertySelectorList = ArrayList_init_$Create$_0();\n // Inline function 'kotlin.collections.mutableListOf' call\n var combinatorSelectorList = ArrayList_init_$Create$_0();\n propertySelectorList.k(data.za_1);\n // Inline function 'kotlin.collections.forEach' call\n var tmp0_iterator = data.ab_1.n();\n while (tmp0_iterator.o()) {\n var element = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.selectorParser..' call\n propertySelectorList.k(element.ab_1);\n combinatorSelectorList.k(element.za_1);\n }\n var wrapperList = mutableListOf([new PropertyWrapper(first(propertySelectorList))]);\n // Inline function 'kotlin.collections.forEachIndexed' call\n var index = 0;\n var tmp0_iterator_0 = combinatorSelectorList.n();\n while (tmp0_iterator_0.o()) {\n var item = tmp0_iterator_0.p();\n // Inline function 'li.songe.selector.parser.ParserSet.selectorParser..' call\n var tmp1 = index;\n index = tmp1 + 1 | 0;\n var index_0 = checkIndexOverflow(tmp1);\n var combinatorSelectorWrapper = new ConnectWrapper(item, last(wrapperList));\n var propertySelectorWrapper = new PropertyWrapper(propertySelectorList.w(index_0 + 1 | 0), combinatorSelectorWrapper);\n wrapperList.k(propertySelectorWrapper);\n }\n return new Selector(last(wrapperList));\n}\nfunction ParserSet() {\n ParserSet_instance = this;\n var tmp = this;\n tmp.ad_1 = new Parser(' \\t\\r\\n', ParserSet$whiteCharParser$lambda);\n var tmp_0 = this;\n tmp_0.bd_1 = new Parser(' \\t\\r\\n', ParserSet$whiteCharStrictParser$lambda);\n var tmp_1 = this;\n tmp_1.cd_1 = new Parser('*1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_', ParserSet$nameParser$lambda);\n var tmp_2 = this;\n var tmp_3 = Companion_getInstance_3().jj_1;\n var tmp_4 = joinToString(tmp_3, '', VOID, VOID, VOID, VOID, ParserSet$combinatorOperatorParser$lambda);\n tmp_2.dd_1 = new Parser(tmp_4, ParserSet$combinatorOperatorParser$lambda_0);\n var tmp_5 = this;\n tmp_5.ed_1 = new Parser('1234567890', ParserSet$integerParser$lambda);\n var tmp_6 = this;\n tmp_6.fd_1 = new Parser('+-1234567890n', ParserSet$monomialParser$lambda);\n var tmp_7 = this;\n tmp_7.gd_1 = new Parser('(0123456789n', ParserSet$polynomialExpressionParser$lambda);\n var tmp_8 = this;\n tmp_8.hd_1 = new Parser(VOID, ParserSet$tupleExpressionParser$lambda);\n this.id_1 = Regex_init_$Create$('^\\\\(\\\\s*\\\\d+,.*$');\n var tmp_9 = this;\n tmp_9.jd_1 = new Parser(this.gd_1.il_1, ParserSet$connectExpressionParser$lambda);\n var tmp_10 = this;\n tmp_10.kd_1 = new Parser(this.dd_1.il_1, ParserSet$combinatorParser$lambda);\n var tmp_11 = this;\n var tmp_12 = Companion_getInstance_2().si_1;\n var tmp_13 = joinToString(tmp_12, '', VOID, VOID, VOID, VOID, ParserSet$attrOperatorParser$lambda);\n tmp_11.ld_1 = new Parser(tmp_13, ParserSet$attrOperatorParser$lambda_0);\n var tmp_14 = this;\n tmp_14.md_1 = new Parser('`\\'\"', ParserSet$stringParser$lambda);\n this.nd_1 = '_' + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), '') + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90)), '');\n this.od_1 = this.nd_1 + toString_2(_Char___init__impl__6a9atx(46)) + joinToString(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57)), '');\n var tmp_15 = this;\n tmp_15.pd_1 = new Parser(this.nd_1, ParserSet$propertyParser$lambda);\n var tmp_16 = this;\n var tmp_17 = 'tfn' + this.md_1.il_1 + this.ed_1.il_1;\n tmp_16.qd_1 = new Parser(tmp_17, ParserSet$valueParser$lambda);\n var tmp_18 = this;\n tmp_18.rd_1 = new Parser(VOID, ParserSet$binaryExpressionParser$lambda);\n var tmp_19 = this;\n tmp_19.sd_1 = new Parser(VOID, ParserSet$logicalOperatorParser$lambda);\n var tmp_20 = this;\n tmp_20.td_1 = new Parser('[', ParserSet$attrParser$lambda);\n var tmp_21 = this;\n tmp_21.ud_1 = new Parser(VOID, ParserSet$selectorUnitParser$lambda);\n var tmp_22 = this;\n tmp_22.vd_1 = new Parser(VOID, ParserSet$connectSelectorParser$lambda);\n var tmp_23 = this;\n tmp_23.wd_1 = new Parser(VOID, ParserSet$endParser$lambda);\n var tmp_24 = this;\n tmp_24.xd_1 = ParserSet$selectorParser$lambda;\n}\nprotoOf(ParserSet).nl = function (source, offset) {\n var i = offset;\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n // Inline function 'kotlin.collections.mutableListOf' call\n var parserResults = ArrayList_init_$Create$_0();\n while ((i < source.length ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(93)) : false) ? !(charSequenceGet(source, i) === _Char___init__impl__6a9atx(41)) : false) {\n var tmp0_subject = charSequenceGet(source, i);\n if (tmp0_subject === _Char___init__impl__6a9atx(40)) {\n // Inline function 'kotlin.collections.isNotEmpty' call\n if (!parserResults.s()) {\n var lastToken = last(parserResults);\n var tmp = lastToken.ll_1;\n if (!(tmp instanceof LogicalOperator)) {\n var count = 0;\n while ((i - 1 | 0) >= count ? contains(this.ad_1.il_1, charSequenceGet(source, (i - 1 | 0) - count | 0)) : false) {\n count = count + 1 | 0;\n }\n Companion_instance_0.throwError(source, (i - count | 0) - lastToken.ml_1 | 0, 'LogicalOperator');\n }\n }\n i = i + 1 | 0;\n // Inline function 'kotlin.apply' call\n var this_0 = this.nl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_0.ml_1 | 0;\n parserResults.k(this_0);\n Companion_instance_0.assert(source, i, ')');\n i = i + 1 | 0;\n } else if (contains('|&', tmp0_subject)) {\n // Inline function 'kotlin.apply' call\n var this_1 = this.sd_1.kl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_1.ml_1 | 0;\n parserResults.k(this_1);\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n Companion_instance_0.assert(source, i, '(' + this.pd_1.il_1);\n } else {\n // Inline function 'kotlin.apply' call\n var this_2 = this.rd_1.kl(source, i);\n // Inline function 'kotlin.contracts.contract' call\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n i = i + this_2.ml_1 | 0;\n parserResults.k(this_2);\n }\n i = i + this.ad_1.kl(source, i).ml_1 | 0;\n }\n if (parserResults.s()) {\n Companion_instance_0.throwError(source, i - offset | 0, 'Expression');\n }\n if (parserResults.i() === 1) {\n var tmp_0 = first(parserResults).ll_1;\n return new ParserResult(tmp_0 instanceof Expression ? tmp_0 : THROW_CCE(), i - offset | 0);\n }\n // Inline function 'kotlin.collections.map' call\n // Inline function 'kotlin.collections.mapTo' call\n var destination = ArrayList_init_$Create$(collectionSizeOrDefault(parserResults, 10));\n var tmp0_iterator = parserResults.n();\n while (tmp0_iterator.o()) {\n var item = tmp0_iterator.p();\n // Inline function 'li.songe.selector.parser.ParserSet.expressionParser.' call\n var tmp$ret$5 = item.ll_1;\n destination.k(tmp$ret$5);\n }\n var tokens = toMutableList_0(destination);\n var index = 0;\n while (index < tokens.i()) {\n var token = tokens.w(index);\n if (equals(token, AndOperator_getInstance())) {\n var tmp_1 = index;\n var tmp_2 = tokens.w(index - 1 | 0);\n var tmp_3 = tmp_2 instanceof Expression ? tmp_2 : THROW_CCE();\n var tmp_4 = AndOperator_getInstance();\n var tmp_5 = tokens.w(index + 1 | 0);\n tokens.j(tmp_1, new LogicalExpression(tmp_3, tmp_4, tmp_5 instanceof Expression ? tmp_5 : THROW_CCE()));\n tokens.z(index - 1 | 0);\n tokens.z((index + 1 | 0) - 1 | 0);\n } else {\n index = index + 1 | 0;\n }\n }\n while (tokens.i() > 1) {\n var tmp_6 = tokens.w(0);\n var tmp_7 = tmp_6 instanceof Expression ? tmp_6 : THROW_CCE();\n var tmp_8 = tokens.w(1);\n var tmp_9 = tmp_8 instanceof OrOperator ? tmp_8 : THROW_CCE();\n var tmp_10 = tokens.w(2);\n tokens.j(1, new LogicalExpression(tmp_7, tmp_9, tmp_10 instanceof Expression ? tmp_10 : THROW_CCE()));\n tokens.z(0);\n tokens.z(1);\n }\n var tmp_11 = first(tokens);\n return new ParserResult(tmp_11 instanceof Expression ? tmp_11 : THROW_CCE(), i - offset | 0);\n};\nvar ParserSet_instance;\nfunction ParserSet_getInstance() {\n if (ParserSet_instance == null)\n new ParserSet();\n return ParserSet_instance;\n}\nfunction FilterIndexesSequence$iterator$1(this$0) {\n this.sl_1 = this$0;\n this.ol_1 = this$0.tl_1.n();\n this.pl_1 = 0;\n this.ql_1 = 0;\n this.rl_1 = null;\n}\nprotoOf(FilterIndexesSequence$iterator$1).vl = function () {\n if (this.pl_1 > last(this.sl_1.ul_1))\n return null;\n while (this.ol_1.o()) {\n var item = this.ol_1.p();\n if (this.sl_1.ul_1.w(this.ql_1) === this.pl_1) {\n this.ql_1 = this.ql_1 + 1 | 0;\n this.pl_1 = this.pl_1 + 1 | 0;\n return item;\n }\n this.pl_1 = this.pl_1 + 1 | 0;\n }\n return null;\n};\nprotoOf(FilterIndexesSequence$iterator$1).p = function () {\n var result = this.rl_1;\n this.rl_1 = null;\n var tmp1_elvis_lhs = result == null ? this.vl() : result;\n var tmp;\n if (tmp1_elvis_lhs == null) {\n throw NoSuchElementException_init_$Create$();\n } else {\n tmp = tmp1_elvis_lhs;\n }\n return tmp;\n};\nprotoOf(FilterIndexesSequence$iterator$1).o = function () {\n var tmp = this;\n var tmp0_elvis_lhs = this.rl_1;\n tmp.rl_1 = tmp0_elvis_lhs == null ? this.vl() : tmp0_elvis_lhs;\n return !(this.rl_1 == null);\n};\nfunction FilterIndexesSequence(sequence, indexes) {\n this.tl_1 = sequence;\n this.ul_1 = indexes;\n}\nprotoOf(FilterIndexesSequence).n = function () {\n return new FilterIndexesSequence$iterator$1(this);\n};\nfunction filterIndexes(_this__u8e3s4, indexes) {\n return new FilterIndexesSequence(_this__u8e3s4, indexes);\n}\n//region block: init\nCompanion_instance = new Companion();\nCompanion_instance_0 = new Companion_0();\nCompanion_instance_1 = new Companion_1();\n//endregion\n//region block: exports\ndefineProp(CommonSelector, 'Companion', Companion_getInstance);\nexport {\n CommonSelector as CommonSelector,\n CommonTransform as CommonTransform,\n ExtSyntaxError as ExtSyntaxError,\n};\n//endregion\n\n//# sourceMappingURL=gkd-selector.mjs.map\n","import { CommonSelector, CommonTransform } from '@gkd-kit/selector';\nimport type { RawNode } from './types';\n\nconst transform = new CommonTransform(\n (node, name) => {\n const [key, subKey] = name.split('.');\n if (subKey) {\n // @ts-ignore\n return node.attr[key]?.[subKey];\n }\n // @ts-ignore\n return node.attr[key];\n },\n (node) => node.attr.name,\n (node) => node.children,\n (node) => node.parent,\n);\n\nexport type Selector = {\n tracks: boolean[];\n trackIndex: number;\n connectKeys: string[];\n toString: () => string;\n match: (node: RawNode) => RawNode | undefined;\n querySelectorAll: (node: RawNode) => RawNode[];\n querySelectorTrackAll: (node: RawNode) => RawNode[][];\n};\n\nexport const parseSelector = (source: string): Selector => {\n const cs = CommonSelector.Companion.parse(source);\n const selector: Selector = {\n tracks: cs.tracks,\n trackIndex: cs.trackIndex,\n connectKeys: cs.connectKeys,\n toString: () => cs.toString(),\n match: (node) => {\n return cs.match(node, transform) ?? void 0;\n },\n querySelectorAll: (node) => {\n return transform.querySelectorAll(node, cs);\n },\n querySelectorTrackAll: (node) => {\n return transform.querySelectorTrackAll(node, cs);\n },\n };\n return selector;\n};\n\nexport const checkSelector = (source: string) => {\n return CommonSelector.Companion.parseOrNull(source) != null;\n};\n","// This is a generated file. Do not edit.\nvar Space_Separator = /[\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nvar ID_Start = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\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80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\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\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/;\nvar ID_Continue = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A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CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF9\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uF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C92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4A\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nvar unicode = {\n\tSpace_Separator: Space_Separator,\n\tID_Start: ID_Start,\n\tID_Continue: ID_Continue\n};\n\nvar util = {\n isSpaceSeparator (c) {\n return typeof c === 'string' && unicode.Space_Separator.test(c)\n },\n\n isIdStartChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c === '$') || (c === '_') ||\n unicode.ID_Start.test(c)\n )\n },\n\n isIdContinueChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= '0' && c <= '9') ||\n (c === '$') || (c === '_') ||\n (c === '\\u200C') || (c === '\\u200D') ||\n unicode.ID_Continue.test(c)\n )\n },\n\n isDigit (c) {\n return typeof c === 'string' && /[0-9]/.test(c)\n },\n\n isHexDigit (c) {\n return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)\n },\n};\n\nlet source;\nlet parseState;\nlet stack;\nlet pos;\nlet line;\nlet column;\nlet token;\nlet key;\nlet root;\n\nvar parse = function parse (text, reviver) {\n source = String(text);\n parseState = 'start';\n stack = [];\n pos = 0;\n line = 1;\n column = 0;\n token = undefined;\n key = undefined;\n root = undefined;\n\n do {\n token = lex();\n\n // This code is unreachable.\n // if (!parseStates[parseState]) {\n // throw invalidParseState()\n // }\n\n parseStates[parseState]();\n } while (token.type !== 'eof')\n\n if (typeof reviver === 'function') {\n return internalize({'': root}, '', reviver)\n }\n\n return root\n};\n\nfunction internalize (holder, name, reviver) {\n const value = holder[name];\n if (value != null && typeof value === 'object') {\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const key = String(i);\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n } else {\n for (const key in value) {\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n }\n }\n\n return reviver.call(holder, name, value)\n}\n\nlet lexState;\nlet buffer;\nlet doubleQuote;\nlet sign;\nlet c;\n\nfunction lex () {\n lexState = 'default';\n buffer = '';\n doubleQuote = false;\n sign = 1;\n\n for (;;) {\n c = peek();\n\n // This code is unreachable.\n // if (!lexStates[lexState]) {\n // throw invalidLexState(lexState)\n // }\n\n const token = lexStates[lexState]();\n if (token) {\n return token\n }\n }\n}\n\nfunction peek () {\n if (source[pos]) {\n return String.fromCodePoint(source.codePointAt(pos))\n }\n}\n\nfunction read () {\n const c = peek();\n\n if (c === '\\n') {\n line++;\n column = 0;\n } else if (c) {\n column += c.length;\n } else {\n column++;\n }\n\n if (c) {\n pos += c.length;\n }\n\n return c\n}\n\nconst lexStates = {\n default () {\n switch (c) {\n case '\\t':\n case '\\v':\n case '\\f':\n case ' ':\n case '\\u00A0':\n case '\\uFEFF':\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n return\n\n case '/':\n read();\n lexState = 'comment';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n if (util.isSpaceSeparator(c)) {\n read();\n return\n }\n\n // This code is unreachable.\n // if (!lexStates[parseState]) {\n // throw invalidLexState(parseState)\n // }\n\n return lexStates[parseState]()\n },\n\n comment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineComment';\n return\n\n case '/':\n read();\n lexState = 'singleLineComment';\n return\n }\n\n throw invalidChar(read())\n },\n\n multiLineComment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineCommentAsterisk';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n },\n\n multiLineCommentAsterisk () {\n switch (c) {\n case '*':\n read();\n return\n\n case '/':\n read();\n lexState = 'default';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n lexState = 'multiLineComment';\n },\n\n singleLineComment () {\n switch (c) {\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n lexState = 'default';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n read();\n },\n\n value () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n case 'n':\n read();\n literal('ull');\n return newToken('null', null)\n\n case 't':\n read();\n literal('rue');\n return newToken('boolean', true)\n\n case 'f':\n read();\n literal('alse');\n return newToken('boolean', false)\n\n case '-':\n case '+':\n if (read() === '-') {\n sign = -1;\n }\n\n lexState = 'sign';\n return\n\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n buffer = '';\n lexState = 'string';\n return\n }\n\n throw invalidChar(read())\n },\n\n identifierNameStartEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n break\n\n default:\n if (!util.isIdStartChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n identifierName () {\n switch (c) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n buffer += read();\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameEscape';\n return\n }\n\n if (util.isIdContinueChar(c)) {\n buffer += read();\n return\n }\n\n return newToken('identifier', buffer)\n },\n\n identifierNameEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n break\n\n default:\n if (!util.isIdContinueChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n sign () {\n switch (c) {\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', sign * Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n }\n\n throw invalidChar(read())\n },\n\n zero () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n\n case 'x':\n case 'X':\n buffer += read();\n lexState = 'hexadecimal';\n return\n }\n\n return newToken('numeric', sign * 0)\n },\n\n decimalInteger () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalPointLeading () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalPoint () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalFraction () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalExponent () {\n switch (c) {\n case '+':\n case '-':\n buffer += read();\n lexState = 'decimalExponentSign';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentSign () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentInteger () {\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n hexadecimal () {\n if (util.isHexDigit(c)) {\n buffer += read();\n lexState = 'hexadecimalInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n hexadecimalInteger () {\n if (util.isHexDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n string () {\n switch (c) {\n case '\\\\':\n read();\n buffer += escape();\n return\n\n case '\"':\n if (doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case \"'\":\n if (!doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case '\\n':\n case '\\r':\n throw invalidChar(read())\n\n case '\\u2028':\n case '\\u2029':\n separatorChar(c);\n break\n\n case undefined:\n throw invalidChar(read())\n }\n\n buffer += read();\n },\n\n start () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n // This code is unreachable since the default lexState handles eof.\n // case undefined:\n // return newToken('eof')\n }\n\n lexState = 'value';\n },\n\n beforePropertyName () {\n switch (c) {\n case '$':\n case '_':\n buffer = read();\n lexState = 'identifierName';\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameStartEscape';\n return\n\n case '}':\n return newToken('punctuator', read())\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n lexState = 'string';\n return\n }\n\n if (util.isIdStartChar(c)) {\n buffer += read();\n lexState = 'identifierName';\n return\n }\n\n throw invalidChar(read())\n },\n\n afterPropertyName () {\n if (c === ':') {\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforePropertyValue () {\n lexState = 'value';\n },\n\n afterPropertyValue () {\n switch (c) {\n case ',':\n case '}':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforeArrayValue () {\n if (c === ']') {\n return newToken('punctuator', read())\n }\n\n lexState = 'value';\n },\n\n afterArrayValue () {\n switch (c) {\n case ',':\n case ']':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n end () {\n // This code is unreachable since it's handled by the default lexState.\n // if (c === undefined) {\n // read()\n // return newToken('eof')\n // }\n\n throw invalidChar(read())\n },\n};\n\nfunction newToken (type, value) {\n return {\n type,\n value,\n line,\n column,\n }\n}\n\nfunction literal (s) {\n for (const c of s) {\n const p = peek();\n\n if (p !== c) {\n throw invalidChar(read())\n }\n\n read();\n }\n}\n\nfunction escape () {\n const c = peek();\n switch (c) {\n case 'b':\n read();\n return '\\b'\n\n case 'f':\n read();\n return '\\f'\n\n case 'n':\n read();\n return '\\n'\n\n case 'r':\n read();\n return '\\r'\n\n case 't':\n read();\n return '\\t'\n\n case 'v':\n read();\n return '\\v'\n\n case '0':\n read();\n if (util.isDigit(peek())) {\n throw invalidChar(read())\n }\n\n return '\\0'\n\n case 'x':\n read();\n return hexEscape()\n\n case 'u':\n read();\n return unicodeEscape()\n\n case '\\n':\n case '\\u2028':\n case '\\u2029':\n read();\n return ''\n\n case '\\r':\n read();\n if (peek() === '\\n') {\n read();\n }\n\n return ''\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n throw invalidChar(read())\n\n case undefined:\n throw invalidChar(read())\n }\n\n return read()\n}\n\nfunction hexEscape () {\n let buffer = '';\n let c = peek();\n\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nfunction unicodeEscape () {\n let buffer = '';\n let count = 4;\n\n while (count-- > 0) {\n const c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n }\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nconst parseStates = {\n start () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforePropertyName () {\n switch (token.type) {\n case 'identifier':\n case 'string':\n key = token.value;\n parseState = 'afterPropertyName';\n return\n\n case 'punctuator':\n // This code is unreachable since it's handled by the lexState.\n // if (token.value !== '}') {\n // throw invalidToken()\n // }\n\n pop();\n return\n\n case 'eof':\n throw invalidEOF()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterPropertyName () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator' || token.value !== ':') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n parseState = 'beforePropertyValue';\n },\n\n beforePropertyValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforeArrayValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n if (token.type === 'punctuator' && token.value === ']') {\n pop();\n return\n }\n\n push();\n },\n\n afterPropertyValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforePropertyName';\n return\n\n case '}':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterArrayValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforeArrayValue';\n return\n\n case ']':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n end () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'eof') {\n // throw invalidToken()\n // }\n },\n};\n\nfunction push () {\n let value;\n\n switch (token.type) {\n case 'punctuator':\n switch (token.value) {\n case '{':\n value = {};\n break\n\n case '[':\n value = [];\n break\n }\n\n break\n\n case 'null':\n case 'boolean':\n case 'numeric':\n case 'string':\n value = token.value;\n break\n\n // This code is unreachable.\n // default:\n // throw invalidToken()\n }\n\n if (root === undefined) {\n root = value;\n } else {\n const parent = stack[stack.length - 1];\n if (Array.isArray(parent)) {\n parent.push(value);\n } else {\n Object.defineProperty(parent, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n if (value !== null && typeof value === 'object') {\n stack.push(value);\n\n if (Array.isArray(value)) {\n parseState = 'beforeArrayValue';\n } else {\n parseState = 'beforePropertyName';\n }\n } else {\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n }\n}\n\nfunction pop () {\n stack.pop();\n\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n}\n\n// This code is unreachable.\n// function invalidParseState () {\n// return new Error(`JSON5: invalid parse state '${parseState}'`)\n// }\n\n// This code is unreachable.\n// function invalidLexState (state) {\n// return new Error(`JSON5: invalid lex state '${state}'`)\n// }\n\nfunction invalidChar (c) {\n if (c === undefined) {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n }\n\n return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n}\n\nfunction invalidEOF () {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n}\n\n// This code is unreachable.\n// function invalidToken () {\n// if (token.type === 'eof') {\n// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n// }\n\n// const c = String.fromCodePoint(token.value.codePointAt(0))\n// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n// }\n\nfunction invalidIdentifier () {\n column -= 5;\n return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)\n}\n\nfunction separatorChar (c) {\n console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);\n}\n\nfunction formatChar (c) {\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n if (replacements[c]) {\n return replacements[c]\n }\n\n if (c < ' ') {\n const hexString = c.charCodeAt(0).toString(16);\n return '\\\\x' + ('00' + hexString).substring(hexString.length)\n }\n\n return c\n}\n\nfunction syntaxError (message) {\n const err = new SyntaxError(message);\n err.lineNumber = line;\n err.columnNumber = column;\n return err\n}\n\nvar stringify = function stringify (value, replacer, space) {\n const stack = [];\n let indent = '';\n let propertyList;\n let replacerFunc;\n let gap = '';\n let quote;\n\n if (\n replacer != null &&\n typeof replacer === 'object' &&\n !Array.isArray(replacer)\n ) {\n space = replacer.space;\n quote = replacer.quote;\n replacer = replacer.replacer;\n }\n\n if (typeof replacer === 'function') {\n replacerFunc = replacer;\n } else if (Array.isArray(replacer)) {\n propertyList = [];\n for (const v of replacer) {\n let item;\n\n if (typeof v === 'string') {\n item = v;\n } else if (\n typeof v === 'number' ||\n v instanceof String ||\n v instanceof Number\n ) {\n item = String(v);\n }\n\n if (item !== undefined && propertyList.indexOf(item) < 0) {\n propertyList.push(item);\n }\n }\n }\n\n if (space instanceof Number) {\n space = Number(space);\n } else if (space instanceof String) {\n space = String(space);\n }\n\n if (typeof space === 'number') {\n if (space > 0) {\n space = Math.min(10, Math.floor(space));\n gap = ' '.substr(0, space);\n }\n } else if (typeof space === 'string') {\n gap = space.substr(0, 10);\n }\n\n return serializeProperty('', {'': value})\n\n function serializeProperty (key, holder) {\n let value = holder[key];\n if (value != null) {\n if (typeof value.toJSON5 === 'function') {\n value = value.toJSON5(key);\n } else if (typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n }\n\n if (replacerFunc) {\n value = replacerFunc.call(holder, key, value);\n }\n\n if (value instanceof Number) {\n value = Number(value);\n } else if (value instanceof String) {\n value = String(value);\n } else if (value instanceof Boolean) {\n value = value.valueOf();\n }\n\n switch (value) {\n case null: return 'null'\n case true: return 'true'\n case false: return 'false'\n }\n\n if (typeof value === 'string') {\n return quoteString(value, false)\n }\n\n if (typeof value === 'number') {\n return String(value)\n }\n\n if (typeof value === 'object') {\n return Array.isArray(value) ? serializeArray(value) : serializeObject(value)\n }\n\n return undefined\n }\n\n function quoteString (value) {\n const quotes = {\n \"'\": 0.1,\n '\"': 0.2,\n };\n\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n let product = '';\n\n for (let i = 0; i < value.length; i++) {\n const c = value[i];\n switch (c) {\n case \"'\":\n case '\"':\n quotes[c]++;\n product += c;\n continue\n\n case '\\0':\n if (util.isDigit(value[i + 1])) {\n product += '\\\\x00';\n continue\n }\n }\n\n if (replacements[c]) {\n product += replacements[c];\n continue\n }\n\n if (c < ' ') {\n let hexString = c.charCodeAt(0).toString(16);\n product += '\\\\x' + ('00' + hexString).substring(hexString.length);\n continue\n }\n\n product += c;\n }\n\n const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b);\n\n product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);\n\n return quoteChar + product + quoteChar\n }\n\n function serializeObject (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let keys = propertyList || Object.keys(value);\n let partial = [];\n for (const key of keys) {\n const propertyString = serializeProperty(key, value);\n if (propertyString !== undefined) {\n let member = serializeKey(key) + ':';\n if (gap !== '') {\n member += ' ';\n }\n member += propertyString;\n partial.push(member);\n }\n }\n\n let final;\n if (partial.length === 0) {\n final = '{}';\n } else {\n let properties;\n if (gap === '') {\n properties = partial.join(',');\n final = '{' + properties + '}';\n } else {\n let separator = ',\\n' + indent;\n properties = partial.join(separator);\n final = '{\\n' + indent + properties + ',\\n' + stepback + '}';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n\n function serializeKey (key) {\n if (key.length === 0) {\n return quoteString(key, true)\n }\n\n const firstChar = String.fromCodePoint(key.codePointAt(0));\n if (!util.isIdStartChar(firstChar)) {\n return quoteString(key, true)\n }\n\n for (let i = firstChar.length; i < key.length; i++) {\n if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {\n return quoteString(key, true)\n }\n }\n\n return key\n }\n\n function serializeArray (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let partial = [];\n for (let i = 0; i < value.length; i++) {\n const propertyString = serializeProperty(String(i), value);\n partial.push((propertyString !== undefined) ? propertyString : 'null');\n }\n\n let final;\n if (partial.length === 0) {\n final = '[]';\n } else {\n if (gap === '') {\n let properties = partial.join(',');\n final = '[' + properties + ']';\n } else {\n let separator = ',\\n' + indent;\n let properties = partial.join(separator);\n final = '[\\n' + indent + properties + ',\\n' + stepback + ']';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n};\n\nconst JSON5 = {\n parse,\n stringify,\n};\n\nvar lib = JSON5;\n\nexport default lib;\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, notNullish, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[k]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && permissionRead.value !== \"denied\") {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && permissionWrite.value !== \"denied\")\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), containerRect.width + container.scrollLeft - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), containerRect.height + container.scrollTop - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold: 0\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n ...gamepad,\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = target.document ? target.document.documentElement : (_a = target.documentElement) != null ? _a : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, initialOverflow);\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n var _a;\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = (_a = elInitialOverflow.get(el)) != null ? _a : \"\";\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n"],"names":["errorWrap","getter","catchHandler","finallyHandler","e","message","error","errorTry","fn","args","a","value","O","len","start","relativeStart","k","end","relativeEnd","finalValue","TypedArray","log","LN2","x","asUint","searchString","position","subjectString","lastIndex","b","clz32","imul_0","isView","setMetadataFor","CharSequence","interfaceMeta","Comparable","Number_0","classMeta","Unit","objectMeta","IntCompanionObject","Comparator","Collection","AbstractCollection","VOID","AbstractMutableCollection","IteratorImpl","ListIteratorImpl","List","AbstractMutableList","Map_0","AbstractMap","AbstractMutableMap","Set","AbstractMutableSet","Companion","ArrayList","ArrayList_init_$Create$","HashMap","HashMap_init_$Create$","HashMapEntrySetBase","HashMapEntrySet","HashSet","HashSet_init_$Create$","Companion_0","Itr","KeysItr","EntriesItr","Entry","EntryRef","containsAllEntries","m","tmp$ret$0","$l$block_0","tmp","isInterface","tmp0_iterator","element","entry","tmp_0","InternalMap","InternalHashMap","InternalHashMap_init_$Create$","LinkedHashMap","LinkedHashMap_init_$Create$","LinkedHashSet","LinkedHashSet_init_$Create$","KProperty1","StringBuilder","StringBuilder_init_$Create$_0","Companion_1","Regex","sam$kotlin_Comparator$0","_no_name_provided__qut3iv","Companion_2","Char","Companion_3","Enum","arrayIterator$1","Companion_4","Long","Digit","Continuation","CoroutineImpl","CompletedContinuation","_no_name_provided__qut3iv_0","Exception","Exception_init_$Create$","RuntimeException","RuntimeException_init_$Create$","IllegalArgumentException","IllegalArgumentException_init_$Create$","IndexOutOfBoundsException","IndexOutOfBoundsException_init_$Create$","IllegalStateException","IllegalStateException_init_$Create$","UnsupportedOperationException","UnsupportedOperationException_init_$Create$","NoSuchElementException","NoSuchElementException_init_$Create$","Error_0","Error_init_$Create$","NumberFormatException","NumberFormatException_init_$Create$","ArithmeticException","ArithmeticException_init_$Create$","ConcurrentModificationException","ConcurrentModificationException_init_$Create$","NullPointerException","NullPointerException_init_$Create$","ClassCastException","ClassCastException_init_$Create$","Companion_5","Companion_6","Companion_7","EmptyIterator","ArrayAsCollection","EmptyList","IndexedValue","IntIterator","CharIterator","SequenceScope","SequenceBuilderIterator","_no_name_provided__qut3iv_1","TransformingSequence$iterator$1","TransformingSequence","TakeWhileSequence$iterator$1","TakeWhileSequence","DropTakeSequence","DropSequence$iterator$1","DropSequence","DropWhileSequence$iterator$1","DropWhileSequence","FilteringSequence$iterator$1","FilteringSequence","IndexingSequence$iterator$1","IndexingSequence","TakeSequence$iterator$1","TakeSequence","EmptySequence","SubSequence$iterator$1","SubSequence","EmptySet","NaturalOrderComparator","Key","ContinuationInterceptor","EmptyCoroutineContext","CoroutineSingletons","Companion_8","IntProgression","IntRange","Companion_9","CharProgression","CharRange","IntProgressionIterator","CharProgressionIterator","Companion_10","Companion_11","UnsafeLazyImpl","UNINITIALIZED_VALUE","Companion_12","Failure","NotImplementedError","Pair","protoOf","Unit_instance","IntCompanionObject_instance","isNaN_0","_this__u8e3s4","takeHighestOneBit","collectionToArray","collection","collectionToArrayCommonImpl","listOf","arrayListOf","copyToArray","checkIndexOverflow","index","throwIndexOverflow","sort","collectionsSort","naturalOrder","sortWith","comparator","setOf","hashSetOf","list","array","sortArrayWith","inductionVariable","last","i","elements","modified","$outer","tmp1","IllegalStateException_init_$Create$_0","toString_2","Companion_instance_5","tmp$ret$1","$l$block","item","equals","fromIndex","toIndex","iterator","times","other","Companion_instance_7","arrayOfUninitializedElements","capacity","IllegalArgumentException_init_$Create$_0","fillArrayVal","resetRange","copyOfUninitializedElements","newSize","copyOf_0","Companion_instance","this_0","ArrayList_init_$Create$_0","Companion_getInstance","ArrayList_init_$Init$","$this","objectCreate","ArrayList_init_$Init$_0","initialCapacity","ArrayList_init_$Init$_1","ArrayList_init_$Create$_1","increaseLength","amount","previous","rangeCheck","insertionRangeCheck","THROW_CCE","offset","index_0","get_lastIndex_0","indexOf","arrayToString","_stableSortingIsSupported","getStableSortingIsSupported","comparison","sortArrayWith$lambda","mergeSort","get_lastIndex","sortArray","sortArray$lambda","tmp0_safe_receiver","getStableSortingIsSupported$lambda","inductionVariable_0","endInclusive","size","buffer","result","mergeSort_0","median","left","right","target","leftIndex","rightIndex","leftValue","rightValue","$comparator","compareTo_0","HashMap_init_$Init$","internalMap","HashMap_init_$Init$_0","HashMap_init_$Init$_1","loadFactor","InternalHashMap_init_$Create$_1","HashMap_init_$Init$_2","key","tmp0_elvis_lhs","backing","HashSet_init_$Init$","map","HashSet_init_$Init$_0","HashSet_init_$Init$_1","InternalHashMap_init_$Create$_0","HashSet_init_$Init$_2","HashSet_init_$Init$_3","HashSet_init_$Create$_0","computeHashSize","coerceAtLeast","computeShift","hashSize","InternalHashMap_init_$Init$","InternalHashMap_init_$Init$_0","Companion_instance_0","InternalHashMap_init_$Init$_1","_get_capacity__a9k9f3","_get_hashSize__tftcho","registerModification","ensureExtraCapacity","shouldCompact","rehash","ensureCapacity","extraCapacity","spareCapacity","gaps","minCapacity","RuntimeException_init_$Create$_0","copyOf","newHashSize","allocateValuesArray","curValuesArray","newValuesArray","hash","hashCode","compact","j","valuesArray","fill","tmp0","putRehash","hash_0","probesLeft","findKey","addKey","retry","tentativeMaxProbeDistance","coerceAtMost","probeDistance","putIndex","tmp4","contentEquals","tmp1_elvis_lhs","tmp0_safe_receiver_0","ensureNotNull","tmp1_elvis_lhs_0","sb","keysArray","presenceArray","hashArray","maxProbeDistance","length","oldValue","it","StringBuilder_init_$Create$","LinkedHashMap_init_$Init$","LinkedHashMap_init_$Init$_0","LinkedHashMap_init_$Create$_0","LinkedHashSet_init_$Init$","LinkedHashSet_init_$Init$_0","LinkedHashSet_init_$Create$_0","LinkedHashSet_init_$Init$_1","LinkedHashSet_init_$Init$_2","LinkedHashSet_init_$Create$_1","reset","StringBuilder_init_$Init$","StringBuilder_init_$Init$_0","content","get_lastIndex_1","charSequenceGet","IndexOutOfBoundsException_init_$Create$_0","startIndex","endIndex","toString_0","toString_1","uppercaseChar","uppercase","isWhitespace","isWhitespaceImpl","toString","radix","checkRadix","toInt","toIntOrNull","numberFormatError","toInt_0","toIntOrNull_0","digitOf","char","Char__compareTo_impl_ypi4mb","Char__minus_impl_a2frrh","digitToIntImpl","Regex_init_$Init$","pattern","emptySet","Regex_init_$Create$","Companion_instance_1","Companion_getInstance_1","options","toSet","toFlags","input","match","charSequenceLength","prepend","joinToString_0","toFlags$lambda","contentEquals_0","contentEqualsImpl","function_0","isBlank","get_indices","startsWith","prefix","ignoreCase","regionMatches","startsWith_0","endsWith","suffix","thisOffset","otherOffset","regionMatchesImpl","asSequence","emptySequence","single","NoSuchElementException_init_$Create$_0","contains","last_0","toCollection","destination","joinToString","separator","postfix","limit","truncated","transform","joinTo","count","$l$loop","appendElement","$this_asSequence","arrayIterator","joinTo_0","distinct","toList","toMutableSet","firstOrNull","plus","result_0","addAll","sorted","isArray","sort_0","asList","this_1","toMutableList_0","first","toMutableList","emptyList","optimizeReadOnlyList","toCollection_0","sortedWith","sortWith_0","optimizeReadOnlySet","downTo","to","Companion_instance_10","maximumValue","minimumValue","toList_0","dst","firstOrNull_0","elementAtOrNull","toMutableList_1","toCollection_1","takeWhile","predicate","drop","dropWhile","filterIndexed","filterIndexed$lambda","filterIndexed$lambda_0","take","$predicate","getOrNull","_Char___init__impl__6a9atx_0","code","Char__compareTo_impl_ypi4mb_0","Char__rangeTo_impl_tkncvp","Char__toInt_impl_vasixd","Char__equals_impl_x6719k","Char__hashCode_impl_otmys","Companion_instance_2","Companion_getInstance_2","name","ordinal","identityHashCode","implement","interfaces","maxSize","masks","currentSize","imask","iid","bitMaskWith","iidImask","compositeBitMask","activeBit","numberIndex","intArray","positionInNumber","numberWithSettledBit","tmp_1","mask","isBitSet","possibleActiveBit","initValue","charArrayOf","arr","type","$array","get_buf","_init_properties_bitUtils_kt__nfcg4k","buf","get_bufFloat64","bufFloat64","get_bufInt32","bufInt32","get_lowIndex","lowIndex","get_highIndex","highIndex","getNumberHashCode","obj","numberToInt","properties_initialized_bitUtils_kt_i2bo3e","isString","numberToChar","charSequenceSubSequence","arrayToString$lambda","doubleCompareTo","primitiveCompareTo","compareToDoNotIntrinsicify","ia","getObjectHashCode","calculateRandomHash","descriptor","o","isArrayish","anyToString","typeOf","getBooleanHashCode","getStringHashCode","getBigIntHashCode","getSymbolHashCode","str","shiftNumber","MASK","bigNumber","signum","chunk","hashCodeMap","symbolIsSharable","getSymbolMap","getSymbolWeakMap","cachedHashCode","symbol","symbolMap","symbolWeakMap","obj1","obj2","captureStack","instance","constructorFunction","constructor","defineProp","setter","proto","extendThrowable","this_","cause","setPropertiesToThrowableInstance","errorInfo","calculateErrorInfo","v","THROW_NPE","lazy","initializer","fillFrom","src","srcLen","dstLen","arrayCopyResize","source","defaultValue","Companion_instance_4","Companion_getInstance_4","low","high","compare","add","divide","toNumber","equalsLong","hashCode_0","toStringImpl","get_ZERO","_init_properties_longjs_kt__tqrzid","ZERO","get_ONE","ONE","get_NEG_ONE","NEG_ONE","get_MAX_VALUE","MAX_VALUE","get_MIN_VALUE","MIN_VALUE","get_TWO_PWR_24_","TWO_PWR_24_","thisNeg","isNegative","otherNeg","subtract","a48","a32","a16","a00","b48","b32","b16","b00","c48","c32","c16","c00","multiply","isZero","isOdd","negate","lessThan","fromNumber","Exception_init_$Create$_0","halfThis","shiftRight","approx","shiftLeft","rem","res","rem_0","greaterThanOrEqual","approxDouble","approx2","log2","delta","approxRes","approxRem","greaterThan","numBits","numBits_0","getLowBitsUnsigned","l","radixLong","fromInt","div","digitsPerTime","radixToPower","remDiv","intval","digits","twoPwr32","properties_initialized_longjs_kt_5aju7t","defaultConstructor","associatedObjectKey","associatedObjects","suspendArity","createMetadata","kind","undef","ctor","metadataConstructor","parent","metadata","receiver","generateInterfaceId","doubleToInt","toShort","numberRangeToNumber","get_propertyRefClassMetadataCache","_init_properties_reflectRuntime_kt__5r4uu3","propertyRefClassMetadataCache","metadataObject","getPropertyCallableRef","paramCount","superType","getPropertyRefClass","getKPropMetadata","getInterfaceMaskFor","tmp$ret$2","properties_initialized_reflectRuntime_kt_inkhwd","isJsArray","iface","isInterfaceImpl","isNumber","isComparable","isCharSequence","tmp2_safe_receiver","hasProp","parentProto","getPrototypeOf","propName","reverse","midPoint","reverseIndex","ch","binarySearchRange","Digit_getInstance","diff","needle","bottom","top","middle","Digit_instance","releaseIntercepted","intercepted","Key_instance","CompletedContinuation_instance","resultContinuation","current","_Result___get_isFailure__impl__jpiriv","currentResult","currentException","Result__exceptionOrNull_impl_p6xea9","$this$with","outcome","get_COROUTINE_SUSPENDED","$p","exception","completion","exception_0","createFailure","tmp$ret$4","createCoroutineUnintercepted","$completion","$this_createCoroutineUnintercepted","$receiver","$completion$1","Exception_init_$Init$","Exception_init_$Init$_0","IllegalArgumentException_init_$Init$","RuntimeException_init_$Init$","IllegalArgumentException_init_$Init$_0","RuntimeException_init_$Init$_0","IndexOutOfBoundsException_init_$Init$","IndexOutOfBoundsException_init_$Init$_0","IllegalStateException_init_$Init$","IllegalStateException_init_$Init$_0","UnsupportedOperationException_init_$Init$","NoSuchElementException_init_$Init$","NoSuchElementException_init_$Init$_0","Error_init_$Init$","Error_init_$Init$_0","NumberFormatException_init_$Init$","NumberFormatException_init_$Init$_0","NumberFormatException_init_$Create$_0","ArithmeticException_init_$Init$","ArithmeticException_init_$Init$_0","ArithmeticException_init_$Create$_0","ConcurrentModificationException_init_$Init$","NullPointerException_init_$Init$","ClassCastException_init_$Init$","AbstractCollection$toString$lambda","this$0","element_0","oldCapacity","newCapacity","c","tmp2_elvis_lhs","otherIterator","elem","elemOther","toString_3","implFindEntry","AbstractMap$toString$lambda","ourValue","mutableListOf","listOf_0","EmptyList_getInstance","EmptyIterator_instance","values","isVarargs","EmptyList_instance","tmp0_other_with_cast","flatten","collectionSizeOrDefault","default_0","removeLast","tmp1_iterator","sequence","block","nextNotReady","exceptionalState","step","throwOnFailure","EmptyCoroutineContext_getInstance","$block","EmptySequence_instance","transformer","calcNext","drop_0","n","n1","drop_1","calcNext_0","sendWhen","drop_2","_get_count__iw3m8u","message_0","message_1","EmptySet_getInstance","EmptySet_instance","NaturalOrderComparator_instance","compareValues","EmptyCoroutineContext_instance","CoroutineSingletons_COROUTINE_SUSPENDED_getInstance","CoroutineSingletons_COROUTINE_SUSPENDED_instance","CoroutineSingletons_entriesInitialized","CoroutineSingletons_initEntries","getProgressionLastElement","differenceModulo","mod","Companion_instance_8","Companion_getInstance_8","Companion_instance_9","Companion_getInstance_9","rangeStart","rangeEnd","equals_0","thisUpper","otherUpper","tmp$ret$6","firstChar","limitForMaxRadix","limitBeforeMul","digit","contains_0","indexOf_0","startsWith_1","contains_1","indexOf_1","indexOf_2","endsWith_0","indexOfAny","string","indices","last_1","step_0","trim","startFound","chars","charAtIndex","UNINITIALIZED_VALUE_instance","second","that","imul","CommonSelector","CommonTransform","ExtSyntaxError","Selector","Transform$_init_$lambda$slambda_haa4hj","Transform$_init_$lambda$slambda_haa4hj_1","Transform$_init_$lambda$slambda_haa4hj_3","Transform$_init_$lambda$slambda_haa4hj_5","Transform$querySelectorAll$lambda$slambda","Transform$querySelectorTrackAll$lambda$slambda","Transform","Expression","BinaryExpression","CompareOperator","Equal","NotEqual","Start","NotStart","Include","NotInclude","End","NotEnd","Less","LessEqual","More","MoreEqual","ConnectExpression","sam$kotlin_Comparator$0_0","ConnectOperator","BeforeBrother","AfterBrother","Ancestor","Child","Descendant","ConnectSegment$traversal$o$invoke$slambda","ConnectSegment$traversal$1","ConnectSegment$traversal$2","ConnectSegment","ConnectWrapper","LogicalExpression","sam$kotlin_Comparator$0_1","LogicalOperator","AndOperator","OrOperator","PolynomialExpression$traversal$1","PolynomialExpression","PropertySegment$matchName$1","PropertySegment$matchName$2","PropertySegment","PropertyWrapper","TupleExpression$traversal$1","TupleExpression","Parser","ParserResult","ParserSet","FilterIndexesSequence$iterator$1","FilterIndexesSequence","selector","node","CommonTransform$transform$lambda","$getChildren","CommonTransform$querySelectorAll$lambda","CommonTransform$querySelector$lambda","CommonTransform$querySelectorTrackAll$lambda$lambda","CommonTransform$querySelectorTrackAll$lambda","CommonTransform$querySelectorTrack$lambda","getAttr","getName","getChildren","getParent","tmp_2","tmp_3","expectedValue","$super","ParserSet_getInstance","Selector$tracks$delegate$lambda","Selector$connectKeys$delegate$lambda","keys","tmp1_safe_receiver","Selector$propertyNames$delegate$lambda","p","names","s","propertyWrapper","tmp_4","tmp_5","tmp_6","tmp_7","Equal_getInstance","tmp_8","tmp_9","e_0","tmp_10","tmp_11","tmp_12","tmp_13","tmp_14","tmp_15","e_1","tmp_16","tmp_17","tmp_18","tmp_19","Start_getInstance","Include_getInstance","End_getInstance","tmp_20","tmp_21","e_2","tmp_22","tmp_23","tmp_24","tracks$factory","connectKeys$factory","propertyNames$factory","trackNodes","trackTempNodes","Transform$_init_$lambda$slambda$lambda_6maxik","$node","Transform$_init_$lambda$slambda$lambda_6maxik_0","Transform$_init_$lambda_wpwstd","$getParent","$this$sequence","p1","suspendResult","$sm","Transform$_init_$lambda$slambda_haa4hj_0","Transform$_init_$lambda_wpwstd_0","Transform$_init_$lambda_wpwstd_1","$getAncestors","Transform$_init_$lambda$slambda_haa4hj_2","Transform$_init_$lambda_wpwstd_2","Transform$_init_$lambda_wpwstd_3","$getBeforeBrothers","Transform$_init_$lambda$slambda_haa4hj_4","Transform$_init_$lambda_wpwstd_4","Transform$_init_$lambda_wpwstd_5","$getAfterBrothers","childNode","Transform$_init_$lambda$slambda_haa4hj_6","Transform$_init_$lambda_wpwstd_6","$selector","Transform$querySelectorAll$lambda$slambda_0","Transform$querySelectorAll$lambda","Transform$querySelector$lambda","Transform$querySelectorTrackAll$lambda$slambda_0","Transform$querySelectorTrackAll$lambda","Transform$querySelectorTrack$lambda","getChild","getAncestors","getAncestor","getBeforeBrothers","getBeforeBrother","getAfterBrothers","getAfterBrother","getDescendants","operator","wrapChar","indexedObject","escapeChar","tmp1_subject","contentReversedEquals","CompareOperator$Companion$allSubClasses$lambda","NotEqual_getInstance","NotStart_getInstance","NotInclude_getInstance","NotEnd_getInstance","Less_getInstance","LessEqual_getInstance","More_getInstance","MoreEqual_getInstance","Equal_instance","NotEqual_instance","Start_instance","NotStart_instance","Include_instance","NotInclude_instance","End_instance","NotEnd_instance","Less_instance","LessEqual_instance","More_instance","MoreEqual_instance","ConnectOperator$Companion$allSubClasses$lambda","Companion_instance_3","BeforeBrother_getInstance","AfterBrother_getInstance","Ancestor_getInstance","Child_getInstance","Descendant_getInstance","Companion_getInstance_3","BeforeBrother_instance","AfterBrother_instance","Ancestor_instance","Child_instance","Descendant_instance","$transform","ConnectSegment$traversal$o$invoke$slambda_0","connectExpression","connectSegment","r","leftStr","rightStr","LogicalOperator$Companion$allSubClasses$lambda","AndOperator_getInstance","OrOperator_getInstance","AndOperator_instance","OrOperator_instance","PolynomialExpression$traversal$o$invoke$lambda","_anonymous_parameter_1__qggqgd","sq","bOp","PropertySegment$toString$lambda","tracked","expressions","matchTag","propertySegment","filterIndexes","numbers","temp","data","ParserSet$whiteCharParser$lambda","ParserSet$whiteCharStrictParser$lambda","ParserSet$nameParser$lambda","s0","center","ParserSet$combinatorOperatorParser$lambda","ParserSet$combinatorOperatorParser$lambda_0","_anonymous_parameter_2__qggqfi","ParserSet$integerParser$lambda","ParserSet$monomialParser$lambda","tmp0_subject","signal","coefficientResult","coefficient","ParserSet$polynomialExpressionParser$lambda","monomialResultList","monomialResult","monomialResult_0","tmp0_container","power","tmp0_iterator_0","tmp3_elvis_lhs","tmp4_elvis_lhs","polynomialExpression","ParserSet$tupleExpressionParser$lambda","intResult","ParserSet$connectExpressionParser$lambda","tupleExpressionResult","polynomialExpressionResult","ParserSet$combinatorParser$lambda","operatorResult","expressionResult","ParserSet$attrOperatorParser$lambda","ParserSet$attrOperatorParser$lambda_0","ParserSet$stringParser$lambda","startChar","containsArg","tmp2_subject","startIndex_0","endIndex_0","ParserSet$propertyParser$lambda","ParserSet$valueParser$lambda","inductionVariable_1","element_1","ParserSet$binaryExpressionParser$lambda","parserResult","valueResult","ParserSet$logicalOperatorParser$lambda","ParserSet$attrParser$lambda","exp","ParserSet$selectorUnitParser$lambda","nameResult","attrResult","ParserSet$connectSelectorParser$lambda","topSelector","selectorList","combinatorResult","combinator","selectorResult","ParserSet$endParser$lambda","ParserSet$selectorParser$lambda","combinatorSelectorResult","propertySelectorList","combinatorSelectorList","wrapperList","combinatorSelectorWrapper","propertySelectorWrapper","ParserSet_instance","parserResults","lastToken","this_2","tmp$ret$5","tokens","token","indexes","subKey","_a","parseSelector","cs","checkSelector","Space_Separator","ID_Start","ID_Continue","unicode","util","parseState","stack","pos","line","column","root","parse","text","reviver","lex","parseStates","internalize","holder","replacement","lexState","doubleQuote","sign","peek","lexStates","read","newToken","invalidChar","literal","u","unicodeEscape","invalidIdentifier","escape","separatorChar","hexEscape","invalidEOF","push","pop","syntaxError","formatChar","replacements","hexString","err","stringify","replacer","space","indent","propertyList","replacerFunc","gap","quote","serializeProperty","quoteString","serializeArray","serializeObject","quotes","product","quoteChar","stepback","partial","propertyString","member","serializeKey","final","properties","JSON5","lib","tryOnScopeDispose","getCurrentScope","onScopeDispose","toValue","unref","isClient","isObject","val","noop","createFilterWrapper","filter","wrapper","resolve","reject","bypassFilter","invoke","debounceFilter","ms","timer","maxTimer","lastRejector","_clearTimeout","timer2","duration","maxDuration","pausableFilter","extendFilter","isActive","ref","pause","resume","eventFilter","readonly","getLifeCycleTarget","getCurrentInstance","toRef","toRef$1","customRef","useDebounceFn","watchWithFilter","cb","watchOptions","watch","watchPausable","tryOnBeforeUnmount","onBeforeUnmount","tryOnMounted","sync","onMounted","nextTick","unrefElement","elRef","plain","defaultWindow","defaultDocument","useEventListener","events","listeners","cleanups","cleanup","register","el","event","listener","options2","stopWatch","optionsClone","stop","useMounted","isMounted","useSupported","callback","computed","_global","globalKey","handlers","getHandlers","getSSRHandler","fallback","guessSerializerType","rawInit","StorageSerializers","customStorageEventName","useStorage","defaults","storage","flush","deep","listenToStorageChanges","writeDefaults","mergeDefaults","shallow","window","onError","initOnMounted","shallowRef","_a2","serializer","pauseWatch","resumeWatch","pausableWatch","write","update","updateFromCustomEvent","serialized","rawValue","useMutationObserver","mutationOptions","observer","isSupported","takeRecords","useTitle","newTitle","_b","_c","document","restoreOnUnmount","t","original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S,QAAU,KAAOzL,EAAK,GACjF6L,EAAQpF,IAAO8E,EAAKD,IAA8BG,GAAY,KAAO,OAASA,EAAS,SAAU,KAAOF,EAAK,IAAI,EACjHO,EAAaR,GAAY,OAAOA,GAAa,WACnD,SAASS,EAAOJ,EAAG,CACjB,GAAI,EAAE,kBAAmBt7B,GAChB,OAAAs7B,EACH,MAAAK,EAAW37B,EAAQ,eAAiB,KACnC,OAAA,OAAO27B,GAAa,WAAaA,EAASL,CAAC,EAAIlH,GAAQuH,CAAQ,EAAE,QAAQ,MAAOL,CAAC,CAC1F,CACA,OAAA3E,GACE6E,EACA,CAACF,EAAGjyB,IAAM,CACJiyB,IAAMjyB,GAAK+xB,IACbA,EAAS,MAAQM,EAAO,OAAOJ,GAAM,SAAWA,EAAI,EAAE,EAC1D,EACA,CAAE,UAAW,EAAK,CAAA,EAEhBt7B,EAAQ,SAAW,CAACA,EAAQ,eAAiBo7B,GAAY,CAACK,GAC5Dd,IACGQ,EAAKC,EAAS,OAAS,KAAO,OAASD,EAAG,cAAc,OAAO,EAChE,IAAM,CACAC,GAAYA,EAAS,QAAUI,EAAM,QACjCA,EAAA,MAAQE,EAAON,EAAS,KAAK,EACvC,EACA,CAAE,UAAW,EAAK,CAAA,EAGtBvE,GAAmB,IAAM,CACvB,GAAIwE,EAAkB,CACpB,MAAMO,EAAgBP,EAAiBE,EAAeC,EAAM,OAAS,EAAE,EACnEI,GAAiB,MAAQR,IAC3BA,EAAS,MAAQQ,EACrB,CAAA,CACD,EACMJ,CACT","x_google_ignoreList":[1,2,4,5,6]} \ No newline at end of file diff --git a/assets/index-KbMk1nPu.js b/assets/index-O1rtA3Eg.js similarity index 99% rename from assets/index-KbMk1nPu.js rename to assets/index-O1rtA3Eg.js index 74b9754..570cbcc 100644 --- a/assets/index-KbMk1nPu.js +++ b/assets/index-O1rtA3Eg.js @@ -451,7 +451,7 @@ ${t} * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const qn=typeof window<"u";function z1(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Oe=Object.assign;function Zs(e,t){const n={};for(const r in t){const o=t[r];n[r]=Ot(o)?o.map(e):e(o)}return n}const jr=()=>{},Ot=Array.isArray,W1=/\/$/,j1=e=>e.replace(W1,"");function Js(e,t,n="/"){let r,o={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),o=e(s)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=K1(r??t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:i}}function U1(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Lc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function V1(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&ar(t.matched[r],n.matched[o])&&Wd(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ar(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Wd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!G1(e[n],t[n]))return!1;return!0}function G1(e,t){return Ot(e)?Ic(e,t):Ot(t)?Ic(t,e):e===t}function Ic(e,t){return Ot(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function K1(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,a;for(i=0;i1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i-(i===r.length?1:0)).join("/")}var so;(function(e){e.pop="pop",e.push="push"})(so||(so={}));var Ur;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ur||(Ur={}));function Y1(e){if(!e)if(qn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),j1(e)}const X1=/^[^#]+#/;function q1(e,t){return e.replace(X1,"#")+t}function Z1(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ss=()=>({left:window.pageXOffset,top:window.pageYOffset});function J1(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Z1(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Ac(e,t){return(history.state?history.state.position-t:-1)+e}const Li=new Map;function Q1(e,t){Li.set(e,t)}function eC(e){const t=Li.get(e);return Li.delete(e),t}let tC=()=>location.protocol+"//"+location.host;function jd(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let a=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(a);return l[0]!=="/"&&(l="/"+l),Lc(l,"")}return Lc(n,e)+r+o}function nC(e,t,n,r){let o=[],s=[],i=null;const a=({state:m})=>{const b=jd(e,location),g=n.value,w=t.value;let C=0;if(m){if(n.value=b,t.value=m,i&&i===g){i=null;return}C=w?m.position-w.position:0}else r(b);o.forEach(p=>{p(n.value,g,{delta:C,type:so.pop,direction:C?C>0?Ur.forward:Ur.back:Ur.unknown})})};function l(){i=n.value}function c(m){o.push(m);const b=()=>{const g=o.indexOf(m);g>-1&&o.splice(g,1)};return s.push(b),b}function f(){const{history:m}=window;m.state&&m.replaceState(Oe({},m.state,{scroll:Ss()}),"")}function h(){for(const m of s)m();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:l,listen:c,destroy:h}}function $c(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Ss():null}}function rC(e){const{history:t,location:n}=window,r={value:jd(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,c,f){const h=e.indexOf("#"),m=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+l:tC()+e+l;try{t[f?"replaceState":"pushState"](c,"",m),o.value=c}catch(b){console.error(b),n[f?"replace":"assign"](m)}}function i(l,c){const f=Oe({},t.state,$c(o.value.back,l,o.value.forward,!0),c,{position:o.value.position});s(l,f,!0),r.value=l}function a(l,c){const f=Oe({},o.value,t.state,{forward:l,scroll:Ss()});s(f.current,f,!0);const h=Oe({},$c(r.value,l,null),{position:f.position+1},c);s(l,h,!1),r.value=l}return{location:r,state:o,push:a,replace:i}}function oC(e){e=Y1(e);const t=rC(e),n=nC(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=Oe({location:"",base:e,go:r,createHref:q1.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function sC(e){return typeof e=="string"||e&&typeof e=="object"}function Ud(e){return typeof e=="string"||typeof e=="symbol"}const nn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Vd=Symbol("");var Nc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Nc||(Nc={}));function lr(e,t){return Oe(new Error,{type:e,[Vd]:!0},t)}function Wt(e,t){return e instanceof Error&&Vd in e&&(t==null||!!(e.type&t))}const kc="[^/]+?",iC={sensitive:!1,strict:!1,start:!0,end:!0},aC=/[.+*?^${}()[\]/\\]/g;function lC(e,t){const n=Oe({},iC,t),r=[];let o=n.start?"^":"";const s=[];for(const c of e){const f=c.length?[]:[90];n.strict&&!c.length&&(o+="/");for(let h=0;ht.length?t.length===1&&t[0]===80?1:-1:0}function uC(e,t){let n=0;const r=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const fC={type:0,value:""},dC=/[a-zA-Z0-9_]/;function hC(e){if(!e)return[[]];if(e==="/")return[[fC]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${c}": ${b}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let a=0,l,c="",f="";function h(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function m(){c+=l}for(;a{i(_)}:jr}function i(f){if(Ud(f)){const h=r.get(f);h&&(r.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function a(){return n}function l(f){let h=0;for(;h=0&&(f.record.path!==n[h].record.path||!Gd(f,n[h]));)h++;n.splice(h,0,f),f.record.name&&!Dc(f)&&r.set(f.record.name,f)}function c(f,h){let m,b={},g,w;if("name"in f&&f.name){if(m=r.get(f.name),!m)throw lr(1,{location:f});w=m.record.name,b=Oe(Fc(h.params,m.keys.filter(_=>!_.optional).map(_=>_.name)),f.params&&Fc(f.params,m.keys.map(_=>_.name))),g=m.stringify(b)}else if("path"in f)g=f.path,m=n.find(_=>_.re.test(g)),m&&(b=m.parse(g),w=m.record.name);else{if(m=h.name?r.get(h.name):n.find(_=>_.re.test(h.path)),!m)throw lr(1,{location:f,currentLocation:h});w=m.record.name,b=Oe({},h.params,f.params),g=m.stringify(b)}const C=[];let p=m;for(;p;)C.unshift(p.record),p=p.parent;return{name:w,path:g,params:b,matched:C,meta:bC(C)}}return e.forEach(f=>s(f)),{addRoute:s,resolve:c,removeRoute:i,getRoutes:a,getRecordMatcher:o}}function Fc(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function gC(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vC(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vC(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Dc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function bC(e){return e.reduce((t,n)=>Oe(t,n.meta),{})}function Hc(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Gd(e,t){return t.children.some(n=>n===e||Gd(e,n))}const Kd=/#/g,_C=/&/g,yC=/\//g,CC=/=/g,EC=/\?/g,Yd=/\+/g,xC=/%5B/g,wC=/%5D/g,Xd=/%5E/g,TC=/%60/g,qd=/%7B/g,SC=/%7C/g,Zd=/%7D/g,PC=/%20/g;function La(e){return encodeURI(""+e).replace(SC,"|").replace(xC,"[").replace(wC,"]")}function RC(e){return La(e).replace(qd,"{").replace(Zd,"}").replace(Xd,"^")}function Ii(e){return La(e).replace(Yd,"%2B").replace(PC,"+").replace(Kd,"%23").replace(_C,"%26").replace(TC,"`").replace(qd,"{").replace(Zd,"}").replace(Xd,"^")}function OC(e){return Ii(e).replace(CC,"%3D")}function LC(e){return La(e).replace(Kd,"%23").replace(EC,"%3F")}function IC(e){return e==null?"":LC(e).replace(yC,"%2F")}function os(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function AC(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;os&&Ii(s)):[r&&Ii(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function $C(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ot(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const NC=Symbol(""),zc=Symbol(""),Ps=Symbol(""),Ia=Symbol(""),Ai=Symbol("");function Lr(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function fn(e,t,n,r,o){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((i,a)=>{const l=h=>{h===!1?a(lr(4,{from:n,to:t})):h instanceof Error?a(h):sC(h)?a(lr(2,{from:t,to:h})):(s&&r.enterCallbacks[o]===s&&typeof h=="function"&&s.push(h),i())},c=e.call(r&&r.instances[o],t,n,l);let f=Promise.resolve(c);e.length<3&&(f=f.then(l)),f.catch(h=>a(h))})}function Qs(e,t,n,r){const o=[];for(const s of e)for(const i in s.components){let a=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(kC(a)){const c=(a.__vccOpts||a)[t];c&&o.push(fn(c,n,r,s,i))}else{let l=a();o.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`));const f=z1(c)?c.default:c;s.components[i]=f;const m=(f.__vccOpts||f)[t];return m&&fn(m,n,r,s,i)()}))}}return o}function kC(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Wc(e){const t=De(Ps),n=De(Ia),r=J(()=>t.resolve(ot(e.to))),o=J(()=>{const{matched:l}=r.value,{length:c}=l,f=l[c-1],h=n.matched;if(!f||!h.length)return-1;const m=h.findIndex(ar.bind(null,f));if(m>-1)return m;const b=jc(l[c-2]);return c>1&&jc(f)===b&&h[h.length-1].path!==b?h.findIndex(ar.bind(null,l[c-2])):m}),s=J(()=>o.value>-1&&HC(n.params,r.value.params)),i=J(()=>o.value>-1&&o.value===n.matched.length-1&&Wd(n.params,r.value.params));function a(l={}){return DC(l)?t[ot(e.replace)?"replace":"push"](ot(e.to)).catch(jr):Promise.resolve()}return{route:r,href:J(()=>r.value.href),isActive:s,isExactActive:i,navigate:a}}const MC=He({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Wc,setup(e,{slots:t}){const n=lo(Wc(e)),{options:r}=De(Ps),o=J(()=>({[Uc(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Uc(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:D("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),FC=MC;function DC(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function HC(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Ot(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function jc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Uc=(e,t,n)=>e??t??n,BC=He({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=De(Ai),o=J(()=>e.route||r.value),s=De(zc,0),i=J(()=>{let c=ot(s);const{matched:f}=o.value;let h;for(;(h=f[c])&&!h.components;)c++;return c}),a=J(()=>o.value.matched[i.value]);Dt(zc,J(()=>i.value+1)),Dt(NC,a),Dt(Ai,o);const l=ce();return vt(()=>[l.value,a.value,e.name],([c,f,h],[m,b,g])=>{f&&(f.instances[h]=c,b&&b!==f&&c&&c===m&&(f.leaveGuards.size||(f.leaveGuards=b.leaveGuards),f.updateGuards.size||(f.updateGuards=b.updateGuards))),c&&f&&(!b||!ar(f,b)||!m)&&(f.enterCallbacks[h]||[]).forEach(w=>w(c))},{flush:"post"}),()=>{const c=o.value,f=e.name,h=a.value,m=h&&h.components[f];if(!m)return Vc(n.default,{Component:m,route:c});const b=h.props[f],g=b?b===!0?c.params:typeof b=="function"?b(c):b:null,C=D(m,Oe({},g,t,{onVnodeUnmounted:p=>{p.component.isUnmounted&&(h.instances[f]=null)},ref:l}));return Vc(n.default,{Component:C,route:c})||C}}});function Vc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Jd=BC;function zC(e){const t=pC(e.routes,e),n=e.parseQuery||AC,r=e.stringifyQuery||Bc,o=e.history,s=Lr(),i=Lr(),a=Lr(),l=co(nn);let c=nn;qn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Zs.bind(null,A=>""+A),h=Zs.bind(null,IC),m=Zs.bind(null,os);function b(A,U){let F,Y;return Ud(A)?(F=t.getRecordMatcher(A),Y=U):Y=A,t.addRoute(Y,F)}function g(A){const U=t.getRecordMatcher(A);U&&t.removeRoute(U)}function w(){return t.getRoutes().map(A=>A.record)}function C(A){return!!t.getRecordMatcher(A)}function p(A,U){if(U=Oe({},U||l.value),typeof A=="string"){const u=Js(n,A,U.path),v=t.resolve({path:u.path},U),P=o.createHref(u.fullPath);return Oe(u,v,{params:m(v.params),hash:os(u.hash),redirectedFrom:void 0,href:P})}let F;if("path"in A)F=Oe({},A,{path:Js(n,A.path,U.path).path});else{const u=Oe({},A.params);for(const v in u)u[v]==null&&delete u[v];F=Oe({},A,{params:h(u)}),U.params=h(U.params)}const Y=t.resolve(F,U),me=A.hash||"";Y.params=f(m(Y.params));const _e=U1(r,Oe({},A,{hash:RC(me),path:Y.path})),d=o.createHref(_e);return Oe({fullPath:_e,hash:me,query:r===Bc?$C(A.query):A.query||{}},Y,{redirectedFrom:void 0,href:d})}function _(A){return typeof A=="string"?Js(n,A,l.value.path):Oe({},A)}function R(A,U){if(c!==A)return lr(8,{from:U,to:A})}function E(A){return y(A)}function S(A){return E(Oe(_(A),{replace:!0}))}function T(A){const U=A.matched[A.matched.length-1];if(U&&U.redirect){const{redirect:F}=U;let Y=typeof F=="function"?F(A):F;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=_(Y):{path:Y},Y.params={}),Oe({query:A.query,hash:A.hash,params:"path"in Y?{}:A.params},Y)}}function y(A,U){const F=c=p(A),Y=l.value,me=A.state,_e=A.force,d=A.replace===!0,u=T(F);if(u)return y(Oe(_(u),{state:typeof u=="object"?Oe({},me,u.state):me,force:_e,replace:d}),U||F);const v=F;v.redirectedFrom=U;let P;return!_e&&V1(r,Y,F)&&(P=lr(16,{to:v,from:Y}),we(Y,Y,!0,!1)),(P?Promise.resolve(P):W(v,Y)).catch(L=>Wt(L)?Wt(L,2)?L:ve(L):re(L,v,Y)).then(L=>{if(L){if(Wt(L,2))return y(Oe({replace:d},_(L.to),{state:typeof L.to=="object"?Oe({},me,L.to.state):me,force:_e}),U||v)}else L=M(v,Y,!0,d,me);return G(v,Y,L),L})}function x(A,U){const F=R(A,U);return F?Promise.reject(F):Promise.resolve()}function k(A){const U=Be.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(A):A()}function W(A,U){let F;const[Y,me,_e]=WC(A,U);F=Qs(Y.reverse(),"beforeRouteLeave",A,U);for(const u of Y)u.leaveGuards.forEach(v=>{F.push(fn(v,A,U))});const d=x.bind(null,A,U);return F.push(d),de(F).then(()=>{F=[];for(const u of s.list())F.push(fn(u,A,U));return F.push(d),de(F)}).then(()=>{F=Qs(me,"beforeRouteUpdate",A,U);for(const u of me)u.updateGuards.forEach(v=>{F.push(fn(v,A,U))});return F.push(d),de(F)}).then(()=>{F=[];for(const u of _e)if(u.beforeEnter)if(Ot(u.beforeEnter))for(const v of u.beforeEnter)F.push(fn(v,A,U));else F.push(fn(u.beforeEnter,A,U));return F.push(d),de(F)}).then(()=>(A.matched.forEach(u=>u.enterCallbacks={}),F=Qs(_e,"beforeRouteEnter",A,U),F.push(d),de(F))).then(()=>{F=[];for(const u of i.list())F.push(fn(u,A,U));return F.push(d),de(F)}).catch(u=>Wt(u,8)?u:Promise.reject(u))}function G(A,U,F){a.list().forEach(Y=>k(()=>Y(A,U,F)))}function M(A,U,F,Y,me){const _e=R(A,U);if(_e)return _e;const d=U===nn,u=qn?history.state:{};F&&(Y||d?o.replace(A.fullPath,Oe({scroll:d&&u&&u.scroll},me)):o.push(A.fullPath,me)),l.value=A,we(A,U,F,d),ve()}let Q;function ae(){Q||(Q=o.listen((A,U,F)=>{if(!Ve.listening)return;const Y=p(A),me=T(Y);if(me){y(Oe(me,{replace:!0}),Y).catch(jr);return}c=Y;const _e=l.value;qn&&Q1(Ac(_e.fullPath,F.delta),Ss()),W(Y,_e).catch(d=>Wt(d,12)?d:Wt(d,2)?(y(d.to,Y).then(u=>{Wt(u,20)&&!F.delta&&F.type===so.pop&&o.go(-1,!1)}).catch(jr),Promise.reject()):(F.delta&&o.go(-F.delta,!1),re(d,Y,_e))).then(d=>{d=d||M(Y,_e,!1),d&&(F.delta&&!Wt(d,8)?o.go(-F.delta,!1):F.type===so.pop&&Wt(d,20)&&o.go(-1,!1)),G(Y,_e,d)}).catch(jr)}))}let pe=Lr(),ne=Lr(),K;function re(A,U,F){ve(A);const Y=ne.list();return Y.length?Y.forEach(me=>me(A,U,F)):console.error(A),Promise.reject(A)}function xe(){return K&&l.value!==nn?Promise.resolve():new Promise((A,U)=>{pe.add([A,U])})}function ve(A){return K||(K=!A,ae(),pe.list().forEach(([U,F])=>A?F(A):U()),pe.reset()),A}function we(A,U,F,Y){const{scrollBehavior:me}=e;if(!qn||!me)return Promise.resolve();const _e=!F&&eC(Ac(A.fullPath,0))||(Y||!F)&&history.state&&history.state.scroll||null;return Kr().then(()=>me(A,U,_e)).then(d=>d&&J1(d)).catch(d=>re(d,A,U))}const Pe=A=>o.go(A);let Ue;const Be=new Set,Ve={currentRoute:l,listening:!0,addRoute:b,removeRoute:g,hasRoute:C,getRoutes:w,resolve:p,options:e,push:E,replace:S,go:Pe,back:()=>Pe(-1),forward:()=>Pe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ne.add,isReady:xe,install(A){const U=this;A.component("RouterLink",FC),A.component("RouterView",Jd),A.config.globalProperties.$router=U,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(l)}),qn&&!Ue&&l.value===nn&&(Ue=!0,E(o.location).catch(me=>{}));const F={};for(const me in nn)Object.defineProperty(F,me,{get:()=>l.value[me],enumerable:!0});A.provide(Ps,U),A.provide(Ia,Gu(F)),A.provide(Ai,l);const Y=A.unmount;Be.add(A),A.unmount=function(){Be.delete(A),Be.size<1&&(c=nn,Q&&Q(),Q=null,l.value=nn,Ue=!1,K=!1),Y()}}};function de(A){return A.reduce((U,F)=>U.then(()=>k(F)),Promise.resolve())}return Ve}function WC(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;iar(c,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(c=>ar(c,l))||o.push(l))}return[n,r,o]}function ww(){return De(Ps)}function Tw(){return De(Ia)}const Fo=lo({networkErrorDlgVisible:!1,githubErrorDlgVisible:!1}),jC=bt("div",null,"生成分享链接需要以下条件",-1),UC=bt("div",null,[Xt(" 在当前浏览器登录 "),bt("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer"}," github.com ")],-1),VC=bt("div",null,"访问其它域名资源需要以下条件",-1),GC=bt("div",null,[Xt(" 1. 安装脚本管理器, 如 "),bt("a",{href:"https://violentmonkey.github.io/",target:"_blank",rel:"noopener noreferrer"}," Violentmonkey ")],-1),KC=bt("div",null,[Xt(" 2. 安装油猴脚本 "),bt("a",{href:"https://github.com/gkd-kit/network-extension",target:"_blank",rel:"noopener noreferrer"}," network-extension ")],-1),YC=bt("div",null,"3. 在当前网站启用上述油猴脚本的API注入功能",-1),XC=bt("div",null,[Xt(" 4. 如果是分享链接则需要在当前浏览器登录 "),bt("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer"}," github.com ")],-1),qC=He({__name:"App",setup(e){return(t,n)=>(da(),ha(ot(T1),{locale:ot(G_),"date-locale":ot(Dy),abstract:""},{default:Bo(()=>[Ze(ot(Oc),{show:ot(Fo).githubErrorDlgVisible,"onUpdate:show":n[0]||(n[0]=r=>ot(Fo).githubErrorDlgVisible=r),preset:"dialog",title:"生成分享链接失败"},{default:Bo(()=>[jC,UC]),_:1},8,["show"]),Ze(ot(Oc),{show:ot(Fo).networkErrorDlgVisible,"onUpdate:show":n[1]||(n[1]=r=>ot(Fo).networkErrorDlgVisible=r),preset:"dialog",title:"访问其它域名资源失败"},{default:Bo(()=>[VC,GC,KC,YC,XC]),_:1},8,["show"]),Ze(ot(Jd))]),_:1},8,["locale","date-locale"]))}}),ZC="modulepreload",JC=function(e,t){return e[0]==="."?new URL(e,t).href:e},Gc={},Ir=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");o=Promise.all(n.map(i=>{if(i=JC(i,r),i in Gc)return;Gc[i]=!0;const a=i.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!r)for(let h=s.length-1;h>=0;h--){const m=s[h];if(m.href===i&&(!a||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":ZC,a||(f.as="script",f.crossOrigin=""),f.href=i,document.head.appendChild(f),a)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})}))}return o.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},QC=(e,t)=>{try{return new URL(e,t)}catch{}},eE=zC({history:oC("/"),routes:[{path:"/",component:()=>Ir(()=>import("./HomePage-wbzSXwwc.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{path:"/snapshot/:snapshotId",name:"snapshot",component:()=>Ir(()=>import("./SnapshotPage-CmKtZTGi.js"),__vite__mapDeps([7,1,2,3,4,8]),import.meta.url)},{path:"/import",name:"import",component:()=>Ir(()=>import("./ImportPage-wX1w62Qh.js"),__vite__mapDeps([9,2,5,4]),import.meta.url)},{path:"/import/:github_zip_asset_id",redirect(e){var r;const t=(r=String(e.params.github_zip_asset_id).match(/^\d+/))==null?void 0:r[0];return t?{name:"import",query:{url:`https://github.com/gkd-kit/inspect/files/${t}/file.zip`}}:{path:"/404"}}},{path:"/device",name:"device",component:()=>Ir(()=>import("./DevicePage-XI-cAKHm.js"),__vite__mapDeps([10,2,8,6,3]),import.meta.url),beforeEnter(e,t,n){const r=QC(String(e.query.url));if(r){localStorage.setItem("device_link",r.origin);const o={...e.query};return delete o.url,n({...e,query:o})}n()}},{path:"/404",component:()=>Ir(()=>import("./_404Page-b8tPorP5.js"),__vite__mapDeps([]),import.meta.url)},{path:"/:pathMatch(.*)*",redirect:"/404"}]});/*! + */const qn=typeof window<"u";function z1(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Oe=Object.assign;function Zs(e,t){const n={};for(const r in t){const o=t[r];n[r]=Ot(o)?o.map(e):e(o)}return n}const jr=()=>{},Ot=Array.isArray,W1=/\/$/,j1=e=>e.replace(W1,"");function Js(e,t,n="/"){let r,o={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(r=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),o=e(s)),a>-1&&(r=r||t.slice(0,a),i=t.slice(a,t.length)),r=K1(r??t,n),{fullPath:r+(s&&"?")+s+i,path:r,query:o,hash:i}}function U1(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Lc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function V1(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&ar(t.matched[r],n.matched[o])&&Wd(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ar(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Wd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!G1(e[n],t[n]))return!1;return!0}function G1(e,t){return Ot(e)?Ic(e,t):Ot(t)?Ic(t,e):e===t}function Ic(e,t){return Ot(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function K1(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=n.length-1,i,a;for(i=0;i1&&s--;else break;return n.slice(0,s).join("/")+"/"+r.slice(i-(i===r.length?1:0)).join("/")}var so;(function(e){e.pop="pop",e.push="push"})(so||(so={}));var Ur;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ur||(Ur={}));function Y1(e){if(!e)if(qn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),j1(e)}const X1=/^[^#]+#/;function q1(e,t){return e.replace(X1,"#")+t}function Z1(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Ss=()=>({left:window.pageXOffset,top:window.pageYOffset});function J1(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Z1(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Ac(e,t){return(history.state?history.state.position-t:-1)+e}const Li=new Map;function Q1(e,t){Li.set(e,t)}function eC(e){const t=Li.get(e);return Li.delete(e),t}let tC=()=>location.protocol+"//"+location.host;function jd(e,t){const{pathname:n,search:r,hash:o}=t,s=e.indexOf("#");if(s>-1){let a=o.includes(e.slice(s))?e.slice(s).length:1,l=o.slice(a);return l[0]!=="/"&&(l="/"+l),Lc(l,"")}return Lc(n,e)+r+o}function nC(e,t,n,r){let o=[],s=[],i=null;const a=({state:m})=>{const b=jd(e,location),g=n.value,w=t.value;let C=0;if(m){if(n.value=b,t.value=m,i&&i===g){i=null;return}C=w?m.position-w.position:0}else r(b);o.forEach(p=>{p(n.value,g,{delta:C,type:so.pop,direction:C?C>0?Ur.forward:Ur.back:Ur.unknown})})};function l(){i=n.value}function c(m){o.push(m);const b=()=>{const g=o.indexOf(m);g>-1&&o.splice(g,1)};return s.push(b),b}function f(){const{history:m}=window;m.state&&m.replaceState(Oe({},m.state,{scroll:Ss()}),"")}function h(){for(const m of s)m();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:l,listen:c,destroy:h}}function $c(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?Ss():null}}function rC(e){const{history:t,location:n}=window,r={value:jd(e,n)},o={value:t.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,c,f){const h=e.indexOf("#"),m=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+l:tC()+e+l;try{t[f?"replaceState":"pushState"](c,"",m),o.value=c}catch(b){console.error(b),n[f?"replace":"assign"](m)}}function i(l,c){const f=Oe({},t.state,$c(o.value.back,l,o.value.forward,!0),c,{position:o.value.position});s(l,f,!0),r.value=l}function a(l,c){const f=Oe({},o.value,t.state,{forward:l,scroll:Ss()});s(f.current,f,!0);const h=Oe({},$c(r.value,l,null),{position:f.position+1},c);s(l,h,!1),r.value=l}return{location:r,state:o,push:a,replace:i}}function oC(e){e=Y1(e);const t=rC(e),n=nC(e,t.state,t.location,t.replace);function r(s,i=!0){i||n.pauseListeners(),history.go(s)}const o=Oe({location:"",base:e,go:r,createHref:q1.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function sC(e){return typeof e=="string"||e&&typeof e=="object"}function Ud(e){return typeof e=="string"||typeof e=="symbol"}const nn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Vd=Symbol("");var Nc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Nc||(Nc={}));function lr(e,t){return Oe(new Error,{type:e,[Vd]:!0},t)}function Wt(e,t){return e instanceof Error&&Vd in e&&(t==null||!!(e.type&t))}const kc="[^/]+?",iC={sensitive:!1,strict:!1,start:!0,end:!0},aC=/[.+*?^${}()[\]/\\]/g;function lC(e,t){const n=Oe({},iC,t),r=[];let o=n.start?"^":"";const s=[];for(const c of e){const f=c.length?[]:[90];n.strict&&!c.length&&(o+="/");for(let h=0;ht.length?t.length===1&&t[0]===80?1:-1:0}function uC(e,t){let n=0;const r=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const fC={type:0,value:""},dC=/[a-zA-Z0-9_]/;function hC(e){if(!e)return[[]];if(e==="/")return[[fC]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${c}": ${b}`)}let n=0,r=n;const o=[];let s;function i(){s&&o.push(s),s=[]}let a=0,l,c="",f="";function h(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function m(){c+=l}for(;a{i(_)}:jr}function i(f){if(Ud(f)){const h=r.get(f);h&&(r.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(i),h.alias.forEach(i))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&r.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function a(){return n}function l(f){let h=0;for(;h=0&&(f.record.path!==n[h].record.path||!Gd(f,n[h]));)h++;n.splice(h,0,f),f.record.name&&!Dc(f)&&r.set(f.record.name,f)}function c(f,h){let m,b={},g,w;if("name"in f&&f.name){if(m=r.get(f.name),!m)throw lr(1,{location:f});w=m.record.name,b=Oe(Fc(h.params,m.keys.filter(_=>!_.optional).map(_=>_.name)),f.params&&Fc(f.params,m.keys.map(_=>_.name))),g=m.stringify(b)}else if("path"in f)g=f.path,m=n.find(_=>_.re.test(g)),m&&(b=m.parse(g),w=m.record.name);else{if(m=h.name?r.get(h.name):n.find(_=>_.re.test(h.path)),!m)throw lr(1,{location:f,currentLocation:h});w=m.record.name,b=Oe({},h.params,f.params),g=m.stringify(b)}const C=[];let p=m;for(;p;)C.unshift(p.record),p=p.parent;return{name:w,path:g,params:b,matched:C,meta:bC(C)}}return e.forEach(f=>s(f)),{addRoute:s,resolve:c,removeRoute:i,getRoutes:a,getRecordMatcher:o}}function Fc(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function gC(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vC(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vC(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Dc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function bC(e){return e.reduce((t,n)=>Oe(t,n.meta),{})}function Hc(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Gd(e,t){return t.children.some(n=>n===e||Gd(e,n))}const Kd=/#/g,_C=/&/g,yC=/\//g,CC=/=/g,EC=/\?/g,Yd=/\+/g,xC=/%5B/g,wC=/%5D/g,Xd=/%5E/g,TC=/%60/g,qd=/%7B/g,SC=/%7C/g,Zd=/%7D/g,PC=/%20/g;function La(e){return encodeURI(""+e).replace(SC,"|").replace(xC,"[").replace(wC,"]")}function RC(e){return La(e).replace(qd,"{").replace(Zd,"}").replace(Xd,"^")}function Ii(e){return La(e).replace(Yd,"%2B").replace(PC,"+").replace(Kd,"%23").replace(_C,"%26").replace(TC,"`").replace(qd,"{").replace(Zd,"}").replace(Xd,"^")}function OC(e){return Ii(e).replace(CC,"%3D")}function LC(e){return La(e).replace(Kd,"%23").replace(EC,"%3F")}function IC(e){return e==null?"":LC(e).replace(yC,"%2F")}function os(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function AC(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;os&&Ii(s)):[r&&Ii(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function $C(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Ot(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const NC=Symbol(""),zc=Symbol(""),Ps=Symbol(""),Ia=Symbol(""),Ai=Symbol("");function Lr(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function fn(e,t,n,r,o){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((i,a)=>{const l=h=>{h===!1?a(lr(4,{from:n,to:t})):h instanceof Error?a(h):sC(h)?a(lr(2,{from:t,to:h})):(s&&r.enterCallbacks[o]===s&&typeof h=="function"&&s.push(h),i())},c=e.call(r&&r.instances[o],t,n,l);let f=Promise.resolve(c);e.length<3&&(f=f.then(l)),f.catch(h=>a(h))})}function Qs(e,t,n,r){const o=[];for(const s of e)for(const i in s.components){let a=s.components[i];if(!(t!=="beforeRouteEnter"&&!s.instances[i]))if(kC(a)){const c=(a.__vccOpts||a)[t];c&&o.push(fn(c,n,r,s,i))}else{let l=a();o.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${s.path}"`));const f=z1(c)?c.default:c;s.components[i]=f;const m=(f.__vccOpts||f)[t];return m&&fn(m,n,r,s,i)()}))}}return o}function kC(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Wc(e){const t=De(Ps),n=De(Ia),r=J(()=>t.resolve(ot(e.to))),o=J(()=>{const{matched:l}=r.value,{length:c}=l,f=l[c-1],h=n.matched;if(!f||!h.length)return-1;const m=h.findIndex(ar.bind(null,f));if(m>-1)return m;const b=jc(l[c-2]);return c>1&&jc(f)===b&&h[h.length-1].path!==b?h.findIndex(ar.bind(null,l[c-2])):m}),s=J(()=>o.value>-1&&HC(n.params,r.value.params)),i=J(()=>o.value>-1&&o.value===n.matched.length-1&&Wd(n.params,r.value.params));function a(l={}){return DC(l)?t[ot(e.replace)?"replace":"push"](ot(e.to)).catch(jr):Promise.resolve()}return{route:r,href:J(()=>r.value.href),isActive:s,isExactActive:i,navigate:a}}const MC=He({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Wc,setup(e,{slots:t}){const n=lo(Wc(e)),{options:r}=De(Ps),o=J(()=>({[Uc(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Uc(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:D("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},s)}}}),FC=MC;function DC(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function HC(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!Ot(o)||o.length!==r.length||r.some((s,i)=>s!==o[i]))return!1}return!0}function jc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Uc=(e,t,n)=>e??t??n,BC=He({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=De(Ai),o=J(()=>e.route||r.value),s=De(zc,0),i=J(()=>{let c=ot(s);const{matched:f}=o.value;let h;for(;(h=f[c])&&!h.components;)c++;return c}),a=J(()=>o.value.matched[i.value]);Dt(zc,J(()=>i.value+1)),Dt(NC,a),Dt(Ai,o);const l=ce();return vt(()=>[l.value,a.value,e.name],([c,f,h],[m,b,g])=>{f&&(f.instances[h]=c,b&&b!==f&&c&&c===m&&(f.leaveGuards.size||(f.leaveGuards=b.leaveGuards),f.updateGuards.size||(f.updateGuards=b.updateGuards))),c&&f&&(!b||!ar(f,b)||!m)&&(f.enterCallbacks[h]||[]).forEach(w=>w(c))},{flush:"post"}),()=>{const c=o.value,f=e.name,h=a.value,m=h&&h.components[f];if(!m)return Vc(n.default,{Component:m,route:c});const b=h.props[f],g=b?b===!0?c.params:typeof b=="function"?b(c):b:null,C=D(m,Oe({},g,t,{onVnodeUnmounted:p=>{p.component.isUnmounted&&(h.instances[f]=null)},ref:l}));return Vc(n.default,{Component:C,route:c})||C}}});function Vc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Jd=BC;function zC(e){const t=pC(e.routes,e),n=e.parseQuery||AC,r=e.stringifyQuery||Bc,o=e.history,s=Lr(),i=Lr(),a=Lr(),l=co(nn);let c=nn;qn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Zs.bind(null,A=>""+A),h=Zs.bind(null,IC),m=Zs.bind(null,os);function b(A,U){let F,Y;return Ud(A)?(F=t.getRecordMatcher(A),Y=U):Y=A,t.addRoute(Y,F)}function g(A){const U=t.getRecordMatcher(A);U&&t.removeRoute(U)}function w(){return t.getRoutes().map(A=>A.record)}function C(A){return!!t.getRecordMatcher(A)}function p(A,U){if(U=Oe({},U||l.value),typeof A=="string"){const u=Js(n,A,U.path),v=t.resolve({path:u.path},U),P=o.createHref(u.fullPath);return Oe(u,v,{params:m(v.params),hash:os(u.hash),redirectedFrom:void 0,href:P})}let F;if("path"in A)F=Oe({},A,{path:Js(n,A.path,U.path).path});else{const u=Oe({},A.params);for(const v in u)u[v]==null&&delete u[v];F=Oe({},A,{params:h(u)}),U.params=h(U.params)}const Y=t.resolve(F,U),me=A.hash||"";Y.params=f(m(Y.params));const _e=U1(r,Oe({},A,{hash:RC(me),path:Y.path})),d=o.createHref(_e);return Oe({fullPath:_e,hash:me,query:r===Bc?$C(A.query):A.query||{}},Y,{redirectedFrom:void 0,href:d})}function _(A){return typeof A=="string"?Js(n,A,l.value.path):Oe({},A)}function R(A,U){if(c!==A)return lr(8,{from:U,to:A})}function E(A){return y(A)}function S(A){return E(Oe(_(A),{replace:!0}))}function T(A){const U=A.matched[A.matched.length-1];if(U&&U.redirect){const{redirect:F}=U;let Y=typeof F=="function"?F(A):F;return typeof Y=="string"&&(Y=Y.includes("?")||Y.includes("#")?Y=_(Y):{path:Y},Y.params={}),Oe({query:A.query,hash:A.hash,params:"path"in Y?{}:A.params},Y)}}function y(A,U){const F=c=p(A),Y=l.value,me=A.state,_e=A.force,d=A.replace===!0,u=T(F);if(u)return y(Oe(_(u),{state:typeof u=="object"?Oe({},me,u.state):me,force:_e,replace:d}),U||F);const v=F;v.redirectedFrom=U;let P;return!_e&&V1(r,Y,F)&&(P=lr(16,{to:v,from:Y}),we(Y,Y,!0,!1)),(P?Promise.resolve(P):W(v,Y)).catch(L=>Wt(L)?Wt(L,2)?L:ve(L):re(L,v,Y)).then(L=>{if(L){if(Wt(L,2))return y(Oe({replace:d},_(L.to),{state:typeof L.to=="object"?Oe({},me,L.to.state):me,force:_e}),U||v)}else L=M(v,Y,!0,d,me);return G(v,Y,L),L})}function x(A,U){const F=R(A,U);return F?Promise.reject(F):Promise.resolve()}function k(A){const U=Be.values().next().value;return U&&typeof U.runWithContext=="function"?U.runWithContext(A):A()}function W(A,U){let F;const[Y,me,_e]=WC(A,U);F=Qs(Y.reverse(),"beforeRouteLeave",A,U);for(const u of Y)u.leaveGuards.forEach(v=>{F.push(fn(v,A,U))});const d=x.bind(null,A,U);return F.push(d),de(F).then(()=>{F=[];for(const u of s.list())F.push(fn(u,A,U));return F.push(d),de(F)}).then(()=>{F=Qs(me,"beforeRouteUpdate",A,U);for(const u of me)u.updateGuards.forEach(v=>{F.push(fn(v,A,U))});return F.push(d),de(F)}).then(()=>{F=[];for(const u of _e)if(u.beforeEnter)if(Ot(u.beforeEnter))for(const v of u.beforeEnter)F.push(fn(v,A,U));else F.push(fn(u.beforeEnter,A,U));return F.push(d),de(F)}).then(()=>(A.matched.forEach(u=>u.enterCallbacks={}),F=Qs(_e,"beforeRouteEnter",A,U),F.push(d),de(F))).then(()=>{F=[];for(const u of i.list())F.push(fn(u,A,U));return F.push(d),de(F)}).catch(u=>Wt(u,8)?u:Promise.reject(u))}function G(A,U,F){a.list().forEach(Y=>k(()=>Y(A,U,F)))}function M(A,U,F,Y,me){const _e=R(A,U);if(_e)return _e;const d=U===nn,u=qn?history.state:{};F&&(Y||d?o.replace(A.fullPath,Oe({scroll:d&&u&&u.scroll},me)):o.push(A.fullPath,me)),l.value=A,we(A,U,F,d),ve()}let Q;function ae(){Q||(Q=o.listen((A,U,F)=>{if(!Ve.listening)return;const Y=p(A),me=T(Y);if(me){y(Oe(me,{replace:!0}),Y).catch(jr);return}c=Y;const _e=l.value;qn&&Q1(Ac(_e.fullPath,F.delta),Ss()),W(Y,_e).catch(d=>Wt(d,12)?d:Wt(d,2)?(y(d.to,Y).then(u=>{Wt(u,20)&&!F.delta&&F.type===so.pop&&o.go(-1,!1)}).catch(jr),Promise.reject()):(F.delta&&o.go(-F.delta,!1),re(d,Y,_e))).then(d=>{d=d||M(Y,_e,!1),d&&(F.delta&&!Wt(d,8)?o.go(-F.delta,!1):F.type===so.pop&&Wt(d,20)&&o.go(-1,!1)),G(Y,_e,d)}).catch(jr)}))}let pe=Lr(),ne=Lr(),K;function re(A,U,F){ve(A);const Y=ne.list();return Y.length?Y.forEach(me=>me(A,U,F)):console.error(A),Promise.reject(A)}function xe(){return K&&l.value!==nn?Promise.resolve():new Promise((A,U)=>{pe.add([A,U])})}function ve(A){return K||(K=!A,ae(),pe.list().forEach(([U,F])=>A?F(A):U()),pe.reset()),A}function we(A,U,F,Y){const{scrollBehavior:me}=e;if(!qn||!me)return Promise.resolve();const _e=!F&&eC(Ac(A.fullPath,0))||(Y||!F)&&history.state&&history.state.scroll||null;return Kr().then(()=>me(A,U,_e)).then(d=>d&&J1(d)).catch(d=>re(d,A,U))}const Pe=A=>o.go(A);let Ue;const Be=new Set,Ve={currentRoute:l,listening:!0,addRoute:b,removeRoute:g,hasRoute:C,getRoutes:w,resolve:p,options:e,push:E,replace:S,go:Pe,back:()=>Pe(-1),forward:()=>Pe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ne.add,isReady:xe,install(A){const U=this;A.component("RouterLink",FC),A.component("RouterView",Jd),A.config.globalProperties.$router=U,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(l)}),qn&&!Ue&&l.value===nn&&(Ue=!0,E(o.location).catch(me=>{}));const F={};for(const me in nn)Object.defineProperty(F,me,{get:()=>l.value[me],enumerable:!0});A.provide(Ps,U),A.provide(Ia,Gu(F)),A.provide(Ai,l);const Y=A.unmount;Be.add(A),A.unmount=function(){Be.delete(A),Be.size<1&&(c=nn,Q&&Q(),Q=null,l.value=nn,Ue=!1,K=!1),Y()}}};function de(A){return A.reduce((U,F)=>U.then(()=>k(F)),Promise.resolve())}return Ve}function WC(e,t){const n=[],r=[],o=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;iar(c,a))?r.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(c=>ar(c,l))||o.push(l))}return[n,r,o]}function ww(){return De(Ps)}function Tw(){return De(Ia)}const Fo=lo({networkErrorDlgVisible:!1,githubErrorDlgVisible:!1}),jC=bt("div",null,"生成分享链接需要以下条件",-1),UC=bt("div",null,[Xt(" 在当前浏览器登录 "),bt("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer"}," github.com ")],-1),VC=bt("div",null,"访问其它域名资源需要以下条件",-1),GC=bt("div",null,[Xt(" 1. 安装脚本管理器, 如 "),bt("a",{href:"https://violentmonkey.github.io/",target:"_blank",rel:"noopener noreferrer"}," Violentmonkey ")],-1),KC=bt("div",null,[Xt(" 2. 安装油猴脚本 "),bt("a",{href:"https://github.com/gkd-kit/network-extension",target:"_blank",rel:"noopener noreferrer"}," network-extension ")],-1),YC=bt("div",null,"3. 在当前网站启用上述油猴脚本的API注入功能",-1),XC=bt("div",null,[Xt(" 4. 如果是分享链接则需要在当前浏览器登录 "),bt("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer"}," github.com ")],-1),qC=He({__name:"App",setup(e){return(t,n)=>(da(),ha(ot(T1),{locale:ot(G_),"date-locale":ot(Dy),abstract:""},{default:Bo(()=>[Ze(ot(Oc),{show:ot(Fo).githubErrorDlgVisible,"onUpdate:show":n[0]||(n[0]=r=>ot(Fo).githubErrorDlgVisible=r),preset:"dialog",title:"生成分享链接失败"},{default:Bo(()=>[jC,UC]),_:1},8,["show"]),Ze(ot(Oc),{show:ot(Fo).networkErrorDlgVisible,"onUpdate:show":n[1]||(n[1]=r=>ot(Fo).networkErrorDlgVisible=r),preset:"dialog",title:"访问其它域名资源失败"},{default:Bo(()=>[VC,GC,KC,YC,XC]),_:1},8,["show"]),Ze(ot(Jd))]),_:1},8,["locale","date-locale"]))}}),ZC="modulepreload",JC=function(e,t){return e[0]==="."?new URL(e,t).href:e},Gc={},Ir=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");o=Promise.all(n.map(i=>{if(i=JC(i,r),i in Gc)return;Gc[i]=!0;const a=i.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!r)for(let h=s.length-1;h>=0;h--){const m=s[h];if(m.href===i&&(!a||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":ZC,a||(f.as="script",f.crossOrigin=""),f.href=i,document.head.appendChild(f),a)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})}))}return o.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},QC=(e,t)=>{try{return new URL(e,t)}catch{}},eE=zC({history:oC("/"),routes:[{path:"/",component:()=>Ir(()=>import("./HomePage-91EmzLXR.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)},{path:"/snapshot/:snapshotId",name:"snapshot",component:()=>Ir(()=>import("./SnapshotPage-owac59Kk.js"),__vite__mapDeps([7,1,2,3,4,8]),import.meta.url)},{path:"/import",name:"import",component:()=>Ir(()=>import("./ImportPage-Fae4iEVk.js"),__vite__mapDeps([9,2,5,4]),import.meta.url)},{path:"/import/:github_zip_asset_id",redirect(e){var r;const t=(r=String(e.params.github_zip_asset_id).match(/^\d+/))==null?void 0:r[0];return t?{name:"import",query:{url:`https://github.com/gkd-kit/inspect/files/${t}/file.zip`}}:{path:"/404"}}},{path:"/device",name:"device",component:()=>Ir(()=>import("./DevicePage-FYbQq6N3.js"),__vite__mapDeps([10,2,8,6,3]),import.meta.url),beforeEnter(e,t,n){const r=QC(String(e.query.url));if(r){localStorage.setItem("device_link",r.origin);const o={...e.query};return delete o.url,n({...e,query:o})}n()}},{path:"/404",component:()=>Ir(()=>import("./_404Page-v_OEFicH.js"),__vite__mapDeps([]),import.meta.url)},{path:"/:pathMatch(.*)*",redirect:"/404"}]});/*! * shared v9.9.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. @@ -469,13 +469,13 @@ ${t} * vue-i18n v9.9.0 * (c) 2024 kazuya kawaguchi * Released under the MIT License. - */const wx="9.9.0";function Tx(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Vt().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Vt().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Vt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vt().__INTLIFY_PROD_DEVTOOLS__=!1)}const gh=sx.__EXTEND_POINT__,on=Aa(gh);on(),on(),on(),on(),on(),on(),on(),on();const vh=Pt.__EXTEND_POINT__,ht=Aa(vh),Je={UNEXPECTED_RETURN_TYPE:vh,INVALID_ARGUMENT:ht(),MUST_BE_CALL_SETUP_TOP:ht(),NOT_INSTALLED:ht(),NOT_AVAILABLE_IN_LEGACY_MODE:ht(),REQUIRED_VALUE:ht(),INVALID_VALUE:ht(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ht(),NOT_INSTALLED_WITH_PROVIDE:ht(),UNEXPECTED_ERROR:ht(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ht(),BRIDGE_SUPPORT_VUE_2_ONLY:ht(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ht(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ht(),__EXTEND_POINT__:ht()};function Qe(e,...t){return Cr(e,null,void 0)}const Di=Cn("__translateVNode"),Hi=Cn("__datetimeParts"),Bi=Cn("__numberParts"),bh=Cn("__setPluralRules"),_h=Cn("__injectWithOption"),zi=Cn("__dispose");function ao(e){if(!Re(e))return e;for(const t in e)if(is(e,t))if(!t.includes("."))Re(e[t])&&ao(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,s=!1;for(let i=0;i{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(i[l]=i[l]||{},Uo(c,i[l])):Uo(c,i)}else X(a)&&Uo(JSON.parse(a),i)}),o==null&&s)for(const a in i)is(i,a)&&ao(i[a]);return i}function yh(e){return e.type}function Ch(e,t,n){let r=Re(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Ls(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(Re(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(Re(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function pu(e){return Ze(uo,null,e,0)}const gu="__INTLIFY_META__",vu=()=>[],Sx=()=>!1;let bu=0;function _u(e){return(t,n,r,o)=>e(n,r,qt()||void 0,o)}const Px=()=>{const e=qt();let t=null;return e&&(t=yh(e)[gu])?{[gu]:t}:null};function Ma(e={},t){const{__root:n,__injectWithOption:r}=e,o=n===void 0,s=e.flatJson,i=ss?ce:co;let a=ye(e.inheritLocale)?e.inheritLocale:!0;const l=i(n&&a?n.locale.value:X(e.locale)?e.locale:ur),c=i(n&&a?n.fallbackLocale.value:X(e.fallbackLocale)||Fe(e.fallbackLocale)||he(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),f=i(Ls(l.value,e)),h=i(he(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),m=i(he(e.numberFormats)?e.numberFormats:{[l.value]:{}});let b=n?n.missingWarn:ye(e.missingWarn)||bn(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:ye(e.fallbackWarn)||bn(e.fallbackWarn)?e.fallbackWarn:!0,w=n?n.fallbackRoot:ye(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,p=Ie(e.missing)?e.missing:null,_=Ie(e.missing)?_u(e.missing):null,R=Ie(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const T=n?n.modifiers:he(e.modifiers)?e.modifiers:{};let y=e.pluralRules||n&&n.pluralRules,x;x=(()=>{o&&iu(null);const O={version:wx,locale:l.value,fallbackLocale:c.value,messages:f.value,modifiers:T,pluralRules:y,missing:_===null?void 0:_,missingWarn:b,fallbackWarn:g,fallbackFormat:C,unresolving:!0,postTranslation:R===null?void 0:R,warnHtmlMessage:E,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};O.datetimeFormats=h.value,O.numberFormats=m.value,O.__datetimeFormatters=he(x)?x.__datetimeFormatters:void 0,O.__numberFormatters=he(x)?x.__numberFormatters:void 0;const I=gx(O);return o&&iu(I),I})(),Ar(x,l.value,c.value);function W(){return[l.value,c.value,f.value,h.value,m.value]}const G=J({get:()=>l.value,set:O=>{l.value=O,x.locale=l.value}}),M=J({get:()=>c.value,set:O=>{c.value=O,x.fallbackLocale=c.value,Ar(x,l.value,O)}}),Q=J(()=>f.value),ae=J(()=>h.value),pe=J(()=>m.value);function ne(){return Ie(R)?R:null}function K(O){R=O,x.postTranslation=O}function re(){return p}function xe(O){O!==null&&(_=_u(O)),p=O,x.missing=_}const ve=(O,I,te,oe,Ce,Le)=>{W();let ze;try{__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=n?px():void 0),ze=O(x)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=void 0)}if(te!=="translate exists"&&Xe(ze)&&ze===Os||te==="translate exists"&&!ze){const[It,Vn]=I();return n&&w?oe(n):Ce(It)}else{if(Le(ze))return ze;throw Qe(Je.UNEXPECTED_RETURN_TYPE)}};function we(...O){return ve(I=>Reflect.apply(uu,null,[I,...O]),()=>ki(...O),"translate",I=>Reflect.apply(I.t,I,[...O]),I=>I,I=>X(I))}function Pe(...O){const[I,te,oe]=O;if(oe&&!Re(oe))throw Qe(Je.INVALID_ARGUMENT);return we(I,te,tt({resolvedMessage:!0},oe||{}))}function Ue(...O){return ve(I=>Reflect.apply(fu,null,[I,...O]),()=>Mi(...O),"datetime format",I=>Reflect.apply(I.d,I,[...O]),()=>ru,I=>X(I))}function Be(...O){return ve(I=>Reflect.apply(hu,null,[I,...O]),()=>Fi(...O),"number format",I=>Reflect.apply(I.n,I,[...O]),()=>ru,I=>X(I))}function Ve(O){return O.map(I=>X(I)||Xe(I)||ye(I)?pu(String(I)):I)}const A={normalize:Ve,interpolate:O=>O,type:"vnode"};function U(...O){return ve(I=>{let te;const oe=I;try{oe.processor=A,te=Reflect.apply(uu,null,[oe,...O])}finally{oe.processor=null}return te},()=>ki(...O),"translate",I=>I[Di](...O),I=>[pu(I)],I=>Fe(I))}function F(...O){return ve(I=>Reflect.apply(hu,null,[I,...O]),()=>Fi(...O),"number format",I=>I[Bi](...O),vu,I=>X(I)||Fe(I))}function Y(...O){return ve(I=>Reflect.apply(fu,null,[I,...O]),()=>Mi(...O),"datetime format",I=>I[Hi](...O),vu,I=>X(I)||Fe(I))}function me(O){y=O,x.pluralRules=y}function _e(O,I){return ve(()=>{if(!O)return!1;const te=X(I)?I:l.value,oe=v(te),Ce=x.messageResolver(oe,O);return fr(Ce)||Ct(Ce)||X(Ce)},()=>[O],"translate exists",te=>Reflect.apply(te.te,te,[O,I]),Sx,te=>ye(te))}function d(O){let I=null;const te=oh(x,c.value,l.value);for(let oe=0;oe{a&&(l.value=O,x.locale=O,Ar(x,l.value,c.value))}),vt(n.fallbackLocale,O=>{a&&(c.value=O,x.fallbackLocale=O,Ar(x,l.value,c.value))}));const V={id:bu,locale:G,fallbackLocale:M,get inheritLocale(){return a},set inheritLocale(O){a=O,O&&n&&(l.value=n.locale.value,c.value=n.fallbackLocale.value,Ar(x,l.value,c.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Q,get modifiers(){return T},get pluralRules(){return y||{}},get isGlobal(){return o},get missingWarn(){return b},set missingWarn(O){b=O,x.missingWarn=b},get fallbackWarn(){return g},set fallbackWarn(O){g=O,x.fallbackWarn=g},get fallbackRoot(){return w},set fallbackRoot(O){w=O},get fallbackFormat(){return C},set fallbackFormat(O){C=O,x.fallbackFormat=C},get warnHtmlMessage(){return E},set warnHtmlMessage(O){E=O,x.warnHtmlMessage=O},get escapeParameter(){return S},set escapeParameter(O){S=O,x.escapeParameter=O},t:we,getLocaleMessage:v,setLocaleMessage:P,mergeLocaleMessage:L,getPostTranslationHandler:ne,setPostTranslationHandler:K,getMissingHandler:re,setMissingHandler:xe,[bh]:me};return V.datetimeFormats=ae,V.numberFormats=pe,V.rt=Pe,V.te=_e,V.tm=u,V.d=Ue,V.n=Be,V.getDateTimeFormat=$,V.setDateTimeFormat=j,V.mergeDateTimeFormat=N,V.getNumberFormat=z,V.setNumberFormat=H,V.mergeNumberFormat=q,V[_h]=r,V[Di]=U,V[Hi]=Y,V[Bi]=F,V}function Rx(e){const t=X(e.locale)?e.locale:ur,n=X(e.fallbackLocale)||Fe(e.fallbackLocale)||he(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Ie(e.missing)?e.missing:void 0,o=ye(e.silentTranslationWarn)||bn(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=ye(e.silentFallbackWarn)||bn(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=ye(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=he(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,f=Ie(e.postTranslation)?e.postTranslation:void 0,h=X(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,m=!!e.escapeParameterHtml,b=ye(e.sync)?e.sync:!0;let g=e.messages;if(he(e.sharedMessages)){const S=e.sharedMessages;g=Object.keys(S).reduce((y,x)=>{const k=y[x]||(y[x]={});return tt(k,S[x]),y},g||{})}const{__i18n:w,__root:C,__injectWithOption:p}=e,_=e.datetimeFormats,R=e.numberFormats,E=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:E,datetimeFormats:_,numberFormats:R,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:f,warnHtmlMessage:h,escapeParameter:m,messageResolver:e.messageResolver,inheritLocale:b,__i18n:w,__root:C,__injectWithOption:p}}function Wi(e={},t){{const n=Ma(Rx(e)),{__extender:r}=e,o={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return ye(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=ye(s)?!s:s},get silentFallbackWarn(){return ye(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=ye(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[i,a,l]=s,c={};let f=null,h=null;if(!X(i))throw Qe(Je.INVALID_ARGUMENT);const m=i;return X(a)?c.locale=a:Fe(a)?f=a:he(a)&&(h=a),Fe(l)?f=l:he(l)&&(h=l),Reflect.apply(n.t,n,[m,f||h||{},c])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[i,a,l]=s,c={plural:1};let f=null,h=null;if(!X(i))throw Qe(Je.INVALID_ARGUMENT);const m=i;return X(a)?c.locale=a:Xe(a)?c.plural=a:Fe(a)?f=a:he(a)&&(h=a),X(l)?c.locale=l:Fe(l)?f=l:he(l)&&(h=l),Reflect.apply(n.t,n,[m,f||h||{},c])},te(s,i){return n.te(s,i)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,i){n.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){n.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,i){n.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){n.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,i){n.setNumberFormat(s,i)},mergeNumberFormat(s,i){n.mergeNumberFormat(s,i)},getChoiceIndex(s,i){return-1}};return o.__extender=r,o}}const Fa={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ox({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===Ge?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function Eh(e){return Ge}const Lx=He({name:"i18n-t",props:tt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Xe(e)||!isNaN(e)}},Fa),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||Da({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(h=>h!=="_"),i={};e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=X(e.plural)?+e.plural:e.plural);const a=Ox(t,s),l=o[Di](e.keypath,a,i),c=tt({},r),f=X(e.tag)||Re(e.tag)?e.tag:Eh();return D(f,c,l)}}}),yu=Lx;function Ix(e){return Fe(e)&&!X(e[0])}function xh(e,t,n,r){const{slots:o,attrs:s}=t;return()=>{const i={part:!0};let a={};e.locale&&(i.locale=e.locale),X(e.format)?i.key=e.format:Re(e.format)&&(X(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((m,b)=>n.includes(b)?tt({},m,{[b]:e.format[b]}):m,{}));const l=r(e.value,i,a);let c=[i.key];Fe(l)?c=l.map((m,b)=>{const g=o[m.type],w=g?g({[m.type]:m.value,index:b,parts:l}):[m.value];return Ix(w)&&(w[0].key=`${m.type}-${b}`),w}):X(l)&&(c=[l]);const f=tt({},s),h=X(e.tag)||Re(e.tag)?e.tag:Eh();return D(h,f,c)}}const Ax=He({name:"i18n-n",props:tt({value:{type:Number,required:!0},format:{type:[String,Object]}},Fa),setup(e,t){const n=e.i18n||Da({useScope:"parent",__useComponent:!0});return xh(e,t,ph,(...r)=>n[Bi](...r))}}),Cu=Ax,$x=He({name:"i18n-d",props:tt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Fa),setup(e,t){const n=e.i18n||Da({useScope:"parent",__useComponent:!0});return xh(e,t,mh,(...r)=>n[Hi](...r))}}),Eu=$x;function Nx(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function kx(e){const t=i=>{const{instance:a,modifiers:l,value:c}=i;if(!a||!a.$)throw Qe(Je.UNEXPECTED_ERROR);const f=Nx(e,a.$),h=xu(c);return[Reflect.apply(f.t,f,[...wu(h)]),f]};return{created:(i,a)=>{const[l,c]=t(a);ss&&e.global===c&&(i.__i18nWatcher=vt(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=c,i.textContent=l},unmounted:i=>{ss&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,c=xu(a);i.textContent=Reflect.apply(l.t,l,[...wu(c)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function xu(e){if(X(e))return{path:e};if(he(e)){if(!("path"in e))throw Qe(Je.REQUIRED_VALUE,"path");return e}else throw Qe(Je.INVALID_VALUE)}function wu(e){const{path:t,locale:n,args:r,choice:o,plural:s}=e,i={},a=r||{};return X(n)&&(i.locale=n),Xe(o)&&(i.plural=o),Xe(s)&&(i.plural=s),[t,a,i]}function Mx(e,t,...n){const r=he(n[0])?n[0]:{},o=!!r.useI18nComponentName;(ye(r.globalInstall)?r.globalInstall:!0)&&([o?"i18n":yu.name,"I18nT"].forEach(i=>e.component(i,yu)),[Cu.name,"I18nN"].forEach(i=>e.component(i,Cu)),[Eu.name,"I18nD"].forEach(i=>e.component(i,Eu))),e.directive("t",kx(t))}function Fx(e,t,n){return{beforeCreate(){const r=qt();if(!r)throw Qe(Je.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=t,this===this.$root)this.$i18n=Tu(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Wi(s);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=Tu(e,o);else{this.$i18n=Wi({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&Ch(t,o,o),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,i)=>this.$i18n.te(s,i),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=qt();if(!r)throw Qe(Je.UNEXPECTED_ERROR);const o=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function Tu(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[bh](t.pluralizationRules||e.pluralizationRules);const n=Ls(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Dx=Cn("global-vue-i18n");function Hx(e={},t){const n=__VUE_I18N_LEGACY_API__&&ye(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=ye(e.globalInjection)?e.globalInjection:!0,o=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,s=new Map,[i,a]=Bx(e,n),l=Cn("");function c(m){return s.get(m)||null}function f(m,b){s.set(m,b)}function h(m){s.delete(m)}{const m={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return o},async install(b,...g){if(b.__VUE_I18N_SYMBOL__=l,b.provide(b.__VUE_I18N_SYMBOL__,m),he(g[0])){const p=g[0];m.__composerExtend=p.__composerExtend,m.__vueI18nExtend=p.__vueI18nExtend}let w=null;!n&&r&&(w=Xx(b,m.global)),__VUE_I18N_FULL_INSTALL__&&Mx(b,m,...g),__VUE_I18N_LEGACY_API__&&n&&b.mixin(Fx(a,a.__composer,m));const C=b.unmount;b.unmount=()=>{w&&w(),m.dispose(),C()}},get global(){return a},dispose(){i.stop()},__instances:s,__getInstance:c,__setInstance:f,__deleteInstance:h};return m}}function Da(e={}){const t=qt();if(t==null)throw Qe(Je.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Qe(Je.NOT_INSTALLED);const n=zx(t),r=jx(n),o=yh(t),s=Wx(e,o);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Qe(Je.NOT_AVAILABLE_IN_LEGACY_MODE);return Kx(t,s,r,e)}if(s==="global")return Ch(r,e,o),r;if(s==="parent"){let l=Ux(n,t,e.__useComponent);return l==null&&(l=r),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=tt({},e);"__i18n"in o&&(l.__i18n=o.__i18n),r&&(l.__root=r),a=Ma(l),i.__composerExtend&&(a[zi]=i.__composerExtend(a)),Gx(i,t,a),i.__setInstance(t,a)}return a}function Bx(e,t,n){const r=Fh();{const o=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Wi(e)):r.run(()=>Ma(e));if(o==null)throw Qe(Je.UNEXPECTED_ERROR);return[r,o]}}function zx(e){{const t=De(e.isCE?Dx:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Qe(e.isCE?Je.NOT_INSTALLED_WITH_PROVIDE:Je.UNEXPECTED_ERROR);return t}}function Wx(e,t){return Rs(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function jx(e){return e.mode==="composition"?e.global:e.global.__composer}function Ux(e,t,n=!1){let r=null;const o=t.root;let s=Vx(t,n);for(;s!=null;){const i=e;if(e.mode==="composition")r=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(s);a!=null&&(r=a.__composer,n&&r&&!r[_h]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function Vx(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Gx(e,t,n){yn(()=>{},t),la(()=>{const r=n;e.__deleteInstance(t);const o=r[zi];o&&(o(),delete r[zi])},t)}function Kx(e,t,n,r={}){const o=t==="local",s=co(null);if(o&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Qe(Je.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=ye(r.inheritLocale)?r.inheritLocale:!X(r.locale),a=ce(!o||i?n.locale.value:X(r.locale)?r.locale:ur),l=ce(!o||i?n.fallbackLocale.value:X(r.fallbackLocale)||Fe(r.fallbackLocale)||he(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:a.value),c=ce(Ls(a.value,r)),f=ce(he(r.datetimeFormats)?r.datetimeFormats:{[a.value]:{}}),h=ce(he(r.numberFormats)?r.numberFormats:{[a.value]:{}}),m=o?n.missingWarn:ye(r.missingWarn)||bn(r.missingWarn)?r.missingWarn:!0,b=o?n.fallbackWarn:ye(r.fallbackWarn)||bn(r.fallbackWarn)?r.fallbackWarn:!0,g=o?n.fallbackRoot:ye(r.fallbackRoot)?r.fallbackRoot:!0,w=!!r.fallbackFormat,C=Ie(r.missing)?r.missing:null,p=Ie(r.postTranslation)?r.postTranslation:null,_=o?n.warnHtmlMessage:ye(r.warnHtmlMessage)?r.warnHtmlMessage:!0,R=!!r.escapeParameter,E=o?n.modifiers:he(r.modifiers)?r.modifiers:{},S=r.pluralRules||o&&n.pluralRules;function T(){return[a.value,l.value,c.value,f.value,h.value]}const y=J({get:()=>s.value?s.value.locale.value:a.value,set:u=>{s.value&&(s.value.locale.value=u),a.value=u}}),x=J({get:()=>s.value?s.value.fallbackLocale.value:l.value,set:u=>{s.value&&(s.value.fallbackLocale.value=u),l.value=u}}),k=J(()=>s.value?s.value.messages.value:c.value),W=J(()=>f.value),G=J(()=>h.value);function M(){return s.value?s.value.getPostTranslationHandler():p}function Q(u){s.value&&s.value.setPostTranslationHandler(u)}function ae(){return s.value?s.value.getMissingHandler():C}function pe(u){s.value&&s.value.setMissingHandler(u)}function ne(u){return T(),u()}function K(...u){return s.value?ne(()=>Reflect.apply(s.value.t,null,[...u])):ne(()=>"")}function re(...u){return s.value?Reflect.apply(s.value.rt,null,[...u]):""}function xe(...u){return s.value?ne(()=>Reflect.apply(s.value.d,null,[...u])):ne(()=>"")}function ve(...u){return s.value?ne(()=>Reflect.apply(s.value.n,null,[...u])):ne(()=>"")}function we(u){return s.value?s.value.tm(u):{}}function Pe(u,v){return s.value?s.value.te(u,v):!1}function Ue(u){return s.value?s.value.getLocaleMessage(u):{}}function Be(u,v){s.value&&(s.value.setLocaleMessage(u,v),c.value[u]=v)}function Ve(u,v){s.value&&s.value.mergeLocaleMessage(u,v)}function de(u){return s.value?s.value.getDateTimeFormat(u):{}}function A(u,v){s.value&&(s.value.setDateTimeFormat(u,v),f.value[u]=v)}function U(u,v){s.value&&s.value.mergeDateTimeFormat(u,v)}function F(u){return s.value?s.value.getNumberFormat(u):{}}function Y(u,v){s.value&&(s.value.setNumberFormat(u,v),h.value[u]=v)}function me(u,v){s.value&&s.value.mergeNumberFormat(u,v)}const _e={get id(){return s.value?s.value.id:-1},locale:y,fallbackLocale:x,messages:k,datetimeFormats:W,numberFormats:G,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(u){s.value&&(s.value.inheritLocale=u)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(c.value)},get modifiers(){return s.value?s.value.modifiers:E},get pluralRules(){return s.value?s.value.pluralRules:S},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:m},set missingWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackWarn(){return s.value?s.value.fallbackWarn:b},set fallbackWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackRoot(){return s.value?s.value.fallbackRoot:g},set fallbackRoot(u){s.value&&(s.value.fallbackRoot=u)},get fallbackFormat(){return s.value?s.value.fallbackFormat:w},set fallbackFormat(u){s.value&&(s.value.fallbackFormat=u)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:_},set warnHtmlMessage(u){s.value&&(s.value.warnHtmlMessage=u)},get escapeParameter(){return s.value?s.value.escapeParameter:R},set escapeParameter(u){s.value&&(s.value.escapeParameter=u)},t:K,getPostTranslationHandler:M,setPostTranslationHandler:Q,getMissingHandler:ae,setMissingHandler:pe,rt:re,d:xe,n:ve,tm:we,te:Pe,getLocaleMessage:Ue,setLocaleMessage:Be,mergeLocaleMessage:Ve,getDateTimeFormat:de,setDateTimeFormat:A,mergeDateTimeFormat:U,getNumberFormat:F,setNumberFormat:Y,mergeNumberFormat:me};function d(u){u.locale.value=a.value,u.fallbackLocale.value=l.value,Object.keys(c.value).forEach(v=>{u.mergeLocaleMessage(v,c.value[v])}),Object.keys(f.value).forEach(v=>{u.mergeDateTimeFormat(v,f.value[v])}),Object.keys(h.value).forEach(v=>{u.mergeNumberFormat(v,h.value[v])}),u.escapeParameter=R,u.fallbackFormat=w,u.fallbackRoot=g,u.fallbackWarn=b,u.missingWarn=m,u.warnHtmlMessage=_}return _n(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Qe(Je.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=s.value=e.proxy.$i18n.__composer;t==="global"?(a.value=u.locale.value,l.value=u.fallbackLocale.value,c.value=u.messages.value,f.value=u.datetimeFormats.value,h.value=u.numberFormats.value):o&&d(u)}),_e}const Yx=["locale","fallbackLocale","availableLocales"],Su=["t","rt","d","n","tm","te"];function Xx(e,t){const n=Object.create(null);return Yx.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s)throw Qe(Je.UNEXPECTED_ERROR);const i=nt(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,i)}),e.config.globalProperties.$i18n=n,Su.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s||!s.value)throw Qe(Je.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,s)}),()=>{delete e.config.globalProperties.$i18n,Su.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}Tx();__INTLIFY_JIT_COMPILATION__?su(_x):su(bx);fx(GE);dx(oh);if(__INTLIFY_PROD_DEVTOOLS__){const e=Vt();e.__INTLIFY__=!0,tx(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qx=Hx({legacy:!1,locale:navigator.language,fallbackLocale:"en",messages:{en:{preview:"preview"},"zh-CN":{preview:"查看"}}}),Zx={hash:"3ae4c3ad8e51b0149a714f42c1f5ca5a52e85225",date:"2024-01-23T11:11:15+08:00",message:"feat: 按导入时间排序",refs:"grafted, HEAD -> main, origin/main",body:"",author_name:"lisonge",author_email:"i@songe.li"},Jx=`GIT commit + */const wx="9.9.0";function Tx(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Vt().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Vt().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Vt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vt().__INTLIFY_PROD_DEVTOOLS__=!1)}const gh=sx.__EXTEND_POINT__,on=Aa(gh);on(),on(),on(),on(),on(),on(),on(),on();const vh=Pt.__EXTEND_POINT__,ht=Aa(vh),Je={UNEXPECTED_RETURN_TYPE:vh,INVALID_ARGUMENT:ht(),MUST_BE_CALL_SETUP_TOP:ht(),NOT_INSTALLED:ht(),NOT_AVAILABLE_IN_LEGACY_MODE:ht(),REQUIRED_VALUE:ht(),INVALID_VALUE:ht(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ht(),NOT_INSTALLED_WITH_PROVIDE:ht(),UNEXPECTED_ERROR:ht(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ht(),BRIDGE_SUPPORT_VUE_2_ONLY:ht(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ht(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ht(),__EXTEND_POINT__:ht()};function Qe(e,...t){return Cr(e,null,void 0)}const Di=Cn("__translateVNode"),Hi=Cn("__datetimeParts"),Bi=Cn("__numberParts"),bh=Cn("__setPluralRules"),_h=Cn("__injectWithOption"),zi=Cn("__dispose");function ao(e){if(!Re(e))return e;for(const t in e)if(is(e,t))if(!t.includes("."))Re(e[t])&&ao(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,s=!1;for(let i=0;i{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(i[l]=i[l]||{},Uo(c,i[l])):Uo(c,i)}else X(a)&&Uo(JSON.parse(a),i)}),o==null&&s)for(const a in i)is(i,a)&&ao(i[a]);return i}function yh(e){return e.type}function Ch(e,t,n){let r=Re(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Ls(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(Re(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(Re(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function pu(e){return Ze(uo,null,e,0)}const gu="__INTLIFY_META__",vu=()=>[],Sx=()=>!1;let bu=0;function _u(e){return(t,n,r,o)=>e(n,r,qt()||void 0,o)}const Px=()=>{const e=qt();let t=null;return e&&(t=yh(e)[gu])?{[gu]:t}:null};function Ma(e={},t){const{__root:n,__injectWithOption:r}=e,o=n===void 0,s=e.flatJson,i=ss?ce:co;let a=ye(e.inheritLocale)?e.inheritLocale:!0;const l=i(n&&a?n.locale.value:X(e.locale)?e.locale:ur),c=i(n&&a?n.fallbackLocale.value:X(e.fallbackLocale)||Fe(e.fallbackLocale)||he(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),f=i(Ls(l.value,e)),h=i(he(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),m=i(he(e.numberFormats)?e.numberFormats:{[l.value]:{}});let b=n?n.missingWarn:ye(e.missingWarn)||bn(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:ye(e.fallbackWarn)||bn(e.fallbackWarn)?e.fallbackWarn:!0,w=n?n.fallbackRoot:ye(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,p=Ie(e.missing)?e.missing:null,_=Ie(e.missing)?_u(e.missing):null,R=Ie(e.postTranslation)?e.postTranslation:null,E=n?n.warnHtmlMessage:ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter;const T=n?n.modifiers:he(e.modifiers)?e.modifiers:{};let y=e.pluralRules||n&&n.pluralRules,x;x=(()=>{o&&iu(null);const O={version:wx,locale:l.value,fallbackLocale:c.value,messages:f.value,modifiers:T,pluralRules:y,missing:_===null?void 0:_,missingWarn:b,fallbackWarn:g,fallbackFormat:C,unresolving:!0,postTranslation:R===null?void 0:R,warnHtmlMessage:E,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};O.datetimeFormats=h.value,O.numberFormats=m.value,O.__datetimeFormatters=he(x)?x.__datetimeFormatters:void 0,O.__numberFormatters=he(x)?x.__numberFormatters:void 0;const I=gx(O);return o&&iu(I),I})(),Ar(x,l.value,c.value);function W(){return[l.value,c.value,f.value,h.value,m.value]}const G=J({get:()=>l.value,set:O=>{l.value=O,x.locale=l.value}}),M=J({get:()=>c.value,set:O=>{c.value=O,x.fallbackLocale=c.value,Ar(x,l.value,O)}}),Q=J(()=>f.value),ae=J(()=>h.value),pe=J(()=>m.value);function ne(){return Ie(R)?R:null}function K(O){R=O,x.postTranslation=O}function re(){return p}function xe(O){O!==null&&(_=_u(O)),p=O,x.missing=_}const ve=(O,I,te,oe,Ce,Le)=>{W();let ze;try{__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=n?px():void 0),ze=O(x)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(x.fallbackContext=void 0)}if(te!=="translate exists"&&Xe(ze)&&ze===Os||te==="translate exists"&&!ze){const[It,Vn]=I();return n&&w?oe(n):Ce(It)}else{if(Le(ze))return ze;throw Qe(Je.UNEXPECTED_RETURN_TYPE)}};function we(...O){return ve(I=>Reflect.apply(uu,null,[I,...O]),()=>ki(...O),"translate",I=>Reflect.apply(I.t,I,[...O]),I=>I,I=>X(I))}function Pe(...O){const[I,te,oe]=O;if(oe&&!Re(oe))throw Qe(Je.INVALID_ARGUMENT);return we(I,te,tt({resolvedMessage:!0},oe||{}))}function Ue(...O){return ve(I=>Reflect.apply(fu,null,[I,...O]),()=>Mi(...O),"datetime format",I=>Reflect.apply(I.d,I,[...O]),()=>ru,I=>X(I))}function Be(...O){return ve(I=>Reflect.apply(hu,null,[I,...O]),()=>Fi(...O),"number format",I=>Reflect.apply(I.n,I,[...O]),()=>ru,I=>X(I))}function Ve(O){return O.map(I=>X(I)||Xe(I)||ye(I)?pu(String(I)):I)}const A={normalize:Ve,interpolate:O=>O,type:"vnode"};function U(...O){return ve(I=>{let te;const oe=I;try{oe.processor=A,te=Reflect.apply(uu,null,[oe,...O])}finally{oe.processor=null}return te},()=>ki(...O),"translate",I=>I[Di](...O),I=>[pu(I)],I=>Fe(I))}function F(...O){return ve(I=>Reflect.apply(hu,null,[I,...O]),()=>Fi(...O),"number format",I=>I[Bi](...O),vu,I=>X(I)||Fe(I))}function Y(...O){return ve(I=>Reflect.apply(fu,null,[I,...O]),()=>Mi(...O),"datetime format",I=>I[Hi](...O),vu,I=>X(I)||Fe(I))}function me(O){y=O,x.pluralRules=y}function _e(O,I){return ve(()=>{if(!O)return!1;const te=X(I)?I:l.value,oe=v(te),Ce=x.messageResolver(oe,O);return fr(Ce)||Ct(Ce)||X(Ce)},()=>[O],"translate exists",te=>Reflect.apply(te.te,te,[O,I]),Sx,te=>ye(te))}function d(O){let I=null;const te=oh(x,c.value,l.value);for(let oe=0;oe{a&&(l.value=O,x.locale=O,Ar(x,l.value,c.value))}),vt(n.fallbackLocale,O=>{a&&(c.value=O,x.fallbackLocale=O,Ar(x,l.value,c.value))}));const V={id:bu,locale:G,fallbackLocale:M,get inheritLocale(){return a},set inheritLocale(O){a=O,O&&n&&(l.value=n.locale.value,c.value=n.fallbackLocale.value,Ar(x,l.value,c.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Q,get modifiers(){return T},get pluralRules(){return y||{}},get isGlobal(){return o},get missingWarn(){return b},set missingWarn(O){b=O,x.missingWarn=b},get fallbackWarn(){return g},set fallbackWarn(O){g=O,x.fallbackWarn=g},get fallbackRoot(){return w},set fallbackRoot(O){w=O},get fallbackFormat(){return C},set fallbackFormat(O){C=O,x.fallbackFormat=C},get warnHtmlMessage(){return E},set warnHtmlMessage(O){E=O,x.warnHtmlMessage=O},get escapeParameter(){return S},set escapeParameter(O){S=O,x.escapeParameter=O},t:we,getLocaleMessage:v,setLocaleMessage:P,mergeLocaleMessage:L,getPostTranslationHandler:ne,setPostTranslationHandler:K,getMissingHandler:re,setMissingHandler:xe,[bh]:me};return V.datetimeFormats=ae,V.numberFormats=pe,V.rt=Pe,V.te=_e,V.tm=u,V.d=Ue,V.n=Be,V.getDateTimeFormat=$,V.setDateTimeFormat=j,V.mergeDateTimeFormat=N,V.getNumberFormat=z,V.setNumberFormat=H,V.mergeNumberFormat=q,V[_h]=r,V[Di]=U,V[Hi]=Y,V[Bi]=F,V}function Rx(e){const t=X(e.locale)?e.locale:ur,n=X(e.fallbackLocale)||Fe(e.fallbackLocale)||he(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=Ie(e.missing)?e.missing:void 0,o=ye(e.silentTranslationWarn)||bn(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=ye(e.silentFallbackWarn)||bn(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=ye(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=he(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,f=Ie(e.postTranslation)?e.postTranslation:void 0,h=X(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,m=!!e.escapeParameterHtml,b=ye(e.sync)?e.sync:!0;let g=e.messages;if(he(e.sharedMessages)){const S=e.sharedMessages;g=Object.keys(S).reduce((y,x)=>{const k=y[x]||(y[x]={});return tt(k,S[x]),y},g||{})}const{__i18n:w,__root:C,__injectWithOption:p}=e,_=e.datetimeFormats,R=e.numberFormats,E=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:E,datetimeFormats:_,numberFormats:R,missing:r,missingWarn:o,fallbackWarn:s,fallbackRoot:i,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:f,warnHtmlMessage:h,escapeParameter:m,messageResolver:e.messageResolver,inheritLocale:b,__i18n:w,__root:C,__injectWithOption:p}}function Wi(e={},t){{const n=Ma(Rx(e)),{__extender:r}=e,o={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return ye(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=ye(s)?!s:s},get silentFallbackWarn(){return ye(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=ye(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[i,a,l]=s,c={};let f=null,h=null;if(!X(i))throw Qe(Je.INVALID_ARGUMENT);const m=i;return X(a)?c.locale=a:Fe(a)?f=a:he(a)&&(h=a),Fe(l)?f=l:he(l)&&(h=l),Reflect.apply(n.t,n,[m,f||h||{},c])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[i,a,l]=s,c={plural:1};let f=null,h=null;if(!X(i))throw Qe(Je.INVALID_ARGUMENT);const m=i;return X(a)?c.locale=a:Xe(a)?c.plural=a:Fe(a)?f=a:he(a)&&(h=a),X(l)?c.locale=l:Fe(l)?f=l:he(l)&&(h=l),Reflect.apply(n.t,n,[m,f||h||{},c])},te(s,i){return n.te(s,i)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,i){n.setLocaleMessage(s,i)},mergeLocaleMessage(s,i){n.mergeLocaleMessage(s,i)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,i){n.setDateTimeFormat(s,i)},mergeDateTimeFormat(s,i){n.mergeDateTimeFormat(s,i)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,i){n.setNumberFormat(s,i)},mergeNumberFormat(s,i){n.mergeNumberFormat(s,i)},getChoiceIndex(s,i){return-1}};return o.__extender=r,o}}const Fa={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ox({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===Ge?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function Eh(e){return Ge}const Lx=He({name:"i18n-t",props:tt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Xe(e)||!isNaN(e)}},Fa),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||Da({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(h=>h!=="_"),i={};e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=X(e.plural)?+e.plural:e.plural);const a=Ox(t,s),l=o[Di](e.keypath,a,i),c=tt({},r),f=X(e.tag)||Re(e.tag)?e.tag:Eh();return D(f,c,l)}}}),yu=Lx;function Ix(e){return Fe(e)&&!X(e[0])}function xh(e,t,n,r){const{slots:o,attrs:s}=t;return()=>{const i={part:!0};let a={};e.locale&&(i.locale=e.locale),X(e.format)?i.key=e.format:Re(e.format)&&(X(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((m,b)=>n.includes(b)?tt({},m,{[b]:e.format[b]}):m,{}));const l=r(e.value,i,a);let c=[i.key];Fe(l)?c=l.map((m,b)=>{const g=o[m.type],w=g?g({[m.type]:m.value,index:b,parts:l}):[m.value];return Ix(w)&&(w[0].key=`${m.type}-${b}`),w}):X(l)&&(c=[l]);const f=tt({},s),h=X(e.tag)||Re(e.tag)?e.tag:Eh();return D(h,f,c)}}const Ax=He({name:"i18n-n",props:tt({value:{type:Number,required:!0},format:{type:[String,Object]}},Fa),setup(e,t){const n=e.i18n||Da({useScope:"parent",__useComponent:!0});return xh(e,t,ph,(...r)=>n[Bi](...r))}}),Cu=Ax,$x=He({name:"i18n-d",props:tt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Fa),setup(e,t){const n=e.i18n||Da({useScope:"parent",__useComponent:!0});return xh(e,t,mh,(...r)=>n[Hi](...r))}}),Eu=$x;function Nx(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function kx(e){const t=i=>{const{instance:a,modifiers:l,value:c}=i;if(!a||!a.$)throw Qe(Je.UNEXPECTED_ERROR);const f=Nx(e,a.$),h=xu(c);return[Reflect.apply(f.t,f,[...wu(h)]),f]};return{created:(i,a)=>{const[l,c]=t(a);ss&&e.global===c&&(i.__i18nWatcher=vt(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),i.__composer=c,i.textContent=l},unmounted:i=>{ss&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:a})=>{if(i.__composer){const l=i.__composer,c=xu(a);i.textContent=Reflect.apply(l.t,l,[...wu(c)])}},getSSRProps:i=>{const[a]=t(i);return{textContent:a}}}}function xu(e){if(X(e))return{path:e};if(he(e)){if(!("path"in e))throw Qe(Je.REQUIRED_VALUE,"path");return e}else throw Qe(Je.INVALID_VALUE)}function wu(e){const{path:t,locale:n,args:r,choice:o,plural:s}=e,i={},a=r||{};return X(n)&&(i.locale=n),Xe(o)&&(i.plural=o),Xe(s)&&(i.plural=s),[t,a,i]}function Mx(e,t,...n){const r=he(n[0])?n[0]:{},o=!!r.useI18nComponentName;(ye(r.globalInstall)?r.globalInstall:!0)&&([o?"i18n":yu.name,"I18nT"].forEach(i=>e.component(i,yu)),[Cu.name,"I18nN"].forEach(i=>e.component(i,Cu)),[Eu.name,"I18nD"].forEach(i=>e.component(i,Eu))),e.directive("t",kx(t))}function Fx(e,t,n){return{beforeCreate(){const r=qt();if(!r)throw Qe(Je.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=t,this===this.$root)this.$i18n=Tu(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Wi(s);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=Tu(e,o);else{this.$i18n=Wi({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&Ch(t,o,o),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,i)=>this.$i18n.te(s,i),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=qt();if(!r)throw Qe(Je.UNEXPECTED_ERROR);const o=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(r),delete this.$i18n}}}function Tu(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[bh](t.pluralizationRules||e.pluralizationRules);const n=Ls(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Dx=Cn("global-vue-i18n");function Hx(e={},t){const n=__VUE_I18N_LEGACY_API__&&ye(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=ye(e.globalInjection)?e.globalInjection:!0,o=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,s=new Map,[i,a]=Bx(e,n),l=Cn("");function c(m){return s.get(m)||null}function f(m,b){s.set(m,b)}function h(m){s.delete(m)}{const m={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return o},async install(b,...g){if(b.__VUE_I18N_SYMBOL__=l,b.provide(b.__VUE_I18N_SYMBOL__,m),he(g[0])){const p=g[0];m.__composerExtend=p.__composerExtend,m.__vueI18nExtend=p.__vueI18nExtend}let w=null;!n&&r&&(w=Xx(b,m.global)),__VUE_I18N_FULL_INSTALL__&&Mx(b,m,...g),__VUE_I18N_LEGACY_API__&&n&&b.mixin(Fx(a,a.__composer,m));const C=b.unmount;b.unmount=()=>{w&&w(),m.dispose(),C()}},get global(){return a},dispose(){i.stop()},__instances:s,__getInstance:c,__setInstance:f,__deleteInstance:h};return m}}function Da(e={}){const t=qt();if(t==null)throw Qe(Je.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Qe(Je.NOT_INSTALLED);const n=zx(t),r=jx(n),o=yh(t),s=Wx(e,o);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Qe(Je.NOT_AVAILABLE_IN_LEGACY_MODE);return Kx(t,s,r,e)}if(s==="global")return Ch(r,e,o),r;if(s==="parent"){let l=Ux(n,t,e.__useComponent);return l==null&&(l=r),l}const i=n;let a=i.__getInstance(t);if(a==null){const l=tt({},e);"__i18n"in o&&(l.__i18n=o.__i18n),r&&(l.__root=r),a=Ma(l),i.__composerExtend&&(a[zi]=i.__composerExtend(a)),Gx(i,t,a),i.__setInstance(t,a)}return a}function Bx(e,t,n){const r=Fh();{const o=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Wi(e)):r.run(()=>Ma(e));if(o==null)throw Qe(Je.UNEXPECTED_ERROR);return[r,o]}}function zx(e){{const t=De(e.isCE?Dx:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Qe(e.isCE?Je.NOT_INSTALLED_WITH_PROVIDE:Je.UNEXPECTED_ERROR);return t}}function Wx(e,t){return Rs(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function jx(e){return e.mode==="composition"?e.global:e.global.__composer}function Ux(e,t,n=!1){let r=null;const o=t.root;let s=Vx(t,n);for(;s!=null;){const i=e;if(e.mode==="composition")r=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(s);a!=null&&(r=a.__composer,n&&r&&!r[_h]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function Vx(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Gx(e,t,n){yn(()=>{},t),la(()=>{const r=n;e.__deleteInstance(t);const o=r[zi];o&&(o(),delete r[zi])},t)}function Kx(e,t,n,r={}){const o=t==="local",s=co(null);if(o&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Qe(Je.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=ye(r.inheritLocale)?r.inheritLocale:!X(r.locale),a=ce(!o||i?n.locale.value:X(r.locale)?r.locale:ur),l=ce(!o||i?n.fallbackLocale.value:X(r.fallbackLocale)||Fe(r.fallbackLocale)||he(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:a.value),c=ce(Ls(a.value,r)),f=ce(he(r.datetimeFormats)?r.datetimeFormats:{[a.value]:{}}),h=ce(he(r.numberFormats)?r.numberFormats:{[a.value]:{}}),m=o?n.missingWarn:ye(r.missingWarn)||bn(r.missingWarn)?r.missingWarn:!0,b=o?n.fallbackWarn:ye(r.fallbackWarn)||bn(r.fallbackWarn)?r.fallbackWarn:!0,g=o?n.fallbackRoot:ye(r.fallbackRoot)?r.fallbackRoot:!0,w=!!r.fallbackFormat,C=Ie(r.missing)?r.missing:null,p=Ie(r.postTranslation)?r.postTranslation:null,_=o?n.warnHtmlMessage:ye(r.warnHtmlMessage)?r.warnHtmlMessage:!0,R=!!r.escapeParameter,E=o?n.modifiers:he(r.modifiers)?r.modifiers:{},S=r.pluralRules||o&&n.pluralRules;function T(){return[a.value,l.value,c.value,f.value,h.value]}const y=J({get:()=>s.value?s.value.locale.value:a.value,set:u=>{s.value&&(s.value.locale.value=u),a.value=u}}),x=J({get:()=>s.value?s.value.fallbackLocale.value:l.value,set:u=>{s.value&&(s.value.fallbackLocale.value=u),l.value=u}}),k=J(()=>s.value?s.value.messages.value:c.value),W=J(()=>f.value),G=J(()=>h.value);function M(){return s.value?s.value.getPostTranslationHandler():p}function Q(u){s.value&&s.value.setPostTranslationHandler(u)}function ae(){return s.value?s.value.getMissingHandler():C}function pe(u){s.value&&s.value.setMissingHandler(u)}function ne(u){return T(),u()}function K(...u){return s.value?ne(()=>Reflect.apply(s.value.t,null,[...u])):ne(()=>"")}function re(...u){return s.value?Reflect.apply(s.value.rt,null,[...u]):""}function xe(...u){return s.value?ne(()=>Reflect.apply(s.value.d,null,[...u])):ne(()=>"")}function ve(...u){return s.value?ne(()=>Reflect.apply(s.value.n,null,[...u])):ne(()=>"")}function we(u){return s.value?s.value.tm(u):{}}function Pe(u,v){return s.value?s.value.te(u,v):!1}function Ue(u){return s.value?s.value.getLocaleMessage(u):{}}function Be(u,v){s.value&&(s.value.setLocaleMessage(u,v),c.value[u]=v)}function Ve(u,v){s.value&&s.value.mergeLocaleMessage(u,v)}function de(u){return s.value?s.value.getDateTimeFormat(u):{}}function A(u,v){s.value&&(s.value.setDateTimeFormat(u,v),f.value[u]=v)}function U(u,v){s.value&&s.value.mergeDateTimeFormat(u,v)}function F(u){return s.value?s.value.getNumberFormat(u):{}}function Y(u,v){s.value&&(s.value.setNumberFormat(u,v),h.value[u]=v)}function me(u,v){s.value&&s.value.mergeNumberFormat(u,v)}const _e={get id(){return s.value?s.value.id:-1},locale:y,fallbackLocale:x,messages:k,datetimeFormats:W,numberFormats:G,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(u){s.value&&(s.value.inheritLocale=u)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(c.value)},get modifiers(){return s.value?s.value.modifiers:E},get pluralRules(){return s.value?s.value.pluralRules:S},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:m},set missingWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackWarn(){return s.value?s.value.fallbackWarn:b},set fallbackWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackRoot(){return s.value?s.value.fallbackRoot:g},set fallbackRoot(u){s.value&&(s.value.fallbackRoot=u)},get fallbackFormat(){return s.value?s.value.fallbackFormat:w},set fallbackFormat(u){s.value&&(s.value.fallbackFormat=u)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:_},set warnHtmlMessage(u){s.value&&(s.value.warnHtmlMessage=u)},get escapeParameter(){return s.value?s.value.escapeParameter:R},set escapeParameter(u){s.value&&(s.value.escapeParameter=u)},t:K,getPostTranslationHandler:M,setPostTranslationHandler:Q,getMissingHandler:ae,setMissingHandler:pe,rt:re,d:xe,n:ve,tm:we,te:Pe,getLocaleMessage:Ue,setLocaleMessage:Be,mergeLocaleMessage:Ve,getDateTimeFormat:de,setDateTimeFormat:A,mergeDateTimeFormat:U,getNumberFormat:F,setNumberFormat:Y,mergeNumberFormat:me};function d(u){u.locale.value=a.value,u.fallbackLocale.value=l.value,Object.keys(c.value).forEach(v=>{u.mergeLocaleMessage(v,c.value[v])}),Object.keys(f.value).forEach(v=>{u.mergeDateTimeFormat(v,f.value[v])}),Object.keys(h.value).forEach(v=>{u.mergeNumberFormat(v,h.value[v])}),u.escapeParameter=R,u.fallbackFormat=w,u.fallbackRoot=g,u.fallbackWarn=b,u.missingWarn=m,u.warnHtmlMessage=_}return _n(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Qe(Je.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=s.value=e.proxy.$i18n.__composer;t==="global"?(a.value=u.locale.value,l.value=u.fallbackLocale.value,c.value=u.messages.value,f.value=u.datetimeFormats.value,h.value=u.numberFormats.value):o&&d(u)}),_e}const Yx=["locale","fallbackLocale","availableLocales"],Su=["t","rt","d","n","tm","te"];function Xx(e,t){const n=Object.create(null);return Yx.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s)throw Qe(Je.UNEXPECTED_ERROR);const i=nt(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,i)}),e.config.globalProperties.$i18n=n,Su.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s||!s.value)throw Qe(Je.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,s)}),()=>{delete e.config.globalProperties.$i18n,Su.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}Tx();__INTLIFY_JIT_COMPILATION__?su(_x):su(bx);fx(GE);dx(oh);if(__INTLIFY_PROD_DEVTOOLS__){const e=Vt();e.__INTLIFY__=!0,tx(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qx=Hx({legacy:!1,locale:navigator.language,fallbackLocale:"en",messages:{en:{preview:"preview"},"zh-CN":{preview:"查看"}}}),Zx={hash:"68841035cc7163bb6b67d05cd528fcbb55a03efe",date:"2024-01-23T18:21:12+08:00",message:"perf: show empty name",refs:"grafted, HEAD -> main, origin/main",body:"",author_name:"lisonge",author_email:"i@songe.li"},Jx=`GIT commit `+Object.entries(Zx).filter(([e,t])=>String(t||"").trim()).map(([e,t])=>e+": "+t).join(` `),Ha=Jp(qC);Ha.use(qx);Ha.use(eE);Ha.mount("#app");console.log(Jx);export{ba as $,po as A,ws as B,Dt as C,u1 as D,Ts as E,Ge as F,bo as G,ce as H,Rt as I,go as J,dw as K,Nn as L,Mg as M,Oc as N,pn as O,ii as P,bl as Q,FC as R,jy as S,cg as T,yi as U,De as V,ug as W,hw as X,$d as Y,mw as Z,Ri as _,Gu as a,Hh as a$,_w as a0,Md as a1,Po as a2,zf as a3,Ng as a4,be as a5,Ad as a6,Xy as a7,Gn as a8,ho as a9,xt as aA,ys as aB,ql as aC,gn as aD,o1 as aE,Tt as aF,r1 as aG,Nd as aH,Ll as aI,Ol as aJ,_a as aK,gi as aL,$v as aM,Kf as aN,Zg as aO,va as aP,vw as aQ,Hd as aR,yw as aS,pa as aT,Xg as aU,ts as aV,Kg as aW,Yg as aX,Zl as aY,ro as aZ,tw as a_,yn as aa,fw as ab,cw as ac,Oi as ad,Nf as ae,Rl as af,lw as ag,Cw as ah,Kr as ai,la as aj,ha as ak,Dm as al,Ki as am,Yi as an,sp as ao,rw as ap,iw as aq,Tw as ar,Fo as as,nw as at,nt as au,Uf as av,_n as aw,Lt as ax,ct as ay,Kt as az,Ze as b,Fd as b$,ew as b0,qt as b1,Vf as b2,Dl as b3,bw as b4,Rg as b5,tv as b6,sv as b7,cf as b8,uf as b9,Vv as bA,Xs as bB,Rr as bC,yy as bD,Or as bE,vn as bF,vo as bG,gw as bH,dg as bI,Ov as bJ,fg as bK,Yt as bL,uo as bM,c1 as bN,vi as bO,ut as bP,uw as bQ,Ee as bR,yr as bS,Ra as bT,A1 as bU,O1 as bV,Ew as bW,Ug as bX,Wg as bY,$1 as bZ,xw as b_,xa as ba,gr as bb,g0 as bc,dd as bd,Ta as be,p0 as bf,ns as bg,Uv as bh,br as bi,V0 as bj,eb as bk,mo as bl,_d as bm,ir as bn,Cs as bo,yc as bp,pd as bq,_r as br,vd as bs,vr as bt,Un as bu,fd as bv,ud as bw,xi as bx,cd as by,D_ as bz,J as c,xc as c0,zy as c1,Wy as c2,By as c3,Jp as c4,T1 as c5,He as d,vt as e,ow as f,Bo as g,bt as h,ww as i,aw as j,Rc as k,Xt as l,Qx as m,sw as n,da as o,D as p,Ae as q,lo as r,co as s,QC as t,ot as u,_i as v,sa as w,Z as x,Se as y,ie as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/HomePage-wbzSXwwc.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-ust5ePq8.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/storage-I0hkGMKT.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/node-nnk68Gjj.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/jszip.min-Er0t4O-W.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/import-sCnXcRHq.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/table-kebVkreH.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/SnapshotPage-CmKtZTGi.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/index-AzMi55Pv.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/ImportPage-wX1w62Qh.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1705979515074/files/dist/assets/DevicePage-XI-cAKHm.js"] + __vite__mapDeps.viteFileDeps = ["https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/HomePage-91EmzLXR.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-UPLSJ4Hw.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/storage-HvXPlwOB.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/node-_ec_Pp3m.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/jszip.min-jR1TOKSo.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/import-kVHJH7rF.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/table-Ycm662oI.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/SnapshotPage-owac59Kk.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/index-Lw3EAuUv.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/ImportPage-Fae4iEVk.js","https://registry.npmmirror.com/@gkd-kit/inspect/0.0.1706005317310/files/dist/assets/DevicePage-FYbQq6N3.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -//# sourceMappingURL=index-KbMk1nPu.js.map +//# sourceMappingURL=index-O1rtA3Eg.js.map diff --git a/assets/index-KbMk1nPu.js.map b/assets/index-O1rtA3Eg.js.map similarity index 99% rename from assets/index-KbMk1nPu.js.map rename to assets/index-O1rtA3Eg.js.map index 94841ed..61d6b8f 100644 --- a/assets/index-KbMk1nPu.js.map +++ b/assets/index-O1rtA3Eg.js.map @@ -1 +1 @@ -{"version":3,"mappings":"ssBAAA;AAAA;AAAA;AAAA;AAAA,GAKA,SAASA,GAAQC,EAAKC,EAAkB,CACtC,MAAMC,EAAM,IAAI,IAAIF,EAAI,MAAM,GAAG,CAAC,EAClC,OAAOC,EAAoBE,GAAQD,EAAI,IAAIC,EAAI,YAAa,GAAKA,GAAQD,EAAI,IAAIC,CAAG,CACtF,CAEA,MAAMC,GAA4E,GAC5EC,GAA4E,GAC5EC,GAAO,IAAM,CACnB,EACMC,GAAK,IAAM,GACXC,GAAQC,GAAQA,EAAI,WAAW,CAAC,IAAM,KAAOA,EAAI,WAAW,CAAC,IAAM,MACxEA,EAAI,WAAW,CAAC,EAAI,KAAOA,EAAI,WAAW,CAAC,EAAI,IAC1CC,GAAmBD,GAAQA,EAAI,WAAW,WAAW,EACrDE,GAAS,OAAO,OAChBC,GAAS,CAACC,EAAKC,IAAO,CACpB,MAAAC,EAAIF,EAAI,QAAQC,CAAE,EACpBC,EAAI,IACFF,EAAA,OAAOE,EAAG,CAAC,CAEnB,EACMC,GAAiB,OAAO,UAAU,eAClCC,GAAS,CAACd,EAAKM,IAAQO,GAAe,KAAKb,EAAKM,CAAG,EACnDS,GAAU,MAAM,QAChBC,GAAShB,GAAQiB,GAAajB,CAAG,IAAM,eACvCkB,GAASlB,GAAQiB,GAAajB,CAAG,IAAM,eAGvCmB,GAAcnB,GAAQ,OAAOA,GAAQ,WACrCoB,GAAYpB,GAAQ,OAAOA,GAAQ,SACnCqB,GAAYrB,GAAQ,OAAOA,GAAQ,SACnCsB,GA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j9D,EAAO,EAG/Bi9D,GAAwBqD,EAAiB,EAG7ClD,GAAwBxD,EAAY,EAEpC2D,GAAyBrB,EAAuB,EAEhD,GAA+C,0BAA2B,CACtE,MAAMrtF,EAASxE,KACfwE,EAAO,YAAc,GACrBusF,GAAgBvsF,EAAO,gCAAgC,CAC3D,CC33FA,MAAMysF,GAAO+O,GAAW,CACtB,OAAQ,GACR,OAAQ,UAAU,SAClB,eAAgB,KAChB,SAAU,CACR,GAAI,CACF,QAAS,SACX,EACA,QAAS,CACP,QAAS,IACX,CACF,CACF,CAAC,kNCZYgC,GACX;AAAA,EACA,OAAO,QAAQC,EAAS,EACrB,OAAO,CAAC,CAACljG,EAAGV,CAAK,IAAwB,OAAOA,GAAS,EAAE,EAAE,KAAM,GACnE,IAAI,CAAC,CAACnB,EAAKmB,CAAK,IACRnB,EAAM,KAAOmB,CACrB,EACA,KAAK;AAAA,CAAI,ECDRqlB,GAAM4b,GAAU4iE,EAAG,EACzBx+E,GAAI,IAAIutE,EAAI,EACZvtE,GAAI,IAAIm3D,EAAM,EACdn3D,GAAI,MAAM,MAAM,EAGd,QAAQ,IAAIs+E,EAAS","names":["makeMap","str","expectsLowerCase","set","val","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","isOn","key","isModelListener","extend","remove","arr","el","i","hasOwnProperty","hasOwn","isArray","isMap","toTypeString","isSet","isFunction","isString","isSymbol","isObject","isPromise","objectToString","value","toRawType","isPlainObject","isIntegerKey","isReservedProp","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","looseToNumber","n","toNumber","_globalThis","getGlobalThis","normalizeStyle","res","item","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","ret","tmp","normalizeClass","name","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","toDisplayString","replacer","_key","entries","val2","stringifySymbol","v","_a","activeEffectScope","EffectScope","detached","currentEffectScope","fromParent","l","last","effectScope","recordEffectScope","effect","scope","getCurrentScope","onScopeDispose","activeEffect","ReactiveEffect","trigger","scheduler","pauseTracking","dep","triggerComputed","resetTracking","lastShouldTrack","shouldTrack","lastEffect","preCleanupEffect","postCleanupEffect","computed","effect2","cleanupDepEffect","trackId","pauseScheduleStack","trackStack","pauseScheduling","resetScheduling","queueEffectSchedulers","trackEffect","debuggerEventExtraInfo","oldDep","triggerEffects","dirtyLevel","lastDirtyLevel","createDep","cleanup","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","track","target","type","depsMap","newValue","oldTarget","deps","newLength","key2","getDepFromReactive","object","isNonTrackableKeys","builtInSymbols","arrayInstrumentations","createArrayInstrumentations","instrumentations","args","toRaw","BaseReactiveHandler","_isReadonly","_shallow","receiver","isReadonly2","shallow","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","targetIsArray","isRef","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","isShallow","hadKey","result","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","toShallow","getProto","get","rawTarget","rawKey","has2","wrap","toReadonly","toReactive","has","size","add","get2","deleteEntry","clear","hadItems","createForEach","callback","thisArg","observed","createIterableMethod","method","targetIsMap","isPair","isKeyOnly","innerIterator","done","createReadonlyMethod","createInstrumentations","mutableInstrumentations2","shallowInstrumentations2","readonlyInstrumentations2","shallowReadonlyInstrumentations2","mutableInstrumentations","readonlyInstrumentations","shallowInstrumentations","shallowReadonlyInstrumentations","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","proxy","isReactive","isProxy","raw","markRaw","ComputedRefImpl","getter","_setter","isSSR","triggerRefValue","self","trackRefValue","getterOrOptions","debugOptions","setter","onlyGetter","ref2","newVal","r","ref","createRef","shallowRef","rawValue","RefImpl","__v_isShallow","useDirectValue","unref","shallowUnwrapHandlers","proxyRefs","objectWithRefs","CustomRefImpl","factory","customRef","ObjectRefImpl","_object","_defaultValue","GetterRefImpl","_getter","toRef","source","defaultValue","propertyToRef","callWithErrorHandling","instance","err","handleError","callWithAsyncErrorHandling","values","throwInDev","contextVNode","cur","exposedInstance","errorInfo","errorCapturedHooks","appErrorHandler","logError","isFlushing","isFlushPending","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","middleJob","middleJobId","getId","queueJob","job","queueFlush","flushJobs","invalidateJob","queuePostFlushCb","cb","flushPreFlushCbs","seen","flushPostFlushCbs","deduped","a","b","comparator","diff","emit","event","rawArgs","props","modelArg","modifiersKey","number","trim","handlerName","handler","onceHandler","normalizeEmitsOptions","comp","appContext","asMixin","cached","hasExtends","extendEmits","raw2","normalizedFromExtend","isEmitListener","options","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","prev","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","renderComponentRoot","Component","vnode","withProxy","propsOptions","slots","attrs","render","renderCache","data","setupState","inheritAttrs","fallthroughAttrs","proxyToUse","thisProxy","normalizeVNode","render2","getFunctionalFallthrough","blockStack","createVNode","Comment","root","keys","shapeFlag","filterModelListeners","cloneVNode","shouldUpdateComponent","prevVNode","nextVNode","optimized","prevProps","prevChildren","component","nextProps","nextChildren","patchFlag","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","updateHOCHostEl","parent","COMPONENTS","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","warnMissing","currentInstance","selfName","getComponentName","resolve","registry","isSuspense","queueEffectWithSuspense","suspense","ssrContextKey","useSSRContext","inject","watchEffect","doWatch","INITIAL_WATCHER_VALUE","watch","immediate","deep","flush","once","onTrack","onTrigger","_cb","unwatch","reactiveGetter","source2","traverse","forceTrigger","isMultiSource","isShallow$1","s","onCleanup","baseGetter","ssrCleanup","isInSSRComponentSetup","queuePostRenderEffect","instanceWatch","publicThis","createPathGetter","reset","setCurrentInstance","path","segments","depth","currentDepth","withDirectives","directives","getExposeProxy","bindings","dir","modifiers","invokeDirectiveHook","oldBindings","binding","hook","leaveCbKey","enterCbKey","useTransitionState","state","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionPropsValidators","BaseTransitionImpl","getCurrentInstance","prevTransitionKey","children","getTransitionRawChildren","child","rawProps","mode","emptyPlaceholder","innerChild","getKeepAliveChild","enterHooks","resolveTransitionHooks","setTransitionHooks","oldChild","oldInnerChild","transitionKeyChanged","getTransitionKey","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","BaseTransition","leavingVNodes","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","callHook","callAsyncHook","hook2","hooks","leavingVNode","afterHook","cancelHook","called","cancelled","vnode2","isKeepAlive","keepComment","parentKey","keyedFragmentCount","Fragment","defineComponent","extraOptions","isAsyncWrapper","onActivated","registerKeepAliveHook","onDeactivated","wrappedHook","current","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","createHook","lifecycle","onBeforeMount","onBeforeUpdate","onUpdated","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","renderList","renderItem","index","renderSlot","fallback","noSlotted","slot","openBlock","validSlotContent","ensureValidVNode","rendered","createBlock","vnodes","isVNode","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","hasSetupBinding","PublicInstanceProxyHandlers","accessCache","normalizedProps","shouldCacheAccess","publicGetter","cssModule","globalProperties","descriptor","normalizePropsOrEmits","applyOptions","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","components","filters","resolveInjections","methodHandler","opt","createWatcher","provides","provide","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","normalizeInject","h","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","hydrate","rootComponent","rootProps","context","installedPlugins","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","namespace","currentApp","parentProvides","treatDefaultAsFactory","initProps","isStateful","InternalObjectKey","setFullProps","updateProps","rawPrevProps","rawCurrentProps","hasAttrsChanged","propsToUpdate","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","normalizePropsOptions","extendProps","normalizedKey","validatePropName","prop","booleanIndex","getTypeIndex","stringIndex","getType","ctor","match","isSameType","expectedTypes","t","isInternalKey","normalizeSlotValue","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","refValue","owner","oldRef","refs","_isString","_isRef","doSet","existing","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostRemove","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","patch","n1","n2","container","anchor","parentComponent","slotScopeIds","getNextHostNode","unmount","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","internals","moveStaticNode","nextSibling","next","removeStaticNode","mountElement","patchElement","vnodeHook","transition","dirs","mountChildren","resolveChildrenNamespace","setScopeId","unmountChildren","invokeVNodeHook","needCallTransitionHooks","needTransition","scopeId","subTree","parentVNode","cloneIfMounted","dynamicChildren","oldProps","newProps","toggleRecurse","patchBlockChildren","patchChildren","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","placeholder","updateComponentPreRender","componentUpdateFn","bu","u","nonHydratedAsyncRoot","locateNonHydratedAsyncRoot","originNext","nextTree","prevTree","bm","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","update","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","oldLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","j","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","move","moveType","leave","delayLeave","afterLeave","remove2","performLeave","doRemove","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","currentNamespace","allowed","ch1","ch2","len","arrI","subComponent","isTeleport","isTeleportDisabled","isTargetSVG","isTargetMathML","resolveTarget","select","targetSelector","TeleportImpl","insert","querySelector","createText","createComment","disabled","mainAnchor","targetAnchor","mount","container2","anchor2","wasDisabled","currentContainer","currentAnchor","moveTeleport","nextTarget","updateCssVars","shouldRemove","hydrateTeleport","isReorder","node","parentNode","hydrateChildren","targetNode","Teleport","currentBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","klass","style","extraProps","mergeRef","mergedProps","mergeProps","createTextVNode","text","flag","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","setInSSRSetupState","g","registerGlobalSetter","setters","unsetCurrentInstance","setupResult","setupStatefulComponent","setup","setupContext","createSetupContext","resolvedResult","handleSetupResult","e","finishComponentSetup","compile","skipOptions","template","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","getAttrsProxy","includeInferred","computed$1","propsOrChildren","svgNS","mathmlNS","doc","templateContainer","nodeOps","tag","is","selector","content","before","wrapper","TRANSITION","ANIMATION","vtcKey","Transition","resolveTransitionProps","DOMTransitionPropsValidators","TransitionPropsValidators","h2","hasExplicitCallback","baseProps","duration","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","cls","_vtc","endId","expectedType","explicitTimeout","resolveIfNotStale","timeout","propCount","getTransitionInfo","endEvent","ended","onEnd","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","toMs","patchClass","isSVG","transitionClasses","vShowOldKey","vShow","setDisplay","CSS_VAR_TEXT","patchStyle","currentDisplay","isCssString","setStyle","cssVarText","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","needRemove","addEventListener","removeEventListener","veiKey","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","cachedNow","getNow","initialValue","patchStopImmediatePropagation","originalStop","isNativeOn","patchProp","shouldSetAsProp","positionMap","newPositionMap","moveCbKey","TransitionGroupImpl","moveClass","hasCSSTransform","callPendingCbs","recordPosition","movedChildren","applyTranslation","cssTransitionProps","removeMode","TransitionGroup","oldPos","newPos","dx","dy","clone","systemModifiers","modifierGuards","withModifiers","cacheKey","guard","keyNames","withKeys","eventKey","k","rendererOptions","renderer","ensureRenderer","createApp","containerOrSelector","normalizeContainer","resolveRootNamespace","getPreciseEventTarget","depx","pxfy","getMargin","position","parts","margin","getGap","orient","rowGap","colGap","colors","prefix","suffix","float","hex","dhex","rgbRegex","rgbaRegex","sHexRegex","hexRegex","sHexaRegex","hexaRegex","parseHex","rgba","color","roundChannel","roundAlpha","normalizeAlpha","alphaValue","stringifyRgba","compositeChannel","v1","a1","v2","a2","composite","background","overlay","alpha","changeColor","scaleColor","lightness","toRgbaString","createId","length","repeat","count","keep","rest","keepedObject","flatten","vNodes","filterCommentNode","vNode","call","funcs","func","keysOf","warn","location","message","throwError","getFirstSlotVNode","slotName","slotContent","createInjectionKey","resolveSlot","resolveSlotWithProps","resolveWrappedSlot","resolveWrappedSlotWithProps","isSlotEmpty","Wrapper","_b","color2Class","ampCount","cnt","separatorRegex","extraSpaceRegex","resolveSelectorWithAmp","amp","nextAmp","partialSelector","round","partialAmp","partialNextAmp","nextPartialNextAmp","selectorItr","part","resolveSelector","parseSelectorPath","selectorPaths","removeElement","parentElement","queryElement","createElement","isMediaOrSupports","kebabRegex","kebabCase","pattern","unwrapProperty","indent","unwrapProperties","params","createStyle","unwrappedProps","propertyNames","statements","propertyName","property","loopCNodeListWithCallback","grandChildren","traverseCNode","styleSheet","$","blockSelector","childNode","insertRule","murmur2","intance","els","addElementToList","head","silent","force","anchorMetaName","ssrAdapter","cssrContext","hash","queriedTarget","anchorMetaEl","wrappedRender","wrappedMount","ssr","wrappedUnmount","createCNode","CssRender","config","cssr","exists","ids","_bPrefix","_ePrefix","_mPrefix","_plugin","memorizedB","memorizedE","elementToSelector","modifier","notM","elementPrefix","modifierPrefix","BemPlugin","find","cB","cE","cM","cNotM","insideModal","bPrefix","insidePopover","asModal","cCB","createKey","startChar","isBrowser","eventSet","markEventEffectPerformed","eventEffectNotPerformed","useFalseUntilTruthy","originalRef","currentRef","stop","useMemo","computedValueRef","valueRef","hasInstance","getEventTarget","traps","createTrapHandler","originalHandler","moveHandler","mouseDownOutside","downHandler","upHanlder","ensureTrapHandlers","handlers","elHandlers","trapHandler","trapOn","trapHandlers","on","trapOff","off","createDelegate","propagationStopped","immediatePropagationStopped","trackPropagation","trackImmediate","spy","propName","unspy","currentTargets","currentTargetDescriptor","getCurrentTarget","defineCurrentTarget","phaseToTypeToElToHandlers","typeToWindowEventHandlers","createUnifiedHandler","delegeteHandler","eventPhase","bubbles","phase","cursor","captureElToHandlers","bubbleElToHandlers","bubbleHandlers","createUnifiedWindowEventHandler","delegateHandler","unifiedHandler","unfiendWindowEventHandler","ensureElToHandlers","phaseHandlers","ensureWindowEventHandlers","ensureHandlers","elToHandlers","handlerExist","windowEventHandlerExist","mergedHandler","windowEventHandlers","capture","mousePositionRef","clickHandler","left","top","width","height","usedCount","managable","useClickPosition","clickedTimeRef","handleClick","useClicked","clickedRef","timerId","clearTimer","clickedHandler","isIos","useIsIos","modalBodyInjectionKey","modalInjectionKey","drawerBodyInjectionKey","popoverBodyInjectionKey","getSlot","getFirstVNode","ctxKey","clickoutside","clickoutside$1","ZIndexManager","zIndex","elementZIndex","nextZIndex","elementCount","elementZIndexPair","pair1","pair2","pair","zIndexManager","zindexable","enabled","cachedEnabled","zindexable$1","createStyleString","ssrContext","useSsrAdapter","resolveTo","LazyTeleport","resizeObservers","hasActiveObservations","ro","hasSkippedObservations","msg","deliverResizeLoopError","ResizeObserverBoxOptions","freeze","ResizeObserverSize","inlineSize","blockSize","DOMRectReadOnly","x","y","right","bottom","rectangle","isHidden","offsetWidth","offsetHeight","isElement","isReplacedElement","global","scrollRegexp","verticalRegexp","IE","parseDimension","pixel","switchSizes","zeroBoxes","calculateBoxSizes","forceRecalculation","cs","svg","removePadding","canScrollVertically","canScrollHorizontally","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTop","borderRight","borderBottom","borderLeft","horizontalPadding","verticalPadding","horizontalBorderArea","verticalBorderArea","horizontalScrollbarThickness","verticalScrollbarThickness","widthReduction","heightReduction","contentWidth","contentHeight","borderBoxWidth","borderBoxHeight","boxes","calculateBoxSize","observedBox","borderBoxSize","contentBoxSize","devicePixelContentBoxSize","ResizeObserverEntry","calculateDepthForNode","broadcastActiveObservations","shallowestDepth","callbacks","ot","entry","targetDepth","_i","callbacks_1","gatherActiveObservationsAtDepth","process","notify","queueMicroTask","toggle_1","el_1","queueResizeObserver","watching","isWatching","CATCH_PERIOD","observerConfig","events","time","scheduled","Scheduler","_this","until","elementsHaveResized","updateCount","skipNotifyOnElement","ResizeObservation","ResizeObserverDetail","resizeObserver","observerMap","getObservationIndex","observationTargets","ResizeObserverController","detail","firstObservation","lastObservation","ResizeObserver","ResizeObserverDelegate","PolyfillResizeObserver","resizeObserverManager","VResizeObserver","registered","handleResize","onResize","delegate","isHTMLElement","focusFirstDescendant","attemptFocus","focusLastDescendant","element","isFocusable","stack","FocusTrap","focusableStartRef","focusableEndRef","ignoreInternalFocusChange","lastFocusedElement","isCurrentActive","handleDocumentKeydown","activate","deactivate","handleDocumentFocus","mainEl","getMainEl","resetFocusTo","focusableStartEl","initialFocusTo","idInStack","finalFocusTo","focusableEndEl","focused","handleStartFocus","handleEndFocus","defaultSlot","active","focusableStyle","lockCount","originalMarginRight","originalOverflow","originalOverflowX","originalOverflowY","lockHtmlScrollRightCompensationRef","useLockHtmlScroll","lockRef","watchStopHandle","unlock","scrollbarWidth","isComposingRef","compositionStartHandler","compositionEndHandler","mountedCount","useIsComposing","useReactivated","isDeactivatedRef","activateStateInitialized","formItemInjectionKey","useFormItem","defaultSize","mergedSize","mergedDisabled","NFormItem","mergedSizeRef","mergedDisabledRef","mergedStatusRef","status","freeGlobal","freeSelf","Symbol","objectProto","nativeObjectToString","symToStringTag","getRawTag","isOwn","unmasked","nullTag","undefinedTag","baseGetTag","isObjectLike","symbolTag","arrayMap","array","iteratee","INFINITY","symbolProto","symbolToString","baseToString","identity","asyncTag","funcTag","genTag","proxyTag","coreJsData","maskSrcKey","isMasked","funcProto","funcToString","toSource","reRegExpChar","reIsHostCtor","reIsNative","baseIsNative","getValue","getNative","objectCreate","baseCreate","proto","apply","copyArray","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","lastCalled","stamp","remaining","constant","defineProperty","baseSetToString","string","baseSetToString$1","setToString","MAX_SAFE_INTEGER","reIsUint","isIndex","baseAssignValue","eq","other","assignValue","objValue","copyObject","customizer","isNew","nativeMax","overRest","transform","otherArgs","baseRest","isLength","isArrayLike","isIterateeCall","createAssigner","assigner","sources","isPrototype","Ctor","baseTimes","argsTag","baseIsArguments","propertyIsEnumerable","isArguments","stubFalse","freeExports","freeModule","moduleExports","Buffer","nativeIsBuffer","isBuffer","arrayTag","boolTag","dateTag","errorTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","baseUnary","freeProcess","nodeUtil","types","nodeIsTypedArray","isTypedArray","arrayLikeKeys","inherited","isArr","isArg","isBuff","isType","skipIndexes","overArg","nativeKeysIn","baseKeysIn","isProto","keysIn","nativeCreate","hashClear","hashDelete","HASH_UNDEFINED","hashGet","hashHas","hashSet","Hash","listCacheClear","assocIndexOf","arrayProto","splice","listCacheDelete","lastIndex","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","mapCacheClear","isKeyable","getMapData","map","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","toString","getPrototype","objectCtorString","baseSlice","castSlice","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsZWJ","reHasUnicode","hasUnicode","asciiToArray","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","reUnicode","unicodeToArray","stringToArray","createCaseFirst","methodName","strSymbols","chr","trailing","upperFirst","stackClear","stackDelete","stackGet","stackHas","LARGE_ARRAY_SIZE","stackSet","pairs","Stack","allocUnsafe","cloneBuffer","buffer","isDeep","Uint8Array","Uint8Array$1","cloneArrayBuffer","arrayBuffer","cloneTypedArray","typedArray","initCloneObject","createBaseFor","fromRight","keysFunc","iterable","baseFor","assignMergeValue","isArrayLikeObject","safeGet","toPlainObject","baseMergeDeep","srcIndex","mergeFunc","srcValue","stacked","isCommon","isTyped","baseMerge","merge","commonVariables$2","fontSize","fontFamily","lineHeight","commonVariables","globalStyle","configProviderInjectionKey","cssrAnchorMetaName","createTheme","theme","useTheme","resolveId","mountId","defaultTheme","clsPrefixRef","NConfigProvider","mountStyle","clsPrefix","selfCommon","peers","selfOverrides","builtinOverrides","selfCommonOverrides","peersOverrides","globalCommon","globalSelfCommon","globalSelf","globalPeers","globalCommonOverrides","globalSelfOverrides","globalSelfCommonOverrides","globalPeersOverrides","mergedCommon","mergedSelf","defaultClsPrefix","useConfig","bordered","useMergedClsPrefix","zhCN","label","num","zhCN$1","formatDistanceLocale","formatDistance","token","tokenValue","formatDistance$1","buildFormatLongFn","format","dateFormats","timeFormats","dateTimeFormats","formatLong","formatLong$1","requiredArgs","required","_typeof","o","toDate","argument","argStr","toInteger","dirtyNumber","defaultOptions","getDefaultOptions","startOfUTCWeek","dirtyDate","_ref","_ref2","_ref3","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","weekStartsOn","date","day","isSameUTCWeek","dirtyDateLeft","dirtyDateRight","dateLeftStartOfWeek","dateRightStartOfWeek","checkWeek","baseDate","baseFormat","formatRelativeLocale","formatRelative","formatRelative$1","buildLocalizeFn","dirtyIndex","valuesArray","defaultWidth","_defaultWidth","_width","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","localize","quarter","localize$1","buildMatchFn","matchPattern","matchResult","matchedString","parsePatterns","findIndex","findKey","predicate","buildMatchPatternFn","parseResult","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match$1","locale","faIR","dateZhCN","dateZhCN$1","useStyle","useThemeClass","componentName","hashRef","cssVarsRef","mergedThemeHashRef","themeClassRef","renderCallback","hashClassPrefix","finalThemeHash","hashValue","themeHash","themeOverrides","builtinThemeOverrides","cssVars","useRtl","rtlStateRef","componentRtlStateRef","rtlState","componentRtlState","replaceable","icon","mergedIconsRef","iconOverride","ErrorIcon$1","ErrorIcon","InfoIcon","SuccessIcon","WarningIcon","NIconSwitchTransition","isMountedRef","useIsMounted","NFadeInExpandTransition","handleBeforeLeave","handleLeave","handleAfterLeave","handleEnter","memorizedWidth","memorizedHeight","handleAfterEnter","group","resolvedProps","style$8","NBaseIcon","style$7","NBaseClose","absolute","isButtonTag","CloseIcon","cubicBezierEaseInOut","iconSwitchTransition","originalTransform","style$6","exposedLoadingProps","NBaseLoading","radius","strokeWidth","stroke","scale","scaledRadius","baseBackgroundRgb","baseInvertBackgroundRgb","overlayPrefix","neutral","overlayRgba","derived","commonLight","vars","scrollbarColor","scrollbarColorHover","scrollbarLight","scrollbarLight$1","fadeInTransition","enterCubicBezier","leaveCubicBezier","style$5","scrollbarProps","Scrollbar","mergedClsPrefixRef","inlineThemeDisabled","mergedRtlRef","rtlEnabledRef","wrapperRef","containerRef","contentRef","yRailRef","xRailRef","contentHeightRef","contentWidthRef","containerHeightRef","containerWidthRef","yRailSizeRef","xRailSizeRef","containerScrollTopRef","containerScrollLeftRef","isShowXBarRef","isShowYBarRef","yBarPressed","xBarPressed","xBarVanishTimerId","yBarVanishTimerId","memoYTop","memoXLeft","memoMouseX","memoMouseY","yBarSizeRef","containerHeight","yRailSize","yBarSizePxRef","xBarSizeRef","containerWidth","xRailSize","xBarSizePxRef","yBarTopRef","containerScrollTop","heightDiff","yBarTopPxRef","xBarLeftRef","containerScrollLeft","widthDiff","xBarLeftPxRef","needYBarRef","needXBarRef","mergedShowXBarRef","mergedShowYBarRef","mergedContainerRef","mergedContentRef","activateState","scrollTo","handleContentResize","sync","handleContainerResize","scrollToPosition","elSize","behavior","debounce","scrollBy","scrollTop","handleMouseEnterWrapper","showXBar","showYBar","handleMouseLeaveWrapper","hideBar","hideYBar","hideXBar","handleScroll","onScroll","syncScrollState","syncPositionState","xRailEl","yRailEl","syncUnifiedContainer","isMouseUpAway","handleXScrollMouseDown","handleXScrollMouseMove","handleXScrollMouseUp","xBarSize","dScrollLeft","toScrollLeftUpperBound","toScrollLeft","internalOnUpdateScrollLeft","handleYScrollMouseDown","handleYScrollMouseMove","handleYScrollMouseUp","yBarSize","dScrollTop","toScrollTopUpperBound","toScrollTop","needXBar","needYBar","mergedClsPrefix","themeRef","scrollbarBorderRadius","scrollbarHeight","colorHover","themeClassHandle","$slots","triggerDisplayManually","rtlEnabled","internalHoistYRail","triggerIsNone","createYRail","className","createChildren","scrollbarNode","NScrollbar","XScrollbar","cubicBezierEaseIn","cubicBezierEaseOut","fadeInScaleUpTransition","transformOrigin","enterScale","originalTransition","style$4","NBaseWave","selfRef","activeRef","animationTimerId","fadeInWidthExpandTransition","delay","isChrome","isSafari","createHoverColor","rgb","createPressedColor","buttonGroupInjectionKey","commonVariables$1","heightTiny","heightSmall","heightMedium","heightLarge","borderRadius","fontSizeTiny","fontSizeSmall","fontSizeMedium","fontSizeLarge","opacityDisabled","textColor2","textColor3","primaryColorHover","primaryColorPressed","borderColor","primaryColor","baseColor","infoColor","infoColorHover","infoColorPressed","successColor","successColorHover","successColorPressed","warningColor","warningColorHover","warningColorPressed","errorColor","errorColorHover","errorColorPressed","fontWeight","buttonColor2","buttonColor2Hover","buttonColor2Pressed","fontWeightStrong","buttonLight","buttonLight$1","style$3","buttonProps","Button","selfElRef","waveElRef","enterPressedRef","showBorderRef","NButtonGroup","buttonGroupSize","formItemSize","mergedFocusableRef","handleMousedown","onClick","handleKeyup","handleKeydown","handleBlur","rippleDuration","dashed","ghost","circle","textColor","secondary","tertiary","quaternary","strong","fontProps","colorProps","typeIsTertiary","typeIsDefault","mergedType","propTextColor","mergedTextColor","typeTextColor","isColoredType","typeColor","mergedColor","borderProps","padding","paddingRound","iconSize","iconMargin","waveOpacity","sizeProps","hoverColor","onRender","NButton","cardColor","textColor1","dividerColor","closeIconColor","closeIconColorHover","closeIconColorPressed","closeColorHover","closeColorPressed","modalColor","boxShadow1","popoverColor","actionColor","cardLight","cardLight$1","style$2","cardBaseProps","cardBasePropKeys","cardProps","NCard","handleCloseClick","onClose","colorModal","colorTarget","titleTextColor","titleFontWeight","closeBorderRadius","closeIconSize","closeSize","boxShadow","colorPopover","colorEmbedded","colorEmbeddedModal","colorEmbeddedPopover","titleFontSize","getPadding","segmented","hoverable","embedded","configProviderProps","mergedThemeRef","inheritedTheme","mergedThemeOverridesRef","inheritedThemeOverrides","mergedNamespaceRef","mergedBorderedRef","icons","mergedComponentPropsRef","componentOptions","rtl","rtlEnabledState","rtlInfo","peerRtlInfo","mergedBreakpointsRef","preflightStyleDisabled","mergedThemeOverrides","hasThemeOverrides","themeName","dateLocale","hljs","katex","_c","_d","commonVars","dialogLight","dialogLight$1","dialogProps","dialogPropKeys","style$1","iconRenderMap","NDialog","mergedIconPlacementRef","iconPlacement","handlePositiveClick","onPositiveClick","handleNegativeClick","onNegativeClick","border","actionSpace","contentMargin","closeMargin","iconColor","iconMarginDiscrete","mergedIconPlacement","closable","showIcon","title","action","negativeText","positiveText","positiveButtonProps","negativeButtonProps","mergedTheme","loading","actionNode","classNames","dialogProviderInjectionKey","dialogApiInjectionKey","dialogReactiveListInjectionKey","boxShadow3","modalLight","modalLight$1","presetProps","presetPropsKeys","NModalBodyWrapper","bodyRef","scrollbarRef","displayedRef","transformOriginXRef","transformOriginYRef","NModal","styleTransformOrigin","transformOriginX","transformOriginY","syncTransformOrigin","mousePosition","offsetLeft","offsetTop","childNodeRef","$attrs","preset","VFocusTrap","onClickoutside","modalProps","namespaceRef","clickedPositionRef","NDialogProvider","doUpdateShow","show","onUpdateShow","_onUpdateShow","onHide","onBeforeHide","onAfterHide","handleClickoutside","onMaskClick","handleEsc","clickPositionRef","VLazyTeleport","unstableShowMask","isESModule","assign","applyToParams","newParams","noop","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","currentLocation","query","searchString","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","lastToSegment","toPosition","segment","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","offset","docRect","elRect","computeScrollPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","error","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","score","segmentScores","tokenIndex","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","stringify","avoidDuplicatedSlash","param","compareScoreArray","comparePathParserScore","aScore","bScore","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","insertMatcher","matcherRef","getRoutes","isRecordChildOf","paramsFromLocation","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","searchParams","searchParam","eqPos","currentValue","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","guardToPromiseFn","enterCallbackArray","reject","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","isRouteComponent","componentPromise","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","link","elClass","getLinkClass","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","injectedRoute","routeToDisplay","injectedDepth","initialDepth","matchedRoute","matchedRouteRef","viewRef","oldInstance","oldName","currentName","ViewComponent","routePropsOption","routeProps","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","href","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","failure","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","readyHandlers","errorListeners","ready","list","isReady","scrollBehavior","started","reactiveRoute","unmountApp","promise","recordFrom","recordTo","useRouter","useRoute","store","toValidURL","__vitePreload","github_zip_asset_id","inBrowser","makeSymbol","shareable","generateFormatCacheKey","friendlyJSONstringify","json","isNumber","isDate","isRegExp","isEmptyObject","escapeHtml","rawText","join","items","separator","incrementer","code","isNotObjectOrIsArray","deepCopy","src","des","createPosition","line","column","createLocation","loc","RE_ARGS","identifier","CompileErrorCodes","errorMessages","createCompileError","domain","messages","defaultOnError","CHAR_SP","CHAR_CR","CHAR_LF","CHAR_LS","CHAR_PS","createScanner","_buf","_index","_line","_column","_peekOffset","isCRLF","isLF","isPS","isLS","isLineEnd","peekOffset","charAt","currentChar","currentPeek","peek","resetPeek","skipToPeek","EOF","DOT","LITERAL_DELIMITER","ERROR_DOMAIN$3","createTokenizer","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","_context","onError","emitError","pos","getToken","getEndToken","eat","scnr","ch","peekSpaces","buf","skipSpaces","isIdentifierStart","cc","isNumberStart","isNamedIdentifierStart","currentType","isListIdentifierStart","isLiteralStart","isLinkedDotStart","isLinkedModifierStart","isLinkedDelimiterStart","isLinkedReferStart","isPluralStart","detectModuloStart","spaces","isTextStart","hasSpace","detectModulo","takeChar","takeIdentifierChar","takeDigit","takeHexDigit","getDigits","readModulo","readText","readNamedIdentifier","readListIdentifier","readLiteral","literal","readEscapeSequence","readUnicodeEscapeSequence","unicode","digits","sequence","readInvalidIdentifier","identifiers","closure","readLinkedModifier","readLinkedRefer","detect","readPlural","plural","readTokenInPlaceholder","readTokenInLinked","validNamedIdentifier","validListIdentifier","validLiteral","readToken","isModulo","nextToken","startLoc","endLoc","ERROR_DOMAIN$2","KNOWN_ESCAPES","fromEscapeSequence","codePoint4","codePoint6","codePoint","createParser","tokenzer","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinkedModifier","getTokenCaption","parseLinkedKey","parseLinked","linkedNode","parsed","nextContext","emptyLinkedKeyNode","parseMessage","startOffset","endOffset","parsePlural","msgNode","hasEmptyMessage","parseResource","createTransformer","ast","traverseNodes","nodes","transformer","traverseNode","optimize","body","optimizeMessageNode","ERROR_DOMAIN$1","minify","resource","cases","valueNode","linked","named","ERROR_DOMAIN","createCodeGenerator","sourceMap","filename","breakLineCode","_needIndent","_newline","withBreakLine","_breakLineCode","withNewLine","level","deindent","newline","generateLinkedNode","generator","helper","generateNode","generateMessageNode","needIndent","generatePluralNode","generateResource","generate","helpers","baseCompile","assignedOptions","jit","enalbeMinify","enambeOptimize","initFeatureFlags","pathStateMachine","literalValueRE","isLiteral","exp","stripQuotes","getPathCharType","formatSubPath","trimmed","subPathDepth","newChar","typeMap","actions","maybeUnescapeQuote","nextChar","resolveWithKeyValue","resolveValue","hit","DEFAULT_MODIFIER","DEFAULT_MESSAGE","DEFAULT_MESSAGE_DATA_TYPE","DEFAULT_NORMALIZE","DEFAULT_INTERPOLATE","pluralDefault","choice","choicesLength","getPluralIndex","normalizeNamed","pluralIndex","createMessageContext","pluralRule","orgPluralRule","_list","_named","_modifier","normalize","interpolate","arg1","arg2","devtools","setDevToolsHook","initI18nDevTools","i18n","translateDevTools","createDevToolsHook","payloads","CoreWarnCodes","inc","CoreErrorCodes","createCoreError","getLocale","resolveLocale","_resolveLocale","fallbackWithSimple","fallbackWithLocaleChain","startLocale","DEFAULT_LOCALE","chain","block","appendBlockToChain","blocks","follow","appendLocaleToChain","appendItemToChain","VERSION","NOT_REOSLVED","MISSING_RESOLVE_VALUE","getDefaultLinkedModifiers","_compiler","registerMessageCompiler","compiler","_resolver","registerMessageResolver","resolver","_fallbacker","registerLocaleFallbacker","fallbacker","_additionalMeta","setAdditionalMeta","getAdditionalMeta","_fallbackContext","setFallbackContext","getFallbackContext","_cid","createCoreContext","onWarn","_locale","fallbackLocale","datetimeFormats","numberFormats","pluralRules","missing","missingWarn","fallbackWarn","fallbackFormat","unresolving","postTranslation","processor","warnHtmlMessage","escapeParameter","messageCompiler","messageResolver","localeFallbacker","fallbackContext","internalOptions","__datetimeFormatters","__numberFormatters","__meta","handleMissing","updateFallbackLocale","formatParts","formatMessageParts","_static","acm","formatMessagePart","linkedKey","linkedModifier","defaultOnCacheKey","compileCache","isMessageAST","detectError","baseCompile$1","compileToFunction","NOOP_MESSAGE_FUNCTION","isMessageFunction","translate","parseTranslateArgs","resolvedMessage","defaultMsgOrKey","enableDefaultMsg","escapeParams","formatScope","targetLocale","resolveMessageFormat","cacheBaseKey","occurred","compileMessageFormat","ctxOptions","getMessageContextOptions","msgContext","messaged","evaluateMessage","locales","missingRet","getCompileContext","msgCtx","arg3","datetime","overrides","parseDateTimeArgs","datetimeFormat","formatter","DATETIME_FORMAT_OPTIONS_KEYS","arg4","matches","dateTime","clearDateTimeFormat","parseNumberArgs","numberFormat","NUMBER_FORMAT_OPTIONS_KEYS","clearNumberFormat","code$1","inc$1","I18nErrorCodes","createI18nError","TranslateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOptionSymbol","DisposeSymbol","handleFlatJson","subKeys","currentObj","hasStringValue","getLocaleMessages","__i18n","flatJson","custom","getComponentOptions","adjustI18nResources","gl","createTextNode","DEVTOOLS_META","NOOP_RETURN_ARRAY","NOOP_RETURN_FALSE","composerID","defineCoreMissingHandler","getMetaInfo","createComposer","VueI18nLegacy","__root","__injectWithOption","_isGlobal","_inheritLocale","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","_fallbackWarn","_fallbackRoot","_fallbackFormat","_missing","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","trackReactivityValues","getPostTranslationHandler","setPostTranslationHandler","getMissingHandler","setMissingHandler","wrapWithDeps","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","rt","translateVNode","numberParts","datetimeParts","setPluralRules","rules","te","getLocaleMessage","resolveMessages","targetLocaleMessages","messageValue","tm","setLocaleMessage","_message","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","mergeNumberFormat","composer","convertComposerOptions","fallbackRoot","pluralizationRules","inheritLocale","sharedMessages","createVueI18n","__extender","vueI18n","baseFormatProps","getInterpolateArg","getFragmentableTag","TranslationImpl","useI18n","assignedAttrs","Translation","renderFormatter","slotKeys","partFormatter","NumberFormatImpl","NumberFormat","DatetimeFormatImpl","DatetimeFormat","getComposer$2","i18nInternal","vTDirective","_process","parsedValue","parseValue","makeParams","textContent","pluginOptions","useI18nComponentName","defineMixin","vuei18n","optionsI18n","mergeToGlobal","_vueI18n","I18nInjectionKey","createI18n","__legacyMode","__globalInjection","__allowComposition","__instances","globalScope","__global","createGlobal","symbol","__getInstance","__setInstance","__deleteInstance","opts","globalReleaseHandler","injectGlobalFields","getI18nInstance","getGlobalComposer","getScope","useI18nForLegacy","getComposer","composerOptions","setupLifeCycle","legacyMode","useComponent","getParentComponentInstance","_composer","dispose","isLocalScope","warpWithDeps","globalExportProps","globalExportMethods","desc","commitLog","latestLog","App"],"sources":["../../node_modules/.pnpm/@vue+shared@3.4.14/node_modules/@vue/shared/dist/shared.esm-bundler.js","../../node_modules/.pnpm/@vue+reactivity@3.4.14/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../node_modules/.pnpm/@vue+runtime-core@3.4.14/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../node_modules/.pnpm/@vue+runtime-dom@3.4.14/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../node_modules/.pnpm/seemly@0.3.8/node_modules/seemly/es/dom/get-precise-event-target.js","../../node_modules/.pnpm/seemly@0.3.8/node_modules/seemly/es/css/index.js","../../node_modules/.pnpm/seemly@0.3.8/node_modules/seemly/es/color/colors.js","../../node_modules/.pnpm/seemly@0.3.8/node_modules/seemly/es/color/index.js","../../node_modules/.pnpm/seemly@0.3.8/node_modules/seemly/es/misc/index.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/keep.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/flatten.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/call.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/keysOf.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/render.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/naive/warn.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/get-first-slot-vnode.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/create-injection-key.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/resolve-slot.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/vue/wrapper.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/css/color-to-class.mjs","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/parse.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/utils.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/render.js","../../node_modules/.pnpm/@emotion+hash@0.8.0/node_modules/@emotion/hash/dist/hash.browser.esm.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/mount.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/c.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/CssRender.js","../../node_modules/.pnpm/css-render@0.15.12/node_modules/css-render/esm/exists.js","../../node_modules/.pnpm/@css-render+plugin-bem@0.15.12_css-render@0.15.12/node_modules/@css-render/plugin-bem/esm/index.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/cssr/index.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/env/is-browser.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/event/index.mjs","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/use-false-until-truthy.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/use-memo.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/utils.js","../../node_modules/.pnpm/evtd@0.2.4/node_modules/evtd/es/utils.js","../../node_modules/.pnpm/evtd@0.2.4/node_modules/evtd/es/traps.js","../../node_modules/.pnpm/evtd@0.2.4/node_modules/evtd/es/delegate.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/use-click-position.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/use-clicked.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/life-cycle/use-is-mounted.js","../../node_modules/.pnpm/vooks@0.2.12_vue@3.4.14/node_modules/vooks/es/use-is-ios.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/drawer/src/interface.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/popover/src/interface.mjs","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/shared/v-node.js","../../node_modules/.pnpm/vdirs@0.1.8_vue@3.4.14/node_modules/vdirs/es/clickoutside.js","../../node_modules/.pnpm/vdirs@0.1.8_vue@3.4.14/node_modules/vdirs/es/utils.js","../../node_modules/.pnpm/vdirs@0.1.8_vue@3.4.14/node_modules/vdirs/es/zindexable/z-index-manager.js","../../node_modules/.pnpm/vdirs@0.1.8_vue@3.4.14/node_modules/vdirs/es/zindexable/index.js","../../node_modules/.pnpm/@css-render+vue3-ssr@0.15.12_vue@3.4.14/node_modules/@css-render/vue3-ssr/esm/index.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/shared/warn.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/shared/resolve-to.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/lazy-teleport/src/index.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/freeze.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/element.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/global.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/process.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/utils/scheduler.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObservation.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserverController.js","../../node_modules/.pnpm/@juggle+resize-observer@3.4.0/node_modules/@juggle/resize-observer/lib/ResizeObserver.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/resize-observer/src/delegate.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/resize-observer/src/VResizeObserver.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/focus-trap/src/utils.js","../../node_modules/.pnpm/vueuc@0.4.58_vue@3.4.14/node_modules/vueuc/es/focus-trap/src/index.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/composable/use-lock-html-scroll.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/composable/use-is-composing.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/composable/use-reactivated.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-form-item.mjs","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js","../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/common/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/global/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/config-provider/src/context.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-theme.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-config.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/locales/common/zhCN.mjs","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/_lib/formatDistance/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/_lib/formatLong/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js","../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/toDate/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/toInteger/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/defaultOptions/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/isSameUTCWeek/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/_lib/formatRelative/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/_lib/localize/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/_lib/match/index.js","../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/zh-CN/index.js","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/locales/date/zhCN.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-style.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-css-vars-class.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_mixins/use-rtl.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/replaceable.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Close.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Error.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Info.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Success.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icons/Warning.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icon-switch-transition/src/IconSwitchTransition.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/fade-in-expand-transition/src/FadeInExpandTransition.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icon/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/icon/src/Icon.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/close/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/close/src/Close.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/transitions/icon-switch.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/loading/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/loading/src/Loading.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/common/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/scrollbar/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/transitions/fade-in.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/scrollbar/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/scrollbar/src/Scrollbar.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/transitions/fade-in-scale-up.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/wave/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_internal/wave/src/Wave.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_styles/transitions/fade-in-width-expand.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/env/browser.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/_utils/color/index.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button-group/src/context.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button/styles/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/button/src/Button.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/card/styles/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/card/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/card/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/card/src/Card.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/config-provider/src/ConfigProvider.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/styles/_common.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/src/dialogProps.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/src/Dialog.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/dialog/src/context.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/styles/light.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/src/presetProps.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/src/BodyWrapper.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/src/styles/index.cssr.mjs","../../node_modules/.pnpm/naive-ui@2.37.3_vue@3.4.14/node_modules/naive-ui/es/modal/src/Modal.mjs","../../node_modules/.pnpm/vue-router@4.2.5_vue@3.4.14/node_modules/vue-router/dist/vue-router.mjs","../../src/utils/store.ts","../../src/utils/check.ts","../../src/router/index.ts","../../node_modules/.pnpm/@intlify+shared@9.9.0/node_modules/@intlify/shared/dist/shared.mjs","../../node_modules/.pnpm/@intlify+message-compiler@9.9.0/node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js","../../node_modules/.pnpm/@intlify+core-base@9.9.0/node_modules/@intlify/core-base/dist/core-base.mjs","../../node_modules/.pnpm/vue-i18n@9.9.0_vue@3.4.14/node_modules/vue-i18n/dist/vue-i18n.mjs","../../src/i18n.ts","../../src/utils/commit.ts","../../src/main.ts"],"sourcesContent":["/**\n* @vue/shared v3.4.14\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.4.14\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { NOOP, extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeEffect;\nclass ReactiveEffect {\n constructor(fn, trigger, scheduler, scope) {\n this.fn = fn;\n this.trigger = trigger;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n /**\n * @internal\n */\n this._dirtyLevel = 2;\n /**\n * @internal\n */\n this._trackId = 0;\n /**\n * @internal\n */\n this._runnings = 0;\n /**\n * @internal\n */\n this._shouldSchedule = false;\n /**\n * @internal\n */\n this._depsLength = 0;\n recordEffectScope(this, scope);\n }\n get dirty() {\n if (this._dirtyLevel === 1) {\n pauseTracking();\n for (let i = 0; i < this._depsLength; i++) {\n const dep = this.deps[i];\n if (dep.computed) {\n triggerComputed(dep.computed);\n if (this._dirtyLevel >= 2) {\n break;\n }\n }\n }\n if (this._dirtyLevel < 2) {\n this._dirtyLevel = 0;\n }\n resetTracking();\n }\n return this._dirtyLevel >= 2;\n }\n set dirty(v) {\n this._dirtyLevel = v ? 2 : 0;\n }\n run() {\n this._dirtyLevel = 0;\n if (!this.active) {\n return this.fn();\n }\n let lastShouldTrack = shouldTrack;\n let lastEffect = activeEffect;\n try {\n shouldTrack = true;\n activeEffect = this;\n this._runnings++;\n preCleanupEffect(this);\n return this.fn();\n } finally {\n postCleanupEffect(this);\n this._runnings--;\n activeEffect = lastEffect;\n shouldTrack = lastShouldTrack;\n }\n }\n stop() {\n var _a;\n if (this.active) {\n preCleanupEffect(this);\n postCleanupEffect(this);\n (_a = this.onStop) == null ? void 0 : _a.call(this);\n this.active = false;\n }\n }\n}\nfunction triggerComputed(computed) {\n return computed.value;\n}\nfunction preCleanupEffect(effect2) {\n effect2._trackId++;\n effect2._depsLength = 0;\n}\nfunction postCleanupEffect(effect2) {\n if (effect2.deps && effect2.deps.length > effect2._depsLength) {\n for (let i = effect2._depsLength; i < effect2.deps.length; i++) {\n cleanupDepEffect(effect2.deps[i], effect2);\n }\n effect2.deps.length = effect2._depsLength;\n }\n}\nfunction cleanupDepEffect(dep, effect2) {\n const trackId = dep.get(effect2);\n if (trackId !== void 0 && effect2._trackId !== trackId) {\n dep.delete(effect2);\n if (dep.size === 0) {\n dep.cleanup();\n }\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn, NOOP, () => {\n if (_effect.dirty) {\n _effect.run();\n }\n });\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nlet pauseScheduleStack = 0;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction pauseScheduling() {\n pauseScheduleStack++;\n}\nfunction resetScheduling() {\n pauseScheduleStack--;\n while (!pauseScheduleStack && queueEffectSchedulers.length) {\n queueEffectSchedulers.shift()();\n }\n}\nfunction trackEffect(effect2, dep, debuggerEventExtraInfo) {\n var _a;\n if (dep.get(effect2) !== effect2._trackId) {\n dep.set(effect2, effect2._trackId);\n const oldDep = effect2.deps[effect2._depsLength];\n if (oldDep !== dep) {\n if (oldDep) {\n cleanupDepEffect(oldDep, effect2);\n }\n effect2.deps[effect2._depsLength++] = dep;\n } else {\n effect2._depsLength++;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n }\n}\nconst queueEffectSchedulers = [];\nfunction triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {\n var _a;\n pauseScheduling();\n for (const effect2 of dep.keys()) {\n if (dep.get(effect2) !== effect2._trackId) {\n continue;\n }\n if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {\n const lastDirtyLevel = effect2._dirtyLevel;\n effect2._dirtyLevel = dirtyLevel;\n if (lastDirtyLevel === 0) {\n effect2._shouldSchedule = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n effect2.trigger();\n }\n }\n if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {\n effect2._shouldSchedule = false;\n queueEffectSchedulers.push(effect2.scheduler);\n }\n }\n resetScheduling();\n}\n\nconst createDep = (cleanup, computed) => {\n const dep = /* @__PURE__ */ new Map();\n dep.cleanup = cleanup;\n dep.computed = computed;\n return dep;\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep(() => depsMap.delete(key)));\n }\n trackEffect(\n activeEffect,\n dep,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key\n } : void 0\n );\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n pauseScheduling();\n for (const dep of deps) {\n if (dep) {\n triggerEffects(\n dep,\n 2,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n } : void 0\n );\n }\n }\n resetScheduling();\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n pauseScheduling();\n const res = toRaw(this)[key].apply(this, args);\n resetScheduling();\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _shallow = false) {\n this._isReadonly = _isReadonly;\n this._shallow = _shallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, shallow = this._shallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the reciever is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(false, shallow);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._shallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(true, shallow);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(\n method,\n false,\n false\n );\n readonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n false\n );\n shallowInstrumentations2[method] = createIterableMethod(\n method,\n false,\n true\n );\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n def(value, \"__v_skip\", true);\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this.effect = new ReactiveEffect(\n () => getter(this._value),\n () => triggerRefValue(this, 1)\n );\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n if (!self._cacheable || self.effect.dirty) {\n if (hasChanged(self._value, self._value = self.effect.run())) {\n triggerRefValue(self, 2);\n }\n }\n trackRefValue(self);\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x\n get _dirty() {\n return this.effect.dirty;\n }\n set _dirty(v) {\n this.effect.dirty = v;\n }\n // #endregion\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n console.warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nfunction trackRefValue(ref2) {\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n trackEffect(\n activeEffect,\n ref2.dep || (ref2.dep = createDep(\n () => ref2.dep = void 0,\n ref2 instanceof ComputedRefImpl ? ref2 : void 0\n )),\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"get\",\n key: \"value\"\n } : void 0\n );\n }\n}\nfunction triggerRefValue(ref2, dirtyLevel = 2, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n triggerEffects(\n dep,\n dirtyLevel,\n !!(process.env.NODE_ENV !== \"production\") ? {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n } : void 0\n );\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, 2, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nconst deferredComputed = computed;\n\nconst TrackOpTypes = {\n \"GET\": \"get\",\n \"HAS\": \"has\",\n \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n \"SET\": \"set\",\n \"ADD\": \"add\",\n \"DELETE\": \"delete\",\n \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n \"SKIP\": \"__v_skip\",\n \"IS_REACTIVE\": \"__v_isReactive\",\n \"IS_READONLY\": \"__v_isReadonly\",\n \"IS_SHALLOW\": \"__v_isShallow\",\n \"RAW\": \"__v_raw\"\n};\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseScheduling, pauseTracking, proxyRefs, reactive, readonly, ref, resetScheduling, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","/**\n* @vue/runtime-core v3.4.14\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn$1(msg, ...args) {\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorCodes = {\n \"SETUP_FUNCTION\": 0,\n \"0\": \"SETUP_FUNCTION\",\n \"RENDER_FUNCTION\": 1,\n \"1\": \"RENDER_FUNCTION\",\n \"WATCH_GETTER\": 2,\n \"2\": \"WATCH_GETTER\",\n \"WATCH_CALLBACK\": 3,\n \"3\": \"WATCH_CALLBACK\",\n \"WATCH_CLEANUP\": 4,\n \"4\": \"WATCH_CLEANUP\",\n \"NATIVE_EVENT_HANDLER\": 5,\n \"5\": \"NATIVE_EVENT_HANDLER\",\n \"COMPONENT_EVENT_HANDLER\": 6,\n \"6\": \"COMPONENT_EVENT_HANDLER\",\n \"VNODE_HOOK\": 7,\n \"7\": \"VNODE_HOOK\",\n \"DIRECTIVE_HOOK\": 8,\n \"8\": \"DIRECTIVE_HOOK\",\n \"TRANSITION_HOOK\": 9,\n \"9\": \"TRANSITION_HOOK\",\n \"APP_ERROR_HANDLER\": 10,\n \"10\": \"APP_ERROR_HANDLER\",\n \"APP_WARN_HANDLER\": 11,\n \"11\": \"APP_WARN_HANDLER\",\n \"FUNCTION_REF\": 12,\n \"12\": \"FUNCTION_REF\",\n \"ASYNC_COMPONENT_LOADER\": 13,\n \"13\": \"ASYNC_COMPONENT_LOADER\",\n \"SCHEDULER\": 14,\n \"14\": \"SCHEDULER\"\n};\nconst ErrorTypeStrings$1 = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n let res;\n try {\n res = args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n return res;\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/errors/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings$1[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (instance && cb.id !== instance.uid) {\n continue;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.effect.dirty = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n instance.parent.effect.dirty = true;\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools$1) {\n devtools$1.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook$1(hook, target) {\n var _a, _b;\n devtools$1 = hook;\n if (devtools$1) {\n devtools$1.enabled = true;\n buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook$1(newHook, target);\n });\n setTimeout(() => {\n if (!devtools$1) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools$1.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn$1(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn$1(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn$1(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n event\n )}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n props,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n let result;\n let fallthroughAttrs;\n const prev = setCurrentRenderingInstance(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n get(target, key, receiver) {\n warn$1(\n `Property '${String(\n key\n )}' was accessed via 'this'. Avoid using 'this' in templates.`\n );\n return Reflect.get(target, key, receiver);\n }\n }) : proxyToUse;\n result = normalizeVNode(\n render.call(\n thisProxy,\n proxyToUse,\n renderCache,\n props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return attrs;\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n props,\n null\n /* we know it doesn't need it */\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn$1(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn$1(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren, false);\n if (!childRoot) {\n return [vnode, void 0];\n } else if (!!(process.env.NODE_ENV !== \"production\") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {\n return getChildRoot(childRoot);\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children, recurse = true) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n if (!!(process.env.NODE_ENV !== \"production\") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {\n return filterSingleRoot(singleRoot.children);\n }\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent) {\n const root = parent.subTree;\n if (root.suspense && root.suspense.activeBranch === vnode) {\n root.el = vnode.el;\n }\n if (root === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n } else {\n break;\n }\n }\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n if (parentSuspense && parentSuspense.deps > 0) {\n n2.suspense = n1.suspense;\n return;\n }\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n if (!isHydrating) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n }\n } else {\n suspense.pendingId = suspenseId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n if (newBranch.shapeFlag & 512) {\n suspense.pendingId = newBranch.component.suspenseId;\n } else {\n suspense.pendingId = suspenseId++;\n }\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const initialAnchor = anchor;\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n namespace,\n container,\n hiddenContainer,\n deps: 0,\n pendingId: suspenseId++,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: !isHydrating,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n let delayEnter = false;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(\n pendingBranch,\n container2,\n anchor === initialAnchor ? next(activeBranch) : anchor,\n 0\n );\n queuePostFlushCb(effects);\n }\n };\n }\n if (activeBranch) {\n if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {\n anchor = next(activeBranch);\n }\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor && !delayEnter) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n namespace2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n namespace,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n // eslint-disable-next-line no-restricted-globals\n document.createElement(\"div\"),\n null,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n warn$1(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n let el = branch.el;\n while (!el && branch.component) {\n branch = branch.component.subTree;\n el = branch.el;\n }\n vnode.el = el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n var _a;\n return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n {\n const ctx = inject(ssrContextKey);\n if (!ctx) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n );\n }\n return ctx;\n }\n};\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn$1(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, {\n immediate,\n deep,\n flush,\n once,\n onTrack,\n onTrigger\n} = EMPTY_OBJ) {\n if (cb && once) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n unwatch();\n };\n }\n if (!!(process.env.NODE_ENV !== \"production\") && deep !== void 0 && typeof deep === \"number\") {\n warn$1(\n `watch() \"deep\" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn$1(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn$1(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (once !== void 0) {\n warn$1(\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn$1(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = currentInstance;\n const reactiveGetter = (source2) => deep === true ? source2 : (\n // for deep: false, only traverse root-level properties\n traverse(source2, deep === false ? 1 : void 0)\n );\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow$1(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n cleanup = effect.onStop = void 0;\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active || !effect.dirty) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, NOOP, scheduler);\n const scope = getCurrentScope();\n const unwatch = () => {\n effect.stop();\n if (scope) {\n remove(scope.effects, effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const reset = setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n reset();\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, depth, currentDepth = 0, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n if (depth && depth > 0) {\n if (currentDepth >= depth) {\n return value;\n }\n currentDepth++;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, depth, currentDepth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, currentDepth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, currentDepth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, currentDepth, seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n let prevTransitionKey;\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn$1(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn$1(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n let transitionKeyChanged = false;\n const { getTransitionKey } = innerChild.type;\n if (getTransitionKey) {\n const key = getTransitionKey();\n if (prevTransitionKey === void 0) {\n prevTransitionKey = key;\n } else if (key !== prevTransitionKey) {\n prevTransitionKey = key;\n transitionKeyChanged = true;\n }\n }\n if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\") {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.effect.dirty = true;\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n return isKeepAlive(vnode) ? (\n // #7121 ensure get the child component subtree in case\n // it's been replaced during HMR\n !!(process.env.NODE_ENV !== \"production\") && vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0\n ) : vnode;\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn$1(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n instance.parent.effect.dirty = true;\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n namespace,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn$1(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn$1(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n i.effect.dirty = true;\n queueJob(i.update);\n }),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate + - + GKD - - + +